@krak-stack/auth 0.2.31 → 0.3.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 (69) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +175 -1
  3. package/dist/access.d.ts +3 -1
  4. package/dist/admin/api.group.d.ts +41 -41
  5. package/dist/admin/schema.d.ts +23 -23
  6. package/dist/admin/schema.js +21 -19
  7. package/dist/api.d.ts +141 -81
  8. package/dist/auth/api.group.d.ts +37 -19
  9. package/dist/auth/api.group.js +17 -1
  10. package/dist/auth/schema.d.ts +61 -33
  11. package/dist/auth/schema.js +30 -18
  12. package/dist/components/account-deletion-request.d.ts +5 -0
  13. package/dist/components/account-deletion-request.js +7 -0
  14. package/dist/components/account-deletion.d.ts +8 -0
  15. package/dist/components/account-deletion.js +59 -0
  16. package/dist/components/admin-organization-form.js +2 -2
  17. package/dist/components/admin-organizations.js +9 -7
  18. package/dist/components/admin-users.js +6 -6
  19. package/dist/components/api-key-edit-form.js +19 -11
  20. package/dist/components/associated-projects-notice.d.ts +2 -1
  21. package/dist/components/associated-projects-notice.js +7 -3
  22. package/dist/components/auth-atoms.js +1 -2
  23. package/dist/components/auth-client-api.d.ts +94 -61
  24. package/dist/components/auth-forms.d.ts +1 -0
  25. package/dist/components/auth-forms.js +41 -56
  26. package/dist/components/auth-provider.d.ts +3 -1
  27. package/dist/components/deletion-visibility.d.ts +1 -0
  28. package/dist/components/deletion-visibility.js +3 -0
  29. package/dist/components/hooks.d.ts +2 -0
  30. package/dist/components/hooks.js +13 -6
  31. package/dist/components/index.d.ts +3 -0
  32. package/dist/components/index.js +2 -0
  33. package/dist/components/member-required.js +3 -5
  34. package/dist/components/oauth-consent.d.ts +22 -0
  35. package/dist/components/oauth-consent.js +79 -0
  36. package/dist/components/organization-deletion-request.d.ts +17 -0
  37. package/dist/components/organization-deletion-request.js +9 -0
  38. package/dist/components/organization-switcher.d.ts +1 -1
  39. package/dist/components/organization-switcher.js +113 -55
  40. package/dist/components/project-card-list.d.ts +6 -0
  41. package/dist/components/project-card-list.js +4 -0
  42. package/dist/components/user-button.d.ts +29 -1
  43. package/dist/components/user-button.js +145 -47
  44. package/dist/extra/api.group.d.ts +13 -1
  45. package/dist/extra/api.group.js +5 -1
  46. package/dist/extra/schema.d.ts +16 -1
  47. package/dist/extra/schema.js +13 -0
  48. package/dist/oauth/authorization.d.ts +3 -0
  49. package/dist/oauth/authorization.js +39 -0
  50. package/dist/oauth/schema.d.ts +24 -0
  51. package/dist/oauth/schema.js +12 -0
  52. package/dist/oauth/verify.d.ts +13 -0
  53. package/dist/oauth/verify.js +67 -0
  54. package/dist/schema.d.ts +35 -0
  55. package/dist/schema.js +26 -1
  56. package/dist/server/actor.js +2 -4
  57. package/dist/server/index.d.ts +4 -1
  58. package/dist/server/index.js +2 -0
  59. package/dist/server/mcp.d.ts +20 -0
  60. package/dist/server/mcp.js +66 -0
  61. package/dist/server/middleware.d.ts +15 -7
  62. package/dist/server/middleware.js +19 -6
  63. package/dist/server/webhook-layer.d.ts +6 -0
  64. package/dist/server/webhook-layer.js +41 -0
  65. package/dist/server/webhooks.d.ts +44 -0
  66. package/dist/server/webhooks.js +39 -0
  67. package/dist/service.d.ts +118 -46
  68. package/dist/service.js +56 -9
  69. package/package.json +8 -3
@@ -2,7 +2,7 @@ import { Effect } from "effect";
2
2
  import { AtomHttpApi } from "effect/reactivity";
3
3
  import { HttpApi, HttpApiClient } from "effect/http-api";
4
4
  import { AuthClientApi } from "../api.js";
