Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to manage all user-related methods

Hierarchy

  • CXoneUser

Index

Constructors

  • constructor for CXoneUser

    example
    const cxoneUser = CXoneUser.instance;
    

    Returns CXoneUser

Properties

adminService: AdminService
logger: Logger = ...
userInfo: UserInfo = ...
validationUtils: ValidationUtils = ...
cxoneUser: CXoneUser

Accessors

  • Method to create singleton object of the class

    example
    const user = CXoneUser.instance;
    

    Returns CXoneUser

Methods

  • method to check DigitalEngagement is enabled at user level

    example
    checkUserDigitalEngagement();
    

    Returns Promise<boolean | CXoneSdkError>

  • Method to return agent settings

    example
    this.getAgentSettings()
    

    Returns Promise<AgentSettings>

    • return the agent settings
  • Method to return client data

    Returns Promise<string | CXoneSdkError>

    • returns the client data
    @example
    getClientData()
  • Method to get digital interaction search tab permissions from local storage

    example
    cxoneUser.getDigitalSearchTabPermissions();
    

    Returns CXoneDigitalSearchTabPermissions

    • the interaction search tab permissions as permission object
  • Get the current logged in user details

    Returns Promise<CXoneSdkError | UserInfo>

    • It returns the user information
    @example
    getUserDetails();
  • Get the user details from the auth token that stored in the local storage

    example
    getUserInfo();
    

    Returns UserInfo

    • It returns the user information
  • Method to get user location

    example
    getUserLocation();
    

    Returns Promise<CXoneSdkError | UserLocation>

    • It returns the user location
  • Method to initialize auth details

    example
    const user = CXoneUser.instance;
    user.initAuth(accessToken, cxOneConfig);

    Parameters

    Returns void

  • method to check product app is enabled at user level

    example
    isCustomAttributesEnabled();
    

    Parameters

    Returns Promise<boolean | CXoneSdkError>

  • setDigitalUserDetails(userDetails: UserInfo): void
  • Set the userinfo like digital id, brand id after the successful authentication

    example
    setDigitalUserDetails(userDetails);
    

    Parameters

    Returns void

  • setTeamIdUserInfo(teamId: number): void
  • Set the Team ID in User Info

    example
    setTeamIdUserInfo(teamId)
    

    Parameters

    • teamId: number

      Team ID

    Returns void

  • setUserDetails(verfiedUser: JwtPayload, isVerified: boolean): void
  • Set the userinfo from the idToken after the successful authentication

    example
    setUserDetails(authToken);
    

    Parameters

    • verfiedUser: JwtPayload
    • isVerified: boolean

    Returns void

  • Method to set user location

    example
    setUserLocation(locationId);
    

    Parameters

    • locationId: string

      location id

    Returns Promise<HttpResponse | CXoneSdkError>

    • It returns the user location

Generated using TypeDoc