@krak-stack/auth 0.1.41 → 0.1.42

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.
@@ -270,11 +270,11 @@ const isOrganizationSlugConflict = (error) => {
270
270
  };
271
271
  const nullableString = (value) => typeof value === "string" && value.trim() ? value.trim() : null;
272
272
  const decodeUploadedAsset = Schema.decodeUnknownPromise(ExtraUploadedAsset);
273
- const uploadOrganizationLogoAsset = async (file, m, uploadOrganizationLogo) => {
273
+ const uploadImageAsset = async (file, m, uploadImage) => {
274
274
  const payload = new FormData();
275
275
  payload.append("file", file);
276
276
  try {
277
- const uploaded = await decodeUploadedAsset(await uploadOrganizationLogo({ payload }));
277
+ const uploaded = await decodeUploadedAsset(await uploadImage({ payload }));
278
278
  return assetPath(uploaded.url);
279
279
  }
280
280
  catch {
@@ -328,9 +328,9 @@ const organizationFormDefaults = (organization, baseUrl) => {
328
328
  frLocation: fr?.location ?? "",
329
329
  };
330
330
  };
331
- const organizationLogoFromForm = async (value, m, uploadOrganizationLogo) => {
331
+ const organizationLogoFromForm = async (value, m, uploadImage) => {
332
332
  if (value instanceof File)
333
- return await uploadOrganizationLogoAsset(value, m, uploadOrganizationLogo);
333
+ return await uploadImageAsset(value, m, uploadImage);
334
334
  if (typeof value === "string")
335
335
  return assetPath(value);
336
336
  return null;
@@ -348,14 +348,14 @@ const organizationRoleLabel = (role, m) => {
348
348
  }
349
349
  };
350
350
  const formatOrganizationDate = (date) => new Intl.DateTimeFormat(getLocale(), { dateStyle: "medium" }).format(new Date(date));
351
- const organizationMetadataFromForm = async (value, m, uploadOrganizationLogo) => {
351
+ const organizationMetadataFromForm = async (value, m, uploadImage) => {
352
352
  const translations = [];
353
353
  const enName = value.enName.trim() || value.name.trim();
354
354
  const frName = value.frName.trim();
355
- const enLogo = await organizationLogoFromForm(value.enLogo, m, uploadOrganizationLogo);
356
- const enIcon = await organizationLogoFromForm(value.enIcon, m, uploadOrganizationLogo);
357
- const frLogo = await organizationLogoFromForm(value.frLogo, m, uploadOrganizationLogo);
358
- const frIcon = await organizationLogoFromForm(value.frIcon, m, uploadOrganizationLogo);
355
+ const enLogo = await organizationLogoFromForm(value.enLogo, m, uploadImage);
356
+ const enIcon = await organizationLogoFromForm(value.enIcon, m, uploadImage);
357
+ const frLogo = await organizationLogoFromForm(value.frLogo, m, uploadImage);
358
+ const frIcon = await organizationLogoFromForm(value.frIcon, m, uploadImage);
359
359
  if (enName) {
360
360
  translations.push({
361
361
  locale: "en",
@@ -562,7 +562,7 @@ const userInvitationRowActions = ({ m, actingInvitationId, onAccept, onReject, }
562
562
  ];
563
563
  function EditOrganizationSection({ authClient, baseUrl, organization, onUpdated, }) {
564
564
  const m = useOrganizationMessages();
565
- const uploadOrganizationLogo = useAtomSet(authClientApi(baseUrl).mutation("authExtra", "uploadOrganizationLogo"), { mode: "promise" });
565
+ const uploadImage = useAtomSet(authClientApi(baseUrl).mutation("authExtra", "uploadUserImage"), { mode: "promise" });
566
566
  const [editingLocale, setEditingLocale] = useState(currentOrganizationLocale());
567
567
  const defaultValues = organizationFormDefaults(organization, baseUrl);
568
568
  const form = useAppForm({
@@ -572,7 +572,7 @@ function EditOrganizationSection({ authClient, baseUrl, organization, onUpdated,
572
572
  try {
573
573
  const name = value.name.trim();
574
574
  const slug = value.slug.trim().toLowerCase();
575
- const metadata = await organizationMetadataFromForm(value, m, uploadOrganizationLogo);
575
+ const metadata = await organizationMetadataFromForm(value, m, uploadImage);
576
576
  const result = await authClient.organization.update({
577
577
  organizationId: organization.id,
578
578
  data: { name, slug, metadata },
@@ -638,7 +638,7 @@ function CreateOrganizationSlugAutoFill({ form, }) {
638
638
  }
639
639
  function CreateOrganizationSection({ authClient, baseUrl, onCreated, }) {
640
640
  const m = useOrganizationMessages();
641
- const uploadOrganizationLogo = useAtomSet(authClientApi(baseUrl).mutation("authExtra", "uploadOrganizationLogo"), { mode: "promise" });
641
+ const uploadImage = useAtomSet(authClientApi(baseUrl).mutation("authExtra", "uploadUserImage"), { mode: "promise" });
642
642
  const [editingLocale, setEditingLocale] = useState(currentOrganizationLocale());
643
643
  const defaultValues = organizationFormDefaults(undefined, baseUrl);
644
644
  const form = useAppForm({
@@ -652,7 +652,7 @@ function CreateOrganizationSection({ authClient, baseUrl, onCreated, }) {
652
652
  ...value,
653
653
  name,
654
654
  slug,
655
- }, m, uploadOrganizationLogo);
655
+ }, m, uploadImage);
656
656
  const result = await authClient.organization.create({
657
657
  name,
658
658
  slug,
@@ -0,0 +1,68 @@
1
+ import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/unstable/httpapi";
2
+ import { ExtraBadRequest } from "./schema";
3
+ export * from "./schema";
4
+ export type { Organization, OrganizationMetadata } from "../schema";
5
+ export declare const ExtraApiGroup: HttpApiGroup.HttpApiGroup<"authExtra", HttpApiEndpoint.HttpApiEndpoint<"createApiKey", "POST", "/auth/create-api-key", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
6
+ readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
7
+ readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
8
+ readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
9
+ readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
10
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
11
+ readonly id: import("effect/Schema").String;
12
+ readonly key: import("effect/Schema").String;
13
+ }>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getProjectPublicConfig", "GET", "/auth/project-config", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
14
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
15
+ readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
16
+ readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
17
+ readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
18
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
19
+ readonly projectKey: import("effect/Schema").String;
20
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
21
+ readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
22
+ readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
23
+ readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
24
+ readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
25
+ readonly authOptions: import("effect/Schema").Struct<{
26
+ readonly emailPassword: import("effect/Schema").Boolean;
27
+ readonly emailOtp: import("effect/Schema").Boolean;
28
+ readonly google: import("effect/Schema").Boolean;
29
+ readonly signUp: import("effect/Schema").Boolean;
30
+ readonly signUpName: import("effect/Schema").Boolean;
31
+ }>;
32
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setPassword", "POST", "/auth/set-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
33
+ readonly newPassword: import("effect/Schema").NonEmptyString;
34
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
35
+ readonly ok: import("effect/Schema").Boolean;
36
+ }>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"uploadUserImage", "POST", "/auth/image/upload", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
37
+ readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
38
+ }>>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
39
+ readonly url: import("effect/Schema").String;
40
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError | typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"verifyApiKey", "POST", "/auth/verify-api-key", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
41
+ readonly key: import("effect/Schema").NonEmptyString;
42
+ 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">]>>;
43
+ readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
44
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
45
+ readonly valid: import("effect/Schema").Boolean;
46
+ readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
47
+ readonly message: import("effect/Schema").String;
48
+ readonly code: import("effect/Schema").String;
49
+ }>>;
50
+ readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
51
+ readonly id: import("effect/Schema").String;
52
+ readonly configId: import("effect/Schema").String;
53
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
54
+ readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
55
+ readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
56
+ readonly referenceId: import("effect/Schema").String;
57
+ readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
58
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
59
+ readonly createdAt: import("effect/Schema").Date;
60
+ readonly updatedAt: import("effect/Schema").Date;
61
+ readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
62
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
63
+ }>>;
64
+ }>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"verifyPassword", "POST", "/auth/verify-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
65
+ readonly password: import("effect/Schema").NonEmptyString;
66
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
67
+ readonly ok: import("effect/Schema").Boolean;
68
+ }>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never>, false>;
@@ -1,6 +1,7 @@
1
- import { HttpApi, OpenApi } from "effect/unstable/httpapi";
1
+ import { OpenApi } from "effect/unstable/httpapi";
2
2
  import { HttpApiEndpoint, HttpApiError, HttpApiGroup, } from "effect/unstable/httpapi";
3
3
  import { ExtraBadRequest, ExtraCreateApiKeyPayload, ExtraCreateApiKeyResponse, ExtraImageUploadMultipartPayload, ExtraOkResponse, ExtraProjectPublicConfig, ExtraProjectPublicConfigQuery, ExtraSetPasswordPayload, ExtraUploadedAsset, ExtraVerifyApiKeyPayload, ExtraVerifyApiKeyResponse, ExtraVerifyPasswordPayload, } from "./schema";
4
+ export * from "./schema";
4
5
  export const ExtraApiGroup = HttpApiGroup.make("authExtra")
5
6
  .add(HttpApiEndpoint.get("getProjectPublicConfig", "/auth/project-config", {
6
7
  query: ExtraProjectPublicConfigQuery,
@@ -56,24 +57,11 @@ export const ExtraApiGroup = HttpApiGroup.make("authExtra")
56
57
  HttpApiError.InternalServerError,
57
58
  ],
58
59
  }).annotateMerge(OpenApi.annotations({
59
- title: "Upload user image",
60
- summary: "Upload a user profile image",
61
- description: "Accepts a multipart image upload and stores it as the current user's profile image asset.",
60
+ title: "Upload image",
61
+ summary: "Upload an authenticated image asset",
62
+ description: "Accepts a multipart image upload and stores it as an authenticated image asset for profiles, organizations, and branding.",
62
63
  })))
63
- .add(HttpApiEndpoint.post("uploadOrganizationLogo", "/organizations/logo/upload", {
64
- payload: ExtraImageUploadMultipartPayload,
65
- success: ExtraUploadedAsset,
66
- error: [
67
- HttpApiError.BadRequest,
68
- HttpApiError.Unauthorized,
69
- HttpApiError.Forbidden,
70
- HttpApiError.InternalServerError,
71
- ],
72
- }))
73
64
  .annotateMerge(OpenApi.annotations({
74
65
  title: "Extra",
75
66
  description: "KrakStack-specific endpoints layered on top of Better Auth.",
76
67
  }));
77
- export const ExtraApi = HttpApi.make("ExtraApi")
78
- .add(ExtraApiGroup)
79
- .prefix("/api");
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { AuthService, type AuthServiceLayerOptions } from "./service";
5
5
  export { AuthClientConfig } from "./config";
6
6
  export { proxyAuthRequest } from "./server/proxy";
7
7
  export { OrganizationSwitcher, KrakstackAuthProvider, ResetPassword, Signin, Signup, TwoFactor, AdminOrganizationForm, AdminOrganizationsTable, AdminUsersTable, UserButton, type AuthUiClient, type KrakstackAuthContextValue, type KrakstackAuthLocale, type KrakstackAuthProviderProps, type OrganizationSwitcherDialog, type UserButtonDialog, useAdminUsersTotal, } from "./components";
8
- export * as BetterAuth from "./better-auth";
9
- export * as Extra from "./extra";
8
+ export * as BetterAuth from "./better-auth/api.group";
9
+ export * as Extra from "./extra/api.group";
10
10
  export * as Server from "./server";
11
- export * as Admin from "./admin";
11
+ export * as Admin from "./admin/api.group";
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ export { AuthService } from "./service";
5
5
  export { AuthClientConfig } from "./config";
6
6
  export { proxyAuthRequest } from "./server/proxy";
7
7
  export { OrganizationSwitcher, KrakstackAuthProvider, ResetPassword, Signin, Signup, TwoFactor, AdminOrganizationForm, AdminOrganizationsTable, AdminUsersTable, UserButton, useAdminUsersTotal, } from "./components";
8
- export * as BetterAuth from "./better-auth";
9
- export * as Extra from "./extra";
8
+ export * as BetterAuth from "./better-auth/api.group";
9
+ export * as Extra from "./extra/api.group";
10
10
  export * as Server from "./server";
11
- export * as Admin from "./admin";
11
+ export * as Admin from "./admin/api.group";
@@ -1,4 +1,3 @@
1
- import { HttpApi } from "effect/unstable/httpapi";
2
1
  import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/unstable/httpapi";
3
2
  export declare const ServerUsersApiGroup: HttpApiGroup.HttpApiGroup<"users", HttpApiEndpoint.HttpApiEndpoint<"getUser", "GET", "/users/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
4
3
  readonly id: import("effect/Schema").NonEmptyString;
@@ -197,198 +196,3 @@ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains",
197
196
  readonly name: import("effect/Schema").String;
198
197
  readonly value: import("effect/Schema").String;
199
198
  }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>;
200
- export declare const ServerApi: HttpApi.HttpApi<"ServerApi", HttpApiGroup.HttpApiGroup<"domains", HttpApiEndpoint.HttpApiEndpoint<"createDomain", "POST", "/api/domains", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
201
- readonly hostname: import("effect/Schema").NonEmptyString;
202
- readonly rootHostname: import("effect/Schema").NonEmptyString;
203
- readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
204
- readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
205
- readonly managed: import("effect/Schema").Boolean;
206
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
207
- readonly id: import("effect/Schema").String;
208
- readonly hostname: import("effect/Schema").String;
209
- readonly rootHostname: import("effect/Schema").String;
210
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
211
- readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
212
- readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
213
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
214
- readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
215
- readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
216
- readonly hostnameId: import("effect/Schema").String;
217
- readonly managed: import("effect/Schema").Boolean;
218
- readonly active: import("effect/Schema").Boolean;
219
- readonly createdAt: import("effect/Schema").Date;
220
- readonly updatedAt: import("effect/Schema").Date;
221
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteDomain", "DELETE", "/api/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
222
- readonly id: import("effect/Schema").NonEmptyString;
223
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
224
- readonly id: import("effect/Schema").String;
225
- readonly hostname: import("effect/Schema").String;
226
- readonly rootHostname: import("effect/Schema").String;
227
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
228
- readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
229
- readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
230
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
231
- readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
232
- readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
233
- readonly hostnameId: import("effect/Schema").String;
234
- readonly managed: import("effect/Schema").Boolean;
235
- readonly active: import("effect/Schema").Boolean;
236
- readonly createdAt: import("effect/Schema").Date;
237
- readonly updatedAt: import("effect/Schema").Date;
238
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomain", "GET", "/api/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
239
- readonly id: import("effect/Schema").NonEmptyString;
240
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
241
- readonly id: import("effect/Schema").String;
242
- readonly hostname: import("effect/Schema").String;
243
- readonly rootHostname: import("effect/Schema").String;
244
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
245
- readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
246
- readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
247
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
248
- readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
249
- readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
250
- readonly hostnameId: import("effect/Schema").String;
251
- readonly managed: import("effect/Schema").Boolean;
252
- readonly active: import("effect/Schema").Boolean;
253
- readonly createdAt: import("effect/Schema").Date;
254
- readonly updatedAt: import("effect/Schema").Date;
255
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainByHost", "GET", "/api/domains/by-host/:hostname", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
256
- readonly hostname: import("effect/Schema").NonEmptyString;
257
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
258
- readonly id: import("effect/Schema").String;
259
- readonly hostname: import("effect/Schema").String;
260
- readonly rootHostname: import("effect/Schema").String;
261
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
262
- readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
263
- readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
264
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
265
- readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
266
- readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
267
- readonly hostnameId: import("effect/Schema").String;
268
- readonly managed: import("effect/Schema").Boolean;
269
- readonly active: import("effect/Schema").Boolean;
270
- readonly createdAt: import("effect/Schema").Date;
271
- readonly updatedAt: import("effect/Schema").Date;
272
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainRecords", "GET", "/api/domains/:id/records", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
273
- readonly id: import("effect/Schema").NonEmptyString;
274
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
275
- readonly required: import("effect/Schema").Boolean;
276
- readonly status: import("effect/Schema").String;
277
- readonly type: import("effect/Schema").String;
278
- readonly name: import("effect/Schema").String;
279
- readonly value: import("effect/Schema").String;
280
- }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"organizations", HttpApiEndpoint.HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
281
- readonly organizationId: import("effect/Schema").NonEmptyString;
282
- readonly userId: import("effect/Schema").NonEmptyString;
283
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
284
- readonly id: import("effect/Schema").String;
285
- readonly organizationId: import("effect/Schema").String;
286
- readonly userId: import("effect/Schema").String;
287
- readonly role: import("effect/Schema").String;
288
- readonly createdAt: import("effect/Schema").Date;
289
- readonly user: import("effect/Schema").Struct<{
290
- readonly id: import("effect/Schema").String;
291
- readonly name: import("effect/Schema").String;
292
- readonly email: import("effect/Schema").String;
293
- readonly emailVerified: import("effect/Schema").Boolean;
294
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
295
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
296
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
297
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
298
- readonly createdAt: import("effect/Schema").Date;
299
- readonly updatedAt: import("effect/Schema").Date;
300
- }>;
301
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getOrganization", "GET", "/api/organizations/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
302
- readonly id: import("effect/Schema").NonEmptyString;
303
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
304
- readonly id: import("effect/Schema").String;
305
- readonly name: import("effect/Schema").String;
306
- readonly slug: import("effect/Schema").String;
307
- readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
308
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
309
- readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
310
- readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
311
- readonly name: import("effect/Schema").String;
312
- readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
313
- readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
314
- readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
315
- readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
316
- }>>;
317
- }>>;
318
- readonly createdAt: import("effect/Schema").Date;
319
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrganizationMembers", "GET", "/api/organizations/:organizationId/members", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
320
- readonly organizationId: import("effect/Schema").NonEmptyString;
321
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
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
- }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrganizations", "GET", "/api/organizations", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
340
- readonly ids: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
341
- readonly userId: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
342
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
343
- readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
344
- readonly id: import("effect/Schema").String;
345
- readonly name: import("effect/Schema").String;
346
- readonly slug: import("effect/Schema").String;
347
- readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
348
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
349
- readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
350
- readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
351
- readonly name: import("effect/Schema").String;
352
- readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
353
- readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
354
- readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
355
- readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
356
- }>>;
357
- }>>;
358
- readonly createdAt: import("effect/Schema").Date;
359
- }>>;
360
- readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
361
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"users", HttpApiEndpoint.HttpApiEndpoint<"getUser", "GET", "/api/users/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
362
- readonly id: import("effect/Schema").NonEmptyString;
363
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
364
- readonly id: import("effect/Schema").String;
365
- readonly name: import("effect/Schema").String;
366
- readonly email: import("effect/Schema").String;
367
- readonly emailVerified: import("effect/Schema").Boolean;
368
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
369
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
370
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
371
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
372
- readonly createdAt: import("effect/Schema").Date;
373
- readonly updatedAt: import("effect/Schema").Date;
374
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getUserActiveOrganization", "GET", "/api/organizations/user/:userId/active", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
375
- readonly userId: import("effect/Schema").NonEmptyString;
376
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
377
- readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
378
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
379
- readonly ids: import("effect/Schema").NonEmptyString;
380
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
381
- readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
382
- readonly id: import("effect/Schema").String;
383
- readonly name: import("effect/Schema").String;
384
- readonly email: import("effect/Schema").String;
385
- readonly emailVerified: import("effect/Schema").Boolean;
386
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
387
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
388
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
389
- readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
390
- readonly createdAt: import("effect/Schema").Date;
391
- readonly updatedAt: import("effect/Schema").Date;
392
- }>>;
393
- readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
394
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false>>;
@@ -1,4 +1,4 @@
1
- import { HttpApi, OpenApi } from "effect/unstable/httpapi";
1
+ import { OpenApi } from "effect/unstable/httpapi";
2
2
  import { HttpApiEndpoint, HttpApiError, HttpApiGroup, } from "effect/unstable/httpapi";
3
3
  import { Member, Organization, User } from "../schema";
4
4
  import { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerIdParams, ServerIdsQuery, ServerMemberParams, ServerMembersResponse, ServerOrganizationIdParams, ServerOrganizationsQuery, ServerOrganizationsResponse, ServerUserIdParams, ServerUsersResponse, } from "./schema";
@@ -145,8 +145,3 @@ export const ServerDomainsApiGroup = HttpApiGroup.make("domains")
145
145
  title: "Domains (Server)",
146
146
  description: "Server-to-server auth hostname endpoints.",
147
147
  }));