5
- export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?: (() => "en" | "fr") | undefined) => Effect.Effect<{
5
+ export declare const authHttpClient: (baseUrl?: string, getLocale?: () => "en" | "fr") => Effect.Effect<{
6
6
  readonly admin: {
7
7
  readonly createDomain: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/auth/admin/domains", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
8
8
  readonly hostname: import("effect/Schema").NonEmptyString;
@@ -39,7 +39,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
39
39
  readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
40
40
  readonly userId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
41
41
  readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
42
- readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Number>;
42
+ readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Finite>;
43
43
  readonly memberPreviews: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
44
44
  readonly id: import("effect/Schema").String;
45
45
  readonly name: import("effect/Schema").String;
@@ -56,26 +56,26 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
56
56
  readonly dashboardStats: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"dashboardStats", "GET", "/api/auth/admin/dashboard-stats", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
57
57
  readonly days: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"7">, import("effect/Schema").Literal<"14">, import("effect/Schema").Literal<"30">, import("effect/Schema").Literal<"90">]>>;
58
58
  }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
59
- readonly totalUsers: import("effect/Schema").Number;
60
- readonly totalOrganizations: import("effect/Schema").Number;
61
- readonly totalProjects: import("effect/Schema").Number;
62
- readonly totalDomains: import("effect/Schema").Number;
63
- readonly totalApiKeys: import("effect/Schema").Number;
64
- readonly totalOauthClients: import("effect/Schema").Number;
65
- readonly dailyActiveUsers: import("effect/Schema").Number;
59
+ readonly totalUsers: import("effect/Schema").Finite;
60
+ readonly totalOrganizations: import("effect/Schema").Finite;
61
+ readonly totalProjects: import("effect/Schema").Finite;
62
+ readonly totalDomains: import("effect/Schema").Finite;
63
+ readonly totalApiKeys: import("effect/Schema").Finite;
64
+ readonly totalOauthClients: import("effect/Schema").Finite;
65
+ readonly dailyActiveUsers: import("effect/Schema").Finite;
66
66
  readonly dailyActiveUsersByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
67
67
  readonly date: import("effect/Schema").String;
68
- readonly count: import("effect/Schema").Number;
68
+ readonly count: import("effect/Schema").Finite;
69
69
  }>>;
70
70
  readonly signupsByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
71
71
  readonly date: import("effect/Schema").String;
72
- readonly count: import("effect/Schema").Number;
72
+ readonly count: import("effect/Schema").Finite;
73
73
  }>>;
74
74
  readonly projectConnections: import("effect/Schema").$Array<import("effect/Schema").Struct<{
75
75
  readonly projectId: import("effect/Schema").String;
76
76
  readonly projectName: import("effect/Schema").String;
77
- readonly users: import("effect/Schema").Number;
78
- readonly organizations: import("effect/Schema").Number;
77
+ readonly users: import("effect/Schema").Finite;
78
+ readonly organizations: import("effect/Schema").Finite;
79
79
  }>>;
80
80
  }>>, import("effect/Schema").toCodecJson<typeof import("effect/http-api/HttpApiError").Unauthorized | typeof import("effect/http-api/HttpApiError").Forbidden | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>, never, never>;
81
81
  readonly deleteApiKey: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"deleteApiKey", "DELETE", "/api/auth/admin/api-keys/:id", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
@@ -89,10 +89,10 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
89
89
  readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
90
90
  readonly enabled: import("effect/Schema").Boolean;
91
91
  readonly rateLimitEnabled: import("effect/Schema").Boolean;
92
- readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
93
- readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
94
- readonly requestCount: import("effect/Schema").Number;
95
- readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
92
+ readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
93
+ readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
94
+ readonly requestCount: import("effect/Schema").Finite;
95
+ readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
96
96
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
97
97
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
98
98
  readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
@@ -128,7 +128,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
128
128
  readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
129
129
  readonly userId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
130
130
  readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
131
- readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Number>;
131
+ readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Finite>;
132
132
  readonly memberPreviews: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
133
133
  readonly id: import("effect/Schema").String;
134
134
  readonly name: import("effect/Schema").String;
@@ -153,10 +153,10 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
153
153
  readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
154
154
  readonly enabled: import("effect/Schema").Boolean;
155
155
  readonly rateLimitEnabled: import("effect/Schema").Boolean;
156
- readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
157
- readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
158
- readonly requestCount: import("effect/Schema").Number;
159
- readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
156
+ readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
157
+ readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
158
+ readonly requestCount: import("effect/Schema").Finite;
159
+ readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
160
160
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
161
161
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
162
162
  readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
