@krak-stack/auth 0.2.32 → 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 (53) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +101 -5
  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 +1313 -1313
  8. package/dist/auth/api.group.d.ts +18 -18
  9. package/dist/auth/schema.d.ts +49 -33
  10. package/dist/auth/schema.js +18 -18
  11. package/dist/components/admin-organization-form.js +2 -2
  12. package/dist/components/admin-organizations.js +6 -5
  13. package/dist/components/admin-users.js +6 -6
  14. package/dist/components/api-key-edit-form.js +19 -11
  15. package/dist/components/associated-projects-notice.d.ts +2 -1
  16. package/dist/components/associated-projects-notice.js +6 -2
  17. package/dist/components/auth-atoms.js +1 -2
  18. package/dist/components/auth-client-api.d.ts +61 -61
  19. package/dist/components/auth-forms.d.ts +1 -0
  20. package/dist/components/auth-forms.js +41 -56
  21. package/dist/components/auth-provider.d.ts +3 -1
  22. package/dist/components/hooks.d.ts +2 -0
  23. package/dist/components/hooks.js +13 -6
  24. package/dist/components/index.d.ts +3 -0
  25. package/dist/components/index.js +2 -0
  26. package/dist/components/member-required.js +3 -5
  27. package/dist/components/oauth-consent.d.ts +22 -0
  28. package/dist/components/oauth-consent.js +79 -0
  29. package/dist/components/organization-switcher.d.ts +1 -1
  30. package/dist/components/organization-switcher.js +83 -54
  31. package/dist/components/project-card-list.d.ts +6 -0
  32. package/dist/components/project-card-list.js +4 -0
  33. package/dist/components/user-button.js +115 -54
  34. package/dist/extra/schema.d.ts +3 -1
  35. package/dist/oauth/authorization.d.ts +3 -0
  36. package/dist/oauth/authorization.js +39 -0
  37. package/dist/oauth/schema.d.ts +24 -0
  38. package/dist/oauth/schema.js +12 -0
  39. package/dist/oauth/verify.d.ts +13 -0
  40. package/dist/oauth/verify.js +67 -0
  41. package/dist/schema.js +1 -1
  42. package/dist/server/actor.js +2 -4
  43. package/dist/server/index.d.ts +2 -0
  44. package/dist/server/index.js +1 -0
  45. package/dist/server/mcp.d.ts +20 -0
  46. package/dist/server/mcp.js +66 -0
  47. package/dist/server/middleware.d.ts +5 -5
  48. package/dist/server/middleware.js +15 -5
  49. package/dist/server/webhook-layer.js +8 -4
  50. package/dist/server/webhooks.d.ts +9 -3
  51. package/dist/service.d.ts +52 -46
  52. package/dist/service.js +56 -9
  53. package/package.json +2 -1
@@ -3,6 +3,7 @@ import { useAtomValue } from "@effect/atom-react";
3
3
  import { AsyncResult, Atom } from "effect/reactivity";
4
4
  import { Badge } from "@/components/ui/badge";
5
5
  import { authClientApi } from "./auth-client-api.js";
6
+ import { ProjectCardList } from "./project-card-list.js";
6
7
  const associatedProjectsAtom = Atom.family((baseUrl) => Atom.family((organizationId) => authClientApi(baseUrl).query("authExtra", "listAssociatedProjects", {
7
8
  query: organizationId ? { organizationId } : {},
8
9
  timeToLive: "1 minute",
@@ -11,14 +12,17 @@ const associatedProjectsAtom = Atom.family((baseUrl) => Atom.family((organizatio
11
12
  organizationId ? `organization:${organizationId}` : "current-user",
12
13
  ],
13
14
  })));
14
- export const AssociatedProjectsNotice = ({ baseUrl, getSummary, organizationId = null, viewLabel, }) => {
15
+ export const AssociatedProjectsNotice = ({ baseUrl, expanded = false, getSummary, organizationId = null, viewLabel, }) => {
15
16
  const result = useAtomValue(associatedProjectsAtom(baseUrl)(organizationId));
16
17
  const projects = AsyncResult.match(result, {
17
18
  onInitial: () => [],
18
19
  onFailure: () => [],
19
20
  onSuccess: ({ value }) => Array.from(value),
20
21
  });
21
- if (projects.length <= 1)
22
+ if (projects.length < (expanded ? 1 : 2))
22
23
  return null;
24
+ if (expanded) {
25
+ return (_jsxs("section", { className: "space-y-2", children: [_jsx("h3", { className: "text-muted-foreground text-xs font-medium", children: getSummary(projects.length) }), _jsx(ProjectCardList, { projects: projects })] }));
26
+ }
23
27
  return (_jsx("div", { className: "px-1 py-2", children: _jsxs("details", { className: "border-primary/60 text-muted-foreground border-l-2 pl-3 text-sm", children: [_jsxs("summary", { className: "cursor-pointer list-none [&::-webkit-details-marker]:hidden", children: [getSummary(projects.length), " ", _jsx("span", { className: "text-foreground underline underline-offset-4", children: viewLabel })] }), _jsx("div", { className: "mt-2 flex flex-wrap gap-2", children: projects.map((project) => (_jsx(Badge, { variant: "secondary", children: project.name }, project.id))) })] }) }));
24
28
  };
@@ -29,8 +29,7 @@ const authSessionQueryAtom = Atom.family((baseUrl) => authClientApi(baseUrl)
29
29
  return unauthorized && !result.waiting
30
30
  ? AsyncResult.success(null)
31
31
  : result;
32
- }))
33
- .pipe(refreshOnAuthChange));
32
+ }), refreshOnAuthChange));
34
33
  export const authSessionAtom = Atom.family((baseUrl) => Atom.optimistic(authSessionQueryAtom(baseUrl)));