148
- export const ServerApi = HttpApi.make("ServerApi")
149
- .add(ServerUsersApiGroup)
150
- .add(ServerOrganizationsApiGroup)
151
- .add(ServerDomainsApiGroup)
152
- .prefix("/api");
@@ -1,7 +1,7 @@
1
1
  export { AuthService } from "../service";
2
2
  export type { AuthSession, AuthSessionWithOrganization, AuthSessionWithUser, AuthSessionWithUserAndOrganization, } from "../service";
3
3
  export { AuthClientConfig } from "../config";
4
- export { ServerApi, ServerDomainsApiGroup, ServerOrganizationsApiGroup, ServerUsersApiGroup, } from "./api";
4
+ export { ServerDomainsApiGroup, ServerOrganizationsApiGroup, ServerUsersApiGroup, } from "./api.group";
5
5
  export { proxyAuthRequest } from "./proxy";
6
6
  export { ApiKeySecurity, AuthMiddleware, makeAuthenticationLive, } from "./middleware";
7
7
  export type { AuthenticationLiveOptions } from "./middleware";
@@ -1,6 +1,6 @@
1
1
  export { AuthService } from "../service";
2
2
  export { AuthClientConfig } from "../config";
3
- export { ServerApi, ServerDomainsApiGroup, ServerOrganizationsApiGroup, ServerUsersApiGroup, } from "./api";
3
+ export { ServerDomainsApiGroup, ServerOrganizationsApiGroup, ServerUsersApiGroup, } from "./api.group";
4
4
  export { proxyAuthRequest } from "./proxy";