@@ -175,10 +175,10 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
175
175
  readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
176
176
  readonly enabled: import("effect/Schema").Boolean;
177
177
  readonly rateLimitEnabled: import("effect/Schema").Boolean;
178
- readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
179
- readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
180
- readonly requestCount: import("effect/Schema").Number;
181
- readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
178
+ readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
179
+ readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
180
+ readonly requestCount: import("effect/Schema").Finite;
181
+ readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
182
182
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
183
183
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
184
184
  readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
@@ -204,10 +204,10 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
204
204
  readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
205
205
  readonly enabled: import("effect/Schema").Boolean;
206
206
  readonly rateLimitEnabled: import("effect/Schema").Boolean;
207
- readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
208
- readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
209
- readonly requestCount: import("effect/Schema").Number;
210
- readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
207
+ readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
208
+ readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
209
+ readonly requestCount: import("effect/Schema").Finite;
210
+ readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
211
211
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
212
212
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
213
213
  readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
@@ -299,7 +299,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
299
299
  readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
300
300
  readonly userId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
301
301
  readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
302
- readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Number>;
302
+ readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Finite>;
303
303
  readonly memberPreviews: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
304
304
  readonly id: import("effect/Schema").String;
305
305
  readonly name: import("effect/Schema").String;
@@ -421,10 +421,10 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
421
421
  readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
422
422
  readonly enabled: import("effect/Schema").Boolean;
423
423
  readonly rateLimitEnabled: import("effect/Schema").Boolean;
424
- readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
425
- readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
426
- readonly requestCount: import("effect/Schema").Number;
427
- readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
424
+ readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
425
+ readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
426
+ readonly requestCount: import("effect/Schema").Finite;
427
+ readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
428
428
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
429
429
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
430
430
  readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
@@ -438,8 +438,8 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
438
438
  readonly name: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
439
439
  readonly enabled: import("effect/Schema").optional<import("effect/Schema").Boolean>;
440
440
  readonly rateLimitEnabled: import("effect/Schema").optional<import("effect/Schema").Boolean>;
441
- readonly rateLimitMax: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
442
- readonly rateLimitTimeWindow: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
441
+ readonly rateLimitMax: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Finite>>;
442
+ readonly rateLimitTimeWindow: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Finite>>;
443
443
  readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
444
444
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
445
445
  readonly id: import("effect/Schema").String;
@@ -450,10 +450,10 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
450
450
  readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
451
451
  readonly enabled: import("effect/Schema").Boolean;
452
452
  readonly rateLimitEnabled: import("effect/Schema").Boolean;
453
- readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
454
- readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
455
- readonly requestCount: import("effect/Schema").Number;
456
- readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
453
+ readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
454
+ readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
455
+ readonly requestCount: import("effect/Schema").Finite;
456
+ readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
457
457
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
458
458
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
459
459
  readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
@@ -500,7 +500,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
500
500
  readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
501
501
  readonly userId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
502
502
  readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
503
- readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Number>;
503
+ readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Finite>;
504
504
  readonly memberPreviews: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
505
505
  readonly id: import("effect/Schema").String;
506
506
  readonly name: import("effect/Schema").String;
@@ -519,7 +519,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
519
519
  readonly adminBanUser: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"adminBanUser", "POST", "/api/auth/admin/ban-user", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
520
520
  readonly userId: import("effect/Schema").String;
521
521
  readonly banReason: import("effect/Schema").optional<import("effect/Schema").String>;
522
- readonly banExpiresIn: import("effect/Schema").optional<import("effect/Schema").Number>;
522
+ readonly banExpiresIn: import("effect/Schema").optional<import("effect/Schema").Finite>;
523
523
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
524
524
  readonly user: import("effect/Schema").Struct<{
525
525
  readonly id: import("effect/Schema").String;
@@ -759,8 +759,8 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
759
759
  readonly apiKeyList: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"apiKeyList", "GET", "/api/auth/api-key/list", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
760
760
  readonly configId: import("effect/Schema").optional<import("effect/Schema").String>;
761
761
  readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
762
- readonly limit: import("effect/Schema").optional<import("effect/Schema").NumberFromString>;
763
- readonly offset: import("effect/Schema").optional<import("effect/Schema").NumberFromString>;
762
+ readonly limit: import("effect/Schema").optional<import("effect/Schema").FiniteFromString>;
763
+ readonly offset: import("effect/Schema").optional<import("effect/Schema").FiniteFromString>;
764
764
  readonly sortBy: import("effect/Schema").optional<import("effect/Schema").String>;
765
765
  readonly sortDirection: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["asc", "desc"]>>;
766
766
  }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -772,15 +772,15 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
