@absolutejs/auth 0.73.0 → 0.74.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/README.md +24 -0
- package/dist/apikeys/routes.d.ts +1 -1
- package/dist/authContext.d.ts +5 -5
- package/dist/authorization/protectPermission.d.ts +2 -2
- package/dist/client/index.js +7 -1
- package/dist/client/index.js.map +3 -3
- package/dist/client/mobile.d.ts +2 -0
- package/dist/client/mobile.js +7 -1
- package/dist/client/mobile.js.map +3 -3
- package/dist/compliance/routes.d.ts +1 -1
- package/dist/credentials/emailVerification.d.ts +1 -1
- package/dist/credentials/login.d.ts +1 -1
- package/dist/credentials/passwordReset.d.ts +1 -1
- package/dist/credentials/register.d.ts +1 -1
- package/dist/htmx/configuredRoutes.d.ts +5 -5
- package/dist/htmx/routes.d.ts +5 -5
- package/dist/index.d.ts +13 -12
- package/dist/index.js +1466 -1360
- package/dist/index.js.map +6 -5
- package/dist/mfa/challenge.d.ts +1 -1
- package/dist/mfa/management.d.ts +1 -1
- package/dist/mfa/sms.d.ts +1 -1
- package/dist/mfa/totp.d.ts +1 -1
- package/dist/nativePush.d.ts +288 -0
- package/dist/organizations/routes.d.ts +1 -1
- package/dist/portal/routes.d.ts +1 -1
- package/dist/roles/routes.d.ts +1 -1
- package/dist/routes/authorize.d.ts +1 -1
- package/dist/routes/callback.d.ts +1 -1
- package/dist/routes/profile.d.ts +1 -1
- package/dist/routes/protectRoute.d.ts +2 -2
- package/dist/routes/refresh.d.ts +1 -1
- package/dist/routes/revoke.d.ts +1 -1
- package/dist/routes/sessions.d.ts +1 -1
- package/dist/routes/signout.d.ts +1 -1
- package/dist/routes/userStatus.d.ts +1 -1
- package/dist/scim/routes.d.ts +1 -1
- package/dist/server.js +1464 -1360
- package/dist/server.js.map +6 -5
- package/dist/sso/discoveryRoute.d.ts +1 -1
- package/dist/sso/oidcRoutes.d.ts +1 -1
- package/dist/sso/samlIdpRoutes.d.ts +1 -1
- package/dist/sso/samlRoutes.d.ts +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/vc/statusListRoutes.d.ts +1 -1
- package/dist/vc/vpRoutes.d.ts +1 -1
- package/dist/webauthn/adapter.d.ts +1 -0
- package/dist/webauthn/routes.d.ts +1 -1
- package/dist/webauthn.js +3 -1
- package/dist/webauthn.js.map +3 -3
- package/package.json +1 -1
package/dist/mfa/challenge.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare const mfaChallenge: <UserType>({ authSessionStore, challengeRoute
|
|
|
43
43
|
status?: number | keyof import("elysia").StatusMap;
|
|
44
44
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
45
45
|
};
|
|
46
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
46
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
47
47
|
readonly 100: "Continue";
|
|
48
48
|
readonly 101: "Switching Protocols";
|
|
49
49
|
readonly 102: "Processing";
|
package/dist/mfa/management.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare const mfaManagementRoutes: <UserType>({ authSessionStore, getUser
|
|
|
79
79
|
status?: number | keyof import("elysia").StatusMap;
|
|
80
80
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
81
81
|
};
|
|
82
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
82
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
83
83
|
readonly 100: "Continue";
|
|
84
84
|
readonly 101: "Switching Protocols";
|
|
85
85
|
readonly 102: "Processing";
|
package/dist/mfa/sms.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare const mfaSmsRoutes: <UserType>({ authSessionStore, getUserId, mfa
|
|
|
116
116
|
status?: number | keyof import("elysia").StatusMap;
|
|
117
117
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
118
118
|
};
|
|
119
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
119
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
120
120
|
readonly 100: "Continue";
|
|
121
121
|
readonly 101: "Switching Protocols";
|
|
122
122
|
readonly 102: "Processing";
|
package/dist/mfa/totp.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export declare const mfaTotpRoutes: <UserType>({ authSessionStore, backupCodeCou
|
|
|
66
66
|
status?: number | keyof import("elysia").StatusMap;
|
|
67
67
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
68
68
|
};
|
|
69
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
69
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
70
70
|
readonly 100: "Continue";
|
|
71
71
|
readonly 101: "Switching Protocols";
|
|
72
72
|
readonly 102: "Processing";
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type { AuthSessionSource } from './session/types';
|
|
2
|
+
import { type AccessTokenPrincipalConfig, type AuthPrincipal } from './principal';
|
|
3
|
+
export declare const DEFAULT_NATIVE_PUSH_ROUTE: "/auth/mobile/push";
|
|
4
|
+
export type NativePushPlatform = 'apns' | 'fcm';
|
|
5
|
+
export type NativePushRegistrationInput = {
|
|
6
|
+
/** Opaque server-issued installation identity, absent on first registration. */
|
|
7
|
+
installationId?: string;
|
|
8
|
+
locale?: string;
|
|
9
|
+
platform: NativePushPlatform;
|
|
10
|
+
tenant: string;
|
|
11
|
+
token: string;
|
|
12
|
+
topics: readonly string[];
|
|
13
|
+
userId: string;
|
|
14
|
+
};
|
|
15
|
+
export type NativePushRemovalInput = {
|
|
16
|
+
installationId: string;
|
|
17
|
+
tenant: string;
|
|
18
|
+
userId: string;
|
|
19
|
+
};
|
|
20
|
+
export type NativePushRegistrar = {
|
|
21
|
+
/** Must verify ownership when installationId is present. */
|
|
22
|
+
registerInstallation(input: NativePushRegistrationInput): Promise<{
|
|
23
|
+
installationId: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** Remove every provider token for this authenticated installation identity. */
|
|
26
|
+
removeInstallation(input: NativePushRemovalInput): Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
export type NativePushConfig<UserType> = {
|
|
29
|
+
registrar: NativePushRegistrar;
|
|
30
|
+
/** Server-owned tenant identity. Clients cannot submit or override it. */
|
|
31
|
+
tenant: string | ((principal: AuthPrincipal<UserType>) => Promise<string> | string);
|
|
32
|
+
/** Server-owned topics. Clients cannot subscribe themselves to arbitrary topics. */
|
|
33
|
+
topics?: (principal: AuthPrincipal<UserType>) => Promise<readonly string[]> | readonly string[];
|
|
34
|
+
};
|
|
35
|
+
export declare const nativePushRoutes: <UserType>({ accessTokens, authSessionStore, config }: {
|
|
36
|
+
accessTokens: AccessTokenPrincipalConfig<UserType>;
|
|
37
|
+
authSessionStore?: AuthSessionSource<UserType>;
|
|
38
|
+
config: NativePushConfig<UserType>;
|
|
39
|
+
}) => import("elysia/types").AddRoute<"", "local", {
|
|
40
|
+
decorator: {};
|
|
41
|
+
store: {
|
|
42
|
+
session: import("./types").SessionRecord<UserType>;
|
|
43
|
+
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
44
|
+
};
|
|
45
|
+
derive: {};
|
|
46
|
+
}, {
|
|
47
|
+
typebox: {};
|
|
48
|
+
error: [];
|
|
49
|
+
}, import("elysia/types").DefaultMetadata, {
|
|
50
|
+
auth: {
|
|
51
|
+
mobile: {
|
|
52
|
+
push: {
|
|
53
|
+
post: {
|
|
54
|
+
body: {
|
|
55
|
+
installationId?: string | undefined;
|
|
56
|
+
locale?: string | undefined;
|
|
57
|
+
token: string;
|
|
58
|
+
platform: "apns" | "fcm";
|
|
59
|
+
};
|
|
60
|
+
params: {};
|
|
61
|
+
query: unknown;
|
|
62
|
+
headers: unknown;
|
|
63
|
+
response: {
|
|
64
|
+
401: "User is not authenticated";
|
|
65
|
+
200: {
|
|
66
|
+
installationId: string;
|
|
67
|
+
registered: true;
|
|
68
|
+
};
|
|
69
|
+
409: {
|
|
70
|
+
readonly code: "installation-ownership";
|
|
71
|
+
};
|
|
72
|
+
422: {
|
|
73
|
+
type: "validation";
|
|
74
|
+
title: "Validation Error";
|
|
75
|
+
status: 422;
|
|
76
|
+
detail?: string;
|
|
77
|
+
on: string;
|
|
78
|
+
found?: unknown;
|
|
79
|
+
property?: string;
|
|
80
|
+
expected?: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
error: never;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, import("elysia/types").DefaultEphemeral, {
|
|
89
|
+
derive: {
|
|
90
|
+
readonly nativePushPrincipal: AuthPrincipal<UserType> | undefined;
|
|
91
|
+
};
|
|
92
|
+
schema: {};
|
|
93
|
+
schemas: import("elysia").UnwrapRoute<{
|
|
94
|
+
cookie: import("elysia").TCookieObject<{
|
|
95
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
96
|
+
}>;
|
|
97
|
+
schema: "merge";
|
|
98
|
+
}, {}, "">;
|
|
99
|
+
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
100
|
+
readonly nativePushPrincipal: AuthPrincipal<UserType> | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
error: [];
|
|
103
|
+
}, "delete", "/auth/mobile/push", import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
|
|
104
|
+
body: import("typebox").TObject<{
|
|
105
|
+
installationId: import("typebox").TString;
|
|
106
|
+
}>;
|
|
107
|
+
beforeHandle: unknown;
|
|
108
|
+
}, {}, "/auth/mobile/push">, import("elysia/types").MergeScopedSchemas<{}, {}, import("elysia").UnwrapRoute<{
|
|
109
|
+
cookie: import("elysia").TCookieObject<{
|
|
110
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
111
|
+
}>;
|
|
112
|
+
schema: "merge";
|
|
113
|
+
}, {}, "">>>, {}, ({ body, nativePushPrincipal, status }: {
|
|
114
|
+
body: {
|
|
115
|
+
installationId: string;
|
|
116
|
+
};
|
|
117
|
+
query: Record<string, string | undefined>;
|
|
118
|
+
params: {};
|
|
119
|
+
headers: Record<string, string | undefined>;
|
|
120
|
+
cookie: Record<string, import("elysia").Cookie<unknown>> & {
|
|
121
|
+
user_session_id: import("elysia").Cookie<`${string}-${string}-${string}-${string}-${string}` | undefined>;
|
|
122
|
+
};
|
|
123
|
+
server: import("elysia").Server | null;
|
|
124
|
+
redirect: import("elysia").redirect;
|
|
125
|
+
set: {
|
|
126
|
+
headers: import("elysia").HTTPHeaders;
|
|
127
|
+
status?: number | keyof import("elysia").StatusMap;
|
|
128
|
+
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
129
|
+
};
|
|
130
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
131
|
+
readonly 100: "Continue";
|
|
132
|
+
readonly 101: "Switching Protocols";
|
|
133
|
+
readonly 102: "Processing";
|
|
134
|
+
readonly 103: "Early Hints";
|
|
135
|
+
readonly 200: "OK";
|
|
136
|
+
readonly 201: "Created";
|
|
137
|
+
readonly 202: "Accepted";
|
|
138
|
+
readonly 203: "Non-Authoritative Information";
|
|
139
|
+
readonly 204: "No Content";
|
|
140
|
+
readonly 205: "Reset Content";
|
|
141
|
+
readonly 206: "Partial Content";
|
|
142
|
+
readonly 207: "Multi-Status";
|
|
143
|
+
readonly 208: "Already Reported";
|
|
144
|
+
readonly 300: "Multiple Choices";
|
|
145
|
+
readonly 301: "Moved Permanently";
|
|
146
|
+
readonly 302: "Found";
|
|
147
|
+
readonly 303: "See Other";
|
|
148
|
+
readonly 304: "Not Modified";
|
|
149
|
+
readonly 307: "Temporary Redirect";
|
|
150
|
+
readonly 308: "Permanent Redirect";
|
|
151
|
+
readonly 400: "Bad Request";
|
|
152
|
+
readonly 401: "Unauthorized";
|
|
153
|
+
readonly 402: "Payment Required";
|
|
154
|
+
readonly 403: "Forbidden";
|
|
155
|
+
readonly 404: "Not Found";
|
|
156
|
+
readonly 405: "Method Not Allowed";
|
|
157
|
+
readonly 406: "Not Acceptable";
|
|
158
|
+
readonly 407: "Proxy Authentication Required";
|
|
159
|
+
readonly 408: "Request Timeout";
|
|
160
|
+
readonly 409: "Conflict";
|
|
161
|
+
readonly 410: "Gone";
|
|
162
|
+
readonly 411: "Length Required";
|
|
163
|
+
readonly 412: "Precondition Failed";
|
|
164
|
+
readonly 413: "Payload Too Large";
|
|
165
|
+
readonly 414: "URI Too Long";
|
|
166
|
+
readonly 415: "Unsupported Media Type";
|
|
167
|
+
readonly 416: "Range Not Satisfiable";
|
|
168
|
+
readonly 417: "Expectation Failed";
|
|
169
|
+
readonly 418: "I'm a teapot";
|
|
170
|
+
readonly 420: "Enhance Your Calm";
|
|
171
|
+
readonly 421: "Misdirected Request";
|
|
172
|
+
readonly 422: "Unprocessable Content";
|
|
173
|
+
readonly 423: "Locked";
|
|
174
|
+
readonly 424: "Failed Dependency";
|
|
175
|
+
readonly 425: "Too Early";
|
|
176
|
+
readonly 426: "Upgrade Required";
|
|
177
|
+
readonly 428: "Precondition Required";
|
|
178
|
+
readonly 429: "Too Many Requests";
|
|
179
|
+
readonly 431: "Request Header Fields Too Large";
|
|
180
|
+
readonly 451: "Unavailable For Legal Reasons";
|
|
181
|
+
readonly 500: "Internal Server Error";
|
|
182
|
+
readonly 501: "Not Implemented";
|
|
183
|
+
readonly 502: "Bad Gateway";
|
|
184
|
+
readonly 503: "Service Unavailable";
|
|
185
|
+
readonly 504: "Gateway Timeout";
|
|
186
|
+
readonly 505: "HTTP Version Not Supported";
|
|
187
|
+
readonly 506: "Variant Also Negotiates";
|
|
188
|
+
readonly 507: "Insufficient Storage";
|
|
189
|
+
readonly 508: "Loop Detected";
|
|
190
|
+
readonly 510: "Not Extended";
|
|
191
|
+
readonly 511: "Network Authentication Required";
|
|
192
|
+
}[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" ? {
|
|
193
|
+
readonly Continue: 100;
|
|
194
|
+
readonly "Switching Protocols": 101;
|
|
195
|
+
readonly Processing: 102;
|
|
196
|
+
readonly "Early Hints": 103;
|
|
197
|
+
readonly OK: 200;
|
|
198
|
+
readonly Created: 201;
|
|
199
|
+
readonly Accepted: 202;
|
|
200
|
+
readonly "Non-Authoritative Information": 203;
|
|
201
|
+
readonly "No Content": 204;
|
|
202
|
+
readonly "Reset Content": 205;
|
|
203
|
+
readonly "Partial Content": 206;
|
|
204
|
+
readonly "Multi-Status": 207;
|
|
205
|
+
readonly "Already Reported": 208;
|
|
206
|
+
readonly "Multiple Choices": 300;
|
|
207
|
+
readonly "Moved Permanently": 301;
|
|
208
|
+
readonly Found: 302;
|
|
209
|
+
readonly "See Other": 303;
|
|
210
|
+
readonly "Not Modified": 304;
|
|
211
|
+
readonly "Temporary Redirect": 307;
|
|
212
|
+
readonly "Permanent Redirect": 308;
|
|
213
|
+
readonly "Bad Request": 400;
|
|
214
|
+
readonly Unauthorized: 401;
|
|
215
|
+
readonly "Payment Required": 402;
|
|
216
|
+
readonly Forbidden: 403;
|
|
217
|
+
readonly "Not Found": 404;
|
|
218
|
+
readonly "Method Not Allowed": 405;
|
|
219
|
+
readonly "Not Acceptable": 406;
|
|
220
|
+
readonly "Proxy Authentication Required": 407;
|
|
221
|
+
readonly "Request Timeout": 408;
|
|
222
|
+
readonly Conflict: 409;
|
|
223
|
+
readonly Gone: 410;
|
|
224
|
+
readonly "Length Required": 411;
|
|
225
|
+
readonly "Precondition Failed": 412;
|
|
226
|
+
readonly "Payload Too Large": 413;
|
|
227
|
+
readonly "URI Too Long": 414;
|
|
228
|
+
readonly "Unsupported Media Type": 415;
|
|
229
|
+
readonly "Range Not Satisfiable": 416;
|
|
230
|
+
readonly "Expectation Failed": 417;
|
|
231
|
+
readonly "I'm a teapot": 418;
|
|
232
|
+
readonly "Enhance Your Calm": 420;
|
|
233
|
+
readonly "Misdirected Request": 421;
|
|
234
|
+
readonly "Unprocessable Content": 422;
|
|
235
|
+
readonly Locked: 423;
|
|
236
|
+
readonly "Failed Dependency": 424;
|
|
237
|
+
readonly "Too Early": 425;
|
|
238
|
+
readonly "Upgrade Required": 426;
|
|
239
|
+
readonly "Precondition Required": 428;
|
|
240
|
+
readonly "Too Many Requests": 429;
|
|
241
|
+
readonly "Request Header Fields Too Large": 431;
|
|
242
|
+
readonly "Unavailable For Legal Reasons": 451;
|
|
243
|
+
readonly "Internal Server Error": 500;
|
|
244
|
+
readonly "Not Implemented": 501;
|
|
245
|
+
readonly "Bad Gateway": 502;
|
|
246
|
+
readonly "Service Unavailable": 503;
|
|
247
|
+
readonly "Gateway Timeout": 504;
|
|
248
|
+
readonly "HTTP Version Not Supported": 505;
|
|
249
|
+
readonly "Variant Also Negotiates": 506;
|
|
250
|
+
readonly "Insufficient Storage": 507;
|
|
251
|
+
readonly "Loop Detected": 508;
|
|
252
|
+
readonly "Not Extended": 510;
|
|
253
|
+
readonly "Network Authentication Required": 511;
|
|
254
|
+
}[Code] : Code>;
|
|
255
|
+
defer: (fn: import("elysia/types").AfterResponseHandler<NoInfer<import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
|
|
256
|
+
body: import("typebox").TObject<{
|
|
257
|
+
installationId: import("typebox").TString;
|
|
258
|
+
}>;
|
|
259
|
+
beforeHandle: unknown;
|
|
260
|
+
}, {}, "/auth/mobile/push">, import("elysia/types").MergeScopedSchemas<{}, {}, import("elysia").UnwrapRoute<{
|
|
261
|
+
cookie: import("elysia").TCookieObject<{
|
|
262
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
263
|
+
}>;
|
|
264
|
+
schema: "merge";
|
|
265
|
+
}, {}, "">>>>, NoInfer<{
|
|
266
|
+
decorator: {};
|
|
267
|
+
store: {
|
|
268
|
+
session: import("./types").SessionRecord<UserType>;
|
|
269
|
+
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
270
|
+
};
|
|
271
|
+
derive: {};
|
|
272
|
+
} & {
|
|
273
|
+
derive: {
|
|
274
|
+
readonly nativePushPrincipal: AuthPrincipal<UserType> | undefined;
|
|
275
|
+
};
|
|
276
|
+
}>>) => import("elysia/types").MaybePromise<void>;
|
|
277
|
+
readonly path: string;
|
|
278
|
+
route?: string | undefined;
|
|
279
|
+
rid?: string | undefined;
|
|
280
|
+
request: Request;
|
|
281
|
+
store: {
|
|
282
|
+
session: import("./types").SessionRecord<UserType>;
|
|
283
|
+
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
284
|
+
};
|
|
285
|
+
readonly nativePushPrincipal: AuthPrincipal<UserType> | undefined;
|
|
286
|
+
}) => Promise<import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | {
|
|
287
|
+
removed: true;
|
|
288
|
+
}>>;
|
|
@@ -281,7 +281,7 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
281
281
|
status?: number | keyof import("elysia").StatusMap;
|
|
282
282
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
283
283
|
};
|
|
284
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
284
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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
285
|
readonly 100: "Continue";
|
|
286
286
|
readonly 101: "Switching Protocols";
|
|
287
287
|
readonly 102: "Processing";
|
package/dist/portal/routes.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
|
|
|
127
127
|
status?: number | keyof import("elysia").StatusMap;
|
|
128
128
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
129
129
|
};
|
|
130
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
130
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
131
131
|
readonly 100: "Continue";
|
|
132
132
|
readonly 101: "Switching Protocols";
|
|
133
133
|
readonly 102: "Processing";
|
package/dist/roles/routes.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles,
|
|
|
78
78
|
status?: number | keyof import("elysia").StatusMap;
|
|
79
79
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
80
80
|
};
|
|
81
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
81
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
82
82
|
readonly 100: "Continue";
|
|
83
83
|
readonly 101: "Switching Protocols";
|
|
84
84
|
readonly 102: "Processing";
|
|
@@ -44,7 +44,7 @@ export declare const authorize: ({ clientProviders, authorizeRoute, cookieSecure
|
|
|
44
44
|
status?: number | keyof import("elysia").StatusMap;
|
|
45
45
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
46
46
|
};
|
|
47
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
47
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
48
48
|
readonly 100: "Continue";
|
|
49
49
|
readonly 101: "Switching Protocols";
|
|
50
50
|
readonly 102: "Processing";
|
|
@@ -58,7 +58,7 @@ export declare const callback: <UserType>({ authSessionStore, clientProviders, c
|
|
|
58
58
|
status?: number | keyof import("elysia").StatusMap;
|
|
59
59
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
60
60
|
};
|
|
61
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
61
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
62
62
|
readonly 100: "Continue";
|
|
63
63
|
readonly 101: "Switching Protocols";
|
|
64
64
|
readonly 102: "Processing";
|
package/dist/routes/profile.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const profile: <UserType>({ authSessionStore, clientProviders, pr
|
|
|
46
46
|
status?: number | keyof import("elysia").StatusMap;
|
|
47
47
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
48
48
|
};
|
|
49
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
49
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
50
50
|
readonly 100: "Continue";
|
|
51
51
|
readonly 101: "Switching Protocols";
|
|
52
52
|
readonly 102: "Processing";
|
|
@@ -19,7 +19,7 @@ export declare const protectRoutePlugin: <UserType>({ accessTokens, authSessionS
|
|
|
19
19
|
};
|
|
20
20
|
derive: {
|
|
21
21
|
readonly authPrincipal: AuthPrincipal<UserType> | undefined;
|
|
22
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: AuthFailError) => AuthFailReturn) => import("elysia").ElysiaStatus<"
|
|
22
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: AuthFailError) => AuthFailReturn) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
25
|
typebox: {};
|
|
@@ -37,7 +37,7 @@ export declare const protectRoutePlugin: <UserType>({ accessTokens, authSessionS
|
|
|
37
37
|
parser: {};
|
|
38
38
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
39
39
|
readonly authPrincipal: AuthPrincipal<UserType> | undefined;
|
|
40
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: AuthFailError) => AuthFailReturn) => import("elysia").ElysiaStatus<"
|
|
40
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: AuthFailError) => AuthFailReturn) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
41
41
|
}>;
|
|
42
42
|
}, {}, import("elysia/types").DefaultEphemeral, import("elysia/types").DefaultEphemeral>;
|
|
43
43
|
export {};
|
package/dist/routes/refresh.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export declare const refresh: <UserType>({ authSessionStore, clientProviders, re
|
|
|
47
47
|
status?: number | keyof import("elysia").StatusMap;
|
|
48
48
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
49
49
|
};
|
|
50
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
50
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
51
51
|
readonly 100: "Continue";
|
|
52
52
|
readonly 101: "Switching Protocols";
|
|
53
53
|
readonly 102: "Processing";
|
package/dist/routes/revoke.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const revoke: <UserType>({ authSessionStore, clientProviders, rev
|
|
|
46
46
|
status?: number | keyof import("elysia").StatusMap;
|
|
47
47
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
48
48
|
};
|
|
49
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
49
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
50
50
|
readonly 100: "Continue";
|
|
51
51
|
readonly 101: "Switching Protocols";
|
|
52
52
|
readonly 102: "Processing";
|
|
@@ -73,7 +73,7 @@ export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, se
|
|
|
73
73
|
status?: number | keyof import("elysia").StatusMap;
|
|
74
74
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
75
75
|
};
|
|
76
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
76
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
77
77
|
readonly 100: "Continue";
|
|
78
78
|
readonly 101: "Switching Protocols";
|
|
79
79
|
readonly 102: "Processing";
|
package/dist/routes/signout.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare const signout: <UserType>({ authSessionStore, signoutRoute, onSig
|
|
|
42
42
|
status?: number | keyof import("elysia").StatusMap;
|
|
43
43
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
44
44
|
};
|
|
45
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
45
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
46
46
|
readonly 100: "Continue";
|
|
47
47
|
readonly 101: "Switching Protocols";
|
|
48
48
|
readonly 102: "Processing";
|
|
@@ -40,7 +40,7 @@ export declare const userStatus: <UserType>({ authSessionStore, statusRoute, onS
|
|
|
40
40
|
status?: number | keyof import("elysia").StatusMap;
|
|
41
41
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
42
42
|
};
|
|
43
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
43
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
44
44
|
readonly 100: "Continue";
|
|
45
45
|
readonly 101: "Switching Protocols";
|
|
46
46
|
readonly 102: "Processing";
|
package/dist/scim/routes.d.ts
CHANGED
|
@@ -361,7 +361,7 @@ export declare const scimRoutes: ({ customAttributes, getScimGroup, getScimUser,
|
|
|
361
361
|
status?: number | keyof import("elysia").StatusMap;
|
|
362
362
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
363
363
|
};
|
|
364
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 |
|
|
364
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 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 ? {
|
|
365
365
|
readonly 100: "Continue";
|
|
366
366
|
readonly 101: "Switching Protocols";
|
|
367
367
|
readonly 102: "Processing";
|