5
5
  export { ApiKeySecurity, AuthMiddleware, makeAuthenticationLive, } from "./middleware";
6
6
  export { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerMembersResponse, ServerOrganizationsResponse, ServerUpdateDomainPayload, ServerUsersResponse, } from "./schema";
package/dist/service.d.ts CHANGED
@@ -64,7 +64,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
64
64
  readonly createdAt: import("effect/Schema").Date;
65
65
  readonly updatedAt: import("effect/Schema").Date;
66
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>;
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/schema").TooManyRequests | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
68
68
  };
69
69
  authExtra: {
70
70
  readonly createApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
@@ -80,7 +80,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
80
80
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
81
81
  readonly id: import("effect/Schema").String;
82
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>;
83
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
84
84
  readonly getProjectPublicConfig: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
85
85
  readonly query: {
86
86
  readonly projectId?: string | undefined;
@@ -111,19 +111,13 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
111
111
  readonly responseMode?: Mode;
112
112
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
113
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>;
115
- readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
116
- readonly payload: FormData;
117
- readonly responseMode?: Mode;
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>;
114
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
121
115
  readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
122
116
  readonly payload: FormData;
123
117
  readonly responseMode?: Mode;
124
118
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
125
119
  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>;
120
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
127
121
  readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
128
122
  readonly payload: {
129
123
  readonly key: string;
@@ -153,7 +147,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
153
147
  readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
154
148
  readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
155
149
  }>>;
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>;
150
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
157
151
  readonly verifyPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
158
152
  readonly payload: import("effect/Schema").Struct.ReadonlySide<{
159
153
  readonly password: import("effect/Schema").NonEmptyString;
@@ -161,7 +155,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
161
155
  readonly responseMode?: Mode;
162
156
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
163
157
  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>;
158
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
165
159
  };
166
160
  domains: {
167
161
  readonly createDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
@@ -446,7 +440,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
446
440
  readonly createdAt: import("effect/Schema").Date;
447
441
  readonly updatedAt: import("effect/Schema").Date;
448
442
  }>;
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>;
443
+ }, "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/schema").TooManyRequests | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
450
444
  };
