@libgot/whatsapp-bridge-sdk 1.0.40-rc.1 → 1.0.40-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -1
- package/README.md +2 -2
- package/apis/cellphone-api.ts +19 -16
- package/apis/chats-api.ts +76 -28
- 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 +32 -16
- package/dist/apis/chats-api.js +72 -28
- 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
|
|
@@ -65,11 +68,12 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
65
68
|
/**
|
|
66
69
|
*
|
|
67
70
|
* @param {MarkChatUnreadDto} body
|
|
71
|
+
* @param {string} apikey
|
|
68
72
|
* @param {number} id
|
|
69
73
|
* @param {*} [options] Override http request option.
|
|
70
74
|
* @throws {RequiredError}
|
|
71
75
|
*/
|
|
72
|
-
markChatUnread: (body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
76
|
+
markChatUnread: (body: MarkChatUnreadDto, apikey: string, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
73
77
|
};
|
|
74
78
|
/**
|
|
75
79
|
* ChatsApi - functional programming interface
|
|
@@ -79,26 +83,29 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
79
83
|
/**
|
|
80
84
|
*
|
|
81
85
|
* @param {AssignToMeDto} body
|
|
86
|
+
* @param {string} apikey
|
|
82
87
|
* @param {*} [options] Override http request option.
|
|
83
88
|
* @throws {RequiredError}
|
|
84
89
|
*/
|
|
85
|
-
assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
90
|
+
assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
86
91
|
/**
|
|
87
92
|
*
|
|
88
93
|
* @param {AssignmentTypeDto} body
|
|
94
|
+
* @param {string} apikey
|
|
89
95
|
* @param {string} cellphone
|
|
90
96
|
* @param {number} id
|
|
91
97
|
* @param {*} [options] Override http request option.
|
|
92
98
|
* @throws {RequiredError}
|
|
93
99
|
*/
|
|
94
|
-
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
100
|
+
assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
95
101
|
/**
|
|
96
102
|
*
|
|
97
103
|
* @param {number} id
|
|
104
|
+
* @param {string} apikey
|
|
98
105
|
* @param {*} [options] Override http request option.
|
|
99
106
|
* @throws {RequiredError}
|
|
100
107
|
*/
|
|
101
|
-
getChat(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>>;
|
|
108
|
+
getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>>;
|
|
102
109
|
/**
|
|
103
110
|
*
|
|
104
111
|
* @param {number} branchId
|
|
@@ -119,11 +126,12 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
119
126
|
/**
|
|
120
127
|
*
|
|
121
128
|
* @param {MarkChatUnreadDto} body
|
|
129
|
+
* @param {string} apikey
|
|
122
130
|
* @param {number} id
|
|
123
131
|
* @param {*} [options] Override http request option.
|
|
124
132
|
* @throws {RequiredError}
|
|
125
133
|
*/
|
|
126
|
-
markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
134
|
+
markChatUnread(body: MarkChatUnreadDto, apikey: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
127
135
|
};
|
|
128
136
|
/**
|
|
129
137
|
* ChatsApi - factory interface
|
|
@@ -133,26 +141,29 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
133
141
|
/**
|
|
134
142
|
*
|
|
135
143
|
* @param {AssignToMeDto} body
|
|
144
|
+
* @param {string} apikey
|
|
136
145
|
* @param {*} [options] Override http request option.
|
|
137
146
|
* @throws {RequiredError}
|
|
138
147
|
*/
|
|
139
|
-
assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
148
|
+
assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
140
149
|
/**
|
|
141
150
|
*
|
|
142
151
|
* @param {AssignmentTypeDto} body
|
|
152
|
+
* @param {string} apikey
|
|
143
153
|
* @param {string} cellphone
|
|
144
154
|
* @param {number} id
|
|
145
155
|
* @param {*} [options] Override http request option.
|
|
146
156
|
* @throws {RequiredError}
|
|
147
157
|
*/
|
|
148
|
-
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
158
|
+
assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
149
159
|
/**
|
|
150
160
|
*
|
|
151
161
|
* @param {number} id
|
|
162
|
+
* @param {string} apikey
|
|
152
163
|
* @param {*} [options] Override http request option.
|
|
153
164
|
* @throws {RequiredError}
|
|
154
165
|
*/
|
|
155
|
-
getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
166
|
+
getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
156
167
|
/**
|
|
157
168
|
*
|
|
158
169
|
* @param {number} branchId
|
|
@@ -173,11 +184,12 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
173
184
|
/**
|
|
174
185
|
*
|
|
175
186
|
* @param {MarkChatUnreadDto} body
|
|
187
|
+
* @param {string} apikey
|
|
176
188
|
* @param {number} id
|
|
177
189
|
* @param {*} [options] Override http request option.
|
|
178
190
|
* @throws {RequiredError}
|
|
179
191
|
*/
|
|
180
|
-
markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
192
|
+
markChatUnread(body: MarkChatUnreadDto, apikey: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
181
193
|
};
|
|
182
194
|
/**
|
|
183
195
|
* ChatsApi - object-oriented interface
|
|
@@ -189,29 +201,32 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
189
201
|
/**
|
|
190
202
|
*
|
|
191
203
|
* @param {AssignToMeDto} body
|
|
204
|
+
* @param {string} apikey
|
|
192
205
|
* @param {*} [options] Override http request option.
|
|
193
206
|
* @throws {RequiredError}
|
|
194
207
|
* @memberof ChatsApi
|
|
195
208
|
*/
|
|
196
|
-
assignToSeller(body: AssignToMeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
209
|
+
assignToSeller(body: AssignToMeDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
197
210
|
/**
|
|
198
211
|
*
|
|
199
212
|
* @param {AssignmentTypeDto} body
|
|
213
|
+
* @param {string} apikey
|
|
200
214
|
* @param {string} cellphone
|
|
201
215
|
* @param {number} id
|
|
202
216
|
* @param {*} [options] Override http request option.
|
|
203
217
|
* @throws {RequiredError}
|
|
204
218
|
* @memberof ChatsApi
|
|
205
219
|
*/
|
|
206
|
-
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
220
|
+
assignmentType(body: AssignmentTypeDto, apikey: string, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
207
221
|
/**
|
|
208
222
|
*
|
|
209
223
|
* @param {number} id
|
|
224
|
+
* @param {string} apikey
|
|
210
225
|
* @param {*} [options] Override http request option.
|
|
211
226
|
* @throws {RequiredError}
|
|
212
227
|
* @memberof ChatsApi
|
|
213
228
|
*/
|
|
214
|
-
getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
229
|
+
getChat(id: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
215
230
|
/**
|
|
216
231
|
*
|
|
217
232
|
* @param {number} branchId
|
|
@@ -233,10 +248,11 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
233
248
|
/**
|
|
234
249
|
*
|
|
235
250
|
* @param {MarkChatUnreadDto} body
|
|
251
|
+
* @param {string} apikey
|
|
236
252
|
* @param {number} id
|
|
237
253
|
* @param {*} [options] Override http request option.
|
|
238
254
|
* @throws {RequiredError}
|
|
239
255
|
* @memberof ChatsApi
|
|
240
256
|
*/
|
|
241
|
-
markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
257
|
+
markChatUnread(body: MarkChatUnreadDto, apikey: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
242
258
|
}
|
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]);
|
|
@@ -246,15 +270,20 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
246
270
|
/**
|
|
247
271
|
*
|
|
248
272
|
* @param {MarkChatUnreadDto} body
|
|
273
|
+
* @param {string} apikey
|
|
249
274
|
* @param {number} id
|
|
250
275
|
* @param {*} [options] Override http request option.
|
|
251
276
|
* @throws {RequiredError}
|
|
252
277
|
*/
|
|
253
|
-
markChatUnread: (body_1, id_1, ...args_1) => __awaiter(this, [body_1, id_1, ...args_1], void 0, function* (body, id, options = {}) {
|
|
278
|
+
markChatUnread: (body_1, apikey_1, id_1, ...args_1) => __awaiter(this, [body_1, apikey_1, id_1, ...args_1], void 0, function* (body, apikey, id, options = {}) {
|
|
254
279
|
// verify required parameter 'body' is not null or undefined
|
|
255
280
|
if (body === null || body === undefined) {
|
|
256
281
|
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling markChatUnread.');
|
|
257
282
|
}
|
|
283
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
284
|
+
if (apikey === null || apikey === undefined) {
|
|
285
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling markChatUnread.');
|
|
286
|
+
}
|
|
258
287
|
// verify required parameter 'id' is not null or undefined
|
|
259
288
|
if (id === null || id === undefined) {
|
|
260
289
|
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling markChatUnread.');
|
|
@@ -270,6 +299,9 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
270
299
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
271
300
|
const localVarHeaderParameter = {};
|
|
272
301
|
const localVarQueryParameter = {};
|
|
302
|
+
if (apikey !== undefined && apikey !== null) {
|
|
303
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
304
|
+
}
|
|
273
305
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
274
306
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
275
307
|
for (const key in localVarQueryParameter) {
|
|
@@ -300,12 +332,13 @@ const ChatsApiFp = function (configuration) {
|
|
|
300
332
|
/**
|
|
301
333
|
*
|
|
302
334
|
* @param {AssignToMeDto} body
|
|
335
|
+
* @param {string} apikey
|
|
303
336
|
* @param {*} [options] Override http request option.
|
|
304
337
|
* @throws {RequiredError}
|
|
305
338
|
*/
|
|
306
|
-
assignToSeller(body, options) {
|
|
339
|
+
assignToSeller(body, apikey, options) {
|
|
307
340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
-
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToSeller(body, options);
|
|
341
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToSeller(body, apikey, options);
|
|
309
342
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
310
343
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
311
344
|
return axios.request(axiosRequestArgs);
|
|
@@ -315,14 +348,15 @@ const ChatsApiFp = function (configuration) {
|
|
|
315
348
|
/**
|
|
316
349
|
*
|
|
317
350
|
* @param {AssignmentTypeDto} body
|
|
351
|
+
* @param {string} apikey
|
|
318
352
|
* @param {string} cellphone
|
|
319
353
|
* @param {number} id
|
|
320
354
|
* @param {*} [options] Override http request option.
|
|
321
355
|
* @throws {RequiredError}
|
|
322
356
|
*/
|
|
323
|
-
assignmentType(body, cellphone, id, options) {
|
|
357
|
+
assignmentType(body, apikey, cellphone, id, options) {
|
|
324
358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
-
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignmentType(body, cellphone, id, options);
|
|
359
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignmentType(body, apikey, cellphone, id, options);
|
|
326
360
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
327
361
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
328
362
|
return axios.request(axiosRequestArgs);
|
|
@@ -332,12 +366,13 @@ const ChatsApiFp = function (configuration) {
|
|
|
332
366
|
/**
|
|
333
367
|
*
|
|
334
368
|
* @param {number} id
|
|
369
|
+
* @param {string} apikey
|
|
335
370
|
* @param {*} [options] Override http request option.
|
|
336
371
|
* @throws {RequiredError}
|
|
337
372
|
*/
|
|
338
|
-
getChat(id, options) {
|
|
373
|
+
getChat(id, apikey, options) {
|
|
339
374
|
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
-
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, options);
|
|
375
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, apikey, options);
|
|
341
376
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
342
377
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
343
378
|
return axios.request(axiosRequestArgs);
|
|
@@ -372,13 +407,14 @@ const ChatsApiFp = function (configuration) {
|
|
|
372
407
|
/**
|
|
373
408
|
*
|
|
374
409
|
* @param {MarkChatUnreadDto} body
|
|
410
|
+
* @param {string} apikey
|
|
375
411
|
* @param {number} id
|
|
376
412
|
* @param {*} [options] Override http request option.
|
|
377
413
|
* @throws {RequiredError}
|
|
378
414
|
*/
|
|
379
|
-
markChatUnread(body, id, options) {
|
|
415
|
+
markChatUnread(body, apikey, id, options) {
|
|
380
416
|
return __awaiter(this, void 0, void 0, function* () {
|
|
381
|
-
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, id, options);
|
|
417
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, apikey, id, options);
|
|
382
418
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
383
419
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
384
420
|
return axios.request(axiosRequestArgs);
|
|
@@ -397,36 +433,39 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
397
433
|
/**
|
|
398
434
|
*
|
|
399
435
|
* @param {AssignToMeDto} body
|
|
436
|
+
* @param {string} apikey
|
|
400
437
|
* @param {*} [options] Override http request option.
|
|
401
438
|
* @throws {RequiredError}
|
|
402
439
|
*/
|
|
403
|
-
assignToSeller(body, options) {
|
|
440
|
+
assignToSeller(body, apikey, options) {
|
|
404
441
|
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
-
return (0, exports.ChatsApiFp)(configuration).assignToSeller(body, options).then((request) => request(axios, basePath));
|
|
442
|
+
return (0, exports.ChatsApiFp)(configuration).assignToSeller(body, apikey, options).then((request) => request(axios, basePath));
|
|
406
443
|
});
|
|
407
444
|
},
|
|
408
445
|
/**
|
|
409
446
|
*
|
|
410
447
|
* @param {AssignmentTypeDto} body
|
|
448
|
+
* @param {string} apikey
|
|
411
449
|
* @param {string} cellphone
|
|
412
450
|
* @param {number} id
|
|
413
451
|
* @param {*} [options] Override http request option.
|
|
414
452
|
* @throws {RequiredError}
|
|
415
453
|
*/
|
|
416
|
-
assignmentType(body, cellphone, id, options) {
|
|
454
|
+
assignmentType(body, apikey, cellphone, id, options) {
|
|
417
455
|
return __awaiter(this, void 0, void 0, function* () {
|
|
418
|
-
return (0, exports.ChatsApiFp)(configuration).assignmentType(body, cellphone, id, options).then((request) => request(axios, basePath));
|
|
456
|
+
return (0, exports.ChatsApiFp)(configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(axios, basePath));
|
|
419
457
|
});
|
|
420
458
|
},
|
|
421
459
|
/**
|
|
422
460
|
*
|
|
423
461
|
* @param {number} id
|
|
462
|
+
* @param {string} apikey
|
|
424
463
|
* @param {*} [options] Override http request option.
|
|
425
464
|
* @throws {RequiredError}
|
|
426
465
|
*/
|
|
427
|
-
getChat(id, options) {
|
|
466
|
+
getChat(id, apikey, options) {
|
|
428
467
|
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
-
return (0, exports.ChatsApiFp)(configuration).getChat(id, options).then((request) => request(axios, basePath));
|
|
468
|
+
return (0, exports.ChatsApiFp)(configuration).getChat(id, apikey, options).then((request) => request(axios, basePath));
|
|
430
469
|
});
|
|
431
470
|
},
|
|
432
471
|
/**
|
|
@@ -453,13 +492,14 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
453
492
|
/**
|
|
454
493
|
*
|
|
455
494
|
* @param {MarkChatUnreadDto} body
|
|
495
|
+
* @param {string} apikey
|
|
456
496
|
* @param {number} id
|
|
457
497
|
* @param {*} [options] Override http request option.
|
|
458
498
|
* @throws {RequiredError}
|
|
459
499
|
*/
|
|
460
|
-
markChatUnread(body, id, options) {
|
|
500
|
+
markChatUnread(body, apikey, id, options) {
|
|
461
501
|
return __awaiter(this, void 0, void 0, function* () {
|
|
462
|
-
return (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then((request) => request(axios, basePath));
|
|
502
|
+
return (0, exports.ChatsApiFp)(configuration).markChatUnread(body, apikey, id, options).then((request) => request(axios, basePath));
|
|
463
503
|
});
|
|
464
504
|
},
|
|
465
505
|
};
|
|
@@ -475,39 +515,42 @@ class ChatsApi extends base_1.BaseAPI {
|
|
|
475
515
|
/**
|
|
476
516
|
*
|
|
477
517
|
* @param {AssignToMeDto} body
|
|
518
|
+
* @param {string} apikey
|
|
478
519
|
* @param {*} [options] Override http request option.
|
|
479
520
|
* @throws {RequiredError}
|
|
480
521
|
* @memberof ChatsApi
|
|
481
522
|
*/
|
|
482
|
-
assignToSeller(body, options) {
|
|
523
|
+
assignToSeller(body, apikey, options) {
|
|
483
524
|
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));
|
|
525
|
+
return (0, exports.ChatsApiFp)(this.configuration).assignToSeller(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
485
526
|
});
|
|
486
527
|
}
|
|
487
528
|
/**
|
|
488
529
|
*
|
|
489
530
|
* @param {AssignmentTypeDto} body
|
|
531
|
+
* @param {string} apikey
|
|
490
532
|
* @param {string} cellphone
|
|
491
533
|
* @param {number} id
|
|
492
534
|
* @param {*} [options] Override http request option.
|
|
493
535
|
* @throws {RequiredError}
|
|
494
536
|
* @memberof ChatsApi
|
|
495
537
|
*/
|
|
496
|
-
assignmentType(body, cellphone, id, options) {
|
|
538
|
+
assignmentType(body, apikey, cellphone, id, options) {
|
|
497
539
|
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));
|
|
540
|
+
return (0, exports.ChatsApiFp)(this.configuration).assignmentType(body, apikey, cellphone, id, options).then((request) => request(this.axios, this.basePath));
|
|
499
541
|
});
|
|
500
542
|
}
|
|
501
543
|
/**
|
|
502
544
|
*
|
|
503
545
|
* @param {number} id
|
|
546
|
+
* @param {string} apikey
|
|
504
547
|
* @param {*} [options] Override http request option.
|
|
505
548
|
* @throws {RequiredError}
|
|
506
549
|
* @memberof ChatsApi
|
|
507
550
|
*/
|
|
508
|
-
getChat(id, options) {
|
|
551
|
+
getChat(id, apikey, options) {
|
|
509
552
|
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));
|
|
553
|
+
return (0, exports.ChatsApiFp)(this.configuration).getChat(id, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
511
554
|
});
|
|
512
555
|
}
|
|
513
556
|
/**
|
|
@@ -535,14 +578,15 @@ class ChatsApi extends base_1.BaseAPI {
|
|
|
535
578
|
/**
|
|
536
579
|
*
|
|
537
580
|
* @param {MarkChatUnreadDto} body
|
|
581
|
+
* @param {string} apikey
|
|
538
582
|
* @param {number} id
|
|
539
583
|
* @param {*} [options] Override http request option.
|
|
540
584
|
* @throws {RequiredError}
|
|
541
585
|
* @memberof ChatsApi
|
|
542
586
|
*/
|
|
543
|
-
markChatUnread(body, id, options) {
|
|
587
|
+
markChatUnread(body, apikey, id, options) {
|
|
544
588
|
return __awaiter(this, void 0, void 0, function* () {
|
|
545
|
-
return (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then((request) => request(this.axios, this.basePath));
|
|
589
|
+
return (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, apikey, id, options).then((request) => request(this.axios, this.basePath));
|
|
546
590
|
});
|
|
547
591
|
}
|
|
548
592
|
}
|
|
@@ -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
|
}
|