@krak-stack/auth 0.1.60 → 0.1.62
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/README.md +45 -65
- package/dist/access.d.ts +27 -13
- package/dist/access.js +6 -9
- package/dist/api.d.ts +332 -332
- package/dist/components/api-key-edit-form.d.ts +3 -1
- package/dist/components/api-key-edit-form.js +9 -12
- package/dist/components/api-key-permissions.d.ts +10 -0
- package/dist/components/api-key-permissions.js +45 -0
- package/dist/components/auth-client-api.d.ts +185 -185
- package/dist/components/auth-forms.d.ts +1 -0
- package/dist/components/auth-forms.js +50 -6
- package/dist/components/auth-provider.d.ts +4 -2
- package/dist/components/auth-provider.js +3 -1
- package/dist/components/index.d.ts +5 -3
- package/dist/components/index.js +3 -2
- package/dist/components/organization-switcher.js +6 -6
- package/dist/components/project-access-matrix.d.ts +26 -0
- package/dist/components/project-access-matrix.js +85 -0
- package/dist/components/user-button.js +5 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/server/actor.d.ts +2 -16
- package/dist/server/actor.js +0 -16
- package/dist/server/middleware.js +2 -2
- package/package.json +5 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ApiKey } from "@better-auth/api-key/client";
|
|
2
|
+
import type { ProjectAccessLabelCatalog } from "../access";
|
|
2
3
|
type ApiKeySummary = Omit<ApiKey, "key">;
|
|
3
4
|
export type ApiKeyEditMessages = {
|
|
4
5
|
enabled: string;
|
|
@@ -11,11 +12,12 @@ export type ApiKeyEditMessages = {
|
|
|
11
12
|
permissionsDescription: string;
|
|
12
13
|
updateError: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const ApiKeyEditForm: ({ configId, keyData, messages, permissions, onSaved, }: {
|
|
15
|
+
export declare const ApiKeyEditForm: ({ configId, keyData, messages, permissions, permissionLabels, onSaved, }: {
|
|
15
16
|
configId: "organization" | "user";
|
|
16
17
|
keyData: ApiKeySummary;
|
|
17
18
|
messages: ApiKeyEditMessages;
|
|
18
19
|
permissions: Readonly<Record<string, ReadonlyArray<string>>>;
|
|
20
|
+
permissionLabels?: ProjectAccessLabelCatalog | undefined;
|
|
19
21
|
onSaved: () => void;
|
|
20
22
|
}) => import("react").JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -4,16 +4,17 @@ import { FormBuilder, FormReact } from "@lucas-barake/effect-form-react";
|
|
|
4
4
|
import { Effect, Schema } from "effect";
|
|
5
5
|
import { useRef, useState } from "react";
|
|
6
6
|
import { CheckboxField, SubmitButton, SubmitError, TextAreaField, TextField, } from "@/components/ui/effect-form";
|
|
7
|
-
import { Checkbox } from "@/components/ui/checkbox";
|
|
8
|
-
import { Field, FieldContent, FieldDescription, FieldGroup, FieldLabel, FieldLegend, FieldSet, } from "@/components/ui/field";
|
|
9
7
|
import { parseApiKeyReferrers, updateApiKey } from "./api-key";
|
|
8
|
+
import { ApiKeyPermissions } from "./api-key-permissions";
|
|
10
9
|
import { apiKeyReferrers } from "./api-key-referrers";
|
|
11
10
|
import { ExtraApiKeyPermissions } from "../extra/schema";
|
|
12
11
|
const editApiKeyFormBuilder = FormBuilder.empty
|
|
13
12
|
.addField("name", Schema.NonEmptyString)
|
|
14
13
|
.addField("enabled", Schema.Boolean)
|
|
15
|
-
.addField("referrers", Schema.String)
|
|
16
|
-
|
|
14
|
+
.addField("referrers", Schema.String)
|
|
15
|
+
.addField("permissions", Schema.Record(Schema.String, Schema.Boolean));
|
|
16
|
+
const ApiKeyPermissionsField = ({ field, props }) => (_jsx(ApiKeyPermissions, { description: props.description, idPrefix: props.idPrefix, permissions: props.permissions, labels: props.labels, selected: field.value, title: props.title, onChange: (id, checked) => field.onChange({ ...field.value, [id]: checked }) }));
|
|
17
|
+
export const ApiKeyEditForm = ({ configId, keyData, messages, permissions, permissionLabels, onSaved, }) => {
|
|
17
18
|
const permissionOptions = Object.entries(permissions).flatMap(([project, actions]) => actions.map((action) => ({
|
|
18
19
|
id: `${project}:${action}`,
|
|
19
20
|
project,
|
|
@@ -25,11 +26,8 @@ export const ApiKeyEditForm = ({ configId, keyData, messages, permissions, onSav
|
|
|
25
26
|
option.id,
|
|
26
27
|
currentGrant[option.project]?.includes(option.action) ?? false,
|
|
27
28
|
]));
|
|
28
|
-
const [selectedPermissions, setSelectedPermissions] = useState(initialSelectedPermissions);
|
|
29
|
-
const selectedPermissionsRef = useRef(selectedPermissions);
|
|
30
29
|
const permissionOptionsRef = useRef(permissionOptions);
|
|
31
30
|
const permissionsRef = useRef(permissions);
|
|
32
|
-
selectedPermissionsRef.current = selectedPermissions;
|
|
33
31
|
permissionOptionsRef.current = permissionOptions;
|
|
34
32
|
permissionsRef.current = permissions;
|
|
35
33
|
const [form] = useState(() => FormReact.make(editApiKeyFormBuilder, {
|
|
@@ -37,6 +35,7 @@ export const ApiKeyEditForm = ({ configId, keyData, messages, permissions, onSav
|
|
|
37
35
|
name: TextField,
|
|
38
36
|
enabled: CheckboxField,
|
|
39
37
|
referrers: TextAreaField,
|
|
38
|
+
permissions: ApiKeyPermissionsField,
|
|
40
39
|
},
|
|
41
40
|
mode: { validation: "onSubmit" },
|
|
42
41
|
onSubmit: (_, { decoded }) => Effect.tryPromise({
|
|
@@ -47,7 +46,7 @@ export const ApiKeyEditForm = ({ configId, keyData, messages, permissions, onSav
|
|
|
47
46
|
selectedGrant[project] = [];
|
|
48
47
|
}
|
|
49
48
|
for (const option of permissionOptionsRef.current) {
|
|
50
|
-
if (!
|
|
49
|
+
if (!decoded.permissions[option.id])
|
|
51
50
|
continue;
|
|
52
51
|
selectedGrant[option.project] = [
|
|
53
52
|
...(selectedGrant[option.project] ?? []),
|
|
@@ -73,12 +72,10 @@ export const ApiKeyEditForm = ({ configId, keyData, messages, permissions, onSav
|
|
|
73
72
|
name: keyData.name ?? "",
|
|
74
73
|
enabled: keyData.enabled,
|
|
75
74
|
referrers: apiKeyReferrers(keyData.metadata).join("\n"),
|
|
75
|
+
permissions: initialSelectedPermissions,
|
|
76
76
|
}, children: _jsxs("form", { className: "flex flex-col gap-4", onSubmit: (event) => {
|
|
77
77
|
event.preventDefault();
|
|
78
78
|
event.stopPropagation();
|
|
79
79
|
submit();
|
|
80
|
-
}, children: [_jsx(form.name, { label: messages.name, required: true }), _jsx(form.enabled, { label: messages.enabled }), _jsx(form.referrers, { label: messages.referrers, description: messages.referrersDescription, placeholder: messages.referrersPlaceholder, rows: 3 }),
|
|
81
|
-
...current,
|
|
82
|
-
[permission.id]: checked,
|
|
83
|
-
})) }), _jsx(FieldContent, { children: _jsx(FieldLabel, { htmlFor: `edit-${permission.id}`, children: permission.id }) })] }, permission.id))) })] })) : null, _jsx(SubmitError, { result: submitResult }), _jsx(SubmitButton, { form: form })] }) }) }));
|
|
80
|
+
}, children: [_jsx(form.name, { label: messages.name, required: true }), _jsx(form.enabled, { label: messages.enabled }), _jsx(form.referrers, { label: messages.referrers, description: messages.referrersDescription, placeholder: messages.referrersPlaceholder, rows: 3 }), _jsx(form.permissions, { description: messages.permissionsDescription, idPrefix: "edit", permissions: permissions, labels: permissionLabels, title: messages.permissions }), _jsx(SubmitError, { result: submitResult }), _jsx(SubmitButton, { form: form })] }) }) }));
|
|
84
81
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ProjectAccessLabelCatalog } from "../access";
|
|
2
|
+
export declare const ApiKeyPermissions: ({ description, idPrefix, permissions, labels, selected, title, onChange, }: {
|
|
3
|
+
description: string;
|
|
4
|
+
idPrefix: string;
|
|
5
|
+
permissions: Readonly<Record<string, ReadonlyArray<string>>>;
|
|
6
|
+
labels?: ProjectAccessLabelCatalog | undefined;
|
|
7
|
+
selected: Readonly<Record<string, boolean>>;
|
|
8
|
+
title: string;
|
|
9
|
+
onChange: (id: string, checked: boolean) => void;
|
|
10
|
+
}) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown } from "lucide-react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Checkbox } from "@/components/ui/checkbox";
|
|
5
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "@/components/ui/collapsible";
|
|
6
|
+
import { Field, FieldContent, FieldDescription, FieldGroup, FieldLabel, FieldLegend, FieldSet, } from "@/components/ui/field";
|
|
7
|
+
export const ApiKeyPermissions = ({ description, idPrefix, permissions, labels, selected, title, onChange, }) => {
|
|
8
|
+
const groups = Object.entries(permissions).reduce((groups, [permissionResource, permissionActions]) => {
|
|
9
|
+
for (const permissionAction of permissionActions) {
|
|
10
|
+
const separator = permissionAction.indexOf(":");
|
|
11
|
+
const resource = separator === -1
|
|
12
|
+
? permissionResource
|
|
13
|
+
: permissionAction.slice(0, separator);
|
|
14
|
+
const label = separator === -1
|
|
15
|
+
? permissionAction
|
|
16
|
+
: permissionAction.slice(separator + 1);
|
|
17
|
+
const group = groups.find((item) => item.resource === resource);
|
|
18
|
+
const permissionLabels = labels?.permissions[resource];
|
|
19
|
+
const action = {
|
|
20
|
+
id: `${permissionResource}:${permissionAction}`,
|
|
21
|
+
label: permissionLabels?.actions[label] ?? label,
|
|
22
|
+
};
|
|
23
|
+
if (group)
|
|
24
|
+
group.actions.push(action);
|
|
25
|
+
else
|
|
26
|
+
groups.push({
|
|
27
|
+
resource,
|
|
28
|
+
label: permissionLabels?.label ?? resource,
|
|
29
|
+
actions: [action],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return groups;
|
|
33
|
+
}, []);
|
|
34
|
+
if (groups.length === 0)
|
|
35
|
+
return null;
|
|
36
|
+
return (_jsxs(FieldSet, { className: "gap-3", children: [_jsx(FieldLegend, { className: "mb-0", children: title }), _jsx(FieldDescription, { children: description }), _jsx("div", { className: "overflow-hidden rounded-lg border", children: groups.map(({ resource, label, actions }, index) => (_jsx(PermissionGroup, { actions: actions, className: index > 0 ? "border-t" : "", idPrefix: idPrefix, resourceLabel: label, selected: selected, onChange: onChange }, resource))) })] }));
|
|
37
|
+
};
|
|
38
|
+
const PermissionGroup = ({ actions, className, idPrefix, resourceLabel, selected, onChange, }) => {
|
|
39
|
+
const selectedCount = actions.filter((action) => selected[action.id]).length;
|
|
40
|
+
const [open, setOpen] = useState(selectedCount > 0);
|
|
41
|
+
return (_jsxs(Collapsible, { className: className, open: open, onOpenChange: setOpen, children: [_jsxs(CollapsibleTrigger, { className: "hover:bg-muted/50 focus-visible:ring-ring flex w-full items-center gap-3 px-4 py-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-inset", children: [_jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: resourceLabel }), _jsxs("span", { className: "text-muted-foreground text-xs tabular-nums", children: [selectedCount, "/", actions.length] }), _jsx(ChevronDown, { "aria-hidden": "true", className: `text-muted-foreground size-4 shrink-0 transition-transform ${open ? "rotate-180" : ""}` })] }), _jsx(CollapsibleContent, { className: "border-t px-4 py-3", children: _jsx(FieldGroup, { "data-slot": "checkbox-group", className: "grid gap-3 sm:grid-cols-2", children: actions.map((action) => {
|
|
42
|
+
const inputId = `${idPrefix}-${action.id}`;
|
|
43
|
+
return (_jsxs(Field, { orientation: "horizontal", children: [_jsx(Checkbox, { id: inputId, checked: selected[action.id] ?? false, onCheckedChange: (checked) => onChange(action.id, checked) }), _jsx(FieldContent, { children: _jsx(FieldLabel, { htmlFor: inputId, children: action.label }) })] }, action.id));
|
|
44
|
+
}) }) })] }));
|
|
45
|
+
};
|
|
@@ -1,5 +1,188 @@
|
|
|
1
1
|
import { AtomHttpApi } from "effect/unstable/reactivity";
|
|
2
|
-
export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpApi.AtomHttpApiClient<object, `AuthClientApi:${string}`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"
|
|
2
|
+
export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpApi.AtomHttpApiClient<object, `AuthClientApi:${string}`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"auth", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSession", "GET", "/api/auth/get-session", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
3
|
+
readonly session: import("effect/Schema").Struct<{
|
|
4
|
+
readonly id: import("effect/Schema").String;
|
|
5
|
+
readonly expiresAt: import("effect/Schema").Date;
|
|
6
|
+
readonly token: import("effect/Schema").String;
|
|
7
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
8
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
9
|
+
readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
10
|
+
readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
11
|
+
readonly userId: import("effect/Schema").String;
|
|
12
|
+
readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
13
|
+
readonly impersonatedByOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
14
|
+
readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
15
|
+
}>;
|
|
16
|
+
readonly user: import("effect/Schema").Struct<{
|
|
17
|
+
readonly id: import("effect/Schema").String;
|
|
18
|
+
readonly name: import("effect/Schema").String;
|
|
19
|
+
readonly email: import("effect/Schema").String;
|
|
20
|
+
readonly emailVerified: import("effect/Schema").Boolean;
|
|
21
|
+
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
22
|
+
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
23
|
+
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
24
|
+
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
25
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
26
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
27
|
+
}>;
|
|
28
|
+
}>>>, 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").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../better-auth/schema").TooManyRequests>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"organizationImpersonateUser", "POST", "/api/auth/organization/impersonate-user", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
29
|
+
readonly organizationId: import("effect/Schema").NonEmptyString;
|
|
30
|
+
readonly actorUserId: import("effect/Schema").NonEmptyString;
|
|
31
|
+
readonly targetUserId: import("effect/Schema").NonEmptyString;
|
|
32
|
+
readonly expiresInSeconds: import("effect/Schema").optional<import("effect/Schema").Number>;
|
|
33
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
34
|
+
readonly session: import("effect/Schema").Struct<{
|
|
35
|
+
readonly id: import("effect/Schema").String;
|
|
36
|
+
readonly expiresAt: import("effect/Schema").Date;
|
|
37
|
+
readonly token: import("effect/Schema").String;
|
|
38
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
39
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
40
|
+
readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
41
|
+
readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
42
|
+
readonly userId: import("effect/Schema").String;
|
|
43
|
+
readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
44
|
+
readonly impersonatedByOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
45
|
+
readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
46
|
+
}>;
|
|
47
|
+
readonly user: import("effect/Schema").Struct<{
|
|
48
|
+
readonly id: import("effect/Schema").String;
|
|
49
|
+
readonly name: import("effect/Schema").String;
|
|
50
|
+
readonly email: import("effect/Schema").String;
|
|
51
|
+
readonly emailVerified: import("effect/Schema").Boolean;
|
|
52
|
+
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
53
|
+
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
54
|
+
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
55
|
+
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
56
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
57
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
58
|
+
}>;
|
|
59
|
+
}>>, 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").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"authExtra", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-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<{
|
|
60
|
+
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
61
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
62
|
+
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
63
|
+
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
64
|
+
readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
65
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
66
|
+
readonly id: import("effect/Schema").String;
|
|
67
|
+
readonly key: import("effect/Schema").String;
|
|
68
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
69
|
+
readonly organizationId: import("effect/Schema").String;
|
|
70
|
+
readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
|
|
71
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
72
|
+
readonly id: import("effect/Schema").String;
|
|
73
|
+
readonly name: import("effect/Schema").String;
|
|
74
|
+
readonly slug: import("effect/Schema").String;
|
|
75
|
+
readonly displayName: import("effect/Schema").String;
|
|
76
|
+
readonly contactEmail: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
77
|
+
readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
78
|
+
readonly email: import("effect/Schema").NonEmptyString;
|
|
79
|
+
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
80
|
+
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
81
|
+
readonly label: import("effect/Schema").NonEmptyString;
|
|
82
|
+
}>>;
|
|
83
|
+
}>>>;
|
|
84
|
+
readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
85
|
+
readonly number: import("effect/Schema").NonEmptyString;
|
|
86
|
+
readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
87
|
+
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
88
|
+
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
89
|
+
readonly label: import("effect/Schema").NonEmptyString;
|
|
90
|
+
}>>;
|
|
91
|
+
}>>>;
|
|
92
|
+
readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
93
|
+
readonly url: import("effect/Schema").NonEmptyString;
|
|
94
|
+
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
95
|
+
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
96
|
+
readonly label: import("effect/Schema").NonEmptyString;
|
|
97
|
+
}>>;
|
|
98
|
+
}>>>;
|
|
99
|
+
readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
100
|
+
readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
|
|
101
|
+
readonly url: import("effect/Schema").NonEmptyString;
|
|
102
|
+
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
103
|
+
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
104
|
+
readonly label: import("effect/Schema").NonEmptyString;
|
|
105
|
+
}>>;
|
|
106
|
+
}>>>;
|
|
107
|
+
readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
108
|
+
readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
109
|
+
readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
110
|
+
readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
111
|
+
readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
112
|
+
readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
113
|
+
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
114
|
+
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
115
|
+
readonly label: import("effect/Schema").NonEmptyString;
|
|
116
|
+
}>>;
|
|
117
|
+
readonly formatted: import("effect/Schema").String;
|
|
118
|
+
}>>>;
|
|
119
|
+
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
120
|
+
readonly icon: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
121
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, 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<{
|
|
122
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
123
|
+
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
124
|
+
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
125
|
+
readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
126
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
127
|
+
readonly projectKey: import("effect/Schema").String;
|
|
128
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
129
|
+
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
130
|
+
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
131
|
+
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
132
|
+
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
133
|
+
readonly authOptions: import("effect/Schema").Struct<{
|
|
134
|
+
readonly emailPassword: import("effect/Schema").Boolean;
|
|
135
|
+
readonly emailOtp: import("effect/Schema").Boolean;
|
|
136
|
+
readonly google: import("effect/Schema").Boolean;
|
|
137
|
+
readonly signUp: import("effect/Schema").Boolean;
|
|
138
|
+
readonly signUpName: import("effect/Schema").Boolean;
|
|
139
|
+
}>;
|
|
140
|
+
}>>, 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<{
|
|
141
|
+
readonly newPassword: import("effect/Schema").NonEmptyString;
|
|
142
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
143
|
+
readonly ok: import("effect/Schema").Boolean;
|
|
144
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateApiKey", "PATCH", "/api/auth/api-key/:keyId", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
145
|
+
readonly keyId: import("effect/Schema").NonEmptyString;
|
|
146
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
147
|
+
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
148
|
+
readonly name: import("effect/Schema").NonEmptyString;
|
|
149
|
+
readonly enabled: import("effect/Schema").Boolean;
|
|
150
|
+
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
151
|
+
readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
152
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
153
|
+
readonly ok: import("effect/Schema").Boolean;
|
|
154
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, 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<{
|
|
155
|
+
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
156
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
157
|
+
readonly url: import("effect/Schema").String;
|
|
158
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/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<{
|
|
159
|
+
readonly key: import("effect/Schema").NonEmptyString;
|
|
160
|
+
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">]>>;
|
|
161
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
162
|
+
readonly valid: import("effect/Schema").Boolean;
|
|
163
|
+
readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
164
|
+
readonly message: import("effect/Schema").String;
|
|
165
|
+
readonly code: import("effect/Schema").String;
|
|
166
|
+
}>>;
|
|
167
|
+
readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
168
|
+
readonly id: import("effect/Schema").String;
|
|
169
|
+
readonly configId: import("effect/Schema").String;
|
|
170
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
171
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
172
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
173
|
+
readonly referenceId: import("effect/Schema").String;
|
|
174
|
+
readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
175
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
176
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
177
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
178
|
+
readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
179
|
+
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
|
|
180
|
+
}>>;
|
|
181
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-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<{
|
|
182
|
+
readonly password: import("effect/Schema").NonEmptyString;
|
|
183
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
184
|
+
readonly ok: import("effect/Schema").Boolean;
|
|
185
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"admin", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/auth/admin/domains", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
3
186
|
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
4
187
|
readonly rootHostname: import("effect/Schema").NonEmptyString;
|
|
5
188
|
readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
@@ -382,187 +565,4 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
|
|
|
382
565
|
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
383
566
|
}>>>;
|
|
384
567
|
readonly createdAt: import("effect/Schema").Date;
|
|
385
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false
|
|
386
|
-
readonly session: import("effect/Schema").Struct<{
|
|
387
|
-
readonly id: import("effect/Schema").String;
|
|
388
|
-
readonly expiresAt: import("effect/Schema").Date;
|
|
389
|
-
readonly token: import("effect/Schema").String;
|
|
390
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
391
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
392
|
-
readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
393
|
-
readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
394
|
-
readonly userId: import("effect/Schema").String;
|
|
395
|
-
readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
396
|
-
readonly impersonatedByOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
397
|
-
readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
398
|
-
}>;
|
|
399
|
-
readonly user: import("effect/Schema").Struct<{
|
|
400
|
-
readonly id: import("effect/Schema").String;
|
|
401
|
-
readonly name: import("effect/Schema").String;
|
|
402
|
-
readonly email: import("effect/Schema").String;
|
|
403
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
404
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
405
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
406
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
407
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
408
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
409
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
410
|
-
}>;
|
|
411
|
-
}>>>, 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").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../better-auth/schema").TooManyRequests>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"organizationImpersonateUser", "POST", "/api/auth/organization/impersonate-user", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
412
|
-
readonly organizationId: import("effect/Schema").NonEmptyString;
|
|
413
|
-
readonly actorUserId: import("effect/Schema").NonEmptyString;
|
|
414
|
-
readonly targetUserId: import("effect/Schema").NonEmptyString;
|
|
415
|
-
readonly expiresInSeconds: import("effect/Schema").optional<import("effect/Schema").Number>;
|
|
416
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
417
|
-
readonly session: import("effect/Schema").Struct<{
|
|
418
|
-
readonly id: import("effect/Schema").String;
|
|
419
|
-
readonly expiresAt: import("effect/Schema").Date;
|
|
420
|
-
readonly token: import("effect/Schema").String;
|
|
421
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
422
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
423
|
-
readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
424
|
-
readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
425
|
-
readonly userId: import("effect/Schema").String;
|
|
426
|
-
readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
427
|
-
readonly impersonatedByOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
428
|
-
readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
429
|
-
}>;
|
|
430
|
-
readonly user: import("effect/Schema").Struct<{
|
|
431
|
-
readonly id: import("effect/Schema").String;
|
|
432
|
-
readonly name: import("effect/Schema").String;
|
|
433
|
-
readonly email: import("effect/Schema").String;
|
|
434
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
435
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
436
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
437
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
438
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
439
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
440
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
441
|
-
}>;
|
|
442
|
-
}>>, 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").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"authExtra", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-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<{
|
|
443
|
-
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
444
|
-
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
445
|
-
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
446
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
447
|
-
readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
448
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
449
|
-
readonly id: import("effect/Schema").String;
|
|
450
|
-
readonly key: import("effect/Schema").String;
|
|
451
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
452
|
-
readonly organizationId: import("effect/Schema").String;
|
|
453
|
-
readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
|
|
454
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
455
|
-
readonly id: import("effect/Schema").String;
|
|
456
|
-
readonly name: import("effect/Schema").String;
|
|
457
|
-
readonly slug: import("effect/Schema").String;
|
|
458
|
-
readonly displayName: import("effect/Schema").String;
|
|
459
|
-
readonly contactEmail: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
460
|
-
readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
461
|
-
readonly email: import("effect/Schema").NonEmptyString;
|
|
462
|
-
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
463
|
-
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
464
|
-
readonly label: import("effect/Schema").NonEmptyString;
|
|
465
|
-
}>>;
|
|
466
|
-
}>>>;
|
|
467
|
-
readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
468
|
-
readonly number: import("effect/Schema").NonEmptyString;
|
|
469
|
-
readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
470
|
-
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
471
|
-
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
472
|
-
readonly label: import("effect/Schema").NonEmptyString;
|
|
473
|
-
}>>;
|
|
474
|
-
}>>>;
|
|
475
|
-
readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
476
|
-
readonly url: import("effect/Schema").NonEmptyString;
|
|
477
|
-
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
478
|
-
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
479
|
-
readonly label: import("effect/Schema").NonEmptyString;
|
|
480
|
-
}>>;
|
|
481
|
-
}>>>;
|
|
482
|
-
readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
483
|
-
readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
|
|
484
|
-
readonly url: import("effect/Schema").NonEmptyString;
|
|
485
|
-
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
486
|
-
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
487
|
-
readonly label: import("effect/Schema").NonEmptyString;
|
|
488
|
-
}>>;
|
|
489
|
-
}>>>;
|
|
490
|
-
readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
491
|
-
readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
492
|
-
readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
493
|
-
readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
494
|
-
readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
495
|
-
readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
496
|
-
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
497
|
-
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
498
|
-
readonly label: import("effect/Schema").NonEmptyString;
|
|
499
|
-
}>>;
|
|
500
|
-
readonly formatted: import("effect/Schema").String;
|
|
501
|
-
}>>>;
|
|
502
|
-
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
503
|
-
readonly icon: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
504
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, 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<{
|
|
505
|
-
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
506
|
-
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
507
|
-
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
508
|
-
readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
509
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
510
|
-
readonly projectKey: import("effect/Schema").String;
|
|
511
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
512
|
-
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
513
|
-
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
514
|
-
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
515
|
-
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
516
|
-
readonly authOptions: import("effect/Schema").Struct<{
|
|
517
|
-
readonly emailPassword: import("effect/Schema").Boolean;
|
|
518
|
-
readonly emailOtp: import("effect/Schema").Boolean;
|
|
519
|
-
readonly google: import("effect/Schema").Boolean;
|
|
520
|
-
readonly signUp: import("effect/Schema").Boolean;
|
|
521
|
-
readonly signUpName: import("effect/Schema").Boolean;
|
|
522
|
-
}>;
|
|
523
|
-
}>>, 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<{
|
|
524
|
-
readonly newPassword: import("effect/Schema").NonEmptyString;
|
|
525
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
526
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
527
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateApiKey", "PATCH", "/api/auth/api-key/:keyId", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
528
|
-
readonly keyId: import("effect/Schema").NonEmptyString;
|
|
529
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
530
|
-
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
531
|
-
readonly name: import("effect/Schema").NonEmptyString;
|
|
532
|
-
readonly enabled: import("effect/Schema").Boolean;
|
|
533
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
534
|
-
readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
|
|
535
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
536
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
537
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, 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<{
|
|
538
|
-
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
539
|
-
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
540
|
-
readonly url: import("effect/Schema").String;
|
|
541
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/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<{
|
|
542
|
-
readonly key: import("effect/Schema").NonEmptyString;
|
|
543
|
-
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">]>>;
|
|
544
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
545
|
-
readonly valid: import("effect/Schema").Boolean;
|
|
546
|
-
readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
547
|
-
readonly message: import("effect/Schema").String;
|
|
548
|
-
readonly code: import("effect/Schema").String;
|
|
549
|
-
}>>;
|
|
550
|
-
readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
551
|
-
readonly id: import("effect/Schema").String;
|
|
552
|
-
readonly configId: import("effect/Schema").String;
|
|
553
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
554
|
-
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
555
|
-
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
556
|
-
readonly referenceId: import("effect/Schema").String;
|
|
557
|
-
readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
558
|
-
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
559
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
560
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
561
|
-
readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
562
|
-
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
|
|
563
|
-
}>>;
|
|
564
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-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<{
|
|
565
|
-
readonly password: import("effect/Schema").NonEmptyString;
|
|
566
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
567
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
568
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, never, never>, false>>;
|
|
568
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false>>;
|
|
@@ -8,6 +8,7 @@ type AuthFormProps = {
|
|
|
8
8
|
export declare function Signin(props: AuthFormProps): import("react").JSX.Element;
|
|
9
9
|
export declare function Signup(props: AuthFormProps): import("react").JSX.Element;
|
|
10
10
|
export declare function VerifyEmail(props: AuthFormProps): import("react").JSX.Element;
|
|
11
|
+
export declare function ForgotPassword(props: AuthFormProps): import("react").JSX.Element;
|
|
11
12
|
export declare function ResetPassword(props: AuthFormProps): import("react").JSX.Element;
|
|
12
13
|
export declare function TwoFactor(props: AuthFormProps): import("react").JSX.Element;
|
|
13
14
|
export {};
|