@krak-stack/auth 0.1.38 → 0.1.40

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 (38) hide show
  1. package/dist/api.d.ts +22 -0
  2. package/dist/better-auth/api.d.ts +2 -0
  3. package/dist/better-auth/index.d.ts +1 -0
  4. package/dist/better-auth/schema.d.ts +1 -0
  5. package/dist/better-auth/schema.js +1 -0
  6. package/dist/components/admin-organization-form.d.ts +6 -0
  7. package/dist/components/admin-organization-form.js +136 -0
  8. package/dist/components/admin-organizations.d.ts +7 -0
  9. package/dist/components/admin-organizations.js +118 -0
  10. package/dist/components/admin-users.d.ts +8 -0
  11. package/dist/components/admin-users.js +265 -0
  12. package/dist/components/auth-api-client.d.ts +22 -0
  13. package/dist/components/auth-client.d.ts +3 -1
  14. package/dist/components/auth-forms.js +10 -24
  15. package/dist/components/auth-provider.d.ts +16 -15
  16. package/dist/components/auth-provider.js +51 -4
  17. package/dist/components/index.d.ts +3 -0
  18. package/dist/components/index.js +3 -0
  19. package/dist/components/user-button.d.ts +11 -1
  20. package/dist/components/user-button.js +73 -15
  21. package/dist/extra/api.d.ts +2 -0
  22. package/dist/extra/index.d.ts +1 -0
  23. package/dist/extra/schema.d.ts +1 -0
  24. package/dist/extra/schema.js +2 -0
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/schema.d.ts +2 -0
  28. package/dist/schema.js +3 -0
  29. package/dist/server/api.d.ts +40 -0
  30. package/dist/server/index.d.ts +3 -0
  31. package/dist/server/index.js +1 -0
  32. package/dist/server/middleware.d.ts +23 -0
  33. package/dist/server/middleware.js +40 -0
  34. package/dist/server/schema.d.ts +6 -0
  35. package/dist/server/schema.js +8 -0
  36. package/dist/service.d.ts +516 -437
  37. package/dist/service.js +96 -12
  38. package/package.json +1 -1
package/dist/service.d.ts CHANGED
@@ -1,37 +1,70 @@
1
1
  import { Context, Effect, Layer } from "effect";
2
2
  import { HttpClient } from "effect/unstable/http";
3
3
  import { HttpApiClient } from "effect/unstable/httpapi";
4
+ import { HttpApiError } from "effect/unstable/httpapi";
4
5
  import { AuthClientConfig, type ClientConfig } from "./config";
6
+ import { ExtraVerifiedApiKey } from "./extra/schema";
7
+ import type { Session, User } from "./schema";
8
+ type ExtraVerifiedApiKeyType = typeof ExtraVerifiedApiKey.Type;
9
+ export type AuthSession = {
10
+ readonly session: Session;
11
+ readonly user: User | undefined;
12
+ readonly isSuperAdminImpersonation: false;
13
+ readonly authMethod: {
14
+ readonly type: "cookie";
15
+ } | {
16
+ readonly type: "apiKey";
17
+ readonly apiKey: ExtraVerifiedApiKeyType;
18
+ };
19
+ };
20
+ export type AuthSessionWithOrganization = AuthSession & {
21
+ readonly session: Session & {
22
+ readonly activeOrganizationId: string;
23
+ };
24
+ };
25
+ export type AuthSessionWithUser = AuthSession & {
26
+ readonly user: User;
27
+ };
28
+ export type AuthSessionWithUserAndOrganization = AuthSessionWithUser & AuthSessionWithOrganization;
5
29
  export type AuthServiceLayerOptions = Partial<ClientConfig> & {
6
30
  readonly headers?: Record<string, string>;
31
+ readonly apiKeyConfigId?: "user" | "organization";
7
32
  };
8
33
  declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/auth/AuthService", {
34
+ getSession: () => Effect.Effect<AuthSession | null, HttpApiError.Unauthorized, never>;
35
+ requireSession: () => Effect.Effect<AuthSession, HttpApiError.Unauthorized>;
36
+ requireUser: () => Effect.Effect<AuthSessionWithUser, HttpApiError.Unauthorized>;
37
+ requireOrganization: () => Effect.Effect<AuthSessionWithOrganization, HttpApiError.Unauthorized>;
38
+ requireUserOrganization: () => Effect.Effect<AuthSessionWithUserAndOrganization, HttpApiError.Unauthorized>;
9
39
  auth: {
10
- getSession: () => Effect.Effect<{
11
- readonly session: {
12
- readonly id: string;
13
- readonly expiresAt: Date;
14
- readonly token: string;
15
- readonly createdAt: Date;
16
- readonly updatedAt: Date;
17
- readonly ipAddress?: string | null | undefined;
18
- readonly userAgent?: string | null | undefined;
19
- readonly userId: string;
20
- readonly impersonatedBy?: string | null | undefined;
21
- readonly activeOrganizationId?: string | null | undefined;
22
- };
23
- readonly user: {
24
- readonly id: string;
25
- readonly name: string;
26
- readonly email: string;
27
- readonly emailVerified: boolean;
28
- readonly image: string | null;
29
- readonly role: string | null;
30
- readonly banned: boolean | null;
31
- readonly createdAt: Date;
32
- readonly updatedAt: Date;
33
- };
34
- } | null, unknown, never>;
40
+ readonly getSession: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: void | {
41
+ readonly responseMode?: Mode;
42
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
43
+ readonly session: import("effect/Schema").Struct<{
44
+ readonly id: import("effect/Schema").String;
45
+ readonly expiresAt: import("effect/Schema").Date;
46
+ readonly token: import("effect/Schema").String;
47
+ readonly createdAt: import("effect/Schema").Date;
48
+ readonly updatedAt: import("effect/Schema").Date;
49
+ readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
50
+ readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
51
+ readonly userId: import("effect/Schema").String;
52
+ readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
53
+ readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
54
+ }>;
55
+ readonly user: import("effect/Schema").Struct<{
56
+ readonly id: import("effect/Schema").String;
57
+ readonly name: import("effect/Schema").String;
58
+ readonly email: import("effect/Schema").String;
59
+ readonly emailVerified: import("effect/Schema").Boolean;
60
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
61
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
62
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
63
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
64
+ readonly createdAt: import("effect/Schema").Date;
65
+ readonly updatedAt: import("effect/Schema").Date;
66
+ }>;
67
+ }, "Type"> | null, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.Forbidden | HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | import("./better-auth").TooManyRequests | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
35
68
  };
