@lumeweb/portal-sdk 0.1.0 → 0.1.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.
- package/dist/esm/account/generated/accountAPI.schemas.d.ts +427 -20
- package/dist/esm/account/generated/billing.d.ts +688 -0
- package/dist/esm/account/generated/billing.js +444 -0
- package/dist/esm/account/generated/billing.js.map +1 -0
- package/dist/esm/account/generated/default.d.ts +118 -97
- package/dist/esm/account/generated/default.js +181 -41
- package/dist/esm/account/generated/default.js.map +1 -1
- package/dist/esm/account/generated/index.d.ts +3 -3
- package/dist/esm/account/generated/index.js +2 -2
- package/dist/esm/account/generated/quota.d.ts +35 -0
- package/dist/esm/account/generated/quota.js +28 -0
- package/dist/esm/account/generated/quota.js.map +1 -0
- package/dist/esm/account.d.ts +0 -1
- package/dist/esm/account.js.map +1 -1
- package/dist/esm/http-utils.d.ts +0 -1
- package/dist/esm/http-utils.js.map +1 -1
- package/dist/esm/index.d.ts +5 -3
- package/dist/esm/index.js +4 -2
- package/dist/esm/openapi.d.ts +3 -3
- package/dist/esm/openapi.js +2 -2
- package/dist/esm/query-utils.d.ts +0 -1
- package/dist/esm/types.js.map +1 -1
- package/package.json +5 -5
- package/dist/cjs/account/generated/accountAPI.schemas.cjs +0 -0
- package/dist/cjs/account/generated/accountAPI.schemas.d.cts +0 -239
- package/dist/cjs/account/generated/default.cjs +0 -676
- package/dist/cjs/account/generated/default.cjs.map +0 -1
- package/dist/cjs/account/generated/default.d.cts +0 -923
- package/dist/cjs/account/generated/index.cjs +0 -58
- package/dist/cjs/account/generated/index.d.cts +0 -3
- package/dist/cjs/account.cjs +0 -348
- package/dist/cjs/account.cjs.map +0 -1
- package/dist/cjs/account.d.cts +0 -200
- package/dist/cjs/http-utils.cjs +0 -87
- package/dist/cjs/http-utils.cjs.map +0 -1
- package/dist/cjs/http-utils.d.cts +0 -54
- package/dist/cjs/index.cjs +0 -75
- package/dist/cjs/index.d.cts +0 -8
- package/dist/cjs/openapi.cjs +0 -58
- package/dist/cjs/openapi.d.cts +0 -3
- package/dist/cjs/query-utils.cjs +0 -44
- package/dist/cjs/query-utils.cjs.map +0 -1
- package/dist/cjs/query-utils.d.cts +0 -65
- package/dist/cjs/sdk.cjs +0 -20
- package/dist/cjs/sdk.cjs.map +0 -1
- package/dist/cjs/sdk.d.cts +0 -12
- package/dist/cjs/types.cjs +0 -116
- package/dist/cjs/types.cjs.map +0 -1
- package/dist/cjs/types.d.cts +0 -58
|
@@ -1,676 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/account/generated/default.ts
|
|
3
|
-
const getDeleteApiAccountUrl = () => {
|
|
4
|
-
return `/api/api/account`;
|
|
5
|
-
};
|
|
6
|
-
const deleteApiAccount = async (options) => {
|
|
7
|
-
const res = await fetch(getDeleteApiAccountUrl(), {
|
|
8
|
-
...options,
|
|
9
|
-
method: "DELETE"
|
|
10
|
-
});
|
|
11
|
-
const body = [
|
|
12
|
-
204,
|
|
13
|
-
205,
|
|
14
|
-
304
|
|
15
|
-
].includes(res.status) ? null : await res.text();
|
|
16
|
-
return {
|
|
17
|
-
data: body ? JSON.parse(body) : {},
|
|
18
|
-
status: res.status,
|
|
19
|
-
headers: res.headers
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
const getGetApiAccountUrl = () => {
|
|
23
|
-
return `/api/api/account`;
|
|
24
|
-
};
|
|
25
|
-
const getApiAccount = async (options) => {
|
|
26
|
-
const res = await fetch(getGetApiAccountUrl(), {
|
|
27
|
-
...options,
|
|
28
|
-
method: "GET"
|
|
29
|
-
});
|
|
30
|
-
const body = [
|
|
31
|
-
204,
|
|
32
|
-
205,
|
|
33
|
-
304
|
|
34
|
-
].includes(res.status) ? null : await res.text();
|
|
35
|
-
return {
|
|
36
|
-
data: body ? JSON.parse(body) : {},
|
|
37
|
-
status: res.status,
|
|
38
|
-
headers: res.headers
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
const getPatchApiAccountUrl = () => {
|
|
42
|
-
return `/api/api/account`;
|
|
43
|
-
};
|
|
44
|
-
const patchApiAccount = async (updateProfileRequest, options) => {
|
|
45
|
-
const res = await fetch(getPatchApiAccountUrl(), {
|
|
46
|
-
...options,
|
|
47
|
-
method: "PATCH",
|
|
48
|
-
headers: {
|
|
49
|
-
"Content-Type": "application/json",
|
|
50
|
-
...options?.headers
|
|
51
|
-
},
|
|
52
|
-
body: JSON.stringify(updateProfileRequest)
|
|
53
|
-
});
|
|
54
|
-
const body = [
|
|
55
|
-
204,
|
|
56
|
-
205,
|
|
57
|
-
304
|
|
58
|
-
].includes(res.status) ? null : await res.text();
|
|
59
|
-
return {
|
|
60
|
-
data: body ? JSON.parse(body) : {},
|
|
61
|
-
status: res.status,
|
|
62
|
-
headers: res.headers
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
const getGetApiAccountAvatarUrl = () => {
|
|
66
|
-
return `/api/api/account/avatar`;
|
|
67
|
-
};
|
|
68
|
-
const getApiAccountAvatar = async (options) => {
|
|
69
|
-
const res = await fetch(getGetApiAccountAvatarUrl(), {
|
|
70
|
-
...options,
|
|
71
|
-
method: "GET"
|
|
72
|
-
});
|
|
73
|
-
const body = [
|
|
74
|
-
204,
|
|
75
|
-
205,
|
|
76
|
-
304
|
|
77
|
-
].includes(res.status) ? null : await res.text();
|
|
78
|
-
return {
|
|
79
|
-
data: body ? JSON.parse(body) : {},
|
|
80
|
-
status: res.status,
|
|
81
|
-
headers: res.headers
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
const getPostApiAccountAvatarUrl = () => {
|
|
85
|
-
return `/api/api/account/avatar`;
|
|
86
|
-
};
|
|
87
|
-
const postApiAccountAvatar = async (postApiAccountAvatarBody, options) => {
|
|
88
|
-
const formData = new FormData();
|
|
89
|
-
formData.append(`file`, postApiAccountAvatarBody.file);
|
|
90
|
-
const res = await fetch(getPostApiAccountAvatarUrl(), {
|
|
91
|
-
...options,
|
|
92
|
-
method: "POST",
|
|
93
|
-
body: formData
|
|
94
|
-
});
|
|
95
|
-
const body = [
|
|
96
|
-
204,
|
|
97
|
-
205,
|
|
98
|
-
304
|
|
99
|
-
].includes(res.status) ? null : await res.text();
|
|
100
|
-
return {
|
|
101
|
-
data: body ? JSON.parse(body) : {},
|
|
102
|
-
status: res.status,
|
|
103
|
-
headers: res.headers
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
const getGetApiAccountKeysUrl = (params) => {
|
|
107
|
-
const normalizedParams = new URLSearchParams();
|
|
108
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
109
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
110
|
-
});
|
|
111
|
-
const stringifiedParams = normalizedParams.toString();
|
|
112
|
-
return stringifiedParams.length > 0 ? `/api/api/account/keys?${stringifiedParams}` : `/api/api/account/keys`;
|
|
113
|
-
};
|
|
114
|
-
const getApiAccountKeys = async (params, options) => {
|
|
115
|
-
const res = await fetch(getGetApiAccountKeysUrl(params), {
|
|
116
|
-
...options,
|
|
117
|
-
method: "GET"
|
|
118
|
-
});
|
|
119
|
-
const body = [
|
|
120
|
-
204,
|
|
121
|
-
205,
|
|
122
|
-
304
|
|
123
|
-
].includes(res.status) ? null : await res.text();
|
|
124
|
-
return {
|
|
125
|
-
data: body ? JSON.parse(body) : {},
|
|
126
|
-
status: res.status,
|
|
127
|
-
headers: res.headers
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
const getPostApiAccountKeysUrl = () => {
|
|
131
|
-
return `/api/api/account/keys`;
|
|
132
|
-
};
|
|
133
|
-
const postApiAccountKeys = async (aPIKeyCreateRequest, options) => {
|
|
134
|
-
const res = await fetch(getPostApiAccountKeysUrl(), {
|
|
135
|
-
...options,
|
|
136
|
-
method: "POST",
|
|
137
|
-
headers: {
|
|
138
|
-
"Content-Type": "application/json",
|
|
139
|
-
...options?.headers
|
|
140
|
-
},
|
|
141
|
-
body: JSON.stringify(aPIKeyCreateRequest)
|
|
142
|
-
});
|
|
143
|
-
const body = [
|
|
144
|
-
204,
|
|
145
|
-
205,
|
|
146
|
-
304
|
|
147
|
-
].includes(res.status) ? null : await res.text();
|
|
148
|
-
return {
|
|
149
|
-
data: body ? JSON.parse(body) : {},
|
|
150
|
-
status: res.status,
|
|
151
|
-
headers: res.headers
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
const getDeleteApiAccountKeysKeyIDUrl = (keyID) => {
|
|
155
|
-
return `/api/api/account/keys/${keyID}`;
|
|
156
|
-
};
|
|
157
|
-
const deleteApiAccountKeysKeyID = async (keyID, options) => {
|
|
158
|
-
const res = await fetch(getDeleteApiAccountKeysKeyIDUrl(keyID), {
|
|
159
|
-
...options,
|
|
160
|
-
method: "DELETE"
|
|
161
|
-
});
|
|
162
|
-
const body = [
|
|
163
|
-
204,
|
|
164
|
-
205,
|
|
165
|
-
304
|
|
166
|
-
].includes(res.status) ? null : await res.text();
|
|
167
|
-
return {
|
|
168
|
-
data: body ? JSON.parse(body) : {},
|
|
169
|
-
status: res.status,
|
|
170
|
-
headers: res.headers
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
const getPostApiAccountPasswordResetConfirmUrl = () => {
|
|
174
|
-
return `/api/api/account/password-reset/confirm`;
|
|
175
|
-
};
|
|
176
|
-
const postApiAccountPasswordResetConfirm = async (passwordResetVerifyRequest, options) => {
|
|
177
|
-
const res = await fetch(getPostApiAccountPasswordResetConfirmUrl(), {
|
|
178
|
-
...options,
|
|
179
|
-
method: "POST",
|
|
180
|
-
headers: {
|
|
181
|
-
"Content-Type": "application/json",
|
|
182
|
-
...options?.headers
|
|
183
|
-
},
|
|
184
|
-
body: JSON.stringify(passwordResetVerifyRequest)
|
|
185
|
-
});
|
|
186
|
-
const body = [
|
|
187
|
-
204,
|
|
188
|
-
205,
|
|
189
|
-
304
|
|
190
|
-
].includes(res.status) ? null : await res.text();
|
|
191
|
-
return {
|
|
192
|
-
data: body ? JSON.parse(body) : {},
|
|
193
|
-
status: res.status,
|
|
194
|
-
headers: res.headers
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
const getPostApiAccountPasswordResetRequestUrl = () => {
|
|
198
|
-
return `/api/api/account/password-reset/request`;
|
|
199
|
-
};
|
|
200
|
-
const postApiAccountPasswordResetRequest = async (passwordResetRequest, options) => {
|
|
201
|
-
const res = await fetch(getPostApiAccountPasswordResetRequestUrl(), {
|
|
202
|
-
...options,
|
|
203
|
-
method: "POST",
|
|
204
|
-
headers: {
|
|
205
|
-
"Content-Type": "application/json",
|
|
206
|
-
...options?.headers
|
|
207
|
-
},
|
|
208
|
-
body: JSON.stringify(passwordResetRequest)
|
|
209
|
-
});
|
|
210
|
-
const body = [
|
|
211
|
-
204,
|
|
212
|
-
205,
|
|
213
|
-
304
|
|
214
|
-
].includes(res.status) ? null : await res.text();
|
|
215
|
-
return {
|
|
216
|
-
data: body ? JSON.parse(body) : {},
|
|
217
|
-
status: res.status,
|
|
218
|
-
headers: res.headers
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
const getGetApiAccountPermissionsUrl = () => {
|
|
222
|
-
return `/api/api/account/permissions`;
|
|
223
|
-
};
|
|
224
|
-
const getApiAccountPermissions = async (options) => {
|
|
225
|
-
const res = await fetch(getGetApiAccountPermissionsUrl(), {
|
|
226
|
-
...options,
|
|
227
|
-
method: "GET"
|
|
228
|
-
});
|
|
229
|
-
const body = [
|
|
230
|
-
204,
|
|
231
|
-
205,
|
|
232
|
-
304
|
|
233
|
-
].includes(res.status) ? null : await res.text();
|
|
234
|
-
return {
|
|
235
|
-
data: body ? JSON.parse(body) : {},
|
|
236
|
-
status: res.status,
|
|
237
|
-
headers: res.headers
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
const getPostApiAccountUpdateEmailUrl = () => {
|
|
241
|
-
return `/api/api/account/update-email`;
|
|
242
|
-
};
|
|
243
|
-
const postApiAccountUpdateEmail = async (updateEmailRequest, options) => {
|
|
244
|
-
const res = await fetch(getPostApiAccountUpdateEmailUrl(), {
|
|
245
|
-
...options,
|
|
246
|
-
method: "POST",
|
|
247
|
-
headers: {
|
|
248
|
-
"Content-Type": "application/json",
|
|
249
|
-
...options?.headers
|
|
250
|
-
},
|
|
251
|
-
body: JSON.stringify(updateEmailRequest)
|
|
252
|
-
});
|
|
253
|
-
const body = [
|
|
254
|
-
204,
|
|
255
|
-
205,
|
|
256
|
-
304
|
|
257
|
-
].includes(res.status) ? null : await res.text();
|
|
258
|
-
return {
|
|
259
|
-
data: body ? JSON.parse(body) : {},
|
|
260
|
-
status: res.status,
|
|
261
|
-
headers: res.headers
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
const getPostApiAccountUpdatePasswordUrl = () => {
|
|
265
|
-
return `/api/api/account/update-password`;
|
|
266
|
-
};
|
|
267
|
-
const postApiAccountUpdatePassword = async (updatePasswordRequest, options) => {
|
|
268
|
-
const res = await fetch(getPostApiAccountUpdatePasswordUrl(), {
|
|
269
|
-
...options,
|
|
270
|
-
method: "POST",
|
|
271
|
-
headers: {
|
|
272
|
-
"Content-Type": "application/json",
|
|
273
|
-
...options?.headers
|
|
274
|
-
},
|
|
275
|
-
body: JSON.stringify(updatePasswordRequest)
|
|
276
|
-
});
|
|
277
|
-
const body = [
|
|
278
|
-
204,
|
|
279
|
-
205,
|
|
280
|
-
304
|
|
281
|
-
].includes(res.status) ? null : await res.text();
|
|
282
|
-
return {
|
|
283
|
-
data: body ? JSON.parse(body) : {},
|
|
284
|
-
status: res.status,
|
|
285
|
-
headers: res.headers
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
const getPostApiAccountVerifyEmailUrl = (params) => {
|
|
289
|
-
const normalizedParams = new URLSearchParams();
|
|
290
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
291
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
292
|
-
});
|
|
293
|
-
const stringifiedParams = normalizedParams.toString();
|
|
294
|
-
return stringifiedParams.length > 0 ? `/api/api/account/verify-email?${stringifiedParams}` : `/api/api/account/verify-email`;
|
|
295
|
-
};
|
|
296
|
-
const postApiAccountVerifyEmail = async (verifyEmailRequest, params, options) => {
|
|
297
|
-
const res = await fetch(getPostApiAccountVerifyEmailUrl(params), {
|
|
298
|
-
...options,
|
|
299
|
-
method: "POST",
|
|
300
|
-
headers: {
|
|
301
|
-
"Content-Type": "application/json",
|
|
302
|
-
...options?.headers
|
|
303
|
-
},
|
|
304
|
-
body: JSON.stringify(verifyEmailRequest)
|
|
305
|
-
});
|
|
306
|
-
const body = [
|
|
307
|
-
204,
|
|
308
|
-
205,
|
|
309
|
-
304
|
|
310
|
-
].includes(res.status) ? null : await res.text();
|
|
311
|
-
return {
|
|
312
|
-
data: body ? JSON.parse(body) : {},
|
|
313
|
-
status: res.status,
|
|
314
|
-
headers: res.headers
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
const getPostApiAccountVerifyEmailResendUrl = () => {
|
|
318
|
-
return `/api/api/account/verify-email/resend`;
|
|
319
|
-
};
|
|
320
|
-
const postApiAccountVerifyEmailResend = async (resendVerifyEmailRequest, options) => {
|
|
321
|
-
const res = await fetch(getPostApiAccountVerifyEmailResendUrl(), {
|
|
322
|
-
...options,
|
|
323
|
-
method: "POST",
|
|
324
|
-
headers: {
|
|
325
|
-
"Content-Type": "application/json",
|
|
326
|
-
...options?.headers
|
|
327
|
-
},
|
|
328
|
-
body: JSON.stringify(resendVerifyEmailRequest)
|
|
329
|
-
});
|
|
330
|
-
const body = [
|
|
331
|
-
204,
|
|
332
|
-
205,
|
|
333
|
-
304
|
|
334
|
-
].includes(res.status) ? null : await res.text();
|
|
335
|
-
return {
|
|
336
|
-
data: body ? JSON.parse(body) : {},
|
|
337
|
-
status: res.status,
|
|
338
|
-
headers: res.headers
|
|
339
|
-
};
|
|
340
|
-
};
|
|
341
|
-
const getPostApiAuthKeyUrl = () => {
|
|
342
|
-
return `/api/api/auth/key`;
|
|
343
|
-
};
|
|
344
|
-
const postApiAuthKey = async (options) => {
|
|
345
|
-
const res = await fetch(getPostApiAuthKeyUrl(), {
|
|
346
|
-
...options,
|
|
347
|
-
method: "POST"
|
|
348
|
-
});
|
|
349
|
-
const body = [
|
|
350
|
-
204,
|
|
351
|
-
205,
|
|
352
|
-
304
|
|
353
|
-
].includes(res.status) ? null : await res.text();
|
|
354
|
-
return {
|
|
355
|
-
data: body ? JSON.parse(body) : {},
|
|
356
|
-
status: res.status,
|
|
357
|
-
headers: res.headers
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
|
-
const getPostApiAuthLoginUrl = () => {
|
|
361
|
-
return `/api/api/auth/login`;
|
|
362
|
-
};
|
|
363
|
-
const postApiAuthLogin = async (loginRequest, options) => {
|
|
364
|
-
const res = await fetch(getPostApiAuthLoginUrl(), {
|
|
365
|
-
...options,
|
|
366
|
-
method: "POST",
|
|
367
|
-
headers: {
|
|
368
|
-
"Content-Type": "application/json",
|
|
369
|
-
...options?.headers
|
|
370
|
-
},
|
|
371
|
-
body: JSON.stringify(loginRequest)
|
|
372
|
-
});
|
|
373
|
-
const body = [
|
|
374
|
-
204,
|
|
375
|
-
205,
|
|
376
|
-
304
|
|
377
|
-
].includes(res.status) ? null : await res.text();
|
|
378
|
-
return {
|
|
379
|
-
data: body ? JSON.parse(body) : {},
|
|
380
|
-
status: res.status,
|
|
381
|
-
headers: res.headers
|
|
382
|
-
};
|
|
383
|
-
};
|
|
384
|
-
const getPostApiAuthLogoutUrl = () => {
|
|
385
|
-
return `/api/api/auth/logout`;
|
|
386
|
-
};
|
|
387
|
-
const postApiAuthLogout = async (options) => {
|
|
388
|
-
const res = await fetch(getPostApiAuthLogoutUrl(), {
|
|
389
|
-
...options,
|
|
390
|
-
method: "POST"
|
|
391
|
-
});
|
|
392
|
-
const body = [
|
|
393
|
-
204,
|
|
394
|
-
205,
|
|
395
|
-
304
|
|
396
|
-
].includes(res.status) ? null : await res.text();
|
|
397
|
-
return {
|
|
398
|
-
data: body ? JSON.parse(body) : {},
|
|
399
|
-
status: res.status,
|
|
400
|
-
headers: res.headers
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
const getPostApiAuthOtpDisableUrl = () => {
|
|
404
|
-
return `/api/api/auth/otp/disable`;
|
|
405
|
-
};
|
|
406
|
-
const postApiAuthOtpDisable = async (oTPDisableRequest, options) => {
|
|
407
|
-
const res = await fetch(getPostApiAuthOtpDisableUrl(), {
|
|
408
|
-
...options,
|
|
409
|
-
method: "POST",
|
|
410
|
-
headers: {
|
|
411
|
-
"Content-Type": "application/json",
|
|
412
|
-
...options?.headers
|
|
413
|
-
},
|
|
414
|
-
body: JSON.stringify(oTPDisableRequest)
|
|
415
|
-
});
|
|
416
|
-
const body = [
|
|
417
|
-
204,
|
|
418
|
-
205,
|
|
419
|
-
304
|
|
420
|
-
].includes(res.status) ? null : await res.text();
|
|
421
|
-
return {
|
|
422
|
-
data: body ? JSON.parse(body) : {},
|
|
423
|
-
status: res.status,
|
|
424
|
-
headers: res.headers
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
const getPostApiAuthOtpGenerateUrl = () => {
|
|
428
|
-
return `/api/api/auth/otp/generate`;
|
|
429
|
-
};
|
|
430
|
-
const postApiAuthOtpGenerate = async (options) => {
|
|
431
|
-
const res = await fetch(getPostApiAuthOtpGenerateUrl(), {
|
|
432
|
-
...options,
|
|
433
|
-
method: "POST"
|
|
434
|
-
});
|
|
435
|
-
const body = [
|
|
436
|
-
204,
|
|
437
|
-
205,
|
|
438
|
-
304
|
|
439
|
-
].includes(res.status) ? null : await res.text();
|
|
440
|
-
return {
|
|
441
|
-
data: body ? JSON.parse(body) : {},
|
|
442
|
-
status: res.status,
|
|
443
|
-
headers: res.headers
|
|
444
|
-
};
|
|
445
|
-
};
|
|
446
|
-
const getPostApiAuthOtpValidateUrl = () => {
|
|
447
|
-
return `/api/api/auth/otp/validate`;
|
|
448
|
-
};
|
|
449
|
-
const postApiAuthOtpValidate = async (oTPValidateRequest, options) => {
|
|
450
|
-
const res = await fetch(getPostApiAuthOtpValidateUrl(), {
|
|
451
|
-
...options,
|
|
452
|
-
method: "POST",
|
|
453
|
-
headers: {
|
|
454
|
-
"Content-Type": "application/json",
|
|
455
|
-
...options?.headers
|
|
456
|
-
},
|
|
457
|
-
body: JSON.stringify(oTPValidateRequest)
|
|
458
|
-
});
|
|
459
|
-
const body = [
|
|
460
|
-
204,
|
|
461
|
-
205,
|
|
462
|
-
304
|
|
463
|
-
].includes(res.status) ? null : await res.text();
|
|
464
|
-
return {
|
|
465
|
-
data: body ? JSON.parse(body) : {},
|
|
466
|
-
status: res.status,
|
|
467
|
-
headers: res.headers
|
|
468
|
-
};
|
|
469
|
-
};
|
|
470
|
-
const getPostApiAuthOtpVerifyUrl = () => {
|
|
471
|
-
return `/api/api/auth/otp/verify`;
|
|
472
|
-
};
|
|
473
|
-
const postApiAuthOtpVerify = async (oTPVerifyRequest, options) => {
|
|
474
|
-
const res = await fetch(getPostApiAuthOtpVerifyUrl(), {
|
|
475
|
-
...options,
|
|
476
|
-
method: "POST",
|
|
477
|
-
headers: {
|
|
478
|
-
"Content-Type": "application/json",
|
|
479
|
-
...options?.headers
|
|
480
|
-
},
|
|
481
|
-
body: JSON.stringify(oTPVerifyRequest)
|
|
482
|
-
});
|
|
483
|
-
const body = [
|
|
484
|
-
204,
|
|
485
|
-
205,
|
|
486
|
-
304
|
|
487
|
-
].includes(res.status) ? null : await res.text();
|
|
488
|
-
return {
|
|
489
|
-
data: body ? JSON.parse(body) : {},
|
|
490
|
-
status: res.status,
|
|
491
|
-
headers: res.headers
|
|
492
|
-
};
|
|
493
|
-
};
|
|
494
|
-
const getPostApiAuthPingUrl = () => {
|
|
495
|
-
return `/api/api/auth/ping`;
|
|
496
|
-
};
|
|
497
|
-
const postApiAuthPing = async (options) => {
|
|
498
|
-
const res = await fetch(getPostApiAuthPingUrl(), {
|
|
499
|
-
...options,
|
|
500
|
-
method: "POST"
|
|
501
|
-
});
|
|
502
|
-
const body = [
|
|
503
|
-
204,
|
|
504
|
-
205,
|
|
505
|
-
304
|
|
506
|
-
].includes(res.status) ? null : await res.text();
|
|
507
|
-
return {
|
|
508
|
-
data: body ? JSON.parse(body) : {},
|
|
509
|
-
status: res.status,
|
|
510
|
-
headers: res.headers
|
|
511
|
-
};
|
|
512
|
-
};
|
|
513
|
-
const getPostApiAuthRegisterUrl = () => {
|
|
514
|
-
return `/api/api/auth/register`;
|
|
515
|
-
};
|
|
516
|
-
const postApiAuthRegister = async (registerRequest, options) => {
|
|
517
|
-
const res = await fetch(getPostApiAuthRegisterUrl(), {
|
|
518
|
-
...options,
|
|
519
|
-
method: "POST",
|
|
520
|
-
headers: {
|
|
521
|
-
"Content-Type": "application/json",
|
|
522
|
-
...options?.headers
|
|
523
|
-
},
|
|
524
|
-
body: JSON.stringify(registerRequest)
|
|
525
|
-
});
|
|
526
|
-
const body = [
|
|
527
|
-
204,
|
|
528
|
-
205,
|
|
529
|
-
304
|
|
530
|
-
].includes(res.status) ? null : await res.text();
|
|
531
|
-
return {
|
|
532
|
-
data: body ? JSON.parse(body) : {},
|
|
533
|
-
status: res.status,
|
|
534
|
-
headers: res.headers
|
|
535
|
-
};
|
|
536
|
-
};
|
|
537
|
-
const getGetApiOperationsUrl = (params) => {
|
|
538
|
-
const normalizedParams = new URLSearchParams();
|
|
539
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
540
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
541
|
-
});
|
|
542
|
-
const stringifiedParams = normalizedParams.toString();
|
|
543
|
-
return stringifiedParams.length > 0 ? `/api/api/operations?${stringifiedParams}` : `/api/api/operations`;
|
|
544
|
-
};
|
|
545
|
-
const getApiOperations = async (params, options) => {
|
|
546
|
-
const res = await fetch(getGetApiOperationsUrl(params), {
|
|
547
|
-
...options,
|
|
548
|
-
method: "GET"
|
|
549
|
-
});
|
|
550
|
-
const body = [
|
|
551
|
-
204,
|
|
552
|
-
205,
|
|
553
|
-
304
|
|
554
|
-
].includes(res.status) ? null : await res.text();
|
|
555
|
-
return {
|
|
556
|
-
data: body ? JSON.parse(body) : {},
|
|
557
|
-
status: res.status,
|
|
558
|
-
headers: res.headers
|
|
559
|
-
};
|
|
560
|
-
};
|
|
561
|
-
const getGetApiOperationsIdUrl = (id) => {
|
|
562
|
-
return `/api/api/operations/${id}`;
|
|
563
|
-
};
|
|
564
|
-
const getApiOperationsId = async (id, options) => {
|
|
565
|
-
const res = await fetch(getGetApiOperationsIdUrl(id), {
|
|
566
|
-
...options,
|
|
567
|
-
method: "GET"
|
|
568
|
-
});
|
|
569
|
-
const body = [
|
|
570
|
-
204,
|
|
571
|
-
205,
|
|
572
|
-
304
|
|
573
|
-
].includes(res.status) ? null : await res.text();
|
|
574
|
-
return {
|
|
575
|
-
data: body ? JSON.parse(body) : {},
|
|
576
|
-
status: res.status,
|
|
577
|
-
headers: res.headers
|
|
578
|
-
};
|
|
579
|
-
};
|
|
580
|
-
const getGetApiOperationsFiltersUrl = () => {
|
|
581
|
-
return `/api/api/operations/filters`;
|
|
582
|
-
};
|
|
583
|
-
const getApiOperationsFilters = async (options) => {
|
|
584
|
-
const res = await fetch(getGetApiOperationsFiltersUrl(), {
|
|
585
|
-
...options,
|
|
586
|
-
method: "GET"
|
|
587
|
-
});
|
|
588
|
-
const body = [
|
|
589
|
-
204,
|
|
590
|
-
205,
|
|
591
|
-
304
|
|
592
|
-
].includes(res.status) ? null : await res.text();
|
|
593
|
-
return {
|
|
594
|
-
data: body ? JSON.parse(body) : {},
|
|
595
|
-
status: res.status,
|
|
596
|
-
headers: res.headers
|
|
597
|
-
};
|
|
598
|
-
};
|
|
599
|
-
const getGetApiUploadLimitUrl = () => {
|
|
600
|
-
return `/api/api/upload-limit`;
|
|
601
|
-
};
|
|
602
|
-
const getApiUploadLimit = async (options) => {
|
|
603
|
-
const res = await fetch(getGetApiUploadLimitUrl(), {
|
|
604
|
-
...options,
|
|
605
|
-
method: "GET"
|
|
606
|
-
});
|
|
607
|
-
const body = [
|
|
608
|
-
204,
|
|
609
|
-
205,
|
|
610
|
-
304
|
|
611
|
-
].includes(res.status) ? null : await res.text();
|
|
612
|
-
return {
|
|
613
|
-
data: body ? JSON.parse(body) : {},
|
|
614
|
-
status: res.status,
|
|
615
|
-
headers: res.headers
|
|
616
|
-
};
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
//#endregion
|
|
620
|
-
exports.deleteApiAccount = deleteApiAccount;
|
|
621
|
-
exports.deleteApiAccountKeysKeyID = deleteApiAccountKeysKeyID;
|
|
622
|
-
exports.getApiAccount = getApiAccount;
|
|
623
|
-
exports.getApiAccountAvatar = getApiAccountAvatar;
|
|
624
|
-
exports.getApiAccountKeys = getApiAccountKeys;
|
|
625
|
-
exports.getApiAccountPermissions = getApiAccountPermissions;
|
|
626
|
-
exports.getApiOperations = getApiOperations;
|
|
627
|
-
exports.getApiOperationsFilters = getApiOperationsFilters;
|
|
628
|
-
exports.getApiOperationsId = getApiOperationsId;
|
|
629
|
-
exports.getApiUploadLimit = getApiUploadLimit;
|
|
630
|
-
exports.getDeleteApiAccountKeysKeyIDUrl = getDeleteApiAccountKeysKeyIDUrl;
|
|
631
|
-
exports.getDeleteApiAccountUrl = getDeleteApiAccountUrl;
|
|
632
|
-
exports.getGetApiAccountAvatarUrl = getGetApiAccountAvatarUrl;
|
|
633
|
-
exports.getGetApiAccountKeysUrl = getGetApiAccountKeysUrl;
|
|
634
|
-
exports.getGetApiAccountPermissionsUrl = getGetApiAccountPermissionsUrl;
|
|
635
|
-
exports.getGetApiAccountUrl = getGetApiAccountUrl;
|
|
636
|
-
exports.getGetApiOperationsFiltersUrl = getGetApiOperationsFiltersUrl;
|
|
637
|
-
exports.getGetApiOperationsIdUrl = getGetApiOperationsIdUrl;
|
|
638
|
-
exports.getGetApiOperationsUrl = getGetApiOperationsUrl;
|
|
639
|
-
exports.getGetApiUploadLimitUrl = getGetApiUploadLimitUrl;
|
|
640
|
-
exports.getPatchApiAccountUrl = getPatchApiAccountUrl;
|
|
641
|
-
exports.getPostApiAccountAvatarUrl = getPostApiAccountAvatarUrl;
|
|
642
|
-
exports.getPostApiAccountKeysUrl = getPostApiAccountKeysUrl;
|
|
643
|
-
exports.getPostApiAccountPasswordResetConfirmUrl = getPostApiAccountPasswordResetConfirmUrl;
|
|
644
|
-
exports.getPostApiAccountPasswordResetRequestUrl = getPostApiAccountPasswordResetRequestUrl;
|
|
645
|
-
exports.getPostApiAccountUpdateEmailUrl = getPostApiAccountUpdateEmailUrl;
|
|
646
|
-
exports.getPostApiAccountUpdatePasswordUrl = getPostApiAccountUpdatePasswordUrl;
|
|
647
|
-
exports.getPostApiAccountVerifyEmailResendUrl = getPostApiAccountVerifyEmailResendUrl;
|
|
648
|
-
exports.getPostApiAccountVerifyEmailUrl = getPostApiAccountVerifyEmailUrl;
|
|
649
|
-
exports.getPostApiAuthKeyUrl = getPostApiAuthKeyUrl;
|
|
650
|
-
exports.getPostApiAuthLoginUrl = getPostApiAuthLoginUrl;
|
|
651
|
-
exports.getPostApiAuthLogoutUrl = getPostApiAuthLogoutUrl;
|
|
652
|
-
exports.getPostApiAuthOtpDisableUrl = getPostApiAuthOtpDisableUrl;
|
|
653
|
-
exports.getPostApiAuthOtpGenerateUrl = getPostApiAuthOtpGenerateUrl;
|
|
654
|
-
exports.getPostApiAuthOtpValidateUrl = getPostApiAuthOtpValidateUrl;
|
|
655
|
-
exports.getPostApiAuthOtpVerifyUrl = getPostApiAuthOtpVerifyUrl;
|
|
656
|
-
exports.getPostApiAuthPingUrl = getPostApiAuthPingUrl;
|
|
657
|
-
exports.getPostApiAuthRegisterUrl = getPostApiAuthRegisterUrl;
|
|
658
|
-
exports.patchApiAccount = patchApiAccount;
|
|
659
|
-
exports.postApiAccountAvatar = postApiAccountAvatar;
|
|
660
|
-
exports.postApiAccountKeys = postApiAccountKeys;
|
|
661
|
-
exports.postApiAccountPasswordResetConfirm = postApiAccountPasswordResetConfirm;
|
|
662
|
-
exports.postApiAccountPasswordResetRequest = postApiAccountPasswordResetRequest;
|
|
663
|
-
exports.postApiAccountUpdateEmail = postApiAccountUpdateEmail;
|
|
664
|
-
exports.postApiAccountUpdatePassword = postApiAccountUpdatePassword;
|
|
665
|
-
exports.postApiAccountVerifyEmail = postApiAccountVerifyEmail;
|
|
666
|
-
exports.postApiAccountVerifyEmailResend = postApiAccountVerifyEmailResend;
|
|
667
|
-
exports.postApiAuthKey = postApiAuthKey;
|
|
668
|
-
exports.postApiAuthLogin = postApiAuthLogin;
|
|
669
|
-
exports.postApiAuthLogout = postApiAuthLogout;
|
|
670
|
-
exports.postApiAuthOtpDisable = postApiAuthOtpDisable;
|
|
671
|
-
exports.postApiAuthOtpGenerate = postApiAuthOtpGenerate;
|
|
672
|
-
exports.postApiAuthOtpValidate = postApiAuthOtpValidate;
|
|
673
|
-
exports.postApiAuthOtpVerify = postApiAuthOtpVerify;
|
|
674
|
-
exports.postApiAuthPing = postApiAuthPing;
|
|
675
|
-
exports.postApiAuthRegister = postApiAuthRegister;
|
|
676
|
-
//# sourceMappingURL=default.cjs.map
|