purecloud-platform-client-v2 94.0.0 → 97.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 (68) hide show
  1. package/README.md +2 -2
  2. package/dist/node/purecloud-platform-client-v2.js +547 -1265
  3. package/dist/web-amd/purecloud-platform-client-v2.js +547 -1265
  4. package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
  5. package/dist/web-cjs/bundle.js +547 -1265
  6. package/dist/web-cjs/purecloud-platform-client-v2.js +552 -1269
  7. package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
  8. package/index.d.ts +513 -289
  9. package/package.json +1 -1
  10. package/src/purecloud-platform-client-v2/ApiClient.js +2 -2
  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 +4 -2
  16. package/src/purecloud-platform-client-v2/api/BillingApi.js +3 -3
  17. package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
  18. package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
  19. package/src/purecloud-platform-client-v2/api/ConversationsApi.js +26 -10
  20. package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
  21. package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +1 -1
  22. package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
  23. package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
  24. package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
  25. package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
  26. package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
  27. package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
  28. package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
  29. package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
  30. package/src/purecloud-platform-client-v2/api/JourneyApi.js +131 -1
  31. package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +4 -3
  32. package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
  33. package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
  34. package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
  35. package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
  36. package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
  37. package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
  38. package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
  39. package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
  40. package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
  41. package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
  42. package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
  43. package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
  44. package/src/purecloud-platform-client-v2/api/QualityApi.js +7 -7
  45. package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
  46. package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
  47. package/src/purecloud-platform-client-v2/api/RoutingApi.js +1 -1
  48. package/src/purecloud-platform-client-v2/api/SCIMApi.js +26 -26
  49. package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
  50. package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
  51. package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
  52. package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
  53. package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
  54. package/src/purecloud-platform-client-v2/api/TelephonyApi.js +3 -3
  55. package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
  56. package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
  57. package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
  58. package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
  59. package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
  60. package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
  61. package/src/purecloud-platform-client-v2/api/UsersApi.js +123 -1
  62. package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
  63. package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
  64. package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
  65. package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
  66. package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +306 -1147
  67. package/src/purecloud-platform-client-v2/index.js +1 -7
  68. package/src/purecloud-platform-client-v2/api/UserDevelopmentApi.js +0 -148
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purecloud-platform-client-v2",
3
- "version": "94.0.0",
3
+ "version": "97.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",
@@ -2,7 +2,7 @@ import superagent from 'superagent';
2
2
 
3
3
  /**
4
4
  * @module purecloud-platform-client-v2/ApiClient
5
- * @version 94.0.0
5
+ * @version 97.0.0
6
6
  */