36
69
  authExtra: {
37
70
  readonly createApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
@@ -44,52 +77,53 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
44
77
  } | undefined;
45
78
  };
46
79
  readonly responseMode?: Mode;
47
- }) => Effect.Effect<HttpApiClient.Client.Response<{
48
- readonly id: string;
49
- readonly key: string;
50
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
80
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
81
+ readonly id: import("effect/Schema").String;
82
+ readonly key: import("effect/Schema").String;
83
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
51
84
  readonly getProjectPublicConfig: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
52
85
  readonly query: {
53
86
  readonly projectId?: string | undefined;
54
87
  readonly clientId?: string | undefined;
55
88
  readonly host?: string | undefined;
89
+ readonly rootHost?: string | undefined;
56
90
  };
57
91
  readonly responseMode?: Mode;
58
- }) => Effect.Effect<HttpApiClient.Client.Response<{
59
- readonly projectKey: string;
60
- readonly name: string | null;
61
- readonly logoUrl: string | null;
62
- readonly authDomain: string | null;
63
- readonly rootDomain: string | null;
64
- readonly themeCss: string | null;
65
- readonly authOptions: {
66
- readonly emailPassword: boolean;
67
- readonly emailOtp: boolean;
68
- readonly google: boolean;
69
- readonly signUp: boolean;
70
- readonly signUpName: boolean;
71
- };
72
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
92
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
93
+ readonly projectKey: import("effect/Schema").String;
94
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
95
+ readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
96
+ readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
97
+ readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
98
+ readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
99
+ readonly authOptions: import("effect/Schema").Struct<{
100
+ readonly emailPassword: import("effect/Schema").Boolean;
101
+ readonly emailOtp: import("effect/Schema").Boolean;
102
+ readonly google: import("effect/Schema").Boolean;
103
+ readonly signUp: import("effect/Schema").Boolean;
104
+ readonly signUpName: import("effect/Schema").Boolean;
105
+ }>;
106
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
73
107
  readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
74
- readonly payload: {
75
- readonly newPassword: string;
76
- };
108
+ readonly payload: import("effect/Schema").Struct.ReadonlySide<{
109
+ readonly newPassword: import("effect/Schema").NonEmptyString;
110
+ }, "Type">;
77
111
  readonly responseMode?: Mode;
78
- }) => Effect.Effect<HttpApiClient.Client.Response<{
79
- readonly ok: boolean;
80
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
112
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
113
+ readonly ok: import("effect/Schema").Boolean;
114
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
81
115
  readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
82
116
  readonly payload: FormData;
83
117
  readonly responseMode?: Mode;
84
- }) => Effect.Effect<HttpApiClient.Client.Response<{
85
- readonly url: string;
86
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
118
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
119
+ readonly url: import("effect/Schema").String;
120
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.Forbidden | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
87
121
  readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
88
122
  readonly payload: FormData;
89
123
  readonly responseMode?: Mode;
90
- }) => Effect.Effect<HttpApiClient.Client.Response<{
91
- readonly url: string;
92
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
124
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
125
+ readonly url: import("effect/Schema").String;
126
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
93
127
  readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
94
128
  readonly payload: {
95
129
  readonly key: string;
@@ -99,37 +133,35 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
99
133
  } | undefined;
100
134
  };
101
135
  readonly responseMode?: Mode;
102
- }) => Effect.Effect<HttpApiClient.Client.Response<{
103
- readonly valid: boolean;
104
- readonly error: {
105
- readonly message: string;
106
- readonly code: string;
107
- } | null;
108
- readonly key: {
109
- readonly id: string;
110
- readonly configId: string;
111
- readonly name: string | null;
112
- readonly start: string | null;
113
- readonly prefix: string | null;
114
- readonly referenceId: string;
115
- readonly enabled: boolean | null;
116
- readonly expiresAt: Date | null;
117
- readonly createdAt: Date;
118
- readonly updatedAt: Date;
119
- readonly permissions: {
120
- readonly [x: string]: readonly string[];
121
- } | null;
122
- readonly metadata: unknown;
123
- } | null;
124
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
136
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
137
+ readonly valid: import("effect/Schema").Boolean;
138
+ readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
139
+ readonly message: import("effect/Schema").String;
140
+ readonly code: import("effect/Schema").String;
141
+ }>>;
142
+ readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
143
+ readonly id: import("effect/Schema").String;
144
+ readonly configId: import("effect/Schema").String;
145
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
146
+ readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
147
+ readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
148
+ readonly referenceId: import("effect/Schema").String;
149
+ readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
150
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
151
+ readonly createdAt: import("effect/Schema").Date;
152
+ readonly updatedAt: import("effect/Schema").Date;
153
+ readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
154
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
155
+ }>>;
156
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
125
157
  readonly verifyPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
126
- readonly payload: {
127
- readonly password: string;
128
- };
158
+ readonly payload: import("effect/Schema").Struct.ReadonlySide<{
159
+ readonly password: import("effect/Schema").NonEmptyString;
160
+ }, "Type">;
129
161
  readonly responseMode?: Mode;
130
- }) => Effect.Effect<HttpApiClient.Client.Response<{
131
- readonly ok: boolean;
132
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
162
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
163
+ readonly ok: import("effect/Schema").Boolean;
164
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
133
165
  };
134
166
  domains: {
135
167
  readonly createDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
@@ -146,179 +178,197 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
146
178
  readonly hostname: string;
147
179
  readonly rootHostname: string;
148
180
  readonly projectId: string | null;
181
+ readonly projectName?: string | null | undefined;
182
+ readonly projectLogo?: string | null | undefined;
149
183
  readonly organizationId: string | null;
184
+ readonly organizationName?: string | null | undefined;
185
+ readonly organizationLogo?: string | null | undefined;
150
186
  readonly hostnameId: string;
151
187
  readonly managed: boolean;
152
188
  readonly active: boolean;
153
189
  readonly createdAt: Date;
154
190
  readonly updatedAt: Date;
155
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
191
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
156
192
  readonly deleteDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
157
- readonly params: {
158
- readonly id: string;
159
- };
193
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
194
+ readonly id: import("effect/Schema").NonEmptyString;
195
+ }, "Type">;
160
196
  readonly responseMode?: Mode;
161
197
  }) => Effect.Effect<HttpApiClient.Client.Response<{
162
198
  readonly id: string;
163
199
  readonly hostname: string;
164
200
  readonly rootHostname: string;
165
201
  readonly projectId: string | null;
202
+ readonly projectName?: string | null | undefined;
203
+ readonly projectLogo?: string | null | undefined;
166
204
  readonly organizationId: string | null;
205
+ readonly organizationName?: string | null | undefined;
206
+ readonly organizationLogo?: string | null | undefined;
167
207
  readonly hostnameId: string;
168
208
  readonly managed: boolean;
169
209
  readonly active: boolean;
170
210
  readonly createdAt: Date;
171
211
  readonly updatedAt: Date;
172
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
212
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
173
213
  readonly getDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
174
- readonly params: {
175
- readonly id: string;
176
- };
214
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
215
+ readonly id: import("effect/Schema").NonEmptyString;
216
+ }, "Type">;
177
217
  readonly responseMode?: Mode;
178
218
  }) => Effect.Effect<HttpApiClient.Client.Response<{
179
219
  readonly id: string;
180
220
  readonly hostname: string;
181
221
  readonly rootHostname: string;
182
222
  readonly projectId: string | null;
223
+ readonly projectName?: string | null | undefined;
224
+ readonly projectLogo?: string | null | undefined;
183
225
  readonly organizationId: string | null;
226
+ readonly organizationName?: string | null | undefined;
227
+ readonly organizationLogo?: string | null | undefined;
184
228
  readonly hostnameId: string;
185
229
  readonly managed: boolean;
186
230
  readonly active: boolean;
187
231
  readonly createdAt: Date;
188
232
  readonly updatedAt: Date;
189
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
233
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
190
234
  readonly getDomainByHost: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
191
- readonly params: {
192
- readonly hostname: string;
193
- };
235
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
236
+ readonly hostname: import("effect/Schema").NonEmptyString;
237
+ }, "Type">;
194
238
  readonly responseMode?: Mode;
195
239
  }) => Effect.Effect<HttpApiClient.Client.Response<{
196
240
  readonly id: string;
197
241
  readonly hostname: string;
198
242
  readonly rootHostname: string;
199
243
  readonly projectId: string | null;
244
+ readonly projectName?: string | null | undefined;
245
+ readonly projectLogo?: string | null | undefined;
200
246
  readonly organizationId: string | null;
247
+ readonly organizationName?: string | null | undefined;
248
+ readonly organizationLogo?: string | null | undefined;
201
249
  readonly hostnameId: string;
202
250
  readonly managed: boolean;
203
251
  readonly active: boolean;
204
252
  readonly createdAt: Date;
205
253
  readonly updatedAt: Date;
206
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
254
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
207
255
  readonly getDomainRecords: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
208
- readonly params: {
209
- readonly id: string;
210
- };
256
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
257
+ readonly id: import("effect/Schema").NonEmptyString;
258
+ }, "Type">;
211
259
  readonly responseMode?: Mode;
212
- }) => Effect.Effect<HttpApiClient.Client.Response<readonly {
213
- readonly required: boolean;
214
- readonly status: string;
215
- readonly type: string;
216
- readonly name: string;
217
- readonly value: string;
218
- }[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
260
+ }) => Effect.Effect<HttpApiClient.Client.Response<readonly import("effect/Schema").Struct.ReadonlySide<{
261
+ readonly required: import("effect/Schema").Boolean;
262
+ readonly status: import("effect/Schema").String;
263
+ readonly type: import("effect/Schema").String;
264
+ readonly name: import("effect/Schema").String;
265
+ readonly value: import("effect/Schema").String;
266
+ }, "Type">[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
219
267
  };
220
268
  organizations: {
221
269
  readonly getActiveMember: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
222
- readonly params: {
223
- readonly organizationId: string;
224
- readonly userId: string;
225
- };
270
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
271
+ readonly organizationId: import("effect/Schema").NonEmptyString;
272
+ readonly userId: import("effect/Schema").NonEmptyString;
273
+ }, "Type">;
226
274
  readonly responseMode?: Mode;
227
- }) => Effect.Effect<HttpApiClient.Client.Response<{
228
- readonly id: string;
229
- readonly organizationId: string;
230
- readonly userId: string;
231
- readonly role: string;
232
- readonly createdAt: Date;
233
- readonly user: {
234
- readonly id: string;
235
- readonly name: string;
236
- readonly email: string;
237
- readonly emailVerified: boolean;
238
- readonly image: string | null;
239
- readonly role: string | null;
240
- readonly banned: boolean | null;
241
- readonly createdAt: Date;
242
- readonly updatedAt: Date;
243
- };
244
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
275
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
276
+ readonly id: import("effect/Schema").String;
277
+ readonly organizationId: import("effect/Schema").String;
278
+ readonly userId: import("effect/Schema").String;
279
+ readonly role: import("effect/Schema").String;
280
+ readonly createdAt: import("effect/Schema").Date;
281
+ readonly user: import("effect/Schema").Struct<{
282
+ readonly id: import("effect/Schema").String;
283
+ readonly name: import("effect/Schema").String;
284
+ readonly email: import("effect/Schema").String;
285
+ readonly emailVerified: import("effect/Schema").Boolean;
286
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
287
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
288
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
289
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
290
+ readonly createdAt: import("effect/Schema").Date;
291
+ readonly updatedAt: import("effect/Schema").Date;
292
+ }>;
293
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
245
294
  readonly getOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
246
- readonly params: {
247
- readonly id: string;
248
- };
295
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
296
+ readonly id: import("effect/Schema").NonEmptyString;
297
+ }, "Type">;
249
298
  readonly responseMode?: Mode;
250
- }) => Effect.Effect<HttpApiClient.Client.Response<{
251
- readonly id: string;
252
- readonly name: string;
253
- readonly slug: string;
254
- readonly logo: string | null;
255
- readonly metadata: {
256
- readonly translations: readonly {
257
- readonly locale: "en" | "fr";
258
- readonly name: string;
259
- readonly logo?: string | null | undefined;
260
- readonly icon?: string | null | undefined;
261
- readonly contactEmail?: string | null | undefined;
262
- readonly location?: string | null | undefined;
263
- }[];
264
- } | null;
265
- readonly createdAt: Date;
266
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
299
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
300
+ readonly id: import("effect/Schema").String;
301
+ readonly name: import("effect/Schema").String;
302
+ readonly slug: import("effect/Schema").String;
303
+ readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
304
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
305
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
306
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
307
+ readonly name: import("effect/Schema").String;
308
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
309
+ readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
310
+ readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
311
+ readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
312
+ }>>;
313
+ }>>;
314
+ readonly createdAt: import("effect/Schema").Date;
315
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
267
316
  readonly listOrganizationMembers: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
268
- readonly params: {
269
- readonly organizationId: string;
270
- };
317
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
318
+ readonly organizationId: import("effect/Schema").NonEmptyString;
319
+ }, "Type">;
271
320
  readonly responseMode?: Mode;
272
- }) => Effect.Effect<HttpApiClient.Client.Response<readonly {
273
- readonly id: string;
274
- readonly organizationId: string;
275
- readonly userId: string;
276
- readonly role: string;
277
- readonly createdAt: Date;
278
- readonly user: {
279
- readonly id: string;
280
- readonly name: string;
281
- readonly email: string;
282
- readonly emailVerified: boolean;
283
- readonly image: string | null;
284
- readonly role: string | null;
285
- readonly banned: boolean | null;
286
- readonly createdAt: Date;
287
- readonly updatedAt: Date;
288
- };
289
- }[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
321
+ }) => Effect.Effect<HttpApiClient.Client.Response<readonly import("effect/Schema").Struct.ReadonlySide<{
322
+ readonly id: import("effect/Schema").String;
323
+ readonly organizationId: import("effect/Schema").String;
324
+ readonly userId: import("effect/Schema").String;
325
+ readonly role: import("effect/Schema").String;
326
+ readonly createdAt: import("effect/Schema").Date;
327
+ readonly user: import("effect/Schema").Struct<{
328
+ readonly id: import("effect/Schema").String;
329
+ readonly name: import("effect/Schema").String;
330
+ readonly email: import("effect/Schema").String;
331
+ readonly emailVerified: import("effect/Schema").Boolean;
332
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
333
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
334
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
335
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
336
+ readonly createdAt: import("effect/Schema").Date;
337
+ readonly updatedAt: import("effect/Schema").Date;
338
+ }>;
339
+ }, "Type">[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
290
340
  readonly listOrganizations: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
291
341
  readonly query: {
292
342
  readonly ids?: string | undefined;
293
343
  readonly userId?: string | undefined;
294
344
  };
295
345
  readonly responseMode?: Mode;
296
- }) => Effect.Effect<HttpApiClient.Client.Response<{
297
- readonly data: readonly {
298
- readonly id: string;
299
- readonly name: string;
300
- readonly slug: string;
301
- readonly logo: string | null;
302
- readonly metadata: {
303
- readonly translations: readonly {
304
- readonly locale: "en" | "fr";
305
- readonly name: string;
306
- readonly logo?: string | null | undefined;
307
- readonly icon?: string | null | undefined;
308
- readonly contactEmail?: string | null | undefined;
309
- readonly location?: string | null | undefined;
310
- }[];
311
- } | null;
312
- readonly createdAt: Date;
313
- }[];
314
- readonly missingIds: readonly string[];
315
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
346
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
347
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
348
+ readonly id: import("effect/Schema").String;
349
+ readonly name: import("effect/Schema").String;
350
+ readonly slug: import("effect/Schema").String;
351
+ readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
352
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
353
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
354
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
355
+ readonly name: import("effect/Schema").String;
356
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
357
+ readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
358
+ readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
359
+ readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
360
+ }>>;
361
+ }>>;
362
+ readonly createdAt: import("effect/Schema").Date;
363
+ }>>;
364
+ readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
365
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
316
366
  };
317
367
  users: {
318
368
  readonly getUser: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
319
- readonly params: {
320
- readonly id: string;
321
- };
369
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
370
+ readonly id: import("effect/Schema").NonEmptyString;
371
+ }, "Type">;
322
372
  readonly responseMode?: Mode;
323
373
  }) => Effect.Effect<HttpApiClient.Client.Response<{
324
374
  readonly id: string;
@@ -328,65 +378,75 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
328
378
  readonly image: string | null;
329
379
  readonly role: string | null;
330
380
  readonly banned: boolean | null;
381
+ readonly lastLoginMethod?: string | null | undefined;
331
382
  readonly createdAt: Date;
332
383
  readonly updatedAt: Date;
333
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
384
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
334
385
  readonly getUserActiveOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
335
- readonly params: {
336
- readonly userId: string;
337
- };
386
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
387
+ readonly userId: import("effect/Schema").NonEmptyString;
388
+ }, "Type">;
338
389
  readonly responseMode?: Mode;
339
- }) => Effect.Effect<HttpApiClient.Client.Response<{
340
- readonly id: string | null;
341
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
390
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
391
+ readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
392
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
342
393
  readonly listUsersByIds: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
343
- readonly query: {
344
- readonly ids: string;
345
- };
394
+ readonly query: import("effect/Schema").Struct.ReadonlySide<{
395
+ readonly ids: import("effect/Schema").NonEmptyString;
396
+ }, "Type">;
346
397
  readonly responseMode?: Mode;
347
- }) => Effect.Effect<HttpApiClient.Client.Response<{
348
- readonly data: readonly {
349
- readonly id: string;
350
- readonly name: string;
351
- readonly email: string;
352
- readonly emailVerified: boolean;
353
- readonly image: string | null;
354
- readonly role: string | null;
355
- readonly banned: boolean | null;
356
- readonly createdAt: Date;
357
- readonly updatedAt: Date;
358
- }[];
359
- readonly missingIds: readonly string[];
360
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
398
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
399
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
400
+ readonly id: import("effect/Schema").String;
401
+ readonly name: import("effect/Schema").String;
402
+ readonly email: import("effect/Schema").String;
403
+ readonly emailVerified: import("effect/Schema").Boolean;
404
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
405
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
406
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
407
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
408
+ readonly createdAt: import("effect/Schema").Date;
409
+ readonly updatedAt: import("effect/Schema").Date;
410
+ }>>;
411
+ readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
412
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
361
413
  };
362
414
  }> & {
363
- readonly make: (headers?: Record<string, string>) => Effect.Effect<{
415
+ readonly make: (options?: AuthServiceLayerOptions) => Effect.Effect<{
416
+ getSession: () => Effect.Effect<AuthSession | null, HttpApiError.Unauthorized, never>;
417
+ requireSession: () => Effect.Effect<AuthSession, HttpApiError.Unauthorized>;
418
+ requireUser: () => Effect.Effect<AuthSessionWithUser, HttpApiError.Unauthorized>;
419
+ requireOrganization: () => Effect.Effect<AuthSessionWithOrganization, HttpApiError.Unauthorized>;
420
+ requireUserOrganization: () => Effect.Effect<AuthSessionWithUserAndOrganization, HttpApiError.Unauthorized>;
364
421
  auth: {
365
- getSession: () => Effect.Effect<{
366
- readonly session: {
367
- readonly id: string;
368
- readonly expiresAt: Date;
369
- readonly token: string;
370
- readonly createdAt: Date;
371
- readonly updatedAt: Date;
372
- readonly ipAddress?: string | null | undefined;
373
- readonly userAgent?: string | null | undefined;
374
- readonly userId: string;
375
- readonly impersonatedBy?: string | null | undefined;
376
- readonly activeOrganizationId?: string | null | undefined;
377
- };
378
- readonly user: {
379
- readonly id: string;
380
- readonly name: string;
381
- readonly email: string;
382
- readonly emailVerified: boolean;
383
- readonly image: string | null;
384
- readonly role: string | null;
385
- readonly banned: boolean | null;
386
- readonly createdAt: Date;
387
- readonly updatedAt: Date;
388
- };
389
- } | null, unknown, never>;
422
+ readonly getSession: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: void | {
423
+ readonly responseMode?: Mode;
424
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
425
+ readonly session: import("effect/Schema").Struct<{
426
+ readonly id: import("effect/Schema").String;
427
+ readonly expiresAt: import("effect/Schema").Date;
428
+ readonly token: import("effect/Schema").String;
429
+ readonly createdAt: import("effect/Schema").Date;
430
+ readonly updatedAt: import("effect/Schema").Date;
431
+ readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
432
+ readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
433
+ readonly userId: import("effect/Schema").String;
434
+ readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
435
+ readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
436
+ }>;
437
+ readonly user: import("effect/Schema").Struct<{
438
+ readonly id: import("effect/Schema").String;
439
+ readonly name: import("effect/Schema").String;
440
+ readonly email: import("effect/Schema").String;
441
+ readonly emailVerified: import("effect/Schema").Boolean;
442
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
443
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
444
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
445
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
446
+ readonly createdAt: import("effect/Schema").Date;
447
+ readonly updatedAt: import("effect/Schema").Date;
448
+ }>;
449
+ }, "Type"> | null, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.Forbidden | HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | import("./better-auth").TooManyRequests | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
390
450
  };
391
451
  authExtra: {
392
452
  readonly createApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
@@ -399,52 +459,53 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
399
459
  } | undefined;
400
460
  };
401
461
  readonly responseMode?: Mode;
402
- }) => Effect.Effect<HttpApiClient.Client.Response<{
403
- readonly id: string;
404
- readonly key: string;
405
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
462
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
463
+ readonly id: import("effect/Schema").String;
464
+ readonly key: import("effect/Schema").String;
465
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
406
466
  readonly getProjectPublicConfig: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
407
467
  readonly query: {
408
468
  readonly projectId?: string | undefined;
409
469
  readonly clientId?: string | undefined;
410
470
  readonly host?: string | undefined;
471
+ readonly rootHost?: string | undefined;
411
472
  };
412
473
  readonly responseMode?: Mode;
413
- }) => Effect.Effect<HttpApiClient.Client.Response<{
414
- readonly projectKey: string;
415
- readonly name: string | null;
416
- readonly logoUrl: string | null;
417
- readonly authDomain: string | null;
418
- readonly rootDomain: string | null;
419
- readonly themeCss: string | null;
420
- readonly authOptions: {
421
- readonly emailPassword: boolean;
422
- readonly emailOtp: boolean;
423
- readonly google: boolean;
424
- readonly signUp: boolean;
425
- readonly signUpName: boolean;
426
- };
427
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
474
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
475
+ readonly projectKey: import("effect/Schema").String;
476
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
477
+ readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
478
+ readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
479
+ readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
480
+ readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
481
+ readonly authOptions: import("effect/Schema").Struct<{
482
+ readonly emailPassword: import("effect/Schema").Boolean;
483
+ readonly emailOtp: import("effect/Schema").Boolean;
484
+ readonly google: import("effect/Schema").Boolean;
485
+ readonly signUp: import("effect/Schema").Boolean;
486
+ readonly signUpName: import("effect/Schema").Boolean;
487
+ }>;
488
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
428
489
  readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
429
- readonly payload: {
430
- readonly newPassword: string;
431
- };
490
+ readonly payload: import("effect/Schema").Struct.ReadonlySide<{
491
+ readonly newPassword: import("effect/Schema").NonEmptyString;
492
+ }, "Type">;
432
493
  readonly responseMode?: Mode;
433
- }) => Effect.Effect<HttpApiClient.Client.Response<{
434
- readonly ok: boolean;
435
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
494
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
495
+ readonly ok: import("effect/Schema").Boolean;
496
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
436
497
  readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
437
498
  readonly payload: FormData;
438
499
  readonly responseMode?: Mode;
439
- }) => Effect.Effect<HttpApiClient.Client.Response<{
440
- readonly url: string;
441
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
500
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
501
+ readonly url: import("effect/Schema").String;
502
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.Forbidden | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
442
503
  readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
443
504
  readonly payload: FormData;
444
505
  readonly responseMode?: Mode;
445
- }) => Effect.Effect<HttpApiClient.Client.Response<{
446
- readonly url: string;
447
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
506
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
507
+ readonly url: import("effect/Schema").String;
508
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
448
509
  readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
449
510
  readonly payload: {
450
511
  readonly key: string;
@@ -454,37 +515,35 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
454
515
  } | undefined;
455
516
  };
