@libgot/whatsapp-bridge-sdk 1.0.32 → 1.0.33
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/.idea/modules.xml +8 -0
- package/.idea/php.xml +19 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/whatsapp-bridge-sdk.iml +11 -0
- package/.swagger-codegen/VERSION +1 -0
- package/.swagger-codegen-ignore +23 -0
- package/README.md +2 -2
- package/apis/chats-api.ts +8 -40
- package/dist/apis/auth-api.js +147 -301
- package/dist/apis/chats-api.d.ts +5 -21
- package/dist/apis/chats-api.js +202 -386
- package/dist/apis/contacts-api.js +104 -216
- package/dist/apis/default-api.js +46 -136
- package/dist/apis/healthchecks-api.js +85 -197
- package/dist/apis/messages-api.js +198 -354
- package/dist/apis/users-api.js +227 -415
- package/dist/base.js +10 -31
- package/dist/configuration.js +3 -5
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/read-message-dto.d.ts +7 -2
- package/models/index.ts +1 -1
- package/models/read-message-dto.ts +8 -2
- package/package.json +1 -1
- package/tsconfig.json +1 -5
package/dist/apis/auth-api.js
CHANGED
|
@@ -12,32 +12,6 @@
|
|
|
12
12
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
13
|
* Do not edit the class manually.
|
|
14
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
15
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
16
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
17
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -47,54 +21,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
47
21
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
22
|
});
|
|
49
23
|
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
-
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;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
-
if (ar || !(i in from)) {
|
|
80
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
-
ar[i] = from[i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
-
};
|
|
86
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
25
|
exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = void 0;
|
|
88
|
-
|
|
26
|
+
const axios_1 = require("axios");
|
|
89
27
|
// Some imports not used depending on template conditions
|
|
90
28
|
// @ts-ignore
|
|
91
|
-
|
|
29
|
+
const base_1 = require("../base");
|
|
92
30
|
/**
|
|
93
31
|
* AuthApi - axios parameter creator
|
|
94
32
|
* @export
|
|
95
33
|
*/
|
|
96
|
-
|
|
97
|
-
var _this = this;
|
|
34
|
+
const AuthApiAxiosParamCreator = function (configuration) {
|
|
98
35
|
return {
|
|
99
36
|
/**
|
|
100
37
|
*
|
|
@@ -102,161 +39,117 @@ var AuthApiAxiosParamCreator = function (configuration) {
|
|
|
102
39
|
* @param {*} [options] Override http request option.
|
|
103
40
|
* @throws {RequiredError}
|
|
104
41
|
*/
|
|
105
|
-
login: function (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
42
|
+
login: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
43
|
+
// verify required parameter 'body' is not null or undefined
|
|
44
|
+
if (body === null || body === undefined) {
|
|
45
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling login.');
|
|
109
46
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
139
|
-
return [2 /*return*/, {
|
|
140
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
141
|
-
options: localVarRequestOptions,
|
|
142
|
-
}];
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
},
|
|
47
|
+
const localVarPath = `/api/auth/login`;
|
|
48
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
50
|
+
let baseOptions;
|
|
51
|
+
if (configuration) {
|
|
52
|
+
baseOptions = configuration.baseOptions;
|
|
53
|
+
}
|
|
54
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
55
|
+
const localVarHeaderParameter = {};
|
|
56
|
+
const localVarQueryParameter = {};
|
|
57
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
58
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
59
|
+
for (const key in localVarQueryParameter) {
|
|
60
|
+
query.set(key, localVarQueryParameter[key]);
|
|
61
|
+
}
|
|
62
|
+
for (const key in options.params) {
|
|
63
|
+
query.set(key, options.params[key]);
|
|
64
|
+
}
|
|
65
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
66
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
67
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
68
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
69
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
70
|
+
return {
|
|
71
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
72
|
+
options: localVarRequestOptions,
|
|
73
|
+
};
|
|
74
|
+
}),
|
|
146
75
|
/**
|
|
147
76
|
*
|
|
148
77
|
* @param {*} [options] Override http request option.
|
|
149
78
|
* @throws {RequiredError}
|
|
150
79
|
*/
|
|
151
|
-
logout: function () {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
80
|
+
logout: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
81
|
+
const localVarPath = `/api/auth/logout`;
|
|
82
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
83
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
84
|
+
let baseOptions;
|
|
85
|
+
if (configuration) {
|
|
86
|
+
baseOptions = configuration.baseOptions;
|
|
155
87
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
183
|
-
_b.label = 5;
|
|
184
|
-
case 5:
|
|
185
|
-
query = new URLSearchParams(localVarUrlObj.search);
|
|
186
|
-
for (key in localVarQueryParameter) {
|
|
187
|
-
query.set(key, localVarQueryParameter[key]);
|
|
188
|
-
}
|
|
189
|
-
for (key in options.params) {
|
|
190
|
-
query.set(key, options.params[key]);
|
|
191
|
-
}
|
|
192
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
193
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
194
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
195
|
-
return [2 /*return*/, {
|
|
196
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
197
|
-
options: localVarRequestOptions,
|
|
198
|
-
}];
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
},
|
|
88
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
89
|
+
const localVarHeaderParameter = {};
|
|
90
|
+
const localVarQueryParameter = {};
|
|
91
|
+
// authentication access-token required
|
|
92
|
+
// http bearer authentication required
|
|
93
|
+
if (configuration && configuration.accessToken) {
|
|
94
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
95
|
+
? yield configuration.accessToken()
|
|
96
|
+
: yield configuration.accessToken;
|
|
97
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
98
|
+
}
|
|
99
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
100
|
+
for (const key in localVarQueryParameter) {
|
|
101
|
+
query.set(key, localVarQueryParameter[key]);
|
|
102
|
+
}
|
|
103
|
+
for (const key in options.params) {
|
|
104
|
+
query.set(key, options.params[key]);
|
|
105
|
+
}
|
|
106
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
107
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
108
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
109
|
+
return {
|
|
110
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
111
|
+
options: localVarRequestOptions,
|
|
112
|
+
};
|
|
113
|
+
}),
|
|
203
114
|
/**
|
|
204
115
|
*
|
|
205
116
|
* @param {*} [options] Override http request option.
|
|
206
117
|
* @throws {RequiredError}
|
|
207
118
|
*/
|
|
208
|
-
refreshToken: function () {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
119
|
+
refreshToken: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
120
|
+
const localVarPath = `/api/auth/refresh`;
|
|
121
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
122
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
123
|
+
let baseOptions;
|
|
124
|
+
if (configuration) {
|
|
125
|
+
baseOptions = configuration.baseOptions;
|
|
212
126
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
240
|
-
_b.label = 5;
|
|
241
|
-
case 5:
|
|
242
|
-
query = new URLSearchParams(localVarUrlObj.search);
|
|
243
|
-
for (key in localVarQueryParameter) {
|
|
244
|
-
query.set(key, localVarQueryParameter[key]);
|
|
245
|
-
}
|
|
246
|
-
for (key in options.params) {
|
|
247
|
-
query.set(key, options.params[key]);
|
|
248
|
-
}
|
|
249
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
250
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
251
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
252
|
-
return [2 /*return*/, {
|
|
253
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
254
|
-
options: localVarRequestOptions,
|
|
255
|
-
}];
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
},
|
|
127
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
128
|
+
const localVarHeaderParameter = {};
|
|
129
|
+
const localVarQueryParameter = {};
|
|
130
|
+
// authentication access-token required
|
|
131
|
+
// http bearer authentication required
|
|
132
|
+
if (configuration && configuration.accessToken) {
|
|
133
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
134
|
+
? yield configuration.accessToken()
|
|
135
|
+
: yield configuration.accessToken;
|
|
136
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
137
|
+
}
|
|
138
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
139
|
+
for (const key in localVarQueryParameter) {
|
|
140
|
+
query.set(key, localVarQueryParameter[key]);
|
|
141
|
+
}
|
|
142
|
+
for (const key in options.params) {
|
|
143
|
+
query.set(key, options.params[key]);
|
|
144
|
+
}
|
|
145
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
146
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
147
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
148
|
+
return {
|
|
149
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
150
|
+
options: localVarRequestOptions,
|
|
151
|
+
};
|
|
152
|
+
}),
|
|
260
153
|
};
|
|
261
154
|
};
|
|
262
155
|
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
@@ -264,7 +157,7 @@ exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
|
264
157
|
* AuthApi - functional programming interface
|
|
265
158
|
* @export
|
|
266
159
|
*/
|
|
267
|
-
|
|
160
|
+
const AuthApiFp = function (configuration) {
|
|
268
161
|
return {
|
|
269
162
|
/**
|
|
270
163
|
*
|
|
@@ -272,22 +165,13 @@ var AuthApiFp = function (configuration) {
|
|
|
272
165
|
* @param {*} [options] Override http request option.
|
|
273
166
|
* @throws {RequiredError}
|
|
274
167
|
*/
|
|
275
|
-
login
|
|
276
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
277
|
-
|
|
278
|
-
return
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
localVarAxiosArgs = _a.sent();
|
|
283
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
284
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
285
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
286
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
287
|
-
return axios.request(axiosRequestArgs);
|
|
288
|
-
}];
|
|
289
|
-
}
|
|
290
|
-
});
|
|
168
|
+
login(body, options) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const localVarAxiosArgs = yield (0, exports.AuthApiAxiosParamCreator)(configuration).login(body, options);
|
|
171
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
172
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
173
|
+
return axios.request(axiosRequestArgs);
|
|
174
|
+
};
|
|
291
175
|
});
|
|
292
176
|
},
|
|
293
177
|
/**
|
|
@@ -295,22 +179,13 @@ var AuthApiFp = function (configuration) {
|
|
|
295
179
|
* @param {*} [options] Override http request option.
|
|
296
180
|
* @throws {RequiredError}
|
|
297
181
|
*/
|
|
298
|
-
logout
|
|
299
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
300
|
-
|
|
301
|
-
return
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
localVarAxiosArgs = _a.sent();
|
|
306
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
307
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
308
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
309
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
310
|
-
return axios.request(axiosRequestArgs);
|
|
311
|
-
}];
|
|
312
|
-
}
|
|
313
|
-
});
|
|
182
|
+
logout(options) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
const localVarAxiosArgs = yield (0, exports.AuthApiAxiosParamCreator)(configuration).logout(options);
|
|
185
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
186
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
187
|
+
return axios.request(axiosRequestArgs);
|
|
188
|
+
};
|
|
314
189
|
});
|
|
315
190
|
},
|
|
316
191
|
/**
|
|
@@ -318,22 +193,13 @@ var AuthApiFp = function (configuration) {
|
|
|
318
193
|
* @param {*} [options] Override http request option.
|
|
319
194
|
* @throws {RequiredError}
|
|
320
195
|
*/
|
|
321
|
-
refreshToken
|
|
322
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
323
|
-
|
|
324
|
-
return
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
localVarAxiosArgs = _a.sent();
|
|
329
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
330
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
331
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
332
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
333
|
-
return axios.request(axiosRequestArgs);
|
|
334
|
-
}];
|
|
335
|
-
}
|
|
336
|
-
});
|
|
196
|
+
refreshToken(options) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
const localVarAxiosArgs = yield (0, exports.AuthApiAxiosParamCreator)(configuration).refreshToken(options);
|
|
199
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
200
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
201
|
+
return axios.request(axiosRequestArgs);
|
|
202
|
+
};
|
|
337
203
|
});
|
|
338
204
|
},
|
|
339
205
|
};
|
|
@@ -343,7 +209,7 @@ exports.AuthApiFp = AuthApiFp;
|
|
|
343
209
|
* AuthApi - factory interface
|
|
344
210
|
* @export
|
|
345
211
|
*/
|
|
346
|
-
|
|
212
|
+
const AuthApiFactory = function (configuration, basePath, axios) {
|
|
347
213
|
return {
|
|
348
214
|
/**
|
|
349
215
|
*
|
|
@@ -351,11 +217,9 @@ var AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
351
217
|
* @param {*} [options] Override http request option.
|
|
352
218
|
* @throws {RequiredError}
|
|
353
219
|
*/
|
|
354
|
-
login
|
|
355
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
356
|
-
return
|
|
357
|
-
return [2 /*return*/, (0, exports.AuthApiFp)(configuration).login(body, options).then(function (request) { return request(axios, basePath); })];
|
|
358
|
-
});
|
|
220
|
+
login(body, options) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
return (0, exports.AuthApiFp)(configuration).login(body, options).then((request) => request(axios, basePath));
|
|
359
223
|
});
|
|
360
224
|
},
|
|
361
225
|
/**
|
|
@@ -363,11 +227,9 @@ var AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
363
227
|
* @param {*} [options] Override http request option.
|
|
364
228
|
* @throws {RequiredError}
|
|
365
229
|
*/
|
|
366
|
-
logout
|
|
367
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
368
|
-
return
|
|
369
|
-
return [2 /*return*/, (0, exports.AuthApiFp)(configuration).logout(options).then(function (request) { return request(axios, basePath); })];
|
|
370
|
-
});
|
|
230
|
+
logout(options) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
+
return (0, exports.AuthApiFp)(configuration).logout(options).then((request) => request(axios, basePath));
|
|
371
233
|
});
|
|
372
234
|
},
|
|
373
235
|
/**
|
|
@@ -375,11 +237,9 @@ var AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
375
237
|
* @param {*} [options] Override http request option.
|
|
376
238
|
* @throws {RequiredError}
|
|
377
239
|
*/
|
|
378
|
-
refreshToken
|
|
379
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
380
|
-
return
|
|
381
|
-
return [2 /*return*/, (0, exports.AuthApiFp)(configuration).refreshToken(options).then(function (request) { return request(axios, basePath); })];
|
|
382
|
-
});
|
|
240
|
+
refreshToken(options) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
return (0, exports.AuthApiFp)(configuration).refreshToken(options).then((request) => request(axios, basePath));
|
|
383
243
|
});
|
|
384
244
|
},
|
|
385
245
|
};
|
|
@@ -391,11 +251,7 @@ exports.AuthApiFactory = AuthApiFactory;
|
|
|
391
251
|
* @class AuthApi
|
|
392
252
|
* @extends {BaseAPI}
|
|
393
253
|
*/
|
|
394
|
-
|
|
395
|
-
__extends(AuthApi, _super);
|
|
396
|
-
function AuthApi() {
|
|
397
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
398
|
-
}
|
|
254
|
+
class AuthApi extends base_1.BaseAPI {
|
|
399
255
|
/**
|
|
400
256
|
*
|
|
401
257
|
* @param {AuthDto} body
|
|
@@ -403,42 +259,32 @@ var AuthApi = /** @class */ (function (_super) {
|
|
|
403
259
|
* @throws {RequiredError}
|
|
404
260
|
* @memberof AuthApi
|
|
405
261
|
*/
|
|
406
|
-
|
|
407
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
408
|
-
|
|
409
|
-
return __generator(this, function (_a) {
|
|
410
|
-
return [2 /*return*/, (0, exports.AuthApiFp)(this.configuration).login(body, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
411
|
-
});
|
|
262
|
+
login(body, options) {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
+
return (0, exports.AuthApiFp)(this.configuration).login(body, options).then((request) => request(this.axios, this.basePath));
|
|
412
265
|
});
|
|
413
|
-
}
|
|
266
|
+
}
|
|
414
267
|
/**
|
|
415
268
|
*
|
|
416
269
|
* @param {*} [options] Override http request option.
|
|
417
270
|
* @throws {RequiredError}
|
|
418
271
|
* @memberof AuthApi
|
|
419
272
|
*/
|
|
420
|
-
|
|
421
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
422
|
-
|
|
423
|
-
return __generator(this, function (_a) {
|
|
424
|
-
return [2 /*return*/, (0, exports.AuthApiFp)(this.configuration).logout(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
425
|
-
});
|
|
273
|
+
logout(options) {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
return (0, exports.AuthApiFp)(this.configuration).logout(options).then((request) => request(this.axios, this.basePath));
|
|
426
276
|
});
|
|
427
|
-
}
|
|
277
|
+
}
|
|
428
278
|
/**
|
|
429
279
|
*
|
|
430
280
|
* @param {*} [options] Override http request option.
|
|
431
281
|
* @throws {RequiredError}
|
|
432
282
|
* @memberof AuthApi
|
|
433
283
|
*/
|
|
434
|
-
|
|
435
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
436
|
-
|
|
437
|
-
return __generator(this, function (_a) {
|
|
438
|
-
return [2 /*return*/, (0, exports.AuthApiFp)(this.configuration).refreshToken(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
439
|
-
});
|
|
284
|
+
refreshToken(options) {
|
|
285
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
+
return (0, exports.AuthApiFp)(this.configuration).refreshToken(options).then((request) => request(this.axios, this.basePath));
|
|
440
287
|
});
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
}(base_1.BaseAPI));
|
|
288
|
+
}
|
|
289
|
+
}
|
|
444
290
|
exports.AuthApi = AuthApi;
|