@libgot/whatsapp-bridge-sdk 1.0.31 → 1.0.33

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.
@@ -12,32 +12,6 @@
12
12
  * https://github.com/swagger-api/swagger-codegen.git
13
13
  * Do not edit the class manually.
14
14
  */
15
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __assign = (this && this.__assign) || function () {
31
- __assign = Object.assign || function(t) {
32
- for (var s, i = 1, n = arguments.length; i < n; i++) {
33
- s = arguments[i];
34
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
- t[p] = s[p];
36
- }
37
- return t;
38
- };
39
- return __assign.apply(this, arguments);
40
- };
41
15
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
16
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
17
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -47,54 +21,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
47
21
  step((generator = generator.apply(thisArg, _arguments || [])).next());
48
22
  });
49
23
  };
50
- var __generator = (this && this.__generator) || function (thisArg, body) {
51
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
- function verb(n) { return function (v) { return step([n, v]); }; }
54
- function step(op) {
55
- if (f) throw new TypeError("Generator is already executing.");
56
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
- if (y = 0, t) op = [op[0] & 2, t.value];
59
- switch (op[0]) {
60
- case 0: case 1: t = op; break;
61
- case 4: _.label++; return { value: op[1], done: false };
62
- case 5: _.label++; y = op[1]; op = [0]; continue;
63
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
- default:
65
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
- if (t[2]) _.ops.pop();
70
- _.trys.pop(); continue;
71
- }
72
- op = body.call(thisArg, _);
73
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
- }
76
- };
77
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- };
86
24
  Object.defineProperty(exports, "__esModule", { value: true });
87
25
  exports.ChatsApi = exports.ChatsApiFactory = exports.ChatsApiFp = exports.ChatsApiAxiosParamCreator = void 0;
88
- var axios_1 = require("axios");
26
+ const axios_1 = require("axios");
89
27
  // Some imports not used depending on template conditions
90
28
  // @ts-ignore
91
- var base_1 = require("../base");
29
+ const base_1 = require("../base");
92
30
  /**
93
31
  * ChatsApi - axios parameter creator
94
32
  * @export
95
33
  */
