@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/portal/routes.d.ts
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import { Elysia } from 'elysia';
|
|
2
1
|
import { type PortalRouteProps } from './config';
|
|
3
|
-
export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionConfigured, portalRoute, scimRoute, scimTokenStore, setupSessionStore, ssoConnectionStore, ssoRoute }: PortalRouteProps) =>
|
|
4
|
-
decorator: {};
|
|
5
|
-
store: {};
|
|
6
|
-
derive: {};
|
|
7
|
-
resolve: {};
|
|
8
|
-
}, {
|
|
2
|
+
export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionConfigured, portalRoute, scimRoute, scimTokenStore, setupSessionStore, ssoConnectionStore, ssoRoute }: PortalRouteProps) => import("elysia/types").AddRoute<"", "local", import("elysia/types").DefaultSingleton, {
|
|
9
3
|
typebox: {};
|
|
10
|
-
error:
|
|
11
|
-
}, {
|
|
12
|
-
schema: {};
|
|
13
|
-
standaloneSchema: {};
|
|
14
|
-
macro: {};
|
|
15
|
-
macroFn: {};
|
|
16
|
-
parser: {};
|
|
17
|
-
response: {};
|
|
18
|
-
}, {
|
|
4
|
+
error: [];
|
|
5
|
+
}, import("elysia/types").DefaultMetadata, {
|
|
19
6
|
[x: string]: {
|
|
20
7
|
session: {
|
|
21
8
|
get: {
|
|
@@ -46,6 +33,7 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
|
|
|
46
33
|
} | undefined;
|
|
47
34
|
};
|
|
48
35
|
};
|
|
36
|
+
error: never;
|
|
49
37
|
};
|
|
50
38
|
};
|
|
51
39
|
};
|
|
@@ -73,14 +61,16 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
|
|
|
73
61
|
};
|
|
74
62
|
422: {
|
|
75
63
|
type: "validation";
|
|
64
|
+
title: "Validation Error";
|
|
65
|
+
status: 422;
|
|
66
|
+
detail?: string;
|
|
76
67
|
on: string;
|
|
77
|
-
summary?: string;
|
|
78
|
-
message?: string;
|
|
79
68
|
found?: unknown;
|
|
80
69
|
property?: string;
|
|
81
70
|
expected?: string;
|
|
82
71
|
};
|
|
83
72
|
};
|
|
73
|
+
error: never;
|
|
84
74
|
};
|
|
85
75
|
};
|
|
86
76
|
};
|
|
@@ -110,51 +100,168 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
|
|
|
110
100
|
};
|
|
111
101
|
422: {
|
|
112
102
|
type: "validation";
|
|
103
|
+
title: "Validation Error";
|
|
104
|
+
status: 422;
|
|
105
|
+
detail?: string;
|
|
113
106
|
on: string;
|
|
114
|
-
summary?: string;
|
|
115
|
-
message?: string;
|
|
116
107
|
found?: unknown;
|
|
117
108
|
property?: string;
|
|
118
109
|
expected?: string;
|
|
119
110
|
};
|
|
120
111
|
};
|
|
112
|
+
error: never;
|
|
121
113
|
};
|
|
122
114
|
};
|
|
123
115
|
};
|
|
124
116
|
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
501: "SCIM is not configured";
|
|
138
|
-
200: {
|
|
139
|
-
readonly baseUrl: `${string}/${string}`;
|
|
140
|
-
readonly token: string;
|
|
141
|
-
readonly tokenId: string;
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
};
|
|
117
|
+
}, import("elysia/types").DefaultEphemeral, import("elysia/types").DefaultEphemeral, "post", `/${string}/scim/token`, import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, `/${string}/scim/token`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, ({ headers, request, status }: {
|
|
118
|
+
body: unknown;
|
|
119
|
+
query: Record<string, string | undefined>;
|
|
120
|
+
params: {};
|
|
121
|
+
headers: Record<string, string | undefined>;
|
|
122
|
+
cookie: Record<string, import("elysia").Cookie<unknown>>;
|
|
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>;
|
|
147
129
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
130
|
+
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 ? {
|
|
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<{}, {}, `/${string}/scim/token`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>>, NoInfer<import("elysia/types").DefaultSingleton & {
|
|
256
|
+
derive: {};
|
|
257
|
+
}>>) => import("elysia/types").MaybePromise<void>;
|
|
258
|
+
readonly path: string;
|
|
259
|
+
route?: string | undefined;
|
|
260
|
+
rid?: string | undefined;
|
|
261
|
+
request: Request;
|
|
262
|
+
store: {};
|
|
263
|
+
}) => Promise<import("elysia").ElysiaStatus<"Unauthorized", "Invalid or expired setup link", 401> | import("elysia").ElysiaStatus<"Forbidden", "This setup link cannot configure SCIM", 403> | import("elysia").ElysiaStatus<"Not Implemented", "SCIM is not configured", 501> | import("elysia").ElysiaStatus<"OK", {
|
|
264
|
+
readonly baseUrl: `${string}/${string}`;
|
|
265
|
+
readonly token: string;
|
|
266
|
+
readonly tokenId: string;
|
|
267
|
+
}, 200>>>;
|
package/dist/roles/routes.d.ts
CHANGED
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
import { Elysia } from 'elysia';
|
|
2
1
|
import type { SessionRecord } from '../types';
|
|
3
2
|
import { type RolesRouteProps } from './config';
|
|
4
|
-
export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles, emit, getUserId, onRolesAssigned, organizationStore, roleStore, rolesRoute }: RolesRouteProps<UserType>) =>
|
|
3
|
+
export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles, emit, getUserId, onRolesAssigned, organizationStore, roleStore, rolesRoute }: RolesRouteProps<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
|
":organizationId": {
|
|
25
16
|
get: {
|
|
@@ -37,70 +28,210 @@ export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles,
|
|
|
37
28
|
};
|
|
38
29
|
422: {
|
|
39
30
|
type: "validation";
|
|
31
|
+
title: "Validation Error";
|
|
32
|
+
status: 422;
|
|
33
|
+
detail?: string;
|
|
40
34
|
on: string;
|
|
41
|
-
summary?: string;
|
|
42
|
-
message?: string;
|
|
43
35
|
found?: unknown;
|
|
44
36
|
property?: string;
|
|
45
37
|
expected?: string;
|
|
46
38
|
};
|
|
47
39
|
};
|
|
40
|
+
error: never;
|
|
48
41
|
};
|
|
49
42
|
};
|
|
50
43
|
};
|
|
51
|
-
}
|
|
52
|
-
[x: string]: {
|
|
53
|
-
":organizationId": {
|
|
54
|
-
members: {
|
|
55
|
-
":userId": {
|
|
56
|
-
put: {
|
|
57
|
-
body: {
|
|
58
|
-
roles: string[];
|
|
59
|
-
};
|
|
60
|
-
params: {
|
|
61
|
-
userId: string;
|
|
62
|
-
organizationId: string;
|
|
63
|
-
};
|
|
64
|
-
query: unknown;
|
|
65
|
-
headers: unknown;
|
|
66
|
-
response: {
|
|
67
|
-
401: "Authentication required";
|
|
68
|
-
403: "Cannot manage roles";
|
|
69
|
-
404: "Membership not found";
|
|
70
|
-
200: {
|
|
71
|
-
readonly roles: string[];
|
|
72
|
-
};
|
|
73
|
-
422: {
|
|
74
|
-
type: "validation";
|
|
75
|
-
on: string;
|
|
76
|
-
summary?: string;
|
|
77
|
-
message?: string;
|
|
78
|
-
found?: unknown;
|
|
79
|
-
property?: string;
|
|
80
|
-
expected?: string;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
}, {
|
|
89
|
-
derive: {};
|
|
90
|
-
resolve: {};
|
|
91
|
-
schema: {};
|
|
92
|
-
standaloneSchema: {};
|
|
93
|
-
response: {};
|
|
94
|
-
}, {
|
|
44
|
+
}, import("elysia/types").DefaultEphemeral, {
|
|
95
45
|
derive: {};
|
|
96
|
-
resolve: {};
|
|
97
46
|
schema: {};
|
|
98
|
-
|
|
47
|
+
schemas: {};
|
|
99
48
|
response: {};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
49
|
+
error: [];
|
|
50
|
+
}, "put", `/${string}/:organizationId/members/:userId`, import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
|
|
51
|
+
body: import("typebox").TObject<{
|
|
52
|
+
roles: import("typebox").TArray<import("typebox").TString>;
|
|
53
|
+
}>;
|
|
54
|
+
cookie: import("elysia").TCookieObject<{
|
|
55
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
56
|
+
}>;
|
|
57
|
+
params: import("typebox").TObject<{
|
|
58
|
+
organizationId: import("typebox").TString;
|
|
59
|
+
userId: import("typebox").TString;
|
|
60
|
+
}>;
|
|
61
|
+
}, {}, `/${string}/:organizationId/members/:userId`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, ({ body: { roles }, cookie: { user_session_id }, params: { organizationId, userId }, status, store: { session } }: {
|
|
62
|
+
body: {
|
|
63
|
+
roles: string[];
|
|
64
|
+
};
|
|
65
|
+
query: Record<string, string | undefined>;
|
|
66
|
+
params: {
|
|
67
|
+
userId: string;
|
|
68
|
+
organizationId: string;
|
|
69
|
+
};
|
|
70
|
+
headers: Record<string, string | undefined>;
|
|
71
|
+
cookie: Record<string, import("elysia").Cookie<unknown>> & {
|
|
72
|
+
user_session_id: import("elysia").Cookie<`${string}-${string}-${string}-${string}-${string}` | undefined>;
|
|
73
|
+
};
|
|
74
|
+
server: import("elysia").Server | null;
|
|
75
|
+
redirect: import("elysia").redirect;
|
|
76
|
+
set: {
|
|
77
|
+
headers: import("elysia").HTTPHeaders;
|
|
78
|
+
status?: number | keyof import("elysia").StatusMap;
|
|
79
|
+
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
80
|
+
};
|
|
81
|
+
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 ? {
|
|
82
|
+
readonly 100: "Continue";
|
|
83
|
+
readonly 101: "Switching Protocols";
|
|
84
|
+
readonly 102: "Processing";
|
|
85
|
+
readonly 103: "Early Hints";
|
|
86
|
+
readonly 200: "OK";
|
|
87
|
+
readonly 201: "Created";
|
|
88
|
+
readonly 202: "Accepted";
|
|
89
|
+
readonly 203: "Non-Authoritative Information";
|
|
90
|
+
readonly 204: "No Content";
|
|
91
|
+
readonly 205: "Reset Content";
|
|
92
|
+
readonly 206: "Partial Content";
|
|
93
|
+
readonly 207: "Multi-Status";
|
|
94
|
+
readonly 208: "Already Reported";
|
|
95
|
+
readonly 300: "Multiple Choices";
|
|
96
|
+
readonly 301: "Moved Permanently";
|
|
97
|
+
readonly 302: "Found";
|
|
98
|
+
readonly 303: "See Other";
|
|
99
|
+
readonly 304: "Not Modified";
|
|
100
|
+
readonly 307: "Temporary Redirect";
|
|
101
|
+
readonly 308: "Permanent Redirect";
|
|
102
|
+
readonly 400: "Bad Request";
|
|
103
|
+
readonly 401: "Unauthorized";
|
|
104
|
+
readonly 402: "Payment Required";
|
|
105
|
+
readonly 403: "Forbidden";
|
|
106
|
+
readonly 404: "Not Found";
|
|
107
|
+
readonly 405: "Method Not Allowed";
|
|
108
|
+
readonly 406: "Not Acceptable";
|
|
109
|
+
readonly 407: "Proxy Authentication Required";
|
|
110
|
+
readonly 408: "Request Timeout";
|
|
111
|
+
readonly 409: "Conflict";
|
|
112
|
+
readonly 410: "Gone";
|
|
113
|
+
readonly 411: "Length Required";
|
|
114
|
+
readonly 412: "Precondition Failed";
|
|
115
|
+
readonly 413: "Payload Too Large";
|
|
116
|
+
readonly 414: "URI Too Long";
|
|
117
|
+
readonly 415: "Unsupported Media Type";
|
|
118
|
+
readonly 416: "Range Not Satisfiable";
|
|
119
|
+
readonly 417: "Expectation Failed";
|
|
120
|
+
readonly 418: "I'm a teapot";
|
|
121
|
+
readonly 420: "Enhance Your Calm";
|
|
122
|
+
readonly 421: "Misdirected Request";
|
|
123
|
+
readonly 422: "Unprocessable Content";
|
|
124
|
+
readonly 423: "Locked";
|
|
125
|
+
readonly 424: "Failed Dependency";
|
|
126
|
+
readonly 425: "Too Early";
|
|
127
|
+
readonly 426: "Upgrade Required";
|
|
128
|
+
readonly 428: "Precondition Required";
|
|
129
|
+
readonly 429: "Too Many Requests";
|
|
130
|
+
readonly 431: "Request Header Fields Too Large";
|
|
131
|
+
readonly 451: "Unavailable For Legal Reasons";
|
|
132
|
+
readonly 500: "Internal Server Error";
|
|
133
|
+
readonly 501: "Not Implemented";
|
|
134
|
+
readonly 502: "Bad Gateway";
|
|
135
|
+
readonly 503: "Service Unavailable";
|
|
136
|
+
readonly 504: "Gateway Timeout";
|
|
137
|
+
readonly 505: "HTTP Version Not Supported";
|
|
138
|
+
readonly 506: "Variant Also Negotiates";
|
|
139
|
+
readonly 507: "Insufficient Storage";
|
|
140
|
+
readonly 508: "Loop Detected";
|
|
141
|
+
readonly 510: "Not Extended";
|
|
142
|
+
readonly 511: "Network Authentication Required";
|
|
143
|
+
}[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" ? {
|
|
144
|
+
readonly Continue: 100;
|
|
145
|
+
readonly "Switching Protocols": 101;
|
|
146
|
+
readonly Processing: 102;
|
|
147
|
+
readonly "Early Hints": 103;
|
|
148
|
+
readonly OK: 200;
|
|
149
|
+
readonly Created: 201;
|
|
150
|
+
readonly Accepted: 202;
|
|
151
|
+
readonly "Non-Authoritative Information": 203;
|
|
152
|
+
readonly "No Content": 204;
|
|
153
|
+
readonly "Reset Content": 205;
|
|
154
|
+
readonly "Partial Content": 206;
|
|
155
|
+
readonly "Multi-Status": 207;
|
|
156
|
+
readonly "Already Reported": 208;
|
|
157
|
+
readonly "Multiple Choices": 300;
|
|
158
|
+
readonly "Moved Permanently": 301;
|
|
159
|
+
readonly Found: 302;
|
|
160
|
+
readonly "See Other": 303;
|
|
161
|
+
readonly "Not Modified": 304;
|
|
162
|
+
readonly "Temporary Redirect": 307;
|
|
163
|
+
readonly "Permanent Redirect": 308;
|
|
164
|
+
readonly "Bad Request": 400;
|
|
165
|
+
readonly Unauthorized: 401;
|
|
166
|
+
readonly "Payment Required": 402;
|
|
167
|
+
readonly Forbidden: 403;
|
|
168
|
+
readonly "Not Found": 404;
|
|
169
|
+
readonly "Method Not Allowed": 405;
|
|
170
|
+
readonly "Not Acceptable": 406;
|
|
171
|
+
readonly "Proxy Authentication Required": 407;
|
|
172
|
+
readonly "Request Timeout": 408;
|
|
173
|
+
readonly Conflict: 409;
|
|
174
|
+
readonly Gone: 410;
|
|
175
|
+
readonly "Length Required": 411;
|
|
176
|
+
readonly "Precondition Failed": 412;
|
|
177
|
+
readonly "Payload Too Large": 413;
|
|
178
|
+
readonly "URI Too Long": 414;
|
|
179
|
+
readonly "Unsupported Media Type": 415;
|
|
180
|
+
readonly "Range Not Satisfiable": 416;
|
|
181
|
+
readonly "Expectation Failed": 417;
|
|
182
|
+
readonly "I'm a teapot": 418;
|
|
183
|
+
readonly "Enhance Your Calm": 420;
|
|
184
|
+
readonly "Misdirected Request": 421;
|
|
185
|
+
readonly "Unprocessable Content": 422;
|
|
186
|
+
readonly Locked: 423;
|
|
187
|
+
readonly "Failed Dependency": 424;
|
|
188
|
+
readonly "Too Early": 425;
|
|
189
|
+
readonly "Upgrade Required": 426;
|
|
190
|
+
readonly "Precondition Required": 428;
|
|
191
|
+
readonly "Too Many Requests": 429;
|
|
192
|
+
readonly "Request Header Fields Too Large": 431;
|
|
193
|
+
readonly "Unavailable For Legal Reasons": 451;
|
|
194
|
+
readonly "Internal Server Error": 500;
|
|
195
|
+
readonly "Not Implemented": 501;
|
|
196
|
+
readonly "Bad Gateway": 502;
|
|
197
|
+
readonly "Service Unavailable": 503;
|
|
198
|
+
readonly "Gateway Timeout": 504;
|
|
199
|
+
readonly "HTTP Version Not Supported": 505;
|
|
200
|
+
readonly "Variant Also Negotiates": 506;
|
|
201
|
+
readonly "Insufficient Storage": 507;
|
|
202
|
+
readonly "Loop Detected": 508;
|
|
203
|
+
readonly "Not Extended": 510;
|
|
204
|
+
readonly "Network Authentication Required": 511;
|
|
205
|
+
}[Code] : Code>;
|
|
206
|
+
defer: (fn: import("elysia/types").AfterResponseHandler<NoInfer<import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{
|
|
207
|
+
body: import("typebox").TObject<{
|
|
208
|
+
roles: import("typebox").TArray<import("typebox").TString>;
|
|
209
|
+
}>;
|
|
210
|
+
cookie: import("elysia").TCookieObject<{
|
|
211
|
+
user_session_id: import("typebox").TOptional<import("typebox").TTemplateLiteral<"^.*-.*-.*-.*-.*$">>;
|
|
212
|
+
}>;
|
|
213
|
+
params: import("typebox").TObject<{
|
|
214
|
+
organizationId: import("typebox").TString;
|
|
215
|
+
userId: import("typebox").TString;
|
|
216
|
+
}>;
|
|
217
|
+
}, {}, `/${string}/:organizationId/members/:userId`>, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>>, NoInfer<{
|
|
218
|
+
decorator: {};
|
|
219
|
+
store: {
|
|
220
|
+
session: SessionRecord<UserType>;
|
|
221
|
+
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
222
|
+
};
|
|
223
|
+
derive: {};
|
|
224
|
+
} & {
|
|
225
|
+
derive: {};
|
|
226
|
+
}>>) => import("elysia/types").MaybePromise<void>;
|
|
227
|
+
readonly path: string;
|
|
228
|
+
route?: string | undefined;
|
|
229
|
+
rid?: string | undefined;
|
|
230
|
+
request: Request;
|
|
231
|
+
store: {
|
|
232
|
+
session: SessionRecord<UserType>;
|
|
233
|
+
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
234
|
+
};
|
|
235
|
+
}) => Promise<import("elysia").ElysiaStatus<"Unauthorized", "Authentication required", 401> | import("elysia").ElysiaStatus<"Forbidden", "Cannot manage roles", 403> | import("elysia").ElysiaStatus<"Not Found", "Membership not found", 404> | import("elysia").ElysiaStatus<"OK", {
|
|
236
|
+
readonly roles: string[];
|
|
237
|
+
}, 200>>>;
|