@robelest/convex-auth 0.0.4-preview.32 → 0.0.4-preview.33

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.
@@ -0,0 +1,722 @@
1
+ import * as convex_values3 from "convex/values";
2
+ import { Infer, Validator, v } from "convex/values";
3
+ import * as convex_server5 from "convex/server";
4
+
5
+ //#region src/server/validators.d.ts
6
+ /**
7
+ * Validators a consumer may supply for the `extend` field of each table.
8
+ *
9
+ * Passed as `createAuth({ extend })`. Every entry is optional; a missing
10
+ * entry falls back to `v.any()`, preserving the untyped default.
11
+ */
12
+ type AuthExtendValidators = {
13
+ /** Shape of `User.extend`. */User?: Validator<any, any, any>; /** Shape of `Group.extend`. */
14
+ Group?: Validator<any, any, any>; /** Shape of `GroupMember.extend`. */
15
+ GroupMember?: Validator<any, any, any>;
16
+ };
17
+ type ExtendFor<TExtend extends AuthExtendValidators, K extends keyof AuthExtendValidators> = TExtend[K] extends Validator<any, any, any> ? TExtend[K] : ReturnType<typeof v.any>;
18
+ /**
19
+ * Build the `auth.v.*` validator namespace from the consumer's `extend`
20
+ * config.
21
+ *
22
+ * `vUserDoc`/`vGroupDoc`/`vGroupMemberDoc` already declare an
23
+ * `extend: v.optional(v.any())` field; this rebuilds each with the
24
+ * supplied validator so the inferred type carries the real shape while
25
+ * the runtime validator still accepts the stored document.
26
+ *
27
+ * @typeParam TExtend - The consumer's per-table `extend` validators.
28
+ * @param extend - The `extend` map from `createAuth` config. Defaults to
29
+ * an empty object (all `extend` fields stay `v.any()`).
30
+ * @returns The `auth.v` namespace: `user`, `group`, `member`, `invite`,
31
+ * `viewer`, `viewerWithGroups`, and the `list` page-wrapper helper.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const av = buildAuthValidators({
36
+ * User: v.object({ lastActiveGroup: v.optional(v.string()) }),
37
+ * });
38
+ * // Infer<typeof av.viewer> -> User document with typed `extend`
39
+ * ```
40
+ */
41
+ declare function buildAuthValidators<TExtend extends AuthExtendValidators>(extend?: TExtend): {
42
+ /** Single User document validator (extend-aware). */user: convex_values3.VObject<convex_server5.Expand<{ [Property in "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)]?: Exclude<Infer<(Omit<{
43
+ name: convex_values3.VString<string | undefined, "optional">;
44
+ image: convex_values3.VString<string | undefined, "optional">;
45
+ email: convex_values3.VString<string | undefined, "optional">;
46
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
47
+ phone: convex_values3.VString<string | undefined, "optional">;
48
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
49
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
50
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
51
+ extend: convex_values3.VAny<any, "optional", string>;
52
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
53
+ _creationTime: convex_values3.VFloat64<number, "required">;
54
+ }, "extend"> & {
55
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
56
+ })[Property]>, undefined> | undefined } & { [Property_1 in Exclude<"_creationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"name", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"email", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"phone", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"extend", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"_id", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"image", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"emailVerificationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"phoneVerificationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"isAnonymous", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"hasTotp", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)>]: Infer<(Omit<{
57
+ name: convex_values3.VString<string | undefined, "optional">;
58
+ image: convex_values3.VString<string | undefined, "optional">;
59
+ email: convex_values3.VString<string | undefined, "optional">;
60
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
61
+ phone: convex_values3.VString<string | undefined, "optional">;
62
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
63
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
64
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
65
+ extend: convex_values3.VAny<any, "optional", string>;
66
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
67
+ _creationTime: convex_values3.VFloat64<number, "required">;
68
+ }, "extend"> & {
69
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
70
+ })[Property_1]> }>, Omit<{
71
+ name: convex_values3.VString<string | undefined, "optional">;
72
+ image: convex_values3.VString<string | undefined, "optional">;
73
+ email: convex_values3.VString<string | undefined, "optional">;
74
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
75
+ phone: convex_values3.VString<string | undefined, "optional">;
76
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
77
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
78
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
79
+ extend: convex_values3.VAny<any, "optional", string>;
80
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
81
+ _creationTime: convex_values3.VFloat64<number, "required">;
82
+ }, "extend"> & {
83
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
84
+ }, "required", "_creationTime" | "name" | "email" | "phone" | "extend" | "_id" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | `extend.${convex_values3.VOptional<ExtendFor<TExtend, "User">>["fieldPaths"]}`>; /** Single Group document validator (extend-aware). */
85
+ group: convex_values3.VObject<convex_server5.Expand<{ [Property_2 in "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)]?: Exclude<Infer<(Omit<{
86
+ name: convex_values3.VString<string, "required">;
87
+ slug: convex_values3.VString<string | undefined, "optional">;
88
+ type: convex_values3.VString<string | undefined, "optional">;
89
+ parentGroupId: convex_values3.VId<convex_values3.GenericId<"Group"> | undefined, "optional">;
90
+ rootGroupId: convex_values3.VId<convex_values3.GenericId<"Group"> | undefined, "optional">;
91
+ isRoot: convex_values3.VBoolean<boolean | undefined, "optional">;
92
+ tags: convex_values3.VArray<{
93
+ key: string;
94
+ value: string;
95
+ }[] | undefined, convex_values3.VObject<{
96
+ key: string;
97
+ value: string;
98
+ }, {
99
+ key: convex_values3.VString<string, "required">;
100
+ value: convex_values3.VString<string, "required">;
101
+ }, "required", "key" | "value">, "optional">;
102
+ policy: convex_values3.VObject<{
103
+ extend?: any;
104
+ version: 1;
105
+ identity: {
106
+ accountLinking: {
107
+ oidc: "verifiedEmail" | "none";
108
+ saml: "verifiedEmail" | "none";
109
+ };
110
+ };
111
+ provisioning: {
112
+ user: {
113
+ createOnSignIn: boolean;
114
+ updateProfileOnLogin: "never" | "missing" | "always";
115
+ updateProfileFromScim: "never" | "missing" | "always";
116
+ authority: "app" | "sso" | "scim";
117
+ };
118
+ scimReuse: {
119
+ user: "none" | "externalId";
120
+ };
121
+ jit: {
122
+ defaultRole?: string | undefined;
123
+ defaultRoleIds?: string[] | undefined;
124
+ mode: "off" | "createUser" | "createUserAndMembership";
125
+ };
126
+ deprovision: {
127
+ mode: "soft" | "hard";
128
+ };
129
+ groups: {
130
+ mapping?: Record<string, string[]> | undefined;
131
+ mode: "ignore" | "sync";
132
+ source: "protocol";
133
+ };
134
+ roles: {
135
+ mapping?: Record<string, string[]> | undefined;
136
+ mode: "map" | "ignore";
137
+ source: "protocol";
138
+ };
139
+ };
140
+ } | undefined, {
141
+ version: convex_values3.VLiteral<1, "required">;
142
+ identity: convex_values3.VObject<{
143
+ accountLinking: {
144
+ oidc: "verifiedEmail" | "none";
145
+ saml: "verifiedEmail" | "none";
146
+ };
147
+ }, {
148
+ accountLinking: convex_values3.VObject<{
149
+ oidc: "verifiedEmail" | "none";
150
+ saml: "verifiedEmail" | "none";
151
+ }, {
152
+ oidc: convex_values3.VUnion<"verifiedEmail" | "none", [convex_values3.VLiteral<"verifiedEmail", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
153
+ saml: convex_values3.VUnion<"verifiedEmail" | "none", [convex_values3.VLiteral<"verifiedEmail", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
154
+ }, "required", "oidc" | "saml">;
155
+ }, "required", "accountLinking" | "accountLinking.oidc" | "accountLinking.saml">;
156
+ provisioning: convex_values3.VObject<{
157
+ user: {
158
+ createOnSignIn: boolean;
159
+ updateProfileOnLogin: "never" | "missing" | "always";
160
+ updateProfileFromScim: "never" | "missing" | "always";
161
+ authority: "app" | "sso" | "scim";
162
+ };
163
+ scimReuse: {
164
+ user: "none" | "externalId";
165
+ };
166
+ jit: {
167
+ defaultRole?: string | undefined;
168
+ defaultRoleIds?: string[] | undefined;
169
+ mode: "off" | "createUser" | "createUserAndMembership";
170
+ };
171
+ deprovision: {
172
+ mode: "soft" | "hard";
173
+ };
174
+ groups: {
175
+ mapping?: Record<string, string[]> | undefined;
176
+ mode: "ignore" | "sync";
177
+ source: "protocol";
178
+ };
179
+ roles: {
180
+ mapping?: Record<string, string[]> | undefined;
181
+ mode: "map" | "ignore";
182
+ source: "protocol";
183
+ };
184
+ }, {
185
+ user: convex_values3.VObject<{
186
+ createOnSignIn: boolean;
187
+ updateProfileOnLogin: "never" | "missing" | "always";
188
+ updateProfileFromScim: "never" | "missing" | "always";
189
+ authority: "app" | "sso" | "scim";
190
+ }, {
191
+ createOnSignIn: convex_values3.VBoolean<boolean, "required">;
192
+ updateProfileOnLogin: convex_values3.VUnion<"never" | "missing" | "always", [convex_values3.VLiteral<"never", "required">, convex_values3.VLiteral<"missing", "required">, convex_values3.VLiteral<"always", "required">], "required", never>;
193
+ updateProfileFromScim: convex_values3.VUnion<"never" | "missing" | "always", [convex_values3.VLiteral<"never", "required">, convex_values3.VLiteral<"missing", "required">, convex_values3.VLiteral<"always", "required">], "required", never>;
194
+ authority: convex_values3.VUnion<"app" | "sso" | "scim", [convex_values3.VLiteral<"app", "required">, convex_values3.VLiteral<"sso", "required">, convex_values3.VLiteral<"scim", "required">], "required", never>;
195
+ }, "required", "createOnSignIn" | "updateProfileOnLogin" | "updateProfileFromScim" | "authority">;
196
+ scimReuse: convex_values3.VObject<{
197
+ user: "none" | "externalId";
198
+ }, {
199
+ user: convex_values3.VUnion<"none" | "externalId", [convex_values3.VLiteral<"externalId", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
200
+ }, "required", "user">;
201
+ jit: convex_values3.VObject<{
202
+ defaultRole?: string | undefined;
203
+ defaultRoleIds?: string[] | undefined;
204
+ mode: "off" | "createUser" | "createUserAndMembership";
205
+ }, {
206
+ mode: convex_values3.VUnion<"off" | "createUser" | "createUserAndMembership", [convex_values3.VLiteral<"off", "required">, convex_values3.VLiteral<"createUser", "required">, convex_values3.VLiteral<"createUserAndMembership", "required">], "required", never>;
207
+ defaultRole: convex_values3.VString<string | undefined, "optional">;
208
+ defaultRoleIds: convex_values3.VArray<string[] | undefined, convex_values3.VString<string, "required">, "optional">;
209
+ }, "required", "mode" | "defaultRole" | "defaultRoleIds">;
210
+ deprovision: convex_values3.VObject<{
211
+ mode: "soft" | "hard";
212
+ }, {
213
+ mode: convex_values3.VUnion<"soft" | "hard", [convex_values3.VLiteral<"soft", "required">, convex_values3.VLiteral<"hard", "required">], "required", never>;
214
+ }, "required", "mode">;
215
+ groups: convex_values3.VObject<{
216
+ mapping?: Record<string, string[]> | undefined;
217
+ mode: "ignore" | "sync";
218
+ source: "protocol";
219
+ }, {
220
+ mode: convex_values3.VUnion<"ignore" | "sync", [convex_values3.VLiteral<"ignore", "required">, convex_values3.VLiteral<"sync", "required">], "required", never>;
221
+ source: convex_values3.VLiteral<"protocol", "required">;
222
+ mapping: convex_values3.VRecord<Record<string, string[]> | undefined, convex_values3.VString<string, "required">, convex_values3.VArray<string[], convex_values3.VString<string, "required">, "required">, "optional", string>;
223
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
224
+ roles: convex_values3.VObject<{
225
+ mapping?: Record<string, string[]> | undefined;
226
+ mode: "map" | "ignore";
227
+ source: "protocol";
228
+ }, {
229
+ mode: convex_values3.VUnion<"map" | "ignore", [convex_values3.VLiteral<"ignore", "required">, convex_values3.VLiteral<"map", "required">], "required", never>;
230
+ source: convex_values3.VLiteral<"protocol", "required">;
231
+ mapping: convex_values3.VRecord<Record<string, string[]> | undefined, convex_values3.VString<string, "required">, convex_values3.VArray<string[], convex_values3.VString<string, "required">, "required">, "optional", string>;
232
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
233
+ }, "required", "user" | "scimReuse" | "jit" | "deprovision" | "groups" | "roles" | "user.createOnSignIn" | "user.updateProfileOnLogin" | "user.updateProfileFromScim" | "user.authority" | "scimReuse.user" | "jit.mode" | "jit.defaultRole" | "jit.defaultRoleIds" | "deprovision.mode" | "groups.mode" | "groups.source" | "groups.mapping" | `groups.mapping.${string}` | "roles.mode" | "roles.source" | "roles.mapping" | `roles.mapping.${string}`>;
234
+ extend: convex_values3.VAny<any, "optional", string>;
235
+ }, "optional", "extend" | `extend.${string}` | "version" | "identity" | "provisioning" | "identity.accountLinking" | "identity.accountLinking.oidc" | "identity.accountLinking.saml" | "provisioning.user" | "provisioning.scimReuse" | "provisioning.jit" | "provisioning.deprovision" | "provisioning.groups" | "provisioning.roles" | "provisioning.user.createOnSignIn" | "provisioning.user.updateProfileOnLogin" | "provisioning.user.updateProfileFromScim" | "provisioning.user.authority" | "provisioning.scimReuse.user" | "provisioning.jit.mode" | "provisioning.jit.defaultRole" | "provisioning.jit.defaultRoleIds" | "provisioning.deprovision.mode" | "provisioning.groups.mode" | "provisioning.groups.source" | "provisioning.groups.mapping" | `provisioning.groups.mapping.${string}` | "provisioning.roles.mode" | "provisioning.roles.source" | "provisioning.roles.mapping" | `provisioning.roles.mapping.${string}`>;
236
+ extend: convex_values3.VAny<any, "optional", string>;
237
+ _id: convex_values3.VId<convex_values3.GenericId<"Group">, "required">;
238
+ _creationTime: convex_values3.VFloat64<number, "required">;
239
+ }, "extend"> & {
240
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "Group">>;
241
+ })[Property_2]>, undefined> | undefined } & { [Property_1_1 in Exclude<"_creationTime", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"name", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"slug", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"type", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"extend", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"_id", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"parentGroupId", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"rootGroupId", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"isRoot", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"tags", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"policy", "slug" | "type" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | (convex_values3.VOptional<ExtendFor<TExtend, "Group">>["isOptional"] extends "optional" ? "extend" : never)>]: Infer<(Omit<{
242
+ name: convex_values3.VString<string, "required">;
243
+ slug: convex_values3.VString<string | undefined, "optional">;
244
+ type: convex_values3.VString<string | undefined, "optional">;
245
+ parentGroupId: convex_values3.VId<convex_values3.GenericId<"Group"> | undefined, "optional">;
246
+ rootGroupId: convex_values3.VId<convex_values3.GenericId<"Group"> | undefined, "optional">;
247
+ isRoot: convex_values3.VBoolean<boolean | undefined, "optional">;
248
+ tags: convex_values3.VArray<{
249
+ key: string;
250
+ value: string;
251
+ }[] | undefined, convex_values3.VObject<{
252
+ key: string;
253
+ value: string;
254
+ }, {
255
+ key: convex_values3.VString<string, "required">;
256
+ value: convex_values3.VString<string, "required">;
257
+ }, "required", "key" | "value">, "optional">;
258
+ policy: convex_values3.VObject<{
259
+ extend?: any;
260
+ version: 1;
261
+ identity: {
262
+ accountLinking: {
263
+ oidc: "verifiedEmail" | "none";
264
+ saml: "verifiedEmail" | "none";
265
+ };
266
+ };
267
+ provisioning: {
268
+ user: {
269
+ createOnSignIn: boolean;
270
+ updateProfileOnLogin: "never" | "missing" | "always";
271
+ updateProfileFromScim: "never" | "missing" | "always";
272
+ authority: "app" | "sso" | "scim";
273
+ };
274
+ scimReuse: {
275
+ user: "none" | "externalId";
276
+ };
277
+ jit: {
278
+ defaultRole?: string | undefined;
279
+ defaultRoleIds?: string[] | undefined;
280
+ mode: "off" | "createUser" | "createUserAndMembership";
281
+ };
282
+ deprovision: {
283
+ mode: "soft" | "hard";
284
+ };
285
+ groups: {
286
+ mapping?: Record<string, string[]> | undefined;
287
+ mode: "ignore" | "sync";
288
+ source: "protocol";
289
+ };
290
+ roles: {
291
+ mapping?: Record<string, string[]> | undefined;
292
+ mode: "map" | "ignore";
293
+ source: "protocol";
294
+ };
295
+ };
296
+ } | undefined, {
297
+ version: convex_values3.VLiteral<1, "required">;
298
+ identity: convex_values3.VObject<{
299
+ accountLinking: {
300
+ oidc: "verifiedEmail" | "none";
301
+ saml: "verifiedEmail" | "none";
302
+ };
303
+ }, {
304
+ accountLinking: convex_values3.VObject<{
305
+ oidc: "verifiedEmail" | "none";
306
+ saml: "verifiedEmail" | "none";
307
+ }, {
308
+ oidc: convex_values3.VUnion<"verifiedEmail" | "none", [convex_values3.VLiteral<"verifiedEmail", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
309
+ saml: convex_values3.VUnion<"verifiedEmail" | "none", [convex_values3.VLiteral<"verifiedEmail", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
310
+ }, "required", "oidc" | "saml">;
311
+ }, "required", "accountLinking" | "accountLinking.oidc" | "accountLinking.saml">;
312
+ provisioning: convex_values3.VObject<{
313
+ user: {
314
+ createOnSignIn: boolean;
315
+ updateProfileOnLogin: "never" | "missing" | "always";
316
+ updateProfileFromScim: "never" | "missing" | "always";
317
+ authority: "app" | "sso" | "scim";
318
+ };
319
+ scimReuse: {
320
+ user: "none" | "externalId";
321
+ };
322
+ jit: {
323
+ defaultRole?: string | undefined;
324
+ defaultRoleIds?: string[] | undefined;
325
+ mode: "off" | "createUser" | "createUserAndMembership";
326
+ };
327
+ deprovision: {
328
+ mode: "soft" | "hard";
329
+ };
330
+ groups: {
331
+ mapping?: Record<string, string[]> | undefined;
332
+ mode: "ignore" | "sync";
333
+ source: "protocol";
334
+ };
335
+ roles: {
336
+ mapping?: Record<string, string[]> | undefined;
337
+ mode: "map" | "ignore";
338
+ source: "protocol";
339
+ };
340
+ }, {
341
+ user: convex_values3.VObject<{
342
+ createOnSignIn: boolean;
343
+ updateProfileOnLogin: "never" | "missing" | "always";
344
+ updateProfileFromScim: "never" | "missing" | "always";
345
+ authority: "app" | "sso" | "scim";
346
+ }, {
347
+ createOnSignIn: convex_values3.VBoolean<boolean, "required">;
348
+ updateProfileOnLogin: convex_values3.VUnion<"never" | "missing" | "always", [convex_values3.VLiteral<"never", "required">, convex_values3.VLiteral<"missing", "required">, convex_values3.VLiteral<"always", "required">], "required", never>;
349
+ updateProfileFromScim: convex_values3.VUnion<"never" | "missing" | "always", [convex_values3.VLiteral<"never", "required">, convex_values3.VLiteral<"missing", "required">, convex_values3.VLiteral<"always", "required">], "required", never>;
350
+ authority: convex_values3.VUnion<"app" | "sso" | "scim", [convex_values3.VLiteral<"app", "required">, convex_values3.VLiteral<"sso", "required">, convex_values3.VLiteral<"scim", "required">], "required", never>;
351
+ }, "required", "createOnSignIn" | "updateProfileOnLogin" | "updateProfileFromScim" | "authority">;
352
+ scimReuse: convex_values3.VObject<{
353
+ user: "none" | "externalId";
354
+ }, {
355
+ user: convex_values3.VUnion<"none" | "externalId", [convex_values3.VLiteral<"externalId", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
356
+ }, "required", "user">;
357
+ jit: convex_values3.VObject<{
358
+ defaultRole?: string | undefined;
359
+ defaultRoleIds?: string[] | undefined;
360
+ mode: "off" | "createUser" | "createUserAndMembership";
361
+ }, {
362
+ mode: convex_values3.VUnion<"off" | "createUser" | "createUserAndMembership", [convex_values3.VLiteral<"off", "required">, convex_values3.VLiteral<"createUser", "required">, convex_values3.VLiteral<"createUserAndMembership", "required">], "required", never>;
363
+ defaultRole: convex_values3.VString<string | undefined, "optional">;
364
+ defaultRoleIds: convex_values3.VArray<string[] | undefined, convex_values3.VString<string, "required">, "optional">;
365
+ }, "required", "mode" | "defaultRole" | "defaultRoleIds">;
366
+ deprovision: convex_values3.VObject<{
367
+ mode: "soft" | "hard";
368
+ }, {
369
+ mode: convex_values3.VUnion<"soft" | "hard", [convex_values3.VLiteral<"soft", "required">, convex_values3.VLiteral<"hard", "required">], "required", never>;
370
+ }, "required", "mode">;
371
+ groups: convex_values3.VObject<{
372
+ mapping?: Record<string, string[]> | undefined;
373
+ mode: "ignore" | "sync";
374
+ source: "protocol";
375
+ }, {
376
+ mode: convex_values3.VUnion<"ignore" | "sync", [convex_values3.VLiteral<"ignore", "required">, convex_values3.VLiteral<"sync", "required">], "required", never>;
377
+ source: convex_values3.VLiteral<"protocol", "required">;
378
+ mapping: convex_values3.VRecord<Record<string, string[]> | undefined, convex_values3.VString<string, "required">, convex_values3.VArray<string[], convex_values3.VString<string, "required">, "required">, "optional", string>;
379
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
380
+ roles: convex_values3.VObject<{
381
+ mapping?: Record<string, string[]> | undefined;
382
+ mode: "map" | "ignore";
383
+ source: "protocol";
384
+ }, {
385
+ mode: convex_values3.VUnion<"map" | "ignore", [convex_values3.VLiteral<"ignore", "required">, convex_values3.VLiteral<"map", "required">], "required", never>;
386
+ source: convex_values3.VLiteral<"protocol", "required">;
387
+ mapping: convex_values3.VRecord<Record<string, string[]> | undefined, convex_values3.VString<string, "required">, convex_values3.VArray<string[], convex_values3.VString<string, "required">, "required">, "optional", string>;
388
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
389
+ }, "required", "user" | "scimReuse" | "jit" | "deprovision" | "groups" | "roles" | "user.createOnSignIn" | "user.updateProfileOnLogin" | "user.updateProfileFromScim" | "user.authority" | "scimReuse.user" | "jit.mode" | "jit.defaultRole" | "jit.defaultRoleIds" | "deprovision.mode" | "groups.mode" | "groups.source" | "groups.mapping" | `groups.mapping.${string}` | "roles.mode" | "roles.source" | "roles.mapping" | `roles.mapping.${string}`>;
390
+ extend: convex_values3.VAny<any, "optional", string>;
391
+ }, "optional", "extend" | `extend.${string}` | "version" | "identity" | "provisioning" | "identity.accountLinking" | "identity.accountLinking.oidc" | "identity.accountLinking.saml" | "provisioning.user" | "provisioning.scimReuse" | "provisioning.jit" | "provisioning.deprovision" | "provisioning.groups" | "provisioning.roles" | "provisioning.user.createOnSignIn" | "provisioning.user.updateProfileOnLogin" | "provisioning.user.updateProfileFromScim" | "provisioning.user.authority" | "provisioning.scimReuse.user" | "provisioning.jit.mode" | "provisioning.jit.defaultRole" | "provisioning.jit.defaultRoleIds" | "provisioning.deprovision.mode" | "provisioning.groups.mode" | "provisioning.groups.source" | "provisioning.groups.mapping" | `provisioning.groups.mapping.${string}` | "provisioning.roles.mode" | "provisioning.roles.source" | "provisioning.roles.mapping" | `provisioning.roles.mapping.${string}`>;
392
+ extend: convex_values3.VAny<any, "optional", string>;
393
+ _id: convex_values3.VId<convex_values3.GenericId<"Group">, "required">;
394
+ _creationTime: convex_values3.VFloat64<number, "required">;
395
+ }, "extend"> & {
396
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "Group">>;
397
+ })[Property_1_1]> }>, Omit<{
398
+ name: convex_values3.VString<string, "required">;
399
+ slug: convex_values3.VString<string | undefined, "optional">;
400
+ type: convex_values3.VString<string | undefined, "optional">;
401
+ parentGroupId: convex_values3.VId<convex_values3.GenericId<"Group"> | undefined, "optional">;
402
+ rootGroupId: convex_values3.VId<convex_values3.GenericId<"Group"> | undefined, "optional">;
403
+ isRoot: convex_values3.VBoolean<boolean | undefined, "optional">;
404
+ tags: convex_values3.VArray<{
405
+ key: string;
406
+ value: string;
407
+ }[] | undefined, convex_values3.VObject<{
408
+ key: string;
409
+ value: string;
410
+ }, {
411
+ key: convex_values3.VString<string, "required">;
412
+ value: convex_values3.VString<string, "required">;
413
+ }, "required", "key" | "value">, "optional">;
414
+ policy: convex_values3.VObject<{
415
+ extend?: any;
416
+ version: 1;
417
+ identity: {
418
+ accountLinking: {
419
+ oidc: "verifiedEmail" | "none";
420
+ saml: "verifiedEmail" | "none";
421
+ };
422
+ };
423
+ provisioning: {
424
+ user: {
425
+ createOnSignIn: boolean;
426
+ updateProfileOnLogin: "never" | "missing" | "always";
427
+ updateProfileFromScim: "never" | "missing" | "always";
428
+ authority: "app" | "sso" | "scim";
429
+ };
430
+ scimReuse: {
431
+ user: "none" | "externalId";
432
+ };
433
+ jit: {
434
+ defaultRole?: string | undefined;
435
+ defaultRoleIds?: string[] | undefined;
436
+ mode: "off" | "createUser" | "createUserAndMembership";
437
+ };
438
+ deprovision: {
439
+ mode: "soft" | "hard";
440
+ };
441
+ groups: {
442
+ mapping?: Record<string, string[]> | undefined;
443
+ mode: "ignore" | "sync";
444
+ source: "protocol";
445
+ };
446
+ roles: {
447
+ mapping?: Record<string, string[]> | undefined;
448
+ mode: "map" | "ignore";
449
+ source: "protocol";
450
+ };
451
+ };
452
+ } | undefined, {
453
+ version: convex_values3.VLiteral<1, "required">;
454
+ identity: convex_values3.VObject<{
455
+ accountLinking: {
456
+ oidc: "verifiedEmail" | "none";
457
+ saml: "verifiedEmail" | "none";
458
+ };
459
+ }, {
460
+ accountLinking: convex_values3.VObject<{
461
+ oidc: "verifiedEmail" | "none";
462
+ saml: "verifiedEmail" | "none";
463
+ }, {
464
+ oidc: convex_values3.VUnion<"verifiedEmail" | "none", [convex_values3.VLiteral<"verifiedEmail", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
465
+ saml: convex_values3.VUnion<"verifiedEmail" | "none", [convex_values3.VLiteral<"verifiedEmail", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
466
+ }, "required", "oidc" | "saml">;
467
+ }, "required", "accountLinking" | "accountLinking.oidc" | "accountLinking.saml">;
468
+ provisioning: convex_values3.VObject<{
469
+ user: {
470
+ createOnSignIn: boolean;
471
+ updateProfileOnLogin: "never" | "missing" | "always";
472
+ updateProfileFromScim: "never" | "missing" | "always";
473
+ authority: "app" | "sso" | "scim";
474
+ };
475
+ scimReuse: {
476
+ user: "none" | "externalId";
477
+ };
478
+ jit: {
479
+ defaultRole?: string | undefined;
480
+ defaultRoleIds?: string[] | undefined;
481
+ mode: "off" | "createUser" | "createUserAndMembership";
482
+ };
483
+ deprovision: {
484
+ mode: "soft" | "hard";
485
+ };
486
+ groups: {
487
+ mapping?: Record<string, string[]> | undefined;
488
+ mode: "ignore" | "sync";
489
+ source: "protocol";
490
+ };
491
+ roles: {
492
+ mapping?: Record<string, string[]> | undefined;
493
+ mode: "map" | "ignore";
494
+ source: "protocol";
495
+ };
496
+ }, {
497
+ user: convex_values3.VObject<{
498
+ createOnSignIn: boolean;
499
+ updateProfileOnLogin: "never" | "missing" | "always";
500
+ updateProfileFromScim: "never" | "missing" | "always";
501
+ authority: "app" | "sso" | "scim";
502
+ }, {
503
+ createOnSignIn: convex_values3.VBoolean<boolean, "required">;
504
+ updateProfileOnLogin: convex_values3.VUnion<"never" | "missing" | "always", [convex_values3.VLiteral<"never", "required">, convex_values3.VLiteral<"missing", "required">, convex_values3.VLiteral<"always", "required">], "required", never>;
505
+ updateProfileFromScim: convex_values3.VUnion<"never" | "missing" | "always", [convex_values3.VLiteral<"never", "required">, convex_values3.VLiteral<"missing", "required">, convex_values3.VLiteral<"always", "required">], "required", never>;
506
+ authority: convex_values3.VUnion<"app" | "sso" | "scim", [convex_values3.VLiteral<"app", "required">, convex_values3.VLiteral<"sso", "required">, convex_values3.VLiteral<"scim", "required">], "required", never>;
507
+ }, "required", "createOnSignIn" | "updateProfileOnLogin" | "updateProfileFromScim" | "authority">;
508
+ scimReuse: convex_values3.VObject<{
509
+ user: "none" | "externalId";
510
+ }, {
511
+ user: convex_values3.VUnion<"none" | "externalId", [convex_values3.VLiteral<"externalId", "required">, convex_values3.VLiteral<"none", "required">], "required", never>;
512
+ }, "required", "user">;
513
+ jit: convex_values3.VObject<{
514
+ defaultRole?: string | undefined;
515
+ defaultRoleIds?: string[] | undefined;
516
+ mode: "off" | "createUser" | "createUserAndMembership";
517
+ }, {
518
+ mode: convex_values3.VUnion<"off" | "createUser" | "createUserAndMembership", [convex_values3.VLiteral<"off", "required">, convex_values3.VLiteral<"createUser", "required">, convex_values3.VLiteral<"createUserAndMembership", "required">], "required", never>;
519
+ defaultRole: convex_values3.VString<string | undefined, "optional">;
520
+ defaultRoleIds: convex_values3.VArray<string[] | undefined, convex_values3.VString<string, "required">, "optional">;
521
+ }, "required", "mode" | "defaultRole" | "defaultRoleIds">;
522
+ deprovision: convex_values3.VObject<{
523
+ mode: "soft" | "hard";
524
+ }, {
525
+ mode: convex_values3.VUnion<"soft" | "hard", [convex_values3.VLiteral<"soft", "required">, convex_values3.VLiteral<"hard", "required">], "required", never>;
526
+ }, "required", "mode">;
527
+ groups: convex_values3.VObject<{
528
+ mapping?: Record<string, string[]> | undefined;
529
+ mode: "ignore" | "sync";
530
+ source: "protocol";
531
+ }, {
532
+ mode: convex_values3.VUnion<"ignore" | "sync", [convex_values3.VLiteral<"ignore", "required">, convex_values3.VLiteral<"sync", "required">], "required", never>;
533
+ source: convex_values3.VLiteral<"protocol", "required">;
534
+ mapping: convex_values3.VRecord<Record<string, string[]> | undefined, convex_values3.VString<string, "required">, convex_values3.VArray<string[], convex_values3.VString<string, "required">, "required">, "optional", string>;
535
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
536
+ roles: convex_values3.VObject<{
537
+ mapping?: Record<string, string[]> | undefined;
538
+ mode: "map" | "ignore";
539
+ source: "protocol";
540
+ }, {
541
+ mode: convex_values3.VUnion<"map" | "ignore", [convex_values3.VLiteral<"ignore", "required">, convex_values3.VLiteral<"map", "required">], "required", never>;
542
+ source: convex_values3.VLiteral<"protocol", "required">;
543
+ mapping: convex_values3.VRecord<Record<string, string[]> | undefined, convex_values3.VString<string, "required">, convex_values3.VArray<string[], convex_values3.VString<string, "required">, "required">, "optional", string>;
544
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
545
+ }, "required", "user" | "scimReuse" | "jit" | "deprovision" | "groups" | "roles" | "user.createOnSignIn" | "user.updateProfileOnLogin" | "user.updateProfileFromScim" | "user.authority" | "scimReuse.user" | "jit.mode" | "jit.defaultRole" | "jit.defaultRoleIds" | "deprovision.mode" | "groups.mode" | "groups.source" | "groups.mapping" | `groups.mapping.${string}` | "roles.mode" | "roles.source" | "roles.mapping" | `roles.mapping.${string}`>;
546
+ extend: convex_values3.VAny<any, "optional", string>;
547
+ }, "optional", "extend" | `extend.${string}` | "version" | "identity" | "provisioning" | "identity.accountLinking" | "identity.accountLinking.oidc" | "identity.accountLinking.saml" | "provisioning.user" | "provisioning.scimReuse" | "provisioning.jit" | "provisioning.deprovision" | "provisioning.groups" | "provisioning.roles" | "provisioning.user.createOnSignIn" | "provisioning.user.updateProfileOnLogin" | "provisioning.user.updateProfileFromScim" | "provisioning.user.authority" | "provisioning.scimReuse.user" | "provisioning.jit.mode" | "provisioning.jit.defaultRole" | "provisioning.jit.defaultRoleIds" | "provisioning.deprovision.mode" | "provisioning.groups.mode" | "provisioning.groups.source" | "provisioning.groups.mapping" | `provisioning.groups.mapping.${string}` | "provisioning.roles.mode" | "provisioning.roles.source" | "provisioning.roles.mapping" | `provisioning.roles.mapping.${string}`>;
548
+ extend: convex_values3.VAny<any, "optional", string>;
549
+ _id: convex_values3.VId<convex_values3.GenericId<"Group">, "required">;
550
+ _creationTime: convex_values3.VFloat64<number, "required">;
551
+ }, "extend"> & {
552
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "Group">>;
553
+ }, "required", "_creationTime" | "name" | "slug" | "type" | "extend" | "_id" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | "policy.extend" | `policy.extend.${string}` | "policy.version" | "policy.identity" | "policy.provisioning" | "policy.identity.accountLinking" | "policy.identity.accountLinking.oidc" | "policy.identity.accountLinking.saml" | "policy.provisioning.user" | "policy.provisioning.scimReuse" | "policy.provisioning.jit" | "policy.provisioning.deprovision" | "policy.provisioning.groups" | "policy.provisioning.roles" | "policy.provisioning.user.createOnSignIn" | "policy.provisioning.user.updateProfileOnLogin" | "policy.provisioning.user.updateProfileFromScim" | "policy.provisioning.user.authority" | "policy.provisioning.scimReuse.user" | "policy.provisioning.jit.mode" | "policy.provisioning.jit.defaultRole" | "policy.provisioning.jit.defaultRoleIds" | "policy.provisioning.deprovision.mode" | "policy.provisioning.groups.mode" | "policy.provisioning.groups.source" | "policy.provisioning.groups.mapping" | `policy.provisioning.groups.mapping.${string}` | "policy.provisioning.roles.mode" | "policy.provisioning.roles.source" | "policy.provisioning.roles.mapping" | `policy.provisioning.roles.mapping.${string}` | `extend.${convex_values3.VOptional<ExtendFor<TExtend, "Group">>["fieldPaths"]}`>; /** Single GroupMember document validator (extend-aware). */
554
+ member: convex_values3.VObject<convex_server5.Expand<{ [Property_3 in "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)]?: Exclude<Infer<(Omit<{
555
+ groupId: convex_values3.VId<convex_values3.GenericId<"Group">, "required">;
556
+ userId: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
557
+ role: convex_values3.VString<string | undefined, "optional">;
558
+ roleIds: convex_values3.VArray<string[] | undefined, convex_values3.VString<string, "required">, "optional">;
559
+ status: convex_values3.VString<string | undefined, "optional">;
560
+ extend: convex_values3.VAny<any, "optional", string>;
561
+ _id: convex_values3.VId<convex_values3.GenericId<"GroupMember">, "required">;
562
+ _creationTime: convex_values3.VFloat64<number, "required">;
563
+ }, "extend"> & {
564
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>;
565
+ })[Property_3]>, undefined> | undefined } & { [Property_1_2 in Exclude<"_creationTime", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"status", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"userId", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"extend", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"_id", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"groupId", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"role", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"roleIds", "status" | "role" | "roleIds" | (convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["isOptional"] extends "optional" ? "extend" : never)>]: Infer<(Omit<{
566
+ groupId: convex_values3.VId<convex_values3.GenericId<"Group">, "required">;
567
+ userId: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
568
+ role: convex_values3.VString<string | undefined, "optional">;
569
+ roleIds: convex_values3.VArray<string[] | undefined, convex_values3.VString<string, "required">, "optional">;
570
+ status: convex_values3.VString<string | undefined, "optional">;
571
+ extend: convex_values3.VAny<any, "optional", string>;
572
+ _id: convex_values3.VId<convex_values3.GenericId<"GroupMember">, "required">;
573
+ _creationTime: convex_values3.VFloat64<number, "required">;
574
+ }, "extend"> & {
575
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>;
576
+ })[Property_1_2]> }>, Omit<{
577
+ groupId: convex_values3.VId<convex_values3.GenericId<"Group">, "required">;
578
+ userId: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
579
+ role: convex_values3.VString<string | undefined, "optional">;
580
+ roleIds: convex_values3.VArray<string[] | undefined, convex_values3.VString<string, "required">, "optional">;
581
+ status: convex_values3.VString<string | undefined, "optional">;
582
+ extend: convex_values3.VAny<any, "optional", string>;
583
+ _id: convex_values3.VId<convex_values3.GenericId<"GroupMember">, "required">;
584
+ _creationTime: convex_values3.VFloat64<number, "required">;
585
+ }, "extend"> & {
586
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>;
587
+ }, "required", "_creationTime" | "status" | "userId" | "extend" | "_id" | "groupId" | "role" | "roleIds" | `extend.${convex_values3.VOptional<ExtendFor<TExtend, "GroupMember">>["fieldPaths"]}`>; /** Single GroupInvite document validator. */
588
+ invite: convex_values3.VObject<{
589
+ email?: string | undefined;
590
+ expiresTime?: number | undefined;
591
+ acceptedTime?: number | undefined;
592
+ extend?: any;
593
+ groupId?: convex_values3.GenericId<"Group"> | undefined;
594
+ role?: string | undefined;
595
+ roleIds?: string[] | undefined;
596
+ invitedByUserId?: convex_values3.GenericId<"User"> | undefined;
597
+ acceptedByUserId?: convex_values3.GenericId<"User"> | undefined;
598
+ _creationTime: number;
599
+ status: "pending" | "accepted" | "revoked" | "expired";
600
+ _id: convex_values3.GenericId<"GroupInvite">;
601
+ tokenHash: string;
602
+ }, {
603
+ groupId: convex_values3.VId<convex_values3.GenericId<"Group"> | undefined, "optional">;
604
+ invitedByUserId: convex_values3.VId<convex_values3.GenericId<"User"> | undefined, "optional">;
605
+ email: convex_values3.VString<string | undefined, "optional">;
606
+ tokenHash: convex_values3.VString<string, "required">;
607
+ role: convex_values3.VString<string | undefined, "optional">;
608
+ roleIds: convex_values3.VArray<string[] | undefined, convex_values3.VString<string, "required">, "optional">;
609
+ status: convex_values3.VUnion<"pending" | "accepted" | "revoked" | "expired", [convex_values3.VLiteral<"pending", "required">, convex_values3.VLiteral<"accepted", "required">, convex_values3.VLiteral<"revoked", "required">, convex_values3.VLiteral<"expired", "required">], "required", never>;
610
+ expiresTime: convex_values3.VFloat64<number | undefined, "optional">;
611
+ acceptedByUserId: convex_values3.VId<convex_values3.GenericId<"User"> | undefined, "optional">;
612
+ acceptedTime: convex_values3.VFloat64<number | undefined, "optional">;
613
+ extend: convex_values3.VAny<any, "optional", string>;
614
+ _id: convex_values3.VId<convex_values3.GenericId<"GroupInvite">, "required">;
615
+ _creationTime: convex_values3.VFloat64<number, "required">;
616
+ }, "required", "_creationTime" | "email" | "status" | "expiresTime" | "acceptedTime" | "extend" | "_id" | `extend.${string}` | "groupId" | "role" | "roleIds" | "invitedByUserId" | "tokenHash" | "acceptedByUserId">; /** `User | null` — for a `viewer`/current-user query. */
617
+ viewer: convex_values3.VUnion<convex_server5.Expand<{ [Property in "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)]?: Exclude<Infer<(Omit<{
618
+ name: convex_values3.VString<string | undefined, "optional">;
619
+ image: convex_values3.VString<string | undefined, "optional">;
620
+ email: convex_values3.VString<string | undefined, "optional">;
621
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
622
+ phone: convex_values3.VString<string | undefined, "optional">;
623
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
624
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
625
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
626
+ extend: convex_values3.VAny<any, "optional", string>;
627
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
628
+ _creationTime: convex_values3.VFloat64<number, "required">;
629
+ }, "extend"> & {
630
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
631
+ })[Property]>, undefined> | undefined } & { [Property_1 in Exclude<"_creationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"name", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"email", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"phone", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"extend", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"_id", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"image", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"emailVerificationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"phoneVerificationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"isAnonymous", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"hasTotp", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)>]: Infer<(Omit<{
632
+ name: convex_values3.VString<string | undefined, "optional">;
633
+ image: convex_values3.VString<string | undefined, "optional">;
634
+ email: convex_values3.VString<string | undefined, "optional">;
635
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
636
+ phone: convex_values3.VString<string | undefined, "optional">;
637
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
638
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
639
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
640
+ extend: convex_values3.VAny<any, "optional", string>;
641
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
642
+ _creationTime: convex_values3.VFloat64<number, "required">;
643
+ }, "extend"> & {
644
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
645
+ })[Property_1]> }> | null, [convex_values3.VObject<convex_server5.Expand<{ [Property in "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)]?: Exclude<Infer<(Omit<{
646
+ name: convex_values3.VString<string | undefined, "optional">;
647
+ image: convex_values3.VString<string | undefined, "optional">;
648
+ email: convex_values3.VString<string | undefined, "optional">;
649
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
650
+ phone: convex_values3.VString<string | undefined, "optional">;
651
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
652
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
653
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
654
+ extend: convex_values3.VAny<any, "optional", string>;
655
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
656
+ _creationTime: convex_values3.VFloat64<number, "required">;
657
+ }, "extend"> & {
658
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
659
+ })[Property]>, undefined> | undefined } & { [Property_1 in Exclude<"_creationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"name", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"email", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"phone", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"extend", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"_id", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"image", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"emailVerificationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"phoneVerificationTime", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"isAnonymous", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)> | Exclude<"hasTotp", "name" | "email" | "phone" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | (convex_values3.VOptional<ExtendFor<TExtend, "User">>["isOptional"] extends "optional" ? "extend" : never)>]: Infer<(Omit<{
660
+ name: convex_values3.VString<string | undefined, "optional">;
661
+ image: convex_values3.VString<string | undefined, "optional">;
662
+ email: convex_values3.VString<string | undefined, "optional">;
663
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
664
+ phone: convex_values3.VString<string | undefined, "optional">;
665
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
666
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
667
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
668
+ extend: convex_values3.VAny<any, "optional", string>;
669
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
670
+ _creationTime: convex_values3.VFloat64<number, "required">;
671
+ }, "extend"> & {
672
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
673
+ })[Property_1]> }>, Omit<{
674
+ name: convex_values3.VString<string | undefined, "optional">;
675
+ image: convex_values3.VString<string | undefined, "optional">;
676
+ email: convex_values3.VString<string | undefined, "optional">;
677
+ emailVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
678
+ phone: convex_values3.VString<string | undefined, "optional">;
679
+ phoneVerificationTime: convex_values3.VFloat64<number | undefined, "optional">;
680
+ isAnonymous: convex_values3.VBoolean<boolean | undefined, "optional">;
681
+ hasTotp: convex_values3.VBoolean<boolean | undefined, "optional">;
682
+ extend: convex_values3.VAny<any, "optional", string>;
683
+ _id: convex_values3.VId<convex_values3.GenericId<"User">, "required">;
684
+ _creationTime: convex_values3.VFloat64<number, "required">;
685
+ }, "extend"> & {
686
+ extend: convex_values3.VOptional<ExtendFor<TExtend, "User">>;
687
+ }, "required", "_creationTime" | "name" | "email" | "phone" | "extend" | "_id" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | `extend.${convex_values3.VOptional<ExtendFor<TExtend, "User">>["fieldPaths"]}`>, convex_values3.VNull<null, "required">], "required", "_creationTime" | "name" | "email" | "phone" | "extend" | "_id" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | `extend.${convex_values3.VOptional<ExtendFor<TExtend, "User">>["fieldPaths"]}`>; /** Wrap any item validator in the `{ items, nextCursor }` page shape. */
688
+ list: <V extends Validator<any, any, any>>(item: V) => convex_values3.VObject<{
689
+ items: V["type"][];
690
+ nextCursor: string | null;
691
+ }, {
692
+ items: convex_values3.VArray<V["type"][], V, "required">;
693
+ nextCursor: convex_values3.VUnion<string | null, [convex_values3.VString<string, "required">, convex_values3.VNull<null, "required">], "required", never>;
694
+ }, "required", "items" | "nextCursor">;
695
+ };
696
+ /**
697
+ * The `auth.v` namespace type, parameterized by the consumer's `extend`.
698
+ *
699
+ * @typeParam TExtend - The consumer's per-table `extend` validators.
700
+ */
701
+ type AuthValidators<TExtend extends AuthExtendValidators = {}> = ReturnType<typeof buildAuthValidators<TExtend>>;
702
+ /**
703
+ * Inferred current-user document type (extend-aware).
704
+ *
705
+ * @typeParam TExtend - The consumer's per-table `extend` validators.
706
+ */
707
+ type Viewer<TExtend extends AuthExtendValidators = {}> = Infer<AuthValidators<TExtend>["user"]>;
708
+ /**
709
+ * Inferred Group document type (extend-aware).
710
+ *
711
+ * @typeParam TExtend - The consumer's per-table `extend` validators.
712
+ */
713
+ type Group<TExtend extends AuthExtendValidators = {}> = Infer<AuthValidators<TExtend>["group"]>;
714
+ /**
715
+ * Inferred GroupMember document type (extend-aware).
716
+ *
717
+ * @typeParam TExtend - The consumer's per-table `extend` validators.
718
+ */
719
+ type Membership<TExtend extends AuthExtendValidators = {}> = Infer<AuthValidators<TExtend>["member"]>;
720
+ //#endregion
721
+ export { AuthExtendValidators, AuthValidators, Group, Membership, Viewer, buildAuthValidators };
722
+ //# sourceMappingURL=validators.d.ts.map