@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.
Files changed (61) 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 +2 -2
  9. package/dist/cli/migrate.js.map +4 -4
  10. package/dist/compliance/routes.d.ts +179 -54
  11. package/dist/credentials/emailVerification.d.ts +173 -56
  12. package/dist/credentials/login.d.ts +192 -63
  13. package/dist/credentials/passwordReset.d.ts +171 -60
  14. package/dist/credentials/register.d.ts +182 -41
  15. package/dist/credentials/routes.d.ts +46 -36
  16. package/dist/htmx/configuredRoutes.d.ts +263 -114
  17. package/dist/htmx/routes.d.ts +261 -89
  18. package/dist/index.d.ts +663 -443
  19. package/dist/index.js +475 -448
  20. package/dist/index.js.map +48 -48
  21. package/dist/manifest.js +86 -4
  22. package/dist/manifest.js.map +3 -3
  23. package/dist/mfa/challenge.d.ts +189 -59
  24. package/dist/mfa/management.d.ts +179 -54
  25. package/dist/mfa/routes.d.ts +34 -40
  26. package/dist/mfa/sms.d.ts +187 -59
  27. package/dist/mfa/totp.d.ts +187 -57
  28. package/dist/oidc/routes.d.ts +73 -74
  29. package/dist/oidc/vciRoutes.d.ts +9 -45
  30. package/dist/organizations/routes.d.ts +215 -77
  31. package/dist/passwordless/routes.d.ts +22 -34
  32. package/dist/portal/routes.d.ts +162 -55
  33. package/dist/roles/routes.d.ts +198 -67
  34. package/dist/routes/authorize.d.ts +182 -90
  35. package/dist/routes/callback.d.ts +189 -38
  36. package/dist/routes/profile.d.ts +177 -51
  37. package/dist/routes/protectRoute.d.ts +11 -23
  38. package/dist/routes/refresh.d.ts +177 -51
  39. package/dist/routes/requireAuth.d.ts +9 -21
  40. package/dist/routes/revoke.d.ts +177 -51
  41. package/dist/routes/sessions.d.ts +187 -61
  42. package/dist/routes/signout.d.ts +174 -50
  43. package/dist/routes/stepUp.d.ts +11 -23
  44. package/dist/routes/userStatus.d.ts +174 -52
  45. package/dist/scim/routes.d.ts +208 -73
  46. package/dist/server.js +475 -448
  47. package/dist/server.js.map +48 -48
  48. package/dist/session/cleanup.d.ts +5 -18
  49. package/dist/session/state.d.ts +3 -23
  50. package/dist/sso/discoveryRoute.d.ts +158 -52
  51. package/dist/sso/oidcRoutes.d.ts +211 -59
  52. package/dist/sso/samlIdpRoutes.d.ts +175 -46
  53. package/dist/sso/samlRoutes.d.ts +217 -69
  54. package/dist/typebox.d.ts +4 -4
  55. package/dist/types.d.ts +3 -5
  56. package/dist/vault/index.js +3 -3
  57. package/dist/vault/index.js.map +3 -3
  58. package/dist/vc/statusListRoutes.d.ts +158 -52
  59. package/dist/vc/vpRoutes.d.ts +170 -66
  60. package/dist/webauthn/routes.d.ts +199 -66
  61. package/package.json +8 -120
@@ -1,4 +1,3 @@
1
- import { Elysia } from 'elysia';
2
1
  import type { AuthSessionStore } from '../session/types';
3
2
  import type { RouteString, SessionRecord } from '../types';
4
3
  import { type SamlIdpAdapter } from './config';
@@ -13,25 +12,17 @@ type SamlIdpRoutesProps<UserType> = {
13
12
  samlServiceProviderStore: SamlServiceProviderStore;
14
13
  ssoRoute?: RouteString;
15
14
  };
