@krak-stack/auth 0.1.29 → 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 +10 -14
- 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/service.d.ts +20 -36
- package/package.json +2 -1
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/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,6 +1,6 @@
|
|
|
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": [
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"@tanstack/react-table": "^8.21.3",
|
|
62
62
|
"better-auth": "^1.6.14",
|
|
63
63
|
"effect": "^4.0.0-beta.78",
|
|
64
|
+
"input-otp": "^1.4.2",
|
|
64
65
|
"lucide-react": "^1.17.0",
|
|
65
66
|
"react": "^19.2.7",
|
|
66
67
|
"react-qr-code": "^2.1.1"
|