456
517
  readonly responseMode?: Mode;
457
- }) => Effect.Effect<HttpApiClient.Client.Response<{
458
- readonly valid: boolean;
459
- readonly error: {
460
- readonly message: string;
461
- readonly code: string;
462
- } | null;
463
- readonly key: {
464
- readonly id: string;
465
- readonly configId: string;
466
- readonly name: string | null;
467
- readonly start: string | null;
468
- readonly prefix: string | null;
469
- readonly referenceId: string;
470
- readonly enabled: boolean | null;
471
- readonly expiresAt: Date | null;
472
- readonly createdAt: Date;
473
- readonly updatedAt: Date;
474
- readonly permissions: {
475
- readonly [x: string]: readonly string[];
476
- } | null;
477
- readonly metadata: unknown;
478
- } | null;
479
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
518
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
519
+ readonly valid: import("effect/Schema").Boolean;
520
+ readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
521
+ readonly message: import("effect/Schema").String;
522
+ readonly code: import("effect/Schema").String;
523
+ }>>;
524
+ readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
525
+ readonly id: import("effect/Schema").String;
526
+ readonly configId: import("effect/Schema").String;
527
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
528
+ readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
529
+ readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
530
+ readonly referenceId: import("effect/Schema").String;
531
+ readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
532
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
533
+ readonly createdAt: import("effect/Schema").Date;
534
+ readonly updatedAt: import("effect/Schema").Date;
535
+ readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
536
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
537
+ }>>;
538
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
480
539
  readonly verifyPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
481
- readonly payload: {
482
- readonly password: string;
483
- };
540
+ readonly payload: import("effect/Schema").Struct.ReadonlySide<{
541
+ readonly password: import("effect/Schema").NonEmptyString;
542
+ }, "Type">;
484
543
  readonly responseMode?: Mode;
485
- }) => Effect.Effect<HttpApiClient.Client.Response<{
486
- readonly ok: boolean;
487
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
544
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
545
+ readonly ok: import("effect/Schema").Boolean;
546
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
488
547
  };
489
548
  domains: {
490
549
  readonly createDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
@@ -501,179 +560,197 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
501
560
  readonly hostname: string;
502
561
  readonly rootHostname: string;
503
562
  readonly projectId: string | null;
563
+ readonly projectName?: string | null | undefined;
564
+ readonly projectLogo?: string | null | undefined;
504
565
  readonly organizationId: string | null;
566
+ readonly organizationName?: string | null | undefined;
567
+ readonly organizationLogo?: string | null | undefined;
505
568
  readonly hostnameId: string;
506
569
  readonly managed: boolean;
507
570
  readonly active: boolean;
508
571
  readonly createdAt: Date;
509
572
  readonly updatedAt: Date;
510
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
573
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
511
574
  readonly deleteDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
512
- readonly params: {
513
- readonly id: string;
514
- };
575
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
576
+ readonly id: import("effect/Schema").NonEmptyString;
577
+ }, "Type">;
515
578
  readonly responseMode?: Mode;
516
579
  }) => Effect.Effect<HttpApiClient.Client.Response<{
517
580
  readonly id: string;
518
581
  readonly hostname: string;
519
582
  readonly rootHostname: string;
520
583
  readonly projectId: string | null;
584
+ readonly projectName?: string | null | undefined;
585
+ readonly projectLogo?: string | null | undefined;
521
586
  readonly organizationId: string | null;
587
+ readonly organizationName?: string | null | undefined;
588
+ readonly organizationLogo?: string | null | undefined;
522
589
  readonly hostnameId: string;
523
590
  readonly managed: boolean;
524
591
  readonly active: boolean;
525
592
  readonly createdAt: Date;
526
593
  readonly updatedAt: Date;
527
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
594
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
528
595
  readonly getDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
529
- readonly params: {
530
- readonly id: string;
531
- };
596
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
597
+ readonly id: import("effect/Schema").NonEmptyString;
598
+ }, "Type">;
532
599
  readonly responseMode?: Mode;