772
772
  readonly userId: import("effect/Schema").optional<import("effect/Schema").String>;
773
773
  readonly referenceId: import("effect/Schema").String;
774
774
  readonly configId: import("effect/Schema").String;
775
- readonly refillInterval: import("effect/Schema").NullOr<import("effect/Schema").Number>;
776
- readonly refillAmount: import("effect/Schema").NullOr<import("effect/Schema").Number>;
775
+ readonly refillInterval: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
776
+ readonly refillAmount: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
777
777
  readonly lastRefillAt: import("effect/Schema").NullOr<import("effect/Schema").DateFromString>;
778
778
  readonly enabled: import("effect/Schema").Boolean;
779
779
  readonly rateLimitEnabled: import("effect/Schema").Boolean;
780
- readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
781
- readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
782
- readonly requestCount: import("effect/Schema").Number;
783
- readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
780
+ readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
781
+ readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
782
+ readonly requestCount: import("effect/Schema").Finite;
783
+ readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
784
784
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").DateFromString>;
785
785
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateFromString>;
786
786
  readonly createdAt: import("effect/Schema").DateFromString;
@@ -789,9 +789,9 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
789
789
  readonly permissions: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>>;
790
790
  readonly referrers: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").$Array<import("effect/Schema").String>>>;
791
791
  }>>;
792
- readonly total: import("effect/Schema").Number;
793
- readonly limit: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
794
- readonly offset: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
792
+ readonly total: import("effect/Schema").Finite;
793
+ readonly limit: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Finite>>;
794
+ readonly offset: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Finite>>;
795
795
  }>>, import("effect/Schema").toCodecJson<typeof import("../auth/schema.js").AuthBadRequest | typeof import("../auth/schema.js").AuthUnauthorized | typeof import("../auth/schema.js").AuthForbidden | typeof import("../auth/schema.js").AuthNotFound | typeof import("../auth/schema.js").AuthConflict | typeof import("../auth/schema.js").AuthExpectationFailed | typeof import("../auth/schema.js").AuthTooManyRequests | typeof import("../auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
796
796
  readonly changePassword: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"changePassword", "POST", "/api/auth/change-password", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
797
797
  readonly newPassword: import("effect/Schema").String;
@@ -848,6 +848,14 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
848
848
  readonly updatedAt: import("effect/Schema").DateFromString;
849
849
  }>;
