@absolutejs/auth 0.55.4 → 0.55.6

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 (52) hide show
  1. package/README.md +6 -1
  2. package/dist/agents/context.d.ts +8 -8
  3. package/dist/agents/index.js +36 -6
  4. package/dist/agents/index.js.map +6 -5
  5. package/dist/agents/routes.d.ts +134 -27
  6. package/dist/apikeys/routes.d.ts +2 -2
  7. package/dist/authContext.d.ts +193 -0
  8. package/dist/authorization/protectPermission.d.ts +4 -4
  9. package/dist/compliance/routes.d.ts +2 -2
  10. package/dist/credentials/login.d.ts +6 -6
  11. package/dist/credentials/register.d.ts +2 -2
  12. package/dist/credentials/routes.d.ts +6 -6
  13. package/dist/htmx/configuredRoutes.d.ts +542 -0
  14. package/dist/htmx/routes.d.ts +4 -4
  15. package/dist/index.d.ts +3399 -8
  16. package/dist/index.js +658 -508
  17. package/dist/index.js.map +15 -12
  18. package/dist/mfa/challenge.d.ts +2 -2
  19. package/dist/mfa/management.d.ts +2 -2
  20. package/dist/mfa/routes.d.ts +4 -4
  21. package/dist/mfa/sms.d.ts +4 -4
  22. package/dist/mfa/totp.d.ts +2 -2
  23. package/dist/oidc/routes.d.ts +14 -14
  24. package/dist/organizations/routes.d.ts +4 -3
  25. package/dist/passwordless/routes.d.ts +7 -6
  26. package/dist/pluginIdentity.d.ts +2 -0
  27. package/dist/portal/routes.d.ts +3 -3
  28. package/dist/roles/routes.d.ts +4 -3
  29. package/dist/routes/callback.d.ts +2 -2
  30. package/dist/routes/profile.d.ts +2 -2
  31. package/dist/routes/protectRoute.d.ts +6 -6
  32. package/dist/routes/refresh.d.ts +3 -3
  33. package/dist/routes/revoke.d.ts +3 -3
  34. package/dist/routes/sessions.d.ts +5 -5
  35. package/dist/routes/signout.d.ts +3 -3
  36. package/dist/routes/stepUp.d.ts +4 -4
  37. package/dist/routes/userStatus.d.ts +2 -2
  38. package/dist/server.d.ts +4 -3
  39. package/dist/server.js +657 -508
  40. package/dist/server.js.map +16 -13
  41. package/dist/session/access.d.ts +3 -3
  42. package/dist/session/cleanup.d.ts +3 -3
  43. package/dist/session/state.d.ts +3 -3
  44. package/dist/session/types.d.ts +1 -0
  45. package/dist/sso/discoveryRoute.d.ts +1 -1
  46. package/dist/sso/oidcRoutes.d.ts +4 -4
  47. package/dist/sso/samlIdpRoutes.d.ts +3 -3
  48. package/dist/sso/samlRoutes.d.ts +7 -6
  49. package/dist/webauthn/routes.d.ts +2 -2
  50. package/package.json +1 -1
  51. package/dist/authInstance.d.ts +0 -7
  52. package/dist/session/internalData.d.ts +0 -34
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { Elysia } from 'elysia';
2
- import { AuthConfig } from './types';
3
- export declare const auth: <UserType>({ providersConfiguration, authorizeRoute, cookieSecure, callbackRoute, profileRoute, signoutRoute, statusRoute, refreshRoute, revokeRoute, cleanupIntervalMs, maxSessions, sessionDurationMs, authSessionStore, audit, credentials, customProviders, mfa, passwordless, lockout, sessions, sso, scim, apikeys, agentAuth, oidc, organizations, roles, portal, authorization, compliance, webauthn, webhooks, htmx, tracing, resolveAuthIntent, onAuthorizeSuccess, onAuthorizeError, onProfileSuccess, onProfileError, onCallbackSuccess, onLinkIdentity, onLinkIdentityConflict, onLinkConnector, onCallbackError, onStatus, onRefreshSuccess, onRefreshError, onSignOut, onRevocationSuccess, onRevocationError, onSessionCleanup }: AuthConfig<UserType>) => Promise<Elysia<"", {
2
+ import type { AuthConfig } from './types';
3
+ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Promise<Elysia<"", {
4
4
  decorator: {};
5
5
  store: {
6
- session: import("./session/internalData").InternalSessionRecord<UserType>;
7
- unregisteredSession: import("./session/internalData").InternalUnregisteredSessionRecord;
6
+ session: import("./types").SessionRecord<UserType>;
7
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
8
8
  };
9
- derive: {
9
+ derive: ({
10
10
  readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
11
11
  readonly code: "Bad Request";
12
12
  readonly message: "Cookies are missing";
@@ -14,12 +14,68 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
14
14
  readonly code: "Unauthorized";
15
15
  readonly message: "User is not authenticated";
16
16
  }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
17
- };
17
+ } & {
18
+ readonly requireRecentAuth: <AuthReturn, AuthFailReturn_1>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
19
+ readonly code: "Unauthorized";
20
+ readonly message: "Recent authentication required";
21
+ }) => AuthFailReturn_1) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | AuthReturn | NonNullable<AuthFailReturn_1>>;
22
+ } & {
23
+ readonly protectAgent: <AuthReturn, AuthFailReturn_2>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: {
24
+ code: "Forbidden" | "Unauthorized";
25
+ message: "Agent is not authenticated" | "Insufficient agent scopes";
26
+ }) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
27
+ }) | ({
28
+ readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
29
+ readonly code: "Bad Request";
30
+ readonly message: "Cookies are missing";
31
+ } | {
32
+ readonly code: "Unauthorized";
33
+ readonly message: "User is not authenticated";
34
+ }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
35
+ } & {
36
+ readonly requireRecentAuth: <AuthReturn, AuthFailReturn_1>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
37
+ readonly code: "Unauthorized";
38
+ readonly message: "Recent authentication required";
39
+ }) => AuthFailReturn_1) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | AuthReturn | NonNullable<AuthFailReturn_1>>;
40
+ } & {
41
+ readonly protectPermission: <AuthReturn, AuthFailReturn_3>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
42
+ readonly code: "Bad Request";
43
+ readonly message: "Cookies are missing";
44
+ } | {
45
+ readonly code: "Forbidden";
46
+ readonly message: "Insufficient permissions";
47
+ } | {
48
+ readonly code: "Unauthorized";
49
+ readonly message: "User is not authenticated";
50
+ }) => AuthFailReturn_3) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaCustomStatusResponse<"Forbidden", "Insufficient permissions", 403> | AuthReturn | NonNullable<AuthFailReturn_3>>;
51
+ } & {
52
+ readonly protectAgent: <AuthReturn, AuthFailReturn_2>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: {
53
+ code: "Forbidden" | "Unauthorized";
54
+ message: "Agent is not authenticated" | "Insufficient agent scopes";
55
+ }) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
56
+ });
18
57
  resolve: {};
19
58
  }, {
20
59
  typebox: {};
21
60
  error: {};
61
+ } & {
62
+ typebox: {};
63
+ error: {};
22
64
  }, {
65
+ schema: {};
66
+ standaloneSchema: {};
67
+ macro: {};
68
+ macroFn: {};
69
+ parser: {};
70
+ response: {};
71
+ } & (({
72
+ schema: {};
73
+ standaloneSchema: {};
74
+ macro: {};
75
+ macroFn: {};
76
+ parser: {};
77
+ response: {};
78
+ } & ({
23
79
  schema: import("elysia").UnwrapRoute<{
24
80
  cookie: import("@sinclair/typebox").TObject<{
25
81
  user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
@@ -38,7 +94,64 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
38
94
  readonly message: "User is not authenticated";
39
95
  }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
40
96
  }>;
41
- }, {}, {
97
+ } & ({
98
+ schema: import("elysia").UnwrapRoute<{
99
+ cookie: import("@sinclair/typebox").TObject<{
100
+ user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
101
+ }>;
102
+ }, {}, "">;
103
+ standaloneSchema: {};
104
+ macro: {};
105
+ macroFn: {};
106
+ parser: {};
107
+ response: import("elysia").ExtractErrorFromHandle<{
108
+ readonly requireRecentAuth: <AuthReturn, AuthFailReturn_1>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
109
+ readonly code: "Unauthorized";
110
+ readonly message: "Recent authentication required";
111
+ }) => AuthFailReturn_1) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | AuthReturn | NonNullable<AuthFailReturn_1>>;
112
+ }>;
113
+ } & ({
114
+ schema: {};
115
+ standaloneSchema: {};
116
+ macro: {};
117
+ macroFn: {};
118
+ parser: {};
119
+ response: {};
120
+ } | {
121
+ schema: import("elysia").UnwrapRoute<{
122
+ cookie: import("@sinclair/typebox").TObject<{
123
+ user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
124
+ }>;
125
+ }, {}, "">;
126
+ standaloneSchema: {};
127
+ macro: {};
128
+ macroFn: {};
129
+ parser: {};
130
+ response: import("elysia").ExtractErrorFromHandle<{
131
+ readonly protectPermission: <AuthReturn, AuthFailReturn_3>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
132
+ readonly code: "Bad Request";
133
+ readonly message: "Cookies are missing";
134
+ } | {
135
+ readonly code: "Forbidden";
136
+ readonly message: "Insufficient permissions";
137
+ } | {
138
+ readonly code: "Unauthorized";
139
+ readonly message: "User is not authenticated";
140
+ }) => AuthFailReturn_3) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaCustomStatusResponse<"Forbidden", "Insufficient permissions", 403> | AuthReturn | NonNullable<AuthFailReturn_3>>;
141
+ }>;
142
+ })))) & {
143
+ schema: {};
144
+ standaloneSchema: {};
145
+ macro: {};
146
+ macroFn: {};
147
+ parser: {};
148
+ response: import("elysia").ExtractErrorFromHandle<{
149
+ readonly protectAgent: <AuthReturn, AuthFailReturn_2>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: {
150
+ code: "Forbidden" | "Unauthorized";
151
+ message: "Agent is not authenticated" | "Insufficient agent scopes";
152
+ }) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
153
+ }>;
154
+ }), {}, {
42
155
  derive: {};
43
156
  resolve: {};
44
157
  schema: {};
@@ -50,9 +163,3287 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
50
163
  schema: {};
51
164
  standaloneSchema: {};
52
165
  response: {};
166
+ } & {
167
+ derive: {};
168
+ resolve: {};
169
+ schema: {};
170
+ standaloneSchema: {};
171
+ response: {};
53
172
  }>>;
