kitcn 0.31.0 → 0.31.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.
@@ -1,4 +1,4 @@
1
- import { $t as OrmLifecycleChange, A as CreateDatabaseOptions, Ar as $Type, B as getUniqueIndexes, Ct as OrderByClause, F as CascadeMode, Ft as ExtractTablesFromSchema, Gn as Columns, Gt as TablesRelationalConfig, Ht as RelationsBuilderConfigValue, I as DeleteMode, Kn as OrmRuntimeDefaults, L as SerializedFilterExpression, Mr as ColumnBuilder, Mt as VectorSearchProvider, N as OrmReader, Nr as ColumnBuilderBaseConfig, Or as SystemFieldAliases, P as OrmWriter, Pt as AnyRelationsBuilderConfig, Qn as OrmSchemaTriggers, R as getChecks, U as EdgeMetadata, Un as ConvexColumnBuilder, Ur as entityKind, Ut as RelationsConfigWithSchema, Vn as ConvexTextBuilderInitial, Wt as TableRelationalConfig, Xt as ConvexTable, Yn as OrmSchemaExtensionTriggers, Zn as OrmSchemaRelations, Zt as ConvexTableWithColumns, an as RlsPolicy, dt as InferInsertModel, kr as SystemFields, pt as InferSelectModel, qn as OrmSchemaExtensionRelations, r as OrmCapability, rr as FilterExpression$1, x as MigrationSet, z as getForeignKeys, zr as HasDefault, zt as RelationsBuilder } from "./capabilities-DPB-JKlm.js";
1
+ import { $t as OrmLifecycleChange, A as CreateDatabaseOptions, Ar as $Type, B as getUniqueIndexes, Ct as OrderByClause, F as CascadeMode, Ft as ExtractTablesFromSchema, Gn as Columns, Gt as TablesRelationalConfig, Ht as RelationsBuilderConfigValue, I as DeleteMode, Kn as OrmRuntimeDefaults, L as SerializedFilterExpression, Mr as ColumnBuilder, Mt as VectorSearchProvider, N as OrmReader, Nr as ColumnBuilderBaseConfig, Or as SystemFieldAliases, P as OrmWriter, Pt as AnyRelationsBuilderConfig, Qn as OrmSchemaTriggers, R as getChecks, U as EdgeMetadata, Un as ConvexColumnBuilder, Ur as entityKind, Ut as RelationsConfigWithSchema, Vn as ConvexTextBuilderInitial, Wt as TableRelationalConfig, Xt as ConvexTable, Yn as OrmSchemaExtensionTriggers, Zn as OrmSchemaRelations, Zt as ConvexTableWithColumns, an as RlsPolicy, dt as InferInsertModel, kr as SystemFields, pt as InferSelectModel, qn as OrmSchemaExtensionRelations, r as OrmCapability, rr as FilterExpression$1, x as MigrationSet, z as getForeignKeys, zr as HasDefault, zt as RelationsBuilder } from "./capabilities-CG-oIMyR.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, internalQueryGeneric } from "convex/server";
@@ -102,15 +102,6 @@ declare const migrationStorageTables: {
102
102
  fieldName: "status";
103
103
  };
104
104
  };
