purecloud-platform-client-v2 211.1.0 → 212.1.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 (91) hide show
  1. package/README.md +18 -4
  2. package/dist/node/purecloud-platform-client-v2.js +1049 -239
  3. package/dist/web-amd/purecloud-platform-client-v2.js +1050 -239
  4. package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
  5. package/dist/web-cjs/bundle.js +471 -277
  6. package/dist/web-cjs/purecloud-platform-client-v2.js +662 -6356
  7. package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
  8. package/index.d.ts +843 -236
  9. package/package.json +1 -1
  10. package/src/purecloud-platform-client-v2/ApiClient.js +21 -18
  11. package/src/purecloud-platform-client-v2/api/AgentAssistantsApi.js +1 -1
  12. package/src/purecloud-platform-client-v2/api/AgentCopilotApi.js +1 -1
  13. package/src/purecloud-platform-client-v2/api/AgentUIApi.js +1 -1
  14. package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
  15. package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +212 -1
  16. package/src/purecloud-platform-client-v2/api/ArchitectApi.js +1 -1
  17. package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
  18. package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
  19. package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
  20. package/src/purecloud-platform-client-v2/api/CarrierServicesApi.js +1 -1
  21. package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
  22. package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
  23. package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
  24. package/src/purecloud-platform-client-v2/api/ConversationsApi.js +7 -3
  25. package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
  26. package/src/purecloud-platform-client-v2/api/DataPrivacyApi.js +1 -1
  27. package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
  28. package/src/purecloud-platform-client-v2/api/EmailsApi.js +1 -1
  29. package/src/purecloud-platform-client-v2/api/EmployeeEngagementApi.js +1 -1
  30. package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
  31. package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +3 -2
  32. package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
  33. package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
  34. package/src/purecloud-platform-client-v2/api/GamificationApi.js +57 -1
  35. package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
  36. package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
  37. package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
  38. package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
  39. package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
  40. package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
  41. package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
  42. package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
  43. package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
  44. package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -2
  45. package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
  46. package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
  47. package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
  48. package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
  49. package/src/purecloud-platform-client-v2/api/LogCaptureApi.js +1 -1
  50. package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
  51. package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
  52. package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
  53. package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
  54. package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
  55. package/src/purecloud-platform-client-v2/api/OperationalEventsApi.js +1 -1
  56. package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
  57. package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
  58. package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
  59. package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
  60. package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
  61. package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
  62. package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
  63. package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
  64. package/src/purecloud-platform-client-v2/api/RoutingApi.js +2 -2
  65. package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
  66. package/src/purecloud-platform-client-v2/api/ScreenRecordingApi.js +1 -1
  67. package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
  68. package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
  69. package/src/purecloud-platform-client-v2/api/SettingsApi.js +1 -1
  70. package/src/purecloud-platform-client-v2/api/SocialMediaApi.js +1 -1
  71. package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
  72. package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
  73. package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
  74. package/src/purecloud-platform-client-v2/api/TaskManagementApi.js +443 -1
  75. package/src/purecloud-platform-client-v2/api/TeamsApi.js +1 -1
  76. package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
  77. package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
  78. package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
  79. package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
  80. package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
  81. package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
  82. package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
  83. package/src/purecloud-platform-client-v2/api/UsersApi.js +1 -1
  84. package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
  85. package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
  86. package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
  87. package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
  88. package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
  89. package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
  90. package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +94 -1
  91. package/src/purecloud-platform-client-v2/index.js +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purecloud-platform-client-v2",
3
- "version": "211.1.0",
3
+ "version": "212.1.0",
4
4
  "description": "A JavaScript library to interface with the PureCloud Platform API",
5
5
  "license": "MIT",
6
6
  "main": "dist/node/purecloud-platform-client-v2.js",
@@ -1,5 +1,4 @@
1
1
  import Configuration from './configuration.js';
2
- import https from 'https';
3
2
  import DefaultHttpClient from './DefaultHttpClient.js';
4
3
  import AbstractHttpClient from './AbstractHttpClient.js';
5
4
  import HttpRequestOptions from './HttpRequestOptions.js';
@@ -7,7 +6,7 @@ import { default as qs } from 'qs';
7
6
 
