better-auth 1.4.21 → 1.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.mts +407 -407
- package/dist/api/middlewares/origin-check.d.mts +4 -4
- package/dist/api/routes/account.d.mts +11 -11
- package/dist/api/routes/callback.d.mts +2 -2
- package/dist/api/routes/email-verification.d.mts +4 -4
- package/dist/api/routes/error.d.mts +2 -2
- package/dist/api/routes/ok.d.mts +2 -2
- package/dist/api/routes/password.d.mts +7 -7
- package/dist/api/routes/sign-in.d.mts +4 -4
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +3 -3
- package/dist/api/routes/update-user.d.mts +13 -13
- package/dist/client/lynx/index.d.mts +15 -15
- package/dist/client/react/index.d.mts +15 -15
- package/dist/client/solid/index.d.mts +13 -13
- package/dist/client/svelte/index.d.mts +13 -13
- package/dist/client/vanilla.d.mts +15 -15
- package/dist/client/vue/index.d.mts +15 -15
- package/dist/db/field.d.mts +6 -6
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/tanstack-start-solid.d.mts +4 -4
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/plugins/admin/admin.d.mts +114 -114
- package/dist/plugins/anonymous/index.d.mts +5 -5
- package/dist/plugins/api-key/index.d.mts +79 -79
- package/dist/plugins/bearer/index.d.mts +6 -6
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.mts +5 -5
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +52 -52
- package/dist/plugins/generic-oauth/index.d.mts +32 -32
- package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
- package/dist/plugins/jwt/client.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +7 -7
- package/dist/plugins/last-login-method/index.d.mts +4 -4
- package/dist/plugins/magic-link/index.d.mts +4 -4
- package/dist/plugins/mcp/index.d.mts +10 -10
- package/dist/plugins/multi-session/index.d.mts +9 -9
- package/dist/plugins/oauth-proxy/index.d.mts +8 -8
- package/dist/plugins/oidc-provider/index.d.mts +13 -13
- package/dist/plugins/one-tap/client.d.mts +4 -4
- package/dist/plugins/one-tap/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +5 -5
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/organization/adapter.d.mts +24 -24
- package/dist/plugins/organization/client.d.mts +8 -8
- package/dist/plugins/organization/organization.d.mts +7 -7
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +69 -69
- package/dist/plugins/organization/routes/crud-members.d.mts +67 -67
- package/dist/plugins/organization/routes/crud-org.d.mts +59 -59
- package/dist/plugins/organization/routes/crud-team.d.mts +79 -79
- package/dist/plugins/phone-number/index.d.mts +33 -33
- package/dist/plugins/siwe/index.d.mts +3 -3
- package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
- package/dist/plugins/two-factor/index.d.mts +16 -16
- package/dist/plugins/two-factor/otp/index.d.mts +3 -3
- package/dist/plugins/two-factor/totp/index.d.mts +5 -5
- package/dist/plugins/username/index.d.mts +9 -9
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +1225 -1225
- package/package.json +3 -3
|
@@ -6,14 +6,14 @@ import { InferOrganizationRolesFromOption } from "../schema.mjs";
|
|
|
6
6
|
import "../../index.mjs";
|
|
7
7
|
import { defaultRoles } from "../access/statement.mjs";
|
|
8
8
|
import "../access/index.mjs";
|
|
9
|
-
import * as
|
|
9
|
+
import * as _better_auth_core61 from "@better-auth/core";
|
|
10
10
|
import { LiteralString } from "@better-auth/core";
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
11
|
+
import * as _better_auth_core_db135 from "@better-auth/core/db";
|
|
12
|
+
import * as better_call944 from "better-call";
|
|
13
13
|
import * as z from "zod";
|
|
14
14
|
|
|
15
15
|
//#region src/plugins/organization/routes/crud-members.d.ts
|
|
16
|
-
declare const addMember: <O extends OrganizationOptions>(option: O) =>
|
|
16
|
+
declare const addMember: <O extends OrganizationOptions>(option: O) => better_call944.StrictEndpoint<string, {
|
|
17
17
|
method: "POST";
|
|
18
18
|
body: z.ZodObject<{
|
|
19
19
|
userId: z.ZodCoercedString<unknown>;
|
|
@@ -21,17 +21,17 @@ declare const addMember: <O extends OrganizationOptions>(option: O) => better_ca
|
|
|
21
21
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
22
22
|
teamId: z.ZodOptional<z.ZodString>;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
|
-
use: ((inputContext:
|
|
24
|
+
use: ((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
25
25
|
orgOptions: OrganizationOptions;
|
|
26
26
|
roles: typeof defaultRoles & {
|
|
27
27
|
[key: string]: Role<{}>;
|
|
28
28
|
};
|
|
29
|
-
getSession: (context:
|
|
30
|
-
session:
|
|
29
|
+
getSession: (context: _better_auth_core61.GenericEndpointContext) => Promise<{
|
|
30
|
+
session: _better_auth_core_db135.Session & {
|
|
31
31
|
activeTeamId?: string | undefined;
|
|
32
32
|
activeOrganizationId?: string | undefined;
|
|
33
33
|
};
|
|
34
|
-
user:
|
|
34
|
+
user: _better_auth_core_db135.User;
|
|
35
35
|
}>;
|
|
36
36
|
}>)[];
|
|
37
37
|
metadata: {
|
|
@@ -60,27 +60,27 @@ declare const addMember: <O extends OrganizationOptions>(option: O) => better_ca
|
|
|
60
60
|
role: string;
|
|
61
61
|
createdAt: Date;
|
|
62
62
|
} & InferAdditionalFieldsFromPluginOptions<"member", O, false>) | null>;
|
|
63
|
-
declare const removeMember: <O extends OrganizationOptions>(options: O) =>
|
|
63
|
+
declare const removeMember: <O extends OrganizationOptions>(options: O) => better_call944.StrictEndpoint<"/organization/remove-member", {
|
|
64
64
|
method: "POST";
|
|
65
65
|
body: z.ZodObject<{
|
|
66
66
|
memberIdOrEmail: z.ZodString;
|
|
67
67
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
68
68
|
}, z.core.$strip>;
|
|
69
69
|
requireHeaders: true;
|
|
70
|
-
use: (((inputContext:
|
|
70
|
+
use: (((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
71
71
|
orgOptions: OrganizationOptions;
|
|
72
72
|
roles: typeof defaultRoles & {
|
|
73
73
|
[key: string]: Role<{}>;
|
|
74
74
|
};
|
|
75
|
-
getSession: (context:
|
|
76
|
-
session:
|
|
75
|
+
getSession: (context: _better_auth_core61.GenericEndpointContext) => Promise<{
|
|
76
|
+
session: _better_auth_core_db135.Session & {
|
|
77
77
|
activeTeamId?: string | undefined;
|
|
78
78
|
activeOrganizationId?: string | undefined;
|
|
79
79
|
};
|
|
80
|
-
user:
|
|
80
|
+
user: _better_auth_core_db135.User;
|
|
81
81
|
}>;
|
|
82
|
-
}>) | ((inputContext:
|
|
83
|
-
use: ((inputContext:
|
|
82
|
+
}>) | ((inputContext: better_call944.MiddlewareInputContext<{
|
|
83
|
+
use: ((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
84
84
|
session: {
|
|
85
85
|
session: Record<string, any> & {
|
|
86
86
|
id: string;
|
|
@@ -105,11 +105,11 @@ declare const removeMember: <O extends OrganizationOptions>(options: O) => bette
|
|
|
105
105
|
}>)[];
|
|
106
106
|
}>) => Promise<{
|
|
107
107
|
session: {
|
|
108
|
-
session:
|
|
108
|
+
session: _better_auth_core_db135.Session & {
|
|
109
109
|
activeTeamId?: string | undefined;
|
|
110
110
|
activeOrganizationId?: string | undefined;
|
|
111
111
|
};
|
|
112
|
-
user:
|
|
112
|
+
user: _better_auth_core_db135.User;
|
|
113
113
|
};
|
|
114
114
|
}>))[];
|
|
115
115
|
metadata: {
|
|
@@ -180,31 +180,31 @@ declare const removeMember: <O extends OrganizationOptions>(options: O) => bette
|
|
|
180
180
|
};
|
|
181
181
|
}) & (O["schema"] extends {
|
|
182
182
|
member?: {
|
|
183
|
-
additionalFields: infer Field extends Record<string,
|
|
183
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db135.DBFieldAttribute>;
|
|
184
184
|
} | undefined;
|
|
185
185
|
} ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T ? { [K in keyof T]: T[K] } : never;
|
|
186
186
|
} | null>;
|
|
187
|
-
declare const updateMemberRole: <O extends OrganizationOptions>(option: O) =>
|
|
187
|
+
declare const updateMemberRole: <O extends OrganizationOptions>(option: O) => better_call944.StrictEndpoint<"/organization/update-member-role", {
|
|
188
188
|
method: "POST";
|
|
189
189
|
body: z.ZodObject<{
|
|
190
190
|
role: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
191
191
|
memberId: z.ZodString;
|
|
192
192
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
193
193
|
}, z.core.$strip>;
|
|
194
|
-
use: (((inputContext:
|
|
194
|
+
use: (((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
195
195
|
orgOptions: OrganizationOptions;
|
|
196
196
|
roles: typeof defaultRoles & {
|
|
197
197
|
[key: string]: Role<{}>;
|
|
198
198
|
};
|
|
199
|
-
getSession: (context:
|
|
200
|
-
session:
|
|
199
|
+
getSession: (context: _better_auth_core61.GenericEndpointContext) => Promise<{
|
|
200
|
+
session: _better_auth_core_db135.Session & {
|
|
201
201
|
activeTeamId?: string | undefined;
|
|
202
202
|
activeOrganizationId?: string | undefined;
|
|
203
203
|
};
|
|
204
|
-
user:
|
|
204
|
+
user: _better_auth_core_db135.User;
|
|
205
205
|
}>;
|
|
206
|
-
}>) | ((inputContext:
|
|
207
|
-
use: ((inputContext:
|
|
206
|
+
}>) | ((inputContext: better_call944.MiddlewareInputContext<{
|
|
207
|
+
use: ((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
208
208
|
session: {
|
|
209
209
|
session: Record<string, any> & {
|
|
210
210
|
id: string;
|
|
@@ -229,11 +229,11 @@ declare const updateMemberRole: <O extends OrganizationOptions>(option: O) => be
|
|
|
229
229
|
}>)[];
|
|
230
230
|
}>) => Promise<{
|
|
231
231
|
session: {
|
|
232
|
-
session:
|
|
232
|
+
session: _better_auth_core_db135.Session & {
|
|
233
233
|
activeTeamId?: string | undefined;
|
|
234
234
|
activeOrganizationId?: string | undefined;
|
|
235
235
|
};
|
|
236
|
-
user:
|
|
236
|
+
user: _better_auth_core_db135.User;
|
|
237
237
|
};
|
|
238
238
|
}>))[];
|
|
239
239
|
requireHeaders: true;
|
|
@@ -299,22 +299,22 @@ declare const updateMemberRole: <O extends OrganizationOptions>(option: O) => be
|
|
|
299
299
|
image?: string | undefined;
|
|
300
300
|
};
|
|
301
301
|
}>;
|
|
302
|
-
declare const getActiveMember: <O extends OrganizationOptions>(options: O) =>
|
|
302
|
+
declare const getActiveMember: <O extends OrganizationOptions>(options: O) => better_call944.StrictEndpoint<"/organization/get-active-member", {
|
|
303
303
|
method: "GET";
|
|
304
|
-
use: (((inputContext:
|
|
304
|
+
use: (((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
305
305
|
orgOptions: OrganizationOptions;
|
|
306
306
|
roles: typeof defaultRoles & {
|
|
307
307
|
[key: string]: Role<{}>;
|
|
308
308
|
};
|
|
309
|
-
getSession: (context:
|
|
310
|
-
session:
|
|
309
|
+
getSession: (context: _better_auth_core61.GenericEndpointContext) => Promise<{
|
|
310
|
+
session: _better_auth_core_db135.Session & {
|
|
311
311
|
activeTeamId?: string | undefined;
|
|
312
312
|
activeOrganizationId?: string | undefined;
|
|
313
313
|
};
|
|
314
|
-
user:
|
|
314
|
+
user: _better_auth_core_db135.User;
|
|
315
315
|
}>;
|
|
316
|
-
}>) | ((inputContext:
|
|
317
|
-
use: ((inputContext:
|
|
316
|
+
}>) | ((inputContext: better_call944.MiddlewareInputContext<{
|
|
317
|
+
use: ((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
318
318
|
session: {
|
|
319
319
|
session: Record<string, any> & {
|
|
320
320
|
id: string;
|
|
@@ -339,11 +339,11 @@ declare const getActiveMember: <O extends OrganizationOptions>(options: O) => be
|
|
|
339
339
|
}>)[];
|
|
340
340
|
}>) => Promise<{
|
|
341
341
|
session: {
|
|
342
|
-
session:
|
|
342
|
+
session: _better_auth_core_db135.Session & {
|
|
343
343
|
activeTeamId?: string | undefined;
|
|
344
344
|
activeOrganizationId?: string | undefined;
|
|
345
345
|
};
|
|
346
|
-
user:
|
|
346
|
+
user: _better_auth_core_db135.User;
|
|
347
347
|
};
|
|
348
348
|
}>))[];
|
|
349
349
|
requireHeaders: true;
|
|
@@ -408,10 +408,10 @@ declare const getActiveMember: <O extends OrganizationOptions>(options: O) => be
|
|
|
408
408
|
};
|
|
409
409
|
}) & (O["schema"] extends {
|
|
410
410
|
member?: {
|
|
411
|
-
additionalFields: infer Field extends Record<string,
|
|
411
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db135.DBFieldAttribute>;
|
|
412
412
|
} | undefined;
|
|
413
413
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
|
|
414
|
-
user:
|
|
414
|
+
user: _better_auth_core_db135.User;
|
|
415
415
|
}, "user"> & {
|
|
416
416
|
user: {
|
|
417
417
|
id: string;
|
|
@@ -420,13 +420,13 @@ declare const getActiveMember: <O extends OrganizationOptions>(options: O) => be
|
|
|
420
420
|
image: string | undefined;
|
|
421
421
|
};
|
|
422
422
|
}) | null>;
|
|
423
|
-
declare const leaveOrganization: <O extends OrganizationOptions>(options: O) =>
|
|
423
|
+
declare const leaveOrganization: <O extends OrganizationOptions>(options: O) => better_call944.StrictEndpoint<"/organization/leave", {
|
|
424
424
|
method: "POST";
|
|
425
425
|
body: z.ZodObject<{
|
|
426
426
|
organizationId: z.ZodString;
|
|
427
427
|
}, z.core.$strip>;
|
|
428
428
|
requireHeaders: true;
|
|
429
|
-
use: (((inputContext:
|
|
429
|
+
use: (((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
430
430
|
session: {
|
|
431
431
|
session: Record<string, any> & {
|
|
432
432
|
id: string;
|
|
@@ -448,17 +448,17 @@ declare const leaveOrganization: <O extends OrganizationOptions>(options: O) =>
|
|
|
448
448
|
image?: string | null | undefined;
|
|
449
449
|
};
|
|
450
450
|
};
|
|
451
|
-
}>) | ((inputContext:
|
|
451
|
+
}>) | ((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
452
452
|
orgOptions: OrganizationOptions;
|
|
453
453
|
roles: typeof defaultRoles & {
|
|
454
454
|
[key: string]: Role<{}>;
|
|
455
455
|
};
|
|
456
|
-
getSession: (context:
|
|
457
|
-
session:
|
|
456
|
+
getSession: (context: _better_auth_core61.GenericEndpointContext) => Promise<{
|
|
457
|
+
session: _better_auth_core_db135.Session & {
|
|
458
458
|
activeTeamId?: string | undefined;
|
|
459
459
|
activeOrganizationId?: string | undefined;
|
|
460
460
|
};
|
|
461
|
-
user:
|
|
461
|
+
user: _better_auth_core_db135.User;
|
|
462
462
|
}>;
|
|
463
463
|
}>))[];
|
|
464
464
|
}, Omit<((O["teams"] extends {
|
|
@@ -490,10 +490,10 @@ declare const leaveOrganization: <O extends OrganizationOptions>(options: O) =>
|
|
|
490
490
|
};
|
|
491
491
|
}) & (O["schema"] extends {
|
|
492
492
|
member?: {
|
|
493
|
-
additionalFields: infer Field extends Record<string,
|
|
493
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db135.DBFieldAttribute>;
|
|
494
494
|
} | undefined;
|
|
495
495
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
|
|
496
|
-
user:
|
|
496
|
+
user: _better_auth_core_db135.User;
|
|
497
497
|
}, "user"> & {
|
|
498
498
|
user: {
|
|
499
499
|
id: string;
|
|
@@ -502,7 +502,7 @@ declare const leaveOrganization: <O extends OrganizationOptions>(options: O) =>
|
|
|
502
502
|
image: string | undefined;
|
|
503
503
|
};
|
|
504
504
|
}>;
|
|
505
|
-
declare const listMembers: <O extends OrganizationOptions>(options: O) =>
|
|
505
|
+
declare const listMembers: <O extends OrganizationOptions>(options: O) => better_call944.StrictEndpoint<"/organization/list-members", {
|
|
506
506
|
method: "GET";
|
|
507
507
|
query: z.ZodOptional<z.ZodObject<{
|
|
508
508
|
limit: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
@@ -527,20 +527,20 @@ declare const listMembers: <O extends OrganizationOptions>(options: O) => better
|
|
|
527
527
|
organizationSlug: z.ZodOptional<z.ZodString>;
|
|
528
528
|
}, z.core.$strip>>;
|
|
529
529
|
requireHeaders: true;
|
|
530
|
-
use: (((inputContext:
|
|
530
|
+
use: (((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
531
531
|
orgOptions: OrganizationOptions;
|
|
532
532
|
roles: typeof defaultRoles & {
|
|
533
533
|
[key: string]: Role<{}>;
|
|
534
534
|
};
|
|
535
|
-
getSession: (context:
|
|
536
|
-
session:
|
|
535
|
+
getSession: (context: _better_auth_core61.GenericEndpointContext) => Promise<{
|
|
536
|
+
session: _better_auth_core_db135.Session & {
|
|
537
537
|
activeTeamId?: string | undefined;
|
|
538
538
|
activeOrganizationId?: string | undefined;
|
|
539
539
|
};
|
|
540
|
-
user:
|
|
540
|
+
user: _better_auth_core_db135.User;
|
|
541
541
|
}>;
|
|
542
|
-
}>) | ((inputContext:
|
|
543
|
-
use: ((inputContext:
|
|
542
|
+
}>) | ((inputContext: better_call944.MiddlewareInputContext<{
|
|
543
|
+
use: ((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
544
544
|
session: {
|
|
545
545
|
session: Record<string, any> & {
|
|
546
546
|
id: string;
|
|
@@ -565,11 +565,11 @@ declare const listMembers: <O extends OrganizationOptions>(options: O) => better
|
|
|
565
565
|
}>)[];
|
|
566
566
|
}>) => Promise<{
|
|
567
567
|
session: {
|
|
568
|
-
session:
|
|
568
|
+
session: _better_auth_core_db135.Session & {
|
|
569
569
|
activeTeamId?: string | undefined;
|
|
570
570
|
activeOrganizationId?: string | undefined;
|
|
571
571
|
};
|
|
572
|
-
user:
|
|
572
|
+
user: _better_auth_core_db135.User;
|
|
573
573
|
};
|
|
574
574
|
}>))[];
|
|
575
575
|
}, {
|
|
@@ -602,7 +602,7 @@ declare const listMembers: <O extends OrganizationOptions>(options: O) => better
|
|
|
602
602
|
};
|
|
603
603
|
}) & (O["schema"] extends {
|
|
604
604
|
member?: {
|
|
605
|
-
additionalFields: infer Field extends Record<string,
|
|
605
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db135.DBFieldAttribute>;
|
|
606
606
|
} | undefined;
|
|
607
607
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
|
|
608
608
|
user: {
|
|
@@ -614,7 +614,7 @@ declare const listMembers: <O extends OrganizationOptions>(options: O) => better
|
|
|
614
614
|
})[];
|
|
615
615
|
total: number;
|
|
616
616
|
}>;
|
|
617
|
-
declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) =>
|
|
617
|
+
declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) => better_call944.StrictEndpoint<"/organization/get-active-member-role", {
|
|
618
618
|
method: "GET";
|
|
619
619
|
query: z.ZodOptional<z.ZodObject<{
|
|
620
620
|
userId: z.ZodOptional<z.ZodString>;
|
|
@@ -622,20 +622,20 @@ declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) =
|
|
|
622
622
|
organizationSlug: z.ZodOptional<z.ZodString>;
|
|
623
623
|
}, z.core.$strip>>;
|
|
624
624
|
requireHeaders: true;
|
|
625
|
-
use: (((inputContext:
|
|
625
|
+
use: (((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
626
626
|
orgOptions: OrganizationOptions;
|
|
627
627
|
roles: typeof defaultRoles & {
|
|
628
628
|
[key: string]: Role<{}>;
|
|
629
629
|
};
|
|
630
|
-
getSession: (context:
|
|
631
|
-
session:
|
|
630
|
+
getSession: (context: _better_auth_core61.GenericEndpointContext) => Promise<{
|
|
631
|
+
session: _better_auth_core_db135.Session & {
|
|
632
632
|
activeTeamId?: string | undefined;
|
|
633
633
|
activeOrganizationId?: string | undefined;
|
|
634
634
|
};
|
|
635
|
-
user:
|
|
635
|
+
user: _better_auth_core_db135.User;
|
|
636
636
|
}>;
|
|
637
|
-
}>) | ((inputContext:
|
|
638
|
-
use: ((inputContext:
|
|
637
|
+
}>) | ((inputContext: better_call944.MiddlewareInputContext<{
|
|
638
|
+
use: ((inputContext: better_call944.MiddlewareInputContext<better_call944.MiddlewareOptions>) => Promise<{
|
|
639
639
|
session: {
|
|
640
640
|
session: Record<string, any> & {
|
|
641
641
|
id: string;
|
|
@@ -660,11 +660,11 @@ declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) =
|
|
|
660
660
|
}>)[];
|
|
661
661
|
}>) => Promise<{
|
|
662
662
|
session: {
|
|
663
|
-
session:
|
|
663
|
+
session: _better_auth_core_db135.Session & {
|
|
664
664
|
activeTeamId?: string | undefined;
|
|
665
665
|
activeOrganizationId?: string | undefined;
|
|
666
666
|
};
|
|
667
|
-
user:
|
|
667
|
+
user: _better_auth_core_db135.User;
|
|
668
668
|
};
|
|
669
669
|
}>))[];
|
|
670
670
|
}, {
|
|
@@ -697,10 +697,10 @@ declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) =
|
|
|
697
697
|
};
|
|
698
698
|
}) & (O["schema"] extends {
|
|
699
699
|
member?: {
|
|
700
|
-
additionalFields: infer Field extends Record<string,
|
|
700
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db135.DBFieldAttribute>;
|
|
701
701
|
} | undefined;
|
|
702
702
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
|
|
703
|
-
user:
|
|
703
|
+
user: _better_auth_core_db135.User;
|
|
704
704
|
})["role"];
|
|
705
705
|
}>;
|
|
706
706
|
//#endregion
|