96
- var ChatsApiAxiosParamCreator = function (configuration) {
97
- var _this = this;
34
+ const ChatsApiAxiosParamCreator = function (configuration) {
98
35
  return {
99
36
  /**
100
37
  *
@@ -103,164 +40,124 @@ var ChatsApiAxiosParamCreator = function (configuration) {
103
40
  * @param {*} [options] Override http request option.
104
41
  * @throws {RequiredError}
105
42
  */
106
- assignToMe: function (body_1, id_1) {
107
- var args_1 = [];
108
- for (var _i = 2; _i < arguments.length; _i++) {
109
- args_1[_i - 2] = arguments[_i];
43
+ assignToMe: (body_1, id_1, ...args_1) => __awaiter(this, [body_1, id_1, ...args_1], void 0, function* (body, id, options = {}) {
44
+ // verify required parameter 'body' is not null or undefined
45
+ if (body === null || body === undefined) {
46
+ throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling assignToMe.');
110
47
  }
111
- return __awaiter(_this, __spreadArray([body_1, id_1], args_1, true), void 0, function (body, id, options) {
112
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions, needsSerialization;
113
- if (options === void 0) { options = {}; }
114
- return __generator(this, function (_a) {
115
- // verify required parameter 'body' is not null or undefined
116
- if (body === null || body === undefined) {
117
- throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling assignToMe.');
118
- }
119
- // verify required parameter 'id' is not null or undefined
120
- if (id === null || id === undefined) {
121
- throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling assignToMe.');
122
- }
123
- localVarPath = "/api/chats/{id}/assign-to-me"
124
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
125
- localVarUrlObj = new URL(localVarPath, 'https://example.com');
126
- if (configuration) {
127
- baseOptions = configuration.baseOptions;
128
- }
129
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
130
- localVarHeaderParameter = {};
131
- localVarQueryParameter = {};
132
- localVarHeaderParameter['Content-Type'] = 'application/json';
133
- query = new URLSearchParams(localVarUrlObj.search);
134
- for (key in localVarQueryParameter) {
135
- query.set(key, localVarQueryParameter[key]);
136
- }
137
- for (key in options.params) {
138
- query.set(key, options.params[key]);
139
- }
140
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
141
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
142
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
143
- needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
144
- localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
145
- return [2 /*return*/, {
146
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
147
- options: localVarRequestOptions,
148
- }];
149
- });
150
- });
151
- },
48
+ // verify required parameter 'id' is not null or undefined
49
+ if (id === null || id === undefined) {
50
+ throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling assignToMe.');
51
+ }
52
+ const localVarPath = `/api/chats/{id}/assign-to-me`
53
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
54
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
55
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
56
+ let baseOptions;
57
+ if (configuration) {
58
+ baseOptions = configuration.baseOptions;
59
+ }
60
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
61
+ const localVarHeaderParameter = {};
62
+ const localVarQueryParameter = {};
63
+ localVarHeaderParameter['Content-Type'] = 'application/json';
64
+ const query = new URLSearchParams(localVarUrlObj.search);
65
+ for (const key in localVarQueryParameter) {
66
+ query.set(key, localVarQueryParameter[key]);
67
+ }
68
+ for (const key in options.params) {
69
+ query.set(key, options.params[key]);
70
+ }
71
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
72
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
73
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
74
+ const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
75
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
76
+ return {
77
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
78
+ options: localVarRequestOptions,
79
+ };
80
+ }),
152
81
  /**
153
82
  *
154
83
  * @param {number} id
155
84
  * @param {*} [options] Override http request option.
156
85
  * @throws {RequiredError}
157
86
  */
158
- getChat: function (id_1) {
159
- var args_1 = [];
160
- for (var _i = 1; _i < arguments.length; _i++) {
161
- args_1[_i - 1] = arguments[_i];
87
+ getChat: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
88
+ // verify required parameter 'id' is not null or undefined
89
+ if (id === null || id === undefined) {
90
+ throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling getChat.');
162
91
  }
163
- return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
164
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
165
- if (options === void 0) { options = {}; }
166
- return __generator(this, function (_a) {
167
- // verify required parameter 'id' is not null or undefined
168
- if (id === null || id === undefined) {
169
- throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling getChat.');
170
- }
171
- localVarPath = "/api/chats/{id}"
172
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
173
- localVarUrlObj = new URL(localVarPath, 'https://example.com');
174
- if (configuration) {
175
- baseOptions = configuration.baseOptions;
176
- }
177
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
178
- localVarHeaderParameter = {};
179
- localVarQueryParameter = {};
180
- query = new URLSearchParams(localVarUrlObj.search);
181
- for (key in localVarQueryParameter) {
182
- query.set(key, localVarQueryParameter[key]);
183
- }
184
- for (key in options.params) {
185
- query.set(key, options.params[key]);
186
- }
187
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
188
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
189
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
190
- return [2 /*return*/, {
191
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
192
- options: localVarRequestOptions,
193
- }];
194
- });
195
- });
196
- },
92
+ const localVarPath = `/api/chats/{id}`
93
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
94
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
96
+ let baseOptions;
97
+ if (configuration) {
98
+ baseOptions = configuration.baseOptions;
99
+ }
100
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
101
+ const localVarHeaderParameter = {};
102
+ const localVarQueryParameter = {};
103
+ const query = new URLSearchParams(localVarUrlObj.search);
104
+ for (const key in localVarQueryParameter) {
105
+ query.set(key, localVarQueryParameter[key]);
106
+ }
107
+ for (const key in options.params) {
108
+ query.set(key, options.params[key]);
109
+ }
110
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
111
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
112
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
113
+ return {
114
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
115
+ options: localVarRequestOptions,
116
+ };
117
+ }),
197
118
  /**
198
119
  *
199
120
  * @param {number} branchId
200
121
  * @param {number} [userId]
201
- * @param {number} [currentPage]
202
- * @param {number} [rowsPerPage]
203
- * @param {number} [unread]
204
- * @param {string} [q]
205
122
  * @param {*} [options] Override http request option.
206
123
  * @throws {RequiredError}
207
124
  */
208
- getChats: function (branchId_1, userId_1, currentPage_1, rowsPerPage_1, unread_1, q_1) {
209
- var args_1 = [];
210
- for (var _i = 6; _i < arguments.length; _i++) {
211
- args_1[_i - 6] = arguments[_i];
125
+ getChats: (branchId_1, userId_1, ...args_1) => __awaiter(this, [branchId_1, userId_1, ...args_1], void 0, function* (branchId, userId, options = {}) {
126
+ // verify required parameter 'branchId' is not null or undefined
127
+ if (branchId === null || branchId === undefined) {
128
+ throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
212
129
  }
213
- return __awaiter(_this, __spreadArray([branchId_1, userId_1, currentPage_1, rowsPerPage_1, unread_1, q_1], args_1, true), void 0, function (branchId, userId, currentPage, rowsPerPage, unread, q, options) {
214
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
215
- if (options === void 0) { options = {}; }
216
- return __generator(this, function (_a) {
217
- // verify required parameter 'branchId' is not null or undefined
218
- if (branchId === null || branchId === undefined) {
219
- throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
220
- }
221
- localVarPath = "/api/chats";
222
- localVarUrlObj = new URL(localVarPath, 'https://example.com');
223
- if (configuration) {
224
- baseOptions = configuration.baseOptions;
225
- }
226
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
227
- localVarHeaderParameter = {};
228
- localVarQueryParameter = {};
229
- if (branchId !== undefined) {
230
- localVarQueryParameter['branchId'] = branchId;
231
- }
232
- if (userId !== undefined) {
233
- localVarQueryParameter['userId'] = userId;
234
- }
235
- if (currentPage !== undefined) {
236
- localVarQueryParameter['currentPage'] = currentPage;
237
- }
238
- if (rowsPerPage !== undefined) {
239
- localVarQueryParameter['rowsPerPage'] = rowsPerPage;
240
- }
241
- if (unread !== undefined) {
242
- localVarQueryParameter['unread'] = unread;
243
- }
244
- if (q !== undefined) {
245
- localVarQueryParameter['q'] = q;
246
- }
247
- query = new URLSearchParams(localVarUrlObj.search);
248
- for (key in localVarQueryParameter) {
249
- query.set(key, localVarQueryParameter[key]);
250
- }
251
- for (key in options.params) {
252
- query.set(key, options.params[key]);
253
- }
254
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
255
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
256
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
257
- return [2 /*return*/, {
258
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
259
- options: localVarRequestOptions,
260
- }];
261
- });
262
- });
263
- },
130
+ const localVarPath = `/api/chats`;
131
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
132
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
133
+ let baseOptions;
134
+ if (configuration) {
135
+ baseOptions = configuration.baseOptions;
136
+ }
137
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
138
+ const localVarHeaderParameter = {};
139
+ const localVarQueryParameter = {};
140
+ if (branchId !== undefined) {
141
+ localVarQueryParameter['branchId'] = branchId;
142
+ }
143
+ if (userId !== undefined) {
144
+ localVarQueryParameter['userId'] = userId;
145
+ }
146
+ const query = new URLSearchParams(localVarUrlObj.search);
147
+ for (const key in localVarQueryParameter) {
148
+ query.set(key, localVarQueryParameter[key]);
149
+ }
150
+ for (const key in options.params) {
151
+ query.set(key, options.params[key]);
152
+ }
153
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
154
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
155
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
156
+ return {
157
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
158
+ options: localVarRequestOptions,
159
+ };
160
+ }),
264
161
  /**
265
162
  *
266
163
  * @param {MarkChatUnreadDto} body
@@ -268,52 +165,44 @@ var ChatsApiAxiosParamCreator = function (configuration) {
268
165
  * @param {*} [options] Override http request option.
269
166
  * @throws {RequiredError}
270
167
  */
271
- markChatUnread: function (body_1, id_1) {
272
- var args_1 = [];
273
- for (var _i = 2; _i < arguments.length; _i++) {
274
- args_1[_i - 2] = arguments[_i];
168
+ markChatUnread: (body_1, id_1, ...args_1) => __awaiter(this, [body_1, id_1, ...args_1], void 0, function* (body, id, options = {}) {
169
+ // verify required parameter 'body' is not null or undefined
170
+ if (body === null || body === undefined) {
171
+ throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling markChatUnread.');
275
172
  }
276
- return __awaiter(_this, __spreadArray([body_1, id_1], args_1, true), void 0, function (body, id, options) {
277
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions, needsSerialization;
278
- if (options === void 0) { options = {}; }
279
- return __generator(this, function (_a) {
280
- // verify required parameter 'body' is not null or undefined
281
- if (body === null || body === undefined) {
282
- throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling markChatUnread.');
283
- }
284
- // verify required parameter 'id' is not null or undefined
285
- if (id === null || id === undefined) {
286
- throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling markChatUnread.');
287
- }
288
- localVarPath = "/api/chats/{id}/mark-chat-unread"
289
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
290
- localVarUrlObj = new URL(localVarPath, 'https://example.com');
291
- if (configuration) {
292
- baseOptions = configuration.baseOptions;
293
- }
294
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
295
- localVarHeaderParameter = {};
296
- localVarQueryParameter = {};
297
- localVarHeaderParameter['Content-Type'] = 'application/json';
298
- query = new URLSearchParams(localVarUrlObj.search);
299
- for (key in localVarQueryParameter) {
300
- query.set(key, localVarQueryParameter[key]);
301
- }
302
- for (key in options.params) {
303
- query.set(key, options.params[key]);
304
- }
305
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
306
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
307
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
308
- needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
309
- localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
310
- return [2 /*return*/, {
311
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
312
- options: localVarRequestOptions,
313
- }];
314
- });
315
- });
316
- },
173
+ // verify required parameter 'id' is not null or undefined
174
+ if (id === null || id === undefined) {
175
+ throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling markChatUnread.');
176
+ }
177
+ const localVarPath = `/api/chats/{id}/mark-chat-unread`
178
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
179
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
180
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
181
+ let baseOptions;
182
+ if (configuration) {
183
+ baseOptions = configuration.baseOptions;
184
+ }
185
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
186
+ const localVarHeaderParameter = {};
187
+ const localVarQueryParameter = {};
188
+ localVarHeaderParameter['Content-Type'] = 'application/json';
189
+ const query = new URLSearchParams(localVarUrlObj.search);
190
+ for (const key in localVarQueryParameter) {
191
+ query.set(key, localVarQueryParameter[key]);
192
+ }
193
+ for (const key in options.params) {
194
+ query.set(key, options.params[key]);
195
+ }
196
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
198
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
199
+ const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
200
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
201
+ return {
202
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
203
+ options: localVarRequestOptions,
204
+ };
205
+ }),
317
206
  };
318
207
  };
319
208
  exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
@@ -321,7 +210,7 @@ exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
321
210
  * ChatsApi - functional programming interface
322
211
  * @export
323
212
  */
324
- var ChatsApiFp = function (configuration) {
213
+ const ChatsApiFp = function (configuration) {
325
214
  return {
326
215
  /**
327
216
  *
@@ -330,22 +219,13 @@ var ChatsApiFp = function (configuration) {
330
219
  * @param {*} [options] Override http request option.
331
220
  * @throws {RequiredError}
332
221
  */
333
- assignToMe: function (body, id, options) {
334
- return __awaiter(this, void 0, void 0, function () {
335
- var localVarAxiosArgs;
336
- return __generator(this, function (_a) {
337
- switch (_a.label) {
338
- case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToMe(body, id, options)];
339
- case 1:
340
- localVarAxiosArgs = _a.sent();
341
- return [2 /*return*/, function (axios, basePath) {
342
- if (axios === void 0) { axios = axios_1.default; }
343
- if (basePath === void 0) { basePath = base_1.BASE_PATH; }
344
- var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
345
- return axios.request(axiosRequestArgs);
346
- }];
347
- }
348
- });
222
+ assignToMe(body, id, options) {
223
+ return __awaiter(this, void 0, void 0, function* () {
224
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToMe(body, id, options);
225
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
226
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
227
+ return axios.request(axiosRequestArgs);
228
+ };
349
229
  });
350
230
  },
351
231
  /**
@@ -354,51 +234,29 @@ var ChatsApiFp = function (configuration) {
354
234
  * @param {*} [options] Override http request option.
355
235
  * @throws {RequiredError}
356
236
  */
357
- getChat: function (id, options) {
358
- return __awaiter(this, void 0, void 0, function () {
359
- var localVarAxiosArgs;
360
- return __generator(this, function (_a) {
361
- switch (_a.label) {
362
- case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, options)];
363
- case 1:
364
- localVarAxiosArgs = _a.sent();
365
- return [2 /*return*/, function (axios, basePath) {
366
- if (axios === void 0) { axios = axios_1.default; }
367
- if (basePath === void 0) { basePath = base_1.BASE_PATH; }
368
- var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
369
- return axios.request(axiosRequestArgs);
370
- }];
371
- }
372
- });
237
+ getChat(id, options) {
238
+ return __awaiter(this, void 0, void 0, function* () {
239
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, options);
240
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
241
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
242
+ return axios.request(axiosRequestArgs);
243
+ };
373
244
  });
374
245
  },
375
246
  /**
376
247
  *
377
248
  * @param {number} branchId
378
249
  * @param {number} [userId]
379
- * @param {number} [currentPage]
380
- * @param {number} [rowsPerPage]
381
- * @param {number} [unread]
382
- * @param {string} [q]
383
250
  * @param {*} [options] Override http request option.
384
251
  * @throws {RequiredError}
385
252
  */
386
- getChats: function (branchId, userId, currentPage, rowsPerPage, unread, q, options) {
387
- return __awaiter(this, void 0, void 0, function () {
388
- var localVarAxiosArgs;
389
- return __generator(this, function (_a) {
390
- switch (_a.label) {
391
- case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options)];
392
- case 1:
393
- localVarAxiosArgs = _a.sent();
394
- return [2 /*return*/, function (axios, basePath) {
395
- if (axios === void 0) { axios = axios_1.default; }
396
- if (basePath === void 0) { basePath = base_1.BASE_PATH; }
397
- var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
398
- return axios.request(axiosRequestArgs);
399
- }];
400
- }
401
- });
253
+ getChats(branchId, userId, options) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, userId, options);
256
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
257
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
258
+ return axios.request(axiosRequestArgs);
259
+ };
402
260
  });
403
261
  },
