@webex/contact-center 3.11.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/cc.js +91 -27
  2. package/dist/cc.js.map +1 -1
  3. package/dist/constants.js +5 -1
  4. package/dist/constants.js.map +1 -1
  5. package/dist/index.js +7 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/metrics/behavioral-events.js +13 -0
  8. package/dist/metrics/behavioral-events.js.map +1 -1
  9. package/dist/metrics/constants.js +9 -1
  10. package/dist/metrics/constants.js.map +1 -1
  11. package/dist/services/ApiAiAssistant.js +173 -0
  12. package/dist/services/ApiAiAssistant.js.map +1 -0
  13. package/dist/services/agent/types.js.map +1 -1
  14. package/dist/services/config/Util.js +6 -2
  15. package/dist/services/config/Util.js.map +1 -1
  16. package/dist/services/config/constants.js +12 -0
  17. package/dist/services/config/constants.js.map +1 -1
  18. package/dist/services/config/index.js +41 -2
  19. package/dist/services/config/index.js.map +1 -1
  20. package/dist/services/config/types.js +19 -1
  21. package/dist/services/config/types.js.map +1 -1
  22. package/dist/services/constants.js +19 -1
  23. package/dist/services/constants.js.map +1 -1
  24. package/dist/services/core/Err.js.map +1 -1
  25. package/dist/services/core/Utils.js +28 -6
  26. package/dist/services/core/Utils.js.map +1 -1
  27. package/dist/services/core/aqm-reqs.js +92 -17
  28. package/dist/services/core/aqm-reqs.js.map +1 -1
  29. package/dist/services/core/websocket/WebSocketManager.js +13 -1
  30. package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
  31. package/dist/services/task/TaskManager.js +96 -25
  32. package/dist/services/task/TaskManager.js.map +1 -1
  33. package/dist/services/task/TaskUtils.js +16 -3
  34. package/dist/services/task/TaskUtils.js.map +1 -1
  35. package/dist/services/task/constants.js +14 -1
  36. package/dist/services/task/constants.js.map +1 -1
  37. package/dist/services/task/dialer.js +51 -0
  38. package/dist/services/task/dialer.js.map +1 -1
  39. package/dist/services/task/types.js +15 -0
  40. package/dist/services/task/types.js.map +1 -1
  41. package/dist/types/cc.d.ts +800 -0
  42. package/dist/types/config.d.ts +66 -0
  43. package/dist/types/constants.d.ts +50 -0
  44. package/dist/types/index.d.ts +184 -0
  45. package/dist/types/logger-proxy.d.ts +71 -0
  46. package/dist/types/metrics/MetricsManager.d.ts +223 -0
  47. package/dist/types/metrics/behavioral-events.d.ts +29 -0
  48. package/dist/types/metrics/constants.d.ts +161 -0
  49. package/dist/types/services/AddressBook.d.ts +74 -0
  50. package/dist/types/services/ApiAiAssistant.d.ts +31 -0
  51. package/dist/types/services/EntryPoint.d.ts +67 -0
  52. package/dist/types/services/Queue.d.ts +76 -0
  53. package/dist/types/services/WebCallingService.d.ts +1 -0
  54. package/dist/types/services/agent/index.d.ts +46 -0
  55. package/dist/types/services/agent/types.d.ts +413 -0
  56. package/dist/types/services/config/Util.d.ts +20 -0
  57. package/dist/types/services/config/constants.d.ts +249 -0
  58. package/dist/types/services/config/index.d.ts +177 -0
  59. package/dist/types/services/config/types.d.ts +1207 -0
  60. package/dist/types/services/constants.d.ts +103 -0
  61. package/dist/types/services/core/Err.d.ts +121 -0
  62. package/dist/types/services/core/GlobalTypes.d.ts +58 -0
  63. package/dist/types/services/core/Utils.d.ts +101 -0
  64. package/dist/types/services/core/WebexRequest.d.ts +22 -0
  65. package/dist/types/services/core/aqm-reqs.d.ts +65 -0
  66. package/dist/types/services/core/constants.d.ts +99 -0
  67. package/dist/types/services/core/types.d.ts +47 -0
  68. package/dist/types/services/core/websocket/WebSocketManager.d.ts +34 -0
  69. package/dist/types/services/core/websocket/connection-service.d.ts +27 -0
  70. package/dist/types/services/core/websocket/keepalive.worker.d.ts +2 -0
  71. package/dist/types/services/core/websocket/types.d.ts +37 -0
  72. package/dist/types/services/index.d.ts +52 -0
  73. package/dist/types/services/task/AutoWrapup.d.ts +40 -0
  74. package/dist/types/services/task/TaskManager.d.ts +1 -0
  75. package/dist/types/services/task/TaskUtils.d.ts +92 -0
  76. package/dist/types/services/task/constants.d.ts +83 -0
  77. package/dist/types/services/task/contact.d.ts +69 -0
  78. package/dist/types/services/task/dialer.d.ts +43 -0
  79. package/dist/types/services/task/index.d.ts +650 -0
  80. package/dist/types/services/task/types.d.ts +1319 -0
  81. package/dist/types/types.d.ts +643 -0
  82. package/dist/types/utils/PageCache.d.ts +173 -0
  83. package/dist/types/webex-config.d.ts +53 -0
  84. package/dist/types/webex.d.ts +7 -0
  85. package/dist/types.js +14 -1
  86. package/dist/types.js.map +1 -1
  87. package/dist/webex.js +1 -1
  88. package/package.json +9 -9
  89. package/src/cc.ts +120 -29
  90. package/src/constants.ts +4 -0
  91. package/src/index.ts +1 -0
  92. package/src/metrics/behavioral-events.ts +14 -0
  93. package/src/metrics/constants.ts +11 -0
  94. package/src/services/ApiAiAssistant.ts +217 -0
  95. package/src/services/agent/types.ts +1 -1
  96. package/src/services/config/Util.ts +8 -0
  97. package/src/services/config/constants.ts +12 -0
  98. package/src/services/config/index.ts +45 -1
  99. package/src/services/config/types.ts +67 -0
  100. package/src/services/constants.ts +21 -0
  101. package/src/services/core/Err.ts +1 -0
  102. package/src/services/core/Utils.ts +32 -5
  103. package/src/services/core/aqm-reqs.ts +100 -22
  104. package/src/services/core/websocket/WebSocketManager.ts +12 -0
  105. package/src/services/task/TaskManager.ts +149 -28
  106. package/src/services/task/TaskUtils.ts +12 -0
  107. package/src/services/task/constants.ts +15 -0
  108. package/src/services/task/dialer.ts +56 -1
  109. package/src/services/task/types.ts +24 -0
  110. package/src/types.ts +40 -1
  111. package/test/unit/spec/cc.ts +92 -22
  112. package/test/unit/spec/services/ApiAiAssistant.ts +115 -0
  113. package/test/unit/spec/services/config/index.ts +56 -0
  114. package/test/unit/spec/services/core/Utils.ts +63 -1
  115. package/test/unit/spec/services/core/websocket/WebSocketManager.ts +71 -1
  116. package/test/unit/spec/services/task/TaskManager.ts +1015 -165
  117. package/test/unit/spec/services/task/dialer.ts +198 -112
  118. package/umd/contact-center.min.js +2 -2
  119. package/umd/contact-center.min.js.map +1 -1
