@libgot/whatsapp-bridge-sdk 1.0.44 → 1.0.46-rc.1

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.
Files changed (54) hide show
  1. package/README.md +3 -3
  2. package/apis/chats-api.ts +191 -0
  3. package/apis/messages-api.ts +88 -0
  4. package/apis/sessions-api.ts +96 -0
  5. package/apis/tasks-api.ts +86 -0
  6. package/dist/apis/chats-api.d.ts +75 -0
  7. package/dist/apis/chats-api.js +194 -0
  8. package/dist/apis/messages-api.d.ts +35 -0
  9. package/dist/apis/messages-api.js +88 -0
  10. package/dist/apis/sessions-api.d.ts +38 -0
  11. package/dist/apis/sessions-api.js +97 -0
  12. package/dist/apis/tasks-api.d.ts +33 -0
  13. package/dist/apis/tasks-api.js +88 -0
  14. package/dist/models/audio-message-dto.d.ts +31 -0
  15. package/dist/models/audio-message-dto.js +15 -0
  16. package/dist/models/chat-user-cellphone-dto.d.ts +25 -0
  17. package/dist/models/chat-user-cellphone-dto.js +15 -0
  18. package/dist/models/index.d.ts +11 -0
  19. package/dist/models/index.js +11 -0
  20. package/dist/models/send-media-data-dto.d.ts +31 -0
  21. package/dist/models/send-media-data-dto.js +15 -0
  22. package/dist/models/send-media-data-response-dto.d.ts +25 -0
  23. package/dist/models/send-media-data-response-dto.js +15 -0
  24. package/dist/models/send-media-dto.d.ts +91 -0
  25. package/dist/models/send-media-dto.js +25 -0
  26. package/dist/models/send-media-key-dto.d.ts +37 -0
  27. package/dist/models/send-media-key-dto.js +15 -0
  28. package/dist/models/send-media-message-dto.d.ts +25 -0
  29. package/dist/models/send-media-message-dto.js +15 -0
  30. package/dist/models/send-media-response-dto.d.ts +72 -0
  31. package/dist/models/send-media-response-dto.js +15 -0
  32. package/dist/models/send-template-data-dto.d.ts +6 -0
  33. package/dist/models/session-summary-dto.d.ts +47 -0
  34. package/dist/models/session-summary-dto.js +15 -0
  35. package/dist/models/session-summary-list-response-data-dto.d.ts +25 -0
  36. package/dist/models/session-summary-list-response-data-dto.js +15 -0
  37. package/dist/models/sticker-message-dto.d.ts +31 -0
  38. package/dist/models/sticker-message-dto.js +15 -0
  39. package/dist/models/whatsapp-message-dto.d.ts +4 -2
  40. package/models/audio-message-dto.ts +36 -0
  41. package/models/chat-user-cellphone-dto.ts +29 -0
  42. package/models/index.ts +11 -0
  43. package/models/send-media-data-dto.ts +36 -0
  44. package/models/send-media-data-response-dto.ts +29 -0
  45. package/models/send-media-dto.ts +106 -0
  46. package/models/send-media-key-dto.ts +43 -0
  47. package/models/send-media-message-dto.ts +29 -0
  48. package/models/send-media-response-dto.ts +84 -0
  49. package/models/send-template-data-dto.ts +7 -0
  50. package/models/session-summary-dto.ts +55 -0
  51. package/models/session-summary-list-response-data-dto.ts +29 -0
  52. package/models/sticker-message-dto.ts +36 -0
  53. package/models/whatsapp-message-dto.ts +4 -2
  54. package/package.json +2 -2
@@ -17,6 +17,7 @@ import { AssignmentTypeDto } from '../models';
17
17
  import { ChatLatestStatusDto } from '../models';
18
18
  import { ChatLifecycleEventDto } from '../models';
19
19
  import { ChatLifecycleEventsResponseDto } from '../models';
20
+ import { ChatUserCellphoneDto } from '../models';
20
21
  import { CreateChatLifecycleEventDto } from '../models';
21
22
  import { MarkChatUnreadDto } from '../models';
22
23
  import { PaginationChatResponseDto } from '../models';
@@ -56,6 +57,15 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
56
57
  * @throws {RequiredError}
57
58
  */
