@krak-stack/auth 0.1.41 → 0.1.43

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 (35) hide show
  1. package/dist/admin/{api.d.ts → api.group.d.ts} +1 -0
  2. package/dist/admin/{api.js → api.group.js} +1 -0
  3. package/dist/api.d.ts +233 -241
  4. package/dist/api.js +5 -5
  5. package/dist/better-auth/{index.d.ts → api.group.d.ts} +6 -8
  6. package/dist/better-auth/{api.js → api.group.js} +2 -4
  7. package/dist/components/admin-organization-form.js +1 -1
  8. package/dist/components/auth-client-api.d.ts +16 -20
  9. package/dist/components/auth-client.d.ts +50 -4
  10. package/dist/components/auth-client.js +15 -1
  11. package/dist/components/auth-provider.d.ts +2 -1
  12. package/dist/components/auth-provider.js +8 -15
  13. package/dist/components/index.d.ts +3 -1
  14. package/dist/components/index.js +3 -1
  15. package/dist/components/organization-switcher.d.ts +2 -2
  16. package/dist/components/organization-switcher.js +17 -14
  17. package/dist/components/user-button.d.ts +2 -2
  18. package/dist/components/user-button.js +6 -3
  19. package/dist/extra/api.group.d.ts +68 -0
  20. package/dist/extra/{api.js → api.group.js} +5 -17
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +4 -4
  23. package/dist/server/{api.d.ts → api.group.d.ts} +0 -196
  24. package/dist/server/{api.js → api.group.js} +1 -6
  25. package/dist/server/index.d.ts +1 -1
  26. package/dist/server/index.js +1 -1
  27. package/dist/service.d.ts +12 -24
  28. package/package.json +11 -10
  29. package/dist/admin/index.d.ts +0 -2
  30. package/dist/admin/index.js +0 -2
  31. package/dist/better-auth/api.d.ts +0 -55
  32. package/dist/better-auth/index.js +0 -12
  33. package/dist/extra/api.d.ts +0 -139
  34. package/dist/extra/index.d.ts +0 -76
  35. package/dist/extra/index.js +0 -14
@@ -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
@@ -4,8 +4,8 @@ export { AuthClientApi, AuthServiceApi } from "./api";
4
4
  export { AuthService, type AuthServiceLayerOptions } from "./service";
5
5
  export { AuthClientConfig } from "./config";
6
6
  export { proxyAuthRequest } from "./server/proxy";
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";
7
+ export { OrganizationSwitcher, KrakstackAuthProvider, ResetPassword, Signin, Signup, TwoFactor, AdminOrganizationForm, AdminOrganizationsTable, AdminUsersTable, UserButton, assetUrl, createAuthUiClient, type AuthUiClient, type KrakstackAuthContextValue, type KrakstackAuthLocale, type KrakstackAuthProviderProps, type OrganizationSwitcherDialog, type UserButtonDialog, useAuthClient, useAdminUsersTotal, } from "./components";
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
@@ -4,8 +4,8 @@ export { AuthClientApi, AuthServiceApi } from "./api";
4
4
  export { AuthService } from "./service";
5
5
  export { AuthClientConfig } from "./config";
6
6
  export { proxyAuthRequest } from "./server/proxy";
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";
7
+ export { OrganizationSwitcher, KrakstackAuthProvider, ResetPassword, Signin, Signup, TwoFactor, AdminOrganizationForm, AdminOrganizationsTable, AdminUsersTable, UserButton, assetUrl, createAuthUiClient, useAuthClient, useAdminUsersTotal, } from "./components";
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krak-stack/auth",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "description": "Effect HttpApi clients and schemas for KrakStack Auth.",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -36,20 +36,20 @@
36
36
  },
37
37
  "./tailwind.css": "./tailwind.css",
38
38
  "./better-auth": {
39
- "types": "./dist/better-auth/index.d.ts",
40
- "default": "./dist/better-auth/index.js"
39
+ "types": "./dist/better-auth/api.group.d.ts",
40
+ "default": "./dist/better-auth/api.group.js"
41
41
  },
42
42
  "./extra": {
43
- "types": "./dist/extra/index.d.ts",
44
- "default": "./dist/extra/index.js"
43
+ "types": "./dist/extra/api.group.d.ts",
44
+ "default": "./dist/extra/api.group.js"
45
45
  },
46
46
  "./server": {
47
47
  "types": "./dist/server/index.d.ts",
48
48
  "default": "./dist/server/index.js"
49
49
  },
50
50
  "./admin": {
51
- "types": "./dist/admin/index.d.ts",
52
- "default": "./dist/admin/index.js"
51
+ "types": "./dist/admin/api.group.d.ts",
52
+ "default": "./dist/admin/api.group.js"
53
53
  }
54
54
  },
55
55
  "publishConfig": {
@@ -62,7 +62,9 @@
62
62
  "prepack": "bun run build",
63
63
  "type:check": "tsc -p tsconfig.json --noEmit"
64
64
  },
65
- "dependencies": {},
65
+ "dependencies": {
66
+ "react-qr-code": "^2.2.0"
67
+ },
66
68
  "peerDependencies": {
67
69
  "@better-auth/api-key": "^1.6.14",
68
70
  "@tanstack/react-router": "^1.170.15",
@@ -71,7 +73,6 @@
71
73
  "effect": "^4.0.0-beta.78",
72
74
  "input-otp": "^1.4.2",
73
75
  "lucide-react": "^1.17.0",
74
- "react": "^19.2.7",
75
- "react-qr-code": "^2.1.1"
76
+ "react": "^19.2.7"
76
77
  }
77
78
  }
@@ -1,2 +0,0 @@
1
- export { AdminApiGroup } from "./api";
2
- export * from "./schema";
@@ -1,2 +0,0 @@
1
- export { AdminApiGroup } from "./api";
2
- export * from "./schema";