kitcn 0.25.0 → 0.25.1

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 (31) hide show
  1. package/dist/aggregate/index.d.ts +10 -10
  2. package/dist/aggregate/index.js +1 -1
  3. package/dist/auth/index.js +2 -2
  4. package/dist/auth/nextjs/index.d.ts +1 -1
  5. package/dist/{builder-1Vx-tEnS.js → builder-C6JSHkRK.js} +8 -2
  6. package/dist/cli.mjs +36 -19
  7. package/dist/{customFunctions-BbhgdRGl.js → customFunctions-ivbc6-_g.js} +1 -1
  8. package/dist/{definitions-D9vhJ6OV.js → definitions-Dzk8mSTL.js} +2 -2
  9. package/dist/{extensions-DzjCJXYl.js → extensions-Blzsyekm.js} +1 -1
  10. package/dist/{id-Bibg34Yb.js → id-CuSfWa5q.js} +1 -1
  11. package/dist/{local-env-Du24tdbp.mjs → local-env-Dkh4a_BK.mjs} +1 -0
  12. package/dist/{middleware-cJDRHTRY.js → middleware-CdqNVyp8.js} +1 -1
  13. package/dist/orm/aggregate-index/index.js +3 -3
  14. package/dist/orm/index.d.ts +2 -2
  15. package/dist/orm/index.js +7 -6
  16. package/dist/orm/migrations/index.d.ts +1 -1
  17. package/dist/orm/migrations/index.js +1 -1
  18. package/dist/plugins/index.js +1 -1
  19. package/dist/{procedure-caller-DIzXfX2E.js → procedure-caller-CgLWu5F9.js} +1 -1
  20. package/dist/{procedure-name-B09-cf1-.d.ts → procedure-name-Bjw1JDIS.d.ts} +5 -2
  21. package/dist/ratelimit/index.js +2 -2
  22. package/dist/{runtime-DfGsZtx3.js → runtime-BdqTbgKh.js} +9 -3
  23. package/dist/{schema-Besl-rpv.js → schema-BQd2Xrfb.js} +3 -3
  24. package/dist/server/index.d.ts +1 -1
  25. package/dist/server/index.js +2 -2
  26. package/dist/{table-rmJm5Qio.js → table-CX2lnX7e.js} +1 -1
  27. package/dist/{validators-Dmbhsd3U.js → validators-CIoUYCqO.js} +1 -0
  28. package/dist/{validators-V4eM2-Jg.d.ts → validators-wOIjhkfN.d.ts} +7 -1
  29. package/dist/watcher.mjs +1 -1
  30. package/dist/{where-clause-compiler-mohWFiG0.d.ts → where-clause-compiler-Dmq4HMrK.d.ts} +89 -42
  31. package/package.json +4 -3
@@ -1,5 +1,5 @@
1
1
  import { Bn as ConvexTextBuilderInitial, Xt as ConvexTableWithColumns } from "../capabilities-Bem7xvGK.js";
2
- import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial } from "../where-clause-compiler-mohWFiG0.js";
2
+ import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial } from "../where-clause-compiler-Dmq4HMrK.js";
3
3
  import * as convex_values0 from "convex/values";
4
4
  import { GenericId, Infer, Value } from "convex/values";
5
5
  import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
@@ -82,6 +82,15 @@ declare const aggregateStorageTables: {
82
82
  fieldName: "aggregateName";
83
83
  };
84
84
  };
85
+ deletionStack: ConvexCustomBuilderInitial<"", convex_values0.VArray<convex_values0.GenericId<"aggregate_rank_node">[], convex_values0.VId<convex_values0.GenericId<"aggregate_rank_node">, "required">, "required">> & {
86
+ _: {
87
+ tableName: "aggregate_rank_tree";
88
+ };
89
+ } & {
90
+ _: {
91
+ fieldName: "deletionStack";
92
+ };
93
+ };
85
94
  maxNodeSize: ConvexNumberBuilderInitial<""> & {
86
95
  _: {
87
96
  notNull: true;
@@ -117,15 +126,6 @@ declare const aggregateStorageTables: {
117
126
  fieldName: "root";
118
127
  };
119
128
  };
120
- deletionStack: ConvexCustomBuilderInitial<"", convex_values0.VArray<convex_values0.GenericId<"aggregate_rank_node">[], convex_values0.VId<convex_values0.GenericId<"aggregate_rank_node">, "required">, "required">> & {
121
- _: {
122
- tableName: "aggregate_rank_tree";
123
- };
124
- } & {
125
- _: {
126
- fieldName: "deletionStack";
127
- };
128
- };
129
129
  };
