@libgot/whatsapp-bridge-sdk 1.0.29 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @1.0.29
1
+ ## @1.0.31
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @libgot/whatsapp-bridge-sdk@1.0.29 --save
39
+ npm install @libgot/whatsapp-bridge-sdk@1.0.31 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/apis/chats-api.ts CHANGED
@@ -117,25 +117,19 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
117
117
  /**
118
118
  *
119
119
  * @param {number} branchId
120
- * @param {number} currentPage
121
- * @param {number} rowsPerPage
122
120
  * @param {number} [userId]
121
+ * @param {number} [currentPage]
122
+ * @param {number} [rowsPerPage]
123
+ * @param {number} [unread]
124
+ * @param {string} [q]
123
125
  * @param {*} [options] Override http request option.
124
126
  * @throws {RequiredError}
125
127
  */
126
- getChats: async (branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
128
+ getChats: async (branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
127
129
  // verify required parameter 'branchId' is not null or undefined
128
130
  if (branchId === null || branchId === undefined) {
129
131
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChats.');
130
132
  }
131
- // verify required parameter 'currentPage' is not null or undefined
132
- if (currentPage === null || currentPage === undefined) {
133
- throw new RequiredError('currentPage','Required parameter currentPage was null or undefined when calling getChats.');
134
- }
135
- // verify required parameter 'rowsPerPage' is not null or undefined
136
- if (rowsPerPage === null || rowsPerPage === undefined) {
137
- throw new RequiredError('rowsPerPage','Required parameter rowsPerPage was null or undefined when calling getChats.');
138
- }
139
133
  const localVarPath = `/api/chats`;
140
134
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
141
135
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -163,6 +157,14 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
163
157
  localVarQueryParameter['rowsPerPage'] = rowsPerPage;
164
158
  }
165
159
 
160
+ if (unread !== undefined) {
161
+ localVarQueryParameter['unread'] = unread;
162
+ }
163
+
164
+ if (q !== undefined) {
165
+ localVarQueryParameter['q'] = q;
166
+ }
167
+
166
168
  const query = new URLSearchParams(localVarUrlObj.search);
167
169
  for (const key in localVarQueryParameter) {
168
170
  query.set(key, localVarQueryParameter[key]);
@@ -266,14 +268,16 @@ export const ChatsApiFp = function(configuration?: Configuration) {
266
268
  /**
267
269
  *
268
270
  * @param {number} branchId
269
- * @param {number} currentPage
270
- * @param {number} rowsPerPage
271
271
  * @param {number} [userId]
272
+ * @param {number} [currentPage]
273
+ * @param {number} [rowsPerPage]
274
+ * @param {number} [unread]
275
+ * @param {string} [q]
272
276
  * @param {*} [options] Override http request option.
273
277
  * @throws {RequiredError}
274
278
  */
275
- async getChats(branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>> {
276
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, currentPage, rowsPerPage, userId, options);
279
+ async getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>> {
280
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options);
277
281
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
278
282
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
279
283
  return axios.request(axiosRequestArgs);
@@ -324,14 +328,16 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
324
328
  /**
325
329
  *
326
330
  * @param {number} branchId
327
- * @param {number} currentPage
328
- * @param {number} rowsPerPage
329
331
  * @param {number} [userId]
332
+ * @param {number} [currentPage]
333
+ * @param {number} [rowsPerPage]
334
+ * @param {number} [unread]
335
+ * @param {string} [q]
330
336
  * @param {*} [options] Override http request option.
331
337
  * @throws {RequiredError}
332
338
  */
333
- async getChats(branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>> {
334
- return ChatsApiFp(configuration).getChats(branchId, currentPage, rowsPerPage, userId, options).then((request) => request(axios, basePath));
339
+ async getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>> {
340
+ return ChatsApiFp(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options).then((request) => request(axios, basePath));
335
341
  },
336
342
  /**
337
343
  *
@@ -377,15 +383,17 @@ export class ChatsApi extends BaseAPI {
377
383
  /**
378
384
  *
379
385
  * @param {number} branchId
380
- * @param {number} currentPage
381
- * @param {number} rowsPerPage
382
386
  * @param {number} [userId]
387
+ * @param {number} [currentPage]
388
+ * @param {number} [rowsPerPage]
389
+ * @param {number} [unread]
390
+ * @param {string} [q]
383
391
  * @param {*} [options] Override http request option.
384
392
  * @throws {RequiredError}
385
393
  * @memberof ChatsApi
386
394
  */
387
- public async getChats(branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginationChatResponseDto>> {
388
- return ChatsApiFp(this.configuration).getChats(branchId, currentPage, rowsPerPage, userId, options).then((request) => request(this.axios, this.basePath));
395
+ public async getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginationChatResponseDto>> {
396
+ return ChatsApiFp(this.configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options).then((request) => request(this.axios, this.basePath));
389
397
  }
390
398
  /**
391
399
  *
@@ -39,13 +39,15 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
39
39
  /**
40
40
  *
41
41
  * @param {number} branchId
42
- * @param {number} currentPage
43
- * @param {number} rowsPerPage
44
42
  * @param {number} [userId]
43
+ * @param {number} [currentPage]
44
+ * @param {number} [rowsPerPage]
45
+ * @param {number} [unread]
46
+ * @param {string} [q]
45
47
  * @param {*} [options] Override http request option.
46
48
  * @throws {RequiredError}
47
49
  */
48
- getChats: (branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
50
+ getChats: (branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
49
51
  /**
50
52
  *
51
53
  * @param {MarkChatUnreadDto} body
@@ -78,13 +80,15 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
78
80
  /**
79
81
  *
80
82
  * @param {number} branchId
81
- * @param {number} currentPage
82
- * @param {number} rowsPerPage
83
83
  * @param {number} [userId]
84
+ * @param {number} [currentPage]
85
+ * @param {number} [rowsPerPage]
86
+ * @param {number} [unread]
87
+ * @param {string} [q]
84
88
  * @param {*} [options] Override http request option.
85
89
  * @throws {RequiredError}
86
90
  */
87
- getChats(branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>>;
91
+ getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>>;
88
92
  /**
89
93
  *
90
94
  * @param {MarkChatUnreadDto} body
@@ -117,13 +121,15 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
117
121
  /**
118
122
  *
119
123
  * @param {number} branchId
120
- * @param {number} currentPage
121
- * @param {number} rowsPerPage
122
124
  * @param {number} [userId]
125
+ * @param {number} [currentPage]
126
+ * @param {number} [rowsPerPage]
127
+ * @param {number} [unread]
128
+ * @param {string} [q]
123
129
  * @param {*} [options] Override http request option.
124
130
  * @throws {RequiredError}
125
131
  */
126
- getChats(branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
132
+ getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
127
133
  /**
128
134
  *
129
135
  * @param {MarkChatUnreadDto} body
@@ -160,14 +166,16 @@ export declare class ChatsApi extends BaseAPI {
160
166
  /**
161
167
  *
162
168
  * @param {number} branchId
163
- * @param {number} currentPage
164
- * @param {number} rowsPerPage
165
169
  * @param {number} [userId]
170
+ * @param {number} [currentPage]
171
+ * @param {number} [rowsPerPage]
172
+ * @param {number} [unread]
173
+ * @param {string} [q]
166
174
  * @param {*} [options] Override http request option.
167
175
  * @throws {RequiredError}
168
176
  * @memberof ChatsApi
169
177
  */
170
- getChats(branchId: number, currentPage: number, rowsPerPage: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
178
+ getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, q?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
171
179
  /**
172
180
  *
173
181
  * @param {MarkChatUnreadDto} body
@@ -197,18 +197,20 @@ var ChatsApiAxiosParamCreator = function (configuration) {
197
197
  /**
198
198
  *
199
199
  * @param {number} branchId
200
- * @param {number} currentPage
201
- * @param {number} rowsPerPage
202
200
  * @param {number} [userId]
201
+ * @param {number} [currentPage]
202
+ * @param {number} [rowsPerPage]
203
+ * @param {number} [unread]
204
+ * @param {string} [q]
203
205
  * @param {*} [options] Override http request option.
204
206
  * @throws {RequiredError}
205
207
  */
206
- getChats: function (branchId_1, currentPage_1, rowsPerPage_1, userId_1) {
208
+ getChats: function (branchId_1, userId_1, currentPage_1, rowsPerPage_1, unread_1, q_1) {
207
209
  var args_1 = [];
208
- for (var _i = 4; _i < arguments.length; _i++) {
209
- args_1[_i - 4] = arguments[_i];
210
+ for (var _i = 6; _i < arguments.length; _i++) {
211
+ args_1[_i - 6] = arguments[_i];
210
212
  }
211
- return __awaiter(_this, __spreadArray([branchId_1, currentPage_1, rowsPerPage_1, userId_1], args_1, true), void 0, function (branchId, currentPage, rowsPerPage, userId, options) {
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) {
212
214
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
213
215
  if (options === void 0) { options = {}; }
214
216
  return __generator(this, function (_a) {
@@ -216,14 +218,6 @@ var ChatsApiAxiosParamCreator = function (configuration) {
216
218
  if (branchId === null || branchId === undefined) {
217
219
  throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
218
220
  }
219
- // verify required parameter 'currentPage' is not null or undefined
220
- if (currentPage === null || currentPage === undefined) {
221
- throw new base_1.RequiredError('currentPage', 'Required parameter currentPage was null or undefined when calling getChats.');
222
- }
223
- // verify required parameter 'rowsPerPage' is not null or undefined
224
- if (rowsPerPage === null || rowsPerPage === undefined) {
225
- throw new base_1.RequiredError('rowsPerPage', 'Required parameter rowsPerPage was null or undefined when calling getChats.');
226
- }
227
221
  localVarPath = "/api/chats";
228
222
  localVarUrlObj = new URL(localVarPath, 'https://example.com');
229
223
  if (configuration) {
@@ -244,6 +238,12 @@ var ChatsApiAxiosParamCreator = function (configuration) {
244
238
  if (rowsPerPage !== undefined) {
245
239
  localVarQueryParameter['rowsPerPage'] = rowsPerPage;
246
240
  }
241
+ if (unread !== undefined) {
242
+ localVarQueryParameter['unread'] = unread;
243
+ }
244
+ if (q !== undefined) {
245
+ localVarQueryParameter['q'] = q;
246
+ }
247
247
  query = new URLSearchParams(localVarUrlObj.search);
248
248
  for (key in localVarQueryParameter) {
249
249
  query.set(key, localVarQueryParameter[key]);
@@ -375,18 +375,20 @@ var ChatsApiFp = function (configuration) {
375
375
  /**
376
376
  *
377
377
  * @param {number} branchId
378
- * @param {number} currentPage
379
- * @param {number} rowsPerPage
380
378
  * @param {number} [userId]
379
+ * @param {number} [currentPage]
380
+ * @param {number} [rowsPerPage]
381
+ * @param {number} [unread]
382
+ * @param {string} [q]
381
383
  * @param {*} [options] Override http request option.
382
384
  * @throws {RequiredError}
383
385
  */
384
- getChats: function (branchId, currentPage, rowsPerPage, userId, options) {
386
+ getChats: function (branchId, userId, currentPage, rowsPerPage, unread, q, options) {
385
387
  return __awaiter(this, void 0, void 0, function () {
386
388
  var localVarAxiosArgs;
387
389
  return __generator(this, function (_a) {
388
390
  switch (_a.label) {
389
- case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, currentPage, rowsPerPage, userId, options)];
391
+ case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options)];
390
392
  case 1:
391
393
  localVarAxiosArgs = _a.sent();
392
394
  return [2 /*return*/, function (axios, basePath) {
@@ -463,16 +465,18 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
463
465
  /**
464
466
  *
465
467
  * @param {number} branchId
466
- * @param {number} currentPage
467
- * @param {number} rowsPerPage
468
468
  * @param {number} [userId]
469
+ * @param {number} [currentPage]
470
+ * @param {number} [rowsPerPage]
471
+ * @param {number} [unread]
472
+ * @param {string} [q]
469
473
  * @param {*} [options] Override http request option.
470
474
  * @throws {RequiredError}
471
475
  */
472
- getChats: function (branchId, currentPage, rowsPerPage, userId, options) {
476
+ getChats: function (branchId, userId, currentPage, rowsPerPage, unread, q, options) {
473
477
  return __awaiter(this, void 0, void 0, function () {
474
478
  return __generator(this, function (_a) {
475
- return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(branchId, currentPage, rowsPerPage, userId, options).then(function (request) { return request(axios, basePath); })];
479
+ return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options).then(function (request) { return request(axios, basePath); })];
476
480
  });
477
481
  });
478
482
  },
@@ -538,18 +542,20 @@ var ChatsApi = /** @class */ (function (_super) {
538
542
  /**
539
543
  *
540
544
  * @param {number} branchId
541
- * @param {number} currentPage
542
- * @param {number} rowsPerPage
543
545
  * @param {number} [userId]
546
+ * @param {number} [currentPage]
547
+ * @param {number} [rowsPerPage]
548
+ * @param {number} [unread]
549
+ * @param {string} [q]
544
550
  * @param {*} [options] Override http request option.
545
551
  * @throws {RequiredError}
546
552
  * @memberof ChatsApi
547
553
  */
548
- ChatsApi.prototype.getChats = function (branchId, currentPage, rowsPerPage, userId, options) {
554
+ ChatsApi.prototype.getChats = function (branchId, userId, currentPage, rowsPerPage, unread, q, options) {
549
555
  return __awaiter(this, void 0, void 0, function () {
550
556
  var _this = this;
551
557
  return __generator(this, function (_a) {
552
- return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, currentPage, rowsPerPage, userId, options).then(function (request) { return request(_this.axios, _this.basePath); })];
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); })];
553
559
  });
554
560
  });
555
561
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libgot/whatsapp-bridge-sdk",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "OpenAPI client for ",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [