@libgot/whatsapp-bridge-sdk 1.0.44 → 1.0.45

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.44
1
+ ## @1.0.45
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,8 +36,8 @@ 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.44 --save
40
- pnpm add @libgot/whatsapp-bridge-sdk@1.0.44
39
+ npm install @libgot/whatsapp-bridge-sdk@1.0.45 --save
40
+ pnpm add @libgot/whatsapp-bridge-sdk@1.0.45
41
41
  ```
42
42
 
43
43
  _unPublished (not recommended):_
package/apis/chats-api.ts CHANGED
@@ -22,6 +22,7 @@ import { AssignmentTypeDto } from '../models';
22
22
  import { ChatLatestStatusDto } from '../models';
23
23
  import { ChatLifecycleEventDto } from '../models';
24
24
  import { ChatLifecycleEventsResponseDto } from '../models';
25
+ import { ChatUserCellphoneDto } from '../models';
25
26
  import { CreateChatLifecycleEventDto } from '../models';
26
27
  import { MarkChatUnreadDto } from '../models';
27
28
  import { PaginationChatResponseDto } from '../models';
@@ -214,6 +215,63 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
214
215
  options: localVarRequestOptions,
215
216
  };
216
217
  },
218
+ /**
219
+ *
220
+ * @param {string} userId
221
+ * @param {number} branchId
222
+ * @param {string} apikey
223
+ * @param {*} [options] Override http request option.
224
+ * @throws {RequiredError}
225
+ */
226
+ getCellphoneByUserId: async (userId: string, branchId: number, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
227
+ // verify required parameter 'userId' is not null or undefined
228
+ if (userId === null || userId === undefined) {
229
+ throw new RequiredError('userId','Required parameter userId was null or undefined when calling getCellphoneByUserId.');
230
+ }
231
+ // verify required parameter 'branchId' is not null or undefined
232
+ if (branchId === null || branchId === undefined) {
233
+ throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getCellphoneByUserId.');
234
+ }
235
+ // verify required parameter 'apikey' is not null or undefined
236
+ if (apikey === null || apikey === undefined) {
237
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getCellphoneByUserId.');
238
+ }
239
+ const localVarPath = `/api/chats/user/{userId}/cellphone`
240
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
241
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
242
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
243
+ let baseOptions;
244
+ if (configuration) {
245
+ baseOptions = configuration.baseOptions;
246
+ }
247
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
248
+ const localVarHeaderParameter = {} as any;
249
+ const localVarQueryParameter = {} as any;
250
+
251
+ if (branchId !== undefined) {
252
+ localVarQueryParameter['branchId'] = branchId;
253
+ }
254
+
255
+ if (apikey !== undefined && apikey !== null) {
256
+ localVarHeaderParameter['apikey'] = String(apikey);
257
+ }
258
+
259
+ const query = new URLSearchParams(localVarUrlObj.search);
260
+ for (const key in localVarQueryParameter) {
261
+ query.set(key, localVarQueryParameter[key]);
262
+ }
263
+ for (const key in options.params) {
264
+ query.set(key, options.params[key]);
265
+ }
266
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
267
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
268
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
269
+
270
+ return {
271
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
272
+ options: localVarRequestOptions,
273
+ };
274
+ },
217
275
  /**
218
276
  *
219
277
  * @param {number} id
@@ -319,6 +377,63 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
319
377
  options: localVarRequestOptions,
320
378
  };
321
379
  },
380
+ /**
381
+ *
382
+ * @param {number} cellphone
383
+ * @param {number} branchId
384
+ * @param {string} apikey
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ getChatEventsByCellphone: async (cellphone: number, branchId: number, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
389
+ // verify required parameter 'cellphone' is not null or undefined
390
+ if (cellphone === null || cellphone === undefined) {
391
+ throw new RequiredError('cellphone','Required parameter cellphone was null or undefined when calling getChatEventsByCellphone.');
392
+ }
393
+ // verify required parameter 'branchId' is not null or undefined
394
+ if (branchId === null || branchId === undefined) {
395
+ throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChatEventsByCellphone.');
396
+ }
397
+ // verify required parameter 'apikey' is not null or undefined
398
+ if (apikey === null || apikey === undefined) {
399
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getChatEventsByCellphone.');
400
+ }
401
+ const localVarPath = `/api/chats/cellphone/{cellphone}/events`
402
+ .replace(`{${"cellphone"}}`, encodeURIComponent(String(cellphone)));
403
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
404
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
405
+ let baseOptions;
406
+ if (configuration) {
407
+ baseOptions = configuration.baseOptions;
408
+ }
409
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
410
+ const localVarHeaderParameter = {} as any;
411
+ const localVarQueryParameter = {} as any;
412
+
413
+ if (branchId !== undefined) {
414
+ localVarQueryParameter['branchId'] = branchId;
415
+ }
416
+
417
+ if (apikey !== undefined && apikey !== null) {
418
+ localVarHeaderParameter['apikey'] = String(apikey);
419
+ }
420
+
421
+ const query = new URLSearchParams(localVarUrlObj.search);
422
+ for (const key in localVarQueryParameter) {
423
+ query.set(key, localVarQueryParameter[key]);
424
+ }
425
+ for (const key in options.params) {
426
+ query.set(key, options.params[key]);
427
+ }
428
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
429
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
430
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
431
+
432
+ return {
433
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
434
+ options: localVarRequestOptions,
435
+ };
436
+ },
322
437
  /**
323
438
  *
324
439
  * @param {number} id
@@ -686,6 +801,21 @@ export const ChatsApiFp = function(configuration?: Configuration) {
686
801
  return axios.request(axiosRequestArgs);
687
802
  };
688
803
  },
804
+ /**
805
+ *
806
+ * @param {string} userId
807
+ * @param {number} branchId
808
+ * @param {string} apikey
809
+ * @param {*} [options] Override http request option.
810
+ * @throws {RequiredError}
811
+ */
812
+ async getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatUserCellphoneDto>>> {
813
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getCellphoneByUserId(userId, branchId, apikey, options);
814
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
815
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
816
+ return axios.request(axiosRequestArgs);
817
+ };
818
+ },
689
819
  /**
690
820
  *
691
821
  * @param {number} id
@@ -715,6 +845,21 @@ export const ChatsApiFp = function(configuration?: Configuration) {
715
845
  return axios.request(axiosRequestArgs);
716
846
  };
717
847
  },
848
+ /**
849
+ *
850
+ * @param {number} cellphone
851
+ * @param {number} branchId
852
+ * @param {string} apikey
853
+ * @param {*} [options] Override http request option.
854
+ * @throws {RequiredError}
855
+ */
856
+ async getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>> {
857
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options);
858
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
859
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
860
+ return axios.request(axiosRequestArgs);
861
+ };
862
+ },
718
863
  /**
719
864
  *
720
865
  * @param {number} id
@@ -839,6 +984,17 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
839
984
  async createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventDto>> {
840
985
  return ChatsApiFp(configuration).createChatEvent(body, apikey, branchId, id, options).then((request) => request(axios, basePath));
841
986
  },
987
+ /**
988
+ *
989
+ * @param {string} userId
990
+ * @param {number} branchId
991
+ * @param {string} apikey
992
+ * @param {*} [options] Override http request option.
993
+ * @throws {RequiredError}
994
+ */
995
+ async getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatUserCellphoneDto>> {
996
+ return ChatsApiFp(configuration).getCellphoneByUserId(userId, branchId, apikey, options).then((request) => request(axios, basePath));
997
+ },
842
998
  /**
843
999
  *
844
1000
  * @param {number} id
@@ -860,6 +1016,17 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
860
1016
  async getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>> {
861
1017
  return ChatsApiFp(configuration).getChatEvents(id, branchId, apikey, options).then((request) => request(axios, basePath));
862
1018
  },
1019
+ /**
1020
+ *
1021
+ * @param {number} cellphone
1022
+ * @param {number} branchId
1023
+ * @param {string} apikey
1024
+ * @param {*} [options] Override http request option.
1025
+ * @throws {RequiredError}
1026
+ */
1027
+ async getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>> {
1028
+ return ChatsApiFp(configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options).then((request) => request(axios, basePath));
1029
+ },
863
1030
  /**
864
1031
  *
865
1032
  * @param {number} id
@@ -968,6 +1135,18 @@ export class ChatsApi extends BaseAPI {
968
1135
  public async createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatLifecycleEventDto>> {
969
1136
  return ChatsApiFp(this.configuration).createChatEvent(body, apikey, branchId, id, options).then((request) => request(this.axios, this.basePath));
970
1137
  }
1138
+ /**
1139
+ *
1140
+ * @param {string} userId
1141
+ * @param {number} branchId
1142
+ * @param {string} apikey
1143
+ * @param {*} [options] Override http request option.
1144
+ * @throws {RequiredError}
1145
+ * @memberof ChatsApi
1146
+ */
1147
+ public async getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatUserCellphoneDto>> {
1148
+ return ChatsApiFp(this.configuration).getCellphoneByUserId(userId, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
1149
+ }
971
1150
  /**
972
1151
  *
973
1152
  * @param {number} id
@@ -991,6 +1170,18 @@ export class ChatsApi extends BaseAPI {
991
1170
  public async getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatLifecycleEventsResponseDto>> {
992
1171
  return ChatsApiFp(this.configuration).getChatEvents(id, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
993
1172
  }
1173
+ /**
1174
+ *
1175
+ * @param {number} cellphone
1176
+ * @param {number} branchId
1177
+ * @param {string} apikey
1178
+ * @param {*} [options] Override http request option.
1179
+ * @throws {RequiredError}
1180
+ * @memberof ChatsApi
1181
+ */
1182
+ public async getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatLifecycleEventsResponseDto>> {
1183
+ return ChatsApiFp(this.configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
1184
+ }
994
1185
  /**
995
1186
  *
996
1187
  * @param {number} id
@@ -17,6 +17,7 @@ import { AssignmentTypeDto } from '../models';
17
17
  import { ChatLatestStatusDto } from '../models';
18
18
  import { ChatLifecycleEventDto } from '../models';
19
19
  import { ChatLifecycleEventsResponseDto } from '../models';
20
+ import { ChatUserCellphoneDto } from '../models';
20
21
  import { CreateChatLifecycleEventDto } from '../models';
21
22
  import { MarkChatUnreadDto } from '../models';
22
23
  import { PaginationChatResponseDto } from '../models';
@@ -56,6 +57,15 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
56
57
  * @throws {RequiredError}
57
58
  */
58
59
  createChatEvent: (body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
60
+ /**
61
+ *
62
+ * @param {string} userId
63
+ * @param {number} branchId
64
+ * @param {string} apikey
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ */
68
+ getCellphoneByUserId: (userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
59
69
  /**
60
70
  *
61
71
  * @param {number} id
@@ -73,6 +83,15 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
73
83
  * @throws {RequiredError}
74
84
  */
75
85
  getChatEvents: (id: number, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
86
+ /**
87
+ *
88
+ * @param {number} cellphone
89
+ * @param {number} branchId
90
+ * @param {string} apikey
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ getChatEventsByCellphone: (cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
76
95
  /**
77
96
  *
78
97
  * @param {number} id
@@ -158,6 +177,15 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
158
177
  * @throws {RequiredError}
159
178
  */
160
179
  createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatLifecycleEventDto>>>;
180
+ /**
181
+ *
182
+ * @param {string} userId
183
+ * @param {number} branchId
184
+ * @param {string} apikey
185
+ * @param {*} [options] Override http request option.
186
+ * @throws {RequiredError}
187
+ */
188
+ getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatUserCellphoneDto>>>;
161
189
  /**
162
190
  *
163
191
  * @param {number} id
@@ -175,6 +203,15 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
175
203
  * @throws {RequiredError}
176
204
  */
177
205
  getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>>;
206
+ /**
207
+ *
208
+ * @param {number} cellphone
209
+ * @param {number} branchId
210
+ * @param {string} apikey
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>>;
178
215
  /**
179
216
  *
180
217
  * @param {number} id
@@ -260,6 +297,15 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
260
297
  * @throws {RequiredError}
261
298
  */
262
299
  createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventDto>>;
300
+ /**
301
+ *
302
+ * @param {string} userId
303
+ * @param {number} branchId
304
+ * @param {string} apikey
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ */
308
+ getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatUserCellphoneDto>>;
263
309
  /**
264
310
  *
265
311
  * @param {number} id
@@ -277,6 +323,15 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
277
323
  * @throws {RequiredError}
278
324
  */
279
325
  getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
326
+ /**
327
+ *
328
+ * @param {number} cellphone
329
+ * @param {number} branchId
330
+ * @param {string} apikey
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
280
335
  /**
281
336
  *
282
337
  * @param {number} id
@@ -367,6 +422,16 @@ export declare class ChatsApi extends BaseAPI {
367
422
  * @memberof ChatsApi
368
423
  */
369
424
  createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventDto>>;
425
+ /**
426
+ *
427
+ * @param {string} userId
428
+ * @param {number} branchId
429
+ * @param {string} apikey
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ * @memberof ChatsApi
433
+ */
434
+ getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatUserCellphoneDto>>;
370
435
  /**
371
436
  *
372
437
  * @param {number} id
@@ -386,6 +451,16 @@ export declare class ChatsApi extends BaseAPI {
386
451
  * @memberof ChatsApi
387
452
  */
388
453
  getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
454
+ /**
455
+ *
456
+ * @param {number} cellphone
457
+ * @param {number} branchId
458
+ * @param {string} apikey
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ * @memberof ChatsApi
462
+ */
463
+ getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
389
464
  /**
390
465
  *
391
466
  * @param {number} id
@@ -200,6 +200,59 @@ const ChatsApiAxiosParamCreator = function (configuration) {
200
200
  options: localVarRequestOptions,
201
201
  };
202
202
  }),
203
+ /**
204
+ *
205
+ * @param {string} userId
206
+ * @param {number} branchId
207
+ * @param {string} apikey
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ getCellphoneByUserId: (userId_1, branchId_1, apikey_1, ...args_1) => __awaiter(this, [userId_1, branchId_1, apikey_1, ...args_1], void 0, function* (userId, branchId, apikey, options = {}) {
212
+ // verify required parameter 'userId' is not null or undefined
213
+ if (userId === null || userId === undefined) {
214
+ throw new base_1.RequiredError('userId', 'Required parameter userId was null or undefined when calling getCellphoneByUserId.');
215
+ }
216
+ // verify required parameter 'branchId' is not null or undefined
217
+ if (branchId === null || branchId === undefined) {
218
+ throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getCellphoneByUserId.');
219
+ }
220
+ // verify required parameter 'apikey' is not null or undefined
221
+ if (apikey === null || apikey === undefined) {
222
+ throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getCellphoneByUserId.');
223
+ }
224
+ const localVarPath = `/api/chats/user/{userId}/cellphone`
225
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
226
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
227
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
228
+ let baseOptions;
229
+ if (configuration) {
230
+ baseOptions = configuration.baseOptions;
231
+ }
232
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
233
+ const localVarHeaderParameter = {};
234
+ const localVarQueryParameter = {};
235
+ if (branchId !== undefined) {
236
+ localVarQueryParameter['branchId'] = branchId;
237
+ }
238
+ if (apikey !== undefined && apikey !== null) {
239
+ localVarHeaderParameter['apikey'] = String(apikey);
240
+ }
241
+ const query = new URLSearchParams(localVarUrlObj.search);
242
+ for (const key in localVarQueryParameter) {
243
+ query.set(key, localVarQueryParameter[key]);
244
+ }
245
+ for (const key in options.params) {
246
+ query.set(key, options.params[key]);
247
+ }
248
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
249
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
250
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
251
+ return {
252
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
253
+ options: localVarRequestOptions,
254
+ };
255
+ }),
203
256
  /**
204
257
  *
205
258
  * @param {number} id
@@ -298,6 +351,59 @@ const ChatsApiAxiosParamCreator = function (configuration) {
298
351
  options: localVarRequestOptions,
299
352
  };
300
353
  }),
354
+ /**
355
+ *
356
+ * @param {number} cellphone
357
+ * @param {number} branchId
358
+ * @param {string} apikey
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ */
362
+ getChatEventsByCellphone: (cellphone_1, branchId_1, apikey_1, ...args_1) => __awaiter(this, [cellphone_1, branchId_1, apikey_1, ...args_1], void 0, function* (cellphone, branchId, apikey, options = {}) {
363
+ // verify required parameter 'cellphone' is not null or undefined
364
+ if (cellphone === null || cellphone === undefined) {
365
+ throw new base_1.RequiredError('cellphone', 'Required parameter cellphone was null or undefined when calling getChatEventsByCellphone.');
366
+ }
367
+ // verify required parameter 'branchId' is not null or undefined
368
+ if (branchId === null || branchId === undefined) {
369
+ throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChatEventsByCellphone.');
370
+ }
371
+ // verify required parameter 'apikey' is not null or undefined
372
+ if (apikey === null || apikey === undefined) {
373
+ throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getChatEventsByCellphone.');
374
+ }
375
+ const localVarPath = `/api/chats/cellphone/{cellphone}/events`
376
+ .replace(`{${"cellphone"}}`, encodeURIComponent(String(cellphone)));
377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
378
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
379
+ let baseOptions;
380
+ if (configuration) {
381
+ baseOptions = configuration.baseOptions;
382
+ }
383
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
384
+ const localVarHeaderParameter = {};
385
+ const localVarQueryParameter = {};
386
+ if (branchId !== undefined) {
387
+ localVarQueryParameter['branchId'] = branchId;
388
+ }
389
+ if (apikey !== undefined && apikey !== null) {
390
+ localVarHeaderParameter['apikey'] = String(apikey);
391
+ }
392
+ const query = new URLSearchParams(localVarUrlObj.search);
393
+ for (const key in localVarQueryParameter) {
394
+ query.set(key, localVarQueryParameter[key]);
395
+ }
396
+ for (const key in options.params) {
397
+ query.set(key, options.params[key]);
398
+ }
399
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
400
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
401
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
402
+ return {
403
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
404
+ options: localVarRequestOptions,
405
+ };
406
+ }),
301
407
  /**
302
408
  *
303
409
  * @param {number} id
@@ -642,6 +748,23 @@ const ChatsApiFp = function (configuration) {
642
748
  };
643
749
  });
644
750
  },
751
+ /**
752
+ *
753
+ * @param {string} userId
754
+ * @param {number} branchId
755
+ * @param {string} apikey
756
+ * @param {*} [options] Override http request option.
757
+ * @throws {RequiredError}
758
+ */
759
+ getCellphoneByUserId(userId, branchId, apikey, options) {
760
+ return __awaiter(this, void 0, void 0, function* () {
761
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getCellphoneByUserId(userId, branchId, apikey, options);
762
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
763
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
764
+ return axios.request(axiosRequestArgs);
765
+ };
766
+ });
767
+ },
645
768
  /**
646
769
  *
647
770
  * @param {number} id
@@ -675,6 +798,23 @@ const ChatsApiFp = function (configuration) {
675
798
  };
676
799
  });
677
800
  },
801
+ /**
802
+ *
803
+ * @param {number} cellphone
804
+ * @param {number} branchId
805
+ * @param {string} apikey
806
+ * @param {*} [options] Override http request option.
807
+ * @throws {RequiredError}
808
+ */
809
+ getChatEventsByCellphone(cellphone, branchId, apikey, options) {
810
+ return __awaiter(this, void 0, void 0, function* () {
811
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options);
812
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
813
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
814
+ return axios.request(axiosRequestArgs);
815
+ };
816
+ });
817
+ },
678
818
  /**
679
819
  *
680
820
  * @param {number} id
@@ -815,6 +955,19 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
815
955
  return (0, exports.ChatsApiFp)(configuration).createChatEvent(body, apikey, branchId, id, options).then((request) => request(axios, basePath));
816
956
  });
817
957
  },
958
+ /**
959
+ *
960
+ * @param {string} userId
961
+ * @param {number} branchId
962
+ * @param {string} apikey
963
+ * @param {*} [options] Override http request option.
964
+ * @throws {RequiredError}
965
+ */
966
+ getCellphoneByUserId(userId, branchId, apikey, options) {
967
+ return __awaiter(this, void 0, void 0, function* () {
968
+ return (0, exports.ChatsApiFp)(configuration).getCellphoneByUserId(userId, branchId, apikey, options).then((request) => request(axios, basePath));
969
+ });
970
+ },
818
971
  /**
819
972
  *
820
973
  * @param {number} id
@@ -840,6 +993,19 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
840
993
  return (0, exports.ChatsApiFp)(configuration).getChatEvents(id, branchId, apikey, options).then((request) => request(axios, basePath));
841
994
  });
842
995
  },
996
+ /**
997
+ *
998
+ * @param {number} cellphone
999
+ * @param {number} branchId
1000
+ * @param {string} apikey
1001
+ * @param {*} [options] Override http request option.
1002
+ * @throws {RequiredError}
1003
+ */
1004
+ getChatEventsByCellphone(cellphone, branchId, apikey, options) {
1005
+ return __awaiter(this, void 0, void 0, function* () {
1006
+ return (0, exports.ChatsApiFp)(configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options).then((request) => request(axios, basePath));
1007
+ });
1008
+ },
843
1009
  /**
844
1010
  *
845
1011
  * @param {number} id
@@ -964,6 +1130,20 @@ class ChatsApi extends base_1.BaseAPI {
964
1130
  return (0, exports.ChatsApiFp)(this.configuration).createChatEvent(body, apikey, branchId, id, options).then((request) => request(this.axios, this.basePath));
965
1131
  });
966
1132
  }
1133
+ /**
1134
+ *
1135
+ * @param {string} userId
1136
+ * @param {number} branchId
1137
+ * @param {string} apikey
1138
+ * @param {*} [options] Override http request option.
1139
+ * @throws {RequiredError}
1140
+ * @memberof ChatsApi
1141
+ */
1142
+ getCellphoneByUserId(userId, branchId, apikey, options) {
1143
+ return __awaiter(this, void 0, void 0, function* () {
1144
+ return (0, exports.ChatsApiFp)(this.configuration).getCellphoneByUserId(userId, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
1145
+ });
1146
+ }
967
1147
  /**
968
1148
  *
969
1149
  * @param {number} id
@@ -991,6 +1171,20 @@ class ChatsApi extends base_1.BaseAPI {
991
1171
  return (0, exports.ChatsApiFp)(this.configuration).getChatEvents(id, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
992
1172
  });
993
1173
  }
1174
+ /**
1175
+ *
1176
+ * @param {number} cellphone
1177
+ * @param {number} branchId
1178
+ * @param {string} apikey
1179
+ * @param {*} [options] Override http request option.
1180
+ * @throws {RequiredError}
1181
+ * @memberof ChatsApi
1182
+ */
1183
+ getChatEventsByCellphone(cellphone, branchId, apikey, options) {
1184
+ return __awaiter(this, void 0, void 0, function* () {
1185
+ return (0, exports.ChatsApiFp)(this.configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
1186
+ });
1187
+ }
994
1188
  /**
995
1189
  *
996
1190
  * @param {number} id
@@ -0,0 +1,25 @@
1
+ /**
2
+ * whatsapp-bridge Node Api
3
+ * The whatsapp-bridge API description
4
+ *
5
+ * OpenAPI spec version: 0.0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by the swagger code generator program.
9
+ * https://github.com/swagger-api/swagger-codegen.git
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ *
15
+ * @export
16
+ * @interface ChatUserCellphoneDto
17
+ */
18
+ export interface ChatUserCellphoneDto {
19
+ /**
20
+ * @type {string}
21
+ * @memberof ChatUserCellphoneDto
22
+ * @example 5491122334455
23
+ */
24
+ cellphone: string | null;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * whatsapp-bridge Node Api
6
+ * The whatsapp-bridge API description
7
+ *
8
+ * OpenAPI spec version: 0.0.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by the swagger code generator program.
12
+ * https://github.com/swagger-api/swagger-codegen.git
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,7 @@ export * from './cellphone-validation-dto';
9
9
  export * from './chat-latest-status-dto';
10
10
  export * from './chat-lifecycle-event-dto';
11
11
  export * from './chat-lifecycle-events-response-dto';
12
+ export * from './chat-user-cellphone-dto';
12
13
  export * from './component-template-dto';
13
14
  export * from './contacts-response-dto';
14
15
  export * from './conversation-message-dto';
@@ -25,6 +25,7 @@ __exportStar(require("./cellphone-validation-dto"), exports);
25
25
  __exportStar(require("./chat-latest-status-dto"), exports);
26
26
  __exportStar(require("./chat-lifecycle-event-dto"), exports);
27
27
  __exportStar(require("./chat-lifecycle-events-response-dto"), exports);
28
+ __exportStar(require("./chat-user-cellphone-dto"), exports);
28
29
  __exportStar(require("./component-template-dto"), exports);
29
30
  __exportStar(require("./contacts-response-dto"), exports);
30
31
  __exportStar(require("./conversation-message-dto"), exports);
@@ -58,6 +58,12 @@ export interface SendTemplateDataDto {
58
58
  * @example true
59
59
  */
60
60
  isMessageMarketing?: boolean;
61
+ /**
62
+ * @type {number}
63
+ * @memberof SendTemplateDataDto
64
+ * @example 1234567890123
65
+ */
66
+ notificationId?: number;
61
67
  }
62
68
  /**
63
69
  * @export
@@ -0,0 +1,29 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * whatsapp-bridge Node Api
5
+ * The whatsapp-bridge API description
6
+ *
7
+ * OpenAPI spec version: 0.0.1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ /**
16
+ *
17
+ *
18
+ * @export
19
+ * @interface ChatUserCellphoneDto
20
+ */
21
+ export interface ChatUserCellphoneDto {
22
+
23
+ /**
24
+ * @type {string}
25
+ * @memberof ChatUserCellphoneDto
26
+ * @example 5491122334455
27
+ */
28
+ cellphone: string | null;
29
+ }
package/models/index.ts CHANGED
@@ -9,6 +9,7 @@ export * from './cellphone-validation-dto';
9
9
  export * from './chat-latest-status-dto';
10
10
  export * from './chat-lifecycle-event-dto';
11
11
  export * from './chat-lifecycle-events-response-dto';
12
+ export * from './chat-user-cellphone-dto';
12
13
  export * from './component-template-dto';
13
14
  export * from './contacts-response-dto';
14
15
  export * from './conversation-message-dto';
@@ -68,6 +68,13 @@ export interface SendTemplateDataDto {
68
68
  * @example true
69
69
  */
70
70
  isMessageMarketing?: boolean;
71
+
72
+ /**
73
+ * @type {number}
74
+ * @memberof SendTemplateDataDto
75
+ * @example 1234567890123
76
+ */
77
+ notificationId?: number;
71
78
  }
72
79
 
73
80
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libgot/whatsapp-bridge-sdk",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "OpenAPI client for ",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [