@robelest/convex-auth 0.0.4-preview.6 → 0.0.4-preview.7

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.
Files changed (37) hide show
  1. package/dist/component/convex.config.d.ts +2 -2
  2. package/dist/component/convex.config.d.ts.map +1 -1
  3. package/dist/component/schema.d.ts +35 -35
  4. package/dist/server/auth.d.ts +50 -50
  5. package/dist/server/implementation/index.d.ts +17 -17
  6. package/dist/server/implementation/mutations/account.d.ts +8 -8
  7. package/dist/server/implementation/mutations/code.d.ts +12 -12
  8. package/dist/server/implementation/mutations/code.d.ts.map +1 -1
  9. package/dist/server/implementation/mutations/index.d.ts +103 -103
  10. package/dist/server/implementation/mutations/invalidate.d.ts +4 -4
  11. package/dist/server/implementation/mutations/invalidate.d.ts.map +1 -1
  12. package/dist/server/implementation/mutations/oauth.d.ts +8 -8
  13. package/dist/server/implementation/mutations/oauth.d.ts.map +1 -1
  14. package/dist/server/implementation/mutations/refresh.d.ts +3 -3
  15. package/dist/server/implementation/mutations/refresh.d.ts.map +1 -1
  16. package/dist/server/implementation/mutations/register.d.ts +11 -11
  17. package/dist/server/implementation/mutations/register.d.ts.map +1 -1
  18. package/dist/server/implementation/mutations/retrieve.d.ts +8 -8
  19. package/dist/server/implementation/mutations/retrieve.d.ts.map +1 -1
  20. package/dist/server/implementation/mutations/signature.d.ts +4 -4
  21. package/dist/server/implementation/mutations/signature.d.ts.map +1 -1
  22. package/dist/server/implementation/mutations/signin.d.ts +5 -5
  23. package/dist/server/implementation/mutations/signin.d.ts.map +1 -1
  24. package/dist/server/implementation/mutations/verify.d.ts +10 -10
  25. package/dist/server/implementation/mutations/verify.d.ts.map +1 -1
  26. package/dist/server/index.d.ts +14 -4
  27. package/dist/server/index.d.ts.map +1 -1
  28. package/dist/server/index.js +123 -27
  29. package/dist/server/index.js.map +1 -1
  30. package/dist/server/providers.d.ts +8 -8
  31. package/dist/server/providers.d.ts.map +1 -1
  32. package/dist/server/version.d.ts +1 -1
  33. package/dist/server/version.js +1 -1
  34. package/dist/server/version.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/server/index.ts +184 -18
  37. package/src/server/version.ts +1 -1
@@ -1,7 +1,7 @@
1
- import * as convex_server0 from "convex/server";
1
+ import * as convex_server15 from "convex/server";
2
2
 
3
3
  //#region src/component/convex.config.d.ts
4
- declare const component: convex_server0.ComponentDefinition<any>;
4
+ declare const component: convex_server15.ComponentDefinition<any>;
5
5
  //#endregion
6
6
  export { component as default };
7
7
  //# sourceMappingURL=convex.config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"convex.config.d.ts","names":[],"sources":["../../src/component/convex.config.ts"],"mappings":";;;cAEM,SAAA,EAAmC,cAAA,CAA1B,mBAAA"}
