@libgot/whatsapp-bridge-sdk 1.0.33 → 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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @1.0.33
1
+ ## @1.0.34-rc.1
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.33 --save
39
+ npm install @libgot/whatsapp-bridge-sdk@1.0.34-rc.1 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/apis/chats-api.ts CHANGED
@@ -18,8 +18,8 @@ import { Configuration } from '../configuration';
18
18
  // @ts-ignore
19
19
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
20
20
  import { AssignToMeDto } from '../models';
21
- import { ChatsResponseDTO } from '../models';
22
21
  import { MarkChatUnreadDto } from '../models';
22
+ import { PaginationChatResponseDto } from '../models';
23
23
  import { WhatsappChatResponseDTO } from '../models';
24
24
  /**
25
25
  * ChatsApi - axios parameter creator
@@ -117,11 +117,15 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
117
117
  /**
118
118
  *
119
119
  * @param {number} branchId
120
+ * @param {string} [q]
121
+ * @param {boolean} [unread]
122
+ * @param {number} [rowsPerPage]
123
+ * @param {number} [currentPage]
120
124
  * @param {number} [userId]
121
125
  * @param {*} [options] Override http request option.
122
126
  * @throws {RequiredError}
123
127
  */
124
- getChats: async (branchId: number, userId?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
128
+ getChats: async (branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
125
129
  // verify required parameter 'branchId' is not null or undefined
126
130
  if (branchId === null || branchId === undefined) {
127
131
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChats.');
@@ -137,14 +141,30 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
137
141
  const localVarHeaderParameter = {} as any;
138
142
  const localVarQueryParameter = {} as any;
139
143
 
140
- if (branchId !== undefined) {
141
- localVarQueryParameter['branchId'] = branchId;
144
+ if (q !== undefined) {
145
+ localVarQueryParameter['q'] = q;
146
+ }
147
+
148
+ if (unread !== undefined) {
149
+ localVarQueryParameter['unread'] = unread;
150
+ }
151
+
152
+ if (rowsPerPage !== undefined) {
153
+ localVarQueryParameter['rowsPerPage'] = rowsPerPage;
154
+ }
155
+
156
+ if (currentPage !== undefined) {
157
+ localVarQueryParameter['currentPage'] = currentPage;
142
158
  }
143
159
 
144
160
  if (userId !== undefined) {
145
161
  localVarQueryParameter['userId'] = userId;
146
162
  }
147
163
 
164
+ if (branchId !== undefined) {
165
+ localVarQueryParameter['branchId'] = branchId;
166
+ }
167
+
148
168
  const query = new URLSearchParams(localVarUrlObj.search);
149
169
  for (const key in localVarQueryParameter) {
150
170
  query.set(key, localVarQueryParameter[key]);
@@ -248,12 +268,16 @@ export const ChatsApiFp = function(configuration?: Configuration) {
248
268
  /**
249
269
  *
250
270
  * @param {number} branchId
271
+ * @param {string} [q]
272
+ * @param {boolean} [unread]
273
+ * @param {number} [rowsPerPage]
274
+ * @param {number} [currentPage]
251
275
  * @param {number} [userId]
252
276
  * @param {*} [options] Override http request option.
253
277
  * @throws {RequiredError}
254
278
  */
255
- async getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>> {
256
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, userId, options);
279
+ async getChats(branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>> {
280
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options);
257
281
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
258
282
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
259
283
  return axios.request(axiosRequestArgs);
@@ -304,12 +328,16 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
304
328
  /**
305
329
  *
306
330
  * @param {number} branchId
331
+ * @param {string} [q]
332
+ * @param {boolean} [unread]
333
+ * @param {number} [rowsPerPage]
334
+ * @param {number} [currentPage]
307
335
  * @param {number} [userId]
308
336
  * @param {*} [options] Override http request option.
309
337
  * @throws {RequiredError}
310
338
  */
311
- async getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>> {
312
- return ChatsApiFp(configuration).getChats(branchId, userId, options).then((request) => request(axios, basePath));
339
+ async getChats(branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>> {
340
+ return ChatsApiFp(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(axios, basePath));
313
341
  },
314
342
  /**
315
343
  *
@@ -355,13 +383,17 @@ export class ChatsApi extends BaseAPI {
355
383
  /**
356
384
  *
357
385
  * @param {number} branchId
386
+ * @param {string} [q]
387
+ * @param {boolean} [unread]
388
+ * @param {number} [rowsPerPage]
389
+ * @param {number} [currentPage]
358
390
  * @param {number} [userId]
359
391
  * @param {*} [options] Override http request option.
360
392
  * @throws {RequiredError}
361
393
  * @memberof ChatsApi
362
394
  */
363
- public async getChats(branchId: number, userId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatsResponseDTO>> {
364
- return ChatsApiFp(this.configuration).getChats(branchId, userId, options).then((request) => request(this.axios, this.basePath));
395
+ public async getChats(branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginationChatResponseDto>> {
396
+ return ChatsApiFp(this.configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(this.axios, this.basePath));
365
397
  }
366
398
  /**
367
399
  *
@@ -13,8 +13,8 @@ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { AssignToMeDto } from '../models';
16
- import { ChatsResponseDTO } from '../models';
17
16
  import { MarkChatUnreadDto } from '../models';
17
+ import { PaginationChatResponseDto } from '../models';
18
18
  import { WhatsappChatResponseDTO } from '../models';
19
19
  /**
20
20
  * ChatsApi - axios parameter creator
@@ -39,11 +39,15 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
39
39
  /**
40
40
  *
41
41
  * @param {number} branchId
42
+ * @param {string} [q]
43
+ * @param {boolean} [unread]
44
+ * @param {number} [rowsPerPage]
45
+ * @param {number} [currentPage]
42
46
  * @param {number} [userId]
43
47
  * @param {*} [options] Override http request option.
44
48
  * @throws {RequiredError}
45
49
  */
46
- getChats: (branchId: number, userId?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
50
+ getChats: (branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
47
51
  /**
48
52
  *
49
53
  * @param {MarkChatUnreadDto} body
@@ -76,11 +80,15 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
76
80
  /**
77
81
  *
78
82
  * @param {number} branchId
83
+ * @param {string} [q]
84
+ * @param {boolean} [unread]
85
+ * @param {number} [rowsPerPage]
86
+ * @param {number} [currentPage]
79
87
  * @param {number} [userId]
80
88
  * @param {*} [options] Override http request option.
81
89
  * @throws {RequiredError}
82
90
  */
83
- getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>>;
91
+ getChats(branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>>;
84
92
  /**
85
93
  *
86
94
  * @param {MarkChatUnreadDto} body
@@ -113,11 +121,15 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
113
121
  /**
114
122
  *
115
123
  * @param {number} branchId
124
+ * @param {string} [q]
125
+ * @param {boolean} [unread]
126
+ * @param {number} [rowsPerPage]
127
+ * @param {number} [currentPage]
116
128
  * @param {number} [userId]
117
129
  * @param {*} [options] Override http request option.
118
130
  * @throws {RequiredError}
119
131
  */
120
- getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
132
+ getChats(branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
121
133
  /**
122
134
  *
123
135
  * @param {MarkChatUnreadDto} body
@@ -154,12 +166,16 @@ export declare class ChatsApi extends BaseAPI {
154
166
  /**
155
167
  *
156
168
  * @param {number} branchId
169
+ * @param {string} [q]
170
+ * @param {boolean} [unread]
171
+ * @param {number} [rowsPerPage]
172
+ * @param {number} [currentPage]
157
173
  * @param {number} [userId]
158
174
  * @param {*} [options] Override http request option.
159
175
  * @throws {RequiredError}
160
176
  * @memberof ChatsApi
161
177
  */
162
- getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
178
+ getChats(branchId: number, q?: string, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
163
179
  /**
164
180
  *
165
181
  * @param {MarkChatUnreadDto} body
@@ -118,11 +118,15 @@ const ChatsApiAxiosParamCreator = function (configuration) {
118
118
  /**
119
119
  *
120
120
  * @param {number} branchId
121
+ * @param {string} [q]
122
+ * @param {boolean} [unread]
123
+ * @param {number} [rowsPerPage]
124
+ * @param {number} [currentPage]
121
125
  * @param {number} [userId]
122
126
  * @param {*} [options] Override http request option.
123
127
  * @throws {RequiredError}
124
128
  */
125
- getChats: (branchId_1, userId_1, ...args_1) => __awaiter(this, [branchId_1, userId_1, ...args_1], void 0, function* (branchId, userId, options = {}) {
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 = {}) {
126
130
  // verify required parameter 'branchId' is not null or undefined
127
131
  if (branchId === null || branchId === undefined) {
128
132
  throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
@@ -137,12 +141,24 @@ const ChatsApiAxiosParamCreator = function (configuration) {
137
141
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
138
142
  const localVarHeaderParameter = {};
139
143
  const localVarQueryParameter = {};
140
- if (branchId !== undefined) {
141
- localVarQueryParameter['branchId'] = branchId;
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;
142
155
  }
143
156
  if (userId !== undefined) {
144
157
  localVarQueryParameter['userId'] = userId;
145
158
  }
159
+ if (branchId !== undefined) {
160
+ localVarQueryParameter['branchId'] = branchId;
161
+ }
146
162
  const query = new URLSearchParams(localVarUrlObj.search);
147
163
  for (const key in localVarQueryParameter) {
148
164
  query.set(key, localVarQueryParameter[key]);
@@ -246,13 +262,17 @@ const ChatsApiFp = function (configuration) {
246
262
  /**
247
263
  *
248
264
  * @param {number} branchId
265
+ * @param {string} [q]
266
+ * @param {boolean} [unread]
267
+ * @param {number} [rowsPerPage]
268
+ * @param {number} [currentPage]
249
269
  * @param {number} [userId]
250
270
  * @param {*} [options] Override http request option.
251
271
  * @throws {RequiredError}
252
272
  */
253
- getChats(branchId, userId, options) {
273
+ getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
254
274
  return __awaiter(this, void 0, void 0, function* () {
255
- const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, userId, options);
275
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options);
256
276
  return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
257
277
  const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
258
278
  return axios.request(axiosRequestArgs);
@@ -310,13 +330,17 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
310
330
  /**
311
331
  *
312
332
  * @param {number} branchId
333
+ * @param {string} [q]
334
+ * @param {boolean} [unread]
335
+ * @param {number} [rowsPerPage]
336
+ * @param {number} [currentPage]
313
337
  * @param {number} [userId]
314
338
  * @param {*} [options] Override http request option.
315
339
  * @throws {RequiredError}
316
340
  */
317
- getChats(branchId, userId, options) {
341
+ getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
318
342
  return __awaiter(this, void 0, void 0, function* () {
319
- return (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, options).then((request) => request(axios, basePath));
343
+ return (0, exports.ChatsApiFp)(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(axios, basePath));
320
344
  });
321
345
  },
322
346
  /**
@@ -369,14 +393,18 @@ class ChatsApi extends base_1.BaseAPI {
369
393
  /**
370
394
  *
371
395
  * @param {number} branchId
396
+ * @param {string} [q]
397
+ * @param {boolean} [unread]
398
+ * @param {number} [rowsPerPage]
399
+ * @param {number} [currentPage]
372
400
  * @param {number} [userId]
373
401
  * @param {*} [options] Override http request option.
374
402
  * @throws {RequiredError}
375
403
  * @memberof ChatsApi
376
404
  */
377
- getChats(branchId, userId, options) {
405
+ getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
378
406
  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));
407
+ return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(this.axios, this.basePath));
380
408
  });
381
409
  }
382
410
  /**
@@ -4,7 +4,6 @@ export * from './api-response-user-dto';
4
4
  export * from './assign-to-me-dto';
5
5
  export * from './attributes';
6
6
  export * from './auth-dto';
7
- export * from './chats-response-dto';
8
7
  export * from './component-template-dto';
9
8
  export * from './contacts-response-dto';
10
9
  export * from './conversation-message-dto';
@@ -19,6 +18,7 @@ export * from './inline-response503-info';
19
18
  export * from './key-dto';
20
19
  export * from './mark-chat-unread-dto';
21
20
  export * from './message-response-dto';
21
+ export * from './pagination-chat-response-dto';
22
22
  export * from './parameter-template-dto';
23
23
  export * from './read-message-dto';
24
24
  export * from './read-message-response-data-dto';
@@ -20,7 +20,6 @@ __exportStar(require("./api-response-user-dto"), exports);
20
20
  __exportStar(require("./assign-to-me-dto"), exports);
21
21
  __exportStar(require("./attributes"), exports);
22
22
  __exportStar(require("./auth-dto"), exports);
23
- __exportStar(require("./chats-response-dto"), exports);
24
23
  __exportStar(require("./component-template-dto"), exports);
25
24
  __exportStar(require("./contacts-response-dto"), exports);
26
25
  __exportStar(require("./conversation-message-dto"), exports);
@@ -35,6 +34,7 @@ __exportStar(require("./inline-response503-info"), exports);
35
34
  __exportStar(require("./key-dto"), exports);
36
35
  __exportStar(require("./mark-chat-unread-dto"), exports);
37
36
  __exportStar(require("./message-response-dto"), exports);
37
+ __exportStar(require("./pagination-chat-response-dto"), exports);
38
38
  __exportStar(require("./parameter-template-dto"), exports);
39
39
  __exportStar(require("./read-message-dto"), exports);
40
40
  __exportStar(require("./read-message-response-data-dto"), exports);
package/models/index.ts CHANGED
@@ -4,7 +4,6 @@ export * from './api-response-user-dto';
4
4
  export * from './assign-to-me-dto';
5
5
  export * from './attributes';
6
6
  export * from './auth-dto';
7
- export * from './chats-response-dto';
8
7
  export * from './component-template-dto';
9
8
  export * from './contacts-response-dto';
10
9
  export * from './conversation-message-dto';
@@ -19,6 +18,7 @@ export * from './inline-response503-info';
19
18
  export * from './key-dto';
20
19
  export * from './mark-chat-unread-dto';
21
20
  export * from './message-response-dto';
21
+ export * from './pagination-chat-response-dto';
22
22
  export * from './parameter-template-dto';
23
23
  export * from './read-message-dto';
24
24
  export * from './read-message-response-data-dto';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libgot/whatsapp-bridge-sdk",
3
- "version": "1.0.33",
3
+ "version": "1.0.34-rc.1",
4
4
  "description": "OpenAPI client for ",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [