@banata-auth/convex 0.1.0
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/LICENSE +21 -0
- package/README.md +104 -0
- package/dist/auth-config.d.ts +22 -0
- package/dist/auth-config.d.ts.map +1 -0
- package/dist/auth-config.js +3 -0
- package/dist/auth-config.js.map +1 -0
- package/dist/auth.d.ts +462 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/component/adapter.d.ts +21 -0
- package/dist/component/adapter.d.ts.map +1 -0
- package/dist/component/adapter.js +3 -0
- package/dist/component/adapter.js.map +1 -0
- package/dist/component/schema.d.ts +1026 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/hooks.d.ts +25 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/http.d.ts +41 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +62 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9516 -0
- package/dist/index.js.map +1 -0
- package/dist/node.d.ts +389 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +9559 -0
- package/dist/node.js.map +1 -0
- package/dist/plugins/audit.d.ts +106 -0
- package/dist/plugins/audit.d.ts.map +1 -0
- package/dist/plugins/config.d.ts +83 -0
- package/dist/plugins/config.d.ts.map +1 -0
- package/dist/plugins/domains.d.ts +3 -0
- package/dist/plugins/domains.d.ts.map +1 -0
- package/dist/plugins/email-sender.d.ts +75 -0
- package/dist/plugins/email-sender.d.ts.map +1 -0
- package/dist/plugins/email-templates.d.ts +108 -0
- package/dist/plugins/email-templates.d.ts.map +1 -0
- package/dist/plugins/email.d.ts +82 -0
- package/dist/plugins/email.d.ts.map +1 -0
- package/dist/plugins/enterprise.d.ts +3 -0
- package/dist/plugins/enterprise.d.ts.map +1 -0
- package/dist/plugins/events.d.ts +40 -0
- package/dist/plugins/events.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +18 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +9192 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/organization-rbac.d.ts +3 -0
- package/dist/plugins/organization-rbac.d.ts.map +1 -0
- package/dist/plugins/portal.d.ts +34 -0
- package/dist/plugins/portal.d.ts.map +1 -0
- package/dist/plugins/projects.d.ts +16 -0
- package/dist/plugins/projects.d.ts.map +1 -0
- package/dist/plugins/protection.d.ts +127 -0
- package/dist/plugins/protection.d.ts.map +1 -0
- package/dist/plugins/types.d.ts +508 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/user-management.d.ts +8 -0
- package/dist/plugins/user-management.d.ts.map +1 -0
- package/dist/plugins/vault.d.ts +68 -0
- package/dist/plugins/vault.d.ts.map +1 -0
- package/dist/plugins/webhook.d.ts +65 -0
- package/dist/plugins/webhook.d.ts.map +1 -0
- package/dist/triggers.d.ts +158 -0
- package/dist/triggers.d.ts.map +1 -0
- package/dist/triggers.js +36 -0
- package/dist/triggers.js.map +1 -0
- package/package.json +102 -0
- package/src/component/adapter.ts +21 -0
- package/src/component/convex.config.ts +15 -0
- package/src/component/schema.ts +916 -0
package/dist/node.d.ts
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import type { createClient } from "@convex-dev/better-auth";
|
|
2
|
+
import type { GenericCtx } from "@convex-dev/better-auth/utils";
|
|
3
|
+
import type { BetterAuthPlugin } from "better-auth";
|
|
4
|
+
import { betterAuth } from "better-auth";
|
|
5
|
+
import type { AuthConfig, GenericDataModel } from "convex/server";
|
|
6
|
+
import { type BanataAuthConfig } from "./auth";
|
|
7
|
+
type ComponentClient = ReturnType<typeof createClient>;
|
|
8
|
+
type CreateNodeAuth = ReturnType<typeof betterAuth>;
|
|
9
|
+
export interface SerializedAuthHeader {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SerializedAuthRequest {
|
|
14
|
+
method: string;
|
|
15
|
+
url: string;
|
|
16
|
+
headers: SerializedAuthHeader[];
|
|
17
|
+
body: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface SerializedAuthResponse {
|
|
20
|
+
status: number;
|
|
21
|
+
headers: SerializedAuthHeader[];
|
|
22
|
+
body: string | null;
|
|
23
|
+
}
|
|
24
|
+
export declare function blockUnsafeEnterprisePaths(): BetterAuthPlugin;
|
|
25
|
+
export declare function createBanataNodeAuthOptions(ctx: GenericCtx<GenericDataModel>, params: {
|
|
26
|
+
authComponent: ComponentClient;
|
|
27
|
+
authConfig: AuthConfig;
|
|
28
|
+
config: BanataAuthConfig;
|
|
29
|
+
}): {
|
|
30
|
+
disabledPaths: string[];
|
|
31
|
+
plugins: BetterAuthPlugin[];
|
|
32
|
+
appName?: string | undefined;
|
|
33
|
+
baseURL?: string | undefined;
|
|
34
|
+
basePath?: string | undefined;
|
|
35
|
+
secret?: string | undefined;
|
|
36
|
+
database?: (import("kysely").PostgresPool | import("kysely").MysqlPool | import("kysely").SqliteDatabase | import("kysely").Dialect | import("better-auth").DBAdapterInstance | Database | import("node:sqlite").DatabaseSync | {
|
|
37
|
+
dialect: import("kysely").Dialect;
|
|
38
|
+
type: "postgres" | "mysql" | "sqlite" | "mssql";
|
|
39
|
+
casing?: "snake" | "camel";
|
|
40
|
+
debugLogs?: import("better-auth/adapters").DBAdapterDebugLogOption;
|
|
41
|
+
transaction?: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
db: import("kysely").Kysely<any>;
|
|
44
|
+
type: "postgres" | "mysql" | "sqlite" | "mssql";
|
|
45
|
+
casing?: "snake" | "camel";
|
|
46
|
+
debugLogs?: import("better-auth/adapters").DBAdapterDebugLogOption;
|
|
47
|
+
transaction?: boolean;
|
|
48
|
+
}) | undefined;
|
|
49
|
+
secondaryStorage?: import("better-auth").SecondaryStorage | undefined;
|
|
50
|
+
emailVerification?: {
|
|
51
|
+
sendVerificationEmail?: (data: {
|
|
52
|
+
user: import("better-auth").User;
|
|
53
|
+
url: string;
|
|
54
|
+
token: string;
|
|
55
|
+
}, request?: Request) => Promise<void>;
|
|
56
|
+
sendOnSignUp?: boolean;
|
|
57
|
+
sendOnSignIn?: boolean;
|
|
58
|
+
autoSignInAfterVerification?: boolean;
|
|
59
|
+
expiresIn?: number;
|
|
60
|
+
onEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
61
|
+
beforeEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
62
|
+
afterEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
63
|
+
} | undefined;
|
|
64
|
+
emailAndPassword?: {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
disableSignUp?: boolean;
|
|
67
|
+
requireEmailVerification?: boolean;
|
|
68
|
+
maxPasswordLength?: number;
|
|
69
|
+
minPasswordLength?: number;
|
|
70
|
+
sendResetPassword?: (data: {
|
|
71
|
+
user: import("better-auth").User;
|
|
72
|
+
url: string;
|
|
73
|
+
token: string;
|
|
74
|
+
}, request?: Request) => Promise<void>;
|
|
75
|
+
resetPasswordTokenExpiresIn?: number;
|
|
76
|
+
onPasswordReset?: (data: {
|
|
77
|
+
user: import("better-auth").User;
|
|
78
|
+
}, request?: Request) => Promise<void>;
|
|
79
|
+
password?: {
|
|
80
|
+
hash?: (password: string) => Promise<string>;
|
|
81
|
+
verify?: (data: {
|
|
82
|
+
hash: string;
|
|
83
|
+
password: string;
|
|
84
|
+
}) => Promise<boolean>;
|
|
85
|
+
};
|
|
86
|
+
autoSignIn?: boolean;
|
|
87
|
+
revokeSessionsOnPasswordReset?: boolean;
|
|
88
|
+
} | undefined;
|
|
89
|
+
socialProviders?: import("better-auth").SocialProviders | undefined;
|
|
90
|
+
user?: {
|
|
91
|
+
modelName?: string;
|
|
92
|
+
fields?: Partial<Record<"name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt", string>>;
|
|
93
|
+
additionalFields?: {
|
|
94
|
+
[key: string]: import("better-auth").DBFieldAttribute;
|
|
95
|
+
};
|
|
96
|
+
changeEmail?: {
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
sendChangeEmailVerification?: (data: {
|
|
99
|
+
user: import("better-auth").User;
|
|
100
|
+
newEmail: string;
|
|
101
|
+
url: string;
|
|
102
|
+
token: string;
|
|
103
|
+
}, request?: Request) => Promise<void>;
|
|
104
|
+
sendChangeEmailConfirmation?: (data: {
|
|
105
|
+
user: import("better-auth").User;
|
|
106
|
+
newEmail: string;
|
|
107
|
+
url: string;
|
|
108
|
+
token: string;
|
|
109
|
+
}, request?: Request) => Promise<void>;
|
|
110
|
+
updateEmailWithoutVerification?: boolean;
|
|
111
|
+
};
|
|
112
|
+
deleteUser?: {
|
|
113
|
+
enabled?: boolean;
|
|
114
|
+
sendDeleteAccountVerification?: (data: {
|
|
115
|
+
user: import("better-auth").User;
|
|
116
|
+
url: string;
|
|
117
|
+
token: string;
|
|
118
|
+
}, request?: Request) => Promise<void>;
|
|
119
|
+
beforeDelete?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
120
|
+
afterDelete?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
121
|
+
deleteTokenExpiresIn?: number;
|
|
122
|
+
};
|
|
123
|
+
} | undefined;
|
|
124
|
+
session?: {
|
|
125
|
+
modelName?: string;
|
|
126
|
+
fields?: Partial<Record<"createdAt" | "updatedAt" | "userId" | "expiresAt" | "ipAddress" | "userAgent" | "token", string>>;
|
|
127
|
+
expiresIn?: number;
|
|
128
|
+
updateAge?: number;
|
|
129
|
+
disableSessionRefresh?: boolean;
|
|
130
|
+
additionalFields?: {
|
|
131
|
+
[key: string]: import("better-auth").DBFieldAttribute;
|
|
132
|
+
};
|
|
133
|
+
storeSessionInDatabase?: boolean;
|
|
134
|
+
preserveSessionInDatabase?: boolean;
|
|
135
|
+
cookieCache?: {
|
|
136
|
+
maxAge?: number;
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
strategy?: "compact" | "jwt" | "jwe";
|
|
139
|
+
refreshCache?: boolean | {
|
|
140
|
+
updateAge?: number;
|
|
141
|
+
};
|
|
142
|
+
version?: string | ((session: import("better-auth").Session & Record<string, any>, user: import("better-auth").User & Record<string, any>) => string) | ((session: import("better-auth").Session & Record<string, any>, user: import("better-auth").User & Record<string, any>) => Promise<string>);
|
|
143
|
+
};
|
|
144
|
+
freshAge?: number;
|
|
145
|
+
} | undefined;
|
|
146
|
+
account?: {
|
|
147
|
+
modelName?: string;
|
|
148
|
+
fields?: Partial<Record<"createdAt" | "updatedAt" | "userId" | "password" | "providerId" | "accountId" | "accessToken" | "refreshToken" | "idToken" | "scope" | "accessTokenExpiresAt" | "refreshTokenExpiresAt", string>>;
|
|
149
|
+
additionalFields?: {
|
|
150
|
+
[key: string]: import("better-auth").DBFieldAttribute;
|
|
151
|
+
};
|
|
152
|
+
updateAccountOnSignIn?: boolean;
|
|
153
|
+
accountLinking?: {
|
|
154
|
+
enabled?: boolean;
|
|
155
|
+
disableImplicitLinking?: boolean;
|
|
156
|
+
trustedProviders?: Array<import("@better-auth/core").LiteralUnion<import("better-auth").SocialProviderList[number] | "email-password", string>>;
|
|
157
|
+
allowDifferentEmails?: boolean;
|
|
158
|
+
allowUnlinkingAll?: boolean;
|
|
159
|
+
updateUserInfoOnLink?: boolean;
|
|
160
|
+
};
|
|
161
|
+
encryptOAuthTokens?: boolean;
|
|
162
|
+
skipStateCookieCheck?: boolean;
|
|
163
|
+
storeStateStrategy?: "database" | "cookie";
|
|
164
|
+
storeAccountCookie?: boolean;
|
|
165
|
+
} | undefined;
|
|
166
|
+
verification?: {
|
|
167
|
+
modelName?: string;
|
|
168
|
+
fields?: Partial<Record<"createdAt" | "updatedAt" | "expiresAt" | "value" | "identifier", string>>;
|
|
169
|
+
additionalFields?: {
|
|
170
|
+
[key: string]: import("better-auth").DBFieldAttribute;
|
|
171
|
+
};
|
|
172
|
+
disableCleanup?: boolean;
|
|
173
|
+
} | undefined;
|
|
174
|
+
trustedOrigins?: (string[] | ((request?: Request | undefined) => import("better-auth").Awaitable<(string | undefined | null)[]>)) | undefined;
|
|
175
|
+
rateLimit?: import("better-auth").BetterAuthRateLimitOptions | undefined;
|
|
176
|
+
advanced?: import("better-auth").BetterAuthAdvancedOptions | undefined;
|
|
177
|
+
logger?: import("better-auth").Logger | undefined;
|
|
178
|
+
databaseHooks?: {
|
|
179
|
+
user?: {
|
|
180
|
+
create?: {
|
|
181
|
+
before?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
182
|
+
data: {
|
|
183
|
+
id?: string | undefined;
|
|
184
|
+
createdAt?: Date | undefined;
|
|
185
|
+
updatedAt?: Date | undefined;
|
|
186
|
+
email?: string | undefined;
|
|
187
|
+
emailVerified?: boolean | undefined;
|
|
188
|
+
name?: string | undefined;
|
|
189
|
+
image?: string | null | undefined;
|
|
190
|
+
} & Record<string, any>;
|
|
191
|
+
}>;
|
|
192
|
+
after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
193
|
+
};
|
|
194
|
+
update?: {
|
|
195
|
+
before?: (user: Partial<import("better-auth").User> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
196
|
+
data: {
|
|
197
|
+
[x: string]: any;
|
|
198
|
+
id?: string | undefined;
|
|
199
|
+
createdAt?: Date | undefined;
|
|
200
|
+
updatedAt?: Date | undefined;
|
|
201
|
+
email?: string | undefined;
|
|
202
|
+
emailVerified?: boolean | undefined;
|
|
203
|
+
name?: string | undefined;
|
|
204
|
+
image?: string | null | undefined;
|
|
205
|
+
};
|
|
206
|
+
}>;
|
|
207
|
+
after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
208
|
+
};
|
|
209
|
+
delete?: {
|
|
210
|
+
before?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
211
|
+
after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
session?: {
|
|
215
|
+
create?: {
|
|
216
|
+
before?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
217
|
+
data: {
|
|
218
|
+
id?: string | undefined;
|
|
219
|
+
createdAt?: Date | undefined;
|
|
220
|
+
updatedAt?: Date | undefined;
|
|
221
|
+
userId?: string | undefined;
|
|
222
|
+
expiresAt?: Date | undefined;
|
|
223
|
+
token?: string | undefined;
|
|
224
|
+
ipAddress?: string | null | undefined;
|
|
225
|
+
userAgent?: string | null | undefined;
|
|
226
|
+
} & Record<string, any>;
|
|
227
|
+
}>;
|
|
228
|
+
after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
229
|
+
};
|
|
230
|
+
update?: {
|
|
231
|
+
before?: (session: Partial<import("better-auth").Session> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
232
|
+
data: {
|
|
233
|
+
[x: string]: any;
|
|
234
|
+
id?: string | undefined;
|
|
235
|
+
createdAt?: Date | undefined;
|
|
236
|
+
updatedAt?: Date | undefined;
|
|
237
|
+
userId?: string | undefined;
|
|
238
|
+
expiresAt?: Date | undefined;
|
|
239
|
+
token?: string | undefined;
|
|
240
|
+
ipAddress?: string | null | undefined;
|
|
241
|
+
userAgent?: string | null | undefined;
|
|
242
|
+
};
|
|
243
|
+
}>;
|
|
244
|
+
after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
245
|
+
};
|
|
246
|
+
delete?: {
|
|
247
|
+
before?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
248
|
+
after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
account?: {
|
|
252
|
+
create?: {
|
|
253
|
+
before?: (account: import("better-auth").Account, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
254
|
+
data: {
|
|
255
|
+
id?: string | undefined;
|
|
256
|
+
createdAt?: Date | undefined;
|
|
257
|
+
updatedAt?: Date | undefined;
|
|
258
|
+
providerId?: string | undefined;
|
|
259
|
+
accountId?: string | undefined;
|
|
260
|
+
userId?: string | undefined;
|
|
261
|
+
accessToken?: string | null | undefined;
|
|
262
|
+
refreshToken?: string | null | undefined;
|
|
263
|
+
idToken?: string | null | undefined;
|
|
264
|
+
accessTokenExpiresAt?: Date | null | undefined;
|
|
265
|
+
refreshTokenExpiresAt?: Date | null | undefined;
|
|
266
|
+
scope?: string | null | undefined;
|
|
267
|
+
password?: string | null | undefined;
|
|
268
|
+
} & Record<string, any>;
|
|
269
|
+
}>;
|
|
270
|
+
after?: (account: import("better-auth").Account, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
271
|
+
};
|
|
272
|
+
update?: {
|
|
273
|
+
before?: (account: Partial<import("better-auth").Account> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
274
|
+
data: {
|
|
275
|
+
[x: string]: any;
|
|
276
|
+
id?: string | undefined;
|
|
277
|
+
createdAt?: Date | undefined;
|
|
278
|
+
updatedAt?: Date | undefined;
|
|
279
|
+
providerId?: string | undefined;
|
|
280
|
+
accountId?: string | undefined;
|
|
281
|
+
userId?: string | undefined;
|
|
282
|
+
accessToken?: string | null | undefined;
|
|
283
|
+
refreshToken?: string | null | undefined;
|
|
284
|
+
idToken?: string | null | undefined;
|
|
285
|
+
accessTokenExpiresAt?: Date | null | undefined;
|
|
286
|
+
refreshTokenExpiresAt?: Date | null | undefined;
|
|
287
|
+
scope?: string | null | undefined;
|
|
288
|
+
password?: string | null | undefined;
|
|
289
|
+
};
|
|
290
|
+
}>;
|
|
291
|
+
after?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
292
|
+
};
|
|
293
|
+
delete?: {
|
|
294
|
+
before?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
295
|
+
after?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
verification?: {
|
|
299
|
+
create?: {
|
|
300
|
+
before?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
301
|
+
data: {
|
|
302
|
+
id?: string | undefined;
|
|
303
|
+
createdAt?: Date | undefined;
|
|
304
|
+
updatedAt?: Date | undefined;
|
|
305
|
+
value?: string | undefined;
|
|
306
|
+
expiresAt?: Date | undefined;
|
|
307
|
+
identifier?: string | undefined;
|
|
308
|
+
} & Record<string, any>;
|
|
309
|
+
}>;
|
|
310
|
+
after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
311
|
+
};
|
|
312
|
+
update?: {
|
|
313
|
+
before?: (verification: Partial<import("better-auth").Verification> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
314
|
+
data: {
|
|
315
|
+
[x: string]: any;
|
|
316
|
+
id?: string | undefined;
|
|
317
|
+
createdAt?: Date | undefined;
|
|
318
|
+
updatedAt?: Date | undefined;
|
|
319
|
+
value?: string | undefined;
|
|
320
|
+
expiresAt?: Date | undefined;
|
|
321
|
+
identifier?: string | undefined;
|
|
322
|
+
};
|
|
323
|
+
}>;
|
|
324
|
+
after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
325
|
+
};
|
|
326
|
+
delete?: {
|
|
327
|
+
before?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
328
|
+
after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
} | undefined;
|
|
332
|
+
onAPIError?: {
|
|
333
|
+
throw?: boolean;
|
|
334
|
+
onError?: (error: unknown, ctx: import("better-auth").AuthContext) => void | Promise<void>;
|
|
335
|
+
errorURL?: string;
|
|
336
|
+
customizeDefaultErrorPage?: {
|
|
337
|
+
colors?: {
|
|
338
|
+
background?: string;
|
|
339
|
+
foreground?: string;
|
|
340
|
+
primary?: string;
|
|
341
|
+
primaryForeground?: string;
|
|
342
|
+
mutedForeground?: string;
|
|
343
|
+
border?: string;
|
|
344
|
+
destructive?: string;
|
|
345
|
+
titleBorder?: string;
|
|
346
|
+
titleColor?: string;
|
|
347
|
+
gridColor?: string;
|
|
348
|
+
cardBackground?: string;
|
|
349
|
+
cornerBorder?: string;
|
|
350
|
+
};
|
|
351
|
+
size?: {
|
|
352
|
+
radiusSm?: string;
|
|
353
|
+
radiusMd?: string;
|
|
354
|
+
radiusLg?: string;
|
|
355
|
+
textSm?: string;
|
|
356
|
+
text2xl?: string;
|
|
357
|
+
text4xl?: string;
|
|
358
|
+
text6xl?: string;
|
|
359
|
+
};
|
|
360
|
+
font?: {
|
|
361
|
+
defaultFamily?: string;
|
|
362
|
+
monoFamily?: string;
|
|
363
|
+
};
|
|
364
|
+
disableTitleBorder?: boolean;
|
|
365
|
+
disableCornerDecorations?: boolean;
|
|
366
|
+
disableBackgroundGrid?: boolean;
|
|
367
|
+
};
|
|
368
|
+
} | undefined;
|
|
369
|
+
hooks?: {
|
|
370
|
+
before?: import("better-auth/api").AuthMiddleware;
|
|
371
|
+
after?: import("better-auth/api").AuthMiddleware;
|
|
372
|
+
} | undefined;
|
|
373
|
+
telemetry?: {
|
|
374
|
+
enabled?: boolean;
|
|
375
|
+
debug?: boolean;
|
|
376
|
+
} | undefined;
|
|
377
|
+
experimental?: {
|
|
378
|
+
joins?: boolean;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
export declare function createBanataNodeAuth(ctx: GenericCtx<GenericDataModel>, params: {
|
|
382
|
+
authComponent: ComponentClient;
|
|
383
|
+
authConfig: AuthConfig;
|
|
384
|
+
config: BanataAuthConfig;
|
|
385
|
+
}): CreateNodeAuth;
|
|
386
|
+
export declare function deserializeAuthResponse(serialized: SerializedAuthResponse): import("undici-types").Response;
|
|
387
|
+
export declare function handleBanataNodeAuthRequest(ctx: GenericCtx<GenericDataModel>, createAuth: (ctx: GenericCtx<GenericDataModel>) => CreateNodeAuth, serialized: SerializedAuthRequest): Promise<SerializedAuthResponse>;
|
|
388
|
+
export {};
|
|
389
|
+
//# sourceMappingURL=node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAA2B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAExE,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvD,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAWpD,MAAM,WAAW,oBAAoB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE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