@estifanos-sh/convex-auth 0.0.5 → 0.0.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 (73) hide show
  1. package/dist/bin.js +96 -112
  2. package/dist/component/account.d.ts +30 -30
  3. package/dist/component/connection/audit.d.ts +12 -12
  4. package/dist/component/connection/cache.d.ts +6 -6
  5. package/dist/component/connection/domain/verification.d.ts +15 -15
  6. package/dist/component/connection/domain.d.ts +18 -18
  7. package/dist/component/connection/scim/config.d.ts +11 -11
  8. package/dist/component/connection/scim/identity.d.ts +2 -2
  9. package/dist/component/connection/webhook/endpoint.d.ts +21 -21
  10. package/dist/component/context.d.ts +3 -3
  11. package/dist/component/documents.d.ts +40 -40
  12. package/dist/component/event.d.ts +17 -17
  13. package/dist/component/factor/device.d.ts +1 -1
  14. package/dist/component/factor/device.d.ts.map +1 -1
  15. package/dist/component/factor/passkey.d.ts +6 -6
  16. package/dist/component/factor/passkey.d.ts.map +1 -1
  17. package/dist/component/factor/totp.d.ts +44 -44
  18. package/dist/component/group/active.d.ts +98 -98
  19. package/dist/component/group/invite.d.ts +32 -32
  20. package/dist/component/group/member.d.ts +34 -34
  21. package/dist/component/group/member.d.ts.map +1 -1
  22. package/dist/component/group.d.ts +44 -44
  23. package/dist/component/group.d.ts.map +1 -1
  24. package/dist/component/limits.d.ts +4 -4
  25. package/dist/component/maintenance.d.ts +2 -2
  26. package/dist/component/model.d.ts +480 -480
  27. package/dist/component/schema.d.ts +50 -50
  28. package/dist/component/session.d.ts +26 -26
  29. package/dist/component/token/continuation.d.ts +14 -14
  30. package/dist/component/token/enrollment.d.ts +9 -9
  31. package/dist/component/token/refresh.d.ts +33 -33
  32. package/dist/component/token/refresh.d.ts.map +1 -1
  33. package/dist/component/token/verification.d.ts +26 -26
  34. package/dist/component/token/verification.d.ts.map +1 -1
  35. package/dist/component/user/email.d.ts +17 -17
  36. package/dist/component/user/email.d.ts.map +1 -1
  37. package/dist/component/user/key.d.ts +26 -26
  38. package/dist/component/user.d.ts +32 -32
  39. package/dist/providers/anonymous.d.ts +3 -3
  40. package/dist/providers/anonymous.d.ts.map +1 -1
  41. package/dist/providers/password.d.ts +40 -40
  42. package/dist/providers/password.js +1 -1
  43. package/dist/providers/webauthn.d.ts +4 -3
  44. package/dist/providers/webauthn.d.ts.map +1 -1
  45. package/dist/providers/webauthn.js +15 -9
  46. package/dist/providers/webauthn.js.map +1 -1
  47. package/dist/server/connection/domain.d.ts +1 -1
  48. package/dist/server/connection/group/service.js +1 -1
  49. package/dist/server/connection/http.js +2 -2
  50. package/dist/server/device.js +1 -1
  51. package/dist/server/mutations/credentials/signin.js +1 -1
  52. package/dist/server/mutations/refresh.js +1 -1
  53. package/dist/server/mutations/signin.js +1 -1
  54. package/dist/server/mutations/signout.js +1 -1
  55. package/dist/server/mutations/verify.js +1 -1
  56. package/dist/server/oauth/handlers.js +2 -2
  57. package/dist/server/runtime.d.ts +9 -9
  58. package/dist/server/runtime.d.ts.map +1 -1
  59. package/dist/server/runtime.js +13 -7
  60. package/dist/server/runtime.js.map +1 -1
  61. package/dist/server/signin/flow.js +2 -2
  62. package/dist/server/totp.js +1 -1
  63. package/dist/server/types.d.ts +51 -5
  64. package/dist/server/types.d.ts.map +1 -1
  65. package/dist/server/validators.d.ts +676 -676
  66. package/dist/server/webauthn.js +36 -3
  67. package/dist/server/webauthn.js.map +1 -1
  68. package/dist/shared/webauthn.d.ts +12 -0
  69. package/dist/shared/webauthn.d.ts.map +1 -0
  70. package/dist/shared/webauthn.js +37 -1
  71. package/dist/shared/webauthn.js.map +1 -1
  72. package/dist/test.d.ts +596 -596
  73. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from "node:module";
3
3
  import { execFileSync } from "node:child_process";
