webitel-sdk 23.7.8 → 23.7.10
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 +974 -256
- 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 +796 -7
- 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/config-service-api.js +14 -7
- package/esm2015/api/config-service-api.js.map +1 -1
- package/esm2015/api/engine-create-system-setting-request.js +13 -0
- package/esm2015/api/engine-create-system-setting-request.js.map +1 -0
- package/esm2015/api/engine-list-system-setting.js +13 -0
- package/esm2015/api/engine-list-system-setting.js.map +1 -0
- package/esm2015/api/engine-patch-system-setting-request.js +13 -0
- package/esm2015/api/engine-patch-system-setting-request.js.map +1 -0
- package/esm2015/api/engine-system-setting.js +13 -0
- package/esm2015/api/engine-system-setting.js.map +1 -0
- package/esm2015/api/engine-update-system-setting-request.js +13 -0
- package/esm2015/api/engine-update-system-setting-request.js.map +1 -0
- package/esm2015/api/index.js +6 -0
- package/esm2015/api/index.js.map +1 -1
- package/esm2015/api/logger-available-system-objects.js +23 -0
- package/esm2015/api/logger-available-system-objects.js.map +1 -0
- package/esm2015/api/system-setting-service-api.js +639 -0
- package/esm2015/api/system-setting-service-api.js.map +1 -0
- package/esm2015/api.js +1 -0
- package/esm2015/api.js.map +1 -1
- package/esm5/api/config-service-api.js +14 -7
- package/esm5/api/config-service-api.js.map +1 -1
- package/esm5/api/engine-create-system-setting-request.js +13 -0
- package/esm5/api/engine-create-system-setting-request.js.map +1 -0
- package/esm5/api/engine-list-system-setting.js +13 -0
- package/esm5/api/engine-list-system-setting.js.map +1 -0
- package/esm5/api/engine-patch-system-setting-request.js +13 -0
- package/esm5/api/engine-patch-system-setting-request.js.map +1 -0
- package/esm5/api/engine-system-setting.js +13 -0
- package/esm5/api/engine-system-setting.js.map +1 -0
- package/esm5/api/engine-update-system-setting-request.js +13 -0
- package/esm5/api/engine-update-system-setting-request.js.map +1 -0
- package/esm5/api/index.js +6 -0
- package/esm5/api/index.js.map +1 -1
- package/esm5/api/logger-available-system-objects.js +23 -0
- package/esm5/api/logger-available-system-objects.js.map +1 -0
- package/esm5/api/system-setting-service-api.js +725 -0
- package/esm5/api/system-setting-service-api.js.map +1 -0
- package/esm5/api.js +1 -0
- package/esm5/api.js.map +1 -1
- package/package.json +1 -1
- package/types/api/config-service-api.d.ts +8 -4
- package/types/api/config-service-api.d.ts.map +1 -1
- package/types/api/engine-create-system-setting-request.d.ts +31 -0
- package/types/api/engine-create-system-setting-request.d.ts.map +1 -0
- package/types/api/engine-list-system-setting.d.ts +32 -0
- package/types/api/engine-list-system-setting.d.ts.map +1 -0
- package/types/api/engine-patch-system-setting-request.d.ts +37 -0
- package/types/api/engine-patch-system-setting-request.d.ts.map +1 -0
- package/types/api/engine-system-setting.d.ts +37 -0
- package/types/api/engine-system-setting.d.ts.map +1 -0
- package/types/api/engine-update-system-setting-request.d.ts +31 -0
- package/types/api/engine-update-system-setting-request.d.ts.map +1 -0
- package/types/api/index.d.ts +6 -0
- package/types/api/index.d.ts.map +1 -1
- package/types/api/logger-available-system-objects.d.ts +21 -0
- package/types/api/logger-available-system-objects.d.ts.map +1 -0
- package/types/api/system-setting-service-api.d.ts +244 -0
- package/types/api/system-setting-service-api.d.ts.map +1 -0
- package/types/api.d.ts +1 -0
- package/types/api.d.ts.map +1 -1
|
@@ -0,0 +1,725 @@
|
|
|
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: 23.07.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
|
+
* SystemSettingServiceApi - axios parameter creator
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
export var SystemSettingServiceApiAxiosParamCreator = function (configuration) {
|
|
24
|
+
var _this = this;
|
|
25
|
+
return {
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param {EngineCreateSystemSettingRequest} body
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
*/
|
|
32
|
+
createSystemSetting: 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 createSystemSetting.');
|
|
42
|
+
}
|
|
43
|
+
localVarPath = "/settings";
|
|
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 {*} [options] Override http request option.
|
|
89
|
+
* @throws {RequiredError}
|
|
90
|
+
*/
|
|
91
|
+
deleteSystemSetting: function (id, options) {
|
|
92
|
+
if (options === void 0) { options = {}; }
|
|
93
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
94
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
95
|
+
return __generator(this, function (_b) {
|
|
96
|
+
switch (_b.label) {
|
|
97
|
+
case 0:
|
|
98
|
+
// verify required parameter 'id' is not null or undefined
|
|
99
|
+
if (id === null || id === undefined) {
|
|
100
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling deleteSystemSetting.');
|
|
101
|
+
}
|
|
102
|
+
localVarPath = "/settings/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
103
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
104
|
+
if (configuration) {
|
|
105
|
+
baseOptions = configuration.baseOptions;
|
|
106
|
+
}
|
|
107
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
108
|
+
localVarHeaderParameter = {};
|
|
109
|
+
localVarQueryParameter = {};
|
|
110
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
111
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
112
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
113
|
+
case 1:
|
|
114
|
+
_a = _b.sent();
|
|
115
|
+
return [3 /*break*/, 4];
|
|
116
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
117
|
+
case 3:
|
|
118
|
+
_a = _b.sent();
|
|
119
|
+
_b.label = 4;
|
|
120
|
+
case 4:
|
|
121
|
+
localVarApiKeyValue = _a;
|
|
122
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
123
|
+
_b.label = 5;
|
|
124
|
+
case 5:
|
|
125
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
126
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
127
|
+
delete localVarUrlObj.search;
|
|
128
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
129
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
130
|
+
return [2 /*return*/, {
|
|
131
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
132
|
+
options: localVarRequestOptions,
|
|
133
|
+
}];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @param {number} id
|
|
141
|
+
* @param {EnginePatchSystemSettingRequest} body
|
|
142
|
+
* @param {*} [options] Override http request option.
|
|
143
|
+
* @throws {RequiredError}
|
|
144
|
+
*/
|
|
145
|
+
patchSystemSetting: function (id, body, options) {
|
|
146
|
+
if (options === void 0) { options = {}; }
|
|
147
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
149
|
+
return __generator(this, function (_b) {
|
|
150
|
+
switch (_b.label) {
|
|
151
|
+
case 0:
|
|
152
|
+
// verify required parameter 'id' is not null or undefined
|
|
153
|
+
if (id === null || id === undefined) {
|
|
154
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling patchSystemSetting.');
|
|
155
|
+
}
|
|
156
|
+
// verify required parameter 'body' is not null or undefined
|
|
157
|
+
if (body === null || body === undefined) {
|
|
158
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchSystemSetting.');
|
|
159
|
+
}
|
|
160
|
+
localVarPath = "/settings/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
161
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
162
|
+
if (configuration) {
|
|
163
|
+
baseOptions = configuration.baseOptions;
|
|
164
|
+
}
|
|
165
|
+
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
|
|
166
|
+
localVarHeaderParameter = {};
|
|
167
|
+
localVarQueryParameter = {};
|
|
168
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
169
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
170
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
171
|
+
case 1:
|
|
172
|
+
_a = _b.sent();
|
|
173
|
+
return [3 /*break*/, 4];
|
|
174
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
175
|
+
case 3:
|
|
176
|
+
_a = _b.sent();
|
|
177
|
+
_b.label = 4;
|
|
178
|
+
case 4:
|
|
179
|
+
localVarApiKeyValue = _a;
|
|
180
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
181
|
+
_b.label = 5;
|
|
182
|
+
case 5:
|
|
183
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
184
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
185
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
186
|
+
delete localVarUrlObj.search;
|
|
187
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
188
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
189
|
+
needsSerialization = typeof body !== 'string' ||
|
|
190
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
191
|
+
localVarRequestOptions.data = needsSerialization
|
|
192
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
193
|
+
: body || '';
|
|
194
|
+
return [2 /*return*/, {
|
|
195
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
196
|
+
options: localVarRequestOptions,
|
|
197
|
+
}];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @param {number} id
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
readSystemSetting: function (id, options) {
|
|
209
|
+
if (options === void 0) { options = {}; }
|
|
210
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
211
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
212
|
+
return __generator(this, function (_b) {
|
|
213
|
+
switch (_b.label) {
|
|
214
|
+
case 0:
|
|
215
|
+
// verify required parameter 'id' is not null or undefined
|
|
216
|
+
if (id === null || id === undefined) {
|
|
217
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling readSystemSetting.');
|
|
218
|
+
}
|
|
219
|
+
localVarPath = "/settings/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
220
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
221
|
+
if (configuration) {
|
|
222
|
+
baseOptions = configuration.baseOptions;
|
|
223
|
+
}
|
|
224
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
225
|
+
localVarHeaderParameter = {};
|
|
226
|
+
localVarQueryParameter = {};
|
|
227
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
228
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
229
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
230
|
+
case 1:
|
|
231
|
+
_a = _b.sent();
|
|
232
|
+
return [3 /*break*/, 4];
|
|
233
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
234
|
+
case 3:
|
|
235
|
+
_a = _b.sent();
|
|
236
|
+
_b.label = 4;
|
|
237
|
+
case 4:
|
|
238
|
+
localVarApiKeyValue = _a;
|
|
239
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
240
|
+
_b.label = 5;
|
|
241
|
+
case 5:
|
|
242
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
243
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
244
|
+
delete localVarUrlObj.search;
|
|
245
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
246
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
247
|
+
return [2 /*return*/, {
|
|
248
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
249
|
+
options: localVarRequestOptions,
|
|
250
|
+
}];
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
/**
|
|
256
|
+
*
|
|
257
|
+
* @param {number} [page]
|
|
258
|
+
* @param {number} [size]
|
|
259
|
+
* @param {string} [q]
|
|
260
|
+
* @param {string} [sort]
|
|
261
|
+
* @param {Array<string>} [fields]
|
|
262
|
+
* @param {*} [options] Override http request option.
|
|
263
|
+
* @throws {RequiredError}
|
|
264
|
+
*/
|
|
265
|
+
searchSystemSetting: function (page, size, q, sort, fields, options) {
|
|
266
|
+
if (options === void 0) { options = {}; }
|
|
267
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
268
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
269
|
+
return __generator(this, function (_b) {
|
|
270
|
+
switch (_b.label) {
|
|
271
|
+
case 0:
|
|
272
|
+
localVarPath = "/settings";
|
|
273
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
274
|
+
if (configuration) {
|
|
275
|
+
baseOptions = configuration.baseOptions;
|
|
276
|
+
}
|
|
277
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
278
|
+
localVarHeaderParameter = {};
|
|
279
|
+
localVarQueryParameter = {};
|
|
280
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
281
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
282
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
283
|
+
case 1:
|
|
284
|
+
_a = _b.sent();
|
|
285
|
+
return [3 /*break*/, 4];
|
|
286
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
287
|
+
case 3:
|
|
288
|
+
_a = _b.sent();
|
|
289
|
+
_b.label = 4;
|
|
290
|
+
case 4:
|
|
291
|
+
localVarApiKeyValue = _a;
|
|
292
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
293
|
+
_b.label = 5;
|
|
294
|
+
case 5:
|
|
295
|
+
if (page !== undefined) {
|
|
296
|
+
localVarQueryParameter['page'] = page;
|
|
297
|
+
}
|
|
298
|
+
if (size !== undefined) {
|
|
299
|
+
localVarQueryParameter['size'] = size;
|
|
300
|
+
}
|
|
301
|
+
if (q !== undefined) {
|
|
302
|
+
localVarQueryParameter['q'] = q;
|
|
303
|
+
}
|
|
304
|
+
if (sort !== undefined) {
|
|
305
|
+
localVarQueryParameter['sort'] = sort;
|
|
306
|
+
}
|
|
307
|
+
if (fields) {
|
|
308
|
+
localVarQueryParameter['fields'] = fields;
|
|
309
|
+
}
|
|
310
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
311
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
312
|
+
delete localVarUrlObj.search;
|
|
313
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
314
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
315
|
+
return [2 /*return*/, {
|
|
316
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
317
|
+
options: localVarRequestOptions,
|
|
318
|
+
}];
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
},
|
|
323
|
+
/**
|
|
324
|
+
*
|
|
325
|
+
* @param {number} id
|
|
326
|
+
* @param {EngineUpdateSystemSettingRequest} body
|
|
327
|
+
* @param {*} [options] Override http request option.
|
|
328
|
+
* @throws {RequiredError}
|
|
329
|
+
*/
|
|
330
|
+
updateSystemSetting: function (id, body, options) {
|
|
331
|
+
if (options === void 0) { options = {}; }
|
|
332
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
333
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
334
|
+
return __generator(this, function (_b) {
|
|
335
|
+
switch (_b.label) {
|
|
336
|
+
case 0:
|
|
337
|
+
// verify required parameter 'id' is not null or undefined
|
|
338
|
+
if (id === null || id === undefined) {
|
|
339
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling updateSystemSetting.');
|
|
340
|
+
}
|
|
341
|
+
// verify required parameter 'body' is not null or undefined
|
|
342
|
+
if (body === null || body === undefined) {
|
|
343
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateSystemSetting.');
|
|
344
|
+
}
|
|
345
|
+
localVarPath = "/settings/{id}".replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
346
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
347
|
+
if (configuration) {
|
|
348
|
+
baseOptions = configuration.baseOptions;
|
|
349
|
+
}
|
|
350
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
351
|
+
localVarHeaderParameter = {};
|
|
352
|
+
localVarQueryParameter = {};
|
|
353
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
354
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
355
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
356
|
+
case 1:
|
|
357
|
+
_a = _b.sent();
|
|
358
|
+
return [3 /*break*/, 4];
|
|
359
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
360
|
+
case 3:
|
|
361
|
+
_a = _b.sent();
|
|
362
|
+
_b.label = 4;
|
|
363
|
+
case 4:
|
|
364
|
+
localVarApiKeyValue = _a;
|
|
365
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
366
|
+
_b.label = 5;
|
|
367
|
+
case 5:
|
|
368
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
369
|
+
localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
370
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
371
|
+
delete localVarUrlObj.search;
|
|
372
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
373
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
374
|
+
needsSerialization = typeof body !== 'string' ||
|
|
375
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
376
|
+
localVarRequestOptions.data = needsSerialization
|
|
377
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
378
|
+
: body || '';
|
|
379
|
+
return [2 /*return*/, {
|
|
380
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
381
|
+
options: localVarRequestOptions,
|
|
382
|
+
}];
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
},
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* SystemSettingServiceApi - functional programming interface
|
|
391
|
+
* @export
|
|
392
|
+
*/
|
|
393
|
+
export var SystemSettingServiceApiFp = function (configuration) {
|
|
394
|
+
return {
|
|
395
|
+
/**
|
|
396
|
+
*
|
|
397
|
+
* @param {EngineCreateSystemSettingRequest} body
|
|
398
|
+
* @param {*} [options] Override http request option.
|
|
399
|
+
* @throws {RequiredError}
|
|
400
|
+
*/
|
|
401
|
+
createSystemSetting: function (body, options) {
|
|
402
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
403
|
+
var localVarAxiosArgs;
|
|
404
|
+
return __generator(this, function (_a) {
|
|
405
|
+
switch (_a.label) {
|
|
406
|
+
case 0: return [4 /*yield*/, SystemSettingServiceApiAxiosParamCreator(configuration).createSystemSetting(body, options)];
|
|
407
|
+
case 1:
|
|
408
|
+
localVarAxiosArgs = _a.sent();
|
|
409
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
410
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
411
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
412
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
413
|
+
return axios.request(axiosRequestArgs);
|
|
414
|
+
}];
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
},
|
|
419
|
+
/**
|
|
420
|
+
*
|
|
421
|
+
* @param {number} id
|
|
422
|
+
* @param {*} [options] Override http request option.
|
|
423
|
+
* @throws {RequiredError}
|
|
424
|
+
*/
|
|
425
|
+
deleteSystemSetting: function (id, options) {
|
|
426
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
427
|
+
var localVarAxiosArgs;
|
|
428
|
+
return __generator(this, function (_a) {
|
|
429
|
+
switch (_a.label) {
|
|
430
|
+
case 0: return [4 /*yield*/, SystemSettingServiceApiAxiosParamCreator(configuration).deleteSystemSetting(id, options)];
|
|
431
|
+
case 1:
|
|
432
|
+
localVarAxiosArgs = _a.sent();
|
|
433
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
434
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
435
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
436
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
437
|
+
return axios.request(axiosRequestArgs);
|
|
438
|
+
}];
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
/**
|
|
444
|
+
*
|
|
445
|
+
* @param {number} id
|
|
446
|
+
* @param {EnginePatchSystemSettingRequest} body
|
|
447
|
+
* @param {*} [options] Override http request option.
|
|
448
|
+
* @throws {RequiredError}
|
|
449
|
+
*/
|
|
450
|
+
patchSystemSetting: function (id, body, options) {
|
|
451
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
452
|
+
var localVarAxiosArgs;
|
|
453
|
+
return __generator(this, function (_a) {
|
|
454
|
+
switch (_a.label) {
|
|
455
|
+
case 0: return [4 /*yield*/, SystemSettingServiceApiAxiosParamCreator(configuration).patchSystemSetting(id, body, options)];
|
|
456
|
+
case 1:
|
|
457
|
+
localVarAxiosArgs = _a.sent();
|
|
458
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
459
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
460
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
461
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
462
|
+
return axios.request(axiosRequestArgs);
|
|
463
|
+
}];
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
},
|
|
468
|
+
/**
|
|
469
|
+
*
|
|
470
|
+
* @param {number} id
|
|
471
|
+
* @param {*} [options] Override http request option.
|
|
472
|
+
* @throws {RequiredError}
|
|
473
|
+
*/
|
|
474
|
+
readSystemSetting: function (id, options) {
|
|
475
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
476
|
+
var localVarAxiosArgs;
|
|
477
|
+
return __generator(this, function (_a) {
|
|
478
|
+
switch (_a.label) {
|
|
479
|
+
case 0: return [4 /*yield*/, SystemSettingServiceApiAxiosParamCreator(configuration).readSystemSetting(id, options)];
|
|
480
|
+
case 1:
|
|
481
|
+
localVarAxiosArgs = _a.sent();
|
|
482
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
483
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
484
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
485
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
486
|
+
return axios.request(axiosRequestArgs);
|
|
487
|
+
}];
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
},
|
|
492
|
+
/**
|
|
493
|
+
*
|
|
494
|
+
* @param {number} [page]
|
|
495
|
+
* @param {number} [size]
|
|
496
|
+
* @param {string} [q]
|
|
497
|
+
* @param {string} [sort]
|
|
498
|
+
* @param {Array<string>} [fields]
|
|
499
|
+
* @param {*} [options] Override http request option.
|
|
500
|
+
* @throws {RequiredError}
|
|
501
|
+
*/
|
|
502
|
+
searchSystemSetting: function (page, size, q, sort, fields, options) {
|
|
503
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
504
|
+
var localVarAxiosArgs;
|
|
505
|
+
return __generator(this, function (_a) {
|
|
506
|
+
switch (_a.label) {
|
|
507
|
+
case 0: return [4 /*yield*/, SystemSettingServiceApiAxiosParamCreator(configuration).searchSystemSetting(page, size, q, sort, fields, options)];
|
|
508
|
+
case 1:
|
|
509
|
+
localVarAxiosArgs = _a.sent();
|
|
510
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
511
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
512
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
513
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
514
|
+
return axios.request(axiosRequestArgs);
|
|
515
|
+
}];
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
});
|
|
519
|
+
},
|
|
520
|
+
/**
|
|
521
|
+
*
|
|
522
|
+
* @param {number} id
|
|
523
|
+
* @param {EngineUpdateSystemSettingRequest} body
|
|
524
|
+
* @param {*} [options] Override http request option.
|
|
525
|
+
* @throws {RequiredError}
|
|
526
|
+
*/
|
|
527
|
+
updateSystemSetting: function (id, body, options) {
|
|
528
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
529
|
+
var localVarAxiosArgs;
|
|
530
|
+
return __generator(this, function (_a) {
|
|
531
|
+
switch (_a.label) {
|
|
532
|
+
case 0: return [4 /*yield*/, SystemSettingServiceApiAxiosParamCreator(configuration).updateSystemSetting(id, body, options)];
|
|
533
|
+
case 1:
|
|
534
|
+
localVarAxiosArgs = _a.sent();
|
|
535
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
536
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
537
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
538
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
539
|
+
return axios.request(axiosRequestArgs);
|
|
540
|
+
}];
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
});
|
|
544
|
+
},
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* SystemSettingServiceApi - factory interface
|
|
549
|
+
* @export
|
|
550
|
+
*/
|
|
551
|
+
export var SystemSettingServiceApiFactory = function (configuration, basePath, axios) {
|
|
552
|
+
return {
|
|
553
|
+
/**
|
|
554
|
+
*
|
|
555
|
+
* @param {EngineCreateSystemSettingRequest} body
|
|
556
|
+
* @param {*} [options] Override http request option.
|
|
557
|
+
* @throws {RequiredError}
|
|
558
|
+
*/
|
|
559
|
+
createSystemSetting: function (body, options) {
|
|
560
|
+
return SystemSettingServiceApiFp(configuration)
|
|
561
|
+
.createSystemSetting(body, options)
|
|
562
|
+
.then(function (request) { return request(axios, basePath); });
|
|
563
|
+
},
|
|
564
|
+
/**
|
|
565
|
+
*
|
|
566
|
+
* @param {number} id
|
|
567
|
+
* @param {*} [options] Override http request option.
|
|
568
|
+
* @throws {RequiredError}
|
|
569
|
+
*/
|
|
570
|
+
deleteSystemSetting: function (id, options) {
|
|
571
|
+
return SystemSettingServiceApiFp(configuration)
|
|
572
|
+
.deleteSystemSetting(id, options)
|
|
573
|
+
.then(function (request) { return request(axios, basePath); });
|
|
574
|
+
},
|
|
575
|
+
/**
|
|
576
|
+
*
|
|
577
|
+
* @param {number} id
|
|
578
|
+
* @param {EnginePatchSystemSettingRequest} body
|
|
579
|
+
* @param {*} [options] Override http request option.
|
|
580
|
+
* @throws {RequiredError}
|
|
581
|
+
*/
|
|
582
|
+
patchSystemSetting: function (id, body, options) {
|
|
583
|
+
return SystemSettingServiceApiFp(configuration)
|
|
584
|
+
.patchSystemSetting(id, body, options)
|
|
585
|
+
.then(function (request) { return request(axios, basePath); });
|
|
586
|
+
},
|
|
587
|
+
/**
|
|
588
|
+
*
|
|
589
|
+
* @param {number} id
|
|
590
|
+
* @param {*} [options] Override http request option.
|
|
591
|
+
* @throws {RequiredError}
|
|
592
|
+
*/
|
|
593
|
+
readSystemSetting: function (id, options) {
|
|
594
|
+
return SystemSettingServiceApiFp(configuration)
|
|
595
|
+
.readSystemSetting(id, options)
|
|
596
|
+
.then(function (request) { return request(axios, basePath); });
|
|
597
|
+
},
|
|
598
|
+
/**
|
|
599
|
+
*
|
|
600
|
+
* @param {number} [page]
|
|
601
|
+
* @param {number} [size]
|
|
602
|
+
* @param {string} [q]
|
|
603
|
+
* @param {string} [sort]
|
|
604
|
+
* @param {Array<string>} [fields]
|
|
605
|
+
* @param {*} [options] Override http request option.
|
|
606
|
+
* @throws {RequiredError}
|
|
607
|
+
*/
|
|
608
|
+
searchSystemSetting: function (page, size, q, sort, fields, options) {
|
|
609
|
+
return SystemSettingServiceApiFp(configuration)
|
|
610
|
+
.searchSystemSetting(page, size, q, sort, fields, options)
|
|
611
|
+
.then(function (request) { return request(axios, basePath); });
|
|
612
|
+
},
|
|
613
|
+
/**
|
|
614
|
+
*
|
|
615
|
+
* @param {number} id
|
|
616
|
+
* @param {EngineUpdateSystemSettingRequest} body
|
|
617
|
+
* @param {*} [options] Override http request option.
|
|
618
|
+
* @throws {RequiredError}
|
|
619
|
+
*/
|
|
620
|
+
updateSystemSetting: function (id, body, options) {
|
|
621
|
+
return SystemSettingServiceApiFp(configuration)
|
|
622
|
+
.updateSystemSetting(id, body, options)
|
|
623
|
+
.then(function (request) { return request(axios, basePath); });
|
|
624
|
+
},
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
/**
|
|
628
|
+
* SystemSettingServiceApi - object-oriented interface
|
|
629
|
+
* @export
|
|
630
|
+
* @class SystemSettingServiceApi
|
|
631
|
+
* @extends {BaseAPI}
|
|
632
|
+
*/
|
|
633
|
+
var SystemSettingServiceApi = /** @class */ (function (_super) {
|
|
634
|
+
__extends(SystemSettingServiceApi, _super);
|
|
635
|
+
function SystemSettingServiceApi() {
|
|
636
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
*
|
|
640
|
+
* @param {EngineCreateSystemSettingRequest} body
|
|
641
|
+
* @param {*} [options] Override http request option.
|
|
642
|
+
* @throws {RequiredError}
|
|
643
|
+
* @memberof SystemSettingServiceApi
|
|
644
|
+
*/
|
|
645
|
+
SystemSettingServiceApi.prototype.createSystemSetting = function (body, options) {
|
|
646
|
+
var _this = this;
|
|
647
|
+
return SystemSettingServiceApiFp(this.configuration)
|
|
648
|
+
.createSystemSetting(body, options)
|
|
649
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
650
|
+
};
|
|
651
|
+
/**
|
|
652
|
+
*
|
|
653
|
+
* @param {number} id
|
|
654
|
+
* @param {*} [options] Override http request option.
|
|
655
|
+
* @throws {RequiredError}
|
|
656
|
+
* @memberof SystemSettingServiceApi
|
|
657
|
+
*/
|
|
658
|
+
SystemSettingServiceApi.prototype.deleteSystemSetting = function (id, options) {
|
|
659
|
+
var _this = this;
|
|
660
|
+
return SystemSettingServiceApiFp(this.configuration)
|
|
661
|
+
.deleteSystemSetting(id, options)
|
|
662
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
*
|
|
666
|
+
* @param {number} id
|
|
667
|
+
* @param {EnginePatchSystemSettingRequest} body
|
|
668
|
+
* @param {*} [options] Override http request option.
|
|
669
|
+
* @throws {RequiredError}
|
|
670
|
+
* @memberof SystemSettingServiceApi
|
|
671
|
+
*/
|
|
672
|
+
SystemSettingServiceApi.prototype.patchSystemSetting = function (id, body, options) {
|
|
673
|
+
var _this = this;
|
|
674
|
+
return SystemSettingServiceApiFp(this.configuration)
|
|
675
|
+
.patchSystemSetting(id, body, options)
|
|
676
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
677
|
+
};
|
|
678
|
+
/**
|
|
679
|
+
*
|
|
680
|
+
* @param {number} id
|
|
681
|
+
* @param {*} [options] Override http request option.
|
|
682
|
+
* @throws {RequiredError}
|
|
683
|
+
* @memberof SystemSettingServiceApi
|
|
684
|
+
*/
|
|
685
|
+
SystemSettingServiceApi.prototype.readSystemSetting = function (id, options) {
|
|
686
|
+
var _this = this;
|
|
687
|
+
return SystemSettingServiceApiFp(this.configuration)
|
|
688
|
+
.readSystemSetting(id, options)
|
|
689
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
690
|
+
};
|
|
691
|
+
/**
|
|
692
|
+
*
|
|
693
|
+
* @param {number} [page]
|
|
694
|
+
* @param {number} [size]
|
|
695
|
+
* @param {string} [q]
|
|
696
|
+
* @param {string} [sort]
|
|
697
|
+
* @param {Array<string>} [fields]
|
|
698
|
+
* @param {*} [options] Override http request option.
|
|
699
|
+
* @throws {RequiredError}
|
|
700
|
+
* @memberof SystemSettingServiceApi
|
|
701
|
+
*/
|
|
702
|
+
SystemSettingServiceApi.prototype.searchSystemSetting = function (page, size, q, sort, fields, options) {
|
|
703
|
+
var _this = this;
|
|
704
|
+
return SystemSettingServiceApiFp(this.configuration)
|
|
705
|
+
.searchSystemSetting(page, size, q, sort, fields, options)
|
|
706
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
707
|
+
};
|
|
708
|
+
/**
|
|
709
|
+
*
|
|
710
|
+
* @param {number} id
|
|
711
|
+
* @param {EngineUpdateSystemSettingRequest} body
|
|
712
|
+
* @param {*} [options] Override http request option.
|
|
713
|
+
* @throws {RequiredError}
|
|
714
|
+
* @memberof SystemSettingServiceApi
|
|
715
|
+
*/
|
|
716
|
+
SystemSettingServiceApi.prototype.updateSystemSetting = function (id, body, options) {
|
|
717
|
+
var _this = this;
|
|
718
|
+
return SystemSettingServiceApiFp(this.configuration)
|
|
719
|
+
.updateSystemSetting(id, body, options)
|
|
720
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
721
|
+
};
|
|
722
|
+
return SystemSettingServiceApi;
|
|
723
|
+
}(BaseAPI));
|
|
724
|
+
export { SystemSettingServiceApi };
|
|
725
|
+
//# sourceMappingURL=system-setting-service-api.js.map
|