@libgot/whatsapp-bridge-sdk 1.0.42 → 1.0.43
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/README.md +2 -2
- package/api.ts +1 -0
- package/apis/chats-api.ts +174 -0
- package/apis/sessions-api.ts +83 -0
- package/apis/tasks-api.ts +141 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/apis/chats-api.d.ts +68 -0
- package/dist/apis/chats-api.js +176 -0
- package/dist/apis/sessions-api.d.ts +33 -0
- package/dist/apis/sessions-api.js +86 -0
- package/dist/apis/tasks-api.d.ts +74 -0
- package/dist/apis/tasks-api.js +153 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/repair-missing-message-keys-dto.d.ts +19 -0
- package/dist/models/repair-missing-message-keys-dto.js +15 -0
- package/dist/models/send-template-data-dto.d.ts +6 -0
- package/dist/models/update-agent-dto.d.ts +49 -0
- package/dist/models/update-agent-dto.js +15 -0
- package/dist/models/update-chat-status-dto.d.ts +43 -0
- package/dist/models/update-chat-status-dto.js +15 -0
- package/dist/models/whatsapp-chat-dto.d.ts +6 -0
- package/models/index.ts +3 -0
- package/models/repair-missing-message-keys-dto.ts +22 -0
- package/models/send-template-data-dto.ts +7 -0
- package/models/update-agent-dto.ts +57 -0
- package/models/update-chat-status-dto.ts +50 -0
- package/models/whatsapp-chat-dto.ts +7 -0
- package/package.json +1 -1
package/dist/apis/chats-api.js
CHANGED
|
@@ -320,6 +320,100 @@ const ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
320
320
|
options: localVarRequestOptions,
|
|
321
321
|
};
|
|
322
322
|
}),
|
|
323
|
+
/**
|
|
324
|
+
*
|
|
325
|
+
* @param {UpdateAgentDto} body
|
|
326
|
+
* @param {string} apikey
|
|
327
|
+
* @param {*} [options] Override http request option.
|
|
328
|
+
* @throws {RequiredError}
|
|
329
|
+
*/
|
|
330
|
+
updateAgent: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
|
|
331
|
+
// verify required parameter 'body' is not null or undefined
|
|
332
|
+
if (body === null || body === undefined) {
|
|
333
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling updateAgent.');
|
|
334
|
+
}
|
|
335
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
336
|
+
if (apikey === null || apikey === undefined) {
|
|
337
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling updateAgent.');
|
|
338
|
+
}
|
|
339
|
+
const localVarPath = `/api/chats/update-agent`;
|
|
340
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
341
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
342
|
+
let baseOptions;
|
|
343
|
+
if (configuration) {
|
|
344
|
+
baseOptions = configuration.baseOptions;
|
|
345
|
+
}
|
|
346
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
347
|
+
const localVarHeaderParameter = {};
|
|
348
|
+
const localVarQueryParameter = {};
|
|
349
|
+
if (apikey !== undefined && apikey !== null) {
|
|
350
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
351
|
+
}
|
|
352
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
353
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
354
|
+
for (const key in localVarQueryParameter) {
|
|
355
|
+
query.set(key, localVarQueryParameter[key]);
|
|
356
|
+
}
|
|
357
|
+
for (const key in options.params) {
|
|
358
|
+
query.set(key, options.params[key]);
|
|
359
|
+
}
|
|
360
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
361
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
362
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
363
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
364
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
365
|
+
return {
|
|
366
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
367
|
+
options: localVarRequestOptions,
|
|
368
|
+
};
|
|
369
|
+
}),
|
|
370
|
+
/**
|
|
371
|
+
*
|
|
372
|
+
* @param {UpdateChatStatusDto} body
|
|
373
|
+
* @param {string} apikey
|
|
374
|
+
* @param {*} [options] Override http request option.
|
|
375
|
+
* @throws {RequiredError}
|
|
376
|
+
*/
|
|
377
|
+
updateChatStatus: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
|
|
378
|
+
// verify required parameter 'body' is not null or undefined
|
|
379
|
+
if (body === null || body === undefined) {
|
|
380
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling updateChatStatus.');
|
|
381
|
+
}
|
|
382
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
383
|
+
if (apikey === null || apikey === undefined) {
|
|
384
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling updateChatStatus.');
|
|
385
|
+
}
|
|
386
|
+
const localVarPath = `/api/chats/status`;
|
|
387
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
388
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
389
|
+
let baseOptions;
|
|
390
|
+
if (configuration) {
|
|
391
|
+
baseOptions = configuration.baseOptions;
|
|
392
|
+
}
|
|
393
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
394
|
+
const localVarHeaderParameter = {};
|
|
395
|
+
const localVarQueryParameter = {};
|
|
396
|
+
if (apikey !== undefined && apikey !== null) {
|
|
397
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
398
|
+
}
|
|
399
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
400
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
401
|
+
for (const key in localVarQueryParameter) {
|
|
402
|
+
query.set(key, localVarQueryParameter[key]);
|
|
403
|
+
}
|
|
404
|
+
for (const key in options.params) {
|
|
405
|
+
query.set(key, options.params[key]);
|
|
406
|
+
}
|
|
407
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
408
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
409
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
410
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
411
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
412
|
+
return {
|
|
413
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
414
|
+
options: localVarRequestOptions,
|
|
415
|
+
};
|
|
416
|
+
}),
|
|
323
417
|
};
|
|
324
418
|
};
|
|
325
419
|
exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
|
|
@@ -421,6 +515,38 @@ const ChatsApiFp = function (configuration) {
|
|
|
421
515
|
};
|
|
422
516
|
});
|
|
423
517
|
},
|
|
518
|
+
/**
|
|
519
|
+
*
|
|
520
|
+
* @param {UpdateAgentDto} body
|
|
521
|
+
* @param {string} apikey
|
|
522
|
+
* @param {*} [options] Override http request option.
|
|
523
|
+
* @throws {RequiredError}
|
|
524
|
+
*/
|
|
525
|
+
updateAgent(body, apikey, options) {
|
|
526
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
527
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).updateAgent(body, apikey, options);
|
|
528
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
529
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
530
|
+
return axios.request(axiosRequestArgs);
|
|
531
|
+
};
|
|
532
|
+
});
|
|
533
|
+
},
|
|
534
|
+
/**
|
|
535
|
+
*
|
|
536
|
+
* @param {UpdateChatStatusDto} body
|
|
537
|
+
* @param {string} apikey
|
|
538
|
+
* @param {*} [options] Override http request option.
|
|
539
|
+
* @throws {RequiredError}
|
|
540
|
+
*/
|
|
541
|
+
updateChatStatus(body, apikey, options) {
|
|
542
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
543
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).updateChatStatus(body, apikey, options);
|
|
544
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
545
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
546
|
+
return axios.request(axiosRequestArgs);
|
|
547
|
+
};
|
|
548
|
+
});
|
|
549
|
+
},
|
|
424
550
|
};
|
|
425
551
|
};
|
|
426
552
|
exports.ChatsApiFp = ChatsApiFp;
|
|
@@ -502,6 +628,30 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
502
628
|
return (0, exports.ChatsApiFp)(configuration).markChatUnread(body, apikey, id, options).then((request) => request(axios, basePath));
|
|
503
629
|
});
|
|
504
630
|
},
|
|
631
|
+
/**
|
|
632
|
+
*
|
|
633
|
+
* @param {UpdateAgentDto} body
|
|
634
|
+
* @param {string} apikey
|
|
635
|
+
* @param {*} [options] Override http request option.
|
|
636
|
+
* @throws {RequiredError}
|
|
637
|
+
*/
|
|
638
|
+
updateAgent(body, apikey, options) {
|
|
639
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
640
|
+
return (0, exports.ChatsApiFp)(configuration).updateAgent(body, apikey, options).then((request) => request(axios, basePath));
|
|
641
|
+
});
|
|
642
|
+
},
|
|
643
|
+
/**
|
|
644
|
+
*
|
|
645
|
+
* @param {UpdateChatStatusDto} body
|
|
646
|
+
* @param {string} apikey
|
|
647
|
+
* @param {*} [options] Override http request option.
|
|
648
|
+
* @throws {RequiredError}
|
|
649
|
+
*/
|
|
650
|
+
updateChatStatus(body, apikey, options) {
|
|
651
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
652
|
+
return (0, exports.ChatsApiFp)(configuration).updateChatStatus(body, apikey, options).then((request) => request(axios, basePath));
|
|
653
|
+
});
|
|
654
|
+
},
|
|
505
655
|
};
|
|
506
656
|
};
|
|
507
657
|
exports.ChatsApiFactory = ChatsApiFactory;
|
|
@@ -589,5 +739,31 @@ class ChatsApi extends base_1.BaseAPI {
|
|
|
589
739
|
return (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, apikey, id, options).then((request) => request(this.axios, this.basePath));
|
|
590
740
|
});
|
|
591
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
*
|
|
744
|
+
* @param {UpdateAgentDto} body
|
|
745
|
+
* @param {string} apikey
|
|
746
|
+
* @param {*} [options] Override http request option.
|
|
747
|
+
* @throws {RequiredError}
|
|
748
|
+
* @memberof ChatsApi
|
|
749
|
+
*/
|
|
750
|
+
updateAgent(body, apikey, options) {
|
|
751
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
752
|
+
return (0, exports.ChatsApiFp)(this.configuration).updateAgent(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
*
|
|
757
|
+
* @param {UpdateChatStatusDto} body
|
|
758
|
+
* @param {string} apikey
|
|
759
|
+
* @param {*} [options] Override http request option.
|
|
760
|
+
* @throws {RequiredError}
|
|
761
|
+
* @memberof ChatsApi
|
|
762
|
+
*/
|
|
763
|
+
updateChatStatus(body, apikey, options) {
|
|
764
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
765
|
+
return (0, exports.ChatsApiFp)(this.configuration).updateChatStatus(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
766
|
+
});
|
|
767
|
+
}
|
|
592
768
|
}
|
|
593
769
|
exports.ChatsApi = ChatsApi;
|
|
@@ -19,6 +19,14 @@ import { SessionsResponseDataDto } from '../models';
|
|
|
19
19
|
* @export
|
|
20
20
|
*/
|
|
21
21
|
export declare const SessionsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @param {number} chatId
|
|
25
|
+
* @param {string} apikey
|
|
26
|
+
* @param {*} [options] Override http request option.
|
|
27
|
+
* @throws {RequiredError}
|
|
28
|
+
*/
|
|
29
|
+
getCurrentSessionByChatId: (chatId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
22
30
|
/**
|
|
23
31
|
*
|
|
24
32
|
* @param {string} sessionUuid
|
|
@@ -41,6 +49,14 @@ export declare const SessionsApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
41
49
|
* @export
|
|
42
50
|
*/
|
|
43
51
|
export declare const SessionsApiFp: (configuration?: Configuration) => {
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @param {number} chatId
|
|
55
|
+
* @param {string} apikey
|
|
56
|
+
* @param {*} [options] Override http request option.
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
*/
|
|
59
|
+
getCurrentSessionByChatId(chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionResponseDataDto>>>;
|
|
44
60
|
/**
|
|
45
61
|
*
|
|
46
62
|
* @param {string} sessionUuid
|
|
@@ -63,6 +79,14 @@ export declare const SessionsApiFp: (configuration?: Configuration) => {
|
|
|
63
79
|
* @export
|
|
64
80
|
*/
|
|
65
81
|
export declare const SessionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @param {number} chatId
|
|
85
|
+
* @param {string} apikey
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
*/
|
|
89
|
+
getCurrentSessionByChatId(chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionResponseDataDto>>;
|
|
66
90
|
/**
|
|
67
91
|
*
|
|
68
92
|
* @param {string} sessionUuid
|
|
@@ -87,6 +111,15 @@ export declare const SessionsApiFactory: (configuration?: Configuration, basePat
|
|
|
87
111
|
* @extends {BaseAPI}
|
|
88
112
|
*/
|
|
89
113
|
export declare class SessionsApi extends BaseAPI {
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @param {number} chatId
|
|
117
|
+
* @param {string} apikey
|
|
118
|
+
* @param {*} [options] Override http request option.
|
|
119
|
+
* @throws {RequiredError}
|
|
120
|
+
* @memberof SessionsApi
|
|
121
|
+
*/
|
|
122
|
+
getCurrentSessionByChatId(chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionResponseDataDto>>;
|
|
90
123
|
/**
|
|
91
124
|
*
|
|
92
125
|
* @param {string} sessionUuid
|
|
@@ -33,6 +33,51 @@ const base_1 = require("../base");
|
|
|
33
33
|
*/
|
|
34
34
|
const SessionsApiAxiosParamCreator = function (configuration) {
|
|
35
35
|
return {
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param {number} chatId
|
|
39
|
+
* @param {string} apikey
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
getCurrentSessionByChatId: (chatId_1, apikey_1, ...args_1) => __awaiter(this, [chatId_1, apikey_1, ...args_1], void 0, function* (chatId, apikey, options = {}) {
|
|
44
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
45
|
+
if (chatId === null || chatId === undefined) {
|
|
46
|
+
throw new base_1.RequiredError('chatId', 'Required parameter chatId was null or undefined when calling getCurrentSessionByChatId.');
|
|
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 getCurrentSessionByChatId.');
|
|
51
|
+
}
|
|
52
|
+
const localVarPath = `/api/sessions/chat/{chatId}`
|
|
53
|
+
.replace(`{${"chatId"}}`, encodeURIComponent(String(chatId)));
|
|
54
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
55
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
56
|
+
let baseOptions;
|
|
57
|
+
if (configuration) {
|
|
58
|
+
baseOptions = configuration.baseOptions;
|
|
59
|
+
}
|
|
60
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
61
|
+
const localVarHeaderParameter = {};
|
|
62
|
+
const localVarQueryParameter = {};
|
|
63
|
+
if (apikey !== undefined && apikey !== null) {
|
|
64
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
65
|
+
}
|
|
66
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
67
|
+
for (const key in localVarQueryParameter) {
|
|
68
|
+
query.set(key, localVarQueryParameter[key]);
|
|
69
|
+
}
|
|
70
|
+
for (const key in options.params) {
|
|
71
|
+
query.set(key, options.params[key]);
|
|
72
|
+
}
|
|
73
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
74
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
75
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
76
|
+
return {
|
|
77
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
78
|
+
options: localVarRequestOptions,
|
|
79
|
+
};
|
|
80
|
+
}),
|
|
36
81
|
/**
|
|
37
82
|
*
|
|
38
83
|
* @param {string} sessionUuid
|
|
@@ -134,6 +179,22 @@ exports.SessionsApiAxiosParamCreator = SessionsApiAxiosParamCreator;
|
|
|
134
179
|
*/
|
|
135
180
|
const SessionsApiFp = function (configuration) {
|
|
136
181
|
return {
|
|
182
|
+
/**
|
|
183
|
+
*
|
|
184
|
+
* @param {number} chatId
|
|
185
|
+
* @param {string} apikey
|
|
186
|
+
* @param {*} [options] Override http request option.
|
|
187
|
+
* @throws {RequiredError}
|
|
188
|
+
*/
|
|
189
|
+
getCurrentSessionByChatId(chatId, apikey, options) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
const localVarAxiosArgs = yield (0, exports.SessionsApiAxiosParamCreator)(configuration).getCurrentSessionByChatId(chatId, apikey, options);
|
|
192
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
193
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
194
|
+
return axios.request(axiosRequestArgs);
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
},
|
|
137
198
|
/**
|
|
138
199
|
*
|
|
139
200
|
* @param {string} sessionUuid
|
|
@@ -175,6 +236,18 @@ exports.SessionsApiFp = SessionsApiFp;
|
|
|
175
236
|
*/
|
|
176
237
|
const SessionsApiFactory = function (configuration, basePath, axios) {
|
|
177
238
|
return {
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @param {number} chatId
|
|
242
|
+
* @param {string} apikey
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
*/
|
|
246
|
+
getCurrentSessionByChatId(chatId, apikey, options) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
return (0, exports.SessionsApiFp)(configuration).getCurrentSessionByChatId(chatId, apikey, options).then((request) => request(axios, basePath));
|
|
249
|
+
});
|
|
250
|
+
},
|
|
178
251
|
/**
|
|
179
252
|
*
|
|
180
253
|
* @param {string} sessionUuid
|
|
@@ -209,6 +282,19 @@ exports.SessionsApiFactory = SessionsApiFactory;
|
|
|
209
282
|
* @extends {BaseAPI}
|
|
210
283
|
*/
|
|
211
284
|
class SessionsApi extends base_1.BaseAPI {
|
|
285
|
+
/**
|
|
286
|
+
*
|
|
287
|
+
* @param {number} chatId
|
|
288
|
+
* @param {string} apikey
|
|
289
|
+
* @param {*} [options] Override http request option.
|
|
290
|
+
* @throws {RequiredError}
|
|
291
|
+
* @memberof SessionsApi
|
|
292
|
+
*/
|
|
293
|
+
getCurrentSessionByChatId(chatId, apikey, options) {
|
|
294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
return (0, exports.SessionsApiFp)(this.configuration).getCurrentSessionByChatId(chatId, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
296
|
+
});
|
|
297
|
+
}
|
|
212
298
|
/**
|
|
213
299
|
*
|
|
214
300
|
* @param {string} sessionUuid
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* whatsapp-bridge Node Api
|
|
3
|
+
* The whatsapp-bridge API description
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { RepairMissingMessageKeysDto } from '../models';
|
|
16
|
+
/**
|
|
17
|
+
* TasksApi - axios parameter creator
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const TasksApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
24
|
+
* @param {string} apikey
|
|
25
|
+
* @param {*} [options] Override http request option.
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
*/
|
|
28
|
+
repairMissingMessageKeys: (body: RepairMissingMessageKeysDto, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* TasksApi - functional programming interface
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const TasksApiFp: (configuration?: Configuration) => {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
38
|
+
* @param {string} apikey
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
repairMissingMessageKeys(body: RepairMissingMessageKeysDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* TasksApi - factory interface
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export declare const TasksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
52
|
+
* @param {string} apikey
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
repairMissingMessageKeys(body: RepairMissingMessageKeysDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* TasksApi - object-oriented interface
|
|
60
|
+
* @export
|
|
61
|
+
* @class TasksApi
|
|
62
|
+
* @extends {BaseAPI}
|
|
63
|
+
*/
|
|
64
|
+
export declare class TasksApi extends BaseAPI {
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
68
|
+
* @param {string} apikey
|
|
69
|
+
* @param {*} [options] Override http request option.
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof TasksApi
|
|
72
|
+
*/
|
|
73
|
+
repairMissingMessageKeys(body: RepairMissingMessageKeysDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* whatsapp-bridge Node Api
|
|
6
|
+
* The whatsapp-bridge API description
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.TasksApi = exports.TasksApiFactory = exports.TasksApiFp = exports.TasksApiAxiosParamCreator = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const base_1 = require("../base");
|
|
30
|
+
/**
|
|
31
|
+
* TasksApi - axios parameter creator
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
const TasksApiAxiosParamCreator = function (configuration) {
|
|
35
|
+
return {
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
39
|
+
* @param {string} apikey
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
repairMissingMessageKeys: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
|
|
44
|
+
// verify required parameter 'body' is not null or undefined
|
|
45
|
+
if (body === null || body === undefined) {
|
|
46
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling repairMissingMessageKeys.');
|
|
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 repairMissingMessageKeys.');
|
|
51
|
+
}
|
|
52
|
+
const localVarPath = `/api/tasks/repair-missing-message-keys`;
|
|
53
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
54
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
55
|
+
let baseOptions;
|
|
56
|
+
if (configuration) {
|
|
57
|
+
baseOptions = configuration.baseOptions;
|
|
58
|
+
}
|
|
59
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
60
|
+
const localVarHeaderParameter = {};
|
|
61
|
+
const localVarQueryParameter = {};
|
|
62
|
+
if (apikey !== undefined && apikey !== null) {
|
|
63
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
64
|
+
}
|
|
65
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
66
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
67
|
+
for (const key in localVarQueryParameter) {
|
|
68
|
+
query.set(key, localVarQueryParameter[key]);
|
|
69
|
+
}
|
|
70
|
+
for (const key in options.params) {
|
|
71
|
+
query.set(key, options.params[key]);
|
|
72
|
+
}
|
|
73
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
74
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
75
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
76
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
77
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
78
|
+
return {
|
|
79
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
80
|
+
options: localVarRequestOptions,
|
|
81
|
+
};
|
|
82
|
+
}),
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
exports.TasksApiAxiosParamCreator = TasksApiAxiosParamCreator;
|
|
86
|
+
/**
|
|
87
|
+
* TasksApi - functional programming interface
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
const TasksApiFp = function (configuration) {
|
|
91
|
+
return {
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
95
|
+
* @param {string} apikey
|
|
96
|
+
* @param {*} [options] Override http request option.
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
*/
|
|
99
|
+
repairMissingMessageKeys(body, apikey, options) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const localVarAxiosArgs = yield (0, exports.TasksApiAxiosParamCreator)(configuration).repairMissingMessageKeys(body, apikey, options);
|
|
102
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
103
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
104
|
+
return axios.request(axiosRequestArgs);
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
exports.TasksApiFp = TasksApiFp;
|
|
111
|
+
/**
|
|
112
|
+
* TasksApi - factory interface
|
|
113
|
+
* @export
|
|
114
|
+
*/
|
|
115
|
+
const TasksApiFactory = function (configuration, basePath, axios) {
|
|
116
|
+
return {
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
120
|
+
* @param {string} apikey
|
|
121
|
+
* @param {*} [options] Override http request option.
|
|
122
|
+
* @throws {RequiredError}
|
|
123
|
+
*/
|
|
124
|
+
repairMissingMessageKeys(body, apikey, options) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
return (0, exports.TasksApiFp)(configuration).repairMissingMessageKeys(body, apikey, options).then((request) => request(axios, basePath));
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
exports.TasksApiFactory = TasksApiFactory;
|
|
132
|
+
/**
|
|
133
|
+
* TasksApi - object-oriented interface
|
|
134
|
+
* @export
|
|
135
|
+
* @class TasksApi
|
|
136
|
+
* @extends {BaseAPI}
|
|
137
|
+
*/
|
|
138
|
+
class TasksApi extends base_1.BaseAPI {
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @param {RepairMissingMessageKeysDto} body
|
|
142
|
+
* @param {string} apikey
|
|
143
|
+
* @param {*} [options] Override http request option.
|
|
144
|
+
* @throws {RequiredError}
|
|
145
|
+
* @memberof TasksApi
|
|
146
|
+
*/
|
|
147
|
+
repairMissingMessageKeys(body, apikey, options) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
return (0, exports.TasksApiFp)(this.configuration).repairMissingMessageKeys(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
exports.TasksApi = TasksApi;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './pagination-chat-response-dto';
|
|
|
25
25
|
export * from './parameter-template-dto';
|
|
26
26
|
export * from './read-message-dto';
|
|
27
27
|
export * from './read-message-response-data-dto';
|
|
28
|
+
export * from './repair-missing-message-keys-dto';
|
|
28
29
|
export * from './role-dto';
|
|
29
30
|
export * from './send-template-data-dto';
|
|
30
31
|
export * from './send-template-dto';
|
|
@@ -39,6 +40,8 @@ export * from './status-dto';
|
|
|
39
40
|
export * from './tokens-dto';
|
|
40
41
|
export * from './unauthorized-dto';
|
|
41
42
|
export * from './unauthorized-token-dto';
|
|
43
|
+
export * from './update-agent-dto';
|
|
44
|
+
export * from './update-chat-status-dto';
|
|
42
45
|
export * from './user-detail-dto';
|
|
43
46
|
export * from './user-update-password-dto';
|
|
44
47
|
export * from './whatsapp-chat-dto';
|
package/dist/models/index.js
CHANGED
|
@@ -41,6 +41,7 @@ __exportStar(require("./pagination-chat-response-dto"), exports);
|
|
|
41
41
|
__exportStar(require("./parameter-template-dto"), exports);
|
|
42
42
|
__exportStar(require("./read-message-dto"), exports);
|
|
43
43
|
__exportStar(require("./read-message-response-data-dto"), exports);
|
|
44
|
+
__exportStar(require("./repair-missing-message-keys-dto"), exports);
|
|
44
45
|
__exportStar(require("./role-dto"), exports);
|
|
45
46
|
__exportStar(require("./send-template-data-dto"), exports);
|
|
46
47
|
__exportStar(require("./send-template-dto"), exports);
|
|
@@ -55,6 +56,8 @@ __exportStar(require("./status-dto"), exports);
|
|
|
55
56
|
__exportStar(require("./tokens-dto"), exports);
|
|
56
57
|
__exportStar(require("./unauthorized-dto"), exports);
|
|
57
58
|
__exportStar(require("./unauthorized-token-dto"), exports);
|
|
59
|
+
__exportStar(require("./update-agent-dto"), exports);
|
|
60
|
+
__exportStar(require("./update-chat-status-dto"), exports);
|
|
58
61
|
__exportStar(require("./user-detail-dto"), exports);
|
|
59
62
|
__exportStar(require("./user-update-password-dto"), exports);
|
|
60
63
|
__exportStar(require("./whatsapp-chat-dto"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* whatsapp-bridge Node Api
|
|
3
|
+
* The whatsapp-bridge API description
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface RepairMissingMessageKeysDto
|
|
17
|
+
*/
|
|
18
|
+
export interface RepairMissingMessageKeysDto {
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* whatsapp-bridge Node Api
|
|
6
|
+
* The whatsapp-bridge API description
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|