58
59
  createChatEvent: (body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
60
+ /**
61
+ *
62
+ * @param {string} userId
63
+ * @param {number} branchId
64
+ * @param {string} apikey
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ */
68
+ getCellphoneByUserId: (userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
59
69
  /**
60
70
  *
61
71
  * @param {number} id
@@ -73,6 +83,15 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
73
83
  * @throws {RequiredError}
74
84
  */
75
85
  getChatEvents: (id: number, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
86
+ /**
87
+ *
88
+ * @param {number} cellphone
89
+ * @param {number} branchId
90
+ * @param {string} apikey
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ getChatEventsByCellphone: (cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
76
95
  /**
77
96
  *
78
97
  * @param {number} id
@@ -158,6 +177,15 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
158
177
  * @throws {RequiredError}
159
178
  */
160
179
  createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatLifecycleEventDto>>>;
180
+ /**
181
+ *
182
+ * @param {string} userId
183
+ * @param {number} branchId
184
+ * @param {string} apikey
185
+ * @param {*} [options] Override http request option.
186
+ * @throws {RequiredError}
187
+ */
188
+ getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatUserCellphoneDto>>>;
161
189
  /**
162
190
  *
163
191
  * @param {number} id
@@ -175,6 +203,15 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
175
203
  * @throws {RequiredError}
176
204
  */
177
205
  getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>>;
206
+ /**
207
+ *
208
+ * @param {number} cellphone
209
+ * @param {number} branchId
210
+ * @param {string} apikey
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>>;
178
215
  /**
179
216
  *
180
217
  * @param {number} id
@@ -260,6 +297,15 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
260
297
  * @throws {RequiredError}
261
298
  */
262
299
  createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventDto>>;
300
+ /**
301
+ *
302
+ * @param {string} userId
303
+ * @param {number} branchId
304
+ * @param {string} apikey
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ */
308
+ getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatUserCellphoneDto>>;
263
309
  /**
264
310
  *
265
311
  * @param {number} id
@@ -277,6 +323,15 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
277
323
  * @throws {RequiredError}
278
324
  */
279
325
  getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
326
+ /**
327
+ *
328
+ * @param {number} cellphone
329
+ * @param {number} branchId
330
+ * @param {string} apikey
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
280
335
  /**
281
336
  *
282
337
  * @param {number} id
@@ -367,6 +422,16 @@ export declare class ChatsApi extends BaseAPI {
367
422
  * @memberof ChatsApi
368
423
  */
369
424
  createChatEvent(body: CreateChatLifecycleEventDto, apikey: string, branchId: number, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventDto>>;
425
+ /**
426
+ *
427
+ * @param {string} userId
428
+ * @param {number} branchId
429
+ * @param {string} apikey
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ * @memberof ChatsApi
433
+ */
434
+ getCellphoneByUserId(userId: string, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatUserCellphoneDto>>;
370
435
  /**
371
436
  *
372
437
  * @param {number} id
@@ -386,6 +451,16 @@ export declare class ChatsApi extends BaseAPI {
386
451
  * @memberof ChatsApi
387
452
  */
388
453
  getChatEvents(id: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
454
+ /**
455
+ *
456
+ * @param {number} cellphone
457
+ * @param {number} branchId
458
+ * @param {string} apikey
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ * @memberof ChatsApi
462
+ */
463
+ getChatEventsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatLifecycleEventsResponseDto>>;
389
464
  /**
390
465
  *
391
466
  * @param {number} id
@@ -200,6 +200,59 @@ const ChatsApiAxiosParamCreator = function (configuration) {
200
200
  options: localVarRequestOptions,
201
201
  };
202
202
  }),
203
+ /**
204
+ *
205
+ * @param {string} userId
206
+ * @param {number} branchId
207
+ * @param {string} apikey
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ getCellphoneByUserId: (userId_1, branchId_1, apikey_1, ...args_1) => __awaiter(this, [userId_1, branchId_1, apikey_1, ...args_1], void 0, function* (userId, branchId, apikey, options = {}) {
212
+ // verify required parameter 'userId' is not null or undefined
213
+ if (userId === null || userId === undefined) {
214
+ throw new base_1.RequiredError('userId', 'Required parameter userId was null or undefined when calling getCellphoneByUserId.');
215
+ }
216
+ // verify required parameter 'branchId' is not null or undefined
217
+ if (branchId === null || branchId === undefined) {
218
+ throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getCellphoneByUserId.');
219
+ }
220
+ // verify required parameter 'apikey' is not null or undefined
221
+ if (apikey === null || apikey === undefined) {
222
+ throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getCellphoneByUserId.');
223
+ }
224
+ const localVarPath = `/api/chats/user/{userId}/cellphone`
225
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
226
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
227
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
228
+ let baseOptions;
229
+ if (configuration) {
230
+ baseOptions = configuration.baseOptions;
231
+ }
232
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
233
+ const localVarHeaderParameter = {};
234
+ const localVarQueryParameter = {};
235
+ if (branchId !== undefined) {
236
+ localVarQueryParameter['branchId'] = branchId;
237
+ }
238
+ if (apikey !== undefined && apikey !== null) {
239
+ localVarHeaderParameter['apikey'] = String(apikey);
240
+ }
241
+ const query = new URLSearchParams(localVarUrlObj.search);
242
+ for (const key in localVarQueryParameter) {
243
+ query.set(key, localVarQueryParameter[key]);
244
+ }
245
+ for (const key in options.params) {
246
+ query.set(key, options.params[key]);
247
+ }
248
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
249
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
250
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
251
+ return {
252
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
253
+ options: localVarRequestOptions,
254
+ };
255
+ }),
203
256
  /**
204
257
  *
205
258
  * @param {number} id
@@ -298,6 +351,59 @@ const ChatsApiAxiosParamCreator = function (configuration) {
298
351
  options: localVarRequestOptions,
299
352
  };
300
353
  }),
354
+ /**
355
+ *
356
+ * @param {number} cellphone
357
+ * @param {number} branchId
358
+ * @param {string} apikey
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ */
362
+ getChatEventsByCellphone: (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 = {}) {
363
+ // verify required parameter 'cellphone' is not null or undefined
364
+ if (cellphone === null || cellphone === undefined) {
365
+ throw new base_1.RequiredError('cellphone', 'Required parameter cellphone was null or undefined when calling getChatEventsByCellphone.');
366
+ }
367
+ // verify required parameter 'branchId' is not null or undefined
368
+ if (branchId === null || branchId === undefined) {
369
+ throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChatEventsByCellphone.');
370
+ }
371
+ // verify required parameter 'apikey' is not null or undefined
372
+ if (apikey === null || apikey === undefined) {
373
+ throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getChatEventsByCellphone.');
374
+ }
375
+ const localVarPath = `/api/chats/cellphone/{cellphone}/events`
376
+ .replace(`{${"cellphone"}}`, encodeURIComponent(String(cellphone)));
377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
378
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
379
+ let baseOptions;
380
+ if (configuration) {
381
+ baseOptions = configuration.baseOptions;
382
+ }
383
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
384
+ const localVarHeaderParameter = {};
385
+ const localVarQueryParameter = {};
386
+ if (branchId !== undefined) {
387
+ localVarQueryParameter['branchId'] = branchId;
388
+ }
389
+ if (apikey !== undefined && apikey !== null) {
390
+ localVarHeaderParameter['apikey'] = String(apikey);
391
+ }
392
+ const query = new URLSearchParams(localVarUrlObj.search);
393
+ for (const key in localVarQueryParameter) {
394
+ query.set(key, localVarQueryParameter[key]);
395
+ }
396
+ for (const key in options.params) {
397
+ query.set(key, options.params[key]);
398
+ }
399
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
400
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
401
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
402
+ return {
403
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
404
+ options: localVarRequestOptions,
405
+ };
406
+ }),
301
407
  /**
302
408
  *
303
409
  * @param {number} id
@@ -642,6 +748,23 @@ const ChatsApiFp = function (configuration) {
642
748
  };
643
749
  });
644
750
  },
751
+ /**
752
+ *
753
+ * @param {string} userId
754
+ * @param {number} branchId
755
+ * @param {string} apikey
756
+ * @param {*} [options] Override http request option.
757
+ * @throws {RequiredError}
758
+ */
759
+ getCellphoneByUserId(userId, branchId, apikey, options) {
760
+ return __awaiter(this, void 0, void 0, function* () {
761
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getCellphoneByUserId(userId, branchId, apikey, options);
762
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
763
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
764
+ return axios.request(axiosRequestArgs);
765
+ };
766
+ });
767
+ },
645
768
  /**
646
769
  *
647
770
  * @param {number} id
@@ -675,6 +798,23 @@ const ChatsApiFp = function (configuration) {
675
798
  };
676
799
  });
677
800
  },
801
+ /**
802
+ *
803
+ * @param {number} cellphone
804
+ * @param {number} branchId
805
+ * @param {string} apikey
806
+ * @param {*} [options] Override http request option.
807
+ * @throws {RequiredError}
808
+ */
809
+ getChatEventsByCellphone(cellphone, branchId, apikey, options) {
810
+ return __awaiter(this, void 0, void 0, function* () {
811
+ const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options);
812
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
813
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
814
+ return axios.request(axiosRequestArgs);
815
+ };
816
+ });
817
+ },
678
818
  /**
679
819
  *
680
820
  * @param {number} id
@@ -815,6 +955,19 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
815
955
  return (0, exports.ChatsApiFp)(configuration).createChatEvent(body, apikey, branchId, id, options).then((request) => request(axios, basePath));
816
956
  });
817
957
  },
958
+ /**
959
+ *
960
+ * @param {string} userId
961
+ * @param {number} branchId
962
+ * @param {string} apikey
963
+ * @param {*} [options] Override http request option.
964
+ * @throws {RequiredError}
965
+ */
966
+ getCellphoneByUserId(userId, branchId, apikey, options) {
967
+ return __awaiter(this, void 0, void 0, function* () {
968
+ return (0, exports.ChatsApiFp)(configuration).getCellphoneByUserId(userId, branchId, apikey, options).then((request) => request(axios, basePath));
969
+ });
970
+ },
818
971
  /**
819
972
  *
820
973
  * @param {number} id
@@ -840,6 +993,19 @@ const ChatsApiFactory = function (configuration, basePath, axios) {
840
993
  return (0, exports.ChatsApiFp)(configuration).getChatEvents(id, branchId, apikey, options).then((request) => request(axios, basePath));
841
994
  });
842
995
  },
996
+ /**
997
+ *
998
+ * @param {number} cellphone
999
+ * @param {number} branchId
1000
+ * @param {string} apikey
1001
+ * @param {*} [options] Override http request option.
1002
+ * @throws {RequiredError}
1003
+ */
1004
+ getChatEventsByCellphone(cellphone, branchId, apikey, options) {
1005
+ return __awaiter(this, void 0, void 0, function* () {
1006
+ return (0, exports.ChatsApiFp)(configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options).then((request) => request(axios, basePath));
1007
+ });
1008
+ },
843
1009
  /**
844
1010
  *
845
1011
  * @param {number} id
@@ -964,6 +1130,20 @@ class ChatsApi extends base_1.BaseAPI {
964
1130
  return (0, exports.ChatsApiFp)(this.configuration).createChatEvent(body, apikey, branchId, id, options).then((request) => request(this.axios, this.basePath));
965
1131
  });
966
1132
  }
1133
+ /**
1134
+ *
1135
+ * @param {string} userId
1136
+ * @param {number} branchId
1137
+ * @param {string} apikey
1138
+ * @param {*} [options] Override http request option.
1139
+ * @throws {RequiredError}
1140
+ * @memberof ChatsApi
1141
+ */
1142
+ getCellphoneByUserId(userId, branchId, apikey, options) {
1143
+ return __awaiter(this, void 0, void 0, function* () {
1144
+ return (0, exports.ChatsApiFp)(this.configuration).getCellphoneByUserId(userId, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
1145
+ });
1146
+ }
967
1147
  /**
968
1148
  *
969
1149
  * @param {number} id
@@ -991,6 +1171,20 @@ class ChatsApi extends base_1.BaseAPI {
991
1171
  return (0, exports.ChatsApiFp)(this.configuration).getChatEvents(id, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
992
1172
  });
993
1173
  }
1174
+ /**
1175
+ *
1176
+ * @param {number} cellphone
1177
+ * @param {number} branchId
1178
+ * @param {string} apikey
1179
+ * @param {*} [options] Override http request option.
1180
+ * @throws {RequiredError}
1181
+ * @memberof ChatsApi
1182
+ */
1183
+ getChatEventsByCellphone(cellphone, branchId, apikey, options) {
1184
+ return __awaiter(this, void 0, void 0, function* () {
1185
+ return (0, exports.ChatsApiFp)(this.configuration).getChatEventsByCellphone(cellphone, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
1186
+ });
1187
+ }
994
1188
  /**
995
1189
  *
996
1190
  * @param {number} id
@@ -15,6 +15,8 @@ import { RequestArgs, BaseAPI } from '../base';
15
15
  import { MessageResponseDto } from '../models';
16
16
  import { ReadMessageDto } from '../models';
17
17
  import { ReadMessageResponseDataDto } from '../models';
18
+ import { SendMediaDataDto } from '../models';
19
+ import { SendMediaDataResponseDto } from '../models';
18
20
  import { SendTemplateDataDto } from '../models';
19
21
  import { SendTextDataResponseDto } from '../models';
20
22
  import { SendTextDto } from '../models';
@@ -40,6 +42,14 @@ export declare const MessagesApiAxiosParamCreator: (configuration?: Configuratio
40
42
  * @throws {RequiredError}
41
43
  */
42
44
  readMessage: (body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
45
+ /**
46
+ *
47
+ * @param {SendMediaDataDto} body
48
+ * @param {string} apikey
49
+ * @param {*} [options] Override http request option.
50
+ * @throws {RequiredError}
51
+ */
52
+ sendMediaMessage: (body: SendMediaDataDto, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
43
53
  /**
44
54
  *
45
55
  * @param {SendTemplateDataDto} body
@@ -79,6 +89,14 @@ export declare const MessagesApiFp: (configuration?: Configuration) => {
79
89
  * @throws {RequiredError}
80
90
  */
81
91
  readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReadMessageResponseDataDto>>>;
92
+ /**
93
+ *
94
+ * @param {SendMediaDataDto} body
95
+ * @param {string} apikey
96
+ * @param {*} [options] Override http request option.
97
+ * @throws {RequiredError}
98
+ */
99
+ sendMediaMessage(body: SendMediaDataDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendMediaDataResponseDto>>>;
82
100
  /**
83
101
  *
84
102
  * @param {SendTemplateDataDto} body
@@ -118,6 +136,14 @@ export declare const MessagesApiFactory: (configuration?: Configuration, basePat
118
136
  * @throws {RequiredError}
119
137
  */
120
138
  readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
139
+ /**
140
+ *
141
+ * @param {SendMediaDataDto} body
142
+ * @param {string} apikey
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ sendMediaMessage(body: SendMediaDataDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendMediaDataResponseDto>>;
121
147
  /**
122
148
  *
123
149
  * @param {SendTemplateDataDto} body
@@ -161,6 +187,15 @@ export declare class MessagesApi extends BaseAPI {
161
187
  * @memberof MessagesApi
162
188
  */
163
189
  readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
190
+ /**
191
+ *
192
+ * @param {SendMediaDataDto} body
193
+ * @param {string} apikey
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ * @memberof MessagesApi
197
+ */
198
+ sendMediaMessage(body: SendMediaDataDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendMediaDataResponseDto>>;
164
199
  /**
165
200
  *
166
201
  * @param {SendTemplateDataDto} body
@@ -135,6 +135,53 @@ const MessagesApiAxiosParamCreator = function (configuration) {
135
135
  options: localVarRequestOptions,
136
136
  };
137
137
  }),
138
+ /**
139
+ *
140
+ * @param {SendMediaDataDto} body
141
+ * @param {string} apikey
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ */
145
+ sendMediaMessage: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
146
+ // verify required parameter 'body' is not null or undefined
147
+ if (body === null || body === undefined) {
148
+ throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling sendMediaMessage.');
149
+ }
150
+ // verify required parameter 'apikey' is not null or undefined
151
+ if (apikey === null || apikey === undefined) {
152
+ throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling sendMediaMessage.');
153
+ }
154
+ const localVarPath = `/api/messages/send-media`;
155
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
156
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
157
+ let baseOptions;
158
+ if (configuration) {
159
+ baseOptions = configuration.baseOptions;
160
+ }
161
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
162
+ const localVarHeaderParameter = {};
163
+ const localVarQueryParameter = {};
164
+ if (apikey !== undefined && apikey !== null) {
165
+ localVarHeaderParameter['apikey'] = String(apikey);
166
+ }
167
+ localVarHeaderParameter['Content-Type'] = 'application/json';
168
+ const query = new URLSearchParams(localVarUrlObj.search);
169
+ for (const key in localVarQueryParameter) {
170
+ query.set(key, localVarQueryParameter[key]);
171
+ }
172
+ for (const key in options.params) {
173
+ query.set(key, options.params[key]);
174
+ }
175
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
176
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
177
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
178
+ const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
179
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
180
+ return {
181
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
182
+ options: localVarRequestOptions,
183
+ };
184
+ }),
138
185
  /**
139
186
  *
140
187
  * @param {SendTemplateDataDto} body
@@ -271,6 +318,22 @@ const MessagesApiFp = function (configuration) {
271
318
  };
272
319
  });
273
320
  },
321
+ /**
322
+ *
323
+ * @param {SendMediaDataDto} body
324
+ * @param {string} apikey
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ sendMediaMessage(body, apikey, options) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).sendMediaMessage(body, apikey, options);
331
+ return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
332
+ const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
333
+ return axios.request(axiosRequestArgs);
334
+ };
335
+ });
336
+ },
274
337
  /**
275
338
  *
276
339
  * @param {SendTemplateDataDto} body
@@ -337,6 +400,18 @@ const MessagesApiFactory = function (configuration, basePath, axios) {
337
400
  return (0, exports.MessagesApiFp)(configuration).readMessage(body, apikey, options).then((request) => request(axios, basePath));
338
401
  });
339
402
  },
403
+ /**
404
+ *
405
+ * @param {SendMediaDataDto} body
406
+ * @param {string} apikey
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ */
410
+ sendMediaMessage(body, apikey, options) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ return (0, exports.MessagesApiFp)(configuration).sendMediaMessage(body, apikey, options).then((request) => request(axios, basePath));
413
+ });
414
+ },
340
415
  /**
341
416
  *
342
417
  * @param {SendTemplateDataDto} body
@@ -398,6 +473,19 @@ class MessagesApi extends base_1.BaseAPI {
398
473
  return (0, exports.MessagesApiFp)(this.configuration).readMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
399
474
  });
400
475
  }
476
+ /**
477
+ *
478
+ * @param {SendMediaDataDto} body
479
+ * @param {string} apikey
480
+ * @param {*} [options] Override http request option.
481
+ * @throws {RequiredError}
482
+ * @memberof MessagesApi
483
+ */
484
+ sendMediaMessage(body, apikey, options) {
485
+ return __awaiter(this, void 0, void 0, function* () {
486
+ return (0, exports.MessagesApiFp)(this.configuration).sendMediaMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
487
+ });
488
+ }
401
489
  /**
402
490
  *
403
491
  * @param {SendTemplateDataDto} body
@@ -13,6 +13,7 @@ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { SessionResponseDataDto } from '../models';
16
+ import { SessionSummaryListResponseDataDto } from '../models';
16
17
  import { SessionsResponseDataDto } from '../models';
17
18
  /**
18
19
  * SessionsApi - axios parameter creator
@@ -43,6 +44,15 @@ export declare const SessionsApiAxiosParamCreator: (configuration?: Configuratio
43
44
  * @throws {RequiredError}
44
45
  */
45
46
  getSessions: (branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
47
+ /**
48
+ *
49
+ * @param {number} cellphone
50
+ * @param {number} branchId
51
+ * @param {string} apikey
52
+ * @param {*} [options] Override http request option.
53
+ * @throws {RequiredError}
54
+ */
55
+ getSessionsByCellphone: (cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
46
56
  };
47
57
  /**
48
58
  * SessionsApi - functional programming interface
@@ -73,6 +83,15 @@ export declare const SessionsApiFp: (configuration?: Configuration) => {
73
83
  * @throws {RequiredError}
74
84
  */
75
85
  getSessions(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionsResponseDataDto>>>;
86
+ /**
87
+ *
88
+ * @param {number} cellphone
89
+ * @param {number} branchId
90
+ * @param {string} apikey
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ getSessionsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionSummaryListResponseDataDto>>>;
76
95
  };
77
96
  /**
78
97
  * SessionsApi - factory interface
@@ -103,6 +122,15 @@ export declare const SessionsApiFactory: (configuration?: Configuration, basePat
103
122
  * @throws {RequiredError}
104
123
  */
105
124
  getSessions(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionsResponseDataDto>>;
125
+ /**
126
+ *
127
+ * @param {number} cellphone
128
+ * @param {number} branchId
129
+ * @param {string} apikey
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ */
133
+ getSessionsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionSummaryListResponseDataDto>>;
106
134
  };
107
135
  /**
108
136
  * SessionsApi - object-oriented interface
@@ -138,4 +166,14 @@ export declare class SessionsApi extends BaseAPI {
138
166
  * @memberof SessionsApi
139
167
  */
140
168
  getSessions(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionsResponseDataDto>>;
169
+ /**
170
+ *
171
+ * @param {number} cellphone
172
+ * @param {number} branchId
173
+ * @param {string} apikey
174
+ * @param {*} [options] Override http request option.
175
+ * @throws {RequiredError}
176
+ * @memberof SessionsApi
177
+ */
178
+ getSessionsByCellphone(cellphone: number, branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionSummaryListResponseDataDto>>;
141
179
  }