173
+ export declare const createAuthApplications: <UserType>(configuration: AuthConfig<UserType>) => Promise<{
174
+ authContext: Elysia<"", {
175
+ decorator: {};
176
+ store: {
177
+ session: import("./types").SessionRecord<UserType>;
178
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
179
+ };
180
+ derive: ({
181
+ readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
182
+ readonly code: "Bad Request";
183
+ readonly message: "Cookies are missing";
184
+ } | {
185
+ readonly code: "Unauthorized";
186
+ readonly message: "User is not authenticated";
187
+ }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
188
+ } & {
189
+ readonly requireRecentAuth: <AuthReturn, AuthFailReturn_1>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
190
+ readonly code: "Unauthorized";
191
+ readonly message: "Recent authentication required";
192
+ }) => AuthFailReturn_1) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | AuthReturn | NonNullable<AuthFailReturn_1>>;
193
+ } & {
194
+ readonly protectAgent: <AuthReturn, AuthFailReturn_2>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: {
195
+ code: "Forbidden" | "Unauthorized";
196
+ message: "Agent is not authenticated" | "Insufficient agent scopes";
197
+ }) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
198
+ }) | ({
199
+ readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
200
+ readonly code: "Bad Request";
201
+ readonly message: "Cookies are missing";
202
+ } | {
203
+ readonly code: "Unauthorized";
204
+ readonly message: "User is not authenticated";
205
+ }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
206
+ } & {
207
+ readonly requireRecentAuth: <AuthReturn, AuthFailReturn_1>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
208
+ readonly code: "Unauthorized";
209
+ readonly message: "Recent authentication required";
210
+ }) => AuthFailReturn_1) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | AuthReturn | NonNullable<AuthFailReturn_1>>;
211
+ } & {
212
+ readonly protectPermission: <AuthReturn, AuthFailReturn_3>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
213
+ readonly code: "Bad Request";
214
+ readonly message: "Cookies are missing";
215
+ } | {
216
+ readonly code: "Forbidden";
217
+ readonly message: "Insufficient permissions";
218
+ } | {
219
+ readonly code: "Unauthorized";
220
+ readonly message: "User is not authenticated";
221
+ }) => AuthFailReturn_3) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaCustomStatusResponse<"Forbidden", "Insufficient permissions", 403> | AuthReturn | NonNullable<AuthFailReturn_3>>;
222
+ } & {
223
+ readonly protectAgent: <AuthReturn, AuthFailReturn_2>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: {
224
+ code: "Forbidden" | "Unauthorized";
225
+ message: "Agent is not authenticated" | "Insufficient agent scopes";
226
+ }) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
227
+ });
228
+ resolve: {};
229
+ }, {
230
+ typebox: {};
231
+ error: {};
232
+ } & {
233
+ typebox: {};
234
+ error: {};
235
+ }, ({
236
+ schema: {};
237
+ standaloneSchema: {};
238
+ macro: {};
239
+ macroFn: {};
240
+ parser: {};
241
+ response: {};
242
+ } & ({
243
+ schema: import("elysia").UnwrapRoute<{
244
+ cookie: import("@sinclair/typebox").TObject<{
245
+ user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
246
+ }>;
247
+ }, {}, "">;
248
+ standaloneSchema: {};
249
+ macro: {};
250
+ macroFn: {};
251
+ parser: {};
252
+ response: import("elysia").ExtractErrorFromHandle<{
253
+ readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
254
+ readonly code: "Bad Request";
255
+ readonly message: "Cookies are missing";
256
+ } | {
257
+ readonly code: "Unauthorized";
258
+ readonly message: "User is not authenticated";
259
+ }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
260
+ }>;
261
+ } & ({
262
+ schema: import("elysia").UnwrapRoute<{
263
+ cookie: import("@sinclair/typebox").TObject<{
264
+ user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
265
+ }>;
266
+ }, {}, "">;
267
+ standaloneSchema: {};
268
+ macro: {};
269
+ macroFn: {};
270
+ parser: {};
271
+ response: import("elysia").ExtractErrorFromHandle<{
272
+ readonly requireRecentAuth: <AuthReturn, AuthFailReturn_1>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
273
+ readonly code: "Unauthorized";
274
+ readonly message: "Recent authentication required";
275
+ }) => AuthFailReturn_1) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | AuthReturn | NonNullable<AuthFailReturn_1>>;
276
+ }>;
277
+ } & ({
278
+ schema: {};
279
+ standaloneSchema: {};
280
+ macro: {};
281
+ macroFn: {};
282
+ parser: {};
283
+ response: {};
284
+ } | {
285
+ schema: import("elysia").UnwrapRoute<{
286
+ cookie: import("@sinclair/typebox").TObject<{
287
+ user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
288
+ }>;
289
+ }, {}, "">;
290
+ standaloneSchema: {};
291
+ macro: {};
292
+ macroFn: {};
293
+ parser: {};
294
+ response: import("elysia").ExtractErrorFromHandle<{
295
+ readonly protectPermission: <AuthReturn, AuthFailReturn_3>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
296
+ readonly code: "Bad Request";
297
+ readonly message: "Cookies are missing";
298
+ } | {
299
+ readonly code: "Forbidden";
300
+ readonly message: "Insufficient permissions";
301
+ } | {
302
+ readonly code: "Unauthorized";
303
+ readonly message: "User is not authenticated";
304
+ }) => AuthFailReturn_3) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaCustomStatusResponse<"Forbidden", "Insufficient permissions", 403> | AuthReturn | NonNullable<AuthFailReturn_3>>;
305
+ }>;
306
+ })))) & {
307
+ schema: {};
308
+ standaloneSchema: {};
309
+ macro: {};
310
+ macroFn: {};
311
+ parser: {};
312
+ response: import("elysia").ExtractErrorFromHandle<{
313
+ readonly protectAgent: <AuthReturn, AuthFailReturn_2>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: {
314
+ code: "Forbidden" | "Unauthorized";
315
+ message: "Agent is not authenticated" | "Insufficient agent scopes";
316
+ }) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
317
+ }>;
318
+ }, {}, {
319
+ derive: {};
320
+ resolve: {};
321
+ schema: {};
322
+ standaloneSchema: {};
323
+ response: {};
324
+ }, ({
325
+ derive: {};
326
+ resolve: {};
327
+ schema: {};
328
+ standaloneSchema: {};
329
+ response: {};
330
+ } & {
331
+ derive: {};
332
+ resolve: {};
333
+ schema: {};
334
+ standaloneSchema: {};
335
+ response: {};
336
+ }) | ({
337
+ derive: {};
338
+ resolve: {};
339
+ schema: {};
340
+ standaloneSchema: {};
341
+ response: {};
342
+ } & {
343
+ derive: {};
344
+ resolve: {};
345
+ schema: {};
346
+ standaloneSchema: {};
347
+ response: {};
348
+ } & {
349
+ derive: {};
350
+ resolve: {};
351
+ schema: {};
352
+ standaloneSchema: {};
353
+ response: {};
354
+ })>;
355
+ coreRoutes: Elysia<"", {
356
+ decorator: {};
357
+ store: {
358
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<NoInfer<UserType>> & import("./types").SessionRecord<unknown>;
359
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
360
+ };
361
+ derive: {
362
+ readonly cleanupSessions: () => Promise<void>;
363
+ };
364
+ resolve: {};
365
+ }, {
366
+ typebox: {};
367
+ error: {};
368
+ } & {
369
+ typebox: {};
370
+ error: {};
371
+ }, {
372
+ schema: {};
373
+ standaloneSchema: {};
374
+ macro: {};
375
+ macroFn: {};
376
+ parser: {};
377
+ response: {};
378
+ } & {
379
+ schema: {};
380
+ standaloneSchema: {};
381
+ macro: {};
382
+ macroFn: {};
383
+ parser: {};
384
+ response: import("elysia").ExtractErrorFromHandle<{
385
+ readonly cleanupSessions: () => Promise<void>;
386
+ }>;
387
+ } & {
388
+ schema: {};
389
+ standaloneSchema: {};
390
+ macro: {};
391
+ macroFn: {};
392
+ parser: {};
393
+ response: {};
394
+ }, (({
395
+ [x: string]: {
396
+ delete: {
397
+ body: unknown;
398
+ params: {};
399
+ query: unknown;
400
+ headers: unknown;
401
+ response: {
402
+ 400: "Cookies are missing";
403
+ 401: "No user session id found";
404
+ 200: Response;
405
+ 422: {
406
+ type: "validation";
407
+ on: string;
408
+ summary?: string;
409
+ message?: string;
410
+ found?: unknown;
411
+ property?: string;
412
+ expected?: string;
413
+ };
414
+ 500: "Sign out operation failed";
415
+ };
416
+ };
417
+ };
418
+ } & {
419
+ [x: string]: {
420
+ post: {
421
+ body: unknown;
422
+ params: {};
423
+ query: unknown;
424
+ headers: unknown;
425
+ response: {
426
+ 400: "Cookies are missing" | "Invalid provider" | "Session has no access token to revoke";
427
+ 401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "No user session found";
428
+ 501: "Provider does not support revocation";
429
+ 200: Response;
430
+ 422: {
431
+ type: "validation";
432
+ on: string;
433
+ summary?: string;
434
+ message?: string;
435
+ found?: unknown;
436
+ property?: string;
437
+ expected?: string;
438
+ };
439
+ 500: "Failed to revoke token";
440
+ };
441
+ };
442
+ };
443
+ } & ({
444
+ [x: string]: {
445
+ get: {
446
+ body: unknown;
447
+ params: {};
448
+ query: unknown;
449
+ headers: unknown;
450
+ response: {
451
+ 400: "Cookies are missing";
452
+ 200: {
453
+ impersonator: import("./types").Impersonator | undefined;
454
+ user: NonNullable<UserType> | null;
455
+ };
456
+ 422: {
457
+ type: "validation";
458
+ on: string;
459
+ summary?: string;
460
+ message?: string;
461
+ found?: unknown;
462
+ property?: string;
463
+ expected?: string;
464
+ };
465
+ 500: `Error: ${string} - ${string}` | `Unknown Error: ${string}`;
466
+ };
467
+ };
468
+ };
469
+ } & ({
470
+ [x: string]: {
471
+ post: {
472
+ body: unknown;
473
+ params: {};
474
+ query: unknown;
475
+ headers: unknown;
476
+ response: {
477
+ 400: "Cookies are missing" | "Invalid provider" | "No refresh token found";
478
+ 401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "No user session found";
479
+ 501: "Provider is not refreshable";
480
+ 200: Response;
481
+ 422: {
482
+ type: "validation";
483
+ on: string;
484
+ summary?: string;
485
+ message?: string;
486
+ found?: unknown;
487
+ property?: string;
488
+ expected?: string;
489
+ };
490
+ 500: "Failed to refresh token";
491
+ };
492
+ };
493
+ };
494
+ } & ({
495
+ [x: string]: {
496
+ ":provider": {
497
+ get: {
498
+ body: unknown;
499
+ params: {
500
+ provider: string;
501
+ };
502
+ query: {
503
+ client?: string | undefined;
504
+ intent?: "login" | "link_identity" | "link_connector" | undefined;
505
+ };
506
+ headers: unknown;
507
+ response: {
508
+ 400: "Cookies are missing" | "Provider is required";
509
+ 401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found";
510
+ 200: Response;
511
+ 422: {
512
+ type: "validation";
513
+ on: string;
514
+ summary?: string;
515
+ message?: string;
516
+ found?: unknown;
517
+ property?: string;
518
+ expected?: string;
519
+ };
520
+ 500: "Failed to create authorization URL";
521
+ };
522
+ };
523
+ };
524
+ };
525
+ } | {
526
+ [x: string]: {
527
+ ":provider": {
528
+ [x: string]: {
529
+ get: {
530
+ body: unknown;
531
+ params: {
532
+ provider: string;
533
+ };
534
+ query: {
535
+ client?: string | undefined;
536
+ intent?: "login" | "link_identity" | "link_connector" | undefined;
537
+ };
538
+ headers: unknown;
539
+ response: {
540
+ 400: "Cookies are missing" | "Provider is required";
541
+ 401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found";
542
+ 200: Response;
543
+ 422: {
544
+ type: "validation";
545
+ on: string;
546
+ summary?: string;
547
+ message?: string;
548
+ found?: unknown;
549
+ property?: string;
550
+ expected?: string;
551
+ };
552
+ 500: "Failed to create authorization URL";
553
+ };
554
+ };
555
+ };
556
+ };
557
+ };
558
+ })))) & {
559
+ [x: string]: {
560
+ get: {
561
+ body: unknown;
562
+ params: {};
563
+ query: unknown;
564
+ headers: unknown;
565
+ response: {
566
+ [x: string]: any;
567
+ };
568
+ };
569
+ };
570
+ }) & {
571
+ [x: string]: {
572
+ get: {
573
+ body: unknown;
574
+ params: {};
575
+ query: unknown;
576
+ headers: unknown;
577
+ response: {
578
+ 400: "Cookies are missing" | "Session has no access token to fetch a profile";
579
+ 401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "Invalid provider" | "No user session found";
580
+ 200: Response;
581
+ 422: {
582
+ type: "validation";
583
+ on: string;
584
+ summary?: string;
585
+ message?: string;
586
+ found?: unknown;
587
+ property?: string;
588
+ expected?: string;
589
+ };
590
+ 500: `${string} - ${string}` | `Failed to validate authorization code: Unknown status: ${string}`;
591
+ };
592
+ };
593
+ };
594
+ }, {
595
+ derive: {};
596
+ resolve: {};
597
+ schema: {};
598
+ standaloneSchema: {};
599
+ response: {};
600
+ }, {
601
+ derive: {};
602
+ resolve: {};
603
+ schema: {};
604
+ standaloneSchema: {};
605
+ response: {};
606
+ } & {
607
+ derive: {};
608
+ resolve: {};
609
+ schema: {};
610
+ standaloneSchema: {};
611
+ response: {};
612
+ } & {
613
+ derive: {};
614
+ resolve: {};
615
+ schema: {};
616
+ standaloneSchema: {};
617
+ response: {};
618
+ }>;
619
+ featureRoutes: Elysia<"", {
620
+ decorator: {};
621
+ store: {} | {
622
+ session: import("./types").SessionRecord<import(".").AuthHtmxUser>;
623
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
624
+ } | {
625
+ session: import("./types").SessionRecord<UserType>;
626
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
627
+ } | {
628
+ session: import("./types").SessionRecord<UserType>;
629
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
630
+ } | {
631
+ session: import("./types").SessionRecord<UserType>;
632
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
633
+ } | {
634
+ session: import("./types").SessionRecord<UserType>;
635
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
636
+ } | {
637
+ session: import("./types").SessionRecord<UserType>;
638
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
639
+ } | {
640
+ session: import("./types").SessionRecord<UserType>;
641
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
642
+ } | {
643
+ session: import("./types").SessionRecord<UserType>;
644
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
645
+ } | {
646
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
647
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
648
+ } | {
649
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
650
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
651
+ } | {
652
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
653
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
654
+ } | {
655
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
656
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
657
+ } | {
658
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
659
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
660
+ } | {
661
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
662
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
663
+ } | {
664
+ session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
665
+ unregisteredSession: import("./types").UnregisteredSessionRecord;
666
+ };
667
+ derive: {} | {
668
+ readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
669
+ readonly code: "Bad Request";
670
+ readonly message: "Cookies are missing";
671
+ } | {
672
+ readonly code: "Unauthorized";
673
+ readonly message: "User is not authenticated";
674
+ }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
675
+ };
676
+ resolve: {};
677
+ }, {
678
+ typebox: {};
679
+ error: {};
680
+ } & {
681
+ typebox: {};
682
+ error: {};
683
+ }, (({
684
+ schema: {};
685
+ standaloneSchema: {};
686
+ macro: {};
687
+ macroFn: {};
688
+ parser: {};
689
+ response: {};
690
+ } & {
691
+ schema: {};
692
+ standaloneSchema: {};
693
+ macro: {};
694
+ macroFn: {};
695
+ parser: {};
696
+ response: {};
697
+ }) | ({
698
+ schema: {};
699
+ standaloneSchema: {};
700
+ macro: {};
701
+ macroFn: {};
702
+ parser: {};
703
+ response: {};
704
+ } & {
705
+ schema: {};
706
+ standaloneSchema: {};
707
+ macro: {};
708
+ macroFn: {};
709
+ parser: {};
710
+ response: {};
711
+ } & {
712
+ schema: import("elysia").UnwrapRoute<{
713
+ cookie: import("@sinclair/typebox").TObject<{
714
+ user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
715
+ }>;
716
+ }, {}, "">;
717
+ standaloneSchema: {};
718
+ macro: {};
719
+ macroFn: {};
720
+ parser: {};
721
+ response: import("elysia").ExtractErrorFromHandle<{
722
+ readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
723
+ readonly code: "Bad Request";
724
+ readonly message: "Cookies are missing";
725
+ } | {
726
+ readonly code: "Unauthorized";
727
+ readonly message: "User is not authenticated";
728
+ }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
729
+ }>;
730
+ })) & {
731
+ schema: {};
732
+ standaloneSchema: {};
733
+ macro: {};
734
+ macroFn: {};
735
+ parser: {};
736
+ response: {};
737
+ }, (((((((((((((((({} | ({
738
+ [x: string]: {
739
+ post: {
740
+ body: {
741
+ email: string;
742
+ password: string;
743
+ };
744
+ params: {};
745
+ query: unknown;
746
+ headers: unknown;
747
+ response: {
748
+ [x: string]: any;
749
+ };
750
+ };
751
+ };
752
+ } & {
753
+ [x: string]: {
754
+ post: {
755
+ body: {
756
+ token: string;
757
+ };
758
+ params: {};
759
+ query: unknown;
760
+ headers: unknown;
761
+ response: {
762
+ 400: "Invalid or expired verification token";
763
+ 200: {
764
+ readonly status: "email_verified";
765
+ };
766
+ 422: {
767
+ type: "validation";
768
+ on: string;
769
+ summary?: string;
770
+ message?: string;
771
+ found?: unknown;
772
+ property?: string;
773
+ expected?: string;
774
+ };
775
+ };
776
+ };
777
+ };
778
+ } & {
779
+ [x: string]: {
780
+ request: {
781
+ post: {
782
+ body: {
783
+ email: string;
784
+ };
785
+ params: {};
786
+ query: unknown;
787
+ headers: unknown;
788
+ response: {
789
+ 200: {
790
+ readonly status: "verification_requested";
791
+ };
792
+ 422: {
793
+ type: "validation";
794
+ on: string;
795
+ summary?: string;
796
+ message?: string;
797
+ found?: unknown;
798
+ property?: string;
799
+ expected?: string;
800
+ };
801
+ };
802
+ };
803
+ };
804
+ };
805
+ } & {
806
+ [x: string]: {
807
+ post: {
808
+ body: {
809
+ email: string;
810
+ password: string;
811
+ };
812
+ params: {};
813
+ query: unknown;
814
+ headers: unknown;
815
+ response: {
816
+ 401: "Invalid email or password";
817
+ 403: {
818
+ readonly status: "email_not_verified";
819
+ };
820
+ 200: {
821
+ readonly status: "mfa_required";
822
+ } | {
823
+ readonly passwordCompromised: boolean;
824
+ readonly status: "authenticated";
825
+ };
826
+ 422: {
827
+ type: "validation";
828
+ on: string;
829
+ summary?: string;
830
+ message?: string;
831
+ found?: unknown;
832
+ property?: string;
833
+ expected?: string;
834
+ };
835
+ 429: {
836
+ readonly retryAfterMs: number | undefined;
837
+ readonly status: "account_locked";
838
+ };
839
+ };
840
+ };
841
+ };
842
+ } & {
843
+ [x: string]: {
844
+ request: {
845
+ post: {
846
+ body: {
847
+ email: string;
848
+ };
849
+ params: {};
850
+ query: unknown;
851
+ headers: unknown;
852
+ response: {
853
+ 200: {
854
+ readonly status: "reset_requested";
855
+ };
856
+ 422: {
857
+ type: "validation";
858
+ on: string;
859
+ summary?: string;
860
+ message?: string;
861
+ found?: unknown;
862
+ property?: string;
863
+ expected?: string;
864
+ };
865
+ };
866
+ };
867
+ };
868
+ };
869
+ } & {
870
+ [x: string]: {
871
+ post: {
872
+ body: {
873
+ token: string;
874
+ password: string;
875
+ };
876
+ params: {};
877
+ query: unknown;
878
+ headers: unknown;
879
+ response: {
880
+ 400: "Invalid or expired reset token" | {
881
+ readonly message: "Password does not meet the policy";
882
+ readonly violations: import(".").PasswordPolicyViolation[];
883
+ };
884
+ 200: {
885
+ readonly status: "password_reset";
886
+ };
887
+ 422: {
888
+ type: "validation";
889
+ on: string;
890
+ summary?: string;
891
+ message?: string;
892
+ found?: unknown;
893
+ property?: string;
894
+ expected?: string;
895
+ };
896
+ };
897
+ };
898
+ };
899
+ })) & ({} | ({
900
+ [x: string]: {
901
+ get: {
902
+ body: unknown;
903
+ params: {};
904
+ query: unknown;
905
+ headers: unknown;
906
+ response: {
907
+ 401: "Authentication required";
908
+ 200: {
909
+ backupCodesRemaining: number;
910
+ enabled: boolean;
911
+ smsBackup: {
912
+ enabled: boolean;
913
+ phone: string | null;
914
+ };
915
+ totp: {
916
+ enabled: boolean;
917
+ };
918
+ };
919
+ 422: {
920
+ type: "validation";
921
+ on: string;
922
+ summary?: string;
923
+ message?: string;
924
+ found?: unknown;
925
+ property?: string;
926
+ expected?: string;
927
+ };
928
+ };
929
+ };
930
+ };
931
+ } & {
932
+ [x: string]: {
933
+ delete: {
934
+ body: unknown;
935
+ params: {};
936
+ query: unknown;
937
+ headers: unknown;
938
+ response: {
939
+ 401: "Authentication required";
940
+ 200: {
941
+ readonly status: "disabled";
942
+ };
943
+ 422: {
944
+ type: "validation";
945
+ on: string;
946
+ summary?: string;
947
+ message?: string;
948
+ found?: unknown;
949
+ property?: string;
950
+ expected?: string;
951
+ };
952
+ };
953
+ };
954
+ };
955
+ } & {
956
+ [x: string]: {
957
+ post: {
958
+ body: unknown;
959
+ params: {};
960
+ query: unknown;
961
+ headers: unknown;
962
+ response: {
963
+ 401: "Authentication required";
964
+ 200: {
965
+ readonly secret: string;
966
+ readonly uri: string;
967
+ };
968
+ 422: {
969
+ type: "validation";
970
+ on: string;
971
+ summary?: string;
972
+ message?: string;
973
+ found?: unknown;
974
+ property?: string;
975
+ expected?: string;
976
+ };
977
+ };
978
+ };
979
+ };
980
+ } & {
981
+ [x: string]: {
982
+ post: {
983
+ body: {
984
+ code: string;
985
+ };
986
+ params: {};
987
+ query: unknown;
988
+ headers: unknown;
989
+ response: {
990
+ 400: "No TOTP enrollment in progress" | "Invalid TOTP code";
991
+ 401: "Authentication required";
992
+ 200: {
993
+ readonly backupCodes: string[];
994
+ };
995
+ 422: {
996
+ type: "validation";
997
+ on: string;
998
+ summary?: string;
999
+ message?: string;
1000
+ found?: unknown;
1001
+ property?: string;
1002
+ expected?: string;
1003
+ };
1004
+ };
1005
+ };
1006
+ };
1007
+ } & {
1008
+ [x: string]: {
1009
+ post: {
1010
+ body: {
1011
+ phone: string;
1012
+ };
1013
+ params: {};
1014
+ query: unknown;
1015
+ headers: unknown;
1016
+ response: {
1017
+ 400: "Phone must be in E.164 format";
1018
+ 401: "Authentication required";
1019
+ 501: "SMS MFA is not configured";
1020
+ 200: {
1021
+ readonly phone: string;
1022
+ };
1023
+ 422: {
1024
+ type: "validation";
1025
+ on: string;
1026
+ summary?: string;
1027
+ message?: string;
1028
+ found?: unknown;
1029
+ property?: string;
1030
+ expected?: string;
1031
+ };
1032
+ };
1033
+ };
1034
+ };
1035
+ } & {
1036
+ [x: string]: {
1037
+ post: {
1038
+ body: {
1039
+ code: string;
1040
+ };
1041
+ params: {};
1042
+ query: unknown;
1043
+ headers: unknown;
1044
+ response: {
1045
+ 400: "No SMS enrollment in progress" | "SMS code expired" | "Invalid SMS code";
1046
+ 401: "Authentication required";
1047
+ 200: {
1048
+ readonly status: "enrolled";
1049
+ };
1050
+ 422: {
1051
+ type: "validation";
1052
+ on: string;
1053
+ summary?: string;
1054
+ message?: string;
1055
+ found?: unknown;
1056
+ property?: string;
1057
+ expected?: string;
1058
+ };
1059
+ 429: "Too many attempts";
1060
+ };
1061
+ };
1062
+ };
1063
+ } & {
1064
+ [x: string]: {
1065
+ post: {
1066
+ body: {
1067
+ code?: string | undefined;
1068
+ action?: "verify" | "send" | undefined;
1069
+ factor?: "sms" | undefined;
1070
+ };
1071
+ params: {};
1072
+ query: unknown;
1073
+ headers: unknown;
1074
+ response: {
1075
+ 400: "SMS code required" | "No SMS code in progress";
1076
+ 401: "SMS code expired" | "Too many attempts" | "No MFA challenge in progress" | "Invalid MFA code";
1077
+ 200: {
1078
+ readonly status: "sent";
1079
+ } | {
1080
+ readonly status: "authenticated";
1081
+ };
1082
+ 422: {
1083
+ type: "validation";
1084
+ on: string;
1085
+ summary?: string;
1086
+ message?: string;
1087
+ found?: unknown;
1088
+ property?: string;
1089
+ expected?: string;
1090
+ };
1091
+ };
1092
+ };
1093
+ };
1094
+ }))) & {}) & ({} | ({
1095
+ [x: string]: {
1096
+ get: {
1097
+ body: unknown;
1098
+ params: {};
1099
+ query: unknown;
1100
+ headers: unknown;
1101
+ response: {
1102
+ 401: "Authentication required";
1103
+ 501: "Session management requires an authSessionStore";
1104
+ 200: {
1105
+ readonly sessions: {
1106
+ authenticatedAt?: number;
1107
+ current: boolean;
1108
+ expiresAt: number;
1109
+ id: import("./types").UserSessionId;
1110
+ }[];
1111
+ };
1112
+ 422: {
1113
+ type: "validation";
1114
+ on: string;
1115
+ summary?: string;
1116
+ message?: string;
1117
+ found?: unknown;
1118
+ property?: string;
1119
+ expected?: string;
1120
+ };
1121
+ };
1122
+ };
1123
+ };
1124
+ } & {
1125
+ [x: string]: {
1126
+ ":id": {
1127
+ delete: {
1128
+ body: unknown;
1129
+ params: {
1130
+ id: string;
1131
+ };
1132
+ query: unknown;
1133
+ headers: unknown;
1134
+ response: {
1135
+ 400: "Invalid session id";
1136
+ 401: "Authentication required";
1137
+ 501: "Session management requires an authSessionStore";
1138
+ 404: "Session not found";
1139
+ 200: {
1140
+ readonly revoked: `${string}-${string}-${string}-${string}-${string}`;
1141
+ };
1142
+ 422: {
1143
+ type: "validation";
1144
+ on: string;
1145
+ summary?: string;
1146
+ message?: string;
1147
+ found?: unknown;
1148
+ property?: string;
1149
+ expected?: string;
1150
+ };
1151
+ };
1152
+ };
1153
+ };
1154
+ };
1155
+ }))) & ({} | ({
1156
+ [x: string]: {
1157
+ get: {
1158
+ body: unknown;
1159
+ params: {
1160
+ organizationId: string;
1161
+ };
1162
+ query: unknown;
1163
+ headers: unknown;
1164
+ response: {
1165
+ 404: "No OIDC connection is configured for this organization";
1166
+ 200: Response;
1167
+ 422: {
1168
+ type: "validation";
1169
+ on: string;
1170
+ summary?: string;
1171
+ message?: string;
1172
+ found?: unknown;
1173
+ property?: string;
1174
+ expected?: string;
1175
+ };
1176
+ };
1177
+ };
1178
+ };
1179
+ } & {
1180
+ [x: string]: {
1181
+ get: {
1182
+ body: unknown;
1183
+ params: {
1184
+ organizationId: string;
1185
+ };
1186
+ query: {
1187
+ code?: string | undefined;
1188
+ state?: string | undefined;
1189
+ };
1190
+ headers: unknown;
1191
+ response: {
1192
+ 400: "SSO session cookies are missing" | "Invalid SSO callback request" | "SSO organization mismatch" | "OIDC token response is missing an id_token";
1193
+ 404: "No OIDC connection is configured for this organization";
1194
+ 200: Response;
1195
+ 422: {
1196
+ type: "validation";
1197
+ on: string;
1198
+ summary?: string;
1199
+ message?: string;
1200
+ found?: unknown;
1201
+ property?: string;
1202
+ expected?: string;
1203
+ };
1204
+ 500: "OIDC sign-in failed";
1205
+ };
1206
+ };
1207
+ };
1208
+ }))) & ({} | ({
1209
+ [x: string]: {
1210
+ get: {
1211
+ body: unknown;
1212
+ params: {
1213
+ organizationId: string;
1214
+ };
1215
+ query: unknown;
1216
+ headers: unknown;
1217
+ response: {
1218
+ 404: "No SAML connection is configured for this organization";
1219
+ 200: Response;
1220
+ 422: {
1221
+ type: "validation";
1222
+ on: string;
1223
+ summary?: string;
1224
+ message?: string;
1225
+ found?: unknown;
1226
+ property?: string;
1227
+ expected?: string;
1228
+ };
1229
+ };
1230
+ };
1231
+ };
1232
+ } & {
1233
+ [x: string]: {
1234
+ post: {
1235
+ body: {
1236
+ RelayState?: string | undefined;
1237
+ SAMLResponse: string;
1238
+ };
1239
+ params: {
1240
+ organizationId: string;
1241
+ };
1242
+ query: unknown;
1243
+ headers: unknown;
1244
+ response: {
1245
+ 404: "No SAML connection is configured for this organization";
1246
+ 200: Response;
1247
+ 422: {
1248
+ type: "validation";
1249
+ on: string;
1250
+ summary?: string;
1251
+ message?: string;
1252
+ found?: unknown;
1253
+ property?: string;
1254
+ expected?: string;
1255
+ };
1256
+ 500: "SAML sign-in failed";
1257
+ };
1258
+ };
1259
+ };
1260
+ } & {
1261
+ [x: string]: {
1262
+ get: {
1263
+ body: unknown;
1264
+ params: {
1265
+ organizationId: string;
1266
+ };
1267
+ query: unknown;
1268
+ headers: unknown;
1269
+ response: {
1270
+ 404: "No SAML connection is configured for this organization";
1271
+ 200: Response;
1272
+ 422: {
1273
+ type: "validation";
1274
+ on: string;
1275
+ summary?: string;
1276
+ message?: string;
1277
+ found?: unknown;
1278
+ property?: string;
1279
+ expected?: string;
1280
+ };
1281
+ };
1282
+ };
1283
+ };
1284
+ } & {
1285
+ [x: string]: {
1286
+ get: {
1287
+ body: unknown;
1288
+ params: {
1289
+ organizationId: string;
1290
+ };
1291
+ query: unknown;
1292
+ headers: unknown;
1293
+ response: {
1294
+ 200: Response;
1295
+ 422: {
1296
+ type: "validation";
1297
+ on: string;
1298
+ summary?: string;
1299
+ message?: string;
1300
+ found?: unknown;
1301
+ property?: string;
1302
+ expected?: string;
1303
+ };
1304
+ };
1305
+ };
1306
+ };
1307
+ } & {
1308
+ [x: string]: {
1309
+ get: {
1310
+ body: unknown;
1311
+ params: {
1312
+ organizationId: string;
1313
+ };
1314
+ query: {
1315
+ RelayState?: string | undefined;
1316
+ SAMLResponse?: string | undefined;
1317
+ SAMLRequest?: string | undefined;
1318
+ SigAlg?: string | undefined;
1319
+ Signature?: string | undefined;
1320
+ };
1321
+ headers: unknown;
1322
+ response: {
1323
+ 400: "Missing SAMLRequest or SAMLResponse" | "Invalid SAML LogoutRequest";
1324
+ 501: "SAML Single Logout is not configured";
1325
+ 404: "No SAML connection is configured for this organization";
1326
+ 200: Response;
1327
+ 422: {
1328
+ type: "validation";
1329
+ on: string;
1330
+ summary?: string;
1331
+ message?: string;
1332
+ found?: unknown;
1333
+ property?: string;
1334
+ expected?: string;
1335
+ };
1336
+ 500: "SAML logout failed";
1337
+ };
1338
+ };
1339
+ };
1340
+ }))) & ({} | {
1341
+ [x: string]: {
1342
+ get: {
1343
+ body: unknown;
1344
+ params: {};
1345
+ query: {
1346
+ email?: string | undefined;
1347
+ };
1348
+ headers: unknown;
1349
+ response: {
1350
+ 400: "An \"email\" query parameter is required" | "A valid email address is required";
1351
+ 404: "No SSO organization is configured for this email domain" | "No SSO connection is configured for this organization";
1352
+ 200: Response;
1353
+ 422: {
1354
+ type: "validation";
1355
+ on: string;
1356
+ summary?: string;
1357
+ message?: string;
1358
+ found?: unknown;
1359
+ property?: string;
1360
+ expected?: string;
1361
+ };
1362
+ };
1363
+ };
1364
+ };
1365
+ })) & ({} | ({
1366
+ [x: string]: {
1367
+ get: {
1368
+ body: unknown;
1369
+ params: {};
1370
+ query: unknown;
1371
+ headers: unknown;
1372
+ response: {
1373
+ 200: Response;
1374
+ };
1375
+ };
1376
+ };
1377
+ } & {
1378
+ [x: string]: {
1379
+ post: {
1380
+ body: unknown;
1381
+ params: {};
1382
+ query: unknown;
1383
+ headers: unknown;
1384
+ response: {
1385
+ 200: Response;
1386
+ };
1387
+ };
1388
+ };
1389
+ } & {
1390
+ [x: string]: {
1391
+ get: {
1392
+ body: unknown;
1393
+ params: {};
1394
+ query: {
1395
+ filter?: string | undefined;
1396
+ };
1397
+ headers: unknown;
1398
+ response: {
1399
+ 200: Response;
1400
+ 422: {
1401
+ type: "validation";
1402
+ on: string;
1403
+ summary?: string;
1404
+ message?: string;
1405
+ found?: unknown;
1406
+ property?: string;
1407
+ expected?: string;
1408
+ };
1409
+ };
1410
+ };
1411
+ };
1412
+ } & {
1413
+ [x: string]: {
1414
+ get: {
1415
+ body: unknown;
1416
+ params: {
1417
+ id: string;
1418
+ };
1419
+ query: unknown;
1420
+ headers: unknown;
1421
+ response: {
1422
+ 200: Response;
1423
+ 422: {
1424
+ type: "validation";
1425
+ on: string;
1426
+ summary?: string;
1427
+ message?: string;
1428
+ found?: unknown;
1429
+ property?: string;
1430
+ expected?: string;
1431
+ };
1432
+ };
1433
+ };
1434
+ };
1435
+ } & {
1436
+ [x: string]: {
1437
+ put: {
1438
+ body: unknown;
1439
+ params: {
1440
+ id: string;
1441
+ };
1442
+ query: unknown;
1443
+ headers: unknown;
1444
+ response: {
1445
+ 200: Response;
1446
+ 422: {
1447
+ type: "validation";
1448
+ on: string;
1449
+ summary?: string;
1450
+ message?: string;
1451
+ found?: unknown;
1452
+ property?: string;
1453
+ expected?: string;
1454
+ };
1455
+ };
1456
+ };
1457
+ };
1458
+ } & {
1459
+ [x: string]: {
1460
+ patch: {
1461
+ body: unknown;
1462
+ params: {
1463
+ id: string;
1464
+ };
1465
+ query: unknown;
1466
+ headers: unknown;
1467
+ response: {
1468
+ 200: Response;
1469
+ 422: {
1470
+ type: "validation";
1471
+ on: string;
1472
+ summary?: string;
1473
+ message?: string;
1474
+ found?: unknown;
1475
+ property?: string;
1476
+ expected?: string;
1477
+ };
1478
+ };
1479
+ };
1480
+ };
1481
+ } & {
1482
+ [x: string]: {
1483
+ delete: {
1484
+ body: unknown;
1485
+ params: {
1486
+ id: string;
1487
+ };
1488
+ query: unknown;
1489
+ headers: unknown;
1490
+ response: {
1491
+ 200: Response;
1492
+ 422: {
1493
+ type: "validation";
1494
+ on: string;
1495
+ summary?: string;
1496
+ message?: string;
1497
+ found?: unknown;
1498
+ property?: string;
1499
+ expected?: string;
1500
+ };
1501
+ };
1502
+ };
1503
+ };
1504
+ } & {
1505
+ [x: string]: {
1506
+ post: {
1507
+ body: unknown;
1508
+ params: {};
1509
+ query: unknown;
1510
+ headers: unknown;
1511
+ response: {
1512
+ 200: Response;
1513
+ };
1514
+ };
1515
+ };
1516
+ } & {
1517
+ [x: string]: {
1518
+ get: {
1519
+ body: unknown;
1520
+ params: {};
1521
+ query: {
1522
+ filter?: string | undefined;
1523
+ };
1524
+ headers: unknown;
1525
+ response: {
1526
+ 200: Response;
1527
+ 422: {
1528
+ type: "validation";
1529
+ on: string;
1530
+ summary?: string;
1531
+ message?: string;
1532
+ found?: unknown;
1533
+ property?: string;
1534
+ expected?: string;
1535
+ };
1536
+ };
1537
+ };
1538
+ };
1539
+ } & {
1540
+ [x: string]: {
1541
+ get: {
1542
+ body: unknown;
1543
+ params: {
1544
+ id: string;
1545
+ };
1546
+ query: unknown;
1547
+ headers: unknown;
1548
+ response: {
1549
+ 200: Response;
1550
+ 422: {
1551
+ type: "validation";
1552
+ on: string;
1553
+ summary?: string;
1554
+ message?: string;
1555
+ found?: unknown;
1556
+ property?: string;
1557
+ expected?: string;
1558
+ };
1559
+ };
1560
+ };
1561
+ };
1562
+ } & {
1563
+ [x: string]: {
1564
+ put: {
1565
+ body: unknown;
1566
+ params: {
1567
+ id: string;
1568
+ };
1569
+ query: unknown;
1570
+ headers: unknown;
1571
+ response: {
1572
+ 200: Response;
1573
+ 422: {
1574
+ type: "validation";
1575
+ on: string;
1576
+ summary?: string;
1577
+ message?: string;
1578
+ found?: unknown;
1579
+ property?: string;
1580
+ expected?: string;
1581
+ };
1582
+ };
1583
+ };
1584
+ };
1585
+ } & {
1586
+ [x: string]: {
1587
+ patch: {
1588
+ body: unknown;
1589
+ params: {
1590
+ id: string;
1591
+ };
1592
+ query: unknown;
1593
+ headers: unknown;
1594
+ response: {
1595
+ 200: Response;
1596
+ 422: {
1597
+ type: "validation";
1598
+ on: string;
1599
+ summary?: string;
1600
+ message?: string;
1601
+ found?: unknown;
1602
+ property?: string;
1603
+ expected?: string;
1604
+ };
1605
+ };
1606
+ };
1607
+ };
1608
+ } & {
1609
+ [x: string]: {
1610
+ delete: {
1611
+ body: unknown;
1612
+ params: {
1613
+ id: string;
1614
+ };
1615
+ query: unknown;
1616
+ headers: unknown;
1617
+ response: {
1618
+ 200: Response;
1619
+ 422: {
1620
+ type: "validation";
1621
+ on: string;
1622
+ summary?: string;
1623
+ message?: string;
1624
+ found?: unknown;
1625
+ property?: string;
1626
+ expected?: string;
1627
+ };
1628
+ };
1629
+ };
1630
+ };
1631
+ } & {
1632
+ [x: string]: {
1633
+ get: {
1634
+ body: unknown;
1635
+ params: {};
1636
+ query: unknown;
1637
+ headers: unknown;
1638
+ response: {
1639
+ 200: Response;
1640
+ };
1641
+ };
1642
+ };
1643
+ } & {
1644
+ [x: string]: {
1645
+ get: {
1646
+ body: unknown;
1647
+ params: {
1648
+ id: string;
1649
+ };
1650
+ query: unknown;
1651
+ headers: unknown;
1652
+ response: {
1653
+ 200: Response;
1654
+ 422: {
1655
+ type: "validation";
1656
+ on: string;
1657
+ summary?: string;
1658
+ message?: string;
1659
+ found?: unknown;
1660
+ property?: string;
1661
+ expected?: string;
1662
+ };
1663
+ };
1664
+ };
1665
+ };
1666
+ } & {
1667
+ [x: string]: {
1668
+ get: {
1669
+ body: unknown;
1670
+ params: {};
1671
+ query: unknown;
1672
+ headers: unknown;
1673
+ response: {
1674
+ 200: Response;
1675
+ };
1676
+ };
1677
+ };
1678
+ } & {
1679
+ [x: string]: {
1680
+ get: {
1681
+ body: unknown;
1682
+ params: {
1683
+ id: string;
1684
+ };
1685
+ query: unknown;
1686
+ headers: unknown;
1687
+ response: {
1688
+ 200: Response;
1689
+ 422: {
1690
+ type: "validation";
1691
+ on: string;
1692
+ summary?: string;
1693
+ message?: string;
1694
+ found?: unknown;
1695
+ property?: string;
1696
+ expected?: string;
1697
+ };
1698
+ };
1699
+ };
1700
+ };
1701
+ }))) & ({} | {
1702
+ [x: string]: {
1703
+ post: {
1704
+ body: {
1705
+ client_id?: string | undefined;
1706
+ scope?: string | undefined;
1707
+ grant_type?: string | undefined;
1708
+ client_secret?: string | undefined;
1709
+ };
1710
+ params: {};
1711
+ query: unknown;
1712
+ headers: unknown;
1713
+ response: {
1714
+ 200: Response;
1715
+ 422: {
1716
+ type: "validation";
1717
+ on: string;
1718
+ summary?: string;
1719
+ message?: string;
1720
+ found?: unknown;
1721
+ property?: string;
1722
+ expected?: string;
1723
+ };
1724
+ };
1725
+ };
1726
+ };
1727
+ })) & ({} | ({
1728
+ [x: string]: {
1729
+ get: {
1730
+ body: unknown;
1731
+ params: {};
1732
+ query: {
1733
+ client_id?: string | undefined;
1734
+ scope?: string | undefined;
1735
+ nonce?: string | undefined;
1736
+ claims?: string | undefined;
1737
+ request?: string | undefined;
1738
+ redirect_uri?: string | undefined;
1739
+ acr_values?: string | undefined;
1740
+ code_challenge?: string | undefined;
1741
+ code_challenge_method?: string | undefined;
1742
+ id_token_hint?: string | undefined;
1743
+ max_age?: string | undefined;
1744
+ prompt?: string | undefined;
1745
+ request_uri?: string | undefined;
1746
+ response_mode?: string | undefined;
1747
+ response_type?: string | undefined;
1748
+ state?: string | undefined;
1749
+ };
1750
+ headers: unknown;
1751
+ response: {
1752
+ 200: Response;
1753
+ 422: {
1754
+ type: "validation";
1755
+ on: string;
1756
+ summary?: string;
1757
+ message?: string;
1758
+ found?: unknown;
1759
+ property?: string;
1760
+ expected?: string;
1761
+ };
1762
+ };
1763
+ };
1764
+ };
1765
+ } & {
1766
+ [x: string]: {
1767
+ post: {
1768
+ body: {
1769
+ client_id?: string | undefined;
1770
+ scope?: string | undefined;
1771
+ audience?: string | undefined;
1772
+ resource?: string | undefined;
1773
+ refresh_token?: string | undefined;
1774
+ device_code?: string | undefined;
1775
+ auth_req_id?: string | undefined;
1776
+ grant_type?: string | undefined;
1777
+ claim_token?: string | undefined;
1778
+ assertion?: string | undefined;
1779
+ client_secret?: string | undefined;
1780
+ code?: string | undefined;
1781
+ redirect_uri?: string | undefined;
1782
+ client_assertion?: string | undefined;
1783
+ client_assertion_type?: string | undefined;
1784
+ code_verifier?: string | undefined;
1785
+ 'pre-authorized_code'?: string | undefined;
1786
+ subject_token?: string | undefined;
1787
+ subject_token_type?: string | undefined;
1788
+ };
1789
+ params: {};
1790
+ query: unknown;
1791
+ headers: unknown;
1792
+ response: {
1793
+ 200: Response;
1794
+ 422: {
1795
+ type: "validation";
1796
+ on: string;
1797
+ summary?: string;
1798
+ message?: string;
1799
+ found?: unknown;
1800
+ property?: string;
1801
+ expected?: string;
1802
+ };
1803
+ };
1804
+ };
1805
+ };
1806
+ } & {
1807
+ [x: string]: {
1808
+ post: {
1809
+ body: {
1810
+ client_id?: string | undefined;
1811
+ scope?: string | undefined;
1812
+ nonce?: string | undefined;
1813
+ audience?: string | undefined;
1814
+ claims?: string | undefined;
1815
+ resource?: string | undefined;
1816
+ client_secret?: string | undefined;
1817
+ redirect_uri?: string | undefined;
1818
+ acr_values?: string | undefined;
1819
+ code_challenge?: string | undefined;
1820
+ code_challenge_method?: string | undefined;
1821
+ response_type?: string | undefined;
1822
+ state?: string | undefined;
1823
+ client_assertion?: string | undefined;
1824
+ client_assertion_type?: string | undefined;
1825
+ };
1826
+ params: {};
1827
+ query: unknown;
1828
+ headers: {
1829
+ authorization?: string | undefined;
1830
+ };
1831
+ response: {
1832
+ 200: Response;
1833
+ 422: {
1834
+ type: "validation";
1835
+ on: string;
1836
+ summary?: string;
1837
+ message?: string;
1838
+ found?: unknown;
1839
+ property?: string;
1840
+ expected?: string;
1841
+ };
1842
+ };
1843
+ };
1844
+ };
1845
+ } & {
1846
+ [x: string]: {
1847
+ post: {
1848
+ body: {
1849
+ client_id?: string | undefined;
1850
+ client_secret?: string | undefined;
1851
+ token_type_hint?: string | undefined;
1852
+ token: string;
1853
+ };
1854
+ params: {};
1855
+ query: unknown;
1856
+ headers: {
1857
+ authorization?: string | undefined;
1858
+ };
1859
+ response: {
1860
+ 200: Response;
1861
+ 422: {
1862
+ type: "validation";
1863
+ on: string;
1864
+ summary?: string;
1865
+ message?: string;
1866
+ found?: unknown;
1867
+ property?: string;
1868
+ expected?: string;
1869
+ };
1870
+ };
1871
+ };
1872
+ };
1873
+ } & {
1874
+ [x: string]: {
1875
+ post: {
1876
+ body: {
1877
+ client_id?: string | undefined;
1878
+ client_secret?: string | undefined;
1879
+ token_type_hint?: string | undefined;
1880
+ token: string;
1881
+ };
1882
+ params: {};
1883
+ query: unknown;
1884
+ headers: {
1885
+ authorization?: string | undefined;
1886
+ };
1887
+ response: {
1888
+ 200: Response;
1889
+ 422: {
1890
+ type: "validation";
1891
+ on: string;
1892
+ summary?: string;
1893
+ message?: string;
1894
+ found?: unknown;
1895
+ property?: string;
1896
+ expected?: string;
1897
+ };
1898
+ };
1899
+ };
1900
+ };
1901
+ } & {
1902
+ [x: string]: {
1903
+ post: {
1904
+ body: {
1905
+ client_id?: string | undefined;
1906
+ scope?: string | undefined;
1907
+ client_secret?: string | undefined;
1908
+ login_hint?: string | undefined;
1909
+ binding_message?: string | undefined;
1910
+ };
1911
+ params: {};
1912
+ query: unknown;
1913
+ headers: {
1914
+ authorization?: string | undefined;
1915
+ };
1916
+ response: {
1917
+ 200: Response;
1918
+ 422: {
1919
+ type: "validation";
1920
+ on: string;
1921
+ summary?: string;
1922
+ message?: string;
1923
+ found?: unknown;
1924
+ property?: string;
1925
+ expected?: string;
1926
+ };
1927
+ };
1928
+ };
1929
+ };
1930
+ } & {
1931
+ [x: string]: {
1932
+ post: {
1933
+ body: {
1934
+ client_id?: string | undefined;
1935
+ scope?: string | undefined;
1936
+ client_secret?: string | undefined;
1937
+ };
1938
+ params: {};
1939
+ query: unknown;
1940
+ headers: {
1941
+ authorization?: string | undefined;
1942
+ };
1943
+ response: {
1944
+ 200: Response;
1945
+ 422: {
1946
+ type: "validation";
1947
+ on: string;
1948
+ summary?: string;
1949
+ message?: string;
1950
+ found?: unknown;
1951
+ property?: string;
1952
+ expected?: string;
1953
+ };
1954
+ };
1955
+ };
1956
+ };
1957
+ } & {
1958
+ [x: string]: {
1959
+ post: {
1960
+ body: {
1961
+ action?: "deny" | "approve" | undefined;
1962
+ user_code: string;
1963
+ };
1964
+ params: {};
1965
+ query: unknown;
1966
+ headers: unknown;
1967
+ response: {
1968
+ 200: Response;
1969
+ 422: {
1970
+ type: "validation";
1971
+ on: string;
1972
+ summary?: string;
1973
+ message?: string;
1974
+ found?: unknown;
1975
+ property?: string;
1976
+ expected?: string;
1977
+ };
1978
+ };
1979
+ };
1980
+ };
1981
+ } & {
1982
+ [x: string]: {
1983
+ get: {
1984
+ body: unknown;
1985
+ params: {};
1986
+ query: {
1987
+ client_id?: string | undefined;
1988
+ id_token_hint?: string | undefined;
1989
+ state?: string | undefined;
1990
+ post_logout_redirect_uri?: string | undefined;
1991
+ };
1992
+ headers: unknown;
1993
+ response: {
1994
+ 200: Response;
1995
+ 422: {
1996
+ type: "validation";
1997
+ on: string;
1998
+ summary?: string;
1999
+ message?: string;
2000
+ found?: unknown;
2001
+ property?: string;
2002
+ expected?: string;
2003
+ };
2004
+ };
2005
+ };
2006
+ };
2007
+ } & {
2008
+ [x: string]: {
2009
+ post: {
2010
+ body: {
2011
+ client_id?: string | undefined;
2012
+ id_token_hint?: string | undefined;
2013
+ state?: string | undefined;
2014
+ post_logout_redirect_uri?: string | undefined;
2015
+ };
2016
+ params: {};
2017
+ query: unknown;
2018
+ headers: unknown;
2019
+ response: {
2020
+ 200: Response;
2021
+ 422: {
2022
+ type: "validation";
2023
+ on: string;
2024
+ summary?: string;
2025
+ message?: string;
2026
+ found?: unknown;
2027
+ property?: string;
2028
+ expected?: string;
2029
+ };
2030
+ };
2031
+ };
2032
+ };
2033
+ } & {
2034
+ [x: string]: {
2035
+ post: {
2036
+ body: {
2037
+ jwks?: any;
2038
+ scope?: string | undefined;
2039
+ backchannel_logout_uri?: string | undefined;
2040
+ client_name?: string | undefined;
2041
+ grant_types?: string[] | undefined;
2042
+ jwks_uri?: string | undefined;
2043
+ post_logout_redirect_uris?: string[] | undefined;
2044
+ redirect_uris?: string[] | undefined;
2045
+ };
2046
+ params: {};
2047
+ query: unknown;
2048
+ headers: {
2049
+ authorization?: string | undefined;
2050
+ };
2051
+ response: {
2052
+ 200: Response;
2053
+ 422: {
2054
+ type: "validation";
2055
+ on: string;
2056
+ summary?: string;
2057
+ message?: string;
2058
+ found?: unknown;
2059
+ property?: string;
2060
+ expected?: string;
2061
+ };
2062
+ };
2063
+ };
2064
+ };
2065
+ } & {
2066
+ [x: string]: {
2067
+ ":clientId": {
2068
+ get: {
2069
+ body: unknown;
2070
+ params: {
2071
+ clientId: string;
2072
+ };
2073
+ query: unknown;
2074
+ headers: {
2075
+ authorization?: string | undefined;
2076
+ };
2077
+ response: {
2078
+ 200: Response;
2079
+ 422: {
2080
+ type: "validation";
2081
+ on: string;
2082
+ summary?: string;
2083
+ message?: string;
2084
+ found?: unknown;
2085
+ property?: string;
2086
+ expected?: string;
2087
+ };
2088
+ };
2089
+ };
2090
+ };
2091
+ };
2092
+ } & {
2093
+ [x: string]: {
2094
+ ":clientId": {
2095
+ put: {
2096
+ body: {
2097
+ jwks?: any;
2098
+ scope?: string | undefined;
2099
+ backchannel_logout_uri?: string | undefined;
2100
+ client_name?: string | undefined;
2101
+ grant_types?: string[] | undefined;
2102
+ jwks_uri?: string | undefined;
2103
+ post_logout_redirect_uris?: string[] | undefined;
2104
+ redirect_uris?: string[] | undefined;
2105
+ };
2106
+ params: {
2107
+ clientId: string;
2108
+ };
2109
+ query: unknown;
2110
+ headers: {
2111
+ authorization?: string | undefined;
2112
+ };
2113
+ response: {
2114
+ 200: Response;
2115
+ 422: {
2116
+ type: "validation";
2117
+ on: string;
2118
+ summary?: string;
2119
+ message?: string;
2120
+ found?: unknown;
2121
+ property?: string;
2122
+ expected?: string;
2123
+ };
2124
+ };
2125
+ };
2126
+ };
2127
+ };
2128
+ } & {
2129
+ [x: string]: {
2130
+ ":clientId": {
2131
+ delete: {
2132
+ body: unknown;
2133
+ params: {
2134
+ clientId: string;
2135
+ };
2136
+ query: unknown;
2137
+ headers: {
2138
+ authorization?: string | undefined;
2139
+ };
2140
+ response: {
2141
+ 200: Response;
2142
+ 422: {
2143
+ type: "validation";
2144
+ on: string;
2145
+ summary?: string;
2146
+ message?: string;
2147
+ found?: unknown;
2148
+ property?: string;
2149
+ expected?: string;
2150
+ };
2151
+ };
2152
+ };
2153
+ };
2154
+ };
2155
+ } & {
2156
+ [x: string]: {
2157
+ get: {
2158
+ body: unknown;
2159
+ params: {};
2160
+ query: unknown;
2161
+ headers: {
2162
+ authorization?: string | undefined;
2163
+ };
2164
+ response: {
2165
+ 200: Response;
2166
+ 422: {
2167
+ type: "validation";
2168
+ on: string;
2169
+ summary?: string;
2170
+ message?: string;
2171
+ found?: unknown;
2172
+ property?: string;
2173
+ expected?: string;
2174
+ };
2175
+ };
2176
+ };
2177
+ };
2178
+ } & {
2179
+ [x: string]: {
2180
+ post: {
2181
+ body: {
2182
+ access_token?: string | undefined;
2183
+ };
2184
+ params: {};
2185
+ query: unknown;
2186
+ headers: {
2187
+ authorization?: string | undefined;
2188
+ };
2189
+ response: {
2190
+ 200: Response;
2191
+ 422: {
2192
+ type: "validation";
2193
+ on: string;
2194
+ summary?: string;
2195
+ message?: string;
2196
+ found?: unknown;
2197
+ property?: string;
2198
+ expected?: string;
2199
+ };
2200
+ };
2201
+ };
2202
+ };
2203
+ } & {
2204
+ [x: string]: {
2205
+ get: {
2206
+ body: unknown;
2207
+ params: {};
2208
+ query: unknown;
2209
+ headers: unknown;
2210
+ response: {
2211
+ 200: {
2212
+ keys: {
2213
+ alg: string;
2214
+ crv: string | undefined;
2215
+ kid: string;
2216
+ kty: string | undefined;
2217
+ use: string;
2218
+ x: string | undefined;
2219
+ y: string | undefined;
2220
+ }[];
2221
+ };
2222
+ };
2223
+ };
2224
+ };
2225
+ } & {
2226
+ ".well-known": {
2227
+ "openid-configuration": {
2228
+ get: {
2229
+ body: unknown;
2230
+ params: {};
2231
+ query: unknown;
2232
+ headers: unknown;
2233
+ response: {
2234
+ 200: Record<string, unknown>;
2235
+ };
2236
+ };
2237
+ };
2238
+ };
2239
+ } & {
2240
+ ".well-known": {
2241
+ "oauth-authorization-server": {
2242
+ get: {
2243
+ body: unknown;
2244
+ params: {};
2245
+ query: unknown;
2246
+ headers: unknown;
2247
+ response: {
2248
+ 200: Record<string, unknown>;
2249
+ };
2250
+ };
2251
+ };
2252
+ };
2253
+ }))) & ({} | ({
2254
+ [x: string]: {
2255
+ get: {
2256
+ body: unknown;
2257
+ params: {};
2258
+ query: unknown;
2259
+ headers: unknown;
2260
+ response: {
2261
+ 401: "Authentication required";
2262
+ 200: {
2263
+ readonly organizations: {
2264
+ membership: import(".").OrganizationMembership;
2265
+ organization: import(".").Organization | undefined;
2266
+ }[];
2267
+ };
2268
+ 422: {
2269
+ type: "validation";
2270
+ on: string;
2271
+ summary?: string;
2272
+ message?: string;
2273
+ found?: unknown;
2274
+ property?: string;
2275
+ expected?: string;
2276
+ };
2277
+ };
2278
+ };
2279
+ };
2280
+ } & {
2281
+ [x: string]: {
2282
+ post: {
2283
+ body: {
2284
+ metadata?: {} | undefined;
2285
+ name: string;
2286
+ };
2287
+ params: {};
2288
+ query: unknown;
2289
+ headers: unknown;
2290
+ response: {
2291
+ 401: "Authentication required";
2292
+ 403: "Cannot create organizations";
2293
+ 200: {
2294
+ readonly organization: import(".").Organization;
2295
+ };
2296
+ 422: {
2297
+ type: "validation";
2298
+ on: string;
2299
+ summary?: string;
2300
+ message?: string;
2301
+ found?: unknown;
2302
+ property?: string;
2303
+ expected?: string;
2304
+ };
2305
+ };
2306
+ };
2307
+ };
2308
+ } & {
2309
+ [x: string]: {
2310
+ ":organizationId": {
2311
+ invitations: {
2312
+ post: {
2313
+ body: {
2314
+ roles?: string[] | undefined;
2315
+ email: string;
2316
+ };
2317
+ params: {
2318
+ organizationId: string;
2319
+ };
2320
+ query: unknown;
2321
+ headers: unknown;
2322
+ response: {
2323
+ 401: "Authentication required";
2324
+ 403: "Cannot manage members";
2325
+ 200: {
2326
+ readonly invitationId: string;
2327
+ readonly token: string;
2328
+ };
2329
+ 422: {
2330
+ type: "validation";
2331
+ on: string;
2332
+ summary?: string;
2333
+ message?: string;
2334
+ found?: unknown;
2335
+ property?: string;
2336
+ expected?: string;
2337
+ };
2338
+ };
2339
+ };
2340
+ };
2341
+ };
2342
+ };
2343
+ } & {
2344
+ [x: string]: {
2345
+ ":organizationId": {
2346
+ invitations: {
2347
+ get: {
2348
+ body: unknown;
2349
+ params: {
2350
+ organizationId: string;
2351
+ };
2352
+ query: unknown;
2353
+ headers: unknown;
2354
+ response: {
2355
+ 401: "Authentication required";
2356
+ 403: "Cannot manage members";
2357
+ 200: {
2358
+ readonly invitations: {
2359
+ email: string;
2360
+ expiresAt: number;
2361
+ invitationId: string;
2362
+ roles: string[];
2363
+ state: import(".").InvitationState;
2364
+ }[];
2365
+ };
2366
+ 422: {
2367
+ type: "validation";
2368
+ on: string;
2369
+ summary?: string;
2370
+ message?: string;
2371
+ found?: unknown;
2372
+ property?: string;
2373
+ expected?: string;
2374
+ };
2375
+ };
2376
+ };
2377
+ };
2378
+ };
2379
+ };
2380
+ } & {
2381
+ [x: string]: {
2382
+ ":organizationId": {
2383
+ invitations: {
2384
+ ":invitationId": {
2385
+ delete: {
2386
+ body: unknown;
2387
+ params: {
2388
+ organizationId: string;
2389
+ invitationId: string;
2390
+ };
2391
+ query: unknown;
2392
+ headers: unknown;
2393
+ response: {
2394
+ 401: "Authentication required";
2395
+ 403: "Cannot manage members";
2396
+ 404: "Invitation not found";
2397
+ 200: {
2398
+ readonly revoked: string;
2399
+ };
2400
+ 422: {
2401
+ type: "validation";
2402
+ on: string;
2403
+ summary?: string;
2404
+ message?: string;
2405
+ found?: unknown;
2406
+ property?: string;
2407
+ expected?: string;
2408
+ };
2409
+ };
2410
+ };
2411
+ };
2412
+ };
2413
+ };
2414
+ };
2415
+ } & {
2416
+ [x: string]: {
2417
+ invitations: {
2418
+ accept: {
2419
+ post: {
2420
+ body: {
2421
+ token: string;
2422
+ };
2423
+ params: {};
2424
+ query: unknown;
2425
+ headers: unknown;
2426
+ response: {
2427
+ 400: "Invalid or expired invitation";
2428
+ 401: "Authentication required";
2429
+ 200: {
2430
+ readonly organizationId: string;
2431
+ readonly roles: string[];
2432
+ };
2433
+ 422: {
2434
+ type: "validation";
2435
+ on: string;
2436
+ summary?: string;
2437
+ message?: string;
2438
+ found?: unknown;
2439
+ property?: string;
2440
+ expected?: string;
2441
+ };
2442
+ };
2443
+ };
2444
+ };
2445
+ };
2446
+ };
2447
+ } & {
2448
+ [x: string]: {
2449
+ ":organizationId": {
2450
+ members: {
2451
+ get: {
2452
+ body: unknown;
2453
+ params: {
2454
+ organizationId: string;
2455
+ };
2456
+ query: unknown;
2457
+ headers: unknown;
2458
+ response: {
2459
+ 401: "Authentication required";
2460
+ 403: "Not a member";
2461
+ 200: {
2462
+ readonly members: import(".").OrganizationMembership[];
2463
+ };
2464
+ 422: {
2465
+ type: "validation";
2466
+ on: string;
2467
+ summary?: string;
2468
+ message?: string;
2469
+ found?: unknown;
2470
+ property?: string;
2471
+ expected?: string;
2472
+ };
2473
+ };
2474
+ };
2475
+ };
2476
+ };
2477
+ };
2478
+ } & {
2479
+ [x: string]: {
2480
+ ":organizationId": {
2481
+ members: {
2482
+ ":userId": {
2483
+ delete: {
2484
+ body: unknown;
2485
+ params: {
2486
+ userId: string;
2487
+ organizationId: string;
2488
+ };
2489
+ query: unknown;
2490
+ headers: unknown;
2491
+ response: {
2492
+ 401: "Authentication required";
2493
+ 403: "Cannot manage members";
2494
+ 200: {
2495
+ readonly removed: string;
2496
+ };
2497
+ 422: {
2498
+ type: "validation";
2499
+ on: string;
2500
+ summary?: string;
2501
+ message?: string;
2502
+ found?: unknown;
2503
+ property?: string;
2504
+ expected?: string;
2505
+ };
2506
+ };
2507
+ };
2508
+ };
2509
+ };
2510
+ };
2511
+ };
2512
+ }))) & ({} | ({
2513
+ [x: string]: {
2514
+ ":organizationId": {
2515
+ get: {
2516
+ body: unknown;
2517
+ params: {
2518
+ organizationId: string;
2519
+ };
2520
+ query: unknown;
2521
+ headers: unknown;
2522
+ response: {
2523
+ 401: "Authentication required";
2524
+ 403: "Cannot manage roles";
2525
+ 200: {
2526
+ readonly roles: readonly import(".").Role[];
2527
+ };
2528
+ 422: {
2529
+ type: "validation";
2530
+ on: string;
2531
+ summary?: string;
2532
+ message?: string;
2533
+ found?: unknown;
2534
+ property?: string;
2535
+ expected?: string;
2536
+ };
2537
+ };
2538
+ };
2539
+ };
2540
+ };
2541
+ } & {
2542
+ [x: string]: {
2543
+ ":organizationId": {
2544
+ members: {
2545
+ ":userId": {
2546
+ put: {
2547
+ body: {
2548
+ roles: string[];
2549
+ };
2550
+ params: {
2551
+ userId: string;
2552
+ organizationId: string;
2553
+ };
2554
+ query: unknown;
2555
+ headers: unknown;
2556
+ response: {
2557
+ 401: "Authentication required";
2558
+ 403: "Cannot manage roles";
2559
+ 404: "Membership not found";
2560
+ 200: {
2561
+ readonly roles: string[];
2562
+ };
2563
+ 422: {
2564
+ type: "validation";
2565
+ on: string;
2566
+ summary?: string;
2567
+ message?: string;
2568
+ found?: unknown;
2569
+ property?: string;
2570
+ expected?: string;
2571
+ };
2572
+ };
2573
+ };
2574
+ };
2575
+ };
2576
+ };
2577
+ };
2578
+ }))) & ({} | ({
2579
+ [x: string]: {
2580
+ session: {
2581
+ get: {
2582
+ body: unknown;
2583
+ params: {};
2584
+ query: unknown;
2585
+ headers: unknown;
2586
+ response: {
2587
+ 401: "Invalid or expired setup link";
2588
+ 200: {
2589
+ readonly capabilities: import(".").SetupCapability[];
2590
+ readonly configured: {
2591
+ readonly oidc: boolean;
2592
+ readonly saml: boolean;
2593
+ };
2594
+ readonly expiresAt: number;
2595
+ readonly oidc: {
2596
+ redirectUri: string;
2597
+ } | undefined;
2598
+ readonly organizationId: string;
2599
+ readonly saml: {
2600
+ acsUrl: string;
2601
+ entityId: string;
2602
+ metadataUrl: string;
2603
+ } | undefined;
2604
+ readonly scim: {
2605
+ baseUrl: string;
2606
+ } | undefined;
2607
+ };
2608
+ };
2609
+ };
2610
+ };
2611
+ };
2612
+ } & {
2613
+ [x: string]: {
2614
+ connection: {
2615
+ saml: {
2616
+ put: {
2617
+ body: {
2618
+ idpSloUrl?: string | undefined;
2619
+ idpEntityId: string;
2620
+ idpSsoUrl: string;
2621
+ idpX509Cert: string;
2622
+ };
2623
+ params: {};
2624
+ query: unknown;
2625
+ headers: unknown;
2626
+ response: {
2627
+ 401: "Invalid or expired setup link";
2628
+ 403: "This setup link cannot configure SAML";
2629
+ 501: "SSO is not configured";
2630
+ 200: {
2631
+ readonly configured: true;
2632
+ readonly type: "saml";
2633
+ };
2634
+ 422: {
2635
+ type: "validation";
2636
+ on: string;
2637
+ summary?: string;
2638
+ message?: string;
2639
+ found?: unknown;
2640
+ property?: string;
2641
+ expected?: string;
2642
+ };
2643
+ };
2644
+ };
2645
+ };
2646
+ };
2647
+ };
2648
+ } & {
2649
+ [x: string]: {
2650
+ connection: {
2651
+ oidc: {
2652
+ put: {
2653
+ body: {
2654
+ scopes?: string[] | undefined;
2655
+ redirectUri?: string | undefined;
2656
+ issuer: string;
2657
+ clientId: string;
2658
+ clientSecret: string;
2659
+ };
2660
+ params: {};
2661
+ query: unknown;
2662
+ headers: unknown;
2663
+ response: {
2664
+ 401: "Invalid or expired setup link";
2665
+ 403: "This setup link cannot configure OIDC";
2666
+ 501: "SSO is not configured";
2667
+ 200: {
2668
+ readonly configured: true;
2669
+ readonly type: "oidc";
2670
+ };
2671
+ 422: {
2672
+ type: "validation";
2673
+ on: string;
2674
+ summary?: string;
2675
+ message?: string;
2676
+ found?: unknown;
2677
+ property?: string;
2678
+ expected?: string;
2679
+ };
2680
+ };
2681
+ };
2682
+ };
2683
+ };
2684
+ };
2685
+ } & {
2686
+ [x: string]: {
2687
+ scim: {
2688
+ token: {
2689
+ post: {
2690
+ body: unknown;
2691
+ params: {};
2692
+ query: unknown;
2693
+ headers: unknown;
2694
+ response: {
2695
+ 401: "Invalid or expired setup link";
2696
+ 403: "This setup link cannot configure SCIM";
2697
+ 501: "SCIM is not configured";
2698
+ 200: {
2699
+ readonly baseUrl: `${string}/${string}`;
2700
+ readonly token: string;
2701
+ readonly tokenId: string;
2702
+ };
2703
+ };
2704
+ };
2705
+ };
2706
+ };
2707
+ };
2708
+ }))) & ({} | ({
2709
+ [x: string]: {
2710
+ register: {
2711
+ options: {
2712
+ post: {
2713
+ body: unknown;
2714
+ params: {};
2715
+ query: unknown;
2716
+ headers: unknown;
2717
+ response: {
2718
+ 401: "Authentication required";
2719
+ 200: {
2720
+ [x: string]: unknown;
2721
+ };
2722
+ 422: {
2723
+ type: "validation";
2724
+ on: string;
2725
+ summary?: string;
2726
+ message?: string;
2727
+ found?: unknown;
2728
+ property?: string;
2729
+ expected?: string;
2730
+ };
2731
+ };
2732
+ };
2733
+ };
2734
+ };
2735
+ };
2736
+ } & {
2737
+ [x: string]: {
2738
+ register: {
2739
+ verify: {
2740
+ post: {
2741
+ body: {};
2742
+ params: {};
2743
+ query: unknown;
2744
+ headers: unknown;
2745
+ response: {
2746
+ 400: "No registration challenge in progress" | "WebAuthn registration failed";
2747
+ 401: "Authentication required";
2748
+ 200: {
2749
+ readonly credentialId: string;
2750
+ readonly verified: true;
2751
+ };
2752
+ 422: {
2753
+ type: "validation";
2754
+ on: string;
2755
+ summary?: string;
2756
+ message?: string;
2757
+ found?: unknown;
2758
+ property?: string;
2759
+ expected?: string;
2760
+ };
2761
+ };
2762
+ };
2763
+ };
2764
+ };
2765
+ };
2766
+ } & {
2767
+ [x: string]: {
2768
+ authenticate: {
2769
+ options: {
2770
+ post: {
2771
+ body: unknown;
2772
+ params: {};
2773
+ query: unknown;
2774
+ headers: unknown;
2775
+ response: {
2776
+ 200: {
2777
+ [x: string]: unknown;
2778
+ };
2779
+ 422: {
2780
+ type: "validation";
2781
+ on: string;
2782
+ summary?: string;
2783
+ message?: string;
2784
+ found?: unknown;
2785
+ property?: string;
2786
+ expected?: string;
2787
+ };
2788
+ };
2789
+ };
2790
+ };
2791
+ };
2792
+ };
2793
+ } & {
2794
+ [x: string]: {
2795
+ authenticate: {
2796
+ verify: {
2797
+ post: {
2798
+ body: {
2799
+ id: string;
2800
+ };
2801
+ params: {};
2802
+ query: unknown;
2803
+ headers: unknown;
2804
+ response: {
2805
+ 400: "No authentication challenge in progress";
2806
+ 401: "Unknown credential" | "WebAuthn authentication failed";
2807
+ 200: {
2808
+ readonly status: "authenticated";
2809
+ };
2810
+ 422: {
2811
+ type: "validation";
2812
+ on: string;
2813
+ summary?: string;
2814
+ message?: string;
2815
+ found?: unknown;
2816
+ property?: string;
2817
+ expected?: string;
2818
+ };
2819
+ };
2820
+ };
2821
+ };
2822
+ };
2823
+ };
2824
+ }))) & ({} | ({
2825
+ [x: string]: {
2826
+ export: {
2827
+ get: {
2828
+ body: unknown;
2829
+ params: {};
2830
+ query: unknown;
2831
+ headers: unknown;
2832
+ response: {
2833
+ 401: "Authentication required";
2834
+ 200: {
2835
+ [x: string]: unknown;
2836
+ };
2837
+ 422: {
2838
+ type: "validation";
2839
+ on: string;
2840
+ summary?: string;
2841
+ message?: string;
2842
+ found?: unknown;
2843
+ property?: string;
2844
+ expected?: string;
2845
+ };
2846
+ };
2847
+ };
2848
+ };
2849
+ };
2850
+ } & {
2851
+ [x: string]: {
2852
+ delete: {
2853
+ body: unknown;
2854
+ params: {};
2855
+ query: unknown;
2856
+ headers: unknown;
2857
+ response: {
2858
+ 401: "Authentication required";
2859
+ 200: {
2860
+ readonly deleted: true;
2861
+ };
2862
+ 422: {
2863
+ type: "validation";
2864
+ on: string;
2865
+ summary?: string;
2866
+ message?: string;
2867
+ found?: unknown;
2868
+ property?: string;
2869
+ expected?: string;
2870
+ };
2871
+ };
2872
+ };
2873
+ };
2874
+ }))) & ({} | ({
2875
+ htmx: {
2876
+ login: {
2877
+ get: {
2878
+ body: unknown;
2879
+ params: {};
2880
+ query: unknown;
2881
+ headers: unknown;
2882
+ response: {
2883
+ 200: Response;
2884
+ 422: {
2885
+ type: "validation";
2886
+ on: string;
2887
+ summary?: string;
2888
+ message?: string;
2889
+ found?: unknown;
2890
+ property?: string;
2891
+ expected?: string;
2892
+ };
2893
+ };
2894
+ };
2895
+ };
2896
+ };
2897
+ } & {
2898
+ htmx: {
2899
+ link: {
2900
+ get: {
2901
+ body: unknown;
2902
+ params: {};
2903
+ query: unknown;
2904
+ headers: unknown;
2905
+ response: {
2906
+ 200: Response;
2907
+ 422: {
2908
+ type: "validation";
2909
+ on: string;
2910
+ summary?: string;
2911
+ message?: string;
2912
+ found?: unknown;
2913
+ property?: string;
2914
+ expected?: string;
2915
+ };
2916
+ };
2917
+ };
2918
+ };
2919
+ };
2920
+ } & {
2921
+ htmx: {
2922
+ "connector-links": {
2923
+ get: {
2924
+ body: unknown;
2925
+ params: {};
2926
+ query: unknown;
2927
+ headers: unknown;
2928
+ response: {
2929
+ 200: Response;
2930
+ 422: {
2931
+ type: "validation";
2932
+ on: string;
2933
+ summary?: string;
2934
+ message?: string;
2935
+ found?: unknown;
2936
+ property?: string;
2937
+ expected?: string;
2938
+ };
2939
+ };
2940
+ };
2941
+ };
2942
+ };
2943
+ } & {
2944
+ htmx: {
2945
+ "auth-menu": {
2946
+ get: {
2947
+ body: unknown;
2948
+ params: {};
2949
+ query: unknown;
2950
+ headers: unknown;
2951
+ response: {
2952
+ 400: "Cookies are missing";
2953
+ 401: "User is not authenticated";
2954
+ 200: Response;
2955
+ 422: {
2956
+ type: "validation";
2957
+ on: string;
2958
+ summary?: string;
2959
+ message?: string;
2960
+ found?: unknown;
2961
+ property?: string;
2962
+ expected?: string;
2963
+ };
2964
+ };
2965
+ };
2966
+ };
2967
+ };
2968
+ } & {
2969
+ htmx: {
2970
+ me: {
2971
+ get: {
2972
+ body: unknown;
2973
+ params: {};
2974
+ query: unknown;
2975
+ headers: unknown;
2976
+ response: {
2977
+ 400: "Cookies are missing";
2978
+ 401: "User is not authenticated";
2979
+ 200: Response;
2980
+ 422: {
2981
+ type: "validation";
2982
+ on: string;
2983
+ summary?: string;
2984
+ message?: string;
2985
+ found?: unknown;
2986
+ property?: string;
2987
+ expected?: string;
2988
+ };
2989
+ };
2990
+ };
2991
+ };
2992
+ };
2993
+ } & {
2994
+ htmx: {
2995
+ account: {
2996
+ get: {
2997
+ body: unknown;
2998
+ params: {};
2999
+ query: unknown;
3000
+ headers: unknown;
3001
+ response: {
3002
+ 400: "Cookies are missing";
3003
+ 401: "User is not authenticated";
3004
+ 200: Response;
3005
+ 422: {
3006
+ type: "validation";
3007
+ on: string;
3008
+ summary?: string;
3009
+ message?: string;
3010
+ found?: unknown;
3011
+ property?: string;
3012
+ expected?: string;
3013
+ };
3014
+ };
3015
+ };
3016
+ };
3017
+ };
3018
+ } & {
3019
+ htmx: {
3020
+ identities: {
3021
+ get: {
3022
+ body: unknown;
3023
+ params: {};
3024
+ query: unknown;
3025
+ headers: unknown;
3026
+ response: {
3027
+ 400: "Cookies are missing";
3028
+ 401: "User is not authenticated";
3029
+ 200: {} | Response;
3030
+ 422: {
3031
+ type: "validation";
3032
+ on: string;
3033
+ summary?: string;
3034
+ message?: string;
3035
+ found?: unknown;
3036
+ property?: string;
3037
+ expected?: string;
3038
+ };
3039
+ };
3040
+ };
3041
+ };
3042
+ };
3043
+ } & {
3044
+ htmx: {
3045
+ identities: {
3046
+ ":id": {
3047
+ primary: {
3048
+ post: {
3049
+ body: unknown;
3050
+ params: {
3051
+ id: string;
3052
+ } & {};
3053
+ query: unknown;
3054
+ headers: unknown;
3055
+ response: {
3056
+ 400: "Cookies are missing";
3057
+ 401: "User is not authenticated";
3058
+ 200: {} | Response;
3059
+ 422: {
3060
+ type: "validation";
3061
+ on: string;
3062
+ summary?: string;
3063
+ message?: string;
3064
+ found?: unknown;
3065
+ property?: string;
3066
+ expected?: string;
3067
+ };
3068
+ };
3069
+ };
3070
+ };
3071
+ };
3072
+ };
3073
+ };
3074
+ } & {
3075
+ htmx: {
3076
+ identities: {
3077
+ ":id": {
3078
+ delete: {
3079
+ body: unknown;
3080
+ params: {
3081
+ id: string;
3082
+ } & {};
3083
+ query: unknown;
3084
+ headers: unknown;
3085
+ response: {
3086
+ 400: "Cookies are missing";
3087
+ 401: "User is not authenticated";
3088
+ 200: {} | Response;
3089
+ 422: {
3090
+ type: "validation";
3091
+ on: string;
3092
+ summary?: string;
3093
+ message?: string;
3094
+ found?: unknown;
3095
+ property?: string;
3096
+ expected?: string;
3097
+ };
3098
+ };
3099
+ };
3100
+ };
3101
+ };
3102
+ };
3103
+ } & {
3104
+ htmx: {
3105
+ merge: {
3106
+ ":id": {
3107
+ post: {
3108
+ body: unknown;
3109
+ params: {
3110
+ id: string;
3111
+ } & {};
3112
+ query: unknown;
3113
+ headers: unknown;
3114
+ response: {
3115
+ 400: "Cookies are missing";
3116
+ 401: "User is not authenticated";
3117
+ 200: {} | Response;
3118
+ 422: {
3119
+ type: "validation";
3120
+ on: string;
3121
+ summary?: string;
3122
+ message?: string;
3123
+ found?: unknown;
3124
+ property?: string;
3125
+ expected?: string;
3126
+ };
3127
+ };
3128
+ };
3129
+ };
3130
+ };
3131
+ };
3132
+ } & {
3133
+ htmx: {
3134
+ merge: {
3135
+ ":id": {
3136
+ delete: {
3137
+ body: unknown;
3138
+ params: {
3139
+ id: string;
3140
+ } & {};
3141
+ query: unknown;
3142
+ headers: unknown;
3143
+ response: {
3144
+ 400: "Cookies are missing";
3145
+ 401: "User is not authenticated";
3146
+ 200: {} | Response;
3147
+ 422: {
3148
+ type: "validation";
3149
+ on: string;
3150
+ summary?: string;
3151
+ message?: string;
3152
+ found?: unknown;
3153
+ property?: string;
3154
+ expected?: string;
3155
+ };
3156
+ };
3157
+ };
3158
+ };
3159
+ };
3160
+ };
3161
+ } & {
3162
+ htmx: {
3163
+ "connector-list": {
3164
+ get: {
3165
+ body: unknown;
3166
+ params: {};
3167
+ query: unknown;
3168
+ headers: unknown;
3169
+ response: {
3170
+ 400: "Cookies are missing";
3171
+ 401: "User is not authenticated";
3172
+ 200: Response;
3173
+ 422: {
3174
+ type: "validation";
3175
+ on: string;
3176
+ summary?: string;
3177
+ message?: string;
3178
+ found?: unknown;
3179
+ property?: string;
3180
+ expected?: string;
3181
+ };
3182
+ };
3183
+ };
3184
+ };
3185
+ };
3186
+ } & {
3187
+ htmx: {
3188
+ connectors: {
3189
+ grants: {
3190
+ ":id": {
3191
+ delete: {
3192
+ body: unknown;
3193
+ params: {
3194
+ id: string;
3195
+ } & {};
3196
+ query: unknown;
3197
+ headers: unknown;
3198
+ response: {
3199
+ 400: "Cookies are missing";
3200
+ 401: "User is not authenticated";
3201
+ 200: {} | Response;
3202
+ 422: {
3203
+ type: "validation";
3204
+ on: string;
3205
+ summary?: string;
3206
+ message?: string;
3207
+ found?: unknown;
3208
+ property?: string;
3209
+ expected?: string;
3210
+ };
3211
+ };
3212
+ };
3213
+ };
3214
+ };
3215
+ };
3216
+ };
3217
+ } & {
3218
+ htmx: {
3219
+ connectors: {
3220
+ bindings: {
3221
+ ":id": {
3222
+ delete: {
3223
+ body: unknown;
3224
+ params: {
3225
+ id: string;
3226
+ } & {};
3227
+ query: unknown;
3228
+ headers: unknown;
3229
+ response: {
3230
+ 400: "Cookies are missing";
3231
+ 401: "User is not authenticated";
3232
+ 200: {} | Response;
3233
+ 422: {
3234
+ type: "validation";
3235
+ on: string;
3236
+ summary?: string;
3237
+ message?: string;
3238
+ found?: unknown;
3239
+ property?: string;
3240
+ expected?: string;
3241
+ };
3242
+ };
3243
+ };
3244
+ };
3245
+ };
3246
+ };
3247
+ };
3248
+ } & {
3249
+ htmx: {
3250
+ "login-redirect": {
3251
+ get: {
3252
+ body: unknown;
3253
+ params: {};
3254
+ query: unknown;
3255
+ headers: unknown;
3256
+ response: {
3257
+ 200: Response;
3258
+ 422: {
3259
+ type: "validation";
3260
+ on: string;
3261
+ summary?: string;
3262
+ message?: string;
3263
+ found?: unknown;
3264
+ property?: string;
3265
+ expected?: string;
3266
+ };
3267
+ };
3268
+ };
3269
+ };
3270
+ };
3271
+ } & {
3272
+ htmx: {
3273
+ "delete-account": {
3274
+ post: {
3275
+ body: unknown;
3276
+ params: {};
3277
+ query: unknown;
3278
+ headers: unknown;
3279
+ response: {
3280
+ 400: "Cookies are missing";
3281
+ 401: "User is not authenticated";
3282
+ 200: {} | Response;
3283
+ 422: {
3284
+ type: "validation";
3285
+ on: string;
3286
+ summary?: string;
3287
+ message?: string;
3288
+ found?: unknown;
3289
+ property?: string;
3290
+ expected?: string;
3291
+ };
3292
+ };
3293
+ };
3294
+ };
3295
+ };
3296
+ } & {
3297
+ htmx: {
3298
+ signout: {
3299
+ get: {
3300
+ body: unknown;
3301
+ params: {};
3302
+ query: unknown;
3303
+ headers: unknown;
3304
+ response: {
3305
+ 200: Response;
3306
+ 422: {
3307
+ type: "validation";
3308
+ on: string;
3309
+ summary?: string;
3310
+ message?: string;
3311
+ found?: unknown;
3312
+ property?: string;
3313
+ expected?: string;
3314
+ };
3315
+ };
3316
+ };
3317
+ };
3318
+ };
3319
+ }))) & ({} | {
3320
+ [x: string]: {
3321
+ get: {
3322
+ body: unknown;
3323
+ params: {};
3324
+ query: unknown;
3325
+ headers: unknown;
3326
+ response: {
3327
+ 200: {
3328
+ resource: string;
3329
+ scopes_supported: string[];
3330
+ resource_name?: string | undefined;
3331
+ resource_logo_uri?: string | undefined;
3332
+ authorization_servers: string[];
3333
+ bearer_methods_supported: string[];
3334
+ };
3335
+ };
3336
+ };
3337
+ };
3338
+ } | ({
3339
+ [x: string]: {
3340
+ get: {
3341
+ body: unknown;
3342
+ params: {};
3343
+ query: unknown;
3344
+ headers: unknown;
3345
+ response: {
3346
+ 200: {
3347
+ resource: string;
3348
+ scopes_supported: string[];
3349
+ resource_name?: string | undefined;
3350
+ resource_logo_uri?: string | undefined;
3351
+ authorization_servers: string[];
3352
+ bearer_methods_supported: string[];
3353
+ };
3354
+ };
3355
+ };
3356
+ };
3357
+ } & {
3358
+ [x: string]: {
3359
+ get: {
3360
+ body: unknown;
3361
+ params: {};
3362
+ query: unknown;
3363
+ headers: unknown;
3364
+ response: {
3365
+ 200: Response;
3366
+ };
3367
+ };
3368
+ };
3369
+ } & {
3370
+ [x: string]: {
3371
+ get: {
3372
+ body: unknown;
3373
+ params: {};
3374
+ query: unknown;
3375
+ headers: unknown;
3376
+ response: {
3377
+ 200: Response;
3378
+ };
3379
+ };
3380
+ };
3381
+ } & {
3382
+ [x: string]: {
3383
+ post: {
3384
+ body: unknown;
3385
+ params: {};
3386
+ query: unknown;
3387
+ headers: unknown;
3388
+ response: {
3389
+ 200: Response;
3390
+ };
3391
+ };
3392
+ };
3393
+ } & {
3394
+ [x: string]: {
3395
+ post: {
3396
+ body: unknown;
3397
+ params: {};
3398
+ query: unknown;
3399
+ headers: unknown;
3400
+ response: {
3401
+ 200: Response;
3402
+ };
3403
+ };
3404
+ };
3405
+ } & {
3406
+ [x: string]: {
3407
+ post: {
3408
+ body: unknown;
3409
+ params: {};
3410
+ query: unknown;
3411
+ headers: unknown;
3412
+ response: {
3413
+ 200: Response;
3414
+ };
3415
+ };
3416
+ };
3417
+ })), {
3418
+ derive: {};
3419
+ resolve: {};
3420
+ schema: {};
3421
+ standaloneSchema: {};
3422
+ response: {};
3423
+ }, {
3424
+ derive: {};
3425
+ resolve: {};
3426
+ schema: {};
3427
+ standaloneSchema: {};
3428
+ response: {};
3429
+ } & {
3430
+ derive: {};
3431
+ resolve: {};
3432
+ schema: {};
3433
+ standaloneSchema: {};
3434
+ response: {};
3435
+ } & {
3436
+ derive: {};
3437
+ resolve: {};
3438
+ schema: {};
3439
+ standaloneSchema: {};
3440
+ response: {};
3441
+ }>;
3442
+ }>;
54
3443
  export * from './actions';
55
- export type { AuthInstance } from './authInstance';
3444
+ export type AuthApplications<UserType> = Awaited<ReturnType<typeof createAuthApplications<UserType>>>;
3445
+ export { createAuthContext } from './authContext';
3446
+ export type { AuthInstance } from './authContext';
56
3447
  export * from './types';
57
3448
  export * from './typebox';
58
3449
  export * from './vault/config';