@libgot/whatsapp-bridge-sdk 1.0.32 → 1.0.34-rc.1

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,140 @@ 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
- * @param {number} [userId]
201
- * @param {number} [currentPage]
202
- * @param {number} [rowsPerPage]
203
- * @param {boolean} [unread]
204
121
  * @param {string} [q]
122
+ * @param {boolean} [unread]
123
+ * @param {number} [rowsPerPage]
124
+ * @param {number} [currentPage]
125
+ * @param {number} [userId]
205
126
  * @param {*} [options] Override http request option.
206
127
  * @throws {RequiredError}
207
128
  */
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];
129
+ getChats: (branchId_1, q_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, ...args_1) => __awaiter(this, [branchId_1, q_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, ...args_1], void 0, function* (branchId, q, unread, rowsPerPage, currentPage, userId, options = {}) {
130
+ // verify required parameter 'branchId' is not null or undefined
131
+ if (branchId === null || branchId === undefined) {
132
+ throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
212
133
  }
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
- },
134
+ const localVarPath = `/api/chats`;
135
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
136
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
137
+ let baseOptions;
138
+ if (configuration) {
139
+ baseOptions = configuration.baseOptions;
140
+ }
141
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
142
+ const localVarHeaderParameter = {};
143
+ const localVarQueryParameter = {};
144
+ if (q !== undefined) {
145
+ localVarQueryParameter['q'] = q;
146
+ }
147
+ if (unread !== undefined) {
148
+ localVarQueryParameter['unread'] = unread;
149
+ }
150
+ if (rowsPerPage !== undefined) {
151
+ localVarQueryParameter['rowsPerPage'] = rowsPerPage;
152
+ }
153
+ if (currentPage !== undefined) {
154
+ localVarQueryParameter['currentPage'] = currentPage;
155
+ }
156
+ if (userId !== undefined) {
157
+ localVarQueryParameter['userId'] = userId;
158
+ }
159
+ if (branchId !== undefined) {
160
+ localVarQueryParameter['branchId'] = branchId;
161
+ }
162
+ const query = new URLSearchParams(localVarUrlObj.search);
163
+ for (const key in localVarQueryParameter) {
164
+ query.set(key, localVarQueryParameter[key]);
165
+ }
166
+ for (const key in options.params) {
167
+ query.set(key, options.params[key]);
168
+ }
169
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
170
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
171
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
172
+ return {
173
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
174
+ options: localVarRequestOptions,
175
+ };
176
+ }),
264
177
  /**
265
178
  *
266
179
  * @param {MarkChatUnreadDto} body
@@ -268,52 +181,44 @@ var ChatsApiAxiosParamCreator = function (configuration) {
268
181
  * @param {*} [options] Override http request option.
269
182
  * @throws {RequiredError}
270
183
  */
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];
184
+ markChatUnread: (body_1, id_1, ...args_1) => __awaiter(this, [body_1, id_1, ...args_1], void 0, function* (body, id, options = {}) {
185
+ // verify required parameter 'body' is not null or undefined
186
+ if (body === null || body === undefined) {
187
+ throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling markChatUnread.');
275
188
  }
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
- },
189
+ // verify required parameter 'id' is not null or undefined
190
+ if (id === null || id === undefined) {
191
+ throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling markChatUnread.');
192
+ }
193
+ const localVarPath = `/api/chats/{id}/mark-chat-unread`
194
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
195
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
196
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
197
+ let baseOptions;
198
+ if (configuration) {
199
+ baseOptions = configuration.baseOptions;
200
+ }
201
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
202
+ const localVarHeaderParameter = {};
203
+ const localVarQueryParameter = {};
204
+ localVarHeaderParameter['Content-Type'] = 'application/json';
205
+ const query = new URLSearchParams(localVarUrlObj.search);
206
+ for (const key in localVarQueryParameter) {
207
+ query.set(key, localVarQueryParameter[key]);
208
+ }
209
+ for (const key in options.params) {
210
+ query.set(key, options.params[key]);
211
+ }
212
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
213
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
214
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
215
+ const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
216
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
217
+ return {
218
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
219
+ options: localVarRequestOptions,
220
+ };
221
+ }),
317
222
  };
