@krak-stack/auth 0.1.29 → 0.1.31
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 +28 -14
- package/dist/components/auth-api-client.d.ts +28 -14
- package/dist/components/auth-client.d.ts +4 -2
- package/dist/components/auth-forms.d.ts +12 -0
- package/dist/components/auth-forms.js +669 -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 +56 -28
- package/dist/extra/api.js +19 -10
- package/dist/extra/index.d.ts +28 -14
- package/dist/extra/schema.d.ts +39 -7
- package/dist/extra/schema.js +78 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/service.d.ts +60 -32
- package/package.json +2 -1
package/dist/extra/index.d.ts
CHANGED
|
@@ -7,23 +7,37 @@ declare const ExtraApiClient_base: AtomHttpApi.AtomHttpApiClient<ExtraApiClient,
|
|
|
7
7
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
8
8
|
readonly id: import("effect/Schema").String;
|
|
9
9
|
readonly key: import("effect/Schema").String;
|
|
10
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
|
|
10
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
11
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
12
|
+
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
13
|
+
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
14
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
15
|
+
readonly projectKey: import("effect/Schema").String;
|
|
16
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
17
|
+
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
18
|
+
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
19
|
+
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
20
|
+
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
21
|
+
readonly authOptions: import("effect/Schema").Struct<{
|
|
22
|
+
readonly emailPassword: import("effect/Schema").Boolean;
|
|
23
|
+
readonly emailOtp: import("effect/Schema").Boolean;
|
|
24
|
+
readonly google: import("effect/Schema").Boolean;
|
|
25
|
+
readonly signUp: import("effect/Schema").Boolean;
|
|
26
|
+
readonly signUpName: import("effect/Schema").Boolean;
|
|
27
|
+
}>;
|
|
28
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setPassword", "POST", "/api/auth/set-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
23
29
|
readonly newPassword: import("effect/Schema").NonEmptyString;
|
|
24
30
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
25
31
|
readonly ok: import("effect/Schema").Boolean;
|
|
26
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"
|
|
32
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/api/organizations/logo/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
|
|
33
|
+
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
34
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
35
|
+
readonly url: import("effect/Schema").String;
|
|
36
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadUserImage", "POST", "/api/auth/image/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/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
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
39
|
+
readonly url: import("effect/Schema").String;
|
|
40
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyApiKey", "POST", "/api/auth/verify-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
27
41
|
readonly key: import("effect/Schema").NonEmptyString;
|
|
28
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">]>>;
|
|
29
43
|
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
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
|
}>;
|
|
@@ -65,11 +69,37 @@ export declare const ExtraVerifyApiKeyResponse: Schema.Struct<{
|
|
|
65
69
|
readonly metadata: Schema.NullOr<Schema.Unknown>;
|
|
66
70
|
}>>;
|
|
67
71
|
}>;
|
|
72
|
+
export declare const ExtraProjectPublicConfigQuery: Schema.Struct<{
|
|
73
|
+
readonly projectId: Schema.optional<Schema.String>;
|
|
74
|
+
readonly clientId: Schema.optional<Schema.String>;
|
|
75
|
+
readonly host: Schema.optional<Schema.String>;
|
|
76
|
+
}>;
|
|
77
|
+
export declare const ExtraProjectAuthOptions: Schema.Struct<{
|
|
78
|
+
readonly emailPassword: Schema.Boolean;
|
|
79
|
+
readonly emailOtp: Schema.Boolean;
|
|
80
|
+
readonly google: Schema.Boolean;
|
|
81
|
+
readonly signUp: Schema.Boolean;
|
|
82
|
+
readonly signUpName: Schema.Boolean;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const ExtraProjectPublicConfig: Schema.Struct<{
|
|
85
|
+
readonly projectKey: Schema.String;
|
|
86
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
87
|
+
readonly logoUrl: Schema.NullOr<Schema.String>;
|
|
88
|
+
readonly authDomain: Schema.NullOr<Schema.String>;
|
|
89
|
+
readonly rootDomain: Schema.NullOr<Schema.String>;
|
|
90
|
+
readonly themeCss: Schema.NullOr<Schema.String>;
|
|
91
|
+
readonly authOptions: Schema.Struct<{
|
|
92
|
+
readonly emailPassword: Schema.Boolean;
|
|
93
|
+
readonly emailOtp: Schema.Boolean;
|
|
94
|
+
readonly google: Schema.Boolean;
|
|
95
|
+
readonly signUp: Schema.Boolean;
|
|
96
|
+
readonly signUpName: Schema.Boolean;
|
|
97
|
+
}>;
|
|
98
|
+
}>;
|
|
68
99
|
export declare const ExtraOkResponse: Schema.Struct<{
|
|
69
100
|
readonly ok: Schema.Boolean;
|
|
70
101
|
}>;
|
|
71
|
-
export declare const
|
|
72
|
-
readonly uploadUrl: Schema.String;
|
|
102
|
+
export declare const ExtraUploadedAsset: Schema.Struct<{
|
|
73
103
|
readonly url: Schema.String;
|
|
74
104
|
}>;
|
|
75
105
|
declare const ExtraBadRequest_base: Schema.Class<ExtraBadRequest, Schema.Struct<{
|
|
@@ -78,13 +108,15 @@ declare const ExtraBadRequest_base: Schema.Class<ExtraBadRequest, Schema.Struct<
|
|
|
78
108
|
}>, import("effect/Cause").YieldableError>;
|
|
79
109
|
export declare class ExtraBadRequest extends ExtraBadRequest_base {
|
|
80
110
|
}
|
|
81
|
-
export type
|
|
82
|
-
export type
|
|
111
|
+
export type ExtraImageUploadPayload = typeof ExtraImageUploadPayload.Type;
|
|
112
|
+
export type ExtraUploadedAsset = typeof ExtraUploadedAsset.Type;
|
|
83
113
|
export type ExtraSetPasswordPayload = typeof ExtraSetPasswordPayload.Type;
|
|
84
114
|
export type ExtraVerifyPasswordPayload = typeof ExtraVerifyPasswordPayload.Type;
|
|
85
115
|
export type ExtraCreateApiKeyPayload = typeof ExtraCreateApiKeyPayload.Type;
|
|
86
116
|
export type ExtraCreateApiKeyResponse = typeof ExtraCreateApiKeyResponse.Type;
|
|
87
117
|
export type ExtraVerifyApiKeyPayload = typeof ExtraVerifyApiKeyPayload.Type;
|
|
88
118
|
export type ExtraVerifyApiKeyResponse = typeof ExtraVerifyApiKeyResponse.Type;
|
|
119
|
+
export type ExtraProjectPublicConfigQuery = typeof ExtraProjectPublicConfigQuery.Type;
|
|
120
|
+
export type ExtraProjectPublicConfig = typeof ExtraProjectPublicConfig.Type;
|
|
89
121
|
export type ExtraOkResponse = typeof ExtraOkResponse.Type;
|
|
90
122
|
export {};
|
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({
|
|
@@ -134,6 +135,72 @@ export const ExtraVerifyApiKeyResponse = Schema.Struct({
|
|
|
134
135
|
title: "Extra verify API key response",
|
|
135
136
|
description: "Result of verifying a remote API key.",
|
|
136
137
|
});
|
|
138
|
+
export const ExtraProjectPublicConfigQuery = Schema.Struct({
|
|
139
|
+
projectId: Schema.optional(Schema.String),
|
|
140
|
+
clientId: Schema.optional(Schema.String),
|
|
141
|
+
host: Schema.optional(Schema.String),
|
|
142
|
+
}).annotate({
|
|
143
|
+
identifier: "ExtraProjectPublicConfigQuery",
|
|
144
|
+
title: "Extra project public config query",
|
|
145
|
+
description: "Optional project ID, auth host, and OAuth client ID used to resolve public project branding through the proxied auth API.",
|
|
146
|
+
examples: [
|
|
147
|
+
{
|
|
148
|
+
projectId: "project-id",
|
|
149
|
+
host: "auth.example.com",
|
|
150
|
+
clientId: "oauth-client-id",
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
export const ExtraProjectAuthOptions = Schema.Struct({
|
|
155
|
+
emailPassword: Schema.Boolean,
|
|
156
|
+
emailOtp: Schema.Boolean,
|
|
157
|
+
google: Schema.Boolean,
|
|
158
|
+
signUp: Schema.Boolean,
|
|
159
|
+
signUpName: Schema.Boolean,
|
|
160
|
+
}).annotate({
|
|
161
|
+
identifier: "ExtraProjectAuthOptions",
|
|
162
|
+
title: "Extra project authentication options",
|
|
163
|
+
description: "Resolved authentication methods visible for auth pages.",
|
|
164
|
+
examples: [
|
|
165
|
+
{
|
|
166
|
+
emailPassword: true,
|
|
167
|
+
emailOtp: true,
|
|
168
|
+
google: true,
|
|
169
|
+
signUp: true,
|
|
170
|
+
signUpName: true,
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
});
|
|
174
|
+
export const ExtraProjectPublicConfig = Schema.Struct({
|
|
175
|
+
projectKey: Schema.String,
|
|
176
|
+
name: Schema.NullOr(Schema.String),
|
|
177
|
+
logoUrl: Schema.NullOr(Schema.String),
|
|
178
|
+
authDomain: Schema.NullOr(Schema.String),
|
|
179
|
+
rootDomain: Schema.NullOr(Schema.String),
|
|
180
|
+
themeCss: Schema.NullOr(Schema.String),
|
|
181
|
+
authOptions: ExtraProjectAuthOptions,
|
|
182
|
+
}).annotate({
|
|
183
|
+
identifier: "ExtraProjectPublicConfig",
|
|
184
|
+
title: "Extra project public config",
|
|
185
|
+
description: "Public white-label configuration used by auth pages for a project.",
|
|
186
|
+
examples: [
|
|
187
|
+
{
|
|
188
|
+
projectKey: "auth.example.com",
|
|
189
|
+
name: "Example project",
|
|
190
|
+
logoUrl: "https://example.com/logo.svg",
|
|
191
|
+
authDomain: "auth.example.com",
|
|
192
|
+
rootDomain: "example.com",
|
|
193
|
+
themeCss: '[data-project-theme="auth.example.com"] { --primary: oklch(0.5 0.1 240); }',
|
|
194
|
+
authOptions: {
|
|
195
|
+
emailPassword: true,
|
|
196
|
+
emailOtp: true,
|
|
197
|
+
google: true,
|
|
198
|
+
signUp: false,
|
|
199
|
+
signUpName: true,
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
});
|
|
137
204
|
export const ExtraOkResponse = Schema.Struct({
|
|
138
205
|
ok: Schema.Boolean,
|
|
139
206
|
}).annotate({
|
|
@@ -142,13 +209,12 @@ export const ExtraOkResponse = Schema.Struct({
|
|
|
142
209
|
description: "Successful response for custom auth actions.",
|
|
143
210
|
examples: [{ ok: true }],
|
|
144
211
|
});
|
|
145
|
-
export const
|
|
146
|
-
uploadUrl: Schema.String,
|
|
212
|
+
export const ExtraUploadedAsset = Schema.Struct({
|
|
147
213
|
url: Schema.String,
|
|
148
214
|
}).annotate({
|
|
149
|
-
identifier: "
|
|
150
|
-
title: "Extra
|
|
151
|
-
description: "
|
|
215
|
+
identifier: "ExtraUploadedAsset",
|
|
216
|
+
title: "Extra uploaded asset",
|
|
217
|
+
description: "Stable public asset URL returned after an image upload.",
|
|
152
218
|
});
|
|
153
219
|
export class ExtraBadRequest extends Schema.ErrorClass("ExtraBadRequest")({
|
|
154
220
|
_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,26 +48,28 @@ 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
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
51
|
+
readonly getProjectPublicConfig: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
52
|
+
readonly query: {
|
|
53
|
+
readonly projectId?: string | undefined;
|
|
54
|
+
readonly clientId?: string | undefined;
|
|
55
|
+
readonly host?: string | undefined;
|
|
55
56
|
};
|
|
56
57
|
readonly responseMode?: Mode;
|
|
57
58
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
readonly
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
readonly projectKey: string;
|
|
60
|
+
readonly name: string | null;
|
|
61
|
+
readonly logoUrl: string | null;
|
|
62
|
+
readonly authDomain: string | null;
|
|
63
|
+
readonly rootDomain: string | null;
|
|
64
|
+
readonly themeCss: string | null;
|
|
65
|
+
readonly authOptions: {
|
|
66
|
+
readonly emailPassword: boolean;
|
|
67
|
+
readonly emailOtp: boolean;
|
|
68
|
+
readonly google: boolean;
|
|
69
|
+
readonly signUp: boolean;
|
|
70
|
+
readonly signUpName: boolean;
|
|
65
71
|
};
|
|
66
|
-
|
|
67
|
-
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
68
|
-
readonly uploadUrl: string;
|
|
69
|
-
readonly url: string;
|
|
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>;
|
|
72
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
|
|
71
73
|
readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
72
74
|
readonly payload: {
|
|
73
75
|
readonly newPassword: string;
|
|
@@ -76,6 +78,18 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
76
78
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
77
79
|
readonly ok: boolean;
|
|
78
80
|
}, 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>;
|
|
81
|
+
readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
82
|
+
readonly payload: FormData;
|
|
83
|
+
readonly responseMode?: Mode;
|
|
84
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
85
|
+
readonly url: string;
|
|
86
|
+
}, 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>;
|
|
87
|
+
readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
88
|
+
readonly payload: FormData;
|
|
89
|
+
readonly responseMode?: Mode;
|
|
90
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
91
|
+
readonly url: string;
|
|
92
|
+
}, 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>;
|
|
79
93
|
readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
80
94
|
readonly payload: {
|
|
81
95
|
readonly key: string;
|
|
@@ -389,26 +403,28 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
389
403
|
readonly id: string;
|
|
390
404
|
readonly key: string;
|
|
391
405
|
}, 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
|
|
393
|
-
readonly
|
|
394
|
-
readonly
|
|
395
|
-
readonly
|
|
406
|
+
readonly getProjectPublicConfig: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
407
|
+
readonly query: {
|
|
408
|
+
readonly projectId?: string | undefined;
|
|
409
|
+
readonly clientId?: string | undefined;
|
|
410
|
+
readonly host?: string | undefined;
|
|
396
411
|
};
|
|
397
412
|
readonly responseMode?: Mode;
|
|
398
413
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
399
|
-
readonly
|
|
400
|
-
readonly
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
readonly
|
|
404
|
-
|
|
405
|
-
|
|
414
|
+
readonly projectKey: string;
|
|
415
|
+
readonly name: string | null;
|
|
416
|
+
readonly logoUrl: string | null;
|
|
417
|
+
readonly authDomain: string | null;
|
|
418
|
+
readonly rootDomain: string | null;
|
|
419
|
+
readonly themeCss: string | null;
|
|
420
|
+
readonly authOptions: {
|
|
421
|
+
readonly emailPassword: boolean;
|
|
422
|
+
readonly emailOtp: boolean;
|
|
423
|
+
readonly google: boolean;
|
|
424
|
+
readonly signUp: boolean;
|
|
425
|
+
readonly signUpName: boolean;
|
|
406
426
|
};
|
|
407
|
-
|
|
408
|
-
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
409
|
-
readonly uploadUrl: string;
|
|
410
|
-
readonly url: string;
|
|
411
|
-
}, 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>;
|
|
427
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/Schema").SchemaError), [Mode] extends ["response-only"] ? never : never>;
|
|
412
428
|
readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
413
429
|
readonly payload: {
|
|
414
430
|
readonly newPassword: string;
|
|
@@ -417,6 +433,18 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
417
433
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
418
434
|
readonly ok: boolean;
|
|
419
435
|
}, 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>;
|
|
436
|
+
readonly uploadOrganizationLogo: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
437
|
+
readonly payload: FormData;
|
|
438
|
+
readonly responseMode?: Mode;
|
|
439
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
440
|
+
readonly url: string;
|
|
441
|
+
}, 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>;
|
|
442
|
+
readonly uploadUserImage: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
443
|
+
readonly payload: FormData;
|
|
444
|
+
readonly responseMode?: Mode;
|
|
445
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
446
|
+
readonly url: string;
|
|
447
|
+
}, 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>;
|
|
420
448
|
readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
421
449
|
readonly payload: {
|
|
422
450
|
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.31",
|
|
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"
|