533
600
  }) => Effect.Effect<HttpApiClient.Client.Response<{
534
601
  readonly id: string;
535
602
  readonly hostname: string;
536
603
  readonly rootHostname: string;
537
604
  readonly projectId: string | null;
605
+ readonly projectName?: string | null | undefined;
606
+ readonly projectLogo?: string | null | undefined;
538
607
  readonly organizationId: string | null;
608
+ readonly organizationName?: string | null | undefined;
609
+ readonly organizationLogo?: string | null | undefined;
539
610
  readonly hostnameId: string;
540
611
  readonly managed: boolean;
541
612
  readonly active: boolean;
542
613
  readonly createdAt: Date;
543
614
  readonly updatedAt: Date;
544
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
615
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
545
616
  readonly getDomainByHost: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
546
- readonly params: {
547
- readonly hostname: string;
548
- };
617
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
618
+ readonly hostname: import("effect/Schema").NonEmptyString;
619
+ }, "Type">;
549
620
  readonly responseMode?: Mode;
550
621
  }) => Effect.Effect<HttpApiClient.Client.Response<{
551
622
  readonly id: string;
552
623
  readonly hostname: string;
553
624
  readonly rootHostname: string;
554
625
  readonly projectId: string | null;
626
+ readonly projectName?: string | null | undefined;
627
+ readonly projectLogo?: string | null | undefined;
555
628
  readonly organizationId: string | null;
629
+ readonly organizationName?: string | null | undefined;
630
+ readonly organizationLogo?: string | null | undefined;
556
631
  readonly hostnameId: string;
557
632
  readonly managed: boolean;
558
633
  readonly active: boolean;
559
634
  readonly createdAt: Date;
560
635
  readonly updatedAt: Date;
561
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
636
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
562
637
  readonly getDomainRecords: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
563
- readonly params: {
564
- readonly id: string;
565
- };
638
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
639
+ readonly id: import("effect/Schema").NonEmptyString;
640
+ }, "Type">;
566
641
  readonly responseMode?: Mode;
567
- }) => Effect.Effect<HttpApiClient.Client.Response<readonly {
568
- readonly required: boolean;
569
- readonly status: string;
570
- readonly type: string;
571
- readonly name: string;
572
- readonly value: string;
573
- }[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
642
+ }) => Effect.Effect<HttpApiClient.Client.Response<readonly import("effect/Schema").Struct.ReadonlySide<{
643
+ readonly required: import("effect/Schema").Boolean;
644
+ readonly status: import("effect/Schema").String;
645
+ readonly type: import("effect/Schema").String;
646
+ readonly name: import("effect/Schema").String;
647
+ readonly value: import("effect/Schema").String;
648
+ }, "Type">[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
574
649
  };
575
650
  organizations: {
576
651
  readonly getActiveMember: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
577
- readonly params: {
578
- readonly organizationId: string;
579
- readonly userId: string;
580
- };
652
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
653
+ readonly organizationId: import("effect/Schema").NonEmptyString;
654
+ readonly userId: import("effect/Schema").NonEmptyString;
655
+ }, "Type">;
581
656
  readonly responseMode?: Mode;
582
- }) => Effect.Effect<HttpApiClient.Client.Response<{
583
- readonly id: string;
584
- readonly organizationId: string;
585
- readonly userId: string;
586
- readonly role: string;
587
- readonly createdAt: Date;
588
- readonly user: {
589
- readonly id: string;
590
- readonly name: string;
591
- readonly email: string;
592
- readonly emailVerified: boolean;
593
- readonly image: string | null;
594
- readonly role: string | null;
595
- readonly banned: boolean | null;
596
- readonly createdAt: Date;
597
- readonly updatedAt: Date;
598
- };
599
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
657
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
658
+ readonly id: import("effect/Schema").String;
659
+ readonly organizationId: import("effect/Schema").String;
660
+ readonly userId: import("effect/Schema").String;
661
+ readonly role: import("effect/Schema").String;
662
+ readonly createdAt: import("effect/Schema").Date;
663
+ readonly user: import("effect/Schema").Struct<{
664
+ readonly id: import("effect/Schema").String;
665
+ readonly name: import("effect/Schema").String;
666
+ readonly email: import("effect/Schema").String;
667
+ readonly emailVerified: import("effect/Schema").Boolean;
668
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
669
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
670
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
671
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
672
+ readonly createdAt: import("effect/Schema").Date;
673
+ readonly updatedAt: import("effect/Schema").Date;
674
+ }>;
675
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
600
676
  readonly getOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
601
- readonly params: {
602
- readonly id: string;
603
- };
677
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
678
+ readonly id: import("effect/Schema").NonEmptyString;
679
+ }, "Type">;
604
680
  readonly responseMode?: Mode;
605
- }) => Effect.Effect<HttpApiClient.Client.Response<{
606
- readonly id: string;
607
- readonly name: string;
608
- readonly slug: string;
609
- readonly logo: string | null;
610
- readonly metadata: {
611
- readonly translations: readonly {
612
- readonly locale: "en" | "fr";
613
- readonly name: string;
614
- readonly logo?: string | null | undefined;
615
- readonly icon?: string | null | undefined;
616
- readonly contactEmail?: string | null | undefined;
617
- readonly location?: string | null | undefined;
618
- }[];
619
- } | null;
620
- readonly createdAt: Date;
621
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
681
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
682
+ readonly id: import("effect/Schema").String;
683
+ readonly name: import("effect/Schema").String;
684
+ readonly slug: import("effect/Schema").String;
685
+ readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
686
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
687
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
688
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
689
+ readonly name: import("effect/Schema").String;
690
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
691
+ readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
692
+ readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
693
+ readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
694
+ }>>;
695
+ }>>;
696
+ readonly createdAt: import("effect/Schema").Date;
697
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
622
698
  readonly listOrganizationMembers: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