850
850
  }>>, import("effect/Schema").toCodecJson<typeof import("../auth/schema.js").AuthBadRequest | typeof import("../auth/schema.js").AuthUnauthorized | typeof import("../auth/schema.js").AuthForbidden | typeof import("../auth/schema.js").AuthNotFound | typeof import("../auth/schema.js").AuthConflict | typeof import("../auth/schema.js").AuthExpectationFailed | typeof import("../auth/schema.js").AuthTooManyRequests | typeof import("../auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
851
+ readonly deleteUser: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"deleteUser", "POST", "/api/auth/delete-user", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
852
+ readonly password: import("effect/Schema").optional<import("effect/Schema").String>;
853
+ readonly token: import("effect/Schema").optional<import("effect/Schema").String>;
854
+ readonly callbackURL: import("effect/Schema").optional<import("effect/Schema").String>;
855
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
856
+ readonly success: import("effect/Schema").Boolean;
857
+ readonly message: import("effect/Schema").String;
858
+ }>>, import("effect/Schema").toCodecJson<typeof import("../auth/schema.js").AuthBadRequest | typeof import("../auth/schema.js").AuthUnauthorized | typeof import("../auth/schema.js").AuthForbidden | typeof import("../auth/schema.js").AuthNotFound | typeof import("../auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
851
859
  readonly getSession: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getSession", "GET", "/api/auth/get-session", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
852
860
  readonly disableCookieCache: import("effect/Schema").optional<import("effect/Schema").String>;
853
861
  readonly disableRefresh: import("effect/Schema").optional<import("effect/Schema").String>;
@@ -1066,10 +1074,22 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1066
1074
  readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
1067
1075
  readonly createdAt: import("effect/Schema").DateFromString;
1068
1076
  }>>, import("effect/Schema").toCodecJson<typeof import("../auth/schema.js").AuthBadRequest | typeof import("../auth/schema.js").AuthUnauthorized | typeof import("../auth/schema.js").AuthForbidden | typeof import("../auth/schema.js").AuthNotFound | typeof import("../auth/schema.js").AuthConflict | typeof import("../auth/schema.js").AuthExpectationFailed | typeof import("../auth/schema.js").AuthTooManyRequests | typeof import("../auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
1077
+ readonly organizationDelete: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationDelete", "POST", "/api/auth/organization/delete", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
1078
+ readonly organizationId: import("effect/Schema").NonEmptyString;
1079
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
1080
+ readonly id: import("effect/Schema").String;
1081
+ readonly name: import("effect/Schema").String;
1082
+ readonly slug: import("effect/Schema").String;
1083
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
1084
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Union<readonly [import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>, import("effect/Schema").String]>>>;
1085
+ readonly userId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
1086
+ readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
1087
+ readonly createdAt: import("effect/Schema").DateFromString;
1088
+ }>>, import("effect/Schema").toCodecJson<typeof import("../auth/schema.js").AuthBadRequest | typeof import("../auth/schema.js").AuthUnauthorized | typeof import("../auth/schema.js").AuthForbidden | typeof import("../auth/schema.js").AuthNotFound | typeof import("../auth/schema.js").AuthConflict | typeof import("../auth/schema.js").AuthExpectationFailed | typeof import("../auth/schema.js").AuthTooManyRequests | typeof import("../auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
1069
1089
  readonly organizationGetFull: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationGetFull", "GET", "/api/auth/organization/get-full-organization", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
1070
1090
  readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
1071
1091
  readonly organizationSlug: import("effect/Schema").optional<import("effect/Schema").String>;
1072
- readonly membersLimit: import("effect/Schema").optional<import("effect/Schema").NumberFromString>;
1092
+ readonly membersLimit: import("effect/Schema").optional<import("effect/Schema").FiniteFromString>;
1073
1093
  }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
1074
1094
  readonly id: import("effect/Schema").String;
1075
1095
  readonly name: import("effect/Schema").String;
@@ -1157,7 +1177,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1157
1177
  readonly organizationId: import("effect/Schema").NonEmptyString;
1158
1178
  readonly actorUserId: import("effect/Schema").NonEmptyString;
1159
1179
  readonly targetUserId: import("effect/Schema").NonEmptyString;
1160
- readonly expiresInSeconds: import("effect/Schema").optional<import("effect/Schema").Number>;
1180
+ readonly expiresInSeconds: import("effect/Schema").optional<import("effect/Schema").Finite>;
1161
1181
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
1162
1182
  readonly session: import("effect/Schema").Struct<{
1163
1183
  readonly id: import("effect/Schema").String;
@@ -1273,8 +1293,8 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1273
1293
  readonly createdAt: import("effect/Schema").optional<import("effect/Schema").DateFromString>;
1274
1294
  }>>>, import("effect/Schema").toCodecJson<typeof import("../auth/schema.js").AuthBadRequest | typeof import("../auth/schema.js").AuthUnauthorized | typeof import("../auth/schema.js").AuthForbidden | typeof import("../auth/schema.js").AuthNotFound | typeof import("../auth/schema.js").AuthConflict | typeof import("../auth/schema.js").AuthExpectationFailed | typeof import("../auth/schema.js").AuthTooManyRequests | typeof import("../auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
1275
1295
  readonly organizationListMembers: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationListMembers", "GET", "/api/auth/organization/list-members", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
1276
- readonly limit: import("effect/Schema").optional<import("effect/Schema").NumberFromString>;
1277
- readonly offset: import("effect/Schema").optional<import("effect/Schema").NumberFromString>;
1296
+ readonly limit: import("effect/Schema").optional<import("effect/Schema").FiniteFromString>;
1297
+ readonly offset: import("effect/Schema").optional<import("effect/Schema").FiniteFromString>;
1278
1298
  readonly sortBy: import("effect/Schema").optional<import("effect/Schema").String>;
1279
1299
  readonly sortDirection: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["asc", "desc"]>>;
1280
1300
  readonly filterField: import("effect/Schema").optional<import("effect/Schema").String>;
@@ -1328,7 +1348,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1328
1348
  }>, import("effect/Schema").Unknown, never, never>>>;
1329
1349
  }>;
1330
1350
  }>>;
1331
- readonly total: import("effect/Schema").Number;
1351
+ readonly total: import("effect/Schema").Finite;
1332
1352
  }>>, import("effect/Schema").toCodecJson<typeof import("../auth/schema.js").AuthBadRequest | typeof import("../auth/schema.js").AuthUnauthorized | typeof import("../auth/schema.js").AuthForbidden | typeof import("../auth/schema.js").AuthNotFound | typeof import("../auth/schema.js").AuthConflict | typeof import("../auth/schema.js").AuthExpectationFailed | typeof import("../auth/schema.js").AuthTooManyRequests | typeof import("../auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
1333
1353
  readonly organizationListUserInvitations: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationListUserInvitations", "GET", "/api/auth/organization/list-user-invitations", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{}>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Struct<{
1334
1354
  readonly id: import("effect/Schema").String;
@@ -1569,7 +1589,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1569
1589
  readonly nonce: import("effect/Schema").optional<import("effect/Schema").String>;
1570
1590
  readonly accessToken: import("effect/Schema").optional<import("effect/Schema").String>;
1571
1591
  readonly refreshToken: import("effect/Schema").optional<import("effect/Schema").String>;
1572
- readonly expiresAt: import("effect/Schema").optional<import("effect/Schema").Number>;
1592
+ readonly expiresAt: import("effect/Schema").optional<import("effect/Schema").Finite>;
1573
1593
  readonly user: import("effect/Schema").optional<import("effect/Schema").Struct<{
1574
1594
  readonly name: import("effect/Schema").optional<import("effect/Schema").Struct<{
1575
1595
  readonly firstName: import("effect/Schema").optional<import("effect/Schema").String>;
@@ -1935,6 +1955,19 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1935
1955
  readonly id: import("effect/Schema").String;
1936
1956
  readonly key: import("effect/Schema").String;
1937
1957
  }>>, import("effect/Schema").toCodecJson<typeof import("effect/http-api/HttpApiError").Unauthorized | typeof import("effect/http-api/HttpApiError").Forbidden | typeof import("effect/http-api/HttpApiError").InternalServerError | typeof import("../extra/schema.js").ExtraBadRequest>, never, never>, never, never>;
1958
+ readonly getAccountDeletionPlan: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getAccountDeletionPlan", "GET", "/api/auth/account-deletion", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
1959
+ readonly projects: import("effect/Schema").$Array<import("effect/Schema").Struct<{
1960
+ readonly id: import("effect/Schema").String;
1961
+ readonly name: import("effect/Schema").String;
1962
+ readonly ready: import("effect/Schema").Boolean;
1963
+ }>>;
1964
+ readonly organizations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
1965
+ readonly id: import("effect/Schema").String;
1966
+ readonly name: import("effect/Schema").String;
1967
+ readonly personal: import("effect/Schema").Boolean;
1968
+ }>>;
1969
+ readonly adminAccount: import("effect/Schema").Boolean;
1970
+ }>>, import("effect/Schema").toCodecJson<typeof import("effect/http-api/HttpApiError").Unauthorized | typeof import("effect/http-api/HttpApiError").Forbidden | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>, never, never>;
1938
1971
  readonly getOrganizationPublicProfile: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
1939
1972
  readonly organizationId: import("effect/Schema").String;
1940
1973
  readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
@@ -2067,5 +2100,5 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
2067
2100
  }, never, never>;
2068
2101
  type AuthClientApiGroups = typeof AuthClientApi extends HttpApi.HttpApi<string, infer Groups> ? Groups : never;
2069
2102
  type AuthClientApiClient = Pick<AtomHttpApi.AtomHttpApiClient<never, string, AuthClientApiGroups>, "mutation" | "query" | "runtime">;
2070
- export declare const authClientApi: (baseUrl?: string | undefined) => AuthClientApiClient;
2103
+ export declare const authClientApi: (baseUrl?: string) => AuthClientApiClient;
2071
2104
  export {};
@@ -5,6 +5,7 @@ type AuthFormProps = {
5
5
  locale?: KrakstackAuthLocale | undefined;
6
6
  defaultRedirectTo?: string | undefined;
7
7
  };
8
+ export declare const authMethodSearch: (searchString: string, method: "password" | "emailOtp", email?: string) => import("@tanstack/router-core").AnySchema;
8
9
  type AuthMethod = "password" | "emailOtp";
9
10
  export declare const resolveInitialAuthMethod: ({ requestedMethod, lastLoginMethod, emailPassword, emailOtp, }: {
10
11
  requestedMethod: string | null;