1
+ {"version":3,"file":"convex.config.d.ts","names":[],"sources":["../../src/component/convex.config.ts"],"mappings":";;;cAEM,SAAA,EAAmC,eAAA,CAA1B,mBAAA"}
@@ -16,13 +16,13 @@ declare const _default: convex_server98.SchemaDefinition<{
16
16
  */
17
17
  user: convex_server98.TableDefinition<convex_values121.VObject<{
18
18
  name?: string | undefined;
19
- image?: string | undefined;
20
19
  email?: string | undefined;
21
- emailVerificationTime?: number | undefined;
22
20
  phone?: string | undefined;
21
+ extend?: any;
22
+ image?: string | undefined;
23
+ emailVerificationTime?: number | undefined;
23
24
  phoneVerificationTime?: number | undefined;
24
25
  isAnonymous?: boolean | undefined;
25
- extend?: any;
26
26
  }, {
27
27
  name: convex_values121.VString<string | undefined, "optional">;
28
28
  image: convex_values121.VString<string | undefined, "optional">;
@@ -32,7 +32,7 @@ declare const _default: convex_server98.SchemaDefinition<{
32
32
  phoneVerificationTime: convex_values121.VFloat64<number | undefined, "optional">;
33
33
  isAnonymous: convex_values121.VBoolean<boolean | undefined, "optional">;
34
34
  extend: convex_values121.VAny<any, "optional", string>;
35
- }, "required", "name" | "image" | "email" | "emailVerificationTime" | "phone" | "phoneVerificationTime" | "isAnonymous" | "extend" | `extend.${string}`>, {
35
+ }, "required", "name" | "email" | "phone" | "extend" | "image" | "emailVerificationTime" | "phoneVerificationTime" | "isAnonymous" | `extend.${string}`>, {
36
36
  email: ["email", "_creationTime"];
37
37
  phone: ["phone", "_creationTime"];
38
38
  }, {}, {}>;
@@ -59,8 +59,8 @@ declare const _default: convex_server98.SchemaDefinition<{
59
59
  secret?: string | undefined;
60
60
  emailVerified?: string | undefined;
61
61
  phoneVerified?: string | undefined;
62
- userId: convex_values121.GenericId<"user">;
63
62
  provider: string;
63
+ userId: convex_values121.GenericId<"user">;
64
64
  providerAccountId: string;
65
65
  }, {
66
66
  userId: convex_values121.VId<convex_values121.GenericId<"user">, "required">;
@@ -69,7 +69,7 @@ declare const _default: convex_server98.SchemaDefinition<{
69
69
  secret: convex_values121.VString<string | undefined, "optional">;
70
70
  emailVerified: convex_values121.VString<string | undefined, "optional">;
71
71
  phoneVerified: convex_values121.VString<string | undefined, "optional">;
72
- }, "required", "userId" | "provider" | "providerAccountId" | "secret" | "emailVerified" | "phoneVerified">, {
72
+ }, "required", "provider" | "userId" | "providerAccountId" | "secret" | "emailVerified" | "phoneVerified">, {
73
73
  userIdAndProvider: ["userId", "provider", "_creationTime"];
74
74
  providerAndAccountId: ["provider", "providerAccountId", "_creationTime"];
75
75
  }, {}, {}>;
@@ -84,14 +84,14 @@ declare const _default: convex_server98.SchemaDefinition<{
84
84
  token: convex_server98.TableDefinition<convex_values121.VObject<{
85
85
  firstUsedTime?: number | undefined;
86
86
  parentRefreshTokenId?: convex_values121.GenericId<"token"> | undefined;
87
- expirationTime: number;
88
87
  sessionId: convex_values121.GenericId<"session">;
88
+ expirationTime: number;
89
89
  }, {
90
90
  sessionId: convex_values121.VId<convex_values121.GenericId<"session">, "required">;
91
91
  expirationTime: convex_values121.VFloat64<number, "required">;
92
92
  firstUsedTime: convex_values121.VFloat64<number | undefined, "optional">;
93
93
  parentRefreshTokenId: convex_values121.VId<convex_values121.GenericId<"token"> | undefined, "optional">;
94
- }, "required", "expirationTime" | "sessionId" | "firstUsedTime" | "parentRefreshTokenId">, {
94
+ }, "required", "sessionId" | "expirationTime" | "firstUsedTime" | "parentRefreshTokenId">, {
95
95
  sessionId: ["sessionId", "_creationTime"];
96
96
  sessionIdAndParentRefreshTokenId: ["sessionId", "parentRefreshTokenId", "_creationTime"];
97
97
  }, {}, {}>;
@@ -99,13 +99,13 @@ declare const _default: convex_server98.SchemaDefinition<{
99
99
  * Verification codes for OTP tokens, magic link tokens, and OAuth codes.
100
100
  */
101
101
  verification: convex_server98.TableDefinition<convex_values121.VObject<{
102
+ verifier?: string | undefined;
102
103
  emailVerified?: string | undefined;
103
104
  phoneVerified?: string | undefined;
104
- verifier?: string | undefined;
105
- expirationTime: number;
106
105
  provider: string;
107
106
  accountId: convex_values121.GenericId<"account">;
108
107
  code: string;
108
+ expirationTime: number;
109
109
  }, {
110
110
  accountId: convex_values121.VId<convex_values121.GenericId<"account">, "required">;
111
111
  provider: convex_values121.VString<string, "required">;
@@ -114,7 +114,7 @@ declare const _default: convex_server98.SchemaDefinition<{
114
114
  verifier: convex_values121.VString<string | undefined, "optional">;
115
115
  emailVerified: convex_values121.VString<string | undefined, "optional">;
116
116
  phoneVerified: convex_values121.VString<string | undefined, "optional">;
117
- }, "required", "expirationTime" | "provider" | "emailVerified" | "phoneVerified" | "accountId" | "code" | "verifier">, {
117
+ }, "required", "provider" | "verifier" | "accountId" | "code" | "expirationTime" | "emailVerified" | "phoneVerified">, {
118
118
  accountId: ["accountId", "_creationTime"];
119
119
  code: ["code", "_creationTime"];
120
120
  }, {}, {}>;
@@ -138,8 +138,8 @@ declare const _default: convex_server98.SchemaDefinition<{
138
138
  */
139
139
  passkey: convex_server98.TableDefinition<convex_values121.VObject<{
140
140
  name?: string | undefined;
141
- transports?: string[] | undefined;
142
141
  lastUsedAt?: number | undefined;
142
+ transports?: string[] | undefined;
143
143
  userId: convex_values121.GenericId<"user">;
144
144
  credentialId: string;
145
145
  publicKey: ArrayBuffer;
@@ -160,7 +160,7 @@ declare const _default: convex_server98.SchemaDefinition<{
160
160
  name: convex_values121.VString<string | undefined, "optional">;
161
161
  createdAt: convex_values121.VFloat64<number, "required">;
162
162
  lastUsedAt: convex_values121.VFloat64<number | undefined, "optional">;
163
- }, "required", "name" | "userId" | "credentialId" | "publicKey" | "algorithm" | "counter" | "transports" | "deviceType" | "backedUp" | "createdAt" | "lastUsedAt">, {
163
+ }, "required", "name" | "lastUsedAt" | "userId" | "credentialId" | "publicKey" | "algorithm" | "counter" | "transports" | "deviceType" | "backedUp" | "createdAt">, {
164
164
  userId: ["userId", "_creationTime"];
165
165
  credentialId: ["credentialId", "_creationTime"];
166
166
  }, {}, {}>;
@@ -191,7 +191,7 @@ declare const _default: convex_server98.SchemaDefinition<{
191
191
  name: convex_values121.VString<string | undefined, "optional">;
192
192
  createdAt: convex_values121.VFloat64<number, "required">;
193
193
  lastUsedAt: convex_values121.VFloat64<number | undefined, "optional">;
194
- }, "required", "name" | "userId" | "secret" | "createdAt" | "lastUsedAt" | "digits" | "period" | "verified">, {
194
+ }, "required", "name" | "lastUsedAt" | "userId" | "secret" | "createdAt" | "digits" | "period" | "verified">, {
195
195
  userId: ["userId", "_creationTime"];
196
196
  }, {}, {}>;
197
197
  /**
@@ -203,11 +203,11 @@ declare const _default: convex_server98.SchemaDefinition<{
203
203
  userId?: convex_values121.GenericId<"user"> | undefined;
204
204
  sessionId?: convex_values121.GenericId<"session"> | undefined;
205
205
  lastPolledAt?: number | undefined;
206
+ status: "pending" | "authorized" | "denied";
207
+ expiresAt: number;
206
208
  deviceCodeHash: string;
207
209
  userCode: string;
208
- expiresAt: number;
209
210
  interval: number;
210
- status: "pending" | "authorized" | "denied";
211
211
  }, {
212
212
  /** High-entropy code used by the device for polling. Stored as SHA-256 hash. */deviceCodeHash: convex_values121.VString<string, "required">; /** Short human-readable code the user enters (e.g. "WDJB-MJHT"). */
213
213
  userCode: convex_values121.VString<string, "required">; /** Expiration timestamp (ms since epoch). */
@@ -217,7 +217,7 @@ declare const _default: convex_server98.SchemaDefinition<{
217
217
  userId: convex_values121.VId<convex_values121.GenericId<"user"> | undefined, "optional">; /** Set when the user authorizes — the session created for the device. */
218
218
  sessionId: convex_values121.VId<convex_values121.GenericId<"session"> | undefined, "optional">; /** Timestamp of the last poll request (for slow_down enforcement). */
219
219
  lastPolledAt: convex_values121.VFloat64<number | undefined, "optional">;
220
- }, "required", "userId" | "sessionId" | "deviceCodeHash" | "userCode" | "expiresAt" | "interval" | "status" | "lastPolledAt">, {
220
+ }, "required", "status" | "expiresAt" | "userId" | "sessionId" | "deviceCodeHash" | "userCode" | "interval" | "lastPolledAt">, {
221
221
  deviceCodeHash: ["deviceCodeHash", "_creationTime"];
222
222
  userCode: ["userCode", "status", "_creationTime"];
223
223
  }, {}, {}>;
@@ -241,13 +241,13 @@ declare const _default: convex_server98.SchemaDefinition<{
241
241
  * organizations, teams, departments, or any tree structure.
242
242
  */
243
243
  group: convex_server98.TableDefinition<convex_values121.VObject<{
244
- extend?: any;
245
- type?: string | undefined;
246
244
  slug?: string | undefined;
245
+ type?: string | undefined;
246
+ extend?: any;
247
247
  parentGroupId?: convex_values121.GenericId<"group"> | undefined;
248
248
  tags?: {
249
- key: string;
250
249
  value: string;
250
+ key: string;
251
251
  }[] | undefined;
252
252
  name: string;
253
253
  }, {
@@ -256,17 +256,17 @@ declare const _default: convex_server98.SchemaDefinition<{
256
256
  type: convex_values121.VString<string | undefined, "optional">;
257
257
  parentGroupId: convex_values121.VId<convex_values121.GenericId<"group"> | undefined, "optional">; /** Faceted classification tags. Normalized at write time (trimmed, lowercased). */
258
258
  tags: convex_values121.VArray<{
259
- key: string;
260
259
  value: string;
261
- }[] | undefined, convex_values121.VObject<{
262
260
  key: string;
261
+ }[] | undefined, convex_values121.VObject<{
263
262
  value: string;
263
+ key: string;
264
264
  }, {
265
265
  key: convex_values121.VString<string, "required">;
266
266
  value: convex_values121.VString<string, "required">;
267
- }, "required", "key" | "value">, "optional">;
267
+ }, "required", "value" | "key">, "optional">;
268
268
  extend: convex_values121.VAny<any, "optional", string>;
269
- }, "required", "name" | "extend" | "type" | `extend.${string}` | "slug" | "parentGroupId" | "tags">, {
269
+ }, "required", "name" | "slug" | "type" | "extend" | `extend.${string}` | "parentGroupId" | "tags">, {
270
270
  slug: ["slug", "_creationTime"];
271
271
  parentGroupId: ["parentGroupId", "_creationTime"];
272
272
  type: ["type", "_creationTime"];
@@ -278,14 +278,14 @@ declare const _default: convex_server98.SchemaDefinition<{
278
278
  * `groupCreate`, `groupUpdate`, and `groupDelete`.
279
279
  */
280
280
  groupTag: convex_server98.TableDefinition<convex_values121.VObject<{
281
- key: string;
282
281
  value: string;
282
+ key: string;
283
283
  groupId: convex_values121.GenericId<"group">;
284
284
  }, {
285
285
  groupId: convex_values121.VId<convex_values121.GenericId<"group">, "required">;
286
286
  key: convex_values121.VString<string, "required">;
287
287
  value: convex_values121.VString<string, "required">;
288
- }, "required", "key" | "value" | "groupId">, {
288
+ }, "required", "value" | "key" | "groupId">, {
289
289
  by_group: ["groupId", "_creationTime"];
290
290
  by_key_value: ["key", "value", "_creationTime"];
291
291
  by_key: ["key", "_creationTime"];
@@ -296,9 +296,9 @@ declare const _default: convex_server98.SchemaDefinition<{
296
296
  * member of multiple groups with different roles in each.
297
297
  */
298
298
  member: convex_server98.TableDefinition<convex_values121.VObject<{
299
- extend?: any;
300
- status?: string | undefined;
301
299
  role?: string | undefined;
300
+ status?: string | undefined;
301
+ extend?: any;
302
302
  userId: convex_values121.GenericId<"user">;
303
303
  groupId: convex_values121.GenericId<"group">;
304
304
  }, {
@@ -307,7 +307,7 @@ declare const _default: convex_server98.SchemaDefinition<{
307
307
  role: convex_values121.VString<string | undefined, "optional">;
308
308
  status: convex_values121.VString<string | undefined, "optional">;
309
309
  extend: convex_values121.VAny<any, "optional", string>;
310
- }, "required", "extend" | `extend.${string}` | "userId" | "status" | "groupId" | "role">, {
310
+ }, "required", "role" | "status" | "extend" | "userId" | `extend.${string}` | "groupId">, {
311
311
  groupId: ["groupId", "_creationTime"];
312
312
  groupIdAndUserId: ["groupId", "userId", "_creationTime"];
313
313
  userId: ["userId", "_creationTime"];
@@ -322,13 +322,13 @@ declare const _default: convex_server98.SchemaDefinition<{
322
322
  */
323
323
  invite: convex_server98.TableDefinition<convex_values121.VObject<{
324
324
  email?: string | undefined;
325
+ role?: string | undefined;
326
+ expiresTime?: number | undefined;
327
+ acceptedTime?: number | undefined;
325
328
  extend?: any;
326
329
  groupId?: convex_values121.GenericId<"group"> | undefined;
327
- role?: string | undefined;
328
330
  invitedByUserId?: convex_values121.GenericId<"user"> | undefined;
329
- expiresTime?: number | undefined;
330
331
  acceptedByUserId?: convex_values121.GenericId<"user"> | undefined;
331
- acceptedTime?: number | undefined;
332
332
  status: "pending" | "accepted" | "revoked" | "expired";
333
333
  tokenHash: string;
334
334
  }, {
@@ -342,7 +342,7 @@ declare const _default: convex_server98.SchemaDefinition<{
342
342
  acceptedByUserId: convex_values121.VId<convex_values121.GenericId<"user"> | undefined, "optional">;
343
343
  acceptedTime: convex_values121.VFloat64<number | undefined, "optional">;
344
344
  extend: convex_values121.VAny<any, "optional", string>;
345
- }, "required", "email" | "extend" | `extend.${string}` | "status" | "groupId" | "role" | "invitedByUserId" | "tokenHash" | "expiresTime" | "acceptedByUserId" | "acceptedTime">, {
345
+ }, "required", "email" | "role" | "status" | "expiresTime" | "acceptedTime" | "extend" | `extend.${string}` | "groupId" | "invitedByUserId" | "tokenHash" | "acceptedByUserId">, {
346
346
  tokenHash: ["tokenHash", "_creationTime"];
347
347
  status: ["status", "_creationTime"];
348
348
  emailAndStatus: ["email", "status", "_creationTime"];
@@ -376,9 +376,9 @@ declare const _default: convex_server98.SchemaDefinition<{
376
376
  attemptsLeft: number;
377
377
  } | undefined;
378
378
  name: string;
379
+ revoked: boolean;
379
380
  userId: convex_values121.GenericId<"user">;
380
381
  createdAt: number;
381
- revoked: boolean;
382
382
  prefix: string;
383
383
  hashedKey: string;
384
384
  scopes: {
@@ -418,7 +418,7 @@ declare const _default: convex_server98.SchemaDefinition<{
418
418
  lastUsedAt: convex_values121.VFloat64<number | undefined, "optional">;
419
419
  createdAt: convex_values121.VFloat64<number, "required">; /** Soft-revoke flag. Revoked keys are kept for audit trail. */
420
420
  revoked: convex_values121.VBoolean<boolean, "required">;
421
- }, "required", "name" | "userId" | "createdAt" | "lastUsedAt" | "expiresAt" | "revoked" | "prefix" | "hashedKey" | "scopes" | "rateLimit" | "rateLimitState" | "rateLimit.maxRequests" | "rateLimit.windowMs" | "rateLimitState.lastAttemptTime" | "rateLimitState.attemptsLeft">, {
421
+ }, "required", "name" | "revoked" | "lastUsedAt" | "expiresAt" | "userId" | "createdAt" | "prefix" | "hashedKey" | "scopes" | "rateLimit" | "rateLimitState" | "rateLimit.maxRequests" | "rateLimit.windowMs" | "rateLimitState.lastAttemptTime" | "rateLimitState.attemptsLeft">, {
422
422
  userId: ["userId", "_creationTime"];
423
423
  hashedKey: ["hashedKey", "_creationTime"];
424
424
  }, {}, {}>;
@@ -2,7 +2,7 @@ import { Doc, KeyDoc } from "./implementation/types.js";
2
2
  import { Auth as Auth$2 } from "./implementation/index.js";
3
3
  import { ComponentApi } from "../component/_generated/component.js";
4
4
  import { AuthProviderConfig, ConvexAuthConfig, CorsConfig, HttpKeyContext, KeyScope, ScopeChecker, UserOrderBy, UserWhere } from "./types.js";
5
- import * as convex_server3 from "convex/server";
5
+ import * as convex_server0 from "convex/server";
6
6
  import { UserIdentity } from "convex/server";
7
7
  import { GenericId } from "convex/values";
8
8
 
@@ -42,31 +42,31 @@ declare class Auth {
42
42
  /** User helpers: `.current(ctx)`, `.require(ctx)`, `.get(ctx, userId)`, `.patch(ctx, userId, data)`, `.viewer(ctx)`, `.group.list(ctx, ...)`, `.group.get(ctx, ...)` */
43
43
  get user(): {
44
44
  current: (ctx: {
45
- auth: convex_server3.Auth;
45
+ auth: convex_server0.Auth;
46
46
  }) => Promise<GenericId<"user"> | null>;
47
47
  require: (ctx: {
48
- auth: convex_server3.Auth;
48
+ auth: convex_server0.Auth;
49
49
  }) => Promise<GenericId<"user">>;
50
- get: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, userId: string) => Promise<any>;
51
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts?: {
50
+ get: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, userId: string) => Promise<any>;
51
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts?: {
52
52
  where?: UserWhere;
53
53
  limit?: number;
54
54
  cursor?: string | null;
55
55
  orderBy?: UserOrderBy;
56
56
  order?: "asc" | "desc";
57
57
  }) => Promise<any>;
58
- viewer: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery"> & {
59
- auth: convex_server3.Auth;
58
+ viewer: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery"> & {
59
+ auth: convex_server0.Auth;
60
60
  }) => Promise<any>;
61
- patch: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, userId: string, data: Record<string, unknown>) => Promise<void>;
61
+ patch: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, userId: string, data: Record<string, unknown>) => Promise<void>;
62
62
  group: {
63
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts: {
63
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts: {
64
64
  userId: string;
65
65
  limit?: number;
66
66
  cursor?: string | null;
67
67
  order?: "asc" | "desc";
68
68
  }) => Promise<any>;
69
- get: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts: {
69
+ get: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts: {
70
70
  userId: string;
71
71
  groupId: string;
72
72
  }) => Promise<any>;
@@ -75,16 +75,16 @@ declare class Auth {
75
75
  /** Session helpers: `.current(ctx)`, `.invalidate(ctx, { userId, except? })` */
76
76
  get session(): {
77
77
  current: (ctx: {
78
- auth: convex_server3.Auth;
78
+ auth: convex_server0.Auth;
79
79
  }) => Promise<GenericId<"session"> | null>;
80
- invalidate: <DataModel extends convex_server3.GenericDataModel>(ctx: convex_server3.GenericActionCtx<DataModel>, args: {
80
+ invalidate: <DataModel extends convex_server0.GenericDataModel>(ctx: convex_server0.GenericActionCtx<DataModel>, args: {
81
81
  userId: GenericId<"user">;
82
82
  except?: GenericId<"session">[];
83
83
  }) => Promise<void>;
84
84
  };
85
85
  /** Provider helpers: `.signIn(ctx, provider, args)` */
86
86
  get provider(): {
87
- signIn: <DataModel extends convex_server3.GenericDataModel>(ctx: convex_server3.GenericActionCtx<DataModel>, provider: AuthProviderConfig, args: {
87
+ signIn: <DataModel extends convex_server0.GenericDataModel>(ctx: convex_server0.GenericActionCtx<DataModel>, provider: AuthProviderConfig, args: {
88
88
  accountId?: GenericId<"account">;
89
89
  params?: Record<string, unknown>;
90
90
  }) => Promise<{
@@ -94,7 +94,7 @@ declare class Auth {
94
94
  };
95
95
  /** Account helpers: `.create(ctx, args)`, `.get(ctx, args)`, `.update(ctx, args)` */
96
96
  get account(): {
97
- create: <DataModel extends convex_server3.GenericDataModel>(ctx: convex_server3.GenericActionCtx<DataModel>, args: {
97
+ create: <DataModel extends convex_server0.GenericDataModel>(ctx: convex_server0.GenericActionCtx<DataModel>, args: {
98
98
  provider: string;
99
99
  account: {
100
100
  id: string;
@@ -107,7 +107,7 @@ declare class Auth {
107
107
  account: Doc<"account">;
108
108
  user: Doc<"user">;
109
109
  }>;
110
- get: <DataModel extends convex_server3.GenericDataModel>(ctx: convex_server3.GenericActionCtx<DataModel>, args: {
110
+ get: <DataModel extends convex_server0.GenericDataModel>(ctx: convex_server0.GenericActionCtx<DataModel>, args: {
111
111
  provider: string;
112
112
  account: {
113
113
  id: string;
@@ -117,7 +117,7 @@ declare class Auth {
117
117
  account: Doc<"account">;
118
118
  user: Doc<"user">;
119
119
  }>;
120
- update: <DataModel extends convex_server3.GenericDataModel>(ctx: convex_server3.GenericActionCtx<DataModel>, args: {
120
+ update: <DataModel extends convex_server0.GenericDataModel>(ctx: convex_server0.GenericActionCtx<DataModel>, args: {
121
121
  provider: string;
122
122
  account: {
123
123
  id: string;
@@ -127,7 +127,7 @@ declare class Auth {
127
127
  };
128
128
  /** Group helpers: `.create(ctx, ...)`, `.get(ctx, id)`, `.list(ctx, ...)`, `.update(ctx, ...)`, `.delete(ctx, id)`, `.member.*` */
129
129
  get group(): {
130
- create: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, data: {
130
+ create: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, data: {
131
131
  name: string;
132
132
  slug?: string;
133
133
  type?: string;
@@ -138,8 +138,8 @@ declare class Auth {
138
138
  }>;
139
139
  extend?: Record<string, unknown>;
140
140
  }) => Promise<string>;
141
- get: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, groupId: string) => Promise<any>;
142
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts?: {
141
+ get: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, groupId: string) => Promise<any>;
142
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts?: {
143
143
  where?: {
144
144
  slug?: string;
145
145
  type?: string;
@@ -160,18 +160,18 @@ declare class Auth {
160
160
  orderBy?: "_creationTime" | "name" | "slug" | "type";
161
161
  order?: "asc" | "desc";
162
162
  }) => Promise<any>;
163
- update: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, groupId: string, data: Record<string, unknown>) => Promise<void>;
164
- delete: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, groupId: string) => Promise<void>;
163
+ update: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, groupId: string, data: Record<string, unknown>) => Promise<void>;
164
+ delete: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, groupId: string) => Promise<void>;
165
165
  member: {
166
- add: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, data: {
166
+ add: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, data: {
167
167
  groupId: string;
168
168
  userId: string;
169
169
  role?: string;
170
170
  status?: string;
171
171
  extend?: Record<string, unknown>;
172
172
  }) => Promise<string>;
173
- get: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, memberId: string) => Promise<any>;
174
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts?: {
173
+ get: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, memberId: string) => Promise<any>;
174
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts?: {
175
175
  where?: {
176
176
  groupId?: string;
177
177
  userId?: string;
@@ -183,13 +183,13 @@ declare class Auth {
183
183
  orderBy?: "_creationTime" | "role" | "status";
184
184
  order?: "asc" | "desc";
185
185
  }) => Promise<any>;
186
- remove: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, memberId: string) => Promise<void>;
187
- update: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, memberId: string, data: Record<string, unknown>) => Promise<void>;
186
+ remove: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, memberId: string) => Promise<void>;
187
+ update: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, memberId: string, data: Record<string, unknown>) => Promise<void>;
188
188
  };
189
189
  };
190
190
  /** Invite helpers: `.create(ctx, ...)`, `.get(ctx, id)`, `.token.get(ctx, token)`, `.token.accept(ctx, ...)`, `.list(ctx, ...)`, `.accept(ctx, ...)`, `.revoke(ctx, id)` */
191
191
  get invite(): {
192
- create: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, data: {
192
+ create: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, data: {
193
193
  groupId?: string;
194
194
  invitedByUserId?: string;
195
195
  email?: string;
@@ -200,15 +200,15 @@ declare class Auth {
200
200
  inviteId: string;
201
201
  token: string;
202
202
  }>;
203
- get: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, inviteId: string) => Promise<any>;
203
+ get: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, inviteId: string) => Promise<any>;
204
204
  token: {
205
- get: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, token: string) => Promise<any>;
206
- accept: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, args: {
205
+ get: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, token: string) => Promise<any>;
206
+ accept: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, args: {
207
207
  token: string;
208
208
  acceptedByUserId: string;
209
209
  }) => Promise<any>;
210
210
  };
211
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts?: {
211
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts?: {
212
212
  where?: {
213
213
  tokenHash?: string;
214
214
  groupId?: string;
@@ -223,27 +223,27 @@ declare class Auth {
223
223
  orderBy?: "_creationTime" | "status" | "email" | "expiresTime" | "acceptedTime";
224
224
  order?: "asc" | "desc";
225
225
  }) => Promise<any>;
226
- accept: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, inviteId: string, acceptedByUserId?: string) => Promise<void>;
227
- revoke: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, inviteId: string) => Promise<void>;
226
+ accept: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, inviteId: string, acceptedByUserId?: string) => Promise<void>;
227
+ revoke: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, inviteId: string) => Promise<void>;
228
228
  };
229
229
  /** Passkey helpers: `.list(ctx, { userId })`, `.rename(ctx, id, name)`, `.remove(ctx, id)` */
230
230
  get passkey(): {
231
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts: {
231
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts: {
232
232
  userId: string;
233
233
  }) => Promise<any>;
234
- rename: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, passkeyId: string, name: string) => Promise<void>;
235
- remove: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, passkeyId: string) => Promise<void>;
234
+ rename: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, passkeyId: string, name: string) => Promise<void>;
235
+ remove: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, passkeyId: string) => Promise<void>;
236
236
  };
237
237
  /** TOTP helpers: `.list(ctx, { userId })`, `.remove(ctx, id)` */
238
238
  get totp(): {
239
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts: {
239
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts: {
240
240
  userId: string;
241
241
  }) => Promise<any>;
242
- remove: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, totpId: string) => Promise<void>;
242
+ remove: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, totpId: string) => Promise<void>;
243
243
  };
244
244
  /** API key helpers: `.create(ctx, ...)`, `.verify(ctx, rawKey)`, `.list(ctx, ...)`, `.get(ctx, id)`, `.update(ctx, ...)`, `.revoke(ctx, id)`, `.remove(ctx, id)` */
245
245
  get key(): {
246
- create: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, opts: {
246
+ create: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, opts: {
247
247
  userId: string;
248
248
  name: string;
249
249
  scopes: KeyScope[];
@@ -256,12 +256,12 @@ declare class Auth {
256
256
  keyId: string;
257
257
  raw: string;
258
258
  }>;
259
- verify: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, rawKey: string) => Promise<{
259
+ verify: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, rawKey: string) => Promise<{
260
260
  userId: string;
261
261
  keyId: string;
262
262
  scopes: ScopeChecker;
263
263
  }>;
264
- list: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, opts?: {
264
+ list: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, opts?: {
265
265
  where?: {
266
266
  userId?: string;
267
267
  revoked?: boolean;
@@ -273,8 +273,8 @@ declare class Auth {
273
273
  orderBy?: "_creationTime" | "name" | "lastUsedAt" | "expiresAt" | "revoked";
274
274
  order?: "asc" | "desc";
275
275
  }) => Promise<any>;
276
- get: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery">, keyId: string) => Promise<KeyDoc | null>;
277
- update: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, keyId: string, data: {
276
+ get: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery">, keyId: string) => Promise<KeyDoc | null>;
277
+ update: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, keyId: string, data: {
278
278
  name?: string;
279
279
  scopes?: KeyScope[];
280
280
  rateLimit?: {
@@ -282,8 +282,8 @@ declare class Auth {
282
282
  windowMs: number;
283
283
  };
284
284
  }) => Promise<void>;
285
- revoke: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, keyId: string) => Promise<void>;
286
- remove: (ctx: Pick<convex_server3.GenericActionCtx<convex_server3.GenericDataModel>, "runQuery" | "runMutation">, keyId: string) => Promise<void>;
285
+ revoke: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, keyId: string) => Promise<void>;
286
+ remove: (ctx: Pick<convex_server0.GenericActionCtx<convex_server0.GenericDataModel>, "runQuery" | "runMutation">, keyId: string) => Promise<void>;
287
287
  };
288
288
  /**
289
289
  * @param component - The auth component reference from `components.auth`.
@@ -292,18 +292,18 @@ declare class Auth {
292
292
  constructor(component: ComponentApi, config: AuthClassConfig);
293
293
  /** HTTP namespace — route registration and Bearer-authenticated endpoints. */
294
294
  get http(): {
295
- add: (http: convex_server3.HttpRouter) => void;
296
- action: (handler: (ctx: convex_server3.GenericActionCtx<convex_server3.GenericDataModel> & HttpKeyContext, request: Request) => Promise<Response | Record<string, unknown>>, options?: {
295
+ add: (http: convex_server0.HttpRouter) => void;
296
+ action: (handler: (ctx: convex_server0.GenericActionCtx<convex_server0.GenericDataModel> & HttpKeyContext, request: Request) => Promise<Response | Record<string, unknown>>, options?: {
297
297
  scope?: {
298
298
  resource: string;
299
299
  action: string;
300
300
  };
301
301
  cors?: CorsConfig;
302
- }) => convex_server3.PublicHttpAction;
303
- route: (http: convex_server3.HttpRouter, routeConfig: {
302
+ }) => convex_server0.PublicHttpAction;
303
+ route: (http: convex_server0.HttpRouter, routeConfig: {
304
304
  path: string;
305
305
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
306
- handler: (ctx: convex_server3.GenericActionCtx<convex_server3.GenericDataModel> & HttpKeyContext, request: Request) => Promise<Response | Record<string, unknown>>;
306
+ handler: (ctx: convex_server0.GenericActionCtx<convex_server0.GenericDataModel> & HttpKeyContext, request: Request) => Promise<Response | Record<string, unknown>>;
307
307
  scope?: {
308
308
  resource: string;
309
309
  action: string;