@libgot/whatsapp-bridge-sdk 1.0.24 → 1.0.26
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/apis/chats-api.ts +84 -0
- package/dist/apis/chats-api.d.ts +34 -0
- package/dist/apis/chats-api.js +108 -0
- package/dist/models/document-message-dto.d.ts +31 -0
- package/dist/models/document-message-dto.js +15 -0
- package/dist/models/image-message-dto.d.ts +31 -0
- package/dist/models/image-message-dto.js +15 -0
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.js +3 -1
- package/dist/models/mark-chat-unread-dto.d.ts +25 -0
- package/dist/models/mark-chat-unread-dto.js +15 -0
- package/dist/models/send-message-dto.d.ts +19 -0
- package/dist/models/send-message-dto.js +15 -0
- package/dist/models/whatsapp-chat-dto.d.ts +6 -0
- package/dist/models/whatsapp-message-dto.d.ts +4 -2
- package/models/document-message-dto.ts +36 -0
- package/models/image-message-dto.ts +36 -0
- package/models/index.ts +3 -1
- package/models/mark-chat-unread-dto.ts +29 -0
- package/models/send-message-dto.ts +22 -0
- package/models/whatsapp-chat-dto.ts +7 -0
- package/models/whatsapp-message-dto.ts +4 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @1.0.
|
|
1
|
+
## @1.0.26
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @libgot/whatsapp-bridge-sdk@1.0.
|
|
39
|
+
npm install @libgot/whatsapp-bridge-sdk@1.0.26 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/apis/chats-api.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { Configuration } from '../configuration';
|
|
|
19
19
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
20
20
|
import { AssignToMeDto } from '../models';
|
|
21
21
|
import { ChatsResponseDTO } from '../models';
|
|
22
|
+
import { MarkChatUnreadDto } from '../models';
|
|
22
23
|
import { WhatsappChatResponseDTO } from '../models';
|
|
23
24
|
/**
|
|
24
25
|
* ChatsApi - axios parameter creator
|
|
@@ -155,6 +156,54 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
155
156
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
156
157
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
157
158
|
|
|
159
|
+
return {
|
|
160
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
161
|
+
options: localVarRequestOptions,
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* @param {MarkChatUnreadDto} body
|
|
167
|
+
* @param {number} id
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
markChatUnread: async (body: MarkChatUnreadDto, id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
172
|
+
// verify required parameter 'body' is not null or undefined
|
|
173
|
+
if (body === null || body === undefined) {
|
|
174
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling markChatUnread.');
|
|
175
|
+
}
|
|
176
|
+
// verify required parameter 'id' is not null or undefined
|
|
177
|
+
if (id === null || id === undefined) {
|
|
178
|
+
throw new RequiredError('id','Required parameter id was null or undefined when calling markChatUnread.');
|
|
179
|
+
}
|
|
180
|
+
const localVarPath = `/api/chats/{id}/mark-chat-unread`
|
|
181
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
182
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
183
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
184
|
+
let baseOptions;
|
|
185
|
+
if (configuration) {
|
|
186
|
+
baseOptions = configuration.baseOptions;
|
|
187
|
+
}
|
|
188
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
189
|
+
const localVarHeaderParameter = {} as any;
|
|
190
|
+
const localVarQueryParameter = {} as any;
|
|
191
|
+
|
|
192
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
193
|
+
|
|
194
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
195
|
+
for (const key in localVarQueryParameter) {
|
|
196
|
+
query.set(key, localVarQueryParameter[key]);
|
|
197
|
+
}
|
|
198
|
+
for (const key in options.params) {
|
|
199
|
+
query.set(key, options.params[key]);
|
|
200
|
+
}
|
|
201
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
202
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
203
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
204
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
205
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
206
|
+
|
|
158
207
|
return {
|
|
159
208
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
160
209
|
options: localVarRequestOptions,
|
|
@@ -210,6 +259,20 @@ export const ChatsApiFp = function(configuration?: Configuration) {
|
|
|
210
259
|
return axios.request(axiosRequestArgs);
|
|
211
260
|
};
|
|
212
261
|
},
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
* @param {MarkChatUnreadDto} body
|
|
265
|
+
* @param {number} id
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
*/
|
|
269
|
+
async markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
270
|
+
const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).markChatUnread(body, id, options);
|
|
271
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
272
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
273
|
+
return axios.request(axiosRequestArgs);
|
|
274
|
+
};
|
|
275
|
+
},
|
|
213
276
|
}
|
|
214
277
|
};
|
|
215
278
|
|
|
@@ -248,6 +311,16 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
|
|
|
248
311
|
async getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>> {
|
|
249
312
|
return ChatsApiFp(configuration).getChats(branchId, userId, options).then((request) => request(axios, basePath));
|
|
250
313
|
},
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @param {MarkChatUnreadDto} body
|
|
317
|
+
* @param {number} id
|
|
318
|
+
* @param {*} [options] Override http request option.
|
|
319
|
+
* @throws {RequiredError}
|
|
320
|
+
*/
|
|
321
|
+
async markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
322
|
+
return ChatsApiFp(configuration).markChatUnread(body, id, options).then((request) => request(axios, basePath));
|
|
323
|
+
},
|
|
251
324
|
};
|
|
252
325
|
};
|
|
253
326
|
|
|
@@ -290,4 +363,15 @@ export class ChatsApi extends BaseAPI {
|
|
|
290
363
|
public async getChats(branchId: number, userId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatsResponseDTO>> {
|
|
291
364
|
return ChatsApiFp(this.configuration).getChats(branchId, userId, options).then((request) => request(this.axios, this.basePath));
|
|
292
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
*
|
|
368
|
+
* @param {MarkChatUnreadDto} body
|
|
369
|
+
* @param {number} id
|
|
370
|
+
* @param {*} [options] Override http request option.
|
|
371
|
+
* @throws {RequiredError}
|
|
372
|
+
* @memberof ChatsApi
|
|
373
|
+
*/
|
|
374
|
+
public async markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
375
|
+
return ChatsApiFp(this.configuration).markChatUnread(body, id, options).then((request) => request(this.axios, this.basePath));
|
|
376
|
+
}
|
|
293
377
|
}
|
package/dist/apis/chats-api.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { Configuration } from '../configuration';
|
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { AssignToMeDto } from '../models';
|
|
16
16
|
import { ChatsResponseDTO } from '../models';
|
|
17
|
+
import { MarkChatUnreadDto } from '../models';
|
|
17
18
|
import { WhatsappChatResponseDTO } from '../models';
|
|
18
19
|
/**
|
|
19
20
|
* ChatsApi - axios parameter creator
|
|
@@ -43,6 +44,14 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
43
44
|
* @throws {RequiredError}
|
|
44
45
|
*/
|
|
45
46
|
getChats: (branchId: number, userId?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @param {MarkChatUnreadDto} body
|
|
50
|
+
* @param {number} id
|
|
51
|
+
* @param {*} [options] Override http request option.
|
|
52
|
+
* @throws {RequiredError}
|
|
53
|
+
*/
|
|
54
|
+
markChatUnread: (body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
55
|
};
|
|
47
56
|
/**
|
|
48
57
|
* ChatsApi - functional programming interface
|
|
@@ -72,6 +81,14 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
72
81
|
* @throws {RequiredError}
|
|
73
82
|
*/
|
|
74
83
|
getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>>;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @param {MarkChatUnreadDto} body
|
|
87
|
+
* @param {number} id
|
|
88
|
+
* @param {*} [options] Override http request option.
|
|
89
|
+
* @throws {RequiredError}
|
|
90
|
+
*/
|
|
91
|
+
markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
75
92
|
};
|
|
76
93
|
/**
|
|
77
94
|
* ChatsApi - factory interface
|
|
@@ -101,6 +118,14 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
101
118
|
* @throws {RequiredError}
|
|
102
119
|
*/
|
|
103
120
|
getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @param {MarkChatUnreadDto} body
|
|
124
|
+
* @param {number} id
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
*/
|
|
128
|
+
markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
104
129
|
};
|
|
105
130
|
/**
|
|
106
131
|
* ChatsApi - object-oriented interface
|
|
@@ -135,4 +160,13 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
135
160
|
* @memberof ChatsApi
|
|
136
161
|
*/
|
|
137
162
|
getChats(branchId: number, userId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
|
|
163
|
+
/**
|
|
164
|
+
*
|
|
165
|
+
* @param {MarkChatUnreadDto} body
|
|
166
|
+
* @param {number} id
|
|
167
|
+
* @param {*} [options] Override http request option.
|
|
168
|
+
* @throws {RequiredError}
|
|
169
|
+
* @memberof ChatsApi
|
|
170
|
+
*/
|
|
171
|
+
markChatUnread(body: MarkChatUnreadDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
138
172
|
}
|
package/dist/apis/chats-api.js
CHANGED
|
@@ -245,6 +245,59 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
245
245
|
});
|
|
246
246
|
});
|
|
247
247
|
},
|
|
248
|
+
/**
|
|
249
|
+
*
|
|
250
|
+
* @param {MarkChatUnreadDto} body
|
|
251
|
+
* @param {number} id
|
|
252
|
+
* @param {*} [options] Override http request option.
|
|
253
|
+
* @throws {RequiredError}
|
|
254
|
+
*/
|
|
255
|
+
markChatUnread: function (body_1, id_1) {
|
|
256
|
+
var args_1 = [];
|
|
257
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
258
|
+
args_1[_i - 2] = arguments[_i];
|
|
259
|
+
}
|
|
260
|
+
return __awaiter(_this, __spreadArray([body_1, id_1], args_1, true), void 0, function (body, id, options) {
|
|
261
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions, needsSerialization;
|
|
262
|
+
if (options === void 0) { options = {}; }
|
|
263
|
+
return __generator(this, function (_a) {
|
|
264
|
+
// verify required parameter 'body' is not null or undefined
|
|
265
|
+
if (body === null || body === undefined) {
|
|
266
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling markChatUnread.');
|
|
267
|
+
}
|
|
268
|
+
// verify required parameter 'id' is not null or undefined
|
|
269
|
+
if (id === null || id === undefined) {
|
|
270
|
+
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling markChatUnread.');
|
|
271
|
+
}
|
|
272
|
+
localVarPath = "/api/chats/{id}/mark-chat-unread"
|
|
273
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
274
|
+
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
275
|
+
if (configuration) {
|
|
276
|
+
baseOptions = configuration.baseOptions;
|
|
277
|
+
}
|
|
278
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
279
|
+
localVarHeaderParameter = {};
|
|
280
|
+
localVarQueryParameter = {};
|
|
281
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
282
|
+
query = new URLSearchParams(localVarUrlObj.search);
|
|
283
|
+
for (key in localVarQueryParameter) {
|
|
284
|
+
query.set(key, localVarQueryParameter[key]);
|
|
285
|
+
}
|
|
286
|
+
for (key in options.params) {
|
|
287
|
+
query.set(key, options.params[key]);
|
|
288
|
+
}
|
|
289
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
290
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
291
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
292
|
+
needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
293
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
294
|
+
return [2 /*return*/, {
|
|
295
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
296
|
+
options: localVarRequestOptions,
|
|
297
|
+
}];
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
},
|
|
248
301
|
};
|
|
249
302
|
};
|
|
250
303
|
exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
|
|
@@ -328,6 +381,31 @@ var ChatsApiFp = function (configuration) {
|
|
|
328
381
|
});
|
|
329
382
|
});
|
|
330
383
|
},
|
|
384
|
+
/**
|
|
385
|
+
*
|
|
386
|
+
* @param {MarkChatUnreadDto} body
|
|
387
|
+
* @param {number} id
|
|
388
|
+
* @param {*} [options] Override http request option.
|
|
389
|
+
* @throws {RequiredError}
|
|
390
|
+
*/
|
|
391
|
+
markChatUnread: function (body, id, options) {
|
|
392
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
393
|
+
var localVarAxiosArgs;
|
|
394
|
+
return __generator(this, function (_a) {
|
|
395
|
+
switch (_a.label) {
|
|
396
|
+
case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, id, options)];
|
|
397
|
+
case 1:
|
|
398
|
+
localVarAxiosArgs = _a.sent();
|
|
399
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
400
|
+
if (axios === void 0) { axios = axios_1.default; }
|
|
401
|
+
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
402
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
403
|
+
return axios.request(axiosRequestArgs);
|
|
404
|
+
}];
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
},
|
|
331
409
|
};
|
|
332
410
|
};
|
|
333
411
|
exports.ChatsApiFp = ChatsApiFp;
|
|
@@ -378,6 +456,20 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
378
456
|
});
|
|
379
457
|
});
|
|
380
458
|
},
|
|
459
|
+
/**
|
|
460
|
+
*
|
|
461
|
+
* @param {MarkChatUnreadDto} body
|
|
462
|
+
* @param {number} id
|
|
463
|
+
* @param {*} [options] Override http request option.
|
|
464
|
+
* @throws {RequiredError}
|
|
465
|
+
*/
|
|
466
|
+
markChatUnread: function (body, id, options) {
|
|
467
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
468
|
+
return __generator(this, function (_a) {
|
|
469
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then(function (request) { return request(axios, basePath); })];
|
|
470
|
+
});
|
|
471
|
+
});
|
|
472
|
+
},
|
|
381
473
|
};
|
|
382
474
|
};
|
|
383
475
|
exports.ChatsApiFactory = ChatsApiFactory;
|
|
@@ -439,6 +531,22 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
439
531
|
});
|
|
440
532
|
});
|
|
441
533
|
};
|
|
534
|
+
/**
|
|
535
|
+
*
|
|
536
|
+
* @param {MarkChatUnreadDto} body
|
|
537
|
+
* @param {number} id
|
|
538
|
+
* @param {*} [options] Override http request option.
|
|
539
|
+
* @throws {RequiredError}
|
|
540
|
+
* @memberof ChatsApi
|
|
541
|
+
*/
|
|
542
|
+
ChatsApi.prototype.markChatUnread = function (body, id, options) {
|
|
543
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
544
|
+
var _this = this;
|
|
545
|
+
return __generator(this, function (_a) {
|
|
546
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
547
|
+
});
|
|
548
|
+
});
|
|
549
|
+
};
|
|
442
550
|
return ChatsApi;
|
|
443
551
|
}(base_1.BaseAPI));
|
|
444
552
|
exports.ChatsApi = ChatsApi;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 DocumentMessageDto
|
|
17
|
+
*/
|
|
18
|
+
export interface DocumentMessageDto {
|
|
19
|
+
/**
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof DocumentMessageDto
|
|
22
|
+
* @example https://example.com/document.pdf
|
|
23
|
+
*/
|
|
24
|
+
mediaUrl: string;
|
|
25
|
+
/**
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DocumentMessageDto
|
|
28
|
+
* @example documentMessage
|
|
29
|
+
*/
|
|
30
|
+
mediaType: string;
|
|
31
|
+
}
|
|
@@ -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 });
|
|
@@ -0,0 +1,31 @@
|
|
|
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 ImageMessageDto
|
|
17
|
+
*/
|
|
18
|
+
export interface ImageMessageDto {
|
|
19
|
+
/**
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ImageMessageDto
|
|
22
|
+
* @example https://example.com/image.jpg
|
|
23
|
+
*/
|
|
24
|
+
mediaUrl: string;
|
|
25
|
+
/**
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ImageMessageDto
|
|
28
|
+
* @example imageMessage
|
|
29
|
+
*/
|
|
30
|
+
mediaType: string;
|
|
31
|
+
}
|
|
@@ -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 });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -10,12 +10,14 @@ export * from './contacts-response-dto';
|
|
|
10
10
|
export * from './conversation-message-dto';
|
|
11
11
|
export * from './data-dto';
|
|
12
12
|
export * from './data-unauthorized-dto';
|
|
13
|
+
export * from './document-message-dto';
|
|
14
|
+
export * from './image-message-dto';
|
|
13
15
|
export * from './inline-response2011-class';
|
|
14
16
|
export * from './inline-response2011-message';
|
|
15
17
|
export * from './inline-response503';
|
|
16
18
|
export * from './inline-response503-info';
|
|
17
19
|
export * from './key-dto';
|
|
18
|
-
export * from './
|
|
20
|
+
export * from './mark-chat-unread-dto';
|
|
19
21
|
export * from './message-response-dto';
|
|
20
22
|
export * from './parameter-template-dto';
|
|
21
23
|
export * from './read-message-dto';
|
package/dist/models/index.js
CHANGED
|
@@ -26,12 +26,14 @@ __exportStar(require("./contacts-response-dto"), exports);
|
|
|
26
26
|
__exportStar(require("./conversation-message-dto"), exports);
|
|
27
27
|
__exportStar(require("./data-dto"), exports);
|
|
28
28
|
__exportStar(require("./data-unauthorized-dto"), exports);
|
|
29
|
+
__exportStar(require("./document-message-dto"), exports);
|
|
30
|
+
__exportStar(require("./image-message-dto"), exports);
|
|
29
31
|
__exportStar(require("./inline-response2011-class"), exports);
|
|
30
32
|
__exportStar(require("./inline-response2011-message"), exports);
|
|
31
33
|
__exportStar(require("./inline-response503"), exports);
|
|
32
34
|
__exportStar(require("./inline-response503-info"), exports);
|
|
33
35
|
__exportStar(require("./key-dto"), exports);
|
|
34
|
-
__exportStar(require("./
|
|
36
|
+
__exportStar(require("./mark-chat-unread-dto"), exports);
|
|
35
37
|
__exportStar(require("./message-response-dto"), exports);
|
|
36
38
|
__exportStar(require("./parameter-template-dto"), exports);
|
|
37
39
|
__exportStar(require("./read-message-dto"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
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 MarkChatUnreadDto
|
|
17
|
+
*/
|
|
18
|
+
export interface MarkChatUnreadDto {
|
|
19
|
+
/**
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof MarkChatUnreadDto
|
|
22
|
+
* @example 1
|
|
23
|
+
*/
|
|
24
|
+
branchId: number;
|
|
25
|
+
}
|
|
@@ -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 });
|
|
@@ -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 SendMessageDto
|
|
17
|
+
*/
|
|
18
|
+
export interface SendMessageDto {
|
|
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 });
|
|
@@ -48,6 +48,12 @@ export interface WhatsappChatDto {
|
|
|
48
48
|
* @example 3
|
|
49
49
|
*/
|
|
50
50
|
unreadMessages: number;
|
|
51
|
+
/**
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
* @memberof WhatsappChatDto
|
|
54
|
+
* @example true
|
|
55
|
+
*/
|
|
56
|
+
unread: boolean;
|
|
51
57
|
/**
|
|
52
58
|
* @type {Array<WhatsappMessageDto>}
|
|
53
59
|
* @memberof WhatsappChatDto
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { ConversationMessageDto } from './conversation-message-dto';
|
|
13
|
+
import { DocumentMessageDto } from './document-message-dto';
|
|
14
|
+
import { ImageMessageDto } from './image-message-dto';
|
|
13
15
|
import { WhatsappMessageKeyDto } from './whatsapp-message-key-dto';
|
|
14
16
|
/**
|
|
15
17
|
*
|
|
@@ -37,10 +39,10 @@ export interface WhatsappMessageDto {
|
|
|
37
39
|
*/
|
|
38
40
|
messageTimestamp: number;
|
|
39
41
|
/**
|
|
40
|
-
* @type {ConversationMessageDto}
|
|
42
|
+
* @type {ConversationMessageDto | ImageMessageDto | DocumentMessageDto}
|
|
41
43
|
* @memberof WhatsappMessageDto
|
|
42
44
|
*/
|
|
43
|
-
message: ConversationMessageDto;
|
|
45
|
+
message: ConversationMessageDto | ImageMessageDto | DocumentMessageDto;
|
|
44
46
|
/**
|
|
45
47
|
* @type {WhatsappMessageKeyDto}
|
|
46
48
|
* @memberof WhatsappMessageDto
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DocumentMessageDto
|
|
20
|
+
*/
|
|
21
|
+
export interface DocumentMessageDto {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DocumentMessageDto
|
|
26
|
+
* @example https://example.com/document.pdf
|
|
27
|
+
*/
|
|
28
|
+
mediaUrl: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof DocumentMessageDto
|
|
33
|
+
* @example documentMessage
|
|
34
|
+
*/
|
|
35
|
+
mediaType: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ImageMessageDto
|
|
20
|
+
*/
|
|
21
|
+
export interface ImageMessageDto {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ImageMessageDto
|
|
26
|
+
* @example https://example.com/image.jpg
|
|
27
|
+
*/
|
|
28
|
+
mediaUrl: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof ImageMessageDto
|
|
33
|
+
* @example imageMessage
|
|
34
|
+
*/
|
|
35
|
+
mediaType: string;
|
|
36
|
+
}
|
package/models/index.ts
CHANGED
|
@@ -10,12 +10,14 @@ export * from './contacts-response-dto';
|
|
|
10
10
|
export * from './conversation-message-dto';
|
|
11
11
|
export * from './data-dto';
|
|
12
12
|
export * from './data-unauthorized-dto';
|
|
13
|
+
export * from './document-message-dto';
|
|
14
|
+
export * from './image-message-dto';
|
|
13
15
|
export * from './inline-response2011-class';
|
|
14
16
|
export * from './inline-response2011-message';
|
|
15
17
|
export * from './inline-response503';
|
|
16
18
|
export * from './inline-response503-info';
|
|
17
19
|
export * from './key-dto';
|
|
18
|
-
export * from './
|
|
20
|
+
export * from './mark-chat-unread-dto';
|
|
19
21
|
export * from './message-response-dto';
|
|
20
22
|
export * from './parameter-template-dto';
|
|
21
23
|
export * from './read-message-dto';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface MarkChatUnreadDto
|
|
20
|
+
*/
|
|
21
|
+
export interface MarkChatUnreadDto {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MarkChatUnreadDto
|
|
26
|
+
* @example 1
|
|
27
|
+
*/
|
|
28
|
+
branchId: number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SendMessageDto
|
|
20
|
+
*/
|
|
21
|
+
export interface SendMessageDto {
|
|
22
|
+
}
|
|
@@ -57,6 +57,13 @@ export interface WhatsappChatDto {
|
|
|
57
57
|
*/
|
|
58
58
|
unreadMessages: number;
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
* @memberof WhatsappChatDto
|
|
63
|
+
* @example true
|
|
64
|
+
*/
|
|
65
|
+
unread: boolean;
|
|
66
|
+
|
|
60
67
|
/**
|
|
61
68
|
* @type {Array<WhatsappMessageDto>}
|
|
62
69
|
* @memberof WhatsappChatDto
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { ConversationMessageDto } from './conversation-message-dto';
|
|
16
|
+
import { DocumentMessageDto } from './document-message-dto';
|
|
17
|
+
import { ImageMessageDto } from './image-message-dto';
|
|
16
18
|
import { WhatsappMessageKeyDto } from './whatsapp-message-key-dto';
|
|
17
19
|
/**
|
|
18
20
|
*
|
|
@@ -44,10 +46,10 @@ export interface WhatsappMessageDto {
|
|
|
44
46
|
messageTimestamp: number;
|
|
45
47
|
|
|
46
48
|
/**
|
|
47
|
-
* @type {ConversationMessageDto}
|
|
49
|
+
* @type {ConversationMessageDto | ImageMessageDto | DocumentMessageDto}
|
|
48
50
|
* @memberof WhatsappMessageDto
|
|
49
51
|
*/
|
|
50
|
-
message: ConversationMessageDto;
|
|
52
|
+
message: ConversationMessageDto | ImageMessageDto | DocumentMessageDto;
|
|
51
53
|
|
|
52
54
|
/**
|
|
53
55
|
* @type {WhatsappMessageKeyDto}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libgot/whatsapp-bridge-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "OpenAPI client for ",
|
|
5
5
|
"author": "OpenAPI-Generator Contributors",
|
|
6
6
|
"keywords": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"prepublishOnly": "npm run build"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"axios": "^1.
|
|
20
|
+
"axios": "^1.8.4"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^12.11.5",
|