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,29 +6,29 @@ import { InferOrganizationRolesFromOption, InvitationStatus } from "../schema.mj
|
|
|
6
6
|
import "../../index.mjs";
|
|
7
7
|
import { defaultRoles } from "../access/statement.mjs";
|
|
8
8
|
import "../index.mjs";
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
9
|
+
import * as _better_auth_core54 from "@better-auth/core";
|
|
10
|
+
import * as _better_auth_core_db100 from "@better-auth/core/db";
|
|
11
|
+
import * as better_call908 from "better-call";
|
|
12
12
|
import * as z from "zod";
|
|
13
13
|
|
|
14
14
|
//#region src/plugins/organization/routes/crud-invites.d.ts
|
|
15
|
-
declare const createInvitation: <O extends OrganizationOptions>(option: O) =>
|
|
15
|
+
declare const createInvitation: <O extends OrganizationOptions>(option: O) => better_call908.StrictEndpoint<"/organization/invite-member", {
|
|
16
16
|
method: "POST";
|
|
17
17
|
requireHeaders: true;
|
|
18
|
-
use: (((inputContext:
|
|
18
|
+
use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
19
19
|
orgOptions: OrganizationOptions;
|
|
20
20
|
roles: typeof defaultRoles & {
|
|
21
21
|
[key: string]: Role<{}>;
|
|
22
22
|
};
|
|
23
|
-
getSession: (context:
|
|
24
|
-
session:
|
|
23
|
+
getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
|
|
24
|
+
session: _better_auth_core_db100.Session & {
|
|
25
25
|
activeTeamId?: string | undefined;
|
|
26
26
|
activeOrganizationId?: string | undefined;
|
|
27
27
|
};
|
|
28
|
-
user:
|
|
28
|
+
user: _better_auth_core_db100.User;
|
|
29
29
|
}>;
|
|
30
|
-
}>) | ((inputContext:
|
|
31
|
-
use: ((inputContext:
|
|
30
|
+
}>) | ((inputContext: better_call908.MiddlewareInputContext<{
|
|
31
|
+
use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
32
32
|
session: {
|
|
33
33
|
session: Record<string, any> & {
|
|
34
34
|
id: string;
|
|
@@ -53,11 +53,11 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => be
|
|
|
53
53
|
}>)[];
|
|
54
54
|
}>) => Promise<{
|
|
55
55
|
session: {
|
|
56
|
-
session:
|
|
56
|
+
session: _better_auth_core_db100.Session & {
|
|
57
57
|
activeTeamId?: string | undefined;
|
|
58
58
|
activeOrganizationId?: string | undefined;
|
|
59
59
|
};
|
|
60
|
-
user:
|
|
60
|
+
user: _better_auth_core_db100.User;
|
|
61
61
|
};
|
|
62
62
|
}>))[];
|
|
63
63
|
body: z.ZodObject<{
|
|
@@ -168,7 +168,7 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => be
|
|
|
168
168
|
createdAt: Date;
|
|
169
169
|
}) & (O["schema"] extends {
|
|
170
170
|
invitation?: {
|
|
171
|
-
additionalFields: infer Field extends Record<string,
|
|
171
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
172
172
|
} | undefined;
|
|
173
173
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | ((O["teams"] extends {
|
|
174
174
|
enabled: true;
|
|
@@ -193,29 +193,29 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => be
|
|
|
193
193
|
createdAt: Date;
|
|
194
194
|
}) & (O["schema"] extends {
|
|
195
195
|
invitation?: {
|
|
196
|
-
additionalFields: infer Field extends Record<string,
|
|
196
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
197
197
|
} | undefined;
|
|
198
198
|
} ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never)>;
|
|
199
|
-
declare const acceptInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
199
|
+
declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/accept-invitation", {
|
|
200
200
|
method: "POST";
|
|
201
201
|
body: z.ZodObject<{
|
|
202
202
|
invitationId: z.ZodString;
|
|
203
203
|
}, z.core.$strip>;
|
|
204
204
|
requireHeaders: true;
|
|
205
|
-
use: (((inputContext:
|
|
205
|
+
use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
206
206
|
orgOptions: OrganizationOptions;
|
|
207
207
|
roles: typeof defaultRoles & {
|
|
208
208
|
[key: string]: Role<{}>;
|
|
209
209
|
};
|
|
210
|
-
getSession: (context:
|
|
211
|
-
session:
|
|
210
|
+
getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
|
|
211
|
+
session: _better_auth_core_db100.Session & {
|
|
212
212
|
activeTeamId?: string | undefined;
|
|
213
213
|
activeOrganizationId?: string | undefined;
|
|
214
214
|
};
|
|
215
|
-
user:
|
|
215
|
+
user: _better_auth_core_db100.User;
|
|
216
216
|
}>;
|
|
217
|
-
}>) | ((inputContext:
|
|
218
|
-
use: ((inputContext:
|
|
217
|
+
}>) | ((inputContext: better_call908.MiddlewareInputContext<{
|
|
218
|
+
use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
219
219
|
session: {
|
|
220
220
|
session: Record<string, any> & {
|
|
221
221
|
id: string;
|
|
@@ -240,11 +240,11 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
240
240
|
}>)[];
|
|
241
241
|
}>) => Promise<{
|
|
242
242
|
session: {
|
|
243
|
-
session:
|
|
243
|
+
session: _better_auth_core_db100.Session & {
|
|
244
244
|
activeTeamId?: string | undefined;
|
|
245
245
|
activeOrganizationId?: string | undefined;
|
|
246
246
|
};
|
|
247
|
-
user:
|
|
247
|
+
user: _better_auth_core_db100.User;
|
|
248
248
|
};
|
|
249
249
|
}>))[];
|
|
250
250
|
metadata: {
|
|
@@ -296,7 +296,7 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
296
296
|
createdAt: Date;
|
|
297
297
|
}) & (O["schema"] extends {
|
|
298
298
|
invitation?: {
|
|
299
|
-
additionalFields: infer Field extends Record<string,
|
|
299
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
300
300
|
} | undefined;
|
|
301
301
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never;
|
|
302
302
|
member: {
|
|
@@ -307,26 +307,26 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
307
307
|
createdAt: Date;
|
|
308
308
|
} & InferAdditionalFieldsFromPluginOptions<"member", O, false>;
|
|
309
309
|
}>;
|
|
310
|
-
declare const rejectInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
310
|
+
declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/reject-invitation", {
|
|
311
311
|
method: "POST";
|
|
312
312
|
body: z.ZodObject<{
|
|
313
313
|
invitationId: z.ZodString;
|
|
314
314
|
}, z.core.$strip>;
|
|
315
315
|
requireHeaders: true;
|
|
316
|
-
use: (((inputContext:
|
|
316
|
+
use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
317
317
|
orgOptions: OrganizationOptions;
|
|
318
318
|
roles: typeof defaultRoles & {
|
|
319
319
|
[key: string]: Role<{}>;
|
|
320
320
|
};
|
|
321
|
-
getSession: (context:
|
|
322
|
-
session:
|
|
321
|
+
getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
|
|
322
|
+
session: _better_auth_core_db100.Session & {
|
|
323
323
|
activeTeamId?: string | undefined;
|
|
324
324
|
activeOrganizationId?: string | undefined;
|
|
325
325
|
};
|
|
326
|
-
user:
|
|
326
|
+
user: _better_auth_core_db100.User;
|
|
327
327
|
}>;
|
|
328
|
-
}>) | ((inputContext:
|
|
329
|
-
use: ((inputContext:
|
|
328
|
+
}>) | ((inputContext: better_call908.MiddlewareInputContext<{
|
|
329
|
+
use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
330
330
|
session: {
|
|
331
331
|
session: Record<string, any> & {
|
|
332
332
|
id: string;
|
|
@@ -351,11 +351,11 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
351
351
|
}>)[];
|
|
352
352
|
}>) => Promise<{
|
|
353
353
|
session: {
|
|
354
|
-
session:
|
|
354
|
+
session: _better_auth_core_db100.Session & {
|
|
355
355
|
activeTeamId?: string | undefined;
|
|
356
356
|
activeOrganizationId?: string | undefined;
|
|
357
357
|
};
|
|
358
|
-
user:
|
|
358
|
+
user: _better_auth_core_db100.User;
|
|
359
359
|
};
|
|
360
360
|
}>))[];
|
|
361
361
|
metadata: {
|
|
@@ -397,26 +397,26 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
397
397
|
} | null;
|
|
398
398
|
member: null;
|
|
399
399
|
}>;
|
|
400
|
-
declare const cancelInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
400
|
+
declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/cancel-invitation", {
|
|
401
401
|
method: "POST";
|
|
402
402
|
body: z.ZodObject<{
|
|
403
403
|
invitationId: z.ZodString;
|
|
404
404
|
}, z.core.$strip>;
|
|
405
405
|
requireHeaders: true;
|
|
406
|
-
use: (((inputContext:
|
|
406
|
+
use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
407
407
|
orgOptions: OrganizationOptions;
|
|
408
408
|
roles: typeof defaultRoles & {
|
|
409
409
|
[key: string]: Role<{}>;
|
|
410
410
|
};
|
|
411
|
-
getSession: (context:
|
|
412
|
-
session:
|
|
411
|
+
getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
|
|
412
|
+
session: _better_auth_core_db100.Session & {
|
|
413
413
|
activeTeamId?: string | undefined;
|
|
414
414
|
activeOrganizationId?: string | undefined;
|
|
415
415
|
};
|
|
416
|
-
user:
|
|
416
|
+
user: _better_auth_core_db100.User;
|
|
417
417
|
}>;
|
|
418
|
-
}>) | ((inputContext:
|
|
419
|
-
use: ((inputContext:
|
|
418
|
+
}>) | ((inputContext: better_call908.MiddlewareInputContext<{
|
|
419
|
+
use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
420
420
|
session: {
|
|
421
421
|
session: Record<string, any> & {
|
|
422
422
|
id: string;
|
|
@@ -441,11 +441,11 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
441
441
|
}>)[];
|
|
442
442
|
}>) => Promise<{
|
|
443
443
|
session: {
|
|
444
|
-
session:
|
|
444
|
+
session: _better_auth_core_db100.Session & {
|
|
445
445
|
activeTeamId?: string | undefined;
|
|
446
446
|
activeOrganizationId?: string | undefined;
|
|
447
447
|
};
|
|
448
|
-
user:
|
|
448
|
+
user: _better_auth_core_db100.User;
|
|
449
449
|
};
|
|
450
450
|
}>))[];
|
|
451
451
|
openapi: {
|
|
@@ -492,22 +492,22 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
492
492
|
createdAt: Date;
|
|
493
493
|
}) & (O["schema"] extends {
|
|
494
494
|
invitation?: {
|
|
495
|
-
additionalFields: infer Field extends Record<string,
|
|
495
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
496
496
|
} | undefined;
|
|
497
497
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
|
|
498
|
-
declare const getInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
498
|
+
declare const getInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/get-invitation", {
|
|
499
499
|
method: "GET";
|
|
500
|
-
use: ((inputContext:
|
|
500
|
+
use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
501
501
|
orgOptions: OrganizationOptions;
|
|
502
502
|
roles: typeof defaultRoles & {
|
|
503
503
|
[key: string]: Role<{}>;
|
|
504
504
|
};
|
|
505
|
-
getSession: (context:
|
|
506
|
-
session:
|
|
505
|
+
getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
|
|
506
|
+
session: _better_auth_core_db100.Session & {
|
|
507
507
|
activeTeamId?: string | undefined;
|
|
508
508
|
activeOrganizationId?: string | undefined;
|
|
509
509
|
};
|
|
510
|
-
user:
|
|
510
|
+
user: _better_auth_core_db100.User;
|
|
511
511
|
}>;
|
|
512
512
|
}>)[];
|
|
513
513
|
requireHeaders: true;
|
|
@@ -587,7 +587,7 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => bett
|
|
|
587
587
|
createdAt: Date;
|
|
588
588
|
}) & (O["schema"] extends {
|
|
589
589
|
invitation?: {
|
|
590
|
-
additionalFields: infer Field extends Record<string,
|
|
590
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
591
591
|
} | undefined;
|
|
592
592
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
|
|
593
593
|
organizationName: ({
|
|
@@ -599,7 +599,7 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => bett
|
|
|
599
599
|
metadata?: any;
|
|
600
600
|
} & (O["schema"] extends {
|
|
601
601
|
organization?: {
|
|
602
|
-
additionalFields: infer Field extends Record<string,
|
|
602
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
603
603
|
} | undefined;
|
|
604
604
|
} ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}))["name"];
|
|
605
605
|
organizationSlug: ({
|
|
@@ -611,28 +611,28 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => bett
|
|
|
611
611
|
metadata?: any;
|
|
612
612
|
} & (O["schema"] extends {
|
|
613
613
|
organization?: {
|
|
614
|
-
additionalFields: infer Field extends Record<string,
|
|
614
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
615
615
|
} | undefined;
|
|
616
616
|
} ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}))["slug"];
|
|
617
617
|
inviterEmail: string;
|
|
618
618
|
}>;
|
|
619
|
-
declare const listInvitations: <O extends OrganizationOptions>(options: O) =>
|
|
619
|
+
declare const listInvitations: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/list-invitations", {
|
|
620
620
|
method: "GET";
|
|
621
621
|
requireHeaders: true;
|
|
622
|
-
use: (((inputContext:
|
|
622
|
+
use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
623
623
|
orgOptions: OrganizationOptions;
|
|
624
624
|
roles: typeof defaultRoles & {
|
|
625
625
|
[key: string]: Role<{}>;
|
|
626
626
|
};
|
|
627
|
-
getSession: (context:
|
|
628
|
-
session:
|
|
627
|
+
getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
|
|
628
|
+
session: _better_auth_core_db100.Session & {
|
|
629
629
|
activeTeamId?: string | undefined;
|
|
630
630
|
activeOrganizationId?: string | undefined;
|
|
631
631
|
};
|
|
632
|
-
user:
|
|
632
|
+
user: _better_auth_core_db100.User;
|
|
633
633
|
}>;
|
|
634
|
-
}>) | ((inputContext:
|
|
635
|
-
use: ((inputContext:
|
|
634
|
+
}>) | ((inputContext: better_call908.MiddlewareInputContext<{
|
|
635
|
+
use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
636
636
|
session: {
|
|
637
637
|
session: Record<string, any> & {
|
|
638
638
|
id: string;
|
|
@@ -657,11 +657,11 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => be
|
|
|
657
657
|
}>)[];
|
|
658
658
|
}>) => Promise<{
|
|
659
659
|
session: {
|
|
660
|
-
session:
|
|
660
|
+
session: _better_auth_core_db100.Session & {
|
|
661
661
|
activeTeamId?: string | undefined;
|
|
662
662
|
activeOrganizationId?: string | undefined;
|
|
663
663
|
};
|
|
664
|
-
user:
|
|
664
|
+
user: _better_auth_core_db100.User;
|
|
665
665
|
};
|
|
666
666
|
}>))[];
|
|
667
667
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -690,25 +690,25 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => be
|
|
|
690
690
|
createdAt: Date;
|
|
691
691
|
}) & (O["schema"] extends {
|
|
692
692
|
invitation?: {
|
|
693
|
-
additionalFields: infer Field extends Record<string,
|
|
693
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
694
694
|
} | undefined;
|
|
695
695
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
|
|
696
696
|
/**
|
|
697
697
|
* List all invitations a user has received
|
|
698
698
|
*/
|
|
699
|
-
declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =>
|
|
699
|
+
declare const listUserInvitations: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/list-user-invitations", {
|
|
700
700
|
method: "GET";
|
|
701
|
-
use: ((inputContext:
|
|
701
|
+
use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
|
|
702
702
|
orgOptions: OrganizationOptions;
|
|
703
703
|
roles: typeof defaultRoles & {
|
|
704
704
|
[key: string]: Role<{}>;
|
|
705
705
|
};
|
|
706
|
-
getSession: (context:
|
|
707
|
-
session:
|
|
706
|
+
getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
|
|
707
|
+
session: _better_auth_core_db100.Session & {
|
|
708
708
|
activeTeamId?: string | undefined;
|
|
709
709
|
activeOrganizationId?: string | undefined;
|
|
710
710
|
};
|
|
711
|
-
user:
|
|
711
|
+
user: _better_auth_core_db100.User;
|
|
712
712
|
}>;
|
|
713
713
|
}>)[];
|
|
714
714
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -793,7 +793,7 @@ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =
|
|
|
793
793
|
createdAt: Date;
|
|
794
794
|
}) & (O["schema"] extends {
|
|
795
795
|
invitation?: {
|
|
796
|
-
additionalFields: infer Field extends Record<string,
|
|
796
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
797
797
|
} | undefined;
|
|
798
798
|
} ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
|
|
799
799
|
organization: {
|
|
@@ -805,7 +805,7 @@ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =
|
|
|
805
805
|
metadata?: any;
|
|
806
806
|
} & (O["schema"] extends {
|
|
807
807
|
organization?: {
|
|
808
|
-
additionalFields: infer Field extends Record<string,
|
|
808
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
809
809
|
} | undefined;
|
|
810
810
|
} ? FieldAttributeToObject<Field> : {}) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never;
|
|
811
811
|
}, "organization"> & {
|
|
@@ -818,7 +818,7 @@ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =
|
|
|
818
818
|
metadata?: any;
|
|
819
819
|
} & (O["schema"] extends {
|
|
820
820
|
organization?: {
|
|
821
|
-
additionalFields: infer Field extends Record<string,
|
|
821
|
+
additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
|
|
822
822
|
} | undefined;
|
|
823
823
|
} ? FieldAttributeToObject<Field> : {}))["name"];
|
|
824
824
|
})[]>;
|