Options
All
  • Public
  • Public/Protected
  • All
Menu

Directory Provider Class

Hierarchy

  • CXoneDirectoryProvider

Index

Constructors

Properties

acdSession: ACDSessionManager = ACDSessionManager.instance
baseUri: string = ''
currentEntities: DirectoryEntities[]
directoryAdapter: CXoneDirectoryAdapter = ...
directoryBase: CXoneDirectory = ...
entity: DirectoryEntities[] = []
entityCounts: { addressBookList: number; agentList: number; skillList: number; teamList: number; totalAddressBookCount: number; totalAgentCount: number; totalSkillCount: number; totalTeamCount: number } = ...

Type declaration

  • addressBookList: number
  • agentList: number
  • skillList: number
  • teamList: number
  • totalAddressBookCount: number
  • totalAgentCount: number
  • totalSkillCount: number
  • totalTeamCount: number
entityPollingFlag: { SkillActivity: boolean; addressBookList: boolean; agentList: boolean; skillList: boolean; teamList: boolean } = ...

Type declaration

  • SkillActivity: boolean
  • addressBookList: boolean
  • agentList: boolean
  • skillList: boolean
  • teamList: boolean
favoriteAddressBookList: AddressBooksEntries[] = []
favoriteSkillList: SkillEvent[] = []
favoriteTeamList: Team[] = []
favroiteAgentList: AgentStateResponse[] = []
isFreshRequest: boolean = false
lastAddressBookEntriesArray: { addressBookEntryId: number; addressBookId: number; firstName: string; lastName: string }[] = []
lastAddressBookSearchEntriesMap: Map<number, number> = ...
limit: number = -1
logger: Logger = ...
mediaType: number = undefined
offset: number = -1
pollingOptions: PollingOptions = undefined
pollingWorker: any
searchText: string = ''
teamId: string = ''
totalSearchResultCount: { addressBookList: number; agentList: number; skillList: number; teamList: number } = ...

Type declaration

  • addressBookList: number
  • agentList: number
  • skillList: number
  • teamList: number
utilService: HttpUtilService = ...

Methods

  • clearCopilotDB(): Promise<void>
  • clearDigitalDB(): Promise<void>
  • clearDirectoryDB(): Promise<void>
  • getAgentStateOrDefault(agentStateName: string): number
  • getDirectoryData(entity: DirectoryEntities[], pollingOptions?: PollingOptions, offset?: number, limit?: number, searchText?: string, teamId?: string, mediaType?: number, shouldFetchAllAgents?: boolean): Promise<void>
  • Used to handle the directory data request

    example
    getDirectoryData(true, ["agentList"], 1, 14, '');
    

    Parameters

    • entity: DirectoryEntities[]

      requested entity array for directory data

    • Optional pollingOptions: PollingOptions
    • Optional offset: number

      start index for the pagination data, should be greater than 0

    • Optional limit: number

      end index for the pagination data, should be greater than 0

    • Optional searchText: string

      search string in case for search request, search will happen on fields depending on entity requested. If requested entity is agentList then search will happen based on fields - (firstName, lastName, userName). If requested entity is skillList then search will happen based on field - (skillName). If requested entity is addressBookList then search will happen based on field - (firstName, lastName, mobile, phone, email). If requested entity is teamList then search will happen based on field - (teamName).

    • Optional teamId: string
    • Optional mediaType: number
    • Optional shouldFetchAllAgents: boolean

      flag to get all agent list including logged-in user

    Returns Promise<void>

  • getDirectoryPollingConfig(): any
  • getFavoritesByDigitalSkill(skillName: string): Promise<SkillEvent[]>
  • getFavoritesByTeam(teamName: string): Promise<Team[]>
  • getFilteredTeamList(searchText: string, teamList: Team[]): Team[]
  • getUnifiedAgentStateOrDefault(agentStateName: string): number
  • handleDirectoryResponse(response: any, shouldFetchAllAgents?: boolean): Promise<void>
  • Callback method which will passed on to the worker and will be executed after the polling api response then will publish to the subject subscriber with the directory data

    example
    handleDirectoryResponse(data);
    

    Parameters

    • response: any

      agent state api response object

    • Optional shouldFetchAllAgents: boolean

      -flag to get all agent list including logged-in user

    Returns Promise<void>

  • initUtilWorker(): void
  • isNewSearchedRequest(newSearchText?: string, newOffset?: number, newLimit?: number, newEntity?: DirectoryEntities[], newTeamId?: string, newMediaType?: number): boolean
  • Used to check if the current request is a new search request or the already searched request

    Parameters

    • Optional newSearchText: string

      search string

    • Optional newOffset: number

      start index for pagination

    • Optional newLimit: number

      last index for pagination

    • Optional newEntity: DirectoryEntities[]

      entity array

    • Optional newTeamId: string
    • Optional newMediaType: number

    Returns boolean

    boolean stating if true that means its a new search request

  • restartWorker(): void
  • searchDirectoryData(searchText: string, entities?: string[], shouldFetchAllAgents?: boolean): Promise<DirectoryResponse>
  • Used to get the search result for the directory entities from indexDB. if entities array is passed then the result will be included for those entities if not passed then result will include all the entities

    Parameters

    • searchText: string

      text on the basis of which the search will be performed

    • Optional entities: string[]

      array of requested entity options for search

    • Optional shouldFetchAllAgents: boolean

      flag to get all agent list including logged-in user

    Returns Promise<DirectoryResponse>

  • terminateDirectoryWorker(): void
  • terminatePolling(): void
  • toggleFavoriteForDigitalSkill(skillInfo: SkillEvent[]): Promise<void>
  • toggleFavoriteForStandardAddressBookEntries(addressBookEntries: AddressBooksEntries[]): Promise<void>
  • toggleFavoriteForTeam(teamInfo: Team[]): Promise<void>
  • updateSearchTeamList(currentSearchTeamList: Team[], newTeamList: Team[]): { currentFavTeamList: Team[]; currentSearchTeamList: Team[] }
  • updateTeamListInDB(teamList: Team[]): Promise<{ currentFavTeamList: Team[]; currentTeamList: Team[] }>

Generated using TypeDoc