@absolutejs/auth 0.22.6 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +6 -13
  2. package/dist/index.d.ts +300 -1
  3. package/dist/index.js +18 -15
  4. package/dist/index.js.map +4 -4
  5. package/dist/ui/index.d.ts +2 -0
  6. package/dist/ui/index.js +2212 -0
  7. package/dist/ui/index.js.map +11 -0
  8. package/dist/ui/renderers.d.ts +8 -0
  9. package/dist/ui/types.d.ts +85 -0
  10. package/package.json +71 -86
  11. package/dist/example/components/auth/AuthContainer.d.ts +0 -1
  12. package/dist/example/components/auth/OAuthButton.d.ts +0 -7
  13. package/dist/example/components/auth/OAuthButtons.d.ts +0 -5
  14. package/dist/example/components/hamburger/HamburgerDropdown.d.ts +0 -10
  15. package/dist/example/components/hamburger/HamburgerHeader.d.ts +0 -5
  16. package/dist/example/components/hamburger/HamburgerMenu.d.ts +0 -14
  17. package/dist/example/components/hamburger/HamburgerUserButtons.d.ts +0 -8
  18. package/dist/example/components/navbar/DropdownContainer.d.ts +0 -17
  19. package/dist/example/components/navbar/Navbar.d.ts +0 -7
  20. package/dist/example/components/navbar/NavbarDropdown.d.ts +0 -10
  21. package/dist/example/components/navbar/NavbarLink.d.ts +0 -8
  22. package/dist/example/components/navbar/NavbarLinks.d.ts +0 -6
  23. package/dist/example/components/navbar/NavbarUserButtons.d.ts +0 -7
  24. package/dist/example/components/page/Head.d.ts +0 -6
  25. package/dist/example/components/protected/AccountOverview.d.ts +0 -6
  26. package/dist/example/components/protected/DeleteAccountSection.d.ts +0 -5
  27. package/dist/example/components/protected/LinkedAuthIdentitiesPanel.d.ts +0 -1
  28. package/dist/example/components/protected/LinkedProvidersPanel.d.ts +0 -1
  29. package/dist/example/components/protected/ProviderButtons.d.ts +0 -1
  30. package/dist/example/components/protected/SettingsNoticeToast.d.ts +0 -1
  31. package/dist/example/components/protected/UserInfo.d.ts +0 -7
  32. package/dist/example/components/utils/AnimatedComponents.d.ts +0 -1
  33. package/dist/example/components/utils/Divider.d.ts +0 -7
  34. package/dist/example/components/utils/HighlightedJson.d.ts +0 -5
  35. package/dist/example/components/utils/JsonLine.d.ts +0 -6
  36. package/dist/example/components/utils/Modal.d.ts +0 -9
  37. package/dist/example/components/utils/ProfilePicture.d.ts +0 -8
  38. package/dist/example/components/utils/ProviderDropdown.d.ts +0 -8
  39. package/dist/example/components/utils/Toast.d.ts +0 -14
  40. package/dist/example/components/utils/ToastProvider.d.ts +0 -30
  41. package/dist/example/db/schema.d.ts +0 -2570
  42. package/dist/example/eden/treaty.d.ts +0 -1
  43. package/dist/example/handlers/userHandlers.d.ts +0 -254
  44. package/dist/example/hooks/useAuthIdentityPayload.d.ts +0 -37
  45. package/dist/example/hooks/useAuthStatus.d.ts +0 -19
  46. package/dist/example/hooks/useContainerQuery.d.ts +0 -10
  47. package/dist/example/hooks/useMediaQuery.d.ts +0 -11
  48. package/dist/example/linkedProviders/persistCallbackAuthorization.d.ts +0 -30
  49. package/dist/example/linkedProviders/resolver.d.ts +0 -1
  50. package/dist/example/linkedProviders/stores.d.ts +0 -9
  51. package/dist/example/pages/Connectors.d.ts +0 -1
  52. package/dist/example/pages/Home.d.ts +0 -1
  53. package/dist/example/pages/NotAuthorized.d.ts +0 -1
  54. package/dist/example/pages/Protected.d.ts +0 -1
  55. package/dist/example/pages/Settings.d.ts +0 -1
  56. package/dist/example/server.d.ts +0 -902
  57. package/dist/example/styles/authModalStyles.d.ts +0 -22
  58. package/dist/example/styles/navbarStyles.d.ts +0 -15
  59. package/dist/example/styles/styles.d.ts +0 -15
  60. package/dist/example/utils/absoluteAuthConfig.d.ts +0 -4
  61. package/dist/example/utils/constants.d.ts +0 -1
  62. package/dist/example/utils/navbarData.d.ts +0 -2
  63. package/dist/example/utils/providerData.d.ts +0 -9
  64. package/dist/example/utils/providersConfiguration.d.ts +0 -1
  65. package/dist/example/utils/typeGuards.d.ts +0 -1
  66. package/dist/example/utils/types.d.ts +0 -26
  67. package/dist/src/index.d.ts +0 -300
  68. /package/dist/{src/authSessionStores.d.ts → authSessionStores.d.ts} +0 -0
  69. /package/dist/{src/authorize.d.ts → authorize.d.ts} +0 -0
  70. /package/dist/{src/callback.d.ts → callback.d.ts} +0 -0
  71. /package/dist/{src/constants.d.ts → constants.d.ts} +0 -0
  72. /package/dist/{src/errors.d.ts → errors.d.ts} +0 -0
  73. /package/dist/{src/linkedProviderResolver.d.ts → linkedProviderResolver.d.ts} +0 -0
  74. /package/dist/{src/linkedProviderStores.d.ts → linkedProviderStores.d.ts} +0 -0
  75. /package/dist/{src/neonAuthSessionStore.d.ts → neonAuthSessionStore.d.ts} +0 -0
  76. /package/dist/{src/neonLinkedProviders.d.ts → neonLinkedProviders.d.ts} +0 -0
  77. /package/dist/{src/oauthLinkedProviderResolver.d.ts → oauthLinkedProviderResolver.d.ts} +0 -0
  78. /package/dist/{src/profile.d.ts → profile.d.ts} +0 -0
  79. /package/dist/{src/protectRoute.d.ts → protectRoute.d.ts} +0 -0
  80. /package/dist/{src/providerClients.d.ts → providerClients.d.ts} +0 -0
  81. /package/dist/{src/refresh.d.ts → refresh.d.ts} +0 -0
  82. /package/dist/{src/revoke.d.ts → revoke.d.ts} +0 -0
  83. /package/dist/{src/sessionAccess.d.ts → sessionAccess.d.ts} +0 -0
  84. /package/dist/{src/sessionCleanup.d.ts → sessionCleanup.d.ts} +0 -0
  85. /package/dist/{src/sessionStore.d.ts → sessionStore.d.ts} +0 -0
  86. /package/dist/{src/sessionTypes.d.ts → sessionTypes.d.ts} +0 -0
  87. /package/dist/{src/signout.d.ts → signout.d.ts} +0 -0
  88. /package/dist/{src/typeGuards.d.ts → typeGuards.d.ts} +0 -0
  89. /package/dist/{src/typebox.d.ts → typebox.d.ts} +0 -0
  90. /package/dist/{src/types.d.ts → types.d.ts} +0 -0
  91. /package/dist/{src/userStatus.d.ts → userStatus.d.ts} +0 -0
  92. /package/dist/{src/utils.d.ts → utils.d.ts} +0 -0
