@krak-stack/auth 0.1.28 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,12 @@
1
1
  import { Schema } from "effect";
2
- export declare const ExtraPresignUploadPayload: Schema.Struct<{
3
- readonly fileName: Schema.NonEmptyString;
4
- readonly contentType: Schema.NonEmptyString;
2
+ import { Multipart } from "effect/unstable/http";
3
+ import { HttpApiSchema } from "effect/unstable/httpapi";
4
+ export declare const ExtraImageUploadPayload: Schema.Struct<{
5
+ readonly file: Schema.decodeTo<Multipart.PersistedFileSchema, Schema.$Array<Multipart.PersistedFileSchema>, never, never>;
5
6
  }>;
7
+ export declare const ExtraImageUploadMultipartPayload: HttpApiSchema.asMultipartStream<Schema.Struct<{
8
+ readonly file: Schema.decodeTo<Multipart.PersistedFileSchema, Schema.$Array<Multipart.PersistedFileSchema>, never, never>;
9
+ }>>;
6
10
  export declare const ExtraSetPasswordPayload: Schema.Struct<{
7
11
  readonly newPassword: Schema.NonEmptyString;
8
12
  }>;
@@ -68,8 +72,7 @@ export declare const ExtraVerifyApiKeyResponse: Schema.Struct<{
68
72
  export declare const ExtraOkResponse: Schema.Struct<{
69
73
  readonly ok: Schema.Boolean;
70
74
  }>;
71
- export declare const ExtraPresignedUpload: Schema.Struct<{
72
- readonly uploadUrl: Schema.String;
75
+ export declare const ExtraUploadedAsset: Schema.Struct<{
73
76
  readonly url: Schema.String;
74
77
  }>;
75
78
  declare const ExtraBadRequest_base: Schema.Class<ExtraBadRequest, Schema.Struct<{
@@ -78,8 +81,8 @@ declare const ExtraBadRequest_base: Schema.Class<ExtraBadRequest, Schema.Struct<
78
81
  }>, import("effect/Cause").YieldableError>;
79
82
  export declare class ExtraBadRequest extends ExtraBadRequest_base {
80
83
  }
81
- export type ExtraPresignUploadPayload = typeof ExtraPresignUploadPayload.Type;
82
- export type ExtraPresignedUpload = typeof ExtraPresignedUpload.Type;
84
+ export type ExtraImageUploadPayload = typeof ExtraImageUploadPayload.Type;
85
+ export type ExtraUploadedAsset = typeof ExtraUploadedAsset.Type;
83
86
  export type ExtraSetPasswordPayload = typeof ExtraSetPasswordPayload.Type;
84
87
  export type ExtraVerifyPasswordPayload = typeof ExtraVerifyPasswordPayload.Type;
85
88
  export type ExtraCreateApiKeyPayload = typeof ExtraCreateApiKeyPayload.Type;
@@ -1,13 +1,14 @@
1
1
  import { Schema } from "effect";
2
- export const ExtraPresignUploadPayload = Schema.Struct({
3
- fileName: Schema.NonEmptyString,
4
- contentType: Schema.NonEmptyString,
2
+ import { Multipart } from "effect/unstable/http";
3
+ import { HttpApiSchema } from "effect/unstable/httpapi";
4
+ export const ExtraImageUploadPayload = Schema.Struct({
5
+ file: Multipart.SingleFileSchema,
5
6
  }).annotate({
6
- identifier: "ExtraPresignUploadPayload",
7
- title: "Extra presign upload payload",
8
- description: "Payload used to request a presigned organization logo upload URL.",
9
- examples: [{ fileName: "logo.png", contentType: "image/png" }],
7
+ identifier: "ExtraImageUploadPayload",
8
+ title: "Extra image upload payload",
9
+ description: "Multipart form data payload containing a single image file for user or organization assets.",
10
10
  });
11
+ export const ExtraImageUploadMultipartPayload = ExtraImageUploadPayload.pipe(HttpApiSchema.asMultipartStream());
11
12
  export const ExtraSetPasswordPayload = Schema.Struct({
12
13
  newPassword: Schema.NonEmptyString,
13
14
  }).annotate({
@@ -142,13 +143,12 @@ export const ExtraOkResponse = Schema.Struct({
142
143
  description: "Successful response for custom auth actions.",
143
144
  examples: [{ ok: true }],
144
145
  });
145
- export const ExtraPresignedUpload = Schema.Struct({
146
- uploadUrl: Schema.String,
146
+ export const ExtraUploadedAsset = Schema.Struct({
147
147
  url: Schema.String,
148
148
  }).annotate({
149
- identifier: "ExtraPresignedUpload",
150
- title: "Extra presigned upload",
151
- description: "Presigned upload URL and stable public asset URL.",
149
+ identifier: "ExtraUploadedAsset",
150
+ title: "Extra uploaded asset",
151
+ description: "Stable public asset URL returned after an image upload.",
152
152
  });
153
153
  export class ExtraBadRequest extends Schema.ErrorClass("ExtraBadRequest")({
154
154
  _tag: Schema.tag("ExtraBadRequest"),
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export * from "./schema";
2
2
  export { AuthApi } from "./api";
3
3
  export { AuthService, type AuthServiceLayerOptions } from "./service";
4
4
  export { AuthClientConfig } from "./config";
5
- export { OrganizationSwitcher, UserButton, type AuthUiClient, type OrganizationSwitcherDialog, type UserButtonDialog, } from "./components";
5
+ export { OrganizationSwitcher, ResetPassword, Signin, Signup, TwoFactor, UserButton, type AuthUiClient, type OrganizationSwitcherDialog, type UserButtonDialog, } from "./components";
6
6
  export * as BetterAuth from "./better-auth";
7
7
  export * as Extra from "./extra";
8
8
  export * as Server from "./server";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ export * from "./schema";
2
2
  export { AuthApi } from "./api";
3
3
  export { AuthService } from "./service";
4
4
  export { AuthClientConfig } from "./config";
5
- export { OrganizationSwitcher, UserButton, } from "./components";
5
+ export { OrganizationSwitcher, ResetPassword, Signin, Signup, TwoFactor, UserButton, } from "./components";
6
6
  export * as BetterAuth from "./better-auth";
7
7
  export * as Extra from "./extra";
8
8
  export * as Server from "./server";
@@ -177,38 +177,71 @@ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains",
177
177
  readonly name: import("effect/Schema").String;
178
178
  readonly value: import("effect/Schema").String;
179
179
  }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>;
180
- export declare const ServerApi: HttpApi.HttpApi<"ServerApi", HttpApiGroup.HttpApiGroup<"users", HttpApiEndpoint.HttpApiEndpoint<"getUser", "GET", "/api/users/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
180
+ 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<{
181
+ readonly hostname: import("effect/Schema").NonEmptyString;
182
+ readonly rootHostname: import("effect/Schema").NonEmptyString;
183
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
184
+ readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
185
+ readonly managed: import("effect/Schema").Boolean;
186
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
187
+ readonly id: import("effect/Schema").String;
188
+ readonly hostname: import("effect/Schema").String;
189
+ readonly rootHostname: import("effect/Schema").String;
190
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
191
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
192
+ readonly hostnameId: import("effect/Schema").String;
193
+ readonly managed: import("effect/Schema").Boolean;
194
+ readonly active: import("effect/Schema").Boolean;
195
+ readonly createdAt: import("effect/Schema").Date;
196
+ readonly updatedAt: import("effect/Schema").Date;
197
+ }>>, 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<{
198
+ readonly id: import("effect/Schema").NonEmptyString;
199
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
200
+ readonly id: import("effect/Schema").String;
201
+ readonly hostname: import("effect/Schema").String;
202
+ readonly rootHostname: import("effect/Schema").String;
203
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
204
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
205
+ readonly hostnameId: import("effect/Schema").String;
206
+ readonly managed: import("effect/Schema").Boolean;
207
+ readonly active: import("effect/Schema").Boolean;
208
+ readonly createdAt: import("effect/Schema").Date;
209
+ readonly updatedAt: import("effect/Schema").Date;
210
+ }>>, 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<{
181
211
  readonly id: import("effect/Schema").NonEmptyString;
182
212
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
183
213
  readonly id: import("effect/Schema").String;
184
- readonly name: import("effect/Schema").String;
185
- readonly email: import("effect/Schema").String;
186
- readonly emailVerified: import("effect/Schema").Boolean;
187
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
188
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
189
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
214
+ readonly hostname: import("effect/Schema").String;
215
+ readonly rootHostname: import("effect/Schema").String;
216
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
217
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
218
+ readonly hostnameId: import("effect/Schema").String;
219
+ readonly managed: import("effect/Schema").Boolean;
220
+ readonly active: import("effect/Schema").Boolean;
190
221
  readonly createdAt: import("effect/Schema").Date;
191
222
  readonly updatedAt: import("effect/Schema").Date;
192
- }>>, 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<{
193
- readonly userId: import("effect/Schema").NonEmptyString;
223
+ }>>, 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<{
224
+ readonly hostname: import("effect/Schema").NonEmptyString;
194
225
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
195
- readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
196
- }>>, 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<{
197
- readonly ids: import("effect/Schema").NonEmptyString;
198
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
199
- readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
200
- readonly id: import("effect/Schema").String;
201
- readonly name: import("effect/Schema").String;
202
- readonly email: import("effect/Schema").String;
203
- readonly emailVerified: import("effect/Schema").Boolean;
204
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
205
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
206
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
207
- readonly createdAt: import("effect/Schema").Date;
208
- readonly updatedAt: import("effect/Schema").Date;
209
- }>>;
210
- readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
211
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"organizations", HttpApiEndpoint.HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
226
+ readonly id: import("effect/Schema").String;
227
+ readonly hostname: import("effect/Schema").String;
228
+ readonly rootHostname: import("effect/Schema").String;
229
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
230
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
231
+ readonly hostnameId: import("effect/Schema").String;
232
+ readonly managed: import("effect/Schema").Boolean;
233
+ readonly active: import("effect/Schema").Boolean;
234
+ readonly createdAt: import("effect/Schema").Date;
235
+ readonly updatedAt: import("effect/Schema").Date;
236
+ }>>, 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<{
237
+ readonly id: import("effect/Schema").NonEmptyString;
238
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
239
+ readonly required: import("effect/Schema").Boolean;
240
+ readonly status: import("effect/Schema").String;
241
+ readonly type: import("effect/Schema").String;
242
+ readonly name: import("effect/Schema").String;
243
+ readonly value: import("effect/Schema").String;
244
+ }>>>, 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<{
212
245
  readonly organizationId: import("effect/Schema").NonEmptyString;
213
246
  readonly userId: import("effect/Schema").NonEmptyString;
214
247
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
@@ -287,68 +320,35 @@ export declare const ServerApi: HttpApi.HttpApi<"ServerApi", HttpApiGroup.HttpAp
287
320
  readonly createdAt: import("effect/Schema").Date;
288
321
  }>>;
289
322
  readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
290
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"domains", HttpApiEndpoint.HttpApiEndpoint<"createDomain", "POST", "/api/domains", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
291
- readonly hostname: import("effect/Schema").NonEmptyString;
292
- readonly rootHostname: import("effect/Schema").NonEmptyString;
293
- readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
294
- readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
295
- readonly managed: import("effect/Schema").Boolean;
296
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
297
- readonly id: import("effect/Schema").String;
298
- readonly hostname: import("effect/Schema").String;
299
- readonly rootHostname: import("effect/Schema").String;
300
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
301
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
302
- readonly hostnameId: import("effect/Schema").String;
303
- readonly managed: import("effect/Schema").Boolean;
304
- readonly active: import("effect/Schema").Boolean;
305
- readonly createdAt: import("effect/Schema").Date;
306
- readonly updatedAt: import("effect/Schema").Date;
307
- }>>, 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<{
308
- readonly id: import("effect/Schema").NonEmptyString;
309
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
310
- readonly id: import("effect/Schema").String;
311
- readonly hostname: import("effect/Schema").String;
312
- readonly rootHostname: import("effect/Schema").String;
313
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
314
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
315
- readonly hostnameId: import("effect/Schema").String;
316
- readonly managed: import("effect/Schema").Boolean;
317
- readonly active: import("effect/Schema").Boolean;
318
- readonly createdAt: import("effect/Schema").Date;
319
- readonly updatedAt: import("effect/Schema").Date;
320
- }>>, 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<{
323
+ }>>, 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<{
321
324
  readonly id: import("effect/Schema").NonEmptyString;
322
325
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
323
326
  readonly id: import("effect/Schema").String;
324
- readonly hostname: import("effect/Schema").String;
325
- readonly rootHostname: import("effect/Schema").String;
326
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
327
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
328
- readonly hostnameId: import("effect/Schema").String;
329
- readonly managed: import("effect/Schema").Boolean;
330
- readonly active: import("effect/Schema").Boolean;
327
+ readonly name: import("effect/Schema").String;
328
+ readonly email: import("effect/Schema").String;
329
+ readonly emailVerified: import("effect/Schema").Boolean;
330
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
331
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
332
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
331
333
  readonly createdAt: import("effect/Schema").Date;
332
334
  readonly updatedAt: import("effect/Schema").Date;
333
- }>>, 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<{
334
- readonly hostname: import("effect/Schema").NonEmptyString;
335
+ }>>, 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<{
336
+ readonly userId: import("effect/Schema").NonEmptyString;
335
337
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
336
- readonly id: import("effect/Schema").String;
337
- readonly hostname: import("effect/Schema").String;
338
- readonly rootHostname: import("effect/Schema").String;
339
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
340
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
341
- readonly hostnameId: import("effect/Schema").String;
342
- readonly managed: import("effect/Schema").Boolean;
343
- readonly active: import("effect/Schema").Boolean;
344
- readonly createdAt: import("effect/Schema").Date;
345
- readonly updatedAt: import("effect/Schema").Date;
346
- }>>, 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<{
347
- readonly id: import("effect/Schema").NonEmptyString;
348
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
349
- readonly required: import("effect/Schema").Boolean;
350
- readonly status: import("effect/Schema").String;
351
- readonly type: import("effect/Schema").String;
352
- readonly name: import("effect/Schema").String;
353
- readonly value: import("effect/Schema").String;
354
- }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>>;
338
+ readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
339
+ }>>, 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<{
340
+ readonly ids: import("effect/Schema").NonEmptyString;
341
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
342
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
343
+ readonly id: import("effect/Schema").String;
344
+ readonly name: import("effect/Schema").String;
345
+ readonly email: import("effect/Schema").String;
346
+ readonly emailVerified: import("effect/Schema").Boolean;
347
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
348
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
349
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
350
+ readonly createdAt: import("effect/Schema").Date;
351
+ readonly updatedAt: import("effect/Schema").Date;
352
+ }>>;
353
+ readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
354
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false>>;
package/dist/service.d.ts CHANGED
@@ -48,34 +48,26 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
48
48
  readonly id: string;
49
49
  readonly key: string;
50
50
  }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
51
- readonly presign: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
51
+ readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
52
52
  readonly payload: {
53
- readonly fileName: string;
54
- readonly contentType: string;
53
+ readonly newPassword: string;
55
54
  };
56
55
  readonly responseMode?: Mode;
57
56
  }) => Effect.Effect<HttpApiClient.Client.Response<{
58
- readonly uploadUrl: string;
57
+ readonly ok: boolean;
58
+ }, 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>;
59
+ readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
60
+ readonly payload: FormData;
61
+ readonly responseMode?: Mode;
62
+ }) => Effect.Effect<HttpApiClient.Client.Response<{
59
63
  readonly url: string;
60
64
  }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
61
- readonly presignUserImageUpload: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
62
- readonly payload: {
63
- readonly fileName: string;
64
- readonly contentType: string;
65
- };
65
+ readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
66
+ readonly payload: FormData;
66
67
  readonly responseMode?: Mode;
67
68
  }) => Effect.Effect<HttpApiClient.Client.Response<{
68
- readonly uploadUrl: string;
69
69
  readonly url: string;
70
70
  }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