451
445
  authExtra: {
452
446
  readonly createApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
@@ -462,7 +456,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
462
456
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
463
457
  readonly id: import("effect/Schema").String;
464
458
  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>;
459
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
466
460
  readonly getProjectPublicConfig: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
467
461
  readonly query: {
468
462
  readonly projectId?: string | undefined;
@@ -493,19 +487,13 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
493
487
  readonly responseMode?: Mode;
494
488
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
495
489
  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>;
497
- readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
498
- readonly payload: FormData;
499
- readonly responseMode?: Mode;
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>;
490
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
503
491
  readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
504
492
  readonly payload: FormData;
505
493
  readonly responseMode?: Mode;
506
494
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
507
495
  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>;
496
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | HttpApiError.InternalServerError | import("effect/Schema").SchemaError | HttpApiError.Unauthorized), [Mode] extends ["response-only"] ? never : never>;
509
497
  readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
510
498
  readonly payload: {
511
499
  readonly key: string;
@@ -535,7 +523,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
535
523
  readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
536
524
  readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
537
525
  }>>;
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>;
526
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
539
527
  readonly verifyPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
540
528
  readonly payload: import("effect/Schema").Struct.ReadonlySide<{
541
529
  readonly password: import("effect/Schema").NonEmptyString;
@@ -543,7 +531,7 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
543
531
  readonly responseMode?: Mode;
544
532
  }) => Effect.Effect<HttpApiClient.Client.Response<import("effect/Schema").Struct.ReadonlySide<{
545
533
  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>;
534
+ }, "Type">, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra/schema").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
547
535
  };
548
536
  domains: {
549
537
  readonly createDomain: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {