webitel-sdk 0.1.87 → 0.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/bundles/index.esm.js +166 -34
  2. package/bundles/index.esm.js.map +1 -1
  3. package/bundles/index.esm.min.js +1 -1
  4. package/bundles/index.esm.min.js.map +1 -1
  5. package/bundles/index.umd.js +209 -38
  6. package/bundles/index.umd.js.map +1 -1
  7. package/bundles/index.umd.min.js +1 -1
  8. package/bundles/index.umd.min.js.map +1 -1
  9. package/esm2015/api/call-service-api.js +14 -7
  10. package/esm2015/api/call-service-api.js.map +1 -1
  11. package/esm2015/api/engine-patch-queue-bucket-request.js +13 -0
  12. package/esm2015/api/engine-patch-queue-bucket-request.js.map +1 -0
  13. package/esm2015/api/index.js.map +1 -1
  14. package/esm2015/api/queue-bucket-service-api.js +125 -27
  15. package/esm2015/api/queue-bucket-service-api.js.map +1 -1
  16. package/esm2015/api-consumers/list-getter/endpoint-list-getter-api-consumer/endpoint-list-getter-api-consumer.js +7 -5
  17. package/esm2015/api-consumers/list-getter/endpoint-list-getter-api-consumer/endpoint-list-getter-api-consumer.js.map +1 -1
  18. package/esm2015/sip/webrtc/index.js +1 -0
  19. package/esm2015/sip/webrtc/index.js.map +1 -1
  20. package/esm2015/socket/client.js +26 -0
  21. package/esm2015/socket/client.js.map +1 -1
  22. package/esm5/api/call-service-api.js +14 -7
  23. package/esm5/api/call-service-api.js.map +1 -1
  24. package/esm5/api/engine-patch-queue-bucket-request.js +13 -0
  25. package/esm5/api/engine-patch-queue-bucket-request.js.map +1 -0
  26. package/esm5/api/index.js.map +1 -1
  27. package/esm5/api/queue-bucket-service-api.js +138 -27
  28. package/esm5/api/queue-bucket-service-api.js.map +1 -1
  29. package/esm5/api-consumers/list-getter/endpoint-list-getter-api-consumer/endpoint-list-getter-api-consumer.js +15 -13
  30. package/esm5/api-consumers/list-getter/endpoint-list-getter-api-consumer/endpoint-list-getter-api-consumer.js.map +1 -1
  31. package/esm5/sip/webrtc/index.js +1 -0
  32. package/esm5/sip/webrtc/index.js.map +1 -1
  33. package/esm5/socket/client.js +56 -4
  34. package/esm5/socket/client.js.map +1 -1
  35. package/package.json +1 -1
  36. package/types/api/call-service-api.d.ts +8 -4
  37. package/types/api/call-service-api.d.ts.map +1 -1
  38. package/types/api/engine-attempt-callback-request.d.ts +6 -0
  39. package/types/api/engine-attempt-callback-request.d.ts.map +1 -1
  40. package/types/api/engine-attempt-result-request.d.ts +6 -0
  41. package/types/api/engine-attempt-result-request.d.ts.map +1 -1
  42. package/types/api/engine-create-queue-bucket-request.d.ts +8 -2
  43. package/types/api/engine-create-queue-bucket-request.d.ts.map +1 -1
  44. package/types/api/engine-member-communication-create-request.d.ts +6 -0
  45. package/types/api/engine-member-communication-create-request.d.ts.map +1 -1
  46. package/types/api/engine-member-communication.d.ts +6 -0
  47. package/types/api/engine-member-communication.d.ts.map +1 -1
  48. package/types/api/engine-patch-queue-bucket-request.d.ts +62 -0
  49. package/types/api/engine-patch-queue-bucket-request.d.ts.map +1 -0
  50. package/types/api/engine-queue-bucket.d.ts +12 -0
  51. package/types/api/engine-queue-bucket.d.ts.map +1 -1
  52. package/types/api/engine-update-queue-bucket-request.d.ts +8 -2
  53. package/types/api/engine-update-queue-bucket-request.d.ts.map +1 -1
  54. package/types/api/index.d.ts +1 -0
  55. package/types/api/index.d.ts.map +1 -1
  56. package/types/api/queue-bucket-service-api.d.ts +46 -16
  57. package/types/api/queue-bucket-service-api.d.ts.map +1 -1
  58. package/types/api-consumers/list-getter/endpoint-list-getter-api-consumer/endpoint-list-getter-api-consumer.d.ts +1 -1
  59. package/types/api-consumers/list-getter/endpoint-list-getter-api-consumer/endpoint-list-getter-api-consumer.d.ts.map +1 -1
  60. package/types/api-consumers/list-getter/endpoint-list-getter-api-consumer/interfaces/endpoint-get-list-params.d.ts +1 -0
  61. package/types/api-consumers/list-getter/endpoint-list-getter-api-consumer/interfaces/endpoint-get-list-params.d.ts.map +1 -1
  62. package/types/sip/webrtc/index.d.ts.map +1 -1
  63. package/types/socket/client.d.ts +4 -0
  64. package/types/socket/client.d.ts.map +1 -1
@@ -7767,10 +7767,11 @@
7767
7767
  * @param {Array<string>} [transferTo]
7768
7768
  * @param {Array<string>} [dependencyId]
7769
7769
  * @param {Array<string>} [tags]
7770
+ * @param {Array<string>} [amdResult]
7770
7771
  * @param {*} [options] Override http request option.
7771
7772
  * @throws {RequiredError}
7772
7773
  */
7773
- searchHistoryCall: function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, options) {
7774
+ searchHistoryCall: function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, options) {
7774
7775
  if (options === void 0) { options = {}; }
7775
7776
  return tslib.__awaiter(_this, void 0, void 0, function () {
7776
7777
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
@@ -7896,6 +7897,9 @@
7896
7897
  if (tags) {
7897
7898
  localVarQueryParameter['tags'] = tags;
7898
7899
  }
7900
+ if (amdResult) {
7901
+ localVarQueryParameter['amd_result'] = amdResult;
7902
+ }
7899
7903
  localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
7900
7904
  // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
7901
7905
  delete localVarUrlObj.search;
@@ -8389,15 +8393,16 @@
8389
8393
  * @param {Array<string>} [transferTo]
8390
8394
  * @param {Array<string>} [dependencyId]
8391
8395
  * @param {Array<string>} [tags]
8396
+ * @param {Array<string>} [amdResult]
8392
8397
  * @param {*} [options] Override http request option.
8393
8398
  * @throws {RequiredError}
8394
8399
  */
8395
- searchHistoryCall: function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, options) {
8400
+ searchHistoryCall: function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, options) {
8396
8401
  return tslib.__awaiter(this, void 0, void 0, function () {
8397
8402
  var localVarAxiosArgs;
8398
8403
  return tslib.__generator(this, function (_a) {
8399
8404
  switch (_a.label) {
8400
- case 0: return [4 /*yield*/, CallServiceApiAxiosParamCreator(configuration).searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, options)];
8405
+ case 0: return [4 /*yield*/, CallServiceApiAxiosParamCreator(configuration).searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, options)];
8401
8406
  case 1:
8402
8407
  localVarAxiosArgs = _a.sent();
8403
8408
  return [2 /*return*/, function (axios, basePath) {
@@ -8663,12 +8668,13 @@
8663
8668
  * @param {Array<string>} [transferTo]
8664
8669
  * @param {Array<string>} [dependencyId]
8665
8670
  * @param {Array<string>} [tags]
8671
+ * @param {Array<string>} [amdResult]
8666
8672
  * @param {*} [options] Override http request option.
8667
8673
  * @throws {RequiredError}
8668
8674
  */
8669
- searchHistoryCall: function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, options) {
8675
+ searchHistoryCall: function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, options) {
8670
8676
  return CallServiceApiFp(configuration)
8671
- .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, options)
8677
+ .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, options)
8672
8678
  .then(function (request) { return request(axios, basePath); });
8673
8679
  },
8674
8680
  /**
@@ -8925,14 +8931,15 @@
8925
8931
  * @param {Array<string>} [transferTo]
8926
8932
  * @param {Array<string>} [dependencyId]
8927
8933
  * @param {Array<string>} [tags]
8934
+ * @param {Array<string>} [amdResult]
8928
8935
  * @param {*} [options] Override http request option.
8929
8936
  * @throws {RequiredError}
8930
8937
  * @memberof CallServiceApi
8931
8938
  */
8932
- CallServiceApi.prototype.searchHistoryCall = function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, options) {
8939
+ CallServiceApi.prototype.searchHistoryCall = function (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, options) {
8933
8940
  var _this = this;
8934
8941
  return CallServiceApiFp(this.configuration)
8935
- .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, options)
8942
+ .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, options)
8936
8943
  .then(function (request) { return request(_this.axios, _this.basePath); });
8937
8944
  };
8938
8945
  /**
@@ -16930,11 +16937,10 @@
16930
16937
  * @summary DeleteQueueRouting
16931
16938
  * @param {string} queueId
16932
16939
  * @param {string} id
16933
- * @param {string} [domainId]
16934
16940
  * @param {*} [options] Override http request option.
16935
16941
  * @throws {RequiredError}
16936
16942
  */
16937
- deleteQueueBucket: function (queueId, id, domainId, options) {
16943
+ deleteQueueBucket: function (queueId, id, options) {
16938
16944
  if (options === void 0) { options = {}; }
16939
16945
  return tslib.__awaiter(_this, void 0, void 0, function () {
16940
16946
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
@@ -16974,14 +16980,82 @@
16974
16980
  localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
16975
16981
  _b.label = 5;
16976
16982
  case 5:
16977
- if (domainId !== undefined) {
16978
- localVarQueryParameter['domain_id'] = domainId;
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.');
16979
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;
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';
16980
17049
  localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
16981
17050
  // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
16982
17051
  delete localVarUrlObj.search;
16983
17052
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16984
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 || '';
16985
17059
  return [2 /*return*/, {
16986
17060
  url: globalImportUrl.format(localVarUrlObj),
16987
17061
  options: localVarRequestOptions,
@@ -16995,11 +17069,10 @@
16995
17069
  * @summary ReadQueueRouting
16996
17070
  * @param {string} queueId
16997
17071
  * @param {string} id
16998
- * @param {string} [domainId]
16999
17072
  * @param {*} [options] Override http request option.
17000
17073
  * @throws {RequiredError}
17001
17074
  */
17002
- readQueueBucket: function (queueId, id, domainId, options) {
17075
+ readQueueBucket: function (queueId, id, options) {
17003
17076
  if (options === void 0) { options = {}; }
17004
17077
  return tslib.__awaiter(_this, void 0, void 0, function () {
17005
17078
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
@@ -17039,9 +17112,6 @@
17039
17112
  localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
17040
17113
  _b.label = 5;
17041
17114
  case 5:
17042
- if (domainId !== undefined) {
17043
- localVarQueryParameter['domain_id'] = domainId;
17044
- }
17045
17115
  localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
17046
17116
  // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
17047
17117
  delete localVarUrlObj.search;
@@ -17244,16 +17314,41 @@
17244
17314
  * @summary DeleteQueueRouting
17245
17315
  * @param {string} queueId
17246
17316
  * @param {string} id
17247
- * @param {string} [domainId]
17248
17317
  * @param {*} [options] Override http request option.
17249
17318
  * @throws {RequiredError}
17250
17319
  */
17251
- deleteQueueBucket: function (queueId, id, domainId, options) {
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) {
17252
17347
  return tslib.__awaiter(this, void 0, void 0, function () {
17253
17348
  var localVarAxiosArgs;
17254
17349
  return tslib.__generator(this, function (_a) {
17255
17350
  switch (_a.label) {
17256
- case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).deleteQueueBucket(queueId, id, domainId, options)];
17351
+ case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).patchQueueBucket(queueId, id, body, options)];
17257
17352
  case 1:
17258
17353
  localVarAxiosArgs = _a.sent();
17259
17354
  return [2 /*return*/, function (axios, basePath) {
@@ -17271,16 +17366,15 @@
17271
17366
  * @summary ReadQueueRouting
17272
17367
  * @param {string} queueId
17273
17368
  * @param {string} id
17274
- * @param {string} [domainId]
17275
17369
  * @param {*} [options] Override http request option.
17276
17370
  * @throws {RequiredError}
17277
17371
  */
17278
- readQueueBucket: function (queueId, id, domainId, options) {
17372
+ readQueueBucket: function (queueId, id, options) {
17279
17373
  return tslib.__awaiter(this, void 0, void 0, function () {
17280
17374
  var localVarAxiosArgs;
17281
17375
  return tslib.__generator(this, function (_a) {
17282
17376
  switch (_a.label) {
17283
- case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).readQueueBucket(queueId, id, domainId, options)];
17377
+ case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).readQueueBucket(queueId, id, options)];
17284
17378
  case 1:
17285
17379
  localVarAxiosArgs = _a.sent();
17286
17380
  return [2 /*return*/, function (axios, basePath) {
@@ -17377,13 +17471,25 @@
17377
17471
  * @summary DeleteQueueRouting
17378
17472
  * @param {string} queueId
17379
17473
  * @param {string} id
17380
- * @param {string} [domainId]
17381
17474
  * @param {*} [options] Override http request option.
17382
17475
  * @throws {RequiredError}
17383
17476
  */
17384
- deleteQueueBucket: function (queueId, id, domainId, options) {
17477
+ deleteQueueBucket: function (queueId, id, options) {
17385
17478
  return QueueBucketServiceApiFp(configuration)
17386
- .deleteQueueBucket(queueId, id, domainId, options)
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) {
17491
+ return QueueBucketServiceApiFp(configuration)
17492
+ .patchQueueBucket(queueId, id, body, options)
17387
17493
  .then(function (request) { return request(axios, basePath); });
17388
17494
  },
17389
17495
  /**
@@ -17391,13 +17497,12 @@
17391
17497
  * @summary ReadQueueRouting
17392
17498
  * @param {string} queueId
17393
17499
  * @param {string} id
17394
- * @param {string} [domainId]
17395
17500
  * @param {*} [options] Override http request option.
17396
17501
  * @throws {RequiredError}
17397
17502
  */
17398
- readQueueBucket: function (queueId, id, domainId, options) {
17503
+ readQueueBucket: function (queueId, id, options) {
17399
17504
  return QueueBucketServiceApiFp(configuration)
17400
- .readQueueBucket(queueId, id, domainId, options)
17505
+ .readQueueBucket(queueId, id, options)
17401
17506
  .then(function (request) { return request(axios, basePath); });
17402
17507
  },
17403
17508
  /**
@@ -17465,15 +17570,29 @@
17465
17570
  * @summary DeleteQueueRouting
17466
17571
  * @param {string} queueId
17467
17572
  * @param {string} id
17468
- * @param {string} [domainId]
17469
17573
  * @param {*} [options] Override http request option.
17470
17574
  * @throws {RequiredError}
17471
17575
  * @memberof QueueBucketServiceApi
17472
17576
  */
17473
- QueueBucketServiceApi.prototype.deleteQueueBucket = function (queueId, id, domainId, options) {
17577
+ QueueBucketServiceApi.prototype.deleteQueueBucket = function (queueId, id, options) {
17474
17578
  var _this = this;
17475
17579
  return QueueBucketServiceApiFp(this.configuration)
17476
- .deleteQueueBucket(queueId, id, domainId, options)
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) {
17593
+ var _this = this;
17594
+ return QueueBucketServiceApiFp(this.configuration)
17595
+ .patchQueueBucket(queueId, id, body, options)
17477
17596
  .then(function (request) { return request(_this.axios, _this.basePath); });
17478
17597
  };
17479
17598
  /**
@@ -17481,15 +17600,14 @@
17481
17600
  * @summary ReadQueueRouting
17482
17601
  * @param {string} queueId
17483
17602
  * @param {string} id
17484
- * @param {string} [domainId]
17485
17603
  * @param {*} [options] Override http request option.
17486
17604
  * @throws {RequiredError}
17487
17605
  * @memberof QueueBucketServiceApi
17488
17606
  */
17489
- QueueBucketServiceApi.prototype.readQueueBucket = function (queueId, id, domainId, options) {
17607
+ QueueBucketServiceApi.prototype.readQueueBucket = function (queueId, id, options) {
17490
17608
  var _this = this;
17491
17609
  return QueueBucketServiceApiFp(this.configuration)
17492
- .readQueueBucket(queueId, id, domainId, options)
17610
+ .readQueueBucket(queueId, id, options)
17493
17611
  .then(function (request) { return request(_this.axios, _this.basePath); });
17494
17612
  };
17495
17613
  /**
@@ -24826,6 +24944,7 @@
24826
24944
  switch (_a.label) {
24827
24945
  case 0:
24828
24946
  if (!this.ua) return [3 /*break*/, 2];
24947
+ this.ua.terminateSessions();
24829
24948
  this.ua.removeAllListeners();
24830
24949
  return [4 /*yield*/, this.ua.stop()];
24831
24950
  case 1:
@@ -26512,6 +26631,7 @@
26512
26631
  var WEBSOCKET_AUTHENTICATION_CHALLENGE = 'authentication_challenge';
26513
26632
  var WEBSOCKET_DEFAULT_DEVICE_CONFIG = 'user_default_device';
26514
26633
  var WEBSOCKET_AGENT_SESSION = 'cc_agent_session';
26634
+ var WEBSOCKET_PING = 'ping';
26515
26635
  // const WEBSOCKET_CALL_BY_USER = 'call_by_user'
26516
26636
  var WEBSOCKET_MAKE_OUTBOUND_CALL = 'call_invite';
26517
26637
  var WEBSOCKET_MAKE_USER_CALL = 'call_user';
@@ -26538,6 +26658,7 @@
26538
26658
  _this.eventHandler = new eeTs.EventEmitter();
26539
26659
  _this.callStore = new Map();
26540
26660
  _this.conversationStore = new Map();
26661
+ _this.pingTimer = null;
26541
26662
  _this.basePath = "" + formatBaseUri(_config.storageEndpoint || _config.endpoint);
26542
26663
  return _this;
26543
26664
  }
@@ -26787,6 +26908,15 @@
26787
26908
  });
26788
26909
  });
26789
26910
  };
26911
+ Client.prototype.ping = function () {
26912
+ return tslib.__awaiter(this, void 0, void 0, function () {
26913
+ return tslib.__generator(this, function (_a) {
26914
+ return [2 /*return*/, this.request(WEBSOCKET_PING, {
26915
+ ping: 1,
26916
+ })];
26917
+ });
26918
+ });
26919
+ };
26790
26920
  Client.prototype.sessionInfo = function () {
26791
26921
  return this.connectionInfo.session;
26792
26922
  };
@@ -27147,14 +27277,52 @@
27147
27277
  this.eventHandler.emit(TASK_EVENT, e.status, task);
27148
27278
  }
27149
27279
  };
27280
+ Client.prototype.pingServer = function () {
27281
+ return tslib.__awaiter(this, void 0, void 0, function () {
27282
+ var t;
27283
+ var _this = this;
27284
+ return tslib.__generator(this, function (_a) {
27285
+ switch (_a.label) {
27286
+ case 0:
27287
+ if (!(this.pingTimer && this.connectionInfo.ping_interval)) return [3 /*break*/, 2];
27288
+ t = setTimeout(function () { return tslib.__awaiter(_this, void 0, void 0, function () {
27289
+ return tslib.__generator(this, function (_a) {
27290
+ this.socket.close(3005);
27291
+ return [2 /*return*/];
27292
+ });
27293
+ }); }, +this.connectionInfo.ping_interval / 2);
27294
+ return [4 /*yield*/, this.ping()];
27295
+ case 1:
27296
+ _a.sent();
27297
+ clearTimeout(t);
27298
+ _a.label = 2;
27299
+ case 2:
27300
+ if (this.connectionInfo.ping_interval) {
27301
+ // @ts-ignore
27302
+ this.pingTimer = setTimeout(this.pingServer.bind(this), +this.connectionInfo.ping_interval);
27303
+ }
27304
+ return [2 /*return*/];
27305
+ }
27306
+ });
27307
+ });
27308
+ };
27150
27309
  Client.prototype.connected = function (info) {
27151
27310
  return tslib.__awaiter(this, void 0, void 0, function () {
27152
27311
  return tslib.__generator(this, function (_a) {
27153
- this.connectionInfo = info;
27154
- if (!this.useWebPhone()) {
27155
- return [2 /*return*/];
27312
+ switch (_a.label) {
27313
+ case 0:
27314
+ this.connectionInfo = info;
27315
+ if (!info.ping_interval) return [3 /*break*/, 2];
27316
+ return [4 /*yield*/, this.pingServer()];
27317
+ case 1:
27318
+ _a.sent();
27319
+ _a.label = 2;
27320
+ case 2:
27321
+ if (!this.useWebPhone()) {
27322
+ return [2 /*return*/];
27323
+ }
27324
+ return [2 /*return*/, this.registerCallClient(new SipPhone(this.instanceId, this._config.debug))];
27156
27325
  }
27157
- return [2 /*return*/, this.registerCallClient(new SipPhone(this.instanceId, this._config.debug))];
27158
27326
  });
27159
27327
  });
27160
27328
  };
@@ -27206,6 +27374,9 @@
27206
27374
  }
27207
27375
  _this.socket.on('message', _this.onMessage.bind(_this));
27208
27376
  _this.socket.on('close', function (code) {
27377
+ if (_this.pingTimer) {
27378
+ clearTimeout(_this.pingTimer);
27379
+ }
27209
27380
  _this.log.error('socket close code: ', code);
27210
27381
  _this.eventHandler.off('*');
27211
27382
  if (code !== 1000) {