71
- readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
72
- readonly payload: {
73
- readonly newPassword: string;
74
- };
75
- readonly responseMode?: Mode;
76
- }) => Effect.Effect<HttpApiClient.Client.Response<{
77
- readonly ok: boolean;
78
- }, 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>;
79
71
  readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
80
72
  readonly payload: {
81
73
  readonly key: string;
@@ -389,34 +381,26 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
389
381
  readonly id: string;
390
382
  readonly key: string;
391
383
  }, 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>;
392
- readonly presign: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
384
+ readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
393
385
  readonly payload: {
394
- readonly fileName: string;
395
- readonly contentType: string;
386
+ readonly newPassword: string;
396
387
  };
397
388
  readonly responseMode?: Mode;
398
389
  }) => Effect.Effect<HttpApiClient.Client.Response<{
399
- readonly uploadUrl: string;
390
+ readonly ok: boolean;
391
+ }, 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>;
392
+ readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
393
+ readonly payload: FormData;
394
+ readonly responseMode?: Mode;
395
+ }) => Effect.Effect<HttpApiClient.Client.Response<{
400
396
  readonly url: string;
401
397
  }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
402
- readonly presignUserImageUpload: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
403
- readonly payload: {
404
- readonly fileName: string;
405
- readonly contentType: string;
406
- };
398
+ readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
399
+ readonly payload: FormData;
407
400
  readonly responseMode?: Mode;