130
130
  }, {
131
131
  by_creation_time: ["_creationTime"];
@@ -1,4 +1,4 @@
1
- import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-DfGsZtx3.js";
1
+ import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-BdqTbgKh.js";
2
2
 
3
3
  //#region src/aggregate/index.ts
4
4
  const wrapTriggerFactory = (methodName, factory) => ((...args) => {
@@ -1,8 +1,8 @@
1
1
  import { n as asyncMap } from "../upstream-BCgGZX6q.js";
2
- import { r as partial } from "../validators-Dmbhsd3U.js";
2
+ import { r as partial } from "../validators-CIoUYCqO.js";
3
3
  import { i as defineAuth, n as createDisabledAuthRuntime, r as getGeneratedAuthDisabledReason, t as DEFAULT_AUTH_DEFINITION_PATH } from "../generated-contract-disabled-CZa0iyV0.js";
4
4
  import { n as createGeneratedFunctionReference, o as isQueryCtx, s as isRunMutationCtx } from "../api-entry-CkDpGYVg.js";
5
- import { n as customCtx, r as customMutation } from "../customFunctions-BbhgdRGl.js";
5
+ import { n as customCtx, r as customMutation } from "../customFunctions-ivbc6-_g.js";
6
6
  import { l as eq } from "../filter-expression-Dydt8wS0.js";
7
7
  import { o as mergedStream, s as stream, t as getByIdWithOrmQueryFallback, u as unsetToken } from "../query-context-DOm5Xm3H.js";
8
8
  import { n as convex } from "../convex-plugin-DfOhBU9g.js";
@@ -1,4 +1,4 @@
1
- import { H as ConvexContext, W as LazyCaller } from "../../procedure-name-B09-cf1-.js";
1
+ import { H as ConvexContext, W as LazyCaller } from "../../procedure-name-Bjw1JDIS.js";
2
2
  import { t as GetTokenOptions } from "../../token-kQaqFby4.js";
3
3
 
4
4
  //#region src/auth-nextjs/index.d.ts
@@ -1,5 +1,5 @@
1
- import { o as vRequired, t as addFieldsToValidator } from "./validators-Dmbhsd3U.js";
2
- import { n as customCtx, t as NoOp } from "./customFunctions-BbhgdRGl.js";
1
+ import { o as vRequired, t as addFieldsToValidator } from "./validators-CIoUYCqO.js";
2
+ import { n as customCtx, t as NoOp } from "./customFunctions-ivbc6-_g.js";
3
3
  import { s as getTransformer } from "./transformer-D8wO-kEj.js";
4
4
  import { ConvexError, v } from "convex/values";
5
5
  import { HttpRouter, actionGeneric, httpActionGeneric, internalActionGeneric, internalMutationGeneric, internalQueryGeneric, mutationGeneric, queryGeneric } from "convex/server";
@@ -386,6 +386,9 @@ function zodToConvexFields(fields) {
386
386
  function zodOutputToConvexFields(fields) {
387
387
  return Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, zodOutputToConvex(v)]));
388
388
  }
389
+ function isCommitTsPlaceholder(value) {
390
+ return typeof value === "object" && value !== null && Object.getPrototypeOf(value)?.constructor?.name === "CommitTsPlaceholder";
391
+ }
389
392
  /**
390
393
  * Turns a Convex validator into a Zod validator.
391
394
  *
@@ -418,6 +421,9 @@ function convexToZod(convexValidator) {
418
421
  case "int64":
419
422
  zodValidator = z$1.bigint();
420
423
  break;
424
+ case "commitTs":
425
+ zodValidator = z$1.union([z$1.bigint(), z$1.custom(isCommitTsPlaceholder)]);
426
+ break;
421
427
  case "boolean":
422
428
  zodValidator = z$1.boolean();
423
429
  break;
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as Columns, D as TableName, E as RlsPolicies, O as createSystemFields, S as getRankIndexes, T as OrmSchemaExtensions, _ as loadEsbuild, a as generateMeta, b as getAggregateIndexes, c as resolveSchemaDefaultExport, f as createProjectJiti, g as loadDotenv, h as loadClackPrompts, i as resolveConfiguredBackend, l as schemaDeclaresAggregateIndexes, m as loadBabelParser, n as withLocalCodegenEnv, o as getConvexConfig, p as CRPC_BUILDER_STUB_SOURCE, r as loadCliConfig, s as collectSchemaTables, t as getLocalBackendEnvVars, u as logger, v as highlighter, w as EnableRLS, x as getIndexes, y as isColorEnabled } from "./local-env-Du24tdbp.mjs";
2
+ import { C as Columns, D as TableName, E as RlsPolicies, O as createSystemFields, S as getRankIndexes, T as OrmSchemaExtensions, _ as loadEsbuild, a as generateMeta, b as getAggregateIndexes, c as resolveSchemaDefaultExport, f as createProjectJiti, g as loadDotenv, h as loadClackPrompts, i as resolveConfiguredBackend, l as schemaDeclaresAggregateIndexes, m as loadBabelParser, n as withLocalCodegenEnv, o as getConvexConfig, p as CRPC_BUILDER_STUB_SOURCE, r as loadCliConfig, s as collectSchemaTables, t as getLocalBackendEnvVars, u as logger, v as highlighter, w as EnableRLS, x as getIndexes, y as isColorEnabled } from "./local-env-Dkh4a_BK.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import fs, { existsSync, readFileSync } from "node:fs";
5
5
  import path, { basename, delimiter, dirname, extname, isAbsolute, join, posix, relative, resolve } from "node:path";
@@ -2129,8 +2129,11 @@ const EXACT_VERSION_RE = /^(\d+)\.(\d+)\.\d+$/;
2129
2129
  const VERSION_IN_SPEC_RE = /(\d+)\.(\d+)(?:\.\d+)?/;
2130
2130
  const PLAIN_VERSION_SPEC_RE = /^[\^~]?v?\d+\.\d+(?:\.\d+)?$/;
2131
2131
  const UPPER_BOUND_RE = /(?:^|\s)<={0,1}\s*v?(\d+)\.(\d+)(?:\.\d+)?/g;
2132
+ const LOWER_BOUND_RE = /(?:^|\s)>={0,1}\s*v?(\d+)\.(\d+)(?:\.\d+)?/g;
2132
2133
  const SUPPORTED_CONCAVE_CLI_VERSION = "0.0.1-alpha.14";
2133
- const SUPPORTED_CONVEX_VERSION = "1.42.3";
2134
+ const SUPPORTED_CONVEX_VERSION = "1.44.0";
2135
+ const SUPPORTED_CONVEX_MIN_VERSION = "1.42";
2136
+ const SUPPORTED_CONVEX_MIN_TYPE_VERSION = "1.42.3";
2134
2137
  const SUPPORTED_BETTER_AUTH_VERSION = "1.6.18";
2135
2138
  const SUPPORTED_BETTER_AUTH_MIN_VERSION = "1.6.11";
2136
2139
  const SUPPORTED_HONO_VERSION = "4.12.9";
@@ -2140,16 +2143,16 @@ const SUPPORTED_ZOD_VERSION = "4.3.6";
2140
2143
  const KITCN_INSTALL_SPEC_ENV = "KITCN_INSTALL_SPEC";
2141
2144
  const KITCN_RESEND_INSTALL_SPEC_ENV = "KITCN_RESEND_INSTALL_SPEC";
2142
2145
  let ownVersion;
2143
- function getMinimumVersionRange(version) {
2144
- const match = EXACT_VERSION_RE.exec(version);
2145
- if (!match) throw new Error(`Unsupported exact version "${version}". Expected x.y.z format.`);
2146
- return `>=${match[1]}.${match[2]}`;
2147
- }
2148
2146
  function getMinorVersionPeerRange(minimumVersion, supportedVersion) {
2149
2147
  const match = EXACT_VERSION_RE.exec(supportedVersion);
2150
2148
  if (!match) throw new Error(`Unsupported exact version "${supportedVersion}". Expected x.y.z format.`);
2151
2149
  return `>=${minimumVersion} <${match[1]}.${Number(match[2]) + 1}.0`;
2152
2150
  }
2151
+ function getNextMinorVersion(version) {
2152
+ const match = EXACT_VERSION_RE.exec(version);
2153
+ if (!match) throw new Error(`Unsupported exact version "${version}". Expected x.y.z format.`);
2154
+ return `${match[1]}.${Number(match[2]) + 1}.0`;
2155
+ }
2153
2156
  function getPackageNameFromInstallSpec(spec) {
2154
2157
  const normalized = spec.trim();
2155
2158
  if (normalized.length === 0) throw new Error("Install spec must be non-empty.");
@@ -2201,8 +2204,11 @@ function resolveScaffoldInstallSpec(env = process.env) {
2201
2204
  const SUPPORTED_DEPENDENCY_VERSIONS = {
2202
2205
  convex: {
2203
2206
  exact: SUPPORTED_CONVEX_VERSION,
2207
+ minimumType: SUPPORTED_CONVEX_MIN_TYPE_VERSION,
2204
2208
  range: `^${SUPPORTED_CONVEX_VERSION}`,
2205
- minimum: getMinimumVersionRange(SUPPORTED_CONVEX_VERSION)
2209
+ minimum: `>=${SUPPORTED_CONVEX_MIN_VERSION}`,
2210
+ maximumExclusive: getNextMinorVersion(SUPPORTED_CONVEX_VERSION),
2211
+ peer: getMinorVersionPeerRange(SUPPORTED_CONVEX_MIN_VERSION, SUPPORTED_CONVEX_VERSION)
2206
2212
  },
2207
2213
  betterAuth: {
2208
2214
  exact: SUPPORTED_BETTER_AUTH_VERSION,
@@ -2261,20 +2267,31 @@ function compareMajorMinor(aMajor, aMinor, bMajor, bMinor) {
2261
2267
  if (aMajor !== bMajor) return aMajor - bMajor;
2262
2268
  return aMinor - bMinor;
2263
2269
  }
2264
- function isConcreteVersionSpecBelowMinimum(spec, minimum) {
2270
+ function isConcreteVersionSpecOutsideRange(spec, minimum, maximumExclusive) {
2265
2271
  const specMatch = VERSION_IN_SPEC_RE.exec(spec);
2266
2272
  const minimumMatch = VERSION_IN_SPEC_RE.exec(minimum);
2267
- if (!specMatch || !minimumMatch) return false;
2268
- return compareMajorMinor(Number(specMatch[1]), Number(specMatch[2]), Number(minimumMatch[1]), Number(minimumMatch[2])) < 0;
2273
+ const maximumMatch = VERSION_IN_SPEC_RE.exec(maximumExclusive);
2274
+ if (!specMatch || !minimumMatch || !maximumMatch) return false;
2275
+ const specMajor = Number(specMatch[1]);
2276
+ const specMinor = Number(specMatch[2]);
2277
+ const minimumMajor = Number(minimumMatch[1]);
2278
+ const minimumMinor = Number(minimumMatch[2]);
2279
+ const maximumMajor = Number(maximumMatch[1]);
2280
+ const maximumMinor = Number(maximumMatch[2]);
2281
+ return compareMajorMinor(specMajor, specMinor, minimumMajor, minimumMinor) < 0 || compareMajorMinor(specMajor, specMinor, maximumMajor, maximumMinor) >= 0;
2269
2282
  }
2270
- function isDeclaredVersionSpecBelowMinimum(spec, minimum) {
2283
+ function isDeclaredVersionSpecOutsideRange(spec, minimum, maximumExclusive) {
2271
2284
  const normalized = spec.trim();
2272
- if (PLAIN_VERSION_SPEC_RE.test(normalized)) return isConcreteVersionSpecBelowMinimum(normalized, minimum);
2285
+ if (PLAIN_VERSION_SPEC_RE.test(normalized)) return isConcreteVersionSpecOutsideRange(normalized, minimum, maximumExclusive);
2273
2286
  const minimumMatch = VERSION_IN_SPEC_RE.exec(minimum);
2274
- if (!minimumMatch) return false;
2287
+ const maximumMatch = VERSION_IN_SPEC_RE.exec(maximumExclusive);
2288
+ if (!minimumMatch || !maximumMatch) return false;
2275
2289
  const minimumMajor = Number(minimumMatch[1]);
2276
2290
  const minimumMinor = Number(minimumMatch[2]);
2291
+ const maximumMajor = Number(maximumMatch[1]);
2292
+ const maximumMinor = Number(maximumMatch[2]);
2277
2293
  for (const match of normalized.matchAll(UPPER_BOUND_RE)) if (compareMajorMinor(Number(match[1]), Number(match[2]), minimumMajor, minimumMinor) <= 0) return true;
2294
+ for (const match of normalized.matchAll(LOWER_BOUND_RE)) if (compareMajorMinor(Number(match[1]), Number(match[2]), maximumMajor, maximumMinor) >= 0) return true;
2278
2295
  return false;
2279
2296
  }
2280
2297
  function resolveSupportedDependencyWarnings(cwd = process.cwd()) {
@@ -2282,18 +2299,18 @@ function resolveSupportedDependencyWarnings(cwd = process.cwd()) {
2282
2299
  if (!packageJsonPath) return [];
2283
2300
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
2284
2301
  const installedConvexVersion = readInstalledDependencyVersion(packageJsonPath, "convex");
2285
- if (installedConvexVersion && isConcreteVersionSpecBelowMinimum(installedConvexVersion, SUPPORTED_DEPENDENCY_VERSIONS.convex.minimum)) return [{
2302
+ if (installedConvexVersion && isConcreteVersionSpecOutsideRange(installedConvexVersion, SUPPORTED_DEPENDENCY_VERSIONS.convex.minimum, SUPPORTED_DEPENDENCY_VERSIONS.convex.maximumExclusive)) return [{
2286
2303
  packageName: "convex",
2287
2304
  current: installedConvexVersion,
2288
- minimum: SUPPORTED_DEPENDENCY_VERSIONS.convex.minimum,
2305
+ supported: SUPPORTED_DEPENDENCY_VERSIONS.convex.peer,
2289
2306
  installSpec: PINNED_CONVEX_INSTALL_SPEC
2290
2307
  }];
2291
2308
  const convexVersion = readDependencyVersion(packageJson, "convex");
2292
- if (!convexVersion || !isDeclaredVersionSpecBelowMinimum(convexVersion, SUPPORTED_DEPENDENCY_VERSIONS.convex.minimum)) return [];
2309
+ if (!convexVersion || !isDeclaredVersionSpecOutsideRange(convexVersion, SUPPORTED_DEPENDENCY_VERSIONS.convex.minimum, SUPPORTED_DEPENDENCY_VERSIONS.convex.maximumExclusive)) return [];
2293
2310
  return [{
2294
2311
  packageName: "convex",
2295
2312
  current: convexVersion,
2296
- minimum: SUPPORTED_DEPENDENCY_VERSIONS.convex.minimum,
2313
+ supported: SUPPORTED_DEPENDENCY_VERSIONS.convex.peer,
2297
2314
  installSpec: PINNED_CONVEX_INSTALL_SPEC
2298
2315
  }];
2299
2316
  }
@@ -15790,7 +15807,7 @@ function warnSupportedDependencyIssues(command) {
15790
15807
  const packageManager = detectPackageManager(process.cwd());
15791
15808
  for (const warning of resolveSupportedDependencyWarnings()) {
15792
15809
  const installCommand = formatDependencyInstallCommand(packageManager, [warning.installSpec]);
15793
- logger.warn(`⚠️ kitcn expects ${warning.packageName} ${warning.minimum}; found ${warning.current}. Run \`${installCommand}\` when you can.`);
15810
+ logger.warn(`⚠️ kitcn expects ${warning.packageName} ${warning.supported}; found ${warning.current}. Run \`${installCommand}\` when you can.`);
15794
15811
  }
15795
15812
  }
15796
15813
  const handlePassthroughCommand = async (argv, deps) => {
@@ -1,5 +1,5 @@
1
1
  import { i as pick, r as omit } from "./upstream-BCgGZX6q.js";
2
- import { t as addFieldsToValidator } from "./validators-Dmbhsd3U.js";
2
+ import { t as addFieldsToValidator } from "./validators-CIoUYCqO.js";
3
3
 
4
4
  //#region src/internal/upstream/server/customFunctions.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as integer, C as index, I as ConvexColumnBuilder, L as entityKind, M as custom, O as text, t as convexTable } from "./table-rmJm5Qio.js";
2
- import { t as defineSchemaExtension } from "./extensions-DzjCJXYl.js";
1
+ import { A as integer, C as index, I as ConvexColumnBuilder, L as entityKind, M as custom, O as text, t as convexTable } from "./table-CX2lnX7e.js";
2
+ import { t as defineSchemaExtension } from "./extensions-Blzsyekm.js";
3
3
  import { v } from "convex/values";
4
4
 
5
5
  //#region src/orm/builders/boolean.ts
@@ -1,4 +1,4 @@
1
- import { d as OrmSchemaExtensionTriggers, l as OrmSchemaExtensionRelations } from "./table-rmJm5Qio.js";
1
+ import { d as OrmSchemaExtensionTriggers, l as OrmSchemaExtensionRelations } from "./table-CX2lnX7e.js";
2
2
 
3
3
  //#region src/orm/extensions.ts
4
4
  function defineChainMethod(target, key, value) {
@@ -1,4 +1,4 @@
1
- import { I as ConvexColumnBuilder, L as entityKind } from "./table-rmJm5Qio.js";
1
+ import { I as ConvexColumnBuilder, L as entityKind } from "./table-CX2lnX7e.js";
2
2
  import { v } from "convex/values";
3
3
 
4
4
  //#region src/orm/builders/id.ts
@@ -679,6 +679,7 @@ function vRequired(validator) {
679
679
  case "string": return v.string();
680
680
  case "float64": return v.float64();
681
681
  case "int64": return v.int64();
682
+ case "commitTs": return v.commitTs();
682
683
  case "boolean": return v.boolean();
683
684
  case "null": return v.null();
684
685
  case "any": return v.any();
@@ -1,4 +1,4 @@
1
- import { a as createMiddlewareFactory } from "./builder-1Vx-tEnS.js";
1
+ import { a as createMiddlewareFactory } from "./builder-C6JSHkRK.js";
2
2
 
3
3
  //#region src/plugins/middleware.ts
4
4
  const PLUGIN_CONFIG_RESOLVERS = Symbol.for("kitcn:PluginConfigResolvers");
@@ -1,6 +1,6 @@
1
- import { t as DirectAggregate } from "../../runtime-DfGsZtx3.js";
2
- import { a as Columns } from "../../table-rmJm5Qio.js";
3
- import { Y as normalizeTemporalComparableValue, _t as usesSystemCreatedAtAlias, c as AGGREGATE_ERROR, f as createError, gt as PUBLIC_CREATED_AT_FIELD, ht as INTERNAL_CREATION_TIME_FIELD, i as AGGREGATE_STATE_TABLE, it as mapWithConcurrency, l as COUNT_ERROR, n as AGGREGATE_EXTREMA_TABLE, o as getAggregateIndexDefinitions, r as AGGREGATE_MEMBER_TABLE, s as getRankIndexDefinitions, t as AGGREGATE_BUCKET_TABLE } from "../../schema-Besl-rpv.js";
1
+ import { t as DirectAggregate } from "../../runtime-BdqTbgKh.js";
2
+ import { a as Columns } from "../../table-CX2lnX7e.js";
3
+ import { Y as normalizeTemporalComparableValue, _t as usesSystemCreatedAtAlias, c as AGGREGATE_ERROR, f as createError, gt as PUBLIC_CREATED_AT_FIELD, ht as INTERNAL_CREATION_TIME_FIELD, i as AGGREGATE_STATE_TABLE, it as mapWithConcurrency, l as COUNT_ERROR, n as AGGREGATE_EXTREMA_TABLE, o as getAggregateIndexDefinitions, r as AGGREGATE_MEMBER_TABLE, s as getRankIndexDefinitions, t as AGGREGATE_BUCKET_TABLE } from "../../schema-BQd2Xrfb.js";
4
4
 
5
5
  //#region src/orm/aggregate-index/runtime.ts
6
6
  const UNDEFINED_SENTINEL = "__kitcnUndefined";
@@ -1,6 +1,6 @@
1
1
  import { $n as BinaryExpression, $t as OrmLifecycleOperation, A as DatabaseWithMutations, An as ConvexCheckConfig, Ar as AnyColumn, At as VectorQueryConfig, B as RlsContext, Bn as ConvexTextBuilderInitial, Br as IsUnique, Bt as RelationsBuilderColumnConfig, C as MigrationTableName, Cn as aggregateIndex, Cr as notBetween, Ct as OrderDirection, D as defineMigrationSet, Dn as uniqueIndex, Dt as ReturningResult, E as defineMigration, En as searchIndex, Er as startsWith, Et as ReturningAll, Fn as ConvexUniqueConstraintConfig, Fr as ColumnBuilderWithTableName, Ft as ExtractTablesWithRelations, Gt as defineRelations, H as EdgeMetadata, In as check, Ir as ColumnDataType, It as ManyConfig, Jt as ConvexDeletionConfig, Kt as defineRelationsPart, Ln as foreignKey, Lr as DrizzleEntity, Lt as OneConfig, M as OrmReader$1, Mn as ConvexForeignKeyConfig, Mr as ColumnBuilderBaseConfig, Mt as unsetToken, N as OrmWriter$1, Nn as ConvexUniqueConstraintBuilder, Nr as ColumnBuilderRuntimeConfig, O as detectMigrationDrift, On as vectorIndex, Or as SystemFields, Ot as ReturningSelection, Pn as ConvexUniqueConstraintBuilderOn, Pr as ColumnBuilderTypeConfig, Pt as ExtractTablesFromSchema, Qn as TableName, Qt as OrmLifecycleChange, Rn as unique, Rr as HasDefault, Rt as RelationsBuilder, S as MigrationStep, Sn as ConvexVectorIndexConfig, Sr as not, St as OrderByClause, T as buildMigrationPlan, Tn as rankIndex, Tr as or, Tt as PredicateWhereIndexConfig, U as extractRelationsConfig, Un as Brand, Ut as TableRelationalConfig, V as RlsMode, Vn as text, Vr as NotNull, Wn as Columns, Wt as TablesRelationalConfig, Xn as OrmSchemaRelations, Xt as ConvexTableWithColumns, Yn as OrmSchemaExtensions, Yt as ConvexTable, Zn as OrmSchemaTriggers, Zt as DiscriminatorBuilderConfig, _ as MigrationMigrateOne, _n as ConvexSearchIndexBuilder, _r as isNull, _t as MutationPaginateConfig, an as RlsPolicyConfig, ar as and, at as CountConfig, b as MigrationSet, bn as ConvexVectorIndexBuilder, br as lte, bt as MutationReturning, cn as RlsRole, cr as endsWith, ct as FilterOperators, d as MigrationDefinition, dn as ConvexAggregateIndexBuilder, dr as gt, dt as InferModelFromColumns, en as TableConfig, er as ExpressionVisitor, et as AggregateConfig, f as MigrationDirection, fn as ConvexAggregateIndexBuilderOn, fr as gte, ft as InferSelectModel, g as MigrationManifestEntry, gn as ConvexRankIndexBuilderOn, gr as isNotNull, gt as MutationExecutionMode, h as MigrationDriftIssue, hn as ConvexRankIndexBuilder, hr as isFieldReference, ht as MutationExecuteResult, i as OrmMigrationCapability, in as RlsPolicy, ir as UnaryExpression, it as BuildRelationResult, j as DatabaseWithQuery, jn as ConvexForeignKeyBuilder, jr as ColumnBuilder, jt as VectorSearchProvider, kn as ConvexCheckBuilder, kt as UpdateSet, ln as RlsRoleConfig, lr as eq, lt as GetColumnData, m as MigrationDocContext, mn as ConvexIndexBuilderOn, mr as inArray, mt as MutationExecuteConfig, n as OrmCapabilities, nn as deletion, nr as FilterExpression, nt as AggregateResult, on as RlsPolicyToOption, or as between, ot as CountResult, p as MigrationDoc, pn as ConvexIndexBuilder, pr as ilike, pt as InsertValue, qn as OrmSchemaExtensionTables, qt as ConvexDeletionBuilder, r as OrmCapability, rn as discriminator, rr as LogicalExpression, rt as BuildQueryResult, sn as rlsPolicy, sr as contains, st as DBQueryConfig, t as OrmAggregateCapability, tn as convexTable, tr as FieldReference, tt as AggregateFieldValue, u as MigrationAppliedState, un as rlsRole, ur as fieldRef, ut as InferInsertModel, v as MigrationPlan, vn as ConvexSearchIndexBuilderOn, vr as like, vt as MutationPaginatedResult, w as MigrationWriteMode, wn as index, wr as notInArray, wt as PaginatedResult, x as MigrationStateMap, xn as ConvexVectorIndexBuilderOn, xr as ne, xt as MutationRunMode, y as MigrationRunStatus, yn as ConvexSearchIndexConfig, yr as lt, yt as MutationResult, zn as ConvexTextBuilder, zr as IsPrimaryKey, zt as RelationsBuilderColumnBase } from "../capabilities-Bem7xvGK.js";
2
- import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-mohWFiG0.js";
3
- import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-V4eM2-Jg.js";
2
+ import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-Dmq4HMrK.js";
3
+ import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-wOIjhkfN.js";
4
4
  import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-DJONf8X5.js";
5
5
  import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
6
6
 
package/dist/orm/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { A as integer, C as index, D as vectorIndex, E as uniqueIndex, F as unionOf, I as ConvexColumnBuilder, L as entityKind, M as custom, N as json, O as text, P as objectOf, S as aggregateIndex, T as searchIndex, a as Columns, b as RlsPolicy, c as OrmSchemaDefinition, d as OrmSchemaExtensionTriggers, f as OrmSchemaExtensions, g as RlsPolicies, h as OrmSchemaTriggers, i as Brand, j as arrayOf, k as createSystemFields, l as OrmSchemaExtensionRelations, m as OrmSchemaRelations, n as deletion, o as EnableRLS, p as OrmSchemaOptions, r as discriminator, s as OrmContext, t as convexTable, u as OrmSchemaExtensionTables, v as TableName, w as rankIndex, x as rlsPolicy, y as TablePolymorphic } from "../table-rmJm5Qio.js";
2
- import { d as boolean, i as detectMigrationDrift, l as migrationExtension, n as defineMigration, r as defineMigrationSet, t as buildMigrationPlan } from "../definitions-D9vhJ6OV.js";
3
- import { a as pretendRequired, i as pretend, n as deprecated } from "../validators-Dmbhsd3U.js";
4
- import { t as id } from "../id-Bibg34Yb.js";
1
+ import { A as integer, C as index, D as vectorIndex, E as uniqueIndex, F as unionOf, I as ConvexColumnBuilder, L as entityKind, M as custom, N as json, O as text, P as objectOf, S as aggregateIndex, T as searchIndex, a as Columns, b as RlsPolicy, c as OrmSchemaDefinition, d as OrmSchemaExtensionTriggers, f as OrmSchemaExtensions, g as RlsPolicies, h as OrmSchemaTriggers, i as Brand, j as arrayOf, k as createSystemFields, l as OrmSchemaExtensionRelations, m as OrmSchemaRelations, n as deletion, o as EnableRLS, p as OrmSchemaOptions, r as discriminator, s as OrmContext, t as convexTable, u as OrmSchemaExtensionTables, v as TableName, w as rankIndex, x as rlsPolicy, y as TablePolymorphic } from "../table-CX2lnX7e.js";
2
+ import { d as boolean, i as detectMigrationDrift, l as migrationExtension, n as defineMigration, r as defineMigrationSet, t as buildMigrationPlan } from "../definitions-Dzk8mSTL.js";
3
+ import { a as pretendRequired, i as pretend, n as deprecated } from "../validators-CIoUYCqO.js";
4
+ import { t as id } from "../id-CuSfWa5q.js";
5
5
  import { A as or, C as matchLikePattern, D as notIlike, E as notBetween, O as notInArray, S as lte, T as not, _ as isFieldReference, a as between, b as like, c as endsWith, d as filterValueInList, f as filterValuesEqual, g as inArray, h as ilike, i as arrayOverlaps, j as startsWith, k as notLike, l as eq, m as gte, n as arrayContained, o as column, p as gt, r as arrayContains, s as contains, t as and, u as fieldRef, v as isNotNull, w as ne, x as lt, y as isNull } from "../filter-expression-Dydt8wS0.js";
6
6
  import { a as indexKeyWithinBounds, c as streamIndexRange, i as getIndexFields, l as isUnsetToken, n as EmptyStream, o as mergedStream, r as QueryStream, s as stream, t as getByIdWithOrmQueryFallback, u as unsetToken } from "../query-context-DOm5Xm3H.js";
7
- import { $ as serializeFilterExpression, A as ensureNonNullValues, B as getMutationExecutionMode, C as deserializeFilterExpression, D as enforcePolymorphicWrite, E as enforceForeignKeys, F as getChecks, G as getUniqueIndexes, H as getTableColumns$2, I as getColumnName$1, J as normalizeDateFieldsForWrite, K as hardDeleteRow, L as getForeignKeys, M as evaluateCheckConstraintTriState, N as evaluateFilter, O as enforceUniqueIndexes, P as extractPrimaryIdLookup, Q as selectReturningRowWithHydration, R as getMutationAsyncDelayMs, S as decodeUndefinedDeep, T as enforceCheckConstraints, U as getTableDeleteConfig, V as getOrmContext, W as getTableName, X as patchReferencingRows, Y as normalizeTemporalComparableValue, Z as resolveOrmRuntimeDefaults, _ as applyIncomingForeignKeyActionsOnUpdate, _t as usesSystemCreatedAtAlias, a as aggregateExtension, at as markLifecycleHookedTables, b as collectMutationRowsBounded, c as AGGREGATE_ERROR, ct as findSearchIndexByName, d as createCountError, dt as getIndexes, et as softDeleteRow, ft as getRankIndexes, g as applyIncomingForeignKeyActionsOnDelete, gt as PUBLIC_CREATED_AT_FIELD, h as applyDefaults, ht as INTERNAL_CREATION_TIME_FIELD, it as mapWithConcurrency, j as ensureNullableColumns, k as ensureDefaultColumns, l as COUNT_ERROR, lt as findVectorIndexByName, m as ensureCountAllowedForRls, mt as CREATED_AT_MIGRATION_MESSAGE, nt as takeRowsWithinByteBudget, o as getAggregateIndexDefinitions, ot as findIndexForColumns, p as ensureAggregateAllowedForRls, pt as resolveIndexOrderPushdown, q as hydrateDateFieldsForRead, rt as toConvexFilter, s as getRankIndexDefinitions, st as findRelationIndex, tt as splitReturningSelection, u as createAggregateError, ut as getAggregateIndexes, v as buildForeignKeyGraph, w as encodeUndefinedDeep, x as collectPrimaryIdLookupRows, y as canUsePrimaryIdLookupCursor, z as getMutationCollectionLimits } from "../schema-Besl-rpv.js";
8
- import { t as defineSchemaExtension } from "../extensions-DzjCJXYl.js";
7
+ import { $ as serializeFilterExpression, A as ensureNonNullValues, B as getMutationExecutionMode, C as deserializeFilterExpression, D as enforcePolymorphicWrite, E as enforceForeignKeys, F as getChecks, G as getUniqueIndexes, H as getTableColumns$2, I as getColumnName$1, J as normalizeDateFieldsForWrite, K as hardDeleteRow, L as getForeignKeys, M as evaluateCheckConstraintTriState, N as evaluateFilter, O as enforceUniqueIndexes, P as extractPrimaryIdLookup, Q as selectReturningRowWithHydration, R as getMutationAsyncDelayMs, S as decodeUndefinedDeep, T as enforceCheckConstraints, U as getTableDeleteConfig, V as getOrmContext, W as getTableName, X as patchReferencingRows, Y as normalizeTemporalComparableValue, Z as resolveOrmRuntimeDefaults, _ as applyIncomingForeignKeyActionsOnUpdate, _t as usesSystemCreatedAtAlias, a as aggregateExtension, at as markLifecycleHookedTables, b as collectMutationRowsBounded, c as AGGREGATE_ERROR, ct as findSearchIndexByName, d as createCountError, dt as getIndexes, et as softDeleteRow, ft as getRankIndexes, g as applyIncomingForeignKeyActionsOnDelete, gt as PUBLIC_CREATED_AT_FIELD, h as applyDefaults, ht as INTERNAL_CREATION_TIME_FIELD, it as mapWithConcurrency, j as ensureNullableColumns, k as ensureDefaultColumns, l as COUNT_ERROR, lt as findVectorIndexByName, m as ensureCountAllowedForRls, mt as CREATED_AT_MIGRATION_MESSAGE, nt as takeRowsWithinByteBudget, o as getAggregateIndexDefinitions, ot as findIndexForColumns, p as ensureAggregateAllowedForRls, pt as resolveIndexOrderPushdown, q as hydrateDateFieldsForRead, rt as toConvexFilter, s as getRankIndexDefinitions, st as findRelationIndex, tt as splitReturningSelection, u as createAggregateError, ut as getAggregateIndexes, v as buildForeignKeyGraph, w as encodeUndefinedDeep, x as collectPrimaryIdLookupRows, y as canUsePrimaryIdLookupCursor, z as getMutationCollectionLimits } from "../schema-BQd2Xrfb.js";
8
+ import { t as defineSchemaExtension } from "../extensions-Blzsyekm.js";
9
9
  import { compareValues, v } from "convex/values";
10
10
  import { defineSchema as defineSchema$1, internalActionGeneric, internalMutationGeneric } from "convex/server";
11
11
 
@@ -6142,6 +6142,7 @@ function writerWithHooks(ctx, innerDb, hooksByTable, isWithinHook = false) {
6142
6142
  patch,
6143
6143
  replace,
6144
6144
  delete: delete_,
6145
+ vars: innerDb.vars,
6145
6146
  system: innerDb.system,
6146
6147
  get: innerDb.get.bind(innerDb),
6147
6148
  query: innerDb.query.bind(innerDb),
@@ -1,3 +1,3 @@
1
1
  import { C as MigrationTableName, D as defineMigrationSet, E as defineMigration, O as detectMigrationDrift, S as MigrationStep, T as buildMigrationPlan, _ as MigrationMigrateOne, a as MigrationCancelArgs, b as MigrationSet, c as MigrationStatusArgs, d as MigrationDefinition, f as MigrationDirection, g as MigrationManifestEntry, h as MigrationDriftIssue, l as createMigrationHandlers, m as MigrationDocContext, o as MigrationRunArgs, p as MigrationDoc, s as MigrationRunChunkArgs, u as MigrationAppliedState, v as MigrationPlan, w as MigrationWriteMode, x as MigrationStateMap, y as MigrationRunStatus } from "../../capabilities-Bem7xvGK.js";
2
- import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-mohWFiG0.js";
2
+ import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-Dmq4HMrK.js";
3
3
  export { MIGRATION_RUN_TABLE, MIGRATION_STATE_TABLE, MIGRATION_STORAGE_TABLE_NAMES, type MigrationAppliedState, type MigrationCancelArgs, type MigrationDefinition, type MigrationDirection, type MigrationDoc, type MigrationDocContext, type MigrationDriftIssue, type MigrationManifestEntry, type MigrationMigrateOne, type MigrationPlan, type MigrationRunArgs, type MigrationRunChunkArgs, type MigrationRunStatus, type MigrationSet, type MigrationStateMap, type MigrationStatusArgs, type MigrationStep, type MigrationTableName, type MigrationWriteMode, buildMigrationPlan, createMigrationHandlers, defineMigration, defineMigrationSet, detectMigrationDrift, injectMigrationStorageTables, migrationCapability, migrationExtension, migrationStorageTables };
@@ -1,4 +1,4 @@
1
- import { a as MIGRATION_RUN_TABLE, c as injectMigrationStorageTables, i as detectMigrationDrift, l as migrationExtension, n as defineMigration, o as MIGRATION_STATE_TABLE, r as defineMigrationSet, s as MIGRATION_STORAGE_TABLE_NAMES, t as buildMigrationPlan, u as migrationStorageTables } from "../../definitions-D9vhJ6OV.js";
1
+ import { a as MIGRATION_RUN_TABLE, c as injectMigrationStorageTables, i as detectMigrationDrift, l as migrationExtension, n as defineMigration, o as MIGRATION_STATE_TABLE, r as defineMigrationSet, s as MIGRATION_STORAGE_TABLE_NAMES, t as buildMigrationPlan, u as migrationStorageTables } from "../../definitions-Dzk8mSTL.js";
2
2
 
3
3
  //#region src/orm/migrations/runtime.ts
4
4
  const DEFAULT_BATCH_SIZE = 128;
@@ -1,3 +1,3 @@
1
- import { n as resolvePluginOptions, t as definePlugin } from "../middleware-cJDRHTRY.js";
1
+ import { n as resolvePluginOptions, t as definePlugin } from "../middleware-CdqNVyp8.js";
2
2
 
3
3
  export { definePlugin, resolvePluginOptions };
@@ -1,5 +1,5 @@
1
1
  import { i as decodeWire, o as encodeWire } from "./transformer-D8wO-kEj.js";
2
- import { _ as CRPCError } from "./builder-1Vx-tEnS.js";
2
+ import { _ as CRPCError } from "./builder-C6JSHkRK.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/server/env.ts
@@ -1,4 +1,4 @@
1
- import { t as VRequired } from "./validators-V4eM2-Jg.js";
1
+ import { t as VRequired } from "./validators-wOIjhkfN.js";
2
2
  import { A as HttpProcedureBuilderDef, D as HttpHandlerOpts, L as DataTransformerOptions, N as ProcedureMeta, O as HttpMethod, W as getTransformer, _ as CRPCHttpRouter, f as InferHttpInput, k as HttpProcedure, p as InferHttpOutput, y as HttpRouterRecord } from "./http-types-90mapMP9.js";
3
3
  import { g as UnsetMarker, i as IntersectIfDefined, o as MiddlewareBuilder, p as Overwrite$1, s as MiddlewareFunction, t as AnyMiddleware } from "./types-eNzQmbqM.js";
4
4
  import { ConvexError, GenericId, GenericValidator, ObjectType, OptionalProperty, PropertyValidators, VAny, VArray, VBoolean, VBytes, VFloat64, VId, VInt64, VLiteral, VNull, VObject, VOptional, VRecord, VString, VUnion, Validator, Value as Value$1 } from "convex/values";
@@ -568,7 +568,10 @@ type IsUnknownOrAny<T> = 0 extends 1 & T ? true : unknown extends T ? true : fal
568
568
  * ```
569
569
  */
570
570
  type ZodValidatorFromConvex<V extends GenericValidator> = V extends Validator<any, 'optional', any> ? z$1.ZodOptional<ZodFromValidatorBase<VRequired<V>>> : ZodFromValidatorBase<V>;
571
- type ZodFromValidatorBase<V extends GenericValidator> = V extends VId<infer Type> ? Zid<TableNameFromType<NotUndefined<Type>>> : V extends VString<infer T> ? BrandIfBranded<T, z$1.ZodString> : V extends VFloat64<infer T> ? BrandIfBranded<T, z$1.ZodNumber> : V extends VInt64<any> ? z$1.ZodBigInt : V extends VBoolean<any> ? z$1.ZodBoolean : V extends VNull<any> ? z$1.ZodNull : V extends VArray<any, infer Element> ? Element extends VArray<any, any> ? z$1.ZodArray<zCore.SomeType> : z$1.ZodArray<ZodFromValidatorBase<Element>> : V extends VObject<any, infer Fields extends Record<string, GenericValidator>> ? z$1.ZodObject<ZodShapeFromConvexObject<Fields>, zCore.$strict> : V extends VBytes<any, any> ? never : V extends VLiteral<infer T extends zCore.util.Literal, OptionalProperty> ? z$1.ZodLiteral<NotUndefined<T>> : V extends VRecord<any, infer Key, infer Value, OptionalProperty, any> ? z$1.ZodRecord<ZodFromStringValidator<Key>, ZodFromValidatorBase<Value>> : V extends VUnion<any, [], OptionalProperty, any> ? z$1.ZodNever : V extends VUnion<any, [infer I extends GenericValidator], OptionalProperty, any> ? ZodValidatorFromConvex<I> : V extends VUnion<any, [infer A extends GenericValidator, ...infer Rest extends GenericValidator[]], OptionalProperty, any> ? z$1.ZodUnion<readonly [ZodValidatorFromConvex<A>, ...{ [K in keyof Rest]: ZodValidatorFromConvex<Rest[K]> }]> : V extends VAny<any, OptionalProperty, any> ? z$1.ZodAny : never;
571
+ type ZodFromValidatorBase<V extends GenericValidator> = V extends VId<infer Type> ? Zid<TableNameFromType<NotUndefined<Type>>> : V extends VString<infer T> ? BrandIfBranded<T, z$1.ZodString> : V extends VFloat64<infer T> ? BrandIfBranded<T, z$1.ZodNumber> : V extends VInt64<any> ? z$1.ZodBigInt : V extends {
572
+ readonly kind: 'commitTs';
573
+ readonly type: infer Type;
574
+ } ? z$1.ZodType<NotUndefined<Type>> : V extends VBoolean<any> ? z$1.ZodBoolean : V extends VNull<any> ? z$1.ZodNull : V extends VArray<any, infer Element> ? Element extends VArray<any, any> ? z$1.ZodArray<zCore.SomeType> : z$1.ZodArray<ZodFromValidatorBase<Element>> : V extends VObject<any, infer Fields extends Record<string, GenericValidator>> ? z$1.ZodObject<ZodShapeFromConvexObject<Fields>, zCore.$strict> : V extends VBytes<any, any> ? never : V extends VLiteral<infer T extends zCore.util.Literal, OptionalProperty> ? z$1.ZodLiteral<NotUndefined<T>> : V extends VRecord<any, infer Key, infer Value, OptionalProperty, any> ? z$1.ZodRecord<ZodFromStringValidator<Key>, ZodFromValidatorBase<Value>> : V extends VUnion<any, [], OptionalProperty, any> ? z$1.ZodNever : V extends VUnion<any, [infer I extends GenericValidator], OptionalProperty, any> ? ZodValidatorFromConvex<I> : V extends VUnion<any, [infer A extends GenericValidator, ...infer Rest extends GenericValidator[]], OptionalProperty, any> ? z$1.ZodUnion<readonly [ZodValidatorFromConvex<A>, ...{ [K in keyof Rest]: ZodValidatorFromConvex<Rest[K]> }]> : V extends VAny<any, OptionalProperty, any> ? z$1.ZodAny : never;
572
575
  type BrandIfBranded<InnerType, Validator extends zCore.SomeType> = InnerType extends zCore.$brand<infer Brand> ? zCore.$ZodBranded<Validator, Brand> : Validator;
573
576
  type StringValidator = Validator<string, 'required', any>;
574
577
  type ZodFromStringValidator<V extends StringValidator> = V extends VId<GenericId<infer TableName extends string>> ? Zid<TableName> : V extends VString<infer T, any> ? BrandIfBranded<T, z$1.ZodString> : V extends VLiteral<infer Literal extends string> ? z$1.ZodLiteral<Literal> : V extends VUnion<any, [], any, any> ? z$1.ZodNever : V extends VUnion<any, [infer I extends GenericValidator], any, any> ? ZodFromStringValidator<I> : V extends VUnion<any, [infer A extends GenericValidator, ...infer Rest extends GenericValidator[]], any, any> ? z$1.ZodUnion<readonly [ZodFromStringValidator<A>, ...{ [K in keyof Rest]: ZodFromStringValidator<Rest[K]> }]> : never;
@@ -1,6 +1,6 @@
1
1
  import { u as requireMutationCtx } from "../api-entry-CkDpGYVg.js";
2
- import { _ as CRPCError } from "../builder-1Vx-tEnS.js";
3
- import { t as definePlugin } from "../middleware-cJDRHTRY.js";
2
+ import { _ as CRPCError } from "../builder-C6JSHkRK.js";
3
+ import { t as definePlugin } from "../middleware-CdqNVyp8.js";
4
4
  import { v } from "convex/values";
5
5
  import { mutationGeneric, queryGeneric } from "convex/server";
6
6
 
@@ -1,8 +1,11 @@
1
- import { A as integer, C as index, M as custom, O as text, t as convexTable } from "./table-rmJm5Qio.js";
2
- import { t as id } from "./id-Bibg34Yb.js";
1
+ import { A as integer, C as index, M as custom, O as text, t as convexTable } from "./table-CX2lnX7e.js";
2
+ import { t as id } from "./id-CuSfWa5q.js";
3
3
  import { ConvexError, convexToJson, jsonToConvex, v } from "convex/values";
4
4
 
5
5
  //#region src/aggregate-core/compare.ts
6
+ function isCommitTsPlaceholder(value) {
7
+ return Object.getPrototypeOf(value)?.constructor?.name === "CommitTsPlaceholder";
8
+ }
6
9
  function compareValues$1(k1, k2) {
7
10
  return compareAsTuples(makeComparable(k1), makeComparable(k2));
8
11
  }
@@ -35,7 +38,10 @@ function makeComparable(v) {
35
38
  if (typeof v === "string") return [5, v];
36
39
  if (v instanceof ArrayBuffer) return [6, Array.from(new Uint8Array(v)).map(makeComparable)];
37
40
  if (Array.isArray(v)) return [7, v.map(makeComparable)];
38
- return [8, Object.keys(v).sort().map((k) => [k, v[k]]).map(makeComparable)];
41
+ if (isCommitTsPlaceholder(v)) throw new Error("Commit timestamp placeholders cannot be compared before commit.");
42
+ const keys = Object.keys(v).sort();
43
+ const record = v;
44
+ return [8, keys.map((k) => [k, record[k]]).map(makeComparable)];
39
45
  }
40
46
 
41
47
  //#endregion
@@ -1,7 +1,7 @@
1
- import { A as integer, C as index, N as json, O as text, P as objectOf, _ as TableDeleteConfig, a as Columns, j as arrayOf, s as OrmContext, t as convexTable, v as TableName, y as TablePolymorphic } from "./table-rmJm5Qio.js";
2
- import { t as id } from "./id-Bibg34Yb.js";
1
+ import { A as integer, C as index, N as json, O as text, P as objectOf, _ as TableDeleteConfig, a as Columns, j as arrayOf, s as OrmContext, t as convexTable, v as TableName, y as TablePolymorphic } from "./table-CX2lnX7e.js";
2
+ import { t as id } from "./id-CuSfWa5q.js";
3
3
  import { C as matchLikePattern, _ as isFieldReference, d as filterValueInList, f as filterValuesEqual, u as fieldRef } from "./filter-expression-Dydt8wS0.js";
4
- import { t as defineSchemaExtension } from "./extensions-DzjCJXYl.js";
4
+ import { t as defineSchemaExtension } from "./extensions-Blzsyekm.js";
5
5
 
6
6
  //#region src/orm/timestamp-mode.ts
7
7
  const PUBLIC_CREATED_AT_FIELD = "createdAt";
@@ -1,4 +1,4 @@
1
- import { $ as ActionProcedureBuilder, A as CRPCError, B as RuntimeEnv, C as createProcedureHandlerFactory, Ct as zCustomQuery, D as WithHttpRouter, Dt as zodToConvex, E as typedProcedureResolver, Et as zodOutputToConvexFields, F as getCRPCErrorFromUnknown, G as createLazyCaller, H as ConvexContext, I as getHTTPStatusCodeFromError, J as ServerCaller, K as CallerMeta, L as isCRPCError, M as CRPCErrorData, N as CRPC_ERROR_CODES_BY_KEY, O as inferApiInputs, Ot as zodToConvexFields, P as CRPC_ERROR_CODE_TO_HTTP, Q as getGeneratedValue, R as toCRPCError, S as createProcedureCallerFactory, St as zCustomMutation, T as getGeneratedFunctionReference, Tt as zodOutputToConvex, U as createCallerFactory, V as createEnv, W as LazyCaller, X as createApiLeaf, Y as createServerCaller, Z as createGeneratedFunctionReference, _ as ProcedureSchedulableCallerFromRegistry, _t as ZodValidatorFromConvex, a as CreateProcedureCallerFactoryOptions, at as initCRPC, b as createGenericCallerFactory, bt as withSystemFields, c as GeneratedRegistryCallerFactory, ct as extractPathParams, d as GeneratedRegistryHandlerForContext, dt as ConvexValidatorFromZod, et as CRPCFunctionTypeHint, f as ProcedureActionCallerFromRegistry, ft as ConvexValidatorFromZodOutput, g as ProcedureFromFunctionReference, gt as ZodFromValidatorBase, h as ProcedureDefinition, ht as Zid, i as registerProcedureNameLookup, it as createMiddlewareFactory, j as CRPCErrorCode, k as inferApiOutputs, l as GeneratedRegistryCallerForContext, lt as handleHttpError, m as ProcedureCallerFromRegistry, mt as ZCustomCtx, n as ProcedureNameLookup, nt as ProcedureBuilder, o as GeneratedProcedureRegistry, ot as HttpProcedureBuilder, p as ProcedureCaller, pt as CustomBuilder, q as CallerOpts, r as inferProcedureNameFromCallsite, rt as QueryProcedureBuilder, s as GeneratedProcedureRegistryEntry, st as createHttpProcedureBuilder, t as ProcedureNameEntry, tt as MutationProcedureBuilder, u as GeneratedRegistryHandlerFactory, ut as matchPathParams, v as ProcedureScheduleCallerFromRegistry, vt as convexToZod, w as defineProcedure, wt as zid, x as createGenericHandlerFactory, xt as zCustomAction, y as createGeneratedRegistryRuntime, yt as convexToZodFields, z as CreateEnvOptions } from "../procedure-name-B09-cf1-.js";
1
+ import { $ as ActionProcedureBuilder, A as CRPCError, B as RuntimeEnv, C as createProcedureHandlerFactory, Ct as zCustomQuery, D as WithHttpRouter, Dt as zodToConvex, E as typedProcedureResolver, Et as zodOutputToConvexFields, F as getCRPCErrorFromUnknown, G as createLazyCaller, H as ConvexContext, I as getHTTPStatusCodeFromError, J as ServerCaller, K as CallerMeta, L as isCRPCError, M as CRPCErrorData, N as CRPC_ERROR_CODES_BY_KEY, O as inferApiInputs, Ot as zodToConvexFields, P as CRPC_ERROR_CODE_TO_HTTP, Q as getGeneratedValue, R as toCRPCError, S as createProcedureCallerFactory, St as zCustomMutation, T as getGeneratedFunctionReference, Tt as zodOutputToConvex, U as createCallerFactory, V as createEnv, W as LazyCaller, X as createApiLeaf, Y as createServerCaller, Z as createGeneratedFunctionReference, _ as ProcedureSchedulableCallerFromRegistry, _t as ZodValidatorFromConvex, a as CreateProcedureCallerFactoryOptions, at as initCRPC, b as createGenericCallerFactory, bt as withSystemFields, c as GeneratedRegistryCallerFactory, ct as extractPathParams, d as GeneratedRegistryHandlerForContext, dt as ConvexValidatorFromZod, et as CRPCFunctionTypeHint, f as ProcedureActionCallerFromRegistry, ft as ConvexValidatorFromZodOutput, g as ProcedureFromFunctionReference, gt as ZodFromValidatorBase, h as ProcedureDefinition, ht as Zid, i as registerProcedureNameLookup, it as createMiddlewareFactory, j as CRPCErrorCode, k as inferApiOutputs, l as GeneratedRegistryCallerForContext, lt as handleHttpError, m as ProcedureCallerFromRegistry, mt as ZCustomCtx, n as ProcedureNameLookup, nt as ProcedureBuilder, o as GeneratedProcedureRegistry, ot as HttpProcedureBuilder, p as ProcedureCaller, pt as CustomBuilder, q as CallerOpts, r as inferProcedureNameFromCallsite, rt as QueryProcedureBuilder, s as GeneratedProcedureRegistryEntry, st as createHttpProcedureBuilder, t as ProcedureNameEntry, tt as MutationProcedureBuilder, u as GeneratedRegistryHandlerFactory, ut as matchPathParams, v as ProcedureScheduleCallerFromRegistry, vt as convexToZod, w as defineProcedure, wt as zid, x as createGenericHandlerFactory, xt as zCustomAction, y as createGeneratedRegistryRuntime, yt as convexToZodFields, z as CreateEnvOptions } from "../procedure-name-Bjw1JDIS.js";
2
2
  import { A as HttpProcedureBuilderDef, C as extractRouteMap, D as HttpHandlerOpts, E as HttpActionHandler, M as InferHttpInput, N as ProcedureMeta, O as HttpMethod, S as createHttpRouterFactory, T as HttpActionConstructor, _ as CRPCHttpRouter, b as HttpRouterWithHono, j as HttpRouteDefinition, k as HttpProcedure, v as HttpRouterDef, w as CRPCHonoHandler, x as createHttpRouter, y as HttpRouterRecord } from "../http-types-90mapMP9.js";
3
3
  import { a as MergeZodObjects, c as MiddlewareMarker, d as MiddlewareProcedureType, f as MiddlewareResult, g as UnsetMarker, h as Simplify, i as IntersectIfDefined, l as MiddlewareNext, m as ResolveIfSet, n as AnyMiddlewareBuilder, o as MiddlewareBuilder, p as Overwrite, r as GetRawInputFn, s as MiddlewareFunction, t as AnyMiddleware, u as MiddlewareProcedureInfo } from "../types-eNzQmbqM.js";
4
4
  import { a as isMutationCtx, c as isSchedulerCtx, d as requireQueryCtx, f as requireRunMutationCtx, i as isActionCtx, l as requireActionCtx, n as RunMutationCtx, o as isQueryCtx, p as requireSchedulerCtx, r as SchedulerCtx, s as isRunMutationCtx, t as GenericCtx, u as requireMutationCtx } from "../context-utils-DwZ3Cam1.js";
@@ -1,6 +1,6 @@
1
1
  import { a as isMutationCtx, c as isSchedulerCtx, d as requireQueryCtx, f as requireRunMutationCtx, i as isActionCtx, l as requireActionCtx, n as createGeneratedFunctionReference, o as isQueryCtx, p as requireSchedulerCtx, r as getGeneratedValue, s as isRunMutationCtx, t as createApiLeaf, u as requireMutationCtx } from "../api-entry-CkDpGYVg.js";
2
2
  import { n as createLazyCaller, r as createServerCaller, t as createCallerFactory } from "../caller-factory-Dd3H7j3V.js";
3
- import { A as zid, C as toCRPCError, D as zCustomAction, E as withSystemFields, M as zodOutputToConvexFields, N as zodToConvex, O as zCustomMutation, P as zodToConvexFields, S as isCRPCError, T as convexToZodFields, _ as CRPCError, a as createMiddlewareFactory, b as getCRPCErrorFromUnknown, c as registerProcedureNameLookup, d as createHttpRouterFactory, f as extractRouteMap, g as matchPathParams, h as handleHttpError, i as QueryProcedureBuilder, j as zodOutputToConvex, k as zCustomQuery, l as HttpRouterWithHono, m as extractPathParams, n as MutationProcedureBuilder, o as initCRPC, p as createHttpProcedureBuilder, r as ProcedureBuilder, s as inferProcedureNameFromCallsite, t as ActionProcedureBuilder, u as createHttpRouter, v as CRPC_ERROR_CODES_BY_KEY, w as convexToZod, x as getHTTPStatusCodeFromError, y as CRPC_ERROR_CODE_TO_HTTP } from "../builder-1Vx-tEnS.js";
4
- import { a as createProcedureHandlerFactory, c as typedProcedureResolver, i as createProcedureCallerFactory, l as createEnv, n as createGenericCallerFactory, o as defineProcedure, r as createGenericHandlerFactory, s as getGeneratedFunctionReference, t as createGeneratedRegistryRuntime } from "../procedure-caller-DIzXfX2E.js";
3
+ import { A as zid, C as toCRPCError, D as zCustomAction, E as withSystemFields, M as zodOutputToConvexFields, N as zodToConvex, O as zCustomMutation, P as zodToConvexFields, S as isCRPCError, T as convexToZodFields, _ as CRPCError, a as createMiddlewareFactory, b as getCRPCErrorFromUnknown, c as registerProcedureNameLookup, d as createHttpRouterFactory, f as extractRouteMap, g as matchPathParams, h as handleHttpError, i as QueryProcedureBuilder, j as zodOutputToConvex, k as zCustomQuery, l as HttpRouterWithHono, m as extractPathParams, n as MutationProcedureBuilder, o as initCRPC, p as createHttpProcedureBuilder, r as ProcedureBuilder, s as inferProcedureNameFromCallsite, t as ActionProcedureBuilder, u as createHttpRouter, v as CRPC_ERROR_CODES_BY_KEY, w as convexToZod, x as getHTTPStatusCodeFromError, y as CRPC_ERROR_CODE_TO_HTTP } from "../builder-C6JSHkRK.js";
4
+ import { a as createProcedureHandlerFactory, c as typedProcedureResolver, i as createProcedureCallerFactory, l as createEnv, n as createGenericCallerFactory, o as defineProcedure, r as createGenericHandlerFactory, s as getGeneratedFunctionReference, t as createGeneratedRegistryRuntime } from "../procedure-caller-CgLWu5F9.js";
5
5
 
6
6
  export { ActionProcedureBuilder, CRPCError, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, HttpRouterWithHono, MutationProcedureBuilder, ProcedureBuilder, QueryProcedureBuilder, convexToZod, convexToZodFields, createApiLeaf, createCallerFactory, createEnv, createGeneratedFunctionReference, createGeneratedRegistryRuntime, createGenericCallerFactory, createGenericHandlerFactory, createHttpProcedureBuilder, createHttpRouter, createHttpRouterFactory, createLazyCaller, createMiddlewareFactory, createProcedureCallerFactory, createProcedureHandlerFactory, createServerCaller, defineProcedure, extractPathParams, extractRouteMap, getCRPCErrorFromUnknown, getGeneratedFunctionReference, getGeneratedValue, getHTTPStatusCodeFromError, handleHttpError, inferProcedureNameFromCallsite, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, isSchedulerCtx, matchPathParams, registerProcedureNameLookup, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, requireSchedulerCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
@@ -1,4 +1,4 @@
1
- import { o as vRequired } from "./validators-Dmbhsd3U.js";
1
+ import { o as vRequired } from "./validators-CIoUYCqO.js";
2
2
  import { v } from "convex/values";
3
3
 
4
4
  //#region src/orm/builders/column-builder.ts
@@ -180,6 +180,7 @@ function vRequired(validator) {
180
180
  case "string": return v.string();
181
181
  case "float64": return v.float64();
182
182
  case "int64": return v.int64();
183
+ case "commitTs": return v.commitTs();
183
184
  case "boolean": return v.boolean();
184
185
  case "null": return v.null();
185
186
  case "any": return v.any();
@@ -83,6 +83,12 @@ type NotUndefined<T> = Exclude<T, undefined>;
83
83
  * type RequiredString = VRequired<OptionalString>; // VString<string, "required">
84
84
  * ```
85
85
  */
86
- type VRequired<T extends Validator<any, OptionalProperty, any>> = T extends VId<infer Type, OptionalProperty> ? VId<NotUndefined<Type>, 'required'> : T extends VString<infer Type, OptionalProperty> ? VString<NotUndefined<Type>, 'required'> : T extends VFloat64<infer Type, OptionalProperty> ? VFloat64<NotUndefined<Type>, 'required'> : T extends VInt64<infer Type, OptionalProperty> ? VInt64<NotUndefined<Type>, 'required'> : T extends VBoolean<infer Type, OptionalProperty> ? VBoolean<NotUndefined<Type>, 'required'> : T extends VNull<infer Type, OptionalProperty> ? VNull<NotUndefined<Type>, 'required'> : T extends VAny<infer Type, OptionalProperty> ? VAny<NotUndefined<Type>, 'required'> : T extends VLiteral<infer Type, OptionalProperty> ? VLiteral<NotUndefined<Type>, 'required'> : T extends VBytes<infer Type, OptionalProperty> ? VBytes<NotUndefined<Type>, 'required'> : T extends VObject<infer Type, infer Fields, OptionalProperty, infer FieldPaths> ? VObject<NotUndefined<Type>, Fields, 'required', FieldPaths> : T extends VArray<infer Type, infer Element, OptionalProperty> ? VArray<NotUndefined<Type>, Element, 'required'> : T extends VRecord<infer Type, infer Key, infer Value, OptionalProperty, infer FieldPaths> ? VRecord<NotUndefined<Type>, Key, Value, 'required', FieldPaths> : T extends VUnion<infer Type, infer Members, OptionalProperty, infer FieldPaths> ? VUnion<NotUndefined<Type>, Members, 'required', FieldPaths> : never;
86
+ type VRequired<T extends Validator<any, OptionalProperty, any>> = T extends VId<infer Type, OptionalProperty> ? VId<NotUndefined<Type>, 'required'> : T extends VString<infer Type, OptionalProperty> ? VString<NotUndefined<Type>, 'required'> : T extends VFloat64<infer Type, OptionalProperty> ? VFloat64<NotUndefined<Type>, 'required'> : T extends VInt64<infer Type, OptionalProperty> ? VInt64<NotUndefined<Type>, 'required'> : T extends {
87
+ readonly kind: 'commitTs';
88
+ readonly type: infer Type;
89
+ } ? Omit<T, 'isOptional' | 'type'> & {
90
+ readonly isOptional: 'required';
91
+ readonly type: NotUndefined<Type>;
92
+ } : T extends VBoolean<infer Type, OptionalProperty> ? VBoolean<NotUndefined<Type>, 'required'> : T extends VNull<infer Type, OptionalProperty> ? VNull<NotUndefined<Type>, 'required'> : T extends VAny<infer Type, OptionalProperty> ? VAny<NotUndefined<Type>, 'required'> : T extends VLiteral<infer Type, OptionalProperty> ? VLiteral<NotUndefined<Type>, 'required'> : T extends VBytes<infer Type, OptionalProperty> ? VBytes<NotUndefined<Type>, 'required'> : T extends VObject<infer Type, infer Fields, OptionalProperty, infer FieldPaths> ? VObject<NotUndefined<Type>, Fields, 'required', FieldPaths> : T extends VArray<infer Type, infer Element, OptionalProperty> ? VArray<NotUndefined<Type>, Element, 'required'> : T extends VRecord<infer Type, infer Key, infer Value, OptionalProperty, infer FieldPaths> ? VRecord<NotUndefined<Type>, Key, Value, 'required', FieldPaths> : T extends VUnion<infer Type, infer Members, OptionalProperty, infer FieldPaths> ? VUnion<NotUndefined<Type>, Members, 'required', FieldPaths> : never;
87
93
  //#endregion
88
94
  export { pretendRequired as i, deprecated as n, pretend as r, VRequired as t };
package/dist/watcher.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as generateMeta, d as PARSE_SNAPSHOT_SUFFIX, i as resolveConfiguredBackend, n as withLocalCodegenEnv, o as getConvexConfig, r as loadCliConfig, u as logger } from "./local-env-Du24tdbp.mjs";
2
+ import { a as generateMeta, d as PARSE_SNAPSHOT_SUFFIX, i as resolveConfiguredBackend, n as withLocalCodegenEnv, o as getConvexConfig, r as loadCliConfig, u as logger } from "./local-env-Dkh4a_BK.mjs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
@@ -1,4 +1,4 @@
1
- import { Bn as ConvexTextBuilderInitial, Dr as SystemFieldAliases, F as DeleteMode, Gn as OrmRuntimeDefaults, H as EdgeMetadata, Hn as ConvexColumnBuilder, Hr as entityKind, Ht as RelationsConfigWithSchema, I as SerializedFilterExpression, Jn as OrmSchemaExtensionTriggers, Kn as OrmSchemaExtensionRelations, L as getChecks, M as OrmReader, Mr as ColumnBuilderBaseConfig, N as OrmWriter, Nt as AnyRelationsBuilderConfig, Or as SystemFields, P as CascadeMode, Pt as ExtractTablesFromSchema, Qt as OrmLifecycleChange, R as getForeignKeys, Rr as HasDefault, Rt as RelationsBuilder, St as OrderByClause, Ut as TableRelationalConfig, Vr as NotNull, Vt as RelationsBuilderConfigValue, Wn as Columns, Wt as TablesRelationalConfig, Xn as OrmSchemaRelations, Xt as ConvexTableWithColumns, Yt as ConvexTable, Zn as OrmSchemaTriggers, b as MigrationSet, ft as InferSelectModel, in as RlsPolicy, jr as ColumnBuilder, jt as VectorSearchProvider, k as CreateDatabaseOptions, kr as $Type, nr as FilterExpression$1, r as OrmCapability, ut as InferInsertModel, z as getUniqueIndexes } from "./capabilities-Bem7xvGK.js";
1
+ import { Bn as ConvexTextBuilderInitial, Dr as SystemFieldAliases, F as DeleteMode, Gn as OrmRuntimeDefaults, H as EdgeMetadata, Hn as ConvexColumnBuilder, Hr as entityKind, Ht as RelationsConfigWithSchema, I as SerializedFilterExpression, Jn as OrmSchemaExtensionTriggers, Kn as OrmSchemaExtensionRelations, L as getChecks, M as OrmReader, Mr as ColumnBuilderBaseConfig, N as OrmWriter, Nt as AnyRelationsBuilderConfig, Or as SystemFields, P as CascadeMode, Pt as ExtractTablesFromSchema, Qt as OrmLifecycleChange, R as getForeignKeys, Rr as HasDefault, Rt as RelationsBuilder, St as OrderByClause, Ut as TableRelationalConfig, Vt as RelationsBuilderConfigValue, Wn as Columns, Wt as TablesRelationalConfig, Xn as OrmSchemaRelations, Xt as ConvexTableWithColumns, Yt as ConvexTable, Zn as OrmSchemaTriggers, b as MigrationSet, ft as InferSelectModel, in as RlsPolicy, jr as ColumnBuilder, jt as VectorSearchProvider, k as CreateDatabaseOptions, kr as $Type, nr as FilterExpression$1, r as OrmCapability, ut as InferInsertModel, z as getUniqueIndexes } from "./capabilities-Bem7xvGK.js";
2
2
  import * as convex_values0 from "convex/values";
3
3
  import { GenericId, Validator, Value } from "convex/values";
4
4
  import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchedulableFunctionReference, Scheduler, SchemaDefinition, internalActionGeneric, internalMutationGeneric } from "convex/server";
@@ -626,12 +626,18 @@ declare function bytes(): ConvexBytesBuilderInitial<''>;
626
626
  declare function bytes<TName extends string>(name: TName): ConvexBytesBuilderInitial<TName>;
627
627
  //#endregion
628
628
  //#region src/orm/builders/custom.d.ts
629
- type AnyValidator = Validator<any, any, any>;
629
+ interface ConvexValidatorLike {
630
+ readonly fieldPaths: string;
631
+ readonly isConvexValidator: true;
632
+ readonly isOptional: 'optional' | 'required';
633
+ readonly kind: string;
634
+ readonly type: unknown;
635
+ }
630
636
  type AnyColumnBuilder = ColumnBuilder<any, any, any>;
631
637
  interface NestedShapeInput {
632
638
  [key: string]: NestedInput;
633
639
  }
634
- type NestedInput = AnyValidator | AnyColumnBuilder | NestedShapeInput;
640
+ type NestedInput = ConvexValidatorLike | AnyColumnBuilder | NestedShapeInput;
635
641
  type InferBuilderNestedValue<TBuilder extends AnyColumnBuilder> = TBuilder['_'] extends {
636
642
  $type: infer TType;
637
643
  } ? TType : TBuilder['_'] extends {
@@ -639,11 +645,11 @@ type InferBuilderNestedValue<TBuilder extends AnyColumnBuilder> = TBuilder['_']
639
645
  } ? TBuilder['_'] extends {
640
646
  notNull: true;
641
647
  } ? TData : TData | null : never;
642
- type InferValidatorNestedValue<TValidator extends AnyValidator> = Exclude<TValidator['type'], undefined>;
643
- type InferNestedValue<TInput extends NestedInput> = TInput extends AnyColumnBuilder ? InferBuilderNestedValue<TInput> : TInput extends AnyValidator ? InferValidatorNestedValue<TInput> : TInput extends NestedShapeInput ? InferObjectShape<TInput> : never;
648
+ type InferValidatorNestedValue<TValidator extends ConvexValidatorLike> = Exclude<TValidator['type'], undefined>;
649
+ type InferNestedValue<TInput extends NestedInput> = TInput extends AnyColumnBuilder ? InferBuilderNestedValue<TInput> : TInput extends ConvexValidatorLike ? InferValidatorNestedValue<TInput> : TInput extends NestedShapeInput ? InferObjectShape<TInput> : never;
644
650
  type InferObjectShape<TShape extends NestedShapeInput> = { [K in keyof TShape]: InferNestedValue<TShape[K]> };
645
- type InferObjectValue<TInput extends NestedInput> = TInput extends AnyColumnBuilder | AnyValidator ? Record<string, InferNestedValue<TInput>> : TInput extends NestedShapeInput ? InferObjectShape<TInput> : never;
646
- type ConvexCustomBuilderInitial<TName extends string, TValidator extends AnyValidator> = ConvexCustomBuilder<{
651
+ type InferObjectValue<TInput extends NestedInput> = TInput extends AnyColumnBuilder | ConvexValidatorLike ? Record<string, InferNestedValue<TInput>> : TInput extends NestedShapeInput ? InferObjectShape<TInput> : never;
652
+ type ConvexCustomBuilderInitial<TName extends string, TValidator extends ConvexValidatorLike> = ConvexCustomBuilder<{
647
653
  name: TName;
648
654
  dataType: 'any';
649
655
  columnType: 'ConvexCustom';
@@ -651,7 +657,7 @@ type ConvexCustomBuilderInitial<TName extends string, TValidator extends AnyVali
651
657
  driverParam: TValidator['type'];
652
658
  enumValues: undefined;
653
659
  }, TValidator>;
654
- declare class ConvexCustomBuilder<T extends ColumnBuilderBaseConfig<'any', 'ConvexCustom'>, TValidator extends AnyValidator> extends ConvexColumnBuilder<T, {
660
+ declare class ConvexCustomBuilder<T extends ColumnBuilderBaseConfig<'any', 'ConvexCustom'>, TValidator extends ConvexValidatorLike> extends ConvexColumnBuilder<T, {
655
661
  validator: TValidator;
656
662
  }> {
657
663
  static readonly [entityKind]: string;
@@ -659,18 +665,18 @@ declare class ConvexCustomBuilder<T extends ColumnBuilderBaseConfig<'any', 'Conv
659
665
  get convexValidator(): Validator<any, any, any>;
660
666
  build(): Validator<any, any, any>;
661
667
  }
662
- declare function custom<TValidator extends AnyValidator>(validator: TValidator): ConvexCustomBuilderInitial<'', TValidator>;
663
- declare function custom<TName extends string, TValidator extends AnyValidator>(name: TName, validator: TValidator): ConvexCustomBuilderInitial<TName, TValidator>;
668
+ declare function custom<TValidator extends ConvexValidatorLike>(validator: TValidator): ConvexCustomBuilderInitial<'', TValidator>;
669
+ declare function custom<TName extends string, TValidator extends ConvexValidatorLike>(name: TName, validator: TValidator): ConvexCustomBuilderInitial<TName, TValidator>;
664
670
  /**
665
671
  * Creates an array column from a nested validator or builder.
666
672
  *
667
673
  * Values in nested arrays are always compiled as required validators.
668
674
  */
669
- declare function arrayOf<TElement extends NestedInput>(element: TElement): $Type<ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], AnyValidator, "required">>, InferNestedValue<TElement>[]>;
675
+ declare function arrayOf<TElement extends NestedInput>(element: TElement): $Type<ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], Validator<any, "required", any>, "required">>, InferNestedValue<TElement>[]>;
670
676
  /**
671
677
  * Creates a union column from validators/builders without dropping to `v.union(...)`.
672
678
  */
673
- declare function unionOf<const TMembers extends readonly [NestedInput, NestedInput, ...NestedInput[]]>(...members: TMembers): $Type<ConvexCustomBuilderInitial<"", convex_values0.VUnion<any, [AnyValidator, AnyValidator, ...AnyValidator[]], "required", any>>, InferNestedValue<TMembers[number]>>;
679
+ declare function unionOf<const TMembers extends readonly [NestedInput, NestedInput, ...NestedInput[]]>(...members: TMembers): $Type<ConvexCustomBuilderInitial<"", convex_values0.VUnion<any, [Validator<any, "required", any>, Validator<any, "required", any>, ...Validator<any, "required", any>[]], "required", any>>, InferNestedValue<TMembers[number]>>;
674
680
  /**
675
681
  * Creates an object column from either:
676
682
  * - a nested shape of validators/builders, or
@@ -678,7 +684,7 @@ declare function unionOf<const TMembers extends readonly [NestedInput, NestedInp
678
684
  *
679
685
  * Fields in nested objects are always compiled as required validators.
680
686
  */
681
- declare function objectOf<TInput extends NestedInput>(input: TInput): $Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, AnyValidator, "required", string>>, InferObjectValue<TInput>> | $Type<ConvexCustomBuilderInitial<"", AnyValidator>, InferObjectValue<TInput>>;
687
+ declare function objectOf<TInput extends NestedInput>(input: TInput): $Type<ConvexCustomBuilderInitial<"", ConvexValidatorLike>, InferObjectValue<TInput>>;
682
688
  /**
683
689
  * Convenience wrapper for Convex "JSON" values.
684
690
  *
@@ -1015,6 +1021,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1015
1021
  fieldName: "updatedAt";
1016
1022
  };
1017
1023
  };
1024
+ count: ConvexNumberBuilderInitial<""> & {
1025
+ _: {
1026
+ notNull: true;
1027
+ };
1028
+ } & {
1029
+ _: {
1030
+ tableName: "aggregate_bucket";
1031
+ };
1032
+ } & {
1033
+ _: {
1034
+ fieldName: "count";
1035
+ };
1036
+ };
1018
1037
  tableKey: ConvexTextBuilderInitial<""> & {
1019
1038
  _: {
1020
1039
  notNull: true;
@@ -1054,7 +1073,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1054
1073
  fieldName: "keyHash";
1055
1074
  };
1056
1075
  };
1057
- keyParts: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required">> & {
1076
+ keyParts: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.Validator<any, "required", any>, "required">> & {
1058
1077
  _: {
1059
1078
  $type: convex_values0.Value[];
1060
1079
  };
@@ -1071,7 +1090,11 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1071
1090
  fieldName: "keyParts";
1072
1091
  };
1073
1092
  };
1074
- count: ConvexNumberBuilderInitial<""> & {
1093
+ sumValues: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
1094
+ _: {
1095
+ $type: Record<string, number>;
1096
+ };
1097
+ } & {
1075
1098
  _: {
1076
1099
  notNull: true;
1077
1100
  };
@@ -1081,19 +1104,18 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1081
1104
  };
1082
1105
  } & {
1083
1106
  _: {
1084
- fieldName: "count";
1107
+ fieldName: "sumValues";
1085
1108
  };
1086
1109
  };
1087
- sumValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
1110
+ nonNullCountValues: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
1088
1111
  _: {
1089
- tableName: "aggregate_bucket";
1112
+ $type: Record<string, number>;
1090
1113
  };
1091
1114
  } & {
1092
1115
  _: {
1093
- fieldName: "sumValues";
1116
+ notNull: true;
1094
1117
  };
1095
- };
1096
- nonNullCountValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
1118
+ } & {
1097
1119
  _: {
1098
1120
  tableName: "aggregate_bucket";
1099
1121
  };
@@ -1176,7 +1198,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1176
1198
  fieldName: "keyHash";
1177
1199
  };
1178
1200
  };
1179
- keyParts: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required">> & {
1201
+ keyParts: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.Validator<any, "required", any>, "required">> & {
1180
1202
  _: {
1181
1203
  $type: convex_values0.Value[];
1182
1204
  };
@@ -1193,7 +1215,15 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1193
1215
  fieldName: "keyParts";
1194
1216
  };
1195
1217
  };
1196
- sumValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
1218
+ sumValues: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
1219
+ _: {
1220
+ $type: Record<string, number>;
1221
+ };
1222
+ } & {
1223
+ _: {
1224
+ notNull: true;
1225
+ };
1226
+ } & {
1197
1227
  _: {
1198
1228
  tableName: "aggregate_member";
1199
1229
  };
@@ -1202,7 +1232,15 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1202
1232
  fieldName: "sumValues";
1203
1233
  };
1204
1234
  };
1205
- nonNullCountValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
1235
+ nonNullCountValues: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
1236
+ _: {
1237
+ $type: Record<string, number>;
1238
+ };
1239
+ } & {
1240
+ _: {
1241
+ notNull: true;
1242
+ };
1243
+ } & {
1206
1244
  _: {
1207
1245
  tableName: "aggregate_member";
1208
1246
  };
@@ -1224,7 +1262,15 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1224
1262
  fieldName: "docId";
1225
1263
  };
1226
1264
  };
1227
- extremaValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, convex_values0.Value>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, convex_values0.Value>>>) & {
1265
+ extremaValues: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
1266
+ _: {
1267
+ $type: Record<string, convex_values0.Value>;
1268
+ };
1269
+ } & {
1270
+ _: {
1271
+ notNull: true;
1272
+ };
1273
+ } & {
1228
1274
  _: {
1229
1275
  tableName: "aggregate_member";
1230
1276
  };
@@ -1307,7 +1353,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1307
1353
  fieldName: "updatedAt";
1308
1354
  };
1309
1355
  };
1310
- tableKey: ConvexTextBuilderInitial<""> & {
1356
+ count: ConvexNumberBuilderInitial<""> & {
1311
1357
  _: {
1312
1358
  notNull: true;
1313
1359
  };
@@ -1317,10 +1363,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1317
1363
  };
1318
1364
  } & {
1319
1365
  _: {
1320
- fieldName: "tableKey";
1366
+ fieldName: "count";
1321
1367
  };
1322
1368
  };
1323
- indexName: ConvexTextBuilderInitial<""> & {
1369
+ tableKey: ConvexTextBuilderInitial<""> & {
1324
1370
  _: {
1325
1371
  notNull: true;
1326
1372
  };
@@ -1330,10 +1376,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1330
1376
  };
1331
1377
  } & {
1332
1378
  _: {
1333
- fieldName: "indexName";
1379
+ fieldName: "tableKey";
1334
1380
  };
1335
1381
  };
1336
- keyHash: ConvexTextBuilderInitial<""> & {
1382
+ indexName: ConvexTextBuilderInitial<""> & {
1337
1383
  _: {
1338
1384
  notNull: true;
1339
1385
  };
@@ -1343,10 +1389,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1343
1389
  };
1344
1390
  } & {
1345
1391
  _: {
1346
- fieldName: "keyHash";
1392
+ fieldName: "indexName";
1347
1393
  };
1348
1394
  };
1349
- count: ConvexNumberBuilderInitial<""> & {
1395
+ keyHash: ConvexTextBuilderInitial<""> & {
1350
1396
  _: {
1351
1397
  notNull: true;
1352
1398
  };
@@ -1356,7 +1402,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1356
1402
  };
1357
1403
  } & {
1358
1404
  _: {
1359
- fieldName: "count";
1405
+ fieldName: "keyHash";
1360
1406
  };
1361
1407
  };
1362
1408
  fieldName: ConvexTextBuilderInitial<""> & {
@@ -1469,13 +1515,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1469
1515
  readonly aggregate_rank_node: ConvexTableWithColumns<{
1470
1516
  name: "aggregate_rank_node";
1471
1517
  columns: {
1472
- aggregate: ($Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, {
1473
- count: number;
1474
- sum: number;
1475
- }> | $Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, {
1476
- count: number;
1477
- sum: number;
1478
- }>) & {
1518
+ aggregate: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
1519
+ _: {
1520
+ $type: {
1521
+ count: number;
1522
+ sum: number;
1523
+ };
1524
+ };
1525
+ } & {
1479
1526
  _: {
1480
1527
  tableName: "aggregate_rank_node";
1481
1528
  };
@@ -1484,7 +1531,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1484
1531
  fieldName: "aggregate";
1485
1532
  };
1486
1533
  };
1487
- items: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required">> & {
1534
+ items: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.Validator<any, "required", any>, "required">> & {
1488
1535
  _: {
1489
1536
  $type: {
1490
1537
  k: convex_values0.Value;
@@ -1505,7 +1552,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1505
1552
  fieldName: "items";
1506
1553
  };
1507
1554
  };
1508
- subtrees: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required">> & {
1555
+ subtrees: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.Validator<any, "required", any>, "required">> & {
1509
1556
  _: {
1510
1557
  $type: string[];
1511
1558
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",
@@ -57,7 +57,8 @@
57
57
  "build:watch": "NODE_OPTIONS=\"--require ../../tooling/node-styletext-patch.cjs\" tsdown --watch",
58
58
  "prepublishOnly": "bun run build",
59
59
  "typecheck": "tsc --noEmit",
60
- "typecheck:types": "tsc --project ../../convex/test-types/tsconfig.json"
60
+ "typecheck:convex": "tsc --project tsconfig.type-tests.json && bun run typecheck:convex:minimum",
61
+ "typecheck:convex:minimum": "bun run build && tsc --project tsconfig.type-tests-minimum.json"
61
62
  },
62
63
  "dependencies": {
63
64
  "@babel/parser": "^7.28.4",
@@ -94,7 +95,7 @@
94
95
  "@tanstack/react-start": ">=1",
95
96
  "@tanstack/solid-query": ">=5",
96
97
  "better-auth": ">=1.6.11 <1.7.0",
97
- "convex": ">=1.42",
98
+ "convex": ">=1.42 <1.45.0",
98
99
  "hono": "4.12.9",
99
100
  "next": ">=14",
100
101
  "react": ">=18",