@anzar-auth/core 1.5.11 → 1.7.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/index.cjs +4 -933
- package/dist/index.d.cts +1547 -1155
- package/dist/index.d.ts +1547 -1155
- package/dist/index.js +4 -933
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,1165 +1,1557 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
1
|
+
import * as openapi_fetch from 'openapi-fetch';
|
|
2
|
+
export { Client, Middleware } from 'openapi-fetch';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.7.15
|
|
9
|
-
* Contact: dev@anzar.io
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
5
|
+
* This file was auto-generated by openapi-typescript.
|
|
6
|
+
* Do not make direct changes to the file.
|
|
14
7
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
|
|
9
|
+
interface paths {
|
|
10
|
+
"/auth/login": {
|
|
11
|
+
parameters: {
|
|
12
|
+
query?: never;
|
|
13
|
+
header?: never;
|
|
14
|
+
path?: never;
|
|
15
|
+
cookie?: never;
|
|
16
|
+
};
|
|
17
|
+
get?: never;
|
|
18
|
+
put?: never;
|
|
19
|
+
/**
|
|
20
|
+
* User login
|
|
21
|
+
* @description Authenticates a user with email and password.
|
|
22
|
+
*
|
|
23
|
+
* **Session strategy**: Returns a session cookie (`id`) managed by the server.
|
|
24
|
+
* **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
25
|
+
*/
|
|
26
|
+
post: operations["login"];
|
|
27
|
+
delete?: never;
|
|
28
|
+
options?: never;
|
|
29
|
+
head?: never;
|
|
30
|
+
patch?: never;
|
|
31
|
+
trace?: never;
|
|
19
32
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
33
|
+
"/auth/logout": {
|
|
34
|
+
parameters: {
|
|
35
|
+
query?: never;
|
|
36
|
+
header?: never;
|
|
37
|
+
path?: never;
|
|
38
|
+
cookie?: never;
|
|
39
|
+
};
|
|
40
|
+
get?: never;
|
|
41
|
+
put?: never;
|
|
42
|
+
/**
|
|
43
|
+
* Logout
|
|
44
|
+
* @description Invalidates the current session and refresh token. The client should discard all stored tokens and cookies after this call.
|
|
45
|
+
*/
|
|
46
|
+
post: operations["logout"];
|
|
47
|
+
delete?: never;
|
|
48
|
+
options?: never;
|
|
49
|
+
head?: never;
|
|
50
|
+
patch?: never;
|
|
51
|
+
trace?: never;
|
|
52
|
+
};
|
|
53
|
+
"/auth/password/forgot": {
|
|
54
|
+
parameters: {
|
|
55
|
+
query?: never;
|
|
56
|
+
header?: never;
|
|
57
|
+
path?: never;
|
|
58
|
+
cookie?: never;
|
|
59
|
+
};
|
|
60
|
+
get?: never;
|
|
61
|
+
put?: never;
|
|
62
|
+
/**
|
|
63
|
+
* Request a password reset
|
|
64
|
+
* @description Sends a password reset link to the provided email address if an account exists.
|
|
65
|
+
*
|
|
66
|
+
* **Note**: Always returns `200` regardless of whether the email exists to prevent user enumeration attacks.
|
|
67
|
+
*/
|
|
68
|
+
post: operations["forgotPassword"];
|
|
69
|
+
delete?: never;
|
|
70
|
+
options?: never;
|
|
71
|
+
head?: never;
|
|
72
|
+
patch?: never;
|
|
73
|
+
trace?: never;
|
|
74
|
+
};
|
|
75
|
+
"/auth/password/reset": {
|
|
76
|
+
parameters: {
|
|
77
|
+
query?: never;
|
|
78
|
+
header?: never;
|
|
79
|
+
path?: never;
|
|
80
|
+
cookie?: never;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Render password reset form
|
|
84
|
+
* @description Validates the password reset token from the email link and renders an HTML form to set a new password. The token is single-use and expires after a short window.
|
|
85
|
+
*/
|
|
86
|
+
get: operations["renderPasswordResetForm"];
|
|
87
|
+
put?: never;
|
|
88
|
+
/**
|
|
89
|
+
* Submit new password
|
|
90
|
+
* @description Submits a new password using a valid reset token. The token is invalidated immediately after use. Accepts a form submission (not JSON) since it is rendered from an HTML form.
|
|
91
|
+
*/
|
|
92
|
+
post: operations["submitNewPassword"];
|
|
93
|
+
delete?: never;
|
|
94
|
+
options?: never;
|
|
95
|
+
head?: never;
|
|
96
|
+
patch?: never;
|
|
97
|
+
trace?: never;
|
|
98
|
+
};
|
|
99
|
+
"/auth/refresh-token": {
|
|
100
|
+
parameters: {
|
|
101
|
+
query?: never;
|
|
102
|
+
header?: never;
|
|
103
|
+
path?: never;
|
|
104
|
+
cookie?: never;
|
|
105
|
+
};
|
|
106
|
+
get?: never;
|
|
107
|
+
put?: never;
|
|
108
|
+
/**
|
|
109
|
+
* Refresh access token
|
|
110
|
+
* @description Issues a new access token using a valid refresh token. Refresh tokens are rotated on each call — the old token is invalidated immediately.
|
|
111
|
+
*/
|
|
112
|
+
post: operations["refreshToken"];
|
|
113
|
+
delete?: never;
|
|
114
|
+
options?: never;
|
|
115
|
+
head?: never;
|
|
116
|
+
patch?: never;
|
|
117
|
+
trace?: never;
|
|
118
|
+
};
|
|
119
|
+
"/auth/register": {
|
|
120
|
+
parameters: {
|
|
121
|
+
query?: never;
|
|
122
|
+
header?: never;
|
|
123
|
+
path?: never;
|
|
124
|
+
cookie?: never;
|
|
125
|
+
};
|
|
126
|
+
get?: never;
|
|
127
|
+
put?: never;
|
|
128
|
+
/**
|
|
129
|
+
* Register a new user
|
|
130
|
+
* @description Creates a new user account with email and password.
|
|
131
|
+
*
|
|
132
|
+
* **Session strategy**: Returns a session cookie (`id`) managed by the server.
|
|
133
|
+
* **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
134
|
+
*/
|
|
135
|
+
post: operations["register"];
|
|
136
|
+
delete?: never;
|
|
137
|
+
options?: never;
|
|
138
|
+
head?: never;
|
|
139
|
+
patch?: never;
|
|
140
|
+
trace?: never;
|
|
141
|
+
};
|
|
142
|
+
"/auth/session": {
|
|
143
|
+
parameters: {
|
|
144
|
+
query?: never;
|
|
145
|
+
header?: never;
|
|
146
|
+
path?: never;
|
|
147
|
+
cookie?: never;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Get current session
|
|
151
|
+
* @description Returns the currently authenticated user's session data. Requires either a valid Bearer token or an active session cookie.
|
|
152
|
+
*/
|
|
153
|
+
get: operations["getSession"];
|
|
154
|
+
put?: never;
|
|
155
|
+
post?: never;
|
|
156
|
+
delete?: never;
|
|
157
|
+
options?: never;
|
|
158
|
+
head?: never;
|
|
159
|
+
patch?: never;
|
|
160
|
+
trace?: never;
|
|
161
|
+
};
|
|
162
|
+
"/email/verify": {
|
|
163
|
+
parameters: {
|
|
164
|
+
query?: never;
|
|
165
|
+
header?: never;
|
|
166
|
+
path?: never;
|
|
167
|
+
cookie?: never;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Verify user email
|
|
171
|
+
* @description Validates the email verification token and activates the user account. On success, redirects the user to the confirmation page.
|
|
172
|
+
*/
|
|
173
|
+
get: operations["verify_email"];
|
|
174
|
+
put?: never;
|
|
175
|
+
post?: never;
|
|
176
|
+
delete?: never;
|
|
177
|
+
options?: never;
|
|
178
|
+
head?: never;
|
|
179
|
+
patch?: never;
|
|
180
|
+
trace?: never;
|
|
181
|
+
};
|
|
182
|
+
"/permission": {
|
|
183
|
+
parameters: {
|
|
184
|
+
query?: never;
|
|
185
|
+
header?: never;
|
|
186
|
+
path?: never;
|
|
187
|
+
cookie?: never;
|
|
188
|
+
};
|
|
189
|
+
get?: never;
|
|
190
|
+
put?: never;
|
|
191
|
+
/**
|
|
192
|
+
* Create or update a permission
|
|
193
|
+
* @description Upserts a permission by action and resource. If it already exists it is updated, otherwise created. Requires admin privileges.
|
|
194
|
+
*/
|
|
195
|
+
post: operations["createPermission"];
|
|
196
|
+
delete?: never;
|
|
197
|
+
options?: never;
|
|
198
|
+
head?: never;
|
|
199
|
+
patch?: never;
|
|
200
|
+
trace?: never;
|
|
201
|
+
};
|
|
202
|
+
"/role": {
|
|
203
|
+
parameters: {
|
|
204
|
+
query?: never;
|
|
205
|
+
header?: never;
|
|
206
|
+
path?: never;
|
|
207
|
+
cookie?: never;
|
|
208
|
+
};
|
|
209
|
+
get?: never;
|
|
210
|
+
put?: never;
|
|
211
|
+
/**
|
|
212
|
+
* Create or update a role
|
|
213
|
+
* @description Upserts a role by name. If it already exists it is updated, otherwise created. Requires admin privileges.
|
|
214
|
+
*/
|
|
215
|
+
post: operations["createRole"];
|
|
216
|
+
delete?: never;
|
|
217
|
+
options?: never;
|
|
218
|
+
head?: never;
|
|
219
|
+
patch?: never;
|
|
220
|
+
trace?: never;
|
|
221
|
+
};
|
|
222
|
+
"/role/{id}/permission": {
|
|
223
|
+
parameters: {
|
|
224
|
+
query?: never;
|
|
225
|
+
header?: never;
|
|
226
|
+
path?: never;
|
|
227
|
+
cookie?: never;
|
|
228
|
+
};
|
|
229
|
+
get?: never;
|
|
230
|
+
put?: never;
|
|
231
|
+
/**
|
|
232
|
+
* Assign a permission to a role
|
|
233
|
+
* @description Assigns an existing permission to the specified role. Requires admin privileges.
|
|
234
|
+
*/
|
|
235
|
+
post: operations["assignPermissionToRole"];
|
|
236
|
+
delete?: never;
|
|
237
|
+
options?: never;
|
|
238
|
+
head?: never;
|
|
239
|
+
patch?: never;
|
|
240
|
+
trace?: never;
|
|
241
|
+
};
|
|
242
|
+
"/user": {
|
|
243
|
+
parameters: {
|
|
244
|
+
query?: never;
|
|
245
|
+
header?: never;
|
|
246
|
+
path?: never;
|
|
247
|
+
cookie?: never;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Get current User
|
|
251
|
+
* @description Returns the currently authenticated user's profile. Requires either a valid Bearer token or an active session cookie.
|
|
252
|
+
*/
|
|
253
|
+
get: operations["find_user"];
|
|
254
|
+
put?: never;
|
|
255
|
+
post?: never;
|
|
256
|
+
delete?: never;
|
|
257
|
+
options?: never;
|
|
258
|
+
head?: never;
|
|
259
|
+
patch?: never;
|
|
260
|
+
trace?: never;
|
|
261
|
+
};
|
|
262
|
+
"/user/role": {
|
|
263
|
+
parameters: {
|
|
264
|
+
query?: never;
|
|
265
|
+
header?: never;
|
|
266
|
+
path?: never;
|
|
267
|
+
cookie?: never;
|
|
268
|
+
};
|
|
269
|
+
get?: never;
|
|
270
|
+
put?: never;
|
|
271
|
+
/**
|
|
272
|
+
* Assign a role to user
|
|
273
|
+
* @description Assigns the specified role to a target user. Requires an authenticated session with sufficient privileges (admin only).
|
|
274
|
+
*/
|
|
275
|
+
post: operations["assign_role"];
|
|
276
|
+
delete?: never;
|
|
277
|
+
options?: never;
|
|
278
|
+
head?: never;
|
|
279
|
+
patch?: never;
|
|
280
|
+
trace?: never;
|
|
24
281
|
};
|
|
25
282
|
}
|
|
26
|
-
interface
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
type
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
*/
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
*/
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
*/
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Anzar Software API
|
|
584
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
585
|
-
*
|
|
586
|
-
* The version of the OpenAPI document: 0.7.15
|
|
587
|
-
* Contact: dev@anzar.io
|
|
588
|
-
*
|
|
589
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
590
|
-
* https://openapi-generator.tech
|
|
591
|
-
* Do not edit the class manually.
|
|
592
|
-
*/
|
|
593
|
-
|
|
594
|
-
interface User {
|
|
595
|
-
'_id'?: string | null;
|
|
596
|
-
'createdAt': string;
|
|
597
|
-
'email': string;
|
|
598
|
-
'role': Role;
|
|
599
|
-
'username': string;
|
|
600
|
-
'verified': boolean;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* Anzar Software API
|
|
605
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
606
|
-
*
|
|
607
|
-
* The version of the OpenAPI document: 0.7.15
|
|
608
|
-
* Contact: dev@anzar.io
|
|
609
|
-
*
|
|
610
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
611
|
-
* https://openapi-generator.tech
|
|
612
|
-
* Do not edit the class manually.
|
|
613
|
-
*/
|
|
614
|
-
|
|
615
|
-
interface AuthResponse {
|
|
616
|
-
'tokens'?: SessionTokens | null;
|
|
617
|
-
'user': User;
|
|
618
|
-
'verification'?: ExpiringLink | null;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* Anzar Software API
|
|
623
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
624
|
-
*
|
|
625
|
-
* The version of the OpenAPI document: 0.7.15
|
|
626
|
-
* Contact: dev@anzar.io
|
|
627
|
-
*
|
|
628
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
629
|
-
* https://openapi-generator.tech
|
|
630
|
-
* Do not edit the class manually.
|
|
631
|
-
*/
|
|
632
|
-
interface EmailRequest {
|
|
633
|
-
'email': string;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* Anzar Software API
|
|
638
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
639
|
-
*
|
|
640
|
-
* The version of the OpenAPI document: 0.7.15
|
|
641
|
-
* Contact: dev@anzar.io
|
|
642
|
-
*
|
|
643
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
644
|
-
* https://openapi-generator.tech
|
|
645
|
-
* Do not edit the class manually.
|
|
646
|
-
*/
|
|
647
|
-
declare const ErrorCode: {
|
|
648
|
-
readonly TokenExpired: "TokenExpired";
|
|
649
|
-
readonly TokenReplay: "TokenReplay";
|
|
650
|
-
readonly TokenInvalid: "TokenInvalid";
|
|
651
|
-
readonly InvalidCredentials: "InvalidCredentials";
|
|
652
|
-
readonly AccountNotVerified: "AccountNotVerified";
|
|
653
|
-
readonly TokenInvalidSignature: "TokenInvalidSignature";
|
|
654
|
-
readonly TokenInvalidAudience: "TokenInvalidAudience";
|
|
655
|
-
readonly TokenInvalidIssuer: "TokenInvalidIssuer";
|
|
656
|
-
readonly TokenInvalidAlgorithm: "TokenInvalidAlgorithm";
|
|
657
|
-
readonly TokenMalformed: "TokenMalformed";
|
|
658
|
-
readonly InsufficientPermissions: "InsufficientPermissions";
|
|
659
|
-
readonly AccountSuspended: "AccountSuspended";
|
|
660
|
-
readonly UserNotFound: "UserNotFound";
|
|
661
|
-
readonly TokenNotFound: "TokenNotFound";
|
|
662
|
-
readonly AlreadyExists: "AlreadyExists";
|
|
663
|
-
readonly ValidationFailed: "ValidationFailed";
|
|
664
|
-
readonly MalformedField: "MalformedField";
|
|
665
|
-
readonly MissingField: "MissingField";
|
|
666
|
-
readonly UnsupportedMediaType: "UnsupportedMediaType";
|
|
667
|
-
readonly BadRequest: "BadRequest";
|
|
668
|
-
readonly RateLimitExceeded: "RateLimitExceeded";
|
|
669
|
-
readonly Internal: "Internal";
|
|
670
|
-
};
|
|
671
|
-
type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Anzar Software API
|
|
675
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
676
|
-
*
|
|
677
|
-
* The version of the OpenAPI document: 0.7.15
|
|
678
|
-
* Contact: dev@anzar.io
|
|
679
|
-
*
|
|
680
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
681
|
-
* https://openapi-generator.tech
|
|
682
|
-
* Do not edit the class manually.
|
|
683
|
-
*/
|
|
684
|
-
|
|
685
|
-
interface ErrorResponse {
|
|
686
|
-
'code': ErrorCode;
|
|
687
|
-
'message': string;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* Anzar Software API
|
|
692
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
693
|
-
*
|
|
694
|
-
* The version of the OpenAPI document: 0.7.15
|
|
695
|
-
* Contact: dev@anzar.io
|
|
696
|
-
*
|
|
697
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
698
|
-
* https://openapi-generator.tech
|
|
699
|
-
* Do not edit the class manually.
|
|
700
|
-
*/
|
|
701
|
-
interface LoginRequest {
|
|
702
|
-
'email': string;
|
|
703
|
-
'password': string;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Anzar Software API
|
|
708
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
709
|
-
*
|
|
710
|
-
* The version of the OpenAPI document: 0.7.15
|
|
711
|
-
* Contact: dev@anzar.io
|
|
712
|
-
*
|
|
713
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
714
|
-
* https://openapi-generator.tech
|
|
715
|
-
* Do not edit the class manually.
|
|
716
|
-
*/
|
|
717
|
-
interface RefreshTokenRequest {
|
|
718
|
-
'refresh_token': string;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Anzar Software API
|
|
723
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
724
|
-
*
|
|
725
|
-
* The version of the OpenAPI document: 0.7.15
|
|
726
|
-
* Contact: dev@anzar.io
|
|
727
|
-
*
|
|
728
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
729
|
-
* https://openapi-generator.tech
|
|
730
|
-
* Do not edit the class manually.
|
|
731
|
-
*/
|
|
732
|
-
interface RegisterRequest {
|
|
733
|
-
'email': string;
|
|
734
|
-
'password': string;
|
|
735
|
-
'username': string;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* Anzar Software API
|
|
740
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
741
|
-
*
|
|
742
|
-
* The version of the OpenAPI document: 0.7.15
|
|
743
|
-
* Contact: dev@anzar.io
|
|
744
|
-
*
|
|
745
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
746
|
-
* https://openapi-generator.tech
|
|
747
|
-
* Do not edit the class manually.
|
|
748
|
-
*/
|
|
749
|
-
interface ResetPasswordRequest {
|
|
750
|
-
'csrf_token': string;
|
|
751
|
-
'password': string;
|
|
752
|
-
'token': string;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* Anzar Software API
|
|
757
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
758
|
-
*
|
|
759
|
-
* The version of the OpenAPI document: 0.7.15
|
|
760
|
-
* Contact: dev@anzar.io
|
|
761
|
-
*
|
|
762
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
763
|
-
* https://openapi-generator.tech
|
|
764
|
-
* Do not edit the class manually.
|
|
765
|
-
*/
|
|
766
|
-
interface Session {
|
|
767
|
-
'_id'?: string | null;
|
|
768
|
-
'expiresAt': string;
|
|
769
|
-
'issuedAt': string;
|
|
770
|
-
'token': string;
|
|
771
|
-
'usedAt'?: string | null;
|
|
772
|
-
'userId'?: string;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* Anzar Software API
|
|
777
|
-
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
778
|
-
*
|
|
779
|
-
* The version of the OpenAPI document: 0.7.15
|
|
780
|
-
* Contact: dev@anzar.io
|
|
781
|
-
*
|
|
782
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
783
|
-
* https://openapi-generator.tech
|
|
784
|
-
* Do not edit the class manually.
|
|
785
|
-
*/
|
|
786
|
-
interface TokenQuery {
|
|
787
|
-
'token': string;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
/**
|
|
791
|
-
* AuthApi - axios parameter creator
|
|
792
|
-
*/
|
|
793
|
-
declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
794
|
-
/**
|
|
795
|
-
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
796
|
-
* @summary Get current session
|
|
797
|
-
* @param {*} [options] Override http request option.
|
|
798
|
-
* @throws {RequiredError}
|
|
799
|
-
*/
|
|
800
|
-
getSession: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
801
|
-
/**
|
|
802
|
-
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
803
|
-
* @summary User login
|
|
804
|
-
* @param {LoginRequest} loginRequest User login credentials
|
|
805
|
-
* @param {*} [options] Override http request option.
|
|
806
|
-
* @throws {RequiredError}
|
|
807
|
-
*/
|
|
808
|
-
login: (loginRequest: LoginRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
809
|
-
/**
|
|
810
|
-
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
811
|
-
* @summary Logout
|
|
812
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
813
|
-
* @param {*} [options] Override http request option.
|
|
814
|
-
* @throws {RequiredError}
|
|
815
|
-
*/
|
|
816
|
-
logout: (refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
817
|
-
/**
|
|
818
|
-
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
819
|
-
* @summary Refresh access token
|
|
820
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
821
|
-
* @param {*} [options] Override http request option.
|
|
822
|
-
* @throws {RequiredError}
|
|
823
|
-
*/
|
|
824
|
-
refreshToken: (refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
825
|
-
/**
|
|
826
|
-
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
827
|
-
* @summary Register a new user
|
|
828
|
-
* @param {RegisterRequest} registerRequest User register credentials
|
|
829
|
-
* @param {*} [options] Override http request option.
|
|
830
|
-
* @throws {RequiredError}
|
|
831
|
-
*/
|
|
832
|
-
register: (registerRequest: RegisterRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
833
|
-
/**
|
|
834
|
-
* Validates the reset token from the email link and renders the password reset form.
|
|
835
|
-
* @summary Render password reset form
|
|
836
|
-
* @param {TokenQuery} token Password reset token
|
|
837
|
-
* @param {*} [options] Override http request option.
|
|
838
|
-
* @throws {RequiredError}
|
|
839
|
-
*/
|
|
840
|
-
renderResetForm: (token: TokenQuery, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
841
|
-
/**
|
|
842
|
-
* Sends a password reset link to the provided email address if an account exists.
|
|
843
|
-
* @summary Request a password reset
|
|
844
|
-
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
845
|
-
* @param {*} [options] Override http request option.
|
|
846
|
-
* @throws {RequiredError}
|
|
847
|
-
*/
|
|
848
|
-
requestPasswordReset: (emailRequest: EmailRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
849
|
-
/**
|
|
850
|
-
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
851
|
-
* @summary Submit new password
|
|
852
|
-
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
853
|
-
* @param {*} [options] Override http request option.
|
|
854
|
-
* @throws {RequiredError}
|
|
855
|
-
*/
|
|
856
|
-
submitNewPassword: (resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
857
|
-
};
|
|
858
|
-
/**
|
|
859
|
-
* AuthApi - functional programming interface
|
|
860
|
-
*/
|
|
861
|
-
declare const AuthApiFp: (configuration?: Configuration) => {
|
|
862
|
-
/**
|
|
863
|
-
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
864
|
-
* @summary Get current session
|
|
865
|
-
* @param {*} [options] Override http request option.
|
|
866
|
-
* @throws {RequiredError}
|
|
867
|
-
*/
|
|
868
|
-
getSession(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>>;
|
|
869
|
-
/**
|
|
870
|
-
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
871
|
-
* @summary User login
|
|
872
|
-
* @param {LoginRequest} loginRequest User login credentials
|
|
873
|
-
* @param {*} [options] Override http request option.
|
|
874
|
-
* @throws {RequiredError}
|
|
875
|
-
*/
|
|
876
|
-
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponse>>;
|
|
877
|
-
/**
|
|
878
|
-
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
879
|
-
* @summary Logout
|
|
880
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
881
|
-
* @param {*} [options] Override http request option.
|
|
882
|
-
* @throws {RequiredError}
|
|
883
|
-
*/
|
|
884
|
-
logout(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
885
|
-
/**
|
|
886
|
-
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
887
|
-
* @summary Refresh access token
|
|
888
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
889
|
-
* @param {*} [options] Override http request option.
|
|
890
|
-
* @throws {RequiredError}
|
|
891
|
-
*/
|
|
892
|
-
refreshToken(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponse>>;
|
|
893
|
-
/**
|
|
894
|
-
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
895
|
-
* @summary Register a new user
|
|
896
|
-
* @param {RegisterRequest} registerRequest User register credentials
|
|
897
|
-
* @param {*} [options] Override http request option.
|
|
898
|
-
* @throws {RequiredError}
|
|
899
|
-
*/
|
|
900
|
-
register(registerRequest: RegisterRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponse>>;
|
|
901
|
-
/**
|
|
902
|
-
* Validates the reset token from the email link and renders the password reset form.
|
|
903
|
-
* @summary Render password reset form
|
|
904
|
-
* @param {TokenQuery} token Password reset token
|
|
905
|
-
* @param {*} [options] Override http request option.
|
|
906
|
-
* @throws {RequiredError}
|
|
907
|
-
*/
|
|
908
|
-
renderResetForm(token: TokenQuery, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
|
|
909
|
-
/**
|
|
910
|
-
* Sends a password reset link to the provided email address if an account exists.
|
|
911
|
-
* @summary Request a password reset
|
|
912
|
-
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
913
|
-
* @param {*} [options] Override http request option.
|
|
914
|
-
* @throws {RequiredError}
|
|
915
|
-
*/
|
|
916
|
-
requestPasswordReset(emailRequest: EmailRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExpiringLink>>;
|
|
917
|
-
/**
|
|
918
|
-
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
919
|
-
* @summary Submit new password
|
|
920
|
-
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
921
|
-
* @param {*} [options] Override http request option.
|
|
922
|
-
* @throws {RequiredError}
|
|
923
|
-
*/
|
|
924
|
-
submitNewPassword(resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
925
|
-
};
|
|
926
|
-
/**
|
|
927
|
-
* AuthApi - factory interface
|
|
928
|
-
*/
|
|
929
|
-
declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
930
|
-
/**
|
|
931
|
-
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
932
|
-
* @summary Get current session
|
|
933
|
-
* @param {*} [options] Override http request option.
|
|
934
|
-
* @throws {RequiredError}
|
|
935
|
-
*/
|
|
936
|
-
getSession(options?: RawAxiosRequestConfig): AxiosPromise<Session>;
|
|
937
|
-
/**
|
|
938
|
-
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
939
|
-
* @summary User login
|
|
940
|
-
* @param {LoginRequest} loginRequest User login credentials
|
|
941
|
-
* @param {*} [options] Override http request option.
|
|
942
|
-
* @throws {RequiredError}
|
|
943
|
-
*/
|
|
944
|
-
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponse>;
|
|
945
|
-
/**
|
|
946
|
-
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
947
|
-
* @summary Logout
|
|
948
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
949
|
-
* @param {*} [options] Override http request option.
|
|
950
|
-
* @throws {RequiredError}
|
|
951
|
-
*/
|
|
952
|
-
logout(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
953
|
-
/**
|
|
954
|
-
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
955
|
-
* @summary Refresh access token
|
|
956
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
957
|
-
* @param {*} [options] Override http request option.
|
|
958
|
-
* @throws {RequiredError}
|
|
959
|
-
*/
|
|
960
|
-
refreshToken(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponse>;
|
|
961
|
-
/**
|
|
962
|
-
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
963
|
-
* @summary Register a new user
|
|
964
|
-
* @param {RegisterRequest} registerRequest User register credentials
|
|
965
|
-
* @param {*} [options] Override http request option.
|
|
966
|
-
* @throws {RequiredError}
|
|
967
|
-
*/
|
|
968
|
-
register(registerRequest: RegisterRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponse>;
|
|
969
|
-
/**
|
|
970
|
-
* Validates the reset token from the email link and renders the password reset form.
|
|
971
|
-
* @summary Render password reset form
|
|
972
|
-
* @param {TokenQuery} token Password reset token
|
|
973
|
-
* @param {*} [options] Override http request option.
|
|
974
|
-
* @throws {RequiredError}
|
|
975
|
-
*/
|
|
976
|
-
renderResetForm(token: TokenQuery, options?: RawAxiosRequestConfig): AxiosPromise<string>;
|
|
977
|
-
/**
|
|
978
|
-
* Sends a password reset link to the provided email address if an account exists.
|
|
979
|
-
* @summary Request a password reset
|
|
980
|
-
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
981
|
-
* @param {*} [options] Override http request option.
|
|
982
|
-
* @throws {RequiredError}
|
|
983
|
-
*/
|
|
984
|
-
requestPasswordReset(emailRequest: EmailRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExpiringLink>;
|
|
985
|
-
/**
|
|
986
|
-
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
987
|
-
* @summary Submit new password
|
|
988
|
-
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
989
|
-
* @param {*} [options] Override http request option.
|
|
990
|
-
* @throws {RequiredError}
|
|
991
|
-
*/
|
|
992
|
-
submitNewPassword(resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
993
|
-
};
|
|
994
|
-
/**
|
|
995
|
-
* AuthApi - object-oriented interface
|
|
996
|
-
*/
|
|
997
|
-
declare class AuthApi extends BaseAPI {
|
|
998
|
-
/**
|
|
999
|
-
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
1000
|
-
* @summary Get current session
|
|
1001
|
-
* @param {*} [options] Override http request option.
|
|
1002
|
-
* @throws {RequiredError}
|
|
1003
|
-
*/
|
|
1004
|
-
getSession(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Session, any, {}>>;
|
|
1005
|
-
/**
|
|
1006
|
-
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
1007
|
-
* @summary User login
|
|
1008
|
-
* @param {LoginRequest} loginRequest User login credentials
|
|
1009
|
-
* @param {*} [options] Override http request option.
|
|
1010
|
-
* @throws {RequiredError}
|
|
1011
|
-
*/
|
|
1012
|
-
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AuthResponse, any, {}>>;
|
|
1013
|
-
/**
|
|
1014
|
-
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
1015
|
-
* @summary Logout
|
|
1016
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1017
|
-
* @param {*} [options] Override http request option.
|
|
1018
|
-
* @throws {RequiredError}
|
|
1019
|
-
*/
|
|
1020
|
-
logout(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
1021
|
-
/**
|
|
1022
|
-
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
1023
|
-
* @summary Refresh access token
|
|
1024
|
-
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1025
|
-
* @param {*} [options] Override http request option.
|
|
1026
|
-
* @throws {RequiredError}
|
|
1027
|
-
*/
|
|
1028
|
-
refreshToken(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AuthResponse, any, {}>>;
|
|
1029
|
-
/**
|
|
1030
|
-
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
1031
|
-
* @summary Register a new user
|
|
1032
|
-
* @param {RegisterRequest} registerRequest User register credentials
|
|
1033
|
-
* @param {*} [options] Override http request option.
|
|
1034
|
-
* @throws {RequiredError}
|
|
1035
|
-
*/
|
|
1036
|
-
register(registerRequest: RegisterRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AuthResponse, any, {}>>;
|
|
1037
|
-
/**
|
|
1038
|
-
* Validates the reset token from the email link and renders the password reset form.
|
|
1039
|
-
* @summary Render password reset form
|
|
1040
|
-
* @param {TokenQuery} token Password reset token
|
|
1041
|
-
* @param {*} [options] Override http request option.
|
|
1042
|
-
* @throws {RequiredError}
|
|
1043
|
-
*/
|
|
1044
|
-
renderResetForm(token: TokenQuery, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<string, any, {}>>;
|
|
1045
|
-
/**
|
|
1046
|
-
* Sends a password reset link to the provided email address if an account exists.
|
|
1047
|
-
* @summary Request a password reset
|
|
1048
|
-
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
1049
|
-
* @param {*} [options] Override http request option.
|
|
1050
|
-
* @throws {RequiredError}
|
|
1051
|
-
*/
|
|
1052
|
-
requestPasswordReset(emailRequest: EmailRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ExpiringLink, any, {}>>;
|
|
1053
|
-
/**
|
|
1054
|
-
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
1055
|
-
* @summary Submit new password
|
|
1056
|
-
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
1057
|
-
* @param {*} [options] Override http request option.
|
|
1058
|
-
* @throws {RequiredError}
|
|
1059
|
-
*/
|
|
1060
|
-
submitNewPassword(resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
283
|
+
interface components {
|
|
284
|
+
schemas: {
|
|
285
|
+
/** @enum {string} */
|
|
286
|
+
AlgorithmConfig: "HS256" | "HS384" | "HS512" | "ES256" | "ES384" | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512" | "EdDSA";
|
|
287
|
+
AnzarConfiguration: {
|
|
288
|
+
app: components["schemas"]["App"];
|
|
289
|
+
auth?: components["schemas"]["Authentication"];
|
|
290
|
+
database: components["schemas"]["Database"];
|
|
291
|
+
security: components["schemas"]["Security"];
|
|
292
|
+
server?: components["schemas"]["Server"];
|
|
293
|
+
};
|
|
294
|
+
App: {
|
|
295
|
+
environment: string;
|
|
296
|
+
url: string;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* @example {
|
|
300
|
+
* "user": {
|
|
301
|
+
* "username": "",
|
|
302
|
+
* "email": "",
|
|
303
|
+
* "createdAt": "1970-01-01T00:00:00Z"
|
|
304
|
+
* },
|
|
305
|
+
* "tokens": {
|
|
306
|
+
* "access": "",
|
|
307
|
+
* "expires_in": 0,
|
|
308
|
+
* "token_type": "",
|
|
309
|
+
* "refresh": ""
|
|
310
|
+
* },
|
|
311
|
+
* "verification": {
|
|
312
|
+
* "link": "",
|
|
313
|
+
* "expires_at": "1970-01-01T00:00:00Z"
|
|
314
|
+
* }
|
|
315
|
+
* }
|
|
316
|
+
*/
|
|
317
|
+
AuthResponse: {
|
|
318
|
+
tokens?: null | components["schemas"]["SessionTokens"];
|
|
319
|
+
user: components["schemas"]["User"];
|
|
320
|
+
verification?: null | components["schemas"]["ExpiringLink"];
|
|
321
|
+
};
|
|
322
|
+
AuthStrategy: (components["schemas"]["SessionConfig"] & {
|
|
323
|
+
/** @enum {string} */
|
|
324
|
+
type: "Session";
|
|
325
|
+
}) | (components["schemas"]["JwtConfig"] & {
|
|
326
|
+
/** @enum {string} */
|
|
327
|
+
type: "Jwt";
|
|
328
|
+
});
|
|
329
|
+
Authentication: {
|
|
330
|
+
/**
|
|
331
|
+
* @default {
|
|
332
|
+
* "verification": {
|
|
333
|
+
* "required": false,
|
|
334
|
+
* "token_expires_in": 1800,
|
|
335
|
+
* "success_redirect": null,
|
|
336
|
+
* "error_redirect": null
|
|
337
|
+
* }
|
|
338
|
+
* }
|
|
339
|
+
*/
|
|
340
|
+
email: components["schemas"]["EmailConfig"];
|
|
341
|
+
/**
|
|
342
|
+
* @default {
|
|
343
|
+
* "algorithm": {
|
|
344
|
+
* "type": "Argon2",
|
|
345
|
+
* "memory_kib": 19456,
|
|
346
|
+
* "iterations": 2,
|
|
347
|
+
* "parallelism": 1
|
|
348
|
+
* },
|
|
349
|
+
* "requirements": {
|
|
350
|
+
* "min_length": 8,
|
|
351
|
+
* "max_length": 128,
|
|
352
|
+
* "require_uppercase": false,
|
|
353
|
+
* "require_number": false,
|
|
354
|
+
* "require_special_char": false
|
|
355
|
+
* },
|
|
356
|
+
* "reset": {
|
|
357
|
+
* "token_expires_in": 1800,
|
|
358
|
+
* "success_redirect": null,
|
|
359
|
+
* "error_redirect": null
|
|
360
|
+
* },
|
|
361
|
+
* "security": {
|
|
362
|
+
* "max_failed_attempts": 5,
|
|
363
|
+
* "lockout_duration": 1800
|
|
364
|
+
* }
|
|
365
|
+
* }
|
|
366
|
+
*/
|
|
367
|
+
password: components["schemas"]["PasswordConfig"];
|
|
368
|
+
/**
|
|
369
|
+
* @default {
|
|
370
|
+
* "enabled": false,
|
|
371
|
+
* "default_role": "User",
|
|
372
|
+
* "roles": [
|
|
373
|
+
* {
|
|
374
|
+
* "name": "User",
|
|
375
|
+
* "permissions": [
|
|
376
|
+
* "*:read"
|
|
377
|
+
* ]
|
|
378
|
+
* }
|
|
379
|
+
* ]
|
|
380
|
+
* }
|
|
381
|
+
*/
|
|
382
|
+
rbac: components["schemas"]["RbacConfig"];
|
|
383
|
+
/**
|
|
384
|
+
* @default {
|
|
385
|
+
* "type": "Session",
|
|
386
|
+
* "name": "id",
|
|
387
|
+
* "max_age": 3600,
|
|
388
|
+
* "secure": true,
|
|
389
|
+
* "http_only": true,
|
|
390
|
+
* "same_site": "Strict"
|
|
391
|
+
* }
|
|
392
|
+
*/
|
|
393
|
+
strategy: components["schemas"]["AuthStrategy"];
|
|
394
|
+
};
|
|
395
|
+
Cache: {
|
|
396
|
+
driver: components["schemas"]["CacheDriver"];
|
|
397
|
+
url: string;
|
|
398
|
+
};
|
|
399
|
+
/** @enum {string} */
|
|
400
|
+
CacheDriver: "MemCached" | "Redis" | "InMemory";
|
|
401
|
+
CorsConfig: {
|
|
402
|
+
/** @default true */
|
|
403
|
+
allow_credentials: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* @default [
|
|
406
|
+
* "authorization",
|
|
407
|
+
* "content-type",
|
|
408
|
+
* "accept",
|
|
409
|
+
* "accept-language",
|
|
410
|
+
* "Content-Language"
|
|
411
|
+
* ]
|
|
412
|
+
*/
|
|
413
|
+
allowed_headers: string[];
|
|
414
|
+
/**
|
|
415
|
+
* @default [
|
|
416
|
+
* "GET",
|
|
417
|
+
* "POST",
|
|
418
|
+
* "PUT",
|
|
419
|
+
* "DELETE",
|
|
420
|
+
* "OPTIONS"
|
|
421
|
+
* ]
|
|
422
|
+
*/
|
|
423
|
+
allowed_methods: string[];
|
|
424
|
+
/**
|
|
425
|
+
* @default [
|
|
426
|
+
* "localhost:3000"
|
|
427
|
+
* ]
|
|
428
|
+
*/
|
|
429
|
+
allowed_origins: string[];
|
|
430
|
+
/** @default true */
|
|
431
|
+
enabled: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Format: int64
|
|
434
|
+
* @default 3600
|
|
435
|
+
*/
|
|
436
|
+
max_age: number;
|
|
437
|
+
};
|
|
438
|
+
Database: {
|
|
439
|
+
cache: components["schemas"]["Cache"];
|
|
440
|
+
connection_string: string;
|
|
441
|
+
driver: components["schemas"]["DatabaseDriver"];
|
|
442
|
+
};
|
|
443
|
+
/** @enum {string} */
|
|
444
|
+
DatabaseDriver: "SQLite" | "PostgreSQL" | "MongoDB";
|
|
445
|
+
EmailConfig: {
|
|
446
|
+
/**
|
|
447
|
+
* @default {
|
|
448
|
+
* "required": false,
|
|
449
|
+
* "token_expires_in": 1800,
|
|
450
|
+
* "success_redirect": null,
|
|
451
|
+
* "error_redirect": null
|
|
452
|
+
* }
|
|
453
|
+
*/
|
|
454
|
+
verification: components["schemas"]["EmailVerification"];
|
|
455
|
+
};
|
|
456
|
+
/**
|
|
457
|
+
* @example {
|
|
458
|
+
* "email": "example@email.com"
|
|
459
|
+
* }
|
|
460
|
+
*/
|
|
461
|
+
EmailRequest: {
|
|
462
|
+
email: string;
|
|
463
|
+
};
|
|
464
|
+
EmailVerification: {
|
|
465
|
+
/** @default null */
|
|
466
|
+
error_redirect: string | null;
|
|
467
|
+
/** @default false */
|
|
468
|
+
required: boolean;
|
|
469
|
+
/** @default null */
|
|
470
|
+
success_redirect: string | null;
|
|
471
|
+
/**
|
|
472
|
+
* Format: int64
|
|
473
|
+
* @default 1800
|
|
474
|
+
*/
|
|
475
|
+
token_expires_in: number;
|
|
476
|
+
};
|
|
477
|
+
/** @enum {string} */
|
|
478
|
+
ErrorCode: "TokenExpired" | "TokenReplay" | "TokenInvalid" | "InvalidCredentials" | "AccountNotVerified" | "TokenInvalidSignature" | "TokenInvalidAudience" | "TokenInvalidIssuer" | "TokenInvalidAlgorithm" | "TokenMalformed" | "InsufficientPermissions" | "AccountSuspended" | "RoleNotFound" | "UserNotFound" | "TokenNotFound" | "AlreadyExists" | "ValidationFailed" | "MalformedField" | "MissingField" | "UnsupportedMediaType" | "BadRequest" | "RateLimitExceeded" | "Internal";
|
|
479
|
+
/**
|
|
480
|
+
* @example {
|
|
481
|
+
* "message": "An Error occured"
|
|
482
|
+
* }
|
|
483
|
+
*/
|
|
484
|
+
ErrorResponse: {
|
|
485
|
+
code: components["schemas"]["ErrorCode"];
|
|
486
|
+
message: string;
|
|
487
|
+
};
|
|
488
|
+
/**
|
|
489
|
+
* @example {
|
|
490
|
+
* "link": "",
|
|
491
|
+
* "expires_at": "2026-02-19T22:42:23.467Z"
|
|
492
|
+
* }
|
|
493
|
+
*/
|
|
494
|
+
ExpiringLink: {
|
|
495
|
+
/** Format: date-time */
|
|
496
|
+
expires_at: string;
|
|
497
|
+
link: string;
|
|
498
|
+
};
|
|
499
|
+
HashingAlgorithm: {
|
|
500
|
+
/** Format: int32 */
|
|
501
|
+
iterations: number;
|
|
502
|
+
/** Format: int32 */
|
|
503
|
+
memory_kib: number;
|
|
504
|
+
/** Format: int32 */
|
|
505
|
+
parallelism: number;
|
|
506
|
+
/** @enum {string} */
|
|
507
|
+
type: "Argon2";
|
|
508
|
+
} | {
|
|
509
|
+
/** Format: int32 */
|
|
510
|
+
cost: number;
|
|
511
|
+
/** @enum {string} */
|
|
512
|
+
type: "Bcrypt";
|
|
513
|
+
};
|
|
514
|
+
HttpsConfig: {
|
|
515
|
+
/** @default null */
|
|
516
|
+
cert_path: string | null;
|
|
517
|
+
/** @default false */
|
|
518
|
+
enabled: boolean;
|
|
519
|
+
/** @default null */
|
|
520
|
+
key_path: string | null;
|
|
521
|
+
/**
|
|
522
|
+
* Format: int32
|
|
523
|
+
* @default 3000
|
|
524
|
+
*/
|
|
525
|
+
port: number;
|
|
526
|
+
};
|
|
527
|
+
JwtConfig: {
|
|
528
|
+
/**
|
|
529
|
+
* Format: int64
|
|
530
|
+
* @default 900
|
|
531
|
+
*/
|
|
532
|
+
access_token_expires_in: number;
|
|
533
|
+
/** @default HS256 */
|
|
534
|
+
algorithm: components["schemas"]["AlgorithmConfig"];
|
|
535
|
+
/** @default */
|
|
536
|
+
audience: string;
|
|
537
|
+
/** @default */
|
|
538
|
+
issuer: string;
|
|
539
|
+
/**
|
|
540
|
+
* Format: int64
|
|
541
|
+
* @default 604800
|
|
542
|
+
*/
|
|
543
|
+
refresh_token_expires_in: number;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* @example {
|
|
547
|
+
* "email": "example@email.com",
|
|
548
|
+
* "password": "password"
|
|
549
|
+
* }
|
|
550
|
+
*/
|
|
551
|
+
LoginRequest: {
|
|
552
|
+
email: string;
|
|
553
|
+
password: string;
|
|
554
|
+
};
|
|
555
|
+
PasswordConfig: {
|
|
556
|
+
/**
|
|
557
|
+
* @default {
|
|
558
|
+
* "type": "Argon2",
|
|
559
|
+
* "memory_kib": 19456,
|
|
560
|
+
* "iterations": 2,
|
|
561
|
+
* "parallelism": 1
|
|
562
|
+
* }
|
|
563
|
+
*/
|
|
564
|
+
algorithm: components["schemas"]["HashingAlgorithm"];
|
|
565
|
+
/**
|
|
566
|
+
* @default {
|
|
567
|
+
* "min_length": 8,
|
|
568
|
+
* "max_length": 128,
|
|
569
|
+
* "require_uppercase": false,
|
|
570
|
+
* "require_number": false,
|
|
571
|
+
* "require_special_char": false
|
|
572
|
+
* }
|
|
573
|
+
*/
|
|
574
|
+
requirements: components["schemas"]["PasswordRequirements"];
|
|
575
|
+
/**
|
|
576
|
+
* @default {
|
|
577
|
+
* "token_expires_in": 1800,
|
|
578
|
+
* "success_redirect": null,
|
|
579
|
+
* "error_redirect": null
|
|
580
|
+
* }
|
|
581
|
+
*/
|
|
582
|
+
reset: components["schemas"]["PasswordReset"];
|
|
583
|
+
/**
|
|
584
|
+
* @default {
|
|
585
|
+
* "max_failed_attempts": 5,
|
|
586
|
+
* "lockout_duration": 1800
|
|
587
|
+
* }
|
|
588
|
+
*/
|
|
589
|
+
security: components["schemas"]["PasswordSecurity"];
|
|
590
|
+
};
|
|
591
|
+
PasswordRequirements: {
|
|
592
|
+
/**
|
|
593
|
+
* Format: int32
|
|
594
|
+
* @default 128
|
|
595
|
+
*/
|
|
596
|
+
max_length: number;
|
|
597
|
+
/**
|
|
598
|
+
* Format: int32
|
|
599
|
+
* @default 8
|
|
600
|
+
*/
|
|
601
|
+
min_length: number;
|
|
602
|
+
/** @default false */
|
|
603
|
+
require_number: boolean;
|
|
604
|
+
/** @default false */
|
|
605
|
+
require_special_char: boolean;
|
|
606
|
+
/** @default false */
|
|
607
|
+
require_uppercase: boolean;
|
|
608
|
+
};
|
|
609
|
+
PasswordReset: {
|
|
610
|
+
/** @default null */
|
|
611
|
+
error_redirect: string | null;
|
|
612
|
+
/** @default null */
|
|
613
|
+
success_redirect: string | null;
|
|
614
|
+
/**
|
|
615
|
+
* Format: int64
|
|
616
|
+
* @default 1800
|
|
617
|
+
*/
|
|
618
|
+
token_expires_in: number;
|
|
619
|
+
};
|
|
620
|
+
PasswordSecurity: {
|
|
621
|
+
/**
|
|
622
|
+
* Format: int64
|
|
623
|
+
* @default 1800
|
|
624
|
+
*/
|
|
625
|
+
lockout_duration: number;
|
|
626
|
+
/**
|
|
627
|
+
* Format: int32
|
|
628
|
+
* @default 5
|
|
629
|
+
*/
|
|
630
|
+
max_failed_attempts: number;
|
|
631
|
+
};
|
|
632
|
+
PermissionId: {
|
|
633
|
+
permission_id: string;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* @example {
|
|
637
|
+
* "action": "read",
|
|
638
|
+
* "resource": "user"
|
|
639
|
+
* }
|
|
640
|
+
*/
|
|
641
|
+
PermissionName: {
|
|
642
|
+
action: string;
|
|
643
|
+
resource: string;
|
|
644
|
+
};
|
|
645
|
+
RbacConfig: {
|
|
646
|
+
/** @default User */
|
|
647
|
+
default_role: string;
|
|
648
|
+
/** @default false */
|
|
649
|
+
enabled: boolean;
|
|
650
|
+
/**
|
|
651
|
+
* @default [
|
|
652
|
+
* {
|
|
653
|
+
* "name": "User",
|
|
654
|
+
* "permissions": [
|
|
655
|
+
* "*:read"
|
|
656
|
+
* ]
|
|
657
|
+
* }
|
|
658
|
+
* ]
|
|
659
|
+
*/
|
|
660
|
+
roles: components["schemas"]["RoleConfig"][];
|
|
661
|
+
};
|
|
662
|
+
/**
|
|
663
|
+
* @example {
|
|
664
|
+
* "refresh_token": "edc365fa5e13751XXXXXXX"
|
|
665
|
+
* }
|
|
666
|
+
*/
|
|
667
|
+
RefreshTokenRequest: {
|
|
668
|
+
/** Format: password */
|
|
669
|
+
refresh_token: string;
|
|
670
|
+
};
|
|
671
|
+
/**
|
|
672
|
+
* @example {
|
|
673
|
+
* "username": "name",
|
|
674
|
+
* "email": "example@email.com",
|
|
675
|
+
* "password": "password"
|
|
676
|
+
* }
|
|
677
|
+
*/
|
|
678
|
+
RegisterRequest: {
|
|
679
|
+
email: string;
|
|
680
|
+
password: string;
|
|
681
|
+
username: string;
|
|
682
|
+
};
|
|
683
|
+
/**
|
|
684
|
+
* @example {
|
|
685
|
+
* "token": "",
|
|
686
|
+
* "csrf_token": "",
|
|
687
|
+
* "password": ""
|
|
688
|
+
* }
|
|
689
|
+
*/
|
|
690
|
+
ResetPasswordRequest: {
|
|
691
|
+
/** Format: password */
|
|
692
|
+
csrf_token: string;
|
|
693
|
+
password: string;
|
|
694
|
+
/** Format: password */
|
|
695
|
+
token: string;
|
|
696
|
+
};
|
|
697
|
+
RoleConfig: {
|
|
698
|
+
name: string;
|
|
699
|
+
permissions: string[];
|
|
700
|
+
};
|
|
701
|
+
RoleName: {
|
|
702
|
+
name: string;
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* @example {
|
|
706
|
+
* "role": "admin"
|
|
707
|
+
* }
|
|
708
|
+
*/
|
|
709
|
+
RoleRequest: {
|
|
710
|
+
role: string;
|
|
711
|
+
};
|
|
712
|
+
/** @enum {string} */
|
|
713
|
+
SameSiteConfig: "Strict" | "Lax" | "None";
|
|
714
|
+
Security: {
|
|
715
|
+
headers?: [
|
|
716
|
+
string,
|
|
717
|
+
string
|
|
718
|
+
][];
|
|
719
|
+
};
|
|
720
|
+
Server: {
|
|
721
|
+
/**
|
|
722
|
+
* @default {
|
|
723
|
+
* "enabled": true,
|
|
724
|
+
* "allowed_origins": [
|
|
725
|
+
* "localhost:3000"
|
|
726
|
+
* ],
|
|
727
|
+
* "allowed_methods": [
|
|
728
|
+
* "GET",
|
|
729
|
+
* "POST",
|
|
730
|
+
* "PUT",
|
|
731
|
+
* "DELETE",
|
|
732
|
+
* "OPTIONS"
|
|
733
|
+
* ],
|
|
734
|
+
* "allowed_headers": [
|
|
735
|
+
* "authorization",
|
|
736
|
+
* "content-type",
|
|
737
|
+
* "accept",
|
|
738
|
+
* "accept-language",
|
|
739
|
+
* "Content-Language"
|
|
740
|
+
* ],
|
|
741
|
+
* "allow_credentials": true,
|
|
742
|
+
* "max_age": 3600
|
|
743
|
+
* }
|
|
744
|
+
*/
|
|
745
|
+
cors: components["schemas"]["CorsConfig"];
|
|
746
|
+
/**
|
|
747
|
+
* @default {
|
|
748
|
+
* "enabled": false,
|
|
749
|
+
* "port": 3000,
|
|
750
|
+
* "cert_path": null,
|
|
751
|
+
* "key_path": null
|
|
752
|
+
* }
|
|
753
|
+
*/
|
|
754
|
+
https: components["schemas"]["HttpsConfig"];
|
|
755
|
+
};
|
|
756
|
+
/**
|
|
757
|
+
* @example {
|
|
758
|
+
* "id": "",
|
|
759
|
+
* "user_id": "",
|
|
760
|
+
* "issued_at": "2026-02-19T22:42:23.467Z",
|
|
761
|
+
* "expires_at": "2026-02-19T22:42:23.467Z",
|
|
762
|
+
* "used_at": "2026-02-19T22:42:23.467Z",
|
|
763
|
+
* "token": ""
|
|
764
|
+
* }
|
|
765
|
+
*/
|
|
766
|
+
Session: {
|
|
767
|
+
_id?: string | null;
|
|
768
|
+
/** Format: date-time */
|
|
769
|
+
expiresAt: string;
|
|
770
|
+
/** Format: date-time */
|
|
771
|
+
issuedAt: string;
|
|
772
|
+
token: string;
|
|
773
|
+
/** Format: date-time */
|
|
774
|
+
usedAt?: string | null;
|
|
775
|
+
userId?: string;
|
|
776
|
+
};
|
|
777
|
+
SessionConfig: {
|
|
778
|
+
/** @default true */
|
|
779
|
+
http_only: boolean;
|
|
780
|
+
/**
|
|
781
|
+
* Format: int64
|
|
782
|
+
* @default 3600
|
|
783
|
+
*/
|
|
784
|
+
max_age: number;
|
|
785
|
+
/** @default id */
|
|
786
|
+
name: string;
|
|
787
|
+
/** @default Strict */
|
|
788
|
+
same_site: components["schemas"]["SameSiteConfig"];
|
|
789
|
+
/** @default true */
|
|
790
|
+
secure: boolean;
|
|
791
|
+
};
|
|
792
|
+
/**
|
|
793
|
+
* @description SessionTokens model
|
|
794
|
+
* @example {
|
|
795
|
+
* "access": "",
|
|
796
|
+
* "expires_in": 3600,
|
|
797
|
+
* "token_type": "Bearer",
|
|
798
|
+
* "refresh": ""
|
|
799
|
+
* }
|
|
800
|
+
*/
|
|
801
|
+
SessionTokens: {
|
|
802
|
+
access: string;
|
|
803
|
+
/** Format: int64 */
|
|
804
|
+
expires_in: number;
|
|
805
|
+
refresh: string;
|
|
806
|
+
token_type: string;
|
|
807
|
+
};
|
|
808
|
+
/**
|
|
809
|
+
* @example {
|
|
810
|
+
* "token": "edc365fa5e13751XXXXXXX"
|
|
811
|
+
* }
|
|
812
|
+
*/
|
|
813
|
+
TokenQuery: {
|
|
814
|
+
/** Format: password */
|
|
815
|
+
token: string;
|
|
816
|
+
};
|
|
817
|
+
/**
|
|
818
|
+
* @example {
|
|
819
|
+
* "id": "",
|
|
820
|
+
* "username": "",
|
|
821
|
+
* "email": "",
|
|
822
|
+
* "created_at": "2026-02-19T22:42:23.467Z"
|
|
823
|
+
* }
|
|
824
|
+
*/
|
|
825
|
+
User: {
|
|
826
|
+
_id?: string | null;
|
|
827
|
+
/** Format: date-time */
|
|
828
|
+
createdAt: string;
|
|
829
|
+
email: string;
|
|
830
|
+
username: string;
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
responses: never;
|
|
834
|
+
parameters: never;
|
|
835
|
+
requestBodies: never;
|
|
836
|
+
headers: never;
|
|
837
|
+
pathItems: never;
|
|
1061
838
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
};
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
839
|
+
interface operations {
|
|
840
|
+
login: {
|
|
841
|
+
parameters: {
|
|
842
|
+
query?: never;
|
|
843
|
+
header?: never;
|
|
844
|
+
path?: never;
|
|
845
|
+
cookie?: never;
|
|
846
|
+
};
|
|
847
|
+
/** @description User login credentials */
|
|
848
|
+
requestBody: {
|
|
849
|
+
content: {
|
|
850
|
+
"application/json": components["schemas"]["LoginRequest"];
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
responses: {
|
|
854
|
+
/** @description Authentication successful */
|
|
855
|
+
200: {
|
|
856
|
+
headers: {
|
|
857
|
+
/** @description Session cookie (session strategy only). Format: id=<session_id>; HttpOnly; Secure; SameSite=Strict */
|
|
858
|
+
"Set-Cookie"?: string;
|
|
859
|
+
[name: string]: unknown;
|
|
860
|
+
};
|
|
861
|
+
content: {
|
|
862
|
+
"application/json": components["schemas"]["AuthResponse"];
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
/** @description Malformed request or validation error */
|
|
866
|
+
400: {
|
|
867
|
+
headers: {
|
|
868
|
+
[name: string]: unknown;
|
|
869
|
+
};
|
|
870
|
+
content: {
|
|
871
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
/** @description Invalid email or password */
|
|
875
|
+
401: {
|
|
876
|
+
headers: {
|
|
877
|
+
[name: string]: unknown;
|
|
878
|
+
};
|
|
879
|
+
content: {
|
|
880
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
/** @description Unexpected server error */
|
|
884
|
+
500: {
|
|
885
|
+
headers: {
|
|
886
|
+
[name: string]: unknown;
|
|
887
|
+
};
|
|
888
|
+
content: {
|
|
889
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
logout: {
|
|
895
|
+
parameters: {
|
|
896
|
+
query?: never;
|
|
897
|
+
header?: never;
|
|
898
|
+
path?: never;
|
|
899
|
+
cookie?: never;
|
|
900
|
+
};
|
|
901
|
+
/** @description Refresh token to invalidate */
|
|
902
|
+
requestBody: {
|
|
903
|
+
content: {
|
|
904
|
+
"application/json": components["schemas"]["RefreshTokenRequest"];
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
responses: {
|
|
908
|
+
/** @description Logged out successfully — session and refresh token invalidated */
|
|
909
|
+
200: {
|
|
910
|
+
headers: {
|
|
911
|
+
[name: string]: unknown;
|
|
912
|
+
};
|
|
913
|
+
content?: never;
|
|
914
|
+
};
|
|
915
|
+
/** @description Malformed request or missing refresh token */
|
|
916
|
+
400: {
|
|
917
|
+
headers: {
|
|
918
|
+
[name: string]: unknown;
|
|
919
|
+
};
|
|
920
|
+
content: {
|
|
921
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
/** @description Missing or expired credentials */
|
|
925
|
+
401: {
|
|
926
|
+
headers: {
|
|
927
|
+
[name: string]: unknown;
|
|
928
|
+
};
|
|
929
|
+
content: {
|
|
930
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
/** @description Unexpected server error */
|
|
934
|
+
500: {
|
|
935
|
+
headers: {
|
|
936
|
+
[name: string]: unknown;
|
|
937
|
+
};
|
|
938
|
+
content: {
|
|
939
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
forgotPassword: {
|
|
945
|
+
parameters: {
|
|
946
|
+
query?: never;
|
|
947
|
+
header?: never;
|
|
948
|
+
path?: never;
|
|
949
|
+
cookie?: never;
|
|
950
|
+
};
|
|
951
|
+
/** @description Email address to send the reset link to */
|
|
952
|
+
requestBody: {
|
|
953
|
+
content: {
|
|
954
|
+
"application/json": components["schemas"]["EmailRequest"];
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
responses: {
|
|
958
|
+
/** @description Reset email sent if an account with that address exists */
|
|
959
|
+
200: {
|
|
960
|
+
headers: {
|
|
961
|
+
[name: string]: unknown;
|
|
962
|
+
};
|
|
963
|
+
content: {
|
|
964
|
+
"application/json": components["schemas"]["ExpiringLink"];
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
/** @description Malformed request or invalid email format */
|
|
968
|
+
400: {
|
|
969
|
+
headers: {
|
|
970
|
+
[name: string]: unknown;
|
|
971
|
+
};
|
|
972
|
+
content: {
|
|
973
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
/** @description Unexpected server error */
|
|
977
|
+
500: {
|
|
978
|
+
headers: {
|
|
979
|
+
[name: string]: unknown;
|
|
980
|
+
};
|
|
981
|
+
content: {
|
|
982
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
renderPasswordResetForm: {
|
|
988
|
+
parameters: {
|
|
989
|
+
query: {
|
|
990
|
+
/** @description Single-use password reset token from the email link */
|
|
991
|
+
token: string;
|
|
992
|
+
};
|
|
993
|
+
header?: never;
|
|
994
|
+
path?: never;
|
|
995
|
+
cookie?: never;
|
|
996
|
+
};
|
|
997
|
+
requestBody?: never;
|
|
998
|
+
responses: {
|
|
999
|
+
/** @description Token valid — password reset form returned */
|
|
1000
|
+
200: {
|
|
1001
|
+
headers: {
|
|
1002
|
+
[name: string]: unknown;
|
|
1003
|
+
};
|
|
1004
|
+
content: {
|
|
1005
|
+
"text/html": string;
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
1008
|
+
/** @description Malformed request or missing token */
|
|
1009
|
+
400: {
|
|
1010
|
+
headers: {
|
|
1011
|
+
[name: string]: unknown;
|
|
1012
|
+
};
|
|
1013
|
+
content: {
|
|
1014
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1015
|
+
};
|
|
1016
|
+
};
|
|
1017
|
+
/** @description Reset token invalid or expired */
|
|
1018
|
+
401: {
|
|
1019
|
+
headers: {
|
|
1020
|
+
[name: string]: unknown;
|
|
1021
|
+
};
|
|
1022
|
+
content: {
|
|
1023
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
/** @description Unexpected server error */
|
|
1027
|
+
500: {
|
|
1028
|
+
headers: {
|
|
1029
|
+
[name: string]: unknown;
|
|
1030
|
+
};
|
|
1031
|
+
content: {
|
|
1032
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
submitNewPassword: {
|
|
1038
|
+
parameters: {
|
|
1039
|
+
query?: never;
|
|
1040
|
+
header?: never;
|
|
1041
|
+
path?: never;
|
|
1042
|
+
cookie?: never;
|
|
1043
|
+
};
|
|
1044
|
+
/** @description Reset token, CSRF token, and new password */
|
|
1045
|
+
requestBody: {
|
|
1046
|
+
content: {
|
|
1047
|
+
"application/x-www-form-urlencoded": components["schemas"]["ResetPasswordRequest"];
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
responses: {
|
|
1051
|
+
/** @description Password reset successful — redirects to success page */
|
|
1052
|
+
302: {
|
|
1053
|
+
headers: {
|
|
1054
|
+
/** @description URL of the post-reset success page */
|
|
1055
|
+
Location?: string;
|
|
1056
|
+
[name: string]: unknown;
|
|
1057
|
+
};
|
|
1058
|
+
content?: never;
|
|
1059
|
+
};
|
|
1060
|
+
/** @description Malformed request or validation error */
|
|
1061
|
+
400: {
|
|
1062
|
+
headers: {
|
|
1063
|
+
[name: string]: unknown;
|
|
1064
|
+
};
|
|
1065
|
+
content: {
|
|
1066
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
/** @description Reset token or CSRF token invalid or expired */
|
|
1070
|
+
401: {
|
|
1071
|
+
headers: {
|
|
1072
|
+
[name: string]: unknown;
|
|
1073
|
+
};
|
|
1074
|
+
content: {
|
|
1075
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
/** @description Unexpected server error */
|
|
1079
|
+
500: {
|
|
1080
|
+
headers: {
|
|
1081
|
+
[name: string]: unknown;
|
|
1082
|
+
};
|
|
1083
|
+
content: {
|
|
1084
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
refreshToken: {
|
|
1090
|
+
parameters: {
|
|
1091
|
+
query?: never;
|
|
1092
|
+
header?: never;
|
|
1093
|
+
path?: never;
|
|
1094
|
+
cookie?: never;
|
|
1095
|
+
};
|
|
1096
|
+
/** @description Valid refresh token */
|
|
1097
|
+
requestBody: {
|
|
1098
|
+
content: {
|
|
1099
|
+
"application/json": components["schemas"]["RefreshTokenRequest"];
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
responses: {
|
|
1103
|
+
/** @description New access token issued successfully */
|
|
1104
|
+
200: {
|
|
1105
|
+
headers: {
|
|
1106
|
+
[name: string]: unknown;
|
|
1107
|
+
};
|
|
1108
|
+
content: {
|
|
1109
|
+
"application/json": components["schemas"]["AuthResponse"];
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
/** @description Malformed request or missing refresh token */
|
|
1113
|
+
400: {
|
|
1114
|
+
headers: {
|
|
1115
|
+
[name: string]: unknown;
|
|
1116
|
+
};
|
|
1117
|
+
content: {
|
|
1118
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1119
|
+
};
|
|
1120
|
+
};
|
|
1121
|
+
/** @description Refresh token invalid, expired, or already rotated */
|
|
1122
|
+
401: {
|
|
1123
|
+
headers: {
|
|
1124
|
+
[name: string]: unknown;
|
|
1125
|
+
};
|
|
1126
|
+
content: {
|
|
1127
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
/** @description Unexpected server error */
|
|
1131
|
+
500: {
|
|
1132
|
+
headers: {
|
|
1133
|
+
[name: string]: unknown;
|
|
1134
|
+
};
|
|
1135
|
+
content: {
|
|
1136
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
register: {
|
|
1142
|
+
parameters: {
|
|
1143
|
+
query?: never;
|
|
1144
|
+
header?: never;
|
|
1145
|
+
path?: never;
|
|
1146
|
+
cookie?: never;
|
|
1147
|
+
};
|
|
1148
|
+
/** @description User register credentials */
|
|
1149
|
+
requestBody: {
|
|
1150
|
+
content: {
|
|
1151
|
+
"application/json": components["schemas"]["RegisterRequest"];
|
|
1152
|
+
};
|
|
1153
|
+
};
|
|
1154
|
+
responses: {
|
|
1155
|
+
/** @description User registered successfully */
|
|
1156
|
+
201: {
|
|
1157
|
+
headers: {
|
|
1158
|
+
/** @description Session cookie (session strategy only). Format: id=<session_id>; HttpOnly; Secure; SameSite=Strict */
|
|
1159
|
+
"Set-Cookie"?: string;
|
|
1160
|
+
[name: string]: unknown;
|
|
1161
|
+
};
|
|
1162
|
+
content: {
|
|
1163
|
+
"application/json": components["schemas"]["AuthResponse"];
|
|
1164
|
+
};
|
|
1165
|
+
};
|
|
1166
|
+
/** @description Malformed request or validation error */
|
|
1167
|
+
400: {
|
|
1168
|
+
headers: {
|
|
1169
|
+
[name: string]: unknown;
|
|
1170
|
+
};
|
|
1171
|
+
content: {
|
|
1172
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
/** @description Email already registered */
|
|
1176
|
+
409: {
|
|
1177
|
+
headers: {
|
|
1178
|
+
[name: string]: unknown;
|
|
1179
|
+
};
|
|
1180
|
+
content: {
|
|
1181
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
/** @description Unexpected server error */
|
|
1185
|
+
500: {
|
|
1186
|
+
headers: {
|
|
1187
|
+
[name: string]: unknown;
|
|
1188
|
+
};
|
|
1189
|
+
content: {
|
|
1190
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
getSession: {
|
|
1196
|
+
parameters: {
|
|
1197
|
+
query?: never;
|
|
1198
|
+
header?: never;
|
|
1199
|
+
path?: never;
|
|
1200
|
+
cookie?: never;
|
|
1201
|
+
};
|
|
1202
|
+
requestBody?: never;
|
|
1203
|
+
responses: {
|
|
1204
|
+
/** @description Session data returned successfully */
|
|
1205
|
+
200: {
|
|
1206
|
+
headers: {
|
|
1207
|
+
[name: string]: unknown;
|
|
1208
|
+
};
|
|
1209
|
+
content: {
|
|
1210
|
+
"application/json": components["schemas"]["Session"];
|
|
1211
|
+
};
|
|
1212
|
+
};
|
|
1213
|
+
/** @description Missing or expired credentials */
|
|
1214
|
+
401: {
|
|
1215
|
+
headers: {
|
|
1216
|
+
[name: string]: unknown;
|
|
1217
|
+
};
|
|
1218
|
+
content: {
|
|
1219
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1222
|
+
/** @description Account suspended or unverified */
|
|
1223
|
+
403: {
|
|
1224
|
+
headers: {
|
|
1225
|
+
[name: string]: unknown;
|
|
1226
|
+
};
|
|
1227
|
+
content: {
|
|
1228
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1229
|
+
};
|
|
1230
|
+
};
|
|
1231
|
+
/** @description Unexpected server error */
|
|
1232
|
+
500: {
|
|
1233
|
+
headers: {
|
|
1234
|
+
[name: string]: unknown;
|
|
1235
|
+
};
|
|
1236
|
+
content: {
|
|
1237
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1238
|
+
};
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
verify_email: {
|
|
1243
|
+
parameters: {
|
|
1244
|
+
query: {
|
|
1245
|
+
/** @description One-time email verification token issued during registration */
|
|
1246
|
+
token: string;
|
|
1247
|
+
};
|
|
1248
|
+
header?: never;
|
|
1249
|
+
path?: never;
|
|
1250
|
+
cookie?: never;
|
|
1251
|
+
};
|
|
1252
|
+
requestBody?: never;
|
|
1253
|
+
responses: {
|
|
1254
|
+
/** @description Token is valid — redirects to the success page */
|
|
1255
|
+
302: {
|
|
1256
|
+
headers: {
|
|
1257
|
+
/** @description URL of the post-verification success page */
|
|
1258
|
+
Location?: string;
|
|
1259
|
+
[name: string]: unknown;
|
|
1260
|
+
};
|
|
1261
|
+
content?: never;
|
|
1262
|
+
};
|
|
1263
|
+
/** @description Token is missing, malformed, or already used */
|
|
1264
|
+
400: {
|
|
1265
|
+
headers: {
|
|
1266
|
+
[name: string]: unknown;
|
|
1267
|
+
};
|
|
1268
|
+
content: {
|
|
1269
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
/** @description Unexpected server error */
|
|
1273
|
+
500: {
|
|
1274
|
+
headers: {
|
|
1275
|
+
[name: string]: unknown;
|
|
1276
|
+
};
|
|
1277
|
+
content: {
|
|
1278
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
createPermission: {
|
|
1284
|
+
parameters: {
|
|
1285
|
+
query?: never;
|
|
1286
|
+
header?: never;
|
|
1287
|
+
path?: never;
|
|
1288
|
+
cookie?: never;
|
|
1289
|
+
};
|
|
1290
|
+
/** @description Permission definition */
|
|
1291
|
+
requestBody: {
|
|
1292
|
+
content: {
|
|
1293
|
+
"application/json": components["schemas"]["PermissionName"];
|
|
1294
|
+
};
|
|
1295
|
+
};
|
|
1296
|
+
responses: {
|
|
1297
|
+
/** @description Permission upserted successfully */
|
|
1298
|
+
200: {
|
|
1299
|
+
headers: {
|
|
1300
|
+
[name: string]: unknown;
|
|
1301
|
+
};
|
|
1302
|
+
content?: never;
|
|
1303
|
+
};
|
|
1304
|
+
/** @description Missing or expired credentials */
|
|
1305
|
+
401: {
|
|
1306
|
+
headers: {
|
|
1307
|
+
[name: string]: unknown;
|
|
1308
|
+
};
|
|
1309
|
+
content: {
|
|
1310
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1311
|
+
};
|
|
1312
|
+
};
|
|
1313
|
+
/** @description Insufficient privileges */
|
|
1314
|
+
403: {
|
|
1315
|
+
headers: {
|
|
1316
|
+
[name: string]: unknown;
|
|
1317
|
+
};
|
|
1318
|
+
content: {
|
|
1319
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1320
|
+
};
|
|
1321
|
+
};
|
|
1322
|
+
/** @description Unexpected server error */
|
|
1323
|
+
500: {
|
|
1324
|
+
headers: {
|
|
1325
|
+
[name: string]: unknown;
|
|
1326
|
+
};
|
|
1327
|
+
content: {
|
|
1328
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
};
|
|
1332
|
+
};
|
|
1333
|
+
createRole: {
|
|
1334
|
+
parameters: {
|
|
1335
|
+
query?: never;
|
|
1336
|
+
header?: never;
|
|
1337
|
+
path?: never;
|
|
1338
|
+
cookie?: never;
|
|
1339
|
+
};
|
|
1340
|
+
/** @description Role definition */
|
|
1341
|
+
requestBody: {
|
|
1342
|
+
content: {
|
|
1343
|
+
"application/json": components["schemas"]["RoleName"];
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
responses: {
|
|
1347
|
+
/** @description Role upserted successfully */
|
|
1348
|
+
200: {
|
|
1349
|
+
headers: {
|
|
1350
|
+
[name: string]: unknown;
|
|
1351
|
+
};
|
|
1352
|
+
content?: never;
|
|
1353
|
+
};
|
|
1354
|
+
/** @description Missing or expired credentials */
|
|
1355
|
+
401: {
|
|
1356
|
+
headers: {
|
|
1357
|
+
[name: string]: unknown;
|
|
1358
|
+
};
|
|
1359
|
+
content: {
|
|
1360
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1361
|
+
};
|
|
1362
|
+
};
|
|
1363
|
+
/** @description Insufficient privileges */
|
|
1364
|
+
403: {
|
|
1365
|
+
headers: {
|
|
1366
|
+
[name: string]: unknown;
|
|
1367
|
+
};
|
|
1368
|
+
content: {
|
|
1369
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
/** @description Unexpected server error */
|
|
1373
|
+
500: {
|
|
1374
|
+
headers: {
|
|
1375
|
+
[name: string]: unknown;
|
|
1376
|
+
};
|
|
1377
|
+
content: {
|
|
1378
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
assignPermissionToRole: {
|
|
1384
|
+
parameters: {
|
|
1385
|
+
query?: never;
|
|
1386
|
+
header?: never;
|
|
1387
|
+
path: {
|
|
1388
|
+
/** @description Role ID to assign the permission to */
|
|
1389
|
+
id: string;
|
|
1390
|
+
};
|
|
1391
|
+
cookie?: never;
|
|
1392
|
+
};
|
|
1393
|
+
/** @description Permission to assign */
|
|
1394
|
+
requestBody: {
|
|
1395
|
+
content: {
|
|
1396
|
+
"application/json": components["schemas"]["PermissionId"];
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
responses: {
|
|
1400
|
+
/** @description Permission successfully assigned to role */
|
|
1401
|
+
200: {
|
|
1402
|
+
headers: {
|
|
1403
|
+
[name: string]: unknown;
|
|
1404
|
+
};
|
|
1405
|
+
content?: never;
|
|
1406
|
+
};
|
|
1407
|
+
/** @description Missing or expired credentials */
|
|
1408
|
+
401: {
|
|
1409
|
+
headers: {
|
|
1410
|
+
[name: string]: unknown;
|
|
1411
|
+
};
|
|
1412
|
+
content: {
|
|
1413
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
/** @description Insufficient privileges */
|
|
1417
|
+
403: {
|
|
1418
|
+
headers: {
|
|
1419
|
+
[name: string]: unknown;
|
|
1420
|
+
};
|
|
1421
|
+
content: {
|
|
1422
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1423
|
+
};
|
|
1424
|
+
};
|
|
1425
|
+
/** @description Role or permission not found */
|
|
1426
|
+
404: {
|
|
1427
|
+
headers: {
|
|
1428
|
+
[name: string]: unknown;
|
|
1429
|
+
};
|
|
1430
|
+
content: {
|
|
1431
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
/** @description Unexpected server error */
|
|
1435
|
+
500: {
|
|
1436
|
+
headers: {
|
|
1437
|
+
[name: string]: unknown;
|
|
1438
|
+
};
|
|
1439
|
+
content: {
|
|
1440
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1441
|
+
};
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1444
|
+
};
|
|
1445
|
+
find_user: {
|
|
1446
|
+
parameters: {
|
|
1447
|
+
query?: never;
|
|
1448
|
+
header?: never;
|
|
1449
|
+
path?: never;
|
|
1450
|
+
cookie?: never;
|
|
1451
|
+
};
|
|
1452
|
+
requestBody?: never;
|
|
1453
|
+
responses: {
|
|
1454
|
+
/** @description Authenticated user's profile returned successfully */
|
|
1455
|
+
200: {
|
|
1456
|
+
headers: {
|
|
1457
|
+
[name: string]: unknown;
|
|
1458
|
+
};
|
|
1459
|
+
content: {
|
|
1460
|
+
"application/json": components["schemas"]["User"];
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
/** @description Missing or expired credentials */
|
|
1464
|
+
401: {
|
|
1465
|
+
headers: {
|
|
1466
|
+
[name: string]: unknown;
|
|
1467
|
+
};
|
|
1468
|
+
content: {
|
|
1469
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
/** @description Authenticated token is valid but user no longer exists */
|
|
1473
|
+
404: {
|
|
1474
|
+
headers: {
|
|
1475
|
+
[name: string]: unknown;
|
|
1476
|
+
};
|
|
1477
|
+
content: {
|
|
1478
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1479
|
+
};
|
|
1480
|
+
};
|
|
1481
|
+
/** @description Unexpected server error */
|
|
1482
|
+
500: {
|
|
1483
|
+
headers: {
|
|
1484
|
+
[name: string]: unknown;
|
|
1485
|
+
};
|
|
1486
|
+
content: {
|
|
1487
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
assign_role: {
|
|
1493
|
+
parameters: {
|
|
1494
|
+
query?: never;
|
|
1495
|
+
header?: never;
|
|
1496
|
+
path?: never;
|
|
1497
|
+
cookie?: never;
|
|
1498
|
+
};
|
|
1499
|
+
/** @description Role assignment payload */
|
|
1500
|
+
requestBody: {
|
|
1501
|
+
content: {
|
|
1502
|
+
"application/json": components["schemas"]["RoleRequest"];
|
|
1503
|
+
};
|
|
1504
|
+
};
|
|
1505
|
+
responses: {
|
|
1506
|
+
/** @description Role successfully assigned — returns updated user profile */
|
|
1507
|
+
200: {
|
|
1508
|
+
headers: {
|
|
1509
|
+
[name: string]: unknown;
|
|
1510
|
+
};
|
|
1511
|
+
content: {
|
|
1512
|
+
"application/json": components["schemas"]["User"];
|
|
1513
|
+
};
|
|
1514
|
+
};
|
|
1515
|
+
/** @description Missing or expired credentials */
|
|
1516
|
+
401: {
|
|
1517
|
+
headers: {
|
|
1518
|
+
[name: string]: unknown;
|
|
1519
|
+
};
|
|
1520
|
+
content: {
|
|
1521
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1522
|
+
};
|
|
1523
|
+
};
|
|
1524
|
+
/** @description Authenticated user does not have permission to assign roles */
|
|
1525
|
+
403: {
|
|
1526
|
+
headers: {
|
|
1527
|
+
[name: string]: unknown;
|
|
1528
|
+
};
|
|
1529
|
+
content: {
|
|
1530
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
/** @description Target user not found */
|
|
1534
|
+
404: {
|
|
1535
|
+
headers: {
|
|
1536
|
+
[name: string]: unknown;
|
|
1537
|
+
};
|
|
1538
|
+
content: {
|
|
1539
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1540
|
+
};
|
|
1541
|
+
};
|
|
1542
|
+
/** @description Unexpected server error */
|
|
1543
|
+
500: {
|
|
1544
|
+
headers: {
|
|
1545
|
+
[name: string]: unknown;
|
|
1546
|
+
};
|
|
1547
|
+
content: {
|
|
1548
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1549
|
+
};
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
};
|
|
1114
1553
|
}
|
|
1115
1554
|
|
|
1116
|
-
|
|
1117
|
-
* UsersApi - axios parameter creator
|
|
1118
|
-
*/
|
|
1119
|
-
declare const UsersApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
1120
|
-
/**
|
|
1121
|
-
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1122
|
-
* @summary Get current User
|
|
1123
|
-
* @param {*} [options] Override http request option.
|
|
1124
|
-
* @throws {RequiredError}
|
|
1125
|
-
*/
|
|
1126
|
-
findUser: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1127
|
-
};
|
|
1128
|
-
/**
|
|
1129
|
-
* UsersApi - functional programming interface
|
|
1130
|
-
*/
|
|
1131
|
-
declare const UsersApiFp: (configuration?: Configuration) => {
|
|
1132
|
-
/**
|
|
1133
|
-
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1134
|
-
* @summary Get current User
|
|
1135
|
-
* @param {*} [options] Override http request option.
|
|
1136
|
-
* @throws {RequiredError}
|
|
1137
|
-
*/
|
|
1138
|
-
findUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>>;
|
|
1139
|
-
};
|
|
1140
|
-
/**
|
|
1141
|
-
* UsersApi - factory interface
|
|
1142
|
-
*/
|
|
1143
|
-
declare const UsersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
1144
|
-
/**
|
|
1145
|
-
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1146
|
-
* @summary Get current User
|
|
1147
|
-
* @param {*} [options] Override http request option.
|
|
1148
|
-
* @throws {RequiredError}
|
|
1149
|
-
*/
|
|
1150
|
-
findUser(options?: RawAxiosRequestConfig): AxiosPromise<User>;
|
|
1151
|
-
};
|
|
1152
|
-
/**
|
|
1153
|
-
* UsersApi - object-oriented interface
|
|
1154
|
-
*/
|
|
1155
|
-
declare class UsersApi extends BaseAPI {
|
|
1156
|
-
/**
|
|
1157
|
-
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1158
|
-
* @summary Get current User
|
|
1159
|
-
* @param {*} [options] Override http request option.
|
|
1160
|
-
* @throws {RequiredError}
|
|
1161
|
-
*/
|
|
1162
|
-
findUser(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<User, any, {}>>;
|
|
1163
|
-
}
|
|
1555
|
+
declare const api: openapi_fetch.Client<paths, `${string}/${string}`>;
|
|
1164
1556
|
|
|
1165
|
-
export {
|
|
1557
|
+
export { api, type components, type paths };
|