404
262
  /**
@@ -408,22 +266,13 @@ var ChatsApiFp = function (configuration) {
408
266
  * @param {*} [options] Override http request option.
409
267
  * @throws {RequiredError}
410
268
  */
411
- markChatUnread: function (body, id, options) {
412
- return __awaiter(this, void 0, void 0, function () {
413
- var localVarAxiosArgs;
414
- return __generator(this, function (_a) {
415
- switch (_a.label) {
416
- case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, id, options)];
417
- case 1:
418
- localVarAxiosArgs = _a.sent();
419
- return [2 /*return*/, function (axios, basePath) {
420
- if (axios === void 0) { axios = axios_1.default; }
421
- if (basePath === void 0) { basePath = base_1.BASE_PATH; }
422
- var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
423
- return axios.request(axiosRequestArgs);
424
- }];
425
- }
426
- });
269
+ markChatUnread(body, id, options) {
270
+ return __awaiter(this, void 0, void 0, function* () {
271
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, id, options);
272
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
273
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
274
+ return axios.request(axiosRequestArgs);
275
+ };
427
276
  });
428
277
  },
429
278
  };
@@ -433,7 +282,7 @@ exports.ChatsApiFp = ChatsApiFp;
433
282
  * ChatsApi - factory interface
434
283
  * @export