623
- readonly params: {
624
- readonly organizationId: string;
625
- };
699
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
700
+ readonly organizationId: import("effect/Schema").NonEmptyString;
701
+ }, "Type">;
626
702
  readonly responseMode?: Mode;
627
- }) => Effect.Effect<HttpApiClient.Client.Response<readonly {
628
- readonly id: string;
629
- readonly organizationId: string;
630
- readonly userId: string;
631
- readonly role: string;
632
- readonly createdAt: Date;
633
- readonly user: {
634
- readonly id: string;
635
- readonly name: string;
636
- readonly email: string;
637
- readonly emailVerified: boolean;
638
- readonly image: string | null;
639
- readonly role: string | null;
640
- readonly banned: boolean | null;
641
- readonly createdAt: Date;
642
- readonly updatedAt: Date;
643
- };
644
- }[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
703
+ }) => Effect.Effect<HttpApiClient.Client.Response<readonly import("effect/Schema").Struct.ReadonlySide<{
704
+ readonly id: import("effect/Schema").String;
705
+ readonly organizationId: import("effect/Schema").String;
706
+ readonly userId: import("effect/Schema").String;
707
+ readonly role: import("effect/Schema").String;
708
+ readonly createdAt: import("effect/Schema").Date;
709
+ readonly user: import("effect/Schema").Struct<{
710
+ readonly id: import("effect/Schema").String;
711
+ readonly name: import("effect/Schema").String;
712
+ readonly email: import("effect/Schema").String;
713
+ readonly emailVerified: import("effect/Schema").Boolean;
714
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
715
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
716
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
717
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
718
+ readonly createdAt: import("effect/Schema").Date;
719
+ readonly updatedAt: import("effect/Schema").Date;
720
+ }>;
721
+ }, "Type">[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
645
722
  readonly listOrganizations: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
646
723
  readonly query: {
647
724
  readonly ids?: string | undefined;
648
725
  readonly userId?: string | undefined;
649
726
  };
650
727
  readonly responseMode?: Mode;
651
- }) => Effect.Effect<HttpApiClient.Client.Response<{
652
- readonly data: readonly {
653
- readonly id: string;
654
- readonly name: string;
655
- readonly slug: string;
656
- readonly logo: string | null;
657
- readonly metadata: {
658
- readonly translations: readonly {
659
- readonly locale: "en" | "fr";
660
- readonly name: string;
661
- readonly logo?: string | null | undefined;
662
- readonly icon?: string | null | undefined;
663
- readonly contactEmail?: string | null | undefined;
664
- readonly location?: string | null | undefined;
665
- }[];
666
- } | null;
667
- readonly createdAt: Date;
668
- }[];
669
- readonly missingIds: readonly string[];
670
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
728
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
729
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
730
+ readonly id: import("effect/Schema").String;
731
+ readonly name: import("effect/Schema").String;
732
+ readonly slug: import("effect/Schema").String;
733
+ readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
734
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
735
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
736
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
737
+ readonly name: import("effect/Schema").String;
738
+ readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
739
+ readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
740
+ readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
741
+ readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
742
+ }>>;
743
+ }>>;
744
+ readonly createdAt: import("effect/Schema").Date;
745
+ }>>;
746
+ readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
747
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.BadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
671
748
  };
672
749
  users: {
673
750
  readonly getUser: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
674
- readonly params: {
675
- readonly id: string;
676
- };
751
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
752
+ readonly id: import("effect/Schema").NonEmptyString;
753
+ }, "Type">;
677
754
  readonly responseMode?: Mode;
678
755
  }) => Effect.Effect<HttpApiClient.Client.Response<{
679
756
  readonly id: string;
@@ -683,36 +760,38 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
683
760
  readonly image: string | null;
684
761
  readonly role: string | null;
685
762
  readonly banned: boolean | null;
763
+ readonly lastLoginMethod?: string | null | undefined;
686
764
  readonly createdAt: Date;
687
765
  readonly updatedAt: Date;
688
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
766
+ }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | HttpApiError.NotFound | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
689
767
  readonly getUserActiveOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
690
- readonly params: {
691
- readonly userId: string;
692
- };
768
+ readonly params: import("effect/Schema").Struct.ReadonlySide<{
769
+ readonly userId: import("effect/Schema").NonEmptyString;
770
+ }, "Type">;
693
771
  readonly responseMode?: Mode;
694
- }) => Effect.Effect<HttpApiClient.Client.Response<{
695
- readonly id: string | null;
696
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
772
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
773
+ readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
774
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
697
775
  readonly listUsersByIds: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
698
- readonly query: {
699
- readonly ids: string;
700
- };
776
+ readonly query: import("effect/Schema").Struct.ReadonlySide<{
777
+ readonly ids: import("effect/Schema").NonEmptyString;
778
+ }, "Type">;
701
779
  readonly responseMode?: Mode;
702
- }) => Effect.Effect<HttpApiClient.Client.Response<{
703
- readonly data: readonly {
704
- readonly id: string;
705
- readonly name: string;
706
- readonly email: string;
707
- readonly emailVerified: boolean;
708
- readonly image: string | null;
709
- readonly role: string | null;
710
- readonly banned: boolean | null;
711
- readonly createdAt: Date;
712
- readonly updatedAt: Date;
713
- }[];
714
- readonly missingIds: readonly string[];
715
- }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
780
+ }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
781
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
782
+ readonly id: import("effect/Schema").String;
783
+ readonly name: import("effect/Schema").String;
784
+ readonly email: import("effect/Schema").String;
785
+ readonly emailVerified: import("effect/Schema").Boolean;
786
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
787
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
788
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
789
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
790
+ readonly createdAt: import("effect/Schema").Date;
791
+ readonly updatedAt: import("effect/Schema").Date;
792
+ }>>;
793
+ readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
794
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
716
795
  };
717
796
  }, never, AuthClientConfig | HttpClient.HttpClient>;
718
797
  };