105
- direction: ConvexTextBuilderInitial<""> & {
106
- _: {
107
- tableName: "migration_state";
108
- };
109
- } & {
110
- _: {
111
- fieldName: "direction";
112
- };
113
- };
114
105
  migrationId: ConvexTextBuilderInitial<""> & {
115
106
  _: {
116
107
  notNull: true;
@@ -150,6 +141,15 @@ declare const migrationStorageTables: {
150
141
  fieldName: "applied";
151
142
  };
152
143
  };
144
+ direction: ConvexTextBuilderInitial<""> & {
145
+ _: {
146
+ tableName: "migration_state";
147
+ };
148
+ } & {
149
+ _: {
150
+ fieldName: "direction";
151
+ };
152
+ };
153
153
  runId: ConvexTextBuilderInitial<""> & {
154
154
  _: {
155
155
  tableName: "migration_state";
@@ -1011,7 +1011,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1011
1011
  readonly aggregate_bucket: ConvexTableWithColumns<{
1012
1012
  name: "aggregate_bucket";
1013
1013
  columns: {
1014
- count: ConvexNumberBuilderInitial<""> & {
1014
+ updatedAt: ConvexNumberBuilderInitial<""> & {
1015
1015
  _: {
1016
1016
  notNull: true;
1017
1017
  };
@@ -1021,10 +1021,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1021
1021
  };
1022
1022
  } & {
1023
1023
  _: {
1024
- fieldName: "count";
1024
+ fieldName: "updatedAt";
1025
1025
  };
1026
1026
  };
1027
- updatedAt: ConvexNumberBuilderInitial<""> & {
1027
+ count: ConvexNumberBuilderInitial<""> & {
1028
1028
  _: {
1029
1029
  notNull: true;
1030
1030
  };
@@ -1034,10 +1034,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1034
1034
  };
1035
1035
  } & {
1036
1036
  _: {
1037
- fieldName: "updatedAt";
1037
+ fieldName: "count";
1038
1038
  };
1039
1039
  };
1040
- indexName: ConvexTextBuilderInitial<""> & {
1040
+ tableKey: ConvexTextBuilderInitial<""> & {
1041
1041
  _: {
1042
1042
  notNull: true;
1043
1043
  };
@@ -1047,10 +1047,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1047
1047
  };
1048
1048
  } & {
1049
1049
  _: {
1050
- fieldName: "indexName";
1050
+ fieldName: "tableKey";
1051
1051
  };
1052
1052
  };
1053
- tableKey: ConvexTextBuilderInitial<""> & {
1053
+ indexName: ConvexTextBuilderInitial<""> & {
1054
1054
  _: {
1055
1055
  notNull: true;
1056
1056
  };
@@ -1060,7 +1060,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1060
1060
  };
1061
1061
  } & {
1062
1062
  _: {
1063
- fieldName: "tableKey";
1063
+ fieldName: "indexName";
1064
1064
  };
1065
1065
  };
1066
1066
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1136,7 +1136,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1136
1136
  readonly aggregate_member: ConvexTableWithColumns<{
1137
1137
  name: "aggregate_member";
1138
1138
  columns: {
1139
- updatedAt: ConvexNumberBuilderInitial<""> & {
1139
+ kind: ConvexTextBuilderInitial<""> & {
1140
1140
  _: {
1141
1141
  notNull: true;
1142
1142
  };
@@ -1146,10 +1146,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1146
1146
  };
1147
1147
  } & {
1148
1148
  _: {
1149
- fieldName: "updatedAt";
1149
+ fieldName: "kind";
1150
1150
  };
1151
1151
  };
1152
- kind: ConvexTextBuilderInitial<""> & {
1152
+ updatedAt: ConvexNumberBuilderInitial<""> & {
1153
1153
  _: {
1154
1154
  notNull: true;
1155
1155
  };
@@ -1159,10 +1159,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1159
1159
  };
1160
1160
  } & {
1161
1161
  _: {
1162
- fieldName: "kind";
1162
+ fieldName: "updatedAt";
1163
1163
  };
1164
1164
  };
1165
- indexName: ConvexTextBuilderInitial<""> & {
1165
+ tableKey: ConvexTextBuilderInitial<""> & {
1166
1166
  _: {
1167
1167
  notNull: true;
1168
1168
  };
@@ -1172,10 +1172,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1172
1172
  };
1173
1173
  } & {
1174
1174
  _: {
1175
- fieldName: "indexName";
1175
+ fieldName: "tableKey";
1176
1176
  };
1177
1177
  };
1178
- tableKey: ConvexTextBuilderInitial<""> & {
1178
+ indexName: ConvexTextBuilderInitial<""> & {
1179
1179
  _: {
1180
1180
  notNull: true;
1181
1181
  };
@@ -1185,7 +1185,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1185
1185
  };
1186
1186
  } & {
1187
1187
  _: {
1188
- fieldName: "tableKey";
1188
+ fieldName: "indexName";
1189
1189
  };
1190
1190
  };
1191
1191
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1326,7 +1326,11 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1326
1326
  readonly aggregate_extrema: ConvexTableWithColumns<{
1327
1327
  name: "aggregate_extrema";
1328
1328
  columns: {
1329
- count: ConvexNumberBuilderInitial<""> & {
1329
+ value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
1330
+ _: {
1331
+ $type: convex_values0.Value;
1332
+ };
1333
+ } & {
1330
1334
  _: {
1331
1335
  notNull: true;
1332
1336
  };
@@ -1336,14 +1340,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1336
1340
  };
1337
1341
  } & {
1338
1342
  _: {
1339
- fieldName: "count";
1343
+ fieldName: "value";
1340
1344
  };
1341
1345
  };
1342
- value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
1343
- _: {
1344
- $type: convex_values0.Value;
1345
- };
1346
- } & {
1346
+ updatedAt: ConvexNumberBuilderInitial<""> & {
1347
1347
  _: {
1348
1348
  notNull: true;
1349
1349
  };
@@ -1353,10 +1353,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1353
1353
  };
1354
1354
  } & {
1355
1355
  _: {
1356
- fieldName: "value";
1356
+ fieldName: "updatedAt";
1357
1357
  };
1358
1358
  };
1359
- updatedAt: ConvexNumberBuilderInitial<""> & {
1359
+ count: ConvexNumberBuilderInitial<""> & {
1360
1360
  _: {
1361
1361
  notNull: true;
1362
1362
  };
@@ -1366,10 +1366,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1366
1366
  };
1367
1367
  } & {
1368
1368
  _: {
1369
- fieldName: "updatedAt";
1369
+ fieldName: "count";
1370
1370
  };
1371
1371
  };
1372
- indexName: ConvexTextBuilderInitial<""> & {
1372
+ tableKey: ConvexTextBuilderInitial<""> & {
1373
1373
  _: {
1374
1374
  notNull: true;
1375
1375
  };
@@ -1379,10 +1379,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1379
1379
  };
1380
1380
  } & {
1381
1381
  _: {
1382
- fieldName: "indexName";
1382
+ fieldName: "tableKey";
1383
1383
  };
1384
1384
  };
1385
- tableKey: ConvexTextBuilderInitial<""> & {
1385
+ indexName: ConvexTextBuilderInitial<""> & {
1386
1386
  _: {
1387
1387
  notNull: true;
1388
1388
  };
@@ -1392,7 +1392,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1392
1392
  };
1393
1393
  } & {
1394
1394
  _: {
1395
- fieldName: "tableKey";
1395
+ fieldName: "indexName";
1396
1396
  };
1397
1397
  };
1398
1398
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1470,6 +1470,15 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1470
1470
  fieldName: "aggregateName";
1471
1471
  };
1472
1472
  };
1473
+ deletionStack: ConvexCustomBuilderInitial<"", convex_values0.VArray<convex_values0.GenericId<"aggregate_rank_node">[], convex_values0.VId<convex_values0.GenericId<"aggregate_rank_node">, "required">, "required">> & {
1474
+ _: {
1475
+ tableName: "aggregate_rank_tree";
1476
+ };
1477
+ } & {
1478
+ _: {
1479
+ fieldName: "deletionStack";
1480
+ };
1481
+ };
1473
1482
  maxNodeSize: ConvexNumberBuilderInitial<""> & {
1474
1483
  _: {
1475
1484
  notNull: true;
@@ -1484,10 +1493,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1484
1493
  };
1485
1494
  };
1486
1495
  namespace: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
1487
- _: {
1488
- $type: convex_values0.Value;
1489
- };
1490
- } & {
1491
1496
  _: {
1492
1497
  tableName: "aggregate_rank_tree";
1493
1498
  };
@@ -1518,14 +1523,13 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1518
1523
  readonly aggregate_rank_node: ConvexTableWithColumns<{
1519
1524
  name: "aggregate_rank_node";
1520
1525
  columns: {
1521
- aggregate: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
1522
- _: {
1523
- $type: {
1524
- count: number;
1525
- sum: number;
1526
- };
1527
- };
1528
- } & {
1526
+ aggregate: ConvexCustomBuilderInitial<"", convex_values0.VObject<{
1527
+ count: number;
1528
+ sum: number;
1529
+ }, {
1530
+ count: convex_values0.VFloat64<number, "required">;
1531
+ sum: convex_values0.VFloat64<number, "required">;
1532
+ }, "required", "count" | "sum">> & {
1529
1533
  _: {
1530
1534
  tableName: "aggregate_rank_node";
1531
1535
  };
@@ -1534,15 +1538,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1534
1538
  fieldName: "aggregate";
1535
1539
  };
1536
1540
  };
1537
- items: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.Validator<any, "required", any>, "required">> & {
1538
- _: {
1539
- $type: {
1540
- k: convex_values0.Value;
1541
- v: convex_values0.Value;
1542
- s: number;
1543
- }[];
1544
- };
1545
- } & {
1541
+ items: ConvexCustomBuilderInitial<"", convex_values0.VArray<{
1542
+ k: any;
1543
+ v: any;
1544
+ s: number;
1545
+ }[], convex_values0.VObject<{
1546
+ k: any;
1547
+ v: any;
1548
+ s: number;
1549
+ }, {
1550
+ k: convex_values0.VAny<any, "required", string>;
1551
+ v: convex_values0.VAny<any, "required", string>;
1552
+ s: convex_values0.VFloat64<number, "required">;
1553
+ }, "required", "k" | "v" | "s" | `k.${string}` | `v.${string}`>, "required">> & {
1546
1554
  _: {
1547
1555
  notNull: true;
1548
1556
  };
@@ -1555,11 +1563,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1555
1563
  fieldName: "items";
1556
1564
  };
1557
1565
  };
1558
- subtrees: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.Validator<any, "required", any>, "required">> & {
1559
- _: {
1560
- $type: string[];
1561
- };
1562
- } & {
1566
+ subtrees: ConvexCustomBuilderInitial<"", convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">> & {
1563
1567
  _: {
1564
1568
  notNull: true;
1565
1569
  };
@@ -1592,6 +1596,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1592
1596
  fieldName: "status";
1593
1597
  };
1594
1598
  };
1599
+ kind: ConvexTextBuilderInitial<""> & {
1600
+ _: {
1601
+ notNull: true;
1602
+ };
1603
+ } & {
1604
+ _: {
1605
+ tableName: "aggregate_state";
1606
+ };
1607
+ } & {
1608
+ _: {
1609
+ fieldName: "kind";
1610
+ };
1611
+ };
1595
1612
  cursor: ConvexTextBuilderInitial<""> & {
1596
1613
  _: {
1597
1614
  tableName: "aggregate_state";
@@ -1658,7 +1675,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1658
1675
  fieldName: "lastError";
1659
1676
  };
1660
1677
  };
1661
- kind: ConvexTextBuilderInitial<""> & {
1678
+ tableKey: ConvexTextBuilderInitial<""> & {
1662
1679
  _: {
1663
1680
  notNull: true;
1664
1681
  };
@@ -1668,7 +1685,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1668
1685
  };
1669
1686
  } & {
1670
1687
  _: {
1671
- fieldName: "kind";
1688
+ fieldName: "tableKey";
1672
1689
  };
1673
1690
  };
1674
1691
  indexName: ConvexTextBuilderInitial<""> & {
@@ -1710,19 +1727,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1710
1727
  fieldName: "metricDefinitionHash";
1711
1728
  };
1712
1729
  };
1713
- tableKey: ConvexTextBuilderInitial<""> & {
1714
- _: {
1715
- notNull: true;
1716
- };
1717
- } & {
1718
- _: {
1719
- tableName: "aggregate_state";
1720
- };
1721
- } & {
1722
- _: {
1723
- fieldName: "tableKey";
1724
- };
1725
- };
1726
1730
  };
1727
1731
  }, {
1728
1732
  by_creation_time: ["_creationTime"];
@@ -1747,15 +1751,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1747
1751
  fieldName: "status";
1748
1752
  };
1749
1753
  };
1750
- direction: ConvexTextBuilderInitial<""> & {
1751
- _: {
1752
- tableName: "migration_state";
1753
- };
1754
- } & {
1755
- _: {
1756
- fieldName: "direction";
1757
- };
1758
- };
1759
1754
  migrationId: ConvexTextBuilderInitial<""> & {
1760
1755
  _: {
1761
1756
  notNull: true;
@@ -1795,6 +1790,15 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1795
1790
  fieldName: "applied";
1796
1791
  };
1797
1792
  };
1793
+ direction: ConvexTextBuilderInitial<""> & {
1794
+ _: {
1795
+ tableName: "migration_state";
1796
+ };
1797
+ } & {
1798
+ _: {
1799
+ fieldName: "direction";
1800
+ };
1801
+ };
1798
1802
  runId: ConvexTextBuilderInitial<""> & {
1799
1803
  _: {
1800
1804
  tableName: "migration_state";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",
@@ -1,37 +0,0 @@
1
- import { b as ConvexColumnBuilder, x as entityKind } from "./table-d9o_n4R3.js";
2
- import { v } from "convex/values";
3
-
4
- //#region src/orm/builders/id.ts
5
- /**
6
- * ID column builder class
7
- * Compiles to v.id(tableName) or v.optional(v.id(tableName))
8
- */
9
- var ConvexIdBuilder = class extends ConvexColumnBuilder {
10
- static [entityKind] = "ConvexIdBuilder";
11
- constructor(name, tableName) {
12
- super(name, "string", "ConvexId");
13
- this.tableName = tableName;
14
- this.config.referenceTable = tableName;
15
- }
16
- /**
17
- * Expose Convex validator for schema integration
18
- */
19
- get convexValidator() {
20
- if (this.config.notNull) return v.id(this.tableName);
21
- return v.optional(v.union(v.null(), v.id(this.tableName)));
22
- }
23
- /**
24
- * Compile to Convex validator
25
- * .notNull() → v.id(tableName)
26
- * nullable → v.optional(v.id(tableName))
27
- */
28
- build() {
29
- return this.convexValidator;
30
- }
31
- };
32
- function id(tableName) {
33
- return new ConvexIdBuilder("", tableName);
34
- }
35
-
36
- //#endregion
37
- export { id as t };