@libgot/whatsapp-bridge-sdk 1.0.33 → 1.0.34-rc.2

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.2
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.2 --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,16 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
117
117
  /**
118
118
  *
119
119
  * @param {number} branchId
120
+ * @param {string} [q]
121
+ * @param {boolean} [unassigned]
122
+ * @param {boolean} [unread]
123
+ * @param {number} [rowsPerPage]
124
+ * @param {number} [currentPage]
120
125
  * @param {number} [userId]
121
126
  * @param {*} [options] Override http request option.
122
127
  * @throws {RequiredError}
123
128
  */
124
- getChats: async (branchId: number, userId?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
129
+ getChats: async (branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
125
130
  // verify required parameter 'branchId' is not null or undefined
126
131
  if (branchId === null || branchId === undefined) {
127
132
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChats.');
@@ -137,14 +142,34 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
137
142
  const localVarHeaderParameter = {} as any;
138
143
  const localVarQueryParameter = {} as any;
139
144
 
140
- if (branchId !== undefined) {
141
- localVarQueryParameter['branchId'] = branchId;
145
+ if (q !== undefined) {
146
+ localVarQueryParameter['q'] = q;
147
+ }
148
+
149
+ if (unassigned !== undefined) {
150
+ localVarQueryParameter['unassigned'] = unassigned;
151
+ }
152
+
153
+ if (unread !== undefined) {
154
+ localVarQueryParameter['unread'] = unread;
155
+ }
156
+
157
+ if (rowsPerPage !== undefined) {
158
+ localVarQueryParameter['rowsPerPage'] = rowsPerPage;
159
+ }
160
+
161
+ if (currentPage !== undefined) {
162
+ localVarQueryParameter['currentPage'] = currentPage;
142
163
  }
143
164
 
144
165
  if (userId !== undefined) {
145
166
  localVarQueryParameter['userId'] = userId;
146
167
  }
147
168
 
169
+ if (branchId !== undefined) {
170
+ localVarQueryParameter['branchId'] = branchId;
171
+ }
172
+
148
173
  const query = new URLSearchParams(localVarUrlObj.search);
149
174
  for (const key in localVarQueryParameter) {
150
175
  query.set(key, localVarQueryParameter[key]);
@@ -248,12 +273,17 @@ export const ChatsApiFp = function(configuration?: Configuration) {
248
273
  /**
249
274
  *
250
275
  * @param {number} branchId
276
+ * @param {string} [q]
277
+ * @param {boolean} [unassigned]
278
+ * @param {boolean} [unread]
279
+ * @param {number} [rowsPerPage]
280
+ * @param {number} [currentPage]
251
281
  * @param {number} [userId]
252
282
  * @param {*} [options] Override http request option.
253
283
  * @throws {RequiredError}
254
284
  */
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);
285
+ async getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>> {
286
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options);
257
287
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
258
288
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
259
289
  return axios.request(axiosRequestArgs);
@@ -304,12 +334,17 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
304
334
  /**
305
335
  *
306
336
  * @param {number} branchId
337
+ * @param {string} [q]
338
+ * @param {boolean} [unassigned]
339
+ * @param {boolean} [unread]
340
+ * @param {number} [rowsPerPage]
341
+ * @param {number} [currentPage]
307
342
  * @param {number} [userId]
308
343
  * @param {*} [options] Override http request option.
309
344
  * @throws {RequiredError}
310
345
  */
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));
346
+ async getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>> {
347
+ return ChatsApiFp(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options).then((request) => request(axios, basePath));
313
348
  },
314
349
  /**
315
350
  *
@@ -355,13 +390,18 @@ export class ChatsApi extends BaseAPI {
355
390
  /**
356
391
  *
357
392
  * @param {number} branchId
393
+ * @param {string} [q]
394
+ * @param {boolean} [unassigned]
395
+ * @param {boolean} [unread]
396
+ * @param {number} [rowsPerPage]
397
+ * @param {number} [currentPage]
358
398
  * @param {number} [userId]
359
399
  * @param {*} [options] Override http request option.
360
400
  * @throws {RequiredError}
361
401
  * @memberof ChatsApi
362
402
  */
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));
403
+ public async getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginationChatResponseDto>> {
404
+ return ChatsApiFp(this.configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options).then((request) => request(this.axios, this.basePath));
365
405
  }
366
406
  /**
367
407
  *
@@ -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,16 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
39
39
  /**
40
40
  *
41
41
  * @param {number} branchId
42
+ * @param {string} [q]
43
+ * @param {boolean} [unassigned]
44
+ * @param {boolean} [unread]
45
+ * @param {number} [rowsPerPage]
46
+ * @param {number} [currentPage]
42
47
  * @param {number} [userId]
43
48
  * @param {*} [options] Override http request option.
44
49
  * @throws {RequiredError}
45
50
  */
46
- getChats: (branchId: number, userId?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
51
+ getChats: (branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
47
52
  /**
48
53
  *
49
54
  * @param {MarkChatUnreadDto} body
@@ -76,11 +81,16 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
76
81
  /**
77
82
  *
78
83
  * @param {number} branchId
84
+ * @param {string} [q]
85
+ * @param {boolean} [unassigned]
86
+ * @param {boolean} [unread]
87
+ * @param {number} [rowsPerPage]
88
+ * @param {number} [currentPage]
79
89
  * @param {number} [userId]
80
90
  * @param {*} [options] Override http request option.
81
91
  * @throws {RequiredError}
82
92
  */
83
- getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>>;
93
+ getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>>;
84
94
  /**
85
95
  *
86
96
  * @param {MarkChatUnreadDto} body
@@ -113,11 +123,16 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
113
123
  /**
114
124
  *
115
125
  * @param {number} branchId
126
+ * @param {string} [q]
127
+ * @param {boolean} [unassigned]
128
+ * @param {boolean} [unread]
129
+ * @param {number} [rowsPerPage]
130
+ * @param {number} [currentPage]
116
131
  * @param {number} [userId]
117
132
  * @param {*} [options] Override http request option.
118
133
  * @throws {RequiredError}
119
134
  */
120
- getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
135
+ getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
121
136
  /**
122
137
  *
123
138
  * @param {MarkChatUnreadDto} body
@@ -154,12 +169,17 @@ export declare class ChatsApi extends BaseAPI {
154
169
  /**
155
170
  *
156
171
  * @param {number} branchId
172
+ * @param {string} [q]
173
+ * @param {boolean} [unassigned]
174
+ * @param {boolean} [unread]
175
+ * @param {number} [rowsPerPage]
176
+ * @param {number} [currentPage]
157
177
  * @param {number} [userId]
158
178
  * @param {*} [options] Override http request option.
159
179
  * @throws {RequiredError}
160
180
  * @memberof ChatsApi
161
181
  */
162
- getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
182
+ getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
163
183
  /**
164
184
  *
165
185
  * @param {MarkChatUnreadDto} body
@@ -118,11 +118,16 @@ const ChatsApiAxiosParamCreator = function (configuration) {
118
118
  /**
119
119
  *
120
120
  * @param {number} branchId
121
+ * @param {string} [q]
122
+ * @param {boolean} [unassigned]
123
+ * @param {boolean} [unread]
124
+ * @param {number} [rowsPerPage]
125
+ * @param {number} [currentPage]
121
126
  * @param {number} [userId]
122
127
  * @param {*} [options] Override http request option.
123
128
  * @throws {RequiredError}
124
129
  */
125
- getChats: (branchId_1, userId_1, ...args_1) => __awaiter(this, [branchId_1, userId_1, ...args_1], void 0, function* (branchId, userId, options = {}) {
130
+ getChats: (branchId_1, q_1, unassigned_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, ...args_1) => __awaiter(this, [branchId_1, q_1, unassigned_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, ...args_1], void 0, function* (branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options = {}) {
126
131
  // verify required parameter 'branchId' is not null or undefined
127
132
  if (branchId === null || branchId === undefined) {
128
133
  throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
@@ -137,12 +142,27 @@ const ChatsApiAxiosParamCreator = function (configuration) {
137
142
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
138
143
  const localVarHeaderParameter = {};
139
144
  const localVarQueryParameter = {};
140
- if (branchId !== undefined) {
141
- localVarQueryParameter['branchId'] = branchId;
145
+ if (q !== undefined) {
146
+ localVarQueryParameter['q'] = q;
147
+ }
148
+ if (unassigned !== undefined) {
149
+ localVarQueryParameter['unassigned'] = unassigned;
150
+ }
151
+ if (unread !== undefined) {
152
+ localVarQueryParameter['unread'] = unread;
153
+ }
154
+ if (rowsPerPage !== undefined) {
155
+ localVarQueryParameter['rowsPerPage'] = rowsPerPage;
156
+ }
157
+ if (currentPage !== undefined) {
158
+ localVarQueryParameter['currentPage'] = currentPage;
142
159
  }
143
160
  if (userId !== undefined) {
144
161
  localVarQueryParameter['userId'] = userId;
145
162
  }
163
+ if (branchId !== undefined) {
164
+ localVarQueryParameter['branchId'] = branchId;
165
+ }
146
166
  const query = new URLSearchParams(localVarUrlObj.search);
147
167
  for (const key in localVarQueryParameter) {
148
168
  query.set(key, localVarQueryParameter[key]);
@@ -246,13 +266,18 @@ const ChatsApiFp = function (configuration) {
246
266
  /**
247
267
  *
248
268
  * @param {number} branchId
269
+ * @param {string} [q]
270
+ * @param {boolean} [unassigned]
271
+ * @param {boolean} [unread]
272
+ * @param {number} [rowsPerPage]
273
+ * @param {number} [currentPage]
249
274
  * @param {number} [userId]
250
275
  * @param {*} [options] Override http request option.
251
276
  * @throws {RequiredError}
252
277
  */
253
- getChats(branchId, userId, options) {
278
+ getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options) {
254
279
  return __awaiter(this, void 0, void 0, function* () {
255
- const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, userId, options);
280
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options);
256
281
  return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
257
282
  const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
258
283
  return axios.request(axiosRequestArgs);
@@ -310,13 +335,18 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
310
335
  /**
311
336
  *
312
337
  * @param {number} branchId
338
+ * @param {string} [q]
339
+ * @param {boolean} [unassigned]
340
+ * @param {boolean} [unread]
341
+ * @param {number} [rowsPerPage]
342
+ * @param {number} [currentPage]
313
343
  * @param {number} [userId]
314
344
  * @param {*} [options] Override http request option.
315
345
  * @throws {RequiredError}
316
346
  */
317
- getChats(branchId, userId, options) {
347
+ getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options) {
318
348
  return __awaiter(this, void 0, void 0, function* () {
319
- return (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, options).then((request) => request(axios, basePath));
349
+ return (0, exports.ChatsApiFp)(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options).then((request) => request(axios, basePath));
320
350
  });
321
351
  },
322
352
  /**
@@ -369,14 +399,19 @@ class ChatsApi extends base_1.BaseAPI {
369
399
  /**
370
400
  *
371
401
  * @param {number} branchId
402
+ * @param {string} [q]
403
+ * @param {boolean} [unassigned]
404
+ * @param {boolean} [unread]
405
+ * @param {number} [rowsPerPage]
406
+ * @param {number} [currentPage]
372
407
  * @param {number} [userId]
373
408
  * @param {*} [options] Override http request option.
374
409
  * @throws {RequiredError}
375
410
  * @memberof ChatsApi
376
411
  */
377
- getChats(branchId, userId, options) {
412
+ getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options) {
378
413
  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));
414
+ return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, options).then((request) => request(this.axios, this.basePath));
380
415
  });
381
416
  }
382
417
  /**
@@ -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.2",
4
4
  "description": "OpenAPI client for ",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [