@krak-stack/auth 0.1.40 → 0.1.41

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.
@@ -1,97 +1,5 @@
1
1
  import { AtomHttpApi } from "effect/unstable/reactivity";
2
- export declare const authApiClient: (baseUrl?: string | undefined) => AtomHttpApi.AtomHttpApiClient<object, `AuthApi:${string}`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"auth", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSession", "GET", "/api/auth/get-session", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
3
- readonly session: import("effect/Schema").Struct<{
4
- readonly id: import("effect/Schema").String;
5
- readonly expiresAt: import("effect/Schema").Date;
6
- readonly token: import("effect/Schema").String;
7
- readonly createdAt: import("effect/Schema").Date;
8
- readonly updatedAt: import("effect/Schema").Date;
9
- readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
10
- readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
11
- readonly userId: import("effect/Schema").String;
12
- readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
13
- readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
14
- }>;
15
- readonly user: import("effect/Schema").Struct<{
16
- readonly id: import("effect/Schema").String;
17
- readonly name: import("effect/Schema").String;
18
- readonly email: import("effect/Schema").String;
19
- readonly emailVerified: import("effect/Schema").Boolean;
20
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
21
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
22
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
23
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
24
- readonly createdAt: import("effect/Schema").Date;
25
- readonly updatedAt: import("effect/Schema").Date;
26
- }>;
27
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../better-auth").TooManyRequests>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"authExtra", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
28
- readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
29
- readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
30
- readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
31
- readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
32
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
33
- readonly id: import("effect/Schema").String;
34
- readonly key: import("effect/Schema").String;
35
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
36
- readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
37
- readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
38
- readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
39
- readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
40
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
41
- readonly projectKey: import("effect/Schema").String;
42
- readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
43
- readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
44
- readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
45
- readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
46
- readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
47
- readonly authOptions: import("effect/Schema").Struct<{
48
- readonly emailPassword: import("effect/Schema").Boolean;
49
- readonly emailOtp: import("effect/Schema").Boolean;
50
- readonly google: import("effect/Schema").Boolean;
51
- readonly signUp: import("effect/Schema").Boolean;
52
- readonly signUpName: import("effect/Schema").Boolean;
53
- }>;
54
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setPassword", "POST", "/api/auth/set-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
55
- readonly newPassword: import("effect/Schema").NonEmptyString;
56
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
57
- readonly ok: import("effect/Schema").Boolean;
58
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/api/organizations/logo/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
59
- readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
60
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
61
- readonly url: import("effect/Schema").String;
62
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadUserImage", "POST", "/api/auth/image/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
63
- readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
64
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
65
- readonly url: import("effect/Schema").String;
66
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyApiKey", "POST", "/api/auth/verify-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
67
- readonly key: import("effect/Schema").NonEmptyString;
68
- readonly configId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>>;
69
- readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
70
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
71
- readonly valid: import("effect/Schema").Boolean;
72
- readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
73
- readonly message: import("effect/Schema").String;
74
- readonly code: import("effect/Schema").String;
75
- }>>;
76
- readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
77
- readonly id: import("effect/Schema").String;
78
- readonly configId: import("effect/Schema").String;
79
- readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
80
- readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
81
- readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
82
- readonly referenceId: import("effect/Schema").String;
83
- readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
84
- readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
85
- readonly createdAt: import("effect/Schema").Date;
86
- readonly updatedAt: import("effect/Schema").Date;
87
- readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
88
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
89
- }>>;
90
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
91
- readonly password: import("effect/Schema").NonEmptyString;
92
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
93
- readonly ok: import("effect/Schema").Boolean;
94
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"domains", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/domains", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
2
+ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpApi.AtomHttpApiClient<object, `AuthClientApi:${string}`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"admin", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/admin/domains", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
95
3
  readonly hostname: import("effect/Schema").NonEmptyString;
96
4
  readonly rootHostname: import("effect/Schema").NonEmptyString;
97
5
  readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
@@ -112,7 +20,42 @@ export declare const authApiClient: (baseUrl?: string | undefined) => AtomHttpAp
112
20
  readonly active: import("effect/Schema").Boolean;
113
21
  readonly createdAt: import("effect/Schema").Date;
114
22
  readonly updatedAt: import("effect/Schema").Date;
115
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"deleteDomain", "DELETE", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
23
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createOrganization", "POST", "/api/admin/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
24
+ readonly name: import("effect/Schema").NonEmptyString;
25
+ readonly slug: import("effect/Schema").NonEmptyString;
26
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").String>;
27
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
28
+ readonly id: import("effect/Schema").String;
29
+ readonly name: import("effect/Schema").String;
30
+ readonly slug: import("effect/Schema").String;
31
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
32
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
33
+ readonly createdAt: import("effect/Schema").Date;
34
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"dashboardStats", "GET", "/api/admin/dashboard-stats", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
35
+ 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">]>>;
36
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
37
+ readonly totalUsers: import("effect/Schema").Number;
38
+ readonly totalOrganizations: import("effect/Schema").Number;
39
+ readonly totalProjects: import("effect/Schema").Number;
40
+ readonly totalDomains: import("effect/Schema").Number;
41
+ readonly totalApiKeys: import("effect/Schema").Number;
42
+ readonly totalOauthClients: import("effect/Schema").Number;
43
+ readonly dailyActiveUsers: import("effect/Schema").Number;
44
+ readonly dailyActiveUsersByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
45
+ readonly date: import("effect/Schema").String;
46
+ readonly count: import("effect/Schema").Number;
47
+ }>>;
48
+ readonly signupsByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
49
+ readonly date: import("effect/Schema").String;
50
+ readonly count: import("effect/Schema").Number;
51
+ }>>;
52
+ readonly projectConnections: import("effect/Schema").$Array<import("effect/Schema").Struct<{
53
+ readonly projectId: import("effect/Schema").String;
54
+ readonly projectName: import("effect/Schema").String;
55
+ readonly users: import("effect/Schema").Number;
56
+ readonly organizations: import("effect/Schema").Number;
57
+ }>>;
58
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"deleteDomain", "DELETE", "/api/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
116
59
  readonly id: import("effect/Schema").NonEmptyString;
117
60
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
118
61
  readonly id: import("effect/Schema").String;
@@ -129,9 +72,24 @@ export declare const authApiClient: (baseUrl?: string | undefined) => AtomHttpAp
129
72
  readonly active: import("effect/Schema").Boolean;
130
73
  readonly createdAt: import("effect/Schema").Date;
131
74
  readonly updatedAt: import("effect/Schema").Date;
132
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomain", "GET", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
75
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"deleteOrganization", "DELETE", "/api/admin/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
76
+ readonly id: import("effect/Schema").String;
77
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
78
+ readonly id: import("effect/Schema").String;
79
+ readonly name: import("effect/Schema").String;
80
+ readonly slug: import("effect/Schema").String;
81
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
82
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
83
+ readonly createdAt: import("effect/Schema").Date;
84
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainRecords", "GET", "/api/admin/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
133
85
  readonly id: import("effect/Schema").NonEmptyString;
134
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
86
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
87
+ readonly required: import("effect/Schema").Boolean;
88
+ readonly status: import("effect/Schema").String;
89
+ readonly type: import("effect/Schema").String;
90
+ readonly name: import("effect/Schema").String;
91
+ readonly value: import("effect/Schema").String;
92
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listDomains", "GET", "/api/admin/domains", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
135
93
  readonly id: import("effect/Schema").String;
136
94
  readonly hostname: import("effect/Schema").String;
137
95
  readonly rootHostname: import("effect/Schema").String;
@@ -146,9 +104,67 @@ export declare const authApiClient: (baseUrl?: string | undefined) => AtomHttpAp
146
104
  readonly active: import("effect/Schema").Boolean;
147
105
  readonly createdAt: import("effect/Schema").Date;
148
106
  readonly updatedAt: import("effect/Schema").Date;
149
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainByHost", "GET", "/api/domains/by-host/:hostname", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
107
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listOrganizations", "GET", "/api/admin/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
108
+ readonly page: import("effect/Schema").Int;
109
+ readonly pageSize: import("effect/Schema").Int;
110
+ readonly globalFilter: import("effect/Schema").optional<import("effect/Schema").String>;
111
+ readonly sort: import("effect/Schema").optional<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").decodeTo<import("effect/Schema").$Array<import("effect/Schema").Struct<{
112
+ readonly id: import("effect/Schema").NonEmptyString;
113
+ readonly direction: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"asc">, import("effect/Schema").Literal<"desc">]>;
114
+ }>>, import("effect/Schema").String, never, never>, never, never>>;
115
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
116
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
117
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Schema<{
118
+ readonly id: string;
119
+ readonly name: string;
120
+ readonly slug: string;
121
+ readonly logo?: string | null | undefined;
122
+ readonly metadata?: string | null | undefined;
123
+ readonly createdAt: Date;
124
+ }>>;
125
+ readonly meta: import("effect/Schema").Struct<{
126
+ readonly page: import("effect/Schema").Int;
127
+ readonly pageSize: import("effect/Schema").Int;
128
+ readonly total: import("effect/Schema").Int;
129
+ readonly pageCount: import("effect/Schema").Int;
130
+ }>;
131
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listUsers", "GET", "/api/admin/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
132
+ readonly page: import("effect/Schema").Int;
133
+ readonly pageSize: import("effect/Schema").Int;
134
+ readonly globalFilter: import("effect/Schema").optional<import("effect/Schema").String>;
135
+ readonly sort: import("effect/Schema").optional<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").decodeTo<import("effect/Schema").$Array<import("effect/Schema").Struct<{
136
+ readonly id: import("effect/Schema").NonEmptyString;
137
+ readonly direction: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"asc">, import("effect/Schema").Literal<"desc">]>;
138
+ }>>, import("effect/Schema").String, never, never>, never, never>>;
139
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
140
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
141
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Schema<import("effect/Schema").Struct.ReadonlySide<{
142
+ readonly id: import("effect/Schema").String;
143
+ readonly name: import("effect/Schema").String;
144
+ readonly email: import("effect/Schema").String;
145
+ readonly emailVerified: import("effect/Schema").Boolean;
146
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
147
+ readonly createdAt: import("effect/Schema").Date;
148
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
149
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
150
+ readonly banReason: import("effect/Schema").NullOr<import("effect/Schema").String>;
151
+ readonly banExpires: import("effect/Schema").NullOr<import("effect/Schema").Date>;
152
+ }, "Type">>>;
153
+ readonly meta: import("effect/Schema").Struct<{
154
+ readonly page: import("effect/Schema").Int;
155
+ readonly pageSize: import("effect/Schema").Int;
156
+ readonly total: import("effect/Schema").Int;
157
+ readonly pageCount: import("effect/Schema").Int;
158
+ }>;
159
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateDomain", "PATCH", "/api/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
160
+ readonly id: import("effect/Schema").NonEmptyString;
161
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
150
162
  readonly hostname: import("effect/Schema").NonEmptyString;
151
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
163
+ readonly rootHostname: import("effect/Schema").NonEmptyString;
164
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
165
+ readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
166
+ readonly managed: import("effect/Schema").Boolean;
167
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
152
168
  readonly id: import("effect/Schema").String;
153
169
  readonly hostname: import("effect/Schema").String;
154
170
  readonly rootHostname: import("effect/Schema").String;
@@ -163,126 +179,84 @@ export declare const authApiClient: (baseUrl?: string | undefined) => AtomHttpAp
163
179
  readonly active: import("effect/Schema").Boolean;
164
180
  readonly createdAt: import("effect/Schema").Date;
165
181
  readonly updatedAt: import("effect/Schema").Date;
166
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainRecords", "GET", "/api/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
167
- readonly id: import("effect/Schema").NonEmptyString;
168
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
169
- readonly required: import("effect/Schema").Boolean;
170
- readonly status: import("effect/Schema").String;
171
- readonly type: import("effect/Schema").String;
172
- readonly name: import("effect/Schema").String;
173
- readonly value: import("effect/Schema").String;
174
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"organizations", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
175
- readonly organizationId: import("effect/Schema").NonEmptyString;
176
- readonly userId: import("effect/Schema").NonEmptyString;
177
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
182
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateOrganization", "PATCH", "/api/admin/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
178
183
  readonly id: import("effect/Schema").String;
179
- readonly organizationId: import("effect/Schema").String;
180
- readonly userId: import("effect/Schema").String;
181
- readonly role: import("effect/Schema").String;
182
- readonly createdAt: import("effect/Schema").Date;
183
- readonly user: import("effect/Schema").Struct<{
184
- readonly id: import("effect/Schema").String;
185
- readonly name: import("effect/Schema").String;
186
- readonly email: import("effect/Schema").String;
187
- readonly emailVerified: import("effect/Schema").Boolean;
188
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
189
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
190
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
191
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
192
- readonly createdAt: import("effect/Schema").Date;
193
- readonly updatedAt: import("effect/Schema").Date;
194
- }>;
195
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganization", "GET", "/api/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
196
- readonly id: import("effect/Schema").NonEmptyString;
197
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
184
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
185
+ readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
186
+ readonly slug: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
187
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").String>;
188
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
198
189
  readonly id: import("effect/Schema").String;
199
190
  readonly name: import("effect/Schema").String;
200
191
  readonly slug: import("effect/Schema").String;
201
- readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
202
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
203
- readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
204
- readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
205
- readonly name: import("effect/Schema").String;
206
- readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
207
- readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
208
- readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
209
- readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
210
- }>>;
211
- }>>;
192
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
193
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
212
194
  readonly createdAt: import("effect/Schema").Date;