35
34
  export const refreshAuthSession = Effect.fn("refreshAuthSession")(function* (registry, baseUrl) {
36
35
  const query = authSessionQueryAtom(baseUrl);
@@ -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;
@@ -1089,7 +1089,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1089
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<{
1090
1090
  readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
1091
1091
  readonly organizationSlug: import("effect/Schema").optional<import("effect/Schema").String>;
1092
- readonly membersLimit: import("effect/Schema").optional<import("effect/Schema").NumberFromString>;
1092
+ readonly membersLimit: import("effect/Schema").optional<import("effect/Schema").FiniteFromString>;
1093
1093
  }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
1094
1094
  readonly id: import("effect/Schema").String;
1095
1095
  readonly name: import("effect/Schema").String;
@@ -1177,7 +1177,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1177
1177
  readonly organizationId: import("effect/Schema").NonEmptyString;
1178
1178
  readonly actorUserId: import("effect/Schema").NonEmptyString;
1179
1179
  readonly targetUserId: import("effect/Schema").NonEmptyString;
1180
- readonly expiresInSeconds: import("effect/Schema").optional<import("effect/Schema").Number>;
1180
+ readonly expiresInSeconds: import("effect/Schema").optional<import("effect/Schema").Finite>;
1181
1181
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
1182
1182
  readonly session: import("effect/Schema").Struct<{
1183
1183
  readonly id: import("effect/Schema").String;
@@ -1293,8 +1293,8 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1293
1293
  readonly createdAt: import("effect/Schema").optional<import("effect/Schema").DateFromString>;
1294
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>;
1295
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<{
1296
- readonly limit: import("effect/Schema").optional<import("effect/Schema").NumberFromString>;
1297
- 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>;
1298
1298
  readonly sortBy: import("effect/Schema").optional<import("effect/Schema").String>;
1299
1299
  readonly sortDirection: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["asc", "desc"]>>;
1300
1300
  readonly filterField: import("effect/Schema").optional<import("effect/Schema").String>;
@@ -1348,7 +1348,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1348
1348
  }>, import("effect/Schema").Unknown, never, never>>>;
1349
1349
  }>;
1350
1350
  }>>;
1351
- readonly total: import("effect/Schema").Number;
1351
+ readonly total: import("effect/Schema").Finite;
1352
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>;
1353
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<{
1354
1354
  readonly id: import("effect/Schema").String;
@@ -1589,7 +1589,7 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
1589
1589
  readonly nonce: import("effect/Schema").optional<import("effect/Schema").String>;
1590
1590
  readonly accessToken: import("effect/Schema").optional<import("effect/Schema").String>;
1591
1591
  readonly refreshToken: import("effect/Schema").optional<import("effect/Schema").String>;
1592
- readonly expiresAt: import("effect/Schema").optional<import("effect/Schema").Number>;
1592
+ readonly expiresAt: import("effect/Schema").optional<import("effect/Schema").Finite>;
1593
1593
  readonly user: import("effect/Schema").optional<import("effect/Schema").Struct<{
1594
1594
  readonly name: import("effect/Schema").optional<import("effect/Schema").Struct<{
1595
1595
  readonly firstName: import("effect/Schema").optional<import("effect/Schema").String>;
@@ -2100,5 +2100,5 @@ export declare const authHttpClient: (baseUrl?: string | undefined, getLocale?:
2100
2100
  }, never, never>;
2101
2101
  type AuthClientApiGroups = typeof AuthClientApi extends HttpApi.HttpApi<string, infer Groups> ? Groups : never;
2102
2102
  type AuthClientApiClient = Pick<AtomHttpApi.AtomHttpApiClient<never, string, AuthClientApiGroups>, "mutation" | "query" | "runtime">;
2103
- export declare const authClientApi: (baseUrl?: string | undefined) => AuthClientApiClient;
2103
+ export declare const authClientApi: (baseUrl?: string) => AuthClientApiClient;
2104
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;