@@ -1,902 +0,0 @@
1
- import { Elysia } from 'elysia';
2
- declare const server: Elysia<"", {
3
- decorator: {};
4
- store: {
5
- session: import("../src").SessionRecord<{
6
- email: string | null;
7
- sub: string;
8
- created_at: Date;
9
- first_name: string | null;
10
- last_name: string | null;
11
- primary_auth_identity_id: string | null;
12
- }> & import("../src").SessionRecord<unknown>;
13
- unregisteredSession: import("../src").UnregisteredSessionRecord;
14
- };
15
- derive: {
16
- readonly cleanupSessions: () => Promise<void>;
17
- } & {
18
- readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: {
19
- email: string | null;
20
- sub: string;
21
- created_at: Date;
22
- first_name: string | null;
23
- last_name: string | null;
24
- primary_auth_identity_id: string | null;
25
- }) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
26
- readonly code: "Bad Request";
27
- readonly message: "Cookies are missing";
28
- } | {
29
- readonly code: "Unauthorized";
30
- readonly message: "User is not authenticated";
31
- }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
32
- };
33
- resolve: {};
34
- }, {
35
- typebox: {};
36
- error: {};
37
- } & {
38
- typebox: import("@sinclair/typebox").TModule<{}>;
39
- error: {};
40
- } & {
41
- typebox: {};
42
- error: {};
43
- }, {
44
- schema: {};
45
- standaloneSchema: {};
46
- macro: {};
47
- macroFn: {};
48
- parser: {};
49
- response: {};
50
- } & {
51
- schema: {};
52
- macro: {};
53
- macroFn: {};
54
- parser: {};
55
- } & {
56
- schema: {};
57
- standaloneSchema: {};
58
- macro: {};
59
- macroFn: {};
60
- parser: {};
61
- response: import("elysia").ExtractErrorFromHandle<{
62
- readonly cleanupSessions: () => Promise<void>;
63
- }>;
64
- } & {
65
- schema: import("elysia").UnwrapRoute<{
66
- cookie: import("@sinclair/typebox").TObject<{
67
- user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
68
- }>;
69
- }, {}, "">;
70
- standaloneSchema: {};
71
- macro: {};
72
- macroFn: {};
73
- parser: {};
74
- response: import("elysia").ExtractErrorFromHandle<{
75
- readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: {
76
- email: string | null;
77
- sub: string;
78
- created_at: Date;
79
- first_name: string | null;
80
- last_name: string | null;
81
- primary_auth_identity_id: string | null;
82
- }) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
83
- readonly code: "Bad Request";
84
- readonly message: "Cookies are missing";
85
- } | {
86
- readonly code: "Unauthorized";
87
- readonly message: "User is not authenticated";
88
- }) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
89
- }>;
90
- } & {
91
- schema: {};
92
- standaloneSchema: {};
93
- macro: {};
94
- macroFn: {};
95
- parser: {};
96
- }, ((((((((((((((({} & (((({
97
- [x: string]: {
98
- delete: {
99
- body: unknown;
100
- params: {};
101
- query: unknown;
102
- headers: unknown;
103
- response: {
104
- 200: Response;
105
- 400: "Cookies are missing";
106
- 401: "No auth provider found" | "No user session id found";
107
- 422: {
108
- type: "validation";
109
- on: string;
110
- summary?: string;
111
- message?: string;
112
- found?: unknown;
113
- property?: string;
114
- expected?: string;
115
- };
116
- 500: "Sign out operation failed";
117
- };
118
- };
119
- };
120
- } & ({
121
- [x: string]: {
122
- post: {
123
- body: unknown;
124
- params: {};
125
- query: unknown;
126
- headers: unknown;
127
- response: {
128
- 200: Response;
129
- 400: "Cookies are missing" | "Invalid provider";
130
- 401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required" | "No auth provider found" | "No user session found";
131
- 422: {
132
- type: "validation";
133
- on: string;
134
- summary?: string;
135
- message?: string;
136
- found?: unknown;
137
- property?: string;
138
- expected?: string;
139
- };
140
- 500: "Failed to revoke token";
141
- 501: "Provider does not support revocation";
142
- };
143
- };
144
- };
145
- } & ({
146
- [x: string]: {
147
- get: {
148
- body: unknown;
149
- params: {};
150
- query: unknown;
151
- headers: unknown;
152
- response: {
153
- 200: {
154
- user: {
155
- email: string | null;
156
- sub: string;
157
- created_at: Date;
158
- first_name: string | null;
159
- last_name: string | null;
160
- primary_auth_identity_id: string | null;
161
- } | null;
162
- };
163
- 400: "Cookies are missing";
164
- 422: {
165
- type: "validation";
166
- on: string;
167
- summary?: string;
168
- message?: string;
169
- found?: unknown;
170
- property?: string;
171
- expected?: string;
172
- };
173
- 500: `Error: ${string} - ${string}` | `Unknown Error: ${string}`;
174
- };
175
- };
176
- };
177
- } & ({
178
- [x: string]: {
179
- post: {
180
- body: unknown;
181
- params: {};
182
- query: unknown;
183
- headers: unknown;
184
- response: {
185
- 200: Response;
186
- 400: "Cookies are missing" | "Invalid provider" | "No refresh token found";
187
- 401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required" | "No auth provider found" | "No user session found";
188
- 422: {
189
- type: "validation";
190
- on: string;
191
- summary?: string;
192
- message?: string;
193
- found?: unknown;
194
- property?: string;
195
- expected?: string;
196
- };
197
- 500: "Failed to refresh token";
198
- 501: "Provider is not refreshable";
199
- };
200
- };
201
- };
202
- } & ({
203
- [x: string]: {
204
- ":provider": {
205
- get: {
206
- body: unknown;
207
- params: {
208
- provider: "42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "google" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "myanimelist" | "naver" | "notion" | "okta" | "osu" | "patreon" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoom";
209
- };
210
- query: {
211
- client?: string | undefined;
212
- intent?: "login" | "link_identity" | "link_connector" | undefined;
213
- };
214
- headers: unknown;
215
- response: {
216
- 200: Response;
217
- 400: "Provider is required" | "Cookies are missing";
218
- 401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required";
219
- 422: {
220
- type: "validation";
221
- on: string;
222
- summary?: string;
223
- message?: string;
224
- found?: unknown;
225
- property?: string;
226
- expected?: string;
227
- };
228
- 500: "Failed to create authorization URL";
229
- };
230
- };
231
- };
232
- };
233
- } | {
234
- [x: string]: {
235
- ":provider": {
236
- [x: string]: {
237
- get: {
238
- body: unknown;
239
- params: {
240
- provider: "42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "google" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "myanimelist" | "naver" | "notion" | "okta" | "osu" | "patreon" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoom";
241
- };
242
- query: {
243
- client?: string | undefined;
244
- intent?: "login" | "link_identity" | "link_connector" | undefined;
245
- };
246
- headers: unknown;
247
- response: {
248
- 200: Response;
249
- 400: "Provider is required" | "Cookies are missing";
250
- 401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required";
251
- 422: {
252
- type: "validation";
253
- on: string;
254
- summary?: string;
255
- message?: string;
256
- found?: unknown;
257
- property?: string;
258
- expected?: string;
259
- };
260
- 500: "Failed to create authorization URL";
261
- };
262
- };
263
- };
264
- };
265
- };
266
- }))))) & {
267
- [x: string]: {
268
- get: {
269
- body: unknown;
270
- params: {};
271
- query: unknown;
272
- headers: unknown;
273
- response: {
274
- [x: string]: any;
275
- };
276
- };
277
- };
278
- }) & {
279
- [x: string]: {
280
- get: {
281
- body: unknown;
282
- params: {};
283
- query: unknown;
284
- headers: unknown;
285
- response: {
286
- 200: Response;
287
- 400: "Cookies are missing";
288
- 401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required" | "No auth provider found" | "Invalid provider" | "No user session found";
289
- 422: {
290
- type: "validation";
291
- on: string;
292
- summary?: string;
293
- message?: string;
294
- found?: unknown;
295
- property?: string;
296
- expected?: string;
297
- };
298
- 500: `${string} - ${string}` | `Failed to validate authorization code: Unknown status: ${string}`;
299
- };
300
- };
301
- };
302
- }) & {})) & {
303
- get: {
304
- body: unknown;
305
- params: {};
306
- query: unknown;
307
- headers: unknown;
308
- response: {
309
- 200: Response;
310
- 422: {
311
- type: "validation";
312
- on: string;
313
- summary?: string;
314
- message?: string;
315
- found?: unknown;
316
- property?: string;
317
- expected?: string;
318
- };
319
- };
320
- };
321
- }) & {
322
- protected: {
323
- get: {
324
- body: unknown;
325
- params: {};
326
- query: unknown;
327
- headers: unknown;
328
- response: {
329
- 200: Response | Promise<Response>;
330
- 400: "Cookies are missing";
331
- 401: "User is not authenticated";
332
- 422: {
333
- type: "validation";
334
- on: string;
335
- summary?: string;
336
- message?: string;
337
- found?: unknown;
338
- property?: string;
339
- expected?: string;
340
- };
341
- };
342
- };
343
- };
344
- }) & {
345
- settings: {
346
- get: {
347
- body: unknown;
348
- params: {};
349
- query: unknown;
350
- headers: unknown;
351
- response: {
352
- 200: Response | Promise<Response>;
353
- 400: "Cookies are missing";
354
- 401: "User is not authenticated";
355
- 422: {
356
- type: "validation";
357
- on: string;
358
- summary?: string;
359
- message?: string;
360
- found?: unknown;
361
- property?: string;
362
- expected?: string;
363
- };
364
- };
365
- };
366
- };
367
- }) & {
368
- connectors: {
369
- get: {
370
- body: unknown;
371
- params: {};
372
- query: unknown;
373
- headers: unknown;
374
- response: {
375
- 200: Response | Promise<Response>;
376
- 400: "Cookies are missing";
377
- 401: "User is not authenticated";
378
- 422: {
379
- type: "validation";
380
- on: string;
381
- summary?: string;
382
- message?: string;
383
- found?: unknown;
384
- property?: string;
385
- expected?: string;
386
- };
387
- };
388
- };
389
- };
390
- }) & {
391
- "linked-providers": {
392
- get: {
393
- body: unknown;
394
- params: {};
395
- query: unknown;
396
- headers: unknown;
397
- response: {
398
- 200: {} | {
399
- ownerRef: string;
400
- grants: import("@absolutejs/linked-providers").LinkedProviderGrant[];
401
- bindings: {
402
- grantStatus: import("@absolutejs/linked-providers").LinkedProviderGrantStatus | undefined;
403
- grantUpdatedAt: number | undefined;
404
- id: string;
405
- grantId: string;
406
- connectorProvider: import("@absolutejs/linked-providers").LinkedConnectorProvider;
407
- externalAccountId: string;
408
- externalAccountType: import("@absolutejs/linked-providers").LinkedProviderAccountType;
409
- label?: string;
410
- username?: string;
411
- email?: string;
412
- status: import("@absolutejs/linked-providers").LinkedProviderBindingStatus;
413
- availableScopes: string[];
414
- capabilities?: string[];
415
- metadata?: Record<string, unknown>;
416
- createdAt: number;
417
- updatedAt: number;
418
- }[];
419
- };
420
- 400: "Cookies are missing";
421
- 401: "User is not authenticated";
422
- 422: {
423
- type: "validation";
424
- on: string;
425
- summary?: string;
426
- message?: string;
427
- found?: unknown;
428
- property?: string;
429
- expected?: string;
430
- };
431
- };
432
- };
433
- };
434
- }) & {
435
- "auth-identities": {
436
- get: {
437
- body: unknown;
438
- params: {};
439
- query: unknown;
440
- headers: unknown;
441
- response: {
442
- 200: {} | {
443
- identities: Record<string, ({
444
- id: string;
445
- user_sub: string;
446
- auth_provider: string;
447
- provider_subject: string;
448
- metadata: Record<string, unknown> | null;
449
- created_at: Date;
450
- updated_at: Date;
451
- } & {
452
- isPrimary: boolean;
453
- })[]>;
454
- mergeRequests: {
455
- id: string;
456
- target_user_sub: string;
457
- source_user_sub: string;
458
- conflicting_auth_provider: string;
459
- conflicting_provider_subject: string;
460
- status: string;
461
- metadata: Record<string, unknown> | null;
462
- created_at: Date;
463
- updated_at: Date;
464
- }[];
465
- primaryIdentityId: string | null | undefined;
466
- userSub: string;
467
- };
468
- 400: "Cookies are missing";
469
- 401: "User is not authenticated";
470
- 422: {
471
- type: "validation";
472
- on: string;
473
- summary?: string;
474
- message?: string;
475
- found?: unknown;
476
- property?: string;
477
- expected?: string;
478
- };
479
- };
480
- };
481
- };
482
- }) & {
483
- account: {
484
- delete: {
485
- body: unknown;
486
- params: {};
487
- query: unknown;
488
- headers: unknown;
489
- response: {
490
- 200: {} | {
491
- ok: boolean;
492
- removedUserSub: string;
493
- };
494
- 400: "Cookies are missing";
495
- 401: "User is not authenticated";
496
- 422: {
497
- type: "validation";
498
- on: string;
499
- summary?: string;
500
- message?: string;
501
- found?: unknown;
502
- property?: string;
503
- expected?: string;
504
- };
505
- };
506
- };
507
- };
508
- }) & {
509
- "auth-identities": {
510
- ":id": {
511
- primary: {
512
- post: {
513
- body: unknown;
514
- params: {
515
- id: string;
516
- } & {};
517
- query: unknown;
518
- headers: unknown;
519
- response: {
520
- 200: {} | {
521
- identities: Record<string, ({
522
- id: string;
523
- user_sub: string;
524
- auth_provider: string;
525
- provider_subject: string;
526
- metadata: Record<string, unknown> | null;
527
- created_at: Date;
528
- updated_at: Date;
529
- } & {
530
- isPrimary: boolean;
531
- })[]>;
532
- mergeRequests: {
533
- id: string;
534
- target_user_sub: string;
535
- source_user_sub: string;
536
- conflicting_auth_provider: string;
537
- conflicting_provider_subject: string;
538
- status: string;
539
- metadata: Record<string, unknown> | null;
540
- created_at: Date;
541
- updated_at: Date;
542
- }[];
543
- primaryIdentityId: string | null | undefined;
544
- userSub: string;
545
- ok: boolean;
546
- };
547
- 400: "Cookies are missing";
548
- 401: "User is not authenticated";
549
- 404: string;
550
- 422: {
551
- type: "validation";
552
- on: string;
553
- summary?: string;
554
- message?: string;
555
- found?: unknown;
556
- property?: string;
557
- expected?: string;
558
- };
559
- };
560
- };
561
- };
562
- };
563
- };
564
- }) & {
565
- "auth-identity-merge-requests": {
566
- ":id": {
567
- merge: {
568
- post: {
569
- body: unknown;
570
- params: {
571
- id: string;
572
- } & {};
573
- query: unknown;
574
- headers: unknown;
575
- response: {
576
- 200: {} | {
577
- identities: Record<string, ({
578
- id: string;
579
- user_sub: string;
580
- auth_provider: string;
581
- provider_subject: string;
582
- metadata: Record<string, unknown> | null;
583
- created_at: Date;
584
- updated_at: Date;
585
- } & {
586
- isPrimary: boolean;
587
- })[]>;
588
- mergeRequests: {
589
- id: string;
590
- target_user_sub: string;
591
- source_user_sub: string;
592
- conflicting_auth_provider: string;
593
- conflicting_provider_subject: string;
594
- status: string;
595
- metadata: Record<string, unknown> | null;
596
- created_at: Date;
597
- updated_at: Date;
598
- }[];
599
- primaryIdentityId: string | null | undefined;
600
- userSub: string;
601
- ok: boolean;
602
- };
603
- 400: string;
604
- 401: "User is not authenticated";
605
- 422: {
606
- type: "validation";
607
- on: string;
608
- summary?: string;
609
- message?: string;
610
- found?: unknown;
611
- property?: string;
612
- expected?: string;
613
- };
614
- };
615
- };
616
- };
617
- };
618
- };
619
- }) & {
620
- "auth-identity-merge-requests": {
621
- ":id": {
622
- delete: {
623
- body: unknown;
624
- params: {
625
- id: string;
626
- } & {};
627
- query: unknown;
628
- headers: unknown;
629
- response: {
630
- 200: {} | {
631
- identities: Record<string, ({
632
- id: string;
633
- user_sub: string;
634
- auth_provider: string;
635
- provider_subject: string;
636
- metadata: Record<string, unknown> | null;
637
- created_at: Date;
638
- updated_at: Date;
639
- } & {
640
- isPrimary: boolean;
641
- })[]>;
642
- mergeRequests: {
643
- id: string;
644
- target_user_sub: string;
645
- source_user_sub: string;
646
- conflicting_auth_provider: string;
647
- conflicting_provider_subject: string;
648
- status: string;
649
- metadata: Record<string, unknown> | null;
650
- created_at: Date;
651
- updated_at: Date;
652
- }[];
653
- primaryIdentityId: string | null | undefined;
654
- userSub: string;
655
- ok: boolean;
656
- };
657
- 400: "Cookies are missing";
658
- 401: "User is not authenticated";
659
- 404: "Merge request not found";
660
- 422: {
661
- type: "validation";
662
- on: string;
663
- summary?: string;
664
- message?: string;
665
- found?: unknown;
666
- property?: string;
667
- expected?: string;
668
- };
669
- };
670
- };
671
- };
672
- };
673
- }) & {
674
- "auth-identities": {
675
- ":id": {
676
- delete: {
677
- body: unknown;
678
- params: {
679
- id: string;
680
- } & {};
681
- query: unknown;
682
- headers: unknown;
683
- response: {
684
- 200: {} | {
685
- identities: Record<string, ({
686
- id: string;
687
- user_sub: string;
688
- auth_provider: string;
689
- provider_subject: string;
690
- metadata: Record<string, unknown> | null;
691
- created_at: Date;
692
- updated_at: Date;
693
- } & {
694
- isPrimary: boolean;
695
- })[]>;
696
- mergeRequests: {
697
- id: string;
698
- target_user_sub: string;
699
- source_user_sub: string;
700
- conflicting_auth_provider: string;
701
- conflicting_provider_subject: string;
702
- status: string;
703
- metadata: Record<string, unknown> | null;
704
- created_at: Date;
705
- updated_at: Date;
706
- }[];
707
- primaryIdentityId: string | null | undefined;
708
- userSub: string;
709
- ok: boolean;
710
- removed: {
711
- authProvider: string;
712
- id: string;
713
- providerSubject: string;
714
- };
715
- };
716
- 400: "Cookies are missing" | "Cannot remove the last login identity" | "Cannot remove the primary login identity yet";
717
- 401: "User is not authenticated";
718
- 404: "Auth identity not found";
719
- 422: {
720
- type: "validation";
721
- on: string;
722
- summary?: string;
723
- message?: string;
724
- found?: unknown;
725
- property?: string;
726
- expected?: string;
727
- };
728
- };
729
- };
730
- };
731
- };
732
- }) & {
733
- "linked-providers": {
734
- bindings: {
735
- ":id": {
736
- delete: {
737
- body: unknown;
738
- params: {
739
- id: string;
740
- } & {};
741
- query: unknown;
742
- headers: unknown;
743
- response: {
744
- 200: {} | {
745
- ownerRef: string;
746
- grants: import("@absolutejs/linked-providers").LinkedProviderGrant[];
747
- bindings: {
748
- grantStatus: import("@absolutejs/linked-providers").LinkedProviderGrantStatus | undefined;
749
- grantUpdatedAt: number | undefined;
750
- id: string;
751
- grantId: string;
752
- connectorProvider: import("@absolutejs/linked-providers").LinkedConnectorProvider;
753
- externalAccountId: string;
754
- externalAccountType: import("@absolutejs/linked-providers").LinkedProviderAccountType;
755
- label?: string;
756
- username?: string;
757
- email?: string;
758
- status: import("@absolutejs/linked-providers").LinkedProviderBindingStatus;
759
- availableScopes: string[];
760
- capabilities?: string[];
761
- metadata?: Record<string, unknown>;
762
- createdAt: number;
763
- updatedAt: number;
764
- }[];
765
- ok: boolean;
766
- removed: {
767
- bindingId: string;
768
- connectorProvider: import("@absolutejs/linked-providers").LinkedConnectorProvider;
769
- externalAccountId: string;
770
- };
771
- };
772
- 400: "Cookies are missing";
773
- 401: "User is not authenticated";
774
- 404: "Linked provider binding not found";
775
- 422: {
776
- type: "validation";
777
- on: string;
778
- summary?: string;
779
- message?: string;
780
- found?: unknown;
781
- property?: string;
782
- expected?: string;
783
- };
784
- 501: "Linked provider binding removal is not supported by this store";
785
- };
786
- };
787
- };
788
- };
789
- };
790
- }) & {
791
- "linked-providers": {
792
- grants: {
793
- ":id": {
794
- delete: {
795
- body: unknown;
796
- params: {
797
- id: string;
798
- } & {};
799
- query: unknown;
800
- headers: unknown;
801
- response: {
802
- 200: {} | {
803
- ownerRef: string;
804
- grants: import("@absolutejs/linked-providers").LinkedProviderGrant[];
805
- bindings: {
806
- grantStatus: import("@absolutejs/linked-providers").LinkedProviderGrantStatus | undefined;
807
- grantUpdatedAt: number | undefined;
808
- id: string;
809
- grantId: string;
810
- connectorProvider: import("@absolutejs/linked-providers").LinkedConnectorProvider;
811
- externalAccountId: string;
812
- externalAccountType: import("@absolutejs/linked-providers").LinkedProviderAccountType;
813
- label?: string;
814
- username?: string;
815
- email?: string;
816
- status: import("@absolutejs/linked-providers").LinkedProviderBindingStatus;
817
- availableScopes: string[];
818
- capabilities?: string[];
819
- metadata?: Record<string, unknown>;
820
- createdAt: number;
821
- updatedAt: number;
822
- }[];
823
- ok: boolean;
824
- removed: {
825
- grantId: string;
826
- authProviderKey: string;
827
- providerSubject: string;
828
- };
829
- };
830
- 400: "Cookies are missing";
831
- 401: "User is not authenticated";
832
- 404: "Linked provider grant not found";
833
- 422: {
834
- type: "validation";
835
- on: string;
836
- summary?: string;
837
- message?: string;
838
- found?: unknown;
839
- property?: string;
840
- expected?: string;
841
- };
842
- 501: "Linked provider grant removal is not supported by this store";
843
- };
844
- };
845
- };
846
- };
847
- };
848
- }) & {
849
- cleanup: {
850
- post: {
851
- body: unknown;
852
- params: {};
853
- query: unknown;
854
- headers: unknown;
855
- response: {
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
- derive: {};
870
- resolve: {};
871
- schema: {};
872
- standaloneSchema: {};
873
- response: {};
874
- } & {
875
- derive: {};
876
- resolve: {};
877
- schema: {};
878
- standaloneSchema: {};
879
- }, {
880
- derive: {};
881
- resolve: {};
882
- schema: {};
883
- standaloneSchema: {};
884
- response: {};
885
- } & {
886
- derive: {};
887
- resolve: {};
888
- schema: {};
889
- } & {
890
- derive: {};
891
- resolve: {};
892
- schema: {};
893
- standaloneSchema: {};
894
- response: {};
895
- } & {
896
- derive: {};
897
- resolve: {};
898
- schema: {};
899
- standaloneSchema: {};
900
- }>;
901
- export type Server = typeof server;
902
- export {};