better-convex 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,4 @@
1
- import "../validators-BcQFm1oY.js";
2
- import { jt as ConvexCustomBuilderInitial, sn as ConvexTableWithColumns, vt as ConvexTextBuilderInitial, wt as ConvexIdBuilderInitial, xt as ConvexNumberBuilderInitial } from "../where-clause-compiler-m-GQNB_K.js";
3
- import "../query-context-ji7By8u0.js";
1
+ import { jt as ConvexCustomBuilderInitial, sn as ConvexTableWithColumns, vt as ConvexTextBuilderInitial, wt as ConvexIdBuilderInitial, xt as ConvexNumberBuilderInitial } from "../where-clause-compiler-_b1UHbYW.js";
4
2
  import "../orm/index.js";
5
3
  import * as convex_values0 from "convex/values";
6
4
  import { GenericId, Infer, Value } from "convex/values";
@@ -1,4 +1,4 @@
1
- import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-C0WcYGY0.js";
1
+ import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-oWZgeWOJ.js";
2
2
 
3
3
  //#region src/aggregate/index.ts
4
4
  const wrapTriggerFactory = (methodName, factory) => ((...args) => {
@@ -1,4 +1,3 @@
1
- import "../validators-BcQFm1oY.js";
2
1
  import { a as QueryCtxWithPreferredOrmQueryTable, n as LookupByIdResultByCtx, t as DocByCtx } from "../query-context-ji7By8u0.js";
3
2
  import { t as GetAuth } from "../types-CM67ko7K.js";
4
3
  import { A as GenericCtx } from "../procedure-caller-DYjpq7rG.js";
@@ -184,27 +183,27 @@ type AdapterPaginationOptions = PaginationOptions & {
184
183
  declare const adapterWhereValidator: convex_values0.VObject<{
185
184
  connector?: "AND" | "OR" | undefined;
186
185
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
187
- value: string | number | boolean | string[] | number[] | null;
188
186
  field: string;
187
+ value: string | number | boolean | string[] | number[] | null;
189
188
  }, {
190
189
  connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
191
190
  field: convex_values0.VString<string, "required">;
192
191
  operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
193
192
  value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
194
- }, "required", "value" | "connector" | "field" | "operator">;
193
+ }, "required", "connector" | "field" | "operator" | "value">;
195
194
  declare const adapterArgsValidator: convex_values0.VObject<{
196
195
  limit?: number | undefined;
197
196
  select?: string[] | undefined;
198
197
  offset?: number | undefined;
199
198
  sortBy?: {
200
- direction: "asc" | "desc";
201
199
  field: string;
200
+ direction: "asc" | "desc";
202
201
  } | undefined;
203
202
  where?: {
204
203
  connector?: "AND" | "OR" | undefined;
205
204
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
206
- value: string | number | boolean | string[] | number[] | null;
207
205
  field: string;
206
+ value: string | number | boolean | string[] | number[] | null;
208
207
  }[] | undefined;
209
208
  model: string;
210
209
  }, {
@@ -213,29 +212,29 @@ declare const adapterArgsValidator: convex_values0.VObject<{
213
212
  offset: convex_values0.VFloat64<number | undefined, "optional">;
214
213
  select: convex_values0.VArray<string[] | undefined, convex_values0.VString<string, "required">, "optional">;
215
214
  sortBy: convex_values0.VObject<{
216
- direction: "asc" | "desc";
217
215
  field: string;
216
+ direction: "asc" | "desc";
218
217
  } | undefined, {
219
218
  direction: convex_values0.VUnion<"asc" | "desc", [convex_values0.VLiteral<"asc", "required">, convex_values0.VLiteral<"desc", "required">], "required", never>;
220
219
  field: convex_values0.VString<string, "required">;
221
- }, "optional", "direction" | "field">;
220
+ }, "optional", "field" | "direction">;
222
221
  where: convex_values0.VArray<{
223
222
  connector?: "AND" | "OR" | undefined;
224
223
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
225
- value: string | number | boolean | string[] | number[] | null;
226
224
  field: string;
225
+ value: string | number | boolean | string[] | number[] | null;
227
226
  }[] | undefined, convex_values0.VObject<{
228
227
  connector?: "AND" | "OR" | undefined;
229
228
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
230
- value: string | number | boolean | string[] | number[] | null;
231
229
  field: string;
230
+ value: string | number | boolean | string[] | number[] | null;
232
231
  }, {
233
232
  connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
234
233
  field: convex_values0.VString<string, "required">;
235
234
  operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
236
235
  value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
237
- }, "required", "value" | "connector" | "field" | "operator">, "optional">;
238
- }, "required", "limit" | "model" | "select" | "offset" | "sortBy" | "where" | "sortBy.direction" | "sortBy.field">;
236
+ }, "required", "connector" | "field" | "operator" | "value">, "optional">;
237
+ }, "required", "limit" | "model" | "select" | "offset" | "sortBy" | "where" | "sortBy.field" | "sortBy.direction">;
239
238
  declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
240
239
  declare const checkUniqueFields: <Schema extends SchemaDefinition<any, any>>(ctx: GenericQueryCtx<GenericDataModel>, schema: Schema, betterAuthSchema: BetterAuthDBSchema, table: string, input: Record<string, any>, doc?: Record<string, any>) => Promise<void>;
241
240
  declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => Promise<D | null>;
@@ -372,8 +371,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
372
371
  where?: {
373
372
  connector?: "AND" | "OR" | undefined;
374
373
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
375
- value: string | number | boolean | string[] | number[] | null;
376
374
  field: string;
375
+ value: string | number | boolean | string[] | number[] | null;
377
376
  }[] | undefined;
378
377
  model: string;
