purecloud-platform-client-v2 206.0.0 → 208.0.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.
- package/README.md +100 -3
- package/dist/node/purecloud-platform-client-v2.js +979 -173
- package/dist/web-amd/purecloud-platform-client-v2.js +979 -173
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +341 -176
- package/dist/web-cjs/purecloud-platform-client-v2.js +358 -179
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +1646 -606
- package/package.json +1 -1
- package/src/purecloud-platform-client-v2/ApiClient.js +40 -18
- package/src/purecloud-platform-client-v2/api/AgentAssistantsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentCopilotApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentUIApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +7 -6
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +2 -2
- package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CarrierServicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +2 -3
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +3 -2
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmailsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmployeeEngagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +234 -8
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +31 -11
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +136 -4
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +5 -21
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LogCaptureApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OperationalEventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +48 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +101 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +12 -12
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScreenRecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +55 -1
- package/src/purecloud-platform-client-v2/api/SettingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +4 -4
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TaskManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TeamsApi.js +7 -3
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +55 -1
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +38 -12
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +56 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/configuration.js +81 -0
- package/src/purecloud-platform-client-v2/index.js +1 -1
|
@@ -5,7 +5,7 @@ class UsersApi {
|
|
|
5
5
|
/**
|
|
6
6
|
* Users service.
|
|
7
7
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
8
|
-
* @version
|
|
8
|
+
* @version 208.0.0
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -176,7 +176,7 @@ class UsersApi {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
* Remove routing language from user
|
|
179
|
+
* Remove a routing language from a user
|
|
180
180
|
*
|
|
181
181
|
* @param {String} userId User ID
|
|
182
182
|
* @param {String} languageId languageId
|
|
@@ -206,7 +206,7 @@ class UsersApi {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* Remove routing skill from user
|
|
209
|
+
* Remove a routing skill from a user
|
|
210
210
|
*
|
|
211
211
|
* @param {String} userId User ID
|
|
212
212
|
* @param {String} skillId skillId
|
|
@@ -1038,7 +1038,7 @@ class UsersApi {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
1040
1040
|
/**
|
|
1041
|
-
* List routing
|
|
1041
|
+
* List routing languages assigned to a user
|
|
1042
1042
|
*
|
|
1043
1043
|
* @param {String} userId User ID
|
|
1044
1044
|
* @param {Object} opts Optional parameters
|
|
@@ -1069,7 +1069,7 @@ class UsersApi {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
1071
|
/**
|
|
1072
|
-
* List routing skills
|
|
1072
|
+
* List routing skills assigned to a user
|
|
1073
1073
|
*
|
|
1074
1074
|
* @param {String} userId User ID
|
|
1075
1075
|
* @param {Object} opts Optional parameters
|
|
@@ -1320,6 +1320,32 @@ class UsersApi {
|
|
|
1320
1320
|
);
|
|
1321
1321
|
}
|
|
1322
1322
|
|
|
1323
|
+
/**
|
|
1324
|
+
* Get chats for a user
|
|
1325
|
+
*
|
|
1326
|
+
* @param {Object} opts Optional parameters
|
|
1327
|
+
* @param {Boolean} opts.excludeClosed Whether or not to exclude closed chats
|
|
1328
|
+
* @param {Boolean} opts.includePresence Whether or not to include user presence
|
|
1329
|
+
* @param {String} opts.after The key to start after
|
|
1330
|
+
*/
|
|
1331
|
+
getUsersChatsMe(opts) {
|
|
1332
|
+
opts = opts || {};
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
return this.apiClient.callApi(
|
|
1336
|
+
'/api/v2/users/chats/me',
|
|
1337
|
+
'GET',
|
|
1338
|
+
{ },
|
|
1339
|
+
{ 'excludeClosed': opts['excludeClosed'],'includePresence': opts['includePresence'],'after': opts['after'] },
|
|
1340
|
+
{ },
|
|
1341
|
+
{ },
|
|
1342
|
+
null,
|
|
1343
|
+
['PureCloud OAuth'],
|
|
1344
|
+
['application/json'],
|
|
1345
|
+
['application/json']
|
|
1346
|
+
);
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1323
1349
|
/**
|
|
1324
1350
|
* Get list of Development Activities
|
|
1325
1351
|
* Either moduleId or userId is required. Results are filtered based on the applicable permissions.
|
|
@@ -1639,7 +1665,7 @@ class UsersApi {
|
|
|
1639
1665
|
}
|
|
1640
1666
|
|
|
1641
1667
|
/**
|
|
1642
|
-
* Update routing language proficiency
|
|
1668
|
+
* Update an assigned routing language's proficiency
|
|
1643
1669
|
*
|
|
1644
1670
|
* @param {String} userId User ID
|
|
1645
1671
|
* @param {String} languageId languageId
|
|
@@ -1674,7 +1700,7 @@ class UsersApi {
|
|
|
1674
1700
|
}
|
|
1675
1701
|
|
|
1676
1702
|
/**
|
|
1677
|
-
*
|
|
1703
|
+
* Assign multiple routing languages to a user. Max 50 routing languages in request body
|
|
1678
1704
|
*
|
|
1679
1705
|
* @param {String} userId User ID
|
|
1680
1706
|
* @param {Array.<Object>} body Language
|
|
@@ -1704,7 +1730,7 @@ class UsersApi {
|
|
|
1704
1730
|
}
|
|
1705
1731
|
|
|
1706
1732
|
/**
|
|
1707
|
-
*
|
|
1733
|
+
* Assign multiple routing skills to a user
|
|
1708
1734
|
*
|
|
1709
1735
|
* @param {String} userId User ID
|
|
1710
1736
|
* @param {Array.<Object>} body Skill
|
|
@@ -2141,7 +2167,7 @@ class UsersApi {
|
|
|
2141
2167
|
}
|
|
2142
2168
|
|
|
2143
2169
|
/**
|
|
2144
|
-
*
|
|
2170
|
+
* Assign a routing language to a user
|
|
2145
2171
|
*
|
|
2146
2172
|
* @param {String} userId User ID
|
|
2147
2173
|
* @param {Object} body Language
|
|
@@ -2171,7 +2197,7 @@ class UsersApi {
|
|
|
2171
2197
|
}
|
|
2172
2198
|
|
|
2173
2199
|
/**
|
|
2174
|
-
*
|
|
2200
|
+
* Assign a routing skill to a user
|
|
2175
2201
|
*
|
|
2176
2202
|
* @param {String} userId User ID
|
|
2177
2203
|
* @param {Object} body Skill
|
|
@@ -2583,7 +2609,7 @@ class UsersApi {
|
|
|
2583
2609
|
}
|
|
2584
2610
|
|
|
2585
2611
|
/**
|
|
2586
|
-
* Update routing skill proficiency
|
|
2612
|
+
* Update an assigned routing skill's proficiency
|
|
2587
2613
|
*
|
|
2588
2614
|
* @param {String} userId User ID
|
|
2589
2615
|
* @param {String} skillId skillId
|
|
@@ -2618,7 +2644,7 @@ class UsersApi {
|
|
|
2618
2644
|
}
|
|
2619
2645
|
|
|
2620
2646
|
/**
|
|
2621
|
-
*
|
|
2647
|
+
* Assign multiple routing skills to a user, replacing any current assignments
|
|
2622
2648
|
*
|
|
2623
2649
|
* @param {String} userId User ID
|
|
2624
2650
|
* @param {Array.<Object>} body Skill
|
|
@@ -5,7 +5,7 @@ class VoicemailApi {
|
|
|
5
5
|
/**
|
|
6
6
|
* Voicemail service.
|
|
7
7
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
8
|
-
* @version
|
|
8
|
+
* @version 208.0.0
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -392,6 +392,61 @@ class VoicemailApi {
|
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
+
/**
|
|
396
|
+
* Get a user's mailbox information
|
|
397
|
+
*
|
|
398
|
+
* @param {String} userId userId
|
|
399
|
+
*/
|
|
400
|
+
getVoicemailUserMailbox(userId) {
|
|
401
|
+
// verify the required parameter 'userId' is set
|
|
402
|
+
if (userId === undefined || userId === null) {
|
|
403
|
+
throw 'Missing the required parameter "userId" when calling getVoicemailUserMailbox';
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return this.apiClient.callApi(
|
|
407
|
+
'/api/v2/voicemail/users/{userId}/mailbox',
|
|
408
|
+
'GET',
|
|
409
|
+
{ 'userId': userId },
|
|
410
|
+
{ },
|
|
411
|
+
{ },
|
|
412
|
+
{ },
|
|
413
|
+
null,
|
|
414
|
+
['PureCloud OAuth'],
|
|
415
|
+
['application/json'],
|
|
416
|
+
['application/json']
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* List voicemail messages
|
|
422
|
+
*
|
|
423
|
+
* @param {String} userId User ID
|
|
424
|
+
* @param {Object} opts Optional parameters
|
|
425
|
+
* @param {Number} opts.pageSize Page size (default to 25)
|
|
426
|
+
* @param {Number} opts.pageNumber Page number (default to 1)
|
|
427
|
+
*/
|
|
428
|
+
getVoicemailUserMessages(userId, opts) {
|
|
429
|
+
opts = opts || {};
|
|
430
|
+
|
|
431
|
+
// verify the required parameter 'userId' is set
|
|
432
|
+
if (userId === undefined || userId === null) {
|
|
433
|
+
throw 'Missing the required parameter "userId" when calling getVoicemailUserMessages';
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
return this.apiClient.callApi(
|
|
437
|
+
'/api/v2/voicemail/users/{userId}/messages',
|
|
438
|
+
'GET',
|
|
439
|
+
{ 'userId': userId },
|
|
440
|
+
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'] },
|
|
441
|
+
{ },
|
|
442
|
+
{ },
|
|
443
|
+
null,
|
|
444
|
+
['PureCloud OAuth'],
|
|
445
|
+
['application/json'],
|
|
446
|
+
['application/json']
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
395
450
|
/**
|
|
396
451
|
* Get a user's voicemail policy
|
|
397
452
|
*
|
|
@@ -35,6 +35,7 @@ class Configuration {
|
|
|
35
35
|
this.basePath;
|
|
36
36
|
this.authUrl;
|
|
37
37
|
this.config;
|
|
38
|
+
this.gateway = undefined;
|
|
38
39
|
this.logger = new Logger();
|
|
39
40
|
this.setEnvironment();
|
|
40
41
|
this.liveLoadConfig();
|
|
@@ -132,12 +133,72 @@ class Configuration {
|
|
|
132
133
|
: this.live_reload_config;
|
|
133
134
|
this.host = this.getConfigString('general', 'host') !== undefined ? this.getConfigString('general', 'host') : this.host;
|
|
134
135
|
|
|
136
|
+
if (this.getConfigString('gateway', 'host') !== undefined) {
|
|
137
|
+
let gateway = {
|
|
138
|
+
host: this.getConfigString('gateway', 'host')
|
|
139
|
+
};
|
|
140
|
+
if (this.getConfigString('gateway', 'protocol') !== undefined) gateway.protocol = this.getConfigString('gateway', 'protocol');
|
|
141
|
+
if (this.getConfigInt('gateway', 'port') !== undefined) gateway.port = this.getConfigInt('gateway', 'port');
|
|
142
|
+
if (this.getConfigString('gateway', 'path_params_login') !== undefined) gateway.path_params_login = this.getConfigString('gateway', 'path_params_login');
|
|
143
|
+
if (this.getConfigString('gateway', 'path_params_api') !== undefined) gateway.path_params_api = this.getConfigString('gateway', 'path_params_api');
|
|
144
|
+
if (this.getConfigString('gateway', 'username') !== undefined) gateway.username = this.getConfigString('gateway', 'username');
|
|
145
|
+
if (this.getConfigString('gateway', 'password') !== undefined) gateway.password = this.getConfigString('gateway', 'password');
|
|
146
|
+
this.setGateway(gateway);
|
|
147
|
+
} else {
|
|
148
|
+
this.setGateway();
|
|
149
|
+
}
|
|
150
|
+
|
|
135
151
|
this.setEnvironment();
|
|
136
152
|
|
|
137
153
|
// Update logging configs
|
|
138
154
|
this.logger.setLogger();
|
|
139
155
|
}
|
|
140
156
|
|
|
157
|
+
/**
|
|
158
|
+
* @description Sets the gateway used by the session
|
|
159
|
+
* @param {object} gateway - Gateway Configuration interface
|
|
160
|
+
* @param {string} gateway.host - The address of the gateway.
|
|
161
|
+
* @param {string} gateway.protocol - (optional) The protocol to use. It will default to "https" if the parameter is not defined or empty.
|
|
162
|
+
* @param {number} gateway.port - (optional) The port to target. This parameter can be defined if a non default port is used and needs to be specified in the url (value must be greater or equal to 0).
|
|
163
|
+
* @param {string} gateway.path_params_login - (optional) An arbitrary string to be appended to the gateway url path for Login requests.
|
|
164
|
+
* @param {string} gateway.path_params_api - (optional) An arbitrary string to be appended to the gateway url path for API requests.
|
|
165
|
+
* @param {string} gateway.username - (optional) Not used at this stage (for a possible future use).
|
|
166
|
+
* @param {string} gateway.password - (optional) Not used at this stage (for a possible future use).
|
|
167
|
+
*/
|
|
168
|
+
setGateway(gateway) {
|
|
169
|
+
if (gateway) {
|
|
170
|
+
this.gateway = {
|
|
171
|
+
host: ''
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
if (gateway.protocol) this.gateway.protocol = gateway.protocol;
|
|
175
|
+
else this.gateway.protocol = 'https';
|
|
176
|
+
|
|
177
|
+
if (gateway.host) this.gateway.host = gateway.host;
|
|
178
|
+
else this.gateway.host = '';
|
|
179
|
+
|
|
180
|
+
if (gateway.port && gateway.port > -1) this.gateway.port = gateway.port;
|
|
181
|
+
else this.gateway.port = -1;
|
|
182
|
+
|
|
183
|
+
if (gateway.path_params_login) {
|
|
184
|
+
this.gateway.path_params_login = gateway.path_params_login;
|
|
185
|
+
// Strip trailing slash
|
|
186
|
+
this.gateway.path_params_login = this.gateway.path_params_login.replace(/\/+$/, '');
|
|
187
|
+
} else this.gateway.path_params_login = '';
|
|
188
|
+
|
|
189
|
+
if (gateway.path_params_api) {
|
|
190
|
+
this.gateway.path_params_api = gateway.path_params_api;
|
|
191
|
+
// Strip trailing slash
|
|
192
|
+
this.gateway.path_params_api = this.gateway.path_params_api.replace(/\/+$/, '');
|
|
193
|
+
} else this.gateway.path_params_api = '';
|
|
194
|
+
|
|
195
|
+
if (gateway.username) this.gateway.username = gateway.username;
|
|
196
|
+
if (gateway.password) this.gateway.password = gateway.password;
|
|
197
|
+
} else {
|
|
198
|
+
this.gateway = undefined;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
141
202
|
setEnvironment(env) {
|
|
142
203
|
// Default value
|
|
143
204
|
if (env) this.environment = env;
|
|
@@ -155,6 +216,26 @@ class Configuration {
|
|
|
155
216
|
this.authUrl = `https://login.${this.environment}`;
|
|
156
217
|
}
|
|
157
218
|
|
|
219
|
+
getConfUrl(pathType, regionUrl) {
|
|
220
|
+
if (!this.gateway) return regionUrl;
|
|
221
|
+
if (!this.gateway.host) return regionUrl;
|
|
222
|
+
|
|
223
|
+
var url = this.gateway.protocol + '://' + this.gateway.host;
|
|
224
|
+
if (this.gateway.port > -1) url = url + ':' + this.gateway.port.toString();
|
|
225
|
+
if (pathType === 'login') {
|
|
226
|
+
if (this.gateway.path_params_login) {
|
|
227
|
+
if (this.gateway.path_params_login.startsWith('/')) url = url + this.gateway.path_params_login;
|
|
228
|
+
else url = url + '/' + this.gateway.path_params_login;
|
|
229
|
+
}
|
|
230
|
+
} else {
|
|
231
|
+
if (this.gateway.path_params_api) {
|
|
232
|
+
if (this.gateway.path_params_api.startsWith('/')) url = url + this.gateway.path_params_api;
|
|
233
|
+
else url = url + '/' + this.gateway.path_params_api;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return url;
|
|
237
|
+
}
|
|
238
|
+
|
|
158
239
|
getConfigString(section, key) {
|
|
159
240
|
if (this.config._sections[section]) return this.config._sections[section][key];
|
|
160
241
|
}
|