16
- export declare const samlIdpRoutes: <UserType>({ authSessionStore, getNameId, getSamlAttributes, idpAdapter, idpEntityId, loginUrl, samlServiceProviderStore, ssoRoute }: SamlIdpRoutesProps<UserType>) => Elysia<"", {
15
+ export declare const samlIdpRoutes: <UserType>({ authSessionStore, getNameId, getSamlAttributes, idpAdapter, idpEntityId, loginUrl, samlServiceProviderStore, ssoRoute }: SamlIdpRoutesProps<UserType>) => import("elysia/types").AddRoute<"", "local", {
17
16
  decorator: {};
18
17
  store: {
19
18
  session: SessionRecord<UserType>;
20
19
  unregisteredSession: import("..").UnregisteredSessionRecord;
21
20
  };
22
21
  derive: {};
23
- resolve: {};
24
22
  }, {
25
23
  typebox: {};
26
- error: {};
27
- }, {
28
- schema: {};
29
- standaloneSchema: {};
30
- macro: {};
31
- macroFn: {};
32
- parser: {};
33
- response: {};
34
- }, {
24
+ error: [];
25
+ }, import("elysia/types").DefaultMetadata, {
35
26
  [x: string]: {
36
27
  post: {
37
28
  body: {
@@ -45,14 +36,16 @@ export declare const samlIdpRoutes: <UserType>({ authSessionStore, getNameId, ge
45
36
  200: Response;
46
37
  422: {
47
38
  type: "validation";
39
+ title: "Validation Error";
40
+ status: 422;
41
+ detail?: string;
48
42
  on: string;
49
- summary?: string;
50
- message?: string;
51
43
  found?: unknown;
52
44
  property?: string;
53
45
  expected?: string;
54
46
  };
55
47
  };
48
+ error: never;
56
49
  };
57
50
  };
58
51
  } & {
@@ -71,14 +64,16 @@ export declare const samlIdpRoutes: <UserType>({ authSessionStore, getNameId, ge
71
64
  200: Response;
72
65
  422: {
73
66
  type: "validation";
67
+ title: "Validation Error";
68
+ status: 422;
69
+ detail?: string;
74
70
  on: string;
75
- summary?: string;
76
- message?: string;
77
71
  found?: unknown;
78
72
  property?: string;
79
73
  expected?: string;
80
74
  };
81
75
  };
76
+ error: never;
82
77
  };
83
78
  };
84
79
  } & {
@@ -95,45 +90,179 @@ export declare const samlIdpRoutes: <UserType>({ authSessionStore, getNameId, ge
95
90
  200: Response;
96
91
  422: {
97
92
  type: "validation";
93
+ title: "Validation Error";
94
+ status: 422;
95
+ detail?: string;
98
96
  on: string;
99
- summary?: string;
100
- message?: string;
101
97
  found?: unknown;
102
98
  property?: string;
103
99
  expected?: string;
104
100
  };
105
101
  };
102
+ error: never;
106
103
  };
107
104
  };
108
- } & {
109
- [x: string]: {
110
- get: {
111
- body: unknown;
112
- params: {};
113
- query: unknown;
114
- headers: unknown;
115
- response: {
116
- 200: Response;
117
- };
118
- };
119
- };
120
- }, {
121
- derive: {};
122
- resolve: {};
123
- schema: {};
124
- standaloneSchema: {};
125
- response: {};
126
- }, {
105
+ }, import("elysia/types").DefaultEphemeral, {
127
106
  derive: {};
128
- resolve: {};
129
107
  schema: {};
130
- standaloneSchema: {};
108
+ schemas: {};
131
109
  response: {};
132
- } & {
133
- derive: {};
134
- resolve: {};
135
- schema: {};
136
- standaloneSchema: {};
137
- response: {};
138
- }>;
110
+ error: [];
111
+ }, "get", `/${string}`, import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, `/${string}`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, ({ request }: {
112
+ body: unknown;
113
+ query: Record<string, string | undefined>;
114
+ params: {};
115
+ headers: Record<string, string | undefined>;
116
+ cookie: Record<string, import("elysia").Cookie<unknown>>;
117
+ server: import("elysia").Server | null;
118
+ redirect: import("elysia").redirect;
119
+ set: {
120
+ headers: import("elysia").HTTPHeaders;
121
+ status?: number | keyof import("elysia").StatusMap;
122
+ cookie?: Record<string, import("elysia").BaseCookie>;
123
+ };
124
+ 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 ? {
125
+ readonly 100: "Continue";
126
+ readonly 101: "Switching Protocols";
127
+ readonly 102: "Processing";
128
+ readonly 103: "Early Hints";
129
+ readonly 200: "OK";
130
+ readonly 201: "Created";
131
+ readonly 202: "Accepted";
132
+ readonly 203: "Non-Authoritative Information";
133
+ readonly 204: "No Content";
134
+ readonly 205: "Reset Content";
135
+ readonly 206: "Partial Content";
136
+ readonly 207: "Multi-Status";
137
+ readonly 208: "Already Reported";
138
+ readonly 300: "Multiple Choices";
139
+ readonly 301: "Moved Permanently";
140
+ readonly 302: "Found";
141
+ readonly 303: "See Other";
142
+ readonly 304: "Not Modified";
143
+ readonly 307: "Temporary Redirect";
144
+ readonly 308: "Permanent Redirect";
145
+ readonly 400: "Bad Request";
146
+ readonly 401: "Unauthorized";
147
+ readonly 402: "Payment Required";
148
+ readonly 403: "Forbidden";
149
+ readonly 404: "Not Found";
150
+ readonly 405: "Method Not Allowed";
151
+ readonly 406: "Not Acceptable";
152
+ readonly 407: "Proxy Authentication Required";
153
+ readonly 408: "Request Timeout";
154
+ readonly 409: "Conflict";
155
+ readonly 410: "Gone";
156
+ readonly 411: "Length Required";
157
+ readonly 412: "Precondition Failed";
158
+ readonly 413: "Payload Too Large";
159
+ readonly 414: "URI Too Long";
160
+ readonly 415: "Unsupported Media Type";
161
+ readonly 416: "Range Not Satisfiable";
162
+ readonly 417: "Expectation Failed";
163
+ readonly 418: "I'm a teapot";
164
+ readonly 420: "Enhance Your Calm";
165
+ readonly 421: "Misdirected Request";
166
+ readonly 422: "Unprocessable Content";
167
+ readonly 423: "Locked";
168
+ readonly 424: "Failed Dependency";
169
+ readonly 425: "Too Early";
170
+ readonly 426: "Upgrade Required";
171
+ readonly 428: "Precondition Required";
172
+ readonly 429: "Too Many Requests";
173
+ readonly 431: "Request Header Fields Too Large";
174
+ readonly 451: "Unavailable For Legal Reasons";
175
+ readonly 500: "Internal Server Error";
176
+ readonly 501: "Not Implemented";
177
+ readonly 502: "Bad Gateway";
178
+ readonly 503: "Service Unavailable";
179
+ readonly 504: "Gateway Timeout";
180
+ readonly 505: "HTTP Version Not Supported";
181
+ readonly 506: "Variant Also Negotiates";
182
+ readonly 507: "Insufficient Storage";
183
+ readonly 508: "Loop Detected";
184
+ readonly 510: "Not Extended";
185
+ readonly 511: "Network Authentication Required";
186
+ }[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" ? {
187
+ readonly Continue: 100;
188
+ readonly "Switching Protocols": 101;
189
+ readonly Processing: 102;
190
+ readonly "Early Hints": 103;
191
+ readonly OK: 200;
192
+ readonly Created: 201;
193
+ readonly Accepted: 202;
194
+ readonly "Non-Authoritative Information": 203;
195
+ readonly "No Content": 204;
196
+ readonly "Reset Content": 205;
197
+ readonly "Partial Content": 206;
198
+ readonly "Multi-Status": 207;
199
+ readonly "Already Reported": 208;
200
+ readonly "Multiple Choices": 300;
201
+ readonly "Moved Permanently": 301;
202
+ readonly Found: 302;
203
+ readonly "See Other": 303;
204
+ readonly "Not Modified": 304;
205
+ readonly "Temporary Redirect": 307;
206
+ readonly "Permanent Redirect": 308;
207
+ readonly "Bad Request": 400;
208
+ readonly Unauthorized: 401;
209
+ readonly "Payment Required": 402;
210
+ readonly Forbidden: 403;
211
+ readonly "Not Found": 404;
212
+ readonly "Method Not Allowed": 405;
213
+ readonly "Not Acceptable": 406;
214
+ readonly "Proxy Authentication Required": 407;
215
+ readonly "Request Timeout": 408;
216
+ readonly Conflict: 409;
217
+ readonly Gone: 410;
218
+ readonly "Length Required": 411;
219
+ readonly "Precondition Failed": 412;
220
+ readonly "Payload Too Large": 413;
221
+ readonly "URI Too Long": 414;
222
+ readonly "Unsupported Media Type": 415;
223
+ readonly "Range Not Satisfiable": 416;
224
+ readonly "Expectation Failed": 417;
225
+ readonly "I'm a teapot": 418;
226
+ readonly "Enhance Your Calm": 420;
227
+ readonly "Misdirected Request": 421;
228
+ readonly "Unprocessable Content": 422;
229
+ readonly Locked: 423;
230
+ readonly "Failed Dependency": 424;
231
+ readonly "Too Early": 425;
232
+ readonly "Upgrade Required": 426;
233
+ readonly "Precondition Required": 428;
234
+ readonly "Too Many Requests": 429;
235
+ readonly "Request Header Fields Too Large": 431;
236
+ readonly "Unavailable For Legal Reasons": 451;
237
+ readonly "Internal Server Error": 500;
238
+ readonly "Not Implemented": 501;
239
+ readonly "Bad Gateway": 502;
240
+ readonly "Service Unavailable": 503;
241
+ readonly "Gateway Timeout": 504;
242
+ readonly "HTTP Version Not Supported": 505;
243
+ readonly "Variant Also Negotiates": 506;
244
+ readonly "Insufficient Storage": 507;
245
+ readonly "Loop Detected": 508;
246
+ readonly "Not Extended": 510;
247
+ readonly "Network Authentication Required": 511;
248
+ }[Code] : Code>;
249
+ defer: (fn: import("elysia/types").AfterResponseHandler<NoInfer<import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, `/${string}`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>>, NoInfer<{
250
+ decorator: {};
251
+ store: {
252
+ session: SessionRecord<UserType>;
253
+ unregisteredSession: import("..").UnregisteredSessionRecord;
254
+ };
255
+ derive: {};
256
+ } & {
257
+ derive: {};
258
+ }>>) => import("elysia/types").MaybePromise<void>;
259
+ readonly path: string;
260
+ route?: string | undefined;
261
+ rid?: string | undefined;
262
+ request: Request;
263
+ store: {
264
+ session: SessionRecord<UserType>;
265
+ unregisteredSession: import("..").UnregisteredSessionRecord;
266
+ };
267
+ }) => Promise<Response>>;
139
268
  export {};
