@neondatabase/auth 0.2.0-beta.1 → 0.4.0-beta
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 +201 -0
- package/README.md +22 -7
- package/codemods/migrate-auth-ui-imports.mjs +439 -0
- package/dist/{adapter-core-CnrOXh1T.d.mts → adapter-core-BWM7cWOp.d.mts} +465 -401
- package/dist/{adapter-core-CtmnMMJ7.mjs → adapter-core-Bt4M5I2g.mjs} +21 -11
- package/dist/auth-interface-Clz-oWq1.d.mts +8 -0
- package/dist/better-auth-helpers-Bkezghej.mjs +541 -0
- package/dist/{better-auth-react-adapter-DNi5PC5D.d.mts → better-auth-react-adapter-BDxJ65mF.d.mts} +389 -302
- package/dist/{better-auth-react-adapter-Dv-o6A6O.mjs → better-auth-react-adapter-aMv8WeDb.mjs} +1 -1
- package/dist/{index-CzsGMS7C.d.mts → index-DHryUj7e.d.mts} +0 -1
- package/dist/index.d.mts +94 -5
- package/dist/index.mjs +4 -3
- package/dist/{neon-auth-Cs2cWh1B.mjs → neon-auth-CS4FpK2X.mjs} +1 -1
- package/dist/next/index.d.mts +161 -73
- package/dist/next/index.mjs +5 -4
- package/dist/next/server/index.d.mts +25 -5
- package/dist/next/server/index.mjs +369 -251
- package/dist/react/adapters/index.d.mts +3 -3
- package/dist/react/adapters/index.mjs +2 -2
- package/dist/react/index.d.mts +6 -5
- package/dist/react/index.mjs +5 -5
- package/dist/react/ui/index.d.mts +1 -2
- package/dist/react/ui/index.mjs +2 -4
- package/dist/react/ui/server.mjs +2 -2
- package/dist/{supabase-adapter-DUqw2fw8.d.mts → supabase-adapter-BGwV0Vu2.d.mts} +429 -373
- package/dist/{supabase-adapter-BlcGPyOf.mjs → supabase-adapter-DBt4LJJd.mjs} +3 -514
- package/dist/types/index.d.mts +2 -2
- package/dist/ui/.safelist.html +1 -1
- package/dist/ui/css.css +2 -2
- package/dist/ui/theme.css +1 -1
- package/dist/ui-CnVnqGns.mjs +3 -0
- package/dist/vanilla/adapters/index.d.mts +4 -3
- package/dist/vanilla/adapters/index.mjs +2 -2
- package/dist/vanilla/index.d.mts +4 -3
- package/dist/vanilla/index.mjs +2 -2
- package/llms.txt +2 -2
- package/package.json +27 -21
- package/dist/chunk-VCZJYX65-CLnrj1o7-D6ZQkcc_.mjs +0 -543
- package/dist/constants-Cupc_bln.mjs +0 -28
- package/dist/neon-auth-BEGCfAe6.d.mts +0 -107
- package/dist/ui-COLWzDsu.mjs +0 -12469
- /package/dist/{adapters-B7YKkjaL.mjs → adapters-CUvhsAvY.mjs} +0 -0
- /package/dist/{index-CPnFzULh.d.mts → index-B0Pd4HOH.d.mts} +0 -0
- /package/dist/{index-OEBbnNdr.d.mts → index-CzpoWrv9.d.mts} +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import * as better_auth_react1 from "better-auth/react";
|
|
1
2
|
import { createAuthClient } from "better-auth/react";
|
|
2
|
-
import * as
|
|
3
|
+
import * as better_auth_client0 from "better-auth/client";
|
|
3
4
|
import { BetterAuthClientOptions, createAuthClient as createAuthClient$1 } from "better-auth/client";
|
|
4
|
-
import * as
|
|
5
|
+
import * as zod0 from "zod";
|
|
6
|
+
import * as jose1 from "jose";
|
|
5
7
|
import { Session, User } from "better-auth/types";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
+
import * as better_auth_plugins43 from "better-auth/plugins";
|
|
9
|
+
import * as better_auth311 from "better-auth";
|
|
10
|
+
import * as _better_fetch_fetch183 from "@better-fetch/fetch";
|
|
8
11
|
import { BetterFetchError, BetterFetchError as BetterFetchError$1 } from "@better-fetch/fetch";
|
|
9
|
-
import * as better_auth_plugins5 from "better-auth/plugins";
|
|
10
|
-
import * as nanostores0 from "nanostores";
|
|
11
|
-
import * as better_call0 from "better-call";
|
|
12
12
|
import { Invitation, InvitationInput, InvitationStatus, Member, MemberInput, Organization, OrganizationInput, OrganizationRole, Team, TeamInput, TeamMember, TeamMemberInput } from "better-auth/plugins/organization";
|
|
13
13
|
import { JWKOptions, JWSAlgorithms, Jwk, JwtOptions } from "better-auth/plugins/jwt";
|
|
14
14
|
import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "better-auth/plugins/admin";
|
|
15
15
|
import { EmailOTPOptions } from "better-auth/plugins/email-otp";
|
|
16
|
+
import { MagicLinkOptions } from "better-auth/plugins/magic-link";
|
|
16
17
|
|
|
17
18
|
//#region src/core/better-auth-types.d.ts
|
|
18
19
|
type BetterAuthSession = Session;
|
|
@@ -20,11 +21,19 @@ type BetterAuthUser = User;
|
|
|
20
21
|
type BetterAuthErrorResponse = BetterFetchError;
|
|
21
22
|
//#endregion
|
|
22
23
|
//#region src/types/index.d.ts
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Type representing the Better Auth React client
|
|
26
|
+
*/
|
|
27
|
+
type ReactBetterAuthClient = ReturnType<typeof createAuthClient<{
|
|
24
28
|
plugins: SupportedBetterAuthClientPlugins;
|
|
25
|
-
}
|
|
29
|
+
}>>;
|
|
30
|
+
/**
|
|
31
|
+
* Type representing the Better Auth Vanilla client
|
|
32
|
+
*/
|
|
33
|
+
type VanillaBetterAuthClient = ReturnType<typeof createAuthClient$1<{
|
|
26
34
|
plugins: SupportedBetterAuthClientPlugins;
|
|
27
35
|
}>>;
|
|
36
|
+
type BetterAuthInstance = VanillaBetterAuthClient | ReactBetterAuthClient;
|
|
28
37
|
//#endregion
|
|
29
38
|
//#region src/core/adapter-core.d.ts
|
|
30
39
|
interface NeonAuthAdapterCoreAuthOptions extends Omit<BetterAuthClientOptions, 'plugins'> {}
|
|
@@ -33,7 +42,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
33
42
|
pathMethods: {
|
|
34
43
|
"/token/anonymous": "GET";
|
|
35
44
|
};
|
|
36
|
-
getActions: ($fetch:
|
|
45
|
+
getActions: ($fetch: _better_fetch_fetch183.BetterFetch) => {
|
|
37
46
|
getAnonymousToken: (fetchOptions?: any) => Promise<{
|
|
38
47
|
data: {
|
|
39
48
|
token: string;
|
|
@@ -51,11 +60,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
51
60
|
};
|
|
52
61
|
} | {
|
|
53
62
|
id: "better-auth-client";
|
|
54
|
-
$InferServerPlugin: ReturnType<(
|
|
63
|
+
$InferServerPlugin: ReturnType<(<O extends better_auth_plugins43.JwtOptions>(options?: O) => {
|
|
55
64
|
id: "jwt";
|
|
56
|
-
options:
|
|
65
|
+
options: NoInfer<O>;
|
|
57
66
|
endpoints: {
|
|
58
|
-
getJwks:
|
|
67
|
+
getJwks: better_auth311.StrictEndpoint<string, {
|
|
59
68
|
method: "GET";
|
|
60
69
|
metadata: {
|
|
61
70
|
openapi: {
|
|
@@ -131,13 +140,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
131
140
|
};
|
|
132
141
|
};
|
|
133
142
|
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
}, jose0.JSONWebKeySet>;
|
|
137
|
-
getToken: better_call0.StrictEndpoint<"/token", {
|
|
143
|
+
}, jose1.JSONWebKeySet>;
|
|
144
|
+
getToken: better_auth311.StrictEndpoint<"/token", {
|
|
138
145
|
method: "GET";
|
|
139
146
|
requireHeaders: true;
|
|
140
|
-
use: ((inputContext:
|
|
147
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
141
148
|
session: {
|
|
142
149
|
session: Record<string, any> & {
|
|
143
150
|
id: string;
|
|
@@ -183,35 +190,29 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
183
190
|
};
|
|
184
191
|
};
|
|
185
192
|
};
|
|
186
|
-
} & {
|
|
187
|
-
use: any[];
|
|
188
193
|
}, {
|
|
189
194
|
token: string;
|
|
190
195
|
}>;
|
|
191
|
-
signJWT:
|
|
196
|
+
signJWT: better_auth311.StrictEndpoint<string, {
|
|
192
197
|
method: "POST";
|
|
193
198
|
metadata: {
|
|
194
|
-
SERVER_ONLY: true;
|
|
195
199
|
$Infer: {
|
|
196
200
|
body: {
|
|
197
|
-
payload:
|
|
198
|
-
overrideOptions?:
|
|
201
|
+
payload: jose1.JWTPayload;
|
|
202
|
+
overrideOptions?: better_auth_plugins43.JwtOptions | undefined;
|
|
199
203
|
};
|
|
200
204
|
};
|
|
201
205
|
};
|
|
202
|
-
body:
|
|
203
|
-
payload:
|
|
204
|
-
overrideOptions:
|
|
205
|
-
},
|
|
206
|
-
} & {
|
|
207
|
-
use: any[];
|
|
206
|
+
body: zod0.ZodObject<{
|
|
207
|
+
payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
208
|
+
overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
209
|
+
}, better_auth311.$strip>;
|
|
208
210
|
}, {
|
|
209
211
|
token: string;
|
|
210
212
|
}>;
|
|
211
|
-
verifyJWT:
|
|
213
|
+
verifyJWT: better_auth311.StrictEndpoint<string, {
|
|
212
214
|
method: "POST";
|
|
213
215
|
metadata: {
|
|
214
|
-
SERVER_ONLY: true;
|
|
215
216
|
$Infer: {
|
|
216
217
|
body: {
|
|
217
218
|
token: string;
|
|
@@ -226,20 +227,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
226
227
|
};
|
|
227
228
|
};
|
|
228
229
|
};
|
|
229
|
-
body:
|
|
230
|
-
token:
|
|
231
|
-
issuer:
|
|
232
|
-
},
|
|
233
|
-
} & {
|
|
234
|
-
use: any[];
|
|
230
|
+
body: zod0.ZodObject<{
|
|
231
|
+
token: zod0.ZodString;
|
|
232
|
+
issuer: zod0.ZodOptional<zod0.ZodString>;
|
|
233
|
+
}, better_auth311.$strip>;
|
|
235
234
|
}, {
|
|
236
|
-
payload: (
|
|
235
|
+
payload: (jose1.JWTPayload & Required<Pick<jose1.JWTPayload, "sub" | "aud">>) | null;
|
|
237
236
|
}>;
|
|
238
237
|
};
|
|
239
238
|
hooks: {
|
|
240
239
|
after: {
|
|
241
|
-
matcher(context:
|
|
242
|
-
handler: (inputContext:
|
|
240
|
+
matcher(context: better_auth311.HookEndpointContext): boolean;
|
|
241
|
+
handler: (inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<void>;
|
|
243
242
|
}[];
|
|
244
243
|
};
|
|
245
244
|
schema: {
|
|
@@ -264,11 +263,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
264
263
|
};
|
|
265
264
|
};
|
|
266
265
|
};
|
|
267
|
-
}>;
|
|
266
|
+
})>;
|
|
268
267
|
pathMethods: {
|
|
269
268
|
[x: string]: "GET";
|
|
270
269
|
};
|
|
271
|
-
getActions: ($fetch:
|
|
270
|
+
getActions: ($fetch: _better_fetch_fetch183.BetterFetch) => {
|
|
272
271
|
jwks: (fetchOptions?: any) => Promise<{
|
|
273
272
|
data: null;
|
|
274
273
|
error: {
|
|
@@ -277,7 +276,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
277
276
|
statusText: string;
|
|
278
277
|
};
|
|
279
278
|
} | {
|
|
280
|
-
data:
|
|
279
|
+
data: jose1.JSONWebKeySet;
|
|
281
280
|
error: null;
|
|
282
281
|
}>;
|
|
283
282
|
};
|
|
@@ -323,7 +322,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
323
322
|
token: string;
|
|
324
323
|
ipAddress?: string | null | undefined;
|
|
325
324
|
userAgent?: string | null | undefined;
|
|
326
|
-
} & Record<string, unknown>, ctx:
|
|
325
|
+
} & Record<string, unknown>, ctx: better_auth311.GenericEndpointContext | null): Promise<void>;
|
|
327
326
|
};
|
|
328
327
|
};
|
|
329
328
|
};
|
|
@@ -331,22 +330,22 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
331
330
|
};
|
|
332
331
|
hooks: {
|
|
333
332
|
after: {
|
|
334
|
-
matcher(context:
|
|
335
|
-
handler: (inputContext:
|
|
333
|
+
matcher(context: better_auth311.HookEndpointContext): boolean;
|
|
334
|
+
handler: (inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<better_auth_plugins43.SessionWithImpersonatedBy[] | undefined>;
|
|
336
335
|
}[];
|
|
337
336
|
};
|
|
338
337
|
endpoints: {
|
|
339
|
-
setRole:
|
|
338
|
+
setRole: better_auth311.StrictEndpoint<"/admin/set-role", {
|
|
340
339
|
method: "POST";
|
|
341
|
-
body:
|
|
342
|
-
userId:
|
|
343
|
-
role:
|
|
344
|
-
},
|
|
340
|
+
body: zod0.ZodObject<{
|
|
341
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
342
|
+
role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
|
|
343
|
+
}, better_auth311.$strip>;
|
|
345
344
|
requireHeaders: true;
|
|
346
|
-
use: ((inputContext:
|
|
345
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
347
346
|
session: {
|
|
348
|
-
user:
|
|
349
|
-
session:
|
|
347
|
+
user: better_auth_plugins43.UserWithRole;
|
|
348
|
+
session: better_auth311.Session;
|
|
350
349
|
};
|
|
351
350
|
}>)[];
|
|
352
351
|
metadata: {
|
|
@@ -379,20 +378,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
379
378
|
};
|
|
380
379
|
};
|
|
381
380
|
};
|
|
382
|
-
} & {
|
|
383
|
-
use: any[];
|
|
384
381
|
}, {
|
|
385
|
-
user:
|
|
382
|
+
user: better_auth_plugins43.UserWithRole;
|
|
386
383
|
}>;
|
|
387
|
-
getUser:
|
|
384
|
+
getUser: better_auth311.StrictEndpoint<"/admin/get-user", {
|
|
388
385
|
method: "GET";
|
|
389
|
-
query:
|
|
390
|
-
id:
|
|
391
|
-
},
|
|
392
|
-
use: ((inputContext:
|
|
386
|
+
query: zod0.ZodObject<{
|
|
387
|
+
id: zod0.ZodString;
|
|
388
|
+
}, better_auth311.$strip>;
|
|
389
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
393
390
|
session: {
|
|
394
|
-
user:
|
|
395
|
-
session:
|
|
391
|
+
user: better_auth_plugins43.UserWithRole;
|
|
392
|
+
session: better_auth311.Session;
|
|
396
393
|
};
|
|
397
394
|
}>)[];
|
|
398
395
|
metadata: {
|
|
@@ -419,26 +416,16 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
419
416
|
};
|
|
420
417
|
};
|
|
421
418
|
};
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
}, {
|
|
425
|
-
id: string;
|
|
426
|
-
createdAt: Date;
|
|
427
|
-
updatedAt: Date;
|
|
428
|
-
email: string;
|
|
429
|
-
emailVerified: boolean;
|
|
430
|
-
name: string;
|
|
431
|
-
image?: string | null | undefined;
|
|
432
|
-
}>;
|
|
433
|
-
createUser: better_call0.StrictEndpoint<"/admin/create-user", {
|
|
419
|
+
}, better_auth_plugins43.UserWithRole>;
|
|
420
|
+
createUser: better_auth311.StrictEndpoint<"/admin/create-user", {
|
|
434
421
|
method: "POST";
|
|
435
|
-
body:
|
|
436
|
-
email:
|
|
437
|
-
password:
|
|
438
|
-
name:
|
|
439
|
-
role:
|
|
440
|
-
data:
|
|
441
|
-
},
|
|
422
|
+
body: zod0.ZodObject<{
|
|
423
|
+
email: zod0.ZodString;
|
|
424
|
+
password: zod0.ZodOptional<zod0.ZodString>;
|
|
425
|
+
name: zod0.ZodString;
|
|
426
|
+
role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
|
|
427
|
+
data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
428
|
+
}, better_auth311.$strip>;
|
|
442
429
|
metadata: {
|
|
443
430
|
openapi: {
|
|
444
431
|
operationId: string;
|
|
@@ -465,28 +452,26 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
465
452
|
$Infer: {
|
|
466
453
|
body: {
|
|
467
454
|
email: string;
|
|
468
|
-
password
|
|
455
|
+
password?: string | undefined;
|
|
469
456
|
name: string;
|
|
470
457
|
role?: "user" | "admin" | ("user" | "admin")[] | undefined;
|
|
471
458
|
data?: Record<string, any> | undefined;
|
|
472
459
|
};
|
|
473
460
|
};
|
|
474
461
|
};
|
|
475
|
-
} & {
|
|
476
|
-
use: any[];
|
|
477
462
|
}, {
|
|
478
|
-
user:
|
|
463
|
+
user: better_auth_plugins43.UserWithRole;
|
|
479
464
|
}>;
|
|
480
|
-
adminUpdateUser:
|
|
465
|
+
adminUpdateUser: better_auth311.StrictEndpoint<"/admin/update-user", {
|
|
481
466
|
method: "POST";
|
|
482
|
-
body:
|
|
483
|
-
userId:
|
|
484
|
-
data:
|
|
485
|
-
},
|
|
486
|
-
use: ((inputContext:
|
|
467
|
+
body: zod0.ZodObject<{
|
|
468
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
469
|
+
data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
|
|
470
|
+
}, better_auth311.$strip>;
|
|
471
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
487
472
|
session: {
|
|
488
|
-
user:
|
|
489
|
-
session:
|
|
473
|
+
user: better_auth_plugins43.UserWithRole;
|
|
474
|
+
session: better_auth311.Session;
|
|
490
475
|
};
|
|
491
476
|
}>)[];
|
|
492
477
|
metadata: {
|
|
@@ -513,38 +498,36 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
513
498
|
};
|
|
514
499
|
};
|
|
515
500
|
};
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
}, better_auth_plugins5.UserWithRole>;
|
|
519
|
-
listUsers: better_call0.StrictEndpoint<"/admin/list-users", {
|
|
501
|
+
}, better_auth_plugins43.UserWithRole>;
|
|
502
|
+
listUsers: better_auth311.StrictEndpoint<"/admin/list-users", {
|
|
520
503
|
method: "GET";
|
|
521
|
-
use: ((inputContext:
|
|
504
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
522
505
|
session: {
|
|
523
|
-
user:
|
|
524
|
-
session:
|
|
506
|
+
user: better_auth_plugins43.UserWithRole;
|
|
507
|
+
session: better_auth311.Session;
|
|
525
508
|
};
|
|
526
509
|
}>)[];
|
|
527
|
-
query:
|
|
528
|
-
searchValue:
|
|
529
|
-
searchField:
|
|
510
|
+
query: zod0.ZodObject<{
|
|
511
|
+
searchValue: zod0.ZodOptional<zod0.ZodString>;
|
|
512
|
+
searchField: zod0.ZodOptional<zod0.ZodEnum<{
|
|
530
513
|
name: "name";
|
|
531
514
|
email: "email";
|
|
532
515
|
}>>;
|
|
533
|
-
searchOperator:
|
|
516
|
+
searchOperator: zod0.ZodOptional<zod0.ZodEnum<{
|
|
534
517
|
contains: "contains";
|
|
535
518
|
starts_with: "starts_with";
|
|
536
519
|
ends_with: "ends_with";
|
|
537
520
|
}>>;
|
|
538
|
-
limit:
|
|
539
|
-
offset:
|
|
540
|
-
sortBy:
|
|
541
|
-
sortDirection:
|
|
521
|
+
limit: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodString, zod0.ZodNumber]>>;
|
|
522
|
+
offset: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodString, zod0.ZodNumber]>>;
|
|
523
|
+
sortBy: zod0.ZodOptional<zod0.ZodString>;
|
|
524
|
+
sortDirection: zod0.ZodOptional<zod0.ZodEnum<{
|
|
542
525
|
asc: "asc";
|
|
543
526
|
desc: "desc";
|
|
544
527
|
}>>;
|
|
545
|
-
filterField:
|
|
546
|
-
filterValue:
|
|
547
|
-
filterOperator:
|
|
528
|
+
filterField: zod0.ZodOptional<zod0.ZodString>;
|
|
529
|
+
filterValue: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodUnion<[zod0.ZodString, zod0.ZodNumber]>, zod0.ZodBoolean]>>;
|
|
530
|
+
filterOperator: zod0.ZodOptional<zod0.ZodEnum<{
|
|
548
531
|
eq: "eq";
|
|
549
532
|
ne: "ne";
|
|
550
533
|
lt: "lt";
|
|
@@ -553,7 +536,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
553
536
|
gte: "gte";
|
|
554
537
|
contains: "contains";
|
|
555
538
|
}>>;
|
|
556
|
-
},
|
|
539
|
+
}, better_auth311.$strip>;
|
|
557
540
|
metadata: {
|
|
558
541
|
openapi: {
|
|
559
542
|
operationId: string;
|
|
@@ -591,10 +574,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
591
574
|
};
|
|
592
575
|
};
|
|
593
576
|
};
|
|
594
|
-
} & {
|
|
595
|
-
use: any[];
|
|
596
577
|
}, {
|
|
597
|
-
users:
|
|
578
|
+
users: better_auth_plugins43.UserWithRole[];
|
|
598
579
|
total: number;
|
|
599
580
|
limit: number | undefined;
|
|
600
581
|
offset: number | undefined;
|
|
@@ -602,17 +583,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
602
583
|
users: never[];
|
|
603
584
|
total: number;
|
|
604
585
|
}>;
|
|
605
|
-
listUserSessions:
|
|
586
|
+
listUserSessions: better_auth311.StrictEndpoint<"/admin/list-user-sessions", {
|
|
606
587
|
method: "POST";
|
|
607
|
-
use: ((inputContext:
|
|
588
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
608
589
|
session: {
|
|
609
|
-
user:
|
|
610
|
-
session:
|
|
590
|
+
user: better_auth_plugins43.UserWithRole;
|
|
591
|
+
session: better_auth311.Session;
|
|
611
592
|
};
|
|
612
593
|
}>)[];
|
|
613
|
-
body:
|
|
614
|
-
userId:
|
|
615
|
-
},
|
|
594
|
+
body: zod0.ZodObject<{
|
|
595
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
596
|
+
}, better_auth311.$strip>;
|
|
616
597
|
metadata: {
|
|
617
598
|
openapi: {
|
|
618
599
|
operationId: string;
|
|
@@ -640,20 +621,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
640
621
|
};
|
|
641
622
|
};
|
|
642
623
|
};
|
|
643
|
-
} & {
|
|
644
|
-
use: any[];
|
|
645
624
|
}, {
|
|
646
|
-
sessions:
|
|
625
|
+
sessions: better_auth_plugins43.SessionWithImpersonatedBy[];
|
|
647
626
|
}>;
|
|
648
|
-
unbanUser:
|
|
627
|
+
unbanUser: better_auth311.StrictEndpoint<"/admin/unban-user", {
|
|
649
628
|
method: "POST";
|
|
650
|
-
body:
|
|
651
|
-
userId:
|
|
652
|
-
},
|
|
653
|
-
use: ((inputContext:
|
|
629
|
+
body: zod0.ZodObject<{
|
|
630
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
631
|
+
}, better_auth311.$strip>;
|
|
632
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
654
633
|
session: {
|
|
655
|
-
user:
|
|
656
|
-
session:
|
|
634
|
+
user: better_auth_plugins43.UserWithRole;
|
|
635
|
+
session: better_auth311.Session;
|
|
657
636
|
};
|
|
658
637
|
}>)[];
|
|
659
638
|
metadata: {
|
|
@@ -680,30 +659,20 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
680
659
|
};
|
|
681
660
|
};
|
|
682
661
|
};
|
|
683
|
-
} & {
|
|
684
|
-
use: any[];
|
|
685
662
|
}, {
|
|
686
|
-
user:
|
|
687
|
-
id: string;
|
|
688
|
-
createdAt: Date;
|
|
689
|
-
updatedAt: Date;
|
|
690
|
-
email: string;
|
|
691
|
-
emailVerified: boolean;
|
|
692
|
-
name: string;
|
|
693
|
-
image?: string | null | undefined;
|
|
694
|
-
} & Record<string, any>;
|
|
663
|
+
user: better_auth_plugins43.UserWithRole;
|
|
695
664
|
}>;
|
|
696
|
-
banUser:
|
|
665
|
+
banUser: better_auth311.StrictEndpoint<"/admin/ban-user", {
|
|
697
666
|
method: "POST";
|
|
698
|
-
body:
|
|
699
|
-
userId:
|
|
700
|
-
banReason:
|
|
701
|
-
banExpiresIn:
|
|
702
|
-
},
|
|
703
|
-
use: ((inputContext:
|
|
667
|
+
body: zod0.ZodObject<{
|
|
668
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
669
|
+
banReason: zod0.ZodOptional<zod0.ZodString>;
|
|
670
|
+
banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
|
|
671
|
+
}, better_auth311.$strip>;
|
|
672
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
704
673
|
session: {
|
|
705
|
-
user:
|
|
706
|
-
session:
|
|
674
|
+
user: better_auth_plugins43.UserWithRole;
|
|
675
|
+
session: better_auth311.Session;
|
|
707
676
|
};
|
|
708
677
|
}>)[];
|
|
709
678
|
metadata: {
|
|
@@ -730,28 +699,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
730
699
|
};
|
|
731
700
|
};
|
|
732
701
|
};
|
|
733
|
-
} & {
|
|
734
|
-
use: any[];
|
|
735
702
|
}, {
|
|
736
|
-
user:
|
|
737
|
-
id: string;
|
|
738
|
-
createdAt: Date;
|
|
739
|
-
updatedAt: Date;
|
|
740
|
-
email: string;
|
|
741
|
-
emailVerified: boolean;
|
|
742
|
-
name: string;
|
|
743
|
-
image?: string | null | undefined;
|
|
744
|
-
} & Record<string, any>;
|
|
703
|
+
user: better_auth_plugins43.UserWithRole;
|
|
745
704
|
}>;
|
|
746
|
-
impersonateUser:
|
|
705
|
+
impersonateUser: better_auth311.StrictEndpoint<"/admin/impersonate-user", {
|
|
747
706
|
method: "POST";
|
|
748
|
-
body:
|
|
749
|
-
userId:
|
|
750
|
-
},
|
|
751
|
-
use: ((inputContext:
|
|
707
|
+
body: zod0.ZodObject<{
|
|
708
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
709
|
+
}, better_auth311.$strip>;
|
|
710
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
752
711
|
session: {
|
|
753
|
-
user:
|
|
754
|
-
session:
|
|
712
|
+
user: better_auth_plugins43.UserWithRole;
|
|
713
|
+
session: better_auth311.Session;
|
|
755
714
|
};
|
|
756
715
|
}>)[];
|
|
757
716
|
metadata: {
|
|
@@ -781,8 +740,6 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
781
740
|
};
|
|
782
741
|
};
|
|
783
742
|
};
|
|
784
|
-
} & {
|
|
785
|
-
use: any[];
|
|
786
743
|
}, {
|
|
787
744
|
session: {
|
|
788
745
|
id: string;
|
|
@@ -794,26 +751,41 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
794
751
|
ipAddress?: string | null | undefined;
|
|
795
752
|
userAgent?: string | null | undefined;
|
|
796
753
|
};
|
|
797
|
-
user:
|
|
754
|
+
user: better_auth_plugins43.UserWithRole;
|
|
798
755
|
}>;
|
|
799
|
-
stopImpersonating:
|
|
756
|
+
stopImpersonating: better_auth311.StrictEndpoint<"/admin/stop-impersonating", {
|
|
800
757
|
method: "POST";
|
|
801
758
|
requireHeaders: true;
|
|
802
|
-
} & {
|
|
803
|
-
use: any[];
|
|
804
759
|
}, {
|
|
805
|
-
session:
|
|
806
|
-
|
|
760
|
+
session: {
|
|
761
|
+
id: string;
|
|
762
|
+
createdAt: Date;
|
|
763
|
+
updatedAt: Date;
|
|
764
|
+
userId: string;
|
|
765
|
+
expiresAt: Date;
|
|
766
|
+
token: string;
|
|
767
|
+
ipAddress?: string | null | undefined;
|
|
768
|
+
userAgent?: string | null | undefined;
|
|
769
|
+
} & Record<string, any>;
|
|
770
|
+
user: {
|
|
771
|
+
id: string;
|
|
772
|
+
createdAt: Date;
|
|
773
|
+
updatedAt: Date;
|
|
774
|
+
email: string;
|
|
775
|
+
emailVerified: boolean;
|
|
776
|
+
name: string;
|
|
777
|
+
image?: string | null | undefined;
|
|
778
|
+
} & Record<string, any>;
|
|
807
779
|
}>;
|
|
808
|
-
revokeUserSession:
|
|
780
|
+
revokeUserSession: better_auth311.StrictEndpoint<"/admin/revoke-user-session", {
|
|
809
781
|
method: "POST";
|
|
810
|
-
body:
|
|
811
|
-
sessionToken:
|
|
812
|
-
},
|
|
813
|
-
use: ((inputContext:
|
|
782
|
+
body: zod0.ZodObject<{
|
|
783
|
+
sessionToken: zod0.ZodString;
|
|
784
|
+
}, better_auth311.$strip>;
|
|
785
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
814
786
|
session: {
|
|
815
|
-
user:
|
|
816
|
-
session:
|
|
787
|
+
user: better_auth_plugins43.UserWithRole;
|
|
788
|
+
session: better_auth311.Session;
|
|
817
789
|
};
|
|
818
790
|
}>)[];
|
|
819
791
|
metadata: {
|
|
@@ -840,20 +812,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
840
812
|
};
|
|
841
813
|
};
|
|
842
814
|
};
|
|
843
|
-
} & {
|
|
844
|
-
use: any[];
|
|
845
815
|
}, {
|
|
846
816
|
success: boolean;
|
|
847
817
|
}>;
|
|
848
|
-
revokeUserSessions:
|
|
818
|
+
revokeUserSessions: better_auth311.StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
849
819
|
method: "POST";
|
|
850
|
-
body:
|
|
851
|
-
userId:
|
|
852
|
-
},
|
|
853
|
-
use: ((inputContext:
|
|
820
|
+
body: zod0.ZodObject<{
|
|
821
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
822
|
+
}, better_auth311.$strip>;
|
|
823
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
854
824
|
session: {
|
|
855
|
-
user:
|
|
856
|
-
session:
|
|
825
|
+
user: better_auth_plugins43.UserWithRole;
|
|
826
|
+
session: better_auth311.Session;
|
|
857
827
|
};
|
|
858
828
|
}>)[];
|
|
859
829
|
metadata: {
|
|
@@ -880,20 +850,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
880
850
|
};
|
|
881
851
|
};
|
|
882
852
|
};
|
|
883
|
-
} & {
|
|
884
|
-
use: any[];
|
|
885
853
|
}, {
|
|
886
854
|
success: boolean;
|
|
887
855
|
}>;
|
|
888
|
-
removeUser:
|
|
856
|
+
removeUser: better_auth311.StrictEndpoint<"/admin/remove-user", {
|
|
889
857
|
method: "POST";
|
|
890
|
-
body:
|
|
891
|
-
userId:
|
|
892
|
-
},
|
|
893
|
-
use: ((inputContext:
|
|
858
|
+
body: zod0.ZodObject<{
|
|
859
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
860
|
+
}, better_auth311.$strip>;
|
|
861
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
894
862
|
session: {
|
|
895
|
-
user:
|
|
896
|
-
session:
|
|
863
|
+
user: better_auth_plugins43.UserWithRole;
|
|
864
|
+
session: better_auth311.Session;
|
|
897
865
|
};
|
|
898
866
|
}>)[];
|
|
899
867
|
metadata: {
|
|
@@ -920,21 +888,19 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
920
888
|
};
|
|
921
889
|
};
|
|
922
890
|
};
|
|
923
|
-
} & {
|
|
924
|
-
use: any[];
|
|
925
891
|
}, {
|
|
926
892
|
success: boolean;
|
|
927
893
|
}>;
|
|
928
|
-
setUserPassword:
|
|
894
|
+
setUserPassword: better_auth311.StrictEndpoint<"/admin/set-user-password", {
|
|
929
895
|
method: "POST";
|
|
930
|
-
body:
|
|
931
|
-
newPassword:
|
|
932
|
-
userId:
|
|
933
|
-
},
|
|
934
|
-
use: ((inputContext:
|
|
896
|
+
body: zod0.ZodObject<{
|
|
897
|
+
newPassword: zod0.ZodString;
|
|
898
|
+
userId: zod0.ZodCoercedString<unknown>;
|
|
899
|
+
}, better_auth311.$strip>;
|
|
900
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<{
|
|
935
901
|
session: {
|
|
936
|
-
user:
|
|
937
|
-
session:
|
|
902
|
+
user: better_auth_plugins43.UserWithRole;
|
|
903
|
+
session: better_auth311.Session;
|
|
938
904
|
};
|
|
939
905
|
}>)[];
|
|
940
906
|
metadata: {
|
|
@@ -961,23 +927,21 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
961
927
|
};
|
|
962
928
|
};
|
|
963
929
|
};
|
|
964
|
-
} & {
|
|
965
|
-
use: any[];
|
|
966
930
|
}, {
|
|
967
931
|
status: boolean;
|
|
968
932
|
}>;
|
|
969
|
-
userHasPermission:
|
|
933
|
+
userHasPermission: better_auth311.StrictEndpoint<"/admin/has-permission", {
|
|
970
934
|
method: "POST";
|
|
971
|
-
body:
|
|
972
|
-
userId:
|
|
973
|
-
role:
|
|
974
|
-
},
|
|
975
|
-
permission:
|
|
976
|
-
permissions:
|
|
977
|
-
},
|
|
978
|
-
permission:
|
|
979
|
-
permissions:
|
|
980
|
-
},
|
|
935
|
+
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
936
|
+
userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
|
|
937
|
+
role: zod0.ZodOptional<zod0.ZodString>;
|
|
938
|
+
}, better_auth311.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
|
|
939
|
+
permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
940
|
+
permissions: zod0.ZodUndefined;
|
|
941
|
+
}, better_auth311.$strip>, zod0.ZodObject<{
|
|
942
|
+
permission: zod0.ZodUndefined;
|
|
943
|
+
permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
944
|
+
}, better_auth311.$strip>]>>;
|
|
981
945
|
metadata: {
|
|
982
946
|
openapi: {
|
|
983
947
|
description: string;
|
|
@@ -1043,8 +1007,6 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1043
1007
|
};
|
|
1044
1008
|
};
|
|
1045
1009
|
};
|
|
1046
|
-
} & {
|
|
1047
|
-
use: any[];
|
|
1048
1010
|
}, {
|
|
1049
1011
|
error: null;
|
|
1050
1012
|
success: boolean;
|
|
@@ -1071,6 +1033,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1071
1033
|
readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
|
|
1072
1034
|
readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
|
|
1073
1035
|
readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
|
|
1036
|
+
readonly INVALID_ROLE_TYPE: "Invalid role type";
|
|
1074
1037
|
};
|
|
1075
1038
|
schema: {
|
|
1076
1039
|
user: {
|
|
@@ -1107,7 +1070,16 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1107
1070
|
};
|
|
1108
1071
|
};
|
|
1109
1072
|
};
|
|
1110
|
-
options:
|
|
1073
|
+
options: NoInfer<{
|
|
1074
|
+
ac: better_auth_plugins43.AccessControl<{
|
|
1075
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1076
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
1077
|
+
}>;
|
|
1078
|
+
roles: {
|
|
1079
|
+
admin: better_auth_plugins43.Role;
|
|
1080
|
+
user: better_auth_plugins43.Role;
|
|
1081
|
+
};
|
|
1082
|
+
}>;
|
|
1111
1083
|
};
|
|
1112
1084
|
getActions: () => {
|
|
1113
1085
|
admin: {
|
|
@@ -1134,8 +1106,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1134
1106
|
};
|
|
1135
1107
|
} | {
|
|
1136
1108
|
id: "organization";
|
|
1137
|
-
$InferServerPlugin:
|
|
1138
|
-
ac:
|
|
1109
|
+
$InferServerPlugin: better_auth_plugins43.OrganizationPlugin<{
|
|
1110
|
+
ac: better_auth_plugins43.AccessControl<{
|
|
1139
1111
|
readonly organization: readonly ["update", "delete"];
|
|
1140
1112
|
readonly member: readonly ["create", "update", "delete"];
|
|
1141
1113
|
readonly invitation: readonly ["create", "cancel"];
|
|
@@ -1143,9 +1115,9 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1143
1115
|
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
1144
1116
|
}>;
|
|
1145
1117
|
roles: {
|
|
1146
|
-
admin:
|
|
1147
|
-
member:
|
|
1148
|
-
owner:
|
|
1118
|
+
admin: better_auth_plugins43.Role;
|
|
1119
|
+
member: better_auth_plugins43.Role;
|
|
1120
|
+
owner: better_auth_plugins43.Role;
|
|
1149
1121
|
};
|
|
1150
1122
|
teams: {
|
|
1151
1123
|
enabled: false;
|
|
@@ -1153,27 +1125,27 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1153
1125
|
schema: {
|
|
1154
1126
|
organization?: {
|
|
1155
1127
|
additionalFields?: {
|
|
1156
|
-
[key: string]:
|
|
1128
|
+
[key: string]: better_auth311.DBFieldAttribute;
|
|
1157
1129
|
};
|
|
1158
1130
|
};
|
|
1159
1131
|
member?: {
|
|
1160
1132
|
additionalFields?: {
|
|
1161
|
-
[key: string]:
|
|
1133
|
+
[key: string]: better_auth311.DBFieldAttribute;
|
|
1162
1134
|
};
|
|
1163
1135
|
};
|
|
1164
1136
|
invitation?: {
|
|
1165
1137
|
additionalFields?: {
|
|
1166
|
-
[key: string]:
|
|
1138
|
+
[key: string]: better_auth311.DBFieldAttribute;
|
|
1167
1139
|
};
|
|
1168
1140
|
};
|
|
1169
1141
|
team?: {
|
|
1170
1142
|
additionalFields?: {
|
|
1171
|
-
[key: string]:
|
|
1143
|
+
[key: string]: better_auth311.DBFieldAttribute;
|
|
1172
1144
|
};
|
|
1173
1145
|
};
|
|
1174
1146
|
organizationRole?: {
|
|
1175
1147
|
additionalFields?: {
|
|
1176
|
-
[key: string]:
|
|
1148
|
+
[key: string]: better_auth311.DBFieldAttribute;
|
|
1177
1149
|
};
|
|
1178
1150
|
};
|
|
1179
1151
|
} | undefined;
|
|
@@ -1181,7 +1153,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1181
1153
|
enabled: false;
|
|
1182
1154
|
};
|
|
1183
1155
|
}>;
|
|
1184
|
-
getActions: ($fetch:
|
|
1156
|
+
getActions: ($fetch: _better_fetch_fetch183.BetterFetch, _$store: better_auth311.ClientStore, co: BetterAuthClientOptions | undefined) => {
|
|
1185
1157
|
$Infer: {
|
|
1186
1158
|
ActiveOrganization: {
|
|
1187
1159
|
members: {
|
|
@@ -1202,7 +1174,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1202
1174
|
organizationId: string;
|
|
1203
1175
|
email: string;
|
|
1204
1176
|
role: "admin" | "member" | "owner";
|
|
1205
|
-
status:
|
|
1177
|
+
status: better_auth_plugins43.InvitationStatus;
|
|
1206
1178
|
inviterId: string;
|
|
1207
1179
|
expiresAt: Date;
|
|
1208
1180
|
createdAt: Date;
|
|
@@ -1228,7 +1200,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1228
1200
|
organizationId: string;
|
|
1229
1201
|
email: string;
|
|
1230
1202
|
role: "admin" | "member" | "owner";
|
|
1231
|
-
status:
|
|
1203
|
+
status: better_auth_plugins43.InvitationStatus;
|
|
1232
1204
|
inviterId: string;
|
|
1233
1205
|
expiresAt: Date;
|
|
1234
1206
|
createdAt: Date;
|
|
@@ -1278,93 +1250,61 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1278
1250
|
}) => boolean;
|
|
1279
1251
|
};
|
|
1280
1252
|
};
|
|
1281
|
-
getAtoms: ($fetch:
|
|
1282
|
-
$listOrg:
|
|
1283
|
-
$activeOrgSignal:
|
|
1284
|
-
$activeMemberSignal:
|
|
1285
|
-
$activeMemberRoleSignal:
|
|
1286
|
-
activeOrganization:
|
|
1287
|
-
|
|
1253
|
+
getAtoms: ($fetch: _better_fetch_fetch183.BetterFetch) => {
|
|
1254
|
+
$listOrg: better_auth_react1.PreinitializedWritableAtom<boolean> & object;
|
|
1255
|
+
$activeOrgSignal: better_auth_react1.PreinitializedWritableAtom<boolean> & object;
|
|
1256
|
+
$activeMemberSignal: better_auth_react1.PreinitializedWritableAtom<boolean> & object;
|
|
1257
|
+
$activeMemberRoleSignal: better_auth_react1.PreinitializedWritableAtom<boolean> & object;
|
|
1258
|
+
activeOrganization: better_auth_client0.AuthQueryAtom<better_auth311.Prettify<{
|
|
1259
|
+
id: string;
|
|
1260
|
+
name: string;
|
|
1261
|
+
slug: string;
|
|
1262
|
+
createdAt: Date;
|
|
1263
|
+
logo?: string | null | undefined | undefined;
|
|
1264
|
+
metadata?: any;
|
|
1265
|
+
} & {
|
|
1266
|
+
members: {
|
|
1288
1267
|
id: string;
|
|
1289
|
-
|
|
1290
|
-
|
|
1268
|
+
organizationId: string;
|
|
1269
|
+
role: "admin" | "member" | "owner";
|
|
1291
1270
|
createdAt: Date;
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
} & {
|
|
1295
|
-
members: {
|
|
1296
|
-
id: string;
|
|
1297
|
-
organizationId: string;
|
|
1298
|
-
role: "admin" | "member" | "owner";
|
|
1299
|
-
createdAt: Date;
|
|
1300
|
-
userId: string;
|
|
1301
|
-
user: {
|
|
1302
|
-
id: string;
|
|
1303
|
-
email: string;
|
|
1304
|
-
name: string;
|
|
1305
|
-
image?: string | undefined;
|
|
1306
|
-
};
|
|
1307
|
-
}[];
|
|
1308
|
-
invitations: {
|
|
1271
|
+
userId: string;
|
|
1272
|
+
user: {
|
|
1309
1273
|
id: string;
|
|
1310
|
-
organizationId: string;
|
|
1311
1274
|
email: string;
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
}[];
|
|
1318
|
-
}> | null;
|
|
1319
|
-
error: null | _better_fetch_fetch88.BetterFetchError;
|
|
1320
|
-
isPending: boolean;
|
|
1321
|
-
isRefetching: boolean;
|
|
1322
|
-
refetch: (queryParams?: {
|
|
1323
|
-
query?: better_auth151.SessionQueryParams;
|
|
1324
|
-
} | undefined) => Promise<void>;
|
|
1325
|
-
}> & object;
|
|
1326
|
-
listOrganizations: nanostores0.PreinitializedWritableAtom<{
|
|
1327
|
-
data: {
|
|
1328
|
-
id: string;
|
|
1329
|
-
name: string;
|
|
1330
|
-
slug: string;
|
|
1331
|
-
createdAt: Date;
|
|
1332
|
-
logo?: string | null | undefined | undefined;
|
|
1333
|
-
metadata?: any;
|
|
1334
|
-
}[] | null;
|
|
1335
|
-
error: null | _better_fetch_fetch88.BetterFetchError;
|
|
1336
|
-
isPending: boolean;
|
|
1337
|
-
isRefetching: boolean;
|
|
1338
|
-
refetch: (queryParams?: {
|
|
1339
|
-
query?: better_auth151.SessionQueryParams;
|
|
1340
|
-
} | undefined) => Promise<void>;
|
|
1341
|
-
}> & object;
|
|
1342
|
-
activeMember: nanostores0.PreinitializedWritableAtom<{
|
|
1343
|
-
data: {
|
|
1275
|
+
name: string;
|
|
1276
|
+
image?: string | undefined;
|
|
1277
|
+
};
|
|
1278
|
+
}[];
|
|
1279
|
+
invitations: {
|
|
1344
1280
|
id: string;
|
|
1345
1281
|
organizationId: string;
|
|
1346
|
-
|
|
1347
|
-
role:
|
|
1282
|
+
email: string;
|
|
1283
|
+
role: "admin" | "member" | "owner";
|
|
1284
|
+
status: better_auth_plugins43.InvitationStatus;
|
|
1285
|
+
inviterId: string;
|
|
1286
|
+
expiresAt: Date;
|
|
1348
1287
|
createdAt: Date;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1288
|
+
}[];
|
|
1289
|
+
}>>;
|
|
1290
|
+
listOrganizations: better_auth_client0.AuthQueryAtom<{
|
|
1291
|
+
id: string;
|
|
1292
|
+
name: string;
|
|
1293
|
+
slug: string;
|
|
1294
|
+
createdAt: Date;
|
|
1295
|
+
logo?: string | null | undefined | undefined;
|
|
1296
|
+
metadata?: any;
|
|
1297
|
+
}[]>;
|
|
1298
|
+
activeMember: better_auth_client0.AuthQueryAtom<{
|
|
1299
|
+
id: string;
|
|
1300
|
+
organizationId: string;
|
|
1301
|
+
userId: string;
|
|
1302
|
+
role: string;
|
|
1303
|
+
createdAt: Date;
|
|
1304
|
+
}>;
|
|
1305
|
+
activeMemberRole: better_auth_client0.AuthQueryAtom<{
|
|
1306
|
+
role: string;
|
|
1307
|
+
}>;
|
|
1368
1308
|
};
|
|
1369
1309
|
pathMethods: {
|
|
1370
1310
|
"/organization/get-full-organization": "GET";
|
|
@@ -1388,13 +1328,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1388
1328
|
})[];
|
|
1389
1329
|
} | {
|
|
1390
1330
|
id: "email-otp";
|
|
1391
|
-
$InferServerPlugin: ReturnType<(options:
|
|
1331
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins43.EmailOTPOptions) => {
|
|
1392
1332
|
id: "email-otp";
|
|
1393
|
-
init(ctx:
|
|
1333
|
+
init(ctx: better_auth311.AuthContext): {
|
|
1394
1334
|
options: {
|
|
1395
1335
|
emailVerification: {
|
|
1396
1336
|
sendVerificationEmail(data: {
|
|
1397
|
-
user:
|
|
1337
|
+
user: better_auth311.User;
|
|
1398
1338
|
url: string;
|
|
1399
1339
|
token: string;
|
|
1400
1340
|
}, request: Request | undefined): Promise<void>;
|
|
@@ -1402,16 +1342,16 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1402
1342
|
};
|
|
1403
1343
|
} | undefined;
|
|
1404
1344
|
endpoints: {
|
|
1405
|
-
sendVerificationOTP:
|
|
1345
|
+
sendVerificationOTP: better_auth311.StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
1406
1346
|
method: "POST";
|
|
1407
|
-
body:
|
|
1408
|
-
email:
|
|
1409
|
-
type:
|
|
1347
|
+
body: zod0.ZodObject<{
|
|
1348
|
+
email: zod0.ZodString;
|
|
1349
|
+
type: zod0.ZodEnum<{
|
|
1410
1350
|
"sign-in": "sign-in";
|
|
1411
1351
|
"email-verification": "email-verification";
|
|
1412
1352
|
"forget-password": "forget-password";
|
|
1413
1353
|
}>;
|
|
1414
|
-
},
|
|
1354
|
+
}, better_auth311.$strip>;
|
|
1415
1355
|
metadata: {
|
|
1416
1356
|
openapi: {
|
|
1417
1357
|
operationId: string;
|
|
@@ -1435,23 +1375,20 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1435
1375
|
};
|
|
1436
1376
|
};
|
|
1437
1377
|
};
|
|
1438
|
-
} & {
|
|
1439
|
-
use: any[];
|
|
1440
1378
|
}, {
|
|
1441
1379
|
success: boolean;
|
|
1442
1380
|
}>;
|
|
1443
|
-
createVerificationOTP:
|
|
1381
|
+
createVerificationOTP: better_auth311.StrictEndpoint<string, {
|
|
1444
1382
|
method: "POST";
|
|
1445
|
-
body:
|
|
1446
|
-
email:
|
|
1447
|
-
type:
|
|
1383
|
+
body: zod0.ZodObject<{
|
|
1384
|
+
email: zod0.ZodString;
|
|
1385
|
+
type: zod0.ZodEnum<{
|
|
1448
1386
|
"sign-in": "sign-in";
|
|
1449
1387
|
"email-verification": "email-verification";
|
|
1450
1388
|
"forget-password": "forget-password";
|
|
1451
1389
|
}>;
|
|
1452
|
-
},
|
|
1390
|
+
}, better_auth311.$strip>;
|
|
1453
1391
|
metadata: {
|
|
1454
|
-
SERVER_ONLY: true;
|
|
1455
1392
|
openapi: {
|
|
1456
1393
|
operationId: string;
|
|
1457
1394
|
description: string;
|
|
@@ -1469,21 +1406,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1469
1406
|
};
|
|
1470
1407
|
};
|
|
1471
1408
|
};
|
|
1472
|
-
} & {
|
|
1473
|
-
use: any[];
|
|
1474
1409
|
}, string>;
|
|
1475
|
-
getVerificationOTP:
|
|
1410
|
+
getVerificationOTP: better_auth311.StrictEndpoint<string, {
|
|
1476
1411
|
method: "GET";
|
|
1477
|
-
query:
|
|
1478
|
-
email:
|
|
1479
|
-
type:
|
|
1412
|
+
query: zod0.ZodObject<{
|
|
1413
|
+
email: zod0.ZodString;
|
|
1414
|
+
type: zod0.ZodEnum<{
|
|
1480
1415
|
"sign-in": "sign-in";
|
|
1481
1416
|
"email-verification": "email-verification";
|
|
1482
1417
|
"forget-password": "forget-password";
|
|
1483
1418
|
}>;
|
|
1484
|
-
},
|
|
1419
|
+
}, better_auth311.$strip>;
|
|
1485
1420
|
metadata: {
|
|
1486
|
-
SERVER_ONLY: true;
|
|
1487
1421
|
openapi: {
|
|
1488
1422
|
operationId: string;
|
|
1489
1423
|
description: string;
|
|
@@ -1509,24 +1443,22 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1509
1443
|
};
|
|
1510
1444
|
};
|
|
1511
1445
|
};
|
|
1512
|
-
} & {
|
|
1513
|
-
use: any[];
|
|
1514
1446
|
}, {
|
|
1515
1447
|
otp: null;
|
|
1516
1448
|
} | {
|
|
1517
1449
|
otp: string;
|
|
1518
1450
|
}>;
|
|
1519
|
-
checkVerificationOTP:
|
|
1451
|
+
checkVerificationOTP: better_auth311.StrictEndpoint<"/email-otp/check-verification-otp", {
|
|
1520
1452
|
method: "POST";
|
|
1521
|
-
body:
|
|
1522
|
-
email:
|
|
1523
|
-
type:
|
|
1453
|
+
body: zod0.ZodObject<{
|
|
1454
|
+
email: zod0.ZodString;
|
|
1455
|
+
type: zod0.ZodEnum<{
|
|
1524
1456
|
"sign-in": "sign-in";
|
|
1525
1457
|
"email-verification": "email-verification";
|
|
1526
1458
|
"forget-password": "forget-password";
|
|
1527
1459
|
}>;
|
|
1528
|
-
otp:
|
|
1529
|
-
},
|
|
1460
|
+
otp: zod0.ZodString;
|
|
1461
|
+
}, better_auth311.$strip>;
|
|
1530
1462
|
metadata: {
|
|
1531
1463
|
openapi: {
|
|
1532
1464
|
operationId: string;
|
|
@@ -1550,17 +1482,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1550
1482
|
};
|
|
1551
1483
|
};
|
|
1552
1484
|
};
|
|
1553
|
-
} & {
|
|
1554
|
-
use: any[];
|
|
1555
1485
|
}, {
|
|
1556
1486
|
success: boolean;
|
|
1557
1487
|
}>;
|
|
1558
|
-
verifyEmailOTP:
|
|
1488
|
+
verifyEmailOTP: better_auth311.StrictEndpoint<"/email-otp/verify-email", {
|
|
1559
1489
|
method: "POST";
|
|
1560
|
-
body:
|
|
1561
|
-
email:
|
|
1562
|
-
otp:
|
|
1563
|
-
},
|
|
1490
|
+
body: zod0.ZodObject<{
|
|
1491
|
+
email: zod0.ZodString;
|
|
1492
|
+
otp: zod0.ZodString;
|
|
1493
|
+
}, better_auth311.$strip>;
|
|
1564
1494
|
metadata: {
|
|
1565
1495
|
openapi: {
|
|
1566
1496
|
description: string;
|
|
@@ -1594,39 +1524,37 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1594
1524
|
};
|
|
1595
1525
|
};
|
|
1596
1526
|
};
|
|
1597
|
-
} & {
|
|
1598
|
-
use: any[];
|
|
1599
1527
|
}, {
|
|
1600
1528
|
status: boolean;
|
|
1601
1529
|
token: string;
|
|
1602
1530
|
user: {
|
|
1603
1531
|
id: string;
|
|
1532
|
+
createdAt: Date;
|
|
1533
|
+
updatedAt: Date;
|
|
1604
1534
|
email: string;
|
|
1605
1535
|
emailVerified: boolean;
|
|
1606
1536
|
name: string;
|
|
1607
|
-
image
|
|
1608
|
-
|
|
1609
|
-
updatedAt: Date;
|
|
1610
|
-
};
|
|
1537
|
+
image?: string | null | undefined;
|
|
1538
|
+
} & Record<string, any>;
|
|
1611
1539
|
} | {
|
|
1612
1540
|
status: boolean;
|
|
1613
1541
|
token: null;
|
|
1614
1542
|
user: {
|
|
1615
1543
|
id: string;
|
|
1544
|
+
createdAt: Date;
|
|
1545
|
+
updatedAt: Date;
|
|
1616
1546
|
email: string;
|
|
1617
1547
|
emailVerified: boolean;
|
|
1618
1548
|
name: string;
|
|
1619
|
-
image
|
|
1620
|
-
|
|
1621
|
-
updatedAt: Date;
|
|
1622
|
-
};
|
|
1549
|
+
image?: string | null | undefined;
|
|
1550
|
+
} & Record<string, any>;
|
|
1623
1551
|
}>;
|
|
1624
|
-
signInEmailOTP:
|
|
1552
|
+
signInEmailOTP: better_auth311.StrictEndpoint<"/sign-in/email-otp", {
|
|
1625
1553
|
method: "POST";
|
|
1626
|
-
body:
|
|
1627
|
-
email:
|
|
1628
|
-
otp:
|
|
1629
|
-
},
|
|
1554
|
+
body: zod0.ZodObject<{
|
|
1555
|
+
email: zod0.ZodString;
|
|
1556
|
+
otp: zod0.ZodString;
|
|
1557
|
+
}, better_auth311.$strip>;
|
|
1630
1558
|
metadata: {
|
|
1631
1559
|
openapi: {
|
|
1632
1560
|
operationId: string;
|
|
@@ -1655,25 +1583,55 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1655
1583
|
};
|
|
1656
1584
|
};
|
|
1657
1585
|
};
|
|
1658
|
-
} & {
|
|
1659
|
-
use: any[];
|
|
1660
1586
|
}, {
|
|
1661
1587
|
token: string;
|
|
1662
1588
|
user: {
|
|
1663
1589
|
id: string;
|
|
1590
|
+
createdAt: Date;
|
|
1591
|
+
updatedAt: Date;
|
|
1664
1592
|
email: string;
|
|
1665
1593
|
emailVerified: boolean;
|
|
1666
1594
|
name: string;
|
|
1667
|
-
image
|
|
1668
|
-
createdAt: Date;
|
|
1669
|
-
updatedAt: Date;
|
|
1595
|
+
image?: string | null | undefined;
|
|
1670
1596
|
};
|
|
1671
1597
|
}>;
|
|
1672
|
-
|
|
1598
|
+
requestPasswordResetEmailOTP: better_auth311.StrictEndpoint<"/email-otp/request-password-reset", {
|
|
1673
1599
|
method: "POST";
|
|
1674
|
-
body:
|
|
1675
|
-
email:
|
|
1676
|
-
},
|
|
1600
|
+
body: zod0.ZodObject<{
|
|
1601
|
+
email: zod0.ZodString;
|
|
1602
|
+
}, better_auth311.$strip>;
|
|
1603
|
+
metadata: {
|
|
1604
|
+
openapi: {
|
|
1605
|
+
operationId: string;
|
|
1606
|
+
description: string;
|
|
1607
|
+
responses: {
|
|
1608
|
+
200: {
|
|
1609
|
+
description: string;
|
|
1610
|
+
content: {
|
|
1611
|
+
"application/json": {
|
|
1612
|
+
schema: {
|
|
1613
|
+
type: "object";
|
|
1614
|
+
properties: {
|
|
1615
|
+
success: {
|
|
1616
|
+
type: string;
|
|
1617
|
+
description: string;
|
|
1618
|
+
};
|
|
1619
|
+
};
|
|
1620
|
+
};
|
|
1621
|
+
};
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
};
|
|
1625
|
+
};
|
|
1626
|
+
};
|
|
1627
|
+
}, {
|
|
1628
|
+
success: boolean;
|
|
1629
|
+
}>;
|
|
1630
|
+
forgetPasswordEmailOTP: better_auth311.StrictEndpoint<"/forget-password/email-otp", {
|
|
1631
|
+
method: "POST";
|
|
1632
|
+
body: zod0.ZodObject<{
|
|
1633
|
+
email: zod0.ZodString;
|
|
1634
|
+
}, better_auth311.$strip>;
|
|
1677
1635
|
metadata: {
|
|
1678
1636
|
openapi: {
|
|
1679
1637
|
operationId: string;
|
|
@@ -1698,18 +1656,16 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1698
1656
|
};
|
|
1699
1657
|
};
|
|
1700
1658
|
};
|
|
1701
|
-
} & {
|
|
1702
|
-
use: any[];
|
|
1703
1659
|
}, {
|
|
1704
1660
|
success: boolean;
|
|
1705
1661
|
}>;
|
|
1706
|
-
resetPasswordEmailOTP:
|
|
1662
|
+
resetPasswordEmailOTP: better_auth311.StrictEndpoint<"/email-otp/reset-password", {
|
|
1707
1663
|
method: "POST";
|
|
1708
|
-
body:
|
|
1709
|
-
email:
|
|
1710
|
-
otp:
|
|
1711
|
-
password:
|
|
1712
|
-
},
|
|
1664
|
+
body: zod0.ZodObject<{
|
|
1665
|
+
email: zod0.ZodString;
|
|
1666
|
+
otp: zod0.ZodString;
|
|
1667
|
+
password: zod0.ZodString;
|
|
1668
|
+
}, better_auth311.$strip>;
|
|
1713
1669
|
metadata: {
|
|
1714
1670
|
openapi: {
|
|
1715
1671
|
operationId: string;
|
|
@@ -1733,16 +1689,14 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1733
1689
|
};
|
|
1734
1690
|
};
|
|
1735
1691
|
};
|
|
1736
|
-
} & {
|
|
1737
|
-
use: any[];
|
|
1738
1692
|
}, {
|
|
1739
1693
|
success: boolean;
|
|
1740
1694
|
}>;
|
|
1741
1695
|
};
|
|
1742
1696
|
hooks: {
|
|
1743
1697
|
after: {
|
|
1744
|
-
matcher(context:
|
|
1745
|
-
handler: (inputContext:
|
|
1698
|
+
matcher(context: better_auth311.HookEndpointContext): boolean;
|
|
1699
|
+
handler: (inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<void>;
|
|
1746
1700
|
}[];
|
|
1747
1701
|
};
|
|
1748
1702
|
$ERROR_CODES: {
|
|
@@ -1766,12 +1720,122 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1766
1720
|
pathMatcher(path: string): path is "/sign-in/email-otp";
|
|
1767
1721
|
window: number;
|
|
1768
1722
|
max: number;
|
|
1723
|
+
} | {
|
|
1724
|
+
pathMatcher(path: string): path is "/email-otp/request-password-reset";
|
|
1725
|
+
window: number;
|
|
1726
|
+
max: number;
|
|
1727
|
+
} | {
|
|
1728
|
+
pathMatcher(path: string): path is "/email-otp/reset-password";
|
|
1729
|
+
window: number;
|
|
1730
|
+
max: number;
|
|
1731
|
+
} | {
|
|
1732
|
+
pathMatcher(path: string): path is "/forget-password/email-otp";
|
|
1733
|
+
window: number;
|
|
1734
|
+
max: number;
|
|
1769
1735
|
})[];
|
|
1736
|
+
options: better_auth_plugins43.EmailOTPOptions;
|
|
1770
1737
|
}>;
|
|
1771
1738
|
atomListeners: {
|
|
1772
1739
|
matcher: (path: string) => path is "/email-otp/verify-email" | "/sign-in/email-otp";
|
|
1773
1740
|
signal: "$sessionSignal";
|
|
1774
1741
|
}[];
|
|
1742
|
+
} | {
|
|
1743
|
+
id: "magic-link";
|
|
1744
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins43.MagicLinkOptions) => {
|
|
1745
|
+
id: "magic-link";
|
|
1746
|
+
endpoints: {
|
|
1747
|
+
signInMagicLink: better_auth311.StrictEndpoint<"/sign-in/magic-link", {
|
|
1748
|
+
method: "POST";
|
|
1749
|
+
requireHeaders: true;
|
|
1750
|
+
body: zod0.ZodObject<{
|
|
1751
|
+
email: zod0.ZodEmail;
|
|
1752
|
+
name: zod0.ZodOptional<zod0.ZodString>;
|
|
1753
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1754
|
+
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1755
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1756
|
+
}, better_auth311.$strip>;
|
|
1757
|
+
metadata: {
|
|
1758
|
+
openapi: {
|
|
1759
|
+
operationId: string;
|
|
1760
|
+
description: string;
|
|
1761
|
+
responses: {
|
|
1762
|
+
200: {
|
|
1763
|
+
description: string;
|
|
1764
|
+
content: {
|
|
1765
|
+
"application/json": {
|
|
1766
|
+
schema: {
|
|
1767
|
+
type: "object";
|
|
1768
|
+
properties: {
|
|
1769
|
+
status: {
|
|
1770
|
+
type: string;
|
|
1771
|
+
};
|
|
1772
|
+
};
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
};
|
|
1777
|
+
};
|
|
1778
|
+
};
|
|
1779
|
+
};
|
|
1780
|
+
}, {
|
|
1781
|
+
status: boolean;
|
|
1782
|
+
}>;
|
|
1783
|
+
magicLinkVerify: better_auth311.StrictEndpoint<"/magic-link/verify", {
|
|
1784
|
+
method: "GET";
|
|
1785
|
+
query: zod0.ZodObject<{
|
|
1786
|
+
token: zod0.ZodString;
|
|
1787
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1788
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1789
|
+
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1790
|
+
}, better_auth311.$strip>;
|
|
1791
|
+
use: ((inputContext: better_auth311.MiddlewareInputContext<better_auth311.MiddlewareOptions>) => Promise<void>)[];
|
|
1792
|
+
requireHeaders: true;
|
|
1793
|
+
metadata: {
|
|
1794
|
+
openapi: {
|
|
1795
|
+
operationId: string;
|
|
1796
|
+
description: string;
|
|
1797
|
+
responses: {
|
|
1798
|
+
200: {
|
|
1799
|
+
description: string;
|
|
1800
|
+
content: {
|
|
1801
|
+
"application/json": {
|
|
1802
|
+
schema: {
|
|
1803
|
+
type: "object";
|
|
1804
|
+
properties: {
|
|
1805
|
+
session: {
|
|
1806
|
+
$ref: string;
|
|
1807
|
+
};
|
|
1808
|
+
user: {
|
|
1809
|
+
$ref: string;
|
|
1810
|
+
};
|
|
1811
|
+
};
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
};
|
|
1816
|
+
};
|
|
1817
|
+
};
|
|
1818
|
+
};
|
|
1819
|
+
}, {
|
|
1820
|
+
token: string;
|
|
1821
|
+
user: {
|
|
1822
|
+
id: string;
|
|
1823
|
+
createdAt: Date;
|
|
1824
|
+
updatedAt: Date;
|
|
1825
|
+
email: string;
|
|
1826
|
+
emailVerified: boolean;
|
|
1827
|
+
name: string;
|
|
1828
|
+
image?: string | null | undefined;
|
|
1829
|
+
};
|
|
1830
|
+
}>;
|
|
1831
|
+
};
|
|
1832
|
+
rateLimit: {
|
|
1833
|
+
pathMatcher(path: string): boolean;
|
|
1834
|
+
window: number;
|
|
1835
|
+
max: number;
|
|
1836
|
+
}[];
|
|
1837
|
+
options: better_auth_plugins43.MagicLinkOptions;
|
|
1838
|
+
}>;
|
|
1775
1839
|
})[];
|
|
1776
1840
|
type SupportedBetterAuthClientPlugins = typeof supportedBetterAuthClientPlugins;
|
|
1777
1841
|
declare abstract class NeonAuthAdapterCore {
|
|
@@ -1797,4 +1861,4 @@ declare abstract class NeonAuthAdapterCore {
|
|
|
1797
1861
|
getJWTToken(allowAnonymous: boolean): Promise<string | null>;
|
|
1798
1862
|
}
|
|
1799
1863
|
//#endregion
|
|
1800
|
-
export {
|
|
1864
|
+
export { BetterAuthErrorResponse as A, SessionWithImpersonatedBy as C, TeamMemberInput as D, TeamMember as E, BetterAuthUser as M, UserWithRole as O, ReactBetterAuthClient as S, TeamInput as T, Member as _, BetterAuthInstance as a, OrganizationInput as b, InferAdminRolesFromOption as c, InvitationStatus as d, JWKOptions as f, MagicLinkOptions as g, JwtOptions as h, AdminOptions as i, BetterAuthSession as j, VanillaBetterAuthClient as k, Invitation as l, Jwk as m, NeonAuthAdapterCoreAuthOptions as n, BetterFetchError$1 as o, JWSAlgorithms as p, SupportedBetterAuthClientPlugins as r, EmailOTPOptions as s, NeonAuthAdapterCore as t, InvitationInput as u, MemberInput as v, Team as w, OrganizationRole as x, Organization as y };
|