213
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listOrganizationMembers", "GET", "/api/organizations/:organizationId/members", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
214
- readonly organizationId: import("effect/Schema").NonEmptyString;
215
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
195
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"authExtra", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
196
+ readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
197
+ readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
198
+ readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
199
+ readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
200
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
216
201
  readonly id: import("effect/Schema").String;
217
- readonly organizationId: import("effect/Schema").String;
218
- readonly userId: import("effect/Schema").String;
219
- readonly role: import("effect/Schema").String;
220
- readonly createdAt: import("effect/Schema").Date;
221
- readonly user: import("effect/Schema").Struct<{
222
- readonly id: import("effect/Schema").String;
223
- readonly name: import("effect/Schema").String;
224
- readonly email: import("effect/Schema").String;
225
- readonly emailVerified: import("effect/Schema").Boolean;
226
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
227
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
228
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
229
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
230
- readonly createdAt: import("effect/Schema").Date;
231
- readonly updatedAt: import("effect/Schema").Date;
232
- }>;
233
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listOrganizations", "GET", "/api/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
234
- readonly ids: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
235
- readonly userId: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
202
+ readonly key: import("effect/Schema").String;
203
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
204
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
205
+ readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
206
+ readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
207
+ readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
236
208
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
237
- readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
238
- readonly id: import("effect/Schema").String;
239
- readonly name: import("effect/Schema").String;
240
- readonly slug: import("effect/Schema").String;
241
- readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
242
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
243
- readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
244
- readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
245
- readonly name: import("effect/Schema").String;
246
- readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
247
- readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
248
- readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
249
- readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
250
- }>>;
251
- }>>;
252
- readonly createdAt: import("effect/Schema").Date;
209
+ readonly projectKey: import("effect/Schema").String;
210
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
211
+ readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
212
+ readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
213
+ readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
214
+ readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
215
+ readonly authOptions: import("effect/Schema").Struct<{
216
+ readonly emailPassword: import("effect/Schema").Boolean;
217
+ readonly emailOtp: import("effect/Schema").Boolean;
218
+ readonly google: import("effect/Schema").Boolean;
219
+ readonly signUp: import("effect/Schema").Boolean;
220
+ readonly signUpName: import("effect/Schema").Boolean;
221
+ }>;
222
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setPassword", "POST", "/api/auth/set-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
223
+ readonly newPassword: import("effect/Schema").NonEmptyString;
224
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
225
+ readonly ok: import("effect/Schema").Boolean;
226
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/api/organizations/logo/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
227
+ readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
228
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
229
+ readonly url: import("effect/Schema").String;
230
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadUserImage", "POST", "/api/auth/image/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
231
+ readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
232
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
233
+ readonly url: import("effect/Schema").String;
234
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyApiKey", "POST", "/api/auth/verify-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
235
+ readonly key: import("effect/Schema").NonEmptyString;
236
+ readonly configId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>>;
237
+ readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
238
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
239
+ readonly valid: import("effect/Schema").Boolean;
240
+ readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
241
+ readonly message: import("effect/Schema").String;
242
+ readonly code: import("effect/Schema").String;
253
243
  }>>;
254
- readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
255
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"users", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUser", "GET", "/api/users/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
256
- readonly id: import("effect/Schema").NonEmptyString;
257
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
258
- readonly id: import("effect/Schema").String;
259
- readonly name: import("effect/Schema").String;
260
- readonly email: import("effect/Schema").String;
261
- readonly emailVerified: import("effect/Schema").Boolean;
262
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
263
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
264
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
265
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
266
- readonly createdAt: import("effect/Schema").Date;
267
- readonly updatedAt: import("effect/Schema").Date;
268
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUserActiveOrganization", "GET", "/api/organizations/user/:userId/active", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
269
- readonly userId: import("effect/Schema").NonEmptyString;
270
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
271
- readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
272
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
273
- readonly ids: import("effect/Schema").NonEmptyString;
274
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
275
- readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
244
+ readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
276
245
  readonly id: import("effect/Schema").String;
277
- readonly name: import("effect/Schema").String;
278
- readonly email: import("effect/Schema").String;
279
- readonly emailVerified: import("effect/Schema").Boolean;
280
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
281
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
282
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
283
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
246
+ readonly configId: import("effect/Schema").String;
247
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
248
+ readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
249
+ readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
250
+ readonly referenceId: import("effect/Schema").String;
251
+ readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
252
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
284
253
  readonly createdAt: import("effect/Schema").Date;
