better-auth 1.4.8-beta.1 → 1.4.8-beta.2
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 +393 -393
- package/dist/api/middlewares/origin-check.d.mts +3 -3
- 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/reset-password.d.mts +5 -5
- package/dist/api/routes/session.d.mts +14 -14
- package/dist/api/routes/sign-in.d.mts +3 -3
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +2 -2
- 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 +13 -13
- package/dist/client/solid/index.d.mts +13 -13
- package/dist/client/svelte/index.d.mts +13 -13
- 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.d.mts +4 -4
- package/dist/plugins/anonymous/index.d.mts +6 -5
- package/dist/plugins/anonymous/index.mjs +1 -0
- package/dist/plugins/anonymous/index.mjs.map +1 -1
- package/dist/plugins/api-key/index.d.mts +18 -18
- package/dist/plugins/bearer/index.d.mts +8 -7
- package/dist/plugins/bearer/index.mjs +2 -1
- package/dist/plugins/bearer/index.mjs.map +1 -1
- package/dist/plugins/captcha/index.d.mts +3 -2
- package/dist/plugins/captcha/index.mjs +2 -1
- package/dist/plugins/captcha/index.mjs.map +1 -1
- package/dist/plugins/custom-session/index.d.mts +6 -5
- package/dist/plugins/custom-session/index.mjs +2 -1
- package/dist/plugins/custom-session/index.mjs.map +1 -1
- package/dist/plugins/device-authorization/index.d.mts +35 -8
- package/dist/plugins/device-authorization/index.mjs +2 -1
- package/dist/plugins/device-authorization/index.mjs.map +1 -1
- package/dist/plugins/email-otp/index.d.mts +49 -48
- package/dist/plugins/email-otp/index.mjs +2 -1
- package/dist/plugins/email-otp/index.mjs.map +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +1 -0
- package/dist/plugins/generic-oauth/index.mjs +1 -0
- package/dist/plugins/generic-oauth/index.mjs.map +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +4 -3
- package/dist/plugins/haveibeenpwned/index.mjs +1 -0
- package/dist/plugins/haveibeenpwned/index.mjs.map +1 -1
- package/dist/plugins/index.d.mts +4 -3
- package/dist/plugins/jwt/index.d.mts +9 -9
- package/dist/plugins/last-login-method/index.d.mts +3 -2
- package/dist/plugins/last-login-method/index.mjs +2 -1
- package/dist/plugins/last-login-method/index.mjs.map +1 -1
- package/dist/plugins/magic-link/index.d.mts +5 -4
- package/dist/plugins/magic-link/index.mjs +2 -1
- package/dist/plugins/magic-link/index.mjs.map +1 -1
- package/dist/plugins/mcp/index.d.mts +11 -10
- package/dist/plugins/mcp/index.mjs +2 -1
- package/dist/plugins/mcp/index.mjs.map +1 -1
- package/dist/plugins/multi-session/index.d.mts +10 -9
- package/dist/plugins/multi-session/index.mjs +1 -0
- package/dist/plugins/multi-session/index.mjs.map +1 -1
- 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/index.d.mts +4 -3
- package/dist/plugins/one-tap/index.mjs +2 -1
- package/dist/plugins/one-tap/index.mjs.map +1 -1
- package/dist/plugins/one-time-token/index.d.mts +6 -5
- package/dist/plugins/one-time-token/index.mjs +2 -1
- package/dist/plugins/one-time-token/index.mjs.map +1 -1
- package/dist/plugins/open-api/index.d.mts +4 -3
- package/dist/plugins/open-api/index.mjs +2 -1
- package/dist/plugins/open-api/index.mjs.map +1 -1
- package/dist/plugins/organization/organization.d.mts +4 -4
- package/dist/plugins/organization/organization.mjs.map +1 -1
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +58 -58
- package/dist/plugins/organization/routes/crud-members.d.mts +62 -62
- package/dist/plugins/organization/routes/crud-org.d.mts +51 -51
- package/dist/plugins/organization/routes/crud-team.d.mts +76 -76
- package/dist/plugins/phone-number/index.d.mts +10 -9
- package/dist/plugins/phone-number/index.mjs +1 -0
- package/dist/plugins/phone-number/index.mjs.map +1 -1
- package/dist/plugins/siwe/index.d.mts +4 -3
- package/dist/plugins/siwe/index.mjs +2 -1
- package/dist/plugins/siwe/index.mjs.map +1 -1
- package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
- package/dist/plugins/two-factor/index.d.mts +18 -18
- 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 +10 -9
- package/dist/plugins/username/index.mjs +1 -0
- package/dist/plugins/username/index.mjs.map +1 -1
- package/dist/test-utils/test-instance.d.mts +271 -271
- package/dist/utils/time.d.mts +29 -1
- package/package.json +7 -7
|
@@ -6,13 +6,13 @@ import { Statements, Subset } from "../../access/types.mjs";
|
|
|
6
6
|
import "../../index.mjs";
|
|
7
7
|
import { OrganizationOptions } from "../types.mjs";
|
|
8
8
|
import { OrganizationRole } from "../schema.mjs";
|
|
9
|
-
import * as
|
|
9
|
+
import * as _better_auth_core_db34 from "@better-auth/core/db";
|
|
10
10
|
import * as z from "zod";
|
|
11
|
-
import * as
|
|
11
|
+
import * as better_call768 from "better-call";
|
|
12
12
|
|
|
13
13
|
//#region src/plugins/organization/routes/crud-access-control.d.ts
|
|
14
14
|
type IsExactlyEmptyObject<T> = keyof T extends never ? T extends {} ? {} extends T ? true : false : false : false;
|
|
15
|
-
declare const createOrgRole: <O extends OrganizationOptions>(options: O) =>
|
|
15
|
+
declare const createOrgRole: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/create-role", {
|
|
16
16
|
method: "POST";
|
|
17
17
|
body: z.ZodObject<{
|
|
18
18
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
@@ -36,8 +36,8 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
requireHeaders: true;
|
|
39
|
-
use: ((inputContext:
|
|
40
|
-
use: ((inputContext:
|
|
39
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<{
|
|
40
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
|
|
41
41
|
session: {
|
|
42
42
|
session: Record<string, any> & {
|
|
43
43
|
id: string;
|
|
@@ -62,7 +62,7 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
62
62
|
}>)[];
|
|
63
63
|
}>) => Promise<{
|
|
64
64
|
session: {
|
|
65
|
-
session:
|
|
65
|
+
session: _better_auth_core_db34.Session & {
|
|
66
66
|
activeTeamId?: string | undefined;
|
|
67
67
|
activeOrganizationId?: string | undefined;
|
|
68
68
|
};
|
|
@@ -81,7 +81,7 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
81
81
|
} & InferAdditionalFieldsFromPluginOptions<"organizationRole", O, false>;
|
|
82
82
|
statements: Subset<string, Statements>;
|
|
83
83
|
}>;
|
|
84
|
-
declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) =>
|
|
84
|
+
declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/delete-role", {
|
|
85
85
|
method: "POST";
|
|
86
86
|
body: z.ZodIntersection<z.ZodObject<{
|
|
87
87
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
@@ -91,8 +91,8 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
91
91
|
roleId: z.ZodString;
|
|
92
92
|
}, z.core.$strip>]>>;
|
|
93
93
|
requireHeaders: true;
|
|
94
|
-
use: ((inputContext:
|
|
95
|
-
use: ((inputContext:
|
|
94
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<{
|
|
95
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
|
|
96
96
|
session: {
|
|
97
97
|
session: Record<string, any> & {
|
|
98
98
|
id: string;
|
|
@@ -117,7 +117,7 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
117
117
|
}>)[];
|
|
118
118
|
}>) => Promise<{
|
|
119
119
|
session: {
|
|
120
|
-
session:
|
|
120
|
+
session: _better_auth_core_db34.Session & {
|
|
121
121
|
activeTeamId?: string | undefined;
|
|
122
122
|
activeOrganizationId?: string | undefined;
|
|
123
123
|
};
|
|
@@ -136,11 +136,11 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
136
136
|
}, {
|
|
137
137
|
success: boolean;
|
|
138
138
|
}>;
|
|
139
|
-
declare const listOrgRoles: <O extends OrganizationOptions>(options: O) =>
|
|
139
|
+
declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/list-roles", {
|
|
140
140
|
method: "GET";
|
|
141
141
|
requireHeaders: true;
|
|
142
|
-
use: ((inputContext:
|
|
143
|
-
use: ((inputContext:
|
|
142
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<{
|
|
143
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
|
|
144
144
|
session: {
|
|
145
145
|
session: Record<string, any> & {
|
|
146
146
|
id: string;
|
|
@@ -165,7 +165,7 @@ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => bette
|
|
|
165
165
|
}>)[];
|
|
166
166
|
}>) => Promise<{
|
|
167
167
|
session: {
|
|
168
|
-
session:
|
|
168
|
+
session: _better_auth_core_db34.Session & {
|
|
169
169
|
activeTeamId?: string | undefined;
|
|
170
170
|
activeOrganizationId?: string | undefined;
|
|
171
171
|
};
|
|
@@ -183,11 +183,11 @@ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => bette
|
|
|
183
183
|
createdAt: Date;
|
|
184
184
|
updatedAt?: Date | undefined;
|
|
185
185
|
} & InferAdditionalFieldsFromPluginOptions<"organizationRole", O, false>)[]>;
|
|
186
|
-
declare const getOrgRole: <O extends OrganizationOptions>(options: O) =>
|
|
186
|
+
declare const getOrgRole: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/get-role", {
|
|
187
187
|
method: "GET";
|
|
188
188
|
requireHeaders: true;
|
|
189
|
-
use: ((inputContext:
|
|
190
|
-
use: ((inputContext:
|
|
189
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<{
|
|
190
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
|
|
191
191
|
session: {
|
|
192
192
|
session: Record<string, any> & {
|
|
193
193
|
id: string;
|
|
@@ -212,7 +212,7 @@ declare const getOrgRole: <O extends OrganizationOptions>(options: O) => better_
|
|
|
212
212
|
}>)[];
|
|
213
213
|
}>) => Promise<{
|
|
214
214
|
session: {
|
|
215
|
-
session:
|
|
215
|
+
session: _better_auth_core_db34.Session & {
|
|
216
216
|
activeTeamId?: string | undefined;
|
|
217
217
|
activeOrganizationId?: string | undefined;
|
|
218
218
|
};
|
|
@@ -243,7 +243,7 @@ declare const getOrgRole: <O extends OrganizationOptions>(options: O) => better_
|
|
|
243
243
|
createdAt: Date;
|
|
244
244
|
updatedAt?: Date | undefined;
|
|
245
245
|
} & InferAdditionalFieldsFromPluginOptions<"organizationRole", O, false>>;
|
|
246
|
-
declare const updateOrgRole: <O extends OrganizationOptions>(options: O) =>
|
|
246
|
+
declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/update-role", {
|
|
247
247
|
method: "POST";
|
|
248
248
|
body: z.ZodIntersection<z.ZodObject<{
|
|
249
249
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
@@ -270,8 +270,8 @@ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
270
270
|
};
|
|
271
271
|
};
|
|
272
272
|
requireHeaders: true;
|
|
273
|
-
use: ((inputContext:
|
|
274
|
-
use: ((inputContext:
|
|
273
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<{
|
|
274
|
+
use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
|
|
275
275
|
session: {
|
|
276
276
|
session: Record<string, any> & {
|
|
277
277
|
id: string;
|
|
@@ -296,7 +296,7 @@ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => bett
|
|
|
296
296
|
}>)[];
|
|
297
297
|
}>) => Promise<{
|
|
298
298
|
session: {
|
|
299
|
-
session:
|
|
299
|
+
session: _better_auth_core_db34.Session & {
|
|
300
300
|
activeTeamId?: string | undefined;
|
|
301
301
|
activeOrganizationId?: string | undefined;
|
|
302
302
|
};
|
|
@@ -6,29 +6,29 @@ import { defaultRoles } from "../access/statement.mjs";
|
|
|
6
6
|
import { OrganizationOptions } from "../types.mjs";
|
|
7
7
|
import { InferOrganizationRolesFromOption, InvitationStatus } from "../schema.mjs";
|
|
8
8
|
import "../index.mjs";
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
9
|
+
import * as _better_auth_core49 from "@better-auth/core";
|
|
10
|
+
import * as _better_auth_core_db91 from "@better-auth/core/db";
|
|
11
11
|
import * as z from "zod";
|
|
12
|
-
import * as
|
|
12
|
+
import * as better_call868 from "better-call";
|
|
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_call868.StrictEndpoint<"/organization/invite-member", {
|
|
16
16
|
method: "POST";
|
|
17
17
|
requireHeaders: true;
|
|
18
|
-
use: (((inputContext:
|
|
18
|
+
use: (((inputContext: better_call868.MiddlewareInputContext<better_call868.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_core49.GenericEndpointContext) => Promise<{
|
|
24
|
+
session: _better_auth_core_db91.Session & {
|
|
25
25
|
activeTeamId?: string | undefined;
|
|
26
26
|
activeOrganizationId?: string | undefined;
|
|
27
27
|
};
|
|
28
|
-
user:
|
|
28
|
+
user: _better_auth_core_db91.User;
|
|
29
29
|
}>;
|
|
30
|
-
}>) | ((inputContext:
|
|
31
|
-
use: ((inputContext:
|
|
30
|
+
}>) | ((inputContext: better_call868.MiddlewareInputContext<{
|
|
31
|
+
use: ((inputContext: better_call868.MiddlewareInputContext<better_call868.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_db91.Session & {
|
|
57
57
|
activeTeamId?: string | undefined;
|
|
58
58
|
activeOrganizationId?: string | undefined;
|
|
59
59
|
};
|
|
60
|
-
user:
|
|
60
|
+
user: _better_auth_core_db91.User;
|
|
61
61
|
};
|
|
62
62
|
}>))[];
|
|
63
63
|
body: z.ZodObject<{
|
|
@@ -167,26 +167,26 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => be
|
|
|
167
167
|
expiresAt: Date;
|
|
168
168
|
createdAt: Date;
|
|
169
169
|
}) & InferAdditionalFieldsFromPluginOptions<"invitation", O, false> extends infer T ? { [K in keyof T]: T[K] } : never>;
|
|
170
|
-
declare const acceptInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
170
|
+
declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => better_call868.StrictEndpoint<"/organization/accept-invitation", {
|
|
171
171
|
method: "POST";
|
|
172
172
|
body: z.ZodObject<{
|
|
173
173
|
invitationId: z.ZodString;
|
|
174
174
|
}, z.core.$strip>;
|
|
175
175
|
requireHeaders: true;
|
|
176
|
-
use: (((inputContext:
|
|
176
|
+
use: (((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
177
177
|
orgOptions: OrganizationOptions;
|
|
178
178
|
roles: typeof defaultRoles & {
|
|
179
179
|
[key: string]: Role<{}>;
|
|
180
180
|
};
|
|
181
|
-
getSession: (context:
|
|
182
|
-
session:
|
|
181
|
+
getSession: (context: _better_auth_core49.GenericEndpointContext) => Promise<{
|
|
182
|
+
session: _better_auth_core_db91.Session & {
|
|
183
183
|
activeTeamId?: string | undefined;
|
|
184
184
|
activeOrganizationId?: string | undefined;
|
|
185
185
|
};
|
|
186
|
-
user:
|
|
186
|
+
user: _better_auth_core_db91.User;
|
|
187
187
|
}>;
|
|
188
|
-
}>) | ((inputContext:
|
|
189
|
-
use: ((inputContext:
|
|
188
|
+
}>) | ((inputContext: better_call868.MiddlewareInputContext<{
|
|
189
|
+
use: ((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
190
190
|
session: {
|
|
191
191
|
session: Record<string, any> & {
|
|
192
192
|
id: string;
|
|
@@ -211,11 +211,11 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
211
211
|
}>)[];
|
|
212
212
|
}>) => Promise<{
|
|
213
213
|
session: {
|
|
214
|
-
session:
|
|
214
|
+
session: _better_auth_core_db91.Session & {
|
|
215
215
|
activeTeamId?: string | undefined;
|
|
216
216
|
activeOrganizationId?: string | undefined;
|
|
217
217
|
};
|
|
218
|
-
user:
|
|
218
|
+
user: _better_auth_core_db91.User;
|
|
219
219
|
};
|
|
220
220
|
}>))[];
|
|
221
221
|
metadata: {
|
|
@@ -274,26 +274,26 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
274
274
|
createdAt: Date;
|
|
275
275
|
} & InferAdditionalFieldsFromPluginOptions<"member", O, false>;
|
|
276
276
|
} | null>;
|
|
277
|
-
declare const rejectInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
277
|
+
declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => better_call868.StrictEndpoint<"/organization/reject-invitation", {
|
|
278
278
|
method: "POST";
|
|
279
279
|
body: z.ZodObject<{
|
|
280
280
|
invitationId: z.ZodString;
|
|
281
281
|
}, z.core.$strip>;
|
|
282
282
|
requireHeaders: true;
|
|
283
|
-
use: (((inputContext:
|
|
283
|
+
use: (((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
284
284
|
orgOptions: OrganizationOptions;
|
|
285
285
|
roles: typeof defaultRoles & {
|
|
286
286
|
[key: string]: Role<{}>;
|
|
287
287
|
};
|
|
288
|
-
getSession: (context:
|
|
289
|
-
session:
|
|
288
|
+
getSession: (context: _better_auth_core49.GenericEndpointContext) => Promise<{
|
|
289
|
+
session: _better_auth_core_db91.Session & {
|
|
290
290
|
activeTeamId?: string | undefined;
|
|
291
291
|
activeOrganizationId?: string | undefined;
|
|
292
292
|
};
|
|
293
|
-
user:
|
|
293
|
+
user: _better_auth_core_db91.User;
|
|
294
294
|
}>;
|
|
295
|
-
}>) | ((inputContext:
|
|
296
|
-
use: ((inputContext:
|
|
295
|
+
}>) | ((inputContext: better_call868.MiddlewareInputContext<{
|
|
296
|
+
use: ((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
297
297
|
session: {
|
|
298
298
|
session: Record<string, any> & {
|
|
299
299
|
id: string;
|
|
@@ -318,11 +318,11 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
318
318
|
}>)[];
|
|
319
319
|
}>) => Promise<{
|
|
320
320
|
session: {
|
|
321
|
-
session:
|
|
321
|
+
session: _better_auth_core_db91.Session & {
|
|
322
322
|
activeTeamId?: string | undefined;
|
|
323
323
|
activeOrganizationId?: string | undefined;
|
|
324
324
|
};
|
|
325
|
-
user:
|
|
325
|
+
user: _better_auth_core_db91.User;
|
|
326
326
|
};
|
|
327
327
|
}>))[];
|
|
328
328
|
metadata: {
|
|
@@ -364,26 +364,26 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
364
364
|
} | null;
|
|
365
365
|
member: null;
|
|
366
366
|
}>;
|
|
367
|
-
declare const cancelInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
367
|
+
declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => better_call868.StrictEndpoint<"/organization/cancel-invitation", {
|
|
368
368
|
method: "POST";
|
|
369
369
|
body: z.ZodObject<{
|
|
370
370
|
invitationId: z.ZodString;
|
|
371
371
|
}, z.core.$strip>;
|
|
372
372
|
requireHeaders: true;
|
|
373
|
-
use: (((inputContext:
|
|
373
|
+
use: (((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
374
374
|
orgOptions: OrganizationOptions;
|
|
375
375
|
roles: typeof defaultRoles & {
|
|
376
376
|
[key: string]: Role<{}>;
|
|
377
377
|
};
|
|
378
|
-
getSession: (context:
|
|
379
|
-
session:
|
|
378
|
+
getSession: (context: _better_auth_core49.GenericEndpointContext) => Promise<{
|
|
379
|
+
session: _better_auth_core_db91.Session & {
|
|
380
380
|
activeTeamId?: string | undefined;
|
|
381
381
|
activeOrganizationId?: string | undefined;
|
|
382
382
|
};
|
|
383
|
-
user:
|
|
383
|
+
user: _better_auth_core_db91.User;
|
|
384
384
|
}>;
|
|
385
|
-
}>) | ((inputContext:
|
|
386
|
-
use: ((inputContext:
|
|
385
|
+
}>) | ((inputContext: better_call868.MiddlewareInputContext<{
|
|
386
|
+
use: ((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
387
387
|
session: {
|
|
388
388
|
session: Record<string, any> & {
|
|
389
389
|
id: string;
|
|
@@ -408,11 +408,11 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
408
408
|
}>)[];
|
|
409
409
|
}>) => Promise<{
|
|
410
410
|
session: {
|
|
411
|
-
session:
|
|
411
|
+
session: _better_auth_core_db91.Session & {
|
|
412
412
|
activeTeamId?: string | undefined;
|
|
413
413
|
activeOrganizationId?: string | undefined;
|
|
414
414
|
};
|
|
415
|
-
user:
|
|
415
|
+
user: _better_auth_core_db91.User;
|
|
416
416
|
};
|
|
417
417
|
}>))[];
|
|
418
418
|
openapi: {
|
|
@@ -458,19 +458,19 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => b
|
|
|
458
458
|
expiresAt: Date;
|
|
459
459
|
createdAt: Date;
|
|
460
460
|
}) & InferAdditionalFieldsFromPluginOptions<"invitation", O, false> extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
|
|
461
|
-
declare const getInvitation: <O extends OrganizationOptions>(options: O) =>
|
|
461
|
+
declare const getInvitation: <O extends OrganizationOptions>(options: O) => better_call868.StrictEndpoint<"/organization/get-invitation", {
|
|
462
462
|
method: "GET";
|
|
463
|
-
use: ((inputContext:
|
|
463
|
+
use: ((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
464
464
|
orgOptions: OrganizationOptions;
|
|
465
465
|
roles: typeof defaultRoles & {
|
|
466
466
|
[key: string]: Role<{}>;
|
|
467
467
|
};
|
|
468
|
-
getSession: (context:
|
|
469
|
-
session:
|
|
468
|
+
getSession: (context: _better_auth_core49.GenericEndpointContext) => Promise<{
|
|
469
|
+
session: _better_auth_core_db91.Session & {
|
|
470
470
|
activeTeamId?: string | undefined;
|
|
471
471
|
activeOrganizationId?: string | undefined;
|
|
472
472
|
};
|
|
473
|
-
user:
|
|
473
|
+
user: _better_auth_core_db91.User;
|
|
474
474
|
}>;
|
|
475
475
|
}>)[];
|
|
476
476
|
requireHeaders: true;
|
|
@@ -567,23 +567,23 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => bett
|
|
|
567
567
|
} & InferAdditionalFieldsFromPluginOptions<"organization", O, false>)["slug"];
|
|
568
568
|
inviterEmail: string;
|
|
569
569
|
}>;
|
|
570
|
-
declare const listInvitations: <O extends OrganizationOptions>(options: O) =>
|
|
570
|
+
declare const listInvitations: <O extends OrganizationOptions>(options: O) => better_call868.StrictEndpoint<"/organization/list-invitations", {
|
|
571
571
|
method: "GET";
|
|
572
572
|
requireHeaders: true;
|
|
573
|
-
use: (((inputContext:
|
|
573
|
+
use: (((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
574
574
|
orgOptions: OrganizationOptions;
|
|
575
575
|
roles: typeof defaultRoles & {
|
|
576
576
|
[key: string]: Role<{}>;
|
|
577
577
|
};
|
|
578
|
-
getSession: (context:
|
|
579
|
-
session:
|
|
578
|
+
getSession: (context: _better_auth_core49.GenericEndpointContext) => Promise<{
|
|
579
|
+
session: _better_auth_core_db91.Session & {
|
|
580
580
|
activeTeamId?: string | undefined;
|
|
581
581
|
activeOrganizationId?: string | undefined;
|
|
582
582
|
};
|
|
583
|
-
user:
|
|
583
|
+
user: _better_auth_core_db91.User;
|
|
584
584
|
}>;
|
|
585
|
-
}>) | ((inputContext:
|
|
586
|
-
use: ((inputContext:
|
|
585
|
+
}>) | ((inputContext: better_call868.MiddlewareInputContext<{
|
|
586
|
+
use: ((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
587
587
|
session: {
|
|
588
588
|
session: Record<string, any> & {
|
|
589
589
|
id: string;
|
|
@@ -608,11 +608,11 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => be
|
|
|
608
608
|
}>)[];
|
|
609
609
|
}>) => Promise<{
|
|
610
610
|
session: {
|
|
611
|
-
session:
|
|
611
|
+
session: _better_auth_core_db91.Session & {
|
|
612
612
|
activeTeamId?: string | undefined;
|
|
613
613
|
activeOrganizationId?: string | undefined;
|
|
614
614
|
};
|
|
615
|
-
user:
|
|
615
|
+
user: _better_auth_core_db91.User;
|
|
616
616
|
};
|
|
617
617
|
}>))[];
|
|
618
618
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -643,19 +643,19 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => be
|
|
|
643
643
|
/**
|
|
644
644
|
* List all invitations a user has received
|
|
645
645
|
*/
|
|
646
|
-
declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =>
|
|
646
|
+
declare const listUserInvitations: <O extends OrganizationOptions>(options: O) => better_call868.StrictEndpoint<"/organization/list-user-invitations", {
|
|
647
647
|
method: "GET";
|
|
648
|
-
use: ((inputContext:
|
|
648
|
+
use: ((inputContext: better_call868.MiddlewareInputContext<better_call868.MiddlewareOptions>) => Promise<{
|
|
649
649
|
orgOptions: OrganizationOptions;
|
|
650
650
|
roles: typeof defaultRoles & {
|
|
651
651
|
[key: string]: Role<{}>;
|
|
652
652
|
};
|
|
653
|
-
getSession: (context:
|
|
654
|
-
session:
|
|
653
|
+
getSession: (context: _better_auth_core49.GenericEndpointContext) => Promise<{
|
|
654
|
+
session: _better_auth_core_db91.Session & {
|
|
655
655
|
activeTeamId?: string | undefined;
|
|
656
656
|
activeOrganizationId?: string | undefined;
|
|
657
657
|
};
|
|
658
|
-
user:
|
|
658
|
+
user: _better_auth_core_db91.User;
|
|
659
659
|
}>;
|
|
660
660
|
}>)[];
|
|
661
661
|
query: z.ZodOptional<z.ZodObject<{
|