purecloud-platform-client-v2 137.0.1 → 137.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 (74) hide show
  1. package/README.md +9 -12
  2. package/dist/node/purecloud-platform-client-v2.js +277 -253
  3. package/dist/web-amd/purecloud-platform-client-v2.js +277 -253
  4. package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
  5. package/dist/web-cjs/bundle.js +277 -253
  6. package/dist/web-cjs/purecloud-platform-client-v2.js +2067 -4480
  7. package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
  8. package/index.d.ts +0 -1
  9. package/package.json +2 -2
  10. package/src/purecloud-platform-client-v2/ApiClient.js +195 -176
  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 +1 -1
  21. package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
  22. package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +1 -1
  23. package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
  24. package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
  25. package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
  26. package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
  27. package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
  28. package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
  29. package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
  30. package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
  31. package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
  32. package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
  33. package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
  34. package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
  35. package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
  36. package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
  37. package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
  38. package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
  39. package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
  40. package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
  41. package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
  42. package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
  43. package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
  44. package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
  45. package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
  46. package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
  47. package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
  48. package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
  49. package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
  50. package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
  51. package/src/purecloud-platform-client-v2/api/RoutingApi.js +1 -1
  52. package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
  53. package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
  54. package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
  55. package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
  56. package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
  57. package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
  58. package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
  59. package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
  60. package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
  61. package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
  62. package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
  63. package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
  64. package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
  65. package/src/purecloud-platform-client-v2/api/UsersApi.js +1 -1
  66. package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
  67. package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
  68. package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
  69. package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
  70. package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
  71. package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
  72. package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +1 -1
  73. package/src/purecloud-platform-client-v2/index.js +1 -1
  74. package/src/purecloud-platform-client-v2/logger.js +17 -13
@@ -1,8 +1,8 @@
1
- define(['superagent'], (function (superagent) { 'use strict';
1
+ define(['axios'], (function (axios) { 'use strict';
2
2
 
3
3
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
4
4
 
5
- var superagent__default = /*#__PURE__*/_interopDefaultLegacy(superagent);
5
+ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
6
6
 
7
7
  var PureCloudRegionHosts = {
8
8
  us_east_1: 'mypurecloud.com',
@@ -145,34 +145,38 @@ define(['superagent'], (function (superagent) { 'use strict';
145
145
 
146
146
  formatLog(level, statusCode, method, url, requestHeaders, responseHeaders, requestBody, responseBody) {
147
147
  var result;
148
- if (requestHeaders) requestHeaders['Authorization'] = '[REDACTED]';
149
- if (!this.log_request_body) requestBody = undefined;
150
- if (!this.log_response_body) responseBody = undefined;
148
+ var localRequestHeaders = requestHeaders ? JSON.parse(JSON.stringify(requestHeaders)) : null;
149
+ var localResponseHeaders = responseHeaders ? JSON.parse(JSON.stringify(responseHeaders)) : null;
150
+ var localRequestBody = requestBody ? JSON.parse(JSON.stringify(requestBody)) : null;
151
+ var localResponseBody = responseBody ? JSON.parse(JSON.stringify(responseBody)) : null;
152
+ if (requestHeaders) localRequestHeaders['Authorization'] = '[REDACTED]';
153
+ if (!this.log_request_body) localRequestBody = undefined;
154
+ if (!this.log_response_body) localResponseBody = undefined;
151
155
  if (this.log_format && this.log_format === logFormatEnum.formats.JSON) {
152
156
  result = {
153
157
  level: level,
154
158
  date: new Date().toISOString(),
155
159
  method: method,
156
160
  url: decodeURIComponent(url),
157
- correlationId: responseHeaders ? (responseHeaders['inin-correlation-id'] ? responseHeaders['inin-correlation-id'] : '') : '',
161
+ correlationId: localResponseHeaders ? (localResponseHeaders['inin-correlation-id'] ? localResponseHeaders['inin-correlation-id'] : '') : '',
158
162
  statusCode: statusCode,
159
163
  };
160
- if (requestHeaders) result.requestHeaders = requestHeaders;
161
- if (responseHeaders) result.responseHeaders = responseHeaders;
162
- if (requestBody) result.requestBody = requestBody;
163
- if (responseBody) result.responseBody = responseBody;
164
+ if (localRequestHeaders) result.requestHeaders = localRequestHeaders;
165
+ if (localResponseHeaders) result.responseHeaders = localResponseHeaders;
166
+ if (localRequestBody) result.requestBody = localRequestBody;
167
+ if (localResponseBody) result.responseBody = localResponseBody;
164
168
  } else {
165
169
  result = `${new Date().toISOString()}
166
170
  === REQUEST ===
167
171
  ${this.formatValue('URL', decodeURIComponent(url))}${this.formatValue('Method', method)}${this.formatValue(
168
172
  'Headers',
169
- this.formatHeaderString(requestHeaders)
170
- )}${this.formatValue('Body', requestBody ? JSON.stringify(requestBody, null, 2) : '')}
173
+ this.formatHeaderString(localRequestHeaders)
174
+ )}${this.formatValue('Body', localRequestBody ? JSON.stringify(localRequestBody, null, 2) : '')}
171
175
  === RESPONSE ===
172
- ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.formatHeaderString(responseHeaders))}${this.formatValue(
176
+ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.formatHeaderString(localResponseHeaders))}${this.formatValue(
173
177
  'CorrelationId',
174
- responseHeaders ? (responseHeaders['inin-correlation-id'] ? responseHeaders['inin-correlation-id'] : '') : ''
175
- )}${this.formatValue('Body', responseBody ? JSON.stringify(responseBody, null, 2) : '')}`;
178
+ localResponseHeaders ? (localResponseHeaders['inin-correlation-id'] ? localResponseHeaders['inin-correlation-id'] : '') : ''
179
+ )}${this.formatValue('Body', localResponseBody ? JSON.stringify(localResponseBody, null, 2) : '')}`;
176
180
  }
177
181
 
178
182
  return result;
@@ -393,7 +397,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
393
397
 
394
398
  /**
395
399
  * @module purecloud-platform-client-v2/ApiClient
396
- * @version 137.0.1
400
+ * @version 137.1.0
397
401
  */
398
402
  class ApiClient {
399
403
  /**
@@ -495,9 +499,6 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
495
499
  this.authData = {};
496
500
  this.settingsPrefix = 'purecloud';
497
501
 
498
- // Expose superagent module for use with superagent-proxy
499
- this.superagent = superagent__default["default"];
500
-
501
502
  // Transparently request a new access token when it expires (Code Authorization only)
502
503
  this.refreshInProgress = false;
503
504
 
@@ -666,63 +667,65 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
666
667
  return;
667
668
  }
668
669
 
669
- // Build token request
670
- var request = superagent__default["default"]('POST', `https://login.${this.config.environment}/oauth/token`);
671
- if (this.proxy && request.proxy) {
672
- request.proxy(this.proxy);
673
- }
674
- request.set('Authorization', `Basic ${authHeader}`);
675
- request.send('grant_type=client_credentials');
676
-
677
- // Execute request
678
- request.end((error, response) => {
679
- if (error) {
680
- // Log error
681
- this.config.logger.log(
682
- 'error',
683
- response.statusCode,
684
- 'POST',
685
- `https://login.${this.config.environment}/oauth/token`,
686
- request.header,
687
- response.headers,
688
- { grant_type: 'client_credentials' },
689
- response.body
690
- );
691
- reject(error);
692
- } else {
670
+ const headers = {
671
+ 'Authorization': `Basic ${authHeader}`
672
+ };
673
+ axios__default["default"]({
674
+ method: `POST`,
675
+ url: `https://login.${this.config.environment}/oauth/token`,
676
+ headers: headers,
677
+ data: 'grant_type=client_credentials',
678
+ proxy: this.proxy
679
+ })
680
+ .then((response) => {
693
681
  // Logging
694
682
  this.config.logger.log(
695
683
  'trace',
696
- response.statusCode,
684
+ response.status,
697
685
  'POST',
698
686
  `https://login.${this.config.environment}/oauth/token`,
699
- request.header,
687
+ headers,
700
688
  response.headers,
701
689
  { grant_type: 'client_credentials' },
702
690
  undefined
703
691
  );
704
692
  this.config.logger.log(
705
693
  'debug',
706
- response.statusCode,
694
+ response.status,
707
695
  'POST',
708
696
  `https://login.${this.config.environment}/oauth/token`,
709
- request.header,
697
+ headers,
710
698
  undefined,
711
699
  { grant_type: 'client_credentials' },
712
700
  undefined
713
701
  );
714
702
 
715
703
  // Save access token
716
- this.setAccessToken(response.body['access_token']);
704
+ this.setAccessToken(response.data['access_token']);
717
705
 
718
706
  // Set expiry time
719
- this.authData.tokenExpiryTime = (new Date()).getTime() + (response.body['expires_in'] * 1000);
707
+ this.authData.tokenExpiryTime = (new Date()).getTime() + (response.data['expires_in'] * 1000);
720
708
  this.authData.tokenExpiryTimeString = (new Date(this.authData.tokenExpiryTime)).toUTCString();
721
709
 
722
710
  // Return auth data
723
711
  resolve(this.authData);
724
- }
725
- });
712
+ })
713
+ .catch((error) => {
714
+ // Log error
715
+ if (error.response) {
716
+ this.config.logger.log(
717
+ 'error',
718
+ error.response.status,
719
+ 'POST',
720
+ `https://login.${this.config.environment}/oauth/token`,
721
+ headers,
722
+ error.response.headers,
723
+ { grant_type: 'client_credentials' },
724
+ error.response.data
725
+ );
726
+ }
727
+ reject(error);
728
+ });
726
729
  });
727
730
  }
728
731
 
@@ -745,9 +748,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
745
748
  { grant_type: 'urn:ietf:params:oauth:grant-type:saml2-bearer' },
746
749
  { orgName: orgName },
747
750
  { assertion: assertion });
748
- if (this.proxy && request.proxy) {
749
- request.proxy(this.proxy);
750
- }
751
+ request.proxy = this.proxy;
751
752
  var bodyParam = {
752
753
  grant_type: 'urn:ietf:params:oauth:grant-type:saml2-bearer',
753
754
  orgName: orgName,
@@ -755,54 +756,56 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
755
756
  };
756
757
 
757
758
  // Handle response
758
- request.end((error, response) => {
759
- if (error) {
760
- // Log error
761
- this.config.logger.log(
762
- 'error',
763
- response.statusCode,
764
- 'POST',
765
- `https://login.${this.config.environment}/oauth/token`,
766
- request.header,
767
- response.headers,
768
- bodyParam,
769
- response.body
770
- );
771
- reject(error);
772
- } else {
759
+ request
760
+ .then((response) => {
773
761
  // Logging
774
762
  this.config.logger.log(
775
763
  'trace',
776
- response.statusCode,
764
+ response.status,
777
765
  'POST',
778
766
  `https://login.${this.config.environment}/oauth/token`,
779
- request.header,
767
+ request.headers,
780
768
  response.headers,
781
769
  bodyParam,
782
770
  undefined
783
771
  );
784
772
  this.config.logger.log(
785
773
  'debug',
786
- response.statusCode,
774
+ response.status,
787
775
  'POST',
788
776
  `https://login.${this.config.environment}/oauth/token`,
789
- request.header,
777
+ request.headers,
790
778
  undefined,
791
779
  bodyParam,
792
780
  undefined
793
781
  );
794
782
 
795
783
  // Get access token from response
796
- var access_token = response.body.access_token;
784
+ var access_token = response.data.access_token;
797
785
 
798
786
  this.setAccessToken(access_token);
799
- this.authData.tokenExpiryTime = new Date().getTime() + response.body['expires_in'] * 1000;
787
+ this.authData.tokenExpiryTime = new Date().getTime() + response.data['expires_in'] * 1000;
800
788
  this.authData.tokenExpiryTimeString = new Date(this.authData.tokenExpiryTime).toUTCString();
801
789
 
802
790
  // Return auth data
803
791
  resolve(this.authData);
804
- }
805
- });
792
+ })
793
+ .catch((error) => {
794
+ // Log error
795
+ if (error.response) {
796
+ this.config.logger.log(
797
+ 'error',
798
+ error.response.status,
799
+ 'POST',
800
+ `https://login.${this.config.environment}/oauth/token`,
801
+ request.headers,
802
+ error.response.headers,
803
+ bodyParam,
804
+ error.response.data
805
+ );
806
+ }
807
+ reject(error);
808
+ });
806
809
  });
807
810
  }
808
811
 
@@ -826,9 +829,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
826
829
  { grant_type: 'authorization_code' },
827
830
  { code: authCode },
828
831
  { redirect_uri: redirectUri });
829
- if (this.proxy && request.proxy) {
830
- request.proxy(this.proxy);
831
- }
832
+ request.proxy = this.proxy;
832
833
  var bodyParam = {
833
834
  grant_type: 'authorization_code',
834
835
  code: authCode,
@@ -854,9 +855,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
854
855
  }
855
856
  var encodedData = Buffer.from(clientId + ':' + clientSecret).toString('base64');
856
857
  var request = this._formAuthRequest(encodedData, { grant_type: 'refresh_token' }, { refresh_token: refreshToken });
857
- if (this.proxy && request.proxy) {
858
- request.proxy(this.proxy);
859
- }
858
+ request.proxy = this.proxy;
860
859
  var bodyParam = {
861
860
  grant_type: 'refresh_token',
862
861
  refresh_token: refreshToken,
@@ -874,57 +873,59 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
874
873
  * @param {function} reject - Promise reject callback
875
874
  */
876
875
  _handleCodeAuthorizationResponse(request, bodyParam, resolve, reject) {
877
- request.end((error, response) => {
878
- if (error) {
879
- // Log error
880
- this.config.logger.log(
881
- 'error',
882
- response.statusCode,
883
- 'POST',
884
- `https://login.${this.config.environment}/oauth/token`,
885
- request.header,
886
- response.headers,
887
- bodyParam,
888
- response.body
889
- );
890
-
891
- reject(error);
892
- } else {
876
+ request
877
+ .then((response) => {
893
878
  // Logging
894
879
  this.config.logger.log(
895
880
  'trace',
896
- response.statusCode,
881
+ response.status,
897
882
  'POST',
898
883
  `https://login.${this.config.environment}/oauth/token`,
899
- request.header,
884
+ request.headers,
900
885
  response.headers,
901
886
  bodyParam,
902
887
  undefined
903
888
  );
904
889
  this.config.logger.log(
905
890
  'debug',
906
- response.statusCode,
891
+ response.status,
907
892
  'POST',
908
893
  `https://login.${this.config.environment}/oauth/token`,
909
- request.header,
894
+ request.headers,
910
895
  undefined,
911
896
  bodyParam,
912
897
  undefined
913
898
  );
914
899
 
915
900
  // Get access token from response
916
- var access_token = response.body.access_token;
917
- var refresh_token = response.body.refresh_token;
901
+ var access_token = response.data.access_token;
902
+ var refresh_token = response.data.refresh_token;
918
903
 
919
904
  this.setAccessToken(access_token);
920
905
  this.authData.refreshToken = refresh_token;
921
- this.authData.tokenExpiryTime = new Date().getTime() + response.body['expires_in'] * 1000;
906
+ this.authData.tokenExpiryTime = new Date().getTime() + response.data['expires_in'] * 1000;
922
907
  this.authData.tokenExpiryTimeString = new Date(this.authData.tokenExpiryTime).toUTCString();
923
908
 
924
909
  // Return auth data
925
910
  resolve(this.authData);
926
- }
927
- });
911
+ })
912
+ .catch((error) => {
913
+ // Log error
914
+ if (error.response) {
915
+ this.config.logger.log(
916
+ 'error',
917
+ error.response.status,
918
+ 'POST',
919
+ `https://login.${this.config.environment}/oauth/token`,
920
+ request.headers,
921
+ error.response.headers,
922
+ bodyParam,
923
+ error.response.data
924
+ );
925
+ }
926
+
927
+ reject(error);
928
+ });
928
929
  }
929
930
 
930
931
  /**
@@ -932,15 +933,15 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
932
933
  * @param {string} encodedData - Base64 encoded client and clientSecret pair
933
934
  */
934
935
  _formAuthRequest(encodedData) {
935
- var request = superagent__default["default"]('POST', `https://login.${this.config.environment}/oauth/token`);
936
- // Set the headers
937
- request.set('Authorization', 'Basic ' + encodedData);
938
- request.set('Content-Type', 'application/x-www-form-urlencoded');
939
- // Add form data
940
- request.type('form');
941
- for (var i = 0; i < arguments.length; i++) {
942
- request.send(arguments[i]);
943
- }
936
+ var request = axios__default["default"]({
937
+ method: `POST`,
938
+ url: `https://login.${this.config.environment}/oauth/token`,
939
+ headers: {
940
+ 'Authorization': 'Basic ' + encodedData,
941
+ 'Content-Type': 'application/x-www-form-urlencoded'
942
+ },
943
+ data: arguments
944
+ });
944
945
 
945
946
  return request;
946
947
  }
@@ -1141,6 +1142,36 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1141
1142
  return param.toString();
1142
1143
  }
1143
1144
 
1145
+ /**
1146
+ * Returns query parameters serialized in the format needed for an axios request.
1147
+ * @param param The unserialized query parameters.
1148
+ * @returns {Object} The serialized representation the query parameters.
1149
+ */
1150
+ serialize(obj) {
1151
+ var result = {};
1152
+ for (var p in obj) {
1153
+ if (obj.hasOwnProperty(p)) {
1154
+ result[encodeURIComponent(p)] = Array.isArray(obj[p]) ? obj[p].join(",") : this.paramToString(obj[p]);
1155
+ }
1156
+ }
1157
+ return result
1158
+ }
1159
+
1160
+ /**
1161
+ * Adds headers onto an existing header object (may be empty)
1162
+ * @param existingHeaders The existing header object.
1163
+ * @param newHeaders New headers.
1164
+ * @returns {Object} The combination of all headers.
1165
+ */
1166
+ addHeaders(existingHeaders, ...newHeaders) {
1167
+ if (existingHeaders) {
1168
+ existingHeaders = Object.assign(existingHeaders, ...newHeaders);
1169
+ } else {
1170
+ existingHeaders = Object.assign(...newHeaders);
1171
+ }
1172
+ return existingHeaders;
1173
+ }
1174
+
1144
1175
  /**
1145
1176
  * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
1146
1177
  * NOTE: query parameters are not handled here.
@@ -1267,7 +1298,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1267
1298
  case 'pipes':
1268
1299
  return param.map(this.paramToString).join('|');
1269
1300
  case 'multi':
1270
- // return the array directly as SuperAgent will handle it as expected
1301
+ // return the array directly as axios will handle it as expected
1271
1302
  return param.map(this.paramToString);
1272
1303
  default:
1273
1304
  throw new Error(`Unknown collection format: ${collectionFormat}`);
@@ -1276,7 +1307,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1276
1307
 
1277
1308
  /**
1278
1309
  * Applies authentication headers to the request.
1279
- * @param {Object} request The request object created by a <code>superagent()</code> call.
1310
+ * @param {Object} request The axios request config object.
1280
1311
  * @param {Array.<String>} authNames An array of authentication method names.
1281
1312
  */
1282
1313
  applyAuthToRequest(request, authNames) {
@@ -1285,7 +1316,10 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1285
1316
  switch (auth.type) {
1286
1317
  case 'basic':
1287
1318
  if (auth.username || auth.password) {
1288
- request.auth(auth.username || '', auth.password || '');
1319
+ request.auth = {
1320
+ username: auth.username || '',
1321
+ password: auth.password || ''
1322
+ };
1289
1323
  }
1290
1324
  break;
1291
1325
  case 'apiKey':
@@ -1297,15 +1331,15 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1297
1331
  data[auth.name] = auth.apiKey;
1298
1332
  }
1299
1333
  if (auth['in'] === 'header') {
1300
- request.set(data);
1334
+ request.headers = this.addHeaders(request.headers, data);
1301
1335
  } else {
1302
- request.query(data);
1336
+ request.params = this.serialize(data);
1303
1337
  }
1304
1338
  }
1305
1339
  break;
1306
1340
  case 'oauth2':
1307
1341
  if (auth.accessToken) {
1308
- request.set({'Authorization': `Bearer ${auth.accessToken}`});
1342
+ request.headers = this.addHeaders(request.headers, {'Authorization': `Bearer ${auth.accessToken}`});
1309
1343
  }
1310
1344
  break;
1311
1345
  default:
@@ -1334,86 +1368,71 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1334
1368
  sendRequest(this);
1335
1369
  function sendRequest(that) {
1336
1370
  var url = that.buildUrl(path, pathParams);
1337
- var request = superagent__default["default"](httpMethod, url);
1338
-
1339
- if (that.proxy && request.proxy) {
1340
- request.proxy(that.proxy);
1341
- }
1371
+ var request = {
1372
+ method: httpMethod,
1373
+ url: url,
1374
+ proxy: that.proxy,
1375
+ timeout: that.timeout,
1376
+ params: that.serialize(queryParams)
1377
+ };
1342
1378
 
1343
1379
  // apply authentications
1344
1380
  that.applyAuthToRequest(request, authNames);
1345
1381
 
1346
- // set query parameters
1347
- request.query(that.normalizeParams(queryParams));
1348
-
1349
1382
  // set header parameters
1350
- request.set(that.defaultHeaders).set(that.normalizeParams(headerParams));
1351
- //request.set({ 'purecloud-sdk': '137.0.1' });
1352
-
1353
- // set request timeout
1354
- request.timeout(that.timeout);
1383
+ const defaultHeaders = that.defaultHeaders;
1384
+ const normalizedHeaderParams = that.normalizeParams(headerParams);
1385
+ request.headers = that.addHeaders(request.headers, defaultHeaders, normalizedHeaderParams);
1355
1386
 
1356
1387
  var contentType = that.jsonPreferredMime(contentTypes);
1357
1388
  if (contentType) {
1358
- request.type(contentType);
1359
- } else if (!request.header['Content-Type']) {
1360
- request.type('application/json');
1389
+ request.headers['Content-Type'] = contentType;
1390
+ } else if (!request.headers['Content-Type']) {
1391
+ request.headers['Content-Type'] = 'application/json';
1361
1392
  }
1362
1393
 
1363
1394
  if (contentType === 'application/x-www-form-urlencoded') {
1364
- request.send(that.normalizeParams(formParams));
1395
+ request.data = that.normalizeParams(formParams);
1365
1396
  } else if (contentType == 'multipart/form-data') {
1366
1397
  var _formParams = that.normalizeParams(formParams);
1367
1398
  for (var key in _formParams) {
1368
1399
  if (_formParams.hasOwnProperty(key)) {
1369
- if (that.isFileParam(_formParams[key])) {
1370
- // file field
1371
- request.attach(key, _formParams[key]);
1372
- } else {
1373
- request.field(key, _formParams[key]);
1374
- }
1400
+ // Looks like axios handles files and forms the same way
1401
+ var formData = new FormData();
1402
+ formData.set(key, _formParams[key]);
1403
+ request.data = formData;
1375
1404
  }
1376
1405
  }
1377
1406
  } else if (bodyParam) {
1378
- request.send(bodyParam);
1407
+ request.data = bodyParam;
1379
1408
  }
1380
1409
 
1381
1410
  var accept = that.jsonPreferredMime(accepts);
1382
1411
  if (accept) {
1383
- request.accept(accept);
1412
+ request.headers['Accept'] = accept;
1384
1413
  }
1385
- request.end((error, response) => {
1386
- if (error) {
1387
- if (!response) {
1388
- reject({
1389
- status: 0,
1390
- statusText: 'error',
1391
- headers: [],
1392
- body: {},
1393
- text: 'error',
1394
- error: error
1395
- });
1396
- return;
1397
- }
1398
- }
1399
-
1400
- // Build response object
1401
- var data = (that.returnExtended === true || error) ? {
1402
- status: response.status,
1403
- statusText: response.statusText,
1404
- headers: response.headers,
1405
- body: response.body,
1406
- text: response.text,
1407
- error: error
1408
- } : response.body ? response.body : response.text;
1409
-
1410
- // Debug logging
1411
- that.config.logger.log('trace', response.statusCode, httpMethod, url, request.header, response.headers, bodyParam, undefined);
1412
- that.config.logger.log('debug', response.statusCode, httpMethod, url, request.header, undefined, bodyParam, undefined);
1413
-
1414
- // Resolve promise
1415
- if (error) {
1416
- if (data.status == 401 && that.config.refresh_access_token && that.authData.refreshToken !== "") {
1414
+ axios__default["default"].request(request)
1415
+ .then((response) => {
1416
+ // Build response object
1417
+ var data = (that.returnExtended === true) ? {
1418
+ status: response.status,
1419
+ statusText: response.statusText,
1420
+ headers: response.headers,
1421
+ body: response.data,
1422
+ text: response.text,
1423
+ error: null
1424
+ } : response.data ? response.data : response.text;
1425
+
1426
+ // Debug logging
1427
+ that.config.logger.log('trace', response.status, httpMethod, url, request.headers, response.headers, bodyParam, undefined);
1428
+ that.config.logger.log('debug', response.status, httpMethod, url, request.headers, undefined, bodyParam, undefined);
1429
+
1430
+ // Resolve promise
1431
+ resolve(data);
1432
+ })
1433
+ .catch((error) => {
1434
+ var data = error;
1435
+ if (error.response && error.response.status == 401 && that.config.refresh_access_token && that.authData.refreshToken !== "") {
1417
1436
  that._handleExpiredAccessToken()
1418
1437
  .then(() => {
1419
1438
  sendRequest(that);
@@ -1421,24 +1440,29 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1421
1440
  .catch((err) => {
1422
1441
  reject(err);
1423
1442
  });
1424
- } else {
1443
+ } else if (error.response) {
1425
1444
  // Log error
1426
1445
  that.config.logger.log(
1427
1446
  'error',
1428
- response.statusCode,
1447
+ error.response.status,
1429
1448
  httpMethod,
1430
1449
  url,
1431
- request.header,
1432
- response.headers,
1450
+ request.headers,
1451
+ error.response.headers,
1433
1452
  bodyParam,
1434
- response.body
1453
+ error.response.data
1435
1454
  );
1436
- reject(data);
1455
+ data = (that.returnExtended === true) ? {
1456
+ status: error.response.status,
1457
+ statusText: error.response.statusText,
1458
+ headers: error.response.headers,
1459
+ body: error.response.data,
1460
+ text: error.response.text,
1461
+ error: error
1462
+ } : error.response.data ? error.response.data : error.response.text;
1437
1463
  }
1438
- } else {
1439
- resolve(data);
1440
- }
1441
- });
1464
+ reject(data);
1465
+ });
1442
1466
  }
1443
1467
  });
1444
1468
  }
@@ -1448,7 +1472,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1448
1472
  /**
1449
1473
  * Alerting service.
1450
1474
  * @module purecloud-platform-client-v2/api/AlertingApi
1451
- * @version 137.0.1
1475
+ * @version 137.1.0
1452
1476
  */
1453
1477
 
1454
1478
  /**
@@ -1762,7 +1786,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
1762
1786
  /**
1763
1787
  * Analytics service.
1764
1788
  * @module purecloud-platform-client-v2/api/AnalyticsApi
1765
- * @version 137.0.1
1789
+ * @version 137.1.0
1766
1790
  */
1767
1791
 
1768
1792
  /**
@@ -2944,7 +2968,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
2944
2968
  /**
2945
2969
  * Architect service.
2946
2970
  * @module purecloud-platform-client-v2/api/ArchitectApi
2947
- * @version 137.0.1
2971
+ * @version 137.1.0
2948
2972
  */
2949
2973
 
2950
2974
  /**
@@ -5989,7 +6013,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
5989
6013
  /**
5990
6014
  * Audit service.
5991
6015
  * @module purecloud-platform-client-v2/api/AuditApi
5992
- * @version 137.0.1
6016
+ * @version 137.1.0
5993
6017
  */
5994
6018
 
5995
6019
  /**
@@ -6160,7 +6184,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
6160
6184
  /**
6161
6185
  * Authorization service.
6162
6186
  * @module purecloud-platform-client-v2/api/AuthorizationApi
6163
- * @version 137.0.1
6187
+ * @version 137.1.0
6164
6188
  */
6165
6189
 
6166
6190
  /**
@@ -7343,7 +7367,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
7343
7367
  /**
7344
7368
  * Billing service.
7345
7369
  * @module purecloud-platform-client-v2/api/BillingApi
7346
- * @version 137.0.1
7370
+ * @version 137.1.0
7347
7371
  */
7348
7372
 
7349
7373
  /**
@@ -7423,7 +7447,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
7423
7447
  /**
7424
7448
  * Chat service.
7425
7449
  * @module purecloud-platform-client-v2/api/ChatApi
7426
- * @version 137.0.1
7450
+ * @version 137.1.0
7427
7451
  */
7428
7452
 
7429
7453
  /**
@@ -7514,7 +7538,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
7514
7538
  /**
7515
7539
  * Coaching service.
7516
7540
  * @module purecloud-platform-client-v2/api/CoachingApi
7517
- * @version 137.0.1
7541
+ * @version 137.1.0
7518
7542
  */
7519
7543
 
7520
7544
  /**
@@ -8091,7 +8115,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
8091
8115
  /**
8092
8116
  * ContentManagement service.
8093
8117
  * @module purecloud-platform-client-v2/api/ContentManagementApi
8094
- * @version 137.0.1
8118
+ * @version 137.1.0
8095
8119
  */
8096
8120
 
8097
8121
  /**
@@ -9231,7 +9255,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
9231
9255
  /**
9232
9256
  * Conversations service.
9233
9257
  * @module purecloud-platform-client-v2/api/ConversationsApi
9234
- * @version 137.0.1
9258
+ * @version 137.1.0
9235
9259
  */
9236
9260
 
9237
9261
  /**
@@ -13895,7 +13919,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
13895
13919
  /**
13896
13920
  * DataExtensions service.
13897
13921
  * @module purecloud-platform-client-v2/api/DataExtensionsApi
13898
- * @version 137.0.1
13922
+ * @version 137.1.0
13899
13923
  */
13900
13924
 
13901
13925
  /**
@@ -13981,7 +14005,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
13981
14005
  /**
13982
14006
  * ExternalContacts service.
13983
14007
  * @module purecloud-platform-client-v2/api/ExternalContactsApi
13984
- * @version 137.0.1
14008
+ * @version 137.1.0
13985
14009
  */
13986
14010
 
13987
14011
  /**
@@ -15724,7 +15748,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
15724
15748
  /**
15725
15749
  * Fax service.
15726
15750
  * @module purecloud-platform-client-v2/api/FaxApi
15727
- * @version 137.0.1
15751
+ * @version 137.1.0
15728
15752
  */
15729
15753
 
15730
15754
  /**
@@ -15895,7 +15919,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
15895
15919
  /**
15896
15920
  * Flows service.
15897
15921
  * @module purecloud-platform-client-v2/api/FlowsApi
15898
- * @version 137.0.1
15922
+ * @version 137.1.0
15899
15923
  */
15900
15924
 
15901
15925
  /**
@@ -15966,7 +15990,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
15966
15990
  /**
15967
15991
  * Gamification service.
15968
15992
  * @module purecloud-platform-client-v2/api/GamificationApi
15969
- * @version 137.0.1
15993
+ * @version 137.1.0
15970
15994
  */
15971
15995
 
15972
15996
  /**
@@ -17396,7 +17420,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
17396
17420
  /**
17397
17421
  * GeneralDataProtectionRegulation service.
17398
17422
  * @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
17399
- * @version 137.0.1
17423
+ * @version 137.1.0
17400
17424
  */
17401
17425
 
17402
17426
  /**
@@ -17526,7 +17550,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
17526
17550
  /**
17527
17551
  * Geolocation service.
17528
17552
  * @module purecloud-platform-client-v2/api/GeolocationApi
17529
- * @version 137.0.1
17553
+ * @version 137.1.0
17530
17554
  */
17531
17555
 
17532
17556
  /**
@@ -17657,7 +17681,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
17657
17681
  /**
17658
17682
  * Greetings service.
17659
17683
  * @module purecloud-platform-client-v2/api/GreetingsApi
17660
- * @version 137.0.1
17684
+ * @version 137.1.0
17661
17685
  */
17662
17686
 
17663
17687
  /**
@@ -18112,7 +18136,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
18112
18136
  /**
18113
18137
  * Groups service.
18114
18138
  * @module purecloud-platform-client-v2/api/GroupsApi
18115
- * @version 137.0.1
18139
+ * @version 137.1.0
18116
18140
  */
18117
18141
 
18118
18142
  /**
@@ -18517,7 +18541,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
18517
18541
  /**
18518
18542
  * IdentityProvider service.
18519
18543
  * @module purecloud-platform-client-v2/api/IdentityProviderApi
18520
- * @version 137.0.1
18544
+ * @version 137.1.0
18521
18545
  */
18522
18546
 
18523
18547
  /**
@@ -19273,7 +19297,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
19273
19297
  /**
19274
19298
  * Integrations service.
19275
19299
  * @module purecloud-platform-client-v2/api/IntegrationsApi
19276
- * @version 137.0.1
19300
+ * @version 137.1.0
19277
19301
  */
19278
19302
 
19279
19303
  /**
@@ -20950,7 +20974,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
20950
20974
  /**
20951
20975
  * Journey service.
20952
20976
  * @module purecloud-platform-client-v2/api/JourneyApi
20953
- * @version 137.0.1
20977
+ * @version 137.1.0
20954
20978
  */
20955
20979
 
20956
20980
  /**
@@ -21661,7 +21685,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
21661
21685
  /**
21662
21686
  * Knowledge service.
21663
21687
  * @module purecloud-platform-client-v2/api/KnowledgeApi
21664
- * @version 137.0.1
21688
+ * @version 137.1.0
21665
21689
  */
21666
21690
 
21667
21691
  /**
@@ -22561,7 +22585,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
22561
22585
  /**
22562
22586
  * LanguageUnderstanding service.
22563
22587
  * @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
22564
- * @version 137.0.1
22588
+ * @version 137.1.0
22565
22589
  */
22566
22590
 
22567
22591
  /**
@@ -23465,7 +23489,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
23465
23489
  /**
23466
23490
  * Languages service.
23467
23491
  * @module purecloud-platform-client-v2/api/LanguagesApi
23468
- * @version 137.0.1
23492
+ * @version 137.1.0
23469
23493
  */
23470
23494
 
23471
23495
  /**
@@ -23733,7 +23757,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
23733
23757
  /**
23734
23758
  * Learning service.
23735
23759
  * @module purecloud-platform-client-v2/api/LearningApi
23736
- * @version 137.0.1
23760
+ * @version 137.1.0
23737
23761
  */
23738
23762
 
23739
23763
  /**
@@ -24324,7 +24348,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
24324
24348
  /**
24325
24349
  * License service.
24326
24350
  * @module purecloud-platform-client-v2/api/LicenseApi
24327
- * @version 137.0.1
24351
+ * @version 137.1.0
24328
24352
  */
24329
24353
 
24330
24354
  /**
@@ -24562,7 +24586,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
24562
24586
  /**
24563
24587
  * Locations service.
24564
24588
  * @module purecloud-platform-client-v2/api/LocationsApi
24565
- * @version 137.0.1
24589
+ * @version 137.1.0
24566
24590
  */
24567
24591
 
24568
24592
  /**
@@ -24798,7 +24822,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
24798
24822
  /**
24799
24823
  * Messaging service.
24800
24824
  * @module purecloud-platform-client-v2/api/MessagingApi
24801
- * @version 137.0.1
24825
+ * @version 137.1.0
24802
24826
  */
24803
24827
 
24804
24828
  /**
@@ -24949,7 +24973,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
24949
24973
  /**
24950
24974
  * MobileDevices service.
24951
24975
  * @module purecloud-platform-client-v2/api/MobileDevicesApi
24952
- * @version 137.0.1
24976
+ * @version 137.1.0
24953
24977
  */
24954
24978
 
24955
24979
  /**
@@ -25100,7 +25124,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
25100
25124
  /**
25101
25125
  * Notifications service.
25102
25126
  * @module purecloud-platform-client-v2/api/NotificationsApi
25103
- * @version 137.0.1
25127
+ * @version 137.1.0
25104
25128
  */
25105
25129
 
25106
25130
  /**
@@ -25325,7 +25349,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
25325
25349
  /**
25326
25350
  * OAuth service.
25327
25351
  * @module purecloud-platform-client-v2/api/OAuthApi
25328
- * @version 137.0.1
25352
+ * @version 137.1.0
25329
25353
  */
25330
25354
 
25331
25355
  /**
@@ -25691,7 +25715,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
25691
25715
  /**
25692
25716
  * Objects service.
25693
25717
  * @module purecloud-platform-client-v2/api/ObjectsApi
25694
- * @version 137.0.1
25718
+ * @version 137.1.0
25695
25719
  */
25696
25720
 
25697
25721
  /**
@@ -25962,7 +25986,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
25962
25986
  /**
25963
25987
  * Organization service.
25964
25988
  * @module purecloud-platform-client-v2/api/OrganizationApi
25965
- * @version 137.0.1
25989
+ * @version 137.1.0
25966
25990
  */
25967
25991
 
25968
25992
  /**
@@ -26365,7 +26389,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
26365
26389
  /**
26366
26390
  * OrganizationAuthorization service.
26367
26391
  * @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
26368
- * @version 137.0.1
26392
+ * @version 137.1.0
26369
26393
  */
26370
26394
 
26371
26395
  /**
@@ -27290,7 +27314,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
27290
27314
  /**
27291
27315
  * Outbound service.
27292
27316
  * @module purecloud-platform-client-v2/api/OutboundApi
27293
- * @version 137.0.1
27317
+ * @version 137.1.0
27294
27318
  */
27295
27319
 
27296
27320
  /**
@@ -30545,7 +30569,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
30545
30569
  /**
30546
30570
  * Presence service.
30547
30571
  * @module purecloud-platform-client-v2/api/PresenceApi
30548
- * @version 137.0.1
30572
+ * @version 137.1.0
30549
30573
  */
30550
30574
 
30551
30575
  /**
@@ -30867,7 +30891,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
30867
30891
  /**
30868
30892
  * Quality service.
30869
30893
  * @module purecloud-platform-client-v2/api/QualityApi
30870
- * @version 137.0.1
30894
+ * @version 137.1.0
30871
30895
  */
30872
30896
 
30873
30897
  /**
@@ -32445,7 +32469,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
32445
32469
  /**
32446
32470
  * Recording service.
32447
32471
  * @module purecloud-platform-client-v2/api/RecordingApi
32448
- * @version 137.0.1
32472
+ * @version 137.1.0
32449
32473
  */
32450
32474
 
32451
32475
  /**
@@ -34098,7 +34122,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
34098
34122
  /**
34099
34123
  * ResponseManagement service.
34100
34124
  * @module purecloud-platform-client-v2/api/ResponseManagementApi
34101
- * @version 137.0.1
34125
+ * @version 137.1.0
34102
34126
  */
34103
34127
 
34104
34128
  /**
@@ -34582,7 +34606,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
34582
34606
  /**
34583
34607
  * Routing service.
34584
34608
  * @module purecloud-platform-client-v2/api/RoutingApi
34585
- * @version 137.0.1
34609
+ * @version 137.1.0
34586
34610
  */
34587
34611
 
34588
34612
  /**
@@ -37509,7 +37533,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
37509
37533
  /**
37510
37534
  * SCIM service.
37511
37535
  * @module purecloud-platform-client-v2/api/SCIMApi
37512
- * @version 137.0.1
37536
+ * @version 137.1.0
37513
37537
  */
37514
37538
 
37515
37539
  /**
@@ -38386,7 +38410,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
38386
38410
  /**
38387
38411
  * Scripts service.
38388
38412
  * @module purecloud-platform-client-v2/api/ScriptsApi
38389
- * @version 137.0.1
38413
+ * @version 137.1.0
38390
38414
  */
38391
38415
 
38392
38416
  /**
@@ -38805,7 +38829,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
38805
38829
  /**
38806
38830
  * Search service.
38807
38831
  * @module purecloud-platform-client-v2/api/SearchApi
38808
- * @version 137.0.1
38832
+ * @version 137.1.0
38809
38833
  */
38810
38834
 
38811
38835
  /**
@@ -39340,7 +39364,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
39340
39364
  /**
39341
39365
  * SpeechTextAnalytics service.
39342
39366
  * @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
39343
- * @version 137.0.1
39367
+ * @version 137.1.0
39344
39368
  */
39345
39369
 
39346
39370
  /**
@@ -40193,7 +40217,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
40193
40217
  /**
40194
40218
  * Stations service.
40195
40219
  * @module purecloud-platform-client-v2/api/StationsApi
40196
- * @version 137.0.1
40220
+ * @version 137.1.0
40197
40221
  */
40198
40222
 
40199
40223
  /**
@@ -40340,7 +40364,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
40340
40364
  /**
40341
40365
  * Suggest service.
40342
40366
  * @module purecloud-platform-client-v2/api/SuggestApi
40343
- * @version 137.0.1
40367
+ * @version 137.1.0
40344
40368
  */
40345
40369
 
40346
40370
  /**
@@ -40479,7 +40503,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
40479
40503
  /**
40480
40504
  * Telephony service.
40481
40505
  * @module purecloud-platform-client-v2/api/TelephonyApi
40482
- * @version 137.0.1
40506
+ * @version 137.1.0
40483
40507
  */
40484
40508
 
40485
40509
  /**
@@ -40587,7 +40611,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
40587
40611
  /**
40588
40612
  * TelephonyProvidersEdge service.
40589
40613
  * @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
40590
- * @version 137.0.1
40614
+ * @version 137.1.0
40591
40615
  */
40592
40616
 
40593
40617
  /**
@@ -44220,7 +44244,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
44220
44244
  /**
44221
44245
  * Textbots service.
44222
44246
  * @module purecloud-platform-client-v2/api/TextbotsApi
44223
- * @version 137.0.1
44247
+ * @version 137.1.0
44224
44248
  */
44225
44249
 
44226
44250
  /**
@@ -44348,7 +44372,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
44348
44372
  /**
44349
44373
  * Tokens service.
44350
44374
  * @module purecloud-platform-client-v2/api/TokensApi
44351
- * @version 137.0.1
44375
+ * @version 137.1.0
44352
44376
  */
44353
44377
 
44354
44378
  /**
@@ -44454,7 +44478,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
44454
44478
  /**
44455
44479
  * Uploads service.
44456
44480
  * @module purecloud-platform-client-v2/api/UploadsApi
44457
- * @version 137.0.1
44481
+ * @version 137.1.0
44458
44482
  */
44459
44483
 
44460
44484
  /**
@@ -44605,7 +44629,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
44605
44629
  /**
44606
44630
  * Usage service.
44607
44631
  * @module purecloud-platform-client-v2/api/UsageApi
44608
- * @version 137.0.1
44632
+ * @version 137.1.0
44609
44633
  */
44610
44634
 
44611
44635
  /**
@@ -44676,7 +44700,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
44676
44700
  /**
44677
44701
  * UserRecordings service.
44678
44702
  * @module purecloud-platform-client-v2/api/UserRecordingsApi
44679
- * @version 137.0.1
44703
+ * @version 137.1.0
44680
44704
  */
44681
44705
 
44682
44706
  /**
@@ -44860,7 +44884,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
44860
44884
  /**
44861
44885
  * Users service.
44862
44886
  * @module purecloud-platform-client-v2/api/UsersApi
44863
- * @version 137.0.1
44887
+ * @version 137.1.0
44864
44888
  */
44865
44889
 
44866
44890
  /**
@@ -47162,7 +47186,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
47162
47186
  /**
47163
47187
  * Utilities service.
47164
47188
  * @module purecloud-platform-client-v2/api/UtilitiesApi
47165
- * @version 137.0.1
47189
+ * @version 137.1.0
47166
47190
  */
47167
47191
 
47168
47192
  /**
@@ -47273,7 +47297,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
47273
47297
  /**
47274
47298
  * Voicemail service.
47275
47299
  * @module purecloud-platform-client-v2/api/VoicemailApi
47276
- * @version 137.0.1
47300
+ * @version 137.1.0
47277
47301
  */
47278
47302
 
47279
47303
  /**
@@ -47940,7 +47964,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
47940
47964
  /**
47941
47965
  * WebChat service.
47942
47966
  * @module purecloud-platform-client-v2/api/WebChatApi
47943
- * @version 137.0.1
47967
+ * @version 137.1.0
47944
47968
  */
47945
47969
 
47946
47970
  /**
@@ -48484,7 +48508,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
48484
48508
  /**
48485
48509
  * WebDeployments service.
48486
48510
  * @module purecloud-platform-client-v2/api/WebDeploymentsApi
48487
- * @version 137.0.1
48511
+ * @version 137.1.0
48488
48512
  */
48489
48513
 
48490
48514
  /**
@@ -48839,7 +48863,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
48839
48863
  /**
48840
48864
  * WebMessaging service.
48841
48865
  * @module purecloud-platform-client-v2/api/WebMessagingApi
48842
- * @version 137.0.1
48866
+ * @version 137.1.0
48843
48867
  */
48844
48868
 
48845
48869
  /**
@@ -48885,7 +48909,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
48885
48909
  /**
48886
48910
  * Widgets service.
48887
48911
  * @module purecloud-platform-client-v2/api/WidgetsApi
48888
- * @version 137.0.1
48912
+ * @version 137.1.0
48889
48913
  */
48890
48914
 
48891
48915
  /**
@@ -49031,7 +49055,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
49031
49055
  /**
49032
49056
  * WorkforceManagement service.
49033
49057
  * @module purecloud-platform-client-v2/api/WorkforceManagementApi
49034
- * @version 137.0.1
49058
+ * @version 137.1.0
49035
49059
  */
49036
49060
 
49037
49061
  /**
@@ -53282,7 +53306,7 @@ ${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.form
53282
53306
  * </pre>
53283
53307
  * </p>
53284
53308
  * @module purecloud-platform-client-v2/index
53285
- * @version 137.0.1
53309
+ * @version 137.1.0
53286
53310
  */
53287
53311
  class platformClient {
53288
53312
  constructor() {