@libgot/whatsapp-bridge-sdk 1.0.40-rc.1 → 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 +1 -1
- package/README.md +2 -2
- package/apis/cellphone-api.ts +19 -16
- package/apis/chats-api.ts +57 -21
- package/apis/contacts-api.ts +38 -14
- package/apis/messages-api.ts +76 -28
- package/apis/sessions-api.ts +38 -14
- package/dist/apis/cellphone-api.d.ts +8 -4
- package/dist/apis/cellphone-api.js +18 -15
- package/dist/apis/chats-api.d.ts +24 -12
- package/dist/apis/chats-api.js +54 -21
- package/dist/apis/contacts-api.d.ts +16 -8
- package/dist/apis/contacts-api.js +36 -14
- package/dist/apis/messages-api.d.ts +32 -16
- package/dist/apis/messages-api.js +72 -28
- package/dist/apis/sessions-api.d.ts +16 -8
- package/dist/apis/sessions-api.js +36 -14
- package/package.json +1 -1
- package/publish.sh +1 -1
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24.9.0
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @1.0.40-rc.
|
|
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.40-rc.
|
|
39
|
+
npm install @libgot/whatsapp-bridge-sdk@1.0.40-rc.2 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/apis/cellphone-api.ts
CHANGED
|
@@ -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]);
|
|
@@ -319,11 +346,12 @@ export const ChatsApiFp = function(configuration?: Configuration) {
|
|
|
319
346
|
/**
|
|
320
347
|
*
|
|
321
348
|
* @param {AssignToMeDto} body
|
|
349
|
+
* @param {string} apikey
|
|
322
350
|
* @param {*} [options] Override http request option.
|
|
323
351
|
* @throws {RequiredError}
|
|
324
352
|
*/
|
|
325
|
-
async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
326
|
-
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);
|
|
327
355
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
328
356
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
329
357
|
return axios.request(axiosRequestArgs);
|
|
@@ -332,13 +360,14 @@ export const ChatsApiFp = function(configuration?: Configuration) {
|
|
|
332
360
|
/**
|
|
333
361
|
*
|
|
334
362
|
* @param {AssignmentTypeDto} body
|
|
363
|
+
* @param {string} apikey
|
|
335
364
|
* @param {string} cellphone
|
|
336
365
|
* @param {number} id
|
|
337
366
|
* @param {*} [options] Override http request option.
|
|
338
367
|
* @throws {RequiredError}
|
|
339
368
|
*/
|
|
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);
|
|
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);
|
|
342
371
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
343
372
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
344
373
|
return axios.request(axiosRequestArgs);
|
|
@@ -347,11 +376,12 @@ export const ChatsApiFp = function(configuration?: Configuration) {
|
|
|
347
376
|
/**
|
|
348
377
|
*
|
|
349
378
|
* @param {number} id
|
|
379
|
+
* @param {string} apikey
|
|
350
380
|
* @param {*} [options] Override http request option.
|
|
351
381
|
* @throws {RequiredError}
|
|
352
382
|
*/
|
|
353
|
-
async getChat(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>> {
|
|
354
|
-
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);
|
|
355
385
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
356
386
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
357
387
|
return axios.request(axiosRequestArgs);
|
|
@@ -406,31 +436,34 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
|
|
|
406
436
|
/**
|
|
407
437
|
*
|
|
408
438
|
* @param {AssignToMeDto} body
|
|
439
|
+
* @param {string} apikey
|
|
409
440
|
* @param {*} [options] Override http request option.
|
|
410
441
|
* @throws {RequiredError}
|
|
411
442
|
*/
|
|
412
|
-
async assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
413
|
-
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));
|
|
414
445
|
},
|
|
415
446
|
/**
|
|
416
447
|
*
|
|
417
448
|
* @param {AssignmentTypeDto} body
|
|
449
|
+
* @param {string} apikey
|
|
418
450
|
* @param {string} cellphone
|
|
419
451
|
* @param {number} id
|
|
420
452
|
* @param {*} [options] Override http request option.
|
|
421
453
|
* @throws {RequiredError}
|
|
422
454
|
*/
|
|
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));
|
|
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));
|
|
425
457
|
},
|
|
426
458
|
/**
|
|
427
459
|
*
|
|
428
460
|
* @param {number} id
|
|
461
|
+
* @param {string} apikey
|
|
429
462
|
* @param {*} [options] Override http request option.
|
|
430
463
|
* @throws {RequiredError}
|
|
431
464
|
*/
|
|
432
|
-
async getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>> {
|
|
433
|
-
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));
|
|
434
467
|
},
|
|
435
468
|
/**
|
|
436
469
|
*
|
|
@@ -474,34 +507,37 @@ export class ChatsApi extends BaseAPI {
|
|
|
474
507
|
/**
|
|
475
508
|
*
|
|
476
509
|
* @param {AssignToMeDto} body
|
|
510
|
+
* @param {string} apikey
|
|
477
511
|
* @param {*} [options] Override http request option.
|
|
478
512
|
* @throws {RequiredError}
|
|
479
513
|
* @memberof ChatsApi
|
|
480
514
|
*/
|
|
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));
|
|
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));
|
|
483
517
|
}
|
|
484
518
|
/**
|
|
485
519
|
*
|
|
486
520
|
* @param {AssignmentTypeDto} body
|
|
521
|
+
* @param {string} apikey
|
|
487
522
|
* @param {string} cellphone
|
|
488
523
|
* @param {number} id
|
|
489
524
|
* @param {*} [options] Override http request option.
|
|
490
525
|
* @throws {RequiredError}
|
|
491
526
|
* @memberof ChatsApi
|
|
492
527
|
*/
|
|
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));
|
|
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));
|
|
495
530
|
}
|
|
496
531
|
/**
|
|
497
532
|
*
|
|
498
533
|
* @param {number} id
|
|
534
|
+
* @param {string} apikey
|
|
499
535
|
* @param {*} [options] Override http request option.
|
|
500
536
|
* @throws {RequiredError}
|
|
501
537
|
* @memberof ChatsApi
|
|
502
538
|
*/
|
|
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));
|
|
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));
|
|
505
541
|
}
|
|
506
542
|
/**
|
|
507
543
|
*
|
package/apis/contacts-api.ts
CHANGED
|
@@ -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
|
}
|