webitel-sdk 0.1.92 → 0.1.97
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 +624 -15
- 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 +715 -15
- 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-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/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 +25 -4
- package/esm2015/socket/client.js.map +1 -1
- package/esm2015/socket/conversation.js +40 -9
- package/esm2015/socket/conversation.js.map +1 -1
- package/esm2015/socket/task.js +2 -1
- 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-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/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 +29 -5
- package/esm5/socket/client.js.map +1 -1
- package/esm5/socket/conversation.js +53 -9
- package/esm5/socket/conversation.js.map +1 -1
- package/esm5/socket/task.js +2 -1
- package/esm5/socket/task.js.map +1 -1
- package/package.json +3 -3
- 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-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-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/index.d.ts +5 -0
- package/types/api/index.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/client.d.ts.map +1 -1
- package/types/socket/conversation.d.ts +14 -4
- package/types/socket/conversation.d.ts.map +1 -1
- package/types/socket/task.d.ts.map +1 -1
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
// tslint:disable
|
|
2
|
+
/**
|
|
3
|
+
* Webitel engine API
|
|
4
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 20.12.0
|
|
7
|
+
* Contact: support@webitel.com
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
import { __assign, __awaiter, __extends, __generator } from "tslib";
|
|
14
|
+
import * as globalImportUrl from 'url';
|
|
15
|
+
import globalAxios from 'axios';
|
|
16
|
+
// Some imports not used depending on template conditions
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import { BASE_PATH, BaseAPI, RequiredError, } from '../base';
|
|
19
|
+
/**
|
|
20
|
+
* RoutingChatPlanServiceApi - axios parameter creator
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
export var RoutingChatPlanServiceApiAxiosParamCreator = function (configuration) {
|
|
24
|
+
var _this = this;
|
|
25
|
+
return {
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
*/
|
|
32
|
+
createChatPlan: function (body, options) {
|
|
33
|
+
if (options === void 0) { options = {}; }
|
|
34
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
35
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
36
|
+
return __generator(this, function (_b) {
|
|
37
|
+
switch (_b.label) {
|
|
38
|
+
case 0:
|
|
39
|
+
// verify required parameter 'body' is not null or undefined
|
|
40
|
+
if (body === null || body === undefined) {
|
|
41
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling createChatPlan.');
|
|
42
|
+
}
|
|
43
|
+
localVarPath = "/routing/outbound/chat";
|
|
44
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
45
|
+
if (configuration) {
|
|
46
|
+
baseOptions = configuration.baseOptions;
|
|
47
|
+
}
|
|
48
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
49
|
+
localVarHeaderParameter = {};
|
|
50
|
+
localVarQueryParameter = {};
|
|
51
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
52
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
53
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
54
|
+
case 1:
|
|
55
|
+
_a = _b.sent();
|
|
56
|
+
return [3 /*break*/, 4];
|
|
57
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
58
|
+
case 3:
|
|
59
|
+
_a = _b.sent();
|
|
60
|
+
_b.label = 4;
|
|
61
|
+
case 4:
|
|
62
|
+
localVarApiKeyValue = _a;
|
|
63
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
64
|
+
_b.label = 5;
|
|
65
|
+
case 5:
|
|
66
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
67
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
68
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
69
|
+
delete localVarUrlObj.search;
|
|
70
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
71
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
72
|
+
needsSerialization = typeof body !== 'string' ||
|
|
73
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
74
|
+
localVarRequestOptions.data = needsSerialization
|
|
75
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
76
|
+
: body || '';
|
|
77
|
+
return [2 /*return*/, {
|
|
78
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
79
|
+
options: localVarRequestOptions,
|
|
80
|
+
}];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @param {number} id
|
|
88
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
patchChatPlan: function (id, body, options) {
|
|
93
|
+
if (options === void 0) { options = {}; }
|
|
94
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
95
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
96
|
+
return __generator(this, function (_b) {
|
|
97
|
+
switch (_b.label) {
|
|
98
|
+
case 0:
|
|
99
|
+
// verify required parameter 'id' is not null or undefined
|
|
100
|
+
if (id === null || id === undefined) {
|
|
101
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling patchChatPlan.');
|
|
102
|
+
}
|
|
103
|
+
// verify required parameter 'body' is not null or undefined
|
|
104
|
+
if (body === null || body === undefined) {
|
|
105
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchChatPlan.');
|
|
106
|
+
}
|
|
107
|
+
localVarPath = "/routing/outbound/chat/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
108
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
109
|
+
if (configuration) {
|
|
110
|
+
baseOptions = configuration.baseOptions;
|
|
111
|
+
}
|
|
112
|
+
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
|
|
113
|
+
localVarHeaderParameter = {};
|
|
114
|
+
localVarQueryParameter = {};
|
|
115
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
116
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
117
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
118
|
+
case 1:
|
|
119
|
+
_a = _b.sent();
|
|
120
|
+
return [3 /*break*/, 4];
|
|
121
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
122
|
+
case 3:
|
|
123
|
+
_a = _b.sent();
|
|
124
|
+
_b.label = 4;
|
|
125
|
+
case 4:
|
|
126
|
+
localVarApiKeyValue = _a;
|
|
127
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
128
|
+
_b.label = 5;
|
|
129
|
+
case 5:
|
|
130
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
131
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
132
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
133
|
+
delete localVarUrlObj.search;
|
|
134
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
135
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
136
|
+
needsSerialization = typeof body !== 'string' ||
|
|
137
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
138
|
+
localVarRequestOptions.data = needsSerialization
|
|
139
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
140
|
+
: body || '';
|
|
141
|
+
return [2 /*return*/, {
|
|
142
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
143
|
+
options: localVarRequestOptions,
|
|
144
|
+
}];
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* @param {number} id
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
readChatPlan: function (id, options) {
|
|
156
|
+
if (options === void 0) { options = {}; }
|
|
157
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
158
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
159
|
+
return __generator(this, function (_b) {
|
|
160
|
+
switch (_b.label) {
|
|
161
|
+
case 0:
|
|
162
|
+
// verify required parameter 'id' is not null or undefined
|
|
163
|
+
if (id === null || id === undefined) {
|
|
164
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling readChatPlan.');
|
|
165
|
+
}
|
|
166
|
+
localVarPath = "/routing/outbound/chat/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
167
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
168
|
+
if (configuration) {
|
|
169
|
+
baseOptions = configuration.baseOptions;
|
|
170
|
+
}
|
|
171
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
172
|
+
localVarHeaderParameter = {};
|
|
173
|
+
localVarQueryParameter = {};
|
|
174
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
175
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
176
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
177
|
+
case 1:
|
|
178
|
+
_a = _b.sent();
|
|
179
|
+
return [3 /*break*/, 4];
|
|
180
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
181
|
+
case 3:
|
|
182
|
+
_a = _b.sent();
|
|
183
|
+
_b.label = 4;
|
|
184
|
+
case 4:
|
|
185
|
+
localVarApiKeyValue = _a;
|
|
186
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
187
|
+
_b.label = 5;
|
|
188
|
+
case 5:
|
|
189
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
190
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
191
|
+
delete localVarUrlObj.search;
|
|
192
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
193
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
194
|
+
return [2 /*return*/, {
|
|
195
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
196
|
+
options: localVarRequestOptions,
|
|
197
|
+
}];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @param {number} [page]
|
|
205
|
+
* @param {number} [size]
|
|
206
|
+
* @param {string} [q]
|
|
207
|
+
* @param {string} [sort]
|
|
208
|
+
* @param {Array<string>} [fields]
|
|
209
|
+
* @param {Array<number>} [id]
|
|
210
|
+
* @param {string} [name]
|
|
211
|
+
* @param {boolean} [enabled]
|
|
212
|
+
* @param {*} [options] Override http request option.
|
|
213
|
+
* @throws {RequiredError}
|
|
214
|
+
*/
|
|
215
|
+
searchChatPlan: function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
216
|
+
if (options === void 0) { options = {}; }
|
|
217
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
218
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
219
|
+
return __generator(this, function (_b) {
|
|
220
|
+
switch (_b.label) {
|
|
221
|
+
case 0:
|
|
222
|
+
localVarPath = "/routing/outbound/chat";
|
|
223
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
224
|
+
if (configuration) {
|
|
225
|
+
baseOptions = configuration.baseOptions;
|
|
226
|
+
}
|
|
227
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
228
|
+
localVarHeaderParameter = {};
|
|
229
|
+
localVarQueryParameter = {};
|
|
230
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
231
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
232
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
233
|
+
case 1:
|
|
234
|
+
_a = _b.sent();
|
|
235
|
+
return [3 /*break*/, 4];
|
|
236
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
237
|
+
case 3:
|
|
238
|
+
_a = _b.sent();
|
|
239
|
+
_b.label = 4;
|
|
240
|
+
case 4:
|
|
241
|
+
localVarApiKeyValue = _a;
|
|
242
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
243
|
+
_b.label = 5;
|
|
244
|
+
case 5:
|
|
245
|
+
if (page !== undefined) {
|
|
246
|
+
localVarQueryParameter['page'] = page;
|
|
247
|
+
}
|
|
248
|
+
if (size !== undefined) {
|
|
249
|
+
localVarQueryParameter['size'] = size;
|
|
250
|
+
}
|
|
251
|
+
if (q !== undefined) {
|
|
252
|
+
localVarQueryParameter['q'] = q;
|
|
253
|
+
}
|
|
254
|
+
if (sort !== undefined) {
|
|
255
|
+
localVarQueryParameter['sort'] = sort;
|
|
256
|
+
}
|
|
257
|
+
if (fields) {
|
|
258
|
+
localVarQueryParameter['fields'] = fields;
|
|
259
|
+
}
|
|
260
|
+
if (id) {
|
|
261
|
+
localVarQueryParameter['id'] = id;
|
|
262
|
+
}
|
|
263
|
+
if (name !== undefined) {
|
|
264
|
+
localVarQueryParameter['name'] = name;
|
|
265
|
+
}
|
|
266
|
+
if (enabled !== undefined) {
|
|
267
|
+
localVarQueryParameter['enabled'] = enabled;
|
|
268
|
+
}
|
|
269
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
270
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
271
|
+
delete localVarUrlObj.search;
|
|
272
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
273
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
274
|
+
return [2 /*return*/, {
|
|
275
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
276
|
+
options: localVarRequestOptions,
|
|
277
|
+
}];
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
},
|
|
282
|
+
/**
|
|
283
|
+
*
|
|
284
|
+
* @param {number} id
|
|
285
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
286
|
+
* @param {*} [options] Override http request option.
|
|
287
|
+
* @throws {RequiredError}
|
|
288
|
+
*/
|
|
289
|
+
updateChatPlan: function (id, body, options) {
|
|
290
|
+
if (options === void 0) { options = {}; }
|
|
291
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
292
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
293
|
+
return __generator(this, function (_b) {
|
|
294
|
+
switch (_b.label) {
|
|
295
|
+
case 0:
|
|
296
|
+
// verify required parameter 'id' is not null or undefined
|
|
297
|
+
if (id === null || id === undefined) {
|
|
298
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling updateChatPlan.');
|
|
299
|
+
}
|
|
300
|
+
// verify required parameter 'body' is not null or undefined
|
|
301
|
+
if (body === null || body === undefined) {
|
|
302
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateChatPlan.');
|
|
303
|
+
}
|
|
304
|
+
localVarPath = "/routing/outbound/chat/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
305
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
306
|
+
if (configuration) {
|
|
307
|
+
baseOptions = configuration.baseOptions;
|
|
308
|
+
}
|
|
309
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
310
|
+
localVarHeaderParameter = {};
|
|
311
|
+
localVarQueryParameter = {};
|
|
312
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
313
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
314
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
315
|
+
case 1:
|
|
316
|
+
_a = _b.sent();
|
|
317
|
+
return [3 /*break*/, 4];
|
|
318
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
319
|
+
case 3:
|
|
320
|
+
_a = _b.sent();
|
|
321
|
+
_b.label = 4;
|
|
322
|
+
case 4:
|
|
323
|
+
localVarApiKeyValue = _a;
|
|
324
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
325
|
+
_b.label = 5;
|
|
326
|
+
case 5:
|
|
327
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
328
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
329
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
330
|
+
delete localVarUrlObj.search;
|
|
331
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
332
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
333
|
+
needsSerialization = typeof body !== 'string' ||
|
|
334
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
335
|
+
localVarRequestOptions.data = needsSerialization
|
|
336
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
337
|
+
: body || '';
|
|
338
|
+
return [2 /*return*/, {
|
|
339
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
340
|
+
options: localVarRequestOptions,
|
|
341
|
+
}];
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
},
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* RoutingChatPlanServiceApi - functional programming interface
|
|
350
|
+
* @export
|
|
351
|
+
*/
|
|
352
|
+
export var RoutingChatPlanServiceApiFp = function (configuration) {
|
|
353
|
+
return {
|
|
354
|
+
/**
|
|
355
|
+
*
|
|
356
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
357
|
+
* @param {*} [options] Override http request option.
|
|
358
|
+
* @throws {RequiredError}
|
|
359
|
+
*/
|
|
360
|
+
createChatPlan: function (body, options) {
|
|
361
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
362
|
+
var localVarAxiosArgs;
|
|
363
|
+
return __generator(this, function (_a) {
|
|
364
|
+
switch (_a.label) {
|
|
365
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).createChatPlan(body, options)];
|
|
366
|
+
case 1:
|
|
367
|
+
localVarAxiosArgs = _a.sent();
|
|
368
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
369
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
370
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
371
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
372
|
+
return axios.request(axiosRequestArgs);
|
|
373
|
+
}];
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
},
|
|
378
|
+
/**
|
|
379
|
+
*
|
|
380
|
+
* @param {number} id
|
|
381
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
382
|
+
* @param {*} [options] Override http request option.
|
|
383
|
+
* @throws {RequiredError}
|
|
384
|
+
*/
|
|
385
|
+
patchChatPlan: function (id, body, options) {
|
|
386
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
387
|
+
var localVarAxiosArgs;
|
|
388
|
+
return __generator(this, function (_a) {
|
|
389
|
+
switch (_a.label) {
|
|
390
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).patchChatPlan(id, body, options)];
|
|
391
|
+
case 1:
|
|
392
|
+
localVarAxiosArgs = _a.sent();
|
|
393
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
394
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
395
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
396
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
397
|
+
return axios.request(axiosRequestArgs);
|
|
398
|
+
}];
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
},
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
* @param {number} id
|
|
406
|
+
* @param {*} [options] Override http request option.
|
|
407
|
+
* @throws {RequiredError}
|
|
408
|
+
*/
|
|
409
|
+
readChatPlan: function (id, options) {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
411
|
+
var localVarAxiosArgs;
|
|
412
|
+
return __generator(this, function (_a) {
|
|
413
|
+
switch (_a.label) {
|
|
414
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).readChatPlan(id, options)];
|
|
415
|
+
case 1:
|
|
416
|
+
localVarAxiosArgs = _a.sent();
|
|
417
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
418
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
419
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
420
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
421
|
+
return axios.request(axiosRequestArgs);
|
|
422
|
+
}];
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
},
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @param {number} [page]
|
|
430
|
+
* @param {number} [size]
|
|
431
|
+
* @param {string} [q]
|
|
432
|
+
* @param {string} [sort]
|
|
433
|
+
* @param {Array<string>} [fields]
|
|
434
|
+
* @param {Array<number>} [id]
|
|
435
|
+
* @param {string} [name]
|
|
436
|
+
* @param {boolean} [enabled]
|
|
437
|
+
* @param {*} [options] Override http request option.
|
|
438
|
+
* @throws {RequiredError}
|
|
439
|
+
*/
|
|
440
|
+
searchChatPlan: function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
441
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
442
|
+
var localVarAxiosArgs;
|
|
443
|
+
return __generator(this, function (_a) {
|
|
444
|
+
switch (_a.label) {
|
|
445
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).searchChatPlan(page, size, q, sort, fields, id, name, enabled, options)];
|
|
446
|
+
case 1:
|
|
447
|
+
localVarAxiosArgs = _a.sent();
|
|
448
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
449
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
450
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
451
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
452
|
+
return axios.request(axiosRequestArgs);
|
|
453
|
+
}];
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
});
|
|
457
|
+
},
|
|
458
|
+
/**
|
|
459
|
+
*
|
|
460
|
+
* @param {number} id
|
|
461
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
462
|
+
* @param {*} [options] Override http request option.
|
|
463
|
+
* @throws {RequiredError}
|
|
464
|
+
*/
|
|
465
|
+
updateChatPlan: function (id, body, options) {
|
|
466
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
467
|
+
var localVarAxiosArgs;
|
|
468
|
+
return __generator(this, function (_a) {
|
|
469
|
+
switch (_a.label) {
|
|
470
|
+
case 0: return [4 /*yield*/, RoutingChatPlanServiceApiAxiosParamCreator(configuration).updateChatPlan(id, body, options)];
|
|
471
|
+
case 1:
|
|
472
|
+
localVarAxiosArgs = _a.sent();
|
|
473
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
474
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
475
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
476
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
477
|
+
return axios.request(axiosRequestArgs);
|
|
478
|
+
}];
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
},
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
/**
|
|
486
|
+
* RoutingChatPlanServiceApi - factory interface
|
|
487
|
+
* @export
|
|
488
|
+
*/
|
|
489
|
+
export var RoutingChatPlanServiceApiFactory = function (configuration, basePath, axios) {
|
|
490
|
+
return {
|
|
491
|
+
/**
|
|
492
|
+
*
|
|
493
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
494
|
+
* @param {*} [options] Override http request option.
|
|
495
|
+
* @throws {RequiredError}
|
|
496
|
+
*/
|
|
497
|
+
createChatPlan: function (body, options) {
|
|
498
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
499
|
+
.createChatPlan(body, options)
|
|
500
|
+
.then(function (request) { return request(axios, basePath); });
|
|
501
|
+
},
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
* @param {number} id
|
|
505
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
506
|
+
* @param {*} [options] Override http request option.
|
|
507
|
+
* @throws {RequiredError}
|
|
508
|
+
*/
|
|
509
|
+
patchChatPlan: function (id, body, options) {
|
|
510
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
511
|
+
.patchChatPlan(id, body, options)
|
|
512
|
+
.then(function (request) { return request(axios, basePath); });
|
|
513
|
+
},
|
|
514
|
+
/**
|
|
515
|
+
*
|
|
516
|
+
* @param {number} id
|
|
517
|
+
* @param {*} [options] Override http request option.
|
|
518
|
+
* @throws {RequiredError}
|
|
519
|
+
*/
|
|
520
|
+
readChatPlan: function (id, options) {
|
|
521
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
522
|
+
.readChatPlan(id, options)
|
|
523
|
+
.then(function (request) { return request(axios, basePath); });
|
|
524
|
+
},
|
|
525
|
+
/**
|
|
526
|
+
*
|
|
527
|
+
* @param {number} [page]
|
|
528
|
+
* @param {number} [size]
|
|
529
|
+
* @param {string} [q]
|
|
530
|
+
* @param {string} [sort]
|
|
531
|
+
* @param {Array<string>} [fields]
|
|
532
|
+
* @param {Array<number>} [id]
|
|
533
|
+
* @param {string} [name]
|
|
534
|
+
* @param {boolean} [enabled]
|
|
535
|
+
* @param {*} [options] Override http request option.
|
|
536
|
+
* @throws {RequiredError}
|
|
537
|
+
*/
|
|
538
|
+
searchChatPlan: function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
539
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
540
|
+
.searchChatPlan(page, size, q, sort, fields, id, name, enabled, options)
|
|
541
|
+
.then(function (request) { return request(axios, basePath); });
|
|
542
|
+
},
|
|
543
|
+
/**
|
|
544
|
+
*
|
|
545
|
+
* @param {number} id
|
|
546
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
547
|
+
* @param {*} [options] Override http request option.
|
|
548
|
+
* @throws {RequiredError}
|
|
549
|
+
*/
|
|
550
|
+
updateChatPlan: function (id, body, options) {
|
|
551
|
+
return RoutingChatPlanServiceApiFp(configuration)
|
|
552
|
+
.updateChatPlan(id, body, options)
|
|
553
|
+
.then(function (request) { return request(axios, basePath); });
|
|
554
|
+
},
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
/**
|
|
558
|
+
* RoutingChatPlanServiceApi - object-oriented interface
|
|
559
|
+
* @export
|
|
560
|
+
* @class RoutingChatPlanServiceApi
|
|
561
|
+
* @extends {BaseAPI}
|
|
562
|
+
*/
|
|
563
|
+
var RoutingChatPlanServiceApi = /** @class */ (function (_super) {
|
|
564
|
+
__extends(RoutingChatPlanServiceApi, _super);
|
|
565
|
+
function RoutingChatPlanServiceApi() {
|
|
566
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
*
|
|
570
|
+
* @param {EngineCreateChatPlanRequest} body
|
|
571
|
+
* @param {*} [options] Override http request option.
|
|
572
|
+
* @throws {RequiredError}
|
|
573
|
+
* @memberof RoutingChatPlanServiceApi
|
|
574
|
+
*/
|
|
575
|
+
RoutingChatPlanServiceApi.prototype.createChatPlan = function (body, options) {
|
|
576
|
+
var _this = this;
|
|
577
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
578
|
+
.createChatPlan(body, options)
|
|
579
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
*
|
|
583
|
+
* @param {number} id
|
|
584
|
+
* @param {EnginePatchChatPlanRequest} body
|
|
585
|
+
* @param {*} [options] Override http request option.
|
|
586
|
+
* @throws {RequiredError}
|
|
587
|
+
* @memberof RoutingChatPlanServiceApi
|
|
588
|
+
*/
|
|
589
|
+
RoutingChatPlanServiceApi.prototype.patchChatPlan = function (id, body, options) {
|
|
590
|
+
var _this = this;
|
|
591
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
592
|
+
.patchChatPlan(id, body, options)
|
|
593
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* @param {number} id
|
|
598
|
+
* @param {*} [options] Override http request option.
|
|
599
|
+
* @throws {RequiredError}
|
|
600
|
+
* @memberof RoutingChatPlanServiceApi
|
|
601
|
+
*/
|
|
602
|
+
RoutingChatPlanServiceApi.prototype.readChatPlan = function (id, options) {
|
|
603
|
+
var _this = this;
|
|
604
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
605
|
+
.readChatPlan(id, options)
|
|
606
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
*
|
|
610
|
+
* @param {number} [page]
|
|
611
|
+
* @param {number} [size]
|
|
612
|
+
* @param {string} [q]
|
|
613
|
+
* @param {string} [sort]
|
|
614
|
+
* @param {Array<string>} [fields]
|
|
615
|
+
* @param {Array<number>} [id]
|
|
616
|
+
* @param {string} [name]
|
|
617
|
+
* @param {boolean} [enabled]
|
|
618
|
+
* @param {*} [options] Override http request option.
|
|
619
|
+
* @throws {RequiredError}
|
|
620
|
+
* @memberof RoutingChatPlanServiceApi
|
|
621
|
+
*/
|
|
622
|
+
RoutingChatPlanServiceApi.prototype.searchChatPlan = function (page, size, q, sort, fields, id, name, enabled, options) {
|
|
623
|
+
var _this = this;
|
|
624
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
625
|
+
.searchChatPlan(page, size, q, sort, fields, id, name, enabled, options)
|
|
626
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
*
|
|
630
|
+
* @param {number} id
|
|
631
|
+
* @param {EngineUpdateChatPlanRequest} body
|
|
632
|
+
* @param {*} [options] Override http request option.
|
|
633
|
+
* @throws {RequiredError}
|
|
634
|
+
* @memberof RoutingChatPlanServiceApi
|
|
635
|
+
*/
|
|
636
|
+
RoutingChatPlanServiceApi.prototype.updateChatPlan = function (id, body, options) {
|
|
637
|
+
var _this = this;
|
|
638
|
+
return RoutingChatPlanServiceApiFp(this.configuration)
|
|
639
|
+
.updateChatPlan(id, body, options)
|
|
640
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
641
|
+
};
|
|
642
|
+
return RoutingChatPlanServiceApi;
|
|
643
|
+
}(BaseAPI));
|
|
644
|
+
export { RoutingChatPlanServiceApi };
|
|
645
|
+
//# sourceMappingURL=routing-chat-plan-service-api.js.map
|