8
7
  /**
9
8
  * @module purecloud-platform-client-v2/ApiClient
10
- * @version 211.1.0
9
+ * @version 212.1.0
11
10
  */
12
11
  class ApiClient {
13
12
  /**
@@ -254,11 +253,11 @@ class ApiClient {
254
253
 
255
254
  agentOptions.rejectUnauthorized = true
256
255
 
257
- this.proxyAgent = new https.Agent(agentOptions);
256
+ this.proxyAgent = new require('https').Agent(agentOptions);
258
257
  const httpClient = this.getHttpClient();
259
258
  httpClient.setHttpsAgent(this.proxyAgent);
260
259
  } else {
261
- throw new Error("Custom Agent Paths/ File System Access are not supported on Browser. Use setMTLSContents instead");
260
+ throw new Error("MTLS authentication is managed by the Browser itself. MTLS certificates cannot be set via code on Browser.");
262
261
  }
263
262
  }
264
263
 
@@ -269,24 +268,28 @@ class ApiClient {
269
268
  * @param {string} caContent - content for public certs
270
269
  */
271
270
  setMTLSContents(certContent, keyContent, caContent) {
272
- const agentOptions = {}
273
- if (certContent) {
274
- agentOptions.cert = certContent;
275
- }
271
+ if (typeof window === 'undefined') {
272
+ const agentOptions = {}
273
+ if (certContent) {
274
+ agentOptions.cert = certContent;
275
+ }
276
276
 
277
- if (keyContent) {
278
- agentOptions.key = keyContent;
279
- }
277
+ if (keyContent) {
278
+ agentOptions.key = keyContent;
279
+ }
280
280
 
281
- if (caContent) {
282
- agentOptions.ca = caContent;
283
- }
281
+ if (caContent) {
282
+ agentOptions.ca = caContent;
283
+ }
284
284
 
285
- agentOptions.rejectUnauthorized = true
285
+ agentOptions.rejectUnauthorized = true
286
286
 
287
- this.proxyAgent = new https.Agent(agentOptions);
288
- const httpClient = this.getHttpClient();
289
- httpClient.setHttpsAgent(this.proxyAgent);
287
+ this.proxyAgent = new require('https').Agent(agentOptions);
288
+ const httpClient = this.getHttpClient();
289
+ httpClient.setHttpsAgent(this.proxyAgent);
290
+ } else {
291
+ throw new Error("MTLS authentication is managed by the Browser itself. MTLS certificates cannot be set via code on Browser.");
292
+ }
290
293
  }
291
294
 
292
295
  /**
@@ -5,7 +5,7 @@ class AgentAssistantsApi {
5
5
  /**
6
6
  * AgentAssistants service.
7
7
  * @module purecloud-platform-client-v2/api/AgentAssistantsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class AgentCopilotApi {
5
5
  /**
6
6
  * AgentCopilot service.
7
7
  * @module purecloud-platform-client-v2/api/AgentCopilotApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class AgentUIApi {
5
5
  /**
6
6
  * AgentUI service.
7
7
  * @module purecloud-platform-client-v2/api/AgentUIApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class AlertingApi {
5
5
  /**
6
6
  * Alerting service.
7
7
  * @module purecloud-platform-client-v2/api/AlertingApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class AnalyticsApi {
5
5
  /**
6
6
  * Analytics service.
7
7
  * @module purecloud-platform-client-v2/api/AnalyticsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -126,6 +126,32 @@ class AnalyticsApi {
126
126
  );
127
127
  }
128
128
 
129
+ /**
130
+ * Get an agent and their active sessions by user ID
131
+ *
132
+ * @param {String} userId userId
133
+ * getAnalyticsAgentStatus is a preview method and is subject to both breaking and non-breaking changes at any time without notice
134
+ */
135
+ getAnalyticsAgentStatus(userId) {
136
+ // verify the required parameter 'userId' is set
137
+ if (userId === undefined || userId === null) {
138
+ throw 'Missing the required parameter "userId" when calling getAnalyticsAgentStatus';
139
+ }
140
+
141
+ return this.apiClient.callApi(
142
+ '/api/v2/analytics/agents/{userId}/status',
143
+ 'GET',
144
+ { 'userId': userId },
145
+ { },
146
+ { },
147
+ { },
148
+ null,
149
+ ['PureCloud OAuth'],
150
+ ['application/json'],
151
+ ['application/json']
152
+ );
153
+ }
154
+
129
155
  /**
130
156
  * Get status for async query for agent copilot aggregates
131
157
  *
@@ -1069,6 +1095,62 @@ class AnalyticsApi {
1069
1095
  );
1070
1096
  }
1071
1097
 
1098
+ /**
1099
+ * Get status for async query for summary aggregates
1100
+ *
1101
+ * @param {String} jobId jobId
1102
+ * getAnalyticsSummariesAggregatesJob is a preview method and is subject to both breaking and non-breaking changes at any time without notice
1103
+ */
1104
+ getAnalyticsSummariesAggregatesJob(jobId) {
1105
+ // verify the required parameter 'jobId' is set
1106
+ if (jobId === undefined || jobId === null) {
1107
+ throw 'Missing the required parameter "jobId" when calling getAnalyticsSummariesAggregatesJob';
1108
+ }
1109
+
1110
+ return this.apiClient.callApi(
1111
+ '/api/v2/analytics/summaries/aggregates/jobs/{jobId}',
1112
+ 'GET',
1113
+ { 'jobId': jobId },
1114
+ { },
1115
+ { },
1116
+ { },
1117
+ null,
1118
+ ['PureCloud OAuth'],
1119
+ ['application/json'],
1120
+ ['application/json']
1121
+ );
1122
+ }
1123
+
1124
+ /**
1125
+ * Fetch a page of results for an async aggregates query
1126
+ *
1127
+ * @param {String} jobId jobId
1128
+ * @param {Object} opts Optional parameters
1129
+ * @param {String} opts.cursor Cursor token to retrieve next page
1130
+ * getAnalyticsSummariesAggregatesJobResults is a preview method and is subject to both breaking and non-breaking changes at any time without notice
1131
+ */
1132
+ getAnalyticsSummariesAggregatesJobResults(jobId, opts) {
1133
+ opts = opts || {};
1134
+
1135
+ // verify the required parameter 'jobId' is set
1136
+ if (jobId === undefined || jobId === null) {
1137
+ throw 'Missing the required parameter "jobId" when calling getAnalyticsSummariesAggregatesJobResults';
1138
+ }
1139
+
1140
+ return this.apiClient.callApi(
1141
+ '/api/v2/analytics/summaries/aggregates/jobs/{jobId}/results',
1142
+ 'GET',
1143
+ { 'jobId': jobId },
1144
+ { 'cursor': opts['cursor'] },
1145
+ { },
1146
+ { },
1147
+ null,
1148
+ ['PureCloud OAuth'],
1149
+ ['application/json'],
1150
+ ['application/json']
1151
+ );
1152
+ }
1153
+
1072
1154
  /**
1073
1155
  * Get status for async query for survey aggregates
1074
1156
  *
@@ -1495,6 +1577,58 @@ class AnalyticsApi {
1495
1577
  );
1496
1578
  }
1497
1579
 
1580
+ /**
1581
+ * Count agents by segment type
1582
+ *
1583
+ * @param {Object} body query
1584
+ * postAnalyticsAgentsStatusCounts is a preview method and is subject to both breaking and non-breaking changes at any time without notice
1585
+ */
1586
+ postAnalyticsAgentsStatusCounts(body) {
1587
+ // verify the required parameter 'body' is set
1588
+ if (body === undefined || body === null) {
1589
+ throw 'Missing the required parameter "body" when calling postAnalyticsAgentsStatusCounts';
1590
+ }
1591
+
1592
+ return this.apiClient.callApi(
1593
+ '/api/v2/analytics/agents/status/counts',
1594
+ 'POST',
1595
+ { },
1596
+ { },
1597
+ { },
1598
+ { },
1599
+ body,
1600
+ ['PureCloud OAuth'],
1601
+ ['application/json'],
1602
+ ['application/json']
1603
+ );
1604
+ }
1605
+
1606
+ /**
1607
+ * Retrieve the top 50 agents matching the query filters
1608
+ *
1609
+ * @param {Object} body query
1610
+ * postAnalyticsAgentsStatusQuery is a preview method and is subject to both breaking and non-breaking changes at any time without notice
1611
+ */
1612
+ postAnalyticsAgentsStatusQuery(body) {
1613
+ // verify the required parameter 'body' is set
1614
+ if (body === undefined || body === null) {
1615
+ throw 'Missing the required parameter "body" when calling postAnalyticsAgentsStatusQuery';
1616
+ }
1617
+
1618
+ return this.apiClient.callApi(
1619
+ '/api/v2/analytics/agents/status/query',
1620
+ 'POST',
1621
+ { },
1622
+ { },
1623
+ { },
1624
+ { },
1625
+ body,
1626
+ ['PureCloud OAuth'],
1627
+ ['application/json'],
1628
+ ['application/json']
1629
+ );
1630
+ }
1631
+
1498
1632
  /**
1499
1633
  * Query for bot aggregates asynchronously
1500
1634
  *
@@ -2218,6 +2352,31 @@ class AnalyticsApi {
2218
2352
  );
2219
2353
  }
2220
2354
 
2355
+ /**
2356
+ * Query for resolution aggregates
2357
+ *
2358
+ * @param {Object} body query
2359
+ */
2360
+ postAnalyticsResolutionsAggregatesQuery(body) {
2361
+ // verify the required parameter 'body' is set
2362
+ if (body === undefined || body === null) {
2363
+ throw 'Missing the required parameter "body" when calling postAnalyticsResolutionsAggregatesQuery';
2364
+ }
2365
+
2366
+ return this.apiClient.callApi(
2367
+ '/api/v2/analytics/resolutions/aggregates/query',
2368
+ 'POST',
2369
+ { },
2370
+ { },
2371
+ { },
2372
+ { },
2373
+ body,
2374
+ ['PureCloud OAuth'],
2375
+ ['application/json'],
2376
+ ['application/json']
2377
+ );
2378
+ }
2379
+
2221
2380
  /**
2222
2381
  * Query for user activity observations
2223
2382
  *
@@ -2248,6 +2407,58 @@ class AnalyticsApi {
2248
2407
  );
2249
2408
  }
2250
2409
 
2410
+ /**
2411
+ * Query for summary aggregates asynchronously
2412
+ *
2413
+ * @param {Object} body query
2414
+ * postAnalyticsSummariesAggregatesJobs is a preview method and is subject to both breaking and non-breaking changes at any time without notice
2415
+ */
2416
+ postAnalyticsSummariesAggregatesJobs(body) {
2417
+ // verify the required parameter 'body' is set
2418
+ if (body === undefined || body === null) {
2419
+ throw 'Missing the required parameter "body" when calling postAnalyticsSummariesAggregatesJobs';
2420
+ }
2421
+
2422
+ return this.apiClient.callApi(
2423
+ '/api/v2/analytics/summaries/aggregates/jobs',
2424
+ 'POST',
2425
+ { },
2426
+ { },
2427
+ { },
2428
+ { },
2429
+ body,
2430
+ ['PureCloud OAuth'],
2431
+ ['application/json'],
2432
+ ['application/json']
2433
+ );
2434
+ }
2435
+
2436
+ /**
2437
+ * Query for summary aggregates
2438
+ *
2439
+ * @param {Object} body query
2440
+ * postAnalyticsSummariesAggregatesQuery is a preview method and is subject to both breaking and non-breaking changes at any time without notice
2441
+ */
2442
+ postAnalyticsSummariesAggregatesQuery(body) {
2443
+ // verify the required parameter 'body' is set
2444
+ if (body === undefined || body === null) {
2445
+ throw 'Missing the required parameter "body" when calling postAnalyticsSummariesAggregatesQuery';
2446
+ }
2447
+
2448
+ return this.apiClient.callApi(
2449
+ '/api/v2/analytics/summaries/aggregates/query',
2450
+ 'POST',
2451
+ { },
2452
+ { },
2453
+ { },
2454
+ { },
2455
+ body,
2456
+ ['PureCloud OAuth'],
2457
+ ['application/json'],
2458
+ ['application/json']
2459
+ );
2460
+ }
2461
+
2251
2462
  /**
2252
2463
  * Query for survey aggregates asynchronously
2253
2464
  *
@@ -5,7 +5,7 @@ class ArchitectApi {
5
5
  /**
6
6
  * Architect service.
7
7
  * @module purecloud-platform-client-v2/api/ArchitectApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class AuditApi {
5
5
  /**
6
6
  * Audit service.
7
7
  * @module purecloud-platform-client-v2/api/AuditApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class AuthorizationApi {
5
5
  /**
6
6
  * Authorization service.
7
7
  * @module purecloud-platform-client-v2/api/AuthorizationApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class BillingApi {
5
5
  /**
6
6
  * Billing service.
7
7
  * @module purecloud-platform-client-v2/api/BillingApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class CarrierServicesApi {
5
5
  /**
6
6
  * CarrierServices service.
7
7
  * @module purecloud-platform-client-v2/api/CarrierServicesApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class ChatApi {
5
5
  /**
6
6
  * Chat service.
7
7
  * @module purecloud-platform-client-v2/api/ChatApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class CoachingApi {
5
5
  /**
6
6
  * Coaching service.
7
7
  * @module purecloud-platform-client-v2/api/CoachingApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class ContentManagementApi {
5
5
  /**
6
6
  * ContentManagement service.
7
7
  * @module purecloud-platform-client-v2/api/ContentManagementApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class ConversationsApi {
5
5
  /**
6
6
  * Conversations service.
7
7
  * @module purecloud-platform-client-v2/api/ConversationsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -6212,8 +6212,12 @@ class ConversationsApi {
6212
6212
  * Send an agentless outbound message
6213
6213
  * Send an agentless (api participant) outbound message using a client credential grant. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. If there is already a connected conversation between the fromAddress and toAddress specified, the useExistingActiveConversation param can be used to barge in to the ongoing conversation.
6214
6214
  * @param {Object} body Create agentless outbound messaging request
6215
+ * @param {Object} opts Optional parameters
6216
+ * @param {Boolean} opts.useNormalizedMessage If true, response removes deprecated fields (textBody, messagingTemplate) (default to false)
6215
6217
  */
6216
- postConversationsMessagesAgentless(body) {
6218
+ postConversationsMessagesAgentless(body, opts) {
6219
+ opts = opts || {};
6220
+
6217
6221
  // verify the required parameter 'body' is set
6218
6222
  if (body === undefined || body === null) {
6219
6223
  throw 'Missing the required parameter "body" when calling postConversationsMessagesAgentless';
@@ -6223,7 +6227,7 @@ class ConversationsApi {
6223
6227
  '/api/v2/conversations/messages/agentless',
6224
6228
  'POST',
6225
6229
  { },
6226
- { },
6230
+ { 'useNormalizedMessage': opts['useNormalizedMessage'] },
6227
6231
  { },
6228
6232
  { },
6229
6233
  body,
@@ -5,7 +5,7 @@ class DataExtensionsApi {
5
5
  /**
6
6
  * DataExtensions service.
7
7
  * @module purecloud-platform-client-v2/api/DataExtensionsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class DataPrivacyApi {
5
5
  /**
6
6
  * DataPrivacy service.
7
7
  * @module purecloud-platform-client-v2/api/DataPrivacyApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class DownloadsApi {
5
5
  /**
6
6
  * Downloads service.
7
7
  * @module purecloud-platform-client-v2/api/DownloadsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class EmailsApi {
5
5
  /**
6
6
  * Emails service.
7
7
  * @module purecloud-platform-client-v2/api/EmailsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class EmployeeEngagementApi {
5
5
  /**
6
6
  * EmployeeEngagement service.
7
7
  * @module purecloud-platform-client-v2/api/EmployeeEngagementApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class EventsApi {
5
5
  /**
6
6
  * Events service.
7
7
  * @module purecloud-platform-client-v2/api/EventsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class ExternalContactsApi {
5
5
  /**
6
6
  * ExternalContacts service.
7
7
  * @module purecloud-platform-client-v2/api/ExternalContactsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -1881,10 +1881,11 @@ class ExternalContactsApi {
1881
1881
 
1882
1882
  /**
1883
1883
  * Fetch a contact using an identifier type and value.
1884
- * Phone number identifier values must be provided with the country code and a leading + symbol. Example: "+1 704 298 4733"
1884
+ * NOTE: Deprecated. Please use /api/v2/externalcontacts/identifierlookup/contacts as an alternative endpoint instead. Phone number identifier values must be provided with the country code and a leading + symbol. Example: "+1 704 298 4733"
1885
1885
  * @param {Object} identifier
1886
1886
  * @param {Object} opts Optional parameters
1887
1887
  * @param {Array.<String>} opts.expand which field, if any, to expand
1888
+ * @deprecated
1888
1889
  */
1889
1890
  postExternalcontactsIdentifierlookup(identifier, opts) {
1890
1891
  opts = opts || {};
@@ -5,7 +5,7 @@ class FaxApi {
5
5
  /**
6
6
  * Fax service.
7
7
  * @module purecloud-platform-client-v2/api/FaxApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class FlowsApi {
5
5
  /**
6
6
  * Flows service.
7
7
  * @module purecloud-platform-client-v2/api/FlowsApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class GamificationApi {
5
5
  /**
6
6
  * Gamification service.
7
7
  * @module purecloud-platform-client-v2/api/GamificationApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**
@@ -344,6 +344,62 @@ class GamificationApi {
344
344
  );
345
345
  }
346
346
 
347
+ /**
348
+ * Get insights rankings
349
+ *
350
+ * @param {Object} filterType Filter type for the query request.
351
+ * @param {String} filterId ID for the filter type.
352
+ * @param {Object} granularity Granularity
353
+ * @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
354
+ * @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
355
+ * @param {Object} sortKey Sort key
356
+ * @param {Object} opts Optional parameters
357
+ * @param {String} opts.sortMetricId Sort Metric Id
358
+ * @param {Number} opts.sectionSize The number of top and bottom users to return before ties
359
+ * @param {String} opts.userIds A list of up to 100 comma-separated user Ids
360
+ */
361
+ getGamificationInsightsRankings(filterType, filterId, granularity, comparativePeriodStartWorkday, primaryPeriodStartWorkday, sortKey, opts) {
362
+ opts = opts || {};
363
+
364
+ // verify the required parameter 'filterType' is set
365
+ if (filterType === undefined || filterType === null) {
366
+ throw 'Missing the required parameter "filterType" when calling getGamificationInsightsRankings';
367
+ }
368
+ // verify the required parameter 'filterId' is set
369
+ if (filterId === undefined || filterId === null) {
370
+ throw 'Missing the required parameter "filterId" when calling getGamificationInsightsRankings';
371
+ }
372
+ // verify the required parameter 'granularity' is set
373
+ if (granularity === undefined || granularity === null) {
374
+ throw 'Missing the required parameter "granularity" when calling getGamificationInsightsRankings';
375
+ }
376
+ // verify the required parameter 'comparativePeriodStartWorkday' is set
377
+ if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
378
+ throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsRankings';
379
+ }
380
+ // verify the required parameter 'primaryPeriodStartWorkday' is set
381
+ if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
382
+ throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsRankings';
383
+ }
384
+ // verify the required parameter 'sortKey' is set
385
+ if (sortKey === undefined || sortKey === null) {
386
+ throw 'Missing the required parameter "sortKey" when calling getGamificationInsightsRankings';
387
+ }
388
+
389
+ return this.apiClient.callApi(
390
+ '/api/v2/gamification/insights/rankings',
391
+ 'GET',
392
+ { },
393
+ { 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday,'sortKey': sortKey,'sortMetricId': opts['sortMetricId'],'sectionSize': opts['sectionSize'],'userIds': opts['userIds'] },
394
+ { },
395
+ { },
396
+ null,
397
+ ['PureCloud OAuth'],
398
+ ['application/json'],
399
+ ['application/json']
400
+ );
401
+ }
402
+
347
403
  /**
348
404
  * Get insights user trend for the current user
349
405
  *
@@ -5,7 +5,7 @@ class GeneralDataProtectionRegulationApi {
5
5
  /**
6
6
  * GeneralDataProtectionRegulation service.
7
7
  * @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
8
- * @version 211.1.0
8
+ * @version 212.1.0
9
9
  */
10
10
 
11
11
  /**