@libgot/whatsapp-bridge-sdk 1.0.39 → 1.0.40-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/.nvmrc CHANGED
@@ -1 +1 @@
1
- lts/*
1
+ 24.9.0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @1.0.39
1
+ ## @1.0.40-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.39 --save
39
+ npm install @libgot/whatsapp-bridge-sdk@1.0.40-rc.2 --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]);
@@ -166,6 +193,7 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
166
193
  /**
167
194
  *
168
195
  * @param {number} branchId
196
+ * @param {string} apikey
169
197
  * @param {string} [q]
170
198
  * @param {boolean} [unassigned]
171
199
  * @param {boolean} [unread]
@@ -178,11 +206,15 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
178
206
  * @param {*} [options] Override http request option.
179
207
  * @throws {RequiredError}
180
208
  */
181
- getChats: async (branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
209
+ getChats: async (branchId: number, apikey: string, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
182
210
  // verify required parameter 'branchId' is not null or undefined
183
211
  if (branchId === null || branchId === undefined) {
184
212
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChats.');
185
213
  }
214
+ // verify required parameter 'apikey' is not null or undefined
215
+ if (apikey === null || apikey === undefined) {
216
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getChats.');
217
+ }
186
218
  const localVarPath = `/api/chats`;
187
219
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
188
220
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -234,6 +266,10 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
234
266
  localVarQueryParameter['assignmentTypeCode'] = assignmentTypeCode;
235
267
  }
236
268
 
269
+ if (apikey !== undefined && apikey !== null) {
270
+ localVarHeaderParameter['apikey'] = String(apikey);
271
+ }
272
+
237
273
  const query = new URLSearchParams(localVarUrlObj.search);
238
274
  for (const key in localVarQueryParameter) {
239
275
  query.set(key, localVarQueryParameter[key]);
@@ -310,11 +346,12 @@ export const ChatsApiFp = function(configuration?: Configuration) {
310
346
  /**
311
347
  *
312
348
  * @param {AssignToMeDto} body
349
+ * @param {string} apikey
313
350
  * @param {*} [options] Override http request option.
314
351
  * @throws {RequiredError}
315
352
  */
316
- async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
317
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignToSeller(body, options);
353
+ async assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
354
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignToSeller(body, apikey, options);
318
355
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
319
356
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
320
357
  return axios.request(axiosRequestArgs);
@@ -323,13 +360,14 @@ export const ChatsApiFp = function(configuration?: Configuration) {
323
360
  /**
324
361
  *
325
362
  * @param {AssignmentTypeDto} body
363
+ * @param {string} apikey
326
364
  * @param {string} cellphone
327
365
  * @param {number} id
328
366
  * @param {*} [options] Override http request option.
329
367
  * @throws {RequiredError}
330
368
  */
331
- async assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
332
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignmentType(body, cellphone, id, options);
369
+ async assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
370
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).assignmentType(body, apikey, cellphone, id, options);
333
371
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
334
372
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
335
373
  return axios.request(axiosRequestArgs);
@@ -338,11 +376,12 @@ export const ChatsApiFp = function(configuration?: Configuration) {
338
376
  /**
339
377
  *
340
378
  * @param {number} id
379
+ * @param {string} apikey
341
380
  * @param {*} [options] Override http request option.
342
381
  * @throws {RequiredError}
343
382
  */
344
- async getChat(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>> {
345
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChat(id, options);
383
+ async getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>> {
384
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChat(id, apikey, options);
346
385
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
347
386
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
348
387
  return axios.request(axiosRequestArgs);
@@ -351,6 +390,7 @@ export const ChatsApiFp = function(configuration?: Configuration) {
351
390
  /**
352
391
  *
353
392
  * @param {number} branchId
393
+ * @param {string} apikey
354
394
  * @param {string} [q]
355
395
  * @param {boolean} [unassigned]
356
396
  * @param {boolean} [unread]
@@ -363,8 +403,8 @@ export const ChatsApiFp = function(configuration?: Configuration) {
363
403
  * @param {*} [options] Override http request option.
364
404
  * @throws {RequiredError}
365
405
  */
366
- async getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>> {
367
- const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, assignmentTypeCode, options);
406
+ async getChats(branchId: number, apikey: string, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>> {
407
+ const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, apikey, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, assignmentTypeCode, options);
368
408
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
369
409
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
370
410
  return axios.request(axiosRequestArgs);
@@ -396,35 +436,39 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
396
436
  /**
397
437
  *
398
438
  * @param {AssignToMeDto} body
439
+ * @param {string} apikey
399
440
  * @param {*} [options] Override http request option.
400
441
  * @throws {RequiredError}
401
442
  */
402
- async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
403
- return ChatsApiFp(configuration).assignToSeller(body, options).then((request) => request(axios, basePath));
443
+ async assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
444
+ return ChatsApiFp(configuration).assignToSeller(body, apikey, options).then((request) => request(axios, basePath));
404
445
  },
405
446
  /**
406
447
  *
407
448
  * @param {AssignmentTypeDto} body
449
+ * @param {string} apikey
408
450
  * @param {string} cellphone
409
451
  * @param {number} id
410
452
  * @param {*} [options] Override http request option.
411
453
  * @throws {RequiredError}
412
454
  */
413
- async assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
414
- return ChatsApiFp(configuration).assignmentType(body, cellphone, id, options).then((request) => request(axios, basePath));
455
+ async assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
456
+ return ChatsApiFp(configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(axios, basePath));
415
457
  },
416
458
  /**
417
459
  *
418
460
  * @param {number} id
461
+ * @param {string} apikey
419
462
  * @param {*} [options] Override http request option.
420
463
  * @throws {RequiredError}
421
464
  */
422
- async getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>> {
423
- return ChatsApiFp(configuration).getChat(id, options).then((request) => request(axios, basePath));
465
+ async getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>> {
466
+ return ChatsApiFp(configuration).getChat(id, apikey, options).then((request) => request(axios, basePath));
424
467
  },
425
468
  /**
426
469
  *
427
470
  * @param {number} branchId
471
+ * @param {string} apikey
428
472
  * @param {string} [q]
429
473
  * @param {boolean} [unassigned]
430
474
  * @param {boolean} [unread]
@@ -437,8 +481,8 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
437
481
  * @param {*} [options] Override http request option.
438
482
  * @throws {RequiredError}
439
483
  */
440
- async getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>> {
441
- return ChatsApiFp(configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, assignmentTypeCode, options).then((request) => request(axios, basePath));
484
+ async getChats(branchId: number, apikey: string, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>> {
485
+ return ChatsApiFp(configuration).getChats(branchId, apikey, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, assignmentTypeCode, options).then((request) => request(axios, basePath));
442
486
  },
443
487
  /**
444
488
  *
@@ -463,38 +507,42 @@ export class ChatsApi extends BaseAPI {
463
507
  /**
464
508
  *
465
509
  * @param {AssignToMeDto} body
510
+ * @param {string} apikey
466
511
  * @param {*} [options] Override http request option.
467
512
  * @throws {RequiredError}
468
513
  * @memberof ChatsApi
469
514
  */
470
- public async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
471
- return ChatsApiFp(this.configuration).assignToSeller(body, options).then((request) => request(this.axios, this.basePath));
515
+ public async assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
516
+ return ChatsApiFp(this.configuration).assignToSeller(body, apikey, options).then((request) => request(this.axios, this.basePath));
472
517
  }
473
518
  /**
474
519
  *
475
520
  * @param {AssignmentTypeDto} body
521
+ * @param {string} apikey
476
522
  * @param {string} cellphone
477
523
  * @param {number} id
478
524
  * @param {*} [options] Override http request option.
479
525
  * @throws {RequiredError}
480
526
  * @memberof ChatsApi
481
527
  */
482
- public async assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
483
- return ChatsApiFp(this.configuration).assignmentType(body, cellphone, id, options).then((request) => request(this.axios, this.basePath));
528
+ public async assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
529
+ return ChatsApiFp(this.configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(this.axios, this.basePath));
484
530
  }
485
531
  /**
486
532
  *
487
533
  * @param {number} id
534
+ * @param {string} apikey
488
535
  * @param {*} [options] Override http request option.
489
536
  * @throws {RequiredError}
490
537
  * @memberof ChatsApi
491
538
  */
492
- public async getChat(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<WhatsappChatResponseDTO>> {
493
- return ChatsApiFp(this.configuration).getChat(id, options).then((request) => request(this.axios, this.basePath));
539
+ public async getChat(id: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<WhatsappChatResponseDTO>> {
540
+ return ChatsApiFp(this.configuration).getChat(id, apikey, options).then((request) => request(this.axios, this.basePath));
494
541
  }
495
542
  /**
496
543
  *
497
544
  * @param {number} branchId
545
+ * @param {string} apikey
498
546
  * @param {string} [q]
499
547
  * @param {boolean} [unassigned]
500
548
  * @param {boolean} [unread]
@@ -508,8 +556,8 @@ export class ChatsApi extends BaseAPI {
508
556
  * @throws {RequiredError}
509
557
  * @memberof ChatsApi
510
558
  */
511
- public async getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginationChatResponseDto>> {
512
- return ChatsApiFp(this.configuration).getChats(branchId, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, assignmentTypeCode, options).then((request) => request(this.axios, this.basePath));
559
+ public async getChats(branchId: number, apikey: string, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, assignmentTypeCode?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginationChatResponseDto>> {
560
+ return ChatsApiFp(this.configuration).getChats(branchId, apikey, q, unassigned, unread, rowsPerPage, currentPage, userId, externallyInitiated, id, assignmentTypeCode, options).then((request) => request(this.axios, this.basePath));
513
561
  }
514
562
  /**
515
563
  *
@@ -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
  }