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.
- package/README.md +9 -12
- package/dist/node/purecloud-platform-client-v2.js +277 -253
- package/dist/web-amd/purecloud-platform-client-v2.js +277 -253
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +277 -253
- package/dist/web-cjs/purecloud-platform-client-v2.js +2067 -4480
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/purecloud-platform-client-v2/ApiClient.js +195 -176
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/index.js +1 -1
- package/src/purecloud-platform-client-v2/logger.js +17 -13
package/dist/web-cjs/bundle.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var axios = require('axios');
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
8
8
|
|
|
9
9
|
var PureCloudRegionHosts = {
|
|
10
10
|
us_east_1: 'mypurecloud.com',
|
|
@@ -2068,34 +2068,38 @@ class Logger {
|
|
|
2068
2068
|
|
|
2069
2069
|
formatLog(level, statusCode, method, url, requestHeaders, responseHeaders, requestBody, responseBody) {
|
|
2070
2070
|
var result;
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2071
|
+
var localRequestHeaders = requestHeaders ? JSON.parse(JSON.stringify(requestHeaders)) : null;
|
|
2072
|
+
var localResponseHeaders = responseHeaders ? JSON.parse(JSON.stringify(responseHeaders)) : null;
|
|
2073
|
+
var localRequestBody = requestBody ? JSON.parse(JSON.stringify(requestBody)) : null;
|
|
2074
|
+
var localResponseBody = responseBody ? JSON.parse(JSON.stringify(responseBody)) : null;
|
|
2075
|
+
if (requestHeaders) localRequestHeaders['Authorization'] = '[REDACTED]';
|
|
2076
|
+
if (!this.log_request_body) localRequestBody = undefined;
|
|
2077
|
+
if (!this.log_response_body) localResponseBody = undefined;
|
|
2074
2078
|
if (this.log_format && this.log_format === logFormatEnum.formats.JSON) {
|
|
2075
2079
|
result = {
|
|
2076
2080
|
level: level,
|
|
2077
2081
|
date: new Date().toISOString(),
|
|
2078
2082
|
method: method,
|
|
2079
2083
|
url: decodeURIComponent(url),
|
|
2080
|
-
correlationId:
|
|
2084
|
+
correlationId: localResponseHeaders ? (localResponseHeaders['inin-correlation-id'] ? localResponseHeaders['inin-correlation-id'] : '') : '',
|
|
2081
2085
|
statusCode: statusCode,
|
|
2082
2086
|
};
|
|
2083
|
-
if (
|
|
2084
|
-
if (
|
|
2085
|
-
if (
|
|
2086
|
-
if (
|
|
2087
|
+
if (localRequestHeaders) result.requestHeaders = localRequestHeaders;
|
|
2088
|
+
if (localResponseHeaders) result.responseHeaders = localResponseHeaders;
|
|
2089
|
+
if (localRequestBody) result.requestBody = localRequestBody;
|
|
2090
|
+
if (localResponseBody) result.responseBody = localResponseBody;
|
|
2087
2091
|
} else {
|
|
2088
2092
|
result = `${new Date().toISOString()}
|
|
2089
2093
|
=== REQUEST ===
|
|
2090
2094
|
${this.formatValue('URL', decodeURIComponent(url))}${this.formatValue('Method', method)}${this.formatValue(
|
|
2091
2095
|
'Headers',
|
|
2092
|
-
this.formatHeaderString(
|
|
2093
|
-
)}${this.formatValue('Body',
|
|
2096
|
+
this.formatHeaderString(localRequestHeaders)
|
|
2097
|
+
)}${this.formatValue('Body', localRequestBody ? JSON.stringify(localRequestBody, null, 2) : '')}
|
|
2094
2098
|
=== RESPONSE ===
|
|
2095
|
-
${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.formatHeaderString(
|
|
2099
|
+
${this.formatValue('Status', statusCode)}${this.formatValue('Headers', this.formatHeaderString(localResponseHeaders))}${this.formatValue(
|
|
2096
2100
|
'CorrelationId',
|
|
2097
|
-
|
|
2098
|
-
)}${this.formatValue('Body',
|
|
2101
|
+
localResponseHeaders ? (localResponseHeaders['inin-correlation-id'] ? localResponseHeaders['inin-correlation-id'] : '') : ''
|
|
2102
|
+
)}${this.formatValue('Body', localResponseBody ? JSON.stringify(localResponseBody, null, 2) : '')}`;
|
|
2099
2103
|
}
|
|
2100
2104
|
|
|
2101
2105
|
return result;
|
|
@@ -2272,7 +2276,7 @@ class Configuration {
|
|
|
2272
2276
|
|
|
2273
2277
|
/**
|
|
2274
2278
|
* @module purecloud-platform-client-v2/ApiClient
|
|
2275
|
-
* @version 137.0
|
|
2279
|
+
* @version 137.1.0
|
|
2276
2280
|
*/
|
|
2277
2281
|
class ApiClient {
|
|
2278
2282
|
/**
|
|
@@ -2374,9 +2378,6 @@ class ApiClient {
|
|
|
2374
2378
|
this.authData = {};
|
|
2375
2379
|
this.settingsPrefix = 'purecloud';
|
|
2376
2380
|
|
|
2377
|
-
// Expose superagent module for use with superagent-proxy
|
|
2378
|
-
this.superagent = superagent__default["default"];
|
|
2379
|
-
|
|
2380
2381
|
// Transparently request a new access token when it expires (Code Authorization only)
|
|
2381
2382
|
this.refreshInProgress = false;
|
|
2382
2383
|
|
|
@@ -2545,63 +2546,65 @@ class ApiClient {
|
|
|
2545
2546
|
return;
|
|
2546
2547
|
}
|
|
2547
2548
|
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
// Log error
|
|
2560
|
-
this.config.logger.log(
|
|
2561
|
-
'error',
|
|
2562
|
-
response.statusCode,
|
|
2563
|
-
'POST',
|
|
2564
|
-
`https://login.${this.config.environment}/oauth/token`,
|
|
2565
|
-
request.header,
|
|
2566
|
-
response.headers,
|
|
2567
|
-
{ grant_type: 'client_credentials' },
|
|
2568
|
-
response.body
|
|
2569
|
-
);
|
|
2570
|
-
reject(error);
|
|
2571
|
-
} else {
|
|
2549
|
+
const headers = {
|
|
2550
|
+
'Authorization': `Basic ${authHeader}`
|
|
2551
|
+
};
|
|
2552
|
+
axios__default["default"]({
|
|
2553
|
+
method: `POST`,
|
|
2554
|
+
url: `https://login.${this.config.environment}/oauth/token`,
|
|
2555
|
+
headers: headers,
|
|
2556
|
+
data: 'grant_type=client_credentials',
|
|
2557
|
+
proxy: this.proxy
|
|
2558
|
+
})
|
|
2559
|
+
.then((response) => {
|
|
2572
2560
|
// Logging
|
|
2573
2561
|
this.config.logger.log(
|
|
2574
2562
|
'trace',
|
|
2575
|
-
response.
|
|
2563
|
+
response.status,
|
|
2576
2564
|
'POST',
|
|
2577
2565
|
`https://login.${this.config.environment}/oauth/token`,
|
|
2578
|
-
|
|
2566
|
+
headers,
|
|
2579
2567
|
response.headers,
|
|
2580
2568
|
{ grant_type: 'client_credentials' },
|
|
2581
2569
|
undefined
|
|
2582
2570
|
);
|
|
2583
2571
|
this.config.logger.log(
|
|
2584
2572
|
'debug',
|
|
2585
|
-
response.
|
|
2573
|
+
response.status,
|
|
2586
2574
|
'POST',
|
|
2587
2575
|
`https://login.${this.config.environment}/oauth/token`,
|
|
2588
|
-
|
|
2576
|
+
headers,
|
|
2589
2577
|
undefined,
|
|
2590
2578
|
{ grant_type: 'client_credentials' },
|
|
2591
2579
|
undefined
|
|
2592
2580
|
);
|
|
2593
2581
|
|
|
2594
2582
|
// Save access token
|
|
2595
|
-
this.setAccessToken(response.
|
|
2583
|
+
this.setAccessToken(response.data['access_token']);
|
|
2596
2584
|
|
|
2597
2585
|
// Set expiry time
|
|
2598
|
-
this.authData.tokenExpiryTime = (new Date()).getTime() + (response.
|
|
2586
|
+
this.authData.tokenExpiryTime = (new Date()).getTime() + (response.data['expires_in'] * 1000);
|
|
2599
2587
|
this.authData.tokenExpiryTimeString = (new Date(this.authData.tokenExpiryTime)).toUTCString();
|
|
2600
2588
|
|
|
2601
2589
|
// Return auth data
|
|
2602
2590
|
resolve(this.authData);
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2591
|
+
})
|
|
2592
|
+
.catch((error) => {
|
|
2593
|
+
// Log error
|
|
2594
|
+
if (error.response) {
|
|
2595
|
+
this.config.logger.log(
|
|
2596
|
+
'error',
|
|
2597
|
+
error.response.status,
|
|
2598
|
+
'POST',
|
|
2599
|
+
`https://login.${this.config.environment}/oauth/token`,
|
|
2600
|
+
headers,
|
|
2601
|
+
error.response.headers,
|
|
2602
|
+
{ grant_type: 'client_credentials' },
|
|
2603
|
+
error.response.data
|
|
2604
|
+
);
|
|
2605
|
+
}
|
|
2606
|
+
reject(error);
|
|
2607
|
+
});
|
|
2605
2608
|
});
|
|
2606
2609
|
}
|
|
2607
2610
|
|
|
@@ -2624,9 +2627,7 @@ class ApiClient {
|
|
|
2624
2627
|
{ grant_type: 'urn:ietf:params:oauth:grant-type:saml2-bearer' },
|
|
2625
2628
|
{ orgName: orgName },
|
|
2626
2629
|
{ assertion: assertion });
|
|
2627
|
-
|
|
2628
|
-
request.proxy(this.proxy);
|
|
2629
|
-
}
|
|
2630
|
+
request.proxy = this.proxy;
|
|
2630
2631
|
var bodyParam = {
|
|
2631
2632
|
grant_type: 'urn:ietf:params:oauth:grant-type:saml2-bearer',
|
|
2632
2633
|
orgName: orgName,
|
|
@@ -2634,54 +2635,56 @@ class ApiClient {
|
|
|
2634
2635
|
};
|
|
2635
2636
|
|
|
2636
2637
|
// Handle response
|
|
2637
|
-
request
|
|
2638
|
-
|
|
2639
|
-
// Log error
|
|
2640
|
-
this.config.logger.log(
|
|
2641
|
-
'error',
|
|
2642
|
-
response.statusCode,
|
|
2643
|
-
'POST',
|
|
2644
|
-
`https://login.${this.config.environment}/oauth/token`,
|
|
2645
|
-
request.header,
|
|
2646
|
-
response.headers,
|
|
2647
|
-
bodyParam,
|
|
2648
|
-
response.body
|
|
2649
|
-
);
|
|
2650
|
-
reject(error);
|
|
2651
|
-
} else {
|
|
2638
|
+
request
|
|
2639
|
+
.then((response) => {
|
|
2652
2640
|
// Logging
|
|
2653
2641
|
this.config.logger.log(
|
|
2654
2642
|
'trace',
|
|
2655
|
-
response.
|
|
2643
|
+
response.status,
|
|
2656
2644
|
'POST',
|
|
2657
2645
|
`https://login.${this.config.environment}/oauth/token`,
|
|
2658
|
-
request.
|
|
2646
|
+
request.headers,
|
|
2659
2647
|
response.headers,
|
|
2660
2648
|
bodyParam,
|
|
2661
2649
|
undefined
|
|
2662
2650
|
);
|
|
2663
2651
|
this.config.logger.log(
|
|
2664
2652
|
'debug',
|
|
2665
|
-
response.
|
|
2653
|
+
response.status,
|
|
2666
2654
|
'POST',
|
|
2667
2655
|
`https://login.${this.config.environment}/oauth/token`,
|
|
2668
|
-
request.
|
|
2656
|
+
request.headers,
|
|
2669
2657
|
undefined,
|
|
2670
2658
|
bodyParam,
|
|
2671
2659
|
undefined
|
|
2672
2660
|
);
|
|
2673
2661
|
|
|
2674
2662
|
// Get access token from response
|
|
2675
|
-
var access_token = response.
|
|
2663
|
+
var access_token = response.data.access_token;
|
|
2676
2664
|
|
|
2677
2665
|
this.setAccessToken(access_token);
|
|
2678
|
-
this.authData.tokenExpiryTime = new Date().getTime() + response.
|
|
2666
|
+
this.authData.tokenExpiryTime = new Date().getTime() + response.data['expires_in'] * 1000;
|
|
2679
2667
|
this.authData.tokenExpiryTimeString = new Date(this.authData.tokenExpiryTime).toUTCString();
|
|
2680
2668
|
|
|
2681
2669
|
// Return auth data
|
|
2682
2670
|
resolve(this.authData);
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2671
|
+
})
|
|
2672
|
+
.catch((error) => {
|
|
2673
|
+
// Log error
|
|
2674
|
+
if (error.response) {
|
|
2675
|
+
this.config.logger.log(
|
|
2676
|
+
'error',
|
|
2677
|
+
error.response.status,
|
|
2678
|
+
'POST',
|
|
2679
|
+
`https://login.${this.config.environment}/oauth/token`,
|
|
2680
|
+
request.headers,
|
|
2681
|
+
error.response.headers,
|
|
2682
|
+
bodyParam,
|
|
2683
|
+
error.response.data
|
|
2684
|
+
);
|
|
2685
|
+
}
|
|
2686
|
+
reject(error);
|
|
2687
|
+
});
|
|
2685
2688
|
});
|
|
2686
2689
|
}
|
|
2687
2690
|
|
|
@@ -2705,9 +2708,7 @@ class ApiClient {
|
|
|
2705
2708
|
{ grant_type: 'authorization_code' },
|
|
2706
2709
|
{ code: authCode },
|
|
2707
2710
|
{ redirect_uri: redirectUri });
|
|
2708
|
-
|
|
2709
|
-
request.proxy(this.proxy);
|
|
2710
|
-
}
|
|
2711
|
+
request.proxy = this.proxy;
|
|
2711
2712
|
var bodyParam = {
|
|
2712
2713
|
grant_type: 'authorization_code',
|
|
2713
2714
|
code: authCode,
|
|
@@ -2733,9 +2734,7 @@ class ApiClient {
|
|
|
2733
2734
|
}
|
|
2734
2735
|
var encodedData = Buffer.from(clientId + ':' + clientSecret).toString('base64');
|
|
2735
2736
|
var request = this._formAuthRequest(encodedData, { grant_type: 'refresh_token' }, { refresh_token: refreshToken });
|
|
2736
|
-
|
|
2737
|
-
request.proxy(this.proxy);
|
|
2738
|
-
}
|
|
2737
|
+
request.proxy = this.proxy;
|
|
2739
2738
|
var bodyParam = {
|
|
2740
2739
|
grant_type: 'refresh_token',
|
|
2741
2740
|
refresh_token: refreshToken,
|
|
@@ -2753,57 +2752,59 @@ class ApiClient {
|
|
|
2753
2752
|
* @param {function} reject - Promise reject callback
|
|
2754
2753
|
*/
|
|
2755
2754
|
_handleCodeAuthorizationResponse(request, bodyParam, resolve, reject) {
|
|
2756
|
-
request
|
|
2757
|
-
|
|
2758
|
-
// Log error
|
|
2759
|
-
this.config.logger.log(
|
|
2760
|
-
'error',
|
|
2761
|
-
response.statusCode,
|
|
2762
|
-
'POST',
|
|
2763
|
-
`https://login.${this.config.environment}/oauth/token`,
|
|
2764
|
-
request.header,
|
|
2765
|
-
response.headers,
|
|
2766
|
-
bodyParam,
|
|
2767
|
-
response.body
|
|
2768
|
-
);
|
|
2769
|
-
|
|
2770
|
-
reject(error);
|
|
2771
|
-
} else {
|
|
2755
|
+
request
|
|
2756
|
+
.then((response) => {
|
|
2772
2757
|
// Logging
|
|
2773
2758
|
this.config.logger.log(
|
|
2774
2759
|
'trace',
|
|
2775
|
-
response.
|
|
2760
|
+
response.status,
|
|
2776
2761
|
'POST',
|
|
2777
2762
|
`https://login.${this.config.environment}/oauth/token`,
|
|
2778
|
-
request.
|
|
2763
|
+
request.headers,
|
|
2779
2764
|
response.headers,
|
|
2780
2765
|
bodyParam,
|
|
2781
2766
|
undefined
|
|
2782
2767
|
);
|
|
2783
2768
|
this.config.logger.log(
|
|
2784
2769
|
'debug',
|
|
2785
|
-
response.
|
|
2770
|
+
response.status,
|
|
2786
2771
|
'POST',
|
|
2787
2772
|
`https://login.${this.config.environment}/oauth/token`,
|
|
2788
|
-
request.
|
|
2773
|
+
request.headers,
|
|
2789
2774
|
undefined,
|
|
2790
2775
|
bodyParam,
|
|
2791
2776
|
undefined
|
|
2792
2777
|
);
|
|
2793
2778
|
|
|
2794
2779
|
// Get access token from response
|
|
2795
|
-
var access_token = response.
|
|
2796
|
-
var refresh_token = response.
|
|
2780
|
+
var access_token = response.data.access_token;
|
|
2781
|
+
var refresh_token = response.data.refresh_token;
|
|
2797
2782
|
|
|
2798
2783
|
this.setAccessToken(access_token);
|
|
2799
2784
|
this.authData.refreshToken = refresh_token;
|
|
2800
|
-
this.authData.tokenExpiryTime = new Date().getTime() + response.
|
|
2785
|
+
this.authData.tokenExpiryTime = new Date().getTime() + response.data['expires_in'] * 1000;
|
|
2801
2786
|
this.authData.tokenExpiryTimeString = new Date(this.authData.tokenExpiryTime).toUTCString();
|
|
2802
2787
|
|
|
2803
2788
|
// Return auth data
|
|
2804
2789
|
resolve(this.authData);
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2790
|
+
})
|
|
2791
|
+
.catch((error) => {
|
|
2792
|
+
// Log error
|
|
2793
|
+
if (error.response) {
|
|
2794
|
+
this.config.logger.log(
|
|
2795
|
+
'error',
|
|
2796
|
+
error.response.status,
|
|
2797
|
+
'POST',
|
|
2798
|
+
`https://login.${this.config.environment}/oauth/token`,
|
|
2799
|
+
request.headers,
|
|
2800
|
+
error.response.headers,
|
|
2801
|
+
bodyParam,
|
|
2802
|
+
error.response.data
|
|
2803
|
+
);
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
reject(error);
|
|
2807
|
+
});
|
|
2807
2808
|
}
|
|
2808
2809
|
|
|
2809
2810
|
/**
|
|
@@ -2811,15 +2812,15 @@ class ApiClient {
|
|
|
2811
2812
|
* @param {string} encodedData - Base64 encoded client and clientSecret pair
|
|
2812
2813
|
*/
|
|
2813
2814
|
_formAuthRequest(encodedData) {
|
|
2814
|
-
var request =
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2815
|
+
var request = axios__default["default"]({
|
|
2816
|
+
method: `POST`,
|
|
2817
|
+
url: `https://login.${this.config.environment}/oauth/token`,
|
|
2818
|
+
headers: {
|
|
2819
|
+
'Authorization': 'Basic ' + encodedData,
|
|
2820
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
2821
|
+
},
|
|
2822
|
+
data: arguments
|
|
2823
|
+
});
|
|
2823
2824
|
|
|
2824
2825
|
return request;
|
|
2825
2826
|
}
|
|
@@ -3020,6 +3021,36 @@ class ApiClient {
|
|
|
3020
3021
|
return param.toString();
|
|
3021
3022
|
}
|
|
3022
3023
|
|
|
3024
|
+
/**
|
|
3025
|
+
* Returns query parameters serialized in the format needed for an axios request.
|
|
3026
|
+
* @param param The unserialized query parameters.
|
|
3027
|
+
* @returns {Object} The serialized representation the query parameters.
|
|
3028
|
+
*/
|
|
3029
|
+
serialize(obj) {
|
|
3030
|
+
var result = {};
|
|
3031
|
+
for (var p in obj) {
|
|
3032
|
+
if (obj.hasOwnProperty(p)) {
|
|
3033
|
+
result[encodeURIComponent(p)] = Array.isArray(obj[p]) ? obj[p].join(",") : this.paramToString(obj[p]);
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
return result
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
/**
|
|
3040
|
+
* Adds headers onto an existing header object (may be empty)
|
|
3041
|
+
* @param existingHeaders The existing header object.
|
|
3042
|
+
* @param newHeaders New headers.
|
|
3043
|
+
* @returns {Object} The combination of all headers.
|
|
3044
|
+
*/
|
|
3045
|
+
addHeaders(existingHeaders, ...newHeaders) {
|
|
3046
|
+
if (existingHeaders) {
|
|
3047
|
+
existingHeaders = Object.assign(existingHeaders, ...newHeaders);
|
|
3048
|
+
} else {
|
|
3049
|
+
existingHeaders = Object.assign(...newHeaders);
|
|
3050
|
+
}
|
|
3051
|
+
return existingHeaders;
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3023
3054
|
/**
|
|
3024
3055
|
* Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
|
|
3025
3056
|
* NOTE: query parameters are not handled here.
|
|
@@ -3139,7 +3170,7 @@ class ApiClient {
|
|
|
3139
3170
|
case 'pipes':
|
|
3140
3171
|
return param.map(this.paramToString).join('|');
|
|
3141
3172
|
case 'multi':
|
|
3142
|
-
// return the array directly as
|
|
3173
|
+
// return the array directly as axios will handle it as expected
|
|
3143
3174
|
return param.map(this.paramToString);
|
|
3144
3175
|
default:
|
|
3145
3176
|
throw new Error(`Unknown collection format: ${collectionFormat}`);
|
|
@@ -3148,7 +3179,7 @@ class ApiClient {
|
|
|
3148
3179
|
|
|
3149
3180
|
/**
|
|
3150
3181
|
* Applies authentication headers to the request.
|
|
3151
|
-
* @param {Object} request The request object
|
|
3182
|
+
* @param {Object} request The axios request config object.
|
|
3152
3183
|
* @param {Array.<String>} authNames An array of authentication method names.
|
|
3153
3184
|
*/
|
|
3154
3185
|
applyAuthToRequest(request, authNames) {
|
|
@@ -3157,7 +3188,10 @@ class ApiClient {
|
|
|
3157
3188
|
switch (auth.type) {
|
|
3158
3189
|
case 'basic':
|
|
3159
3190
|
if (auth.username || auth.password) {
|
|
3160
|
-
request.auth
|
|
3191
|
+
request.auth = {
|
|
3192
|
+
username: auth.username || '',
|
|
3193
|
+
password: auth.password || ''
|
|
3194
|
+
};
|
|
3161
3195
|
}
|
|
3162
3196
|
break;
|
|
3163
3197
|
case 'apiKey':
|
|
@@ -3169,15 +3203,15 @@ class ApiClient {
|
|
|
3169
3203
|
data[auth.name] = auth.apiKey;
|
|
3170
3204
|
}
|
|
3171
3205
|
if (auth['in'] === 'header') {
|
|
3172
|
-
request.
|
|
3206
|
+
request.headers = this.addHeaders(request.headers, data);
|
|
3173
3207
|
} else {
|
|
3174
|
-
request.
|
|
3208
|
+
request.params = this.serialize(data);
|
|
3175
3209
|
}
|
|
3176
3210
|
}
|
|
3177
3211
|
break;
|
|
3178
3212
|
case 'oauth2':
|
|
3179
3213
|
if (auth.accessToken) {
|
|
3180
|
-
request.
|
|
3214
|
+
request.headers = this.addHeaders(request.headers, {'Authorization': `Bearer ${auth.accessToken}`});
|
|
3181
3215
|
}
|
|
3182
3216
|
break;
|
|
3183
3217
|
default:
|
|
@@ -3206,86 +3240,71 @@ class ApiClient {
|
|
|
3206
3240
|
sendRequest(this);
|
|
3207
3241
|
function sendRequest(that) {
|
|
3208
3242
|
var url = that.buildUrl(path, pathParams);
|
|
3209
|
-
var request =
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3243
|
+
var request = {
|
|
3244
|
+
method: httpMethod,
|
|
3245
|
+
url: url,
|
|
3246
|
+
proxy: that.proxy,
|
|
3247
|
+
timeout: that.timeout,
|
|
3248
|
+
params: that.serialize(queryParams)
|
|
3249
|
+
};
|
|
3214
3250
|
|
|
3215
3251
|
// apply authentications
|
|
3216
3252
|
that.applyAuthToRequest(request, authNames);
|
|
3217
3253
|
|
|
3218
|
-
// set query parameters
|
|
3219
|
-
request.query(that.normalizeParams(queryParams));
|
|
3220
|
-
|
|
3221
3254
|
// set header parameters
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
// set request timeout
|
|
3226
|
-
request.timeout(that.timeout);
|
|
3255
|
+
const defaultHeaders = that.defaultHeaders;
|
|
3256
|
+
const normalizedHeaderParams = that.normalizeParams(headerParams);
|
|
3257
|
+
request.headers = that.addHeaders(request.headers, defaultHeaders, normalizedHeaderParams);
|
|
3227
3258
|
|
|
3228
3259
|
var contentType = that.jsonPreferredMime(contentTypes);
|
|
3229
3260
|
if (contentType) {
|
|
3230
|
-
request.
|
|
3231
|
-
} else if (!request.
|
|
3232
|
-
request.
|
|
3261
|
+
request.headers['Content-Type'] = contentType;
|
|
3262
|
+
} else if (!request.headers['Content-Type']) {
|
|
3263
|
+
request.headers['Content-Type'] = 'application/json';
|
|
3233
3264
|
}
|
|
3234
3265
|
|
|
3235
3266
|
if (contentType === 'application/x-www-form-urlencoded') {
|
|
3236
|
-
request.
|
|
3267
|
+
request.data = that.normalizeParams(formParams);
|
|
3237
3268
|
} else if (contentType == 'multipart/form-data') {
|
|
3238
3269
|
var _formParams = that.normalizeParams(formParams);
|
|
3239
3270
|
for (var key in _formParams) {
|
|
3240
3271
|
if (_formParams.hasOwnProperty(key)) {
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
request.field(key, _formParams[key]);
|
|
3246
|
-
}
|
|
3272
|
+
// Looks like axios handles files and forms the same way
|
|
3273
|
+
var formData = new FormData();
|
|
3274
|
+
formData.set(key, _formParams[key]);
|
|
3275
|
+
request.data = formData;
|
|
3247
3276
|
}
|
|
3248
3277
|
}
|
|
3249
3278
|
} else if (bodyParam) {
|
|
3250
|
-
request.
|
|
3279
|
+
request.data = bodyParam;
|
|
3251
3280
|
}
|
|
3252
3281
|
|
|
3253
3282
|
var accept = that.jsonPreferredMime(accepts);
|
|
3254
3283
|
if (accept) {
|
|
3255
|
-
request.accept
|
|
3284
|
+
request.headers['Accept'] = accept;
|
|
3256
3285
|
}
|
|
3257
|
-
request
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
error: error
|
|
3280
|
-
} : response.body ? response.body : response.text;
|
|
3281
|
-
|
|
3282
|
-
// Debug logging
|
|
3283
|
-
that.config.logger.log('trace', response.statusCode, httpMethod, url, request.header, response.headers, bodyParam, undefined);
|
|
3284
|
-
that.config.logger.log('debug', response.statusCode, httpMethod, url, request.header, undefined, bodyParam, undefined);
|
|
3285
|
-
|
|
3286
|
-
// Resolve promise
|
|
3287
|
-
if (error) {
|
|
3288
|
-
if (data.status == 401 && that.config.refresh_access_token && that.authData.refreshToken !== "") {
|
|
3286
|
+
axios__default["default"].request(request)
|
|
3287
|
+
.then((response) => {
|
|
3288
|
+
// Build response object
|
|
3289
|
+
var data = (that.returnExtended === true) ? {
|
|
3290
|
+
status: response.status,
|
|
3291
|
+
statusText: response.statusText,
|
|
3292
|
+
headers: response.headers,
|
|
3293
|
+
body: response.data,
|
|
3294
|
+
text: response.text,
|
|
3295
|
+
error: null
|
|
3296
|
+
} : response.data ? response.data : response.text;
|
|
3297
|
+
|
|
3298
|
+
// Debug logging
|
|
3299
|
+
that.config.logger.log('trace', response.status, httpMethod, url, request.headers, response.headers, bodyParam, undefined);
|
|
3300
|
+
that.config.logger.log('debug', response.status, httpMethod, url, request.headers, undefined, bodyParam, undefined);
|
|
3301
|
+
|
|
3302
|
+
// Resolve promise
|
|
3303
|
+
resolve(data);
|
|
3304
|
+
})
|
|
3305
|
+
.catch((error) => {
|
|
3306
|
+
var data = error;
|
|
3307
|
+
if (error.response && error.response.status == 401 && that.config.refresh_access_token && that.authData.refreshToken !== "") {
|
|
3289
3308
|
that._handleExpiredAccessToken()
|
|
3290
3309
|
.then(() => {
|
|
3291
3310
|
sendRequest(that);
|
|
@@ -3293,24 +3312,29 @@ class ApiClient {
|
|
|
3293
3312
|
.catch((err) => {
|
|
3294
3313
|
reject(err);
|
|
3295
3314
|
});
|
|
3296
|
-
} else {
|
|
3315
|
+
} else if (error.response) {
|
|
3297
3316
|
// Log error
|
|
3298
3317
|
that.config.logger.log(
|
|
3299
3318
|
'error',
|
|
3300
|
-
response.
|
|
3319
|
+
error.response.status,
|
|
3301
3320
|
httpMethod,
|
|
3302
3321
|
url,
|
|
3303
|
-
request.
|
|
3304
|
-
response.headers,
|
|
3322
|
+
request.headers,
|
|
3323
|
+
error.response.headers,
|
|
3305
3324
|
bodyParam,
|
|
3306
|
-
response.
|
|
3325
|
+
error.response.data
|
|
3307
3326
|
);
|
|
3308
|
-
|
|
3327
|
+
data = (that.returnExtended === true) ? {
|
|
3328
|
+
status: error.response.status,
|
|
3329
|
+
statusText: error.response.statusText,
|
|
3330
|
+
headers: error.response.headers,
|
|
3331
|
+
body: error.response.data,
|
|
3332
|
+
text: error.response.text,
|
|
3333
|
+
error: error
|
|
3334
|
+
} : error.response.data ? error.response.data : error.response.text;
|
|
3309
3335
|
}
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
}
|
|
3313
|
-
});
|
|
3336
|
+
reject(data);
|
|
3337
|
+
});
|
|
3314
3338
|
}
|
|
3315
3339
|
});
|
|
3316
3340
|
}
|
|
@@ -3320,7 +3344,7 @@ class AlertingApi {
|
|
|
3320
3344
|
/**
|
|
3321
3345
|
* Alerting service.
|
|
3322
3346
|
* @module purecloud-platform-client-v2/api/AlertingApi
|
|
3323
|
-
* @version 137.0
|
|
3347
|
+
* @version 137.1.0
|
|
3324
3348
|
*/
|
|
3325
3349
|
|
|
3326
3350
|
/**
|
|
@@ -3634,7 +3658,7 @@ class AnalyticsApi {
|
|
|
3634
3658
|
/**
|
|
3635
3659
|
* Analytics service.
|
|
3636
3660
|
* @module purecloud-platform-client-v2/api/AnalyticsApi
|
|
3637
|
-
* @version 137.0
|
|
3661
|
+
* @version 137.1.0
|
|
3638
3662
|
*/
|
|
3639
3663
|
|
|
3640
3664
|
/**
|
|
@@ -4816,7 +4840,7 @@ class ArchitectApi {
|
|
|
4816
4840
|
/**
|
|
4817
4841
|
* Architect service.
|
|
4818
4842
|
* @module purecloud-platform-client-v2/api/ArchitectApi
|
|
4819
|
-
* @version 137.0
|
|
4843
|
+
* @version 137.1.0
|
|
4820
4844
|
*/
|
|
4821
4845
|
|
|
4822
4846
|
/**
|
|
@@ -7861,7 +7885,7 @@ class AuditApi {
|
|
|
7861
7885
|
/**
|
|
7862
7886
|
* Audit service.
|
|
7863
7887
|
* @module purecloud-platform-client-v2/api/AuditApi
|
|
7864
|
-
* @version 137.0
|
|
7888
|
+
* @version 137.1.0
|
|
7865
7889
|
*/
|
|
7866
7890
|
|
|
7867
7891
|
/**
|
|
@@ -8032,7 +8056,7 @@ class AuthorizationApi {
|
|
|
8032
8056
|
/**
|
|
8033
8057
|
* Authorization service.
|
|
8034
8058
|
* @module purecloud-platform-client-v2/api/AuthorizationApi
|
|
8035
|
-
* @version 137.0
|
|
8059
|
+
* @version 137.1.0
|
|
8036
8060
|
*/
|
|
8037
8061
|
|
|
8038
8062
|
/**
|
|
@@ -9215,7 +9239,7 @@ class BillingApi {
|
|
|
9215
9239
|
/**
|
|
9216
9240
|
* Billing service.
|
|
9217
9241
|
* @module purecloud-platform-client-v2/api/BillingApi
|
|
9218
|
-
* @version 137.0
|
|
9242
|
+
* @version 137.1.0
|
|
9219
9243
|
*/
|
|
9220
9244
|
|
|
9221
9245
|
/**
|
|
@@ -9295,7 +9319,7 @@ class ChatApi {
|
|
|
9295
9319
|
/**
|
|
9296
9320
|
* Chat service.
|
|
9297
9321
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
9298
|
-
* @version 137.0
|
|
9322
|
+
* @version 137.1.0
|
|
9299
9323
|
*/
|
|
9300
9324
|
|
|
9301
9325
|
/**
|
|
@@ -9386,7 +9410,7 @@ class CoachingApi {
|
|
|
9386
9410
|
/**
|
|
9387
9411
|
* Coaching service.
|
|
9388
9412
|
* @module purecloud-platform-client-v2/api/CoachingApi
|
|
9389
|
-
* @version 137.0
|
|
9413
|
+
* @version 137.1.0
|
|
9390
9414
|
*/
|
|
9391
9415
|
|
|
9392
9416
|
/**
|
|
@@ -9963,7 +9987,7 @@ class ContentManagementApi {
|
|
|
9963
9987
|
/**
|
|
9964
9988
|
* ContentManagement service.
|
|
9965
9989
|
* @module purecloud-platform-client-v2/api/ContentManagementApi
|
|
9966
|
-
* @version 137.0
|
|
9990
|
+
* @version 137.1.0
|
|
9967
9991
|
*/
|
|
9968
9992
|
|
|
9969
9993
|
/**
|
|
@@ -11103,7 +11127,7 @@ class ConversationsApi {
|
|
|
11103
11127
|
/**
|
|
11104
11128
|
* Conversations service.
|
|
11105
11129
|
* @module purecloud-platform-client-v2/api/ConversationsApi
|
|
11106
|
-
* @version 137.0
|
|
11130
|
+
* @version 137.1.0
|
|
11107
11131
|
*/
|
|
11108
11132
|
|
|
11109
11133
|
/**
|
|
@@ -15767,7 +15791,7 @@ class DataExtensionsApi {
|
|
|
15767
15791
|
/**
|
|
15768
15792
|
* DataExtensions service.
|
|
15769
15793
|
* @module purecloud-platform-client-v2/api/DataExtensionsApi
|
|
15770
|
-
* @version 137.0
|
|
15794
|
+
* @version 137.1.0
|
|
15771
15795
|
*/
|
|
15772
15796
|
|
|
15773
15797
|
/**
|
|
@@ -15853,7 +15877,7 @@ class ExternalContactsApi {
|
|
|
15853
15877
|
/**
|
|
15854
15878
|
* ExternalContacts service.
|
|
15855
15879
|
* @module purecloud-platform-client-v2/api/ExternalContactsApi
|
|
15856
|
-
* @version 137.0
|
|
15880
|
+
* @version 137.1.0
|
|
15857
15881
|
*/
|
|
15858
15882
|
|
|
15859
15883
|
/**
|
|
@@ -17596,7 +17620,7 @@ class FaxApi {
|
|
|
17596
17620
|
/**
|
|
17597
17621
|
* Fax service.
|
|
17598
17622
|
* @module purecloud-platform-client-v2/api/FaxApi
|
|
17599
|
-
* @version 137.0
|
|
17623
|
+
* @version 137.1.0
|
|
17600
17624
|
*/
|
|
17601
17625
|
|
|
17602
17626
|
/**
|
|
@@ -17767,7 +17791,7 @@ class FlowsApi {
|
|
|
17767
17791
|
/**
|
|
17768
17792
|
* Flows service.
|
|
17769
17793
|
* @module purecloud-platform-client-v2/api/FlowsApi
|
|
17770
|
-
* @version 137.0
|
|
17794
|
+
* @version 137.1.0
|
|
17771
17795
|
*/
|
|
17772
17796
|
|
|
17773
17797
|
/**
|
|
@@ -17838,7 +17862,7 @@ class GamificationApi {
|
|
|
17838
17862
|
/**
|
|
17839
17863
|
* Gamification service.
|
|
17840
17864
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
17841
|
-
* @version 137.0
|
|
17865
|
+
* @version 137.1.0
|
|
17842
17866
|
*/
|
|
17843
17867
|
|
|
17844
17868
|
/**
|
|
@@ -19268,7 +19292,7 @@ class GeneralDataProtectionRegulationApi {
|
|
|
19268
19292
|
/**
|
|
19269
19293
|
* GeneralDataProtectionRegulation service.
|
|
19270
19294
|
* @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
19271
|
-
* @version 137.0
|
|
19295
|
+
* @version 137.1.0
|
|
19272
19296
|
*/
|
|
19273
19297
|
|
|
19274
19298
|
/**
|
|
@@ -19398,7 +19422,7 @@ class GeolocationApi {
|
|
|
19398
19422
|
/**
|
|
19399
19423
|
* Geolocation service.
|
|
19400
19424
|
* @module purecloud-platform-client-v2/api/GeolocationApi
|
|
19401
|
-
* @version 137.0
|
|
19425
|
+
* @version 137.1.0
|
|
19402
19426
|
*/
|
|
19403
19427
|
|
|
19404
19428
|
/**
|
|
@@ -19529,7 +19553,7 @@ class GreetingsApi {
|
|
|
19529
19553
|
/**
|
|
19530
19554
|
* Greetings service.
|
|
19531
19555
|
* @module purecloud-platform-client-v2/api/GreetingsApi
|
|
19532
|
-
* @version 137.0
|
|
19556
|
+
* @version 137.1.0
|
|
19533
19557
|
*/
|
|
19534
19558
|
|
|
19535
19559
|
/**
|
|
@@ -19984,7 +20008,7 @@ class GroupsApi {
|
|
|
19984
20008
|
/**
|
|
19985
20009
|
* Groups service.
|
|
19986
20010
|
* @module purecloud-platform-client-v2/api/GroupsApi
|
|
19987
|
-
* @version 137.0
|
|
20011
|
+
* @version 137.1.0
|
|
19988
20012
|
*/
|
|
19989
20013
|
|
|
19990
20014
|
/**
|
|
@@ -20389,7 +20413,7 @@ class IdentityProviderApi {
|
|
|
20389
20413
|
/**
|
|
20390
20414
|
* IdentityProvider service.
|
|
20391
20415
|
* @module purecloud-platform-client-v2/api/IdentityProviderApi
|
|
20392
|
-
* @version 137.0
|
|
20416
|
+
* @version 137.1.0
|
|
20393
20417
|
*/
|
|
20394
20418
|
|
|
20395
20419
|
/**
|
|
@@ -21145,7 +21169,7 @@ class IntegrationsApi {
|
|
|
21145
21169
|
/**
|
|
21146
21170
|
* Integrations service.
|
|
21147
21171
|
* @module purecloud-platform-client-v2/api/IntegrationsApi
|
|
21148
|
-
* @version 137.0
|
|
21172
|
+
* @version 137.1.0
|
|
21149
21173
|
*/
|
|
21150
21174
|
|
|
21151
21175
|
/**
|
|
@@ -22822,7 +22846,7 @@ class JourneyApi {
|
|
|
22822
22846
|
/**
|
|
22823
22847
|
* Journey service.
|
|
22824
22848
|
* @module purecloud-platform-client-v2/api/JourneyApi
|
|
22825
|
-
* @version 137.0
|
|
22849
|
+
* @version 137.1.0
|
|
22826
22850
|
*/
|
|
22827
22851
|
|
|
22828
22852
|
/**
|
|
@@ -23533,7 +23557,7 @@ class KnowledgeApi {
|
|
|
23533
23557
|
/**
|
|
23534
23558
|
* Knowledge service.
|
|
23535
23559
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
23536
|
-
* @version 137.0
|
|
23560
|
+
* @version 137.1.0
|
|
23537
23561
|
*/
|
|
23538
23562
|
|
|
23539
23563
|
/**
|
|
@@ -24433,7 +24457,7 @@ class LanguageUnderstandingApi {
|
|
|
24433
24457
|
/**
|
|
24434
24458
|
* LanguageUnderstanding service.
|
|
24435
24459
|
* @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
24436
|
-
* @version 137.0
|
|
24460
|
+
* @version 137.1.0
|
|
24437
24461
|
*/
|
|
24438
24462
|
|
|
24439
24463
|
/**
|
|
@@ -25337,7 +25361,7 @@ class LanguagesApi {
|
|
|
25337
25361
|
/**
|
|
25338
25362
|
* Languages service.
|
|
25339
25363
|
* @module purecloud-platform-client-v2/api/LanguagesApi
|
|
25340
|
-
* @version 137.0
|
|
25364
|
+
* @version 137.1.0
|
|
25341
25365
|
*/
|
|
25342
25366
|
|
|
25343
25367
|
/**
|
|
@@ -25605,7 +25629,7 @@ class LearningApi {
|
|
|
25605
25629
|
/**
|
|
25606
25630
|
* Learning service.
|
|
25607
25631
|
* @module purecloud-platform-client-v2/api/LearningApi
|
|
25608
|
-
* @version 137.0
|
|
25632
|
+
* @version 137.1.0
|
|
25609
25633
|
*/
|
|
25610
25634
|
|
|
25611
25635
|
/**
|
|
@@ -26196,7 +26220,7 @@ class LicenseApi {
|
|
|
26196
26220
|
/**
|
|
26197
26221
|
* License service.
|
|
26198
26222
|
* @module purecloud-platform-client-v2/api/LicenseApi
|
|
26199
|
-
* @version 137.0
|
|
26223
|
+
* @version 137.1.0
|
|
26200
26224
|
*/
|
|
26201
26225
|
|
|
26202
26226
|
/**
|
|
@@ -26434,7 +26458,7 @@ class LocationsApi {
|
|
|
26434
26458
|
/**
|
|
26435
26459
|
* Locations service.
|
|
26436
26460
|
* @module purecloud-platform-client-v2/api/LocationsApi
|
|
26437
|
-
* @version 137.0
|
|
26461
|
+
* @version 137.1.0
|
|
26438
26462
|
*/
|
|
26439
26463
|
|
|
26440
26464
|
/**
|
|
@@ -26670,7 +26694,7 @@ class MessagingApi {
|
|
|
26670
26694
|
/**
|
|
26671
26695
|
* Messaging service.
|
|
26672
26696
|
* @module purecloud-platform-client-v2/api/MessagingApi
|
|
26673
|
-
* @version 137.0
|
|
26697
|
+
* @version 137.1.0
|
|
26674
26698
|
*/
|
|
26675
26699
|
|
|
26676
26700
|
/**
|
|
@@ -26821,7 +26845,7 @@ class MobileDevicesApi {
|
|
|
26821
26845
|
/**
|
|
26822
26846
|
* MobileDevices service.
|
|
26823
26847
|
* @module purecloud-platform-client-v2/api/MobileDevicesApi
|
|
26824
|
-
* @version 137.0
|
|
26848
|
+
* @version 137.1.0
|
|
26825
26849
|
*/
|
|
26826
26850
|
|
|
26827
26851
|
/**
|
|
@@ -26972,7 +26996,7 @@ class NotificationsApi {
|
|
|
26972
26996
|
/**
|
|
26973
26997
|
* Notifications service.
|
|
26974
26998
|
* @module purecloud-platform-client-v2/api/NotificationsApi
|
|
26975
|
-
* @version 137.0
|
|
26999
|
+
* @version 137.1.0
|
|
26976
27000
|
*/
|
|
26977
27001
|
|
|
26978
27002
|
/**
|
|
@@ -27197,7 +27221,7 @@ class OAuthApi {
|
|
|
27197
27221
|
/**
|
|
27198
27222
|
* OAuth service.
|
|
27199
27223
|
* @module purecloud-platform-client-v2/api/OAuthApi
|
|
27200
|
-
* @version 137.0
|
|
27224
|
+
* @version 137.1.0
|
|
27201
27225
|
*/
|
|
27202
27226
|
|
|
27203
27227
|
/**
|
|
@@ -27563,7 +27587,7 @@ class ObjectsApi {
|
|
|
27563
27587
|
/**
|
|
27564
27588
|
* Objects service.
|
|
27565
27589
|
* @module purecloud-platform-client-v2/api/ObjectsApi
|
|
27566
|
-
* @version 137.0
|
|
27590
|
+
* @version 137.1.0
|
|
27567
27591
|
*/
|
|
27568
27592
|
|
|
27569
27593
|
/**
|
|
@@ -27834,7 +27858,7 @@ class OrganizationApi {
|
|
|
27834
27858
|
/**
|
|
27835
27859
|
* Organization service.
|
|
27836
27860
|
* @module purecloud-platform-client-v2/api/OrganizationApi
|
|
27837
|
-
* @version 137.0
|
|
27861
|
+
* @version 137.1.0
|
|
27838
27862
|
*/
|
|
27839
27863
|
|
|
27840
27864
|
/**
|
|
@@ -28237,7 +28261,7 @@ class OrganizationAuthorizationApi {
|
|
|
28237
28261
|
/**
|
|
28238
28262
|
* OrganizationAuthorization service.
|
|
28239
28263
|
* @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
28240
|
-
* @version 137.0
|
|
28264
|
+
* @version 137.1.0
|
|
28241
28265
|
*/
|
|
28242
28266
|
|
|
28243
28267
|
/**
|
|
@@ -29162,7 +29186,7 @@ class OutboundApi {
|
|
|
29162
29186
|
/**
|
|
29163
29187
|
* Outbound service.
|
|
29164
29188
|
* @module purecloud-platform-client-v2/api/OutboundApi
|
|
29165
|
-
* @version 137.0
|
|
29189
|
+
* @version 137.1.0
|
|
29166
29190
|
*/
|
|
29167
29191
|
|
|
29168
29192
|
/**
|
|
@@ -32417,7 +32441,7 @@ class PresenceApi {
|
|
|
32417
32441
|
/**
|
|
32418
32442
|
* Presence service.
|
|
32419
32443
|
* @module purecloud-platform-client-v2/api/PresenceApi
|
|
32420
|
-
* @version 137.0
|
|
32444
|
+
* @version 137.1.0
|
|
32421
32445
|
*/
|
|
32422
32446
|
|
|
32423
32447
|
/**
|
|
@@ -32739,7 +32763,7 @@ class QualityApi {
|
|
|
32739
32763
|
/**
|
|
32740
32764
|
* Quality service.
|
|
32741
32765
|
* @module purecloud-platform-client-v2/api/QualityApi
|
|
32742
|
-
* @version 137.0
|
|
32766
|
+
* @version 137.1.0
|
|
32743
32767
|
*/
|
|
32744
32768
|
|
|
32745
32769
|
/**
|
|
@@ -34317,7 +34341,7 @@ class RecordingApi {
|
|
|
34317
34341
|
/**
|
|
34318
34342
|
* Recording service.
|
|
34319
34343
|
* @module purecloud-platform-client-v2/api/RecordingApi
|
|
34320
|
-
* @version 137.0
|
|
34344
|
+
* @version 137.1.0
|
|
34321
34345
|
*/
|
|
34322
34346
|
|
|
34323
34347
|
/**
|
|
@@ -35970,7 +35994,7 @@ class ResponseManagementApi {
|
|
|
35970
35994
|
/**
|
|
35971
35995
|
* ResponseManagement service.
|
|
35972
35996
|
* @module purecloud-platform-client-v2/api/ResponseManagementApi
|
|
35973
|
-
* @version 137.0
|
|
35997
|
+
* @version 137.1.0
|
|
35974
35998
|
*/
|
|
35975
35999
|
|
|
35976
36000
|
/**
|
|
@@ -36454,7 +36478,7 @@ class RoutingApi {
|
|
|
36454
36478
|
/**
|
|
36455
36479
|
* Routing service.
|
|
36456
36480
|
* @module purecloud-platform-client-v2/api/RoutingApi
|
|
36457
|
-
* @version 137.0
|
|
36481
|
+
* @version 137.1.0
|
|
36458
36482
|
*/
|
|
36459
36483
|
|
|
36460
36484
|
/**
|
|
@@ -39381,7 +39405,7 @@ class SCIMApi {
|
|
|
39381
39405
|
/**
|
|
39382
39406
|
* SCIM service.
|
|
39383
39407
|
* @module purecloud-platform-client-v2/api/SCIMApi
|
|
39384
|
-
* @version 137.0
|
|
39408
|
+
* @version 137.1.0
|
|
39385
39409
|
*/
|
|
39386
39410
|
|
|
39387
39411
|
/**
|
|
@@ -40258,7 +40282,7 @@ class ScriptsApi {
|
|
|
40258
40282
|
/**
|
|
40259
40283
|
* Scripts service.
|
|
40260
40284
|
* @module purecloud-platform-client-v2/api/ScriptsApi
|
|
40261
|
-
* @version 137.0
|
|
40285
|
+
* @version 137.1.0
|
|
40262
40286
|
*/
|
|
40263
40287
|
|
|
40264
40288
|
/**
|
|
@@ -40677,7 +40701,7 @@ class SearchApi {
|
|
|
40677
40701
|
/**
|
|
40678
40702
|
* Search service.
|
|
40679
40703
|
* @module purecloud-platform-client-v2/api/SearchApi
|
|
40680
|
-
* @version 137.0
|
|
40704
|
+
* @version 137.1.0
|
|
40681
40705
|
*/
|
|
40682
40706
|
|
|
40683
40707
|
/**
|
|
@@ -41212,7 +41236,7 @@ class SpeechTextAnalyticsApi {
|
|
|
41212
41236
|
/**
|
|
41213
41237
|
* SpeechTextAnalytics service.
|
|
41214
41238
|
* @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
41215
|
-
* @version 137.0
|
|
41239
|
+
* @version 137.1.0
|
|
41216
41240
|
*/
|
|
41217
41241
|
|
|
41218
41242
|
/**
|
|
@@ -42065,7 +42089,7 @@ class StationsApi {
|
|
|
42065
42089
|
/**
|
|
42066
42090
|
* Stations service.
|
|
42067
42091
|
* @module purecloud-platform-client-v2/api/StationsApi
|
|
42068
|
-
* @version 137.0
|
|
42092
|
+
* @version 137.1.0
|
|
42069
42093
|
*/
|
|
42070
42094
|
|
|
42071
42095
|
/**
|
|
@@ -42212,7 +42236,7 @@ class SuggestApi {
|
|
|
42212
42236
|
/**
|
|
42213
42237
|
* Suggest service.
|
|
42214
42238
|
* @module purecloud-platform-client-v2/api/SuggestApi
|
|
42215
|
-
* @version 137.0
|
|
42239
|
+
* @version 137.1.0
|
|
42216
42240
|
*/
|
|
42217
42241
|
|
|
42218
42242
|
/**
|
|
@@ -42351,7 +42375,7 @@ class TelephonyApi {
|
|
|
42351
42375
|
/**
|
|
42352
42376
|
* Telephony service.
|
|
42353
42377
|
* @module purecloud-platform-client-v2/api/TelephonyApi
|
|
42354
|
-
* @version 137.0
|
|
42378
|
+
* @version 137.1.0
|
|
42355
42379
|
*/
|
|
42356
42380
|
|
|
42357
42381
|
/**
|
|
@@ -42459,7 +42483,7 @@ class TelephonyProvidersEdgeApi {
|
|
|
42459
42483
|
/**
|
|
42460
42484
|
* TelephonyProvidersEdge service.
|
|
42461
42485
|
* @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
42462
|
-
* @version 137.0
|
|
42486
|
+
* @version 137.1.0
|
|
42463
42487
|
*/
|
|
42464
42488
|
|
|
42465
42489
|
/**
|
|
@@ -46092,7 +46116,7 @@ class TextbotsApi {
|
|
|
46092
46116
|
/**
|
|
46093
46117
|
* Textbots service.
|
|
46094
46118
|
* @module purecloud-platform-client-v2/api/TextbotsApi
|
|
46095
|
-
* @version 137.0
|
|
46119
|
+
* @version 137.1.0
|
|
46096
46120
|
*/
|
|
46097
46121
|
|
|
46098
46122
|
/**
|
|
@@ -46220,7 +46244,7 @@ class TokensApi {
|
|
|
46220
46244
|
/**
|
|
46221
46245
|
* Tokens service.
|
|
46222
46246
|
* @module purecloud-platform-client-v2/api/TokensApi
|
|
46223
|
-
* @version 137.0
|
|
46247
|
+
* @version 137.1.0
|
|
46224
46248
|
*/
|
|
46225
46249
|
|
|
46226
46250
|
/**
|
|
@@ -46326,7 +46350,7 @@ class UploadsApi {
|
|
|
46326
46350
|
/**
|
|
46327
46351
|
* Uploads service.
|
|
46328
46352
|
* @module purecloud-platform-client-v2/api/UploadsApi
|
|
46329
|
-
* @version 137.0
|
|
46353
|
+
* @version 137.1.0
|
|
46330
46354
|
*/
|
|
46331
46355
|
|
|
46332
46356
|
/**
|
|
@@ -46477,7 +46501,7 @@ class UsageApi {
|
|
|
46477
46501
|
/**
|
|
46478
46502
|
* Usage service.
|
|
46479
46503
|
* @module purecloud-platform-client-v2/api/UsageApi
|
|
46480
|
-
* @version 137.0
|
|
46504
|
+
* @version 137.1.0
|
|
46481
46505
|
*/
|
|
46482
46506
|
|
|
46483
46507
|
/**
|
|
@@ -46548,7 +46572,7 @@ class UserRecordingsApi {
|
|
|
46548
46572
|
/**
|
|
46549
46573
|
* UserRecordings service.
|
|
46550
46574
|
* @module purecloud-platform-client-v2/api/UserRecordingsApi
|
|
46551
|
-
* @version 137.0
|
|
46575
|
+
* @version 137.1.0
|
|
46552
46576
|
*/
|
|
46553
46577
|
|
|
46554
46578
|
/**
|
|
@@ -46732,7 +46756,7 @@ class UsersApi {
|
|
|
46732
46756
|
/**
|
|
46733
46757
|
* Users service.
|
|
46734
46758
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
46735
|
-
* @version 137.0
|
|
46759
|
+
* @version 137.1.0
|
|
46736
46760
|
*/
|
|
46737
46761
|
|
|
46738
46762
|
/**
|
|
@@ -49034,7 +49058,7 @@ class UtilitiesApi {
|
|
|
49034
49058
|
/**
|
|
49035
49059
|
* Utilities service.
|
|
49036
49060
|
* @module purecloud-platform-client-v2/api/UtilitiesApi
|
|
49037
|
-
* @version 137.0
|
|
49061
|
+
* @version 137.1.0
|
|
49038
49062
|
*/
|
|
49039
49063
|
|
|
49040
49064
|
/**
|
|
@@ -49145,7 +49169,7 @@ class VoicemailApi {
|
|
|
49145
49169
|
/**
|
|
49146
49170
|
* Voicemail service.
|
|
49147
49171
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
49148
|
-
* @version 137.0
|
|
49172
|
+
* @version 137.1.0
|
|
49149
49173
|
*/
|
|
49150
49174
|
|
|
49151
49175
|
/**
|
|
@@ -49812,7 +49836,7 @@ class WebChatApi {
|
|
|
49812
49836
|
/**
|
|
49813
49837
|
* WebChat service.
|
|
49814
49838
|
* @module purecloud-platform-client-v2/api/WebChatApi
|
|
49815
|
-
* @version 137.0
|
|
49839
|
+
* @version 137.1.0
|
|
49816
49840
|
*/
|
|
49817
49841
|
|
|
49818
49842
|
/**
|
|
@@ -50356,7 +50380,7 @@ class WebDeploymentsApi {
|
|
|
50356
50380
|
/**
|
|
50357
50381
|
* WebDeployments service.
|
|
50358
50382
|
* @module purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
50359
|
-
* @version 137.0
|
|
50383
|
+
* @version 137.1.0
|
|
50360
50384
|
*/
|
|
50361
50385
|
|
|
50362
50386
|
/**
|
|
@@ -50711,7 +50735,7 @@ class WebMessagingApi {
|
|
|
50711
50735
|
/**
|
|
50712
50736
|
* WebMessaging service.
|
|
50713
50737
|
* @module purecloud-platform-client-v2/api/WebMessagingApi
|
|
50714
|
-
* @version 137.0
|
|
50738
|
+
* @version 137.1.0
|
|
50715
50739
|
*/
|
|
50716
50740
|
|
|
50717
50741
|
/**
|
|
@@ -50757,7 +50781,7 @@ class WidgetsApi {
|
|
|
50757
50781
|
/**
|
|
50758
50782
|
* Widgets service.
|
|
50759
50783
|
* @module purecloud-platform-client-v2/api/WidgetsApi
|
|
50760
|
-
* @version 137.0
|
|
50784
|
+
* @version 137.1.0
|
|
50761
50785
|
*/
|
|
50762
50786
|
|
|
50763
50787
|
/**
|
|
@@ -50903,7 +50927,7 @@ class WorkforceManagementApi {
|
|
|
50903
50927
|
/**
|
|
50904
50928
|
* WorkforceManagement service.
|
|
50905
50929
|
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
50906
|
-
* @version 137.0
|
|
50930
|
+
* @version 137.1.0
|
|
50907
50931
|
*/
|
|
50908
50932
|
|
|
50909
50933
|
/**
|
|
@@ -55154,7 +55178,7 @@ class WorkforceManagementApi {
|
|
|
55154
55178
|
* </pre>
|
|
55155
55179
|
* </p>
|
|
55156
55180
|
* @module purecloud-platform-client-v2/index
|
|
55157
|
-
* @version 137.0
|
|
55181
|
+
* @version 137.1.0
|
|
55158
55182
|
*/
|
|
55159
55183
|
class platformClient {
|
|
55160
55184
|
constructor() {
|