@absolutejs/auth 0.65.5 → 0.66.0
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/agents/context.d.ts +5 -18
- package/dist/agents/index.js +3 -3
- package/dist/agents/index.js.map +3 -3
- package/dist/agents/routes.d.ts +24 -56
- package/dist/apikeys/routes.d.ts +169 -78
- package/dist/authContext.d.ts +34 -79
- package/dist/authorization/protectPermission.d.ts +11 -23
- package/dist/cli/migrate.js +2 -2
- package/dist/cli/migrate.js.map +4 -4
- package/dist/compliance/routes.d.ts +179 -54
- package/dist/credentials/emailVerification.d.ts +173 -56
- package/dist/credentials/login.d.ts +192 -63
- package/dist/credentials/passwordReset.d.ts +171 -60
- package/dist/credentials/register.d.ts +182 -41
- package/dist/credentials/routes.d.ts +46 -36
- package/dist/htmx/configuredRoutes.d.ts +263 -114
- package/dist/htmx/routes.d.ts +261 -89
- package/dist/index.d.ts +663 -443
- package/dist/index.js +475 -448
- package/dist/index.js.map +48 -48
- package/dist/manifest.js +86 -4
- package/dist/manifest.js.map +3 -3
- package/dist/mfa/challenge.d.ts +189 -59
- package/dist/mfa/management.d.ts +179 -54
- package/dist/mfa/routes.d.ts +34 -40
- package/dist/mfa/sms.d.ts +187 -59
- package/dist/mfa/totp.d.ts +187 -57
- package/dist/oidc/routes.d.ts +73 -74
- package/dist/oidc/vciRoutes.d.ts +9 -45
- package/dist/organizations/routes.d.ts +215 -77
- package/dist/passwordless/routes.d.ts +22 -34
- package/dist/portal/routes.d.ts +162 -55
- package/dist/roles/routes.d.ts +198 -67
- package/dist/routes/authorize.d.ts +182 -90
- package/dist/routes/callback.d.ts +189 -38
- package/dist/routes/profile.d.ts +177 -51
- package/dist/routes/protectRoute.d.ts +11 -23
- package/dist/routes/refresh.d.ts +177 -51
- package/dist/routes/requireAuth.d.ts +9 -21
- package/dist/routes/revoke.d.ts +177 -51
- package/dist/routes/sessions.d.ts +187 -61
- package/dist/routes/signout.d.ts +174 -50
- package/dist/routes/stepUp.d.ts +11 -23
- package/dist/routes/userStatus.d.ts +174 -52
- package/dist/scim/routes.d.ts +208 -73
- package/dist/server.js +475 -448
- package/dist/server.js.map +48 -48
- package/dist/session/cleanup.d.ts +5 -18
- package/dist/session/state.d.ts +3 -23
- package/dist/sso/discoveryRoute.d.ts +158 -52
- package/dist/sso/oidcRoutes.d.ts +211 -59
- package/dist/sso/samlIdpRoutes.d.ts +175 -46
- package/dist/sso/samlRoutes.d.ts +217 -69
- package/dist/typebox.d.ts +4 -4
- package/dist/types.d.ts +3 -5
- package/dist/vault/index.js +3 -3
- package/dist/vault/index.js.map +3 -3
- package/dist/vc/statusListRoutes.d.ts +158 -52
- package/dist/vc/vpRoutes.d.ts +170 -66
- package/dist/webauthn/routes.d.ts +199 -66
- package/package.json +8 -120
package/dist/htmx/routes.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Elysia } from 'elysia';
|
|
2
1
|
import type { AuthSessionSource } from '../session/types';
|
|
3
2
|
import type { AuthHtmxConfig, AuthHtmxUser } from './types';
|
|
4
3
|
export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(config: AuthHtmxConfig & {
|
|
5
4
|
authSessionStore?: AuthSessionSource<UserType>;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("elysia/types").AddRoute<"", "local", {
|
|
7
6
|
decorator: {};
|
|
8
7
|
store: {
|
|
9
8
|
session: import("..").SessionRecord<UserType>;
|
|
@@ -16,37 +15,30 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
16
15
|
} | {
|
|
17
16
|
readonly code: "Unauthorized";
|
|
18
17
|
readonly message: "User is not authenticated";
|
|
19
|
-
}) => AuthFailReturn) | undefined) => Promise<import("elysia").
|
|
18
|
+
}) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
|
|
20
19
|
};
|
|
21
|
-
resolve: {};
|
|
22
20
|
}, {
|
|
23
21
|
typebox: {};
|
|
24
|
-
error:
|
|
25
|
-
}, {
|
|
22
|
+
error: [];
|
|
23
|
+
}, import("elysia/types").DefaultMetadata & {
|
|
26
24
|
schema: {};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
parser: {};
|
|
31
|
-
response: {};
|
|
32
|
-
} & {
|
|
33
|
-
schema: import("elysia").UnwrapRoute<{
|
|
34
|
-
cookie: import("@sinclair/typebox").TObject<{
|
|
35
|
-
user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
|
|
25
|
+
schemas: import("elysia").UnwrapRoute<{
|
|
26
|
+
cookie: import("elysia").TCookieObject<{
|
|
27
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
36
28
|
}>;
|
|
29
|
+
schema: "merge";
|
|
37
30
|
}, {}, "">;
|
|
38
|
-
standaloneSchema: {};
|
|
39
31
|
macro: {};
|
|
40
32
|
macroFn: {};
|
|
41
33
|
parser: {};
|
|
42
|
-
response: import("elysia").ExtractErrorFromHandle<{
|
|
34
|
+
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
43
35
|
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
44
36
|
readonly code: "Bad Request";
|
|
45
37
|
readonly message: "Cookies are missing";
|
|
46
38
|
} | {
|
|
47
39
|
readonly code: "Unauthorized";
|
|
48
40
|
readonly message: "User is not authenticated";
|
|
49
|
-
}) => AuthFailReturn) | undefined) => Promise<import("elysia").
|
|
41
|
+
}) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
|
|
50
42
|
}>;
|
|
51
43
|
}, {
|
|
52
44
|
htmx: {
|
|
@@ -60,14 +52,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
60
52
|
200: Response;
|
|
61
53
|
422: {
|
|
62
54
|
type: "validation";
|
|
55
|
+
title: "Validation Error";
|
|
56
|
+
status: 422;
|
|
57
|
+
detail?: string;
|
|
63
58
|
on: string;
|
|
64
|
-
summary?: string;
|
|
65
|
-
message?: string;
|
|
66
59
|
found?: unknown;
|
|
67
60
|
property?: string;
|
|
68
61
|
expected?: string;
|
|
69
62
|
};
|
|
70
63
|
};
|
|
64
|
+
error: never;
|
|
71
65
|
};
|
|
72
66
|
};
|
|
73
67
|
};
|
|
@@ -83,14 +77,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
83
77
|
200: Response;
|
|
84
78
|
422: {
|
|
85
79
|
type: "validation";
|
|
80
|
+
title: "Validation Error";
|
|
81
|
+
status: 422;
|
|
82
|
+
detail?: string;
|
|
86
83
|
on: string;
|
|
87
|
-
summary?: string;
|
|
88
|
-
message?: string;
|
|
89
84
|
found?: unknown;
|
|
90
85
|
property?: string;
|
|
91
86
|
expected?: string;
|
|
92
87
|
};
|
|
93
88
|
};
|
|
89
|
+
error: never;
|
|
94
90
|
};
|
|
95
91
|
};
|
|
96
92
|
};
|
|
@@ -106,14 +102,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
106
102
|
200: Response;
|
|
107
103
|
422: {
|
|
108
104
|
type: "validation";
|
|
105
|
+
title: "Validation Error";
|
|
106
|
+
status: 422;
|
|
107
|
+
detail?: string;
|
|
109
108
|
on: string;
|
|
110
|
-
summary?: string;
|
|
111
|
-
message?: string;
|
|
112
109
|
found?: unknown;
|
|
113
110
|
property?: string;
|
|
114
111
|
expected?: string;
|
|
115
112
|
};
|
|
116
113
|
};
|
|
114
|
+
error: never;
|
|
117
115
|
};
|
|
118
116
|
};
|
|
119
117
|
};
|
|
@@ -131,14 +129,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
131
129
|
200: Response;
|
|
132
130
|
422: {
|
|
133
131
|
type: "validation";
|
|
132
|
+
title: "Validation Error";
|
|
133
|
+
status: 422;
|
|
134
|
+
detail?: string;
|
|
134
135
|
on: string;
|
|
135
|
-
summary?: string;
|
|
136
|
-
message?: string;
|
|
137
136
|
found?: unknown;
|
|
138
137
|
property?: string;
|
|
139
138
|
expected?: string;
|
|
140
139
|
};
|
|
141
140
|
};
|
|
141
|
+
error: never;
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
144
|
};
|
|
@@ -156,14 +156,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
156
156
|
200: Response;
|
|
157
157
|
422: {
|
|
158
158
|
type: "validation";
|
|
159
|
+
title: "Validation Error";
|
|
160
|
+
status: 422;
|
|
161
|
+
detail?: string;
|
|
159
162
|
on: string;
|
|
160
|
-
summary?: string;
|
|
161
|
-
message?: string;
|
|
162
163
|
found?: unknown;
|
|
163
164
|
property?: string;
|
|
164
165
|
expected?: string;
|
|
165
166
|
};
|
|
166
167
|
};
|
|
168
|
+
error: never;
|
|
167
169
|
};
|
|
168
170
|
};
|
|
169
171
|
};
|
|
@@ -181,14 +183,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
181
183
|
200: Response;
|
|
182
184
|
422: {
|
|
183
185
|
type: "validation";
|
|
186
|
+
title: "Validation Error";
|
|
187
|
+
status: 422;
|
|
188
|
+
detail?: string;
|
|
184
189
|
on: string;
|
|
185
|
-
summary?: string;
|
|
186
|
-
message?: string;
|
|
187
190
|
found?: unknown;
|
|
188
191
|
property?: string;
|
|
189
192
|
expected?: string;
|
|
190
193
|
};
|
|
191
194
|
};
|
|
195
|
+
error: never;
|
|
192
196
|
};
|
|
193
197
|
};
|
|
194
198
|
};
|
|
@@ -206,14 +210,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
206
210
|
200: Response;
|
|
207
211
|
422: {
|
|
208
212
|
type: "validation";
|
|
213
|
+
title: "Validation Error";
|
|
214
|
+
status: 422;
|
|
215
|
+
detail?: string;
|
|
209
216
|
on: string;
|
|
210
|
-
summary?: string;
|
|
211
|
-
message?: string;
|
|
212
217
|
found?: unknown;
|
|
213
218
|
property?: string;
|
|
214
219
|
expected?: string;
|
|
215
220
|
};
|
|
216
221
|
};
|
|
222
|
+
error: never;
|
|
217
223
|
};
|
|
218
224
|
};
|
|
219
225
|
};
|
|
@@ -235,14 +241,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
235
241
|
200: Response;
|
|
236
242
|
422: {
|
|
237
243
|
type: "validation";
|
|
244
|
+
title: "Validation Error";
|
|
245
|
+
status: 422;
|
|
246
|
+
detail?: string;
|
|
238
247
|
on: string;
|
|
239
|
-
summary?: string;
|
|
240
|
-
message?: string;
|
|
241
248
|
found?: unknown;
|
|
242
249
|
property?: string;
|
|
243
250
|
expected?: string;
|
|
244
251
|
};
|
|
245
252
|
};
|
|
253
|
+
error: never;
|
|
246
254
|
};
|
|
247
255
|
};
|
|
248
256
|
};
|
|
@@ -265,14 +273,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
265
273
|
200: Response;
|
|
266
274
|
422: {
|
|
267
275
|
type: "validation";
|
|
276
|
+
title: "Validation Error";
|
|
277
|
+
status: 422;
|
|
278
|
+
detail?: string;
|
|
268
279
|
on: string;
|
|
269
|
-
summary?: string;
|
|
270
|
-
message?: string;
|
|
271
280
|
found?: unknown;
|
|
272
281
|
property?: string;
|
|
273
282
|
expected?: string;
|
|
274
283
|
};
|
|
275
284
|
};
|
|
285
|
+
error: never;
|
|
276
286
|
};
|
|
277
287
|
};
|
|
278
288
|
};
|
|
@@ -294,14 +304,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
294
304
|
200: Response;
|
|
295
305
|
422: {
|
|
296
306
|
type: "validation";
|
|
307
|
+
title: "Validation Error";
|
|
308
|
+
status: 422;
|
|
309
|
+
detail?: string;
|
|
297
310
|
on: string;
|
|
298
|
-
summary?: string;
|
|
299
|
-
message?: string;
|
|
300
311
|
found?: unknown;
|
|
301
312
|
property?: string;
|
|
302
313
|
expected?: string;
|
|
303
314
|
};
|
|
304
315
|
};
|
|
316
|
+
error: never;
|
|
305
317
|
};
|
|
306
318
|
};
|
|
307
319
|
};
|
|
@@ -323,14 +335,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
323
335
|
200: Response;
|
|
324
336
|
422: {
|
|
325
337
|
type: "validation";
|
|
338
|
+
title: "Validation Error";
|
|
339
|
+
status: 422;
|
|
340
|
+
detail?: string;
|
|
326
341
|
on: string;
|
|
327
|
-
summary?: string;
|
|
328
|
-
message?: string;
|
|
329
342
|
found?: unknown;
|
|
330
343
|
property?: string;
|
|
331
344
|
expected?: string;
|
|
332
345
|
};
|
|
333
346
|
};
|
|
347
|
+
error: never;
|
|
334
348
|
};
|
|
335
349
|
};
|
|
336
350
|
};
|
|
@@ -349,14 +363,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
349
363
|
200: Response;
|
|
350
364
|
422: {
|
|
351
365
|
type: "validation";
|
|
366
|
+
title: "Validation Error";
|
|
367
|
+
status: 422;
|
|
368
|
+
detail?: string;
|
|
352
369
|
on: string;
|
|
353
|
-
summary?: string;
|
|
354
|
-
message?: string;
|
|
355
370
|
found?: unknown;
|
|
356
371
|
property?: string;
|
|
357
372
|
expected?: string;
|
|
358
373
|
};
|
|
359
374
|
};
|
|
375
|
+
error: never;
|
|
360
376
|
};
|
|
361
377
|
};
|
|
362
378
|
};
|
|
@@ -378,14 +394,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
378
394
|
200: Response;
|
|
379
395
|
422: {
|
|
380
396
|
type: "validation";
|
|
397
|
+
title: "Validation Error";
|
|
398
|
+
status: 422;
|
|
399
|
+
detail?: string;
|
|
381
400
|
on: string;
|
|
382
|
-
summary?: string;
|
|
383
|
-
message?: string;
|
|
384
401
|
found?: unknown;
|
|
385
402
|
property?: string;
|
|
386
403
|
expected?: string;
|
|
387
404
|
};
|
|
388
405
|
};
|
|
406
|
+
error: never;
|
|
389
407
|
};
|
|
390
408
|
};
|
|
391
409
|
};
|
|
@@ -409,14 +427,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
409
427
|
200: Response;
|
|
410
428
|
422: {
|
|
411
429
|
type: "validation";
|
|
430
|
+
title: "Validation Error";
|
|
431
|
+
status: 422;
|
|
432
|
+
detail?: string;
|
|
412
433
|
on: string;
|
|
413
|
-
summary?: string;
|
|
414
|
-
message?: string;
|
|
415
434
|
found?: unknown;
|
|
416
435
|
property?: string;
|
|
417
436
|
expected?: string;
|
|
418
437
|
};
|
|
419
438
|
};
|
|
439
|
+
error: never;
|
|
420
440
|
};
|
|
421
441
|
};
|
|
422
442
|
};
|
|
@@ -434,14 +454,16 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
434
454
|
200: Response;
|
|
435
455
|
422: {
|
|
436
456
|
type: "validation";
|
|
457
|
+
title: "Validation Error";
|
|
458
|
+
status: 422;
|
|
459
|
+
detail?: string;
|
|
437
460
|
on: string;
|
|
438
|
-
summary?: string;
|
|
439
|
-
message?: string;
|
|
440
461
|
found?: unknown;
|
|
441
462
|
property?: string;
|
|
442
463
|
expected?: string;
|
|
443
464
|
};
|
|
444
465
|
};
|
|
466
|
+
error: never;
|
|
445
467
|
};
|
|
446
468
|
};
|
|
447
469
|
};
|
|
@@ -459,56 +481,206 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
459
481
|
200: Response;
|
|
460
482
|
422: {
|
|
461
483
|
type: "validation";
|
|
484
|
+
title: "Validation Error";
|
|
485
|
+
status: 422;
|
|
486
|
+
detail?: string;
|
|
462
487
|
on: string;
|
|
463
|
-
summary?: string;
|
|
464
|
-
message?: string;
|
|
465
488
|
found?: unknown;
|
|
466
489
|
property?: string;
|
|
467
490
|
expected?: string;
|
|
468
491
|
};
|
|
469
492
|
};
|
|
493
|
+
error: never;
|
|
470
494
|
};
|
|
471
495
|
};
|
|
472
496
|
};
|
|
473
|
-
}
|
|
474
|
-
htmx: {
|
|
475
|
-
signout: {
|
|
476
|
-
get: {
|
|
477
|
-
body: unknown;
|
|
478
|
-
params: {};
|
|
479
|
-
query: unknown;
|
|
480
|
-
headers: unknown;
|
|
481
|
-
response: {
|
|
482
|
-
200: Response;
|
|
483
|
-
422: {
|
|
484
|
-
type: "validation";
|
|
485
|
-
on: string;
|
|
486
|
-
summary?: string;
|
|
487
|
-
message?: string;
|
|
488
|
-
found?: unknown;
|
|
489
|
-
property?: string;
|
|
490
|
-
expected?: string;
|
|
491
|
-
};
|
|
492
|
-
};
|
|
493
|
-
};
|
|
494
|
-
};
|
|
495
|
-
};
|
|
496
|
-
}, {
|
|
497
|
-
derive: {};
|
|
498
|
-
resolve: {};
|
|
499
|
-
schema: {};
|
|
500
|
-
standaloneSchema: {};
|
|
501
|
-
response: {};
|
|
502
|
-
}, {
|
|
503
|
-
derive: {};
|
|
504
|
-
resolve: {};
|
|
505
|
-
schema: {};
|
|
506
|
-
standaloneSchema: {};
|
|
507
|
-
response: {};
|
|
508
|
-
} & {
|
|
497
|
+
}, import("elysia/types").DefaultEphemeral, {
|
|
509
498
|
derive: {};
|
|
510
|
-
resolve: {};
|
|
511
499
|
schema: {};
|
|
512
|
-
|
|
500
|
+
schemas: {};
|
|
513
501
|
response: {};
|
|
514
|
-
|
|
502
|
+
error: [];
|
|
503
|
+
}, "get", "/htmx/signout", import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, "/htmx/signout">, import("elysia/types").MergeScopedSchemas<import("elysia").UnwrapRoute<{
|
|
504
|
+
cookie: import("elysia").TCookieObject<{
|
|
505
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
506
|
+
}>;
|
|
507
|
+
schema: "merge";
|
|
508
|
+
}, {}, "">, {}, {}>>, {}, ({ cookie: { user_session_id }, redirect }: {
|
|
509
|
+
body: unknown;
|
|
510
|
+
query: Record<string, string | undefined>;
|
|
511
|
+
params: {};
|
|
512
|
+
headers: Record<string, string | undefined>;
|
|
513
|
+
cookie: Record<string, import("elysia").Cookie<unknown>> & {
|
|
514
|
+
user_session_id: import("elysia").Cookie<`${string}-${string}-${string}-${string}-${string}` | undefined>;
|
|
515
|
+
};
|
|
516
|
+
server: import("elysia").Server | null;
|
|
517
|
+
redirect: import("elysia").redirect;
|
|
518
|
+
set: {
|
|
519
|
+
headers: import("elysia").HTTPHeaders;
|
|
520
|
+
status?: number | keyof import("elysia").StatusMap;
|
|
521
|
+
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
522
|
+
};
|
|
523
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
524
|
+
readonly 100: "Continue";
|
|
525
|
+
readonly 101: "Switching Protocols";
|
|
526
|
+
readonly 102: "Processing";
|
|
527
|
+
readonly 103: "Early Hints";
|
|
528
|
+
readonly 200: "OK";
|
|
529
|
+
readonly 201: "Created";
|
|
530
|
+
readonly 202: "Accepted";
|
|
531
|
+
readonly 203: "Non-Authoritative Information";
|
|
532
|
+
readonly 204: "No Content";
|
|
533
|
+
readonly 205: "Reset Content";
|
|
534
|
+
readonly 206: "Partial Content";
|
|
535
|
+
readonly 207: "Multi-Status";
|
|
536
|
+
readonly 208: "Already Reported";
|
|
537
|
+
readonly 300: "Multiple Choices";
|
|
538
|
+
readonly 301: "Moved Permanently";
|
|
539
|
+
readonly 302: "Found";
|
|
540
|
+
readonly 303: "See Other";
|
|
541
|
+
readonly 304: "Not Modified";
|
|
542
|
+
readonly 307: "Temporary Redirect";
|
|
543
|
+
readonly 308: "Permanent Redirect";
|
|
544
|
+
readonly 400: "Bad Request";
|
|
545
|
+
readonly 401: "Unauthorized";
|
|
546
|
+
readonly 402: "Payment Required";
|
|
547
|
+
readonly 403: "Forbidden";
|
|
548
|
+
readonly 404: "Not Found";
|
|
549
|
+
readonly 405: "Method Not Allowed";
|
|
550
|
+
readonly 406: "Not Acceptable";
|
|
551
|
+
readonly 407: "Proxy Authentication Required";
|
|
552
|
+
readonly 408: "Request Timeout";
|
|
553
|
+
readonly 409: "Conflict";
|
|
554
|
+
readonly 410: "Gone";
|
|
555
|
+
readonly 411: "Length Required";
|
|
556
|
+
readonly 412: "Precondition Failed";
|
|
557
|
+
readonly 413: "Payload Too Large";
|
|
558
|
+
readonly 414: "URI Too Long";
|
|
559
|
+
readonly 415: "Unsupported Media Type";
|
|
560
|
+
readonly 416: "Range Not Satisfiable";
|
|
561
|
+
readonly 417: "Expectation Failed";
|
|
562
|
+
readonly 418: "I'm a teapot";
|
|
563
|
+
readonly 420: "Enhance Your Calm";
|
|
564
|
+
readonly 421: "Misdirected Request";
|
|
565
|
+
readonly 422: "Unprocessable Content";
|
|
566
|
+
readonly 423: "Locked";
|
|
567
|
+
readonly 424: "Failed Dependency";
|
|
568
|
+
readonly 425: "Too Early";
|
|
569
|
+
readonly 426: "Upgrade Required";
|
|
570
|
+
readonly 428: "Precondition Required";
|
|
571
|
+
readonly 429: "Too Many Requests";
|
|
572
|
+
readonly 431: "Request Header Fields Too Large";
|
|
573
|
+
readonly 451: "Unavailable For Legal Reasons";
|
|
574
|
+
readonly 500: "Internal Server Error";
|
|
575
|
+
readonly 501: "Not Implemented";
|
|
576
|
+
readonly 502: "Bad Gateway";
|
|
577
|
+
readonly 503: "Service Unavailable";
|
|
578
|
+
readonly 504: "Gateway Timeout";
|
|
579
|
+
readonly 505: "HTTP Version Not Supported";
|
|
580
|
+
readonly 506: "Variant Also Negotiates";
|
|
581
|
+
readonly 507: "Insufficient Storage";
|
|
582
|
+
readonly 508: "Loop Detected";
|
|
583
|
+
readonly 510: "Not Extended";
|
|
584
|
+
readonly 511: "Network Authentication Required";
|
|
585
|
+
}[Code] : Code>(code: Code, response?: T) => import("elysia").ElysiaStatus<Code, T, Code extends "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Bad Request" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
|
|
586
|
+
readonly Continue: 100;
|
|
587
|
+
readonly "Switching Protocols": 101;
|
|
588
|
+
readonly Processing: 102;
|
|
589
|
+
readonly "Early Hints": 103;
|
|
590
|
+
readonly OK: 200;
|
|
591
|
+
readonly Created: 201;
|
|
592
|
+
readonly Accepted: 202;
|
|
593
|
+
readonly "Non-Authoritative Information": 203;
|
|
594
|
+
readonly "No Content": 204;
|
|
595
|
+
readonly "Reset Content": 205;
|
|
596
|
+
readonly "Partial Content": 206;
|
|
597
|
+
readonly "Multi-Status": 207;
|
|
598
|
+
readonly "Already Reported": 208;
|
|
599
|
+
readonly "Multiple Choices": 300;
|
|
600
|
+
readonly "Moved Permanently": 301;
|
|
601
|
+
readonly Found: 302;
|
|
602
|
+
readonly "See Other": 303;
|
|
603
|
+
readonly "Not Modified": 304;
|
|
604
|
+
readonly "Temporary Redirect": 307;
|
|
605
|
+
readonly "Permanent Redirect": 308;
|
|
606
|
+
readonly "Bad Request": 400;
|
|
607
|
+
readonly Unauthorized: 401;
|
|
608
|
+
readonly "Payment Required": 402;
|
|
609
|
+
readonly Forbidden: 403;
|
|
610
|
+
readonly "Not Found": 404;
|
|
611
|
+
readonly "Method Not Allowed": 405;
|
|
612
|
+
readonly "Not Acceptable": 406;
|
|
613
|
+
readonly "Proxy Authentication Required": 407;
|
|
614
|
+
readonly "Request Timeout": 408;
|
|
615
|
+
readonly Conflict: 409;
|
|
616
|
+
readonly Gone: 410;
|
|
617
|
+
readonly "Length Required": 411;
|
|
618
|
+
readonly "Precondition Failed": 412;
|
|
619
|
+
readonly "Payload Too Large": 413;
|
|
620
|
+
readonly "URI Too Long": 414;
|
|
621
|
+
readonly "Unsupported Media Type": 415;
|
|
622
|
+
readonly "Range Not Satisfiable": 416;
|
|
623
|
+
readonly "Expectation Failed": 417;
|
|
624
|
+
readonly "I'm a teapot": 418;
|
|
625
|
+
readonly "Enhance Your Calm": 420;
|
|
626
|
+
readonly "Misdirected Request": 421;
|
|
627
|
+
readonly "Unprocessable Content": 422;
|
|
628
|
+
readonly Locked: 423;
|
|
629
|
+
readonly "Failed Dependency": 424;
|
|
630
|
+
readonly "Too Early": 425;
|
|
631
|
+
readonly "Upgrade Required": 426;
|
|
632
|
+
readonly "Precondition Required": 428;
|
|
633
|
+
readonly "Too Many Requests": 429;
|
|
634
|
+
readonly "Request Header Fields Too Large": 431;
|
|
635
|
+
readonly "Unavailable For Legal Reasons": 451;
|
|
636
|
+
readonly "Internal Server Error": 500;
|
|
637
|
+
readonly "Not Implemented": 501;
|
|
638
|
+
readonly "Bad Gateway": 502;
|
|
639
|
+
readonly "Service Unavailable": 503;
|
|
640
|
+
readonly "Gateway Timeout": 504;
|
|
641
|
+
readonly "HTTP Version Not Supported": 505;
|
|
642
|
+
readonly "Variant Also Negotiates": 506;
|
|
643
|
+
readonly "Insufficient Storage": 507;
|
|
644
|
+
readonly "Loop Detected": 508;
|
|
645
|
+
readonly "Not Extended": 510;
|
|
646
|
+
readonly "Network Authentication Required": 511;
|
|
647
|
+
}[Code] : Code>;
|
|
648
|
+
defer: (fn: import("elysia/types").AfterResponseHandler<NoInfer<import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, "/htmx/signout">, import("elysia/types").MergeScopedSchemas<import("elysia").UnwrapRoute<{
|
|
649
|
+
cookie: import("elysia").TCookieObject<{
|
|
650
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
651
|
+
}>;
|
|
652
|
+
schema: "merge";
|
|
653
|
+
}, {}, "">, {}, {}>>>, NoInfer<{
|
|
654
|
+
decorator: {};
|
|
655
|
+
store: {
|
|
656
|
+
session: import("..").SessionRecord<UserType>;
|
|
657
|
+
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
658
|
+
};
|
|
659
|
+
derive: {
|
|
660
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
661
|
+
readonly code: "Bad Request";
|
|
662
|
+
readonly message: "Cookies are missing";
|
|
663
|
+
} | {
|
|
664
|
+
readonly code: "Unauthorized";
|
|
665
|
+
readonly message: "User is not authenticated";
|
|
666
|
+
}) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
|
|
667
|
+
};
|
|
668
|
+
} & {
|
|
669
|
+
derive: {};
|
|
670
|
+
}>>) => import("elysia/types").MaybePromise<void>;
|
|
671
|
+
readonly path: string;
|
|
672
|
+
route?: string | undefined;
|
|
673
|
+
rid?: string | undefined;
|
|
674
|
+
request: Request;
|
|
675
|
+
store: {
|
|
676
|
+
session: import("..").SessionRecord<UserType>;
|
|
677
|
+
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
678
|
+
};
|
|
679
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
680
|
+
readonly code: "Bad Request";
|
|
681
|
+
readonly message: "Cookies are missing";
|
|
682
|
+
} | {
|
|
683
|
+
readonly code: "Unauthorized";
|
|
684
|
+
readonly message: "User is not authenticated";
|
|
685
|
+
}) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
|
|
686
|
+
}) => Promise<Response>>;
|