@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/dist/apis/chats-api.d.ts
CHANGED
|
@@ -25,26 +25,29 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
* @param {AssignToMeDto} body
|
|
28
|
+
* @param {string} apikey
|
|
28
29
|
* @param {*} [options] Override http request option.
|
|
29
30
|
* @throws {RequiredError}
|
|
30
31
|
*/
|
|
31
|
-
assignToSeller: (body: AssignToMeDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
|
+
assignToSeller: (body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
33
|
/**
|
|
33
34
|
*
|
|
34
35
|
* @param {AssignmentTypeDto} body
|
|
36
|
+
* @param {string} apikey
|
|
35
37
|
* @param {string} cellphone
|
|
36
38
|
* @param {number} id
|
|
37
39
|
* @param {*} [options] Override http request option.
|
|
38
40
|
* @throws {RequiredError}
|
|
39
41
|
*/
|
|
40
|
-
assignmentType: (body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
42
|
+
assignmentType: (body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
41
43
|
/**
|
|
42
44
|
*
|
|
43
45
|
* @param {number} id
|
|
46
|
+
* @param {string} apikey
|
|
44
47
|
* @param {*} [options] Override http request option.
|
|
45
48
|
* @throws {RequiredError}
|
|
46
49
|
*/
|
|
47
|
-
getChat: (id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
50
|
+
getChat: (id: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
48
51
|
/**
|
|
49
52
|
*
|
|
50
53
|
* @param {number} branchId
|
|
@@ -79,26 +82,29 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
79
82
|
/**
|
|
80
83
|
*
|
|
81
84
|
* @param {AssignToMeDto} body
|
|
85
|
+
* @param {string} apikey
|
|
82
86
|
* @param {*} [options] Override http request option.
|
|
83
87
|
* @throws {RequiredError}
|
|
84
88
|
*/
|
|
85
|
-
assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
89
|
+
assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
86
90
|
/**
|
|
87
91
|
*
|
|
88
92
|
* @param {AssignmentTypeDto} body
|
|
93
|
+
* @param {string} apikey
|
|
89
94
|
* @param {string} cellphone
|
|
90
95
|
* @param {number} id
|
|
91
96
|
* @param {*} [options] Override http request option.
|
|
92
97
|
* @throws {RequiredError}
|
|
93
98
|
*/
|
|
94
|
-
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
99
|
+
assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
95
100
|
/**
|
|
96
101
|
*
|
|
97
102
|
* @param {number} id
|
|
103
|
+
* @param {string} apikey
|
|
98
104
|
* @param {*} [options] Override http request option.
|
|
99
105
|
* @throws {RequiredError}
|
|
100
106
|
*/
|
|
101
|
-
getChat(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>>;
|
|
107
|
+
getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>>;
|
|
102
108
|
/**
|
|
103
109
|
*
|
|
104
110
|
* @param {number} branchId
|
|
@@ -133,26 +139,29 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
133
139
|
/**
|
|
134
140
|
*
|
|
135
141
|
* @param {AssignToMeDto} body
|
|
142
|
+
* @param {string} apikey
|
|
136
143
|
* @param {*} [options] Override http request option.
|
|
137
144
|
* @throws {RequiredError}
|
|
138
145
|
*/
|
|
139
|
-
assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
146
|
+
assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
140
147
|
/**
|
|
141
148
|
*
|
|
142
149
|
* @param {AssignmentTypeDto} body
|
|
150
|
+
* @param {string} apikey
|
|
143
151
|
* @param {string} cellphone
|
|
144
152
|
* @param {number} id
|
|
145
153
|
* @param {*} [options] Override http request option.
|
|
146
154
|
* @throws {RequiredError}
|
|
147
155
|
*/
|
|
148
|
-
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
156
|
+
assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
149
157
|
/**
|
|
150
158
|
*
|
|
151
159
|
* @param {number} id
|
|
160
|
+
* @param {string} apikey
|
|
152
161
|
* @param {*} [options] Override http request option.
|
|
153
162
|
* @throws {RequiredError}
|
|
154
163
|
*/
|
|
155
|
-
getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
164
|
+
getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
156
165
|
/**
|
|
157
166
|
*
|
|
158
167
|
* @param {number} branchId
|
|
@@ -189,29 +198,32 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
189
198
|
/**
|
|
190
199
|
*
|
|
191
200
|
* @param {AssignToMeDto} body
|
|
201
|
+
* @param {string} apikey
|
|
192
202
|
* @param {*} [options] Override http request option.
|
|
193
203
|
* @throws {RequiredError}
|
|
194
204
|
* @memberof ChatsApi
|
|
195
205
|
*/
|
|
196
|
-
assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
206
|
+
assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
197
207
|
/**
|
|
198
208
|
*
|
|
199
209
|
* @param {AssignmentTypeDto} body
|
|
210
|
+
* @param {string} apikey
|
|
200
211
|
* @param {string} cellphone
|
|
201
212
|
* @param {number} id
|
|
202
213
|
* @param {*} [options] Override http request option.
|
|
203
214
|
* @throws {RequiredError}
|
|
204
215
|
* @memberof ChatsApi
|
|
205
216
|
*/
|
|
206
|
-
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
217
|
+
assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
207
218
|
/**
|
|
208
219
|
*
|
|
209
220
|
* @param {number} id
|
|
221
|
+
* @param {string} apikey
|
|
210
222
|
* @param {*} [options] Override http request option.
|
|
211
223
|
* @throws {RequiredError}
|
|
212
224
|
* @memberof ChatsApi
|
|
213
225
|
*/
|
|
214
|
-
getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
226
|
+
getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
215
227
|
/**
|
|
216
228
|
*
|
|
217
229
|
* @param {number} branchId
|
package/dist/apis/chats-api.js
CHANGED
|
@@ -36,14 +36,19 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @param {AssignToMeDto} body
|
|
39
|
+
* @param {string} apikey
|
|
39
40
|
* @param {*} [options] Override http request option.
|
|
40
41
|
* @throws {RequiredError}
|
|
41
42
|
*/
|
|
42
|
-
assignToSeller: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
43
|
+
assignToSeller: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
|
|
43
44
|
// verify required parameter 'body' is not null or undefined
|
|
44
45
|
if (body === null || body === undefined) {
|
|
45
46
|
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling assignToSeller.');
|
|
46
47
|
}
|
|
48
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
49
|
+
if (apikey === null || apikey === undefined) {
|
|
50
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling assignToSeller.');
|
|
51
|
+
}
|
|
47
52
|
const localVarPath = `/api/chats/assign-to-seller`;
|
|
48
53
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
54
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -54,6 +59,9 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
54
59
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
55
60
|
const localVarHeaderParameter = {};
|
|
56
61
|
const localVarQueryParameter = {};
|
|
62
|
+
if (apikey !== undefined && apikey !== null) {
|
|
63
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
64
|
+
}
|
|
57
65
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
58
66
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
59
67
|
for (const key in localVarQueryParameter) {
|
|
@@ -75,16 +83,21 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
75
83
|
/**
|
|
76
84
|
*
|
|
77
85
|
* @param {AssignmentTypeDto} body
|
|
86
|
+
* @param {string} apikey
|
|
78
87
|
* @param {string} cellphone
|
|
79
88
|
* @param {number} id
|
|
80
89
|
* @param {*} [options] Override http request option.
|
|
81
90
|
* @throws {RequiredError}
|
|
82
91
|
*/
|
|
83
|
-
assignmentType: (body_1, cellphone_1, id_1, ...args_1) => __awaiter(this, [body_1, cellphone_1, id_1, ...args_1], void 0, function* (body, cellphone, id, options = {}) {
|
|
92
|
+
assignmentType: (body_1, apikey_1, cellphone_1, id_1, ...args_1) => __awaiter(this, [body_1, apikey_1, cellphone_1, id_1, ...args_1], void 0, function* (body, apikey, cellphone, id, options = {}) {
|
|
84
93
|
// verify required parameter 'body' is not null or undefined
|
|
85
94
|
if (body === null || body === undefined) {
|
|
86
95
|
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling assignmentType.');
|
|
87
96
|
}
|
|
97
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
98
|
+
if (apikey === null || apikey === undefined) {
|
|
99
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling assignmentType.');
|
|
100
|
+
}
|
|
88
101
|
// verify required parameter 'cellphone' is not null or undefined
|
|
89
102
|
if (cellphone === null || cellphone === undefined) {
|
|
90
103
|
throw new base_1.RequiredError('cellphone', 'Required parameter cellphone was null or undefined when calling assignmentType.');
|
|
@@ -105,6 +118,9 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
105
118
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
106
119
|
const localVarHeaderParameter = {};
|
|
107
120
|
const localVarQueryParameter = {};
|
|
121
|
+
if (apikey !== undefined && apikey !== null) {
|
|
122
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
123
|
+
}
|
|
108
124
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
109
125
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
110
126
|
for (const key in localVarQueryParameter) {
|
|
@@ -126,14 +142,19 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
126
142
|
/**
|
|
127
143
|
*
|
|
128
144
|
* @param {number} id
|
|
145
|
+
* @param {string} apikey
|
|
129
146
|
* @param {*} [options] Override http request option.
|
|
130
147
|
* @throws {RequiredError}
|
|
131
148
|
*/
|
|
132
|
-
getChat: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
149
|
+
getChat: (id_1, apikey_1, ...args_1) => __awaiter(this, [id_1, apikey_1, ...args_1], void 0, function* (id, apikey, options = {}) {
|
|
133
150
|
// verify required parameter 'id' is not null or undefined
|
|
134
151
|
if (id === null || id === undefined) {
|
|
135
152
|
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling getChat.');
|
|
136
153
|
}
|
|
154
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
155
|
+
if (apikey === null || apikey === undefined) {
|
|
156
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getChat.');
|
|
157
|
+
}
|
|
137
158
|
const localVarPath = `/api/chats/{id}`
|
|
138
159
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
139
160
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -145,6 +166,9 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
145
166
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
146
167
|
const localVarHeaderParameter = {};
|
|
147
168
|
const localVarQueryParameter = {};
|
|
169
|
+
if (apikey !== undefined && apikey !== null) {
|
|
170
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
171
|
+
}
|
|
148
172
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
149
173
|
for (const key in localVarQueryParameter) {
|
|
150
174
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -300,12 +324,13 @@ const ChatsApiFp = function (configuration) {
|
|
|
300
324
|
/**
|
|
301
325
|
*
|
|
302
326
|
* @param {AssignToMeDto} body
|
|
327
|
+
* @param {string} apikey
|
|
303
328
|
* @param {*} [options] Override http request option.
|
|
304
329
|
* @throws {RequiredError}
|
|
305
330
|
*/
|
|
306
|
-
assignToSeller(body, options) {
|
|
331
|
+
assignToSeller(body, apikey, options) {
|
|
307
332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
-
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToSeller(body, options);
|
|
333
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToSeller(body, apikey, options);
|
|
309
334
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
310
335
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
311
336
|
return axios.request(axiosRequestArgs);
|
|
@@ -315,14 +340,15 @@ const ChatsApiFp = function (configuration) {
|
|
|
315
340
|
/**
|
|
316
341
|
*
|
|
317
342
|
* @param {AssignmentTypeDto} body
|
|
343
|
+
* @param {string} apikey
|
|
318
344
|
* @param {string} cellphone
|
|
319
345
|
* @param {number} id
|
|
320
346
|
* @param {*} [options] Override http request option.
|
|
321
347
|
* @throws {RequiredError}
|
|
322
348
|
*/
|
|
323
|
-
assignmentType(body, cellphone, id, options) {
|
|
349
|
+
assignmentType(body, apikey, cellphone, id, options) {
|
|
324
350
|
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
-
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignmentType(body, cellphone, id, options);
|
|
351
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignmentType(body, apikey, cellphone, id, options);
|
|
326
352
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
327
353
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
328
354
|
return axios.request(axiosRequestArgs);
|
|
@@ -332,12 +358,13 @@ const ChatsApiFp = function (configuration) {
|
|
|
332
358
|
/**
|
|
333
359
|
*
|
|
334
360
|
* @param {number} id
|
|
361
|
+
* @param {string} apikey
|
|
335
362
|
* @param {*} [options] Override http request option.
|
|
336
363
|
* @throws {RequiredError}
|
|
337
364
|
*/
|
|
338
|
-
getChat(id, options) {
|
|
365
|
+
getChat(id, apikey, options) {
|
|
339
366
|
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
-
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, options);
|
|
367
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, apikey, options);
|
|
341
368
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
342
369
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
343
370
|
return axios.request(axiosRequestArgs);
|
|
@@ -397,36 +424,39 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
397
424
|
/**
|
|
398
425
|
*
|
|
399
426
|
* @param {AssignToMeDto} body
|
|
427
|
+
* @param {string} apikey
|
|
400
428
|
* @param {*} [options] Override http request option.
|
|
401
429
|
* @throws {RequiredError}
|
|
402
430
|
*/
|
|
403
|
-
assignToSeller(body, options) {
|
|
431
|
+
assignToSeller(body, apikey, options) {
|
|
404
432
|
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
-
return (0, exports.ChatsApiFp)(configuration).assignToSeller(body, options).then((request) => request(axios, basePath));
|
|
433
|
+
return (0, exports.ChatsApiFp)(configuration).assignToSeller(body, apikey, options).then((request) => request(axios, basePath));
|
|
406
434
|
});
|
|
407
435
|
},
|
|
408
436
|
/**
|
|
409
437
|
*
|
|
410
438
|
* @param {AssignmentTypeDto} body
|
|
439
|
+
* @param {string} apikey
|
|
411
440
|
* @param {string} cellphone
|
|
412
441
|
* @param {number} id
|
|
413
442
|
* @param {*} [options] Override http request option.
|
|
414
443
|
* @throws {RequiredError}
|
|
415
444
|
*/
|
|
416
|
-
assignmentType(body, cellphone, id, options) {
|
|
445
|
+
assignmentType(body, apikey, cellphone, id, options) {
|
|
417
446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
418
|
-
return (0, exports.ChatsApiFp)(configuration).assignmentType(body, cellphone, id, options).then((request) => request(axios, basePath));
|
|
447
|
+
return (0, exports.ChatsApiFp)(configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(axios, basePath));
|
|
419
448
|
});
|
|
420
449
|
},
|
|
421
450
|
/**
|
|
422
451
|
*
|
|
423
452
|
* @param {number} id
|
|
453
|
+
* @param {string} apikey
|
|
424
454
|
* @param {*} [options] Override http request option.
|
|
425
455
|
* @throws {RequiredError}
|
|
426
456
|
*/
|
|
427
|
-
getChat(id, options) {
|
|
457
|
+
getChat(id, apikey, options) {
|
|
428
458
|
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
-
return (0, exports.ChatsApiFp)(configuration).getChat(id, options).then((request) => request(axios, basePath));
|
|
459
|
+
return (0, exports.ChatsApiFp)(configuration).getChat(id, apikey, options).then((request) => request(axios, basePath));
|
|
430
460
|
});
|
|
431
461
|
},
|
|
432
462
|
/**
|
|
@@ -475,39 +505,42 @@ class ChatsApi extends base_1.BaseAPI {
|
|
|
475
505
|
/**
|
|
476
506
|
*
|
|
477
507
|
* @param {AssignToMeDto} body
|
|
508
|
+
* @param {string} apikey
|
|
478
509
|
* @param {*} [options] Override http request option.
|
|
479
510
|
* @throws {RequiredError}
|
|
480
511
|
* @memberof ChatsApi
|
|
481
512
|
*/
|
|
482
|
-
assignToSeller(body, options) {
|
|
513
|
+
assignToSeller(body, apikey, options) {
|
|
483
514
|
return __awaiter(this, void 0, void 0, function* () {
|
|
484
|
-
return (0, exports.ChatsApiFp)(this.configuration).assignToSeller(body, options).then((request) => request(this.axios, this.basePath));
|
|
515
|
+
return (0, exports.ChatsApiFp)(this.configuration).assignToSeller(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
485
516
|
});
|
|
486
517
|
}
|
|
487
518
|
/**
|
|
488
519
|
*
|
|
489
520
|
* @param {AssignmentTypeDto} body
|
|
521
|
+
* @param {string} apikey
|
|
490
522
|
* @param {string} cellphone
|
|
491
523
|
* @param {number} id
|
|
492
524
|
* @param {*} [options] Override http request option.
|
|
493
525
|
* @throws {RequiredError}
|
|
494
526
|
* @memberof ChatsApi
|
|
495
527
|
*/
|
|
496
|
-
assignmentType(body, cellphone, id, options) {
|
|
528
|
+
assignmentType(body, apikey, cellphone, id, options) {
|
|
497
529
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
|
-
return (0, exports.ChatsApiFp)(this.configuration).assignmentType(body, cellphone, id, options).then((request) => request(this.axios, this.basePath));
|
|
530
|
+
return (0, exports.ChatsApiFp)(this.configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(this.axios, this.basePath));
|
|
499
531
|
});
|
|
500
532
|
}
|
|
501
533
|
/**
|
|
502
534
|
*
|
|
503
535
|
* @param {number} id
|
|
536
|
+
* @param {string} apikey
|
|
504
537
|
* @param {*} [options] Override http request option.
|
|
505
538
|
* @throws {RequiredError}
|
|
506
539
|
* @memberof ChatsApi
|
|
507
540
|
*/
|
|
508
|
-
getChat(id, options) {
|
|
541
|
+
getChat(id, apikey, options) {
|
|
509
542
|
return __awaiter(this, void 0, void 0, function* () {
|
|
510
|
-
return (0, exports.ChatsApiFp)(this.configuration).getChat(id, options).then((request) => request(this.axios, this.basePath));
|
|
543
|
+
return (0, exports.ChatsApiFp)(this.configuration).getChat(id, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
511
544
|
});
|
|
512
545
|
}
|
|
513
546
|
/**
|
|
@@ -23,17 +23,19 @@ export declare const ContactsApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
23
23
|
*
|
|
24
24
|
* @param {number} cellphone
|
|
25
25
|
* @param {number} branchId
|
|
26
|
+
* @param {string} apikey
|
|
26
27
|
* @param {*} [options] Override http request option.
|
|
27
28
|
* @throws {RequiredError}
|
|
28
29
|
*/
|
|
29
|
-
getChatFromCellphone: (cellphone: number, branchId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
|
+
getChatFromCellphone: (cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
31
|
/**
|
|
31
32
|
*
|
|
32
33
|
* @param {number} branchId
|
|
34
|
+
* @param {string} apikey
|
|
33
35
|
* @param {*} [options] Override http request option.
|
|
34
36
|
* @throws {RequiredError}
|
|
35
37
|
*/
|
|
36
|
-
getContacts: (branchId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
38
|
+
getContacts: (branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
37
39
|
};
|
|
38
40
|
/**
|
|
39
41
|
* ContactsApi - functional programming interface
|
|
@@ -44,17 +46,19 @@ export declare const ContactsApiFp: (configuration?: Configuration) => {
|
|
|
44
46
|
*
|
|
45
47
|
* @param {number} cellphone
|
|
46
48
|
* @param {number} branchId
|
|
49
|
+
* @param {string} apikey
|
|
47
50
|
* @param {*} [options] Override http request option.
|
|
48
51
|
* @throws {RequiredError}
|
|
49
52
|
*/
|
|
50
|
-
getChatFromCellphone(cellphone: number, branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>>;
|
|
53
|
+
getChatFromCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>>;
|
|
51
54
|
/**
|
|
52
55
|
*
|
|
53
56
|
* @param {number} branchId
|
|
57
|
+
* @param {string} apikey
|
|
54
58
|
* @param {*} [options] Override http request option.
|
|
55
59
|
* @throws {RequiredError}
|
|
56
60
|
*/
|
|
57
|
-
getContacts(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>>;
|
|
61
|
+
getContacts(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>>;
|
|
58
62
|
};
|
|
59
63
|
/**
|
|
60
64
|
* ContactsApi - factory interface
|
|
@@ -65,17 +69,19 @@ export declare const ContactsApiFactory: (configuration?: Configuration, basePat
|
|
|
65
69
|
*
|
|
66
70
|
* @param {number} cellphone
|
|
67
71
|
* @param {number} branchId
|
|
72
|
+
* @param {string} apikey
|
|
68
73
|
* @param {*} [options] Override http request option.
|
|
69
74
|
* @throws {RequiredError}
|
|
70
75
|
*/
|
|
71
|
-
getChatFromCellphone(cellphone: number, branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
76
|
+
getChatFromCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
72
77
|
/**
|
|
73
78
|
*
|
|
74
79
|
* @param {number} branchId
|
|
80
|
+
* @param {string} apikey
|
|
75
81
|
* @param {*} [options] Override http request option.
|
|
76
82
|
* @throws {RequiredError}
|
|
77
83
|
*/
|
|
78
|
-
getContacts(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
84
|
+
getContacts(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
79
85
|
};
|
|
80
86
|
/**
|
|
81
87
|
* ContactsApi - object-oriented interface
|
|
@@ -88,17 +94,19 @@ export declare class ContactsApi extends BaseAPI {
|
|
|
88
94
|
*
|
|
89
95
|
* @param {number} cellphone
|
|
90
96
|
* @param {number} branchId
|
|
97
|
+
* @param {string} apikey
|
|
91
98
|
* @param {*} [options] Override http request option.
|
|
92
99
|
* @throws {RequiredError}
|
|
93
100
|
* @memberof ContactsApi
|
|
94
101
|
*/
|
|
95
|
-
getChatFromCellphone(cellphone: number, branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
102
|
+
getChatFromCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
96
103
|
/**
|
|
97
104
|
*
|
|
98
105
|
* @param {number} branchId
|
|
106
|
+
* @param {string} apikey
|
|
99
107
|
* @param {*} [options] Override http request option.
|
|
100
108
|
* @throws {RequiredError}
|
|
101
109
|
* @memberof ContactsApi
|
|
102
110
|
*/
|
|
103
|
-
getContacts(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
111
|
+
getContacts(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
104
112
|
}
|
|
@@ -37,10 +37,11 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
37
37
|
*
|
|
38
38
|
* @param {number} cellphone
|
|
39
39
|
* @param {number} branchId
|
|
40
|
+
* @param {string} apikey
|
|
40
41
|
* @param {*} [options] Override http request option.
|
|
41
42
|
* @throws {RequiredError}
|
|
42
43
|
*/
|
|
43
|
-
getChatFromCellphone: (cellphone_1, branchId_1, ...args_1) => __awaiter(this, [cellphone_1, branchId_1, ...args_1], void 0, function* (cellphone, branchId, options = {}) {
|
|
44
|
+
getChatFromCellphone: (cellphone_1, branchId_1, apikey_1, ...args_1) => __awaiter(this, [cellphone_1, branchId_1, apikey_1, ...args_1], void 0, function* (cellphone, branchId, apikey, options = {}) {
|
|
44
45
|
// verify required parameter 'cellphone' is not null or undefined
|
|
45
46
|
if (cellphone === null || cellphone === undefined) {
|
|
46
47
|
throw new base_1.RequiredError('cellphone', 'Required parameter cellphone was null or undefined when calling getChatFromCellphone.');
|
|
@@ -49,6 +50,10 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
49
50
|
if (branchId === null || branchId === undefined) {
|
|
50
51
|
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChatFromCellphone.');
|
|
51
52
|
}
|
|
53
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
54
|
+
if (apikey === null || apikey === undefined) {
|
|
55
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getChatFromCellphone.');
|
|
56
|
+
}
|
|
52
57
|
const localVarPath = `/api/contacts/{cellphone}/chat`
|
|
53
58
|
.replace(`{${"cellphone"}}`, encodeURIComponent(String(cellphone)));
|
|
54
59
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -63,6 +68,9 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
63
68
|
if (branchId !== undefined) {
|
|
64
69
|
localVarQueryParameter['branchId'] = branchId;
|
|
65
70
|
}
|
|
71
|
+
if (apikey !== undefined && apikey !== null) {
|
|
72
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
73
|
+
}
|
|
66
74
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
67
75
|
for (const key in localVarQueryParameter) {
|
|
68
76
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -81,14 +89,19 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
81
89
|
/**
|
|
82
90
|
*
|
|
83
91
|
* @param {number} branchId
|
|
92
|
+
* @param {string} apikey
|
|
84
93
|
* @param {*} [options] Override http request option.
|
|
85
94
|
* @throws {RequiredError}
|
|
86
95
|
*/
|
|
87
|
-
getContacts: (branchId_1, ...args_1) => __awaiter(this, [branchId_1, ...args_1], void 0, function* (branchId, options = {}) {
|
|
96
|
+
getContacts: (branchId_1, apikey_1, ...args_1) => __awaiter(this, [branchId_1, apikey_1, ...args_1], void 0, function* (branchId, apikey, options = {}) {
|
|
88
97
|
// verify required parameter 'branchId' is not null or undefined
|
|
89
98
|
if (branchId === null || branchId === undefined) {
|
|
90
99
|
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getContacts.');
|
|
91
100
|
}
|
|
101
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
102
|
+
if (apikey === null || apikey === undefined) {
|
|
103
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getContacts.');
|
|
104
|
+
}
|
|
92
105
|
const localVarPath = `/api/contacts`;
|
|
93
106
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
94
107
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -102,6 +115,9 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
102
115
|
if (branchId !== undefined) {
|
|
103
116
|
localVarQueryParameter['branchId'] = branchId;
|
|
104
117
|
}
|
|
118
|
+
if (apikey !== undefined && apikey !== null) {
|
|
119
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
120
|
+
}
|
|
105
121
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
106
122
|
for (const key in localVarQueryParameter) {
|
|
107
123
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -130,12 +146,13 @@ const ContactsApiFp = function (configuration) {
|
|
|
130
146
|
*
|
|
131
147
|
* @param {number} cellphone
|
|
132
148
|
* @param {number} branchId
|
|
149
|
+
* @param {string} apikey
|
|
133
150
|
* @param {*} [options] Override http request option.
|
|
134
151
|
* @throws {RequiredError}
|
|
135
152
|
*/
|
|
136
|
-
getChatFromCellphone(cellphone, branchId, options) {
|
|
153
|
+
getChatFromCellphone(cellphone, branchId, apikey, options) {
|
|
137
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getChatFromCellphone(cellphone, branchId, options);
|
|
155
|
+
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getChatFromCellphone(cellphone, branchId, apikey, options);
|
|
139
156
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
140
157
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
141
158
|
return axios.request(axiosRequestArgs);
|
|
@@ -145,12 +162,13 @@ const ContactsApiFp = function (configuration) {
|
|
|
145
162
|
/**
|
|
146
163
|
*
|
|
147
164
|
* @param {number} branchId
|
|
165
|
+
* @param {string} apikey
|
|
148
166
|
* @param {*} [options] Override http request option.
|
|
149
167
|
* @throws {RequiredError}
|
|
150
168
|
*/
|
|
151
|
-
getContacts(branchId, options) {
|
|
169
|
+
getContacts(branchId, apikey, options) {
|
|
152
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getContacts(branchId, options);
|
|
171
|
+
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getContacts(branchId, apikey, options);
|
|
154
172
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
155
173
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
156
174
|
return axios.request(axiosRequestArgs);
|
|
@@ -170,23 +188,25 @@ const ContactsApiFactory = function (configuration, basePath, axios) {
|
|
|
170
188
|
*
|
|
171
189
|
* @param {number} cellphone
|
|
172
190
|
* @param {number} branchId
|
|
191
|
+
* @param {string} apikey
|
|
173
192
|
* @param {*} [options] Override http request option.
|
|
174
193
|
* @throws {RequiredError}
|
|
175
194
|
*/
|
|
176
|
-
getChatFromCellphone(cellphone, branchId, options) {
|
|
195
|
+
getChatFromCellphone(cellphone, branchId, apikey, options) {
|
|
177
196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
-
return (0, exports.ContactsApiFp)(configuration).getChatFromCellphone(cellphone, branchId, options).then((request) => request(axios, basePath));
|
|
197
|
+
return (0, exports.ContactsApiFp)(configuration).getChatFromCellphone(cellphone, branchId, apikey, options).then((request) => request(axios, basePath));
|
|
179
198
|
});
|
|
180
199
|
},
|
|
181
200
|
/**
|
|
182
201
|
*
|
|
183
202
|
* @param {number} branchId
|
|
203
|
+
* @param {string} apikey
|
|
184
204
|
* @param {*} [options] Override http request option.
|
|
185
205
|
* @throws {RequiredError}
|
|
186
206
|
*/
|
|
187
|
-
getContacts(branchId, options) {
|
|
207
|
+
getContacts(branchId, apikey, options) {
|
|
188
208
|
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
-
return (0, exports.ContactsApiFp)(configuration).getContacts(branchId, options).then((request) => request(axios, basePath));
|
|
209
|
+
return (0, exports.ContactsApiFp)(configuration).getContacts(branchId, apikey, options).then((request) => request(axios, basePath));
|
|
190
210
|
});
|
|
191
211
|
},
|
|
192
212
|
};
|
|
@@ -203,25 +223,27 @@ class ContactsApi extends base_1.BaseAPI {
|
|
|
203
223
|
*
|
|
204
224
|
* @param {number} cellphone
|
|
205
225
|
* @param {number} branchId
|
|
226
|
+
* @param {string} apikey
|
|
206
227
|
* @param {*} [options] Override http request option.
|
|
207
228
|
* @throws {RequiredError}
|
|
208
229
|
* @memberof ContactsApi
|
|
209
230
|
*/
|
|
210
|
-
getChatFromCellphone(cellphone, branchId, options) {
|
|
231
|
+
getChatFromCellphone(cellphone, branchId, apikey, options) {
|
|
211
232
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
-
return (0, exports.ContactsApiFp)(this.configuration).getChatFromCellphone(cellphone, branchId, options).then((request) => request(this.axios, this.basePath));
|
|
233
|
+
return (0, exports.ContactsApiFp)(this.configuration).getChatFromCellphone(cellphone, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
213
234
|
});
|
|
214
235
|
}
|
|
215
236
|
/**
|
|
216
237
|
*
|
|
217
238
|
* @param {number} branchId
|
|
239
|
+
* @param {string} apikey
|
|
218
240
|
* @param {*} [options] Override http request option.
|
|
219
241
|
* @throws {RequiredError}
|
|
220
242
|
* @memberof ContactsApi
|
|
221
243
|
*/
|
|
222
|
-
getContacts(branchId, options) {
|
|
244
|
+
getContacts(branchId, apikey, options) {
|
|
223
245
|
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
-
return (0, exports.ContactsApiFp)(this.configuration).getContacts(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
246
|
+
return (0, exports.ContactsApiFp)(this.configuration).getContacts(branchId, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
225
247
|
});
|
|
226
248
|
}
|
|
227
249
|
}
|