285
254
  readonly updatedAt: import("effect/Schema").Date;
255
+ readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
256
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
286
257
  }>>;
287
- readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
288
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false>>;
258
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
259
+ readonly password: import("effect/Schema").NonEmptyString;
260
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
261
+ readonly ok: import("effect/Schema").Boolean;
262
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never>, false>>;
@@ -0,0 +1,29 @@
1
+ import { Effect, Layer } from "effect";
2
+ import { FetchHttpClient, HttpClient } from "effect/unstable/http";
3
+ import { AtomHttpApi } from "effect/unstable/reactivity";
4
+ import { AuthClientApi } from "../api";
5
+ import { defaultBaseUrl } from "../config";
6
+ const fetchHttpClientLayer = FetchHttpClient.layer;
7
+ const authClientApiUrl = (baseUrl) => {
8
+ const url = baseUrl?.trim() ||
9
+ (typeof window === "undefined" ? defaultBaseUrl() : window.location.origin);
10
+ return url.replace(/\/$/, "");
11
+ };
12
+ const createAuthClientApiClient = (key) => AtomHttpApi.Service()(`AuthClientApi:${key}`, {
13
+ api: AuthClientApi,
14
+ baseUrl: key,
15
+ httpClient: fetchHttpClientLayer,
16
+ transformClient: (client) => HttpClient.makeWith((request) => client.postprocess(request).pipe(Effect.provideService(FetchHttpClient.RequestInit, {
17
+ credentials: "include",
18
+ })), client.preprocess),
19
+ });
20
+ const authClientApis = new Map();
21
+ export const authClientApi = (baseUrl) => {
22
+ const key = authClientApiUrl(baseUrl);
23
+ const existing = authClientApis.get(key);
24
+ if (existing)
25
+ return existing;
26
+ const client = createAuthClientApiClient(key);
27
+ authClientApis.set(key, client);
28
+ return client;
29
+ };
@@ -11,9 +11,9 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/co
11
11
  import { Field, FieldLabel } from "@/components/ui/field";
12
12
  import { FieldError, useAppForm } from "@/components/ui/form";
13
13
  import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from "@/components/ui/input-otp";
14
- import { cn } from "@/lib/utils";
15
- import { authApiClient } from "./auth-api-client";
14
+ import { authClientApi } from "./auth-client-api";
16
15
  import { useKrakstackAuth } from "./auth-provider";
16
+ import { cn } from "./utils";
17
17
  const EMAIL_OTP_RESEND_COOLDOWN_SECONDS = 60;
18
18
  const defaultMessages = {
19
19
  en: {
@@ -140,7 +140,7 @@ const useAuthProjectConfig = (baseUrl, searchString, projectConfig) => {
140
140
  const clientId = getSearchParam(searchString, "client_id");
141
141
  const host = getBrowserAuthHost();
142
142
  const atom = projectConfig === undefined
143
- ? authApiClient(baseUrl).query("authExtra", "getProjectPublicConfig", {
143
+ ? authClientApi(baseUrl).query("authExtra", "getProjectPublicConfig", {
144
144
  query: {
145
145
  ...(projectId ? { projectId } : {}),
146
146
  ...(clientId ? { clientId } : {}),
@@ -5,7 +5,7 @@ import { useRouterState } from "@tanstack/react-router";
5
5
  import { adminClient, emailOTPClient, genericOAuthClient, lastLoginMethodClient, organizationClient, twoFactorClient, } from "better-auth/client/plugins";
6
6
  import { createAuthClient } from "better-auth/react";
7
7
  import { createContext, useContext, useEffect, useMemo, } from "react";
8
- import { authApiClient } from "./auth-api-client";
8
+ import { authClientApi } from "./auth-client-api";
9
9
  const KrakstackAuthContext = createContext(null);
10
10
  const PROJECT_CONTEXT_COOKIE = "krakstack-auth.project_context";
11
11
  const setProjectContextCookie = (projectId) => {
@@ -62,7 +62,7 @@ const useProjectConfig = (baseUrl, providedProjectId) => {
62
62
  const clientId = getSearchParam(searchString, "client_id");
63
63
  const host = getBrowserAuthHost();
64
64
  const rootHost = getRedirectHost(searchString);
65
- const result = useAtomSuspense(authApiClient(baseUrl).query("authExtra", "getProjectPublicConfig", {
65
+ const result = useAtomSuspense(authClientApi(baseUrl).query("authExtra", "getProjectPublicConfig", {
66
66
  query: {
67
67
  ...(projectId ? { projectId } : {}),
68
68
  ...(clientId ? { clientId } : {}),