webitel-sdk 0.1.88 → 0.1.92
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 +200 -37
- 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 +248 -41
- 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/call-service-api.js +14 -7
- package/esm2015/api/call-service-api.js.map +1 -1
- 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/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/sip/webrtc/index.js +1 -0
- package/esm2015/sip/webrtc/index.js.map +1 -1
- package/esm2015/socket/client.js +55 -1
- package/esm2015/socket/client.js.map +1 -1
- package/esm2015/socket/conversation.js.map +1 -1
- package/esm2015/socket/task.js +5 -2
- package/esm2015/socket/task.js.map +1 -1
- package/esm5/api/call-service-api.js +14 -7
- package/esm5/api/call-service-api.js.map +1 -1
- 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/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/sip/webrtc/index.js +1 -0
- package/esm5/sip/webrtc/index.js.map +1 -1
- package/esm5/socket/client.js +85 -5
- package/esm5/socket/client.js.map +1 -1
- package/esm5/socket/conversation.js.map +1 -1
- package/esm5/socket/task.js +10 -2
- package/esm5/socket/task.js.map +1 -1
- package/package.json +1 -1
- package/types/api/call-service-api.d.ts +8 -4
- package/types/api/call-service-api.d.ts.map +1 -1
- package/types/api/engine-attempt-callback-request.d.ts +6 -0
- package/types/api/engine-attempt-callback-request.d.ts.map +1 -1
- package/types/api/engine-attempt-result-request.d.ts +6 -0
- package/types/api/engine-attempt-result-request.d.ts.map +1 -1
- 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-member-communication-create-request.d.ts +6 -0
- package/types/api/engine-member-communication-create-request.d.ts.map +1 -1
- package/types/api/engine-member-communication.d.ts +6 -0
- package/types/api/engine-member-communication.d.ts.map +1 -1
- 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-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 +1 -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/sip/webrtc/index.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 +4 -0
- package/types/socket/client.d.ts.map +1 -1
- package/types/socket/conversation.d.ts +3 -1
- 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
|
@@ -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,
|
|
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
|
-
|
|
16978
|
-
|
|
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;
|
|
16979
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,
|
|
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,
|
|
17320
|
+
deleteQueueBucket: function (queueId, id, options) {
|
|
17252
17321
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
17253
17322
|
var localVarAxiosArgs;
|
|
17254
17323
|
return tslib.__generator(this, function (_a) {
|
|
17255
17324
|
switch (_a.label) {
|
|
17256
|
-
case 0: return [4 /*yield*/, QueueBucketServiceApiAxiosParamCreator(configuration).deleteQueueBucket(queueId, id,
|
|
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) {
|
|
17347
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
17348
|
+
var localVarAxiosArgs;
|
|
17349
|
+
return tslib.__generator(this, function (_a) {
|
|
17350
|
+
switch (_a.label) {
|
|
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,
|
|
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,
|
|
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,
|
|
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) {
|
|
17385
17491
|
return QueueBucketServiceApiFp(configuration)
|
|
17386
|
-
.
|
|
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,
|
|
17503
|
+
readQueueBucket: function (queueId, id, options) {
|
|
17399
17504
|
return QueueBucketServiceApiFp(configuration)
|
|
17400
|
-
.readQueueBucket(queueId, id,
|
|
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,
|
|
17577
|
+
QueueBucketServiceApi.prototype.deleteQueueBucket = function (queueId, id, options) {
|
|
17474
17578
|
var _this = this;
|
|
17475
17579
|
return QueueBucketServiceApiFp(this.configuration)
|
|
17476
|
-
.deleteQueueBucket(queueId, id,
|
|
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,
|
|
17607
|
+
QueueBucketServiceApi.prototype.readQueueBucket = function (queueId, id, options) {
|
|
17490
17608
|
var _this = this;
|
|
17491
17609
|
return QueueBucketServiceApiFp(this.configuration)
|
|
17492
|
-
.readQueueBucket(queueId, id,
|
|
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:
|
|
@@ -25045,6 +25164,7 @@
|
|
|
25045
25164
|
this.offeringAt = 0;
|
|
25046
25165
|
this.answeredAt = 0;
|
|
25047
25166
|
this.bridgedAt = 0;
|
|
25167
|
+
this.reportedAt = 0;
|
|
25048
25168
|
this.startProcessingAt = 0;
|
|
25049
25169
|
this.stopAt = 0;
|
|
25050
25170
|
this.closedAt = 0;
|
|
@@ -25147,7 +25267,7 @@
|
|
|
25147
25267
|
this.startProcessingAt = Date.now();
|
|
25148
25268
|
}
|
|
25149
25269
|
if (p.sec) {
|
|
25150
|
-
p.timeout =
|
|
25270
|
+
p.timeout = this.startProcessingAt + p.sec * 1000; // bug
|
|
25151
25271
|
}
|
|
25152
25272
|
this._processing = p;
|
|
25153
25273
|
};
|
|
@@ -25224,8 +25344,15 @@
|
|
|
25224
25344
|
};
|
|
25225
25345
|
Task.prototype.reporting = function (reporting) {
|
|
25226
25346
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
25347
|
+
var res;
|
|
25227
25348
|
return tslib.__generator(this, function (_a) {
|
|
25228
|
-
|
|
25349
|
+
switch (_a.label) {
|
|
25350
|
+
case 0: return [4 /*yield*/, this.client.request('cc_reporting', tslib.__assign({ attempt_id: this.id }, reporting))];
|
|
25351
|
+
case 1:
|
|
25352
|
+
res = _a.sent();
|
|
25353
|
+
this.reportedAt = Date.now();
|
|
25354
|
+
return [2 /*return*/, res];
|
|
25355
|
+
}
|
|
25229
25356
|
});
|
|
25230
25357
|
});
|
|
25231
25358
|
};
|
|
@@ -26512,6 +26639,7 @@
|
|
|
26512
26639
|
var WEBSOCKET_AUTHENTICATION_CHALLENGE = 'authentication_challenge';
|
|
26513
26640
|
var WEBSOCKET_DEFAULT_DEVICE_CONFIG = 'user_default_device';
|
|
26514
26641
|
var WEBSOCKET_AGENT_SESSION = 'cc_agent_session';
|
|
26642
|
+
var WEBSOCKET_PING = 'ping';
|
|
26515
26643
|
// const WEBSOCKET_CALL_BY_USER = 'call_by_user'
|
|
26516
26644
|
var WEBSOCKET_MAKE_OUTBOUND_CALL = 'call_invite';
|
|
26517
26645
|
var WEBSOCKET_MAKE_USER_CALL = 'call_user';
|
|
@@ -26538,6 +26666,7 @@
|
|
|
26538
26666
|
_this.eventHandler = new eeTs.EventEmitter();
|
|
26539
26667
|
_this.callStore = new Map();
|
|
26540
26668
|
_this.conversationStore = new Map();
|
|
26669
|
+
_this.pingTimer = null;
|
|
26541
26670
|
_this.basePath = "" + formatBaseUri(_config.storageEndpoint || _config.endpoint);
|
|
26542
26671
|
return _this;
|
|
26543
26672
|
}
|
|
@@ -26603,7 +26732,7 @@
|
|
|
26603
26732
|
call.answeredAt = c.answered_at || 0;
|
|
26604
26733
|
call.bridgedAt = c.bridged_at || 0;
|
|
26605
26734
|
call.hangupAt = c.hangup_at || 0;
|
|
26606
|
-
call.reportingAt = c.reporting_at || 0
|
|
26735
|
+
// call.reportingAt = c.reporting_at || 0
|
|
26607
26736
|
if (c.task) {
|
|
26608
26737
|
call.task = new Task(this, {
|
|
26609
26738
|
attempt_id: c.task.attempt_id,
|
|
@@ -26613,6 +26742,14 @@
|
|
|
26613
26742
|
}, c.task // todo add app_id
|
|
26614
26743
|
);
|
|
26615
26744
|
call.queue.reporting = 'true';
|
|
26745
|
+
if (c.leaving_at && c.task.processing_sec) {
|
|
26746
|
+
call.task.startProcessingAt = c.leaving_at;
|
|
26747
|
+
call.task.setProcessing({
|
|
26748
|
+
sec: c.task.processing_sec || 0,
|
|
26749
|
+
timeout: Date.now() - c.leaving_at + (c.task.processing_sec || 0) * 1000,
|
|
26750
|
+
renewal_sec: c.task.processing_renewal_sec || 0,
|
|
26751
|
+
});
|
|
26752
|
+
}
|
|
26616
26753
|
}
|
|
26617
26754
|
this.callStore.set(call.id, call);
|
|
26618
26755
|
}
|
|
@@ -26637,6 +26774,26 @@
|
|
|
26637
26774
|
messages = conv.messages.reverse();
|
|
26638
26775
|
c = new Conversation(this, conv.id, conv.title, conv.members, messages, conv.variables);
|
|
26639
26776
|
c.createdAt = conv.created_at;
|
|
26777
|
+
c.closedAt = conv.closed_at;
|
|
26778
|
+
if (conv.task) {
|
|
26779
|
+
c.task = new Task(this, {
|
|
26780
|
+
attempt_id: conv.task.attempt_id,
|
|
26781
|
+
channel: conv.task.channel,
|
|
26782
|
+
status: conv.task.status,
|
|
26783
|
+
timestamp: Date.now(),
|
|
26784
|
+
}, conv.task // todo add app_id
|
|
26785
|
+
);
|
|
26786
|
+
if (conv.leaving_at && conv.task.processing_sec) {
|
|
26787
|
+
c.task.startProcessingAt = conv.leaving_at;
|
|
26788
|
+
c.task.setProcessing({
|
|
26789
|
+
sec: conv.task.processing_sec || 0,
|
|
26790
|
+
timeout: Date.now() -
|
|
26791
|
+
conv.leaving_at +
|
|
26792
|
+
(conv.task.processing_sec || 0) * 1000,
|
|
26793
|
+
renewal_sec: conv.task.processing_renewal_sec || 0,
|
|
26794
|
+
});
|
|
26795
|
+
}
|
|
26796
|
+
}
|
|
26640
26797
|
if (conv.invite_id) {
|
|
26641
26798
|
c.setInvite(conv.invite_id, conv.created_at);
|
|
26642
26799
|
}
|
|
@@ -26787,6 +26944,15 @@
|
|
|
26787
26944
|
});
|
|
26788
26945
|
});
|
|
26789
26946
|
};
|
|
26947
|
+
Client.prototype.ping = function () {
|
|
26948
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
26949
|
+
return tslib.__generator(this, function (_a) {
|
|
26950
|
+
return [2 /*return*/, this.request(WEBSOCKET_PING, {
|
|
26951
|
+
ping: 1,
|
|
26952
|
+
})];
|
|
26953
|
+
});
|
|
26954
|
+
});
|
|
26955
|
+
};
|
|
26790
26956
|
Client.prototype.sessionInfo = function () {
|
|
26791
26957
|
return this.connectionInfo.session;
|
|
26792
26958
|
};
|
|
@@ -27147,14 +27313,52 @@
|
|
|
27147
27313
|
this.eventHandler.emit(TASK_EVENT, e.status, task);
|
|
27148
27314
|
}
|
|
27149
27315
|
};
|
|
27316
|
+
Client.prototype.pingServer = function () {
|
|
27317
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
27318
|
+
var t;
|
|
27319
|
+
var _this = this;
|
|
27320
|
+
return tslib.__generator(this, function (_a) {
|
|
27321
|
+
switch (_a.label) {
|
|
27322
|
+
case 0:
|
|
27323
|
+
if (!(this.pingTimer && this.connectionInfo.ping_interval)) return [3 /*break*/, 2];
|
|
27324
|
+
t = setTimeout(function () { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
27325
|
+
return tslib.__generator(this, function (_a) {
|
|
27326
|
+
this.socket.close(3005);
|
|
27327
|
+
return [2 /*return*/];
|
|
27328
|
+
});
|
|
27329
|
+
}); }, +this.connectionInfo.ping_interval / 2);
|
|
27330
|
+
return [4 /*yield*/, this.ping()];
|
|
27331
|
+
case 1:
|
|
27332
|
+
_a.sent();
|
|
27333
|
+
clearTimeout(t);
|
|
27334
|
+
_a.label = 2;
|
|
27335
|
+
case 2:
|
|
27336
|
+
if (this.connectionInfo.ping_interval) {
|
|
27337
|
+
// @ts-ignore
|
|
27338
|
+
this.pingTimer = setTimeout(this.pingServer.bind(this), +this.connectionInfo.ping_interval);
|
|
27339
|
+
}
|
|
27340
|
+
return [2 /*return*/];
|
|
27341
|
+
}
|
|
27342
|
+
});
|
|
27343
|
+
});
|
|
27344
|
+
};
|
|
27150
27345
|
Client.prototype.connected = function (info) {
|
|
27151
27346
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
27152
27347
|
return tslib.__generator(this, function (_a) {
|
|
27153
|
-
|
|
27154
|
-
|
|
27155
|
-
|
|
27348
|
+
switch (_a.label) {
|
|
27349
|
+
case 0:
|
|
27350
|
+
this.connectionInfo = info;
|
|
27351
|
+
if (!info.ping_interval) return [3 /*break*/, 2];
|
|
27352
|
+
return [4 /*yield*/, this.pingServer()];
|
|
27353
|
+
case 1:
|
|
27354
|
+
_a.sent();
|
|
27355
|
+
_a.label = 2;
|
|
27356
|
+
case 2:
|
|
27357
|
+
if (!this.useWebPhone()) {
|
|
27358
|
+
return [2 /*return*/];
|
|
27359
|
+
}
|
|
27360
|
+
return [2 /*return*/, this.registerCallClient(new SipPhone(this.instanceId, this._config.debug))];
|
|
27156
27361
|
}
|
|
27157
|
-
return [2 /*return*/, this.registerCallClient(new SipPhone(this.instanceId, this._config.debug))];
|
|
27158
27362
|
});
|
|
27159
27363
|
});
|
|
27160
27364
|
};
|
|
@@ -27206,6 +27410,9 @@
|
|
|
27206
27410
|
}
|
|
27207
27411
|
_this.socket.on('message', _this.onMessage.bind(_this));
|
|
27208
27412
|
_this.socket.on('close', function (code) {
|
|
27413
|
+
if (_this.pingTimer) {
|
|
27414
|
+
clearTimeout(_this.pingTimer);
|
|
27415
|
+
}
|
|
27209
27416
|
_this.log.error('socket close code: ', code);
|
|
27210
27417
|
_this.eventHandler.off('*');
|
|
27211
27418
|
if (code !== 1000) {
|