@libgot/whatsapp-bridge-sdk 1.0.2 → 1.0.4

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 (76) hide show
  1. package/README.md +2 -2
  2. package/api.ts +1 -0
  3. package/apis/messages-api.ts +117 -0
  4. package/dist/api.d.ts +17 -0
  5. package/dist/api.js +31 -0
  6. package/dist/apis/auth-api.d.ts +121 -0
  7. package/dist/apis/auth-api.js +418 -0
  8. package/dist/apis/contacts-api.d.ts +66 -0
  9. package/dist/apis/contacts-api.js +203 -0
  10. package/dist/apis/default-api.d.ts +90 -0
  11. package/dist/apis/default-api.js +287 -0
  12. package/dist/apis/healthchecks-api.d.ts +90 -0
  13. package/dist/apis/healthchecks-api.js +287 -0
  14. package/dist/apis/messages-api.d.ts +66 -0
  15. package/dist/apis/messages-api.js +203 -0
  16. package/dist/apis/users-api.d.ts +179 -0
  17. package/dist/apis/users-api.js +586 -0
  18. package/dist/base.d.ts +55 -0
  19. package/dist/base.js +80 -0
  20. package/dist/configuration.d.ts +65 -0
  21. package/dist/configuration.js +29 -0
  22. package/dist/index.d.ts +14 -0
  23. package/dist/index.js +28 -0
  24. package/dist/models/api-request-user-update-password-dto.d.ts +25 -0
  25. package/dist/models/api-request-user-update-password-dto.js +15 -0
  26. package/dist/models/api-response-auth-dto.d.ts +25 -0
  27. package/dist/models/api-response-auth-dto.js +15 -0
  28. package/dist/models/api-response-user-dto.d.ts +25 -0
  29. package/dist/models/api-response-user-dto.js +15 -0
  30. package/dist/models/attributes.d.ts +31 -0
  31. package/dist/models/attributes.js +15 -0
  32. package/dist/models/auth-dto.d.ts +31 -0
  33. package/dist/models/auth-dto.js +15 -0
  34. package/dist/models/contacts-response-dto.d.ts +25 -0
  35. package/dist/models/contacts-response-dto.js +15 -0
  36. package/dist/models/conversation-message-dto.d.ts +25 -0
  37. package/dist/models/conversation-message-dto.js +15 -0
  38. package/dist/models/data-dto.d.ts +25 -0
  39. package/dist/models/data-dto.js +15 -0
  40. package/dist/models/data-unauthorized-dto.d.ts +29 -0
  41. package/dist/models/data-unauthorized-dto.js +15 -0
  42. package/dist/models/index.d.ts +21 -0
  43. package/dist/models/index.js +33 -0
  44. package/dist/models/inline-response503-info.d.ts +24 -0
  45. package/dist/models/inline-response503-info.js +15 -0
  46. package/dist/models/inline-response503.d.ts +50 -0
  47. package/dist/models/inline-response503.js +15 -0
  48. package/dist/models/message-dto.d.ts +19 -0
  49. package/dist/models/message-dto.js +15 -0
  50. package/dist/models/message-response-dto.d.ts +25 -0
  51. package/dist/models/message-response-dto.js +15 -0
  52. package/dist/models/role-dto.d.ts +37 -0
  53. package/dist/models/role-dto.js +15 -0
  54. package/dist/models/status-dto.d.ts +31 -0
  55. package/dist/models/status-dto.js +15 -0
  56. package/dist/models/tokens-dto.d.ts +31 -0
  57. package/dist/models/tokens-dto.js +15 -0
  58. package/dist/models/unauthorized-dto.d.ts +25 -0
  59. package/dist/models/unauthorized-dto.js +15 -0
  60. package/dist/models/unauthorized-token-dto.d.ts +29 -0
  61. package/dist/models/unauthorized-token-dto.js +15 -0
  62. package/dist/models/user-detail-dto.d.ts +49 -0
  63. package/dist/models/user-detail-dto.js +15 -0
  64. package/dist/models/user-update-password-dto.d.ts +37 -0
  65. package/dist/models/user-update-password-dto.js +15 -0
  66. package/dist/models/whatsapp-contact-dto.d.ts +43 -0
  67. package/dist/models/whatsapp-contact-dto.js +15 -0
  68. package/dist/models/whatsapp-message-dto.d.ts +43 -0
  69. package/dist/models/whatsapp-message-dto.js +15 -0
  70. package/models/conversation-message-dto.ts +29 -0
  71. package/models/index.ts +3 -1
  72. package/models/message-response-dto.ts +29 -0
  73. package/models/whatsapp-contact-dto.ts +1 -1
  74. package/models/whatsapp-message-dto.ts +50 -0
  75. package/package.json +1 -1
  76. package/publish.sh +1 -0
