@krak-stack/auth 0.1.62 → 0.1.64
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 +18 -0
- package/dist/api.d.ts +366 -366
- package/dist/components/auth-client-api.d.ts +185 -185
- package/dist/components/auth-client.d.ts +6 -2
- package/dist/components/auth-client.js +4 -1
- package/dist/components/auth-forms.js +48 -37
- package/dist/components/index.d.ts +1 -1
- package/dist/components/user-button.d.ts +3 -2
- package/dist/components/user-button.js +2 -2
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,188 +1,5 @@
|
|
|
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<"
|
|
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<{
|
|
2
|
+
export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpApi.AtomHttpApiClient<object, `AuthClientApi:${string}`, 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<{
|
|
186
3
|
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
187
4
|
readonly rootHostname: import("effect/Schema").NonEmptyString;
|
|
188
5
|
readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
@@ -565,4 +382,187 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
|
|
|
565
382
|
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
566
383
|
}>>>;
|
|
567
384
|
readonly createdAt: import("effect/Schema").Date;
|
|
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
|
|
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> | 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<{
|
|
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>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { apiKeyClient } from "@better-auth/api-key/client";
|
|
2
|
+
import type { BetterAuthClientOptions } from "@better-auth/core";
|
|
2
3
|
import { adminClient, anonymousClient, emailOTPClient, genericOAuthClient, inferAdditionalFields, lastLoginMethodClient, organizationClient, twoFactorClient } from "better-auth/client/plugins";
|
|
3
4
|
import { type ReactAuthClient } from "better-auth/react";
|
|
4
5
|
declare const additionalFields: {
|
|
@@ -37,10 +38,13 @@ type AuthUiClientPlugins = [
|
|
|
37
38
|
ReturnType<typeof apiKeyClient>,
|
|
38
39
|
ReturnType<typeof genericOAuthClient>
|
|
39
40
|
];
|
|
40
|
-
type AuthUiClientOptions = {
|
|
41
|
+
type AuthUiClientOptions = BetterAuthClientOptions & {
|
|
41
42
|
baseURL?: string | undefined;
|
|
42
43
|
plugins: AuthUiClientPlugins;
|
|
43
44
|
};
|
|
45
|
+
type CreateAuthUiClientOptions = {
|
|
46
|
+
credentials?: RequestCredentials | undefined;
|
|
47
|
+
};
|
|
44
48
|
export type AuthUiClient = ReactAuthClient<AuthUiClientOptions>;
|
|
45
|
-
export declare const createAuthUiClient: (baseUrl?: string | undefined) => ReactAuthClient<AuthUiClientOptions>;
|
|
49
|
+
export declare const createAuthUiClient: (baseUrl?: string | undefined, options?: CreateAuthUiClientOptions) => ReactAuthClient<AuthUiClientOptions>;
|
|
46
50
|
export {};
|
|
@@ -37,7 +37,10 @@ const authUiClientPlugins = [
|
|
|
37
37
|
apiKeyClient(),
|
|
38
38
|
genericOAuthClient(),
|
|
39
39
|
];
|
|
40
|
-
export const createAuthUiClient = (baseUrl) => createAuthClient({
|
|
40
|
+
export const createAuthUiClient = (baseUrl, options) => createAuthClient({
|
|
41
41
|
...(baseUrl ? { baseURL: baseUrl } : {}),
|
|
42
|
+
fetchOptions: {
|
|
43
|
+
credentials: options?.credentials ?? "include",
|
|
44
|
+
},
|
|
42
45
|
plugins: authUiClientPlugins,
|
|
43
46
|
});
|