purecloud-platform-client-v2 149.1.0 → 151.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.
Files changed (77) hide show
  1. package/README.md +2 -2
  2. package/dist/node/purecloud-platform-client-v2.js +1114 -77
  3. package/dist/web-amd/purecloud-platform-client-v2.js +1114 -77
  4. package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
  5. package/dist/web-cjs/bundle.js +1114 -77
  6. package/dist/web-cjs/purecloud-platform-client-v2.js +1114 -77
  7. package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
  8. package/index.d.ts +1082 -425
  9. package/package.json +1 -1
  10. package/src/purecloud-platform-client-v2/ApiClient.js +1 -1
  11. package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
  12. package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +1 -1
  13. package/src/purecloud-platform-client-v2/api/ArchitectApi.js +1 -1
  14. package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
  15. package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
  16. package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
  17. package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
  18. package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
  19. package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
  20. package/src/purecloud-platform-client-v2/api/ConversationsApi.js +81 -8
  21. package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
  22. package/src/purecloud-platform-client-v2/api/DownloadsApi.js +57 -0
  23. package/src/purecloud-platform-client-v2/api/EventsApi.js +101 -0
  24. package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +216 -1
  25. package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
  26. package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
  27. package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
  28. package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
  29. package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
  30. package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
  31. package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
  32. package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
  33. package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
  34. package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
  35. package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
  36. package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
  37. package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
  38. package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
  39. package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
  40. package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
  41. package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
  42. package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
  43. package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
  44. package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
  45. package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
  46. package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
  47. package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
  48. package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
  49. package/src/purecloud-platform-client-v2/api/PresenceApi.js +185 -1
  50. package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +4 -4
  51. package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
  52. package/src/purecloud-platform-client-v2/api/RecordingApi.js +2 -2
  53. package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
  54. package/src/purecloud-platform-client-v2/api/RoutingApi.js +196 -1
  55. package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
  56. package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
  57. package/src/purecloud-platform-client-v2/api/SearchApi.js +26 -1
  58. package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
  59. package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
  60. package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
  61. package/src/purecloud-platform-client-v2/api/TeamsApi.js +93 -1
  62. package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
  63. package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
  64. package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
  65. package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
  66. package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
  67. package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
  68. package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
  69. package/src/purecloud-platform-client-v2/api/UsersApi.js +26 -1
  70. package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
  71. package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
  72. package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
  73. package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
  74. package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
  75. package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
  76. package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +71 -1
  77. package/src/purecloud-platform-client-v2/index.js +13 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purecloud-platform-client-v2",
3
- "version": "149.1.0",
3
+ "version": "151.0.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",
@@ -4,7 +4,7 @@ import { default as qs } from 'qs';
4
4
 
5
5
  /**
6
6
  * @module purecloud-platform-client-v2/ApiClient
7
- * @version 149.1.0
7
+ * @version 151.0.0
8
8
  */
9
9
  class ApiClient {
10
10
  /**
@@ -5,7 +5,7 @@ class AlertingApi {
5
5
  /**
6
6
  * Alerting service.
7
7
  * @module purecloud-platform-client-v2/api/AlertingApi
8
- * @version 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class ArchitectApi {
5
5
  /**
6
6
  * Architect service.
7
7
  * @module purecloud-platform-client-v2/api/ArchitectApi
8
- * @version 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.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 149.1.0
8
+ * @version 151.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -1515,8 +1515,12 @@ class ConversationsApi {
1515
1515
  * Get message
1516
1516
  *
1517
1517
  * @param {String} messageId messageId
1518
+ * @param {Object} opts Optional parameters
1519
+ * @param {Boolean} opts.useNormalizedMessage If true, response removes deprecated fields (textBody, media, stickers) (default to false)
1518
1520
  */
1519
- getConversationsMessageDetails(messageId) {
1521
+ getConversationsMessageDetails(messageId, opts) {
1522
+ opts = opts || {};
1523
+
1520
1524
  // verify the required parameter 'messageId' is set
1521
1525
  if (messageId === undefined || messageId === null) {
1522
1526
  throw 'Missing the required parameter "messageId" when calling getConversationsMessageDetails';
@@ -1526,7 +1530,7 @@ class ConversationsApi {
1526
1530
  '/api/v2/conversations/messages/{messageId}/details',
1527
1531
  'GET',
1528
1532
  { 'messageId': messageId },
1529
- { },
1533
+ { 'useNormalizedMessage': opts['useNormalizedMessage'] },
1530
1534
  { },
1531
1535
  { },
1532
1536
  null,
@@ -1541,8 +1545,12 @@ class ConversationsApi {
1541
1545
  *
1542
1546
  * @param {String} conversationId conversationId
1543
1547
  * @param {String} messageId messageId
1548
+ * @param {Object} opts Optional parameters
1549
+ * @param {Boolean} opts.useNormalizedMessage If true, response removes deprecated fields (textBody, media, stickers) (default to false)
1544
1550
  */
1545
- getConversationsMessageMessage(conversationId, messageId) {
1551
+ getConversationsMessageMessage(conversationId, messageId, opts) {
1552
+ opts = opts || {};
1553
+
1546
1554
  // verify the required parameter 'conversationId' is set
1547
1555
  if (conversationId === undefined || conversationId === null) {
1548
1556
  throw 'Missing the required parameter "conversationId" when calling getConversationsMessageMessage';
@@ -1556,7 +1564,7 @@ class ConversationsApi {
1556
1564
  '/api/v2/conversations/messages/{conversationId}/messages/{messageId}',
1557
1565
  'GET',
1558
1566
  { 'conversationId': conversationId,'messageId': messageId },
1559
- { },
1567
+ { 'useNormalizedMessage': opts['useNormalizedMessage'] },
1560
1568
  { },
1561
1569
  { },
1562
1570
  null,
@@ -4174,6 +4182,31 @@ class ConversationsApi {
4174
4182
  );
4175
4183
  }
4176
4184
 
4185
+ /**
4186
+ * Create an email conversation, per API
4187
+ *
4188
+ * @param {Object} body Create agentless email request
4189
+ */
4190
+ postConversationsEmailsAgentless(body) {
4191
+ // verify the required parameter 'body' is set
4192
+ if (body === undefined || body === null) {
4193
+ throw 'Missing the required parameter "body" when calling postConversationsEmailsAgentless';
4194
+ }
4195
+
4196
+ return this.apiClient.callApi(
4197
+ '/api/v2/conversations/emails/agentless',
4198
+ 'POST',
4199
+ { },
4200
+ { },
4201
+ { },
4202
+ { },
4203
+ body,
4204
+ ['PureCloud OAuth'],
4205
+ ['application/json'],
4206
+ ['application/json']
4207
+ );
4208
+ }
4209
+
4177
4210
  /**
4178
4211
  * Create Fax Conversation
4179
4212
  *
@@ -4255,8 +4288,12 @@ class ConversationsApi {
4255
4288
  * @param {String} conversationId conversationId
4256
4289
  * @param {String} communicationId communicationId
4257
4290
  * @param {Object} body Message
4291
+ * @param {Object} opts Optional parameters
4292
+ * @param {Boolean} opts.useNormalizedMessage If true, response removes deprecated fields (textBody, media, stickers) (default to false)
4258
4293
  */
4259
- postConversationsMessageCommunicationMessages(conversationId, communicationId, body) {
4294
+ postConversationsMessageCommunicationMessages(conversationId, communicationId, body, opts) {
4295
+ opts = opts || {};
4296
+
4260
4297
  // verify the required parameter 'conversationId' is set
4261
4298
  if (conversationId === undefined || conversationId === null) {
4262
4299
  throw 'Missing the required parameter "conversationId" when calling postConversationsMessageCommunicationMessages';
@@ -4274,7 +4311,7 @@ class ConversationsApi {
4274
4311
  '/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages',
4275
4312
  'POST',
4276
4313
  { 'conversationId': conversationId,'communicationId': communicationId },
4277
- { },
4314
+ { 'useNormalizedMessage': opts['useNormalizedMessage'] },
4278
4315
  { },
4279
4316
  { },
4280
4317
  body,
@@ -4314,11 +4351,47 @@ class ConversationsApi {
4314
4351
  );
4315
4352
  }
4316
4353
 
4354
+ /**
4355
+ * Send message typing event
4356
+ * Send message typing event for existing conversation/communication.
4357
+ * @param {String} conversationId conversationId
4358
+ * @param {String} communicationId communicationId
4359
+ * @param {Object} body MessageTypingEvent
4360
+ */
4361
+ postConversationsMessageCommunicationTyping(conversationId, communicationId, body) {
4362
+ // verify the required parameter 'conversationId' is set
4363
+ if (conversationId === undefined || conversationId === null) {
4364
+ throw 'Missing the required parameter "conversationId" when calling postConversationsMessageCommunicationTyping';
4365
+ }
4366
+ // verify the required parameter 'communicationId' is set
4367
+ if (communicationId === undefined || communicationId === null) {
4368
+ throw 'Missing the required parameter "communicationId" when calling postConversationsMessageCommunicationTyping';
4369
+ }
4370
+ // verify the required parameter 'body' is set
4371
+ if (body === undefined || body === null) {
4372
+ throw 'Missing the required parameter "body" when calling postConversationsMessageCommunicationTyping';
4373
+ }
4374
+
4375
+ return this.apiClient.callApi(
4376
+ '/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/typing',
4377
+ 'POST',
4378
+ { 'conversationId': conversationId,'communicationId': communicationId },
4379
+ { },
4380
+ { },
4381
+ { },
4382
+ body,
4383
+ ['PureCloud OAuth'],
4384
+ ['application/json'],
4385
+ ['application/json']
4386
+ );
4387
+ }
4388
+
4317
4389
  /**
4318
4390
  * Get messages in batch
4319
4391
  * The path parameter [conversationId] should contain the conversationId of the conversation being filtered. The body should contain the messageId(s) of messages being requested. For example: ["a3069a33b-bbb1-4703-9d68-061d9e9db96e", "55bc6be3-078c-4a49-a4e6-1e05776ed7e8"]
4320
4392
  * @param {String} conversationId
4321
4393
  * @param {Object} opts Optional parameters
4394
+ * @param {Boolean} opts.useNormalizedMessage If true, response removes deprecated fields (textBody, media, stickers) (default to false)
4322
4395
  * @param {Array.<String>} opts.body messageIds
4323
4396
  */
4324
4397
  postConversationsMessageMessagesBulk(conversationId, opts) {
@@ -4333,7 +4406,7 @@ class ConversationsApi {
4333
4406
  '/api/v2/conversations/messages/{conversationId}/messages/bulk',
4334
4407
  'POST',
4335
4408
  { 'conversationId': conversationId },
4336
- { },
4409
+ { 'useNormalizedMessage': opts['useNormalizedMessage'] },
4337
4410
  { },
4338
4411
  { },
4339
4412
  opts['body'],
@@ -5,7 +5,7 @@ class DataExtensionsApi {
5
5
  /**
6
6
  * DataExtensions service.
7
7
  * @module purecloud-platform-client-v2/api/DataExtensionsApi
8
- * @version 149.1.0
8
+ * @version 151.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -0,0 +1,57 @@
1
+ import ApiClient from '../ApiClient.js';
2
+
3
+
4
+ class DownloadsApi {
5
+ /**
6
+ * Downloads service.
7
+ * @module purecloud-platform-client-v2/api/DownloadsApi
8
+ * @version 151.0.0
9
+ */
10
+
11
+ /**
12
+ * Constructs a new DownloadsApi.
13
+ * @alias module:purecloud-platform-client-v2/api/DownloadsApi
14
+ * @class
15
+ * @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use,
16
+ * default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified.
17
+ */
18
+ constructor(apiClient) {
19
+ this.apiClient = apiClient || ApiClient.instance;
20
+ }
21
+
22
+
23
+ /**
24
+ * Issues a redirect to a signed secure download URL for specified download
25
+ * this method will issue a redirect to the url to the content
26
+ * @param {String} downloadId Download ID
27
+ * @param {Object} opts Optional parameters
28
+ * @param {String} opts.contentDisposition
29
+ * @param {Boolean} opts.issueRedirect (default to true)
30
+ * @param {Boolean} opts.redirectToAuth (default to true)
31
+ */
32
+ getDownload(downloadId, opts) {
33
+ opts = opts || {};
34
+
35
+ // verify the required parameter 'downloadId' is set
36
+ if (downloadId === undefined || downloadId === null) {
37
+ throw 'Missing the required parameter "downloadId" when calling getDownload';
38
+ }
39
+
40
+ return this.apiClient.callApi(
41
+ '/api/v2/downloads/{downloadId}',
42
+ 'GET',
43
+ { 'downloadId': downloadId },
44
+ { 'contentDisposition': opts['contentDisposition'],'issueRedirect': opts['issueRedirect'],'redirectToAuth': opts['redirectToAuth'] },
45
+ { },
46
+ { },
47
+ null,
48
+ ['PureCloud OAuth'],
49
+ ['application/json'],
50
+ ['application/json']
51
+ );
52
+ }
53
+
54
+ }
55
+
56
+
57
+ export default DownloadsApi;
@@ -0,0 +1,101 @@
1
+ import ApiClient from '../ApiClient.js';
2
+
3
+
4
+ class EventsApi {
5
+ /**
6
+ * Events service.
7
+ * @module purecloud-platform-client-v2/api/EventsApi
8
+ * @version 151.0.0
9
+ */
10
+
11
+ /**
12
+ * Constructs a new EventsApi.
13
+ * @alias module:purecloud-platform-client-v2/api/EventsApi
14
+ * @class
15
+ * @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use,
16
+ * default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified.
17
+ */
18
+ constructor(apiClient) {
19
+ this.apiClient = apiClient || ApiClient.instance;
20
+ }
21
+
22
+
23
+ /**
24
+ * Publish Conversation Batch Events
25
+ *
26
+ * @param {Object} body batchRequest
27
+ */
28
+ postEventsConversations(body) {
29
+ // verify the required parameter 'body' is set
30
+ if (body === undefined || body === null) {
31
+ throw 'Missing the required parameter "body" when calling postEventsConversations';
32
+ }
33
+
34
+ return this.apiClient.callApi(
35
+ '/api/v2/events/conversations',
36
+ 'POST',
37
+ { },
38
+ { },
39
+ { },
40
+ { },
41
+ body,
42
+ ['PureCloud OAuth'],
43
+ ['application/json'],
44
+ ['application/json']
45
+ );
46
+ }
47
+
48
+ /**
49
+ * Publish User Presence Status Batch Events
50
+ *
51
+ * @param {Object} body batchRequest
52
+ */
53
+ postEventsUsersPresence(body) {
54
+ // verify the required parameter 'body' is set
55
+ if (body === undefined || body === null) {
56
+ throw 'Missing the required parameter "body" when calling postEventsUsersPresence';
57
+ }
58
+
59
+ return this.apiClient.callApi(
60
+ '/api/v2/events/users/presence',
61
+ 'POST',
62
+ { },
63
+ { },
64
+ { },
65
+ { },
66
+ body,
67
+ ['PureCloud OAuth'],
68
+ ['application/json'],
69
+ ['application/json']
70
+ );
71
+ }
72
+
73
+ /**
74
+ * Publish Agent Routing Status Batch Events
75
+ *
76
+ * @param {Object} body batchRequest
77
+ */
78
+ postEventsUsersRoutingstatus(body) {
79
+ // verify the required parameter 'body' is set
80
+ if (body === undefined || body === null) {
81
+ throw 'Missing the required parameter "body" when calling postEventsUsersRoutingstatus';
82
+ }
83
+
84
+ return this.apiClient.callApi(
85
+ '/api/v2/events/users/routingstatus',
86
+ 'POST',
87
+ { },
88
+ { },
89
+ { },
90
+ { },
91
+ body,
92
+ ['PureCloud OAuth'],
93
+ ['application/json'],
94
+ ['application/json']
95
+ );
96
+ }
97
+
98
+ }
99
+
100
+
101
+ export default EventsApi;