@convex-dev/better-auth 0.7.10 → 0.7.12
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/README.md +10 -9
- package/dist/commonjs/client/index.d.ts +313 -280
- package/dist/commonjs/client/index.d.ts.map +1 -1
- package/dist/commonjs/client/index.js +4 -5
- package/dist/commonjs/client/index.js.map +1 -1
- package/dist/commonjs/component/lib.d.ts +113 -97
- package/dist/commonjs/component/lib.d.ts.map +1 -1
- package/dist/commonjs/component/lib.js +31 -18
- package/dist/commonjs/component/lib.js.map +1 -1
- package/dist/commonjs/component/schema.d.ts +235 -199
- package/dist/commonjs/component/schema.d.ts.map +1 -1
- package/dist/commonjs/component/schema.js +125 -102
- package/dist/commonjs/component/schema.js.map +1 -1
- package/dist/commonjs/component/util.d.ts +491 -404
- package/dist/commonjs/component/util.d.ts.map +1 -1
- package/dist/commonjs/nextjs/index.d.ts.map +1 -1
- package/dist/commonjs/nextjs/index.js +18 -2
- package/dist/commonjs/nextjs/index.js.map +1 -1
- package/dist/commonjs/plugins/convex/index.d.ts +9 -9
- package/dist/commonjs/plugins/convex/index.d.ts.map +1 -1
- package/dist/commonjs/react-start/index.d.ts +6 -6
- package/dist/commonjs/react-start/index.d.ts.map +1 -1
- package/dist/commonjs/react-start/index.js +11 -0
- package/dist/commonjs/react-start/index.js.map +1 -1
- package/dist/esm/client/adapter.d.ts +1 -1
- package/dist/esm/client/index.d.ts +317 -284
- package/dist/esm/client/index.d.ts.map +1 -1
- package/dist/esm/client/index.js +9 -10
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/client/plugins/index.d.ts +2 -2
- package/dist/esm/client/plugins/index.js +2 -2
- package/dist/esm/component/adapterTest.d.ts +1 -1
- package/dist/esm/component/adapterTest.js +3 -3
- package/dist/esm/component/lib.d.ts +113 -97
- package/dist/esm/component/lib.d.ts.map +1 -1
- package/dist/esm/component/lib.js +33 -20
- package/dist/esm/component/lib.js.map +1 -1
- package/dist/esm/component/schema.d.ts +235 -199
- package/dist/esm/component/schema.d.ts.map +1 -1
- package/dist/esm/component/schema.js +125 -102
- package/dist/esm/component/schema.js.map +1 -1
- package/dist/esm/component/util.d.ts +491 -404
- package/dist/esm/component/util.d.ts.map +1 -1
- package/dist/esm/component/util.js +1 -1
- package/dist/esm/nextjs/index.d.ts.map +1 -1
- package/dist/esm/nextjs/index.js +19 -3
- package/dist/esm/nextjs/index.js.map +1 -1
- package/dist/esm/plugins/convex/client.d.ts +1 -1
- package/dist/esm/plugins/convex/index.d.ts +9 -9
- package/dist/esm/plugins/convex/index.d.ts.map +1 -1
- package/dist/esm/plugins/cross-domain/client.d.ts +1 -1
- package/dist/esm/plugins/index.d.ts +2 -2
- package/dist/esm/plugins/index.js +2 -2
- package/dist/esm/react/client.d.ts +1 -1
- package/dist/esm/react/index.d.ts +1 -1
- package/dist/esm/react/index.js +1 -1
- package/dist/esm/react-start/index.d.ts +6 -6
- package/dist/esm/react-start/index.d.ts.map +1 -1
- package/dist/esm/react-start/index.js +12 -1
- package/dist/esm/react-start/index.js.map +1 -1
- package/dist/esm/utils/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/client/index.ts +4 -5
- package/src/component/lib.ts +42 -27
- package/src/component/schema.ts +127 -102
- package/src/nextjs/index.ts +23 -2
- package/src/react-start/index.ts +13 -0
- package/dist/commonjs/client/cors.d.ts +0 -77
- package/dist/commonjs/client/cors.d.ts.map +0 -1
- package/dist/commonjs/client/cors.js +0 -297
- package/dist/commonjs/client/cors.js.map +0 -1
- package/dist/commonjs/util.d.ts +0 -2
- package/dist/commonjs/util.d.ts.map +0 -1
- package/dist/commonjs/util.js +0 -8
- package/dist/commonjs/util.js.map +0 -1
- package/dist/esm/client/cors.d.ts +0 -77
- package/dist/esm/client/cors.d.ts.map +0 -1
- package/dist/esm/client/cors.js +0 -297
- package/dist/esm/client/cors.js.map +0 -1
- package/dist/esm/util.d.ts +0 -2
- package/dist/esm/util.d.ts.map +0 -1
- package/dist/esm/util.js +0 -8
- package/dist/esm/util.js.map +0 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { type Auth as ConvexAuth, type DefaultFunctionArgs, type Expand, type FunctionReference, GenericActionCtx, type GenericDataModel, GenericMutationCtx, type GenericQueryCtx, type HttpRouter } from "convex/server";
|
|
2
2
|
import { type GenericId, Infer } from "convex/values";
|
|
3
|
-
import type { api } from "../component/_generated/api";
|
|
4
|
-
import schema from "../component/schema";
|
|
5
|
-
import { convexAdapter } from "./adapter";
|
|
3
|
+
import type { api } from "../component/_generated/api.js";
|
|
4
|
+
import schema from "../component/schema.js";
|
|
5
|
+
import { convexAdapter } from "./adapter.js";
|
|
6
6
|
import { betterAuth } from "better-auth";
|
|
7
|
-
import { adapterArgsValidator } from "../component/lib";
|
|
7
|
+
import { adapterArgsValidator } from "../component/lib.js";
|
|
8
8
|
export { convexAdapter };
|
|
9
9
|
declare const createUserValidator: import("convex/values").VObject<{
|
|
10
|
-
image?: string | undefined;
|
|
11
|
-
twoFactorEnabled?: boolean | undefined;
|
|
12
|
-
isAnonymous?: boolean | undefined;
|
|
13
|
-
username?: string | undefined;
|
|
14
|
-
displayUsername?: string | undefined;
|
|
15
|
-
phoneNumber?: string | undefined;
|
|
16
|
-
phoneNumberVerified?: boolean | undefined;
|
|
17
|
-
role?: string | undefined;
|
|
18
|
-
banned?: boolean | undefined;
|
|
19
|
-
banReason?: string | undefined;
|
|
20
|
-
banExpires?: number | undefined;
|
|
21
|
-
stripeCustomerId?: string | undefined;
|
|
10
|
+
image?: string | null | undefined;
|
|
11
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
12
|
+
isAnonymous?: boolean | null | undefined;
|
|
13
|
+
username?: string | null | undefined;
|
|
14
|
+
displayUsername?: string | null | undefined;
|
|
15
|
+
phoneNumber?: string | null | undefined;
|
|
16
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
17
|
+
role?: string | null | undefined;
|
|
18
|
+
banned?: boolean | null | undefined;
|
|
19
|
+
banReason?: string | null | undefined;
|
|
20
|
+
banExpires?: number | null | undefined;
|
|
21
|
+
stripeCustomerId?: string | null | undefined;
|
|
22
|
+
teamId?: string | null | undefined;
|
|
22
23
|
name: string;
|
|
23
24
|
email: string;
|
|
24
25
|
emailVerified: boolean;
|
|
@@ -28,37 +29,39 @@ declare const createUserValidator: import("convex/values").VObject<{
|
|
|
28
29
|
name: import("convex/values").VString<string, "required">;
|
|
29
30
|
email: import("convex/values").VString<string, "required">;
|
|
30
31
|
emailVerified: import("convex/values").VBoolean<boolean, "required">;
|
|
31
|
-
image: import("convex/values").
|
|
32
|
+
image: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
32
33
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
33
34
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
34
|
-
twoFactorEnabled: import("convex/values").
|
|
35
|
-
isAnonymous: import("convex/values").
|
|
36
|
-
username: import("convex/values").
|
|
37
|
-
displayUsername: import("convex/values").
|
|
38
|
-
phoneNumber: import("convex/values").
|
|
39
|
-
phoneNumberVerified: import("convex/values").
|
|
40
|
-
role: import("convex/values").
|
|
41
|
-
banned: import("convex/values").
|
|
42
|
-
banReason: import("convex/values").
|
|
43
|
-
banExpires: import("convex/values").
|
|
44
|
-
stripeCustomerId: import("convex/values").
|
|
45
|
-
|
|
35
|
+
twoFactorEnabled: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
36
|
+
isAnonymous: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
37
|
+
username: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
38
|
+
displayUsername: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
39
|
+
phoneNumber: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
40
|
+
phoneNumberVerified: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
41
|
+
role: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
42
|
+
banned: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
43
|
+
banReason: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
44
|
+
banExpires: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
45
|
+
stripeCustomerId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
46
|
+
teamId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
47
|
+
}, "required", "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "twoFactorEnabled" | "isAnonymous" | "username" | "displayUsername" | "phoneNumber" | "phoneNumberVerified" | "role" | "banned" | "banReason" | "banExpires" | "stripeCustomerId" | "teamId">;
|
|
46
48
|
declare const createUserArgsValidator: import("convex/values").VObject<{
|
|
47
49
|
input: {
|
|
48
50
|
model: "user";
|
|
49
51
|
data: {
|
|
50
|
-
image?: string | undefined;
|
|
51
|
-
twoFactorEnabled?: boolean | undefined;
|
|
52
|
-
isAnonymous?: boolean | undefined;
|
|
53
|
-
username?: string | undefined;
|
|
54
|
-
displayUsername?: string | undefined;
|
|
55
|
-
phoneNumber?: string | undefined;
|
|
56
|
-
phoneNumberVerified?: boolean | undefined;
|
|
57
|
-
role?: string | undefined;
|
|
58
|
-
banned?: boolean | undefined;
|
|
59
|
-
banReason?: string | undefined;
|
|
60
|
-
banExpires?: number | undefined;
|
|
61
|
-
stripeCustomerId?: string | undefined;
|
|
52
|
+
image?: string | null | undefined;
|
|
53
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
54
|
+
isAnonymous?: boolean | null | undefined;
|
|
55
|
+
username?: string | null | undefined;
|
|
56
|
+
displayUsername?: string | null | undefined;
|
|
57
|
+
phoneNumber?: string | null | undefined;
|
|
58
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
59
|
+
role?: string | null | undefined;
|
|
60
|
+
banned?: boolean | null | undefined;
|
|
61
|
+
banReason?: string | null | undefined;
|
|
62
|
+
banExpires?: number | null | undefined;
|
|
63
|
+
stripeCustomerId?: string | null | undefined;
|
|
64
|
+
teamId?: string | null | undefined;
|
|
62
65
|
name: string;
|
|
63
66
|
email: string;
|
|
64
67
|
emailVerified: boolean;
|
|
@@ -70,18 +73,19 @@ declare const createUserArgsValidator: import("convex/values").VObject<{
|
|
|
70
73
|
input: import("convex/values").VObject<{
|
|
71
74
|
model: "user";
|
|
72
75
|
data: {
|
|
73
|
-
image?: string | undefined;
|
|
74
|
-
twoFactorEnabled?: boolean | undefined;
|
|
75
|
-
isAnonymous?: boolean | undefined;
|
|
76
|
-
username?: string | undefined;
|
|
77
|
-
displayUsername?: string | undefined;
|
|
78
|
-
phoneNumber?: string | undefined;
|
|
79
|
-
phoneNumberVerified?: boolean | undefined;
|
|
80
|
-
role?: string | undefined;
|
|
81
|
-
banned?: boolean | undefined;
|
|
82
|
-
banReason?: string | undefined;
|
|
83
|
-
banExpires?: number | undefined;
|
|
84
|
-
stripeCustomerId?: string | undefined;
|
|
76
|
+
image?: string | null | undefined;
|
|
77
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
78
|
+
isAnonymous?: boolean | null | undefined;
|
|
79
|
+
username?: string | null | undefined;
|
|
80
|
+
displayUsername?: string | null | undefined;
|
|
81
|
+
phoneNumber?: string | null | undefined;
|
|
82
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
83
|
+
role?: string | null | undefined;
|
|
84
|
+
banned?: boolean | null | undefined;
|
|
85
|
+
banReason?: string | null | undefined;
|
|
86
|
+
banExpires?: number | null | undefined;
|
|
87
|
+
stripeCustomerId?: string | null | undefined;
|
|
88
|
+
teamId?: string | null | undefined;
|
|
85
89
|
name: string;
|
|
86
90
|
email: string;
|
|
87
91
|
emailVerified: boolean;
|
|
@@ -91,18 +95,19 @@ declare const createUserArgsValidator: import("convex/values").VObject<{
|
|
|
91
95
|
}, {
|
|
92
96
|
model: import("convex/values").VLiteral<"user", "required">;
|
|
93
97
|
data: import("convex/values").VObject<{
|
|
94
|
-
image?: string | undefined;
|
|
95
|
-
twoFactorEnabled?: boolean | undefined;
|
|
96
|
-
isAnonymous?: boolean | undefined;
|
|
97
|
-
username?: string | undefined;
|
|
98
|
-
displayUsername?: string | undefined;
|
|
99
|
-
phoneNumber?: string | undefined;
|
|
100
|
-
phoneNumberVerified?: boolean | undefined;
|
|
101
|
-
role?: string | undefined;
|
|
102
|
-
banned?: boolean | undefined;
|
|
103
|
-
banReason?: string | undefined;
|
|
104
|
-
banExpires?: number | undefined;
|
|
105
|
-
stripeCustomerId?: string | undefined;
|
|
98
|
+
image?: string | null | undefined;
|
|
99
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
100
|
+
isAnonymous?: boolean | null | undefined;
|
|
101
|
+
username?: string | null | undefined;
|
|
102
|
+
displayUsername?: string | null | undefined;
|
|
103
|
+
phoneNumber?: string | null | undefined;
|
|
104
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
105
|
+
role?: string | null | undefined;
|
|
106
|
+
banned?: boolean | null | undefined;
|
|
107
|
+
banReason?: string | null | undefined;
|
|
108
|
+
banExpires?: number | null | undefined;
|
|
109
|
+
stripeCustomerId?: string | null | undefined;
|
|
110
|
+
teamId?: string | null | undefined;
|
|
106
111
|
name: string;
|
|
107
112
|
email: string;
|
|
108
113
|
emailVerified: boolean;
|
|
@@ -112,23 +117,24 @@ declare const createUserArgsValidator: import("convex/values").VObject<{
|
|
|
112
117
|
name: import("convex/values").VString<string, "required">;
|
|
113
118
|
email: import("convex/values").VString<string, "required">;
|
|
114
119
|
emailVerified: import("convex/values").VBoolean<boolean, "required">;
|
|
115
|
-
image: import("convex/values").
|
|
120
|
+
image: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
116
121
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
117
122
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
118
|
-
twoFactorEnabled: import("convex/values").
|
|
119
|
-
isAnonymous: import("convex/values").
|
|
120
|
-
username: import("convex/values").
|
|
121
|
-
displayUsername: import("convex/values").
|
|
122
|
-
phoneNumber: import("convex/values").
|
|
123
|
-
phoneNumberVerified: import("convex/values").
|
|
124
|
-
role: import("convex/values").
|
|
125
|
-
banned: import("convex/values").
|
|
126
|
-
banReason: import("convex/values").
|
|
127
|
-
banExpires: import("convex/values").
|
|
128
|
-
stripeCustomerId: import("convex/values").
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}, "required", "
|
|
123
|
+
twoFactorEnabled: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
124
|
+
isAnonymous: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
125
|
+
username: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
126
|
+
displayUsername: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
127
|
+
phoneNumber: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
128
|
+
phoneNumberVerified: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
129
|
+
role: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
130
|
+
banned: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
131
|
+
banReason: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
132
|
+
banExpires: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
133
|
+
stripeCustomerId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
134
|
+
teamId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
135
|
+
}, "required", "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "twoFactorEnabled" | "isAnonymous" | "username" | "displayUsername" | "phoneNumber" | "phoneNumberVerified" | "role" | "banned" | "banReason" | "banExpires" | "stripeCustomerId" | "teamId">;
|
|
136
|
+
}, "required", "model" | "data" | "data.name" | "data.email" | "data.emailVerified" | "data.image" | "data.createdAt" | "data.updatedAt" | "data.twoFactorEnabled" | "data.isAnonymous" | "data.username" | "data.displayUsername" | "data.phoneNumber" | "data.phoneNumberVerified" | "data.role" | "data.banned" | "data.banReason" | "data.banExpires" | "data.stripeCustomerId" | "data.teamId">;
|
|
137
|
+
}, "required", "input" | "input.model" | "input.data" | "input.data.name" | "input.data.email" | "input.data.emailVerified" | "input.data.image" | "input.data.createdAt" | "input.data.updatedAt" | "input.data.twoFactorEnabled" | "input.data.isAnonymous" | "input.data.username" | "input.data.displayUsername" | "input.data.phoneNumber" | "input.data.phoneNumberVerified" | "input.data.role" | "input.data.banned" | "input.data.banReason" | "input.data.banExpires" | "input.data.stripeCustomerId" | "input.data.teamId">;
|
|
132
138
|
declare const updateUserArgsValidator: import("convex/values").VObject<{
|
|
133
139
|
input: {
|
|
134
140
|
where?: {
|
|
@@ -141,20 +147,21 @@ declare const updateUserArgsValidator: import("convex/values").VObject<{
|
|
|
141
147
|
name?: string | undefined;
|
|
142
148
|
email?: string | undefined;
|
|
143
149
|
emailVerified?: boolean | undefined;
|
|
144
|
-
image?: string | undefined;
|
|
150
|
+
image?: string | null | undefined;
|
|
145
151
|
createdAt?: number | undefined;
|
|
146
152
|
updatedAt?: number | undefined;
|
|
147
|
-
twoFactorEnabled?: boolean | undefined;
|
|
148
|
-
isAnonymous?: boolean | undefined;
|
|
149
|
-
username?: string | undefined;
|
|
150
|
-
displayUsername?: string | undefined;
|
|
151
|
-
phoneNumber?: string | undefined;
|
|
152
|
-
phoneNumberVerified?: boolean | undefined;
|
|
153
|
-
role?: string | undefined;
|
|
154
|
-
banned?: boolean | undefined;
|
|
155
|
-
banReason?: string | undefined;
|
|
156
|
-
banExpires?: number | undefined;
|
|
157
|
-
stripeCustomerId?: string | undefined;
|
|
153
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
154
|
+
isAnonymous?: boolean | null | undefined;
|
|
155
|
+
username?: string | null | undefined;
|
|
156
|
+
displayUsername?: string | null | undefined;
|
|
157
|
+
phoneNumber?: string | null | undefined;
|
|
158
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
159
|
+
role?: string | null | undefined;
|
|
160
|
+
banned?: boolean | null | undefined;
|
|
161
|
+
banReason?: string | null | undefined;
|
|
162
|
+
banExpires?: number | null | undefined;
|
|
163
|
+
stripeCustomerId?: string | null | undefined;
|
|
164
|
+
teamId?: string | null | undefined;
|
|
158
165
|
};
|
|
159
166
|
model: "user";
|
|
160
167
|
};
|
|
@@ -170,20 +177,21 @@ declare const updateUserArgsValidator: import("convex/values").VObject<{
|
|
|
170
177
|
name?: string | undefined;
|
|
171
178
|
email?: string | undefined;
|
|
172
179
|
emailVerified?: boolean | undefined;
|
|
173
|
-
image?: string | undefined;
|
|
180
|
+
image?: string | null | undefined;
|
|
174
181
|
createdAt?: number | undefined;
|
|
175
182
|
updatedAt?: number | undefined;
|
|
176
|
-
twoFactorEnabled?: boolean | undefined;
|
|
177
|
-
isAnonymous?: boolean | undefined;
|
|
178
|
-
username?: string | undefined;
|
|
179
|
-
displayUsername?: string | undefined;
|
|
180
|
-
phoneNumber?: string | undefined;
|
|
181
|
-
phoneNumberVerified?: boolean | undefined;
|
|
182
|
-
role?: string | undefined;
|
|
183
|
-
banned?: boolean | undefined;
|
|
184
|
-
banReason?: string | undefined;
|
|
185
|
-
banExpires?: number | undefined;
|
|
186
|
-
stripeCustomerId?: string | undefined;
|
|
183
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
184
|
+
isAnonymous?: boolean | null | undefined;
|
|
185
|
+
username?: string | null | undefined;
|
|
186
|
+
displayUsername?: string | null | undefined;
|
|
187
|
+
phoneNumber?: string | null | undefined;
|
|
188
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
189
|
+
role?: string | null | undefined;
|
|
190
|
+
banned?: boolean | null | undefined;
|
|
191
|
+
banReason?: string | null | undefined;
|
|
192
|
+
banExpires?: number | null | undefined;
|
|
193
|
+
stripeCustomerId?: string | null | undefined;
|
|
194
|
+
teamId?: string | null | undefined;
|
|
187
195
|
};
|
|
188
196
|
model: "user";
|
|
189
197
|
}, {
|
|
@@ -208,49 +216,52 @@ declare const updateUserArgsValidator: import("convex/values").VObject<{
|
|
|
208
216
|
name?: string | undefined;
|
|
209
217
|
email?: string | undefined;
|
|
210
218
|
emailVerified?: boolean | undefined;
|
|
211
|
-
image?: string | undefined;
|
|
219
|
+
image?: string | null | undefined;
|
|
212
220
|
createdAt?: number | undefined;
|
|
213
221
|
updatedAt?: number | undefined;
|
|
214
|
-
twoFactorEnabled?: boolean | undefined;
|
|
215
|
-
isAnonymous?: boolean | undefined;
|
|
216
|
-
username?: string | undefined;
|
|
217
|
-
displayUsername?: string | undefined;
|
|
218
|
-
phoneNumber?: string | undefined;
|
|
219
|
-
phoneNumberVerified?: boolean | undefined;
|
|
220
|
-
role?: string | undefined;
|
|
221
|
-
banned?: boolean | undefined;
|
|
222
|
-
banReason?: string | undefined;
|
|
223
|
-
banExpires?: number | undefined;
|
|
224
|
-
stripeCustomerId?: string | undefined;
|
|
222
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
223
|
+
isAnonymous?: boolean | null | undefined;
|
|
224
|
+
username?: string | null | undefined;
|
|
225
|
+
displayUsername?: string | null | undefined;
|
|
226
|
+
phoneNumber?: string | null | undefined;
|
|
227
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
228
|
+
role?: string | null | undefined;
|
|
229
|
+
banned?: boolean | null | undefined;
|
|
230
|
+
banReason?: string | null | undefined;
|
|
231
|
+
banExpires?: number | null | undefined;
|
|
232
|
+
stripeCustomerId?: string | null | undefined;
|
|
233
|
+
teamId?: string | null | undefined;
|
|
225
234
|
}, {
|
|
226
235
|
name: import("convex/values").VString<string | undefined, "optional">;
|
|
227
236
|
email: import("convex/values").VString<string | undefined, "optional">;
|
|
228
237
|
emailVerified: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
229
|
-
image: import("convex/values").
|
|
238
|
+
image: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
230
239
|
createdAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
231
240
|
updatedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
232
|
-
twoFactorEnabled: import("convex/values").
|
|
233
|
-
isAnonymous: import("convex/values").
|
|
234
|
-
username: import("convex/values").
|
|
235
|
-
displayUsername: import("convex/values").
|
|
236
|
-
phoneNumber: import("convex/values").
|
|
237
|
-
phoneNumberVerified: import("convex/values").
|
|
238
|
-
role: import("convex/values").
|
|
239
|
-
banned: import("convex/values").
|
|
240
|
-
banReason: import("convex/values").
|
|
241
|
-
banExpires: import("convex/values").
|
|
242
|
-
stripeCustomerId: import("convex/values").
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}, "required", "
|
|
241
|
+
twoFactorEnabled: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
242
|
+
isAnonymous: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
243
|
+
username: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
244
|
+
displayUsername: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
245
|
+
phoneNumber: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
246
|
+
phoneNumberVerified: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
247
|
+
role: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
248
|
+
banned: import("convex/values").VUnion<boolean | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VBoolean<boolean, "required">], "optional", never>;
|
|
249
|
+
banReason: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
250
|
+
banExpires: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VFloat64<number, "required">], "optional", never>;
|
|
251
|
+
stripeCustomerId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
252
|
+
teamId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
253
|
+
}, "required", "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "twoFactorEnabled" | "isAnonymous" | "username" | "displayUsername" | "phoneNumber" | "phoneNumberVerified" | "role" | "banned" | "banReason" | "banExpires" | "stripeCustomerId" | "teamId">;
|
|
254
|
+
}, "required", "update" | "model" | "where" | "update.name" | "update.email" | "update.emailVerified" | "update.image" | "update.createdAt" | "update.updatedAt" | "update.twoFactorEnabled" | "update.isAnonymous" | "update.username" | "update.displayUsername" | "update.phoneNumber" | "update.phoneNumberVerified" | "update.role" | "update.banned" | "update.banReason" | "update.banExpires" | "update.stripeCustomerId" | "update.teamId">;
|
|
255
|
+
}, "required", "input" | "input.model" | "input.update" | "input.where" | "input.update.name" | "input.update.email" | "input.update.emailVerified" | "input.update.image" | "input.update.createdAt" | "input.update.updatedAt" | "input.update.twoFactorEnabled" | "input.update.isAnonymous" | "input.update.username" | "input.update.displayUsername" | "input.update.phoneNumber" | "input.update.phoneNumberVerified" | "input.update.role" | "input.update.banned" | "input.update.banReason" | "input.update.banExpires" | "input.update.stripeCustomerId" | "input.update.teamId">;
|
|
246
256
|
declare const createSessionArgsValidator: import("convex/values").VObject<{
|
|
247
257
|
input: {
|
|
248
258
|
model: "session";
|
|
249
259
|
data: {
|
|
250
|
-
ipAddress?: string | undefined;
|
|
251
|
-
userAgent?: string | undefined;
|
|
252
|
-
impersonatedBy?: string | undefined;
|
|
253
|
-
activeOrganizationId?: string | undefined;
|
|
260
|
+
ipAddress?: string | null | undefined;
|
|
261
|
+
userAgent?: string | null | undefined;
|
|
262
|
+
impersonatedBy?: string | null | undefined;
|
|
263
|
+
activeOrganizationId?: string | null | undefined;
|
|
264
|
+
activeTeamId?: string | null | undefined;
|
|
254
265
|
createdAt: number;
|
|
255
266
|
updatedAt: number;
|
|
256
267
|
userId: string;
|
|
@@ -262,10 +273,11 @@ declare const createSessionArgsValidator: import("convex/values").VObject<{
|
|
|
262
273
|
input: import("convex/values").VObject<{
|
|
263
274
|
model: "session";
|
|
264
275
|
data: {
|
|
265
|
-
ipAddress?: string | undefined;
|
|
266
|
-
userAgent?: string | undefined;
|
|
267
|
-
impersonatedBy?: string | undefined;
|
|
268
|
-
activeOrganizationId?: string | undefined;
|
|
276
|
+
ipAddress?: string | null | undefined;
|
|
277
|
+
userAgent?: string | null | undefined;
|
|
278
|
+
impersonatedBy?: string | null | undefined;
|
|
279
|
+
activeOrganizationId?: string | null | undefined;
|
|
280
|
+
activeTeamId?: string | null | undefined;
|
|
269
281
|
createdAt: number;
|
|
270
282
|
updatedAt: number;
|
|
271
283
|
userId: string;
|
|
@@ -275,10 +287,11 @@ declare const createSessionArgsValidator: import("convex/values").VObject<{
|
|
|
275
287
|
}, {
|
|
276
288
|
model: import("convex/values").VLiteral<"session", "required">;
|
|
277
289
|
data: import("convex/values").VObject<{
|
|
278
|
-
ipAddress?: string | undefined;
|
|
279
|
-
userAgent?: string | undefined;
|
|
280
|
-
impersonatedBy?: string | undefined;
|
|
281
|
-
activeOrganizationId?: string | undefined;
|
|
290
|
+
ipAddress?: string | null | undefined;
|
|
291
|
+
userAgent?: string | null | undefined;
|
|
292
|
+
impersonatedBy?: string | null | undefined;
|
|
293
|
+
activeOrganizationId?: string | null | undefined;
|
|
294
|
+
activeTeamId?: string | null | undefined;
|
|
282
295
|
createdAt: number;
|
|
283
296
|
updatedAt: number;
|
|
284
297
|
userId: string;
|
|
@@ -289,14 +302,15 @@ declare const createSessionArgsValidator: import("convex/values").VObject<{
|
|
|
289
302
|
token: import("convex/values").VString<string, "required">;
|
|
290
303
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
291
304
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
292
|
-
ipAddress: import("convex/values").
|
|
293
|
-
userAgent: import("convex/values").
|
|
305
|
+
ipAddress: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
306
|
+
userAgent: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
294
307
|
userId: import("convex/values").VString<string, "required">;
|
|
295
|
-
impersonatedBy: import("convex/values").
|
|
296
|
-
activeOrganizationId: import("convex/values").
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}, "required", "
|
|
308
|
+
impersonatedBy: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
309
|
+
activeOrganizationId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
310
|
+
activeTeamId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VNull<null, "required">, import("convex/values").VString<string, "required">], "optional", never>;
|
|
311
|
+
}, "required", "createdAt" | "updatedAt" | "userId" | "expiresAt" | "token" | "ipAddress" | "userAgent" | "impersonatedBy" | "activeOrganizationId" | "activeTeamId">;
|
|
312
|
+
}, "required", "model" | "data" | "data.createdAt" | "data.updatedAt" | "data.userId" | "data.expiresAt" | "data.token" | "data.ipAddress" | "data.userAgent" | "data.impersonatedBy" | "data.activeOrganizationId" | "data.activeTeamId">;
|
|
313
|
+
}, "required", "input" | "input.model" | "input.data" | "input.data.createdAt" | "input.data.updatedAt" | "input.data.userId" | "input.data.expiresAt" | "input.data.token" | "input.data.ipAddress" | "input.data.userAgent" | "input.data.impersonatedBy" | "input.data.activeOrganizationId" | "input.data.activeTeamId">;
|
|
300
314
|
export type EventFunction<T extends DefaultFunctionArgs> = FunctionReference<"mutation", "internal" | "public", T>;
|
|
301
315
|
export type AuthFunctions = {
|
|
302
316
|
createUser: FunctionReference<"mutation", "internal", Infer<typeof createUserArgsValidator>>;
|
|
@@ -333,10 +347,11 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
333
347
|
updateUserMetadata(ctx: GenericMutationCtx<GenericDataModel>, userId: UserId, metadata: Omit<Partial<Infer<typeof schema.tables.user.validator>>, "userId">): Promise<{
|
|
334
348
|
_id: string;
|
|
335
349
|
_creationTime: number;
|
|
336
|
-
ipAddress?: string | undefined;
|
|
337
|
-
userAgent?: string | undefined;
|
|
338
|
-
impersonatedBy?: string | undefined;
|
|
339
|
-
activeOrganizationId?: string | undefined;
|
|
350
|
+
ipAddress?: string | null | undefined;
|
|
351
|
+
userAgent?: string | null | undefined;
|
|
352
|
+
impersonatedBy?: string | null | undefined;
|
|
353
|
+
activeOrganizationId?: string | null | undefined;
|
|
354
|
+
activeTeamId?: string | null | undefined;
|
|
340
355
|
createdAt: number;
|
|
341
356
|
updatedAt: number;
|
|
342
357
|
userId: string;
|
|
@@ -345,19 +360,20 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
345
360
|
} | {
|
|
346
361
|
_id: string;
|
|
347
362
|
_creationTime: number;
|
|
348
|
-
image?: string | undefined;
|
|
349
|
-
twoFactorEnabled?: boolean | undefined;
|
|
350
|
-
isAnonymous?: boolean | undefined;
|
|
351
|
-
username?: string | undefined;
|
|
352
|
-
displayUsername?: string | undefined;
|
|
353
|
-
phoneNumber?: string | undefined;
|
|
354
|
-
phoneNumberVerified?: boolean | undefined;
|
|
355
|
-
role?: string | undefined;
|
|
356
|
-
banned?: boolean | undefined;
|
|
357
|
-
banReason?: string | undefined;
|
|
358
|
-
banExpires?: number | undefined;
|
|
359
|
-
stripeCustomerId?: string | undefined;
|
|
360
|
-
userId?: string | undefined;
|
|
363
|
+
image?: string | null | undefined;
|
|
364
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
365
|
+
isAnonymous?: boolean | null | undefined;
|
|
366
|
+
username?: string | null | undefined;
|
|
367
|
+
displayUsername?: string | null | undefined;
|
|
368
|
+
phoneNumber?: string | null | undefined;
|
|
369
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
370
|
+
role?: string | null | undefined;
|
|
371
|
+
banned?: boolean | null | undefined;
|
|
372
|
+
banReason?: string | null | undefined;
|
|
373
|
+
banExpires?: number | null | undefined;
|
|
374
|
+
stripeCustomerId?: string | null | undefined;
|
|
375
|
+
userId?: string | null | undefined;
|
|
376
|
+
teamId?: string | null | undefined;
|
|
361
377
|
name: string;
|
|
362
378
|
email: string;
|
|
363
379
|
emailVerified: boolean;
|
|
@@ -366,13 +382,13 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
366
382
|
} | {
|
|
367
383
|
_id: string;
|
|
368
384
|
_creationTime: number;
|
|
369
|
-
accessToken?: string | undefined;
|
|
370
|
-
refreshToken?: string | undefined;
|
|
371
|
-
idToken?: string | undefined;
|
|
372
|
-
accessTokenExpiresAt?: number | undefined;
|
|
373
|
-
refreshTokenExpiresAt?: number | undefined;
|
|
374
|
-
scope?: string | undefined;
|
|
375
|
-
password?: string | undefined;
|
|
385
|
+
accessToken?: string | null | undefined;
|
|
386
|
+
refreshToken?: string | null | undefined;
|
|
387
|
+
idToken?: string | null | undefined;
|
|
388
|
+
accessTokenExpiresAt?: number | null | undefined;
|
|
389
|
+
refreshTokenExpiresAt?: number | null | undefined;
|
|
390
|
+
scope?: string | null | undefined;
|
|
391
|
+
password?: string | null | undefined;
|
|
376
392
|
createdAt: number;
|
|
377
393
|
updatedAt: number;
|
|
378
394
|
userId: string;
|
|
@@ -381,8 +397,8 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
381
397
|
} | {
|
|
382
398
|
_id: string;
|
|
383
399
|
_creationTime: number;
|
|
384
|
-
createdAt?: number | undefined;
|
|
385
|
-
updatedAt?: number | undefined;
|
|
400
|
+
createdAt?: number | null | undefined;
|
|
401
|
+
updatedAt?: number | null | undefined;
|
|
386
402
|
expiresAt: number;
|
|
387
403
|
identifier: string;
|
|
388
404
|
value: string;
|
|
@@ -395,10 +411,10 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
395
411
|
} | {
|
|
396
412
|
_id: string;
|
|
397
413
|
_creationTime: number;
|
|
398
|
-
name?: string | undefined;
|
|
399
|
-
createdAt?: number | undefined;
|
|
400
|
-
transports?: string | undefined;
|
|
401
|
-
aaguid?: string | undefined;
|
|
414
|
+
name?: string | null | undefined;
|
|
415
|
+
createdAt?: number | null | undefined;
|
|
416
|
+
transports?: string | null | undefined;
|
|
417
|
+
aaguid?: string | null | undefined;
|
|
402
418
|
userId: string;
|
|
403
419
|
publicKey: string;
|
|
404
420
|
credentialID: string;
|
|
@@ -408,22 +424,22 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
408
424
|
} | {
|
|
409
425
|
_id: string;
|
|
410
426
|
_creationTime: number;
|
|
411
|
-
name?: string | undefined;
|
|
412
|
-
expiresAt?: number | undefined;
|
|
413
|
-
start?: string | undefined;
|
|
414
|
-
prefix?: string | undefined;
|
|
415
|
-
refillInterval?: number | undefined;
|
|
416
|
-
refillAmount?: number | undefined;
|
|
417
|
-
lastRefillAt?: number | undefined;
|
|
418
|
-
enabled?: boolean | undefined;
|
|
419
|
-
rateLimitEnabled?: boolean | undefined;
|
|
420
|
-
rateLimitTimeWindow?: number | undefined;
|
|
421
|
-
rateLimitMax?: number | undefined;
|
|
422
|
-
requestCount?: number | undefined;
|
|
423
|
-
remaining?: number | undefined;
|
|
424
|
-
lastRequest?: number | undefined;
|
|
425
|
-
permissions?: string | undefined;
|
|
426
|
-
metadata?: string | undefined;
|
|
427
|
+
name?: string | null | undefined;
|
|
428
|
+
expiresAt?: number | null | undefined;
|
|
429
|
+
start?: string | null | undefined;
|
|
430
|
+
prefix?: string | null | undefined;
|
|
431
|
+
refillInterval?: number | null | undefined;
|
|
432
|
+
refillAmount?: number | null | undefined;
|
|
433
|
+
lastRefillAt?: number | null | undefined;
|
|
434
|
+
enabled?: boolean | null | undefined;
|
|
435
|
+
rateLimitEnabled?: boolean | null | undefined;
|
|
436
|
+
rateLimitTimeWindow?: number | null | undefined;
|
|
437
|
+
rateLimitMax?: number | null | undefined;
|
|
438
|
+
requestCount?: number | null | undefined;
|
|
439
|
+
remaining?: number | null | undefined;
|
|
440
|
+
lastRequest?: number | null | undefined;
|
|
441
|
+
permissions?: string | null | undefined;
|
|
442
|
+
metadata?: string | null | undefined;
|
|
427
443
|
createdAt: number;
|
|
428
444
|
updatedAt: number;
|
|
429
445
|
userId: string;
|
|
@@ -431,50 +447,49 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
431
447
|
} | {
|
|
432
448
|
_id: string;
|
|
433
449
|
_creationTime: number;
|
|
434
|
-
name?: string | undefined;
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
metadata?: string | undefined;
|
|
440
|
-
icon?: string | undefined;
|
|
441
|
-
clientId?: string | undefined;
|
|
442
|
-
clientSecret?: string | undefined;
|
|
443
|
-
redirectURLs?: string | undefined;
|
|
444
|
-
disabled?: boolean | undefined;
|
|
450
|
+
name?: string | null | undefined;
|
|
451
|
+
type?: string | null | undefined;
|
|
452
|
+
createdAt?: number | null | undefined;
|
|
453
|
+
updatedAt?: number | null | undefined;
|
|
454
|
+
userId?: string | null | undefined;
|
|
455
|
+
metadata?: string | null | undefined;
|
|
456
|
+
icon?: string | null | undefined;
|
|
457
|
+
clientId?: string | null | undefined;
|
|
458
|
+
clientSecret?: string | null | undefined;
|
|
459
|
+
redirectURLs?: string | null | undefined;
|
|
460
|
+
disabled?: boolean | null | undefined;
|
|
445
461
|
} | {
|
|
446
462
|
_id: string;
|
|
447
463
|
_creationTime: number;
|
|
448
|
-
createdAt?: number | undefined;
|
|
449
|
-
updatedAt?: number | undefined;
|
|
450
|
-
userId?: string | undefined;
|
|
451
|
-
accessToken?: string | undefined;
|
|
452
|
-
refreshToken?: string | undefined;
|
|
453
|
-
accessTokenExpiresAt?: number | undefined;
|
|
454
|
-
refreshTokenExpiresAt?: number | undefined;
|
|
455
|
-
clientId?: string | undefined;
|
|
456
|
-
scopes?: string | undefined;
|
|
464
|
+
createdAt?: number | null | undefined;
|
|
465
|
+
updatedAt?: number | null | undefined;
|
|
466
|
+
userId?: string | null | undefined;
|
|
467
|
+
accessToken?: string | null | undefined;
|
|
468
|
+
refreshToken?: string | null | undefined;
|
|
469
|
+
accessTokenExpiresAt?: number | null | undefined;
|
|
470
|
+
refreshTokenExpiresAt?: number | null | undefined;
|
|
471
|
+
clientId?: string | null | undefined;
|
|
472
|
+
scopes?: string | null | undefined;
|
|
457
473
|
} | {
|
|
458
474
|
_id: string;
|
|
459
475
|
_creationTime: number;
|
|
460
|
-
createdAt?: number | undefined;
|
|
461
|
-
updatedAt?: number | undefined;
|
|
462
|
-
userId?: string | undefined;
|
|
463
|
-
clientId?: string | undefined;
|
|
464
|
-
scopes?: string | undefined;
|
|
465
|
-
consentGiven?: boolean | undefined;
|
|
476
|
+
createdAt?: number | null | undefined;
|
|
477
|
+
updatedAt?: number | null | undefined;
|
|
478
|
+
userId?: string | null | undefined;
|
|
479
|
+
clientId?: string | null | undefined;
|
|
480
|
+
scopes?: string | null | undefined;
|
|
481
|
+
consentGiven?: boolean | null | undefined;
|
|
466
482
|
} | {
|
|
467
483
|
_id: string;
|
|
468
484
|
_creationTime: number;
|
|
469
|
-
metadata?: string | undefined;
|
|
470
|
-
slug?: string | undefined;
|
|
471
|
-
logo?: string | undefined;
|
|
485
|
+
metadata?: string | null | undefined;
|
|
486
|
+
slug?: string | null | undefined;
|
|
487
|
+
logo?: string | null | undefined;
|
|
472
488
|
name: string;
|
|
473
489
|
createdAt: number;
|
|
474
490
|
} | {
|
|
475
491
|
_id: string;
|
|
476
492
|
_creationTime: number;
|
|
477
|
-
teamId?: string | undefined;
|
|
478
493
|
createdAt: number;
|
|
479
494
|
role: string;
|
|
480
495
|
userId: string;
|
|
@@ -482,8 +497,8 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
482
497
|
} | {
|
|
483
498
|
_id: string;
|
|
484
499
|
_creationTime: number;
|
|
485
|
-
role?: string | undefined;
|
|
486
|
-
teamId?: string | undefined;
|
|
500
|
+
role?: string | null | undefined;
|
|
501
|
+
teamId?: string | null | undefined;
|
|
487
502
|
email: string;
|
|
488
503
|
expiresAt: number;
|
|
489
504
|
organizationId: string;
|
|
@@ -492,17 +507,23 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
492
507
|
} | {
|
|
493
508
|
_id: string;
|
|
494
509
|
_creationTime: number;
|
|
495
|
-
updatedAt?: number | undefined;
|
|
510
|
+
updatedAt?: number | null | undefined;
|
|
496
511
|
name: string;
|
|
497
512
|
createdAt: number;
|
|
498
513
|
organizationId: string;
|
|
499
514
|
} | {
|
|
500
515
|
_id: string;
|
|
501
516
|
_creationTime: number;
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
517
|
+
createdAt?: number | null | undefined;
|
|
518
|
+
userId: string;
|
|
519
|
+
teamId: string;
|
|
520
|
+
} | {
|
|
521
|
+
_id: string;
|
|
522
|
+
_creationTime: number;
|
|
523
|
+
userId?: string | null | undefined;
|
|
524
|
+
organizationId?: string | null | undefined;
|
|
525
|
+
oidcConfig?: string | null | undefined;
|
|
526
|
+
samlConfig?: string | null | undefined;
|
|
506
527
|
providerId: string;
|
|
507
528
|
issuer: string;
|
|
508
529
|
domain: string;
|
|
@@ -515,21 +536,29 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
515
536
|
} | {
|
|
516
537
|
_id: string;
|
|
517
538
|
_creationTime: number;
|
|
518
|
-
stripeCustomerId?: string | undefined;
|
|
519
|
-
status?: string | undefined;
|
|
520
|
-
stripeSubscriptionId?: string | undefined;
|
|
521
|
-
periodStart?: number | undefined;
|
|
522
|
-
periodEnd?: number | undefined;
|
|
523
|
-
cancelAtPeriodEnd?: boolean | undefined;
|
|
524
|
-
seats?: number | undefined;
|
|
539
|
+
stripeCustomerId?: string | null | undefined;
|
|
540
|
+
status?: string | null | undefined;
|
|
541
|
+
stripeSubscriptionId?: string | null | undefined;
|
|
542
|
+
periodStart?: number | null | undefined;
|
|
543
|
+
periodEnd?: number | null | undefined;
|
|
544
|
+
cancelAtPeriodEnd?: boolean | null | undefined;
|
|
545
|
+
seats?: number | null | undefined;
|
|
525
546
|
plan: string;
|
|
526
547
|
referenceId: string;
|
|
527
548
|
} | {
|
|
528
549
|
_id: string;
|
|
529
550
|
_creationTime: number;
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
551
|
+
isPrimary?: boolean | null | undefined;
|
|
552
|
+
createdAt: number;
|
|
553
|
+
userId: string;
|
|
554
|
+
address: string;
|
|
555
|
+
chainId: number;
|
|
556
|
+
} | {
|
|
557
|
+
_id: string;
|
|
558
|
+
_creationTime: number;
|
|
559
|
+
key?: string | null | undefined;
|
|
560
|
+
lastRequest?: number | null | undefined;
|
|
561
|
+
count?: number | null | undefined;
|
|
533
562
|
}>;
|
|
534
563
|
createAuthFunctions<DataModel extends GenericDataModel>(opts: {
|
|
535
564
|
onCreateUser: (ctx: GenericMutationCtx<DataModel>, user: Infer<typeof createUserValidator>) => Promise<UserId>;
|
|
@@ -542,18 +571,19 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
542
571
|
input: {
|
|
543
572
|
model: "user";
|
|
544
573
|
data: {
|
|
545
|
-
image?: string | undefined;
|
|
546
|
-
twoFactorEnabled?: boolean | undefined;
|
|
547
|
-
isAnonymous?: boolean | undefined;
|
|
548
|
-
username?: string | undefined;
|
|
549
|
-
displayUsername?: string | undefined;
|
|
550
|
-
phoneNumber?: string | undefined;
|
|
551
|
-
phoneNumberVerified?: boolean | undefined;
|
|
552
|
-
role?: string | undefined;
|
|
553
|
-
banned?: boolean | undefined;
|
|
554
|
-
banReason?: string | undefined;
|
|
555
|
-
banExpires?: number | undefined;
|
|
556
|
-
stripeCustomerId?: string | undefined;
|
|
574
|
+
image?: string | null | undefined;
|
|
575
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
576
|
+
isAnonymous?: boolean | null | undefined;
|
|
577
|
+
username?: string | null | undefined;
|
|
578
|
+
displayUsername?: string | null | undefined;
|
|
579
|
+
phoneNumber?: string | null | undefined;
|
|
580
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
581
|
+
role?: string | null | undefined;
|
|
582
|
+
banned?: boolean | null | undefined;
|
|
583
|
+
banReason?: string | null | undefined;
|
|
584
|
+
banExpires?: number | null | undefined;
|
|
585
|
+
stripeCustomerId?: string | null | undefined;
|
|
586
|
+
teamId?: string | null | undefined;
|
|
557
587
|
name: string;
|
|
558
588
|
email: string;
|
|
559
589
|
emailVerified: boolean;
|
|
@@ -591,39 +621,41 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
591
621
|
name?: string | undefined;
|
|
592
622
|
email?: string | undefined;
|
|
593
623
|
emailVerified?: boolean | undefined;
|
|
594
|
-
image?: string | undefined;
|
|
624
|
+
image?: string | null | undefined;
|
|
595
625
|
createdAt?: number | undefined;
|
|
596
626
|
updatedAt?: number | undefined;
|
|
597
|
-
twoFactorEnabled?: boolean | undefined;
|
|
598
|
-
isAnonymous?: boolean | undefined;
|
|
599
|
-
username?: string | undefined;
|
|
600
|
-
displayUsername?: string | undefined;
|
|
601
|
-
phoneNumber?: string | undefined;
|
|
602
|
-
phoneNumberVerified?: boolean | undefined;
|
|
603
|
-
role?: string | undefined;
|
|
604
|
-
banned?: boolean | undefined;
|
|
605
|
-
banReason?: string | undefined;
|
|
606
|
-
banExpires?: number | undefined;
|
|
607
|
-
stripeCustomerId?: string | undefined;
|
|
627
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
628
|
+
isAnonymous?: boolean | null | undefined;
|
|
629
|
+
username?: string | null | undefined;
|
|
630
|
+
displayUsername?: string | null | undefined;
|
|
631
|
+
phoneNumber?: string | null | undefined;
|
|
632
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
633
|
+
role?: string | null | undefined;
|
|
634
|
+
banned?: boolean | null | undefined;
|
|
635
|
+
banReason?: string | null | undefined;
|
|
636
|
+
banExpires?: number | null | undefined;
|
|
637
|
+
stripeCustomerId?: string | null | undefined;
|
|
638
|
+
teamId?: string | null | undefined;
|
|
608
639
|
};
|
|
609
640
|
model: "user";
|
|
610
641
|
};
|
|
611
642
|
}, Promise<{
|
|
612
643
|
_id: string;
|
|
613
644
|
_creationTime: number;
|
|
614
|
-
image?: string | undefined;
|
|
615
|
-
twoFactorEnabled?: boolean | undefined;
|
|
616
|
-
isAnonymous?: boolean | undefined;
|
|
617
|
-
username?: string | undefined;
|
|
618
|
-
displayUsername?: string | undefined;
|
|
619
|
-
phoneNumber?: string | undefined;
|
|
620
|
-
phoneNumberVerified?: boolean | undefined;
|
|
621
|
-
role?: string | undefined;
|
|
622
|
-
banned?: boolean | undefined;
|
|
623
|
-
banReason?: string | undefined;
|
|
624
|
-
banExpires?: number | undefined;
|
|
625
|
-
stripeCustomerId?: string | undefined;
|
|
626
|
-
userId?: string | undefined;
|
|
645
|
+
image?: string | null | undefined;
|
|
646
|
+
twoFactorEnabled?: boolean | null | undefined;
|
|
647
|
+
isAnonymous?: boolean | null | undefined;
|
|
648
|
+
username?: string | null | undefined;
|
|
649
|
+
displayUsername?: string | null | undefined;
|
|
650
|
+
phoneNumber?: string | null | undefined;
|
|
651
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
652
|
+
role?: string | null | undefined;
|
|
653
|
+
banned?: boolean | null | undefined;
|
|
654
|
+
banReason?: string | null | undefined;
|
|
655
|
+
banExpires?: number | null | undefined;
|
|
656
|
+
stripeCustomerId?: string | null | undefined;
|
|
657
|
+
userId?: string | null | undefined;
|
|
658
|
+
teamId?: string | null | undefined;
|
|
627
659
|
name: string;
|
|
628
660
|
email: string;
|
|
629
661
|
emailVerified: boolean;
|
|
@@ -634,10 +666,11 @@ export declare class BetterAuth<UserId extends string = string> {
|
|
|
634
666
|
input: {
|
|
635
667
|
model: "session";
|
|
636
668
|
data: {
|
|
637
|
-
ipAddress?: string | undefined;
|
|
638
|
-
userAgent?: string | undefined;
|
|
639
|
-
impersonatedBy?: string | undefined;
|
|
640
|
-
activeOrganizationId?: string | undefined;
|
|
669
|
+
ipAddress?: string | null | undefined;
|
|
670
|
+
userAgent?: string | null | undefined;
|
|
671
|
+
impersonatedBy?: string | null | undefined;
|
|
672
|
+
activeOrganizationId?: string | null | undefined;
|
|
673
|
+
activeTeamId?: string | null | undefined;
|
|
641
674
|
createdAt: number;
|
|
642
675
|
updatedAt: number;
|
|
643
676
|
userId: string;
|