4
- import { existsSync, lstatSync, mkdtempSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
4
+ import { existsSync, lstatSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
5
5
  import os, { tmpdir } from "node:os";
6
6
  import path, { dirname, join } from "node:path";
7
7
  import process$1, { stdin, stdout } from "node:process";
8
8
  import { fileURLToPath } from "node:url";
9
- import { stripVTControlCharacters, styleText } from "node:util";
9
+ import { parseArgs, stripVTControlCharacters, styleText } from "node:util";
10
10
  import * as _ from "node:readline";
11
11
  import P from "node:readline";
12
12
  import tty, { ReadStream } from "node:tty";
@@ -6251,6 +6251,49 @@ gradient.summer = summer;
6251
6251
  gradient.rainbow = rainbow;
6252
6252
  gradient.pastel = pastel;
6253
6253
 
6254
+ //#endregion
6255
+ //#region src/cli/convex.ts
6256
+ const cliPathByProject = /* @__PURE__ */ new Map();
6257
+ /** Resolve the Convex CLI installed for a project without invoking its package manager. */
6258
+ function resolveConvexCliPath(projectDirectory = process$1.cwd()) {
6259
+ const projectPath = path.resolve(projectDirectory);
6260
+ const cached = cliPathByProject.get(projectPath);
6261
+ if (cached !== void 0) return cached;
6262
+ const requireFromProject = createRequire(path.join(projectPath, "package.json"));
6263
+ let packagePath;
6264
+ try {
6265
+ packagePath = requireFromProject.resolve("convex/package.json");
6266
+ } catch (cause) {
6267
+ if (typeof cause === "object" && cause !== null && "code" in cause && cause.code !== "MODULE_NOT_FOUND") throw new Error("Could not resolve the project-local Convex package metadata.", { cause });
6268
+ throw new Error("Could not find the project-local \"convex\" package. Install Convex in this project before running convex-auth.", { cause });
6269
+ }
6270
+ let parsedPackageJson;
6271
+ try {
6272
+ parsedPackageJson = JSON.parse(readFileSync(packagePath, "utf8"));
6273
+ } catch (cause) {
6274
+ throw new Error(`Could not read Convex package metadata at ${packagePath}.`, { cause });
6275
+ }
6276
+ if (typeof parsedPackageJson !== "object" || parsedPackageJson === null || Array.isArray(parsedPackageJson)) throw new Error(`Convex package metadata at ${packagePath} is not a JSON object.`);
6277
+ const packageJson = parsedPackageJson;
6278
+ const bin = typeof packageJson.bin === "string" ? packageJson.bin : packageJson.bin?.convex;
6279
+ if (typeof bin !== "string" || bin.length === 0) throw new Error("The installed \"convex\" package does not expose a convex CLI executable.");
6280
+ const cliPath = path.resolve(path.dirname(packagePath), bin);
6281
+ try {
6282
+ if (!statSync(cliPath).isFile()) throw new Error("not a file");
6283
+ } catch (cause) {
6284
+ throw new Error(`The installed "convex" package points to a missing or invalid CLI file: ${cliPath}`, { cause });
6285
+ }
6286
+ cliPathByProject.set(projectPath, cliPath);
6287
+ return cliPath;
6288
+ }
6289
+ /** Build a shell-free command for the project-local Convex CLI. */
6290
+ function convexCommand(...args) {
6291
+ return {
6292
+ file: process$1.execPath,
6293
+ args: [resolveConvexCliPath(), ...args]
6294
+ };
6295
+ }
6296
+
6254
6297
  //#endregion
6255
6298
  //#region src/shared/keyring.ts
6256
6299
  /** Version of the serialized auth keyring stored in `AUTH_KEYS`. */
@@ -6321,59 +6364,6 @@ function getPackageVersion() {
6321
6364
  return "unknown";
6322
6365
  }
6323
6366
  const version = getPackageVersion();
6324
- function detectPackageRunner() {
6325
- let dir = process$1.cwd();
6326
- const root = path.parse(dir).root;
6327
- while (dir !== root) {
6328
- const pkgPath = path.join(dir, "package.json");
6329
- if (existsSync(pkgPath)) try {
6330
- const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
6331
- if (typeof pkg.packageManager === "string") {
6332
- const name = pkg.packageManager.split("@")[0];
6333
- if (name === "pnpm") return {
6334
- cmd: "pnpm",
6335
- args: ["exec"]
6336
- };
6337
- if (name === "bun") return {
6338
- cmd: "bunx",
6339
- args: []
6340
- };
6341
- if (name === "yarn") return {
6342
- cmd: "yarn",
6343
- args: ["dlx"]
6344
- };
6345
- }
6346
- } catch {}
6347
- if (existsSync(path.join(dir, "pnpm-lock.yaml"))) return {
6348
- cmd: "pnpm",
6349
- args: ["exec"]
6350
- };
6351
- if (existsSync(path.join(dir, "bun.lockb")) || existsSync(path.join(dir, "bun.lock"))) return {
6352
- cmd: "bunx",
6353
- args: []
6354
- };
6355
- if (existsSync(path.join(dir, "yarn.lock"))) return {
6356
- cmd: "yarn",
6357
- args: ["dlx"]
6358
- };
6359
- dir = path.dirname(dir);
6360
- }
6361
- return {
6362
- cmd: "npx",
6363
- args: []
6364
- };
6365
- }
6366
- const runner = detectPackageRunner();
6367
- function convexCmd(...subArgs) {
6368
- return {
6369
- file: runner.cmd,
6370
- args: [
6371
- ...runner.args,
6372
- "convex",
6373
- ...subArgs
6374
- ]
6375
- };
6376
- }
6377
6367
  const flagDefs = new Map([
6378
6368
  ["app-url", {
6379
6369
  type: "string",
@@ -6437,64 +6427,50 @@ function printHelp() {
6437
6427
  }
6438
6428
  console.log();
6439
6429
  }
6440
- function parseArgs(argv) {
6441
- const rawArgs = argv.slice(2);
6442
- const knownCommands = new Set([
6430
+ /** @internal */
6431
+ function parseCliOptions(argv) {
6432
+ let parsed;
6433
+ try {
6434
+ parsed = parseArgs({
6435
+ args: argv.slice(2),
6436
+ options: Object.fromEntries([...flagDefs].map(([name, definition]) => [name, { type: definition.type }])),
6437
+ allowPositionals: true,
6438
+ strict: true
6439
+ });
6440
+ } catch (error) {
6441
+ logErrorAndExit(error instanceof Error ? error.message : String(error));
6442
+ }
6443
+ const [commandName, ...extraPositionals] = parsed.positionals;
6444
+ if (commandName !== void 0 && !new Set([
6443
6445
  "setup",
6444
6446
  "doctor",
6445
6447
  "urls",
6446
6448
  "keys"
6447
- ]);
6448
- const firstArg = rawArgs[0];
6449
- const command = knownCommands.has(firstArg ?? "") ? firstArg : "setup";
6450
- const args = command === "setup" && !knownCommands.has(firstArg ?? "") ? rawArgs : rawArgs.slice(1);
6451
- const strings = /* @__PURE__ */ new Map();
6452
- const booleans = /* @__PURE__ */ new Set();
6453
- let i = 0;
6454
- while (i < args.length) {
6455
- const arg = args[i];
6456
- if (!arg.startsWith("--")) {
6457
- i++;
6458
- continue;
6459
- }
6460
- const name = arg.slice(2);
6461
- const def = flagDefs.get(name);
6462
- if (def === void 0) {
6463
- O.error(`Unknown flag: ${arg}`);
6464
- process$1.exit(1);
6465
- }
6466
- if (def.type === "boolean") {
6467
- booleans.add(name);
6468
- i++;
6469
- } else {
6470
- const value = args[i + 1];
6471
- if (value === void 0 || value.startsWith("--")) {
6472
- O.error(`Flag --${name} requires a value.`);
6473
- process$1.exit(1);
6474
- }
6475
- strings.set(name, value);
6476
- i += 2;
6477
- }
6478
- }
6479
- if (booleans.has("help")) {
6449
+ ]).has(commandName)) logErrorAndExit(`Unknown command: ${commandName}`);
6450
+ if (extraPositionals.length > 0) logErrorAndExit(`Unexpected arguments: ${extraPositionals.join(" ")}`);
6451
+ if (parsed.values.help === true) {
6480
6452
  printHelp();
6481
6453
  process$1.exit(0);
6482
6454
  }
6483
- if (booleans.has("version")) {
6455
+ if (parsed.values.version === true) {
6484
6456
  console.log(version);
6485
6457
  process$1.exit(0);
6486
6458
  }
6459
+ const stringValue = (name) => {
6460
+ const value = parsed.values[name];
6461
+ return typeof value === "string" ? value : void 0;
6462
+ };
6487
6463
  return {
6488
- command,
6489
- appUrl: strings.get("app-url"),
6490
- variables: strings.get("variables"),
6491
- skipGitCheck: booleans.has("skip-git-check"),
6492
- allowDirtyGitState: booleans.has("allow-dirty-git-state"),
6493
- url: strings.get("url"),
6494
- siteUrl: strings.get("site-url"),
6495
- adminKey: strings.get("admin-key"),
6496
- prod: booleans.has("prod"),
6497
- deployment: strings.get("deployment")
6464
+ command: commandName ?? "setup",
6465
+ appUrl: stringValue("app-url"),
6466
+ variables: stringValue("variables"),
6467
+ skipGitCheck: parsed.values["skip-git-check"] === true,
6468
+ allowDirtyGitState: parsed.values["allow-dirty-git-state"] === true,
6469
+ url: stringValue("url"),
6470
+ siteUrl: stringValue("site-url"),
6471
+ adminKey: stringValue("admin-key"),
6472
+ prod: parsed.values.prod === true,
6473
+ deployment: stringValue("deployment")
6498
6474
  };
6499
6475
  }
6500
6476
  function validateDeploymentSelectionOptions(options) {
@@ -6649,7 +6625,7 @@ async function runKeys(options) {
6649
6625
  * @returns A promise that resolves when setup completes successfully.
6650
6626
  */
6651
6627
  const runCli = async (argv = process$1.argv) => {
6652
- const options = parseArgs(argv);
6628
+ const options = parseCliOptions(argv);
6653
6629
  if (options.command === "setup") await runSetup(options);
6654
6630
  else if (options.command === "doctor") await runDoctor(options);
6655
6631
  else if (options.command === "urls") await runUrls(options);
@@ -6734,11 +6710,15 @@ async function configureKeys(config) {
6734
6710
  s2.stop("Keys configured.");
6735
6711
  }
6736
6712
  function backendEnvVar(config, name) {
6737
- const { file, args } = convexCmd("env", "get", ...deploymentArgs(config), name);
6738
- return execFileSync(file, args, {
6713
+ const { file, args } = convexCommand("env", "get", ...deploymentArgs(config), name);
6714
+ return stripTrailingLineBreak(execFileSync(file, args, {
6739
6715
  stdio: "pipe",
6740
6716
  encoding: "utf-8"
6741
- }).slice(0, -1);
6717
+ }));
6718
+ }
6719
+ /** @internal */
6720
+ function stripTrailingLineBreak(output) {
6721
+ return output.replace(/\r?\n$/, "");
6742
6722
  }
6743
6723
  function hasBackendEnvVar(config, name) {
6744
6724
  try {
@@ -6748,7 +6728,7 @@ function hasBackendEnvVar(config, name) {
6748
6728
  }
6749
6729
  }
6750
6730
  async function setEnvVar(config, name, value, options) {
6751
- const { file, args } = convexCmd("env", "set", ...deploymentArgs(config), "--", name, value);
6731
+ const { file, args } = convexCommand("env", "set", ...deploymentArgs(config), "--", name, value);
6752
6732
  execFileSync(file, args, { stdio: options?.hideValue ? "ignore" : "inherit" });
6753
6733
  if (options?.hideValue) O.success(`Set ${name} on ${printDeployment(config)}`);
6754
6734
  }
@@ -6756,14 +6736,18 @@ async function setEnvVarFromFile(config, name, value) {
6756
6736
  const tmpDir = mkdtempSync(path.join(tmpdir(), "convex-auth-"));
6757
6737
  const tmpFile = path.join(tmpDir, `${name}.tmp`);
6758
6738
  try {
6759
- writeFileSync(tmpFile, value, "utf-8");
6760
- const { file, args } = convexCmd("env", "set", ...deploymentArgs(config), name, "--from-file", tmpFile);
6739
+ writeFileSync(tmpFile, value, {
6740
+ encoding: "utf8",
6741
+ mode: 384
6742
+ });
6743
+ const { file, args } = convexCommand("env", "set", ...deploymentArgs(config), name, "--from-file", tmpFile);
6761
6744
  execFileSync(file, args, { stdio: "ignore" });
6762
6745
  O.success(`Set ${name} on ${printDeployment(config)}`);
6763
6746
  } finally {
6764
- try {
6765
- unlinkSync(tmpFile);
6766
- } catch {}
6747
+ rmSync(tmpDir, {
6748
+ recursive: true,
6749
+ force: true
6750
+ });
6767
6751
  }
6768
6752
  }
6769
6753
  function deploymentArgs(config) {
@@ -1,6 +1,6 @@
1
1
  import { SessionRows } from "./session.js";
2
- import * as convex_values1530 from "convex/values";
3
- import * as convex_server86 from "convex/server";
2
+ import * as convex_values1512 from "convex/values";
3
+ import * as convex_server83 from "convex/server";
4
4
 
5
5
  //#region src/component/account.d.ts
6
6
  declare namespace account_d_exports {
@@ -10,7 +10,7 @@ type AcceptedCredentialsSignIn = Omit<SessionRows, "epoch"> & {
10
10
  status: "accepted";
11
11
  };
12
12
  /** Reserve a password attempt and load all sign-in state in one transaction. */
13
- declare const beginCredentialsSignIn: convex_server86.RegisteredMutation<"public", {
13
+ declare const beginCredentialsSignIn: convex_server83.RegisteredMutation<"public", {
14
14
  provider: string;
15
15
  providerAccountId: string;
16
16
  limitIdentifier: string;
@@ -30,22 +30,22 @@ declare const beginCredentialsSignIn: convex_server86.RegisteredMutation<"public
30
30
  } | {
31
31
  status: "ready";
32
32
  account: {
33
- _id: convex_values1530.GenericId<"Account">;
33
+ _id: convex_values1512.GenericId<"Account">;
34
34
  _creationTime: number;
35
35
  extend?: any;
36
36
  secret?: string | undefined;
37
37
  emailVerified?: string | undefined;
38
38
  phoneVerified?: string | undefined;
39
- userId: convex_values1530.GenericId<"User">;
39
+ userId: convex_values1512.GenericId<"User">;
40
40
  provider: string;
41
41
  providerAccountId: string;
42
42
  };
43
43
  user: {
44
- _id: convex_values1530.GenericId<"User">;
44
+ _id: convex_values1512.GenericId<"User">;
45
45
  _creationTime: number;
46
+ extend?: any;
46
47
  email?: string | undefined;
47
48
  phone?: string | undefined;
48
- extend?: any;
49
49
  name?: string | undefined;
50
50
  firstName?: string | undefined;
51
51
  lastName?: string | undefined;
@@ -53,20 +53,20 @@ declare const beginCredentialsSignIn: convex_server86.RegisteredMutation<"public
53
53
  emailVerificationTime?: number | undefined;
54
54
  phoneVerificationTime?: number | undefined;
55
55
  isAnonymous?: boolean | undefined;
56
- lastActiveGroup?: convex_values1530.GenericId<"Group"> | undefined;
56
+ lastActiveGroup?: convex_values1512.GenericId<"Group"> | undefined;
57
57
  sessionEpoch: number;
58
58
  };
59
59
  hasTotp: boolean;
60
60
  }>>;
61
61
  /** Refund a verified password attempt and optionally issue its session atomically. */
62
- declare const completeCredentialsSignIn: convex_server86.RegisteredMutation<"public", {
62
+ declare const completeCredentialsSignIn: convex_server83.RegisteredMutation<"public", {
63
63
  replaceSession?: {
64
- sessionId: convex_values1530.GenericId<"Session">;
65
- authenticatedUserId: convex_values1530.GenericId<"User">;
64
+ sessionId: convex_values1512.GenericId<"Session">;
65
+ authenticatedUserId: convex_values1512.GenericId<"User">;
66
66
  } | undefined;
67
67
  sessionExpirationTime: number;
68
68
  refreshTokenExpirationTime: number;
69
- accountId: convex_values1530.GenericId<"Account">;
69
+ accountId: convex_values1512.GenericId<"Account">;
70
70
  limitIdentifier: string;
71
71
  issueSession: boolean;
72
72
  generateTokens: boolean;
@@ -79,18 +79,18 @@ declare const completeCredentialsSignIn: convex_server86.RegisteredMutation<"pub
79
79
  * Read an account by id, or by `{ provider, providerAccountId }` when both
80
80
  * are given. Returns `null` when no selector matches.
81
81
  */
82
- declare const get: convex_server86.RegisteredQuery<"public", {
83
- id?: convex_values1530.GenericId<"Account"> | undefined;
82
+ declare const get: convex_server83.RegisteredQuery<"public", {
83
+ id?: convex_values1512.GenericId<"Account"> | undefined;
84
84
  provider?: string | undefined;
85
85
  providerAccountId?: string | undefined;
86
86
  }, Promise<{
87
- _id: convex_values1530.GenericId<"Account">;
87
+ _id: convex_values1512.GenericId<"Account">;
88
88
  _creationTime: number;
89
89
  extend?: any;
90
90
  secret?: string | undefined;
91
91
  emailVerified?: string | undefined;
92
92
  phoneVerified?: string | undefined;
93
- userId: convex_values1530.GenericId<"User">;
93
+ userId: convex_values1512.GenericId<"User">;
94
94
  provider: string;
95
95
  providerAccountId: string;
96
96
  } | null>>;
@@ -101,35 +101,35 @@ declare const get: convex_server86.RegisteredQuery<"public", {
101
101
  * public server facade projects these raw records into safe capability
102
102
  * summaries before exposing them to application code.
103
103
  */
104
- declare const list: convex_server86.RegisteredQuery<"public", {
105
- userId?: convex_values1530.GenericId<"User"> | undefined;
104
+ declare const list: convex_server83.RegisteredQuery<"public", {
105
+ userId?: convex_values1512.GenericId<"User"> | undefined;
106
106
  provider?: string | undefined;
107
- userIds?: convex_values1530.GenericId<"User">[] | undefined;
107
+ userIds?: convex_values1512.GenericId<"User">[] | undefined;
108
108
  }, Promise<{
109
- _id: convex_values1530.GenericId<"Account">;
109
+ _id: convex_values1512.GenericId<"Account">;
110
110
  _creationTime: number;
111
111
  extend?: any;
112
112
  secret?: string | undefined;
113
113
  emailVerified?: string | undefined;
114
114
  phoneVerified?: string | undefined;
115
- userId: convex_values1530.GenericId<"User">;
115
+ userId: convex_values1512.GenericId<"User">;
116
116
  provider: string;
117
117
  providerAccountId: string;
118
118
  }[]>>;
119
119
  /** Insert a new account. */
120
- declare const create: convex_server86.RegisteredMutation<"public", {
120
+ declare const create: convex_server83.RegisteredMutation<"public", {
121
121
  extend?: any;
122
122
  secret?: string | undefined;
123
- userId: convex_values1530.GenericId<"User">;
123
+ userId: convex_values1512.GenericId<"User">;
124
124
  provider: string;
125
125
  providerAccountId: string;
126
- }, Promise<convex_values1530.GenericId<"Account">>>;
126
+ }, Promise<convex_values1512.GenericId<"Account">>>;
127
127
  /** Patch fields on an account. */
128
- declare const update: convex_server86.RegisteredMutation<"public", {
129
- id: convex_values1530.GenericId<"Account">;
128
+ declare const update: convex_server83.RegisteredMutation<"public", {
129
+ id: convex_values1512.GenericId<"Account">;
130
130
  patch: {
131
- userId?: convex_values1530.GenericId<"User"> | undefined;
132
131
  extend?: any;
132
+ userId?: convex_values1512.GenericId<"User"> | undefined;
133
133
  provider?: string | undefined;
134
134
  providerAccountId?: string | undefined;
135
135
  secret?: string | undefined;
@@ -141,10 +141,10 @@ declare const update: convex_server86.RegisteredMutation<"public", {
141
141
  * Delete an account. When `requireOtherAccount` is set, refuses to delete the
142
142
  * user's last remaining account so they are never left with none.
143
143
  */
144
- declare const remove: convex_server86.RegisteredMutation<"public", {
145
- userId?: convex_values1530.GenericId<"User"> | undefined;
144
+ declare const remove: convex_server83.RegisteredMutation<"public", {
145
+ userId?: convex_values1512.GenericId<"User"> | undefined;
146
146
  requireOtherAccount?: boolean | undefined;
147
- id: convex_values1530.GenericId<"Account">;
147
+ id: convex_values1512.GenericId<"Account">;
148
148
  }, Promise<null>>;
149
149
  //#endregion
150
150
  export { account_d_exports };
@@ -1,5 +1,5 @@
1
- import * as convex_values1862 from "convex/values";
2
- import * as convex_server195 from "convex/server";
1
+ import * as convex_values1847 from "convex/values";
2
+ import * as convex_server186 from "convex/server";
3
3
 
4
4
  //#region src/component/connection/audit.d.ts
5
5
  declare namespace audit_d_exports {
@@ -16,7 +16,7 @@ declare namespace audit_d_exports {
16
16
  * an allowlist). Requires exactly one of `connectionId` or `groupId` — passing
17
17
  * neither throws rather than scanning the entire audit log.
18
18
  */
19
- declare const list: convex_server195.RegisteredQuery<"public", {
19
+ declare const list: convex_server186.RegisteredQuery<"public", {
20
20
  paginationOpts: {
21
21
  id?: number;
22
22
  endCursor?: string | null;
@@ -26,23 +26,23 @@ declare const list: convex_server195.RegisteredQuery<"public", {
26
26
  cursor: string | null;
27
27
  };
28
28
  scope: {
29
- connectionId: convex_values1862.GenericId<"GroupConnection">;
29
+ connectionId: convex_values1847.GenericId<"GroupConnection">;
30
30
  } | {
31
- groupId: convex_values1862.GenericId<"Group">;
31
+ groupId: convex_values1847.GenericId<"Group">;
32
32
  };
33
33
  }, Promise<{
34
34
  page: {
35
- _id: convex_values1862.GenericId<"AuthEventProjection">;
35
+ _id: convex_values1847.GenericId<"AuthEventProjection">;
36
36
  _creationTime: number;
37
37
  eventId: string;
38
38
  targetKind: "user" | "group" | "session" | "api_key" | "connection" | "oauth_client" | "global";
39
39
  targetId: string;
40
40
  kind: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
41
- category: "user" | "session" | "account" | "password" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
41
+ category: "email" | "user" | "session" | "account" | "password" | "passkey" | "totp" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
42
42
  occurredAt: number;
43
43
  actorType: "user" | "api_key" | "scim" | "webhook" | "system" | "oauth_client" | "anonymous";
44
44
  actorId: string | undefined;
45
- subjectType: "user" | "group" | "session" | "account" | "passkey" | "totp" | "email" | "phone" | "api_key" | "connection" | "system" | "oauth_client" | "oauth_code" | "scim_identity" | "webhook_endpoint" | "webhook_delivery";
45
+ subjectType: "email" | "user" | "group" | "session" | "account" | "passkey" | "totp" | "phone" | "api_key" | "connection" | "system" | "oauth_client" | "oauth_code" | "scim_identity" | "webhook_endpoint" | "webhook_delivery";
46
46
  subjectId: string | undefined;
47
47
  outcome: "success" | "failure";
48
48
  errorCode: string | undefined;
@@ -50,8 +50,8 @@ declare const list: convex_server195.RegisteredQuery<"public", {
50
50
  ip: undefined;
51
51
  data: {
52
52
  type?: string | undefined;
53
- provider?: string | undefined;
54
53
  profile?: Record<string, any> | undefined;
54
+ provider?: string | undefined;
55
55
  existingUserId?: string | undefined;
56
56
  } | {
57
57
  method?: string | undefined;
@@ -75,8 +75,8 @@ declare const list: convex_server195.RegisteredQuery<"public", {
75
75
  name?: string | undefined;
76
76
  prefix?: string | undefined;
77
77
  } | {
78
- userId?: string | undefined;
79
78
  email?: string | undefined;
79
+ userId?: string | undefined;
80
80
  phone?: string | undefined;
81
81
  } | {
82
82
  userId?: string | undefined;
@@ -125,8 +125,8 @@ declare const list: convex_server195.RegisteredQuery<"public", {
125
125
  } | undefined;
126
126
  }[];
127
127
  isDone: boolean;
128
- continueCursor: convex_server195.Cursor;
129
- splitCursor?: convex_server195.Cursor | null;
128
+ continueCursor: convex_server186.Cursor;
129
+ splitCursor?: convex_server186.Cursor | null;
130
130
  pageStatus?: "SplitRecommended" | "SplitRequired" | null;
131
131
  }>>;
132
132
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as convex_server186 from "convex/server";
1
+ import * as convex_server189 from "convex/server";
2
2
 
3
3
  //#region src/component/connection/cache.d.ts
4
4
  declare namespace cache_d_exports {
@@ -27,7 +27,7 @@ declare namespace cache_d_exports {
27
27
  /**
28
28
  * Read-through fetch for OIDC discovery JSON. Cached 1h per URL.
29
29
  */
30
- declare const oidcDiscovery: convex_server186.RegisteredAction<"public", {
30
+ declare const oidcDiscovery: convex_server189.RegisteredAction<"public", {
31
31
  runtimeOrigin?: string | undefined;
32
32
  externalHost?: string | undefined;
33
33
  url: string;
@@ -45,7 +45,7 @@ declare const oidcDiscovery: convex_server186.RegisteredAction<"public", {
45
45
  * Cached 2h per URL (separate from the runtime sign-in path so admin
46
46
  * dashboards don't share keys with hot-path traffic).
47
47
  */
48
- declare const oidcStatusDiscovery: convex_server186.RegisteredAction<"public", {
48
+ declare const oidcStatusDiscovery: convex_server189.RegisteredAction<"public", {
49
49
  runtimeOrigin?: string | undefined;
50
50
  externalHost?: string | undefined;
51
51
  url: string;
@@ -61,19 +61,19 @@ declare const oidcStatusDiscovery: convex_server186.RegisteredAction<"public", {
61
61
  /**
62
62
  * Read-through fetch for SAML IdP metadata XML. Cached 24h per URL.
63
63
  */
64
- declare const samlMetadata: convex_server186.RegisteredAction<"public", {
64
+ declare const samlMetadata: convex_server189.RegisteredAction<"public", {
65
65
  runtimeOrigin?: string | undefined;
66
66
  externalHost?: string | undefined;
67
67
  url: string;
68
68
  }, Promise<string>>;
69
69
  /** Invalidate a cached OIDC discovery entry (e.g. on `discoveryUrl` update). */
70
- declare const invalidateOidcDiscovery: convex_server186.RegisteredMutation<"public", {
70
+ declare const invalidateOidcDiscovery: convex_server189.RegisteredMutation<"public", {
71
71
  runtimeOrigin?: string | undefined;
72
72
  externalHost?: string | undefined;
73
73
  url: string;
74
74
  }, Promise<null>>;
75
75
  /** Invalidate a cached SAML metadata entry (e.g. on `metadataUrl` update). */
76
- declare const invalidateSamlMetadata: convex_server186.RegisteredMutation<"public", {
76
+ declare const invalidateSamlMetadata: convex_server189.RegisteredMutation<"public", {
77
77
  runtimeOrigin?: string | undefined;
78
78
  externalHost?: string | undefined;
79
79
  url: string;
@@ -1,5 +1,5 @@
1
- import * as convex_values1793 from "convex/values";
2
- import * as convex_server171 from "convex/server";
1
+ import * as convex_values1774 from "convex/values";
2
+ import * as convex_server165 from "convex/server";
3
3
 
4
4
  //#region src/component/connection/domain/verification.d.ts
5
5
  declare namespace verification_d_exports {
@@ -12,36 +12,36 @@ declare namespace verification_d_exports {
12
12
  * @module
13
13
  */
14
14
  /** Read a domain's verification record by `domainId`, or `null` if none. */
15
- declare const get: convex_server171.RegisteredQuery<"public", {
16
- domainId: convex_values1793.GenericId<"GroupConnectionDomain">;
15
+ declare const get: convex_server165.RegisteredQuery<"public", {
16
+ domainId: convex_values1774.GenericId<"GroupConnectionDomain">;
17
17
  }, Promise<{
18
- _id: convex_values1793.GenericId<"GroupConnectionDomainVerification">;
18
+ _id: convex_values1774.GenericId<"GroupConnectionDomainVerification">;
19
19
  _creationTime: number;
20
- connectionId: convex_values1793.GenericId<"GroupConnection">;
20
+ connectionId: convex_values1774.GenericId<"GroupConnection">;
21
21
  domain: string;
22
22
  recordName: string;
23
23
  expiresAt: number;
24
- groupId: convex_values1793.GenericId<"Group">;
24
+ groupId: convex_values1774.GenericId<"Group">;
25
25
  tokenHash: string;
26
- domainId: convex_values1793.GenericId<"GroupConnectionDomain">;
26
+ domainId: convex_values1774.GenericId<"GroupConnectionDomain">;
27
27
  token: string;
28
28
  requestedAt: number;
29
29
  } | null>>;
30
30
  /** Insert a verification record, or patch it when one already exists for the domain (keyed by `domainId`). */
31
- declare const upsert: convex_server171.RegisteredMutation<"public", {
32
- connectionId: convex_values1793.GenericId<"GroupConnection">;
31
+ declare const upsert: convex_server165.RegisteredMutation<"public", {
32
+ connectionId: convex_values1774.GenericId<"GroupConnection">;
33
33
  domain: string;
34
34
  recordName: string;
35
35
  expiresAt: number;
36
- groupId: convex_values1793.GenericId<"Group">;
36
+ groupId: convex_values1774.GenericId<"Group">;
37
37
  tokenHash: string;
38
- domainId: convex_values1793.GenericId<"GroupConnectionDomain">;
38
+ domainId: convex_values1774.GenericId<"GroupConnectionDomain">;
39
39
  token: string;
40
40
  requestedAt: number;
41
- }, Promise<convex_values1793.GenericId<"GroupConnectionDomainVerification">>>;
41
+ }, Promise<convex_values1774.GenericId<"GroupConnectionDomainVerification">>>;
42
42
  /** Delete a domain's verification record, if any. */
43
- declare const remove: convex_server171.RegisteredMutation<"public", {
44
- domainId: convex_values1793.GenericId<"GroupConnectionDomain">;
43
+ declare const remove: convex_server165.RegisteredMutation<"public", {
44
+ domainId: convex_values1774.GenericId<"GroupConnectionDomain">;
45
45
  }, Promise<null>>;
46
46
  //#endregion
47
47
  export { verification_d_exports };