318
223
  };
319
224
  exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
@@ -321,7 +226,7 @@ exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
321
226
  * ChatsApi - functional programming interface
322
227
  * @export
323
228
  */
324
- var ChatsApiFp = function (configuration) {
229
+ const ChatsApiFp = function (configuration) {
325
230
  return {
326
231
  /**
327
232
  *
@@ -330,22 +235,13 @@ var ChatsApiFp = function (configuration) {
330
235
  * @param {*} [options] Override http request option.
331
236
  * @throws {RequiredError}
332
237
  */
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
- });
238
+ assignToMe(body, id, options) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToMe(body, id, options);
241
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
242
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
243
+ return axios.request(axiosRequestArgs);
244
+ };
349
245
  });
350
246
  },
351
247
  /**
@@ -354,51 +250,33 @@ var ChatsApiFp = function (configuration) {
354
250
  * @param {*} [options] Override http request option.
355
251
  * @throws {RequiredError}
356
252
  */
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
- });
253
+ getChat(id, options) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, 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
+ };
373
260
  });
374
261
  },
375
262
  /**
376
263
  *
377
264
  * @param {number} branchId
378
- * @param {number} [userId]
379
- * @param {number} [currentPage]
380
- * @param {number} [rowsPerPage]
381
- * @param {boolean} [unread]
382
265
  * @param {string} [q]
266
+ * @param {boolean} [unread]
267
+ * @param {number} [rowsPerPage]
268
+ * @param {number} [currentPage]
269
+ * @param {number} [userId]
383
270
  * @param {*} [options] Override http request option.
384
271
  * @throws {RequiredError}
385
272
  */
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
- });
273
+ getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
274
+ return __awaiter(this, void 0, void 0, function* () {
275
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options);
276
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
277
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
278
+ return axios.request(axiosRequestArgs);
279
+ };
402
280
  });
403
281
  },
404
282
  /**
@@ -408,22 +286,13 @@ var ChatsApiFp = function (configuration) {
408
286
  * @param {*} [options] Override http request option.
409
287
  * @throws {RequiredError}
410
288
  */
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
- });
289
+ markChatUnread(body, id, options) {
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, id, options);
292
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
293
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
294
+ return axios.request(axiosRequestArgs);
295
+ };
427
296
  });
428
297
  },
429
298
  };
@@ -433,7 +302,7 @@ exports.ChatsApiFp = ChatsApiFp;
433
302
  * ChatsApi - factory interface
434
303
  * @export
435
304
  */
436
- var ChatsApiFactory = function (configuration, basePath, axios) {
305
+ const ChatsApiFactory = function (configuration, basePath, axios) {
437
306
  return {
438
307
  /**
439
308
  *
@@ -442,11 +311,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
442
311
  * @param {*} [options] Override http request option.
443
312
  * @throws {RequiredError}
444
313
  */
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
- });
314
+ assignToMe(body, id, options) {
315
+ return __awaiter(this, void 0, void 0, function* () {
316
+ return (0, exports.ChatsApiFp)(configuration).assignToMe(body, id, options).then((request) => request(axios, basePath));
450
317
  });
451
318
  },
452
319
  /**
@@ -455,29 +322,25 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
455
322
  * @param {*} [options] Override http request option.
456
323
  * @throws {RequiredError}
457
324
  */
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
- });
325
+ getChat(id, options) {
326
+ return __awaiter(this, void 0, void 0, function* () {
327
+ return (0, exports.ChatsApiFp)(configuration).getChat(id, options).then((request) => request(axios, basePath));
463
328
  });
464
329
  },
