@robelest/convex-auth 0.0.4-preview.31 → 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.
@@ -1,7 +1,296 @@
1
- import * as convex_values440 from "convex/values";
1
+ import * as convex_values477 from "convex/values";
2
+ import { Validator } from "convex/values";
2
3
 
3
4
  //#region src/component/model.d.ts
4
- declare const vApiKeyDoc: convex_values440.VObject<{
5
+ declare const vPaginated: <V extends Validator<any, any, any>>(item: V) => convex_values477.VObject<{
6
+ items: V["type"][];
7
+ nextCursor: string | null;
8
+ }, {
9
+ items: convex_values477.VArray<V["type"][], V, "required">;
10
+ nextCursor: convex_values477.VUnion<string | null, [convex_values477.VString<string, "required">, convex_values477.VNull<null, "required">], "required", never>;
11
+ }, "required", "items" | "nextCursor">;
12
+ declare const vUserDoc: convex_values477.VObject<{
13
+ name?: string | undefined;
14
+ email?: string | undefined;
15
+ phone?: string | undefined;
16
+ extend?: any;
17
+ image?: string | undefined;
18
+ emailVerificationTime?: number | undefined;
19
+ phoneVerificationTime?: number | undefined;
20
+ isAnonymous?: boolean | undefined;
21
+ hasTotp?: boolean | undefined;
22
+ _creationTime: number;
23
+ _id: convex_values477.GenericId<"User">;
24
+ }, {
25
+ name: convex_values477.VString<string | undefined, "optional">;
26
+ image: convex_values477.VString<string | undefined, "optional">;
27
+ email: convex_values477.VString<string | undefined, "optional">;
28
+ emailVerificationTime: convex_values477.VFloat64<number | undefined, "optional">;
29
+ phone: convex_values477.VString<string | undefined, "optional">;
30
+ phoneVerificationTime: convex_values477.VFloat64<number | undefined, "optional">;
31
+ isAnonymous: convex_values477.VBoolean<boolean | undefined, "optional">;
32
+ hasTotp: convex_values477.VBoolean<boolean | undefined, "optional">;
33
+ extend: convex_values477.VAny<any, "optional", string>;
34
+ _id: convex_values477.VId<convex_values477.GenericId<"User">, "required">;
35
+ _creationTime: convex_values477.VFloat64<number, "required">;
36
+ }, "required", "_creationTime" | "name" | "email" | "phone" | "extend" | "_id" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | "hasTotp" | `extend.${string}`>;
37
+ declare const vGroupDoc: convex_values477.VObject<{
38
+ slug?: string | undefined;
39
+ type?: string | undefined;
40
+ extend?: any;
41
+ parentGroupId?: convex_values477.GenericId<"Group"> | undefined;
42
+ rootGroupId?: convex_values477.GenericId<"Group"> | undefined;
43
+ isRoot?: boolean | undefined;
44
+ tags?: {
45
+ key: string;
46
+ value: string;
47
+ }[] | undefined;
48
+ policy?: {
49
+ extend?: any;
50
+ version: 1;
51
+ identity: {
52
+ accountLinking: {
53
+ oidc: "verifiedEmail" | "none";
54
+ saml: "verifiedEmail" | "none";
55
+ };
56
+ };
57
+ provisioning: {
58
+ user: {
59
+ createOnSignIn: boolean;
60
+ updateProfileOnLogin: "never" | "missing" | "always";
61
+ updateProfileFromScim: "never" | "missing" | "always";
62
+ authority: "app" | "sso" | "scim";
63
+ };
64
+ scimReuse: {
65
+ user: "none" | "externalId";
66
+ };
67
+ jit: {
68
+ defaultRole?: string | undefined;
69
+ defaultRoleIds?: string[] | undefined;
70
+ mode: "off" | "createUser" | "createUserAndMembership";
71
+ };
72
+ deprovision: {
73
+ mode: "soft" | "hard";
74
+ };
75
+ groups: {
76
+ mapping?: Record<string, string[]> | undefined;
77
+ mode: "ignore" | "sync";
78
+ source: "protocol";
79
+ };
80
+ roles: {
81
+ mapping?: Record<string, string[]> | undefined;
82
+ mode: "map" | "ignore";
83
+ source: "protocol";
84
+ };
85
+ };
86
+ } | undefined;
87
+ _creationTime: number;
88
+ name: string;
89
+ _id: convex_values477.GenericId<"Group">;
90
+ }, {
91
+ name: convex_values477.VString<string, "required">;
92
+ slug: convex_values477.VString<string | undefined, "optional">;
93
+ type: convex_values477.VString<string | undefined, "optional">;
94
+ parentGroupId: convex_values477.VId<convex_values477.GenericId<"Group"> | undefined, "optional">;
95
+ rootGroupId: convex_values477.VId<convex_values477.GenericId<"Group"> | undefined, "optional">;
96
+ isRoot: convex_values477.VBoolean<boolean | undefined, "optional">;
97
+ tags: convex_values477.VArray<{
98
+ key: string;
99
+ value: string;
100
+ }[] | undefined, convex_values477.VObject<{
101
+ key: string;
102
+ value: string;
103
+ }, {
104
+ key: convex_values477.VString<string, "required">;
105
+ value: convex_values477.VString<string, "required">;
106
+ }, "required", "key" | "value">, "optional">;
107
+ policy: convex_values477.VObject<{
108
+ extend?: any;
109
+ version: 1;
110
+ identity: {
111
+ accountLinking: {
112
+ oidc: "verifiedEmail" | "none";
113
+ saml: "verifiedEmail" | "none";
114
+ };
115
+ };
116
+ provisioning: {
117
+ user: {
118
+ createOnSignIn: boolean;
119
+ updateProfileOnLogin: "never" | "missing" | "always";
120
+ updateProfileFromScim: "never" | "missing" | "always";
121
+ authority: "app" | "sso" | "scim";
122
+ };
123
+ scimReuse: {
124
+ user: "none" | "externalId";
125
+ };
126
+ jit: {
127
+ defaultRole?: string | undefined;
128
+ defaultRoleIds?: string[] | undefined;
129
+ mode: "off" | "createUser" | "createUserAndMembership";
130
+ };
131
+ deprovision: {
132
+ mode: "soft" | "hard";
133
+ };
134
+ groups: {
135
+ mapping?: Record<string, string[]> | undefined;
136
+ mode: "ignore" | "sync";
137
+ source: "protocol";
138
+ };
139
+ roles: {
140
+ mapping?: Record<string, string[]> | undefined;
141
+ mode: "map" | "ignore";
142
+ source: "protocol";
143
+ };
144
+ };
145
+ } | undefined, {
146
+ version: convex_values477.VLiteral<1, "required">;
147
+ identity: convex_values477.VObject<{
148
+ accountLinking: {
149
+ oidc: "verifiedEmail" | "none";
150
+ saml: "verifiedEmail" | "none";
151
+ };
152
+ }, {
153
+ accountLinking: convex_values477.VObject<{
154
+ oidc: "verifiedEmail" | "none";
155
+ saml: "verifiedEmail" | "none";
156
+ }, {
157
+ oidc: convex_values477.VUnion<"verifiedEmail" | "none", [convex_values477.VLiteral<"verifiedEmail", "required">, convex_values477.VLiteral<"none", "required">], "required", never>;
158
+ saml: convex_values477.VUnion<"verifiedEmail" | "none", [convex_values477.VLiteral<"verifiedEmail", "required">, convex_values477.VLiteral<"none", "required">], "required", never>;
159
+ }, "required", "oidc" | "saml">;
160
+ }, "required", "accountLinking" | "accountLinking.oidc" | "accountLinking.saml">;
161
+ provisioning: convex_values477.VObject<{
162
+ user: {
163
+ createOnSignIn: boolean;
164
+ updateProfileOnLogin: "never" | "missing" | "always";
165
+ updateProfileFromScim: "never" | "missing" | "always";
166
+ authority: "app" | "sso" | "scim";
167
+ };
168
+ scimReuse: {
169
+ user: "none" | "externalId";
170
+ };
171
+ jit: {
172
+ defaultRole?: string | undefined;
173
+ defaultRoleIds?: string[] | undefined;
174
+ mode: "off" | "createUser" | "createUserAndMembership";
175
+ };
176
+ deprovision: {
177
+ mode: "soft" | "hard";
178
+ };
179
+ groups: {
180
+ mapping?: Record<string, string[]> | undefined;
181
+ mode: "ignore" | "sync";
182
+ source: "protocol";
183
+ };
184
+ roles: {
185
+ mapping?: Record<string, string[]> | undefined;
186
+ mode: "map" | "ignore";
187
+ source: "protocol";
188
+ };
189
+ }, {
190
+ user: convex_values477.VObject<{
191
+ createOnSignIn: boolean;
192
+ updateProfileOnLogin: "never" | "missing" | "always";
193
+ updateProfileFromScim: "never" | "missing" | "always";
194
+ authority: "app" | "sso" | "scim";
195
+ }, {
196
+ createOnSignIn: convex_values477.VBoolean<boolean, "required">;
197
+ updateProfileOnLogin: convex_values477.VUnion<"never" | "missing" | "always", [convex_values477.VLiteral<"never", "required">, convex_values477.VLiteral<"missing", "required">, convex_values477.VLiteral<"always", "required">], "required", never>;
198
+ updateProfileFromScim: convex_values477.VUnion<"never" | "missing" | "always", [convex_values477.VLiteral<"never", "required">, convex_values477.VLiteral<"missing", "required">, convex_values477.VLiteral<"always", "required">], "required", never>;
199
+ authority: convex_values477.VUnion<"app" | "sso" | "scim", [convex_values477.VLiteral<"app", "required">, convex_values477.VLiteral<"sso", "required">, convex_values477.VLiteral<"scim", "required">], "required", never>;
200
+ }, "required", "createOnSignIn" | "updateProfileOnLogin" | "updateProfileFromScim" | "authority">;
201
+ scimReuse: convex_values477.VObject<{
202
+ user: "none" | "externalId";
203
+ }, {
204
+ user: convex_values477.VUnion<"none" | "externalId", [convex_values477.VLiteral<"externalId", "required">, convex_values477.VLiteral<"none", "required">], "required", never>;
205
+ }, "required", "user">;
206
+ jit: convex_values477.VObject<{
207
+ defaultRole?: string | undefined;
208
+ defaultRoleIds?: string[] | undefined;
209
+ mode: "off" | "createUser" | "createUserAndMembership";
210
+ }, {
211
+ mode: convex_values477.VUnion<"off" | "createUser" | "createUserAndMembership", [convex_values477.VLiteral<"off", "required">, convex_values477.VLiteral<"createUser", "required">, convex_values477.VLiteral<"createUserAndMembership", "required">], "required", never>;
212
+ defaultRole: convex_values477.VString<string | undefined, "optional">;
213
+ defaultRoleIds: convex_values477.VArray<string[] | undefined, convex_values477.VString<string, "required">, "optional">;
214
+ }, "required", "mode" | "defaultRole" | "defaultRoleIds">;
215
+ deprovision: convex_values477.VObject<{
216
+ mode: "soft" | "hard";
217
+ }, {
218
+ mode: convex_values477.VUnion<"soft" | "hard", [convex_values477.VLiteral<"soft", "required">, convex_values477.VLiteral<"hard", "required">], "required", never>;
219
+ }, "required", "mode">;
220
+ groups: convex_values477.VObject<{
221
+ mapping?: Record<string, string[]> | undefined;
222
+ mode: "ignore" | "sync";
223
+ source: "protocol";
224
+ }, {
225
+ mode: convex_values477.VUnion<"ignore" | "sync", [convex_values477.VLiteral<"ignore", "required">, convex_values477.VLiteral<"sync", "required">], "required", never>;
226
+ source: convex_values477.VLiteral<"protocol", "required">;
227
+ mapping: convex_values477.VRecord<Record<string, string[]> | undefined, convex_values477.VString<string, "required">, convex_values477.VArray<string[], convex_values477.VString<string, "required">, "required">, "optional", string>;
228
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
229
+ roles: convex_values477.VObject<{
230
+ mapping?: Record<string, string[]> | undefined;
231
+ mode: "map" | "ignore";
232
+ source: "protocol";
233
+ }, {
234
+ mode: convex_values477.VUnion<"map" | "ignore", [convex_values477.VLiteral<"ignore", "required">, convex_values477.VLiteral<"map", "required">], "required", never>;
235
+ source: convex_values477.VLiteral<"protocol", "required">;
236
+ mapping: convex_values477.VRecord<Record<string, string[]> | undefined, convex_values477.VString<string, "required">, convex_values477.VArray<string[], convex_values477.VString<string, "required">, "required">, "optional", string>;
237
+ }, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
238
+ }, "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}`>;
239
+ extend: convex_values477.VAny<any, "optional", string>;
240
+ }, "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}`>;
241
+ extend: convex_values477.VAny<any, "optional", string>;
242
+ _id: convex_values477.VId<convex_values477.GenericId<"Group">, "required">;
243
+ _creationTime: convex_values477.VFloat64<number, "required">;
244
+ }, "required", "_creationTime" | "name" | "slug" | "type" | "extend" | "_id" | `extend.${string}` | "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}`>;
245
+ declare const vGroupMemberDoc: convex_values477.VObject<{
246
+ status?: string | undefined;
247
+ extend?: any;
248
+ role?: string | undefined;
249
+ roleIds?: string[] | undefined;
250
+ _creationTime: number;
251
+ userId: convex_values477.GenericId<"User">;
252
+ _id: convex_values477.GenericId<"GroupMember">;
253
+ groupId: convex_values477.GenericId<"Group">;
254
+ }, {
255
+ groupId: convex_values477.VId<convex_values477.GenericId<"Group">, "required">;
256
+ userId: convex_values477.VId<convex_values477.GenericId<"User">, "required">;
257
+ role: convex_values477.VString<string | undefined, "optional">;
258
+ roleIds: convex_values477.VArray<string[] | undefined, convex_values477.VString<string, "required">, "optional">;
259
+ status: convex_values477.VString<string | undefined, "optional">;
260
+ extend: convex_values477.VAny<any, "optional", string>;
261
+ _id: convex_values477.VId<convex_values477.GenericId<"GroupMember">, "required">;
262
+ _creationTime: convex_values477.VFloat64<number, "required">;
263
+ }, "required", "_creationTime" | "status" | "userId" | "extend" | "_id" | `extend.${string}` | "groupId" | "role" | "roleIds">;
264
+ declare const vGroupInviteDoc: convex_values477.VObject<{
265
+ email?: string | undefined;
266
+ expiresTime?: number | undefined;
267
+ acceptedTime?: number | undefined;
268
+ extend?: any;
269
+ groupId?: convex_values477.GenericId<"Group"> | undefined;
270
+ role?: string | undefined;
271
+ roleIds?: string[] | undefined;
272
+ invitedByUserId?: convex_values477.GenericId<"User"> | undefined;
273
+ acceptedByUserId?: convex_values477.GenericId<"User"> | undefined;
274
+ _creationTime: number;
275
+ status: "pending" | "accepted" | "revoked" | "expired";
276
+ _id: convex_values477.GenericId<"GroupInvite">;
277
+ tokenHash: string;
278
+ }, {
279
+ groupId: convex_values477.VId<convex_values477.GenericId<"Group"> | undefined, "optional">;
280
+ invitedByUserId: convex_values477.VId<convex_values477.GenericId<"User"> | undefined, "optional">;
281
+ email: convex_values477.VString<string | undefined, "optional">;
282
+ tokenHash: convex_values477.VString<string, "required">;
283
+ role: convex_values477.VString<string | undefined, "optional">;
284
+ roleIds: convex_values477.VArray<string[] | undefined, convex_values477.VString<string, "required">, "optional">;
285
+ status: convex_values477.VUnion<"pending" | "accepted" | "revoked" | "expired", [convex_values477.VLiteral<"pending", "required">, convex_values477.VLiteral<"accepted", "required">, convex_values477.VLiteral<"revoked", "required">, convex_values477.VLiteral<"expired", "required">], "required", never>;
286
+ expiresTime: convex_values477.VFloat64<number | undefined, "optional">;
287
+ acceptedByUserId: convex_values477.VId<convex_values477.GenericId<"User"> | undefined, "optional">;
288
+ acceptedTime: convex_values477.VFloat64<number | undefined, "optional">;
289
+ extend: convex_values477.VAny<any, "optional", string>;
290
+ _id: convex_values477.VId<convex_values477.GenericId<"GroupInvite">, "required">;
291
+ _creationTime: convex_values477.VFloat64<number, "required">;
292
+ }, "required", "_creationTime" | "email" | "status" | "expiresTime" | "acceptedTime" | "extend" | "_id" | `extend.${string}` | "groupId" | "role" | "roleIds" | "invitedByUserId" | "tokenHash" | "acceptedByUserId">;
293
+ declare const vApiKeyDoc: convex_values477.VObject<{
5
294
  lastUsedAt?: number | undefined;
6
295
  expiresAt?: number | undefined;
7
296
  rateLimit?: {
@@ -16,7 +305,7 @@ declare const vApiKeyDoc: convex_values440.VObject<{
16
305
  _creationTime: number;
17
306
  name: string;
18
307
  revoked: boolean;
19
- userId: convex_values440.GenericId<"User">;
308
+ userId: convex_values477.GenericId<"User">;
20
309
  prefix: string;
21
310
  hashedKey: string;
22
311
  scopes: {
@@ -24,44 +313,44 @@ declare const vApiKeyDoc: convex_values440.VObject<{
24
313
  actions: string[];
25
314
  }[];
26
315
  createdAt: number;
27
- _id: convex_values440.GenericId<"ApiKey">;
316
+ _id: convex_values477.GenericId<"ApiKey">;
28
317
  }, {
29
- userId: convex_values440.VId<convex_values440.GenericId<"User">, "required">;
30
- prefix: convex_values440.VString<string, "required">;
31
- hashedKey: convex_values440.VString<string, "required">;
32
- name: convex_values440.VString<string, "required">;
33
- scopes: convex_values440.VArray<{
318
+ userId: convex_values477.VId<convex_values477.GenericId<"User">, "required">;
319
+ prefix: convex_values477.VString<string, "required">;
320
+ hashedKey: convex_values477.VString<string, "required">;
321
+ name: convex_values477.VString<string, "required">;
322
+ scopes: convex_values477.VArray<{
34
323
  resource: string;
35
324
  actions: string[];
36
- }[], convex_values440.VObject<{
325
+ }[], convex_values477.VObject<{
37
326
  resource: string;
38
327
  actions: string[];
39
328
  }, {
40
- resource: convex_values440.VString<string, "required">;
41
- actions: convex_values440.VArray<string[], convex_values440.VString<string, "required">, "required">;
329
+ resource: convex_values477.VString<string, "required">;
330
+ actions: convex_values477.VArray<string[], convex_values477.VString<string, "required">, "required">;
42
331
  }, "required", "resource" | "actions">, "required">;
43
- rateLimit: convex_values440.VObject<{
332
+ rateLimit: convex_values477.VObject<{
44
333
  maxRequests: number;
45
334
  windowMs: number;
46
335
  } | undefined, {
47
- maxRequests: convex_values440.VFloat64<number, "required">;
48
- windowMs: convex_values440.VFloat64<number, "required">;
336
+ maxRequests: convex_values477.VFloat64<number, "required">;
337
+ windowMs: convex_values477.VFloat64<number, "required">;
49
338
  }, "optional", "maxRequests" | "windowMs">;
50
- rateLimitState: convex_values440.VObject<{
339
+ rateLimitState: convex_values477.VObject<{
51
340
  attemptsLeft: number;
52
341
  lastAttemptTime: number;
53
342
  } | undefined, {
54
- attemptsLeft: convex_values440.VFloat64<number, "required">;
55
- lastAttemptTime: convex_values440.VFloat64<number, "required">;
343
+ attemptsLeft: convex_values477.VFloat64<number, "required">;
344
+ lastAttemptTime: convex_values477.VFloat64<number, "required">;
56
345
  }, "optional", "attemptsLeft" | "lastAttemptTime">;
57
- expiresAt: convex_values440.VFloat64<number | undefined, "optional">;
58
- lastUsedAt: convex_values440.VFloat64<number | undefined, "optional">;
59
- createdAt: convex_values440.VFloat64<number, "required">;
60
- revoked: convex_values440.VBoolean<boolean, "required">;
61
- metadata: convex_values440.VAny<any, "optional", string>;
62
- _id: convex_values440.VId<convex_values440.GenericId<"ApiKey">, "required">;
63
- _creationTime: convex_values440.VFloat64<number, "required">;
346
+ expiresAt: convex_values477.VFloat64<number | undefined, "optional">;
347
+ lastUsedAt: convex_values477.VFloat64<number | undefined, "optional">;
348
+ createdAt: convex_values477.VFloat64<number, "required">;
349
+ revoked: convex_values477.VBoolean<boolean, "required">;
350
+ metadata: convex_values477.VAny<any, "optional", string>;
351
+ _id: convex_values477.VId<convex_values477.GenericId<"ApiKey">, "required">;
352
+ _creationTime: convex_values477.VFloat64<number, "required">;
64
353
  }, "required", "_creationTime" | "name" | "revoked" | "lastUsedAt" | "expiresAt" | "userId" | "prefix" | "hashedKey" | "scopes" | "rateLimit" | "rateLimitState" | "createdAt" | "metadata" | "_id" | "rateLimit.maxRequests" | "rateLimit.windowMs" | "rateLimitState.attemptsLeft" | "rateLimitState.lastAttemptTime" | `metadata.${string}`>;
65
354
  //#endregion
66
- export { vApiKeyDoc };
355
+ export { vApiKeyDoc, vGroupDoc, vGroupInviteDoc, vGroupMemberDoc, vPaginated, vUserDoc };
67
356
  //# sourceMappingURL=model.d.ts.map