@@ -1,4 +1,3 @@
1
- import { Elysia } from 'elysia';
2
1
  import type { AuthSessionStore } from '../session/types';
3
2
  import type { SessionRecord } from '../types';
4
3
  import { type SamlAdapter, type SSOConfig } from './config';
@@ -7,25 +6,17 @@ type SamlRoutesProps<UserType> = SSOConfig<UserType> & {
7
6
  cookieSecure?: boolean;
8
7
  samlAdapter: SamlAdapter;
9
8
  };
10
- export declare const samlSsoRoutes: <UserType>({ authSessionStore, cookieSecure, getSsoUser, onSsoCallbackError, onSsoCallbackSuccess, samlAdapter, sessionDurationMs, ssoConnectionStore, ssoRoute }: SamlRoutesProps<UserType>) => Elysia<"", {
9
+ export declare const samlSsoRoutes: <UserType>({ authSessionStore, cookieSecure, getSsoUser, onSsoCallbackError, onSsoCallbackSuccess, samlAdapter, sessionDurationMs, ssoConnectionStore, ssoRoute }: SamlRoutesProps<UserType>) => import("elysia/types").AddRoute<"", "local", {
11
10
  decorator: {};
12
11
  store: {
13
12
  session: SessionRecord<UserType>;
14
13
  unregisteredSession: import("..").UnregisteredSessionRecord;
15
14
  };
16
15
  derive: {};
17
- resolve: {};
18
16
  }, {
19
17
  typebox: {};
20
- error: {};
21
- }, {
22
- schema: {};
23
- standaloneSchema: {};
24
- macro: {};
25
- macroFn: {};
26
- parser: {};
27
- response: {};
28
- }, {
18
+ error: [];
19
+ }, import("elysia/types").DefaultMetadata, {
29
20
  [x: string]: {
30
21
  get: {
31
22
  body: unknown;
@@ -39,14 +30,16 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, cookieSecure,
39
30
  200: Response;
40
31
  422: {
41
32
  type: "validation";
33
+ title: "Validation Error";
34
+ status: 422;
35
+ detail?: string;
42
36
  on: string;
43
- summary?: string;
44
- message?: string;
45
37
  found?: unknown;
46
38
  property?: string;
47
39
  expected?: string;
48
40
  };
49
41
  };
42
+ error: never;
50
43
  };
51
44
  };
52
45
  } & {
@@ -66,15 +59,17 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, cookieSecure,
66
59
  200: Response;
67
60
  422: {
68
61
  type: "validation";
62
+ title: "Validation Error";
63
+ status: 422;
64
+ detail?: string;
69
65
  on: string;
70
- summary?: string;
71
- message?: string;
72
66
  found?: unknown;
73
67
  property?: string;
74
68
  expected?: string;
75
69
  };
76
70
  500: "SAML sign-in failed";
77
71
  };