465
330
  /**
466
331
  *
467
332
  * @param {number} branchId
468
- * @param {number} [userId]
469
- * @param {number} [currentPage]
470
- * @param {number} [rowsPerPage]
471
- * @param {boolean} [unread]
472
333
  * @param {string} [q]
334
+ * @param {boolean} [unread]
335
+ * @param {number} [rowsPerPage]
336
+ * @param {number} [currentPage]
337
+ * @param {number} [userId]
473
338
  * @param {*} [options] Override http request option.
474
339
  * @throws {RequiredError}
475
340
  */
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
- });
341
+ getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
342
+ return __awaiter(this, void 0, void 0, function* () {
343
+ return (0, exports.ChatsApiFp)(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(axios, basePath));
481
344
  });
482
345
  },
483
346
  /**
@@ -487,11 +350,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
487
350
  * @param {*} [options] Override http request option.
488
351
  * @throws {RequiredError}
489
352
  */
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
- });
353
+ markChatUnread(body, id, options) {
354
+ return __awaiter(this, void 0, void 0, function* () {
355
+ return (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then((request) => request(axios, basePath));
495
356
  });
496
357
  },
497
358
  };
@@ -503,11 +364,7 @@ exports.ChatsApiFactory = ChatsApiFactory;
503
364
  * @class ChatsApi
504
365
  * @extends {BaseAPI}
505
366
  */
506
- var ChatsApi = /** @class */ (function (_super) {
507
- __extends(ChatsApi, _super);
508
- function ChatsApi() {
509
- return _super !== null && _super.apply(this, arguments) || this;
510
- }
367
+ class ChatsApi extends base_1.BaseAPI {
511
368
  /**
512
369
  *
513
370
  * @param {AssignToMeDto} body
@@ -516,14 +373,11 @@ var ChatsApi = /** @class */ (function (_super) {
516
373
  * @throws {RequiredError}
517
374
  * @memberof ChatsApi
518
375
  */
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
- });
376
+ assignToMe(body, id, options) {
377
+ return __awaiter(this, void 0, void 0, function* () {
378
+ return (0, exports.ChatsApiFp)(this.configuration).assignToMe(body, id, options).then((request) => request(this.axios, this.basePath));
525
379
  });
526
- };
380
+ }
527
381
  /**
528
382
  *
529
383
  * @param {number} id
@@ -531,34 +385,28 @@ var ChatsApi = /** @class */ (function (_super) {
531
385
  * @throws {RequiredError}
532
386
  * @memberof ChatsApi
533
387
  */
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
- });
388
+ getChat(id, options) {
389
+ return __awaiter(this, void 0, void 0, function* () {
390
+ return (0, exports.ChatsApiFp)(this.configuration).getChat(id, options).then((request) => request(this.axios, this.basePath));
540
391
  });
541
- };
392
+ }
542
393
  /**
543
394
  *
544
395
  * @param {number} branchId
545
- * @param {number} [userId]
546
- * @param {number} [currentPage]
547
- * @param {number} [rowsPerPage]
548
- * @param {boolean} [unread]
549
396
  * @param {string} [q]
397
+ * @param {boolean} [unread]
398
+ * @param {number} [rowsPerPage]
399
+ * @param {number} [currentPage]
400
+ * @param {number} [userId]
550
401
  * @param {*} [options] Override http request option.
551
402
  * @throws {RequiredError}
552
403
  * @memberof ChatsApi
553
404
  */
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
- });
405
+ getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
406
+ return __awaiter(this, void 0, void 0, function* () {
407
+ return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(this.axios, this.basePath));
560
408
  });
561
- };
409
+ }
562
410
  /**
563
411
  *
564
412
  * @param {MarkChatUnreadDto} body
@@ -567,14 +415,10 @@ var ChatsApi = /** @class */ (function (_super) {
567
415
  * @throws {RequiredError}
568
416
  * @memberof ChatsApi
569
417
  */
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
- });
418
+ markChatUnread(body, id, options) {
419
+ return __awaiter(this, void 0, void 0, function* () {
420
+ return (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then((request) => request(this.axios, this.basePath));
576
421
  });
577
- };
578
- return ChatsApi;
579
- }(base_1.BaseAPI));
422
+ }
423
+ }
580
424
  exports.ChatsApi = ChatsApi;