@@ -0,0 +1,586 @@
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 __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ extendStatics(d, b);
24
+ function __() { this.constructor = d; }
25
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26
+ };
27
+ })();
28
+ var __assign = (this && this.__assign) || function () {
29
+ __assign = Object.assign || function(t) {
30
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
31
+ s = arguments[i];
32
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
33
+ t[p] = s[p];
34
+ }
35
+ return t;
36
+ };
37
+ return __assign.apply(this, arguments);
38
+ };
39
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
40
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41
+ return new (P || (P = Promise))(function (resolve, reject) {
42
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
43
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
46
+ });
47
+ };
48
+ var __generator = (this && this.__generator) || function (thisArg, body) {
49
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
50
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
51
+ function verb(n) { return function (v) { return step([n, v]); }; }
52
+ function step(op) {
53
+ if (f) throw new TypeError("Generator is already executing.");
54
+ while (_) try {
55
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
56
+ if (y = 0, t) op = [op[0] & 2, t.value];
57
+ switch (op[0]) {
58
+ case 0: case 1: t = op; break;
59
+ case 4: _.label++; return { value: op[1], done: false };
60
+ case 5: _.label++; y = op[1]; op = [0]; continue;
61
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
62
+ default:
63
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
64
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
65
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
66
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67
+ if (t[2]) _.ops.pop();
68
+ _.trys.pop(); continue;
69
+ }
70
+ op = body.call(thisArg, _);
71
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
72
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
73
+ }
74
+ };
75
+ Object.defineProperty(exports, "__esModule", { value: true });
76
+ exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = void 0;
77
+ var axios_1 = require("axios");
78
+ // Some imports not used depending on template conditions
79
+ // @ts-ignore
80
+ var base_1 = require("../base");
81
+ /**
82
+ * UsersApi - axios parameter creator
83
+ * @export
84
+ */
85
+ exports.UsersApiAxiosParamCreator = function (configuration) {
86
+ var _this = this;
87
+ return {
88
+ /**
89
+ *
90
+ * @param {ApiRequestUserUpdatePasswordDto} body
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ createSetter: function (body, options) {
95
+ if (options === void 0) { options = {}; }
96
+ return __awaiter(_this, void 0, void 0, function () {
97
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, accessToken, _a, query, key, key, headersFromBaseOptions, needsSerialization;
98
+ return __generator(this, function (_b) {
99
+ switch (_b.label) {
100
+ case 0:
101
+ // verify required parameter 'body' is not null or undefined
102
+ if (body === null || body === undefined) {
103
+ throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling createSetter.');
104
+ }
105
+ localVarPath = "/api/users/update-password";
106
+ localVarUrlObj = new URL(localVarPath, 'https://example.com');
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ }
110
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
111
+ localVarHeaderParameter = {};
112
+ localVarQueryParameter = {};
113
+ if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
114
+ if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
115
+ return [4 /*yield*/, configuration.accessToken()];
116
+ case 1:
117
+ _a = _b.sent();
118
+ return [3 /*break*/, 4];
119
+ case 2: return [4 /*yield*/, configuration.accessToken];
120
+ case 3:
121
+ _a = _b.sent();
122
+ _b.label = 4;
123
+ case 4:
124
+ accessToken = _a;
125
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
126
+ _b.label = 5;
127
+ case 5:
128
+ localVarHeaderParameter['Content-Type'] = 'application/json';
129
+ query = new URLSearchParams(localVarUrlObj.search);
130
+ for (key in localVarQueryParameter) {
131
+ query.set(key, localVarQueryParameter[key]);
132
+ }
133
+ for (key in options.params) {
134
+ query.set(key, options.params[key]);
135
+ }
136
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
140
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
141
+ return [2 /*return*/, {
142
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
143
+ options: localVarRequestOptions,
144
+ }];
145
+ }
146
+ });
147
+ });
148
+ },
149
+ /**
150
+ *
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ usersControllerGet: function (options) {
155
+ if (options === void 0) { options = {}; }
156
+ return __awaiter(_this, void 0, void 0, function () {
157
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
158
+ return __generator(this, function (_a) {
159
+ localVarPath = "/api/users";
160
+ localVarUrlObj = new URL(localVarPath, 'https://example.com');
161
+ if (configuration) {
162
+ baseOptions = configuration.baseOptions;
163
+ }
164
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
165
+ localVarHeaderParameter = {};
166
+ localVarQueryParameter = {};
167
+ query = new URLSearchParams(localVarUrlObj.search);
168
+ for (key in localVarQueryParameter) {
169
+ query.set(key, localVarQueryParameter[key]);
170
+ }
171
+ for (key in options.params) {
172
+ query.set(key, options.params[key]);
173
+ }
174
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
175
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
176
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
177
+ return [2 /*return*/, {
178
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
179
+ options: localVarRequestOptions,
180
+ }];
181
+ });
182
+ });
183
+ },
184
+ /**
185
+ *
186
+ * @param {number} id
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ usersControllerShow: function (id, options) {
191
+ if (options === void 0) { options = {}; }
192
+ return __awaiter(_this, void 0, void 0, function () {
193
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
194
+ return __generator(this, function (_a) {
195
+ // verify required parameter 'id' is not null or undefined
196
+ if (id === null || id === undefined) {
197
+ throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling usersControllerShow.');
198
+ }
199
+ localVarPath = "/api/users/{id}"
200
+ .replace("{" + "id" + "}", encodeURIComponent(String(id)));
201
+ localVarUrlObj = new URL(localVarPath, 'https://example.com');
202
+ if (configuration) {
203
+ baseOptions = configuration.baseOptions;
204
+ }
205
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
206
+ localVarHeaderParameter = {};
207
+ localVarQueryParameter = {};
208
+ query = new URLSearchParams(localVarUrlObj.search);
209
+ for (key in localVarQueryParameter) {
210
+ query.set(key, localVarQueryParameter[key]);
211
+ }
212
+ for (key in options.params) {
213
+ query.set(key, options.params[key]);
214
+ }
215
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
216
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
217
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
218
+ return [2 /*return*/, {
219
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
220
+ options: localVarRequestOptions,
221
+ }];
222
+ });
223
+ });
224
+ },
225
+ /**
226
+ *
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ usersControllerStore: function (options) {
231
+ if (options === void 0) { options = {}; }
232
+ return __awaiter(_this, void 0, void 0, function () {
233
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
234
+ return __generator(this, function (_a) {
235
+ localVarPath = "/api/users";
236
+ localVarUrlObj = new URL(localVarPath, 'https://example.com');
237
+ if (configuration) {
238
+ baseOptions = configuration.baseOptions;
239
+ }
240
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
241
+ localVarHeaderParameter = {};
242
+ localVarQueryParameter = {};
243
+ query = new URLSearchParams(localVarUrlObj.search);
244
+ for (key in localVarQueryParameter) {
245
+ query.set(key, localVarQueryParameter[key]);
246
+ }
247
+ for (key in options.params) {
248
+ query.set(key, options.params[key]);
249
+ }
250
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
251
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
252
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
253
+ return [2 /*return*/, {
254
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
255
+ options: localVarRequestOptions,
256
+ }];
257
+ });
258
+ });
259
+ },
260
+ /**
261
+ *
262
+ * @param {number} id
263
+ * @param {*} [options] Override http request option.
264
+ * @throws {RequiredError}
265
+ */
266
+ usersControllerUpdate: function (id, options) {
267
+ if (options === void 0) { options = {}; }
268
+ return __awaiter(_this, void 0, void 0, function () {
269
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
270
+ return __generator(this, function (_a) {
271
+ // verify required parameter 'id' is not null or undefined
272
+ if (id === null || id === undefined) {
273
+ throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling usersControllerUpdate.');
274
+ }
275
+ localVarPath = "/api/users/{id}"
276
+ .replace("{" + "id" + "}", encodeURIComponent(String(id)));
277
+ localVarUrlObj = new URL(localVarPath, 'https://example.com');
278
+ if (configuration) {
279
+ baseOptions = configuration.baseOptions;
280
+ }
281
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
282
+ localVarHeaderParameter = {};
283
+ localVarQueryParameter = {};
284
+ query = new URLSearchParams(localVarUrlObj.search);
285
+ for (key in localVarQueryParameter) {
286
+ query.set(key, localVarQueryParameter[key]);
287
+ }
288
+ for (key in options.params) {
289
+ query.set(key, options.params[key]);
290
+ }
291
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
292
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
293
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
294
+ return [2 /*return*/, {
295
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
296
+ options: localVarRequestOptions,
297
+ }];
298
+ });
299
+ });
300
+ },
301
+ };
302
+ };
303
+ /**
304
+ * UsersApi - functional programming interface
305
+ * @export
306
+ */
307
+ exports.UsersApiFp = function (configuration) {
308
+ return {
309
+ /**
310
+ *
311
+ * @param {ApiRequestUserUpdatePasswordDto} body
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ */
315
+ createSetter: function (body, options) {
316
+ return __awaiter(this, void 0, void 0, function () {
317
+ var localVarAxiosArgs;
318
+ return __generator(this, function (_a) {
319
+ switch (_a.label) {
320
+ case 0: return [4 /*yield*/, exports.UsersApiAxiosParamCreator(configuration).createSetter(body, options)];
321
+ case 1:
322
+ localVarAxiosArgs = _a.sent();
323
+ return [2 /*return*/, function (axios, basePath) {
324
+ if (axios === void 0) { axios = axios_1.default; }
325
+ if (basePath === void 0) { basePath = base_1.BASE_PATH; }
326
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
327
+ return axios.request(axiosRequestArgs);
328
+ }];
329
+ }
330
+ });
331
+ });
332
+ },
333
+ /**
334
+ *
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ usersControllerGet: function (options) {
339
+ return __awaiter(this, void 0, void 0, function () {
340
+ var localVarAxiosArgs;
341
+ return __generator(this, function (_a) {
342
+ switch (_a.label) {
343
+ case 0: return [4 /*yield*/, exports.UsersApiAxiosParamCreator(configuration).usersControllerGet(options)];
344
+ case 1:
345
+ localVarAxiosArgs = _a.sent();
346
+ return [2 /*return*/, function (axios, basePath) {
347
+ if (axios === void 0) { axios = axios_1.default; }
348
+ if (basePath === void 0) { basePath = base_1.BASE_PATH; }
349
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
350
+ return axios.request(axiosRequestArgs);
351
+ }];
352
+ }
353
+ });
354
+ });
355
+ },
356
+ /**
357
+ *
358
+ * @param {number} id
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ */
362
+ usersControllerShow: function (id, options) {
363
+ return __awaiter(this, void 0, void 0, function () {
364
+ var localVarAxiosArgs;
365
+ return __generator(this, function (_a) {
366
+ switch (_a.label) {
367
+ case 0: return [4 /*yield*/, exports.UsersApiAxiosParamCreator(configuration).usersControllerShow(id, options)];
368
+ case 1:
369
+ localVarAxiosArgs = _a.sent();
370
+ return [2 /*return*/, function (axios, basePath) {
371
+ if (axios === void 0) { axios = axios_1.default; }
372
+ if (basePath === void 0) { basePath = base_1.BASE_PATH; }
373
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
374
+ return axios.request(axiosRequestArgs);
375
+ }];
376
+ }
377
+ });
378
+ });
379
+ },
380
+ /**
381
+ *
382
+ * @param {*} [options] Override http request option.
383
+ * @throws {RequiredError}
384
+ */
385
+ usersControllerStore: function (options) {
386
+ return __awaiter(this, void 0, void 0, function () {
387
+ var localVarAxiosArgs;
388
+ return __generator(this, function (_a) {
389
+ switch (_a.label) {
390
+ case 0: return [4 /*yield*/, exports.UsersApiAxiosParamCreator(configuration).usersControllerStore(options)];
391
+ case 1:
392
+ localVarAxiosArgs = _a.sent();
393
+ return [2 /*return*/, function (axios, basePath) {
394
+ if (axios === void 0) { axios = axios_1.default; }
395
+ if (basePath === void 0) { basePath = base_1.BASE_PATH; }
396
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
397
+ return axios.request(axiosRequestArgs);
398
+ }];
399
+ }
400
+ });
401
+ });
402
+ },
403
+ /**
404
+ *
405
+ * @param {number} id
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ usersControllerUpdate: function (id, options) {
410
+ return __awaiter(this, void 0, void 0, function () {
411
+ var localVarAxiosArgs;
412
+ return __generator(this, function (_a) {
413
+ switch (_a.label) {
414
+ case 0: return [4 /*yield*/, exports.UsersApiAxiosParamCreator(configuration).usersControllerUpdate(id, options)];
415
+ case 1:
416
+ localVarAxiosArgs = _a.sent();
417
+ return [2 /*return*/, function (axios, basePath) {
418
+ if (axios === void 0) { axios = axios_1.default; }
419
+ if (basePath === void 0) { basePath = base_1.BASE_PATH; }
420
+ var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
421
+ return axios.request(axiosRequestArgs);
422
+ }];
423
+ }
424
+ });
425
+ });
426
+ },
427
+ };
428
+ };
429
+ /**
430
+ * UsersApi - factory interface
431
+ * @export
432
+ */
433
+ exports.UsersApiFactory = function (configuration, basePath, axios) {
434
+ return {
435
+ /**
436
+ *
437
+ * @param {ApiRequestUserUpdatePasswordDto} body
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ createSetter: function (body, options) {
442
+ return __awaiter(this, void 0, void 0, function () {
443
+ return __generator(this, function (_a) {
444
+ return [2 /*return*/, exports.UsersApiFp(configuration).createSetter(body, options).then(function (request) { return request(axios, basePath); })];
445
+ });
446
+ });
447
+ },
448
+ /**
449
+ *
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ */
453
+ usersControllerGet: function (options) {
454
+ return __awaiter(this, void 0, void 0, function () {
455
+ return __generator(this, function (_a) {
456
+ return [2 /*return*/, exports.UsersApiFp(configuration).usersControllerGet(options).then(function (request) { return request(axios, basePath); })];
457
+ });
458
+ });
459
+ },
460
+ /**
461
+ *
462
+ * @param {number} id
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ */
466
+ usersControllerShow: function (id, options) {
467
+ return __awaiter(this, void 0, void 0, function () {
468
+ return __generator(this, function (_a) {
469
+ return [2 /*return*/, exports.UsersApiFp(configuration).usersControllerShow(id, options).then(function (request) { return request(axios, basePath); })];
470
+ });
471
+ });
472
+ },
473
+ /**
474
+ *
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ */
478
+ usersControllerStore: function (options) {
479
+ return __awaiter(this, void 0, void 0, function () {
480
+ return __generator(this, function (_a) {
481
+ return [2 /*return*/, exports.UsersApiFp(configuration).usersControllerStore(options).then(function (request) { return request(axios, basePath); })];
482
+ });
483
+ });
484
+ },
485
+ /**
486
+ *
487
+ * @param {number} id
488
+ * @param {*} [options] Override http request option.
489
+ * @throws {RequiredError}
490
+ */
491
+ usersControllerUpdate: function (id, options) {
492
+ return __awaiter(this, void 0, void 0, function () {
493
+ return __generator(this, function (_a) {
494
+ return [2 /*return*/, exports.UsersApiFp(configuration).usersControllerUpdate(id, options).then(function (request) { return request(axios, basePath); })];
495
+ });
496
+ });
497
+ },
498
+ };
499
+ };
500
+ /**
501
+ * UsersApi - object-oriented interface
502
+ * @export
503
+ * @class UsersApi
504
+ * @extends {BaseAPI}
505
+ */
506
+ var UsersApi = /** @class */ (function (_super) {
507
+ __extends(UsersApi, _super);
508
+ function UsersApi() {
509
+ return _super !== null && _super.apply(this, arguments) || this;
510
+ }
511
+ /**
512
+ *
513
+ * @param {ApiRequestUserUpdatePasswordDto} body
514
+ * @param {*} [options] Override http request option.
515
+ * @throws {RequiredError}
516
+ * @memberof UsersApi
517
+ */
518
+ UsersApi.prototype.createSetter = function (body, options) {
519
+ return __awaiter(this, void 0, void 0, function () {
520
+ var _this = this;
521
+ return __generator(this, function (_a) {
522
+ return [2 /*return*/, exports.UsersApiFp(this.configuration).createSetter(body, options).then(function (request) { return request(_this.axios, _this.basePath); })];
523
+ });
524
+ });
525
+ };
526
+ /**
527
+ *
528
+ * @param {*} [options] Override http request option.
529
+ * @throws {RequiredError}
530
+ * @memberof UsersApi
531
+ */
532
+ UsersApi.prototype.usersControllerGet = function (options) {
533
+ return __awaiter(this, void 0, void 0, function () {
534
+ var _this = this;
535
+ return __generator(this, function (_a) {
536
+ return [2 /*return*/, exports.UsersApiFp(this.configuration).usersControllerGet(options).then(function (request) { return request(_this.axios, _this.basePath); })];
537
+ });
538
+ });
539
+ };
540
+ /**
541
+ *
542
+ * @param {number} id
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ * @memberof UsersApi
546
+ */
547
+ UsersApi.prototype.usersControllerShow = function (id, options) {
548
+ return __awaiter(this, void 0, void 0, function () {
549
+ var _this = this;
550
+ return __generator(this, function (_a) {
551
+ return [2 /*return*/, exports.UsersApiFp(this.configuration).usersControllerShow(id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
552
+ });
553
+ });
554
+ };
555
+ /**
556
+ *
557
+ * @param {*} [options] Override http request option.
558
+ * @throws {RequiredError}
559
+ * @memberof UsersApi
560
+ */
561
+ UsersApi.prototype.usersControllerStore = function (options) {
562
+ return __awaiter(this, void 0, void 0, function () {
563
+ var _this = this;
564
+ return __generator(this, function (_a) {
565
+ return [2 /*return*/, exports.UsersApiFp(this.configuration).usersControllerStore(options).then(function (request) { return request(_this.axios, _this.basePath); })];
566
+ });
567
+ });
568
+ };
569
+ /**
570
+ *
571
+ * @param {number} id
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ * @memberof UsersApi
575
+ */
576
+ UsersApi.prototype.usersControllerUpdate = function (id, options) {
577
+ return __awaiter(this, void 0, void 0, function () {
578
+ var _this = this;
579
+ return __generator(this, function (_a) {
580
+ return [2 /*return*/, exports.UsersApiFp(this.configuration).usersControllerUpdate(id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
581
+ });
582
+ });
583
+ };
584
+ return UsersApi;
585
+ }(base_1.BaseAPI));
586
+ exports.UsersApi = UsersApi;
package/dist/base.d.ts ADDED
@@ -0,0 +1,55 @@
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 { Configuration } from "./configuration";
13
+ import { AxiosRequestConfig, AxiosInstance } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const COLLECTION_FORMATS: {
20
+ csv: string;
21
+ ssv: string;
22
+ tsv: string;
23
+ pipes: string;
24
+ };
25
+ /**
26
+ *
27
+ * @export
28
+ * @interface RequestArgs
29
+ */
30
+ export interface RequestArgs {
31
+ url: string;
32
+ options: AxiosRequestConfig;
33
+ }
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ export declare class BaseAPI {
40
+ protected basePath: string;
41
+ protected axios: AxiosInstance;
42
+ protected configuration: Configuration | undefined;
43
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @class RequiredError
49
+ * @extends {Error}
50
+ */
51
+ export declare class RequiredError extends Error {
52
+ field: string;
53
+ name: "RequiredError";
54
+ constructor(field: string, msg?: string);
55
+ }