@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/oidc/vciRoutes.d.ts
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
import { Elysia } from 'elysia';
|
|
2
1
|
import type { SigningKey } from './keys';
|
|
3
2
|
import { type VciConfig } from './vci';
|
|
4
3
|
export declare const vciRoutes: ({ issuerUrl, signingKey, vciConfig }: {
|
|
5
4
|
issuerUrl: string;
|
|
6
5
|
signingKey: SigningKey;
|
|
7
6
|
vciConfig: VciConfig;
|
|
8
|
-
}) =>
|
|
9
|
-
decorator: {};
|
|
10
|
-
store: {};
|
|
11
|
-
derive: {};
|
|
12
|
-
resolve: {};
|
|
13
|
-
}, {
|
|
7
|
+
}) => import("elysia/types").AddRoute<"", "local", import("elysia/types").DefaultSingleton, {
|
|
14
8
|
typebox: {};
|
|
15
|
-
error:
|
|
16
|
-
}, {
|
|
17
|
-
schema: {};
|
|
18
|
-
standaloneSchema: {};
|
|
19
|
-
macro: {};
|
|
20
|
-
macroFn: {};
|
|
21
|
-
parser: {};
|
|
22
|
-
response: {};
|
|
23
|
-
}, {
|
|
9
|
+
error: [];
|
|
10
|
+
}, import("elysia/types").DefaultMetadata, {
|
|
24
11
|
".well-known": {
|
|
25
12
|
"openid-credential-issuer": {
|
|
26
13
|
get: {
|
|
@@ -31,6 +18,7 @@ export declare const vciRoutes: ({ issuerUrl, signingKey, vciConfig }: {
|
|
|
31
18
|
response: {
|
|
32
19
|
200: Response;
|
|
33
20
|
};
|
|
21
|
+
error: never;
|
|
34
22
|
};
|
|
35
23
|
};
|
|
36
24
|
};
|
|
@@ -52,41 +40,17 @@ export declare const vciRoutes: ({ issuerUrl, signingKey, vciConfig }: {
|
|
|
52
40
|
200: Response;
|
|
53
41
|
422: {
|
|
54
42
|
type: "validation";
|
|
43
|
+
title: "Validation Error";
|
|
44
|
+
status: 422;
|
|
45
|
+
detail?: string;
|
|
55
46
|
on: string;
|
|
56
|
-
summary?: string;
|
|
57
|
-
message?: string;
|
|
58
47
|
found?: unknown;
|
|
59
48
|
property?: string;
|
|
60
49
|
expected?: string;
|
|
61
50
|
};
|
|
62
51
|
};
|
|
52
|
+
error: never;
|
|
63
53
|
};
|
|
64
54
|
};
|
|
65
55
|
};
|
|
66
|
-
}
|
|
67
|
-
[x: string]: {
|
|
68
|
-
nonce: {
|
|
69
|
-
post: {
|
|
70
|
-
body: unknown;
|
|
71
|
-
params: {};
|
|
72
|
-
query: unknown;
|
|
73
|
-
headers: unknown;
|
|
74
|
-
response: {
|
|
75
|
-
200: Response;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
}, {
|
|
81
|
-
derive: {};
|
|
82
|
-
resolve: {};
|
|
83
|
-
schema: {};
|
|
84
|
-
standaloneSchema: {};
|
|
85
|
-
response: {};
|
|
86
|
-
}, {
|
|
87
|
-
derive: {};
|
|
88
|
-
resolve: {};
|
|
89
|
-
schema: {};
|
|
90
|
-
standaloneSchema: {};
|
|
91
|
-
response: {};
|
|
92
|
-
}>;
|
|
56
|
+
}, import("elysia/types").DefaultEphemeral, import("elysia/types").DefaultEphemeral, "post", `/${string}/nonce`, import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, `/${string}/nonce`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, () => Promise<Response>>;
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
import { Elysia } from 'elysia';
|
|
2
1
|
import type { SessionRecord } from '../types';
|
|
3
2
|
import { type OrganizationsRouteProps } from './config';
|
|
4
|
-
export declare const organizationRoutes: <UserType>({ authSessionStore, canCreateOrganization, canManageMembers, emit, getUserId, invitationDurationMs, onMembershipAdded, onMembershipRemoved, onOrganizationCreated, onSendInvitation, organizationsRoute, organizationStore, ownerRoles }: OrganizationsRouteProps<UserType>) =>
|
|
3
|
+
export declare const organizationRoutes: <UserType>({ authSessionStore, canCreateOrganization, canManageMembers, emit, getUserId, invitationDurationMs, onMembershipAdded, onMembershipRemoved, onOrganizationCreated, onSendInvitation, organizationsRoute, organizationStore, ownerRoles }: OrganizationsRouteProps<UserType>) => import("elysia/types").AddRoute<"", "local", {
|
|
5
4
|
decorator: {};
|
|
6
5
|
store: {
|
|
7
6
|
session: SessionRecord<UserType>;
|
|
8
7
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
9
8
|
};
|
|
10
9
|
derive: {};
|
|
11
|
-
resolve: {};
|
|
12
10
|
}, {
|
|
13
11
|
typebox: {};
|
|
14
|
-
error:
|
|
15
|
-
}, {
|
|
16
|
-
schema: {};
|
|
17
|
-
standaloneSchema: {};
|
|
18
|
-
macro: {};
|
|
19
|
-
macroFn: {};
|
|
20
|
-
parser: {};
|
|
21
|
-
response: {};
|
|
22
|
-
}, {
|
|
12
|
+
error: [];
|
|
13
|
+
}, import("elysia/types").DefaultMetadata, {
|
|
23
14
|
[x: string]: {
|
|
24
15
|
get: {
|
|
25
16
|
body: unknown;
|
|
@@ -36,21 +27,23 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
36
27
|
};
|
|
37
28
|
422: {
|
|
38
29
|
type: "validation";
|
|
30
|
+
title: "Validation Error";
|
|
31
|
+
status: 422;
|
|
32
|
+
detail?: string;
|
|
39
33
|
on: string;
|
|
40
|
-
summary?: string;
|
|
41
|
-
message?: string;
|
|
42
34
|
found?: unknown;
|
|
43
35
|
property?: string;
|
|
44
36
|
expected?: string;
|
|
45
37
|
};
|
|
46
38
|
};
|
|
39
|
+
error: never;
|
|
47
40
|
};
|
|
48
41
|
};
|
|
49
42
|
} & {
|
|
50
43
|
[x: string]: {
|
|
51
44
|
post: {
|
|
52
45
|
body: {
|
|
53
|
-
metadata?:
|
|
46
|
+
metadata?: Record<string, unknown> | undefined;
|
|
54
47
|
name: string;
|
|
55
48
|
};
|
|
56
49
|
params: {};
|
|
@@ -64,14 +57,16 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
64
57
|
};
|
|
65
58
|
422: {
|
|
66
59
|
type: "validation";
|
|
60
|
+
title: "Validation Error";
|
|
61
|
+
status: 422;
|
|
62
|
+
detail?: string;
|
|
67
63
|
on: string;
|
|
68
|
-
summary?: string;
|
|
69
|
-
message?: string;
|
|
70
64
|
found?: unknown;
|
|
71
65
|
property?: string;
|
|
72
66
|
expected?: string;
|
|
73
67
|
};
|
|
74
68
|
};
|
|
69
|
+
error: never;
|
|
75
70
|
};
|
|
76
71
|
};
|
|
77
72
|
} & {
|
|
@@ -97,14 +92,16 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
97
92
|
};
|
|
98
93
|
422: {
|
|
99
94
|
type: "validation";
|
|
95
|
+
title: "Validation Error";
|
|
96
|
+
status: 422;
|
|
97
|
+
detail?: string;
|
|
100
98
|
on: string;
|
|
101
|
-
summary?: string;
|
|
102
|
-
message?: string;
|
|
103
99
|
found?: unknown;
|
|
104
100
|
property?: string;
|
|
105
101
|
expected?: string;
|
|
106
102
|
};
|
|
107
103
|
};
|
|
104
|
+
error: never;
|
|
108
105
|
};
|
|
109
106
|
};
|
|
110
107
|
};
|
|
@@ -134,14 +131,16 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
134
131
|
};
|
|
135
132
|
422: {
|
|
136
133
|
type: "validation";
|
|
134
|
+
title: "Validation Error";
|
|
135
|
+
status: 422;
|
|
136
|
+
detail?: string;
|
|
137
137
|
on: string;
|
|
138
|
-
summary?: string;
|
|
139
|
-
message?: string;
|
|
140
138
|
found?: unknown;
|
|
141
139
|
property?: string;
|
|
142
140
|
expected?: string;
|
|
143
141
|
};
|
|
144
142
|
};
|
|
143
|
+
error: never;
|
|
145
144
|
};
|
|
146
145
|
};
|
|
147
146
|
};
|
|
@@ -168,14 +167,16 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
168
167
|
};
|
|
169
168
|
422: {
|
|
170
169
|
type: "validation";
|
|
170
|
+
title: "Validation Error";
|
|
171
|
+
status: 422;
|
|
172
|
+
detail?: string;
|
|
171
173
|
on: string;
|
|
172
|
-
summary?: string;
|
|
173
|
-
message?: string;
|
|
174
174
|
found?: unknown;
|
|
175
175
|
property?: string;
|
|
176
176
|
expected?: string;
|
|
177
177
|
};
|
|
178
178
|
};
|
|
179
|
+
error: never;
|
|
179
180
|
};
|
|
180
181
|
};
|
|
181
182
|
};
|
|
@@ -201,14 +202,16 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
201
202
|
};
|
|
202
203
|
422: {
|
|
203
204
|
type: "validation";
|
|
205
|
+
title: "Validation Error";
|
|
206
|
+
status: 422;
|
|
207
|
+
detail?: string;
|
|
204
208
|
on: string;
|
|
205
|
-
summary?: string;
|
|
206
|
-
message?: string;
|
|
207
209
|
found?: unknown;
|
|
208
210
|
property?: string;
|
|
209
211
|
expected?: string;
|
|
210
212
|
};
|
|
211
213
|
};
|
|
214
|
+
error: never;
|
|
212
215
|
};
|
|
213
216
|
};
|
|
214
217
|
};
|
|
@@ -232,68 +235,203 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
232
235
|
};
|
|
233
236
|
422: {
|
|
234
237
|
type: "validation";
|
|
238
|
+
title: "Validation Error";
|
|
239
|
+
status: 422;
|
|
240
|
+
detail?: string;
|
|
235
241
|
on: string;
|
|
236
|
-
summary?: string;
|
|
237
|
-
message?: string;
|
|
238
242
|
found?: unknown;
|
|
239
243
|
property?: string;
|
|
240
244
|
expected?: string;
|
|
241
245
|
};
|
|
242
246
|
};
|
|
247
|
+
error: never;
|
|
243
248
|
};
|
|
244
249
|
};
|
|
245
250
|
};
|
|
246
251
|
};
|
|
247
|
-
}
|
|
248
|
-
[x: string]: {
|
|
249
|
-
":organizationId": {
|
|
250
|
-
members: {
|
|
251
|
-
":userId": {
|
|
252
|
-
delete: {
|
|
253
|
-
body: unknown;
|
|
254
|
-
params: {
|
|
255
|
-
userId: string;
|
|
256
|
-
organizationId: string;
|
|
257
|
-
};
|
|
258
|
-
query: unknown;
|
|
259
|
-
headers: unknown;
|
|
260
|
-
response: {
|
|
261
|
-
401: "Authentication required";
|
|
262
|
-
403: "Cannot manage members";
|
|
263
|
-
200: {
|
|
264
|
-
readonly removed: string;
|
|
265
|
-
};
|
|
266
|
-
422: {
|
|
267
|
-
type: "validation";
|
|
268
|
-
on: string;
|
|
269
|
-
summary?: string;
|
|
270
|
-
message?: string;
|
|
271
|
-
found?: unknown;
|
|
272
|
-
property?: string;
|
|
273
|
-
expected?: string;
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
}, {
|
|
282
|
-
derive: {};
|
|
283
|
-
resolve: {};
|
|
284
|
-
schema: {};
|
|
285
|
-
standaloneSchema: {};
|
|
286
|
-
response: {};
|
|
287
|
-
}, {
|
|
252
|
+
}, import("elysia/types").DefaultEphemeral, {
|
|
288
253
|
derive: {};
|
|
289
|
-
resolve: {};
|
|
290
254
|
schema: {};
|
|
291
|
-
|
|
255
|
+
schemas: {};
|
|
292
256
|
response: {};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
257
|
+
error: [];
|
|
258
|
+
}, "delete", `/${string}/:organizationId/members/:userId`, import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
|
|
259
|
+
cookie: import("elysia").TCookieObject<{
|
|
260
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
261
|
+
}>;
|
|
262
|
+
params: import("typebox").TObject<{
|
|
263
|
+
organizationId: import("typebox").TString;
|
|
264
|
+
userId: import("typebox").TString;
|
|
265
|
+
}>;
|
|
266
|
+
}, {}, `/${string}/:organizationId/members/:userId`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, ({ cookie: { user_session_id }, params: { organizationId, userId }, status, store: { session } }: {
|
|
267
|
+
body: unknown;
|
|
268
|
+
query: Record<string, string | undefined>;
|
|
269
|
+
params: {
|
|
270
|
+
userId: string;
|
|
271
|
+
organizationId: string;
|
|
272
|
+
};
|
|
273
|
+
headers: Record<string, string | undefined>;
|
|
274
|
+
cookie: Record<string, import("elysia").Cookie<unknown>> & {
|
|
275
|
+
user_session_id: import("elysia").Cookie<`${string}-${string}-${string}-${string}-${string}` | undefined>;
|
|
276
|
+
};
|
|
277
|
+
server: import("elysia").Server | null;
|
|
278
|
+
redirect: import("elysia").redirect;
|
|
279
|
+
set: {
|
|
280
|
+
headers: import("elysia").HTTPHeaders;
|
|
281
|
+
status?: number | keyof import("elysia").StatusMap;
|
|
282
|
+
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
283
|
+
};
|
|
284
|
+
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 ? {
|
|
285
|
+
readonly 100: "Continue";
|
|
286
|
+
readonly 101: "Switching Protocols";
|
|
287
|
+
readonly 102: "Processing";
|
|
288
|
+
readonly 103: "Early Hints";
|
|
289
|
+
readonly 200: "OK";
|
|
290
|
+
readonly 201: "Created";
|
|
291
|
+
readonly 202: "Accepted";
|
|
292
|
+
readonly 203: "Non-Authoritative Information";
|
|
293
|
+
readonly 204: "No Content";
|
|
294
|
+
readonly 205: "Reset Content";
|
|
295
|
+
readonly 206: "Partial Content";
|
|
296
|
+
readonly 207: "Multi-Status";
|
|
297
|
+
readonly 208: "Already Reported";
|
|
298
|
+
readonly 300: "Multiple Choices";
|
|
299
|
+
readonly 301: "Moved Permanently";
|
|
300
|
+
readonly 302: "Found";
|
|
301
|
+
readonly 303: "See Other";
|
|
302
|
+
readonly 304: "Not Modified";
|
|
303
|
+
readonly 307: "Temporary Redirect";
|
|
304
|
+
readonly 308: "Permanent Redirect";
|
|
305
|
+
readonly 400: "Bad Request";
|
|
306
|
+
readonly 401: "Unauthorized";
|
|
307
|
+
readonly 402: "Payment Required";
|
|
308
|
+
readonly 403: "Forbidden";
|
|
309
|
+
readonly 404: "Not Found";
|
|
310
|
+
readonly 405: "Method Not Allowed";
|
|
311
|
+
readonly 406: "Not Acceptable";
|
|
312
|
+
readonly 407: "Proxy Authentication Required";
|
|
313
|
+
readonly 408: "Request Timeout";
|
|
314
|
+
readonly 409: "Conflict";
|
|
315
|
+
readonly 410: "Gone";
|
|
316
|
+
readonly 411: "Length Required";
|
|
317
|
+
readonly 412: "Precondition Failed";
|
|
318
|
+
readonly 413: "Payload Too Large";
|
|
319
|
+
readonly 414: "URI Too Long";
|
|
320
|
+
readonly 415: "Unsupported Media Type";
|
|
321
|
+
readonly 416: "Range Not Satisfiable";
|
|
322
|
+
readonly 417: "Expectation Failed";
|
|
323
|
+
readonly 418: "I'm a teapot";
|
|
324
|
+
readonly 420: "Enhance Your Calm";
|
|
325
|
+
readonly 421: "Misdirected Request";
|
|
326
|
+
readonly 422: "Unprocessable Content";
|
|
327
|
+
readonly 423: "Locked";
|
|
328
|
+
readonly 424: "Failed Dependency";
|
|
329
|
+
readonly 425: "Too Early";
|
|
330
|
+
readonly 426: "Upgrade Required";
|
|
331
|
+
readonly 428: "Precondition Required";
|
|
332
|
+
readonly 429: "Too Many Requests";
|
|
333
|
+
readonly 431: "Request Header Fields Too Large";
|
|
334
|
+
readonly 451: "Unavailable For Legal Reasons";
|
|
335
|
+
readonly 500: "Internal Server Error";
|
|
336
|
+
readonly 501: "Not Implemented";
|
|
337
|
+
readonly 502: "Bad Gateway";
|
|
338
|
+
readonly 503: "Service Unavailable";
|
|
339
|
+
readonly 504: "Gateway Timeout";
|
|
340
|
+
readonly 505: "HTTP Version Not Supported";
|
|
341
|
+
readonly 506: "Variant Also Negotiates";
|
|
342
|
+
readonly 507: "Insufficient Storage";
|
|
343
|
+
readonly 508: "Loop Detected";
|
|
344
|
+
readonly 510: "Not Extended";
|
|
345
|
+
readonly 511: "Network Authentication Required";
|
|
346
|
+
}[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" ? {
|
|
347
|
+
readonly Continue: 100;
|
|
348
|
+
readonly "Switching Protocols": 101;
|
|
349
|
+
readonly Processing: 102;
|
|
350
|
+
readonly "Early Hints": 103;
|
|
351
|
+
readonly OK: 200;
|
|
352
|
+
readonly Created: 201;
|
|
353
|
+
readonly Accepted: 202;
|
|
354
|
+
readonly "Non-Authoritative Information": 203;
|
|
355
|
+
readonly "No Content": 204;
|
|
356
|
+
readonly "Reset Content": 205;
|
|
357
|
+
readonly "Partial Content": 206;
|
|
358
|
+
readonly "Multi-Status": 207;
|
|
359
|
+
readonly "Already Reported": 208;
|
|
360
|
+
readonly "Multiple Choices": 300;
|
|
361
|
+
readonly "Moved Permanently": 301;
|
|
362
|
+
readonly Found: 302;
|
|
363
|
+
readonly "See Other": 303;
|
|
364
|
+
readonly "Not Modified": 304;
|
|
365
|
+
readonly "Temporary Redirect": 307;
|
|
366
|
+
readonly "Permanent Redirect": 308;
|
|
367
|
+
readonly "Bad Request": 400;
|
|
368
|
+
readonly Unauthorized: 401;
|
|
369
|
+
readonly "Payment Required": 402;
|
|
370
|
+
readonly Forbidden: 403;
|
|
371
|
+
readonly "Not Found": 404;
|
|
372
|
+
readonly "Method Not Allowed": 405;
|
|
373
|
+
readonly "Not Acceptable": 406;
|
|
374
|
+
readonly "Proxy Authentication Required": 407;
|
|
375
|
+
readonly "Request Timeout": 408;
|
|
376
|
+
readonly Conflict: 409;
|
|
377
|
+
readonly Gone: 410;
|
|
378
|
+
readonly "Length Required": 411;
|
|
379
|
+
readonly "Precondition Failed": 412;
|
|
380
|
+
readonly "Payload Too Large": 413;
|
|
381
|
+
readonly "URI Too Long": 414;
|
|
382
|
+
readonly "Unsupported Media Type": 415;
|
|
383
|
+
readonly "Range Not Satisfiable": 416;
|
|
384
|
+
readonly "Expectation Failed": 417;
|
|
385
|
+
readonly "I'm a teapot": 418;
|
|
386
|
+
readonly "Enhance Your Calm": 420;
|
|
387
|
+
readonly "Misdirected Request": 421;
|
|
388
|
+
readonly "Unprocessable Content": 422;
|
|
389
|
+
readonly Locked: 423;
|
|
390
|
+
readonly "Failed Dependency": 424;
|
|
391
|
+
readonly "Too Early": 425;
|
|
392
|
+
readonly "Upgrade Required": 426;
|
|
393
|
+
readonly "Precondition Required": 428;
|
|
394
|
+
readonly "Too Many Requests": 429;
|
|
395
|
+
readonly "Request Header Fields Too Large": 431;
|
|
396
|
+
readonly "Unavailable For Legal Reasons": 451;
|
|
397
|
+
readonly "Internal Server Error": 500;
|
|
398
|
+
readonly "Not Implemented": 501;
|
|
399
|
+
readonly "Bad Gateway": 502;
|
|
400
|
+
readonly "Service Unavailable": 503;
|
|
401
|
+
readonly "Gateway Timeout": 504;
|
|
402
|
+
readonly "HTTP Version Not Supported": 505;
|
|
403
|
+
readonly "Variant Also Negotiates": 506;
|
|
404
|
+
readonly "Insufficient Storage": 507;
|
|
405
|
+
readonly "Loop Detected": 508;
|
|
406
|
+
readonly "Not Extended": 510;
|
|
407
|
+
readonly "Network Authentication Required": 511;
|
|
408
|
+
}[Code] : Code>;
|
|
409
|
+
defer: (fn: import("elysia/types").AfterResponseHandler<NoInfer<import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
|
|
410
|
+
cookie: import("elysia").TCookieObject<{
|
|
411
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
412
|
+
}>;
|
|
413
|
+
params: import("typebox").TObject<{
|
|
414
|
+
organizationId: import("typebox").TString;
|
|
415
|
+
userId: import("typebox").TString;
|
|
416
|
+
}>;
|
|
417
|
+
}, {}, `/${string}/:organizationId/members/:userId`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>>, NoInfer<{
|
|
418
|
+
decorator: {};
|
|
419
|
+
store: {
|
|
420
|
+
session: SessionRecord<UserType>;
|
|
421
|
+
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
422
|
+
};
|
|
423
|
+
derive: {};
|
|
424
|
+
} & {
|
|
425
|
+
derive: {};
|
|
426
|
+
}>>) => import("elysia/types").MaybePromise<void>;
|
|
427
|
+
readonly path: string;
|
|
428
|
+
route?: string | undefined;
|
|
429
|
+
rid?: string | undefined;
|
|
430
|
+
request: Request;
|
|
431
|
+
store: {
|
|
432
|
+
session: SessionRecord<UserType>;
|
|
433
|
+
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
434
|
+
};
|
|
435
|
+
}) => Promise<import("elysia").ElysiaStatus<"Unauthorized", "Authentication required", 401> | import("elysia").ElysiaStatus<"Forbidden", "Cannot manage members", 403> | import("elysia").ElysiaStatus<"OK", {
|
|
436
|
+
readonly removed: string;
|
|
437
|
+
}, 200>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
2
|
import type { SessionRecord } from '../types';
|
|
3
3
|
import { type PasswordlessRouteProps } from './config';
|
|
4
|
-
export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSecure, emit, getUserByEmail, getUserId, magicLinkTokenDurationMs, onCreateUser, onPasswordlessLogin, onSendMagicLink, onSendOtp, otpDurationMs, otpLength, passwordlessRoute, passwordlessTokenStore, sessionDurationMs }: PasswordlessRouteProps<UserType>) => Elysia<"", {
|
|
4
|
+
export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSecure, emit, getUserByEmail, getUserId, magicLinkTokenDurationMs, onCreateUser, onPasswordlessLogin, onSendMagicLink, onSendOtp, otpDurationMs, otpLength, passwordlessRoute, passwordlessTokenStore, sessionDurationMs }: PasswordlessRouteProps<UserType>) => Elysia<"", "local", {
|
|
5
5
|
decorator: {};
|
|
6
6
|
store: {} | {
|
|
7
7
|
session: SessionRecord<UserType>;
|
|
@@ -14,18 +14,10 @@ export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSe
|
|
|
14
14
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
15
15
|
};
|
|
16
16
|
derive: {};
|
|
17
|
-
resolve: {};
|
|
18
17
|
}, {
|
|
19
18
|
typebox: {};
|
|
20
|
-
error:
|
|
21
|
-
}, {
|
|
22
|
-
schema: {};
|
|
23
|
-
standaloneSchema: {};
|
|
24
|
-
macro: {};
|
|
25
|
-
macroFn: {};
|
|
26
|
-
parser: {};
|
|
27
|
-
response: {};
|
|
28
|
-
}, ({} | ({
|
|
19
|
+
error: [];
|
|
20
|
+
}, import("elysia/types").DefaultMetadata, ({} | ({
|
|
29
21
|
[x: string]: {
|
|
30
22
|
"magic-link": {
|
|
31
23
|
post: {
|
|
@@ -41,14 +33,16 @@ export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSe
|
|
|
41
33
|
};
|
|
42
34
|
422: {
|
|
43
35
|
type: "validation";
|
|
36
|
+
title: "Validation Error";
|
|
37
|
+
status: 422;
|
|
38
|
+
detail?: string;
|
|
44
39
|
on: string;
|
|
45
|
-
summary?: string;
|
|
46
|
-
message?: string;
|
|
47
40
|
found?: unknown;
|
|
48
41
|
property?: string;
|
|
49
42
|
expected?: string;
|
|
50
43
|
};
|
|
51
44
|
};
|
|
45
|
+
error: never;
|
|
52
46
|
};
|
|
53
47
|
};
|
|
54
48
|
};
|
|
@@ -71,14 +65,16 @@ export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSe
|
|
|
71
65
|
};
|
|
72
66
|
422: {
|
|
73
67
|
type: "validation";
|
|
68
|
+
title: "Validation Error";
|
|
69
|
+
status: 422;
|
|
70
|
+
detail?: string;
|
|
74
71
|
on: string;
|
|
75
|
-
summary?: string;
|
|
76
|
-
message?: string;
|
|
77
72
|
found?: unknown;
|
|
78
73
|
property?: string;
|
|
79
74
|
expected?: string;
|
|
80
75
|
};
|
|
81
76
|
};
|
|
77
|
+
error: never;
|
|
82
78
|
};
|
|
83
79
|
};
|
|
84
80
|
};
|
|
@@ -99,14 +95,16 @@ export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSe
|
|
|
99
95
|
};
|
|
100
96
|
422: {
|
|
101
97
|
type: "validation";
|
|
98
|
+
title: "Validation Error";
|
|
99
|
+
status: 422;
|
|
100
|
+
detail?: string;
|
|
102
101
|
on: string;
|
|
103
|
-
summary?: string;
|
|
104
|
-
message?: string;
|
|
105
102
|
found?: unknown;
|
|
106
103
|
property?: string;
|
|
107
104
|
expected?: string;
|
|
108
105
|
};
|
|
109
106
|
};
|
|
107
|
+
error: never;
|
|
110
108
|
};
|
|
111
109
|
};
|
|
112
110
|
};
|
|
@@ -130,34 +128,24 @@ export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSe
|
|
|
130
128
|
};
|
|
131
129
|
422: {
|
|
132
130
|
type: "validation";
|
|
131
|
+
title: "Validation Error";
|
|
132
|
+
status: 422;
|
|
133
|
+
detail?: string;
|
|
133
134
|
on: string;
|
|
134
|
-
summary?: string;
|
|
135
|
-
message?: string;
|
|
136
135
|
found?: unknown;
|
|
137
136
|
property?: string;
|
|
138
137
|
expected?: string;
|
|
139
138
|
};
|
|
140
139
|
};
|
|
140
|
+
error: never;
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
|
-
})), {
|
|
146
|
-
derive: {};
|
|
147
|
-
resolve: {};
|
|
148
|
-
schema: {};
|
|
149
|
-
standaloneSchema: {};
|
|
150
|
-
response: {};
|
|
151
|
-
}, {
|
|
152
|
-
derive: {};
|
|
153
|
-
resolve: {};
|
|
154
|
-
schema: {};
|
|
155
|
-
standaloneSchema: {};
|
|
156
|
-
response: {};
|
|
157
|
-
} & {
|
|
145
|
+
})), import("elysia/types").DefaultEphemeral, {
|
|
158
146
|
derive: {};
|
|
159
|
-
resolve: {};
|
|
160
147
|
schema: {};
|
|
161
|
-
|
|
148
|
+
schemas: {};
|
|
162
149
|
response: {};
|
|
150
|
+
error: [];
|
|
163
151
|
}>;
|