7
7
  class ApiClient {
8
8
  /**
@@ -758,7 +758,7 @@ class ApiClient {
758
758
 
759
759
  // set header parameters
760
760
  request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
761
- //request.set({ 'purecloud-sdk': '94.0.0' });
761
+ //request.set({ 'purecloud-sdk': '97.0.0' });
762
762
 
763
763
  // set request timeout
764
764
  request.timeout(this.timeout);
@@ -5,7 +5,7 @@ class AlertingApi {
5
5
  /**
6
6
  * Alerting service.
7
7
  * @module purecloud-platform-client-v2/api/AlertingApi
8
- * @version 94.0.0
8
+ * @version 97.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 94.0.0
8
+ * @version 97.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 94.0.0
8
+ * @version 97.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 94.0.0
8
+ * @version 97.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 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -340,6 +340,8 @@ class AuthorizationApi {
340
340
  * @param {Object} opts Optional parameters
341
341
  * @param {Number} opts.pageSize Page size (default to 25)
342
342
  * @param {Number} opts.pageNumber Page number (default to 1)
343
+ * @param {Object} opts.queryType Query filter type
344
+ * @param {String} opts.query Comma-separated list of permissions or domains to query
343
345
  */
344
346
  getAuthorizationPermissions(opts) {
345
347
  opts = opts || {};
@@ -349,7 +351,7 @@ class AuthorizationApi {
349
351
  '/api/v2/authorization/permissions',
350
352
  'GET',
351
353
  { },
352
- { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'] },
354
+ { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'queryType': opts['queryType'],'query': opts['query'] },
353
355
  { },
354
356
  { },
355
357
  null,
@@ -5,7 +5,7 @@ class BillingApi {
5
5
  /**
6
6
  * Billing service.
7
7
  * @module purecloud-platform-client-v2/api/BillingApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -23,8 +23,8 @@ class BillingApi {
23
23
  /**
24
24
  * Get a report of the billable license usages
25
25
  * Report is of the billable usages (e.g. licenses and devices utilized) for a given period. If response's status is InProgress, wait a few seconds, then try the same request again.
26
- * @param {Date} startDate The period start date. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
27
- * @param {Date} endDate The period end date. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
26
+ * @param {Date} startDate The period start date. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
27
+ * @param {Date} endDate The period end date. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
28
28
  */
29
29
  getBillingReportsBillableusage(startDate, endDate) {
30
30
  // verify the required parameter 'startDate' is set
@@ -5,7 +5,7 @@ class CoachingApi {
5
5
  /**
6
6
  * Coaching service.
7
7
  * @module purecloud-platform-client-v2/api/CoachingApi
8
- * @version 94.0.0
8
+ * @version 97.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 94.0.0
8
+ * @version 97.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 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -3634,7 +3634,7 @@ class ConversationsApi {
3634
3634
 
3635
3635
  /**
3636
3636
  * Send message
3637
- *
3637
+ * Send message on existing conversation/communication. Only one message body field can be accepted, per request. Example: 1 textBody, 1 mediaId, 1 stickerId, or 1 messageTemplate.
3638
3638
  * @param {String} conversationId conversationId
3639
3639
  * @param {String} communicationId communicationId
3640
3640
  * @param {Object} body Message
@@ -3815,8 +3815,12 @@ class ConversationsApi {
3815
3815
  * Create a Facebook Integration
3816
3816
  *
3817
3817
  * @param {Object} body FacebookIntegrationRequest
3818
+ * @param {Object} opts Optional parameters
3819
+ * @param {Boolean} opts.async Create a Facebook integration in an asynchronous manner. If the parameter value is true, this initiates the generation of a new Facebook integration. An integration ID is returned, it can be used to query the integration. Check the integration's createStatus for Completed or Error to detect the create is finished. (default to false)
3818
3820
  */
3819
- postConversationsMessagingIntegrationsFacebook(body) {
3821
+ postConversationsMessagingIntegrationsFacebook(body, opts) {
3822
+ opts = opts || {};
3823
+
3820
3824
  // verify the required parameter 'body' is set
3821
3825
  if (body === undefined || body === null) {
3822
3826
  throw 'Missing the required parameter "body" when calling postConversationsMessagingIntegrationsFacebook';
@@ -3826,7 +3830,7 @@ class ConversationsApi {
3826
3830
  '/api/v2/conversations/messaging/integrations/facebook',
3827
3831
  'POST',
3828
3832
  { },
3829
- { },
3833
+ { 'async': opts['async'] },
3830
3834
  { },
3831
3835
  { },
3832
3836
  body,
@@ -3840,8 +3844,12 @@ class ConversationsApi {
3840
3844
  * Create a LINE messenger Integration
3841
3845
  *
3842
3846
  * @param {Object} body LineIntegrationRequest
3847
+ * @param {Object} opts Optional parameters
3848
+ * @param {Boolean} opts.async Create a LINE integration in an asynchronous manner. If the parameter value is true, this initiates the generation of a new LINE integration. An integration ID is returned, it can be used to query the integration. Check the integration's createStatus for Completed or Error to detect the create is finished. (default to false)
3843
3849
  */
3844
- postConversationsMessagingIntegrationsLine(body) {
3850
+ postConversationsMessagingIntegrationsLine(body, opts) {
3851
+ opts = opts || {};
3852
+
3845
3853
  // verify the required parameter 'body' is set
3846
3854
  if (body === undefined || body === null) {
3847
3855
  throw 'Missing the required parameter "body" when calling postConversationsMessagingIntegrationsLine';
@@ -3851,7 +3859,7 @@ class ConversationsApi {
3851
3859
  '/api/v2/conversations/messaging/integrations/line',
3852
3860
  'POST',
3853
3861
  { },
3854
- { },
3862
+ { 'async': opts['async'] },
3855
3863
  { },
3856
3864
  { },
3857
3865
  body,
@@ -3865,8 +3873,12 @@ class ConversationsApi {
3865
3873
  * Create a Twitter Integration
3866
3874
  *
3867
3875
  * @param {Object} body TwitterIntegrationRequest
3876
+ * @param {Object} opts Optional parameters
3877
+ * @param {Boolean} opts.async Create a Twitter integration in an asynchronous manner. If the parameter value is true, this initiates the generation of a new Twitter integration. An integration ID is returned, it can be used to query the integration. Check the integration's createStatus for Completed or Error to detect the create is finished. (default to false)
3868
3878
  */
3869
- postConversationsMessagingIntegrationsTwitter(body) {
3879
+ postConversationsMessagingIntegrationsTwitter(body, opts) {
3880
+ opts = opts || {};
3881
+
3870
3882
  // verify the required parameter 'body' is set
3871
3883
  if (body === undefined || body === null) {
3872
3884
  throw 'Missing the required parameter "body" when calling postConversationsMessagingIntegrationsTwitter';
@@ -3876,7 +3888,7 @@ class ConversationsApi {
3876
3888
  '/api/v2/conversations/messaging/integrations/twitter',
3877
3889
  'POST',
3878
3890
  { },
3879
- { },
3891
+ { 'async': opts['async'] },
3880
3892
  { },
3881
3893
  { },
3882
3894
  body,
@@ -3890,8 +3902,12 @@ class ConversationsApi {
3890
3902
  * Create a WhatsApp Integration
3891
3903
  * You must be approved by WhatsApp to use this feature. Your approved e164-formatted phone number and valid WhatsApp certificate for your number are required. Your WhatsApp certificate must have valid base64 encoding. Please paste carefully and do not add any leading or trailing spaces. Do not alter any characters. An integration must be activated within 7 days of certificate generation. If you cannot complete the addition and activation of the number within 7 days, please obtain a new certificate before creating the integration. Integrations created with an invalid number or certificate may immediately incur additional integration fees. Please carefully enter your number and certificate as described.
3892
3904
  * @param {Object} body WhatsAppIntegrationRequest
3905
+ * @param {Object} opts Optional parameters
3906
+ * @param {Boolean} opts.async Create a WhatsApp integration in an asynchronous manner. If the parameter value is true, this initiates the generation of a new WhatsApp integration. An integration ID is returned, it can be used to query the integration. Check the integration's createStatus for Completed or Error to detect the create is finished. (default to false)
3893
3907
  */
3894
- postConversationsMessagingIntegrationsWhatsapp(body) {
3908
+ postConversationsMessagingIntegrationsWhatsapp(body, opts) {
3909
+ opts = opts || {};
3910
+
3895
3911
  // verify the required parameter 'body' is set
3896
3912
  if (body === undefined || body === null) {
3897
3913
  throw 'Missing the required parameter "body" when calling postConversationsMessagingIntegrationsWhatsapp';
@@ -3901,7 +3917,7 @@ class ConversationsApi {
3901
3917
  '/api/v2/conversations/messaging/integrations/whatsapp',
3902
3918
  'POST',
3903
3919
  { },
3904
- { },
3920
+ { 'async': opts['async'] },
3905
3921
  { },
3906
3922
  { },
3907
3923
  body,
@@ -5,7 +5,7 @@ class DataExtensionsApi {
5
5
  /**
6
6
  * DataExtensions service.
7
7
  * @module purecloud-platform-client-v2/api/DataExtensionsApi
8
- * @version 94.0.0
8
+ * @version 97.0.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 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class FaxApi {
5
5
  /**
6
6
  * Fax service.
7
7
  * @module purecloud-platform-client-v2/api/FaxApi
8
- * @version 94.0.0
8
+ * @version 97.0.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 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class GeneralDataProtectionRegulationApi {
5
5
  /**
6
6
  * GeneralDataProtectionRegulation service.
7
7
  * @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class GeolocationApi {
5
5
  /**
6
6
  * Geolocation service.
7
7
  * @module purecloud-platform-client-v2/api/GeolocationApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class GreetingsApi {
5
5
  /**
6
6
  * Greetings service.
7
7
  * @module purecloud-platform-client-v2/api/GreetingsApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class GroupsApi {
5
5
  /**
6
6
  * Groups service.
7
7
  * @module purecloud-platform-client-v2/api/GroupsApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class IdentityProviderApi {
5
5
  /**
6
6
  * IdentityProvider service.
7
7
  * @module purecloud-platform-client-v2/api/IdentityProviderApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class IntegrationsApi {
5
5
  /**
6
6
  * Integrations service.
7
7
  * @module purecloud-platform-client-v2/api/IntegrationsApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class JourneyApi {
5
5
  /**
6
6
  * Journey service.
7
7
  * @module purecloud-platform-client-v2/api/JourneyApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -70,6 +70,107 @@ class JourneyApi {
70
70
  );
71
71
  }
72
72
 
73
+ /**
74
+ * Retrieve segment assignments by customer ID.
75
+ *
76
+ * @param {String} customerIdType Type of ID used to identify customer (e.g. email, cookie, and phone).
77
+ * @param {String} customerId Primary identifier of the customer to query for segment assignments.
78
+ * @param {Object} opts Optional parameters
79
+ * @param {String} opts.pageSize Number of entities to return. Maximum of 200.
80
+ * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
81
+ * @param {Object} opts.segmentScope Scope to filter on. If not specified, both session-scoped and customer-scoped assignments are returned.
82
+ * @param {Object} opts.assignmentState Assignment state to filter on. If not specified, both assigned and unassigned assignments are returned.
83
+ */
84
+ getJourneyCustomerCustomerIdSegments(customerIdType, customerId, opts) {
85
+ opts = opts || {};
86
+
87
+ // verify the required parameter 'customerIdType' is set
88
+ if (customerIdType === undefined || customerIdType === null) {
89
+ throw 'Missing the required parameter "customerIdType" when calling getJourneyCustomerCustomerIdSegments';
90
+ }
91
+ // verify the required parameter 'customerId' is set
92
+ if (customerId === undefined || customerId === null) {
93
+ throw 'Missing the required parameter "customerId" when calling getJourneyCustomerCustomerIdSegments';
94
+ }
95
+
96
+ return this.apiClient.callApi(
97
+ '/api/v2/journey/customers/{customerIdType}/{customerId}/segments',
98
+ 'GET',
99
+ { 'customerIdType': customerIdType,'customerId': customerId },
100
+ { 'pageSize': opts['pageSize'],'after': opts['after'],'segmentScope': opts['segmentScope'],'assignmentState': opts['assignmentState'] },
101
+ { },
102
+ { },
103
+ null,
104
+ ['PureCloud OAuth'],
105
+ ['application/json'],
106
+ ['application/json']
107
+ );
108
+ }
109
+
110
+ /**
111
+ * Retrieve segment assignments by external contact ID.
112
+ *
113
+ * @param {String} externalContactId ID of the external contact to query for segment assignments.
114
+ * @param {Object} opts Optional parameters
115
+ * @param {String} opts.pageSize Number of entities to return. Maximum of 200.
116
+ * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
117
+ * @param {Object} opts.segmentScope Scope to filter on. If not specified, both session-scoped and customer-scoped assignments are returned.
118
+ * @param {Object} opts.assignmentState Assignment state to filter on. If not specified, both assigned and unassigned assignments are returned.
119
+ */
120
+ getJourneyExternalcontactSegments(externalContactId, opts) {
121
+ opts = opts || {};
122
+
123
+ // verify the required parameter 'externalContactId' is set
124
+ if (externalContactId === undefined || externalContactId === null) {
125
+ throw 'Missing the required parameter "externalContactId" when calling getJourneyExternalcontactSegments';
126
+ }
127
+
128
+ return this.apiClient.callApi(
129
+ '/api/v2/journey/externalcontacts/{externalContactId}/segments',
130
+ 'GET',
131
+ { 'externalContactId': externalContactId },
132
+ { 'pageSize': opts['pageSize'],'after': opts['after'],'segmentScope': opts['segmentScope'],'assignmentState': opts['assignmentState'] },
133
+ { },
134
+ { },
135
+ null,
136
+ ['PureCloud OAuth'],
137
+ ['application/json'],
138
+ ['application/json']
139
+ );
140
+ }
141
+
142
+ /**
143
+ * Retrieve segment assignments by session ID.
144
+ *
145
+ * @param {String} sessionId ID of the session to query for segment assignments.
146
+ * @param {Object} opts Optional parameters
147
+ * @param {String} opts.pageSize Number of entities to return. Maximum of 200.
148
+ * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
149
+ * @param {Object} opts.segmentScope Scope to filter on. If not specified, both session-scoped and customer-scoped assignments are returned.
150
+ * @param {Object} opts.assignmentState Assignment state to filter on. If not specified, both assigned and unassigned assignments are returned.
151
+ */
152
+ getJourneySessionSegments(sessionId, opts) {
153
+ opts = opts || {};
154
+
155
+ // verify the required parameter 'sessionId' is set
156
+ if (sessionId === undefined || sessionId === null) {
157
+ throw 'Missing the required parameter "sessionId" when calling getJourneySessionSegments';
158
+ }
159
+
160
+ return this.apiClient.callApi(
161
+ '/api/v2/journey/sessions/{sessionId}/segments',
162
+ 'GET',
163
+ { 'sessionId': sessionId },
164
+ { 'pageSize': opts['pageSize'],'after': opts['after'],'segmentScope': opts['segmentScope'],'assignmentState': opts['assignmentState'] },
165
+ { },
166
+ { },
167
+ null,
168
+ ['PureCloud OAuth'],
169
+ ['application/json'],
170
+ ['application/json']
171
+ );
172
+ }
173
+
73
174
  /**
74
175
  * Update a single action target.
75
176
  *
@@ -124,6 +225,35 @@ class JourneyApi {
124
225
  );
125
226
  }
126
227
 
228
+ /**
229
+ * Assign/Unassign a segment to/from an external contact or, if a segment is already assigned, update the expiry date of the segment assignment.
230
+ *
231
+ * @param {String} externalContactId ID of the external contact to query for segment assignments.
232
+ * @param {Object} opts Optional parameters
233
+ * @param {Array.<Object>} opts.body
234
+ */
235
+ postJourneyExternalcontactSegments(externalContactId, opts) {
236
+ opts = opts || {};
237
+
238
+ // verify the required parameter 'externalContactId' is set
239
+ if (externalContactId === undefined || externalContactId === null) {
240
+ throw 'Missing the required parameter "externalContactId" when calling postJourneyExternalcontactSegments';
241
+ }
242
+
243
+ return this.apiClient.callApi(
244
+ '/api/v2/journey/externalcontacts/{externalContactId}/segments',
245
+ 'POST',
246
+ { 'externalContactId': externalContactId },
247
+ { },
248
+ { },
249
+ { },
250
+ opts['body'],
251
+ ['PureCloud OAuth'],
252
+ ['application/json'],
253
+ ['application/json']
254
+ );
255
+ }
256
+
127
257
  }
128
258
 
129
259
 
@@ -5,7 +5,7 @@ class KnowledgeApi {
5
5
  /**
6
6
  * Knowledge service.
7
7
  * @module purecloud-platform-client-v2/api/KnowledgeApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -321,7 +321,7 @@ class KnowledgeApi {
321
321
  }
322
322
 
323
323
  /**
324
- * Get All trainings information for a knowledgebase
324
+ * Get all trainings information for a knowledgebase
325
325
  *
326
326
  * @param {String} knowledgeBaseId Knowledge base ID
327
327
  * @param {Object} languageCode Language code, format: iso2-LOCALE
@@ -330,6 +330,7 @@ class KnowledgeApi {
330
330
  * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
331
331
  * @param {String} opts.limit Number of entities to return. Maximum of 200.
332
332
  * @param {String} opts.pageSize Number of entities to return. Maximum of 200.
333
+ * @param {Object} opts.knowledgeDocumentsState Return the training with the specified state of the trained documents.
333
334
  */
334
335
  getKnowledgeKnowledgebaseLanguageTrainings(knowledgeBaseId, languageCode, opts) {
335
336
  opts = opts || {};
@@ -347,7 +348,7 @@ class KnowledgeApi {
347
348
  '/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/trainings',
348
349
  'GET',
349
350
  { 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
350
- { 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'] },
351
+ { 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'],'knowledgeDocumentsState': opts['knowledgeDocumentsState'] },
351
352
  { },
352
353
  { },
353
354
  null,
@@ -5,7 +5,7 @@ class LanguageUnderstandingApi {
5
5
  /**
6
6
  * LanguageUnderstanding service.
7
7
  * @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class LanguagesApi {
5
5
  /**
6
6
  * Languages service.
7
7
  * @module purecloud-platform-client-v2/api/LanguagesApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class LicenseApi {
5
5
  /**
6
6
  * License service.
7
7
  * @module purecloud-platform-client-v2/api/LicenseApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class LocationsApi {
5
5
  /**
6
6
  * Locations service.
7
7
  * @module purecloud-platform-client-v2/api/LocationsApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class MobileDevicesApi {
5
5
  /**
6
6
  * MobileDevices service.
7
7
  * @module purecloud-platform-client-v2/api/MobileDevicesApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class NotificationsApi {
5
5
  /**
6
6
  * Notifications service.
7
7
  * @module purecloud-platform-client-v2/api/NotificationsApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class OAuthApi {
5
5
  /**
6
6
  * OAuth service.
7
7
  * @module purecloud-platform-client-v2/api/OAuthApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class ObjectsApi {
5
5
  /**
6
6
  * Objects service.
7
7
  * @module purecloud-platform-client-v2/api/ObjectsApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class OrganizationApi {
5
5
  /**
6
6
  * Organization service.
7
7
  * @module purecloud-platform-client-v2/api/OrganizationApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class OrganizationAuthorizationApi {
5
5
  /**
6
6
  * OrganizationAuthorization service.
7
7
  * @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class OutboundApi {
5
5
  /**
6
6
  * Outbound service.
7
7
  * @module purecloud-platform-client-v2/api/OutboundApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@ class PresenceApi {
5
5
  /**
6
6
  * Presence service.
7
7
  * @module purecloud-platform-client-v2/api/PresenceApi
8
- * @version 94.0.0
8
+ * @version 97.0.0
9
9
  */
10
10
 
11
11
  /**