@@ -0,0 +1,177 @@
1
+ /**
2
+ * @packageDocumentation
3
+ * @module AgentConfigService
4
+ */
5
+ import { DesktopProfileResponse, ListAuxCodesResponse, AgentResponse, TenantData, OrgInfo, OrgSettings, URLMapping, TeamList, DialPlanEntity, Profile, ListTeamsResponse, AuxCode, MultimediaProfileResponse, SiteInfo, OutdialAniEntriesResponse, OutdialAniParams, AIFeatureFlagsResponse } from './types';
6
+ /**
7
+ * The AgentConfigService class provides methods to fetch agent configuration data.
8
+ * @private
9
+ * @ignore
10
+ */
11
+ export default class AgentConfigService {
12
+ private webexReq;
13
+ constructor();
14
+ /**
15
+ * Fetches the agent configuration data for the given orgId and agentId.
16
+ * @param {string} orgId - organization ID for which the agent configuration is to be fetched.
17
+ * @param {string} agentId - agent ID for which the configuration is to be fetched.
18
+ * @returns {Promise<Profile>} - A promise that resolves to the agent configuration profile.
19
+ * @throws {Error} - Throws an error if any API call fails or if the response status is not 200.
20
+ * @public
21
+ */
22
+ getAgentConfig(orgId: string, agentId: string): Promise<Profile>;
23
+ /**
24
+ * Fetches the agent configuration data for the given orgId and agentId.
25
+ * @ignore
26
+ * @param {string} orgId - organization ID for which the agent configuration is to be fetched.
27
+ * @param {string} agentId - agent ID for which the configuration is to be fetched.
28
+ * @returns {Promise<AgentResponse>} - A promise that resolves to the agent configuration response.
29
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
30
+ * @private
31
+ */
32
+ getUserUsingCI(orgId: string, agentId: string): Promise<AgentResponse>;
33
+ /**
34
+ * Fetches the desktop profile data for the given orgId and desktopProfileId.
35
+ * @ignore
36
+ * @param {string} orgId - organization ID for which the desktop profile is to be fetched.
37
+ * @param {string} desktopProfileId - desktop profile ID for which the data is to be fetched.
38
+ * @returns {Promise<DesktopProfileResponse>} - A promise that resolves to the desktop profile response.
39
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
40
+ * @private
41
+ */
42
+ getDesktopProfileById(orgId: string, desktopProfileId: string): Promise<DesktopProfileResponse>;
43
+ /**
44
+ * Fetches the multimedia profile data for the given orgId and multimediaProfileId.
45
+ * @ignore
46
+ * @param {string} orgId - organization ID for which the multimedia profile is to be fetched.
47
+ * @param {string} multimediaProfileId - multimedia profile ID for which the data is to be fetched.
48
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
49
+ * @returns {Promise<MultimediaProfileResponse>} - A promise that resolves to the multimedia profile response.
50
+ * @private
51
+ */
52
+ getMultimediaProfileById(orgId: string, multimediaProfileId: string): Promise<MultimediaProfileResponse>;
53
+ /**
54
+ * fetches the list of teams for the given orgId.
55
+ * @ignore
56
+ * @param {string} orgId - organization ID for which the teams are to be fetched.
57
+ * @param {number} page - the page number to fetch.
58
+ * @param {number} pageSize - the number of teams to fetch per page.
59
+ * @param {string[]} filter - optional filter criteria for the teams.
60
+ * @param {string[]} attributes - optional attributes to include in the response.
61
+ * @returns {Promise<ListTeamsResponse>} - A promise that resolves to the list of teams response.
62
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
63
+ * @private
64
+ */
65
+ getListOfTeams(orgId: string, page: number, pageSize: number, filter: string[]): Promise<ListTeamsResponse>;
66
+ /**
67
+ * Fetches all teams from all pages for the given orgId
68
+ * @ignore
69
+ * @param {string} orgId - organization ID for which the teams are to be fetched.
70
+ * @param {number} pageSize - the number of teams to fetch per page.
71
+ * @param {string[]} filter - optional filter criteria for the teams.
72
+ * @param {string[]} attributes - optional attributes to include in the response.
73
+ * @returns {Promise<TeamList[]>} - A promise that resolves to the list of teams.
74
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
75
+ * @private
76
+ */
77
+ getAllTeams(orgId: string, pageSize: number, filter: string[]): Promise<TeamList[]>;
78
+ /**
79
+ * fetches the list of aux codes for the given orgId.
80
+ * @ignore
81
+ * @param {string} orgId - organization ID for which the aux codes are to be fetched.
82
+ * @param {number} page - the page number to fetch.
83
+ * @param {number} pageSize - the number of aux codes to fetch per page.
84
+ * @param {string[]} filter - optional filter criteria for the aux codes.
85
+ * @param {string[]} attributes - optional attributes to include in the response.
86
+ * @returns {Promise<ListAuxCodesResponse>} - A promise that resolves to the list of aux codes response.
87
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
88
+ * @private
89
+ */
90
+ getListOfAuxCodes(orgId: string, page: number, pageSize: number, filter: string[], attributes: string[]): Promise<ListAuxCodesResponse>;
91
+ /**
92
+ * Fetches all aux codes from all pages for the given orgId
93
+ * @ignore
94
+ * @param {string} orgId - organization ID for which the aux codes are to be fetched.
95
+ * @param {number} pageSize - the number of aux codes to fetch per page.
96
+ * @param {string[]} filter - optional filter criteria for the aux codes.
97
+ * @param {string[]} attributes - optional attributes to include in the response.
98
+ * @returns {Promise<AuxCode[]>} - A promise that resolves to the list of aux codes.
99
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
100
+ * @private
101
+ */
102
+ getAllAuxCodes(orgId: string, pageSize: number, filter: string[], attributes: string[]): Promise<AuxCode[]>;
103
+ /**
104
+ * Fetches the site data for the given orgId and siteId.
105
+ * @ignore
106
+ * @param {string} orgId - organization ID for which the site info is to be fetched.
107
+ * @param {string} siteId - site ID for which the data is to be fetched.
108
+ * @returns {Promise<SiteInfo>} - A promise that resolves to the site info response.
109
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
110
+ * @private
111
+ */
112
+ getSiteInfo(orgId: string, siteId: string): Promise<SiteInfo>;
113
+ /**
114
+ * Fetches the organization info for the given orgId.
115
+ * @ignore
116
+ * @param {string} orgId - organization ID for which the organization info is to be fetched.
117
+ * @returns {Promise<OrgInfo>} - A promise that resolves to the organization info response.
118
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
119
+ * @private
120
+ */
121
+ getOrgInfo(orgId: string): Promise<OrgInfo>;
122
+ /**
123
+ * Fetches the organization settings for the given orgId.
124
+ * @ignore
125
+ * @param {string} orgId - organization ID for which the organization settings are to be fetched.
126
+ * @returns {Promise<OrgSettings>} - A promise that resolves to the organization settings response.
127
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
128
+ * @private
129
+ */
130
+ getOrganizationSetting(orgId: string): Promise<OrgSettings>;
131
+ /**
132
+ * Fetches the tenant data for the given orgId.
133
+ * @ignore
134
+ * @param {string} orgId - organization ID for which the tenant data is to be fetched.
135
+ * @returns {Promise<TenantData>} - A promise that resolves to the tenant data response.
136
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
137
+ * @private
138
+ */
139
+ getTenantData(orgId: string): Promise<TenantData>;
140
+ /**
141
+ * Fetches the URL mapping data for the given orgId.
142
+ * @ignore
143
+ * @param {string} orgId - organization ID for which the URL mapping is to be fetched.
144
+ * @returns {Promise<URLMapping[]>} - A promise that resolves to the URL mapping response.
145
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
146
+ * @private
147
+ */
148
+ getURLMapping(orgId: string): Promise<URLMapping[]>;
149
+ /**
150
+ * Fetches AI feature resources for the organization.
151
+ * @ignore
152
+ * @param {string} orgId - organization ID for which AI feature resources are to be fetched.
153
+ * @returns {Promise<AIFeatureFlagsResponse>} - AI feature resources response.
154
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
155
+ * @private
156
+ */
157
+ getAIFeatureFlags(orgId: string): Promise<AIFeatureFlagsResponse>;
158
+ /**
159
+ * Fetches the dial plan data for the given orgId.
160
+ * @ignore
161
+ * @param {string} orgId - organization ID for which the dial plan data is to be fetched.
162
+ * @returns {Promise<DialPlanEntity[]>} - A promise that resolves to the dial plan data response.
163
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
164
+ * @private
165
+ */
166
+ getDialPlanData(orgId: string): Promise<DialPlanEntity[]>;
167
+ /**
168
+ * Fetches outdial ANI (Automatic Number Identification) entries for the given orgId and outdial ANI ID.
169
+ * @ignore
170
+ * @param {string} orgId - organization ID for which the outdial ANI entries are to be fetched.
171
+ * @param {OutdialAniParams} params - parameters object containing outdialANI and optional pagination/filtering options
172
+ * @returns {Promise<OutdialAniEntriesResponse>} - A promise that resolves to the outdial ANI entries response.
173
+ * @throws {Error} - Throws an error if the API call fails or if the response status is not 200.
174
+ * @private
175
+ */
176
+ getOutdialAniEntries(orgId: string, params: OutdialAniParams): Promise<OutdialAniEntriesResponse>;
177
+ }