408
401
  }) => Effect.Effect<HttpApiClient.Client.Response<{
409
- readonly uploadUrl: string;
410
402
  readonly url: string;
411
403
  }, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("./extra").ExtraBadRequest | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized), [Mode] extends ["response-only"] ? never : never>;
412
- readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
413
- readonly payload: {
414
- readonly newPassword: string;
415
- };
416
- readonly responseMode?: Mode;
417
- }) => Effect.Effect<HttpApiClient.Client.Response<{
418
- readonly ok: boolean;
419
- }, 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>;
420
404
  readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
421
405
  readonly payload: {
422
406
  readonly key: string;
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@krak-stack/auth",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "Effect HttpApi clients and schemas for KrakStack Auth.",
5
5
  "license": "MIT",
6
6
  "files": [
7
- "dist"
7
+ "dist",
8
+ "tailwind.css"
8
9
  ],
9
10
  "type": "module",
10
11
  "sideEffects": false,
@@ -29,6 +30,7 @@
29
30
  "types": "./dist/components/index.d.ts",
30
31
  "default": "./dist/components/index.js"
31
32
  },
33
+ "./tailwind.css": "./tailwind.css",
32
34
  "./better-auth": {
33
35
  "types": "./dist/better-auth/index.d.ts",
34
36
  "default": "./dist/better-auth/index.js"
@@ -59,6 +61,7 @@
59
61
  "@tanstack/react-table": "^8.21.3",
60
62
  "better-auth": "^1.6.14",
61
63
  "effect": "^4.0.0-beta.78",
64
+ "input-otp": "^1.4.2",
62
65
  "lucide-react": "^1.17.0",
63
66
  "react": "^19.2.7",
64
67
  "react-qr-code": "^2.1.1"
package/tailwind.css ADDED
@@ -0,0 +1 @@
1
+ @source "./dist";