@libgot/whatsapp-bridge-sdk 1.0.40-rc.1 → 1.0.40-rc.3

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/.nvmrc CHANGED
@@ -1 +1 @@
1
- lts/*
1
+ 24.9.0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @1.0.40-rc.1
1
+ ## @1.0.40-rc.3
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.40-rc.1 --save
39
+ npm install @libgot/whatsapp-bridge-sdk@1.0.40-rc.3 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -29,10 +29,11 @@ export const CellphoneApiAxiosParamCreator = function (configuration?: Configura
29
29
  *
30
30
  * @param {CellphoneValidationDto} body
31
31
  * @param {string} authorization Custom header
32
+ * @param {string} apikey
32
33
  * @param {*} [options] Override http request option.
33
34
  * @throws {RequiredError}
34
35
  */
35
- validate: async (body: CellphoneValidationDto, authorization: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
36
+ validate: async (body: CellphoneValidationDto, authorization: string, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
36
37
  // verify required parameter 'body' is not null or undefined
37
38
  if (body === null || body === undefined) {
38
39
  throw new RequiredError('body','Required parameter body was null or undefined when calling validate.');
@@ -41,6 +42,10 @@ export const CellphoneApiAxiosParamCreator = function (configuration?: Configura
41
42
  if (authorization === null || authorization === undefined) {
42
43
  throw new RequiredError('authorization','Required parameter authorization was null or undefined when calling validate.');
43
44
  }
45
+ // verify required parameter 'apikey' is not null or undefined
46
+ if (apikey === null || apikey === undefined) {
47
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling validate.');
48
+ }
44
49
  const localVarPath = `/api/cellphone/validate`;
45
50
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
51
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -52,19 +57,14 @@ export const CellphoneApiAxiosParamCreator = function (configuration?: Configura
52
57
  const localVarHeaderParameter = {} as any;
53
58
  const localVarQueryParameter = {} as any;
54
59
 
55
- // authentication access-token required
56
- // http bearer authentication required
57
- if (configuration && configuration.accessToken) {
58
- const accessToken = typeof configuration.accessToken === 'function'
59
- ? await configuration.accessToken()
60
- : await configuration.accessToken;
61
- localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
62
- }
63
-
64
60
  if (authorization !== undefined && authorization !== null) {
65
61
  localVarHeaderParameter['Authorization'] = String(authorization);
66
62
  }
67
63
 
64
+ if (apikey !== undefined && apikey !== null) {
65
+ localVarHeaderParameter['apikey'] = String(apikey);
66
+ }
67
+
68
68
  localVarHeaderParameter['Content-Type'] = 'application/json';
69
69
 
70
70
  const query = new URLSearchParams(localVarUrlObj.search);
@@ -98,11 +98,12 @@ export const CellphoneApiFp = function(configuration?: Configuration) {
98
98
  *
99
99
  * @param {CellphoneValidationDto} body
100
100
  * @param {string} authorization Custom header
101
+ * @param {string} apikey
101
102
  * @param {*} [options] Override http request option.
102
103
  * @throws {RequiredError}
103
104
  */
104
- async validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
105
- const localVarAxiosArgs = await CellphoneApiAxiosParamCreator(configuration).validate(body, authorization, options);
105
+ async validate(body: CellphoneValidationDto, authorization: string, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
106
+ const localVarAxiosArgs = await CellphoneApiAxiosParamCreator(configuration).validate(body, authorization, apikey, options);
106
107
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
107
108
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
108
109
  return axios.request(axiosRequestArgs);
@@ -121,11 +122,12 @@ export const CellphoneApiFactory = function (configuration?: Configuration, base
121
122
  *
122
123
  * @param {CellphoneValidationDto} body
123
124
  * @param {string} authorization Custom header
125
+ * @param {string} apikey
124
126
  * @param {*} [options] Override http request option.
125
127
  * @throws {RequiredError}
126
128
  */
127
- async validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
128
- return CellphoneApiFp(configuration).validate(body, authorization, options).then((request) => request(axios, basePath));
129
+ async validate(body: CellphoneValidationDto, authorization: string, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
130
+ return CellphoneApiFp(configuration).validate(body, authorization, apikey, options).then((request) => request(axios, basePath));
129
131
  },
130
132
  };
131
133
  };
@@ -141,11 +143,12 @@ export class CellphoneApi extends BaseAPI {
141
143
  *
142
144
  * @param {CellphoneValidationDto} body
143
145
  * @param {string} authorization Custom header
146
+ * @param {string} apikey
144
147
  * @param {*} [options] Override http request option.
145
148
  * @throws {RequiredError}
146
149
  * @memberof CellphoneApi
147
150
  */
148
- public async validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
149
- return CellphoneApiFp(this.configuration).validate(body, authorization, options).then((request) => request(this.axios, this.basePath));
151
+ public async validate(body: CellphoneValidationDto, authorization: string, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
152
+ return CellphoneApiFp(this.configuration).validate(body, authorization, apikey, options).then((request) => request(this.axios, this.basePath));
150
153
  }
151
154
  }
package/apis/chats-api.ts CHANGED
@@ -31,14 +31,19 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
31
31
  /**
32
32
  *
33
33
  * @param {AssignToMeDto} body
34
+ * @param {string} apikey
34
35
  * @param {*} [options] Override http request option.
35
36
  * @throws {RequiredError}
36
37
  */
37
- assignToSeller: async (body: AssignToMeDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
38
+ assignToSeller: async (body: AssignToMeDto, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
38
39
  // verify required parameter 'body' is not null or undefined
39
40
  if (body === null || body === undefined) {
40
41
  throw new RequiredError('body','Required parameter body was null or undefined when calling assignToSeller.');
41
42
  }
43
+ // verify required parameter 'apikey' is not null or undefined
44
+ if (apikey === null || apikey === undefined) {
45
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling assignToSeller.');
46
+ }
42
47
  const localVarPath = `/api/chats/assign-to-seller`;
43
48
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
44
49
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -50,6 +55,10 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
50
55
  const localVarHeaderParameter = {} as any;
51
56
  const localVarQueryParameter = {} as any;
52
57
 
58
+ if (apikey !== undefined && apikey !== null) {
59
+ localVarHeaderParameter['apikey'] = String(apikey);
60
+ }
61
+
53
62
  localVarHeaderParameter['Content-Type'] = 'application/json';
54
63
 
55
64
  const query = new URLSearchParams(localVarUrlObj.search);
@@ -73,16 +82,21 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
73
82
  /**
74
83
  *
75
84
  * @param {AssignmentTypeDto} body
85
+ * @param {string} apikey
76
86
  * @param {string} cellphone
77
87
  * @param {number} id
78
88
  * @param {*} [options] Override http request option.
79
89
  * @throws {RequiredError}
80
90
  */
81
- assignmentType: async (body: AssignmentTypeDto, cellphone: string, id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
+ assignmentType: async (body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
82
92
  // verify required parameter 'body' is not null or undefined
83
93
  if (body === null || body === undefined) {
84
94
  throw new RequiredError('body','Required parameter body was null or undefined when calling assignmentType.');
85
95
  }
96
+ // verify required parameter 'apikey' is not null or undefined
97
+ if (apikey === null || apikey === undefined) {
98
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling assignmentType.');
99
+ }
86
100
  // verify required parameter 'cellphone' is not null or undefined
87
101
  if (cellphone === null || cellphone === undefined) {
88
102
  throw new RequiredError('cellphone','Required parameter cellphone was null or undefined when calling assignmentType.');
@@ -104,6 +118,10 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
104
118
  const localVarHeaderParameter = {} as any;
105
119
  const localVarQueryParameter = {} as any;
106
120
 
121
+ if (apikey !== undefined && apikey !== null) {
122
+ localVarHeaderParameter['apikey'] = String(apikey);
123
+ }
124
+
107
125
  localVarHeaderParameter['Content-Type'] = 'application/json';
108
126
 
109
127
  const query = new URLSearchParams(localVarUrlObj.search);
@@ -127,14 +145,19 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
127
145
  /**
128
146
  *
129
147
  * @param {number} id
148
+ * @param {string} apikey
130
149
  * @param {*} [options] Override http request option.
131
150
  * @throws {RequiredError}
132
151
  */
133
- getChat: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
152
+ getChat: async (id: number, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
134
153
  // verify required parameter 'id' is not null or undefined
135
154
  if (id === null || id === undefined) {
136
155
  throw new RequiredError('id','Required parameter id was null or undefined when calling getChat.');
137
156
  }
157
+ // verify required parameter 'apikey' is not null or undefined
158
+ if (apikey === null || apikey === undefined) {
159
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getChat.');
160
+ }
138
161
  const localVarPath = `/api/chats/{id}`
139
162
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
140
163
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -147,6 +170,10 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
147
170
  const localVarHeaderParameter = {} as any;
148
171
  const localVarQueryParameter = {} as any;
149
172
 
173
+ if (apikey !== undefined && apikey !== null) {
174
+ localVarHeaderParameter['apikey'] = String(apikey);
175
+ }
176
+
150
177
  const query = new URLSearchParams(localVarUrlObj.search);
151
178
  for (const key in localVarQueryParameter) {
152
179
  query.set(key, localVarQueryParameter[key]);
@@ -262,15 +289,20 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
262
289
  /**
263
290
  *
264
291
  * @param {MarkChatUnreadDto} body
292
+ * @param {string} apikey
265
293
  * @param {number} id
266
294
  * @param {*} [options] Override http request option.
267
295
  * @throws {RequiredError}
268
296
  */
269
- markChatUnread: async (body: MarkChatUnreadDto, id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
297
+ markChatUnread: async (body: MarkChatUnreadDto, apikey: string, id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
270
298
  // verify required parameter 'body' is not null or undefined
271
299
  if (body === null || body === undefined) {
272
300
  throw new RequiredError('body','Required parameter body was null or undefined when calling markChatUnread.');
273
301
  }
302
+ // verify required parameter 'apikey' is not null or undefined
303
+ if (apikey === null || apikey === undefined) {
304
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling markChatUnread.');
305
+ }
274
306
  // verify required parameter 'id' is not null or undefined
275
307
  if (id === null || id === undefined) {
276
308
  throw new RequiredError('id','Required parameter id was null or undefined when calling markChatUnread.');
@@ -287,6 +319,10 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
287
319
  const localVarHeaderParameter = {} as any;
288
320
  const localVarQueryParameter = {} as any;
289
321
 
322
+ if (apikey !== undefined && apikey !== null) {
323
+ localVarHeaderParameter['apikey'] = String(apikey);
324
+ }
325
+
290
326
  localVarHeaderParameter['Content-Type'] = 'application/json';
291
327
 
292
328
  const query = new URLSearchParams(localVarUrlObj.search);
@@ -319,11 +355,12 @@ export const ChatsApiFp = function(configuration?: Configuration) {
319
355
  /**
320
356
  *
321
357
  * @param {AssignToMeDto} body
358
+ * @param {string} apikey
322
359
  * @param {*} [options] Override http request option.
323
360
  * @throws {RequiredError}
324
361
  */
325
- async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
326
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignToSeller(body, options);
362
+ async assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
363
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignToSeller(body, apikey, options);
327
364
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
328
365
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
329
366
  return axios.request(axiosRequestArgs);
@@ -332,13 +369,14 @@ export const ChatsApiFp = function(configuration?: Configuration) {
332
369
  /**
333
370
  *
334
371
  * @param {AssignmentTypeDto} body
372
+ * @param {string} apikey
335
373
  * @param {string} cellphone
336
374
  * @param {number} id
337
375
  * @param {*} [options] Override http request option.
338
376
  * @throws {RequiredError}
339
377
  */
340
- async assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
341
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignmentType(body, cellphone, id, options);
378
+ async assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
379
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignmentType(body, apikey, cellphone, id, options);
342
380
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
343
381
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
344
382
  return axios.request(axiosRequestArgs);
@@ -347,11 +385,12 @@ export const ChatsApiFp = function(configuration?: Configuration) {
347
385
  /**
348
386
  *
349
387
  * @param {number} id
388
+ * @param {string} apikey
350
389
  * @param {*} [options] Override http request option.
351
390
  * @throws {RequiredError}
352
391
  */
353
- async getChat(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>> {
354
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChat(id, options);
392
+ async getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>> {
393
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChat(id, apikey, options);
355
394
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
356
395
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
357
396
  return axios.request(axiosRequestArgs);
@@ -383,12 +422,13 @@ export const ChatsApiFp = function(configuration?: Configuration) {
383
422
  /**
384
423
  *
385
424
  * @param {MarkChatUnreadDto} body
425
+ * @param {string} apikey
386
426
  * @param {number} id
387
427
  * @param {*} [options] Override http request option.
388
428
  * @throws {RequiredError}
389
429
  */
390
- async markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
391
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).markChatUnread(body, id, options);
430
+ async markChatUnread(body: MarkChatUnreadDto, apikey: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
431
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).markChatUnread(body, apikey, id, options);
392
432
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
393
433
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
394
434
  return axios.request(axiosRequestArgs);
@@ -406,31 +446,34 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
406
446
  /**
407
447
  *
408
448
  * @param {AssignToMeDto} body
449
+ * @param {string} apikey
409
450
  * @param {*} [options] Override http request option.
410
451
  * @throws {RequiredError}
411
452
  */
412
- async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
413
- return ChatsApiFp(configuration).assignToSeller(body, options).then((request) => request(axios, basePath));
453
+ async assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
454
+ return ChatsApiFp(configuration).assignToSeller(body, apikey, options).then((request) => request(axios, basePath));
414
455
  },
415
456
  /**
416
457
  *
417
458
  * @param {AssignmentTypeDto} body
459
+ * @param {string} apikey
418
460
  * @param {string} cellphone
419
461
  * @param {number} id
420
462
  * @param {*} [options] Override http request option.
421
463
  * @throws {RequiredError}
422
464
  */
423
- async assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
424
- return ChatsApiFp(configuration).assignmentType(body, cellphone, id, options).then((request) => request(axios, basePath));
465
+ async assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
466
+ return ChatsApiFp(configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(axios, basePath));
425
467
  },
426
468
  /**
427
469
  *
428
470
  * @param {number} id
471
+ * @param {string} apikey
429
472
  * @param {*} [options] Override http request option.
430
473
  * @throws {RequiredError}
431
474
  */
432
- async getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>> {
433
- return ChatsApiFp(configuration).getChat(id, options).then((request) => request(axios, basePath));
475
+ async getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>> {
476
+ return ChatsApiFp(configuration).getChat(id, apikey, options).then((request) => request(axios, basePath));
434
477
  },
435
478
  /**
436
479
  *
@@ -454,12 +497,13 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
454
497
  /**
455
498
  *
456
499
  * @param {MarkChatUnreadDto} body
500
+ * @param {string} apikey
457
501
  * @param {number} id
458
502
  * @param {*} [options] Override http request option.
459
503
  * @throws {RequiredError}
460
504
  */
461
- async markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
462
- return ChatsApiFp(configuration).markChatUnread(body, id, options).then((request) => request(axios, basePath));
505
+ async markChatUnread(body: MarkChatUnreadDto, apikey: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
506
+ return ChatsApiFp(configuration).markChatUnread(body, apikey, id, options).then((request) => request(axios, basePath));
463
507
  },
464
508
  };
465
509
  };
@@ -474,34 +518,37 @@ export class ChatsApi extends BaseAPI {
474
518
  /**
475
519
  *
476
520
  * @param {AssignToMeDto} body
521
+ * @param {string} apikey
477
522
  * @param {*} [options] Override http request option.
478
523
  * @throws {RequiredError}
479
524
  * @memberof ChatsApi
480
525
  */
481
- public async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
482
- return ChatsApiFp(this.configuration).assignToSeller(body, options).then((request) => request(this.axios, this.basePath));
526
+ public async assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
527
+ return ChatsApiFp(this.configuration).assignToSeller(body, apikey, options).then((request) => request(this.axios, this.basePath));
483
528
  }
484
529
  /**
485
530
  *
486
531
  * @param {AssignmentTypeDto} body
532
+ * @param {string} apikey
487
533
  * @param {string} cellphone
488
534
  * @param {number} id
489
535
  * @param {*} [options] Override http request option.
490
536
  * @throws {RequiredError}
491
537
  * @memberof ChatsApi
492
538
  */
493
- public async assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
494
- return ChatsApiFp(this.configuration).assignmentType(body, cellphone, id, options).then((request) => request(this.axios, this.basePath));
539
+ public async assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
540
+ return ChatsApiFp(this.configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(this.axios, this.basePath));
495
541
  }
496
542
  /**
497
543
  *
498
544
  * @param {number} id
545
+ * @param {string} apikey
499
546
  * @param {*} [options] Override http request option.
500
547
  * @throws {RequiredError}
501
548
  * @memberof ChatsApi
502
549
  */
503
- public async getChat(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<WhatsappChatResponseDTO>> {
504
- return ChatsApiFp(this.configuration).getChat(id, options).then((request) => request(this.axios, this.basePath));
550
+ public async getChat(id: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<WhatsappChatResponseDTO>> {
551
+ return ChatsApiFp(this.configuration).getChat(id, apikey, options).then((request) => request(this.axios, this.basePath));
505
552
  }
506
553
  /**
507
554
  *
@@ -526,12 +573,13 @@ export class ChatsApi extends BaseAPI {
526
573
  /**
527
574
  *
528
575
  * @param {MarkChatUnreadDto} body
576
+ * @param {string} apikey
529
577
  * @param {number} id
530
578
  * @param {*} [options] Override http request option.
531
579
  * @throws {RequiredError}
532
580
  * @memberof ChatsApi
533
581
  */
534
- public async markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
535
- return ChatsApiFp(this.configuration).markChatUnread(body, id, options).then((request) => request(this.axios, this.basePath));
582
+ public async markChatUnread(body: MarkChatUnreadDto, apikey: string, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
583
+ return ChatsApiFp(this.configuration).markChatUnread(body, apikey, id, options).then((request) => request(this.axios, this.basePath));
536
584
  }
537
585
  }
@@ -29,10 +29,11 @@ export const ContactsApiAxiosParamCreator = function (configuration?: Configurat
29
29
  *
30
30
  * @param {number} cellphone
31
31
  * @param {number} branchId
32
+ * @param {string} apikey
32
33
  * @param {*} [options] Override http request option.
33
34
  * @throws {RequiredError}
34
35
  */
35
- getChatFromCellphone: async (cellphone: number, branchId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
36
+ getChatFromCellphone: async (cellphone: number, branchId: number, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
36
37
  // verify required parameter 'cellphone' is not null or undefined
37
38
  if (cellphone === null || cellphone === undefined) {
38
39
  throw new RequiredError('cellphone','Required parameter cellphone was null or undefined when calling getChatFromCellphone.');
@@ -41,6 +42,10 @@ export const ContactsApiAxiosParamCreator = function (configuration?: Configurat
41
42
  if (branchId === null || branchId === undefined) {
42
43
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChatFromCellphone.');
43
44
  }
45
+ // verify required parameter 'apikey' is not null or undefined
46
+ if (apikey === null || apikey === undefined) {
47
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getChatFromCellphone.');
48
+ }
44
49
  const localVarPath = `/api/contacts/{cellphone}/chat`
45
50
  .replace(`{${"cellphone"}}`, encodeURIComponent(String(cellphone)));
46
51
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -57,6 +62,10 @@ export const ContactsApiAxiosParamCreator = function (configuration?: Configurat
57
62
  localVarQueryParameter['branchId'] = branchId;
58
63
  }
59
64
 
65
+ if (apikey !== undefined && apikey !== null) {
66
+ localVarHeaderParameter['apikey'] = String(apikey);
67
+ }
68
+
60
69
  const query = new URLSearchParams(localVarUrlObj.search);
61
70
  for (const key in localVarQueryParameter) {
62
71
  query.set(key, localVarQueryParameter[key]);
@@ -76,14 +85,19 @@ export const ContactsApiAxiosParamCreator = function (configuration?: Configurat
76
85
  /**
77
86
  *
78
87
  * @param {number} branchId
88
+ * @param {string} apikey
79
89
  * @param {*} [options] Override http request option.
80
90
  * @throws {RequiredError}
81
91
  */
82
- getContacts: async (branchId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
92
+ getContacts: async (branchId: number, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
83
93
  // verify required parameter 'branchId' is not null or undefined
84
94
  if (branchId === null || branchId === undefined) {
85
95
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getContacts.');
86
96
  }
97
+ // verify required parameter 'apikey' is not null or undefined
98
+ if (apikey === null || apikey === undefined) {
99
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getContacts.');
100
+ }
87
101
  const localVarPath = `/api/contacts`;
88
102
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
89
103
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -99,6 +113,10 @@ export const ContactsApiAxiosParamCreator = function (configuration?: Configurat
99
113
  localVarQueryParameter['branchId'] = branchId;
100
114
  }
101
115
 
116
+ if (apikey !== undefined && apikey !== null) {
117
+ localVarHeaderParameter['apikey'] = String(apikey);
118
+ }
119
+
102
120
  const query = new URLSearchParams(localVarUrlObj.search);
103
121
  for (const key in localVarQueryParameter) {
104
122
  query.set(key, localVarQueryParameter[key]);
@@ -128,11 +146,12 @@ export const ContactsApiFp = function(configuration?: Configuration) {
128
146
  *
129
147
  * @param {number} cellphone
130
148
  * @param {number} branchId
149
+ * @param {string} apikey
131
150
  * @param {*} [options] Override http request option.
132
151
  * @throws {RequiredError}
133
152
  */
134
- async getChatFromCellphone(cellphone: number, branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>> {
135
- const localVarAxiosArgs = await ContactsApiAxiosParamCreator(configuration).getChatFromCellphone(cellphone, branchId, options);
153
+ async getChatFromCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>> {
154
+ const localVarAxiosArgs = await ContactsApiAxiosParamCreator(configuration).getChatFromCellphone(cellphone, branchId, apikey, options);
136
155
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
137
156
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
138
157
  return axios.request(axiosRequestArgs);
@@ -141,11 +160,12 @@ export const ContactsApiFp = function(configuration?: Configuration) {
141
160
  /**
142
161
  *
143
162
  * @param {number} branchId
163
+ * @param {string} apikey
144
164
  * @param {*} [options] Override http request option.
145
165
  * @throws {RequiredError}
146
166
  */
147
- async getContacts(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>> {
148
- const localVarAxiosArgs = await ContactsApiAxiosParamCreator(configuration).getContacts(branchId, options);
167
+ async getContacts(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>> {
168
+ const localVarAxiosArgs = await ContactsApiAxiosParamCreator(configuration).getContacts(branchId, apikey, options);
149
169
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
150
170
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
151
171
  return axios.request(axiosRequestArgs);
@@ -164,20 +184,22 @@ export const ContactsApiFactory = function (configuration?: Configuration, baseP
164
184
  *
165
185
  * @param {number} cellphone
166
186
  * @param {number} branchId
187
+ * @param {string} apikey
167
188
  * @param {*} [options] Override http request option.
168
189
  * @throws {RequiredError}
169
190
  */
170
- async getChatFromCellphone(cellphone: number, branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>> {
171
- return ContactsApiFp(configuration).getChatFromCellphone(cellphone, branchId, options).then((request) => request(axios, basePath));
191
+ async getChatFromCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>> {
192
+ return ContactsApiFp(configuration).getChatFromCellphone(cellphone, branchId, apikey, options).then((request) => request(axios, basePath));
172
193
  },
173
194
  /**
174
195
  *
175
196
  * @param {number} branchId
197
+ * @param {string} apikey
176
198
  * @param {*} [options] Override http request option.
177
199
  * @throws {RequiredError}
178
200
  */
179
- async getContacts(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>> {
180
- return ContactsApiFp(configuration).getContacts(branchId, options).then((request) => request(axios, basePath));
201
+ async getContacts(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>> {
202
+ return ContactsApiFp(configuration).getContacts(branchId, apikey, options).then((request) => request(axios, basePath));
181
203
  },
182
204
  };
183
205
  };
@@ -193,21 +215,23 @@ export class ContactsApi extends BaseAPI {
193
215
  *
194
216
  * @param {number} cellphone
195
217
  * @param {number} branchId
218
+ * @param {string} apikey
196
219
  * @param {*} [options] Override http request option.
197
220
  * @throws {RequiredError}
198
221
  * @memberof ContactsApi
199
222
  */
200
- public async getChatFromCellphone(cellphone: number, branchId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<WhatsappChatResponseDTO>> {
201
- return ContactsApiFp(this.configuration).getChatFromCellphone(cellphone, branchId, options).then((request) => request(this.axios, this.basePath));
223
+ public async getChatFromCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<WhatsappChatResponseDTO>> {
224
+ return ContactsApiFp(this.configuration).getChatFromCellphone(cellphone, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
202
225
  }
203
226
  /**
204
227
  *
205
228
  * @param {number} branchId
229
+ * @param {string} apikey
206
230
  * @param {*} [options] Override http request option.
207
231
  * @throws {RequiredError}
208
232
  * @memberof ContactsApi
209
233
  */
210
- public async getContacts(branchId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ContactsResponseDTO>> {
211
- return ContactsApiFp(this.configuration).getContacts(branchId, options).then((request) => request(this.axios, this.basePath));
234
+ public async getContacts(branchId: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ContactsResponseDTO>> {
235
+ return ContactsApiFp(this.configuration).getContacts(branchId, apikey, options).then((request) => request(this.axios, this.basePath));
212
236
  }
213
237
  }