435
284
  */
436
- var ChatsApiFactory = function (configuration, basePath, axios) {
285
+ const ChatsApiFactory = function (configuration, basePath, axios) {
437
286
  return {
438
287
  /**
439
288
  *
@@ -442,11 +291,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
442
291
  * @param {*} [options] Override http request option.
443
292
  * @throws {RequiredError}
444
293
  */
445
- assignToMe: function (body, id, options) {
446
- return __awaiter(this, void 0, void 0, function () {
447
- return __generator(this, function (_a) {
448
- return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).assignToMe(body, id, options).then(function (request) { return request(axios, basePath); })];
449
- });
294
+ assignToMe(body, id, options) {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ return (0, exports.ChatsApiFp)(configuration).assignToMe(body, id, options).then((request) => request(axios, basePath));
450
297
  });
451
298
  },
452
299
  /**
@@ -455,29 +302,21 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
455
302
  * @param {*} [options] Override http request option.
456
303
  * @throws {RequiredError}
457
304
  */
458
- getChat: function (id, options) {
459
- return __awaiter(this, void 0, void 0, function () {
460
- return __generator(this, function (_a) {
461
- return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChat(id, options).then(function (request) { return request(axios, basePath); })];
462
- });
305
+ getChat(id, options) {
306
+ return __awaiter(this, void 0, void 0, function* () {
307
+ return (0, exports.ChatsApiFp)(configuration).getChat(id, options).then((request) => request(axios, basePath));
463
308
  });
464
309
  },
465
310
  /**
466
311
  *
467
312
  * @param {number} branchId
468
313
  * @param {number} [userId]
469
- * @param {number} [currentPage]
470
- * @param {number} [rowsPerPage]
471
- * @param {number} [unread]
472
- * @param {string} [q]
473
314
  * @param {*} [options] Override http request option.
474
315
  * @throws {RequiredError}
475
316
  */
476
- getChats: function (branchId, userId, currentPage, rowsPerPage, unread, q, options) {
477
- return __awaiter(this, void 0, void 0, function () {
478
- return __generator(this, function (_a) {
479
- return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options).then(function (request) { return request(axios, basePath); })];
480
- });
317
+ getChats(branchId, userId, options) {
318
+ return __awaiter(this, void 0, void 0, function* () {
319
+ return (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, options).then((request) => request(axios, basePath));
481
320
  });
482
321
  },
483
322
  /**
@@ -487,11 +326,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
487
326
  * @param {*} [options] Override http request option.
488
327
  * @throws {RequiredError}
489
328
  */
490
- markChatUnread: function (body, id, options) {
491
- return __awaiter(this, void 0, void 0, function () {
492
- return __generator(this, function (_a) {
493
- return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then(function (request) { return request(axios, basePath); })];
494
- });
329
+ markChatUnread(body, id, options) {
330
+ return __awaiter(this, void 0, void 0, function* () {
331
+ return (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then((request) => request(axios, basePath));
495
332
  });
496
333
  },
497
334
  };
@@ -503,11 +340,7 @@ exports.ChatsApiFactory = ChatsApiFactory;
503
340
  * @class ChatsApi
504
341
  * @extends {BaseAPI}
505
342
  */
506
- var ChatsApi = /** @class */ (function (_super) {
507
- __extends(ChatsApi, _super);
508
- function ChatsApi() {
509
- return _super !== null && _super.apply(this, arguments) || this;
510
- }
343
+ class ChatsApi extends base_1.BaseAPI {
511
344
  /**
512
345
  *
513
346
  * @param {AssignToMeDto} body
@@ -516,14 +349,11 @@ var ChatsApi = /** @class */ (function (_super) {
516
349
  * @throws {RequiredError}
517
350
  * @memberof ChatsApi
518
351
  */
519
- ChatsApi.prototype.assignToMe = function (body, id, options) {
520
- return __awaiter(this, void 0, void 0, function () {
521
- var _this = this;
522
- return __generator(this, function (_a) {
523
- return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).assignToMe(body, id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
524
- });
352
+ assignToMe(body, id, options) {
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ return (0, exports.ChatsApiFp)(this.configuration).assignToMe(body, id, options).then((request) => request(this.axios, this.basePath));
525
355
  });
526
- };
356
+ }
527
357
  /**
528
358
  *
529
359
  * @param {number} id
@@ -531,34 +361,24 @@ var ChatsApi = /** @class */ (function (_super) {
531
361
  * @throws {RequiredError}
532
362
  * @memberof ChatsApi
533
363
  */
534
- ChatsApi.prototype.getChat = function (id, options) {
535
- return __awaiter(this, void 0, void 0, function () {
536
- var _this = this;
537
- return __generator(this, function (_a) {
538
- return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChat(id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
539
- });
364
+ getChat(id, options) {
365
+ return __awaiter(this, void 0, void 0, function* () {
366
+ return (0, exports.ChatsApiFp)(this.configuration).getChat(id, options).then((request) => request(this.axios, this.basePath));
540
367
  });
541
- };
368
+ }
542
369
  /**
543
370
  *
544
371
  * @param {number} branchId
545
372
  * @param {number} [userId]
546
- * @param {number} [currentPage]
547
- * @param {number} [rowsPerPage]
548
- * @param {number} [unread]
549
- * @param {string} [q]
550
373
  * @param {*} [options] Override http request option.
551
374
  * @throws {RequiredError}
552
375
  * @memberof ChatsApi
553
376
  */
554
- ChatsApi.prototype.getChats = function (branchId, userId, currentPage, rowsPerPage, unread, q, options) {
555
- return __awaiter(this, void 0, void 0, function () {
556
- var _this = this;
557
- return __generator(this, function (_a) {
558
- return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options).then(function (request) { return request(_this.axios, _this.basePath); })];
559
- });
377
+ getChats(branchId, userId, options) {
378
+ return __awaiter(this, void 0, void 0, function* () {
379
+ return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, userId, options).then((request) => request(this.axios, this.basePath));
560
380
  });
561
- };
381
+ }
562
382
  /**
563
383
  *
564
384
  * @param {MarkChatUnreadDto} body
@@ -567,14 +387,10 @@ var ChatsApi = /** @class */ (function (_super) {
567
387
  * @throws {RequiredError}
568
388
  * @memberof ChatsApi
569
389
  */
570
- ChatsApi.prototype.markChatUnread = function (body, id, options) {
571
- return __awaiter(this, void 0, void 0, function () {
572
- var _this = this;
573
- return __generator(this, function (_a) {
574
- return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
575
- });
390
+ markChatUnread(body, id, options) {
391
+ return __awaiter(this, void 0, void 0, function* () {
392
+ return (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then((request) => request(this.axios, this.basePath));
576
393
  });
577
- };
578
- return ChatsApi;
579
- }(base_1.BaseAPI));
394
+ }
395
+ }
580
396
  exports.ChatsApi = ChatsApi;