purecloud-platform-client-v2 140.0.0 → 141.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 +2 -2
- package/dist/node/purecloud-platform-client-v2.js +504 -80
- package/dist/web-amd/purecloud-platform-client-v2.js +504 -81
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +504 -80
- package/dist/web-cjs/purecloud-platform-client-v2.js +2598 -118
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +396 -196
- package/package.json +2 -1
- package/src/purecloud-platform-client-v2/ApiClient.js +18 -16
- 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 +152 -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 +35 -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 +4 -2
- 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 +26 -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/TeamsApi.js +184 -0
- 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 +26 -1
- package/src/purecloud-platform-client-v2/index.js +7 -1
|
@@ -151,6 +151,8 @@ function fromByteArray (uint8) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
},{}],2:[function(require,module,exports){
|
|
154
|
+
|
|
155
|
+
},{}],3:[function(require,module,exports){
|
|
154
156
|
(function (Buffer){(function (){
|
|
155
157
|
/*!
|
|
156
158
|
* The buffer module from node.js, for the browser.
|
|
@@ -1931,7 +1933,7 @@ function numberIsNaN (obj) {
|
|
|
1931
1933
|
}
|
|
1932
1934
|
|
|
1933
1935
|
}).call(this)}).call(this,require("buffer").Buffer)
|
|
1934
|
-
},{"base64-js":1,"buffer":
|
|
1936
|
+
},{"base64-js":1,"buffer":3,"ieee754":4}],4:[function(require,module,exports){
|
|
1935
1937
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1936
1938
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
1937
1939
|
var e, m
|
|
@@ -2018,7 +2020,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
2018
2020
|
buffer[offset + i - d] |= s * 128
|
|
2019
2021
|
}
|
|
2020
2022
|
|
|
2021
|
-
},{}],
|
|
2023
|
+
},{}],5:[function(require,module,exports){
|
|
2022
2024
|
exports.endianness = function () { return 'LE' };
|
|
2023
2025
|
|
|
2024
2026
|
exports.hostname = function () {
|
|
@@ -2069,7 +2071,7 @@ exports.homedir = function () {
|
|
|
2069
2071
|
return '/'
|
|
2070
2072
|
};
|
|
2071
2073
|
|
|
2072
|
-
},{}],
|
|
2074
|
+
},{}],6:[function(require,module,exports){
|
|
2073
2075
|
(function (process){(function (){
|
|
2074
2076
|
// 'path' module extracted from Node.js v8.11.1 (only the posix part)
|
|
2075
2077
|
// transplited with Babel
|
|
@@ -2602,7 +2604,7 @@ posix.posix = posix;
|
|
|
2602
2604
|
module.exports = posix;
|
|
2603
2605
|
|
|
2604
2606
|
}).call(this)}).call(this,require('_process'))
|
|
2605
|
-
},{"_process":
|
|
2607
|
+
},{"_process":7}],7:[function(require,module,exports){
|
|
2606
2608
|
// shim for using process in browser
|
|
2607
2609
|
var process = module.exports = {};
|
|
2608
2610
|
|
|
@@ -2788,9 +2790,9 @@ process.chdir = function (dir) {
|
|
|
2788
2790
|
};
|
|
2789
2791
|
process.umask = function() { return 0; };
|
|
2790
2792
|
|
|
2791
|
-
},{}],
|
|
2793
|
+
},{}],8:[function(require,module,exports){
|
|
2792
2794
|
module.exports = require('./lib/axios');
|
|
2793
|
-
},{"./lib/axios":
|
|
2795
|
+
},{"./lib/axios":10}],9:[function(require,module,exports){
|
|
2794
2796
|
'use strict';
|
|
2795
2797
|
|
|
2796
2798
|
var utils = require('./../utils');
|
|
@@ -3014,7 +3016,7 @@ module.exports = function xhrAdapter(config) {
|
|
|
3014
3016
|
});
|
|
3015
3017
|
};
|
|
3016
3018
|
|
|
3017
|
-
},{"../cancel/CanceledError":
|
|
3019
|
+
},{"../cancel/CanceledError":12,"../core/AxiosError":15,"../core/buildFullPath":17,"../defaults/transitional":23,"../helpers/parseProtocol":35,"./../core/settle":20,"./../helpers/buildURL":26,"./../helpers/cookies":28,"./../helpers/isURLSameOrigin":31,"./../helpers/parseHeaders":34,"./../utils":39}],10:[function(require,module,exports){
|
|
3018
3020
|
'use strict';
|
|
3019
3021
|
|
|
3020
3022
|
var utils = require('./utils');
|
|
@@ -3080,7 +3082,7 @@ module.exports = axios;
|
|
|
3080
3082
|
// Allow use of default import syntax in TypeScript
|
|
3081
3083
|
module.exports.default = axios;
|
|
3082
3084
|
|
|
3083
|
-
},{"../lib/core/AxiosError":
|
|
3085
|
+
},{"../lib/core/AxiosError":15,"./cancel/CancelToken":11,"./cancel/CanceledError":12,"./cancel/isCancel":13,"./core/Axios":14,"./core/mergeConfig":19,"./defaults":22,"./env/data":24,"./helpers/bind":25,"./helpers/isAxiosError":30,"./helpers/spread":36,"./helpers/toFormData":37,"./utils":39}],11:[function(require,module,exports){
|
|
3084
3086
|
'use strict';
|
|
3085
3087
|
|
|
3086
3088
|
var CanceledError = require('./CanceledError');
|
|
@@ -3201,7 +3203,7 @@ CancelToken.source = function source() {
|
|
|
3201
3203
|
|
|
3202
3204
|
module.exports = CancelToken;
|
|
3203
3205
|
|
|
3204
|
-
},{"./CanceledError":
|
|
3206
|
+
},{"./CanceledError":12}],12:[function(require,module,exports){
|
|
3205
3207
|
'use strict';
|
|
3206
3208
|
|
|
3207
3209
|
var AxiosError = require('../core/AxiosError');
|
|
@@ -3225,14 +3227,14 @@ utils.inherits(CanceledError, AxiosError, {
|
|
|
3225
3227
|
|
|
3226
3228
|
module.exports = CanceledError;
|
|
3227
3229
|
|
|
3228
|
-
},{"../core/AxiosError":
|
|
3230
|
+
},{"../core/AxiosError":15,"../utils":39}],13:[function(require,module,exports){
|
|
3229
3231
|
'use strict';
|
|
3230
3232
|
|
|
3231
3233
|
module.exports = function isCancel(value) {
|
|
3232
3234
|
return !!(value && value.__CANCEL__);
|
|
3233
3235
|
};
|
|
3234
3236
|
|
|
3235
|
-
},{}],
|
|
3237
|
+
},{}],14:[function(require,module,exports){
|
|
3236
3238
|
'use strict';
|
|
3237
3239
|
|
|
3238
3240
|
var utils = require('./../utils');
|
|
@@ -3394,7 +3396,7 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
|
3394
3396
|
|
|
3395
3397
|
module.exports = Axios;
|
|
3396
3398
|
|
|
3397
|
-
},{"../helpers/buildURL":
|
|
3399
|
+
},{"../helpers/buildURL":26,"../helpers/validator":38,"./../utils":39,"./InterceptorManager":16,"./buildFullPath":17,"./dispatchRequest":18,"./mergeConfig":19}],15:[function(require,module,exports){
|
|
3398
3400
|
'use strict';
|
|
3399
3401
|
|
|
3400
3402
|
var utils = require('../utils');
|
|
@@ -3482,7 +3484,7 @@ AxiosError.from = function(error, code, config, request, response, customProps)
|
|
|
3482
3484
|
|
|
3483
3485
|
module.exports = AxiosError;
|
|
3484
3486
|
|
|
3485
|
-
},{"../utils":
|
|
3487
|
+
},{"../utils":39}],16:[function(require,module,exports){
|
|
3486
3488
|
'use strict';
|
|
3487
3489
|
|
|
3488
3490
|
var utils = require('./../utils');
|
|
@@ -3538,7 +3540,7 @@ InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
|
3538
3540
|
|
|
3539
3541
|
module.exports = InterceptorManager;
|
|
3540
3542
|
|
|
3541
|
-
},{"./../utils":
|
|
3543
|
+
},{"./../utils":39}],17:[function(require,module,exports){
|
|
3542
3544
|
'use strict';
|
|
3543
3545
|
|
|
3544
3546
|
var isAbsoluteURL = require('../helpers/isAbsoluteURL');
|
|
@@ -3560,7 +3562,7 @@ module.exports = function buildFullPath(baseURL, requestedURL) {
|
|
|
3560
3562
|
return requestedURL;
|
|
3561
3563
|
};
|
|
3562
3564
|
|
|
3563
|
-
},{"../helpers/combineURLs":
|
|
3565
|
+
},{"../helpers/combineURLs":27,"../helpers/isAbsoluteURL":29}],18:[function(require,module,exports){
|
|
3564
3566
|
'use strict';
|
|
3565
3567
|
|
|
3566
3568
|
var utils = require('./../utils');
|
|
@@ -3649,7 +3651,7 @@ module.exports = function dispatchRequest(config) {
|
|
|
3649
3651
|
});
|
|
3650
3652
|
};
|
|
3651
3653
|
|
|
3652
|
-
},{"../cancel/CanceledError":
|
|
3654
|
+
},{"../cancel/CanceledError":12,"../cancel/isCancel":13,"../defaults":22,"./../utils":39,"./transformData":21}],19:[function(require,module,exports){
|
|
3653
3655
|
'use strict';
|
|
3654
3656
|
|
|
3655
3657
|
var utils = require('../utils');
|
|
@@ -3751,7 +3753,7 @@ module.exports = function mergeConfig(config1, config2) {
|
|
|
3751
3753
|
return config;
|
|
3752
3754
|
};
|
|
3753
3755
|
|
|
3754
|
-
},{"../utils":
|
|
3756
|
+
},{"../utils":39}],20:[function(require,module,exports){
|
|
3755
3757
|
'use strict';
|
|
3756
3758
|
|
|
3757
3759
|
var AxiosError = require('./AxiosError');
|
|
@@ -3778,7 +3780,7 @@ module.exports = function settle(resolve, reject, response) {
|
|
|
3778
3780
|
}
|
|
3779
3781
|
};
|
|
3780
3782
|
|
|
3781
|
-
},{"./AxiosError":
|
|
3783
|
+
},{"./AxiosError":15}],21:[function(require,module,exports){
|
|
3782
3784
|
'use strict';
|
|
3783
3785
|
|
|
3784
3786
|
var utils = require('./../utils');
|
|
@@ -3802,7 +3804,7 @@ module.exports = function transformData(data, headers, fns) {
|
|
|
3802
3804
|
return data;
|
|
3803
3805
|
};
|
|
3804
3806
|
|
|
3805
|
-
},{"../defaults":
|
|
3807
|
+
},{"../defaults":22,"./../utils":39}],22:[function(require,module,exports){
|
|
3806
3808
|
(function (process){(function (){
|
|
3807
3809
|
'use strict';
|
|
3808
3810
|
|
|
@@ -3952,7 +3954,7 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
|
3952
3954
|
module.exports = defaults;
|
|
3953
3955
|
|
|
3954
3956
|
}).call(this)}).call(this,require('_process'))
|
|
3955
|
-
},{"../adapters/http":
|
|
3957
|
+
},{"../adapters/http":9,"../adapters/xhr":9,"../core/AxiosError":15,"../helpers/normalizeHeaderName":32,"../helpers/toFormData":37,"../utils":39,"./env/FormData":33,"./transitional":23,"_process":7}],23:[function(require,module,exports){
|
|
3956
3958
|
'use strict';
|
|
3957
3959
|
|
|
3958
3960
|
module.exports = {
|
|
@@ -3961,11 +3963,11 @@ module.exports = {
|
|
|
3961
3963
|
clarifyTimeoutError: false
|
|
3962
3964
|
};
|
|
3963
3965
|
|
|
3964
|
-
},{}],
|
|
3966
|
+
},{}],24:[function(require,module,exports){
|
|
3965
3967
|
module.exports = {
|
|
3966
3968
|
"version": "0.27.2"
|
|
3967
3969
|
};
|
|
3968
|
-
},{}],
|
|
3970
|
+
},{}],25:[function(require,module,exports){
|
|
3969
3971
|
'use strict';
|
|
3970
3972
|
|
|
3971
3973
|
module.exports = function bind(fn, thisArg) {
|
|
@@ -3978,7 +3980,7 @@ module.exports = function bind(fn, thisArg) {
|
|
|
3978
3980
|
};
|
|
3979
3981
|
};
|
|
3980
3982
|
|
|
3981
|
-
},{}],
|
|
3983
|
+
},{}],26:[function(require,module,exports){
|
|
3982
3984
|
'use strict';
|
|
3983
3985
|
|
|
3984
3986
|
var utils = require('./../utils');
|
|
@@ -4050,7 +4052,7 @@ module.exports = function buildURL(url, params, paramsSerializer) {
|
|
|
4050
4052
|
return url;
|
|
4051
4053
|
};
|
|
4052
4054
|
|
|
4053
|
-
},{"./../utils":
|
|
4055
|
+
},{"./../utils":39}],27:[function(require,module,exports){
|
|
4054
4056
|
'use strict';
|
|
4055
4057
|
|
|
4056
4058
|
/**
|
|
@@ -4066,7 +4068,7 @@ module.exports = function combineURLs(baseURL, relativeURL) {
|
|
|
4066
4068
|
: baseURL;
|
|
4067
4069
|
};
|
|
4068
4070
|
|
|
4069
|
-
},{}],
|
|
4071
|
+
},{}],28:[function(require,module,exports){
|
|
4070
4072
|
'use strict';
|
|
4071
4073
|
|
|
4072
4074
|
var utils = require('./../utils');
|
|
@@ -4121,7 +4123,7 @@ module.exports = (
|
|
|
4121
4123
|
})()
|
|
4122
4124
|
);
|
|
4123
4125
|
|
|
4124
|
-
},{"./../utils":
|
|
4126
|
+
},{"./../utils":39}],29:[function(require,module,exports){
|
|
4125
4127
|
'use strict';
|
|
4126
4128
|
|
|
4127
4129
|
/**
|
|
@@ -4137,7 +4139,7 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
4137
4139
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
4138
4140
|
};
|
|
4139
4141
|
|
|
4140
|
-
},{}],
|
|
4142
|
+
},{}],30:[function(require,module,exports){
|
|
4141
4143
|
'use strict';
|
|
4142
4144
|
|
|
4143
4145
|
var utils = require('./../utils');
|
|
@@ -4152,7 +4154,7 @@ module.exports = function isAxiosError(payload) {
|
|
|
4152
4154
|
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
4153
4155
|
};
|
|
4154
4156
|
|
|
4155
|
-
},{"./../utils":
|
|
4157
|
+
},{"./../utils":39}],31:[function(require,module,exports){
|
|
4156
4158
|
'use strict';
|
|
4157
4159
|
|
|
4158
4160
|
var utils = require('./../utils');
|
|
@@ -4222,7 +4224,7 @@ module.exports = (
|
|
|
4222
4224
|
})()
|
|
4223
4225
|
);
|
|
4224
4226
|
|
|
4225
|
-
},{"./../utils":
|
|
4227
|
+
},{"./../utils":39}],32:[function(require,module,exports){
|
|
4226
4228
|
'use strict';
|
|
4227
4229
|
|
|
4228
4230
|
var utils = require('../utils');
|
|
@@ -4236,11 +4238,11 @@ module.exports = function normalizeHeaderName(headers, normalizedName) {
|
|
|
4236
4238
|
});
|
|
4237
4239
|
};
|
|
4238
4240
|
|
|
4239
|
-
},{"../utils":
|
|
4241
|
+
},{"../utils":39}],33:[function(require,module,exports){
|
|
4240
4242
|
// eslint-disable-next-line strict
|
|
4241
4243
|
module.exports = null;
|
|
4242
4244
|
|
|
4243
|
-
},{}],
|
|
4245
|
+
},{}],34:[function(require,module,exports){
|
|
4244
4246
|
'use strict';
|
|
4245
4247
|
|
|
4246
4248
|
var utils = require('./../utils');
|
|
@@ -4295,7 +4297,7 @@ module.exports = function parseHeaders(headers) {
|
|
|
4295
4297
|
return parsed;
|
|
4296
4298
|
};
|
|
4297
4299
|
|
|
4298
|
-
},{"./../utils":
|
|
4300
|
+
},{"./../utils":39}],35:[function(require,module,exports){
|
|
4299
4301
|
'use strict';
|
|
4300
4302
|
|
|
4301
4303
|
module.exports = function parseProtocol(url) {
|
|
@@ -4303,7 +4305,7 @@ module.exports = function parseProtocol(url) {
|
|
|
4303
4305
|
return match && match[1] || '';
|
|
4304
4306
|
};
|
|
4305
4307
|
|
|
4306
|
-
},{}],
|
|
4308
|
+
},{}],36:[function(require,module,exports){
|
|
4307
4309
|
'use strict';
|
|
4308
4310
|
|
|
4309
4311
|
/**
|
|
@@ -4332,7 +4334,7 @@ module.exports = function spread(callback) {
|
|
|
4332
4334
|
};
|
|
4333
4335
|
};
|
|
4334
4336
|
|
|
4335
|
-
},{}],
|
|
4337
|
+
},{}],37:[function(require,module,exports){
|
|
4336
4338
|
(function (Buffer){(function (){
|
|
4337
4339
|
'use strict';
|
|
4338
4340
|
|
|
@@ -4408,7 +4410,7 @@ function toFormData(obj, formData) {
|
|
|
4408
4410
|
module.exports = toFormData;
|
|
4409
4411
|
|
|
4410
4412
|
}).call(this)}).call(this,require("buffer").Buffer)
|
|
4411
|
-
},{"../utils":
|
|
4413
|
+
},{"../utils":39,"buffer":3}],38:[function(require,module,exports){
|
|
4412
4414
|
'use strict';
|
|
4413
4415
|
|
|
4414
4416
|
var VERSION = require('../env/data').version;
|
|
@@ -4496,7 +4498,7 @@ module.exports = {
|
|
|
4496
4498
|
validators: validators
|
|
4497
4499
|
};
|
|
4498
4500
|
|
|
4499
|
-
},{"../core/AxiosError":
|
|
4501
|
+
},{"../core/AxiosError":15,"../env/data":24}],39:[function(require,module,exports){
|
|
4500
4502
|
'use strict';
|
|
4501
4503
|
|
|
4502
4504
|
var bind = require('./helpers/bind');
|
|
@@ -4968,15 +4970,2071 @@ module.exports = {
|
|
|
4968
4970
|
isFileList: isFileList
|
|
4969
4971
|
};
|
|
4970
4972
|
|
|
4971
|
-
},{"./helpers/bind":
|
|
4973
|
+
},{"./helpers/bind":25}],40:[function(require,module,exports){
|
|
4974
|
+
'use strict';
|
|
4975
|
+
|
|
4976
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4977
|
+
|
|
4978
|
+
var callBind = require('./');
|
|
4979
|
+
|
|
4980
|
+
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
4981
|
+
|
|
4982
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
4983
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
4984
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
4985
|
+
return callBind(intrinsic);
|
|
4986
|
+
}
|
|
4987
|
+
return intrinsic;
|
|
4988
|
+
};
|
|
4989
|
+
|
|
4990
|
+
},{"./":41,"get-intrinsic":44}],41:[function(require,module,exports){
|
|
4991
|
+
'use strict';
|
|
4992
|
+
|
|
4993
|
+
var bind = require('function-bind');
|
|
4994
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4995
|
+
|
|
4996
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
4997
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
4998
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
4999
|
+
|
|
5000
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
5001
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
5002
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
5003
|
+
|
|
5004
|
+
if ($defineProperty) {
|
|
5005
|
+
try {
|
|
5006
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
5007
|
+
} catch (e) {
|
|
5008
|
+
// IE 8 has a broken defineProperty
|
|
5009
|
+
$defineProperty = null;
|
|
5010
|
+
}
|
|
5011
|
+
}
|
|
5012
|
+
|
|
5013
|
+
module.exports = function callBind(originalFunction) {
|
|
5014
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
5015
|
+
if ($gOPD && $defineProperty) {
|
|
5016
|
+
var desc = $gOPD(func, 'length');
|
|
5017
|
+
if (desc.configurable) {
|
|
5018
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
5019
|
+
$defineProperty(
|
|
5020
|
+
func,
|
|
5021
|
+
'length',
|
|
5022
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
5023
|
+
);
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5026
|
+
return func;
|
|
5027
|
+
};
|
|
5028
|
+
|
|
5029
|
+
var applyBind = function applyBind() {
|
|
5030
|
+
return $reflectApply(bind, $apply, arguments);
|
|
5031
|
+
};
|
|
5032
|
+
|
|
5033
|
+
if ($defineProperty) {
|
|
5034
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
5035
|
+
} else {
|
|
5036
|
+
module.exports.apply = applyBind;
|
|
5037
|
+
}
|
|
5038
|
+
|
|
5039
|
+
},{"function-bind":43,"get-intrinsic":44}],42:[function(require,module,exports){
|
|
5040
|
+
'use strict';
|
|
5041
|
+
|
|
5042
|
+
/* eslint no-invalid-this: 1 */
|
|
5043
|
+
|
|
5044
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
5045
|
+
var slice = Array.prototype.slice;
|
|
5046
|
+
var toStr = Object.prototype.toString;
|
|
5047
|
+
var funcType = '[object Function]';
|
|
5048
|
+
|
|
5049
|
+
module.exports = function bind(that) {
|
|
5050
|
+
var target = this;
|
|
5051
|
+
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
|
5052
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
5053
|
+
}
|
|
5054
|
+
var args = slice.call(arguments, 1);
|
|
5055
|
+
|
|
5056
|
+
var bound;
|
|
5057
|
+
var binder = function () {
|
|
5058
|
+
if (this instanceof bound) {
|
|
5059
|
+
var result = target.apply(
|
|
5060
|
+
this,
|
|
5061
|
+
args.concat(slice.call(arguments))
|
|
5062
|
+
);
|
|
5063
|
+
if (Object(result) === result) {
|
|
5064
|
+
return result;
|
|
5065
|
+
}
|
|
5066
|
+
return this;
|
|
5067
|
+
} else {
|
|
5068
|
+
return target.apply(
|
|
5069
|
+
that,
|
|
5070
|
+
args.concat(slice.call(arguments))
|
|
5071
|
+
);
|
|
5072
|
+
}
|
|
5073
|
+
};
|
|
5074
|
+
|
|
5075
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
5076
|
+
var boundArgs = [];
|
|
5077
|
+
for (var i = 0; i < boundLength; i++) {
|
|
5078
|
+
boundArgs.push('$' + i);
|
|
5079
|
+
}
|
|
5080
|
+
|
|
5081
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
5082
|
+
|
|
5083
|
+
if (target.prototype) {
|
|
5084
|
+
var Empty = function Empty() {};
|
|
5085
|
+
Empty.prototype = target.prototype;
|
|
5086
|
+
bound.prototype = new Empty();
|
|
5087
|
+
Empty.prototype = null;
|
|
5088
|
+
}
|
|
5089
|
+
|
|
5090
|
+
return bound;
|
|
5091
|
+
};
|
|
5092
|
+
|
|
5093
|
+
},{}],43:[function(require,module,exports){
|
|
5094
|
+
'use strict';
|
|
5095
|
+
|
|
5096
|
+
var implementation = require('./implementation');
|
|
5097
|
+
|
|
5098
|
+
module.exports = Function.prototype.bind || implementation;
|
|
5099
|
+
|
|
5100
|
+
},{"./implementation":42}],44:[function(require,module,exports){
|
|
5101
|
+
'use strict';
|
|
5102
|
+
|
|
5103
|
+
var undefined;
|
|
5104
|
+
|
|
5105
|
+
var $SyntaxError = SyntaxError;
|
|
5106
|
+
var $Function = Function;
|
|
5107
|
+
var $TypeError = TypeError;
|
|
5108
|
+
|
|
5109
|
+
// eslint-disable-next-line consistent-return
|
|
5110
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
5111
|
+
try {
|
|
5112
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
5113
|
+
} catch (e) {}
|
|
5114
|
+
};
|
|
5115
|
+
|
|
5116
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
5117
|
+
if ($gOPD) {
|
|
5118
|
+
try {
|
|
5119
|
+
$gOPD({}, '');
|
|
5120
|
+
} catch (e) {
|
|
5121
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
5122
|
+
}
|
|
5123
|
+
}
|
|
5124
|
+
|
|
5125
|
+
var throwTypeError = function () {
|
|
5126
|
+
throw new $TypeError();
|
|
5127
|
+
};
|
|
5128
|
+
var ThrowTypeError = $gOPD
|
|
5129
|
+
? (function () {
|
|
5130
|
+
try {
|
|
5131
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
5132
|
+
arguments.callee; // IE 8 does not throw here
|
|
5133
|
+
return throwTypeError;
|
|
5134
|
+
} catch (calleeThrows) {
|
|
5135
|
+
try {
|
|
5136
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
5137
|
+
return $gOPD(arguments, 'callee').get;
|
|
5138
|
+
} catch (gOPDthrows) {
|
|
5139
|
+
return throwTypeError;
|
|
5140
|
+
}
|
|
5141
|
+
}
|
|
5142
|
+
}())
|
|
5143
|
+
: throwTypeError;
|
|
5144
|
+
|
|
5145
|
+
var hasSymbols = require('has-symbols')();
|
|
5146
|
+
|
|
5147
|
+
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
5148
|
+
|
|
5149
|
+
var needsEval = {};
|
|
5150
|
+
|
|
5151
|
+
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
|
5152
|
+
|
|
5153
|
+
var INTRINSICS = {
|
|
5154
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
|
5155
|
+
'%Array%': Array,
|
|
5156
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
|
5157
|
+
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
|
5158
|
+
'%AsyncFromSyncIteratorPrototype%': undefined,
|
|
5159
|
+
'%AsyncFunction%': needsEval,
|
|
5160
|
+
'%AsyncGenerator%': needsEval,
|
|
5161
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
5162
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
5163
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
|
5164
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
|
5165
|
+
'%Boolean%': Boolean,
|
|
5166
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
|
5167
|
+
'%Date%': Date,
|
|
5168
|
+
'%decodeURI%': decodeURI,
|
|
5169
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
5170
|
+
'%encodeURI%': encodeURI,
|
|
5171
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
5172
|
+
'%Error%': Error,
|
|
5173
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
5174
|
+
'%EvalError%': EvalError,
|
|
5175
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
|
5176
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
|
5177
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
|
5178
|
+
'%Function%': $Function,
|
|
5179
|
+
'%GeneratorFunction%': needsEval,
|
|
5180
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
|
5181
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
|
5182
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
|
5183
|
+
'%isFinite%': isFinite,
|
|
5184
|
+
'%isNaN%': isNaN,
|
|
5185
|
+
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
|
5186
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
|
5187
|
+
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
|
5188
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
|
5189
|
+
'%Math%': Math,
|
|
5190
|
+
'%Number%': Number,
|
|
5191
|
+
'%Object%': Object,
|
|
5192
|
+
'%parseFloat%': parseFloat,
|
|
5193
|
+
'%parseInt%': parseInt,
|
|
5194
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
|
5195
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
|
5196
|
+
'%RangeError%': RangeError,
|
|
5197
|
+
'%ReferenceError%': ReferenceError,
|
|
5198
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
|
5199
|
+
'%RegExp%': RegExp,
|
|
5200
|
+
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
|
5201
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
|
5202
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
|
5203
|
+
'%String%': String,
|
|
5204
|
+
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
|
5205
|
+
'%Symbol%': hasSymbols ? Symbol : undefined,
|
|
5206
|
+
'%SyntaxError%': $SyntaxError,
|
|
5207
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
5208
|
+
'%TypedArray%': TypedArray,
|
|
5209
|
+
'%TypeError%': $TypeError,
|
|
5210
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
|
5211
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
|
5212
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
|
5213
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
|
5214
|
+
'%URIError%': URIError,
|
|
5215
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
|
5216
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
|
5217
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
|
5218
|
+
};
|
|
5219
|
+
|
|
5220
|
+
var doEval = function doEval(name) {
|
|
5221
|
+
var value;
|
|
5222
|
+
if (name === '%AsyncFunction%') {
|
|
5223
|
+
value = getEvalledConstructor('async function () {}');
|
|
5224
|
+
} else if (name === '%GeneratorFunction%') {
|
|
5225
|
+
value = getEvalledConstructor('function* () {}');
|
|
5226
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
5227
|
+
value = getEvalledConstructor('async function* () {}');
|
|
5228
|
+
} else if (name === '%AsyncGenerator%') {
|
|
5229
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
5230
|
+
if (fn) {
|
|
5231
|
+
value = fn.prototype;
|
|
5232
|
+
}
|
|
5233
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
5234
|
+
var gen = doEval('%AsyncGenerator%');
|
|
5235
|
+
if (gen) {
|
|
5236
|
+
value = getProto(gen.prototype);
|
|
5237
|
+
}
|
|
5238
|
+
}
|
|
5239
|
+
|
|
5240
|
+
INTRINSICS[name] = value;
|
|
5241
|
+
|
|
5242
|
+
return value;
|
|
5243
|
+
};
|
|
5244
|
+
|
|
5245
|
+
var LEGACY_ALIASES = {
|
|
5246
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
5247
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
5248
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
5249
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
5250
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
5251
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
5252
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
5253
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
5254
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
5255
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
5256
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
5257
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
5258
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
5259
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
5260
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
5261
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
5262
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
5263
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
5264
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
5265
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
5266
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
5267
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
5268
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
5269
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
5270
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
5271
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
5272
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
5273
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
5274
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
5275
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
5276
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
5277
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
5278
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
5279
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
5280
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
5281
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
5282
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
5283
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
5284
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
5285
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
5286
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
5287
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
5288
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
5289
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
5290
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
5291
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
5292
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
5293
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
5294
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
5295
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
5296
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
5297
|
+
};
|
|
5298
|
+
|
|
5299
|
+
var bind = require('function-bind');
|
|
5300
|
+
var hasOwn = require('has');
|
|
5301
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
5302
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
5303
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
5304
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
5305
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
5306
|
+
|
|
5307
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
5308
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
5309
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
5310
|
+
var stringToPath = function stringToPath(string) {
|
|
5311
|
+
var first = $strSlice(string, 0, 1);
|
|
5312
|
+
var last = $strSlice(string, -1);
|
|
5313
|
+
if (first === '%' && last !== '%') {
|
|
5314
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
5315
|
+
} else if (last === '%' && first !== '%') {
|
|
5316
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
5317
|
+
}
|
|
5318
|
+
var result = [];
|
|
5319
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
5320
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
5321
|
+
});
|
|
5322
|
+
return result;
|
|
5323
|
+
};
|
|
5324
|
+
/* end adaptation */
|
|
5325
|
+
|
|
5326
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
5327
|
+
var intrinsicName = name;
|
|
5328
|
+
var alias;
|
|
5329
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
5330
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
5331
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
5332
|
+
}
|
|
5333
|
+
|
|
5334
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
5335
|
+
var value = INTRINSICS[intrinsicName];
|
|
5336
|
+
if (value === needsEval) {
|
|
5337
|
+
value = doEval(intrinsicName);
|
|
5338
|
+
}
|
|
5339
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
5340
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
5341
|
+
}
|
|
5342
|
+
|
|
5343
|
+
return {
|
|
5344
|
+
alias: alias,
|
|
5345
|
+
name: intrinsicName,
|
|
5346
|
+
value: value
|
|
5347
|
+
};
|
|
5348
|
+
}
|
|
5349
|
+
|
|
5350
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
5351
|
+
};
|
|
5352
|
+
|
|
5353
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
5354
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
5355
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
5356
|
+
}
|
|
5357
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
5358
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
5359
|
+
}
|
|
5360
|
+
|
|
5361
|
+
if ($exec(/^%?[^%]*%?$/g, name) === null) {
|
|
5362
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
5363
|
+
}
|
|
5364
|
+
var parts = stringToPath(name);
|
|
5365
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
5366
|
+
|
|
5367
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
5368
|
+
var intrinsicRealName = intrinsic.name;
|
|
5369
|
+
var value = intrinsic.value;
|
|
5370
|
+
var skipFurtherCaching = false;
|
|
5371
|
+
|
|
5372
|
+
var alias = intrinsic.alias;
|
|
5373
|
+
if (alias) {
|
|
5374
|
+
intrinsicBaseName = alias[0];
|
|
5375
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
5376
|
+
}
|
|
5377
|
+
|
|
5378
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
5379
|
+
var part = parts[i];
|
|
5380
|
+
var first = $strSlice(part, 0, 1);
|
|
5381
|
+
var last = $strSlice(part, -1);
|
|
5382
|
+
if (
|
|
5383
|
+
(
|
|
5384
|
+
(first === '"' || first === "'" || first === '`')
|
|
5385
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
5386
|
+
)
|
|
5387
|
+
&& first !== last
|
|
5388
|
+
) {
|
|
5389
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
5390
|
+
}
|
|
5391
|
+
if (part === 'constructor' || !isOwn) {
|
|
5392
|
+
skipFurtherCaching = true;
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
intrinsicBaseName += '.' + part;
|
|
5396
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
5397
|
+
|
|
5398
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
5399
|
+
value = INTRINSICS[intrinsicRealName];
|
|
5400
|
+
} else if (value != null) {
|
|
5401
|
+
if (!(part in value)) {
|
|
5402
|
+
if (!allowMissing) {
|
|
5403
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
5404
|
+
}
|
|
5405
|
+
return void undefined;
|
|
5406
|
+
}
|
|
5407
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
5408
|
+
var desc = $gOPD(value, part);
|
|
5409
|
+
isOwn = !!desc;
|
|
5410
|
+
|
|
5411
|
+
// By convention, when a data property is converted to an accessor
|
|
5412
|
+
// property to emulate a data property that does not suffer from
|
|
5413
|
+
// the override mistake, that accessor's getter is marked with
|
|
5414
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
5415
|
+
// uphold the illusion by pretending to see that original data
|
|
5416
|
+
// property, i.e., returning the value rather than the getter
|
|
5417
|
+
// itself.
|
|
5418
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
5419
|
+
value = desc.get;
|
|
5420
|
+
} else {
|
|
5421
|
+
value = value[part];
|
|
5422
|
+
}
|
|
5423
|
+
} else {
|
|
5424
|
+
isOwn = hasOwn(value, part);
|
|
5425
|
+
value = value[part];
|
|
5426
|
+
}
|
|
5427
|
+
|
|
5428
|
+
if (isOwn && !skipFurtherCaching) {
|
|
5429
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
5430
|
+
}
|
|
5431
|
+
}
|
|
5432
|
+
}
|
|
5433
|
+
return value;
|
|
5434
|
+
};
|
|
5435
|
+
|
|
5436
|
+
},{"function-bind":43,"has":47,"has-symbols":45}],45:[function(require,module,exports){
|
|
5437
|
+
'use strict';
|
|
5438
|
+
|
|
5439
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
5440
|
+
var hasSymbolSham = require('./shams');
|
|
5441
|
+
|
|
5442
|
+
module.exports = function hasNativeSymbols() {
|
|
5443
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
5444
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
5445
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
5446
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
5447
|
+
|
|
5448
|
+
return hasSymbolSham();
|
|
5449
|
+
};
|
|
5450
|
+
|
|
5451
|
+
},{"./shams":46}],46:[function(require,module,exports){
|
|
5452
|
+
'use strict';
|
|
5453
|
+
|
|
5454
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
5455
|
+
module.exports = function hasSymbols() {
|
|
5456
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
5457
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
5458
|
+
|
|
5459
|
+
var obj = {};
|
|
5460
|
+
var sym = Symbol('test');
|
|
5461
|
+
var symObj = Object(sym);
|
|
5462
|
+
if (typeof sym === 'string') { return false; }
|
|
5463
|
+
|
|
5464
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
5465
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
5466
|
+
|
|
5467
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
5468
|
+
// if (sym instanceof Symbol) { return false; }
|
|
5469
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
5470
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
5471
|
+
|
|
5472
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
5473
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
5474
|
+
|
|
5475
|
+
var symVal = 42;
|
|
5476
|
+
obj[sym] = symVal;
|
|
5477
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
5478
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
5479
|
+
|
|
5480
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
5481
|
+
|
|
5482
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
5483
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
5484
|
+
|
|
5485
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
5486
|
+
|
|
5487
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
5488
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
5489
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
5490
|
+
}
|
|
5491
|
+
|
|
5492
|
+
return true;
|
|
5493
|
+
};
|
|
5494
|
+
|
|
5495
|
+
},{}],47:[function(require,module,exports){
|
|
5496
|
+
'use strict';
|
|
5497
|
+
|
|
5498
|
+
var bind = require('function-bind');
|
|
5499
|
+
|
|
5500
|
+
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
5501
|
+
|
|
5502
|
+
},{"function-bind":43}],48:[function(require,module,exports){
|
|
5503
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
5504
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
5505
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
5506
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
5507
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
5508
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
5509
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
5510
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
5511
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
5512
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
5513
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
5514
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
5515
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
5516
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
5517
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
5518
|
+
var objectToString = Object.prototype.toString;
|
|
5519
|
+
var functionToString = Function.prototype.toString;
|
|
5520
|
+
var $match = String.prototype.match;
|
|
5521
|
+
var $slice = String.prototype.slice;
|
|
5522
|
+
var $replace = String.prototype.replace;
|
|
5523
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
5524
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
5525
|
+
var $test = RegExp.prototype.test;
|
|
5526
|
+
var $concat = Array.prototype.concat;
|
|
5527
|
+
var $join = Array.prototype.join;
|
|
5528
|
+
var $arrSlice = Array.prototype.slice;
|
|
5529
|
+
var $floor = Math.floor;
|
|
5530
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
5531
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
5532
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
5533
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
5534
|
+
// ie, `has-tostringtag/shams
|
|
5535
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
5536
|
+
? Symbol.toStringTag
|
|
5537
|
+
: null;
|
|
5538
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
5539
|
+
|
|
5540
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
5541
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
5542
|
+
? function (O) {
|
|
5543
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
5544
|
+
}
|
|
5545
|
+
: null
|
|
5546
|
+
);
|
|
5547
|
+
|
|
5548
|
+
function addNumericSeparator(num, str) {
|
|
5549
|
+
if (
|
|
5550
|
+
num === Infinity
|
|
5551
|
+
|| num === -Infinity
|
|
5552
|
+
|| num !== num
|
|
5553
|
+
|| (num && num > -1000 && num < 1000)
|
|
5554
|
+
|| $test.call(/e/, str)
|
|
5555
|
+
) {
|
|
5556
|
+
return str;
|
|
5557
|
+
}
|
|
5558
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
5559
|
+
if (typeof num === 'number') {
|
|
5560
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
5561
|
+
if (int !== num) {
|
|
5562
|
+
var intStr = String(int);
|
|
5563
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
5564
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
5565
|
+
}
|
|
5566
|
+
}
|
|
5567
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
5568
|
+
}
|
|
5569
|
+
|
|
5570
|
+
var utilInspect = require('./util.inspect');
|
|
5571
|
+
var inspectCustom = utilInspect.custom;
|
|
5572
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
5573
|
+
|
|
5574
|
+
module.exports = function inspect_(obj, options, depth, seen) {
|
|
5575
|
+
var opts = options || {};
|
|
5576
|
+
|
|
5577
|
+
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
5578
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
5579
|
+
}
|
|
5580
|
+
if (
|
|
5581
|
+
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
5582
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
5583
|
+
: opts.maxStringLength !== null
|
|
5584
|
+
)
|
|
5585
|
+
) {
|
|
5586
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
5587
|
+
}
|
|
5588
|
+
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
|
|
5589
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
5590
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
5591
|
+
}
|
|
5592
|
+
|
|
5593
|
+
if (
|
|
5594
|
+
has(opts, 'indent')
|
|
5595
|
+
&& opts.indent !== null
|
|
5596
|
+
&& opts.indent !== '\t'
|
|
5597
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
5598
|
+
) {
|
|
5599
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
5600
|
+
}
|
|
5601
|
+
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
5602
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
5603
|
+
}
|
|
5604
|
+
var numericSeparator = opts.numericSeparator;
|
|
5605
|
+
|
|
5606
|
+
if (typeof obj === 'undefined') {
|
|
5607
|
+
return 'undefined';
|
|
5608
|
+
}
|
|
5609
|
+
if (obj === null) {
|
|
5610
|
+
return 'null';
|
|
5611
|
+
}
|
|
5612
|
+
if (typeof obj === 'boolean') {
|
|
5613
|
+
return obj ? 'true' : 'false';
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
if (typeof obj === 'string') {
|
|
5617
|
+
return inspectString(obj, opts);
|
|
5618
|
+
}
|
|
5619
|
+
if (typeof obj === 'number') {
|
|
5620
|
+
if (obj === 0) {
|
|
5621
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
5622
|
+
}
|
|
5623
|
+
var str = String(obj);
|
|
5624
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
5625
|
+
}
|
|
5626
|
+
if (typeof obj === 'bigint') {
|
|
5627
|
+
var bigIntStr = String(obj) + 'n';
|
|
5628
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
5629
|
+
}
|
|
5630
|
+
|
|
5631
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
5632
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
5633
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
5634
|
+
return isArray(obj) ? '[Array]' : '[Object]';
|
|
5635
|
+
}
|
|
5636
|
+
|
|
5637
|
+
var indent = getIndent(opts, depth);
|
|
5638
|
+
|
|
5639
|
+
if (typeof seen === 'undefined') {
|
|
5640
|
+
seen = [];
|
|
5641
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
5642
|
+
return '[Circular]';
|
|
5643
|
+
}
|
|
5644
|
+
|
|
5645
|
+
function inspect(value, from, noIndent) {
|
|
5646
|
+
if (from) {
|
|
5647
|
+
seen = $arrSlice.call(seen);
|
|
5648
|
+
seen.push(from);
|
|
5649
|
+
}
|
|
5650
|
+
if (noIndent) {
|
|
5651
|
+
var newOpts = {
|
|
5652
|
+
depth: opts.depth
|
|
5653
|
+
};
|
|
5654
|
+
if (has(opts, 'quoteStyle')) {
|
|
5655
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
5656
|
+
}
|
|
5657
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
5658
|
+
}
|
|
5659
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
5660
|
+
}
|
|
5661
|
+
|
|
5662
|
+
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
|
|
5663
|
+
var name = nameOf(obj);
|
|
5664
|
+
var keys = arrObjKeys(obj, inspect);
|
|
5665
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
5666
|
+
}
|
|
5667
|
+
if (isSymbol(obj)) {
|
|
5668
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
5669
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
5670
|
+
}
|
|
5671
|
+
if (isElement(obj)) {
|
|
5672
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
5673
|
+
var attrs = obj.attributes || [];
|
|
5674
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
5675
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
5676
|
+
}
|
|
5677
|
+
s += '>';
|
|
5678
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
5679
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
5680
|
+
return s;
|
|
5681
|
+
}
|
|
5682
|
+
if (isArray(obj)) {
|
|
5683
|
+
if (obj.length === 0) { return '[]'; }
|
|
5684
|
+
var xs = arrObjKeys(obj, inspect);
|
|
5685
|
+
if (indent && !singleLineValues(xs)) {
|
|
5686
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
5687
|
+
}
|
|
5688
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
5689
|
+
}
|
|
5690
|
+
if (isError(obj)) {
|
|
5691
|
+
var parts = arrObjKeys(obj, inspect);
|
|
5692
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
5693
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
5694
|
+
}
|
|
5695
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
5696
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
5697
|
+
}
|
|
5698
|
+
if (typeof obj === 'object' && customInspect) {
|
|
5699
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
5700
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
5701
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
5702
|
+
return obj.inspect();
|
|
5703
|
+
}
|
|
5704
|
+
}
|
|
5705
|
+
if (isMap(obj)) {
|
|
5706
|
+
var mapParts = [];
|
|
5707
|
+
mapForEach.call(obj, function (value, key) {
|
|
5708
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
5709
|
+
});
|
|
5710
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
5711
|
+
}
|
|
5712
|
+
if (isSet(obj)) {
|
|
5713
|
+
var setParts = [];
|
|
5714
|
+
setForEach.call(obj, function (value) {
|
|
5715
|
+
setParts.push(inspect(value, obj));
|
|
5716
|
+
});
|
|
5717
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
5718
|
+
}
|
|
5719
|
+
if (isWeakMap(obj)) {
|
|
5720
|
+
return weakCollectionOf('WeakMap');
|
|
5721
|
+
}
|
|
5722
|
+
if (isWeakSet(obj)) {
|
|
5723
|
+
return weakCollectionOf('WeakSet');
|
|
5724
|
+
}
|
|
5725
|
+
if (isWeakRef(obj)) {
|
|
5726
|
+
return weakCollectionOf('WeakRef');
|
|
5727
|
+
}
|
|
5728
|
+
if (isNumber(obj)) {
|
|
5729
|
+
return markBoxed(inspect(Number(obj)));
|
|
5730
|
+
}
|
|
5731
|
+
if (isBigInt(obj)) {
|
|
5732
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
5733
|
+
}
|
|
5734
|
+
if (isBoolean(obj)) {
|
|
5735
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
5736
|
+
}
|
|
5737
|
+
if (isString(obj)) {
|
|
5738
|
+
return markBoxed(inspect(String(obj)));
|
|
5739
|
+
}
|
|
5740
|
+
if (!isDate(obj) && !isRegExp(obj)) {
|
|
5741
|
+
var ys = arrObjKeys(obj, inspect);
|
|
5742
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
5743
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
5744
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
5745
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
5746
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
5747
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
5748
|
+
if (indent) {
|
|
5749
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
5750
|
+
}
|
|
5751
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
5752
|
+
}
|
|
5753
|
+
return String(obj);
|
|
5754
|
+
};
|
|
5755
|
+
|
|
5756
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
5757
|
+
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
5758
|
+
return quoteChar + s + quoteChar;
|
|
5759
|
+
}
|
|
5760
|
+
|
|
5761
|
+
function quote(s) {
|
|
5762
|
+
return $replace.call(String(s), /"/g, '"');
|
|
5763
|
+
}
|
|
5764
|
+
|
|
5765
|
+
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
5766
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
5767
|
+
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
5768
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
5769
|
+
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
5770
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
5771
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
5772
|
+
|
|
5773
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
5774
|
+
function isSymbol(obj) {
|
|
5775
|
+
if (hasShammedSymbols) {
|
|
5776
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
5777
|
+
}
|
|
5778
|
+
if (typeof obj === 'symbol') {
|
|
5779
|
+
return true;
|
|
5780
|
+
}
|
|
5781
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
5782
|
+
return false;
|
|
5783
|
+
}
|
|
5784
|
+
try {
|
|
5785
|
+
symToString.call(obj);
|
|
5786
|
+
return true;
|
|
5787
|
+
} catch (e) {}
|
|
5788
|
+
return false;
|
|
5789
|
+
}
|
|
5790
|
+
|
|
5791
|
+
function isBigInt(obj) {
|
|
5792
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
5793
|
+
return false;
|
|
5794
|
+
}
|
|
5795
|
+
try {
|
|
5796
|
+
bigIntValueOf.call(obj);
|
|
5797
|
+
return true;
|
|
5798
|
+
} catch (e) {}
|
|
5799
|
+
return false;
|
|
5800
|
+
}
|
|
5801
|
+
|
|
5802
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
5803
|
+
function has(obj, key) {
|
|
5804
|
+
return hasOwn.call(obj, key);
|
|
5805
|
+
}
|
|
5806
|
+
|
|
5807
|
+
function toStr(obj) {
|
|
5808
|
+
return objectToString.call(obj);
|
|
5809
|
+
}
|
|
5810
|
+
|
|
5811
|
+
function nameOf(f) {
|
|
5812
|
+
if (f.name) { return f.name; }
|
|
5813
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
5814
|
+
if (m) { return m[1]; }
|
|
5815
|
+
return null;
|
|
5816
|
+
}
|
|
5817
|
+
|
|
5818
|
+
function indexOf(xs, x) {
|
|
5819
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
5820
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
5821
|
+
if (xs[i] === x) { return i; }
|
|
5822
|
+
}
|
|
5823
|
+
return -1;
|
|
5824
|
+
}
|
|
5825
|
+
|
|
5826
|
+
function isMap(x) {
|
|
5827
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
5828
|
+
return false;
|
|
5829
|
+
}
|
|
5830
|
+
try {
|
|
5831
|
+
mapSize.call(x);
|
|
5832
|
+
try {
|
|
5833
|
+
setSize.call(x);
|
|
5834
|
+
} catch (s) {
|
|
5835
|
+
return true;
|
|
5836
|
+
}
|
|
5837
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
5838
|
+
} catch (e) {}
|
|
5839
|
+
return false;
|
|
5840
|
+
}
|
|
5841
|
+
|
|
5842
|
+
function isWeakMap(x) {
|
|
5843
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
5844
|
+
return false;
|
|
5845
|
+
}
|
|
5846
|
+
try {
|
|
5847
|
+
weakMapHas.call(x, weakMapHas);
|
|
5848
|
+
try {
|
|
5849
|
+
weakSetHas.call(x, weakSetHas);
|
|
5850
|
+
} catch (s) {
|
|
5851
|
+
return true;
|
|
5852
|
+
}
|
|
5853
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
5854
|
+
} catch (e) {}
|
|
5855
|
+
return false;
|
|
5856
|
+
}
|
|
5857
|
+
|
|
5858
|
+
function isWeakRef(x) {
|
|
5859
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
5860
|
+
return false;
|
|
5861
|
+
}
|
|
5862
|
+
try {
|
|
5863
|
+
weakRefDeref.call(x);
|
|
5864
|
+
return true;
|
|
5865
|
+
} catch (e) {}
|
|
5866
|
+
return false;
|
|
5867
|
+
}
|
|
5868
|
+
|
|
5869
|
+
function isSet(x) {
|
|
5870
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
5871
|
+
return false;
|
|
5872
|
+
}
|
|
5873
|
+
try {
|
|
5874
|
+
setSize.call(x);
|
|
5875
|
+
try {
|
|
5876
|
+
mapSize.call(x);
|
|
5877
|
+
} catch (m) {
|
|
5878
|
+
return true;
|
|
5879
|
+
}
|
|
5880
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
5881
|
+
} catch (e) {}
|
|
5882
|
+
return false;
|
|
5883
|
+
}
|
|
5884
|
+
|
|
5885
|
+
function isWeakSet(x) {
|
|
5886
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
5887
|
+
return false;
|
|
5888
|
+
}
|
|
5889
|
+
try {
|
|
5890
|
+
weakSetHas.call(x, weakSetHas);
|
|
5891
|
+
try {
|
|
5892
|
+
weakMapHas.call(x, weakMapHas);
|
|
5893
|
+
} catch (s) {
|
|
5894
|
+
return true;
|
|
5895
|
+
}
|
|
5896
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
5897
|
+
} catch (e) {}
|
|
5898
|
+
return false;
|
|
5899
|
+
}
|
|
5900
|
+
|
|
5901
|
+
function isElement(x) {
|
|
5902
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
5903
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
5904
|
+
return true;
|
|
5905
|
+
}
|
|
5906
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
5907
|
+
}
|
|
5908
|
+
|
|
5909
|
+
function inspectString(str, opts) {
|
|
5910
|
+
if (str.length > opts.maxStringLength) {
|
|
5911
|
+
var remaining = str.length - opts.maxStringLength;
|
|
5912
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
5913
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
5914
|
+
}
|
|
5915
|
+
// eslint-disable-next-line no-control-regex
|
|
5916
|
+
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
5917
|
+
return wrapQuotes(s, 'single', opts);
|
|
5918
|
+
}
|
|
5919
|
+
|
|
5920
|
+
function lowbyte(c) {
|
|
5921
|
+
var n = c.charCodeAt(0);
|
|
5922
|
+
var x = {
|
|
5923
|
+
8: 'b',
|
|
5924
|
+
9: 't',
|
|
5925
|
+
10: 'n',
|
|
5926
|
+
12: 'f',
|
|
5927
|
+
13: 'r'
|
|
5928
|
+
}[n];
|
|
5929
|
+
if (x) { return '\\' + x; }
|
|
5930
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
5931
|
+
}
|
|
5932
|
+
|
|
5933
|
+
function markBoxed(str) {
|
|
5934
|
+
return 'Object(' + str + ')';
|
|
5935
|
+
}
|
|
5936
|
+
|
|
5937
|
+
function weakCollectionOf(type) {
|
|
5938
|
+
return type + ' { ? }';
|
|
5939
|
+
}
|
|
5940
|
+
|
|
5941
|
+
function collectionOf(type, size, entries, indent) {
|
|
5942
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
5943
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
5944
|
+
}
|
|
5945
|
+
|
|
5946
|
+
function singleLineValues(xs) {
|
|
5947
|
+
for (var i = 0; i < xs.length; i++) {
|
|
5948
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
5949
|
+
return false;
|
|
5950
|
+
}
|
|
5951
|
+
}
|
|
5952
|
+
return true;
|
|
5953
|
+
}
|
|
5954
|
+
|
|
5955
|
+
function getIndent(opts, depth) {
|
|
5956
|
+
var baseIndent;
|
|
5957
|
+
if (opts.indent === '\t') {
|
|
5958
|
+
baseIndent = '\t';
|
|
5959
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
5960
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
5961
|
+
} else {
|
|
5962
|
+
return null;
|
|
5963
|
+
}
|
|
5964
|
+
return {
|
|
5965
|
+
base: baseIndent,
|
|
5966
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
5967
|
+
};
|
|
5968
|
+
}
|
|
5969
|
+
|
|
5970
|
+
function indentedJoin(xs, indent) {
|
|
5971
|
+
if (xs.length === 0) { return ''; }
|
|
5972
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
5973
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
5974
|
+
}
|
|
5975
|
+
|
|
5976
|
+
function arrObjKeys(obj, inspect) {
|
|
5977
|
+
var isArr = isArray(obj);
|
|
5978
|
+
var xs = [];
|
|
5979
|
+
if (isArr) {
|
|
5980
|
+
xs.length = obj.length;
|
|
5981
|
+
for (var i = 0; i < obj.length; i++) {
|
|
5982
|
+
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5985
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
5986
|
+
var symMap;
|
|
5987
|
+
if (hasShammedSymbols) {
|
|
5988
|
+
symMap = {};
|
|
5989
|
+
for (var k = 0; k < syms.length; k++) {
|
|
5990
|
+
symMap['$' + syms[k]] = syms[k];
|
|
5991
|
+
}
|
|
5992
|
+
}
|
|
5993
|
+
|
|
5994
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
5995
|
+
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
5996
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
5997
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
5998
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
5999
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
6000
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
6001
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
6002
|
+
} else {
|
|
6003
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
6004
|
+
}
|
|
6005
|
+
}
|
|
6006
|
+
if (typeof gOPS === 'function') {
|
|
6007
|
+
for (var j = 0; j < syms.length; j++) {
|
|
6008
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
6009
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
6010
|
+
}
|
|
6011
|
+
}
|
|
6012
|
+
}
|
|
6013
|
+
return xs;
|
|
6014
|
+
}
|
|
6015
|
+
|
|
6016
|
+
},{"./util.inspect":2}],49:[function(require,module,exports){
|
|
6017
|
+
'use strict';
|
|
6018
|
+
|
|
6019
|
+
var replace = String.prototype.replace;
|
|
6020
|
+
var percentTwenties = /%20/g;
|
|
6021
|
+
|
|
6022
|
+
var Format = {
|
|
6023
|
+
RFC1738: 'RFC1738',
|
|
6024
|
+
RFC3986: 'RFC3986'
|
|
6025
|
+
};
|
|
6026
|
+
|
|
6027
|
+
module.exports = {
|
|
6028
|
+
'default': Format.RFC3986,
|
|
6029
|
+
formatters: {
|
|
6030
|
+
RFC1738: function (value) {
|
|
6031
|
+
return replace.call(value, percentTwenties, '+');
|
|
6032
|
+
},
|
|
6033
|
+
RFC3986: function (value) {
|
|
6034
|
+
return String(value);
|
|
6035
|
+
}
|
|
6036
|
+
},
|
|
6037
|
+
RFC1738: Format.RFC1738,
|
|
6038
|
+
RFC3986: Format.RFC3986
|
|
6039
|
+
};
|
|
6040
|
+
|
|
6041
|
+
},{}],50:[function(require,module,exports){
|
|
6042
|
+
'use strict';
|
|
6043
|
+
|
|
6044
|
+
var stringify = require('./stringify');
|
|
6045
|
+
var parse = require('./parse');
|
|
6046
|
+
var formats = require('./formats');
|
|
6047
|
+
|
|
6048
|
+
module.exports = {
|
|
6049
|
+
formats: formats,
|
|
6050
|
+
parse: parse,
|
|
6051
|
+
stringify: stringify
|
|
6052
|
+
};
|
|
6053
|
+
|
|
6054
|
+
},{"./formats":49,"./parse":51,"./stringify":52}],51:[function(require,module,exports){
|
|
6055
|
+
'use strict';
|
|
6056
|
+
|
|
6057
|
+
var utils = require('./utils');
|
|
6058
|
+
|
|
6059
|
+
var has = Object.prototype.hasOwnProperty;
|
|
6060
|
+
var isArray = Array.isArray;
|
|
6061
|
+
|
|
6062
|
+
var defaults = {
|
|
6063
|
+
allowDots: false,
|
|
6064
|
+
allowPrototypes: false,
|
|
6065
|
+
allowSparse: false,
|
|
6066
|
+
arrayLimit: 20,
|
|
6067
|
+
charset: 'utf-8',
|
|
6068
|
+
charsetSentinel: false,
|
|
6069
|
+
comma: false,
|
|
6070
|
+
decoder: utils.decode,
|
|
6071
|
+
delimiter: '&',
|
|
6072
|
+
depth: 5,
|
|
6073
|
+
ignoreQueryPrefix: false,
|
|
6074
|
+
interpretNumericEntities: false,
|
|
6075
|
+
parameterLimit: 1000,
|
|
6076
|
+
parseArrays: true,
|
|
6077
|
+
plainObjects: false,
|
|
6078
|
+
strictNullHandling: false
|
|
6079
|
+
};
|
|
6080
|
+
|
|
6081
|
+
var interpretNumericEntities = function (str) {
|
|
6082
|
+
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
|
6083
|
+
return String.fromCharCode(parseInt(numberStr, 10));
|
|
6084
|
+
});
|
|
6085
|
+
};
|
|
6086
|
+
|
|
6087
|
+
var parseArrayValue = function (val, options) {
|
|
6088
|
+
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
6089
|
+
return val.split(',');
|
|
6090
|
+
}
|
|
6091
|
+
|
|
6092
|
+
return val;
|
|
6093
|
+
};
|
|
6094
|
+
|
|
6095
|
+
// This is what browsers will submit when the ✓ character occurs in an
|
|
6096
|
+
// application/x-www-form-urlencoded body and the encoding of the page containing
|
|
6097
|
+
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
|
6098
|
+
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
|
6099
|
+
// the ✓ character, such as us-ascii.
|
|
6100
|
+
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
6101
|
+
|
|
6102
|
+
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
|
6103
|
+
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
|
6104
|
+
|
|
6105
|
+
var parseValues = function parseQueryStringValues(str, options) {
|
|
6106
|
+
var obj = {};
|
|
6107
|
+
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
6108
|
+
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
6109
|
+
var parts = cleanStr.split(options.delimiter, limit);
|
|
6110
|
+
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
6111
|
+
var i;
|
|
6112
|
+
|
|
6113
|
+
var charset = options.charset;
|
|
6114
|
+
if (options.charsetSentinel) {
|
|
6115
|
+
for (i = 0; i < parts.length; ++i) {
|
|
6116
|
+
if (parts[i].indexOf('utf8=') === 0) {
|
|
6117
|
+
if (parts[i] === charsetSentinel) {
|
|
6118
|
+
charset = 'utf-8';
|
|
6119
|
+
} else if (parts[i] === isoSentinel) {
|
|
6120
|
+
charset = 'iso-8859-1';
|
|
6121
|
+
}
|
|
6122
|
+
skipIndex = i;
|
|
6123
|
+
i = parts.length; // The eslint settings do not allow break;
|
|
6124
|
+
}
|
|
6125
|
+
}
|
|
6126
|
+
}
|
|
6127
|
+
|
|
6128
|
+
for (i = 0; i < parts.length; ++i) {
|
|
6129
|
+
if (i === skipIndex) {
|
|
6130
|
+
continue;
|
|
6131
|
+
}
|
|
6132
|
+
var part = parts[i];
|
|
6133
|
+
|
|
6134
|
+
var bracketEqualsPos = part.indexOf(']=');
|
|
6135
|
+
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
6136
|
+
|
|
6137
|
+
var key, val;
|
|
6138
|
+
if (pos === -1) {
|
|
6139
|
+
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
6140
|
+
val = options.strictNullHandling ? null : '';
|
|
6141
|
+
} else {
|
|
6142
|
+
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
6143
|
+
val = utils.maybeMap(
|
|
6144
|
+
parseArrayValue(part.slice(pos + 1), options),
|
|
6145
|
+
function (encodedVal) {
|
|
6146
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
6147
|
+
}
|
|
6148
|
+
);
|
|
6149
|
+
}
|
|
6150
|
+
|
|
6151
|
+
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
6152
|
+
val = interpretNumericEntities(val);
|
|
6153
|
+
}
|
|
6154
|
+
|
|
6155
|
+
if (part.indexOf('[]=') > -1) {
|
|
6156
|
+
val = isArray(val) ? [val] : val;
|
|
6157
|
+
}
|
|
6158
|
+
|
|
6159
|
+
if (has.call(obj, key)) {
|
|
6160
|
+
obj[key] = utils.combine(obj[key], val);
|
|
6161
|
+
} else {
|
|
6162
|
+
obj[key] = val;
|
|
6163
|
+
}
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6166
|
+
return obj;
|
|
6167
|
+
};
|
|
6168
|
+
|
|
6169
|
+
var parseObject = function (chain, val, options, valuesParsed) {
|
|
6170
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
|
6171
|
+
|
|
6172
|
+
for (var i = chain.length - 1; i >= 0; --i) {
|
|
6173
|
+
var obj;
|
|
6174
|
+
var root = chain[i];
|
|
6175
|
+
|
|
6176
|
+
if (root === '[]' && options.parseArrays) {
|
|
6177
|
+
obj = [].concat(leaf);
|
|
6178
|
+
} else {
|
|
6179
|
+
obj = options.plainObjects ? Object.create(null) : {};
|
|
6180
|
+
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
6181
|
+
var index = parseInt(cleanRoot, 10);
|
|
6182
|
+
if (!options.parseArrays && cleanRoot === '') {
|
|
6183
|
+
obj = { 0: leaf };
|
|
6184
|
+
} else if (
|
|
6185
|
+
!isNaN(index)
|
|
6186
|
+
&& root !== cleanRoot
|
|
6187
|
+
&& String(index) === cleanRoot
|
|
6188
|
+
&& index >= 0
|
|
6189
|
+
&& (options.parseArrays && index <= options.arrayLimit)
|
|
6190
|
+
) {
|
|
6191
|
+
obj = [];
|
|
6192
|
+
obj[index] = leaf;
|
|
6193
|
+
} else if (cleanRoot !== '__proto__') {
|
|
6194
|
+
obj[cleanRoot] = leaf;
|
|
6195
|
+
}
|
|
6196
|
+
}
|
|
6197
|
+
|
|
6198
|
+
leaf = obj;
|
|
6199
|
+
}
|
|
6200
|
+
|
|
6201
|
+
return leaf;
|
|
6202
|
+
};
|
|
6203
|
+
|
|
6204
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
6205
|
+
if (!givenKey) {
|
|
6206
|
+
return;
|
|
6207
|
+
}
|
|
6208
|
+
|
|
6209
|
+
// Transform dot notation to bracket notation
|
|
6210
|
+
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
6211
|
+
|
|
6212
|
+
// The regex chunks
|
|
6213
|
+
|
|
6214
|
+
var brackets = /(\[[^[\]]*])/;
|
|
6215
|
+
var child = /(\[[^[\]]*])/g;
|
|
6216
|
+
|
|
6217
|
+
// Get the parent
|
|
6218
|
+
|
|
6219
|
+
var segment = options.depth > 0 && brackets.exec(key);
|
|
6220
|
+
var parent = segment ? key.slice(0, segment.index) : key;
|
|
6221
|
+
|
|
6222
|
+
// Stash the parent if it exists
|
|
6223
|
+
|
|
6224
|
+
var keys = [];
|
|
6225
|
+
if (parent) {
|
|
6226
|
+
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
6227
|
+
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
6228
|
+
if (!options.allowPrototypes) {
|
|
6229
|
+
return;
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6232
|
+
|
|
6233
|
+
keys.push(parent);
|
|
6234
|
+
}
|
|
6235
|
+
|
|
6236
|
+
// Loop through children appending to the array until we hit depth
|
|
6237
|
+
|
|
6238
|
+
var i = 0;
|
|
6239
|
+
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
|
6240
|
+
i += 1;
|
|
6241
|
+
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
6242
|
+
if (!options.allowPrototypes) {
|
|
6243
|
+
return;
|
|
6244
|
+
}
|
|
6245
|
+
}
|
|
6246
|
+
keys.push(segment[1]);
|
|
6247
|
+
}
|
|
6248
|
+
|
|
6249
|
+
// If there's a remainder, just add whatever is left
|
|
6250
|
+
|
|
6251
|
+
if (segment) {
|
|
6252
|
+
keys.push('[' + key.slice(segment.index) + ']');
|
|
6253
|
+
}
|
|
6254
|
+
|
|
6255
|
+
return parseObject(keys, val, options, valuesParsed);
|
|
6256
|
+
};
|
|
6257
|
+
|
|
6258
|
+
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
6259
|
+
if (!opts) {
|
|
6260
|
+
return defaults;
|
|
6261
|
+
}
|
|
6262
|
+
|
|
6263
|
+
if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
|
|
6264
|
+
throw new TypeError('Decoder has to be a function.');
|
|
6265
|
+
}
|
|
6266
|
+
|
|
6267
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
6268
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
6269
|
+
}
|
|
6270
|
+
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
6271
|
+
|
|
6272
|
+
return {
|
|
6273
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
|
6274
|
+
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
6275
|
+
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
|
|
6276
|
+
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
|
6277
|
+
charset: charset,
|
|
6278
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
6279
|
+
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
|
6280
|
+
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
|
6281
|
+
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
6282
|
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
6283
|
+
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
|
6284
|
+
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
6285
|
+
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
6286
|
+
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
6287
|
+
parseArrays: opts.parseArrays !== false,
|
|
6288
|
+
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
6289
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
6290
|
+
};
|
|
6291
|
+
};
|
|
6292
|
+
|
|
6293
|
+
module.exports = function (str, opts) {
|
|
6294
|
+
var options = normalizeParseOptions(opts);
|
|
6295
|
+
|
|
6296
|
+
if (str === '' || str === null || typeof str === 'undefined') {
|
|
6297
|
+
return options.plainObjects ? Object.create(null) : {};
|
|
6298
|
+
}
|
|
6299
|
+
|
|
6300
|
+
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
6301
|
+
var obj = options.plainObjects ? Object.create(null) : {};
|
|
6302
|
+
|
|
6303
|
+
// Iterate over the keys and setup the new object
|
|
6304
|
+
|
|
6305
|
+
var keys = Object.keys(tempObj);
|
|
6306
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
6307
|
+
var key = keys[i];
|
|
6308
|
+
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
|
6309
|
+
obj = utils.merge(obj, newObj, options);
|
|
6310
|
+
}
|
|
6311
|
+
|
|
6312
|
+
if (options.allowSparse === true) {
|
|
6313
|
+
return obj;
|
|
6314
|
+
}
|
|
6315
|
+
|
|
6316
|
+
return utils.compact(obj);
|
|
6317
|
+
};
|
|
6318
|
+
|
|
6319
|
+
},{"./utils":53}],52:[function(require,module,exports){
|
|
6320
|
+
'use strict';
|
|
6321
|
+
|
|
6322
|
+
var getSideChannel = require('side-channel');
|
|
6323
|
+
var utils = require('./utils');
|
|
6324
|
+
var formats = require('./formats');
|
|
6325
|
+
var has = Object.prototype.hasOwnProperty;
|
|
6326
|
+
|
|
6327
|
+
var arrayPrefixGenerators = {
|
|
6328
|
+
brackets: function brackets(prefix) {
|
|
6329
|
+
return prefix + '[]';
|
|
6330
|
+
},
|
|
6331
|
+
comma: 'comma',
|
|
6332
|
+
indices: function indices(prefix, key) {
|
|
6333
|
+
return prefix + '[' + key + ']';
|
|
6334
|
+
},
|
|
6335
|
+
repeat: function repeat(prefix) {
|
|
6336
|
+
return prefix;
|
|
6337
|
+
}
|
|
6338
|
+
};
|
|
6339
|
+
|
|
6340
|
+
var isArray = Array.isArray;
|
|
6341
|
+
var split = String.prototype.split;
|
|
6342
|
+
var push = Array.prototype.push;
|
|
6343
|
+
var pushToArray = function (arr, valueOrArray) {
|
|
6344
|
+
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
6345
|
+
};
|
|
6346
|
+
|
|
6347
|
+
var toISO = Date.prototype.toISOString;
|
|
6348
|
+
|
|
6349
|
+
var defaultFormat = formats['default'];
|
|
6350
|
+
var defaults = {
|
|
6351
|
+
addQueryPrefix: false,
|
|
6352
|
+
allowDots: false,
|
|
6353
|
+
charset: 'utf-8',
|
|
6354
|
+
charsetSentinel: false,
|
|
6355
|
+
delimiter: '&',
|
|
6356
|
+
encode: true,
|
|
6357
|
+
encoder: utils.encode,
|
|
6358
|
+
encodeValuesOnly: false,
|
|
6359
|
+
format: defaultFormat,
|
|
6360
|
+
formatter: formats.formatters[defaultFormat],
|
|
6361
|
+
// deprecated
|
|
6362
|
+
indices: false,
|
|
6363
|
+
serializeDate: function serializeDate(date) {
|
|
6364
|
+
return toISO.call(date);
|
|
6365
|
+
},
|
|
6366
|
+
skipNulls: false,
|
|
6367
|
+
strictNullHandling: false
|
|
6368
|
+
};
|
|
6369
|
+
|
|
6370
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
6371
|
+
return typeof v === 'string'
|
|
6372
|
+
|| typeof v === 'number'
|
|
6373
|
+
|| typeof v === 'boolean'
|
|
6374
|
+
|| typeof v === 'symbol'
|
|
6375
|
+
|| typeof v === 'bigint';
|
|
6376
|
+
};
|
|
6377
|
+
|
|
6378
|
+
var sentinel = {};
|
|
6379
|
+
|
|
6380
|
+
var stringify = function stringify(
|
|
6381
|
+
object,
|
|
6382
|
+
prefix,
|
|
6383
|
+
generateArrayPrefix,
|
|
6384
|
+
commaRoundTrip,
|
|
6385
|
+
strictNullHandling,
|
|
6386
|
+
skipNulls,
|
|
6387
|
+
encoder,
|
|
6388
|
+
filter,
|
|
6389
|
+
sort,
|
|
6390
|
+
allowDots,
|
|
6391
|
+
serializeDate,
|
|
6392
|
+
format,
|
|
6393
|
+
formatter,
|
|
6394
|
+
encodeValuesOnly,
|
|
6395
|
+
charset,
|
|
6396
|
+
sideChannel
|
|
6397
|
+
) {
|
|
6398
|
+
var obj = object;
|
|
6399
|
+
|
|
6400
|
+
var tmpSc = sideChannel;
|
|
6401
|
+
var step = 0;
|
|
6402
|
+
var findFlag = false;
|
|
6403
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
|
|
6404
|
+
// Where object last appeared in the ref tree
|
|
6405
|
+
var pos = tmpSc.get(object);
|
|
6406
|
+
step += 1;
|
|
6407
|
+
if (typeof pos !== 'undefined') {
|
|
6408
|
+
if (pos === step) {
|
|
6409
|
+
throw new RangeError('Cyclic object value');
|
|
6410
|
+
} else {
|
|
6411
|
+
findFlag = true; // Break while
|
|
6412
|
+
}
|
|
6413
|
+
}
|
|
6414
|
+
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
6415
|
+
step = 0;
|
|
6416
|
+
}
|
|
6417
|
+
}
|
|
6418
|
+
|
|
6419
|
+
if (typeof filter === 'function') {
|
|
6420
|
+
obj = filter(prefix, obj);
|
|
6421
|
+
} else if (obj instanceof Date) {
|
|
6422
|
+
obj = serializeDate(obj);
|
|
6423
|
+
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
6424
|
+
obj = utils.maybeMap(obj, function (value) {
|
|
6425
|
+
if (value instanceof Date) {
|
|
6426
|
+
return serializeDate(value);
|
|
6427
|
+
}
|
|
6428
|
+
return value;
|
|
6429
|
+
});
|
|
6430
|
+
}
|
|
6431
|
+
|
|
6432
|
+
if (obj === null) {
|
|
6433
|
+
if (strictNullHandling) {
|
|
6434
|
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
|
|
6435
|
+
}
|
|
6436
|
+
|
|
6437
|
+
obj = '';
|
|
6438
|
+
}
|
|
6439
|
+
|
|
6440
|
+
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
6441
|
+
if (encoder) {
|
|
6442
|
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
|
|
6443
|
+
if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
|
|
6444
|
+
var valuesArray = split.call(String(obj), ',');
|
|
6445
|
+
var valuesJoined = '';
|
|
6446
|
+
for (var i = 0; i < valuesArray.length; ++i) {
|
|
6447
|
+
valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
|
|
6448
|
+
}
|
|
6449
|
+
return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
|
|
6450
|
+
}
|
|
6451
|
+
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
|
6452
|
+
}
|
|
6453
|
+
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
6454
|
+
}
|
|
6455
|
+
|
|
6456
|
+
var values = [];
|
|
6457
|
+
|
|
6458
|
+
if (typeof obj === 'undefined') {
|
|
6459
|
+
return values;
|
|
6460
|
+
}
|
|
6461
|
+
|
|
6462
|
+
var objKeys;
|
|
6463
|
+
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
6464
|
+
// we need to join elements in
|
|
6465
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
6466
|
+
} else if (isArray(filter)) {
|
|
6467
|
+
objKeys = filter;
|
|
6468
|
+
} else {
|
|
6469
|
+
var keys = Object.keys(obj);
|
|
6470
|
+
objKeys = sort ? keys.sort(sort) : keys;
|
|
6471
|
+
}
|
|
6472
|
+
|
|
6473
|
+
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
|
|
6474
|
+
|
|
6475
|
+
for (var j = 0; j < objKeys.length; ++j) {
|
|
6476
|
+
var key = objKeys[j];
|
|
6477
|
+
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
6478
|
+
|
|
6479
|
+
if (skipNulls && value === null) {
|
|
6480
|
+
continue;
|
|
6481
|
+
}
|
|
6482
|
+
|
|
6483
|
+
var keyPrefix = isArray(obj)
|
|
6484
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
|
|
6485
|
+
: adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
6486
|
+
|
|
6487
|
+
sideChannel.set(object, step);
|
|
6488
|
+
var valueSideChannel = getSideChannel();
|
|
6489
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
6490
|
+
pushToArray(values, stringify(
|
|
6491
|
+
value,
|
|
6492
|
+
keyPrefix,
|
|
6493
|
+
generateArrayPrefix,
|
|
6494
|
+
commaRoundTrip,
|
|
6495
|
+
strictNullHandling,
|
|
6496
|
+
skipNulls,
|
|
6497
|
+
encoder,
|
|
6498
|
+
filter,
|
|
6499
|
+
sort,
|
|
6500
|
+
allowDots,
|
|
6501
|
+
serializeDate,
|
|
6502
|
+
format,
|
|
6503
|
+
formatter,
|
|
6504
|
+
encodeValuesOnly,
|
|
6505
|
+
charset,
|
|
6506
|
+
valueSideChannel
|
|
6507
|
+
));
|
|
6508
|
+
}
|
|
6509
|
+
|
|
6510
|
+
return values;
|
|
6511
|
+
};
|
|
6512
|
+
|
|
6513
|
+
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
6514
|
+
if (!opts) {
|
|
6515
|
+
return defaults;
|
|
6516
|
+
}
|
|
6517
|
+
|
|
6518
|
+
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
6519
|
+
throw new TypeError('Encoder has to be a function.');
|
|
6520
|
+
}
|
|
6521
|
+
|
|
6522
|
+
var charset = opts.charset || defaults.charset;
|
|
6523
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
6524
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
6525
|
+
}
|
|
6526
|
+
|
|
6527
|
+
var format = formats['default'];
|
|
6528
|
+
if (typeof opts.format !== 'undefined') {
|
|
6529
|
+
if (!has.call(formats.formatters, opts.format)) {
|
|
6530
|
+
throw new TypeError('Unknown format option provided.');
|
|
6531
|
+
}
|
|
6532
|
+
format = opts.format;
|
|
6533
|
+
}
|
|
6534
|
+
var formatter = formats.formatters[format];
|
|
6535
|
+
|
|
6536
|
+
var filter = defaults.filter;
|
|
6537
|
+
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
|
6538
|
+
filter = opts.filter;
|
|
6539
|
+
}
|
|
6540
|
+
|
|
6541
|
+
return {
|
|
6542
|
+
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
|
6543
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
|
6544
|
+
charset: charset,
|
|
6545
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
6546
|
+
delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
|
6547
|
+
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
|
6548
|
+
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
|
6549
|
+
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
|
6550
|
+
filter: filter,
|
|
6551
|
+
format: format,
|
|
6552
|
+
formatter: formatter,
|
|
6553
|
+
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
|
6554
|
+
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
|
6555
|
+
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
6556
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
6557
|
+
};
|
|
6558
|
+
};
|
|
6559
|
+
|
|
6560
|
+
module.exports = function (object, opts) {
|
|
6561
|
+
var obj = object;
|
|
6562
|
+
var options = normalizeStringifyOptions(opts);
|
|
6563
|
+
|
|
6564
|
+
var objKeys;
|
|
6565
|
+
var filter;
|
|
6566
|
+
|
|
6567
|
+
if (typeof options.filter === 'function') {
|
|
6568
|
+
filter = options.filter;
|
|
6569
|
+
obj = filter('', obj);
|
|
6570
|
+
} else if (isArray(options.filter)) {
|
|
6571
|
+
filter = options.filter;
|
|
6572
|
+
objKeys = filter;
|
|
6573
|
+
}
|
|
6574
|
+
|
|
6575
|
+
var keys = [];
|
|
6576
|
+
|
|
6577
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
6578
|
+
return '';
|
|
6579
|
+
}
|
|
6580
|
+
|
|
6581
|
+
var arrayFormat;
|
|
6582
|
+
if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
|
6583
|
+
arrayFormat = opts.arrayFormat;
|
|
6584
|
+
} else if (opts && 'indices' in opts) {
|
|
6585
|
+
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
6586
|
+
} else {
|
|
6587
|
+
arrayFormat = 'indices';
|
|
6588
|
+
}
|
|
6589
|
+
|
|
6590
|
+
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
6591
|
+
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
6592
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
6593
|
+
}
|
|
6594
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
6595
|
+
|
|
6596
|
+
if (!objKeys) {
|
|
6597
|
+
objKeys = Object.keys(obj);
|
|
6598
|
+
}
|
|
6599
|
+
|
|
6600
|
+
if (options.sort) {
|
|
6601
|
+
objKeys.sort(options.sort);
|
|
6602
|
+
}
|
|
6603
|
+
|
|
6604
|
+
var sideChannel = getSideChannel();
|
|
6605
|
+
for (var i = 0; i < objKeys.length; ++i) {
|
|
6606
|
+
var key = objKeys[i];
|
|
6607
|
+
|
|
6608
|
+
if (options.skipNulls && obj[key] === null) {
|
|
6609
|
+
continue;
|
|
6610
|
+
}
|
|
6611
|
+
pushToArray(keys, stringify(
|
|
6612
|
+
obj[key],
|
|
6613
|
+
key,
|
|
6614
|
+
generateArrayPrefix,
|
|
6615
|
+
commaRoundTrip,
|
|
6616
|
+
options.strictNullHandling,
|
|
6617
|
+
options.skipNulls,
|
|
6618
|
+
options.encode ? options.encoder : null,
|
|
6619
|
+
options.filter,
|
|
6620
|
+
options.sort,
|
|
6621
|
+
options.allowDots,
|
|
6622
|
+
options.serializeDate,
|
|
6623
|
+
options.format,
|
|
6624
|
+
options.formatter,
|
|
6625
|
+
options.encodeValuesOnly,
|
|
6626
|
+
options.charset,
|
|
6627
|
+
sideChannel
|
|
6628
|
+
));
|
|
6629
|
+
}
|
|
6630
|
+
|
|
6631
|
+
var joined = keys.join(options.delimiter);
|
|
6632
|
+
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
6633
|
+
|
|
6634
|
+
if (options.charsetSentinel) {
|
|
6635
|
+
if (options.charset === 'iso-8859-1') {
|
|
6636
|
+
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
6637
|
+
prefix += 'utf8=%26%2310003%3B&';
|
|
6638
|
+
} else {
|
|
6639
|
+
// encodeURIComponent('✓')
|
|
6640
|
+
prefix += 'utf8=%E2%9C%93&';
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6643
|
+
|
|
6644
|
+
return joined.length > 0 ? prefix + joined : '';
|
|
6645
|
+
};
|
|
6646
|
+
|
|
6647
|
+
},{"./formats":49,"./utils":53,"side-channel":54}],53:[function(require,module,exports){
|
|
6648
|
+
'use strict';
|
|
6649
|
+
|
|
6650
|
+
var formats = require('./formats');
|
|
6651
|
+
|
|
6652
|
+
var has = Object.prototype.hasOwnProperty;
|
|
6653
|
+
var isArray = Array.isArray;
|
|
6654
|
+
|
|
6655
|
+
var hexTable = (function () {
|
|
6656
|
+
var array = [];
|
|
6657
|
+
for (var i = 0; i < 256; ++i) {
|
|
6658
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
6659
|
+
}
|
|
6660
|
+
|
|
6661
|
+
return array;
|
|
6662
|
+
}());
|
|
6663
|
+
|
|
6664
|
+
var compactQueue = function compactQueue(queue) {
|
|
6665
|
+
while (queue.length > 1) {
|
|
6666
|
+
var item = queue.pop();
|
|
6667
|
+
var obj = item.obj[item.prop];
|
|
6668
|
+
|
|
6669
|
+
if (isArray(obj)) {
|
|
6670
|
+
var compacted = [];
|
|
6671
|
+
|
|
6672
|
+
for (var j = 0; j < obj.length; ++j) {
|
|
6673
|
+
if (typeof obj[j] !== 'undefined') {
|
|
6674
|
+
compacted.push(obj[j]);
|
|
6675
|
+
}
|
|
6676
|
+
}
|
|
6677
|
+
|
|
6678
|
+
item.obj[item.prop] = compacted;
|
|
6679
|
+
}
|
|
6680
|
+
}
|
|
6681
|
+
};
|
|
6682
|
+
|
|
6683
|
+
var arrayToObject = function arrayToObject(source, options) {
|
|
6684
|
+
var obj = options && options.plainObjects ? Object.create(null) : {};
|
|
6685
|
+
for (var i = 0; i < source.length; ++i) {
|
|
6686
|
+
if (typeof source[i] !== 'undefined') {
|
|
6687
|
+
obj[i] = source[i];
|
|
6688
|
+
}
|
|
6689
|
+
}
|
|
6690
|
+
|
|
6691
|
+
return obj;
|
|
6692
|
+
};
|
|
6693
|
+
|
|
6694
|
+
var merge = function merge(target, source, options) {
|
|
6695
|
+
/* eslint no-param-reassign: 0 */
|
|
6696
|
+
if (!source) {
|
|
6697
|
+
return target;
|
|
6698
|
+
}
|
|
6699
|
+
|
|
6700
|
+
if (typeof source !== 'object') {
|
|
6701
|
+
if (isArray(target)) {
|
|
6702
|
+
target.push(source);
|
|
6703
|
+
} else if (target && typeof target === 'object') {
|
|
6704
|
+
if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
|
|
6705
|
+
target[source] = true;
|
|
6706
|
+
}
|
|
6707
|
+
} else {
|
|
6708
|
+
return [target, source];
|
|
6709
|
+
}
|
|
6710
|
+
|
|
6711
|
+
return target;
|
|
6712
|
+
}
|
|
6713
|
+
|
|
6714
|
+
if (!target || typeof target !== 'object') {
|
|
6715
|
+
return [target].concat(source);
|
|
6716
|
+
}
|
|
6717
|
+
|
|
6718
|
+
var mergeTarget = target;
|
|
6719
|
+
if (isArray(target) && !isArray(source)) {
|
|
6720
|
+
mergeTarget = arrayToObject(target, options);
|
|
6721
|
+
}
|
|
6722
|
+
|
|
6723
|
+
if (isArray(target) && isArray(source)) {
|
|
6724
|
+
source.forEach(function (item, i) {
|
|
6725
|
+
if (has.call(target, i)) {
|
|
6726
|
+
var targetItem = target[i];
|
|
6727
|
+
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
6728
|
+
target[i] = merge(targetItem, item, options);
|
|
6729
|
+
} else {
|
|
6730
|
+
target.push(item);
|
|
6731
|
+
}
|
|
6732
|
+
} else {
|
|
6733
|
+
target[i] = item;
|
|
6734
|
+
}
|
|
6735
|
+
});
|
|
6736
|
+
return target;
|
|
6737
|
+
}
|
|
6738
|
+
|
|
6739
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
6740
|
+
var value = source[key];
|
|
6741
|
+
|
|
6742
|
+
if (has.call(acc, key)) {
|
|
6743
|
+
acc[key] = merge(acc[key], value, options);
|
|
6744
|
+
} else {
|
|
6745
|
+
acc[key] = value;
|
|
6746
|
+
}
|
|
6747
|
+
return acc;
|
|
6748
|
+
}, mergeTarget);
|
|
6749
|
+
};
|
|
6750
|
+
|
|
6751
|
+
var assign = function assignSingleSource(target, source) {
|
|
6752
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
6753
|
+
acc[key] = source[key];
|
|
6754
|
+
return acc;
|
|
6755
|
+
}, target);
|
|
6756
|
+
};
|
|
6757
|
+
|
|
6758
|
+
var decode = function (str, decoder, charset) {
|
|
6759
|
+
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
6760
|
+
if (charset === 'iso-8859-1') {
|
|
6761
|
+
// unescape never throws, no try...catch needed:
|
|
6762
|
+
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
6763
|
+
}
|
|
6764
|
+
// utf-8
|
|
6765
|
+
try {
|
|
6766
|
+
return decodeURIComponent(strWithoutPlus);
|
|
6767
|
+
} catch (e) {
|
|
6768
|
+
return strWithoutPlus;
|
|
6769
|
+
}
|
|
6770
|
+
};
|
|
6771
|
+
|
|
6772
|
+
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
6773
|
+
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
6774
|
+
// It has been adapted here for stricter adherence to RFC 3986
|
|
6775
|
+
if (str.length === 0) {
|
|
6776
|
+
return str;
|
|
6777
|
+
}
|
|
6778
|
+
|
|
6779
|
+
var string = str;
|
|
6780
|
+
if (typeof str === 'symbol') {
|
|
6781
|
+
string = Symbol.prototype.toString.call(str);
|
|
6782
|
+
} else if (typeof str !== 'string') {
|
|
6783
|
+
string = String(str);
|
|
6784
|
+
}
|
|
6785
|
+
|
|
6786
|
+
if (charset === 'iso-8859-1') {
|
|
6787
|
+
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
6788
|
+
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
6789
|
+
});
|
|
6790
|
+
}
|
|
6791
|
+
|
|
6792
|
+
var out = '';
|
|
6793
|
+
for (var i = 0; i < string.length; ++i) {
|
|
6794
|
+
var c = string.charCodeAt(i);
|
|
6795
|
+
|
|
6796
|
+
if (
|
|
6797
|
+
c === 0x2D // -
|
|
6798
|
+
|| c === 0x2E // .
|
|
6799
|
+
|| c === 0x5F // _
|
|
6800
|
+
|| c === 0x7E // ~
|
|
6801
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
6802
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
6803
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
6804
|
+
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
6805
|
+
) {
|
|
6806
|
+
out += string.charAt(i);
|
|
6807
|
+
continue;
|
|
6808
|
+
}
|
|
6809
|
+
|
|
6810
|
+
if (c < 0x80) {
|
|
6811
|
+
out = out + hexTable[c];
|
|
6812
|
+
continue;
|
|
6813
|
+
}
|
|
6814
|
+
|
|
6815
|
+
if (c < 0x800) {
|
|
6816
|
+
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
|
6817
|
+
continue;
|
|
6818
|
+
}
|
|
6819
|
+
|
|
6820
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
6821
|
+
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
|
6822
|
+
continue;
|
|
6823
|
+
}
|
|
6824
|
+
|
|
6825
|
+
i += 1;
|
|
6826
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
6827
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
6828
|
+
out += hexTable[0xF0 | (c >> 18)]
|
|
6829
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
6830
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
6831
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
6832
|
+
}
|
|
6833
|
+
|
|
6834
|
+
return out;
|
|
6835
|
+
};
|
|
6836
|
+
|
|
6837
|
+
var compact = function compact(value) {
|
|
6838
|
+
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
6839
|
+
var refs = [];
|
|
6840
|
+
|
|
6841
|
+
for (var i = 0; i < queue.length; ++i) {
|
|
6842
|
+
var item = queue[i];
|
|
6843
|
+
var obj = item.obj[item.prop];
|
|
6844
|
+
|
|
6845
|
+
var keys = Object.keys(obj);
|
|
6846
|
+
for (var j = 0; j < keys.length; ++j) {
|
|
6847
|
+
var key = keys[j];
|
|
6848
|
+
var val = obj[key];
|
|
6849
|
+
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
6850
|
+
queue.push({ obj: obj, prop: key });
|
|
6851
|
+
refs.push(val);
|
|
6852
|
+
}
|
|
6853
|
+
}
|
|
6854
|
+
}
|
|
6855
|
+
|
|
6856
|
+
compactQueue(queue);
|
|
6857
|
+
|
|
6858
|
+
return value;
|
|
6859
|
+
};
|
|
6860
|
+
|
|
6861
|
+
var isRegExp = function isRegExp(obj) {
|
|
6862
|
+
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
6863
|
+
};
|
|
6864
|
+
|
|
6865
|
+
var isBuffer = function isBuffer(obj) {
|
|
6866
|
+
if (!obj || typeof obj !== 'object') {
|
|
6867
|
+
return false;
|
|
6868
|
+
}
|
|
6869
|
+
|
|
6870
|
+
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
6871
|
+
};
|
|
6872
|
+
|
|
6873
|
+
var combine = function combine(a, b) {
|
|
6874
|
+
return [].concat(a, b);
|
|
6875
|
+
};
|
|
6876
|
+
|
|
6877
|
+
var maybeMap = function maybeMap(val, fn) {
|
|
6878
|
+
if (isArray(val)) {
|
|
6879
|
+
var mapped = [];
|
|
6880
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
6881
|
+
mapped.push(fn(val[i]));
|
|
6882
|
+
}
|
|
6883
|
+
return mapped;
|
|
6884
|
+
}
|
|
6885
|
+
return fn(val);
|
|
6886
|
+
};
|
|
6887
|
+
|
|
6888
|
+
module.exports = {
|
|
6889
|
+
arrayToObject: arrayToObject,
|
|
6890
|
+
assign: assign,
|
|
6891
|
+
combine: combine,
|
|
6892
|
+
compact: compact,
|
|
6893
|
+
decode: decode,
|
|
6894
|
+
encode: encode,
|
|
6895
|
+
isBuffer: isBuffer,
|
|
6896
|
+
isRegExp: isRegExp,
|
|
6897
|
+
maybeMap: maybeMap,
|
|
6898
|
+
merge: merge
|
|
6899
|
+
};
|
|
6900
|
+
|
|
6901
|
+
},{"./formats":49}],54:[function(require,module,exports){
|
|
6902
|
+
'use strict';
|
|
6903
|
+
|
|
6904
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
6905
|
+
var callBound = require('call-bind/callBound');
|
|
6906
|
+
var inspect = require('object-inspect');
|
|
6907
|
+
|
|
6908
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
6909
|
+
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
6910
|
+
var $Map = GetIntrinsic('%Map%', true);
|
|
6911
|
+
|
|
6912
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
6913
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
6914
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
6915
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
6916
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
6917
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
6918
|
+
|
|
6919
|
+
/*
|
|
6920
|
+
* This function traverses the list returning the node corresponding to the
|
|
6921
|
+
* given key.
|
|
6922
|
+
*
|
|
6923
|
+
* That node is also moved to the head of the list, so that if it's accessed
|
|
6924
|
+
* again we don't need to traverse the whole list. By doing so, all the recently
|
|
6925
|
+
* used nodes can be accessed relatively quickly.
|
|
6926
|
+
*/
|
|
6927
|
+
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
6928
|
+
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
6929
|
+
if (curr.key === key) {
|
|
6930
|
+
prev.next = curr.next;
|
|
6931
|
+
curr.next = list.next;
|
|
6932
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
6933
|
+
return curr;
|
|
6934
|
+
}
|
|
6935
|
+
}
|
|
6936
|
+
};
|
|
6937
|
+
|
|
6938
|
+
var listGet = function (objects, key) {
|
|
6939
|
+
var node = listGetNode(objects, key);
|
|
6940
|
+
return node && node.value;
|
|
6941
|
+
};
|
|
6942
|
+
var listSet = function (objects, key, value) {
|
|
6943
|
+
var node = listGetNode(objects, key);
|
|
6944
|
+
if (node) {
|
|
6945
|
+
node.value = value;
|
|
6946
|
+
} else {
|
|
6947
|
+
// Prepend the new node to the beginning of the list
|
|
6948
|
+
objects.next = { // eslint-disable-line no-param-reassign
|
|
6949
|
+
key: key,
|
|
6950
|
+
next: objects.next,
|
|
6951
|
+
value: value
|
|
6952
|
+
};
|
|
6953
|
+
}
|
|
6954
|
+
};
|
|
6955
|
+
var listHas = function (objects, key) {
|
|
6956
|
+
return !!listGetNode(objects, key);
|
|
6957
|
+
};
|
|
6958
|
+
|
|
6959
|
+
module.exports = function getSideChannel() {
|
|
6960
|
+
var $wm;
|
|
6961
|
+
var $m;
|
|
6962
|
+
var $o;
|
|
6963
|
+
var channel = {
|
|
6964
|
+
assert: function (key) {
|
|
6965
|
+
if (!channel.has(key)) {
|
|
6966
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
6967
|
+
}
|
|
6968
|
+
},
|
|
6969
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
6970
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
6971
|
+
if ($wm) {
|
|
6972
|
+
return $weakMapGet($wm, key);
|
|
6973
|
+
}
|
|
6974
|
+
} else if ($Map) {
|
|
6975
|
+
if ($m) {
|
|
6976
|
+
return $mapGet($m, key);
|
|
6977
|
+
}
|
|
6978
|
+
} else {
|
|
6979
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
6980
|
+
return listGet($o, key);
|
|
6981
|
+
}
|
|
6982
|
+
}
|
|
6983
|
+
},
|
|
6984
|
+
has: function (key) {
|
|
6985
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
6986
|
+
if ($wm) {
|
|
6987
|
+
return $weakMapHas($wm, key);
|
|
6988
|
+
}
|
|
6989
|
+
} else if ($Map) {
|
|
6990
|
+
if ($m) {
|
|
6991
|
+
return $mapHas($m, key);
|
|
6992
|
+
}
|
|
6993
|
+
} else {
|
|
6994
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
6995
|
+
return listHas($o, key);
|
|
6996
|
+
}
|
|
6997
|
+
}
|
|
6998
|
+
return false;
|
|
6999
|
+
},
|
|
7000
|
+
set: function (key, value) {
|
|
7001
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
7002
|
+
if (!$wm) {
|
|
7003
|
+
$wm = new $WeakMap();
|
|
7004
|
+
}
|
|
7005
|
+
$weakMapSet($wm, key, value);
|
|
7006
|
+
} else if ($Map) {
|
|
7007
|
+
if (!$m) {
|
|
7008
|
+
$m = new $Map();
|
|
7009
|
+
}
|
|
7010
|
+
$mapSet($m, key, value);
|
|
7011
|
+
} else {
|
|
7012
|
+
if (!$o) {
|
|
7013
|
+
/*
|
|
7014
|
+
* Initialize the linked list as an empty node, so that we don't have
|
|
7015
|
+
* to special-case handling of the first node: we can always refer to
|
|
7016
|
+
* it as (previous node).next, instead of something like (list).head
|
|
7017
|
+
*/
|
|
7018
|
+
$o = { key: {}, next: null };
|
|
7019
|
+
}
|
|
7020
|
+
listSet($o, key, value);
|
|
7021
|
+
}
|
|
7022
|
+
}
|
|
7023
|
+
};
|
|
7024
|
+
return channel;
|
|
7025
|
+
};
|
|
7026
|
+
|
|
7027
|
+
},{"call-bind/callBound":40,"get-intrinsic":44,"object-inspect":48}],"platformClient":[function(require,module,exports){
|
|
4972
7028
|
(function (global,Buffer){(function (){
|
|
4973
7029
|
'use strict';
|
|
4974
7030
|
|
|
4975
7031
|
var axios = require('axios');
|
|
7032
|
+
var qs = require('qs');
|
|
4976
7033
|
|
|
4977
7034
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
4978
7035
|
|
|
4979
7036
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
7037
|
+
var qs__default = /*#__PURE__*/_interopDefaultLegacy(qs);
|
|
4980
7038
|
|
|
4981
7039
|
var PureCloudRegionHosts = {
|
|
4982
7040
|
us_east_1: 'mypurecloud.com',
|
|
@@ -7248,7 +9306,7 @@ class Configuration {
|
|
|
7248
9306
|
|
|
7249
9307
|
/**
|
|
7250
9308
|
* @module purecloud-platform-client-v2/ApiClient
|
|
7251
|
-
* @version
|
|
9309
|
+
* @version 141.1.0
|
|
7252
9310
|
*/
|
|
7253
9311
|
class ApiClient {
|
|
7254
9312
|
/**
|
|
@@ -7283,7 +9341,7 @@ class ApiClient {
|
|
|
7283
9341
|
|
|
7284
9342
|
/**
|
|
7285
9343
|
* Enumeration of collection format separator strategies.
|
|
7286
|
-
* @enum {String}
|
|
9344
|
+
* @enum {String}
|
|
7287
9345
|
* @readonly
|
|
7288
9346
|
*/
|
|
7289
9347
|
this.CollectionFormatEnum = {
|
|
@@ -7430,7 +9488,7 @@ class ApiClient {
|
|
|
7430
9488
|
// Load current auth data
|
|
7431
9489
|
const tempState = this.authData.state;
|
|
7432
9490
|
this.authData = localStorage.getItem(`${this.settingsPrefix}_auth_data`);
|
|
7433
|
-
if (!this.authData)
|
|
9491
|
+
if (!this.authData)
|
|
7434
9492
|
this.authData = {};
|
|
7435
9493
|
else
|
|
7436
9494
|
this.authData = JSON.parse(this.authData);
|
|
@@ -7450,7 +9508,7 @@ class ApiClient {
|
|
|
7450
9508
|
* @description Initiates the implicit grant login flow. Will attempt to load the token from local storage, if enabled.
|
|
7451
9509
|
* @param {string} clientId - The client ID of an OAuth Implicit Grant client
|
|
7452
9510
|
* @param {string} redirectUri - The redirect URI of the OAuth Implicit Grant client
|
|
7453
|
-
* @param {object} opts - (optional) Additional options
|
|
9511
|
+
* @param {object} opts - (optional) Additional options
|
|
7454
9512
|
* @param {string} opts.state - (optional) An arbitrary string to be passed back with the login response. Used for client apps to associate login responses with a request.
|
|
7455
9513
|
* @param {string} opts.org - (optional) The organization name that would normally used when specifying an organization name when logging in. This is only used when a provider is also specified.
|
|
7456
9514
|
* @param {string} opts.provider - (optional) Authentication provider to log in with e.g. okta, adfs, salesforce, onelogin. This is only used when an org is also specified.
|
|
@@ -7596,9 +9654,9 @@ class ApiClient {
|
|
|
7596
9654
|
}
|
|
7597
9655
|
var encodedData = Buffer.from(clientId + ':' + clientSecret).toString('base64');
|
|
7598
9656
|
var request = this._formAuthRequest(encodedData,
|
|
7599
|
-
{ grant_type: 'urn:ietf:params:oauth:grant-type:saml2-bearer'
|
|
7600
|
-
|
|
7601
|
-
|
|
9657
|
+
{ grant_type: 'urn:ietf:params:oauth:grant-type:saml2-bearer',
|
|
9658
|
+
orgName: orgName,
|
|
9659
|
+
assertion: assertion });
|
|
7602
9660
|
request.proxy = this.proxy;
|
|
7603
9661
|
var bodyParam = {
|
|
7604
9662
|
grant_type: 'urn:ietf:params:oauth:grant-type:saml2-bearer',
|
|
@@ -7677,9 +9735,9 @@ class ApiClient {
|
|
|
7677
9735
|
}
|
|
7678
9736
|
var encodedData = Buffer.from(clientId + ':' + clientSecret).toString('base64');
|
|
7679
9737
|
var request = this._formAuthRequest(encodedData,
|
|
7680
|
-
{ grant_type: 'authorization_code'
|
|
7681
|
-
|
|
7682
|
-
|
|
9738
|
+
{ grant_type: 'authorization_code',
|
|
9739
|
+
code: authCode,
|
|
9740
|
+
redirect_uri: redirectUri });
|
|
7683
9741
|
request.proxy = this.proxy;
|
|
7684
9742
|
var bodyParam = {
|
|
7685
9743
|
grant_type: 'authorization_code',
|
|
@@ -7705,7 +9763,7 @@ class ApiClient {
|
|
|
7705
9763
|
return;
|
|
7706
9764
|
}
|
|
7707
9765
|
var encodedData = Buffer.from(clientId + ':' + clientSecret).toString('base64');
|
|
7708
|
-
var request = this._formAuthRequest(encodedData, { grant_type: 'refresh_token'
|
|
9766
|
+
var request = this._formAuthRequest(encodedData, { grant_type: 'refresh_token' , refresh_token: refreshToken });
|
|
7709
9767
|
request.proxy = this.proxy;
|
|
7710
9768
|
var bodyParam = {
|
|
7711
9769
|
grant_type: 'refresh_token',
|
|
@@ -7782,8 +9840,9 @@ class ApiClient {
|
|
|
7782
9840
|
/**
|
|
7783
9841
|
* @description Utility function to create the request for auth requests
|
|
7784
9842
|
* @param {string} encodedData - Base64 encoded client and clientSecret pair
|
|
9843
|
+
* @param {object} data - data to url form encode
|
|
7785
9844
|
*/
|
|
7786
|
-
_formAuthRequest(encodedData) {
|
|
9845
|
+
_formAuthRequest(encodedData, data) {
|
|
7787
9846
|
var request = axios__default["default"]({
|
|
7788
9847
|
method: `POST`,
|
|
7789
9848
|
url: `https://login.${this.config.environment}/oauth/token`,
|
|
@@ -7791,7 +9850,7 @@ class ApiClient {
|
|
|
7791
9850
|
'Authorization': 'Basic ' + encodedData,
|
|
7792
9851
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
7793
9852
|
},
|
|
7794
|
-
data:
|
|
9853
|
+
data: qs__default["default"].stringify(data)
|
|
7795
9854
|
});
|
|
7796
9855
|
|
|
7797
9856
|
return request;
|
|
@@ -7855,7 +9914,7 @@ class ApiClient {
|
|
|
7855
9914
|
}
|
|
7856
9915
|
|
|
7857
9916
|
// Test token
|
|
7858
|
-
this.callApi('/api/v2/tokens/me', 'GET',
|
|
9917
|
+
this.callApi('/api/v2/tokens/me', 'GET',
|
|
7859
9918
|
null, null, null, null, null, ['PureCloud OAuth'], ['application/json'], ['application/json'])
|
|
7860
9919
|
.then(() => {
|
|
7861
9920
|
resolve();
|
|
@@ -7881,7 +9940,7 @@ class ApiClient {
|
|
|
7881
9940
|
const match = hashRegex.exec(h);
|
|
7882
9941
|
if (match) hash[match[1]] = decodeURIComponent(decodeURIComponent(match[2].replace(/\+/g, '%20')));
|
|
7883
9942
|
});
|
|
7884
|
-
|
|
9943
|
+
|
|
7885
9944
|
// Check for error
|
|
7886
9945
|
if (hash.error) {
|
|
7887
9946
|
return hash;
|
|
@@ -8079,7 +10138,7 @@ class ApiClient {
|
|
|
8079
10138
|
/**
|
|
8080
10139
|
* Checks whether the given parameter value represents file-like content.
|
|
8081
10140
|
* @param param The parameter to check.
|
|
8082
|
-
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
|
|
10141
|
+
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
|
|
8083
10142
|
*/
|
|
8084
10143
|
isFileParam(param) {
|
|
8085
10144
|
// Buffer in Node.js
|
|
@@ -8319,7 +10378,7 @@ class AlertingApi {
|
|
|
8319
10378
|
/**
|
|
8320
10379
|
* Alerting service.
|
|
8321
10380
|
* @module purecloud-platform-client-v2/api/AlertingApi
|
|
8322
|
-
* @version
|
|
10381
|
+
* @version 141.1.0
|
|
8323
10382
|
*/
|
|
8324
10383
|
|
|
8325
10384
|
/**
|
|
@@ -8633,7 +10692,7 @@ class AnalyticsApi {
|
|
|
8633
10692
|
/**
|
|
8634
10693
|
* Analytics service.
|
|
8635
10694
|
* @module purecloud-platform-client-v2/api/AnalyticsApi
|
|
8636
|
-
* @version
|
|
10695
|
+
* @version 141.1.0
|
|
8637
10696
|
*/
|
|
8638
10697
|
|
|
8639
10698
|
/**
|
|
@@ -9815,7 +11874,7 @@ class ArchitectApi {
|
|
|
9815
11874
|
/**
|
|
9816
11875
|
* Architect service.
|
|
9817
11876
|
* @module purecloud-platform-client-v2/api/ArchitectApi
|
|
9818
|
-
* @version
|
|
11877
|
+
* @version 141.1.0
|
|
9819
11878
|
*/
|
|
9820
11879
|
|
|
9821
11880
|
/**
|
|
@@ -12860,7 +14919,7 @@ class AuditApi {
|
|
|
12860
14919
|
/**
|
|
12861
14920
|
* Audit service.
|
|
12862
14921
|
* @module purecloud-platform-client-v2/api/AuditApi
|
|
12863
|
-
* @version
|
|
14922
|
+
* @version 141.1.0
|
|
12864
14923
|
*/
|
|
12865
14924
|
|
|
12866
14925
|
/**
|
|
@@ -13031,7 +15090,7 @@ class AuthorizationApi {
|
|
|
13031
15090
|
/**
|
|
13032
15091
|
* Authorization service.
|
|
13033
15092
|
* @module purecloud-platform-client-v2/api/AuthorizationApi
|
|
13034
|
-
* @version
|
|
15093
|
+
* @version 141.1.0
|
|
13035
15094
|
*/
|
|
13036
15095
|
|
|
13037
15096
|
/**
|
|
@@ -14214,7 +16273,7 @@ class BillingApi {
|
|
|
14214
16273
|
/**
|
|
14215
16274
|
* Billing service.
|
|
14216
16275
|
* @module purecloud-platform-client-v2/api/BillingApi
|
|
14217
|
-
* @version
|
|
16276
|
+
* @version 141.1.0
|
|
14218
16277
|
*/
|
|
14219
16278
|
|
|
14220
16279
|
/**
|
|
@@ -14294,7 +16353,7 @@ class ChatApi {
|
|
|
14294
16353
|
/**
|
|
14295
16354
|
* Chat service.
|
|
14296
16355
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
14297
|
-
* @version
|
|
16356
|
+
* @version 141.1.0
|
|
14298
16357
|
*/
|
|
14299
16358
|
|
|
14300
16359
|
/**
|
|
@@ -14385,7 +16444,7 @@ class CoachingApi {
|
|
|
14385
16444
|
/**
|
|
14386
16445
|
* Coaching service.
|
|
14387
16446
|
* @module purecloud-platform-client-v2/api/CoachingApi
|
|
14388
|
-
* @version
|
|
16447
|
+
* @version 141.1.0
|
|
14389
16448
|
*/
|
|
14390
16449
|
|
|
14391
16450
|
/**
|
|
@@ -14962,7 +17021,7 @@ class ContentManagementApi {
|
|
|
14962
17021
|
/**
|
|
14963
17022
|
* ContentManagement service.
|
|
14964
17023
|
* @module purecloud-platform-client-v2/api/ContentManagementApi
|
|
14965
|
-
* @version
|
|
17024
|
+
* @version 141.1.0
|
|
14966
17025
|
*/
|
|
14967
17026
|
|
|
14968
17027
|
/**
|
|
@@ -16102,7 +18161,7 @@ class ConversationsApi {
|
|
|
16102
18161
|
/**
|
|
16103
18162
|
* Conversations service.
|
|
16104
18163
|
* @module purecloud-platform-client-v2/api/ConversationsApi
|
|
16105
|
-
* @version
|
|
18164
|
+
* @version 141.1.0
|
|
16106
18165
|
*/
|
|
16107
18166
|
|
|
16108
18167
|
/**
|
|
@@ -21036,7 +23095,7 @@ class DataExtensionsApi {
|
|
|
21036
23095
|
/**
|
|
21037
23096
|
* DataExtensions service.
|
|
21038
23097
|
* @module purecloud-platform-client-v2/api/DataExtensionsApi
|
|
21039
|
-
* @version
|
|
23098
|
+
* @version 141.1.0
|
|
21040
23099
|
*/
|
|
21041
23100
|
|
|
21042
23101
|
/**
|
|
@@ -21122,7 +23181,7 @@ class ExternalContactsApi {
|
|
|
21122
23181
|
/**
|
|
21123
23182
|
* ExternalContacts service.
|
|
21124
23183
|
* @module purecloud-platform-client-v2/api/ExternalContactsApi
|
|
21125
|
-
* @version
|
|
23184
|
+
* @version 141.1.0
|
|
21126
23185
|
*/
|
|
21127
23186
|
|
|
21128
23187
|
/**
|
|
@@ -22865,7 +24924,7 @@ class FaxApi {
|
|
|
22865
24924
|
/**
|
|
22866
24925
|
* Fax service.
|
|
22867
24926
|
* @module purecloud-platform-client-v2/api/FaxApi
|
|
22868
|
-
* @version
|
|
24927
|
+
* @version 141.1.0
|
|
22869
24928
|
*/
|
|
22870
24929
|
|
|
22871
24930
|
/**
|
|
@@ -23036,7 +25095,7 @@ class FlowsApi {
|
|
|
23036
25095
|
/**
|
|
23037
25096
|
* Flows service.
|
|
23038
25097
|
* @module purecloud-platform-client-v2/api/FlowsApi
|
|
23039
|
-
* @version
|
|
25098
|
+
* @version 141.1.0
|
|
23040
25099
|
*/
|
|
23041
25100
|
|
|
23042
25101
|
/**
|
|
@@ -23107,7 +25166,7 @@ class GamificationApi {
|
|
|
23107
25166
|
/**
|
|
23108
25167
|
* Gamification service.
|
|
23109
25168
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
23110
|
-
* @version
|
|
25169
|
+
* @version 141.1.0
|
|
23111
25170
|
*/
|
|
23112
25171
|
|
|
23113
25172
|
/**
|
|
@@ -23730,6 +25789,157 @@ class GamificationApi {
|
|
|
23730
25789
|
);
|
|
23731
25790
|
}
|
|
23732
25791
|
|
|
25792
|
+
/**
|
|
25793
|
+
* Average performance values trends by metric of a user
|
|
25794
|
+
*
|
|
25795
|
+
* @param {String} profileId performanceProfileId
|
|
25796
|
+
* @param {String} metricId metricId
|
|
25797
|
+
* @param {String} userId
|
|
25798
|
+
* @param {String} startWorkday Start workday of querying workdays range. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25799
|
+
* @param {String} endWorkday End workday of querying workdays range. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25800
|
+
* @param {Object} opts Optional parameters
|
|
25801
|
+
* @param {String} opts.referenceWorkday Reference workday for the trend. Used to determine the associated metric definition. If not set, then the value of endWorkday is used. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25802
|
+
* @param {String} opts.timeZone Timezone for the workday. Defaults to UTC (default to UTC)
|
|
25803
|
+
*/
|
|
25804
|
+
getGamificationScorecardsProfileMetricUserValuesTrends(profileId, metricId, userId, startWorkday, endWorkday, opts) {
|
|
25805
|
+
opts = opts || {};
|
|
25806
|
+
|
|
25807
|
+
// verify the required parameter 'profileId' is set
|
|
25808
|
+
if (profileId === undefined || profileId === null) {
|
|
25809
|
+
throw 'Missing the required parameter "profileId" when calling getGamificationScorecardsProfileMetricUserValuesTrends';
|
|
25810
|
+
}
|
|
25811
|
+
// verify the required parameter 'metricId' is set
|
|
25812
|
+
if (metricId === undefined || metricId === null) {
|
|
25813
|
+
throw 'Missing the required parameter "metricId" when calling getGamificationScorecardsProfileMetricUserValuesTrends';
|
|
25814
|
+
}
|
|
25815
|
+
// verify the required parameter 'userId' is set
|
|
25816
|
+
if (userId === undefined || userId === null) {
|
|
25817
|
+
throw 'Missing the required parameter "userId" when calling getGamificationScorecardsProfileMetricUserValuesTrends';
|
|
25818
|
+
}
|
|
25819
|
+
// verify the required parameter 'startWorkday' is set
|
|
25820
|
+
if (startWorkday === undefined || startWorkday === null) {
|
|
25821
|
+
throw 'Missing the required parameter "startWorkday" when calling getGamificationScorecardsProfileMetricUserValuesTrends';
|
|
25822
|
+
}
|
|
25823
|
+
// verify the required parameter 'endWorkday' is set
|
|
25824
|
+
if (endWorkday === undefined || endWorkday === null) {
|
|
25825
|
+
throw 'Missing the required parameter "endWorkday" when calling getGamificationScorecardsProfileMetricUserValuesTrends';
|
|
25826
|
+
}
|
|
25827
|
+
|
|
25828
|
+
return this.apiClient.callApi(
|
|
25829
|
+
'/api/v2/gamification/scorecards/profiles/{profileId}/metrics/{metricId}/users/{userId}/values/trends',
|
|
25830
|
+
'GET',
|
|
25831
|
+
{ 'profileId': profileId,'metricId': metricId,'userId': userId },
|
|
25832
|
+
{ 'startWorkday': startWorkday,'endWorkday': endWorkday,'referenceWorkday': opts['referenceWorkday'],'timeZone': opts['timeZone'] },
|
|
25833
|
+
{ },
|
|
25834
|
+
{ },
|
|
25835
|
+
null,
|
|
25836
|
+
['PureCloud OAuth'],
|
|
25837
|
+
['application/json'],
|
|
25838
|
+
['application/json']
|
|
25839
|
+
);
|
|
25840
|
+
}
|
|
25841
|
+
|
|
25842
|
+
/**
|
|
25843
|
+
* Average performance values trends by metric of a division or a performance profile
|
|
25844
|
+
*
|
|
25845
|
+
* @param {String} profileId performanceProfileId
|
|
25846
|
+
* @param {String} metricId metricId
|
|
25847
|
+
* @param {Object} filterType Filter type for the query request.
|
|
25848
|
+
* @param {String} filterId ID for the filter type. For example, division Id
|
|
25849
|
+
* @param {String} startWorkday Start workday of querying workdays range. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25850
|
+
* @param {String} endWorkday End workday of querying workdays range. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25851
|
+
* @param {Object} opts Optional parameters
|
|
25852
|
+
* @param {String} opts.referenceWorkday Reference workday for the trend. Used to determine the associated metric definition. If not set, then the value of endWorkday is used. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25853
|
+
* @param {String} opts.timeZone Timezone for the workday. Defaults to UTC (default to UTC)
|
|
25854
|
+
*/
|
|
25855
|
+
getGamificationScorecardsProfileMetricUsersValuesTrends(profileId, metricId, filterType, filterId, startWorkday, endWorkday, opts) {
|
|
25856
|
+
opts = opts || {};
|
|
25857
|
+
|
|
25858
|
+
// verify the required parameter 'profileId' is set
|
|
25859
|
+
if (profileId === undefined || profileId === null) {
|
|
25860
|
+
throw 'Missing the required parameter "profileId" when calling getGamificationScorecardsProfileMetricUsersValuesTrends';
|
|
25861
|
+
}
|
|
25862
|
+
// verify the required parameter 'metricId' is set
|
|
25863
|
+
if (metricId === undefined || metricId === null) {
|
|
25864
|
+
throw 'Missing the required parameter "metricId" when calling getGamificationScorecardsProfileMetricUsersValuesTrends';
|
|
25865
|
+
}
|
|
25866
|
+
// verify the required parameter 'filterType' is set
|
|
25867
|
+
if (filterType === undefined || filterType === null) {
|
|
25868
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationScorecardsProfileMetricUsersValuesTrends';
|
|
25869
|
+
}
|
|
25870
|
+
// verify the required parameter 'filterId' is set
|
|
25871
|
+
if (filterId === undefined || filterId === null) {
|
|
25872
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationScorecardsProfileMetricUsersValuesTrends';
|
|
25873
|
+
}
|
|
25874
|
+
// verify the required parameter 'startWorkday' is set
|
|
25875
|
+
if (startWorkday === undefined || startWorkday === null) {
|
|
25876
|
+
throw 'Missing the required parameter "startWorkday" when calling getGamificationScorecardsProfileMetricUsersValuesTrends';
|
|
25877
|
+
}
|
|
25878
|
+
// verify the required parameter 'endWorkday' is set
|
|
25879
|
+
if (endWorkday === undefined || endWorkday === null) {
|
|
25880
|
+
throw 'Missing the required parameter "endWorkday" when calling getGamificationScorecardsProfileMetricUsersValuesTrends';
|
|
25881
|
+
}
|
|
25882
|
+
|
|
25883
|
+
return this.apiClient.callApi(
|
|
25884
|
+
'/api/v2/gamification/scorecards/profiles/{profileId}/metrics/{metricId}/users/values/trends',
|
|
25885
|
+
'GET',
|
|
25886
|
+
{ 'profileId': profileId,'metricId': metricId },
|
|
25887
|
+
{ 'filterType': filterType,'filterId': filterId,'startWorkday': startWorkday,'endWorkday': endWorkday,'referenceWorkday': opts['referenceWorkday'],'timeZone': opts['timeZone'] },
|
|
25888
|
+
{ },
|
|
25889
|
+
{ },
|
|
25890
|
+
null,
|
|
25891
|
+
['PureCloud OAuth'],
|
|
25892
|
+
['application/json'],
|
|
25893
|
+
['application/json']
|
|
25894
|
+
);
|
|
25895
|
+
}
|
|
25896
|
+
|
|
25897
|
+
/**
|
|
25898
|
+
* Average performance values trends by metric of the requesting user
|
|
25899
|
+
*
|
|
25900
|
+
* @param {String} profileId performanceProfileId
|
|
25901
|
+
* @param {String} metricId metricId
|
|
25902
|
+
* @param {String} startWorkday Start workday of querying workdays range. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25903
|
+
* @param {String} endWorkday End workday of querying workdays range. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25904
|
+
* @param {Object} opts Optional parameters
|
|
25905
|
+
* @param {Object} opts.filterType Filter type for the query request. If not set, returns the values trends of the requesting user
|
|
25906
|
+
* @param {String} opts.referenceWorkday Reference workday for the trend. Used to determine the associated metric definition. If not set, then the value of endWorkday is used. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
25907
|
+
* @param {String} opts.timeZone Timezone for the workday. Defaults to UTC (default to UTC)
|
|
25908
|
+
*/
|
|
25909
|
+
getGamificationScorecardsProfileMetricValuesTrends(profileId, metricId, startWorkday, endWorkday, opts) {
|
|
25910
|
+
opts = opts || {};
|
|
25911
|
+
|
|
25912
|
+
// verify the required parameter 'profileId' is set
|
|
25913
|
+
if (profileId === undefined || profileId === null) {
|
|
25914
|
+
throw 'Missing the required parameter "profileId" when calling getGamificationScorecardsProfileMetricValuesTrends';
|
|
25915
|
+
}
|
|
25916
|
+
// verify the required parameter 'metricId' is set
|
|
25917
|
+
if (metricId === undefined || metricId === null) {
|
|
25918
|
+
throw 'Missing the required parameter "metricId" when calling getGamificationScorecardsProfileMetricValuesTrends';
|
|
25919
|
+
}
|
|
25920
|
+
// verify the required parameter 'startWorkday' is set
|
|
25921
|
+
if (startWorkday === undefined || startWorkday === null) {
|
|
25922
|
+
throw 'Missing the required parameter "startWorkday" when calling getGamificationScorecardsProfileMetricValuesTrends';
|
|
25923
|
+
}
|
|
25924
|
+
// verify the required parameter 'endWorkday' is set
|
|
25925
|
+
if (endWorkday === undefined || endWorkday === null) {
|
|
25926
|
+
throw 'Missing the required parameter "endWorkday" when calling getGamificationScorecardsProfileMetricValuesTrends';
|
|
25927
|
+
}
|
|
25928
|
+
|
|
25929
|
+
return this.apiClient.callApi(
|
|
25930
|
+
'/api/v2/gamification/scorecards/profiles/{profileId}/metrics/{metricId}/values/trends',
|
|
25931
|
+
'GET',
|
|
25932
|
+
{ 'profileId': profileId,'metricId': metricId },
|
|
25933
|
+
{ 'filterType': opts['filterType'],'startWorkday': startWorkday,'endWorkday': endWorkday,'referenceWorkday': opts['referenceWorkday'],'timeZone': opts['timeZone'] },
|
|
25934
|
+
{ },
|
|
25935
|
+
{ },
|
|
25936
|
+
null,
|
|
25937
|
+
['PureCloud OAuth'],
|
|
25938
|
+
['application/json'],
|
|
25939
|
+
['application/json']
|
|
25940
|
+
);
|
|
25941
|
+
}
|
|
25942
|
+
|
|
23733
25943
|
/**
|
|
23734
25944
|
* Workday performance metrics for a user
|
|
23735
25945
|
*
|
|
@@ -24538,7 +26748,7 @@ class GeneralDataProtectionRegulationApi {
|
|
|
24538
26748
|
/**
|
|
24539
26749
|
* GeneralDataProtectionRegulation service.
|
|
24540
26750
|
* @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
24541
|
-
* @version
|
|
26751
|
+
* @version 141.1.0
|
|
24542
26752
|
*/
|
|
24543
26753
|
|
|
24544
26754
|
/**
|
|
@@ -24668,7 +26878,7 @@ class GeolocationApi {
|
|
|
24668
26878
|
/**
|
|
24669
26879
|
* Geolocation service.
|
|
24670
26880
|
* @module purecloud-platform-client-v2/api/GeolocationApi
|
|
24671
|
-
* @version
|
|
26881
|
+
* @version 141.1.0
|
|
24672
26882
|
*/
|
|
24673
26883
|
|
|
24674
26884
|
/**
|
|
@@ -24799,7 +27009,7 @@ class GreetingsApi {
|
|
|
24799
27009
|
/**
|
|
24800
27010
|
* Greetings service.
|
|
24801
27011
|
* @module purecloud-platform-client-v2/api/GreetingsApi
|
|
24802
|
-
* @version
|
|
27012
|
+
* @version 141.1.0
|
|
24803
27013
|
*/
|
|
24804
27014
|
|
|
24805
27015
|
/**
|
|
@@ -25254,7 +27464,7 @@ class GroupsApi {
|
|
|
25254
27464
|
/**
|
|
25255
27465
|
* Groups service.
|
|
25256
27466
|
* @module purecloud-platform-client-v2/api/GroupsApi
|
|
25257
|
-
* @version
|
|
27467
|
+
* @version 141.1.0
|
|
25258
27468
|
*/
|
|
25259
27469
|
|
|
25260
27470
|
/**
|
|
@@ -25659,7 +27869,7 @@ class IdentityProviderApi {
|
|
|
25659
27869
|
/**
|
|
25660
27870
|
* IdentityProvider service.
|
|
25661
27871
|
* @module purecloud-platform-client-v2/api/IdentityProviderApi
|
|
25662
|
-
* @version
|
|
27872
|
+
* @version 141.1.0
|
|
25663
27873
|
*/
|
|
25664
27874
|
|
|
25665
27875
|
/**
|
|
@@ -26415,7 +28625,7 @@ class IntegrationsApi {
|
|
|
26415
28625
|
/**
|
|
26416
28626
|
* Integrations service.
|
|
26417
28627
|
* @module purecloud-platform-client-v2/api/IntegrationsApi
|
|
26418
|
-
* @version
|
|
28628
|
+
* @version 141.1.0
|
|
26419
28629
|
*/
|
|
26420
28630
|
|
|
26421
28631
|
/**
|
|
@@ -28092,7 +30302,7 @@ class JourneyApi {
|
|
|
28092
30302
|
/**
|
|
28093
30303
|
* Journey service.
|
|
28094
30304
|
* @module purecloud-platform-client-v2/api/JourneyApi
|
|
28095
|
-
* @version
|
|
30305
|
+
* @version 141.1.0
|
|
28096
30306
|
*/
|
|
28097
30307
|
|
|
28098
30308
|
/**
|
|
@@ -28803,7 +31013,7 @@ class KnowledgeApi {
|
|
|
28803
31013
|
/**
|
|
28804
31014
|
* Knowledge service.
|
|
28805
31015
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
28806
|
-
* @version
|
|
31016
|
+
* @version 141.1.0
|
|
28807
31017
|
*/
|
|
28808
31018
|
|
|
28809
31019
|
/**
|
|
@@ -29703,7 +31913,7 @@ class LanguageUnderstandingApi {
|
|
|
29703
31913
|
/**
|
|
29704
31914
|
* LanguageUnderstanding service.
|
|
29705
31915
|
* @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
29706
|
-
* @version
|
|
31916
|
+
* @version 141.1.0
|
|
29707
31917
|
*/
|
|
29708
31918
|
|
|
29709
31919
|
/**
|
|
@@ -30607,7 +32817,7 @@ class LanguagesApi {
|
|
|
30607
32817
|
/**
|
|
30608
32818
|
* Languages service.
|
|
30609
32819
|
* @module purecloud-platform-client-v2/api/LanguagesApi
|
|
30610
|
-
* @version
|
|
32820
|
+
* @version 141.1.0
|
|
30611
32821
|
*/
|
|
30612
32822
|
|
|
30613
32823
|
/**
|
|
@@ -30875,7 +33085,7 @@ class LearningApi {
|
|
|
30875
33085
|
/**
|
|
30876
33086
|
* Learning service.
|
|
30877
33087
|
* @module purecloud-platform-client-v2/api/LearningApi
|
|
30878
|
-
* @version
|
|
33088
|
+
* @version 141.1.0
|
|
30879
33089
|
*/
|
|
30880
33090
|
|
|
30881
33091
|
/**
|
|
@@ -31194,6 +33404,40 @@ class LearningApi {
|
|
|
31194
33404
|
);
|
|
31195
33405
|
}
|
|
31196
33406
|
|
|
33407
|
+
/**
|
|
33408
|
+
* Get all learning modules of an organization including assignments for a specific user
|
|
33409
|
+
*
|
|
33410
|
+
* @param {Array.<String>} userIds The IDs of the users to include
|
|
33411
|
+
* @param {Object} opts Optional parameters
|
|
33412
|
+
* @param {Number} opts.pageSize Page size (default to 25)
|
|
33413
|
+
* @param {Number} opts.pageNumber Page number (default to 1)
|
|
33414
|
+
* @param {String} opts.searchTerm Search Term (searches by name and description)
|
|
33415
|
+
* @param {Object} opts.overdue Specifies if only modules with overdue/not overdue (overdue is True or False) assignments are returned. If overdue is Any or omitted, both are returned and can including modules that are unassigned. (default to Any)
|
|
33416
|
+
* @param {Array.<String>} opts.assignmentStates Specifies the assignment states to return.
|
|
33417
|
+
* @param {Array.<String>} opts.expand Fields to expand in response(case insensitive)
|
|
33418
|
+
*/
|
|
33419
|
+
getLearningModulesAssignments(userIds, opts) {
|
|
33420
|
+
opts = opts || {};
|
|
33421
|
+
|
|
33422
|
+
// verify the required parameter 'userIds' is set
|
|
33423
|
+
if (userIds === undefined || userIds === null) {
|
|
33424
|
+
throw 'Missing the required parameter "userIds" when calling getLearningModulesAssignments';
|
|
33425
|
+
}
|
|
33426
|
+
|
|
33427
|
+
return this.apiClient.callApi(
|
|
33428
|
+
'/api/v2/learning/modules/assignments',
|
|
33429
|
+
'GET',
|
|
33430
|
+
{ },
|
|
33431
|
+
{ 'userIds': this.apiClient.buildCollectionParam(userIds, 'multi'),'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'searchTerm': opts['searchTerm'],'overdue': opts['overdue'],'assignmentStates': this.apiClient.buildCollectionParam(opts['assignmentStates'], 'multi'),'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') },
|
|
33432
|
+
{ },
|
|
33433
|
+
{ },
|
|
33434
|
+
null,
|
|
33435
|
+
['PureCloud OAuth'],
|
|
33436
|
+
['application/json'],
|
|
33437
|
+
['application/json']
|
|
33438
|
+
);
|
|
33439
|
+
}
|
|
33440
|
+
|
|
31197
33441
|
/**
|
|
31198
33442
|
* Update Learning Assignment
|
|
31199
33443
|
*
|
|
@@ -31576,7 +33820,7 @@ class LicenseApi {
|
|
|
31576
33820
|
/**
|
|
31577
33821
|
* License service.
|
|
31578
33822
|
* @module purecloud-platform-client-v2/api/LicenseApi
|
|
31579
|
-
* @version
|
|
33823
|
+
* @version 141.1.0
|
|
31580
33824
|
*/
|
|
31581
33825
|
|
|
31582
33826
|
/**
|
|
@@ -31814,7 +34058,7 @@ class LocationsApi {
|
|
|
31814
34058
|
/**
|
|
31815
34059
|
* Locations service.
|
|
31816
34060
|
* @module purecloud-platform-client-v2/api/LocationsApi
|
|
31817
|
-
* @version
|
|
34061
|
+
* @version 141.1.0
|
|
31818
34062
|
*/
|
|
31819
34063
|
|
|
31820
34064
|
/**
|
|
@@ -32050,7 +34294,7 @@ class MessagingApi {
|
|
|
32050
34294
|
/**
|
|
32051
34295
|
* Messaging service.
|
|
32052
34296
|
* @module purecloud-platform-client-v2/api/MessagingApi
|
|
32053
|
-
* @version
|
|
34297
|
+
* @version 141.1.0
|
|
32054
34298
|
*/
|
|
32055
34299
|
|
|
32056
34300
|
/**
|
|
@@ -32201,7 +34445,7 @@ class MobileDevicesApi {
|
|
|
32201
34445
|
/**
|
|
32202
34446
|
* MobileDevices service.
|
|
32203
34447
|
* @module purecloud-platform-client-v2/api/MobileDevicesApi
|
|
32204
|
-
* @version
|
|
34448
|
+
* @version 141.1.0
|
|
32205
34449
|
*/
|
|
32206
34450
|
|
|
32207
34451
|
/**
|
|
@@ -32352,7 +34596,7 @@ class NotificationsApi {
|
|
|
32352
34596
|
/**
|
|
32353
34597
|
* Notifications service.
|
|
32354
34598
|
* @module purecloud-platform-client-v2/api/NotificationsApi
|
|
32355
|
-
* @version
|
|
34599
|
+
* @version 141.1.0
|
|
32356
34600
|
*/
|
|
32357
34601
|
|
|
32358
34602
|
/**
|
|
@@ -32577,7 +34821,7 @@ class OAuthApi {
|
|
|
32577
34821
|
/**
|
|
32578
34822
|
* OAuth service.
|
|
32579
34823
|
* @module purecloud-platform-client-v2/api/OAuthApi
|
|
32580
|
-
* @version
|
|
34824
|
+
* @version 141.1.0
|
|
32581
34825
|
*/
|
|
32582
34826
|
|
|
32583
34827
|
/**
|
|
@@ -32943,7 +35187,7 @@ class ObjectsApi {
|
|
|
32943
35187
|
/**
|
|
32944
35188
|
* Objects service.
|
|
32945
35189
|
* @module purecloud-platform-client-v2/api/ObjectsApi
|
|
32946
|
-
* @version
|
|
35190
|
+
* @version 141.1.0
|
|
32947
35191
|
*/
|
|
32948
35192
|
|
|
32949
35193
|
/**
|
|
@@ -33214,7 +35458,7 @@ class OrganizationApi {
|
|
|
33214
35458
|
/**
|
|
33215
35459
|
* Organization service.
|
|
33216
35460
|
* @module purecloud-platform-client-v2/api/OrganizationApi
|
|
33217
|
-
* @version
|
|
35461
|
+
* @version 141.1.0
|
|
33218
35462
|
*/
|
|
33219
35463
|
|
|
33220
35464
|
/**
|
|
@@ -33617,7 +35861,7 @@ class OrganizationAuthorizationApi {
|
|
|
33617
35861
|
/**
|
|
33618
35862
|
* OrganizationAuthorization service.
|
|
33619
35863
|
* @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
33620
|
-
* @version
|
|
35864
|
+
* @version 141.1.0
|
|
33621
35865
|
*/
|
|
33622
35866
|
|
|
33623
35867
|
/**
|
|
@@ -34542,7 +36786,7 @@ class OutboundApi {
|
|
|
34542
36786
|
/**
|
|
34543
36787
|
* Outbound service.
|
|
34544
36788
|
* @module purecloud-platform-client-v2/api/OutboundApi
|
|
34545
|
-
* @version
|
|
36789
|
+
* @version 141.1.0
|
|
34546
36790
|
*/
|
|
34547
36791
|
|
|
34548
36792
|
/**
|
|
@@ -37797,7 +40041,7 @@ class PresenceApi {
|
|
|
37797
40041
|
/**
|
|
37798
40042
|
* Presence service.
|
|
37799
40043
|
* @module purecloud-platform-client-v2/api/PresenceApi
|
|
37800
|
-
* @version
|
|
40044
|
+
* @version 141.1.0
|
|
37801
40045
|
*/
|
|
37802
40046
|
|
|
37803
40047
|
/**
|
|
@@ -38119,7 +40363,7 @@ class QualityApi {
|
|
|
38119
40363
|
/**
|
|
38120
40364
|
* Quality service.
|
|
38121
40365
|
* @module purecloud-platform-client-v2/api/QualityApi
|
|
38122
|
-
* @version
|
|
40366
|
+
* @version 141.1.0
|
|
38123
40367
|
*/
|
|
38124
40368
|
|
|
38125
40369
|
/**
|
|
@@ -39697,7 +41941,7 @@ class RecordingApi {
|
|
|
39697
41941
|
/**
|
|
39698
41942
|
* Recording service.
|
|
39699
41943
|
* @module purecloud-platform-client-v2/api/RecordingApi
|
|
39700
|
-
* @version
|
|
41944
|
+
* @version 141.1.0
|
|
39701
41945
|
*/
|
|
39702
41946
|
|
|
39703
41947
|
/**
|
|
@@ -41350,7 +43594,7 @@ class ResponseManagementApi {
|
|
|
41350
43594
|
/**
|
|
41351
43595
|
* ResponseManagement service.
|
|
41352
43596
|
* @module purecloud-platform-client-v2/api/ResponseManagementApi
|
|
41353
|
-
* @version
|
|
43597
|
+
* @version 141.1.0
|
|
41354
43598
|
*/
|
|
41355
43599
|
|
|
41356
43600
|
/**
|
|
@@ -41834,7 +44078,7 @@ class RoutingApi {
|
|
|
41834
44078
|
/**
|
|
41835
44079
|
* Routing service.
|
|
41836
44080
|
* @module purecloud-platform-client-v2/api/RoutingApi
|
|
41837
|
-
* @version
|
|
44081
|
+
* @version 141.1.0
|
|
41838
44082
|
*/
|
|
41839
44083
|
|
|
41840
44084
|
/**
|
|
@@ -42944,6 +45188,8 @@ class RoutingApi {
|
|
|
42944
45188
|
* @param {String} opts.name Filter by queue name
|
|
42945
45189
|
* @param {Array.<String>} opts.id Filter by queue ID(s)
|
|
42946
45190
|
* @param {Array.<String>} opts.divisionId Filter by queue division ID(s)
|
|
45191
|
+
* @param {Array.<String>} opts.peerId Filter by queue peer ID(s)
|
|
45192
|
+
* @param {Boolean} opts.hasPeer Filter by queues associated with peer
|
|
42947
45193
|
*/
|
|
42948
45194
|
getRoutingQueues(opts) {
|
|
42949
45195
|
opts = opts || {};
|
|
@@ -42953,7 +45199,7 @@ class RoutingApi {
|
|
|
42953
45199
|
'/api/v2/routing/queues',
|
|
42954
45200
|
'GET',
|
|
42955
45201
|
{ },
|
|
42956
|
-
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortOrder': opts['sortOrder'],'name': opts['name'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') },
|
|
45202
|
+
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortOrder': opts['sortOrder'],'name': opts['name'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi'),'peerId': this.apiClient.buildCollectionParam(opts['peerId'], 'multi'),'hasPeer': opts['hasPeer'] },
|
|
42957
45203
|
{ },
|
|
42958
45204
|
{ },
|
|
42959
45205
|
null,
|
|
@@ -44753,7 +46999,7 @@ class SCIMApi {
|
|
|
44753
46999
|
/**
|
|
44754
47000
|
* SCIM service.
|
|
44755
47001
|
* @module purecloud-platform-client-v2/api/SCIMApi
|
|
44756
|
-
* @version
|
|
47002
|
+
* @version 141.1.0
|
|
44757
47003
|
*/
|
|
44758
47004
|
|
|
44759
47005
|
/**
|
|
@@ -45630,7 +47876,7 @@ class ScriptsApi {
|
|
|
45630
47876
|
/**
|
|
45631
47877
|
* Scripts service.
|
|
45632
47878
|
* @module purecloud-platform-client-v2/api/ScriptsApi
|
|
45633
|
-
* @version
|
|
47879
|
+
* @version 141.1.0
|
|
45634
47880
|
*/
|
|
45635
47881
|
|
|
45636
47882
|
/**
|
|
@@ -46049,7 +48295,7 @@ class SearchApi {
|
|
|
46049
48295
|
/**
|
|
46050
48296
|
* Search service.
|
|
46051
48297
|
* @module purecloud-platform-client-v2/api/SearchApi
|
|
46052
|
-
* @version
|
|
48298
|
+
* @version 141.1.0
|
|
46053
48299
|
*/
|
|
46054
48300
|
|
|
46055
48301
|
/**
|
|
@@ -46528,6 +48774,31 @@ class SearchApi {
|
|
|
46528
48774
|
);
|
|
46529
48775
|
}
|
|
46530
48776
|
|
|
48777
|
+
/**
|
|
48778
|
+
* Search resources.
|
|
48779
|
+
*
|
|
48780
|
+
* @param {Object} body Search request options
|
|
48781
|
+
*/
|
|
48782
|
+
postTeamsSearch(body) {
|
|
48783
|
+
// verify the required parameter 'body' is set
|
|
48784
|
+
if (body === undefined || body === null) {
|
|
48785
|
+
throw 'Missing the required parameter "body" when calling postTeamsSearch';
|
|
48786
|
+
}
|
|
48787
|
+
|
|
48788
|
+
return this.apiClient.callApi(
|
|
48789
|
+
'/api/v2/teams/search',
|
|
48790
|
+
'POST',
|
|
48791
|
+
{ },
|
|
48792
|
+
{ },
|
|
48793
|
+
{ },
|
|
48794
|
+
{ },
|
|
48795
|
+
body,
|
|
48796
|
+
['PureCloud OAuth'],
|
|
48797
|
+
['application/json'],
|
|
48798
|
+
['application/json']
|
|
48799
|
+
);
|
|
48800
|
+
}
|
|
48801
|
+
|
|
46531
48802
|
/**
|
|
46532
48803
|
* Search users
|
|
46533
48804
|
*
|
|
@@ -46584,7 +48855,7 @@ class SpeechTextAnalyticsApi {
|
|
|
46584
48855
|
/**
|
|
46585
48856
|
* SpeechTextAnalytics service.
|
|
46586
48857
|
* @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
46587
|
-
* @version
|
|
48858
|
+
* @version 141.1.0
|
|
46588
48859
|
*/
|
|
46589
48860
|
|
|
46590
48861
|
/**
|
|
@@ -47437,7 +49708,7 @@ class StationsApi {
|
|
|
47437
49708
|
/**
|
|
47438
49709
|
* Stations service.
|
|
47439
49710
|
* @module purecloud-platform-client-v2/api/StationsApi
|
|
47440
|
-
* @version
|
|
49711
|
+
* @version 141.1.0
|
|
47441
49712
|
*/
|
|
47442
49713
|
|
|
47443
49714
|
/**
|
|
@@ -47584,7 +49855,7 @@ class SuggestApi {
|
|
|
47584
49855
|
/**
|
|
47585
49856
|
* Suggest service.
|
|
47586
49857
|
* @module purecloud-platform-client-v2/api/SuggestApi
|
|
47587
|
-
* @version
|
|
49858
|
+
* @version 141.1.0
|
|
47588
49859
|
*/
|
|
47589
49860
|
|
|
47590
49861
|
/**
|
|
@@ -47719,11 +49990,190 @@ class SuggestApi {
|
|
|
47719
49990
|
|
|
47720
49991
|
}
|
|
47721
49992
|
|
|
49993
|
+
class TeamsApi {
|
|
49994
|
+
/**
|
|
49995
|
+
* Teams service.
|
|
49996
|
+
* @module purecloud-platform-client-v2/api/TeamsApi
|
|
49997
|
+
* @version 141.1.0
|
|
49998
|
+
*/
|
|
49999
|
+
|
|
50000
|
+
/**
|
|
50001
|
+
* Constructs a new TeamsApi.
|
|
50002
|
+
* @alias module:purecloud-platform-client-v2/api/TeamsApi
|
|
50003
|
+
* @class
|
|
50004
|
+
* @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use,
|
|
50005
|
+
* default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified.
|
|
50006
|
+
*/
|
|
50007
|
+
constructor(apiClient) {
|
|
50008
|
+
this.apiClient = apiClient || ApiClient.instance;
|
|
50009
|
+
}
|
|
50010
|
+
|
|
50011
|
+
|
|
50012
|
+
/**
|
|
50013
|
+
* Delete team
|
|
50014
|
+
*
|
|
50015
|
+
* @param {String} teamId Team ID
|
|
50016
|
+
*/
|
|
50017
|
+
deleteTeam(teamId) {
|
|
50018
|
+
// verify the required parameter 'teamId' is set
|
|
50019
|
+
if (teamId === undefined || teamId === null) {
|
|
50020
|
+
throw 'Missing the required parameter "teamId" when calling deleteTeam';
|
|
50021
|
+
}
|
|
50022
|
+
|
|
50023
|
+
return this.apiClient.callApi(
|
|
50024
|
+
'/api/v2/teams/{teamId}',
|
|
50025
|
+
'DELETE',
|
|
50026
|
+
{ 'teamId': teamId },
|
|
50027
|
+
{ },
|
|
50028
|
+
{ },
|
|
50029
|
+
{ },
|
|
50030
|
+
null,
|
|
50031
|
+
['PureCloud OAuth'],
|
|
50032
|
+
['application/json'],
|
|
50033
|
+
['application/json']
|
|
50034
|
+
);
|
|
50035
|
+
}
|
|
50036
|
+
|
|
50037
|
+
/**
|
|
50038
|
+
* Get team
|
|
50039
|
+
*
|
|
50040
|
+
* @param {String} teamId Team ID
|
|
50041
|
+
*/
|
|
50042
|
+
getTeam(teamId) {
|
|
50043
|
+
// verify the required parameter 'teamId' is set
|
|
50044
|
+
if (teamId === undefined || teamId === null) {
|
|
50045
|
+
throw 'Missing the required parameter "teamId" when calling getTeam';
|
|
50046
|
+
}
|
|
50047
|
+
|
|
50048
|
+
return this.apiClient.callApi(
|
|
50049
|
+
'/api/v2/teams/{teamId}',
|
|
50050
|
+
'GET',
|
|
50051
|
+
{ 'teamId': teamId },
|
|
50052
|
+
{ },
|
|
50053
|
+
{ },
|
|
50054
|
+
{ },
|
|
50055
|
+
null,
|
|
50056
|
+
['PureCloud OAuth'],
|
|
50057
|
+
['application/json'],
|
|
50058
|
+
['application/json']
|
|
50059
|
+
);
|
|
50060
|
+
}
|
|
50061
|
+
|
|
50062
|
+
/**
|
|
50063
|
+
* Get Team listing
|
|
50064
|
+
*
|
|
50065
|
+
* @param {Object} opts Optional parameters
|
|
50066
|
+
* @param {Number} opts.pageSize Page size (default to 25)
|
|
50067
|
+
* @param {String} opts.name Return only teams whose names start with this value (case-insensitive matching)
|
|
50068
|
+
* @param {String} opts.after The cursor that points to the next item in the complete list of teams
|
|
50069
|
+
* @param {String} opts.before The cursor that points to the previous item in the complete list of teams
|
|
50070
|
+
* @param {Object} opts.expand Expand the name on each user
|
|
50071
|
+
*/
|
|
50072
|
+
getTeams(opts) {
|
|
50073
|
+
opts = opts || {};
|
|
50074
|
+
|
|
50075
|
+
|
|
50076
|
+
return this.apiClient.callApi(
|
|
50077
|
+
'/api/v2/teams',
|
|
50078
|
+
'GET',
|
|
50079
|
+
{ },
|
|
50080
|
+
{ 'pageSize': opts['pageSize'],'name': opts['name'],'after': opts['after'],'before': opts['before'],'expand': opts['expand'] },
|
|
50081
|
+
{ },
|
|
50082
|
+
{ },
|
|
50083
|
+
null,
|
|
50084
|
+
['PureCloud OAuth'],
|
|
50085
|
+
['application/json'],
|
|
50086
|
+
['application/json']
|
|
50087
|
+
);
|
|
50088
|
+
}
|
|
50089
|
+
|
|
50090
|
+
/**
|
|
50091
|
+
* Update team
|
|
50092
|
+
*
|
|
50093
|
+
* @param {String} teamId Team ID
|
|
50094
|
+
* @param {Object} body Team
|
|
50095
|
+
*/
|
|
50096
|
+
patchTeam(teamId, body) {
|
|
50097
|
+
// verify the required parameter 'teamId' is set
|
|
50098
|
+
if (teamId === undefined || teamId === null) {
|
|
50099
|
+
throw 'Missing the required parameter "teamId" when calling patchTeam';
|
|
50100
|
+
}
|
|
50101
|
+
// verify the required parameter 'body' is set
|
|
50102
|
+
if (body === undefined || body === null) {
|
|
50103
|
+
throw 'Missing the required parameter "body" when calling patchTeam';
|
|
50104
|
+
}
|
|
50105
|
+
|
|
50106
|
+
return this.apiClient.callApi(
|
|
50107
|
+
'/api/v2/teams/{teamId}',
|
|
50108
|
+
'PATCH',
|
|
50109
|
+
{ 'teamId': teamId },
|
|
50110
|
+
{ },
|
|
50111
|
+
{ },
|
|
50112
|
+
{ },
|
|
50113
|
+
body,
|
|
50114
|
+
['PureCloud OAuth'],
|
|
50115
|
+
['application/json'],
|
|
50116
|
+
['application/json']
|
|
50117
|
+
);
|
|
50118
|
+
}
|
|
50119
|
+
|
|
50120
|
+
/**
|
|
50121
|
+
* Create a team
|
|
50122
|
+
*
|
|
50123
|
+
* @param {Object} body Team
|
|
50124
|
+
*/
|
|
50125
|
+
postTeams(body) {
|
|
50126
|
+
// verify the required parameter 'body' is set
|
|
50127
|
+
if (body === undefined || body === null) {
|
|
50128
|
+
throw 'Missing the required parameter "body" when calling postTeams';
|
|
50129
|
+
}
|
|
50130
|
+
|
|
50131
|
+
return this.apiClient.callApi(
|
|
50132
|
+
'/api/v2/teams',
|
|
50133
|
+
'POST',
|
|
50134
|
+
{ },
|
|
50135
|
+
{ },
|
|
50136
|
+
{ },
|
|
50137
|
+
{ },
|
|
50138
|
+
body,
|
|
50139
|
+
['PureCloud OAuth'],
|
|
50140
|
+
['application/json'],
|
|
50141
|
+
['application/json']
|
|
50142
|
+
);
|
|
50143
|
+
}
|
|
50144
|
+
|
|
50145
|
+
/**
|
|
50146
|
+
* Search resources.
|
|
50147
|
+
*
|
|
50148
|
+
* @param {Object} body Search request options
|
|
50149
|
+
*/
|
|
50150
|
+
postTeamsSearch(body) {
|
|
50151
|
+
// verify the required parameter 'body' is set
|
|
50152
|
+
if (body === undefined || body === null) {
|
|
50153
|
+
throw 'Missing the required parameter "body" when calling postTeamsSearch';
|
|
50154
|
+
}
|
|
50155
|
+
|
|
50156
|
+
return this.apiClient.callApi(
|
|
50157
|
+
'/api/v2/teams/search',
|
|
50158
|
+
'POST',
|
|
50159
|
+
{ },
|
|
50160
|
+
{ },
|
|
50161
|
+
{ },
|
|
50162
|
+
{ },
|
|
50163
|
+
body,
|
|
50164
|
+
['PureCloud OAuth'],
|
|
50165
|
+
['application/json'],
|
|
50166
|
+
['application/json']
|
|
50167
|
+
);
|
|
50168
|
+
}
|
|
50169
|
+
|
|
50170
|
+
}
|
|
50171
|
+
|
|
47722
50172
|
class TelephonyApi {
|
|
47723
50173
|
/**
|
|
47724
50174
|
* Telephony service.
|
|
47725
50175
|
* @module purecloud-platform-client-v2/api/TelephonyApi
|
|
47726
|
-
* @version
|
|
50176
|
+
* @version 141.1.0
|
|
47727
50177
|
*/
|
|
47728
50178
|
|
|
47729
50179
|
/**
|
|
@@ -47831,7 +50281,7 @@ class TelephonyProvidersEdgeApi {
|
|
|
47831
50281
|
/**
|
|
47832
50282
|
* TelephonyProvidersEdge service.
|
|
47833
50283
|
* @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
47834
|
-
* @version
|
|
50284
|
+
* @version 141.1.0
|
|
47835
50285
|
*/
|
|
47836
50286
|
|
|
47837
50287
|
/**
|
|
@@ -51464,7 +53914,7 @@ class TextbotsApi {
|
|
|
51464
53914
|
/**
|
|
51465
53915
|
* Textbots service.
|
|
51466
53916
|
* @module purecloud-platform-client-v2/api/TextbotsApi
|
|
51467
|
-
* @version
|
|
53917
|
+
* @version 141.1.0
|
|
51468
53918
|
*/
|
|
51469
53919
|
|
|
51470
53920
|
/**
|
|
@@ -51592,7 +54042,7 @@ class TokensApi {
|
|
|
51592
54042
|
/**
|
|
51593
54043
|
* Tokens service.
|
|
51594
54044
|
* @module purecloud-platform-client-v2/api/TokensApi
|
|
51595
|
-
* @version
|
|
54045
|
+
* @version 141.1.0
|
|
51596
54046
|
*/
|
|
51597
54047
|
|
|
51598
54048
|
/**
|
|
@@ -51698,7 +54148,7 @@ class UploadsApi {
|
|
|
51698
54148
|
/**
|
|
51699
54149
|
* Uploads service.
|
|
51700
54150
|
* @module purecloud-platform-client-v2/api/UploadsApi
|
|
51701
|
-
* @version
|
|
54151
|
+
* @version 141.1.0
|
|
51702
54152
|
*/
|
|
51703
54153
|
|
|
51704
54154
|
/**
|
|
@@ -51849,7 +54299,7 @@ class UsageApi {
|
|
|
51849
54299
|
/**
|
|
51850
54300
|
* Usage service.
|
|
51851
54301
|
* @module purecloud-platform-client-v2/api/UsageApi
|
|
51852
|
-
* @version
|
|
54302
|
+
* @version 141.1.0
|
|
51853
54303
|
*/
|
|
51854
54304
|
|
|
51855
54305
|
/**
|
|
@@ -51920,7 +54370,7 @@ class UserRecordingsApi {
|
|
|
51920
54370
|
/**
|
|
51921
54371
|
* UserRecordings service.
|
|
51922
54372
|
* @module purecloud-platform-client-v2/api/UserRecordingsApi
|
|
51923
|
-
* @version
|
|
54373
|
+
* @version 141.1.0
|
|
51924
54374
|
*/
|
|
51925
54375
|
|
|
51926
54376
|
/**
|
|
@@ -52104,7 +54554,7 @@ class UsersApi {
|
|
|
52104
54554
|
/**
|
|
52105
54555
|
* Users service.
|
|
52106
54556
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
52107
|
-
* @version
|
|
54557
|
+
* @version 141.1.0
|
|
52108
54558
|
*/
|
|
52109
54559
|
|
|
52110
54560
|
/**
|
|
@@ -54406,7 +56856,7 @@ class UtilitiesApi {
|
|
|
54406
56856
|
/**
|
|
54407
56857
|
* Utilities service.
|
|
54408
56858
|
* @module purecloud-platform-client-v2/api/UtilitiesApi
|
|
54409
|
-
* @version
|
|
56859
|
+
* @version 141.1.0
|
|
54410
56860
|
*/
|
|
54411
56861
|
|
|
54412
56862
|
/**
|
|
@@ -54517,7 +56967,7 @@ class VoicemailApi {
|
|
|
54517
56967
|
/**
|
|
54518
56968
|
* Voicemail service.
|
|
54519
56969
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
54520
|
-
* @version
|
|
56970
|
+
* @version 141.1.0
|
|
54521
56971
|
*/
|
|
54522
56972
|
|
|
54523
56973
|
/**
|
|
@@ -55184,7 +57634,7 @@ class WebChatApi {
|
|
|
55184
57634
|
/**
|
|
55185
57635
|
* WebChat service.
|
|
55186
57636
|
* @module purecloud-platform-client-v2/api/WebChatApi
|
|
55187
|
-
* @version
|
|
57637
|
+
* @version 141.1.0
|
|
55188
57638
|
*/
|
|
55189
57639
|
|
|
55190
57640
|
/**
|
|
@@ -55728,7 +58178,7 @@ class WebDeploymentsApi {
|
|
|
55728
58178
|
/**
|
|
55729
58179
|
* WebDeployments service.
|
|
55730
58180
|
* @module purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
55731
|
-
* @version
|
|
58181
|
+
* @version 141.1.0
|
|
55732
58182
|
*/
|
|
55733
58183
|
|
|
55734
58184
|
/**
|
|
@@ -56083,7 +58533,7 @@ class WebMessagingApi {
|
|
|
56083
58533
|
/**
|
|
56084
58534
|
* WebMessaging service.
|
|
56085
58535
|
* @module purecloud-platform-client-v2/api/WebMessagingApi
|
|
56086
|
-
* @version
|
|
58536
|
+
* @version 141.1.0
|
|
56087
58537
|
*/
|
|
56088
58538
|
|
|
56089
58539
|
/**
|
|
@@ -56129,7 +58579,7 @@ class WidgetsApi {
|
|
|
56129
58579
|
/**
|
|
56130
58580
|
* Widgets service.
|
|
56131
58581
|
* @module purecloud-platform-client-v2/api/WidgetsApi
|
|
56132
|
-
* @version
|
|
58582
|
+
* @version 141.1.0
|
|
56133
58583
|
*/
|
|
56134
58584
|
|
|
56135
58585
|
/**
|
|
@@ -56275,7 +58725,7 @@ class WorkforceManagementApi {
|
|
|
56275
58725
|
/**
|
|
56276
58726
|
* WorkforceManagement service.
|
|
56277
58727
|
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
56278
|
-
* @version
|
|
58728
|
+
* @version 141.1.0
|
|
56279
58729
|
*/
|
|
56280
58730
|
|
|
56281
58731
|
/**
|
|
@@ -56695,6 +59145,31 @@ class WorkforceManagementApi {
|
|
|
56695
59145
|
);
|
|
56696
59146
|
}
|
|
56697
59147
|
|
|
59148
|
+
/**
|
|
59149
|
+
* Query the status of a historical adherence request operation. Only the user who started the operation can query the status
|
|
59150
|
+
* Job details are only retained if the initial request returned a 202 ACCEPTED response
|
|
59151
|
+
* @param {String} jobId jobId
|
|
59152
|
+
*/
|
|
59153
|
+
getWorkforcemanagementAdherenceHistoricalJob(jobId) {
|
|
59154
|
+
// verify the required parameter 'jobId' is set
|
|
59155
|
+
if (jobId === undefined || jobId === null) {
|
|
59156
|
+
throw 'Missing the required parameter "jobId" when calling getWorkforcemanagementAdherenceHistoricalJob';
|
|
59157
|
+
}
|
|
59158
|
+
|
|
59159
|
+
return this.apiClient.callApi(
|
|
59160
|
+
'/api/v2/workforcemanagement/adherence/historical/jobs/{jobId}',
|
|
59161
|
+
'GET',
|
|
59162
|
+
{ 'jobId': jobId },
|
|
59163
|
+
{ },
|
|
59164
|
+
{ },
|
|
59165
|
+
{ },
|
|
59166
|
+
null,
|
|
59167
|
+
['PureCloud OAuth'],
|
|
59168
|
+
['application/json'],
|
|
59169
|
+
['application/json']
|
|
59170
|
+
);
|
|
59171
|
+
}
|
|
59172
|
+
|
|
56698
59173
|
/**
|
|
56699
59174
|
* Get status of the modeling job
|
|
56700
59175
|
*
|
|
@@ -60526,7 +63001,7 @@ class WorkforceManagementApi {
|
|
|
60526
63001
|
* </pre>
|
|
60527
63002
|
* </p>
|
|
60528
63003
|
* @module purecloud-platform-client-v2/index
|
|
60529
|
-
* @version
|
|
63004
|
+
* @version 141.1.0
|
|
60530
63005
|
*/
|
|
60531
63006
|
class platformClient {
|
|
60532
63007
|
constructor() {
|
|
@@ -60775,6 +63250,11 @@ class platformClient {
|
|
|
60775
63250
|
* @property {module:purecloud-platform-client-v2/api/SuggestApi}
|
|
60776
63251
|
*/
|
|
60777
63252
|
this.SuggestApi = SuggestApi;
|
|
63253
|
+
/**
|
|
63254
|
+
* The TeamsApi service constructor.
|
|
63255
|
+
* @property {module:purecloud-platform-client-v2/api/TeamsApi}
|
|
63256
|
+
*/
|
|
63257
|
+
this.TeamsApi = TeamsApi;
|
|
60778
63258
|
/**
|
|
60779
63259
|
* The TelephonyApi service constructor.
|
|
60780
63260
|
* @property {module:purecloud-platform-client-v2/api/TelephonyApi}
|
|
@@ -60866,4 +63346,4 @@ var index = new platformClient();
|
|
|
60866
63346
|
module.exports = index;
|
|
60867
63347
|
|
|
60868
63348
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
|
|
60869
|
-
},{"axios":
|
|
63349
|
+
},{"axios":8,"buffer":3,"os":5,"path":6,"qs":50}]},{},[]);
|