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