@lumeweb/portal-sdk 0.1.0 → 0.1.2
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,7 +1,11 @@
|
|
|
1
1
|
//#region src/account/generated/default.ts
|
|
2
2
|
const getDeleteApiAccountUrl = () => {
|
|
3
|
-
return `/api/
|
|
3
|
+
return `/api/account`;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Initiates the process to delete the authenticated user's account.
|
|
7
|
+
* @summary Request account deletion
|
|
8
|
+
*/
|
|
5
9
|
const deleteApiAccount = async (options) => {
|
|
6
10
|
const res = await fetch(getDeleteApiAccountUrl(), {
|
|
7
11
|
...options,
|
|
@@ -13,14 +17,18 @@ const deleteApiAccount = async (options) => {
|
|
|
13
17
|
304
|
|
14
18
|
].includes(res.status) ? null : await res.text();
|
|
15
19
|
return {
|
|
16
|
-
data: body ? JSON.parse(body) :
|
|
20
|
+
data: body ? JSON.parse(body) : void 0,
|
|
17
21
|
status: res.status,
|
|
18
22
|
headers: res.headers
|
|
19
23
|
};
|
|
20
24
|
};
|
|
21
25
|
const getGetApiAccountUrl = () => {
|
|
22
|
-
return `/api/
|
|
26
|
+
return `/api/account`;
|
|
23
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves information about the authenticated user's account.
|
|
30
|
+
* @summary Get account information
|
|
31
|
+
*/
|
|
24
32
|
const getApiAccount = async (options) => {
|
|
25
33
|
const res = await fetch(getGetApiAccountUrl(), {
|
|
26
34
|
...options,
|
|
@@ -38,8 +46,12 @@ const getApiAccount = async (options) => {
|
|
|
38
46
|
};
|
|
39
47
|
};
|
|
40
48
|
const getPatchApiAccountUrl = () => {
|
|
41
|
-
return `/api/
|
|
49
|
+
return `/api/account`;
|
|
42
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Updates the authenticated user's profile information. Email cannot be updated through this endpoint.
|
|
53
|
+
* @summary Update profile information
|
|
54
|
+
*/
|
|
43
55
|
const patchApiAccount = async (updateProfileRequest, options) => {
|
|
44
56
|
const res = await fetch(getPatchApiAccountUrl(), {
|
|
45
57
|
...options,
|
|
@@ -56,14 +68,18 @@ const patchApiAccount = async (updateProfileRequest, options) => {
|
|
|
56
68
|
304
|
|
57
69
|
].includes(res.status) ? null : await res.text();
|
|
58
70
|
return {
|
|
59
|
-
data: body ? JSON.parse(body) :
|
|
71
|
+
data: body ? JSON.parse(body) : void 0,
|
|
60
72
|
status: res.status,
|
|
61
73
|
headers: res.headers
|
|
62
74
|
};
|
|
63
75
|
};
|
|
64
76
|
const getGetApiAccountAvatarUrl = () => {
|
|
65
|
-
return `/api/
|
|
77
|
+
return `/api/account/avatar`;
|
|
66
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* Retrieves the authenticated user's profile picture
|
|
81
|
+
* @summary Get Avatar
|
|
82
|
+
*/
|
|
67
83
|
const getApiAccountAvatar = async (options) => {
|
|
68
84
|
const res = await fetch(getGetApiAccountAvatarUrl(), {
|
|
69
85
|
...options,
|
|
@@ -75,14 +91,18 @@ const getApiAccountAvatar = async (options) => {
|
|
|
75
91
|
304
|
|
76
92
|
].includes(res.status) ? null : await res.text();
|
|
77
93
|
return {
|
|
78
|
-
data: body ? JSON.parse(body) :
|
|
94
|
+
data: body ? JSON.parse(body) : void 0,
|
|
79
95
|
status: res.status,
|
|
80
96
|
headers: res.headers
|
|
81
97
|
};
|
|
82
98
|
};
|
|
83
99
|
const getPostApiAccountAvatarUrl = () => {
|
|
84
|
-
return `/api/
|
|
100
|
+
return `/api/account/avatar`;
|
|
85
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* Uploads a profile picture/avatar
|
|
104
|
+
* @summary Upload Avatar
|
|
105
|
+
*/
|
|
86
106
|
const postApiAccountAvatar = async (postApiAccountAvatarBody, options) => {
|
|
87
107
|
const formData = new FormData();
|
|
88
108
|
formData.append(`file`, postApiAccountAvatarBody.file);
|
|
@@ -108,8 +128,12 @@ const getGetApiAccountKeysUrl = (params) => {
|
|
|
108
128
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
109
129
|
});
|
|
110
130
|
const stringifiedParams = normalizedParams.toString();
|
|
111
|
-
return stringifiedParams.length > 0 ? `/api/
|
|
131
|
+
return stringifiedParams.length > 0 ? `/api/account/keys?${stringifiedParams}` : `/api/account/keys`;
|
|
112
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* Retrieves a list of API keys for the authenticated user.
|
|
135
|
+
* @summary List API Keys
|
|
136
|
+
*/
|
|
113
137
|
const getApiAccountKeys = async (params, options) => {
|
|
114
138
|
const res = await fetch(getGetApiAccountKeysUrl(params), {
|
|
115
139
|
...options,
|
|
@@ -127,8 +151,12 @@ const getApiAccountKeys = async (params, options) => {
|
|
|
127
151
|
};
|
|
128
152
|
};
|
|
129
153
|
const getPostApiAccountKeysUrl = () => {
|
|
130
|
-
return `/api/
|
|
154
|
+
return `/api/account/keys`;
|
|
131
155
|
};
|
|
156
|
+
/**
|
|
157
|
+
* Creates a new API key for the authenticated user.
|
|
158
|
+
* @summary Create API Key
|
|
159
|
+
*/
|
|
132
160
|
const postApiAccountKeys = async (aPIKeyCreateRequest, options) => {
|
|
133
161
|
const res = await fetch(getPostApiAccountKeysUrl(), {
|
|
134
162
|
...options,
|
|
@@ -151,8 +179,12 @@ const postApiAccountKeys = async (aPIKeyCreateRequest, options) => {
|
|
|
151
179
|
};
|
|
152
180
|
};
|
|
153
181
|
const getDeleteApiAccountKeysKeyIDUrl = (keyID) => {
|
|
154
|
-
return `/api/
|
|
182
|
+
return `/api/account/keys/${keyID}`;
|
|
155
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* Deletes a specific API key for the authenticated user.
|
|
186
|
+
* @summary Delete API Key
|
|
187
|
+
*/
|
|
156
188
|
const deleteApiAccountKeysKeyID = async (keyID, options) => {
|
|
157
189
|
const res = await fetch(getDeleteApiAccountKeysKeyIDUrl(keyID), {
|
|
158
190
|
...options,
|
|
@@ -164,14 +196,18 @@ const deleteApiAccountKeysKeyID = async (keyID, options) => {
|
|
|
164
196
|
304
|
|
165
197
|
].includes(res.status) ? null : await res.text();
|
|
166
198
|
return {
|
|
167
|
-
data: body ? JSON.parse(body) :
|
|
199
|
+
data: body ? JSON.parse(body) : void 0,
|
|
168
200
|
status: res.status,
|
|
169
201
|
headers: res.headers
|
|
170
202
|
};
|
|
171
203
|
};
|
|
172
204
|
const getPostApiAccountPasswordResetConfirmUrl = () => {
|
|
173
|
-
return `/api/
|
|
205
|
+
return `/api/account/password-reset/confirm`;
|
|
174
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* Resets the user's password using a token received via email.
|
|
209
|
+
* @summary Confirm password reset
|
|
210
|
+
*/
|
|
175
211
|
const postApiAccountPasswordResetConfirm = async (passwordResetVerifyRequest, options) => {
|
|
176
212
|
const res = await fetch(getPostApiAccountPasswordResetConfirmUrl(), {
|
|
177
213
|
...options,
|
|
@@ -188,14 +224,18 @@ const postApiAccountPasswordResetConfirm = async (passwordResetVerifyRequest, op
|
|
|
188
224
|
304
|
|
189
225
|
].includes(res.status) ? null : await res.text();
|
|
190
226
|
return {
|
|
191
|
-
data: body ? JSON.parse(body) :
|
|
227
|
+
data: body ? JSON.parse(body) : void 0,
|
|
192
228
|
status: res.status,
|
|
193
229
|
headers: res.headers
|
|
194
230
|
};
|
|
195
231
|
};
|
|
196
232
|
const getPostApiAccountPasswordResetRequestUrl = () => {
|
|
197
|
-
return `/api/
|
|
233
|
+
return `/api/account/password-reset/request`;
|
|
198
234
|
};
|
|
235
|
+
/**
|
|
236
|
+
* Initiates the password reset process by sending a reset link to the user's email.
|
|
237
|
+
* @summary Request password reset
|
|
238
|
+
*/
|
|
199
239
|
const postApiAccountPasswordResetRequest = async (passwordResetRequest, options) => {
|
|
200
240
|
const res = await fetch(getPostApiAccountPasswordResetRequestUrl(), {
|
|
201
241
|
...options,
|
|
@@ -212,14 +252,18 @@ const postApiAccountPasswordResetRequest = async (passwordResetRequest, options)
|
|
|
212
252
|
304
|
|
213
253
|
].includes(res.status) ? null : await res.text();
|
|
214
254
|
return {
|
|
215
|
-
data: body ? JSON.parse(body) :
|
|
255
|
+
data: body ? JSON.parse(body) : void 0,
|
|
216
256
|
status: res.status,
|
|
217
257
|
headers: res.headers
|
|
218
258
|
};
|
|
219
259
|
};
|
|
220
260
|
const getGetApiAccountPermissionsUrl = () => {
|
|
221
|
-
return `/api/
|
|
261
|
+
return `/api/account/permissions`;
|
|
222
262
|
};
|
|
263
|
+
/**
|
|
264
|
+
* Retrieves the access control policies and model for the authenticated user.
|
|
265
|
+
* @summary Get account permissions
|
|
266
|
+
*/
|
|
223
267
|
const getApiAccountPermissions = async (options) => {
|
|
224
268
|
const res = await fetch(getGetApiAccountPermissionsUrl(), {
|
|
225
269
|
...options,
|
|
@@ -236,9 +280,41 @@ const getApiAccountPermissions = async (options) => {
|
|
|
236
280
|
headers: res.headers
|
|
237
281
|
};
|
|
238
282
|
};
|
|
283
|
+
const getGetApiAccountQuotaHistoryUrl = (params) => {
|
|
284
|
+
const normalizedParams = new URLSearchParams();
|
|
285
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
286
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
287
|
+
});
|
|
288
|
+
const stringifiedParams = normalizedParams.toString();
|
|
289
|
+
return stringifiedParams.length > 0 ? `/api/account/quota/history?${stringifiedParams}` : `/api/account/quota/history`;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Retrieves historical quota usage data for charting and analytics.
|
|
293
|
+
* @summary Get quota usage history
|
|
294
|
+
*/
|
|
295
|
+
const getApiAccountQuotaHistory = async (params, options) => {
|
|
296
|
+
const res = await fetch(getGetApiAccountQuotaHistoryUrl(params), {
|
|
297
|
+
...options,
|
|
298
|
+
method: "GET"
|
|
299
|
+
});
|
|
300
|
+
const body = [
|
|
301
|
+
204,
|
|
302
|
+
205,
|
|
303
|
+
304
|
|
304
|
+
].includes(res.status) ? null : await res.text();
|
|
305
|
+
return {
|
|
306
|
+
data: body ? JSON.parse(body) : {},
|
|
307
|
+
status: res.status,
|
|
308
|
+
headers: res.headers
|
|
309
|
+
};
|
|
310
|
+
};
|
|
239
311
|
const getPostApiAccountUpdateEmailUrl = () => {
|
|
240
|
-
return `/api/
|
|
312
|
+
return `/api/account/update-email`;
|
|
241
313
|
};
|
|
314
|
+
/**
|
|
315
|
+
* Updates the authenticated user's email address.
|
|
316
|
+
* @summary Update email address
|
|
317
|
+
*/
|
|
242
318
|
const postApiAccountUpdateEmail = async (updateEmailRequest, options) => {
|
|
243
319
|
const res = await fetch(getPostApiAccountUpdateEmailUrl(), {
|
|
244
320
|
...options,
|
|
@@ -255,14 +331,18 @@ const postApiAccountUpdateEmail = async (updateEmailRequest, options) => {
|
|
|
255
331
|
304
|
|
256
332
|
].includes(res.status) ? null : await res.text();
|
|
257
333
|
return {
|
|
258
|
-
data: body ? JSON.parse(body) :
|
|
334
|
+
data: body ? JSON.parse(body) : void 0,
|
|
259
335
|
status: res.status,
|
|
260
336
|
headers: res.headers
|
|
261
337
|
};
|
|
262
338
|
};
|
|
263
339
|
const getPostApiAccountUpdatePasswordUrl = () => {
|
|
264
|
-
return `/api/
|
|
340
|
+
return `/api/account/update-password`;
|
|
265
341
|
};
|
|
342
|
+
/**
|
|
343
|
+
* Updates the authenticated user's password.
|
|
344
|
+
* @summary Update password
|
|
345
|
+
*/
|
|
266
346
|
const postApiAccountUpdatePassword = async (updatePasswordRequest, options) => {
|
|
267
347
|
const res = await fetch(getPostApiAccountUpdatePasswordUrl(), {
|
|
268
348
|
...options,
|
|
@@ -279,7 +359,7 @@ const postApiAccountUpdatePassword = async (updatePasswordRequest, options) => {
|
|
|
279
359
|
304
|
|
280
360
|
].includes(res.status) ? null : await res.text();
|
|
281
361
|
return {
|
|
282
|
-
data: body ? JSON.parse(body) :
|
|
362
|
+
data: body ? JSON.parse(body) : void 0,
|
|
283
363
|
status: res.status,
|
|
284
364
|
headers: res.headers
|
|
285
365
|
};
|
|
@@ -290,8 +370,12 @@ const getPostApiAccountVerifyEmailUrl = (params) => {
|
|
|
290
370
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
291
371
|
});
|
|
292
372
|
const stringifiedParams = normalizedParams.toString();
|
|
293
|
-
return stringifiedParams.length > 0 ? `/api/
|
|
373
|
+
return stringifiedParams.length > 0 ? `/api/account/verify-email?${stringifiedParams}` : `/api/account/verify-email`;
|
|
294
374
|
};
|
|
375
|
+
/**
|
|
376
|
+
* Verifies a user's email address using a token sent via email. Optionally auto-login user if they don't have 2FA enabled.
|
|
377
|
+
* @summary Verify email address
|
|
378
|
+
*/
|
|
295
379
|
const postApiAccountVerifyEmail = async (verifyEmailRequest, params, options) => {
|
|
296
380
|
const res = await fetch(getPostApiAccountVerifyEmailUrl(params), {
|
|
297
381
|
...options,
|
|
@@ -308,14 +392,18 @@ const postApiAccountVerifyEmail = async (verifyEmailRequest, params, options) =>
|
|
|
308
392
|
304
|
|
309
393
|
].includes(res.status) ? null : await res.text();
|
|
310
394
|
return {
|
|
311
|
-
data: body ? JSON.parse(body) :
|
|
395
|
+
data: body ? JSON.parse(body) : void 0,
|
|
312
396
|
status: res.status,
|
|
313
397
|
headers: res.headers
|
|
314
398
|
};
|
|
315
399
|
};
|
|
316
400
|
const getPostApiAccountVerifyEmailResendUrl = () => {
|
|
317
|
-
return `/api/
|
|
401
|
+
return `/api/account/verify-email/resend`;
|
|
318
402
|
};
|
|
403
|
+
/**
|
|
404
|
+
* Resends the email verification link to the user's email address.
|
|
405
|
+
* @summary Resend email verification
|
|
406
|
+
*/
|
|
319
407
|
const postApiAccountVerifyEmailResend = async (resendVerifyEmailRequest, options) => {
|
|
320
408
|
const res = await fetch(getPostApiAccountVerifyEmailResendUrl(), {
|
|
321
409
|
...options,
|
|
@@ -332,14 +420,18 @@ const postApiAccountVerifyEmailResend = async (resendVerifyEmailRequest, options
|
|
|
332
420
|
304
|
|
333
421
|
].includes(res.status) ? null : await res.text();
|
|
334
422
|
return {
|
|
335
|
-
data: body ? JSON.parse(body) :
|
|
423
|
+
data: body ? JSON.parse(body) : void 0,
|
|
336
424
|
status: res.status,
|
|
337
425
|
headers: res.headers
|
|
338
426
|
};
|
|
339
427
|
};
|
|
340
428
|
const getPostApiAuthKeyUrl = () => {
|
|
341
|
-
return `/api/
|
|
429
|
+
return `/api/auth/key`;
|
|
342
430
|
};
|
|
431
|
+
/**
|
|
432
|
+
* Exchanges an API key for a JWT.
|
|
433
|
+
* @summary Authenticate with API Key
|
|
434
|
+
*/
|
|
343
435
|
const postApiAuthKey = async (options) => {
|
|
344
436
|
const res = await fetch(getPostApiAuthKeyUrl(), {
|
|
345
437
|
...options,
|
|
@@ -357,8 +449,12 @@ const postApiAuthKey = async (options) => {
|
|
|
357
449
|
};
|
|
358
450
|
};
|
|
359
451
|
const getPostApiAuthLoginUrl = () => {
|
|
360
|
-
return `/api/
|
|
452
|
+
return `/api/auth/login`;
|
|
361
453
|
};
|
|
454
|
+
/**
|
|
455
|
+
* Authenticates a user using email and password.
|
|
456
|
+
* @summary Login with email and password
|
|
457
|
+
*/
|
|
362
458
|
const postApiAuthLogin = async (loginRequest, options) => {
|
|
363
459
|
const res = await fetch(getPostApiAuthLoginUrl(), {
|
|
364
460
|
...options,
|
|
@@ -381,8 +477,12 @@ const postApiAuthLogin = async (loginRequest, options) => {
|
|
|
381
477
|
};
|
|
382
478
|
};
|
|
383
479
|
const getPostApiAuthLogoutUrl = () => {
|
|
384
|
-
return `/api/
|
|
480
|
+
return `/api/auth/logout`;
|
|
385
481
|
};
|
|
482
|
+
/**
|
|
483
|
+
* Logs out the current user by clearing the authentication cookie.
|
|
484
|
+
* @summary Logout
|
|
485
|
+
*/
|
|
386
486
|
const postApiAuthLogout = async (options) => {
|
|
387
487
|
const res = await fetch(getPostApiAuthLogoutUrl(), {
|
|
388
488
|
...options,
|
|
@@ -394,14 +494,18 @@ const postApiAuthLogout = async (options) => {
|
|
|
394
494
|
304
|
|
395
495
|
].includes(res.status) ? null : await res.text();
|
|
396
496
|
return {
|
|
397
|
-
data: body ? JSON.parse(body) :
|
|
497
|
+
data: body ? JSON.parse(body) : void 0,
|
|
398
498
|
status: res.status,
|
|
399
499
|
headers: res.headers
|
|
400
500
|
};
|
|
401
501
|
};
|
|
402
502
|
const getPostApiAuthOtpDisableUrl = () => {
|
|
403
|
-
return `/api/
|
|
503
|
+
return `/api/auth/otp/disable`;
|
|
404
504
|
};
|
|
505
|
+
/**
|
|
506
|
+
* Disables 2FA for the authenticated user.
|
|
507
|
+
* @summary Disable OTP
|
|
508
|
+
*/
|
|
405
509
|
const postApiAuthOtpDisable = async (oTPDisableRequest, options) => {
|
|
406
510
|
const res = await fetch(getPostApiAuthOtpDisableUrl(), {
|
|
407
511
|
...options,
|
|
@@ -424,8 +528,12 @@ const postApiAuthOtpDisable = async (oTPDisableRequest, options) => {
|
|
|
424
528
|
};
|
|
425
529
|
};
|
|
426
530
|
const getPostApiAuthOtpGenerateUrl = () => {
|
|
427
|
-
return `/api/
|
|
531
|
+
return `/api/auth/otp/generate`;
|
|
428
532
|
};
|
|
533
|
+
/**
|
|
534
|
+
* Generates a new OTP secret for the authenticated user.
|
|
535
|
+
* @summary Generate OTP secret
|
|
536
|
+
*/
|
|
429
537
|
const postApiAuthOtpGenerate = async (options) => {
|
|
430
538
|
const res = await fetch(getPostApiAuthOtpGenerateUrl(), {
|
|
431
539
|
...options,
|
|
@@ -443,8 +551,12 @@ const postApiAuthOtpGenerate = async (options) => {
|
|
|
443
551
|
};
|
|
444
552
|
};
|
|
445
553
|
const getPostApiAuthOtpValidateUrl = () => {
|
|
446
|
-
return `/api/
|
|
554
|
+
return `/api/auth/otp/validate`;
|
|
447
555
|
};
|
|
556
|
+
/**
|
|
557
|
+
* Validates an OTP code to complete 2FA login.
|
|
558
|
+
* @summary Validate OTP code
|
|
559
|
+
*/
|
|
448
560
|
const postApiAuthOtpValidate = async (oTPValidateRequest, options) => {
|
|
449
561
|
const res = await fetch(getPostApiAuthOtpValidateUrl(), {
|
|
450
562
|
...options,
|
|
@@ -467,8 +579,12 @@ const postApiAuthOtpValidate = async (oTPValidateRequest, options) => {
|
|
|
467
579
|
};
|
|
468
580
|
};
|
|
469
581
|
const getPostApiAuthOtpVerifyUrl = () => {
|
|
470
|
-
return `/api/
|
|
582
|
+
return `/api/auth/otp/verify`;
|
|
471
583
|
};
|
|
584
|
+
/**
|
|
585
|
+
* Verifies an OTP code and enables 2FA for the authenticated user.
|
|
586
|
+
* @summary Verify and enable OTP
|
|
587
|
+
*/
|
|
472
588
|
const postApiAuthOtpVerify = async (oTPVerifyRequest, options) => {
|
|
473
589
|
const res = await fetch(getPostApiAuthOtpVerifyUrl(), {
|
|
474
590
|
...options,
|
|
@@ -491,8 +607,12 @@ const postApiAuthOtpVerify = async (oTPVerifyRequest, options) => {
|
|
|
491
607
|
};
|
|
492
608
|
};
|
|
493
609
|
const getPostApiAuthPingUrl = () => {
|
|
494
|
-
return `/api/
|
|
610
|
+
return `/api/auth/ping`;
|
|
495
611
|
};
|
|
612
|
+
/**
|
|
613
|
+
* Checks if the user is authenticated and returns a pong response.
|
|
614
|
+
* @summary Ping authenticated endpoint
|
|
615
|
+
*/
|
|
496
616
|
const postApiAuthPing = async (options) => {
|
|
497
617
|
const res = await fetch(getPostApiAuthPingUrl(), {
|
|
498
618
|
...options,
|
|
@@ -510,8 +630,12 @@ const postApiAuthPing = async (options) => {
|
|
|
510
630
|
};
|
|
511
631
|
};
|
|
512
632
|
const getPostApiAuthRegisterUrl = () => {
|
|
513
|
-
return `/api/
|
|
633
|
+
return `/api/auth/register`;
|
|
514
634
|
};
|
|
635
|
+
/**
|
|
636
|
+
* Creates a new user account with email and password.
|
|
637
|
+
* @summary Register a new account
|
|
638
|
+
*/
|
|
515
639
|
const postApiAuthRegister = async (registerRequest, options) => {
|
|
516
640
|
const res = await fetch(getPostApiAuthRegisterUrl(), {
|
|
517
641
|
...options,
|
|
@@ -528,7 +652,7 @@ const postApiAuthRegister = async (registerRequest, options) => {
|
|
|
528
652
|
304
|
|
529
653
|
].includes(res.status) ? null : await res.text();
|
|
530
654
|
return {
|
|
531
|
-
data: body ? JSON.parse(body) :
|
|
655
|
+
data: body ? JSON.parse(body) : void 0,
|
|
532
656
|
status: res.status,
|
|
533
657
|
headers: res.headers
|
|
534
658
|
};
|
|
@@ -539,8 +663,12 @@ const getGetApiOperationsUrl = (params) => {
|
|
|
539
663
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
540
664
|
});
|
|
541
665
|
const stringifiedParams = normalizedParams.toString();
|
|
542
|
-
return stringifiedParams.length > 0 ? `/api/
|
|
666
|
+
return stringifiedParams.length > 0 ? `/api/operations?${stringifiedParams}` : `/api/operations`;
|
|
543
667
|
};
|
|
668
|
+
/**
|
|
669
|
+
* Retrieve a list of operations, with filtering, searching, and pagination support.
|
|
670
|
+
* @summary List Operations
|
|
671
|
+
*/
|
|
544
672
|
const getApiOperations = async (params, options) => {
|
|
545
673
|
const res = await fetch(getGetApiOperationsUrl(params), {
|
|
546
674
|
...options,
|
|
@@ -558,8 +686,12 @@ const getApiOperations = async (params, options) => {
|
|
|
558
686
|
};
|
|
559
687
|
};
|
|
560
688
|
const getGetApiOperationsIdUrl = (id) => {
|
|
561
|
-
return `/api/
|
|
689
|
+
return `/api/operations/${id}`;
|
|
562
690
|
};
|
|
691
|
+
/**
|
|
692
|
+
* Retrieve detailed information for a specific operation by its ID.
|
|
693
|
+
* @summary Get Operation Details
|
|
694
|
+
*/
|
|
563
695
|
const getApiOperationsId = async (id, options) => {
|
|
564
696
|
const res = await fetch(getGetApiOperationsIdUrl(id), {
|
|
565
697
|
...options,
|
|
@@ -577,8 +709,12 @@ const getApiOperationsId = async (id, options) => {
|
|
|
577
709
|
};
|
|
578
710
|
};
|
|
579
711
|
const getGetApiOperationsFiltersUrl = () => {
|
|
580
|
-
return `/api/
|
|
712
|
+
return `/api/operations/filters`;
|
|
581
713
|
};
|
|
714
|
+
/**
|
|
715
|
+
* Retrieves distinct filter values for operations (statuses, operations, protocols)
|
|
716
|
+
* @summary Get Operation Filters
|
|
717
|
+
*/
|
|
582
718
|
const getApiOperationsFilters = async (options) => {
|
|
583
719
|
const res = await fetch(getGetApiOperationsFiltersUrl(), {
|
|
584
720
|
...options,
|
|
@@ -596,8 +732,12 @@ const getApiOperationsFilters = async (options) => {
|
|
|
596
732
|
};
|
|
597
733
|
};
|
|
598
734
|
const getGetApiUploadLimitUrl = () => {
|
|
599
|
-
return `/api/
|
|
735
|
+
return `/api/upload-limit`;
|
|
600
736
|
};
|
|
737
|
+
/**
|
|
738
|
+
* Retrieves the maximum allowed upload size.
|
|
739
|
+
* @summary Get upload limit
|
|
740
|
+
*/
|
|
601
741
|
const getApiUploadLimit = async (options) => {
|
|
602
742
|
const res = await fetch(getGetApiUploadLimitUrl(), {
|
|
603
743
|
...options,
|
|
@@ -616,5 +756,5 @@ const getApiUploadLimit = async (options) => {
|
|
|
616
756
|
};
|
|
617
757
|
|
|
618
758
|
//#endregion
|
|
619
|
-
export { deleteApiAccount, deleteApiAccountKeysKeyID, getApiAccount, getApiAccountAvatar, getApiAccountKeys, getApiAccountPermissions, getApiOperations, getApiOperationsFilters, getApiOperationsId, getApiUploadLimit, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountUrl, getGetApiAccountAvatarUrl, getGetApiAccountKeysUrl, getGetApiAccountPermissionsUrl, getGetApiAccountUrl, getGetApiOperationsFiltersUrl, getGetApiOperationsIdUrl, getGetApiOperationsUrl, getGetApiUploadLimitUrl, getPatchApiAccountUrl, getPostApiAccountAvatarUrl, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyUrl, getPostApiAuthLoginUrl, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingUrl, getPostApiAuthRegisterUrl, patchApiAccount, postApiAccountAvatar, postApiAccountKeys, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetRequest, postApiAccountUpdateEmail, postApiAccountUpdatePassword, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAuthKey, postApiAuthLogin, postApiAuthLogout, postApiAuthOtpDisable, postApiAuthOtpGenerate, postApiAuthOtpValidate, postApiAuthOtpVerify, postApiAuthPing, postApiAuthRegister };
|
|
759
|
+
export { deleteApiAccount, deleteApiAccountKeysKeyID, getApiAccount, getApiAccountAvatar, getApiAccountKeys, getApiAccountPermissions, getApiAccountQuotaHistory, getApiOperations, getApiOperationsFilters, getApiOperationsId, getApiUploadLimit, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountUrl, getGetApiAccountAvatarUrl, getGetApiAccountKeysUrl, getGetApiAccountPermissionsUrl, getGetApiAccountQuotaHistoryUrl, getGetApiAccountUrl, getGetApiOperationsFiltersUrl, getGetApiOperationsIdUrl, getGetApiOperationsUrl, getGetApiUploadLimitUrl, getPatchApiAccountUrl, getPostApiAccountAvatarUrl, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyUrl, getPostApiAuthLoginUrl, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingUrl, getPostApiAuthRegisterUrl, patchApiAccount, postApiAccountAvatar, postApiAccountKeys, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetRequest, postApiAccountUpdateEmail, postApiAccountUpdatePassword, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAuthKey, postApiAuthLogin, postApiAuthLogout, postApiAuthOtpDisable, postApiAuthOtpGenerate, postApiAuthOtpValidate, postApiAuthOtpVerify, postApiAuthPing, postApiAuthRegister };
|
|
620
760
|
//# sourceMappingURL=default.js.map
|