379
378
  } | {
@@ -393,8 +392,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
393
392
  where?: {
394
393
  connector?: "AND" | "OR" | undefined;
395
394
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
396
- value: string | number | boolean | string[] | number[] | null;
397
395
  field: string;
396
+ value: string | number | boolean | string[] | number[] | null;
398
397
  }[] | undefined;
399
398
  model: string;
400
399
  } | {
@@ -403,18 +402,18 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
403
402
  };
404
403
  }, Promise<Record<string, unknown> | undefined>>;
405
404
  findMany: convex_server0.RegisteredQuery<"internal", {
406
- join?: any;
407
405
  limit?: number | undefined;
406
+ join?: any;
408
407
  offset?: number | undefined;
409
408
  sortBy?: {
410
- direction: "asc" | "desc";
411
409
  field: string;
410
+ direction: "asc" | "desc";
412
411
  } | undefined;
413
412
  where?: {
414
413
  connector?: "AND" | "OR" | undefined;
415
414
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
416
- value: string | number | boolean | string[] | number[] | null;
417
415
  field: string;
416
+ value: string | number | boolean | string[] | number[] | null;
418
417
  }[] | undefined;
419
418
  paginationOpts: {
420
419
  id?: number;
@@ -432,8 +431,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
432
431
  where?: {
433
432
  connector?: "AND" | "OR" | undefined;
434
433
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
435
- value: string | number | boolean | string[] | number[] | null;
436
434
  field: string;
435
+ value: string | number | boolean | string[] | number[] | null;
437
436
  }[] | undefined;
438
437
  model: string;
439
438
  }, Promise<convex_server0.GenericDocument | null>>;
@@ -450,8 +449,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
450
449
  where?: {
451
450
  connector?: "AND" | "OR" | undefined;
452
451
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
453
- value: string | number | boolean | string[] | number[] | null;
454
452
  field: string;
453
+ value: string | number | boolean | string[] | number[] | null;
455
454
  }[] | undefined;
456
455
  update: {
457
456
  [x: string]: unknown;
@@ -477,8 +476,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
477
476
  where?: {
478
477
  connector?: "AND" | "OR" | undefined;
479
478
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
480
- value: string | number | boolean | string[] | number[] | null;
481
479
  field: string;
480
+ value: string | number | boolean | string[] | number[] | null;
482
481
  }[] | undefined;
483
482
  update: {
484
483
  [x: string]: unknown;
@@ -19168,8 +19167,8 @@ declare const createAuthRuntime: <DataModel extends GenericDataModel, Schema ext
19168
19167
  where?: {
19169
19168
  connector?: "AND" | "OR" | undefined;
19170
19169
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
19171
- value: string | number | boolean | string[] | number[] | null;
19172
19170
  field: string;
19171
+ value: string | number | boolean | string[] | number[] | null;
19173
19172
  }[] | undefined;
19174
19173
  model: string;
19175
19174
  } | {
@@ -19189,8 +19188,8 @@ declare const createAuthRuntime: <DataModel extends GenericDataModel, Schema ext
19189
19188
  where?: {
19190
19189
  connector?: "AND" | "OR" | undefined;
19191
19190
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
19192
- value: string | number | boolean | string[] | number[] | null;
19193
19191
  field: string;
19192
+ value: string | number | boolean | string[] | number[] | null;
19194
19193
  }[] | undefined;
19195
19194
  model: string;
19196
19195
  } | {
@@ -19199,18 +19198,18 @@ declare const createAuthRuntime: <DataModel extends GenericDataModel, Schema ext
19199
19198
  };
19200
19199
  }, Promise<Record<string, unknown> | undefined>>;
19201
19200
  findMany: convex_server0.RegisteredQuery<"internal", {
19202
- join?: any;
19203
19201
  limit?: number | undefined;
19202
+ join?: any;
19204
19203
  offset?: number | undefined;
19205
19204
  sortBy?: {
19206
- direction: "asc" | "desc";
19207
19205
  field: string;
19206
+ direction: "asc" | "desc";
19208
19207
  } | undefined;
19209
19208
  where?: {
19210
19209
  connector?: "AND" | "OR" | undefined;
19211
19210
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
19212
- value: string | number | boolean | string[] | number[] | null;
19213
19211
  field: string;
19212
+ value: string | number | boolean | string[] | number[] | null;
19214
19213
  }[] | undefined;
19215
19214
  paginationOpts: {
19216
19215
  id?: number;
@@ -19228,8 +19227,8 @@ declare const createAuthRuntime: <DataModel extends GenericDataModel, Schema ext
19228
19227
  where?: {
19229
19228
  connector?: "AND" | "OR" | undefined;
19230
19229
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
19231
- value: string | number | boolean | string[] | number[] | null;
19232
19230
  field: string;
19231
+ value: string | number | boolean | string[] | number[] | null;
19233
19232
  }[] | undefined;
19234
19233
  model: string;
19235
19234
  }, Promise<convex_server0.GenericDocument | null>>;
@@ -19246,8 +19245,8 @@ declare const createAuthRuntime: <DataModel extends GenericDataModel, Schema ext
19246
19245
  where?: {
19247
19246
  connector?: "AND" | "OR" | undefined;
19248
19247
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
19249
- value: string | number | boolean | string[] | number[] | null;
19250
19248
  field: string;
19249
+ value: string | number | boolean | string[] | number[] | null;
19251
19250
  }[] | undefined;
19252
19251
  update: {
19253
19252
  [x: string]: unknown;
@@ -19273,8 +19272,8 @@ declare const createAuthRuntime: <DataModel extends GenericDataModel, Schema ext
19273
19272
  where?: {
19274
19273
  connector?: "AND" | "OR" | undefined;
19275
19274
  operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
19276
- value: string | number | boolean | string[] | number[] | null;
19277
19275
  field: string;
19276
+ value: string | number | boolean | string[] | number[] | null;
19278
19277
  }[] | undefined;
19279
19278
  update: {
19280
19279
  [x: string]: unknown;
@@ -1,4 +1,3 @@
1
- import "../../validators-BcQFm1oY.js";
2
1
  import { B as ConvexContext, H as LazyCaller } from "../../procedure-caller-DYjpq7rG.js";
3
2
  import "../../http-types-BK7FuIcR.js";
4
3
  import "../../server/index.js";
@@ -15,15 +15,14 @@ function isColumnBuilder(value) {
15
15
  function toRequiredValidator(validator) {
16
16
  return validator.isOptional === "optional" ? vRequired(validator) : validator;
17
17
  }
18
- function stripNullUnionMember(validator) {
19
- if (validator.kind !== "union") return validator;
20
- const members = validator.members.filter((member) => member.kind !== "null");
21
- if (members.length === validator.members.length || members.length === 0) return validator;
22
- if (members.length === 1) return members[0];
23
- return v.union(...members);
24
- }
25
- function toRequiredNonNullBuilderValidator(validator) {
26
- return stripNullUnionMember(toRequiredValidator(validator));
18
+ function toRequiredBuilderValidator(validator) {
19
+ const requiredValidator = toRequiredValidator(validator);
20
+ if (requiredValidator.kind !== "union") return requiredValidator;
21
+ const nonNullMembers = requiredValidator.members.filter((member) => member.kind !== "null");
22
+ if (nonNullMembers.length !== 1) return requiredValidator;
23
+ const [member] = nonNullMembers;
24
+ if (member.kind === "object" || member.kind === "array") return member;
25
+ return requiredValidator;
27
26
  }
28
27
  function formatInvalidInput(path, value) {
29
28
  return `${path} expected a column builder, Convex validator, or nested object shape. Got ${Array.isArray(value) ? "array" : value === null ? "null" : typeof value}.`;
@@ -34,7 +33,7 @@ function objectShapeToValidator(shape, path) {
34
33
  return v.object(fields);
35
34
  }
36
35
  function nestedInputToValidator(input, path) {
37
- if (isColumnBuilder(input)) return toRequiredNonNullBuilderValidator(input.convexValidator);
36
+ if (isColumnBuilder(input)) return toRequiredBuilderValidator(input.convexValidator);
38
37
  if (isValidator(input)) return toRequiredValidator(input);
39
38
  if (isRecord(input)) return objectShapeToValidator(input, path);
40
39
  throw new Error(formatInvalidInput(path, input));
@@ -1,5 +1,5 @@
1
1
  import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-BcQFm1oY.js";
2
- import { $ as DatabaseWithMutations, $n as CountConfig, $r as or, $t as RelationsBuilderColumnConfig, A as MigrationCancelArgs, An as ConvexVectorIndexBuilderOn, Ar as FilterExpression, At as ConvexCustomBuilder, B as MigrationManifestEntry, Bn as ConvexForeignKeyBuilder, Br as gte, Bt as ConvexBooleanBuilderInitial, C as OrmBeforeResult, Cn as ConvexIndexBuilderOn, Cr as UpdateSet, Ct as ConvexIdBuilder, D as OrmTriggers, Dn as ConvexSearchIndexBuilderOn, Dr as BinaryExpression, Dt as ConvexDateBuilderInitial, E as OrmTriggerContext, En as ConvexSearchIndexBuilder, Er as unsetToken, Et as ConvexDateBuilder, F as MigrationDefinition, Fn as searchIndex, Fr as contains, Ft as objectOf, G as MigrationStateMap, Gn as check, Gr as isNull, Gt as CountBackfillChunkArgs, H as MigrationPlan, Hn as ConvexUniqueConstraintBuilder, Hr as inArray, Ht as ConvexBigIntBuilder, I as MigrationDirection, In as uniqueIndex, Ir as endsWith, It as ConvexBytesBuilder, J as MigrationWriteMode, Jn as AggregateConfig, Jr as lte, Jt as ExtractTablesWithRelations, K as MigrationStep, Kn as foreignKey, Kr as like, Kt as CountBackfillKickoffArgs, L as MigrationDoc, Ln as vectorIndex, Lr as eq, Lt as ConvexBytesBuilderInitial, M as MigrationRunChunkArgs, Mn as aggregateIndex, Mr as UnaryExpression, Mt as arrayOf, N as MigrationStatusArgs, Nn as index, Nr as and, Nt as custom, O as defineTriggers, On as ConvexSearchIndexConfig, Or as ExpressionVisitor, Ot as ConvexDateMode, P as MigrationAppliedState, Pn as rankIndex, Pr as between, Pt as json, Q as detectMigrationDrift, Qn as BuildRelationResult, Qr as notInArray, Qt as RelationsBuilderColumnBase, R as MigrationDocContext, Rn as ConvexCheckBuilder, Rr as fieldRef, Rt as bytes, S as scheduledDeleteFactory, Sn as ConvexIndexBuilder, Sr as ReturningSelection, St as integer, T as OrmTriggerChange, Tn as ConvexRankIndexBuilderOn, Tr as VectorSearchProvider, Tt as id, U as MigrationRunStatus, Un as ConvexUniqueConstraintBuilderOn, Ur as isFieldReference, Ut as ConvexBigIntBuilderInitial, V as MigrationMigrateOne, Vn as ConvexForeignKeyConfig, Vr as ilike, Vt as boolean, W as MigrationSet, Wn as ConvexUniqueConstraintConfig, Wr as isNotNull, Wt as bigint, X as defineMigration, Xn as AggregateResult, Xr as not, Xt as OneConfig, Y as buildMigrationPlan, Yn as AggregateFieldValue, Yr as ne, Yt as ManyConfig, Z as defineMigrationSet, Zn as BuildQueryResult, Zr as notBetween, Zt as RelationsBuilder, _ as OrmWriterCtx, _i as IsUnique, _n as RlsRole, _r as OrderDirection, _t as ConvexTextBuilder, a as TableConfigResult, ai as TableName, an as ConvexDeletionConfig, ar as InferModelFromColumns, at as EdgeMetadata, b as scheduledMutationBatchFactory, bn as ConvexAggregateIndexBuilder, br as ReturningAll, bt as ConvexNumberBuilder, c as OrmNotFoundError, ci as ColumnBuilder, cn as OrmLifecycleChange, cr as MutationExecuteConfig, ct as ConvexVectorBuilderInitial, d as GenericOrmCtx, di as ColumnBuilderTypeConfig, dn as convexTable, dr as MutationPaginateConfig, dt as ConvexTimestampBuilderInitial, ei as startsWith, en as TableRelationalConfig, er as CountResult, et as DatabaseWithQuery, f as OrmApiResult, fi as ColumnBuilderWithTableName, fn as deletion, fr as MutationPaginatedResult, ft as ConvexTimestampMode, g as OrmReaderCtx, gi as IsPrimaryKey, gn as rlsPolicy, gr as OrderByClause, gt as textEnum, h as OrmFunctions, hi as HasDefault, hn as RlsPolicyToOption, hr as MutationRunMode, ht as ConvexTextEnumBuilderInitial, i as desc, ii as OrmSchemaPluginTables, in as ConvexDeletionBuilder, ir as InferInsertModel, it as RlsMode, j as MigrationRunArgs, jn as ConvexVectorIndexConfig, jr as LogicalExpression, jt as ConvexCustomBuilderInitial, kn as ConvexVectorIndexBuilder, kr as FieldReference, kt as date, l as CreateOrmOptions, li as ColumnBuilderBaseConfig, ln as OrmLifecycleOperation, lr as MutationExecuteResult, lt as vector, m as OrmClientWithApi, mi as DrizzleEntity, mn as RlsPolicyConfig, mr as MutationReturning, mt as ConvexTextEnumBuilder, n as defineSchema, ni as Columns, nn as defineRelations, nr as FilterOperators, nt as OrmWriter, o as getTableColumns, oi as SystemFields, on as ConvexTable, or as InferSelectModel, ot as extractRelationsConfig, p as OrmClientBase, pi as ColumnDataType, pn as RlsPolicy, pr as MutationResult, pt as timestamp, q as MigrationTableName, qn as unique, qr as lt, qt as CountBackfillStatusArgs, r as asc, ri as OrmSchemaPlugin, rn as defineRelationsPart, rr as GetColumnData, rt as RlsContext, s as getTableConfig, si as AnyColumn, sr as InsertValue, st as ConvexVectorBuilder, t as WhereClauseResult, ti as Brand, tn as TablesRelationalConfig, tr as DBQueryConfig, tt as OrmReader, u as GenericOrm, ui as ColumnBuilderRuntimeConfig, un as TableConfig, ur as MutationExecutionMode, ut as ConvexTimestampBuilder, v as createOrm, vi as NotNull, vn as RlsRoleConfig, vr as PaginatedResult, vt as ConvexTextBuilderInitial, w as OrmTableTriggers, wn as ConvexRankIndexBuilder, wr as VectorQueryConfig, wt as ConvexIdBuilderInitial, x as ScheduledDeleteArgs, xn as ConvexAggregateIndexBuilderOn, xr as ReturningResult, xt as ConvexNumberBuilderInitial, y as ScheduledMutationBatchArgs, yn as rlsRole, yr as PredicateWhereIndexConfig, yt as text, z as MigrationDriftIssue, zn as ConvexCheckConfig, zr as gt, zt as ConvexBooleanBuilder } from "../where-clause-compiler-m-GQNB_K.js";
2
+ import { $ as DatabaseWithMutations, $n as CountConfig, $r as or, $t as RelationsBuilderColumnConfig, A as MigrationCancelArgs, An as ConvexVectorIndexBuilderOn, Ar as FilterExpression, At as ConvexCustomBuilder, B as MigrationManifestEntry, Bn as ConvexForeignKeyBuilder, Br as gte, Bt as ConvexBooleanBuilderInitial, C as OrmBeforeResult, Cn as ConvexIndexBuilderOn, Cr as UpdateSet, Ct as ConvexIdBuilder, D as OrmTriggers, Dn as ConvexSearchIndexBuilderOn, Dr as BinaryExpression, Dt as ConvexDateBuilderInitial, E as OrmTriggerContext, En as ConvexSearchIndexBuilder, Er as unsetToken, Et as ConvexDateBuilder, F as MigrationDefinition, Fn as searchIndex, Fr as contains, Ft as objectOf, G as MigrationStateMap, Gn as check, Gr as isNull, Gt as CountBackfillChunkArgs, H as MigrationPlan, Hn as ConvexUniqueConstraintBuilder, Hr as inArray, Ht as ConvexBigIntBuilder, I as MigrationDirection, In as uniqueIndex, Ir as endsWith, It as ConvexBytesBuilder, J as MigrationWriteMode, Jn as AggregateConfig, Jr as lte, Jt as ExtractTablesWithRelations, K as MigrationStep, Kn as foreignKey, Kr as like, Kt as CountBackfillKickoffArgs, L as MigrationDoc, Ln as vectorIndex, Lr as eq, Lt as ConvexBytesBuilderInitial, M as MigrationRunChunkArgs, Mn as aggregateIndex, Mr as UnaryExpression, Mt as arrayOf, N as MigrationStatusArgs, Nn as index, Nr as and, Nt as custom, O as defineTriggers, On as ConvexSearchIndexConfig, Or as ExpressionVisitor, Ot as ConvexDateMode, P as MigrationAppliedState, Pn as rankIndex, Pr as between, Pt as json, Q as detectMigrationDrift, Qn as BuildRelationResult, Qr as notInArray, Qt as RelationsBuilderColumnBase, R as MigrationDocContext, Rn as ConvexCheckBuilder, Rr as fieldRef, Rt as bytes, S as scheduledDeleteFactory, Sn as ConvexIndexBuilder, Sr as ReturningSelection, St as integer, T as OrmTriggerChange, Tn as ConvexRankIndexBuilderOn, Tr as VectorSearchProvider, Tt as id, U as MigrationRunStatus, Un as ConvexUniqueConstraintBuilderOn, Ur as isFieldReference, Ut as ConvexBigIntBuilderInitial, V as MigrationMigrateOne, Vn as ConvexForeignKeyConfig, Vr as ilike, Vt as boolean, W as MigrationSet, Wn as ConvexUniqueConstraintConfig, Wr as isNotNull, Wt as bigint, X as defineMigration, Xn as AggregateResult, Xr as not, Xt as OneConfig, Y as buildMigrationPlan, Yn as AggregateFieldValue, Yr as ne, Yt as ManyConfig, Z as defineMigrationSet, Zn as BuildQueryResult, Zr as notBetween, Zt as RelationsBuilder, _ as OrmWriterCtx, _i as IsUnique, _n as RlsRole, _r as OrderDirection, _t as ConvexTextBuilder, a as TableConfigResult, ai as TableName, an as ConvexDeletionConfig, ar as InferModelFromColumns, at as EdgeMetadata, b as scheduledMutationBatchFactory, bn as ConvexAggregateIndexBuilder, br as ReturningAll, bt as ConvexNumberBuilder, c as OrmNotFoundError, ci as ColumnBuilder, cn as OrmLifecycleChange, cr as MutationExecuteConfig, ct as ConvexVectorBuilderInitial, d as GenericOrmCtx, di as ColumnBuilderTypeConfig, dn as convexTable, dr as MutationPaginateConfig, dt as ConvexTimestampBuilderInitial, ei as startsWith, en as TableRelationalConfig, er as CountResult, et as DatabaseWithQuery, f as OrmApiResult, fi as ColumnBuilderWithTableName, fn as deletion, fr as MutationPaginatedResult, ft as ConvexTimestampMode, g as OrmReaderCtx, gi as IsPrimaryKey, gn as rlsPolicy, gr as OrderByClause, gt as textEnum, h as OrmFunctions, hi as HasDefault, hn as RlsPolicyToOption, hr as MutationRunMode, ht as ConvexTextEnumBuilderInitial, i as desc, ii as OrmSchemaPluginTables, in as ConvexDeletionBuilder, ir as InferInsertModel, it as RlsMode, j as MigrationRunArgs, jn as ConvexVectorIndexConfig, jr as LogicalExpression, jt as ConvexCustomBuilderInitial, kn as ConvexVectorIndexBuilder, kr as FieldReference, kt as date, l as CreateOrmOptions, li as ColumnBuilderBaseConfig, ln as OrmLifecycleOperation, lr as MutationExecuteResult, lt as vector, m as OrmClientWithApi, mi as DrizzleEntity, mn as RlsPolicyConfig, mr as MutationReturning, mt as ConvexTextEnumBuilder, n as defineSchema, ni as Columns, nn as defineRelations, nr as FilterOperators, nt as OrmWriter, o as getTableColumns, oi as SystemFields, on as ConvexTable, or as InferSelectModel, ot as extractRelationsConfig, p as OrmClientBase, pi as ColumnDataType, pn as RlsPolicy, pr as MutationResult, pt as timestamp, q as MigrationTableName, qn as unique, qr as lt, qt as CountBackfillStatusArgs, r as asc, ri as OrmSchemaPlugin, rn as defineRelationsPart, rr as GetColumnData, rt as RlsContext, s as getTableConfig, si as AnyColumn, sr as InsertValue, st as ConvexVectorBuilder, t as WhereClauseResult, ti as Brand, tn as TablesRelationalConfig, tr as DBQueryConfig, tt as OrmReader, u as GenericOrm, ui as ColumnBuilderRuntimeConfig, un as TableConfig, ur as MutationExecutionMode, ut as ConvexTimestampBuilder, v as createOrm, vi as NotNull, vn as RlsRoleConfig, vr as PaginatedResult, vt as ConvexTextBuilderInitial, w as OrmTableTriggers, wn as ConvexRankIndexBuilder, wr as VectorQueryConfig, wt as ConvexIdBuilderInitial, x as ScheduledDeleteArgs, xn as ConvexAggregateIndexBuilderOn, xr as ReturningResult, xt as ConvexNumberBuilderInitial, y as ScheduledMutationBatchArgs, yn as rlsRole, yr as PredicateWhereIndexConfig, yt as text, z as MigrationDriftIssue, zn as ConvexCheckConfig, zr as gt, zt as ConvexBooleanBuilder } from "../where-clause-compiler-_b1UHbYW.js";
3
3
  import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-ji7By8u0.js";
4
4
  import { DefineSchemaOptions, GenericSchema, SchemaDefinition } from "convex/server";
5
5
  export { type AggregateConfig, type AggregateFieldValue, type AggregateResult, type AnyColumn, type BinaryExpression, Brand, type BuildQueryResult, type BuildRelationResult, type ColumnBuilder, type ColumnBuilderBaseConfig, type ColumnBuilderRuntimeConfig, type ColumnBuilderTypeConfig, type ColumnBuilderWithTableName, type ColumnDataType, Columns, type ConvexAggregateIndexBuilder, type ConvexAggregateIndexBuilderOn, type ConvexBigIntBuilder, type ConvexBigIntBuilderInitial, type ConvexBooleanBuilder, type ConvexBooleanBuilderInitial, type ConvexBytesBuilder, type ConvexBytesBuilderInitial, type ConvexCheckBuilder, type ConvexCheckConfig, type ConvexCustomBuilder, type ConvexCustomBuilderInitial, type ConvexDateBuilder, type ConvexDateBuilderInitial, type ConvexDateMode, type ConvexDeletionBuilder, type ConvexDeletionConfig, type ConvexForeignKeyBuilder, type ConvexForeignKeyConfig, type ConvexIdBuilder, type ConvexIdBuilderInitial, type ConvexIndexBuilder, type ConvexIndexBuilderOn, type ConvexNumberBuilder, type ConvexNumberBuilderInitial, type ConvexRankIndexBuilder, type ConvexRankIndexBuilderOn, type ConvexSearchIndexBuilder, type ConvexSearchIndexBuilderOn, type ConvexSearchIndexConfig, type ConvexTable, type ConvexTextBuilder, type ConvexTextBuilderInitial, type ConvexTextEnumBuilder, type ConvexTextEnumBuilderInitial, type ConvexTimestampBuilder, type ConvexTimestampBuilderInitial, type ConvexTimestampMode, type ConvexUniqueConstraintBuilder, type ConvexUniqueConstraintBuilderOn, type ConvexUniqueConstraintConfig, type ConvexVectorBuilder, type ConvexVectorBuilderInitial, type ConvexVectorIndexBuilder, type ConvexVectorIndexBuilderOn, type ConvexVectorIndexConfig, type CountBackfillChunkArgs, type CountBackfillKickoffArgs, type CountBackfillStatusArgs, type CountConfig, type CountResult, type CreateOrmOptions, type DBQueryConfig, type DatabaseWithMutations, type DatabaseWithQuery, type DefineSchemaOptions, type DocByCtx, type DrizzleEntity, type EdgeMetadata, type ExpressionVisitor, type ExtractTablesWithRelations, type FieldReference, type FilterExpression, type FilterOperators, type GenericOrm, type GenericOrmCtx, type GenericSchema, type GetColumnData, type HasDefault, type InferInsertModel, type InferModelFromColumns, type InferSelectModel, type InsertValue, type IsPrimaryKey, type IsUnique, type LogicalExpression, type LookupByIdResultByCtx, type ManyConfig, 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, type MutationExecuteConfig, type MutationExecuteResult, type MutationExecutionMode, type MutationPaginateConfig, type MutationPaginatedResult, type MutationResult, type MutationReturning, type MutationRunMode, type NotNull, type OneConfig, type OrderByClause, type OrderDirection, type OrmApiResult, type OrmBeforeResult, type OrmClientBase, type OrmClientWithApi, type OrmFunctions, type OrmLifecycleChange, type OrmLifecycleOperation, OrmNotFoundError, type OrmReader, type OrmReaderCtx, type OrmSchemaPlugin, OrmSchemaPluginTables, type OrmTableTriggers, type OrmTriggerChange, type OrmTriggerContext, type OrmTriggers, type OrmWriter, type OrmWriterCtx, type PaginatedResult, type PredicateWhereIndexConfig, type QueryCtxWithOptionalOrmQueryTable, type QueryCtxWithOrmQueryTable, type QueryCtxWithPreferredOrmQueryTable, type RelationsBuilder, type RelationsBuilderColumnBase, type RelationsBuilderColumnConfig, type ReturningAll, type ReturningResult, type ReturningSelection, type RlsContext, type RlsMode, RlsPolicy, type RlsPolicyConfig, type RlsPolicyToOption, RlsRole, type RlsRoleConfig, type ScheduledDeleteArgs, type ScheduledMutationBatchArgs, type SchemaDefinition, type SystemFields, type TableConfig, type TableConfigResult, TableName, type TableRelationalConfig, type TablesRelationalConfig, type UnaryExpression, type UpdateSet, type VectorQueryConfig, type VectorSearchProvider, type WhereClauseResult, aggregateIndex, and, arrayOf, asc, between, bigint, boolean, buildMigrationPlan, bytes, check, contains, convexTable, createOrm, custom, date, defineMigration, defineMigrationSet, defineRelations, defineRelationsPart, defineSchema, defineTriggers, deletion, deprecated, desc, detectMigrationDrift, endsWith, eq, extractRelationsConfig, fieldRef, foreignKey, getByIdWithOrmQueryFallback, getTableColumns, getTableConfig, gt, gte, id, ilike, inArray, index, integer, isFieldReference, isNotNull, isNull, json, like, lt, lte, ne, not, notBetween, notInArray, objectOf, or, pretend, pretendRequired, rankIndex, rlsPolicy, rlsRole, scheduledDeleteFactory, scheduledMutationBatchFactory, searchIndex, startsWith, text, textEnum, timestamp, unique, uniqueIndex, unsetToken, vector, vectorIndex };
package/dist/orm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { t as DirectAggregate } from "../runtime-C0WcYGY0.js";
1
+ import { t as DirectAggregate } from "../runtime-oWZgeWOJ.js";
2
2
  import { C as integer, S as createSystemFields, T as entityKind, _ as rankIndex, a as EnableRLS, b as vectorIndex, c as OrmSchemaOptions, d as TableDeleteConfig, f as TableName, g as index, h as aggregateIndex, i as Columns, l as OrmSchemaPluginTables, m as rlsPolicy, n as deletion, o as OrmContext, p as RlsPolicy, r as Brand, s as OrmSchemaDefinition, t as convexTable, u as RlsPolicies, v as searchIndex, w as ConvexColumnBuilder, x as text, y as uniqueIndex } from "../table-B7yzBihE.js";
3
- import { a as AGGREGATE_EXTREMA_TABLE, c as aggregatePlugin, i as AGGREGATE_BUCKET_TABLE, l as boolean, n as MIGRATION_STATE_TABLE, o as AGGREGATE_MEMBER_TABLE, r as migrationPlugin, s as AGGREGATE_STATE_TABLE, t as MIGRATION_RUN_TABLE } from "../schema-Bx6j2doh.js";
3
+ import { a as AGGREGATE_EXTREMA_TABLE, c as aggregatePlugin, i as AGGREGATE_BUCKET_TABLE, l as boolean, n as MIGRATION_STATE_TABLE, o as AGGREGATE_MEMBER_TABLE, r as migrationPlugin, s as AGGREGATE_STATE_TABLE, t as MIGRATION_RUN_TABLE } from "../schema-DVFZAlKx.js";
4
4
  import { a as pretendRequired, i as pretend, n as deprecated } from "../validators-D_i3BK7v.js";
5
- import { a as objectOf, i as json, n as arrayOf, r as custom, t as id } from "../id-BcBb900m.js";
5
+ import { a as objectOf, i as json, n as arrayOf, r as custom, t as id } from "../id-DdAxiGby.js";
6
6
  import { t as textEnum } from "../text-enum-CFdcLUuw.js";
7
7
  import { A as ne, C as inArray, D as like, E as isNull, F as notLike, I as or, L as startsWith, M as notBetween, N as notIlike, O as lt, P as notInArray, S as ilike, T as isNotNull, _ as endsWith, a as mergedStream, b as gt, c as isUnsetToken, d as arrayContained, f as arrayContains, g as contains, h as column, i as getIndexFields, j as not, k as lte, l as unsetToken, m as between, n as EmptyStream, o as stream, p as arrayOverlaps, r as QueryStream, s as streamIndexRange, t as getByIdWithOrmQueryFallback, u as and, v as eq, w as isFieldReference, x as gte, y as fieldRef } from "../query-context-DEUFBhXS.js";
8
8
  import { v } from "convex/values";
@@ -1,6 +1,4 @@
1
- import "../validators-BcQFm1oY.js";
2
- import { k as migrationPlugin, ri as OrmSchemaPlugin } from "../where-clause-compiler-m-GQNB_K.js";
3
- import "../query-context-ji7By8u0.js";
1
+ import { k as migrationPlugin, ri as OrmSchemaPlugin } from "../where-clause-compiler-_b1UHbYW.js";
4
2
  import "../orm/index.js";
5
3
 
6
4
  //#region src/orm/aggregate-index/schema.d.ts
@@ -1,3 +1,3 @@
1
- import { c as aggregatePlugin, r as migrationPlugin } from "../schema-Bx6j2doh.js";
1
+ import { c as aggregatePlugin, r as migrationPlugin } from "../schema-DVFZAlKx.js";
2
2
 
3
3
  export { aggregatePlugin, migrationPlugin };
@@ -1,6 +1,4 @@
1
- import "../../validators-BcQFm1oY.js";
2
- import { ri as OrmSchemaPlugin } from "../../where-clause-compiler-m-GQNB_K.js";
3
- import "../../query-context-ji7By8u0.js";
1
+ import { ri as OrmSchemaPlugin } from "../../where-clause-compiler-_b1UHbYW.js";
4
2
  import "../../orm/index.js";
5
3
  import * as convex_server0 from "convex/server";
6
4
 
@@ -1,5 +1,5 @@
1
1
  import { C as integer, g as index, t as convexTable, x as text } from "./table-B7yzBihE.js";
2
- import { r as custom, t as id } from "./id-BcBb900m.js";
2
+ import { r as custom, t as id } from "./id-DdAxiGby.js";
3
3
  import { ConvexError, convexToJson, jsonToConvex, v } from "convex/values";
4
4
 
5
5
  //#region src/aggregate-core/compare.ts
@@ -1,5 +1,5 @@
1
1
  import { C as integer, T as entityKind, g as index, t as convexTable, w as ConvexColumnBuilder, x as text } from "./table-B7yzBihE.js";
2
- import { r as custom, t as id } from "./id-BcBb900m.js";
2
+ import { r as custom, t as id } from "./id-DdAxiGby.js";
3
3
  import { v } from "convex/values";
4
4
 
5
5
  //#region src/orm/builders/boolean.ts
@@ -1,4 +1,3 @@
1
- import "../validators-BcQFm1oY.js";
2
1
  import { $ as QueryProcedureBuilder, A as GenericCtx, B as ConvexContext, C as CRPC_ERROR_CODE_TO_HTTP, Ct as zodToConvex, D as toCRPCError, E as isCRPCError, F as isRunMutationCtx, G as CallerOpts, H as LazyCaller, I as requireActionCtx, J as createApiLeaf, K as ServerCaller, L as requireMutationCtx, M as isActionCtx, N as isMutationCtx, O as CreateEnvOptions, P as isQueryCtx, Q as ProcedureBuilder, R as requireQueryCtx, S as CRPC_ERROR_CODES_BY_KEY, St as zodOutputToConvexFields, T as getHTTPStatusCodeFromError, U as createLazyCaller, V as createCallerFactory, W as CallerMeta, X as CRPCFunctionTypeHint, Y as ActionProcedureBuilder, Z as MutationProcedureBuilder, _ as WithHttpRouter, _t as zCustomAction, a as ProcedureCaller, at as handleHttpError, b as CRPCError, bt as zid, c as ProcedureFromFunctionReference, ct as ConvexValidatorFromZodOutput, d as createGenericCallerFactory, dt as Zid, et as createMiddlewareFactory, f as createGenericHandlerFactory, ft as ZodFromValidatorBase, g as typedProcedureResolver, gt as withSystemFields, h as defineProcedure, ht as convexToZodFields, i as ProcedureActionCallerFromRegistry, it as extractPathParams, j as RunMutationCtx, k as createEnv, l as ProcedureSchedulableCallerFromRegistry, lt as CustomBuilder, m as createProcedureHandlerFactory, mt as convexToZod, n as GeneratedProcedureRegistry, nt as HttpProcedureBuilder, o as ProcedureCallerFromRegistry, ot as matchPathParams, p as createProcedureCallerFactory, pt as ZodValidatorFromConvex, q as createServerCaller, r as GeneratedProcedureRegistryEntry, rt as createHttpProcedureBuilder, s as ProcedureDefinition, st as ConvexValidatorFromZod, t as CreateProcedureCallerFactoryOptions, tt as initCRPC, u as ProcedureScheduleCallerFromRegistry, ut as ZCustomCtx, v as inferApiInputs, vt as zCustomMutation, w as getCRPCErrorFromUnknown, wt as zodToConvexFields, x as CRPCErrorCode, xt as zodOutputToConvex, y as inferApiOutputs, yt as zCustomQuery, z as requireRunMutationCtx } from "../procedure-caller-DYjpq7rG.js";
3
2
  import { A as GetRawInputFn, B as Simplify, C as HttpProcedure, D as ProcedureMeta, E as InferHttpInput, F as MiddlewareMarker, I as MiddlewareNext, L as MiddlewareResult, M as MergeZodObjects, N as MiddlewareBuilder, O as AnyMiddleware, P as MiddlewareFunction, R as Overwrite, S as HttpMethod, T as HttpRouteDefinition, V as UnsetMarker, _ as extractRouteMap, b as HttpActionHandler, d as CRPCHttpRouter, f as HttpRouterDef, g as createHttpRouterFactory, h as createHttpRouter, j as IntersectIfDefined, k as AnyMiddlewareBuilder, m as HttpRouterWithHono, p as HttpRouterRecord, v as CRPCHonoHandler, w as HttpProcedureBuilderDef, x as HttpHandlerOpts, y as HttpActionConstructor, z as ResolveIfSet } from "../http-types-BK7FuIcR.js";
4
3
  export { ActionProcedureBuilder, AnyMiddleware, AnyMiddlewareBuilder, CRPCError, CRPCErrorCode, CRPCFunctionTypeHint, CRPCHonoHandler, CRPCHttpRouter, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, CallerMeta, CallerOpts, ConvexContext, ConvexValidatorFromZod, ConvexValidatorFromZodOutput, CreateEnvOptions, CreateProcedureCallerFactoryOptions, CustomBuilder, GeneratedProcedureRegistry, GeneratedProcedureRegistryEntry, GenericCtx, GetRawInputFn, HttpActionConstructor, HttpActionHandler, HttpHandlerOpts, HttpMethod, HttpProcedure, HttpProcedureBuilder, HttpProcedureBuilderDef, HttpRouteDefinition, HttpRouterDef, HttpRouterRecord, HttpRouterWithHono, InferHttpInput, IntersectIfDefined, LazyCaller, MergeZodObjects, MiddlewareBuilder, MiddlewareFunction, MiddlewareMarker, MiddlewareNext, MiddlewareResult, MutationProcedureBuilder, Overwrite, ProcedureActionCallerFromRegistry, ProcedureBuilder, ProcedureCaller, ProcedureCallerFromRegistry, ProcedureDefinition, ProcedureFromFunctionReference, ProcedureMeta, ProcedureSchedulableCallerFromRegistry, ProcedureScheduleCallerFromRegistry, QueryProcedureBuilder, ResolveIfSet, RunMutationCtx, ServerCaller, Simplify, UnsetMarker, WithHttpRouter, ZCustomCtx, Zid, ZodFromValidatorBase, ZodValidatorFromConvex, convexToZod, convexToZodFields, createApiLeaf, createCallerFactory, createEnv, createGenericCallerFactory, createGenericHandlerFactory, createHttpProcedureBuilder, createHttpRouter, createHttpRouterFactory, createLazyCaller, createMiddlewareFactory, createProcedureCallerFactory, createProcedureHandlerFactory, createServerCaller, defineProcedure, extractPathParams, extractRouteMap, getCRPCErrorFromUnknown, getHTTPStatusCodeFromError, handleHttpError, inferApiInputs, inferApiOutputs, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, matchPathParams, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
@@ -2105,7 +2105,9 @@ type InferBuilderNestedValue<TBuilder extends AnyColumnBuilder> = TBuilder['_']
2105
2105
  $type: infer TType;
2106
2106
  } ? TType : TBuilder['_'] extends {
2107
2107
  data: infer TData;
2108
- } ? TData : never;
2108
+ } ? TBuilder['_'] extends {
2109
+ notNull: true;
2110
+ } ? TData : TData | null : never;
2109
2111
  type InferValidatorNestedValue<TValidator extends AnyValidator> = Exclude<TValidator['type'], undefined>;
2110
2112
  type InferNestedValue<TInput extends NestedInput> = TInput extends AnyColumnBuilder ? InferBuilderNestedValue<TInput> : TInput extends AnyValidator ? InferValidatorNestedValue<TInput> : TInput extends NestedShapeInput ? InferObjectShape<TInput> : never;
2111
2113
  type InferObjectShape<TShape extends NestedShapeInput> = { [K in keyof TShape]: InferNestedValue<TShape[K]> };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-convex",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Better Convex - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",