72
+ error: never;
78
73
  };
79
74
  };
80
75
  } & {
@@ -91,14 +86,16 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, cookieSecure,
91
86
  200: Response;
92
87
  422: {
93
88
  type: "validation";
89
+ title: "Validation Error";
90
+ status: 422;
91
+ detail?: string;
94
92
  on: string;
95
- summary?: string;
96
- message?: string;
97
93
  found?: unknown;
98
94
  property?: string;
99
95
  expected?: string;
100
96
  };
101
97
  };
98
+ error: never;
102
99
  };
103
100
  };
104
101
  } & {
@@ -114,66 +111,217 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, cookieSecure,
114
111
  200: Response;
115
112
  422: {
116
113
  type: "validation";
114
+ title: "Validation Error";
115
+ status: 422;
116
+ detail?: string;
117
117
  on: string;
118
- summary?: string;
119
- message?: string;
120
118
  found?: unknown;
121
119
  property?: string;
122
120
  expected?: string;
123
121
  };
124
122
  };
123
+ error: never;
125
124
  };
126
125
  };
127
- } & {
128
- [x: string]: {
129
- get: {
130
- body: unknown;
131
- params: {
132
- organizationId: string;
133
- };
134
- query: {
135
- RelayState?: string | undefined;
136
- SAMLResponse?: string | undefined;
137
- SAMLRequest?: string | undefined;
138
- SigAlg?: string | undefined;
139
- Signature?: string | undefined;
140
- };
141
- headers: unknown;
142
- response: {
143
- 400: "Missing SAMLRequest or SAMLResponse" | "Invalid SAML LogoutRequest";
144
- 501: "SAML Single Logout is not configured";
145
- 404: "No SAML connection is configured for this organization";
146
- 200: Response;
147
- 422: {
148
- type: "validation";
149
- on: string;
150
- summary?: string;
151
- message?: string;
152
- found?: unknown;
153
- property?: string;
154
- expected?: string;
155
- };
156
- 500: "SAML logout failed";
157
- };
158
- };
159
- };
160
- }, {
161
- derive: {};
162
- resolve: {};
163
- schema: {};
164
- standaloneSchema: {};
165
- response: {};
166
- }, {
167
- derive: {};
168
- resolve: {};
169
- schema: {};
170
- standaloneSchema: {};
171
- response: {};
172
- } & {
126
+ }, import("elysia/types").DefaultEphemeral, {
173
127
  derive: {};
174
- resolve: {};
175
128
  schema: {};
176
- standaloneSchema: {};
129
+ schemas: {};
177
130
  response: {};
178
- }>;
131
+ error: [];
132
+ }, "get", `/${string}`, import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
133
+ cookie: import("elysia").TCookieObject<{
134
+ user_session_id: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>>;
135
+ }>;
136
+ params: import("typebox").TObject<{
137
+ organizationId: import("typebox").TString;
138
+ }>;
139
+ query: import("typebox").TObject<{
140
+ RelayState: import("typebox").TOptional<import("typebox").TString>;
141
+ SAMLRequest: import("typebox").TOptional<import("typebox").TString>;
142
+ SAMLResponse: import("typebox").TOptional<import("typebox").TString>;
143
+ SigAlg: import("typebox").TOptional<import("typebox").TString>;
144
+ Signature: import("typebox").TOptional<import("typebox").TString>;
145
+ }>;
146
+ }, {}, `/${string}`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, ({ cookie: { user_session_id }, params: { organizationId }, query: { RelayState, SAMLRequest, SAMLResponse, SigAlg, Signature }, redirect, request, status, store: { session } }: {
147
+ body: unknown;
148
+ query: {
149
+ RelayState?: string | undefined;
150
+ SAMLResponse?: string | undefined;
151
+ SAMLRequest?: string | undefined;
152
+ SigAlg?: string | undefined;
153
+ Signature?: string | undefined;
154
+ };
155
+ params: {
156
+ organizationId: string;
157
+ };
158
+ headers: Record<string, string | undefined>;
159
+ cookie: Record<string, import("elysia").Cookie<unknown>> & {
160
+ user_session_id: import("elysia").Cookie<`${string}-${string}-${string}-${string}-${string}` | undefined>;
161
+ };
162
+ server: import("elysia").Server | null;
163
+ redirect: import("elysia").redirect;
164
+ set: {
165
+ headers: import("elysia").HTTPHeaders;
166
+ status?: number | keyof import("elysia").StatusMap;
167
+ cookie?: Record<string, import("elysia").BaseCookie>;
168
+ };
169
+ 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 ? {
170
+ readonly 100: "Continue";
171
+ readonly 101: "Switching Protocols";
172
+ readonly 102: "Processing";
173
+ readonly 103: "Early Hints";
174
+ readonly 200: "OK";
175
+ readonly 201: "Created";
176
+ readonly 202: "Accepted";
177
+ readonly 203: "Non-Authoritative Information";
178
+ readonly 204: "No Content";
179
+ readonly 205: "Reset Content";
180
+ readonly 206: "Partial Content";
181
+ readonly 207: "Multi-Status";
182
+ readonly 208: "Already Reported";
183
+ readonly 300: "Multiple Choices";
184
+ readonly 301: "Moved Permanently";
185
+ readonly 302: "Found";
186
+ readonly 303: "See Other";
187
+ readonly 304: "Not Modified";
188
+ readonly 307: "Temporary Redirect";
189
+ readonly 308: "Permanent Redirect";
190
+ readonly 400: "Bad Request";
191
+ readonly 401: "Unauthorized";
192
+ readonly 402: "Payment Required";
193
+ readonly 403: "Forbidden";
194
+ readonly 404: "Not Found";
195
+ readonly 405: "Method Not Allowed";
196
+ readonly 406: "Not Acceptable";
197
+ readonly 407: "Proxy Authentication Required";
198
+ readonly 408: "Request Timeout";
199
+ readonly 409: "Conflict";
200
+ readonly 410: "Gone";
201
+ readonly 411: "Length Required";
202
+ readonly 412: "Precondition Failed";
203
+ readonly 413: "Payload Too Large";
204
+ readonly 414: "URI Too Long";
205
+ readonly 415: "Unsupported Media Type";
206
+ readonly 416: "Range Not Satisfiable";
207
+ readonly 417: "Expectation Failed";
208
+ readonly 418: "I'm a teapot";
209
+ readonly 420: "Enhance Your Calm";
210
+ readonly 421: "Misdirected Request";
211
+ readonly 422: "Unprocessable Content";
212
+ readonly 423: "Locked";
213
+ readonly 424: "Failed Dependency";
214
+ readonly 425: "Too Early";
215
+ readonly 426: "Upgrade Required";
216
+ readonly 428: "Precondition Required";
217
+ readonly 429: "Too Many Requests";
218
+ readonly 431: "Request Header Fields Too Large";
219
+ readonly 451: "Unavailable For Legal Reasons";
220
+ readonly 500: "Internal Server Error";
221
+ readonly 501: "Not Implemented";
222
+ readonly 502: "Bad Gateway";
223
+ readonly 503: "Service Unavailable";
224
+ readonly 504: "Gateway Timeout";
225
+ readonly 505: "HTTP Version Not Supported";
226
+ readonly 506: "Variant Also Negotiates";
227
+ readonly 507: "Insufficient Storage";
228
+ readonly 508: "Loop Detected";
229
+ readonly 510: "Not Extended";
230
+ readonly 511: "Network Authentication Required";
231
+ }[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" ? {
232
+ readonly Continue: 100;
233
+ readonly "Switching Protocols": 101;
234
+ readonly Processing: 102;
235
+ readonly "Early Hints": 103;
236
+ readonly OK: 200;
237
+ readonly Created: 201;
238
+ readonly Accepted: 202;
239
+ readonly "Non-Authoritative Information": 203;
240
+ readonly "No Content": 204;
241
+ readonly "Reset Content": 205;
242
+ readonly "Partial Content": 206;
243
+ readonly "Multi-Status": 207;
244
+ readonly "Already Reported": 208;
245
+ readonly "Multiple Choices": 300;
246
+ readonly "Moved Permanently": 301;
247
+ readonly Found: 302;
248
+ readonly "See Other": 303;
249
+ readonly "Not Modified": 304;
250
+ readonly "Temporary Redirect": 307;
251
+ readonly "Permanent Redirect": 308;
252
+ readonly "Bad Request": 400;
253
+ readonly Unauthorized: 401;
254
+ readonly "Payment Required": 402;
255
+ readonly Forbidden: 403;
256
+ readonly "Not Found": 404;
257
+ readonly "Method Not Allowed": 405;
258
+ readonly "Not Acceptable": 406;
259
+ readonly "Proxy Authentication Required": 407;
260
+ readonly "Request Timeout": 408;
261
+ readonly Conflict: 409;
262
+ readonly Gone: 410;
263
+ readonly "Length Required": 411;
264
+ readonly "Precondition Failed": 412;
265
+ readonly "Payload Too Large": 413;
266
+ readonly "URI Too Long": 414;
267
+ readonly "Unsupported Media Type": 415;
268
+ readonly "Range Not Satisfiable": 416;
269
+ readonly "Expectation Failed": 417;
270
+ readonly "I'm a teapot": 418;
271
+ readonly "Enhance Your Calm": 420;
272
+ readonly "Misdirected Request": 421;
273
+ readonly "Unprocessable Content": 422;
274
+ readonly Locked: 423;
275
+ readonly "Failed Dependency": 424;
276
+ readonly "Too Early": 425;
277
+ readonly "Upgrade Required": 426;
278
+ readonly "Precondition Required": 428;
279
+ readonly "Too Many Requests": 429;
280
+ readonly "Request Header Fields Too Large": 431;
281
+ readonly "Unavailable For Legal Reasons": 451;
282
+ readonly "Internal Server Error": 500;
283
+ readonly "Not Implemented": 501;
284
+ readonly "Bad Gateway": 502;
285
+ readonly "Service Unavailable": 503;
286
+ readonly "Gateway Timeout": 504;
287
+ readonly "HTTP Version Not Supported": 505;
288
+ readonly "Variant Also Negotiates": 506;
289
+ readonly "Insufficient Storage": 507;
290
+ readonly "Loop Detected": 508;
291
+ readonly "Not Extended": 510;
292
+ readonly "Network Authentication Required": 511;
293
+ }[Code] : Code>;
294
+ defer: (fn: import("elysia/types").AfterResponseHandler<NoInfer<import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
295
+ cookie: import("elysia").TCookieObject<{
296
+ user_session_id: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>>;
297
+ }>;
298
+ params: import("typebox").TObject<{
299
+ organizationId: import("typebox").TString;
300
+ }>;
301
+ query: import("typebox").TObject<{
302
+ RelayState: import("typebox").TOptional<import("typebox").TString>;
303
+ SAMLRequest: import("typebox").TOptional<import("typebox").TString>;
304
+ SAMLResponse: import("typebox").TOptional<import("typebox").TString>;
305
+ SigAlg: import("typebox").TOptional<import("typebox").TString>;
306
+ Signature: import("typebox").TOptional<import("typebox").TString>;
307
+ }>;
308
+ }, {}, `/${string}`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>>, NoInfer<{
309
+ decorator: {};
310
+ store: {
311
+ session: SessionRecord<UserType>;
312
+ unregisteredSession: import("..").UnregisteredSessionRecord;
313
+ };
314
+ derive: {};
315
+ } & {
316
+ derive: {};
317
+ }>>) => import("elysia/types").MaybePromise<void>;
318
+ readonly path: string;
319
+ route?: string | undefined;
320
+ rid?: string | undefined;
321
+ request: Request;
322
+ store: {
323
+ session: SessionRecord<UserType>;
324
+ unregisteredSession: import("..").UnregisteredSessionRecord;
325
+ };
326
+ }) => Promise<Response | import("elysia").ElysiaStatus<"Not Found", "No SAML connection is configured for this organization", 404> | import("elysia").ElysiaStatus<"Internal Server Error", "SAML logout failed", 500> | import("elysia").ElysiaStatus<"Bad Request", "Missing SAMLRequest or SAMLResponse", 400> | import("elysia").ElysiaStatus<"Not Implemented", "SAML Single Logout is not configured", 501> | import("elysia").ElysiaStatus<"Bad Request", "Invalid SAML LogoutRequest", 400>>>;
179
327
  export {};
package/dist/typebox.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const authClientOption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
2
- export declare const authIntentOption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"login">, import("@sinclair/typebox").TLiteral<"link_identity">, import("@sinclair/typebox").TLiteral<"link_connector">]>>;
3
- export declare const authProviderOption: import("@sinclair/typebox").TString;
4
- export declare const userSessionIdTypebox: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
1
+ export declare const authClientOption: import("typebox").TOptional<import("typebox").TString>;
2
+ export declare const authIntentOption: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TLiteral<"login">, import("typebox").TLiteral<"link_identity">, import("typebox").TLiteral<"link_connector">]>>;
3
+ export declare const authProviderOption: import("typebox").TString;
4
+ export declare const userSessionIdTypebox: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;