@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.
- package/dist/api.d.ts +10 -14
- package/dist/components/auth-api-client.d.ts +129 -133
- package/dist/components/auth-client.d.ts +4 -2
- package/dist/components/auth-forms.d.ts +13 -0
- package/dist/components/auth-forms.js +646 -0
- package/dist/components/hooks.d.ts +1 -0
- package/dist/components/hooks.js +9 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/organization-switcher.js +138 -113
- package/dist/components/user-button.d.ts +2 -0
- package/dist/components/user-button.js +124 -111
- package/dist/extra/api.d.ts +20 -28
- package/dist/extra/api.js +10 -10
- package/dist/extra/index.d.ts +10 -14
- package/dist/extra/schema.d.ts +10 -7
- package/dist/extra/schema.js +12 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/server/api.d.ts +85 -85
- package/dist/service.d.ts +20 -36
- package/package.json +5 -2
- package/tailwind.css +1 -0
package/dist/extra/schema.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
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
|
|
82
|
-
export 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;
|
package/dist/extra/schema.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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: "
|
|
7
|
-
title: "Extra
|
|
8
|
-
description: "
|
|
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
|
|
146
|
-
uploadUrl: Schema.String,
|
|
146
|
+
export const ExtraUploadedAsset = Schema.Struct({
|
|
147
147
|
url: Schema.String,
|
|
148
148
|
}).annotate({
|
|
149
|
-
identifier: "
|
|
150
|
-
title: "Extra
|
|
151
|
-
description: "
|
|
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";
|
package/dist/server/api.d.ts
CHANGED
|
@@ -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<"
|
|
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
|
|
185
|
-
readonly
|
|
186
|
-
readonly
|
|
187
|
-
readonly
|
|
188
|
-
readonly
|
|
189
|
-
readonly
|
|
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<"
|
|
193
|
-
readonly
|
|
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").
|
|
196
|
-
|
|
197
|
-
readonly
|
|
198
|
-
|
|
199
|
-
readonly
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
readonly
|
|
211
|
-
|
|
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<"
|
|
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
|
|
325
|
-
readonly
|
|
326
|
-
readonly
|
|
327
|
-
readonly
|
|
328
|
-
readonly
|
|
329
|
-
readonly
|
|
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<"
|
|
334
|
-
readonly
|
|
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
|
-
|
|
338
|
-
readonly
|
|
339
|
-
|
|
340
|
-
readonly
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
readonly
|
|
352
|
-
|
|
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
|
|
51
|
+
readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
52
52
|
readonly payload: {
|
|
53
|
-
readonly
|
|
54
|
-
readonly contentType: string;
|
|
53
|
+
readonly newPassword: string;
|
|
55
54
|
};
|
|
56
55
|
readonly responseMode?: Mode;
|
|
57
56
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
58
|
-
readonly
|
|
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
|
|
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
|
|
384
|
+
readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
393
385
|
readonly payload: {
|
|
394
|
-
readonly
|
|
395
|
-
readonly contentType: string;
|
|
386
|
+
readonly newPassword: string;
|
|
396
387
|
};
|
|
397
388
|
readonly responseMode?: Mode;
|
|
398
389
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
399
|
-
readonly
|
|
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
|
|
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.
|
|
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";
|