webitel-sdk 23.7.7 → 23.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/bundles/index.esm.js +1123 -129
  2. package/bundles/index.esm.js.map +1 -1
  3. package/bundles/index.esm.min.js +1 -1
  4. package/bundles/index.esm.min.js.map +1 -1
  5. package/bundles/index.umd.js +1413 -305
  6. package/bundles/index.umd.js.map +1 -1
  7. package/bundles/index.umd.min.js +1 -1
  8. package/bundles/index.umd.min.js.map +1 -1
  9. package/esm2015/api/contacts-api.js +15 -15
  10. package/esm2015/api/contacts-api.js.map +1 -1
  11. package/esm2015/api/index.js +2 -0
  12. package/esm2015/api/index.js.map +1 -1
  13. package/esm2015/api/logger-action.js +8 -8
  14. package/esm2015/api/logger-service-api.js +8 -8
  15. package/esm2015/api/managers-api.js +984 -0
  16. package/esm2015/api/managers-api.js.map +1 -0
  17. package/esm2015/api/newupdate-of-the-manager-link.js +13 -0
  18. package/esm2015/api/newupdate-of-the-manager-link.js.map +1 -0
  19. package/esm2015/api/newupdate-of-the-manager-link1.js +13 -0
  20. package/esm2015/api/newupdate-of-the-manager-link1.js.map +1 -0
  21. package/esm2015/api.js +1 -0
  22. package/esm2015/api.js.map +1 -1
  23. package/esm5/api/contacts-api.js +15 -15
  24. package/esm5/api/contacts-api.js.map +1 -1
  25. package/esm5/api/index.js +2 -0
  26. package/esm5/api/index.js.map +1 -1
  27. package/esm5/api/logger-action.js +8 -8
  28. package/esm5/api/logger-service-api.js +8 -8
  29. package/esm5/api/managers-api.js +1096 -0
  30. package/esm5/api/managers-api.js.map +1 -0
  31. package/esm5/api/newupdate-of-the-manager-link.js +13 -0
  32. package/esm5/api/newupdate-of-the-manager-link.js.map +1 -0
  33. package/esm5/api/newupdate-of-the-manager-link1.js +13 -0
  34. package/esm5/api/newupdate-of-the-manager-link1.js.map +1 -0
  35. package/esm5/api.js +1 -0
  36. package/esm5/api.js.map +1 -1
  37. package/package.json +1 -1
  38. package/types/api/contacts-api.d.ts +8 -8
  39. package/types/api/contacts-api.d.ts.map +1 -1
  40. package/types/api/engine-agent-today-statistics-response.d.ts +12 -0
  41. package/types/api/engine-agent-today-statistics-response.d.ts.map +1 -1
  42. package/types/api/index.d.ts +2 -0
  43. package/types/api/index.d.ts.map +1 -1
  44. package/types/api/logger-action.d.ts +6 -6
  45. package/types/api/logger-service-api.d.ts +16 -16
  46. package/types/api/managers-api.d.ts +398 -0
  47. package/types/api/managers-api.d.ts.map +1 -0
  48. package/types/api/newupdate-of-the-manager-link.d.ts +32 -0
  49. package/types/api/newupdate-of-the-manager-link.d.ts.map +1 -0
  50. package/types/api/newupdate-of-the-manager-link1.d.ts +32 -0
  51. package/types/api/newupdate-of-the-manager-link1.d.ts.map +1 -0
  52. package/types/api.d.ts +1 -0
  53. package/types/api.d.ts.map +1 -1
@@ -0,0 +1,1096 @@
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
+ * ManagersApi - axios parameter creator
21
+ * @export
22
+ */
23
+ export var ManagersApiAxiosParamCreator = function (configuration) {
24
+ var _this = this;
25
+ return {
26
+ /**
27
+ *
28
+ * @summary Remove the contact\'s manager address link
29
+ * @param {string} contactId Contact ID associated with.
30
+ * @param {string} etag Unique ID to remove.
31
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
32
+ * @param {*} [options] Override http request option.
33
+ * @throws {RequiredError}
34
+ */
35
+ deleteManager: function (contactId, etag, fields, options) {
36
+ if (options === void 0) { options = {}; }
37
+ return __awaiter(_this, void 0, void 0, function () {
38
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
39
+ return __generator(this, function (_b) {
40
+ switch (_b.label) {
41
+ case 0:
42
+ // verify required parameter 'contactId' is not null or undefined
43
+ if (contactId === null || contactId === undefined) {
44
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling deleteManager.');
45
+ }
46
+ // verify required parameter 'etag' is not null or undefined
47
+ if (etag === null || etag === undefined) {
48
+ throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling deleteManager.');
49
+ }
50
+ localVarPath = "/contacts/{contact_id}/managers/{etag}"
51
+ .replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)))
52
+ .replace("{" + 'etag' + "}", encodeURIComponent(String(etag)));
53
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
54
+ if (configuration) {
55
+ baseOptions = configuration.baseOptions;
56
+ }
57
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
58
+ localVarHeaderParameter = {};
59
+ localVarQueryParameter = {};
60
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
61
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
62
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
63
+ case 1:
64
+ _a = _b.sent();
65
+ return [3 /*break*/, 4];
66
+ case 2: return [4 /*yield*/, configuration.apiKey];
67
+ case 3:
68
+ _a = _b.sent();
69
+ _b.label = 4;
70
+ case 4:
71
+ localVarApiKeyValue = _a;
72
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
73
+ _b.label = 5;
74
+ case 5:
75
+ if (fields) {
76
+ localVarQueryParameter['fields'] = fields;
77
+ }
78
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
79
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
80
+ delete localVarUrlObj.search;
81
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
82
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
83
+ return [2 /*return*/, {
84
+ url: globalImportUrl.format(localVarUrlObj),
85
+ options: localVarRequestOptions,
86
+ }];
87
+ }
88
+ });
89
+ });
90
+ },
91
+ /**
92
+ *
93
+ * @summary Remove Contact Managers associations.
94
+ * @param {string} contactId Contact ID associated with.
95
+ * @param {Array<string>} etag Set of unique ID(s) to remove.
96
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ deleteManagers: function (contactId, etag, fields, options) {
101
+ if (options === void 0) { options = {}; }
102
+ return __awaiter(_this, void 0, void 0, function () {
103
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
104
+ return __generator(this, function (_b) {
105
+ switch (_b.label) {
106
+ case 0:
107
+ // verify required parameter 'contactId' is not null or undefined
108
+ if (contactId === null || contactId === undefined) {
109
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling deleteManagers.');
110
+ }
111
+ // verify required parameter 'etag' is not null or undefined
112
+ if (etag === null || etag === undefined) {
113
+ throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling deleteManagers.');
114
+ }
115
+ localVarPath = "/contacts/{contact_id}/managers".replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)));
116
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
117
+ if (configuration) {
118
+ baseOptions = configuration.baseOptions;
119
+ }
120
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
121
+ localVarHeaderParameter = {};
122
+ localVarQueryParameter = {};
123
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
124
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
125
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
126
+ case 1:
127
+ _a = _b.sent();
128
+ return [3 /*break*/, 4];
129
+ case 2: return [4 /*yield*/, configuration.apiKey];
130
+ case 3:
131
+ _a = _b.sent();
132
+ _b.label = 4;
133
+ case 4:
134
+ localVarApiKeyValue = _a;
135
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
136
+ _b.label = 5;
137
+ case 5:
138
+ if (fields) {
139
+ localVarQueryParameter['fields'] = fields;
140
+ }
141
+ if (etag) {
142
+ localVarQueryParameter['etag'] = etag;
143
+ }
144
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
145
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
146
+ delete localVarUrlObj.search;
147
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
148
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
149
+ return [2 /*return*/, {
150
+ url: globalImportUrl.format(localVarUrlObj),
151
+ options: localVarRequestOptions,
152
+ }];
153
+ }
154
+ });
155
+ });
156
+ },
157
+ /**
158
+ *
159
+ * @summary Search the Contact\'s Managers.
160
+ * @param {string} contactId Contact ID associated with.
161
+ * @param {number} [page] Page number of result. offset &#x3D; ((page-1)*size)
162
+ * @param {number} [size] Size of result page. limit &#x3D; (size++)
163
+ * @param {string} [q] Search term: user name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
164
+ * @param {Array<string>} [sort] Sort the result according to fields.
165
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
166
+ * @param {Array<string>} [id] Record(s) with unique ID only.
167
+ * @param {*} [options] Override http request option.
168
+ * @throws {RequiredError}
169
+ */
170
+ listManagers: function (contactId, page, size, q, sort, fields, id, options) {
171
+ if (options === void 0) { options = {}; }
172
+ return __awaiter(_this, void 0, void 0, function () {
173
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
174
+ return __generator(this, function (_b) {
175
+ switch (_b.label) {
176
+ case 0:
177
+ // verify required parameter 'contactId' is not null or undefined
178
+ if (contactId === null || contactId === undefined) {
179
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling listManagers.');
180
+ }
181
+ localVarPath = "/contacts/{contact_id}/managers".replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)));
182
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
183
+ if (configuration) {
184
+ baseOptions = configuration.baseOptions;
185
+ }
186
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
187
+ localVarHeaderParameter = {};
188
+ localVarQueryParameter = {};
189
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
190
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
191
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
192
+ case 1:
193
+ _a = _b.sent();
194
+ return [3 /*break*/, 4];
195
+ case 2: return [4 /*yield*/, configuration.apiKey];
196
+ case 3:
197
+ _a = _b.sent();
198
+ _b.label = 4;
199
+ case 4:
200
+ localVarApiKeyValue = _a;
201
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
202
+ _b.label = 5;
203
+ case 5:
204
+ if (page !== undefined) {
205
+ localVarQueryParameter['page'] = page;
206
+ }
207
+ if (size !== undefined) {
208
+ localVarQueryParameter['size'] = size;
209
+ }
210
+ if (q !== undefined) {
211
+ localVarQueryParameter['q'] = q;
212
+ }
213
+ if (sort) {
214
+ localVarQueryParameter['sort'] = sort;
215
+ }
216
+ if (fields) {
217
+ localVarQueryParameter['fields'] = fields;
218
+ }
219
+ if (id) {
220
+ localVarQueryParameter['id'] = id;
221
+ }
222
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
223
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
224
+ delete localVarUrlObj.search;
225
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
226
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
227
+ return [2 /*return*/, {
228
+ url: globalImportUrl.format(localVarUrlObj),
229
+ options: localVarRequestOptions,
230
+ }];
231
+ }
232
+ });
233
+ });
234
+ },
235
+ /**
236
+ *
237
+ * @summary Locate the manager address link.
238
+ * @param {string} contactId Contact source ID.
239
+ * @param {string} etag Unique manager link IDentifier. Accept: &#x60;etag&#x60; (obsolete+) or &#x60;id&#x60;.
240
+ * @param {Array<string>} [fields] Fields to be retrieved into result.
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ locateManager: function (contactId, etag, fields, options) {
245
+ if (options === void 0) { options = {}; }
246
+ return __awaiter(_this, void 0, void 0, function () {
247
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
248
+ return __generator(this, function (_b) {
249
+ switch (_b.label) {
250
+ case 0:
251
+ // verify required parameter 'contactId' is not null or undefined
252
+ if (contactId === null || contactId === undefined) {
253
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling locateManager.');
254
+ }
255
+ // verify required parameter 'etag' is not null or undefined
256
+ if (etag === null || etag === undefined) {
257
+ throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling locateManager.');
258
+ }
259
+ localVarPath = "/contacts/{contact_id}/managers/{etag}"
260
+ .replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)))
261
+ .replace("{" + 'etag' + "}", encodeURIComponent(String(etag)));
262
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
263
+ if (configuration) {
264
+ baseOptions = configuration.baseOptions;
265
+ }
266
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
267
+ localVarHeaderParameter = {};
268
+ localVarQueryParameter = {};
269
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
270
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
271
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
272
+ case 1:
273
+ _a = _b.sent();
274
+ return [3 /*break*/, 4];
275
+ case 2: return [4 /*yield*/, configuration.apiKey];
276
+ case 3:
277
+ _a = _b.sent();
278
+ _b.label = 4;
279
+ case 4:
280
+ localVarApiKeyValue = _a;
281
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
282
+ _b.label = 5;
283
+ case 5:
284
+ if (fields) {
285
+ localVarQueryParameter['fields'] = fields;
286
+ }
287
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
288
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
289
+ delete localVarUrlObj.search;
290
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
291
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
292
+ return [2 /*return*/, {
293
+ url: globalImportUrl.format(localVarUrlObj),
294
+ options: localVarRequestOptions,
295
+ }];
296
+ }
297
+ });
298
+ });
299
+ },
300
+ /**
301
+ *
302
+ * @summary Associate new Managers to the Contact.
303
+ * @param {string} contactId Link contact ID.
304
+ * @param {Array<WebitelContactsInputManager>} input Array of the unique User(s) to associate with the Contact. Any duplicate of an already linked user{id} will result in an error.
305
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ mergeManagers: function (contactId, input, fields, options) {
310
+ if (options === void 0) { options = {}; }
311
+ return __awaiter(_this, void 0, void 0, function () {
312
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
313
+ return __generator(this, function (_b) {
314
+ switch (_b.label) {
315
+ case 0:
316
+ // verify required parameter 'contactId' is not null or undefined
317
+ if (contactId === null || contactId === undefined) {
318
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling mergeManagers.');
319
+ }
320
+ // verify required parameter 'input' is not null or undefined
321
+ if (input === null || input === undefined) {
322
+ throw new RequiredError('input', 'Required parameter input was null or undefined when calling mergeManagers.');
323
+ }
324
+ localVarPath = "/contacts/{contact_id}/managers".replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)));
325
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
326
+ if (configuration) {
327
+ baseOptions = configuration.baseOptions;
328
+ }
329
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
330
+ localVarHeaderParameter = {};
331
+ localVarQueryParameter = {};
332
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
333
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
334
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
335
+ case 1:
336
+ _a = _b.sent();
337
+ return [3 /*break*/, 4];
338
+ case 2: return [4 /*yield*/, configuration.apiKey];
339
+ case 3:
340
+ _a = _b.sent();
341
+ _b.label = 4;
342
+ case 4:
343
+ localVarApiKeyValue = _a;
344
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
345
+ _b.label = 5;
346
+ case 5:
347
+ if (fields) {
348
+ localVarQueryParameter['fields'] = fields;
349
+ }
350
+ localVarHeaderParameter['Content-Type'] = 'application/json';
351
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
352
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
353
+ delete localVarUrlObj.search;
354
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
355
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
356
+ needsSerialization = typeof input !== 'string' ||
357
+ localVarRequestOptions.headers['Content-Type'] === 'application/json';
358
+ localVarRequestOptions.data = needsSerialization
359
+ ? JSON.stringify(input !== undefined ? input : {})
360
+ : input || '';
361
+ return [2 /*return*/, {
362
+ url: globalImportUrl.format(localVarUrlObj),
363
+ options: localVarRequestOptions,
364
+ }];
365
+ }
366
+ });
367
+ });
368
+ },
369
+ /**
370
+ *
371
+ * @summary Reset Managers to fit the specified final set.
372
+ * @param {string} contactId Contact ID associated with.
373
+ * @param {Array<WebitelContactsInputManager>} input Final set of unique User(s) to be linked with the Contact. User(s) that are already linked with the Contact but not listed here will be removed. The first element will become &#x60;primary&#x60; if no other specified.
374
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ resetManagers: function (contactId, input, fields, options) {
379
+ if (options === void 0) { options = {}; }
380
+ return __awaiter(_this, void 0, void 0, function () {
381
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
382
+ return __generator(this, function (_b) {
383
+ switch (_b.label) {
384
+ case 0:
385
+ // verify required parameter 'contactId' is not null or undefined
386
+ if (contactId === null || contactId === undefined) {
387
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling resetManagers.');
388
+ }
389
+ // verify required parameter 'input' is not null or undefined
390
+ if (input === null || input === undefined) {
391
+ throw new RequiredError('input', 'Required parameter input was null or undefined when calling resetManagers.');
392
+ }
393
+ localVarPath = "/contacts/{contact_id}/managers".replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)));
394
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
395
+ if (configuration) {
396
+ baseOptions = configuration.baseOptions;
397
+ }
398
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
399
+ localVarHeaderParameter = {};
400
+ localVarQueryParameter = {};
401
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
402
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
403
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
404
+ case 1:
405
+ _a = _b.sent();
406
+ return [3 /*break*/, 4];
407
+ case 2: return [4 /*yield*/, configuration.apiKey];
408
+ case 3:
409
+ _a = _b.sent();
410
+ _b.label = 4;
411
+ case 4:
412
+ localVarApiKeyValue = _a;
413
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
414
+ _b.label = 5;
415
+ case 5:
416
+ if (fields) {
417
+ localVarQueryParameter['fields'] = fields;
418
+ }
419
+ localVarHeaderParameter['Content-Type'] = 'application/json';
420
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
421
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
422
+ delete localVarUrlObj.search;
423
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
424
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
425
+ needsSerialization = typeof input !== 'string' ||
426
+ localVarRequestOptions.headers['Content-Type'] === 'application/json';
427
+ localVarRequestOptions.data = needsSerialization
428
+ ? JSON.stringify(input !== undefined ? input : {})
429
+ : input || '';
430
+ return [2 /*return*/, {
431
+ url: globalImportUrl.format(localVarUrlObj),
432
+ options: localVarRequestOptions,
433
+ }];
434
+ }
435
+ });
436
+ });
437
+ },
438
+ /**
439
+ *
440
+ * @summary Update the contact\'s manager address link details
441
+ * @param {string} contactId Link contact ID.
442
+ * @param {string} etag Unique ID of the latest version of an existing resource.
443
+ * @param {NEWUpdateOfTheManagerLink} input
444
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
445
+ * @param {*} [options] Override http request option.
446
+ * @throws {RequiredError}
447
+ */
448
+ updateManager: function (contactId, etag, input, fields, options) {
449
+ if (options === void 0) { options = {}; }
450
+ return __awaiter(_this, void 0, void 0, function () {
451
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
452
+ return __generator(this, function (_b) {
453
+ switch (_b.label) {
454
+ case 0:
455
+ // verify required parameter 'contactId' is not null or undefined
456
+ if (contactId === null || contactId === undefined) {
457
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling updateManager.');
458
+ }
459
+ // verify required parameter 'etag' is not null or undefined
460
+ if (etag === null || etag === undefined) {
461
+ throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling updateManager.');
462
+ }
463
+ // verify required parameter 'input' is not null or undefined
464
+ if (input === null || input === undefined) {
465
+ throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateManager.');
466
+ }
467
+ localVarPath = "/contacts/{contact_id}/managers/{etag}"
468
+ .replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)))
469
+ .replace("{" + 'etag' + "}", encodeURIComponent(String(etag)));
470
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
471
+ if (configuration) {
472
+ baseOptions = configuration.baseOptions;
473
+ }
474
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
475
+ localVarHeaderParameter = {};
476
+ localVarQueryParameter = {};
477
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
478
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
479
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
480
+ case 1:
481
+ _a = _b.sent();
482
+ return [3 /*break*/, 4];
483
+ case 2: return [4 /*yield*/, configuration.apiKey];
484
+ case 3:
485
+ _a = _b.sent();
486
+ _b.label = 4;
487
+ case 4:
488
+ localVarApiKeyValue = _a;
489
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
490
+ _b.label = 5;
491
+ case 5:
492
+ if (fields) {
493
+ localVarQueryParameter['fields'] = fields;
494
+ }
495
+ localVarHeaderParameter['Content-Type'] = 'application/json';
496
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
497
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
498
+ delete localVarUrlObj.search;
499
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
500
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
501
+ needsSerialization = typeof input !== 'string' ||
502
+ localVarRequestOptions.headers['Content-Type'] === 'application/json';
503
+ localVarRequestOptions.data = needsSerialization
504
+ ? JSON.stringify(input !== undefined ? input : {})
505
+ : input || '';
506
+ return [2 /*return*/, {
507
+ url: globalImportUrl.format(localVarUrlObj),
508
+ options: localVarRequestOptions,
509
+ }];
510
+ }
511
+ });
512
+ });
513
+ },
514
+ /**
515
+ *
516
+ * @summary Update the contact\'s manager address link details
517
+ * @param {string} contactId Link contact ID.
518
+ * @param {string} etag Unique ID of the latest version of an existing resource.
519
+ * @param {NEWUpdateOfTheManagerLink1} input
520
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
521
+ * @param {*} [options] Override http request option.
522
+ * @throws {RequiredError}
523
+ */
524
+ updateManager2: function (contactId, etag, input, fields, options) {
525
+ if (options === void 0) { options = {}; }
526
+ return __awaiter(_this, void 0, void 0, function () {
527
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
528
+ return __generator(this, function (_b) {
529
+ switch (_b.label) {
530
+ case 0:
531
+ // verify required parameter 'contactId' is not null or undefined
532
+ if (contactId === null || contactId === undefined) {
533
+ throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling updateManager2.');
534
+ }
535
+ // verify required parameter 'etag' is not null or undefined
536
+ if (etag === null || etag === undefined) {
537
+ throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling updateManager2.');
538
+ }
539
+ // verify required parameter 'input' is not null or undefined
540
+ if (input === null || input === undefined) {
541
+ throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateManager2.');
542
+ }
543
+ localVarPath = "/contacts/{contact_id}/managers/{etag}"
544
+ .replace("{" + 'contact_id' + "}", encodeURIComponent(String(contactId)))
545
+ .replace("{" + 'etag' + "}", encodeURIComponent(String(etag)));
546
+ localVarUrlObj = globalImportUrl.parse(localVarPath, true);
547
+ if (configuration) {
548
+ baseOptions = configuration.baseOptions;
549
+ }
550
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
551
+ localVarHeaderParameter = {};
552
+ localVarQueryParameter = {};
553
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
554
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
555
+ return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
556
+ case 1:
557
+ _a = _b.sent();
558
+ return [3 /*break*/, 4];
559
+ case 2: return [4 /*yield*/, configuration.apiKey];
560
+ case 3:
561
+ _a = _b.sent();
562
+ _b.label = 4;
563
+ case 4:
564
+ localVarApiKeyValue = _a;
565
+ localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
566
+ _b.label = 5;
567
+ case 5:
568
+ if (fields) {
569
+ localVarQueryParameter['fields'] = fields;
570
+ }
571
+ localVarHeaderParameter['Content-Type'] = 'application/json';
572
+ localVarUrlObj.query = __assign(__assign(__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
573
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
574
+ delete localVarUrlObj.search;
575
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
576
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
577
+ needsSerialization = typeof input !== 'string' ||
578
+ localVarRequestOptions.headers['Content-Type'] === 'application/json';
579
+ localVarRequestOptions.data = needsSerialization
580
+ ? JSON.stringify(input !== undefined ? input : {})
581
+ : input || '';
582
+ return [2 /*return*/, {
583
+ url: globalImportUrl.format(localVarUrlObj),
584
+ options: localVarRequestOptions,
585
+ }];
586
+ }
587
+ });
588
+ });
589
+ },
590
+ };
591
+ };
592
+ /**
593
+ * ManagersApi - functional programming interface
594
+ * @export
595
+ */
596
+ export var ManagersApiFp = function (configuration) {
597
+ return {
598
+ /**
599
+ *
600
+ * @summary Remove the contact\'s manager address link
601
+ * @param {string} contactId Contact ID associated with.
602
+ * @param {string} etag Unique ID to remove.
603
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
604
+ * @param {*} [options] Override http request option.
605
+ * @throws {RequiredError}
606
+ */
607
+ deleteManager: function (contactId, etag, fields, options) {
608
+ return __awaiter(this, void 0, void 0, function () {
609
+ var localVarAxiosArgs;
610
+ return __generator(this, function (_a) {
611
+ switch (_a.label) {
612
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).deleteManager(contactId, etag, fields, options)];
613
+ case 1:
614
+ localVarAxiosArgs = _a.sent();
615
+ return [2 /*return*/, function (axios, basePath) {
616
+ if (axios === void 0) { axios = globalAxios; }
617
+ if (basePath === void 0) { basePath = BASE_PATH; }
618
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
619
+ return axios.request(axiosRequestArgs);
620
+ }];
621
+ }
622
+ });
623
+ });
624
+ },
625
+ /**
626
+ *
627
+ * @summary Remove Contact Managers associations.
628
+ * @param {string} contactId Contact ID associated with.
629
+ * @param {Array<string>} etag Set of unique ID(s) to remove.
630
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
631
+ * @param {*} [options] Override http request option.
632
+ * @throws {RequiredError}
633
+ */
634
+ deleteManagers: function (contactId, etag, fields, options) {
635
+ return __awaiter(this, void 0, void 0, function () {
636
+ var localVarAxiosArgs;
637
+ return __generator(this, function (_a) {
638
+ switch (_a.label) {
639
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).deleteManagers(contactId, etag, fields, options)];
640
+ case 1:
641
+ localVarAxiosArgs = _a.sent();
642
+ return [2 /*return*/, function (axios, basePath) {
643
+ if (axios === void 0) { axios = globalAxios; }
644
+ if (basePath === void 0) { basePath = BASE_PATH; }
645
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
646
+ return axios.request(axiosRequestArgs);
647
+ }];
648
+ }
649
+ });
650
+ });
651
+ },
652
+ /**
653
+ *
654
+ * @summary Search the Contact\'s Managers.
655
+ * @param {string} contactId Contact ID associated with.
656
+ * @param {number} [page] Page number of result. offset &#x3D; ((page-1)*size)
657
+ * @param {number} [size] Size of result page. limit &#x3D; (size++)
658
+ * @param {string} [q] Search term: user name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
659
+ * @param {Array<string>} [sort] Sort the result according to fields.
660
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
661
+ * @param {Array<string>} [id] Record(s) with unique ID only.
662
+ * @param {*} [options] Override http request option.
663
+ * @throws {RequiredError}
664
+ */
665
+ listManagers: function (contactId, page, size, q, sort, fields, id, options) {
666
+ return __awaiter(this, void 0, void 0, function () {
667
+ var localVarAxiosArgs;
668
+ return __generator(this, function (_a) {
669
+ switch (_a.label) {
670
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).listManagers(contactId, page, size, q, sort, fields, id, options)];
671
+ case 1:
672
+ localVarAxiosArgs = _a.sent();
673
+ return [2 /*return*/, function (axios, basePath) {
674
+ if (axios === void 0) { axios = globalAxios; }
675
+ if (basePath === void 0) { basePath = BASE_PATH; }
676
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
677
+ return axios.request(axiosRequestArgs);
678
+ }];
679
+ }
680
+ });
681
+ });
682
+ },
683
+ /**
684
+ *
685
+ * @summary Locate the manager address link.
686
+ * @param {string} contactId Contact source ID.
687
+ * @param {string} etag Unique manager link IDentifier. Accept: &#x60;etag&#x60; (obsolete+) or &#x60;id&#x60;.
688
+ * @param {Array<string>} [fields] Fields to be retrieved into result.
689
+ * @param {*} [options] Override http request option.
690
+ * @throws {RequiredError}
691
+ */
692
+ locateManager: function (contactId, etag, fields, options) {
693
+ return __awaiter(this, void 0, void 0, function () {
694
+ var localVarAxiosArgs;
695
+ return __generator(this, function (_a) {
696
+ switch (_a.label) {
697
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).locateManager(contactId, etag, fields, options)];
698
+ case 1:
699
+ localVarAxiosArgs = _a.sent();
700
+ return [2 /*return*/, function (axios, basePath) {
701
+ if (axios === void 0) { axios = globalAxios; }
702
+ if (basePath === void 0) { basePath = BASE_PATH; }
703
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
704
+ return axios.request(axiosRequestArgs);
705
+ }];
706
+ }
707
+ });
708
+ });
709
+ },
710
+ /**
711
+ *
712
+ * @summary Associate new Managers to the Contact.
713
+ * @param {string} contactId Link contact ID.
714
+ * @param {Array<WebitelContactsInputManager>} input Array of the unique User(s) to associate with the Contact. Any duplicate of an already linked user{id} will result in an error.
715
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ */
719
+ mergeManagers: function (contactId, input, fields, options) {
720
+ return __awaiter(this, void 0, void 0, function () {
721
+ var localVarAxiosArgs;
722
+ return __generator(this, function (_a) {
723
+ switch (_a.label) {
724
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).mergeManagers(contactId, input, fields, options)];
725
+ case 1:
726
+ localVarAxiosArgs = _a.sent();
727
+ return [2 /*return*/, function (axios, basePath) {
728
+ if (axios === void 0) { axios = globalAxios; }
729
+ if (basePath === void 0) { basePath = BASE_PATH; }
730
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
731
+ return axios.request(axiosRequestArgs);
732
+ }];
733
+ }
734
+ });
735
+ });
736
+ },
737
+ /**
738
+ *
739
+ * @summary Reset Managers to fit the specified final set.
740
+ * @param {string} contactId Contact ID associated with.
741
+ * @param {Array<WebitelContactsInputManager>} input Final set of unique User(s) to be linked with the Contact. User(s) that are already linked with the Contact but not listed here will be removed. The first element will become &#x60;primary&#x60; if no other specified.
742
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
743
+ * @param {*} [options] Override http request option.
744
+ * @throws {RequiredError}
745
+ */
746
+ resetManagers: function (contactId, input, fields, options) {
747
+ return __awaiter(this, void 0, void 0, function () {
748
+ var localVarAxiosArgs;
749
+ return __generator(this, function (_a) {
750
+ switch (_a.label) {
751
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).resetManagers(contactId, input, fields, options)];
752
+ case 1:
753
+ localVarAxiosArgs = _a.sent();
754
+ return [2 /*return*/, function (axios, basePath) {
755
+ if (axios === void 0) { axios = globalAxios; }
756
+ if (basePath === void 0) { basePath = BASE_PATH; }
757
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
758
+ return axios.request(axiosRequestArgs);
759
+ }];
760
+ }
761
+ });
762
+ });
763
+ },
764
+ /**
765
+ *
766
+ * @summary Update the contact\'s manager address link details
767
+ * @param {string} contactId Link contact ID.
768
+ * @param {string} etag Unique ID of the latest version of an existing resource.
769
+ * @param {NEWUpdateOfTheManagerLink} input
770
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ */
774
+ updateManager: function (contactId, etag, input, fields, options) {
775
+ return __awaiter(this, void 0, void 0, function () {
776
+ var localVarAxiosArgs;
777
+ return __generator(this, function (_a) {
778
+ switch (_a.label) {
779
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).updateManager(contactId, etag, input, fields, options)];
780
+ case 1:
781
+ localVarAxiosArgs = _a.sent();
782
+ return [2 /*return*/, function (axios, basePath) {
783
+ if (axios === void 0) { axios = globalAxios; }
784
+ if (basePath === void 0) { basePath = BASE_PATH; }
785
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
786
+ return axios.request(axiosRequestArgs);
787
+ }];
788
+ }
789
+ });
790
+ });
791
+ },
792
+ /**
793
+ *
794
+ * @summary Update the contact\'s manager address link details
795
+ * @param {string} contactId Link contact ID.
796
+ * @param {string} etag Unique ID of the latest version of an existing resource.
797
+ * @param {NEWUpdateOfTheManagerLink1} input
798
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ updateManager2: function (contactId, etag, input, fields, options) {
803
+ return __awaiter(this, void 0, void 0, function () {
804
+ var localVarAxiosArgs;
805
+ return __generator(this, function (_a) {
806
+ switch (_a.label) {
807
+ case 0: return [4 /*yield*/, ManagersApiAxiosParamCreator(configuration).updateManager2(contactId, etag, input, fields, options)];
808
+ case 1:
809
+ localVarAxiosArgs = _a.sent();
810
+ return [2 /*return*/, function (axios, basePath) {
811
+ if (axios === void 0) { axios = globalAxios; }
812
+ if (basePath === void 0) { basePath = BASE_PATH; }
813
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
814
+ return axios.request(axiosRequestArgs);
815
+ }];
816
+ }
817
+ });
818
+ });
819
+ },
820
+ };
821
+ };
822
+ /**
823
+ * ManagersApi - factory interface
824
+ * @export
825
+ */
826
+ export var ManagersApiFactory = function (configuration, basePath, axios) {
827
+ return {
828
+ /**
829
+ *
830
+ * @summary Remove the contact\'s manager address link
831
+ * @param {string} contactId Contact ID associated with.
832
+ * @param {string} etag Unique ID to remove.
833
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
834
+ * @param {*} [options] Override http request option.
835
+ * @throws {RequiredError}
836
+ */
837
+ deleteManager: function (contactId, etag, fields, options) {
838
+ return ManagersApiFp(configuration)
839
+ .deleteManager(contactId, etag, fields, options)
840
+ .then(function (request) { return request(axios, basePath); });
841
+ },
842
+ /**
843
+ *
844
+ * @summary Remove Contact Managers associations.
845
+ * @param {string} contactId Contact ID associated with.
846
+ * @param {Array<string>} etag Set of unique ID(s) to remove.
847
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
848
+ * @param {*} [options] Override http request option.
849
+ * @throws {RequiredError}
850
+ */
851
+ deleteManagers: function (contactId, etag, fields, options) {
852
+ return ManagersApiFp(configuration)
853
+ .deleteManagers(contactId, etag, fields, options)
854
+ .then(function (request) { return request(axios, basePath); });
855
+ },
856
+ /**
857
+ *
858
+ * @summary Search the Contact\'s Managers.
859
+ * @param {string} contactId Contact ID associated with.
860
+ * @param {number} [page] Page number of result. offset &#x3D; ((page-1)*size)
861
+ * @param {number} [size] Size of result page. limit &#x3D; (size++)
862
+ * @param {string} [q] Search term: user name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
863
+ * @param {Array<string>} [sort] Sort the result according to fields.
864
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
865
+ * @param {Array<string>} [id] Record(s) with unique ID only.
866
+ * @param {*} [options] Override http request option.
867
+ * @throws {RequiredError}
868
+ */
869
+ listManagers: function (contactId, page, size, q, sort, fields, id, options) {
870
+ return ManagersApiFp(configuration)
871
+ .listManagers(contactId, page, size, q, sort, fields, id, options)
872
+ .then(function (request) { return request(axios, basePath); });
873
+ },
874
+ /**
875
+ *
876
+ * @summary Locate the manager address link.
877
+ * @param {string} contactId Contact source ID.
878
+ * @param {string} etag Unique manager link IDentifier. Accept: &#x60;etag&#x60; (obsolete+) or &#x60;id&#x60;.
879
+ * @param {Array<string>} [fields] Fields to be retrieved into result.
880
+ * @param {*} [options] Override http request option.
881
+ * @throws {RequiredError}
882
+ */
883
+ locateManager: function (contactId, etag, fields, options) {
884
+ return ManagersApiFp(configuration)
885
+ .locateManager(contactId, etag, fields, options)
886
+ .then(function (request) { return request(axios, basePath); });
887
+ },
888
+ /**
889
+ *
890
+ * @summary Associate new Managers to the Contact.
891
+ * @param {string} contactId Link contact ID.
892
+ * @param {Array<WebitelContactsInputManager>} input Array of the unique User(s) to associate with the Contact. Any duplicate of an already linked user{id} will result in an error.
893
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
894
+ * @param {*} [options] Override http request option.
895
+ * @throws {RequiredError}
896
+ */
897
+ mergeManagers: function (contactId, input, fields, options) {
898
+ return ManagersApiFp(configuration)
899
+ .mergeManagers(contactId, input, fields, options)
900
+ .then(function (request) { return request(axios, basePath); });
901
+ },
902
+ /**
903
+ *
904
+ * @summary Reset Managers to fit the specified final set.
905
+ * @param {string} contactId Contact ID associated with.
906
+ * @param {Array<WebitelContactsInputManager>} input Final set of unique User(s) to be linked with the Contact. User(s) that are already linked with the Contact but not listed here will be removed. The first element will become &#x60;primary&#x60; if no other specified.
907
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
908
+ * @param {*} [options] Override http request option.
909
+ * @throws {RequiredError}
910
+ */
911
+ resetManagers: function (contactId, input, fields, options) {
912
+ return ManagersApiFp(configuration)
913
+ .resetManagers(contactId, input, fields, options)
914
+ .then(function (request) { return request(axios, basePath); });
915
+ },
916
+ /**
917
+ *
918
+ * @summary Update the contact\'s manager address link details
919
+ * @param {string} contactId Link contact ID.
920
+ * @param {string} etag Unique ID of the latest version of an existing resource.
921
+ * @param {NEWUpdateOfTheManagerLink} input
922
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
923
+ * @param {*} [options] Override http request option.
924
+ * @throws {RequiredError}
925
+ */
926
+ updateManager: function (contactId, etag, input, fields, options) {
927
+ return ManagersApiFp(configuration)
928
+ .updateManager(contactId, etag, input, fields, options)
929
+ .then(function (request) { return request(axios, basePath); });
930
+ },
931
+ /**
932
+ *
933
+ * @summary Update the contact\'s manager address link details
934
+ * @param {string} contactId Link contact ID.
935
+ * @param {string} etag Unique ID of the latest version of an existing resource.
936
+ * @param {NEWUpdateOfTheManagerLink1} input
937
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
938
+ * @param {*} [options] Override http request option.
939
+ * @throws {RequiredError}
940
+ */
941
+ updateManager2: function (contactId, etag, input, fields, options) {
942
+ return ManagersApiFp(configuration)
943
+ .updateManager2(contactId, etag, input, fields, options)
944
+ .then(function (request) { return request(axios, basePath); });
945
+ },
946
+ };
947
+ };
948
+ /**
949
+ * ManagersApi - object-oriented interface
950
+ * @export
951
+ * @class ManagersApi
952
+ * @extends {BaseAPI}
953
+ */
954
+ var ManagersApi = /** @class */ (function (_super) {
955
+ __extends(ManagersApi, _super);
956
+ function ManagersApi() {
957
+ return _super !== null && _super.apply(this, arguments) || this;
958
+ }
959
+ /**
960
+ *
961
+ * @summary Remove the contact\'s manager address link
962
+ * @param {string} contactId Contact ID associated with.
963
+ * @param {string} etag Unique ID to remove.
964
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
965
+ * @param {*} [options] Override http request option.
966
+ * @throws {RequiredError}
967
+ * @memberof ManagersApi
968
+ */
969
+ ManagersApi.prototype.deleteManager = function (contactId, etag, fields, options) {
970
+ var _this = this;
971
+ return ManagersApiFp(this.configuration)
972
+ .deleteManager(contactId, etag, fields, options)
973
+ .then(function (request) { return request(_this.axios, _this.basePath); });
974
+ };
975
+ /**
976
+ *
977
+ * @summary Remove Contact Managers associations.
978
+ * @param {string} contactId Contact ID associated with.
979
+ * @param {Array<string>} etag Set of unique ID(s) to remove.
980
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
981
+ * @param {*} [options] Override http request option.
982
+ * @throws {RequiredError}
983
+ * @memberof ManagersApi
984
+ */
985
+ ManagersApi.prototype.deleteManagers = function (contactId, etag, fields, options) {
986
+ var _this = this;
987
+ return ManagersApiFp(this.configuration)
988
+ .deleteManagers(contactId, etag, fields, options)
989
+ .then(function (request) { return request(_this.axios, _this.basePath); });
990
+ };
991
+ /**
992
+ *
993
+ * @summary Search the Contact\'s Managers.
994
+ * @param {string} contactId Contact ID associated with.
995
+ * @param {number} [page] Page number of result. offset &#x3D; ((page-1)*size)
996
+ * @param {number} [size] Size of result page. limit &#x3D; (size++)
997
+ * @param {string} [q] Search term: user name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
998
+ * @param {Array<string>} [sort] Sort the result according to fields.
999
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
1000
+ * @param {Array<string>} [id] Record(s) with unique ID only.
1001
+ * @param {*} [options] Override http request option.
1002
+ * @throws {RequiredError}
1003
+ * @memberof ManagersApi
1004
+ */
1005
+ ManagersApi.prototype.listManagers = function (contactId, page, size, q, sort, fields, id, options) {
1006
+ var _this = this;
1007
+ return ManagersApiFp(this.configuration)
1008
+ .listManagers(contactId, page, size, q, sort, fields, id, options)
1009
+ .then(function (request) { return request(_this.axios, _this.basePath); });
1010
+ };
1011
+ /**
1012
+ *
1013
+ * @summary Locate the manager address link.
1014
+ * @param {string} contactId Contact source ID.
1015
+ * @param {string} etag Unique manager link IDentifier. Accept: &#x60;etag&#x60; (obsolete+) or &#x60;id&#x60;.
1016
+ * @param {Array<string>} [fields] Fields to be retrieved into result.
1017
+ * @param {*} [options] Override http request option.
1018
+ * @throws {RequiredError}
1019
+ * @memberof ManagersApi
1020
+ */
1021
+ ManagersApi.prototype.locateManager = function (contactId, etag, fields, options) {
1022
+ var _this = this;
1023
+ return ManagersApiFp(this.configuration)
1024
+ .locateManager(contactId, etag, fields, options)
1025
+ .then(function (request) { return request(_this.axios, _this.basePath); });
1026
+ };
1027
+ /**
1028
+ *
1029
+ * @summary Associate new Managers to the Contact.
1030
+ * @param {string} contactId Link contact ID.
1031
+ * @param {Array<WebitelContactsInputManager>} input Array of the unique User(s) to associate with the Contact. Any duplicate of an already linked user{id} will result in an error.
1032
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
1033
+ * @param {*} [options] Override http request option.
1034
+ * @throws {RequiredError}
1035
+ * @memberof ManagersApi
1036
+ */
1037
+ ManagersApi.prototype.mergeManagers = function (contactId, input, fields, options) {
1038
+ var _this = this;
1039
+ return ManagersApiFp(this.configuration)
1040
+ .mergeManagers(contactId, input, fields, options)
1041
+ .then(function (request) { return request(_this.axios, _this.basePath); });
1042
+ };
1043
+ /**
1044
+ *
1045
+ * @summary Reset Managers to fit the specified final set.
1046
+ * @param {string} contactId Contact ID associated with.
1047
+ * @param {Array<WebitelContactsInputManager>} input Final set of unique User(s) to be linked with the Contact. User(s) that are already linked with the Contact but not listed here will be removed. The first element will become &#x60;primary&#x60; if no other specified.
1048
+ * @param {Array<string>} [fields] Fields to be retrieved as a result.
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ * @memberof ManagersApi
1052
+ */
1053
+ ManagersApi.prototype.resetManagers = function (contactId, input, fields, options) {
1054
+ var _this = this;
1055
+ return ManagersApiFp(this.configuration)
1056
+ .resetManagers(contactId, input, fields, options)
1057
+ .then(function (request) { return request(_this.axios, _this.basePath); });
1058
+ };
1059
+ /**
1060
+ *
1061
+ * @summary Update the contact\'s manager address link details
1062
+ * @param {string} contactId Link contact ID.
1063
+ * @param {string} etag Unique ID of the latest version of an existing resource.
1064
+ * @param {NEWUpdateOfTheManagerLink} input
1065
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
1066
+ * @param {*} [options] Override http request option.
1067
+ * @throws {RequiredError}
1068
+ * @memberof ManagersApi
1069
+ */
1070
+ ManagersApi.prototype.updateManager = function (contactId, etag, input, fields, options) {
1071
+ var _this = this;
1072
+ return ManagersApiFp(this.configuration)
1073
+ .updateManager(contactId, etag, input, fields, options)
1074
+ .then(function (request) { return request(_this.axios, _this.basePath); });
1075
+ };
1076
+ /**
1077
+ *
1078
+ * @summary Update the contact\'s manager address link details
1079
+ * @param {string} contactId Link contact ID.
1080
+ * @param {string} etag Unique ID of the latest version of an existing resource.
1081
+ * @param {NEWUpdateOfTheManagerLink1} input
1082
+ * @param {Array<string>} [fields] Fields to be retrieved into result of changes.
1083
+ * @param {*} [options] Override http request option.
1084
+ * @throws {RequiredError}
1085
+ * @memberof ManagersApi
1086
+ */
1087
+ ManagersApi.prototype.updateManager2 = function (contactId, etag, input, fields, options) {
1088
+ var _this = this;
1089
+ return ManagersApiFp(this.configuration)
1090
+ .updateManager2(contactId, etag, input, fields, options)
1091
+ .then(function (request) { return request(_this.axios, _this.basePath); });
1092
+ };
1093
+ return ManagersApi;
1094
+ }(BaseAPI));
1095
+ export { ManagersApi };
1096
+ //# sourceMappingURL=managers-api.js.map