webitel-sdk 0.1.90 → 0.1.94
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/bundles/index.esm.js +973 -249
- package/bundles/index.esm.js.map +1 -1
- package/bundles/index.esm.min.js +1 -1
- package/bundles/index.esm.min.js.map +1 -1
- package/bundles/index.umd.js +1078 -253
- package/bundles/index.umd.js.map +1 -1
- package/bundles/index.umd.min.js +1 -1
- package/bundles/index.umd.min.js.map +1 -1
- package/esm2015/api/engine-chat-plan.js +13 -0
- package/esm2015/api/engine-chat-plan.js.map +1 -0
- package/esm2015/api/engine-create-chat-plan-request.js +13 -0
- package/esm2015/api/engine-create-chat-plan-request.js.map +1 -0
- package/esm2015/api/engine-list-chat-plan.js +13 -0
- package/esm2015/api/engine-list-chat-plan.js.map +1 -0
- package/esm2015/api/engine-patch-chat-plan-request.js +13 -0
- package/esm2015/api/engine-patch-chat-plan-request.js.map +1 -0
- package/esm2015/api/engine-patch-queue-bucket-request.js +13 -0
- package/esm2015/api/engine-patch-queue-bucket-request.js.map +1 -0
- package/esm2015/api/engine-update-chat-plan-request.js +13 -0
- package/esm2015/api/engine-update-chat-plan-request.js.map +1 -0
- package/esm2015/api/index.js.map +1 -1
- package/esm2015/api/queue-bucket-service-api.js +125 -27
- package/esm2015/api/queue-bucket-service-api.js.map +1 -1
- package/esm2015/api/routing-chat-plan-service-api.js +572 -0
- package/esm2015/api/routing-chat-plan-service-api.js.map +1 -0
- package/esm2015/api.js +1 -0
- package/esm2015/api.js.map +1 -1
- package/esm2015/socket/client.js +54 -5
- package/esm2015/socket/client.js.map +1 -1
- package/esm2015/socket/conversation.js +26 -9
- package/esm2015/socket/conversation.js.map +1 -1
- package/esm2015/socket/task.js +6 -2
- package/esm2015/socket/task.js.map +1 -1
- package/esm5/api/engine-chat-plan.js +13 -0
- package/esm5/api/engine-chat-plan.js.map +1 -0
- package/esm5/api/engine-create-chat-plan-request.js +13 -0
- package/esm5/api/engine-create-chat-plan-request.js.map +1 -0
- package/esm5/api/engine-list-chat-plan.js +13 -0
- package/esm5/api/engine-list-chat-plan.js.map +1 -0
- package/esm5/api/engine-patch-chat-plan-request.js +13 -0
- package/esm5/api/engine-patch-chat-plan-request.js.map +1 -0
- package/esm5/api/engine-patch-queue-bucket-request.js +13 -0
- package/esm5/api/engine-patch-queue-bucket-request.js.map +1 -0
- package/esm5/api/engine-update-chat-plan-request.js +13 -0
- package/esm5/api/engine-update-chat-plan-request.js.map +1 -0
- package/esm5/api/index.js.map +1 -1
- package/esm5/api/queue-bucket-service-api.js +138 -27
- package/esm5/api/queue-bucket-service-api.js.map +1 -1
- package/esm5/api/routing-chat-plan-service-api.js +645 -0
- package/esm5/api/routing-chat-plan-service-api.js.map +1 -0
- package/esm5/api.js +1 -0
- package/esm5/api.js.map +1 -1
- package/esm5/socket/client.js +58 -6
- package/esm5/socket/client.js.map +1 -1
- package/esm5/socket/conversation.js +31 -9
- package/esm5/socket/conversation.js.map +1 -1
- package/esm5/socket/task.js +11 -2
- package/esm5/socket/task.js.map +1 -1
- package/package.json +1 -1
- package/types/api/create-call-request-call-settings.d.ts +6 -0
- package/types/api/create-call-request-call-settings.d.ts.map +1 -1
- package/types/api/engine-chat-plan.d.ts +50 -0
- package/types/api/engine-chat-plan.d.ts.map +1 -0
- package/types/api/engine-create-chat-plan-request.d.ts +44 -0
- package/types/api/engine-create-chat-plan-request.d.ts.map +1 -0
- package/types/api/engine-create-queue-bucket-request.d.ts +8 -2
- package/types/api/engine-create-queue-bucket-request.d.ts.map +1 -1
- package/types/api/engine-history-call.d.ts +6 -0
- package/types/api/engine-history-call.d.ts.map +1 -1
- package/types/api/engine-list-chat-plan.d.ts +32 -0
- package/types/api/engine-list-chat-plan.d.ts.map +1 -0
- package/types/api/engine-patch-chat-plan-request.d.ts +56 -0
- package/types/api/engine-patch-chat-plan-request.d.ts.map +1 -0
- package/types/api/engine-patch-queue-bucket-request.d.ts +62 -0
- package/types/api/engine-patch-queue-bucket-request.d.ts.map +1 -0
- package/types/api/engine-queue-bucket.d.ts +12 -0
- package/types/api/engine-queue-bucket.d.ts.map +1 -1
- package/types/api/engine-queue-resource-group.d.ts +6 -0
- package/types/api/engine-queue-resource-group.d.ts.map +1 -1
- package/types/api/engine-update-chat-plan-request.d.ts +50 -0
- package/types/api/engine-update-chat-plan-request.d.ts.map +1 -0
- package/types/api/engine-update-queue-bucket-request.d.ts +8 -2
- package/types/api/engine-update-queue-bucket-request.d.ts.map +1 -1
- package/types/api/index.d.ts +6 -0
- package/types/api/index.d.ts.map +1 -1
- package/types/api/queue-bucket-service-api.d.ts +46 -16
- package/types/api/queue-bucket-service-api.d.ts.map +1 -1
- package/types/api/routing-chat-plan-service-api.d.ts +225 -0
- package/types/api/routing-chat-plan-service-api.d.ts.map +1 -0
- package/types/api.d.ts +1 -0
- package/types/api.d.ts.map +1 -1
- package/types/socket/call.d.ts +2 -2
- package/types/socket/call.d.ts.map +1 -1
- package/types/socket/client.d.ts.map +1 -1
- package/types/socket/conversation.d.ts +15 -5
- package/types/socket/conversation.d.ts.map +1 -1
- package/types/socket/task.d.ts +3 -0
- package/types/socket/task.d.ts.map +1 -1
package/bundles/index.umd.js
CHANGED
|
@@ -16937,11 +16937,10 @@
|
|
|
16937
16937
|
* @summary DeleteQueueRouting
|
|
16938
16938
|
* @param {string} queueId
|
|
16939
16939
|
* @param {string} id
|
|
16940
|
-
* @param {string} [domainId]
|
|
16941
16940
|
* @param {*} [options] Override http request option.
|
|
16942
16941
|
* @throws {RequiredError}
|
|
16943
16942
|
*/
|
|
16944
|
-
deleteQueueBucket: function (queueId, id,
|
|
16943
|
+
deleteQueueBucket: function (queueId, id, options) {
|
|
16945
16944
|
if (options === void 0) { options = {}; }
|
|
16946
16945
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
16947
16946
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
@@ -16981,14 +16980,82 @@
|
|
|
16981
16980
|
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
16982
16981
|
_b.label = 5;
|
|
16983
16982
|
case 5:
|
|
16984
|
-
|
|
16985
|
-
|
|
16983
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
16984
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
16985
|
+
delete localVarUrlObj.search;
|
|
16986
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16987
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
16988
|
+
return [2 /*return*/, {
|
|
16989
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
16990
|
+
options: localVarRequestOptions,
|
|
16991
|
+
}];
|
|
16992
|
+
}
|
|
16993
|
+
});
|
|
16994
|
+
});
|
|
16995
|
+
},
|
|
16996
|
+
/**
|
|
16997
|
+
*
|
|
16998
|
+
* @param {string} queueId
|
|
16999
|
+
* @param {string} id
|
|
17000
|
+
* @param {EnginePatchQueueBucketRequest} body
|
|
17001
|
+
* @param {*} [options] Override http request option.
|
|
17002
|
+
* @throws {RequiredError}
|
|
17003
|
+
*/
|
|
17004
|
+
patchQueueBucket: function (queueId, id, body, options) {
|
|
17005
|
+
if (options === void 0) { options = {}; }
|
|
17006
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
17007
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
17008
|
+
return tslib.__generator(this, function (_b) {
|
|
17009
|
+
switch (_b.label) {
|
|
17010
|
+
case 0:
|
|
17011
|
+
// verify required parameter 'queueId' is not null or undefined
|
|
17012
|
+
if (queueId === null || queueId === undefined) {
|
|
17013
|
+
throw new RequiredError('queueId', 'Required parameter queueId was null or undefined when calling patchQueueBucket.');
|
|
17014
|
+
}
|
|
17015
|
+
// verify required parameter 'id' is not null or undefined
|
|
17016
|
+
if (id === null || id === undefined) {
|
|
17017
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling patchQueueBucket.');
|
|
17018
|
+
}
|
|
17019
|
+
// verify required parameter 'body' is not null or undefined
|
|
17020
|
+
if (body === null || body === undefined) {
|
|
17021
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchQueueBucket.');
|
|
17022
|
+
}
|
|
17023
|
+
localVarPath = "/call_center/queues/{queue_id}/buckets/{id}"
|
|
17024
|
+
.replace("{" + 'queue_id' + "}", encodeURIComponent(String(queueId)))
|
|
17025
|
+
.replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
17026
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
17027
|
+
if (configuration) {
|
|
17028
|
+
baseOptions = configuration.baseOptions;
|
|
16986
17029
|
}
|
|
17030
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'PATCH' }, baseOptions), options);
|
|
17031
|
+
localVarHeaderParameter = {};
|
|
17032
|
+
localVarQueryParameter = {};
|
|
17033
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
17034
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
17035
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
17036
|
+
case 1:
|
|
17037
|
+
_a = _b.sent();
|
|
17038
|
+
return [3 /*break*/, 4];
|
|
17039
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
17040
|
+
case 3:
|
|
17041
|
+
_a = _b.sent();
|
|
17042
|
+
_b.label = 4;
|
|
17043
|
+
case 4:
|
|
17044
|
+
localVarApiKeyValue = _a;
|
|
17045
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
17046
|
+
_b.label = 5;
|
|
17047
|
+
case 5:
|
|
17048
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
16987
17049
|
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
16988
17050
|
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
16989
17051
|
delete localVarUrlObj.search;
|
|
16990
17052
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16991
17053
|
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
17054
|
+
needsSerialization = typeof body !== 'string' ||
|
|
17055
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
17056
|
+
localVarRequestOptions.data = needsSerialization
|
|
17057
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
17058
|
+
: body || '';
|
|
16992
17059
|
return [2 /*return*/, {
|
|
16993
17060
|
url: globalImportUrl.format(localVarUrlObj),
|
|
16994
17061
|
options: localVarRequestOptions,
|
|
@@ -17002,11 +17069,10 @@
|
|
|
17002
17069
|
* @summary ReadQueueRouting
|
|
17003
17070
|
* @param {string} queueId
|
|
17004
17071
|
* @param {string} id
|
|
17005
|
-
* @param {string} [domainId]
|
|
17006
17072
|
* @param {*} [options] Override http request option.
|
|
17007
17073
|
* @throws {RequiredError}
|
|
17008
17074
|
*/
|
|
17009
|
-
readQueueBucket: function (queueId, id,
|
|
17075
|
+
readQueueBucket: function (queueId, id, options) {
|
|
17010
17076
|
if (options === void 0) { options = {}; }
|
|
17011
17077
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
17012
17078
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
@@ -17046,9 +17112,6 @@
|
|
|
17046
17112
|
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
17047
17113
|
_b.label = 5;
|
|
17048
17114
|
case 5:
|
|
17049
|
-
if (domainId !== undefined) {
|
|
17050
|
-
localVarQueryParameter['domain_id'] = domainId;
|
|
17051
|
-
}
|
|
17052
17115
|
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
17053
17116
|
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
17054
17117
|
delete localVarUrlObj.search;
|
|
@@ -17251,16 +17314,41 @@
|
|
|
17251
17314
|
* @summary DeleteQueueRouting
|
|
17252
17315
|
* @param {string} queueId
|
|
17253
17316
|
* @param {string} id
|
|
17254
|
-
* @param {string} [domainId]
|
|
17255
17317
|
* @param {*} [options] Override http request option.
|
|
17256
17318
|
* @throws {RequiredError}
|
|
17257
17319
|
*/
|
|
17258
|
-
deleteQueueBucket: function (queueId, id,
|
|
17320
|
+
deleteQueueBucket: function (queueId, id, options) {
|
|
17321
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
17322
|
+
var localVarAxiosArgs;
|
|
17323
|
+
return tslib.__generator(this, function (_a) {
|
|
17324
|
+
switch (_a.label) {
|
|
17325
|
+
case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).deleteQueueBucket(queueId, id, options)];
|
|
17326
|
+
case 1:
|
|
17327
|
+
localVarAxiosArgs = _a.sent();
|
|
17328
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
17329
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
17330
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
17331
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
17332
|
+
return axios.request(axiosRequestArgs);
|
|
17333
|
+
}];
|
|
17334
|
+
}
|
|
17335
|
+
});
|
|
17336
|
+
});
|
|
17337
|
+
},
|
|
17338
|
+
/**
|
|
17339
|
+
*
|
|
17340
|
+
* @param {string} queueId
|
|
17341
|
+
* @param {string} id
|
|
17342
|
+
* @param {EnginePatchQueueBucketRequest} body
|
|
17343
|
+
* @param {*} [options] Override http request option.
|
|
17344
|
+
* @throws {RequiredError}
|
|
17345
|
+
*/
|
|
17346
|
+
patchQueueBucket: function (queueId, id, body, options) {
|
|
17259
17347
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
17260
17348
|
var localVarAxiosArgs;
|
|
17261
17349
|
return tslib.__generator(this, function (_a) {
|
|
17262
17350
|
switch (_a.label) {
|
|
17263
|
-
case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).
|
|
17351
|
+
case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).patchQueueBucket(queueId, id, body, options)];
|
|
17264
17352
|
case 1:
|
|
17265
17353
|
localVarAxiosArgs = _a.sent();
|
|
17266
17354
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -17278,16 +17366,15 @@
|
|
|
17278
17366
|
* @summary ReadQueueRouting
|
|
17279
17367
|
* @param {string} queueId
|
|
17280
17368
|
* @param {string} id
|
|
17281
|
-
* @param {string} [domainId]
|
|
17282
17369
|
* @param {*} [options] Override http request option.
|
|
17283
17370
|
* @throws {RequiredError}
|
|
17284
17371
|
*/
|
|
17285
|
-
readQueueBucket: function (queueId, id,
|
|
17372
|
+
readQueueBucket: function (queueId, id, options) {
|
|
17286
17373
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
17287
17374
|
var localVarAxiosArgs;
|
|
17288
17375
|
return tslib.__generator(this, function (_a) {
|
|
17289
17376
|
switch (_a.label) {
|
|
17290
|
-
case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).readQueueBucket(queueId, id,
|
|
17377
|
+
case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).readQueueBucket(queueId, id, options)];
|
|
17291
17378
|
case 1:
|
|
17292
17379
|
localVarAxiosArgs = _a.sent();
|
|
17293
17380
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -17384,13 +17471,25 @@
|
|
|
17384
17471
|
* @summary DeleteQueueRouting
|
|
17385
17472
|
* @param {string} queueId
|
|
17386
17473
|
* @param {string} id
|
|
17387
|
-
* @param {string} [domainId]
|
|
17388
17474
|
* @param {*} [options] Override http request option.
|
|
17389
17475
|
* @throws {RequiredError}
|
|
17390
17476
|
*/
|
|
17391
|
-
deleteQueueBucket: function (queueId, id,
|
|
17477
|
+
deleteQueueBucket: function (queueId, id, options) {
|
|
17478
|
+
return QueueBucketServiceApiFp(configuration)
|
|
17479
|
+
.deleteQueueBucket(queueId, id, options)
|
|
17480
|
+
.then(function (request) { return request(axios, basePath); });
|
|
17481
|
+
},
|
|
17482
|
+
/**
|
|
17483
|
+
*
|
|
17484
|
+
* @param {string} queueId
|
|
17485
|
+
* @param {string} id
|
|
17486
|
+
* @param {EnginePatchQueueBucketRequest} body
|
|
17487
|
+
* @param {*} [options] Override http request option.
|
|
17488
|
+
* @throws {RequiredError}
|
|
17489
|
+
*/
|
|
17490
|
+
patchQueueBucket: function (queueId, id, body, options) {
|
|
17392
17491
|
return QueueBucketServiceApiFp(configuration)
|
|
17393
|
-
.
|
|
17492
|
+
.patchQueueBucket(queueId, id, body, options)
|
|
17394
17493
|
.then(function (request) { return request(axios, basePath); });
|
|
17395
17494
|
},
|
|
17396
17495
|
/**
|
|
@@ -17398,13 +17497,12 @@
|
|
|
17398
17497
|
* @summary ReadQueueRouting
|
|
17399
17498
|
* @param {string} queueId
|
|
17400
17499
|
* @param {string} id
|
|
17401
|
-
* @param {string} [domainId]
|
|
17402
17500
|
* @param {*} [options] Override http request option.
|
|
17403
17501
|
* @throws {RequiredError}
|
|
17404
17502
|
*/
|
|
17405
|
-
readQueueBucket: function (queueId, id,
|
|
17503
|
+
readQueueBucket: function (queueId, id, options) {
|
|
17406
17504
|
return QueueBucketServiceApiFp(configuration)
|
|
17407
|
-
.readQueueBucket(queueId, id,
|
|
17505
|
+
.readQueueBucket(queueId, id, options)
|
|
17408
17506
|
.then(function (request) { return request(axios, basePath); });
|
|
17409
17507
|
},
|
|
17410
17508
|
/**
|
|
@@ -17472,15 +17570,29 @@
|
|
|
17472
17570
|
* @summary DeleteQueueRouting
|
|
17473
17571
|
* @param {string} queueId
|
|
17474
17572
|
* @param {string} id
|
|
17475
|
-
* @param {string} [domainId]
|
|
17476
17573
|
* @param {*} [options] Override http request option.
|
|
17477
17574
|
* @throws {RequiredError}
|
|
17478
17575
|
* @memberof QueueBucketServiceApi
|
|
17479
17576
|
*/
|
|
17480
|
-
QueueBucketServiceApi.prototype.deleteQueueBucket = function (queueId, id,
|
|
17577
|
+
QueueBucketServiceApi.prototype.deleteQueueBucket = function (queueId, id, options) {
|
|
17578
|
+
var _this = this;
|
|
17579
|
+
return QueueBucketServiceApiFp(this.configuration)
|
|
17580
|
+
.deleteQueueBucket(queueId, id, options)
|
|
17581
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
17582
|
+
};
|
|
17583
|
+
/**
|
|
17584
|
+
*
|
|
17585
|
+
* @param {string} queueId
|
|
17586
|
+
* @param {string} id
|
|
17587
|
+
* @param {EnginePatchQueueBucketRequest} body
|
|
17588
|
+
* @param {*} [options] Override http request option.
|
|
17589
|
+
* @throws {RequiredError}
|
|
17590
|
+
* @memberof QueueBucketServiceApi
|
|
17591
|
+
*/
|
|
17592
|
+
QueueBucketServiceApi.prototype.patchQueueBucket = function (queueId, id, body, options) {
|
|
17481
17593
|
var _this = this;
|
|
17482
17594
|
return QueueBucketServiceApiFp(this.configuration)
|
|
17483
|
-
.
|
|
17595
|
+
.patchQueueBucket(queueId, id, body, options)
|
|
17484
17596
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
17485
17597
|
};
|
|
17486
17598
|
/**
|
|
@@ -17488,15 +17600,14 @@
|
|
|
17488
17600
|
* @summary ReadQueueRouting
|
|
17489
17601
|
* @param {string} queueId
|
|
17490
17602
|
* @param {string} id
|
|
17491
|
-
* @param {string} [domainId]
|
|
17492
17603
|
* @param {*} [options] Override http request option.
|
|
17493
17604
|
* @throws {RequiredError}
|
|
17494
17605
|
* @memberof QueueBucketServiceApi
|
|
17495
17606
|
*/
|
|
17496
|
-
QueueBucketServiceApi.prototype.readQueueBucket = function (queueId, id,
|
|
17607
|
+
QueueBucketServiceApi.prototype.readQueueBucket = function (queueId, id, options) {
|
|
17497
17608
|
var _this = this;
|
|
17498
17609
|
return QueueBucketServiceApiFp(this.configuration)
|
|
17499
|
-
.readQueueBucket(queueId, id,
|
|
17610
|
+
.readQueueBucket(queueId, id, options)
|
|
17500
17611
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
17501
17612
|
};
|
|
17502
17613
|
/**
|
|
@@ -20718,45 +20829,780 @@
|
|
|
20718
20829
|
* @throws {RequiredError}
|
|
20719
20830
|
* @memberof QueueSkillServiceApi
|
|
20720
20831
|
*/
|
|
20721
|
-
QueueSkillServiceApi.prototype.searchQueueSkill = function (queueId, page, size, q, sort, fields, id, skillId, bucketId, lvl, minCapacity, maxCapacity, enabled, options) {
|
|
20832
|
+
QueueSkillServiceApi.prototype.searchQueueSkill = function (queueId, page, size, q, sort, fields, id, skillId, bucketId, lvl, minCapacity, maxCapacity, enabled, options) {
|
|
20833
|
+
var _this = this;
|
|
20834
|
+
return QueueSkillServiceApiFp(this.configuration)
|
|
20835
|
+
.searchQueueSkill(queueId, page, size, q, sort, fields, id, skillId, bucketId, lvl, minCapacity, maxCapacity, enabled, options)
|
|
20836
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
20837
|
+
};
|
|
20838
|
+
/**
|
|
20839
|
+
*
|
|
20840
|
+
* @param {number} queueId
|
|
20841
|
+
* @param {number} id
|
|
20842
|
+
* @param {EngineUpdateQueueSkillRequest} body
|
|
20843
|
+
* @param {*} [options] Override http request option.
|
|
20844
|
+
* @throws {RequiredError}
|
|
20845
|
+
* @memberof QueueSkillServiceApi
|
|
20846
|
+
*/
|
|
20847
|
+
QueueSkillServiceApi.prototype.updateQueueSkill = function (queueId, id, body, options) {
|
|
20848
|
+
var _this = this;
|
|
20849
|
+
return QueueSkillServiceApiFp(this.configuration)
|
|
20850
|
+
.updateQueueSkill(queueId, id, body, options)
|
|
20851
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
20852
|
+
};
|
|
20853
|
+
return QueueSkillServiceApi;
|
|
20854
|
+
}(BaseAPI));
|
|
20855
|
+
|
|
20856
|
+
// tslint:disable
|
|
20857
|
+
/**
|
|
20858
|
+
* RegionServiceApi - axios parameter creator
|
|
20859
|
+
* @export
|
|
20860
|
+
*/
|
|
20861
|
+
var RegionServiceApiAxiosParamCreator = function (configuration) {
|
|
20862
|
+
var _this = this;
|
|
20863
|
+
return {
|
|
20864
|
+
/**
|
|
20865
|
+
*
|
|
20866
|
+
* @param {EngineCreateRegionRequest} body
|
|
20867
|
+
* @param {*} [options] Override http request option.
|
|
20868
|
+
* @throws {RequiredError}
|
|
20869
|
+
*/
|
|
20870
|
+
createRegion: function (body, options) {
|
|
20871
|
+
if (options === void 0) { options = {}; }
|
|
20872
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20873
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
20874
|
+
return tslib.__generator(this, function (_b) {
|
|
20875
|
+
switch (_b.label) {
|
|
20876
|
+
case 0:
|
|
20877
|
+
// verify required parameter 'body' is not null or undefined
|
|
20878
|
+
if (body === null || body === undefined) {
|
|
20879
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createRegion.');
|
|
20880
|
+
}
|
|
20881
|
+
localVarPath = "/regions";
|
|
20882
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
20883
|
+
if (configuration) {
|
|
20884
|
+
baseOptions = configuration.baseOptions;
|
|
20885
|
+
}
|
|
20886
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'POST' }, baseOptions), options);
|
|
20887
|
+
localVarHeaderParameter = {};
|
|
20888
|
+
localVarQueryParameter = {};
|
|
20889
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
20890
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
20891
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
20892
|
+
case 1:
|
|
20893
|
+
_a = _b.sent();
|
|
20894
|
+
return [3 /*break*/, 4];
|
|
20895
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
20896
|
+
case 3:
|
|
20897
|
+
_a = _b.sent();
|
|
20898
|
+
_b.label = 4;
|
|
20899
|
+
case 4:
|
|
20900
|
+
localVarApiKeyValue = _a;
|
|
20901
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
20902
|
+
_b.label = 5;
|
|
20903
|
+
case 5:
|
|
20904
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
20905
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
20906
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
20907
|
+
delete localVarUrlObj.search;
|
|
20908
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20909
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
20910
|
+
needsSerialization = typeof body !== 'string' ||
|
|
20911
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
20912
|
+
localVarRequestOptions.data = needsSerialization
|
|
20913
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
20914
|
+
: body || '';
|
|
20915
|
+
return [2 /*return*/, {
|
|
20916
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
20917
|
+
options: localVarRequestOptions,
|
|
20918
|
+
}];
|
|
20919
|
+
}
|
|
20920
|
+
});
|
|
20921
|
+
});
|
|
20922
|
+
},
|
|
20923
|
+
/**
|
|
20924
|
+
*
|
|
20925
|
+
* @param {number} id
|
|
20926
|
+
* @param {*} [options] Override http request option.
|
|
20927
|
+
* @throws {RequiredError}
|
|
20928
|
+
*/
|
|
20929
|
+
deleteRegion: function (id, options) {
|
|
20930
|
+
if (options === void 0) { options = {}; }
|
|
20931
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20932
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
20933
|
+
return tslib.__generator(this, function (_b) {
|
|
20934
|
+
switch (_b.label) {
|
|
20935
|
+
case 0:
|
|
20936
|
+
// verify required parameter 'id' is not null or undefined
|
|
20937
|
+
if (id === null || id === undefined) {
|
|
20938
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling deleteRegion.');
|
|
20939
|
+
}
|
|
20940
|
+
localVarPath = "/regions/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
20941
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
20942
|
+
if (configuration) {
|
|
20943
|
+
baseOptions = configuration.baseOptions;
|
|
20944
|
+
}
|
|
20945
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'DELETE' }, baseOptions), options);
|
|
20946
|
+
localVarHeaderParameter = {};
|
|
20947
|
+
localVarQueryParameter = {};
|
|
20948
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
20949
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
20950
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
20951
|
+
case 1:
|
|
20952
|
+
_a = _b.sent();
|
|
20953
|
+
return [3 /*break*/, 4];
|
|
20954
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
20955
|
+
case 3:
|
|
20956
|
+
_a = _b.sent();
|
|
20957
|
+
_b.label = 4;
|
|
20958
|
+
case 4:
|
|
20959
|
+
localVarApiKeyValue = _a;
|
|
20960
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
20961
|
+
_b.label = 5;
|
|
20962
|
+
case 5:
|
|
20963
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
20964
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
20965
|
+
delete localVarUrlObj.search;
|
|
20966
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20967
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
20968
|
+
return [2 /*return*/, {
|
|
20969
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
20970
|
+
options: localVarRequestOptions,
|
|
20971
|
+
}];
|
|
20972
|
+
}
|
|
20973
|
+
});
|
|
20974
|
+
});
|
|
20975
|
+
},
|
|
20976
|
+
/**
|
|
20977
|
+
*
|
|
20978
|
+
* @param {number} id
|
|
20979
|
+
* @param {EnginePatchRegionRequest} body
|
|
20980
|
+
* @param {*} [options] Override http request option.
|
|
20981
|
+
* @throws {RequiredError}
|
|
20982
|
+
*/
|
|
20983
|
+
patchRegion: function (id, body, options) {
|
|
20984
|
+
if (options === void 0) { options = {}; }
|
|
20985
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20986
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
20987
|
+
return tslib.__generator(this, function (_b) {
|
|
20988
|
+
switch (_b.label) {
|
|
20989
|
+
case 0:
|
|
20990
|
+
// verify required parameter 'id' is not null or undefined
|
|
20991
|
+
if (id === null || id === undefined) {
|
|
20992
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling patchRegion.');
|
|
20993
|
+
}
|
|
20994
|
+
// verify required parameter 'body' is not null or undefined
|
|
20995
|
+
if (body === null || body === undefined) {
|
|
20996
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchRegion.');
|
|
20997
|
+
}
|
|
20998
|
+
localVarPath = "/regions/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
20999
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
21000
|
+
if (configuration) {
|
|
21001
|
+
baseOptions = configuration.baseOptions;
|
|
21002
|
+
}
|
|
21003
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'PATCH' }, baseOptions), options);
|
|
21004
|
+
localVarHeaderParameter = {};
|
|
21005
|
+
localVarQueryParameter = {};
|
|
21006
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
21007
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
21008
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
21009
|
+
case 1:
|
|
21010
|
+
_a = _b.sent();
|
|
21011
|
+
return [3 /*break*/, 4];
|
|
21012
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
21013
|
+
case 3:
|
|
21014
|
+
_a = _b.sent();
|
|
21015
|
+
_b.label = 4;
|
|
21016
|
+
case 4:
|
|
21017
|
+
localVarApiKeyValue = _a;
|
|
21018
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
21019
|
+
_b.label = 5;
|
|
21020
|
+
case 5:
|
|
21021
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
21022
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
21023
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
21024
|
+
delete localVarUrlObj.search;
|
|
21025
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21026
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
21027
|
+
needsSerialization = typeof body !== 'string' ||
|
|
21028
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
21029
|
+
localVarRequestOptions.data = needsSerialization
|
|
21030
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
21031
|
+
: body || '';
|
|
21032
|
+
return [2 /*return*/, {
|
|
21033
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
21034
|
+
options: localVarRequestOptions,
|
|
21035
|
+
}];
|
|
21036
|
+
}
|
|
21037
|
+
});
|
|
21038
|
+
});
|
|
21039
|
+
},
|
|
21040
|
+
/**
|
|
21041
|
+
*
|
|
21042
|
+
* @param {number} id
|
|
21043
|
+
* @param {*} [options] Override http request option.
|
|
21044
|
+
* @throws {RequiredError}
|
|
21045
|
+
*/
|
|
21046
|
+
readRegion: function (id, options) {
|
|
21047
|
+
if (options === void 0) { options = {}; }
|
|
21048
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
21049
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
21050
|
+
return tslib.__generator(this, function (_b) {
|
|
21051
|
+
switch (_b.label) {
|
|
21052
|
+
case 0:
|
|
21053
|
+
// verify required parameter 'id' is not null or undefined
|
|
21054
|
+
if (id === null || id === undefined) {
|
|
21055
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling readRegion.');
|
|
21056
|
+
}
|
|
21057
|
+
localVarPath = "/regions/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
21058
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
21059
|
+
if (configuration) {
|
|
21060
|
+
baseOptions = configuration.baseOptions;
|
|
21061
|
+
}
|
|
21062
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'GET' }, baseOptions), options);
|
|
21063
|
+
localVarHeaderParameter = {};
|
|
21064
|
+
localVarQueryParameter = {};
|
|
21065
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
21066
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
21067
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
21068
|
+
case 1:
|
|
21069
|
+
_a = _b.sent();
|
|
21070
|
+
return [3 /*break*/, 4];
|
|
21071
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
21072
|
+
case 3:
|
|
21073
|
+
_a = _b.sent();
|
|
21074
|
+
_b.label = 4;
|
|
21075
|
+
case 4:
|
|
21076
|
+
localVarApiKeyValue = _a;
|
|
21077
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
21078
|
+
_b.label = 5;
|
|
21079
|
+
case 5:
|
|
21080
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
21081
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
21082
|
+
delete localVarUrlObj.search;
|
|
21083
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21084
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
21085
|
+
return [2 /*return*/, {
|
|
21086
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
21087
|
+
options: localVarRequestOptions,
|
|
21088
|
+
}];
|
|
21089
|
+
}
|
|
21090
|
+
});
|
|
21091
|
+
});
|
|
21092
|
+
},
|
|
21093
|
+
/**
|
|
21094
|
+
*
|
|
21095
|
+
* @param {number} [page]
|
|
21096
|
+
* @param {number} [size]
|
|
21097
|
+
* @param {string} [q]
|
|
21098
|
+
* @param {string} [sort]
|
|
21099
|
+
* @param {Array<string>} [fields]
|
|
21100
|
+
* @param {Array<number>} [id]
|
|
21101
|
+
* @param {string} [name]
|
|
21102
|
+
* @param {string} [description]
|
|
21103
|
+
* @param {Array<number>} [timezoneId]
|
|
21104
|
+
* @param {*} [options] Override http request option.
|
|
21105
|
+
* @throws {RequiredError}
|
|
21106
|
+
*/
|
|
21107
|
+
searchRegion: function (page, size, q, sort, fields, id, name, description, timezoneId, options) {
|
|
21108
|
+
if (options === void 0) { options = {}; }
|
|
21109
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
21110
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
21111
|
+
return tslib.__generator(this, function (_b) {
|
|
21112
|
+
switch (_b.label) {
|
|
21113
|
+
case 0:
|
|
21114
|
+
localVarPath = "/regions";
|
|
21115
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
21116
|
+
if (configuration) {
|
|
21117
|
+
baseOptions = configuration.baseOptions;
|
|
21118
|
+
}
|
|
21119
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'GET' }, baseOptions), options);
|
|
21120
|
+
localVarHeaderParameter = {};
|
|
21121
|
+
localVarQueryParameter = {};
|
|
21122
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
21123
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
21124
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
21125
|
+
case 1:
|
|
21126
|
+
_a = _b.sent();
|
|
21127
|
+
return [3 /*break*/, 4];
|
|
21128
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
21129
|
+
case 3:
|
|
21130
|
+
_a = _b.sent();
|
|
21131
|
+
_b.label = 4;
|
|
21132
|
+
case 4:
|
|
21133
|
+
localVarApiKeyValue = _a;
|
|
21134
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
21135
|
+
_b.label = 5;
|
|
21136
|
+
case 5:
|
|
21137
|
+
if (page !== undefined) {
|
|
21138
|
+
localVarQueryParameter['page'] = page;
|
|
21139
|
+
}
|
|
21140
|
+
if (size !== undefined) {
|
|
21141
|
+
localVarQueryParameter['size'] = size;
|
|
21142
|
+
}
|
|
21143
|
+
if (q !== undefined) {
|
|
21144
|
+
localVarQueryParameter['q'] = q;
|
|
21145
|
+
}
|
|
21146
|
+
if (sort !== undefined) {
|
|
21147
|
+
localVarQueryParameter['sort'] = sort;
|
|
21148
|
+
}
|
|
21149
|
+
if (fields) {
|
|
21150
|
+
localVarQueryParameter['fields'] = fields;
|
|
21151
|
+
}
|
|
21152
|
+
if (id) {
|
|
21153
|
+
localVarQueryParameter['id'] = id;
|
|
21154
|
+
}
|
|
21155
|
+
if (name !== undefined) {
|
|
21156
|
+
localVarQueryParameter['name'] = name;
|
|
21157
|
+
}
|
|
21158
|
+
if (description !== undefined) {
|
|
21159
|
+
localVarQueryParameter['description'] = description;
|
|
21160
|
+
}
|
|
21161
|
+
if (timezoneId) {
|
|
21162
|
+
localVarQueryParameter['timezone_id'] = timezoneId;
|
|
21163
|
+
}
|
|
21164
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
21165
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
21166
|
+
delete localVarUrlObj.search;
|
|
21167
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21168
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
21169
|
+
return [2 /*return*/, {
|
|
21170
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
21171
|
+
options: localVarRequestOptions,
|
|
21172
|
+
}];
|
|
21173
|
+
}
|
|
21174
|
+
});
|
|
21175
|
+
});
|
|
21176
|
+
},
|
|
21177
|
+
/**
|
|
21178
|
+
*
|
|
21179
|
+
* @param {number} id
|
|
21180
|
+
* @param {EngineUpdateRegionRequest} body
|
|
21181
|
+
* @param {*} [options] Override http request option.
|
|
21182
|
+
* @throws {RequiredError}
|
|
21183
|
+
*/
|
|
21184
|
+
updateRegion: function (id, body, options) {
|
|
21185
|
+
if (options === void 0) { options = {}; }
|
|
21186
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
21187
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
21188
|
+
return tslib.__generator(this, function (_b) {
|
|
21189
|
+
switch (_b.label) {
|
|
21190
|
+
case 0:
|
|
21191
|
+
// verify required parameter 'id' is not null or undefined
|
|
21192
|
+
if (id === null || id === undefined) {
|
|
21193
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling updateRegion.');
|
|
21194
|
+
}
|
|
21195
|
+
// verify required parameter 'body' is not null or undefined
|
|
21196
|
+
if (body === null || body === undefined) {
|
|
21197
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateRegion.');
|
|
21198
|
+
}
|
|
21199
|
+
localVarPath = "/regions/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
21200
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
21201
|
+
if (configuration) {
|
|
21202
|
+
baseOptions = configuration.baseOptions;
|
|
21203
|
+
}
|
|
21204
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'PUT' }, baseOptions), options);
|
|
21205
|
+
localVarHeaderParameter = {};
|
|
21206
|
+
localVarQueryParameter = {};
|
|
21207
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
21208
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
21209
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
21210
|
+
case 1:
|
|
21211
|
+
_a = _b.sent();
|
|
21212
|
+
return [3 /*break*/, 4];
|
|
21213
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
21214
|
+
case 3:
|
|
21215
|
+
_a = _b.sent();
|
|
21216
|
+
_b.label = 4;
|
|
21217
|
+
case 4:
|
|
21218
|
+
localVarApiKeyValue = _a;
|
|
21219
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
21220
|
+
_b.label = 5;
|
|
21221
|
+
case 5:
|
|
21222
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
21223
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
21224
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
21225
|
+
delete localVarUrlObj.search;
|
|
21226
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21227
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
21228
|
+
needsSerialization = typeof body !== 'string' ||
|
|
21229
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
21230
|
+
localVarRequestOptions.data = needsSerialization
|
|
21231
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
21232
|
+
: body || '';
|
|
21233
|
+
return [2 /*return*/, {
|
|
21234
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
21235
|
+
options: localVarRequestOptions,
|
|
21236
|
+
}];
|
|
21237
|
+
}
|
|
21238
|
+
});
|
|
21239
|
+
});
|
|
21240
|
+
},
|
|
21241
|
+
};
|
|
21242
|
+
};
|
|
21243
|
+
/**
|
|
21244
|
+
* RegionServiceApi - functional programming interface
|
|
21245
|
+
* @export
|
|
21246
|
+
*/
|
|
21247
|
+
var RegionServiceApiFp = function (configuration) {
|
|
21248
|
+
return {
|
|
21249
|
+
/**
|
|
21250
|
+
*
|
|
21251
|
+
* @param {EngineCreateRegionRequest} body
|
|
21252
|
+
* @param {*} [options] Override http request option.
|
|
21253
|
+
* @throws {RequiredError}
|
|
21254
|
+
*/
|
|
21255
|
+
createRegion: function (body, options) {
|
|
21256
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21257
|
+
var localVarAxiosArgs;
|
|
21258
|
+
return tslib.__generator(this, function (_a) {
|
|
21259
|
+
switch (_a.label) {
|
|
21260
|
+
case 0: return [4 /*yield*/, RegionServiceApiAxiosParamCreator(configuration).createRegion(body, options)];
|
|
21261
|
+
case 1:
|
|
21262
|
+
localVarAxiosArgs = _a.sent();
|
|
21263
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
21264
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
21265
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21266
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
21267
|
+
return axios.request(axiosRequestArgs);
|
|
21268
|
+
}];
|
|
21269
|
+
}
|
|
21270
|
+
});
|
|
21271
|
+
});
|
|
21272
|
+
},
|
|
21273
|
+
/**
|
|
21274
|
+
*
|
|
21275
|
+
* @param {number} id
|
|
21276
|
+
* @param {*} [options] Override http request option.
|
|
21277
|
+
* @throws {RequiredError}
|
|
21278
|
+
*/
|
|
21279
|
+
deleteRegion: function (id, options) {
|
|
21280
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21281
|
+
var localVarAxiosArgs;
|
|
21282
|
+
return tslib.__generator(this, function (_a) {
|
|
21283
|
+
switch (_a.label) {
|
|
21284
|
+
case 0: return [4 /*yield*/, RegionServiceApiAxiosParamCreator(configuration).deleteRegion(id, options)];
|
|
21285
|
+
case 1:
|
|
21286
|
+
localVarAxiosArgs = _a.sent();
|
|
21287
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
21288
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
21289
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21290
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
21291
|
+
return axios.request(axiosRequestArgs);
|
|
21292
|
+
}];
|
|
21293
|
+
}
|
|
21294
|
+
});
|
|
21295
|
+
});
|
|
21296
|
+
},
|
|
21297
|
+
/**
|
|
21298
|
+
*
|
|
21299
|
+
* @param {number} id
|
|
21300
|
+
* @param {EnginePatchRegionRequest} body
|
|
21301
|
+
* @param {*} [options] Override http request option.
|
|
21302
|
+
* @throws {RequiredError}
|
|
21303
|
+
*/
|
|
21304
|
+
patchRegion: function (id, body, options) {
|
|
21305
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21306
|
+
var localVarAxiosArgs;
|
|
21307
|
+
return tslib.__generator(this, function (_a) {
|
|
21308
|
+
switch (_a.label) {
|
|
21309
|
+
case 0: return [4 /*yield*/, RegionServiceApiAxiosParamCreator(configuration).patchRegion(id, body, options)];
|
|
21310
|
+
case 1:
|
|
21311
|
+
localVarAxiosArgs = _a.sent();
|
|
21312
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
21313
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
21314
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21315
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
21316
|
+
return axios.request(axiosRequestArgs);
|
|
21317
|
+
}];
|
|
21318
|
+
}
|
|
21319
|
+
});
|
|
21320
|
+
});
|
|
21321
|
+
},
|
|
21322
|
+
/**
|
|
21323
|
+
*
|
|
21324
|
+
* @param {number} id
|
|
21325
|
+
* @param {*} [options] Override http request option.
|
|
21326
|
+
* @throws {RequiredError}
|
|
21327
|
+
*/
|
|
21328
|
+
readRegion: function (id, options) {
|
|
21329
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21330
|
+
var localVarAxiosArgs;
|
|
21331
|
+
return tslib.__generator(this, function (_a) {
|
|
21332
|
+
switch (_a.label) {
|
|
21333
|
+
case 0: return [4 /*yield*/, RegionServiceApiAxiosParamCreator(configuration).readRegion(id, options)];
|
|
21334
|
+
case 1:
|
|
21335
|
+
localVarAxiosArgs = _a.sent();
|
|
21336
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
21337
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
21338
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21339
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
21340
|
+
return axios.request(axiosRequestArgs);
|
|
21341
|
+
}];
|
|
21342
|
+
}
|
|
21343
|
+
});
|
|
21344
|
+
});
|
|
21345
|
+
},
|
|
21346
|
+
/**
|
|
21347
|
+
*
|
|
21348
|
+
* @param {number} [page]
|
|
21349
|
+
* @param {number} [size]
|
|
21350
|
+
* @param {string} [q]
|
|
21351
|
+
* @param {string} [sort]
|
|
21352
|
+
* @param {Array<string>} [fields]
|
|
21353
|
+
* @param {Array<number>} [id]
|
|
21354
|
+
* @param {string} [name]
|
|
21355
|
+
* @param {string} [description]
|
|
21356
|
+
* @param {Array<number>} [timezoneId]
|
|
21357
|
+
* @param {*} [options] Override http request option.
|
|
21358
|
+
* @throws {RequiredError}
|
|
21359
|
+
*/
|
|
21360
|
+
searchRegion: function (page, size, q, sort, fields, id, name, description, timezoneId, options) {
|
|
21361
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21362
|
+
var localVarAxiosArgs;
|
|
21363
|
+
return tslib.__generator(this, function (_a) {
|
|
21364
|
+
switch (_a.label) {
|
|
21365
|
+
case 0: return [4 /*yield*/, RegionServiceApiAxiosParamCreator(configuration).searchRegion(page, size, q, sort, fields, id, name, description, timezoneId, options)];
|
|
21366
|
+
case 1:
|
|
21367
|
+
localVarAxiosArgs = _a.sent();
|
|
21368
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
21369
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
21370
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21371
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
21372
|
+
return axios.request(axiosRequestArgs);
|
|
21373
|
+
}];
|
|
21374
|
+
}
|
|
21375
|
+
});
|
|
21376
|
+
});
|
|
21377
|
+
},
|
|
21378
|
+
/**
|
|
21379
|
+
*
|
|
21380
|
+
* @param {number} id
|
|
21381
|
+
* @param {EngineUpdateRegionRequest} body
|
|
21382
|
+
* @param {*} [options] Override http request option.
|
|
21383
|
+
* @throws {RequiredError}
|
|
21384
|
+
*/
|
|
21385
|
+
updateRegion: function (id, body, options) {
|
|
21386
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21387
|
+
var localVarAxiosArgs;
|
|
21388
|
+
return tslib.__generator(this, function (_a) {
|
|
21389
|
+
switch (_a.label) {
|
|
21390
|
+
case 0: return [4 /*yield*/, RegionServiceApiAxiosParamCreator(configuration).updateRegion(id, body, options)];
|
|
21391
|
+
case 1:
|
|
21392
|
+
localVarAxiosArgs = _a.sent();
|
|
21393
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
21394
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
21395
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21396
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
21397
|
+
return axios.request(axiosRequestArgs);
|
|
21398
|
+
}];
|
|
21399
|
+
}
|
|
21400
|
+
});
|
|
21401
|
+
});
|
|
21402
|
+
},
|
|
21403
|
+
};
|
|
21404
|
+
};
|
|
21405
|
+
/**
|
|
21406
|
+
* RegionServiceApi - factory interface
|
|
21407
|
+
* @export
|
|
21408
|
+
*/
|
|
21409
|
+
var RegionServiceApiFactory = function (configuration, basePath, axios) {
|
|
21410
|
+
return {
|
|
21411
|
+
/**
|
|
21412
|
+
*
|
|
21413
|
+
* @param {EngineCreateRegionRequest} body
|
|
21414
|
+
* @param {*} [options] Override http request option.
|
|
21415
|
+
* @throws {RequiredError}
|
|
21416
|
+
*/
|
|
21417
|
+
createRegion: function (body, options) {
|
|
21418
|
+
return RegionServiceApiFp(configuration)
|
|
21419
|
+
.createRegion(body, options)
|
|
21420
|
+
.then(function (request) { return request(axios, basePath); });
|
|
21421
|
+
},
|
|
21422
|
+
/**
|
|
21423
|
+
*
|
|
21424
|
+
* @param {number} id
|
|
21425
|
+
* @param {*} [options] Override http request option.
|
|
21426
|
+
* @throws {RequiredError}
|
|
21427
|
+
*/
|
|
21428
|
+
deleteRegion: function (id, options) {
|
|
21429
|
+
return RegionServiceApiFp(configuration)
|
|
21430
|
+
.deleteRegion(id, options)
|
|
21431
|
+
.then(function (request) { return request(axios, basePath); });
|
|
21432
|
+
},
|
|
21433
|
+
/**
|
|
21434
|
+
*
|
|
21435
|
+
* @param {number} id
|
|
21436
|
+
* @param {EnginePatchRegionRequest} body
|
|
21437
|
+
* @param {*} [options] Override http request option.
|
|
21438
|
+
* @throws {RequiredError}
|
|
21439
|
+
*/
|
|
21440
|
+
patchRegion: function (id, body, options) {
|
|
21441
|
+
return RegionServiceApiFp(configuration)
|
|
21442
|
+
.patchRegion(id, body, options)
|
|
21443
|
+
.then(function (request) { return request(axios, basePath); });
|
|
21444
|
+
},
|
|
21445
|
+
/**
|
|
21446
|
+
*
|
|
21447
|
+
* @param {number} id
|
|
21448
|
+
* @param {*} [options] Override http request option.
|
|
21449
|
+
* @throws {RequiredError}
|
|
21450
|
+
*/
|
|
21451
|
+
readRegion: function (id, options) {
|
|
21452
|
+
return RegionServiceApiFp(configuration)
|
|
21453
|
+
.readRegion(id, options)
|
|
21454
|
+
.then(function (request) { return request(axios, basePath); });
|
|
21455
|
+
},
|
|
21456
|
+
/**
|
|
21457
|
+
*
|
|
21458
|
+
* @param {number} [page]
|
|
21459
|
+
* @param {number} [size]
|
|
21460
|
+
* @param {string} [q]
|
|
21461
|
+
* @param {string} [sort]
|
|
21462
|
+
* @param {Array<string>} [fields]
|
|
21463
|
+
* @param {Array<number>} [id]
|
|
21464
|
+
* @param {string} [name]
|
|
21465
|
+
* @param {string} [description]
|
|
21466
|
+
* @param {Array<number>} [timezoneId]
|
|
21467
|
+
* @param {*} [options] Override http request option.
|
|
21468
|
+
* @throws {RequiredError}
|
|
21469
|
+
*/
|
|
21470
|
+
searchRegion: function (page, size, q, sort, fields, id, name, description, timezoneId, options) {
|
|
21471
|
+
return RegionServiceApiFp(configuration)
|
|
21472
|
+
.searchRegion(page, size, q, sort, fields, id, name, description, timezoneId, options)
|
|
21473
|
+
.then(function (request) { return request(axios, basePath); });
|
|
21474
|
+
},
|
|
21475
|
+
/**
|
|
21476
|
+
*
|
|
21477
|
+
* @param {number} id
|
|
21478
|
+
* @param {EngineUpdateRegionRequest} body
|
|
21479
|
+
* @param {*} [options] Override http request option.
|
|
21480
|
+
* @throws {RequiredError}
|
|
21481
|
+
*/
|
|
21482
|
+
updateRegion: function (id, body, options) {
|
|
21483
|
+
return RegionServiceApiFp(configuration)
|
|
21484
|
+
.updateRegion(id, body, options)
|
|
21485
|
+
.then(function (request) { return request(axios, basePath); });
|
|
21486
|
+
},
|
|
21487
|
+
};
|
|
21488
|
+
};
|
|
21489
|
+
/**
|
|
21490
|
+
* RegionServiceApi - object-oriented interface
|
|
21491
|
+
* @export
|
|
21492
|
+
* @class RegionServiceApi
|
|
21493
|
+
* @extends {BaseAPI}
|
|
21494
|
+
*/
|
|
21495
|
+
var RegionServiceApi = /** @class */ (function (_super) {
|
|
21496
|
+
tslib.__extends(RegionServiceApi, _super);
|
|
21497
|
+
function RegionServiceApi() {
|
|
21498
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21499
|
+
}
|
|
21500
|
+
/**
|
|
21501
|
+
*
|
|
21502
|
+
* @param {EngineCreateRegionRequest} body
|
|
21503
|
+
* @param {*} [options] Override http request option.
|
|
21504
|
+
* @throws {RequiredError}
|
|
21505
|
+
* @memberof RegionServiceApi
|
|
21506
|
+
*/
|
|
21507
|
+
RegionServiceApi.prototype.createRegion = function (body, options) {
|
|
21508
|
+
var _this = this;
|
|
21509
|
+
return RegionServiceApiFp(this.configuration)
|
|
21510
|
+
.createRegion(body, options)
|
|
21511
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21512
|
+
};
|
|
21513
|
+
/**
|
|
21514
|
+
*
|
|
21515
|
+
* @param {number} id
|
|
21516
|
+
* @param {*} [options] Override http request option.
|
|
21517
|
+
* @throws {RequiredError}
|
|
21518
|
+
* @memberof RegionServiceApi
|
|
21519
|
+
*/
|
|
21520
|
+
RegionServiceApi.prototype.deleteRegion = function (id, options) {
|
|
21521
|
+
var _this = this;
|
|
21522
|
+
return RegionServiceApiFp(this.configuration)
|
|
21523
|
+
.deleteRegion(id, options)
|
|
21524
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21525
|
+
};
|
|
21526
|
+
/**
|
|
21527
|
+
*
|
|
21528
|
+
* @param {number} id
|
|
21529
|
+
* @param {EnginePatchRegionRequest} body
|
|
21530
|
+
* @param {*} [options] Override http request option.
|
|
21531
|
+
* @throws {RequiredError}
|
|
21532
|
+
* @memberof RegionServiceApi
|
|
21533
|
+
*/
|
|
21534
|
+
RegionServiceApi.prototype.patchRegion = function (id, body, options) {
|
|
21535
|
+
var _this = this;
|
|
21536
|
+
return RegionServiceApiFp(this.configuration)
|
|
21537
|
+
.patchRegion(id, body, options)
|
|
21538
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21539
|
+
};
|
|
21540
|
+
/**
|
|
21541
|
+
*
|
|
21542
|
+
* @param {number} id
|
|
21543
|
+
* @param {*} [options] Override http request option.
|
|
21544
|
+
* @throws {RequiredError}
|
|
21545
|
+
* @memberof RegionServiceApi
|
|
21546
|
+
*/
|
|
21547
|
+
RegionServiceApi.prototype.readRegion = function (id, options) {
|
|
21548
|
+
var _this = this;
|
|
21549
|
+
return RegionServiceApiFp(this.configuration)
|
|
21550
|
+
.readRegion(id, options)
|
|
21551
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21552
|
+
};
|
|
21553
|
+
/**
|
|
21554
|
+
*
|
|
21555
|
+
* @param {number} [page]
|
|
21556
|
+
* @param {number} [size]
|
|
21557
|
+
* @param {string} [q]
|
|
21558
|
+
* @param {string} [sort]
|
|
21559
|
+
* @param {Array<string>} [fields]
|
|
21560
|
+
* @param {Array<number>} [id]
|
|
21561
|
+
* @param {string} [name]
|
|
21562
|
+
* @param {string} [description]
|
|
21563
|
+
* @param {Array<number>} [timezoneId]
|
|
21564
|
+
* @param {*} [options] Override http request option.
|
|
21565
|
+
* @throws {RequiredError}
|
|
21566
|
+
* @memberof RegionServiceApi
|
|
21567
|
+
*/
|
|
21568
|
+
RegionServiceApi.prototype.searchRegion = function (page, size, q, sort, fields, id, name, description, timezoneId, options) {
|
|
20722
21569
|
var _this = this;
|
|
20723
|
-
return
|
|
20724
|
-
.
|
|
21570
|
+
return RegionServiceApiFp(this.configuration)
|
|
21571
|
+
.searchRegion(page, size, q, sort, fields, id, name, description, timezoneId, options)
|
|
20725
21572
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
20726
21573
|
};
|
|
20727
21574
|
/**
|
|
20728
21575
|
*
|
|
20729
|
-
* @param {number} queueId
|
|
20730
21576
|
* @param {number} id
|
|
20731
|
-
* @param {
|
|
21577
|
+
* @param {EngineUpdateRegionRequest} body
|
|
20732
21578
|
* @param {*} [options] Override http request option.
|
|
20733
21579
|
* @throws {RequiredError}
|
|
20734
|
-
* @memberof
|
|
21580
|
+
* @memberof RegionServiceApi
|
|
20735
21581
|
*/
|
|
20736
|
-
|
|
21582
|
+
RegionServiceApi.prototype.updateRegion = function (id, body, options) {
|
|
20737
21583
|
var _this = this;
|
|
20738
|
-
return
|
|
20739
|
-
.
|
|
21584
|
+
return RegionServiceApiFp(this.configuration)
|
|
21585
|
+
.updateRegion(id, body, options)
|
|
20740
21586
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
20741
21587
|
};
|
|
20742
|
-
return
|
|
21588
|
+
return RegionServiceApi;
|
|
20743
21589
|
}(BaseAPI));
|
|
20744
21590
|
|
|
20745
21591
|
// tslint:disable
|
|
20746
21592
|
/**
|
|
20747
|
-
*
|
|
21593
|
+
* RoutingChatPlanServiceApi - axios parameter creator
|
|
20748
21594
|
* @export
|
|
20749
21595
|
*/
|
|
20750
|
-
var
|
|
21596
|
+
var RoutingChatPlanServiceApiAxiosParamCreator = function (configuration) {
|
|
20751
21597
|
var _this = this;
|
|
20752
21598
|
return {
|
|
20753
21599
|
/**
|
|
20754
21600
|
*
|
|
20755
|
-
* @param {
|
|
21601
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
20756
21602
|
* @param {*} [options] Override http request option.
|
|
20757
21603
|
* @throws {RequiredError}
|
|
20758
21604
|
*/
|
|
20759
|
-
|
|
21605
|
+
createChatPlan: function (body, options) {
|
|
20760
21606
|
if (options === void 0) { options = {}; }
|
|
20761
21607
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20762
21608
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
@@ -20765,9 +21611,9 @@
|
|
|
20765
21611
|
case 0:
|
|
20766
21612
|
// verify required parameter 'body' is not null or undefined
|
|
20767
21613
|
if (body === null || body === undefined) {
|
|
20768
|
-
throw new RequiredError('body', 'Required parameter body was null or undefined when calling
|
|
21614
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createChatPlan.');
|
|
20769
21615
|
}
|
|
20770
|
-
localVarPath = "/
|
|
21616
|
+
localVarPath = "/routing/outbound/chat";
|
|
20771
21617
|
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
20772
21618
|
if (configuration) {
|
|
20773
21619
|
baseOptions = configuration.baseOptions;
|
|
@@ -20812,64 +21658,11 @@
|
|
|
20812
21658
|
/**
|
|
20813
21659
|
*
|
|
20814
21660
|
* @param {number} id
|
|
21661
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
20815
21662
|
* @param {*} [options] Override http request option.
|
|
20816
21663
|
* @throws {RequiredError}
|
|
20817
21664
|
*/
|
|
20818
|
-
|
|
20819
|
-
if (options === void 0) { options = {}; }
|
|
20820
|
-
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20821
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
20822
|
-
return tslib.__generator(this, function (_b) {
|
|
20823
|
-
switch (_b.label) {
|
|
20824
|
-
case 0:
|
|
20825
|
-
// verify required parameter 'id' is not null or undefined
|
|
20826
|
-
if (id === null || id === undefined) {
|
|
20827
|
-
throw new RequiredError('id', 'Required parameter id was null or undefined when calling deleteRegion.');
|
|
20828
|
-
}
|
|
20829
|
-
localVarPath = "/regions/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
20830
|
-
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
20831
|
-
if (configuration) {
|
|
20832
|
-
baseOptions = configuration.baseOptions;
|
|
20833
|
-
}
|
|
20834
|
-
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'DELETE' }, baseOptions), options);
|
|
20835
|
-
localVarHeaderParameter = {};
|
|
20836
|
-
localVarQueryParameter = {};
|
|
20837
|
-
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
20838
|
-
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
20839
|
-
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
20840
|
-
case 1:
|
|
20841
|
-
_a = _b.sent();
|
|
20842
|
-
return [3 /*break*/, 4];
|
|
20843
|
-
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
20844
|
-
case 3:
|
|
20845
|
-
_a = _b.sent();
|
|
20846
|
-
_b.label = 4;
|
|
20847
|
-
case 4:
|
|
20848
|
-
localVarApiKeyValue = _a;
|
|
20849
|
-
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
20850
|
-
_b.label = 5;
|
|
20851
|
-
case 5:
|
|
20852
|
-
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
20853
|
-
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
20854
|
-
delete localVarUrlObj.search;
|
|
20855
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20856
|
-
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
20857
|
-
return [2 /*return*/, {
|
|
20858
|
-
url: globalImportUrl.format(localVarUrlObj),
|
|
20859
|
-
options: localVarRequestOptions,
|
|
20860
|
-
}];
|
|
20861
|
-
}
|
|
20862
|
-
});
|
|
20863
|
-
});
|
|
20864
|
-
},
|
|
20865
|
-
/**
|
|
20866
|
-
*
|
|
20867
|
-
* @param {number} id
|
|
20868
|
-
* @param {EnginePatchRegionRequest} body
|
|
20869
|
-
* @param {*} [options] Override http request option.
|
|
20870
|
-
* @throws {RequiredError}
|
|
20871
|
-
*/
|
|
20872
|
-
patchRegion: function (id, body, options) {
|
|
21665
|
+
patchChatPlan: function (id, body, options) {
|
|
20873
21666
|
if (options === void 0) { options = {}; }
|
|
20874
21667
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20875
21668
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
@@ -20878,13 +21671,13 @@
|
|
|
20878
21671
|
case 0:
|
|
20879
21672
|
// verify required parameter 'id' is not null or undefined
|
|
20880
21673
|
if (id === null || id === undefined) {
|
|
20881
|
-
throw new RequiredError('id', 'Required parameter id was null or undefined when calling
|
|
21674
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling patchChatPlan.');
|
|
20882
21675
|
}
|
|
20883
21676
|
// verify required parameter 'body' is not null or undefined
|
|
20884
21677
|
if (body === null || body === undefined) {
|
|
20885
|
-
throw new RequiredError('body', 'Required parameter body was null or undefined when calling
|
|
21678
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchChatPlan.');
|
|
20886
21679
|
}
|
|
20887
|
-
localVarPath = "/
|
|
21680
|
+
localVarPath = "/routing/outbound/chat/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
20888
21681
|
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
20889
21682
|
if (configuration) {
|
|
20890
21683
|
baseOptions = configuration.baseOptions;
|
|
@@ -20932,7 +21725,7 @@
|
|
|
20932
21725
|
* @param {*} [options] Override http request option.
|
|
20933
21726
|
* @throws {RequiredError}
|
|
20934
21727
|
*/
|
|
20935
|
-
|
|
21728
|
+
readChatPlan: function (id, options) {
|
|
20936
21729
|
if (options === void 0) { options = {}; }
|
|
20937
21730
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20938
21731
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
@@ -20941,9 +21734,9 @@
|
|
|
20941
21734
|
case 0:
|
|
20942
21735
|
// verify required parameter 'id' is not null or undefined
|
|
20943
21736
|
if (id === null || id === undefined) {
|
|
20944
|
-
throw new RequiredError('id', 'Required parameter id was null or undefined when calling
|
|
21737
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling readChatPlan.');
|
|
20945
21738
|
}
|
|
20946
|
-
localVarPath = "/
|
|
21739
|
+
localVarPath = "/routing/outbound/chat/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
20947
21740
|
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
20948
21741
|
if (configuration) {
|
|
20949
21742
|
baseOptions = configuration.baseOptions;
|
|
@@ -20988,19 +21781,18 @@
|
|
|
20988
21781
|
* @param {Array<string>} [fields]
|
|
20989
21782
|
* @param {Array<number>} [id]
|
|
20990
21783
|
* @param {string} [name]
|
|
20991
|
-
* @param {
|
|
20992
|
-
* @param {Array<number>} [timezoneId]
|
|
21784
|
+
* @param {boolean} [enabled]
|
|
20993
21785
|
* @param {*} [options] Override http request option.
|
|
20994
21786
|
* @throws {RequiredError}
|
|
20995
21787
|
*/
|
|
20996
|
-
|
|
21788
|
+
searchChatPlan: function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
20997
21789
|
if (options === void 0) { options = {}; }
|
|
20998
21790
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
20999
21791
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
21000
21792
|
return tslib.__generator(this, function (_b) {
|
|
21001
21793
|
switch (_b.label) {
|
|
21002
21794
|
case 0:
|
|
21003
|
-
localVarPath = "/
|
|
21795
|
+
localVarPath = "/routing/outbound/chat";
|
|
21004
21796
|
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
21005
21797
|
if (configuration) {
|
|
21006
21798
|
baseOptions = configuration.baseOptions;
|
|
@@ -21044,11 +21836,8 @@
|
|
|
21044
21836
|
if (name !== undefined) {
|
|
21045
21837
|
localVarQueryParameter['name'] = name;
|
|
21046
21838
|
}
|
|
21047
|
-
if (
|
|
21048
|
-
localVarQueryParameter['
|
|
21049
|
-
}
|
|
21050
|
-
if (timezoneId) {
|
|
21051
|
-
localVarQueryParameter['timezone_id'] = timezoneId;
|
|
21839
|
+
if (enabled !== undefined) {
|
|
21840
|
+
localVarQueryParameter['enabled'] = enabled;
|
|
21052
21841
|
}
|
|
21053
21842
|
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
21054
21843
|
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
@@ -21066,11 +21855,11 @@
|
|
|
21066
21855
|
/**
|
|
21067
21856
|
*
|
|
21068
21857
|
* @param {number} id
|
|
21069
|
-
* @param {
|
|
21858
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
21070
21859
|
* @param {*} [options] Override http request option.
|
|
21071
21860
|
* @throws {RequiredError}
|
|
21072
21861
|
*/
|
|
21073
|
-
|
|
21862
|
+
updateChatPlan: function (id, body, options) {
|
|
21074
21863
|
if (options === void 0) { options = {}; }
|
|
21075
21864
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
21076
21865
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
@@ -21079,13 +21868,13 @@
|
|
|
21079
21868
|
case 0:
|
|
21080
21869
|
// verify required parameter 'id' is not null or undefined
|
|
21081
21870
|
if (id === null || id === undefined) {
|
|
21082
|
-
throw new RequiredError('id', 'Required parameter id was null or undefined when calling
|
|
21871
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling updateChatPlan.');
|
|
21083
21872
|
}
|
|
21084
21873
|
// verify required parameter 'body' is not null or undefined
|
|
21085
21874
|
if (body === null || body === undefined) {
|
|
21086
|
-
throw new RequiredError('body', 'Required parameter body was null or undefined when calling
|
|
21875
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateChatPlan.');
|
|
21087
21876
|
}
|
|
21088
|
-
localVarPath = "/
|
|
21877
|
+
localVarPath = "/routing/outbound/chat/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
21089
21878
|
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
21090
21879
|
if (configuration) {
|
|
21091
21880
|
baseOptions = configuration.baseOptions;
|
|
@@ -21130,47 +21919,23 @@
|
|
|
21130
21919
|
};
|
|
21131
21920
|
};
|
|
21132
21921
|
/**
|
|
21133
|
-
*
|
|
21922
|
+
* RoutingChatPlanServiceApi - functional programming interface
|
|
21134
21923
|
* @export
|
|
21135
21924
|
*/
|
|
21136
|
-
var
|
|
21925
|
+
var RoutingChatPlanServiceApiFp = function (configuration) {
|
|
21137
21926
|
return {
|
|
21138
21927
|
/**
|
|
21139
21928
|
*
|
|
21140
|
-
* @param {
|
|
21141
|
-
* @param {*} [options] Override http request option.
|
|
21142
|
-
* @throws {RequiredError}
|
|
21143
|
-
*/
|
|
21144
|
-
createRegion: function (body, options) {
|
|
21145
|
-
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21146
|
-
var localVarAxiosArgs;
|
|
21147
|
-
return tslib.__generator(this, function (_a) {
|
|
21148
|
-
switch (_a.label) {
|
|
21149
|
-
case 0: return [4 /*yield*/, RegionServiceApiAxiosParamCreator(configuration).createRegion(body, options)];
|
|
21150
|
-
case 1:
|
|
21151
|
-
localVarAxiosArgs = _a.sent();
|
|
21152
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
21153
|
-
if (axios === void 0) { axios = globalAxios; }
|
|
21154
|
-
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21155
|
-
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
21156
|
-
return axios.request(axiosRequestArgs);
|
|
21157
|
-
}];
|
|
21158
|
-
}
|
|
21159
|
-
});
|
|
21160
|
-
});
|
|
21161
|
-
},
|
|
21162
|
-
/**
|
|
21163
|
-
*
|
|
21164
|
-
* @param {number} id
|
|
21929
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
21165
21930
|
* @param {*} [options] Override http request option.
|
|
21166
21931
|
* @throws {RequiredError}
|
|
21167
21932
|
*/
|
|
21168
|
-
|
|
21933
|
+
createChatPlan: function (body, options) {
|
|
21169
21934
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21170
21935
|
var localVarAxiosArgs;
|
|
21171
21936
|
return tslib.__generator(this, function (_a) {
|
|
21172
21937
|
switch (_a.label) {
|
|
21173
|
-
case 0: return [4 /*yield*/,
|
|
21938
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).createChatPlan(body, options)];
|
|
21174
21939
|
case 1:
|
|
21175
21940
|
localVarAxiosArgs = _a.sent();
|
|
21176
21941
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -21186,16 +21951,16 @@
|
|
|
21186
21951
|
/**
|
|
21187
21952
|
*
|
|
21188
21953
|
* @param {number} id
|
|
21189
|
-
* @param {
|
|
21954
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
21190
21955
|
* @param {*} [options] Override http request option.
|
|
21191
21956
|
* @throws {RequiredError}
|
|
21192
21957
|
*/
|
|
21193
|
-
|
|
21958
|
+
patchChatPlan: function (id, body, options) {
|
|
21194
21959
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21195
21960
|
var localVarAxiosArgs;
|
|
21196
21961
|
return tslib.__generator(this, function (_a) {
|
|
21197
21962
|
switch (_a.label) {
|
|
21198
|
-
case 0: return [4 /*yield*/,
|
|
21963
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).patchChatPlan(id, body, options)];
|
|
21199
21964
|
case 1:
|
|
21200
21965
|
localVarAxiosArgs = _a.sent();
|
|
21201
21966
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -21214,12 +21979,12 @@
|
|
|
21214
21979
|
* @param {*} [options] Override http request option.
|
|
21215
21980
|
* @throws {RequiredError}
|
|
21216
21981
|
*/
|
|
21217
|
-
|
|
21982
|
+
readChatPlan: function (id, options) {
|
|
21218
21983
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21219
21984
|
var localVarAxiosArgs;
|
|
21220
21985
|
return tslib.__generator(this, function (_a) {
|
|
21221
21986
|
switch (_a.label) {
|
|
21222
|
-
case 0: return [4 /*yield*/,
|
|
21987
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).readChatPlan(id, options)];
|
|
21223
21988
|
case 1:
|
|
21224
21989
|
localVarAxiosArgs = _a.sent();
|
|
21225
21990
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -21241,17 +22006,16 @@
|
|
|
21241
22006
|
* @param {Array<string>} [fields]
|
|
21242
22007
|
* @param {Array<number>} [id]
|
|
21243
22008
|
* @param {string} [name]
|
|
21244
|
-
* @param {
|
|
21245
|
-
* @param {Array<number>} [timezoneId]
|
|
22009
|
+
* @param {boolean} [enabled]
|
|
21246
22010
|
* @param {*} [options] Override http request option.
|
|
21247
22011
|
* @throws {RequiredError}
|
|
21248
22012
|
*/
|
|
21249
|
-
|
|
22013
|
+
searchChatPlan: function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
21250
22014
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21251
22015
|
var localVarAxiosArgs;
|
|
21252
22016
|
return tslib.__generator(this, function (_a) {
|
|
21253
22017
|
switch (_a.label) {
|
|
21254
|
-
case 0: return [4 /*yield*/,
|
|
22018
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).searchChatPlan(page, size, q, sort, fields, id, name, enabled, options)];
|
|
21255
22019
|
case 1:
|
|
21256
22020
|
localVarAxiosArgs = _a.sent();
|
|
21257
22021
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -21267,16 +22031,16 @@
|
|
|
21267
22031
|
/**
|
|
21268
22032
|
*
|
|
21269
22033
|
* @param {number} id
|
|
21270
|
-
* @param {
|
|
22034
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
21271
22035
|
* @param {*} [options] Override http request option.
|
|
21272
22036
|
* @throws {RequiredError}
|
|
21273
22037
|
*/
|
|
21274
|
-
|
|
22038
|
+
updateChatPlan: function (id, body, options) {
|
|
21275
22039
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
21276
22040
|
var localVarAxiosArgs;
|
|
21277
22041
|
return tslib.__generator(this, function (_a) {
|
|
21278
22042
|
switch (_a.label) {
|
|
21279
|
-
case 0: return [4 /*yield*/,
|
|
22043
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).updateChatPlan(id, body, options)];
|
|
21280
22044
|
case 1:
|
|
21281
22045
|
localVarAxiosArgs = _a.sent();
|
|
21282
22046
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -21292,43 +22056,32 @@
|
|
|
21292
22056
|
};
|
|
21293
22057
|
};
|
|
21294
22058
|
/**
|
|
21295
|
-
*
|
|
22059
|
+
* RoutingChatPlanServiceApi - factory interface
|
|
21296
22060
|
* @export
|
|
21297
22061
|
*/
|
|
21298
|
-
var
|
|
22062
|
+
var RoutingChatPlanServiceApiFactory = function (configuration, basePath, axios) {
|
|
21299
22063
|
return {
|
|
21300
22064
|
/**
|
|
21301
22065
|
*
|
|
21302
|
-
* @param {
|
|
21303
|
-
* @param {*} [options] Override http request option.
|
|
21304
|
-
* @throws {RequiredError}
|
|
21305
|
-
*/
|
|
21306
|
-
createRegion: function (body, options) {
|
|
21307
|
-
return RegionServiceApiFp(configuration)
|
|
21308
|
-
.createRegion(body, options)
|
|
21309
|
-
.then(function (request) { return request(axios, basePath); });
|
|
21310
|
-
},
|
|
21311
|
-
/**
|
|
21312
|
-
*
|
|
21313
|
-
* @param {number} id
|
|
22066
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
21314
22067
|
* @param {*} [options] Override http request option.
|
|
21315
22068
|
* @throws {RequiredError}
|
|
21316
22069
|
*/
|
|
21317
|
-
|
|
21318
|
-
return
|
|
21319
|
-
.
|
|
22070
|
+
createChatPlan: function (body, options) {
|
|
22071
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
22072
|
+
.createChatPlan(body, options)
|
|
21320
22073
|
.then(function (request) { return request(axios, basePath); });
|
|
21321
22074
|
},
|
|
21322
22075
|
/**
|
|
21323
22076
|
*
|
|
21324
22077
|
* @param {number} id
|
|
21325
|
-
* @param {
|
|
22078
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
21326
22079
|
* @param {*} [options] Override http request option.
|
|
21327
22080
|
* @throws {RequiredError}
|
|
21328
22081
|
*/
|
|
21329
|
-
|
|
21330
|
-
return
|
|
21331
|
-
.
|
|
22082
|
+
patchChatPlan: function (id, body, options) {
|
|
22083
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
22084
|
+
.patchChatPlan(id, body, options)
|
|
21332
22085
|
.then(function (request) { return request(axios, basePath); });
|
|
21333
22086
|
},
|
|
21334
22087
|
/**
|
|
@@ -21337,9 +22090,9 @@
|
|
|
21337
22090
|
* @param {*} [options] Override http request option.
|
|
21338
22091
|
* @throws {RequiredError}
|
|
21339
22092
|
*/
|
|
21340
|
-
|
|
21341
|
-
return
|
|
21342
|
-
.
|
|
22093
|
+
readChatPlan: function (id, options) {
|
|
22094
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
22095
|
+
.readChatPlan(id, options)
|
|
21343
22096
|
.then(function (request) { return request(axios, basePath); });
|
|
21344
22097
|
},
|
|
21345
22098
|
/**
|
|
@@ -21351,79 +22104,65 @@
|
|
|
21351
22104
|
* @param {Array<string>} [fields]
|
|
21352
22105
|
* @param {Array<number>} [id]
|
|
21353
22106
|
* @param {string} [name]
|
|
21354
|
-
* @param {
|
|
21355
|
-
* @param {Array<number>} [timezoneId]
|
|
22107
|
+
* @param {boolean} [enabled]
|
|
21356
22108
|
* @param {*} [options] Override http request option.
|
|
21357
22109
|
* @throws {RequiredError}
|
|
21358
22110
|
*/
|
|
21359
|
-
|
|
21360
|
-
return
|
|
21361
|
-
.
|
|
22111
|
+
searchChatPlan: function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
22112
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
22113
|
+
.searchChatPlan(page, size, q, sort, fields, id, name, enabled, options)
|
|
21362
22114
|
.then(function (request) { return request(axios, basePath); });
|
|
21363
22115
|
},
|
|
21364
22116
|
/**
|
|
21365
22117
|
*
|
|
21366
22118
|
* @param {number} id
|
|
21367
|
-
* @param {
|
|
22119
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
21368
22120
|
* @param {*} [options] Override http request option.
|
|
21369
22121
|
* @throws {RequiredError}
|
|
21370
22122
|
*/
|
|
21371
|
-
|
|
21372
|
-
return
|
|
21373
|
-
.
|
|
22123
|
+
updateChatPlan: function (id, body, options) {
|
|
22124
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
22125
|
+
.updateChatPlan(id, body, options)
|
|
21374
22126
|
.then(function (request) { return request(axios, basePath); });
|
|
21375
22127
|
},
|
|
21376
22128
|
};
|
|
21377
22129
|
};
|
|
21378
22130
|
/**
|
|
21379
|
-
*
|
|
22131
|
+
* RoutingChatPlanServiceApi - object-oriented interface
|
|
21380
22132
|
* @export
|
|
21381
|
-
* @class
|
|
22133
|
+
* @class RoutingChatPlanServiceApi
|
|
21382
22134
|
* @extends {BaseAPI}
|
|
21383
22135
|
*/
|
|
21384
|
-
var
|
|
21385
|
-
tslib.__extends(
|
|
21386
|
-
function
|
|
22136
|
+
var RoutingChatPlanServiceApi = /** @class */ (function (_super) {
|
|
22137
|
+
tslib.__extends(RoutingChatPlanServiceApi, _super);
|
|
22138
|
+
function RoutingChatPlanServiceApi() {
|
|
21387
22139
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
21388
22140
|
}
|
|
21389
22141
|
/**
|
|
21390
22142
|
*
|
|
21391
|
-
* @param {
|
|
21392
|
-
* @param {*} [options] Override http request option.
|
|
21393
|
-
* @throws {RequiredError}
|
|
21394
|
-
* @memberof RegionServiceApi
|
|
21395
|
-
*/
|
|
21396
|
-
RegionServiceApi.prototype.createRegion = function (body, options) {
|
|
21397
|
-
var _this = this;
|
|
21398
|
-
return RegionServiceApiFp(this.configuration)
|
|
21399
|
-
.createRegion(body, options)
|
|
21400
|
-
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21401
|
-
};
|
|
21402
|
-
/**
|
|
21403
|
-
*
|
|
21404
|
-
* @param {number} id
|
|
22143
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
21405
22144
|
* @param {*} [options] Override http request option.
|
|
21406
22145
|
* @throws {RequiredError}
|
|
21407
|
-
* @memberof
|
|
22146
|
+
* @memberof RoutingChatPlanServiceApi
|
|
21408
22147
|
*/
|
|
21409
|
-
|
|
22148
|
+
RoutingChatPlanServiceApi.prototype.createChatPlan = function (body, options) {
|
|
21410
22149
|
var _this = this;
|
|
21411
|
-
return
|
|
21412
|
-
.
|
|
22150
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
22151
|
+
.createChatPlan(body, options)
|
|
21413
22152
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21414
22153
|
};
|
|
21415
22154
|
/**
|
|
21416
22155
|
*
|
|
21417
22156
|
* @param {number} id
|
|
21418
|
-
* @param {
|
|
22157
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
21419
22158
|
* @param {*} [options] Override http request option.
|
|
21420
22159
|
* @throws {RequiredError}
|
|
21421
|
-
* @memberof
|
|
22160
|
+
* @memberof RoutingChatPlanServiceApi
|
|
21422
22161
|
*/
|
|
21423
|
-
|
|
22162
|
+
RoutingChatPlanServiceApi.prototype.patchChatPlan = function (id, body, options) {
|
|
21424
22163
|
var _this = this;
|
|
21425
|
-
return
|
|
21426
|
-
.
|
|
22164
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
22165
|
+
.patchChatPlan(id, body, options)
|
|
21427
22166
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21428
22167
|
};
|
|
21429
22168
|
/**
|
|
@@ -21431,12 +22170,12 @@
|
|
|
21431
22170
|
* @param {number} id
|
|
21432
22171
|
* @param {*} [options] Override http request option.
|
|
21433
22172
|
* @throws {RequiredError}
|
|
21434
|
-
* @memberof
|
|
22173
|
+
* @memberof RoutingChatPlanServiceApi
|
|
21435
22174
|
*/
|
|
21436
|
-
|
|
22175
|
+
RoutingChatPlanServiceApi.prototype.readChatPlan = function (id, options) {
|
|
21437
22176
|
var _this = this;
|
|
21438
|
-
return
|
|
21439
|
-
.
|
|
22177
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
22178
|
+
.readChatPlan(id, options)
|
|
21440
22179
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21441
22180
|
};
|
|
21442
22181
|
/**
|
|
@@ -21448,33 +22187,32 @@
|
|
|
21448
22187
|
* @param {Array<string>} [fields]
|
|
21449
22188
|
* @param {Array<number>} [id]
|
|
21450
22189
|
* @param {string} [name]
|
|
21451
|
-
* @param {
|
|
21452
|
-
* @param {Array<number>} [timezoneId]
|
|
22190
|
+
* @param {boolean} [enabled]
|
|
21453
22191
|
* @param {*} [options] Override http request option.
|
|
21454
22192
|
* @throws {RequiredError}
|
|
21455
|
-
* @memberof
|
|
22193
|
+
* @memberof RoutingChatPlanServiceApi
|
|
21456
22194
|
*/
|
|
21457
|
-
|
|
22195
|
+
RoutingChatPlanServiceApi.prototype.searchChatPlan = function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
21458
22196
|
var _this = this;
|
|
21459
|
-
return
|
|
21460
|
-
.
|
|
22197
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
22198
|
+
.searchChatPlan(page, size, q, sort, fields, id, name, enabled, options)
|
|
21461
22199
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21462
22200
|
};
|
|
21463
22201
|
/**
|
|
21464
22202
|
*
|
|
21465
22203
|
* @param {number} id
|
|
21466
|
-
* @param {
|
|
22204
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
21467
22205
|
* @param {*} [options] Override http request option.
|
|
21468
22206
|
* @throws {RequiredError}
|
|
21469
|
-
* @memberof
|
|
22207
|
+
* @memberof RoutingChatPlanServiceApi
|
|
21470
22208
|
*/
|
|
21471
|
-
|
|
22209
|
+
RoutingChatPlanServiceApi.prototype.updateChatPlan = function (id, body, options) {
|
|
21472
22210
|
var _this = this;
|
|
21473
|
-
return
|
|
21474
|
-
.
|
|
22211
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
22212
|
+
.updateChatPlan(id, body, options)
|
|
21475
22213
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
21476
22214
|
};
|
|
21477
|
-
return
|
|
22215
|
+
return RoutingChatPlanServiceApi;
|
|
21478
22216
|
}(BaseAPI));
|
|
21479
22217
|
|
|
21480
22218
|
// tslint:disable
|
|
@@ -25053,6 +25791,7 @@
|
|
|
25053
25791
|
this.offeringAt = 0;
|
|
25054
25792
|
this.answeredAt = 0;
|
|
25055
25793
|
this.bridgedAt = 0;
|
|
25794
|
+
this.reportedAt = 0;
|
|
25056
25795
|
this.startProcessingAt = 0;
|
|
25057
25796
|
this.stopAt = 0;
|
|
25058
25797
|
this.closedAt = 0;
|
|
@@ -25151,11 +25890,12 @@
|
|
|
25151
25890
|
this.lastStatusChange = Date.now();
|
|
25152
25891
|
};
|
|
25153
25892
|
Task.prototype.setProcessing = function (p) {
|
|
25893
|
+
this.state = 'processing'; // todo
|
|
25154
25894
|
if (!this.startProcessingAt) {
|
|
25155
25895
|
this.startProcessingAt = Date.now();
|
|
25156
25896
|
}
|
|
25157
25897
|
if (p.sec) {
|
|
25158
|
-
p.timeout =
|
|
25898
|
+
p.timeout = this.startProcessingAt + p.sec * 1000; // bug
|
|
25159
25899
|
}
|
|
25160
25900
|
this._processing = p;
|
|
25161
25901
|
};
|
|
@@ -25232,8 +25972,15 @@
|
|
|
25232
25972
|
};
|
|
25233
25973
|
Task.prototype.reporting = function (reporting) {
|
|
25234
25974
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
25975
|
+
var res;
|
|
25235
25976
|
return tslib.__generator(this, function (_a) {
|
|
25236
|
-
|
|
25977
|
+
switch (_a.label) {
|
|
25978
|
+
case 0: return [4 /*yield*/, this.client.request('cc_reporting', tslib.__assign({ attempt_id: this.id }, reporting))];
|
|
25979
|
+
case 1:
|
|
25980
|
+
res = _a.sent();
|
|
25981
|
+
this.reportedAt = Date.now();
|
|
25982
|
+
return [2 /*return*/, res];
|
|
25983
|
+
}
|
|
25237
25984
|
});
|
|
25238
25985
|
});
|
|
25239
25986
|
};
|
|
@@ -26165,7 +26912,13 @@
|
|
|
26165
26912
|
this.members = (members || []).map(function (i) { return wrapChannelMember(i); });
|
|
26166
26913
|
this._messages = messages || [];
|
|
26167
26914
|
this.state = exports.ConversationState.Invite;
|
|
26168
|
-
this.variables =
|
|
26915
|
+
this.variables = {};
|
|
26916
|
+
this._hasReporting = !!(variables && variables.cc_reporting === 'true');
|
|
26917
|
+
for (var k in variables) {
|
|
26918
|
+
if (!k.startsWith('cc_') && variables.hasOwnProperty(k)) {
|
|
26919
|
+
this.variables[k] = variables[k];
|
|
26920
|
+
}
|
|
26921
|
+
}
|
|
26169
26922
|
if (variables &&
|
|
26170
26923
|
variables.hasOwnProperty('cc_attempt_id') &&
|
|
26171
26924
|
this.client.agent) {
|
|
@@ -26189,7 +26942,7 @@
|
|
|
26189
26942
|
};
|
|
26190
26943
|
Object.defineProperty(Conversation.prototype, "id", {
|
|
26191
26944
|
get: function () {
|
|
26192
|
-
return this.conversationId;
|
|
26945
|
+
return this.channelId || this.inviteId || this.conversationId;
|
|
26193
26946
|
},
|
|
26194
26947
|
enumerable: true,
|
|
26195
26948
|
configurable: true
|
|
@@ -26211,6 +26964,7 @@
|
|
|
26211
26964
|
channelId: i.channel_id,
|
|
26212
26965
|
createdAt: i.created_at,
|
|
26213
26966
|
updatedAt: i.updated_at,
|
|
26967
|
+
contact: null,
|
|
26214
26968
|
};
|
|
26215
26969
|
if (i.hasOwnProperty('file')) {
|
|
26216
26970
|
i.file.url = _this.client.fileUrlDownload(i.file.id);
|
|
@@ -26219,6 +26973,9 @@
|
|
|
26219
26973
|
if (i.hasOwnProperty('text')) {
|
|
26220
26974
|
msg.text = i.text;
|
|
26221
26975
|
}
|
|
26976
|
+
if (i.hasOwnProperty('contact')) {
|
|
26977
|
+
msg.contact = i.contact;
|
|
26978
|
+
}
|
|
26222
26979
|
return msg;
|
|
26223
26980
|
});
|
|
26224
26981
|
};
|
|
@@ -26269,7 +27026,19 @@
|
|
|
26269
27026
|
});
|
|
26270
27027
|
Object.defineProperty(Conversation.prototype, "hasReporting", {
|
|
26271
27028
|
get: function () {
|
|
26272
|
-
return this.
|
|
27029
|
+
return this._hasReporting;
|
|
27030
|
+
},
|
|
27031
|
+
enumerable: true,
|
|
27032
|
+
configurable: true
|
|
27033
|
+
});
|
|
27034
|
+
Object.defineProperty(Conversation.prototype, "membersId", {
|
|
27035
|
+
get: function () {
|
|
27036
|
+
var res = [this.id];
|
|
27037
|
+
for (var _i = 0, _a = this.members; _i < _a.length; _i++) {
|
|
27038
|
+
var m = _a[_i];
|
|
27039
|
+
res.push(m.id);
|
|
27040
|
+
}
|
|
27041
|
+
return res;
|
|
26273
27042
|
},
|
|
26274
27043
|
enumerable: true,
|
|
26275
27044
|
configurable: true
|
|
@@ -26306,7 +27075,7 @@
|
|
|
26306
27075
|
throw new Error('This conversation not active');
|
|
26307
27076
|
return [2 /*return*/, this.client.request("close_chat", {
|
|
26308
27077
|
channel_id: this.channelId,
|
|
26309
|
-
conversation_id: this.
|
|
27078
|
+
conversation_id: this.conversationId,
|
|
26310
27079
|
cause: cause,
|
|
26311
27080
|
})];
|
|
26312
27081
|
});
|
|
@@ -26319,7 +27088,7 @@
|
|
|
26319
27088
|
throw new Error('This conversation not active');
|
|
26320
27089
|
return [2 /*return*/, this.client.request("leave_chat", {
|
|
26321
27090
|
channel_id: this.channelId,
|
|
26322
|
-
conversation_id: this.
|
|
27091
|
+
conversation_id: this.conversationId,
|
|
26323
27092
|
cause: cause,
|
|
26324
27093
|
})];
|
|
26325
27094
|
});
|
|
@@ -26362,14 +27131,14 @@
|
|
|
26362
27131
|
var storedFiles, f;
|
|
26363
27132
|
return tslib.__generator(this, function (_a) {
|
|
26364
27133
|
switch (_a.label) {
|
|
26365
|
-
case 0: return [4 /*yield*/, this.client.storeFile(this.
|
|
27134
|
+
case 0: return [4 /*yield*/, this.client.storeFile(this.conversationId, [file], cb)];
|
|
26366
27135
|
case 1:
|
|
26367
27136
|
storedFiles = _a.sent();
|
|
26368
27137
|
f = storedFiles[0];
|
|
26369
27138
|
// todo bug if chat response error
|
|
26370
27139
|
return [2 /*return*/, this.client.request("send_file_chat", {
|
|
26371
27140
|
channel_id: this.channelId,
|
|
26372
|
-
conversation_id: this.
|
|
27141
|
+
conversation_id: this.conversationId,
|
|
26373
27142
|
id: f.id,
|
|
26374
27143
|
name: file.name,
|
|
26375
27144
|
mime: f.mime,
|
|
@@ -26401,7 +27170,7 @@
|
|
|
26401
27170
|
return tslib.__generator(this, function (_a) {
|
|
26402
27171
|
return [2 /*return*/, this.client.request("add_to_chat", {
|
|
26403
27172
|
channel_id: this.channelId,
|
|
26404
|
-
conversation_id: this.
|
|
27173
|
+
conversation_id: this.conversationId,
|
|
26405
27174
|
user_id: userId,
|
|
26406
27175
|
title: title,
|
|
26407
27176
|
})];
|
|
@@ -26449,7 +27218,7 @@
|
|
|
26449
27218
|
Conversation.prototype.sendMessageTextChunk = function (text) {
|
|
26450
27219
|
return this.client.request("send_text_chat", {
|
|
26451
27220
|
channel_id: this.channelId,
|
|
26452
|
-
conversation_id: this.
|
|
27221
|
+
conversation_id: this.conversationId,
|
|
26453
27222
|
text: text,
|
|
26454
27223
|
});
|
|
26455
27224
|
};
|
|
@@ -26613,7 +27382,7 @@
|
|
|
26613
27382
|
call.answeredAt = c.answered_at || 0;
|
|
26614
27383
|
call.bridgedAt = c.bridged_at || 0;
|
|
26615
27384
|
call.hangupAt = c.hangup_at || 0;
|
|
26616
|
-
call.reportingAt = c.reporting_at || 0
|
|
27385
|
+
// call.reportingAt = c.reporting_at || 0
|
|
26617
27386
|
if (c.task) {
|
|
26618
27387
|
call.task = new Task(this, {
|
|
26619
27388
|
attempt_id: c.task.attempt_id,
|
|
@@ -26623,6 +27392,14 @@
|
|
|
26623
27392
|
}, c.task // todo add app_id
|
|
26624
27393
|
);
|
|
26625
27394
|
call.queue.reporting = 'true';
|
|
27395
|
+
if (c.leaving_at && c.task.processing_sec) {
|
|
27396
|
+
call.task.startProcessingAt = c.leaving_at;
|
|
27397
|
+
call.task.setProcessing({
|
|
27398
|
+
sec: c.task.processing_sec || 0,
|
|
27399
|
+
timeout: Date.now() - c.leaving_at + (c.task.processing_sec || 0) * 1000,
|
|
27400
|
+
renewal_sec: c.task.processing_renewal_sec || 0,
|
|
27401
|
+
});
|
|
27402
|
+
}
|
|
26626
27403
|
}
|
|
26627
27404
|
this.callStore.set(call.id, call);
|
|
26628
27405
|
}
|
|
@@ -26647,6 +27424,26 @@
|
|
|
26647
27424
|
messages = conv.messages.reverse();
|
|
26648
27425
|
c = new Conversation(this, conv.id, conv.title, conv.members, messages, conv.variables);
|
|
26649
27426
|
c.createdAt = conv.created_at;
|
|
27427
|
+
c.closedAt = conv.closed_at;
|
|
27428
|
+
if (conv.task) {
|
|
27429
|
+
c.task = new Task(this, {
|
|
27430
|
+
attempt_id: conv.task.attempt_id,
|
|
27431
|
+
channel: conv.task.channel,
|
|
27432
|
+
status: conv.task.status,
|
|
27433
|
+
timestamp: Date.now(),
|
|
27434
|
+
}, conv.task // todo add app_id
|
|
27435
|
+
);
|
|
27436
|
+
if (conv.leaving_at && conv.task.processing_sec) {
|
|
27437
|
+
c.task.startProcessingAt = conv.leaving_at;
|
|
27438
|
+
c.task.setProcessing({
|
|
27439
|
+
sec: conv.task.processing_sec || 0,
|
|
27440
|
+
timeout: Date.now() -
|
|
27441
|
+
conv.leaving_at +
|
|
27442
|
+
(conv.task.processing_sec || 0) * 1000,
|
|
27443
|
+
renewal_sec: conv.task.processing_renewal_sec || 0,
|
|
27444
|
+
});
|
|
27445
|
+
}
|
|
27446
|
+
}
|
|
26650
27447
|
if (conv.invite_id) {
|
|
26651
27448
|
c.setInvite(conv.invite_id, conv.created_at);
|
|
26652
27449
|
}
|
|
@@ -27356,8 +28153,8 @@
|
|
|
27356
28153
|
};
|
|
27357
28154
|
Client.prototype.handleChatEvents = function (event) {
|
|
27358
28155
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
27359
|
-
var conversation, timestamp, inv, joined, message, e;
|
|
27360
|
-
return tslib.__generator(this, function (
|
|
28156
|
+
var conversation, timestamp, inv, joined, message, _i, _a, v, c, _b, _c, v, l, e;
|
|
28157
|
+
return tslib.__generator(this, function (_d) {
|
|
27361
28158
|
timestamp = Date.now() // todo bug
|
|
27362
28159
|
;
|
|
27363
28160
|
switch (event.action) {
|
|
@@ -27369,7 +28166,7 @@
|
|
|
27369
28166
|
break;
|
|
27370
28167
|
case exports.ChatActions.Joined:
|
|
27371
28168
|
joined = event.data;
|
|
27372
|
-
conversation = this.conversationById(joined.
|
|
28169
|
+
conversation = this.conversationById(joined.member.id);
|
|
27373
28170
|
if (conversation) {
|
|
27374
28171
|
conversation.setAnswered(joined.member.id, timestamp, joined.member);
|
|
27375
28172
|
}
|
|
@@ -27377,16 +28174,40 @@
|
|
|
27377
28174
|
case exports.ChatActions.Message:
|
|
27378
28175
|
message = event.data;
|
|
27379
28176
|
message.timestamp = timestamp;
|
|
27380
|
-
|
|
28177
|
+
// fixme
|
|
28178
|
+
for (_i = 0, _a = this.allConversations(); _i < _a.length; _i++) {
|
|
28179
|
+
v = _a[_i];
|
|
28180
|
+
if (!v.closedAt && v.membersId.indexOf(message.channel_id) > -1) {
|
|
28181
|
+
conversation = v;
|
|
28182
|
+
}
|
|
28183
|
+
}
|
|
27381
28184
|
if (conversation) {
|
|
27382
28185
|
conversation.newMessage(message);
|
|
27383
28186
|
}
|
|
27384
28187
|
break;
|
|
27385
28188
|
case exports.ChatActions.Close:
|
|
28189
|
+
c = event.data;
|
|
28190
|
+
// fixme
|
|
28191
|
+
for (_b = 0, _c = this.allConversations(); _b < _c.length; _b++) {
|
|
28192
|
+
v = _c[_b];
|
|
28193
|
+
if (!v.closedAt && v.membersId.indexOf(c.from_channel_id) > -1) {
|
|
28194
|
+
conversation = v;
|
|
28195
|
+
}
|
|
28196
|
+
}
|
|
28197
|
+
if (conversation) {
|
|
28198
|
+
conversation.setClosed(timestamp);
|
|
28199
|
+
}
|
|
28200
|
+
break;
|
|
27386
28201
|
case exports.ChatActions.Leave:
|
|
28202
|
+
l = event.data;
|
|
28203
|
+
conversation = this.conversationById(l.leaved_channel_id);
|
|
28204
|
+
if (conversation) {
|
|
28205
|
+
conversation.setClosed(timestamp);
|
|
28206
|
+
}
|
|
28207
|
+
break;
|
|
27387
28208
|
case exports.ChatActions.Decline:
|
|
27388
28209
|
e = event.data;
|
|
27389
|
-
conversation = this.conversationById(e.
|
|
28210
|
+
conversation = this.conversationById(e.invite_id);
|
|
27390
28211
|
if (conversation) {
|
|
27391
28212
|
conversation.setClosed(timestamp);
|
|
27392
28213
|
}
|
|
@@ -27925,6 +28746,10 @@
|
|
|
27925
28746
|
exports.RegionServiceApiFp = RegionServiceApiFp;
|
|
27926
28747
|
exports.RegionServiceApiFactory = RegionServiceApiFactory;
|
|
27927
28748
|
exports.RegionServiceApi = RegionServiceApi;
|
|
28749
|
+
exports.RoutingChatPlanServiceApiAxiosParamCreator = RoutingChatPlanServiceApiAxiosParamCreator;
|
|
28750
|
+
exports.RoutingChatPlanServiceApiFp = RoutingChatPlanServiceApiFp;
|
|
28751
|
+
exports.RoutingChatPlanServiceApiFactory = RoutingChatPlanServiceApiFactory;
|
|
28752
|
+
exports.RoutingChatPlanServiceApi = RoutingChatPlanServiceApi;
|
|
27928
28753
|
exports.RoutingOutboundCallServiceApiAxiosParamCreator = RoutingOutboundCallServiceApiAxiosParamCreator;
|
|
27929
28754
|
exports.RoutingOutboundCallServiceApiFp = RoutingOutboundCallServiceApiFp;
|
|
27930
28755
|
exports.RoutingOutboundCallServiceApiFactory = RoutingOutboundCallServiceApiFactory;
|