kitcn 0.33.0 → 0.33.2
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.
- package/CHANGELOG.md +15 -0
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +16 -16
- package/dist/auth/nextjs/index.d.ts +1 -1
- package/dist/auth/start/server/index.d.ts +1 -1
- package/dist/{builder-Cyd5nCxZ.js → builder-DDYTlmTB.js} +12 -3
- package/dist/cli.mjs +48 -7
- package/dist/crpc/index.d.ts +1 -1
- package/dist/{generated-contract-disabled-PdNGvNYP.d.ts → generated-contract-disabled-CTUQ9nxL.d.ts} +40 -40
- package/dist/{middleware-D61Nm-iB.js → middleware-LvZov-hA.js} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/migrations/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-DgMiD0-a.js → procedure-caller-DgGF_hA8.js} +1 -1
- package/dist/{procedure-name-DPYyLiVS.d.ts → procedure-name-DRSOwAJY.d.ts} +7 -3
- package/dist/ratelimit/index.js +2 -2
- package/dist/react/index.d.ts +5 -6
- package/dist/react/index.js +20 -66
- package/dist/rsc/index.d.ts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/dist/solid/index.d.ts +5 -6
- package/dist/solid/index.js +20 -66
- package/dist/{types-BXpu7xIU.d.ts → types-C7JkpfeY.d.ts} +2 -2
- package/dist/{where-clause-compiler-DrV6lQg0.d.ts → where-clause-compiler-B0kyVGzW.d.ts} +99 -99
- package/package.json +1 -1
- package/skills/kitcn/SKILL.md +2 -1
- package/skills/kitcn/references/features/auth-admin.md +1 -0
- package/skills/kitcn/references/features/react.md +4 -5
|
@@ -133,7 +133,7 @@ declare const migrationStorageTables: {
|
|
|
133
133
|
fieldName: "updatedAt";
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
|
-
|
|
136
|
+
migrationId: ConvexTextBuilderInitial<""> & {
|
|
137
137
|
_: {
|
|
138
138
|
notNull: true;
|
|
139
139
|
};
|
|
@@ -143,37 +143,45 @@ declare const migrationStorageTables: {
|
|
|
143
143
|
};
|
|
144
144
|
} & {
|
|
145
145
|
_: {
|
|
146
|
-
fieldName: "
|
|
146
|
+
fieldName: "migrationId";
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
|
-
|
|
149
|
+
checksum: ConvexTextBuilderInitial<""> & {
|
|
150
|
+
_: {
|
|
151
|
+
notNull: true;
|
|
152
|
+
};
|
|
153
|
+
} & {
|
|
150
154
|
_: {
|
|
151
155
|
tableName: "migration_state";
|
|
152
156
|
};
|
|
153
157
|
} & {
|
|
154
158
|
_: {
|
|
155
|
-
fieldName: "
|
|
159
|
+
fieldName: "checksum";
|
|
156
160
|
};
|
|
157
161
|
};
|
|
158
|
-
|
|
162
|
+
applied: ConvexBooleanBuilderInitial<""> & {
|
|
163
|
+
_: {
|
|
164
|
+
notNull: true;
|
|
165
|
+
};
|
|
166
|
+
} & {
|
|
159
167
|
_: {
|
|
160
168
|
tableName: "migration_state";
|
|
161
169
|
};
|
|
162
170
|
} & {
|
|
163
171
|
_: {
|
|
164
|
-
fieldName: "
|
|
172
|
+
fieldName: "applied";
|
|
165
173
|
};
|
|
166
174
|
};
|
|
167
|
-
|
|
175
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
168
176
|
_: {
|
|
169
177
|
tableName: "migration_state";
|
|
170
178
|
};
|
|
171
179
|
} & {
|
|
172
180
|
_: {
|
|
173
|
-
fieldName: "
|
|
181
|
+
fieldName: "runId";
|
|
174
182
|
};
|
|
175
183
|
};
|
|
176
|
-
|
|
184
|
+
processed: ConvexNumberBuilderInitial<""> & {
|
|
177
185
|
_: {
|
|
178
186
|
notNull: true;
|
|
179
187
|
};
|
|
@@ -183,42 +191,34 @@ declare const migrationStorageTables: {
|
|
|
183
191
|
};
|
|
184
192
|
} & {
|
|
185
193
|
_: {
|
|
186
|
-
fieldName: "
|
|
194
|
+
fieldName: "processed";
|
|
187
195
|
};
|
|
188
196
|
};
|
|
189
|
-
|
|
190
|
-
_: {
|
|
191
|
-
notNull: true;
|
|
192
|
-
};
|
|
193
|
-
} & {
|
|
197
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
194
198
|
_: {
|
|
195
199
|
tableName: "migration_state";
|
|
196
200
|
};
|
|
197
201
|
} & {
|
|
198
202
|
_: {
|
|
199
|
-
fieldName: "
|
|
203
|
+
fieldName: "startedAt";
|
|
200
204
|
};
|
|
201
205
|
};
|
|
202
|
-
|
|
203
|
-
_: {
|
|
204
|
-
notNull: true;
|
|
205
|
-
};
|
|
206
|
-
} & {
|
|
206
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
207
207
|
_: {
|
|
208
208
|
tableName: "migration_state";
|
|
209
209
|
};
|
|
210
210
|
} & {
|
|
211
211
|
_: {
|
|
212
|
-
fieldName: "
|
|
212
|
+
fieldName: "completedAt";
|
|
213
213
|
};
|
|
214
214
|
};
|
|
215
|
-
|
|
215
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
216
216
|
_: {
|
|
217
217
|
tableName: "migration_state";
|
|
218
218
|
};
|
|
219
219
|
} & {
|
|
220
220
|
_: {
|
|
221
|
-
fieldName: "
|
|
221
|
+
fieldName: "lastError";
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
224
|
writeMode: ConvexTextBuilderInitial<""> & {
|
|
@@ -282,7 +282,7 @@ declare const migrationStorageTables: {
|
|
|
282
282
|
fieldName: "updatedAt";
|
|
283
283
|
};
|
|
284
284
|
};
|
|
285
|
-
|
|
285
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
286
286
|
_: {
|
|
287
287
|
notNull: true;
|
|
288
288
|
};
|
|
@@ -292,38 +292,38 @@ declare const migrationStorageTables: {
|
|
|
292
292
|
};
|
|
293
293
|
} & {
|
|
294
294
|
_: {
|
|
295
|
-
fieldName: "
|
|
295
|
+
fieldName: "runId";
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
|
-
|
|
298
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
299
|
+
_: {
|
|
300
|
+
notNull: true;
|
|
301
|
+
};
|
|
302
|
+
} & {
|
|
299
303
|
_: {
|
|
300
304
|
tableName: "migration_run";
|
|
301
305
|
};
|
|
302
306
|
} & {
|
|
303
307
|
_: {
|
|
304
|
-
fieldName: "
|
|
308
|
+
fieldName: "startedAt";
|
|
305
309
|
};
|
|
306
310
|
};
|
|
307
|
-
|
|
311
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
308
312
|
_: {
|
|
309
313
|
tableName: "migration_run";
|
|
310
314
|
};
|
|
311
315
|
} & {
|
|
312
316
|
_: {
|
|
313
|
-
fieldName: "
|
|
317
|
+
fieldName: "completedAt";
|
|
314
318
|
};
|
|
315
319
|
};
|
|
316
|
-
|
|
317
|
-
_: {
|
|
318
|
-
notNull: true;
|
|
319
|
-
};
|
|
320
|
-
} & {
|
|
320
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
321
321
|
_: {
|
|
322
322
|
tableName: "migration_run";
|
|
323
323
|
};
|
|
324
324
|
} & {
|
|
325
325
|
_: {
|
|
326
|
-
fieldName: "
|
|
326
|
+
fieldName: "lastError";
|
|
327
327
|
};
|
|
328
328
|
};
|
|
329
329
|
dryRun: ConvexBooleanBuilderInitial<""> & {
|
|
@@ -1326,11 +1326,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1326
1326
|
readonly aggregate_extrema: ConvexTableWithColumns<{
|
|
1327
1327
|
name: "aggregate_extrema";
|
|
1328
1328
|
columns: {
|
|
1329
|
-
|
|
1330
|
-
_: {
|
|
1331
|
-
$type: convex_values0.Value;
|
|
1332
|
-
};
|
|
1333
|
-
} & {
|
|
1329
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
1334
1330
|
_: {
|
|
1335
1331
|
notNull: true;
|
|
1336
1332
|
};
|
|
@@ -1340,10 +1336,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1340
1336
|
};
|
|
1341
1337
|
} & {
|
|
1342
1338
|
_: {
|
|
1343
|
-
fieldName: "
|
|
1339
|
+
fieldName: "count";
|
|
1344
1340
|
};
|
|
1345
1341
|
};
|
|
1346
|
-
|
|
1342
|
+
value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
|
|
1343
|
+
_: {
|
|
1344
|
+
$type: convex_values0.Value;
|
|
1345
|
+
};
|
|
1346
|
+
} & {
|
|
1347
1347
|
_: {
|
|
1348
1348
|
notNull: true;
|
|
1349
1349
|
};
|
|
@@ -1353,7 +1353,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1353
1353
|
};
|
|
1354
1354
|
} & {
|
|
1355
1355
|
_: {
|
|
1356
|
-
fieldName: "
|
|
1356
|
+
fieldName: "value";
|
|
1357
1357
|
};
|
|
1358
1358
|
};
|
|
1359
1359
|
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
@@ -1631,7 +1631,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1631
1631
|
fieldName: "updatedAt";
|
|
1632
1632
|
};
|
|
1633
1633
|
};
|
|
1634
|
-
|
|
1634
|
+
processed: ConvexNumberBuilderInitial<""> & {
|
|
1635
1635
|
_: {
|
|
1636
1636
|
notNull: true;
|
|
1637
1637
|
};
|
|
@@ -1641,10 +1641,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1641
1641
|
};
|
|
1642
1642
|
} & {
|
|
1643
1643
|
_: {
|
|
1644
|
-
fieldName: "
|
|
1644
|
+
fieldName: "processed";
|
|
1645
1645
|
};
|
|
1646
1646
|
};
|
|
1647
|
-
|
|
1647
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
1648
1648
|
_: {
|
|
1649
1649
|
notNull: true;
|
|
1650
1650
|
};
|
|
@@ -1654,23 +1654,28 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1654
1654
|
};
|
|
1655
1655
|
} & {
|
|
1656
1656
|
_: {
|
|
1657
|
-
fieldName: "
|
|
1657
|
+
fieldName: "startedAt";
|
|
1658
1658
|
};
|
|
1659
1659
|
};
|
|
1660
|
-
|
|
1660
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
1661
1661
|
_: {
|
|
1662
|
-
|
|
1662
|
+
tableName: "aggregate_state";
|
|
1663
1663
|
};
|
|
1664
1664
|
} & {
|
|
1665
|
+
_: {
|
|
1666
|
+
fieldName: "completedAt";
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1669
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
1665
1670
|
_: {
|
|
1666
1671
|
tableName: "aggregate_state";
|
|
1667
1672
|
};
|
|
1668
1673
|
} & {
|
|
1669
1674
|
_: {
|
|
1670
|
-
fieldName: "
|
|
1675
|
+
fieldName: "lastError";
|
|
1671
1676
|
};
|
|
1672
1677
|
};
|
|
1673
|
-
|
|
1678
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1674
1679
|
_: {
|
|
1675
1680
|
notNull: true;
|
|
1676
1681
|
};
|
|
@@ -1680,10 +1685,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1680
1685
|
};
|
|
1681
1686
|
} & {
|
|
1682
1687
|
_: {
|
|
1683
|
-
fieldName: "
|
|
1688
|
+
fieldName: "indexName";
|
|
1684
1689
|
};
|
|
1685
1690
|
};
|
|
1686
|
-
|
|
1691
|
+
keyDefinitionHash: ConvexTextBuilderInitial<""> & {
|
|
1687
1692
|
_: {
|
|
1688
1693
|
notNull: true;
|
|
1689
1694
|
};
|
|
@@ -1693,25 +1698,20 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1693
1698
|
};
|
|
1694
1699
|
} & {
|
|
1695
1700
|
_: {
|
|
1696
|
-
fieldName: "
|
|
1701
|
+
fieldName: "keyDefinitionHash";
|
|
1697
1702
|
};
|
|
1698
1703
|
};
|
|
1699
|
-
|
|
1704
|
+
metricDefinitionHash: ConvexTextBuilderInitial<""> & {
|
|
1700
1705
|
_: {
|
|
1701
|
-
|
|
1706
|
+
notNull: true;
|
|
1702
1707
|
};
|
|
1703
1708
|
} & {
|
|
1704
|
-
_: {
|
|
1705
|
-
fieldName: "completedAt";
|
|
1706
|
-
};
|
|
1707
|
-
};
|
|
1708
|
-
lastError: ConvexTextBuilderInitial<""> & {
|
|
1709
1709
|
_: {
|
|
1710
1710
|
tableName: "aggregate_state";
|
|
1711
1711
|
};
|
|
1712
1712
|
} & {
|
|
1713
1713
|
_: {
|
|
1714
|
-
fieldName: "
|
|
1714
|
+
fieldName: "metricDefinitionHash";
|
|
1715
1715
|
};
|
|
1716
1716
|
};
|
|
1717
1717
|
tableKey: ConvexTextBuilderInitial<""> & {
|
|
@@ -1782,7 +1782,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1782
1782
|
fieldName: "updatedAt";
|
|
1783
1783
|
};
|
|
1784
1784
|
};
|
|
1785
|
-
|
|
1785
|
+
migrationId: ConvexTextBuilderInitial<""> & {
|
|
1786
1786
|
_: {
|
|
1787
1787
|
notNull: true;
|
|
1788
1788
|
};
|
|
@@ -1792,37 +1792,45 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1792
1792
|
};
|
|
1793
1793
|
} & {
|
|
1794
1794
|
_: {
|
|
1795
|
-
fieldName: "
|
|
1795
|
+
fieldName: "migrationId";
|
|
1796
1796
|
};
|
|
1797
1797
|
};
|
|
1798
|
-
|
|
1798
|
+
checksum: ConvexTextBuilderInitial<""> & {
|
|
1799
|
+
_: {
|
|
1800
|
+
notNull: true;
|
|
1801
|
+
};
|
|
1802
|
+
} & {
|
|
1799
1803
|
_: {
|
|
1800
1804
|
tableName: "migration_state";
|
|
1801
1805
|
};
|
|
1802
1806
|
} & {
|
|
1803
1807
|
_: {
|
|
1804
|
-
fieldName: "
|
|
1808
|
+
fieldName: "checksum";
|
|
1805
1809
|
};
|
|
1806
1810
|
};
|
|
1807
|
-
|
|
1811
|
+
applied: ConvexBooleanBuilderInitial<""> & {
|
|
1812
|
+
_: {
|
|
1813
|
+
notNull: true;
|
|
1814
|
+
};
|
|
1815
|
+
} & {
|
|
1808
1816
|
_: {
|
|
1809
1817
|
tableName: "migration_state";
|
|
1810
1818
|
};
|
|
1811
1819
|
} & {
|
|
1812
1820
|
_: {
|
|
1813
|
-
fieldName: "
|
|
1821
|
+
fieldName: "applied";
|
|
1814
1822
|
};
|
|
1815
1823
|
};
|
|
1816
|
-
|
|
1824
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
1817
1825
|
_: {
|
|
1818
1826
|
tableName: "migration_state";
|
|
1819
1827
|
};
|
|
1820
1828
|
} & {
|
|
1821
1829
|
_: {
|
|
1822
|
-
fieldName: "
|
|
1830
|
+
fieldName: "runId";
|
|
1823
1831
|
};
|
|
1824
1832
|
};
|
|
1825
|
-
|
|
1833
|
+
processed: ConvexNumberBuilderInitial<""> & {
|
|
1826
1834
|
_: {
|
|
1827
1835
|
notNull: true;
|
|
1828
1836
|
};
|
|
@@ -1832,42 +1840,34 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1832
1840
|
};
|
|
1833
1841
|
} & {
|
|
1834
1842
|
_: {
|
|
1835
|
-
fieldName: "
|
|
1843
|
+
fieldName: "processed";
|
|
1836
1844
|
};
|
|
1837
1845
|
};
|
|
1838
|
-
|
|
1839
|
-
_: {
|
|
1840
|
-
notNull: true;
|
|
1841
|
-
};
|
|
1842
|
-
} & {
|
|
1846
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
1843
1847
|
_: {
|
|
1844
1848
|
tableName: "migration_state";
|
|
1845
1849
|
};
|
|
1846
1850
|
} & {
|
|
1847
1851
|
_: {
|
|
1848
|
-
fieldName: "
|
|
1852
|
+
fieldName: "startedAt";
|
|
1849
1853
|
};
|
|
1850
1854
|
};
|
|
1851
|
-
|
|
1852
|
-
_: {
|
|
1853
|
-
notNull: true;
|
|
1854
|
-
};
|
|
1855
|
-
} & {
|
|
1855
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
1856
1856
|
_: {
|
|
1857
1857
|
tableName: "migration_state";
|
|
1858
1858
|
};
|
|
1859
1859
|
} & {
|
|
1860
1860
|
_: {
|
|
1861
|
-
fieldName: "
|
|
1861
|
+
fieldName: "completedAt";
|
|
1862
1862
|
};
|
|
1863
1863
|
};
|
|
1864
|
-
|
|
1864
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
1865
1865
|
_: {
|
|
1866
1866
|
tableName: "migration_state";
|
|
1867
1867
|
};
|
|
1868
1868
|
} & {
|
|
1869
1869
|
_: {
|
|
1870
|
-
fieldName: "
|
|
1870
|
+
fieldName: "lastError";
|
|
1871
1871
|
};
|
|
1872
1872
|
};
|
|
1873
1873
|
writeMode: ConvexTextBuilderInitial<""> & {
|
|
@@ -1931,7 +1931,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1931
1931
|
fieldName: "updatedAt";
|
|
1932
1932
|
};
|
|
1933
1933
|
};
|
|
1934
|
-
|
|
1934
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
1935
1935
|
_: {
|
|
1936
1936
|
notNull: true;
|
|
1937
1937
|
};
|
|
@@ -1941,38 +1941,38 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1941
1941
|
};
|
|
1942
1942
|
} & {
|
|
1943
1943
|
_: {
|
|
1944
|
-
fieldName: "
|
|
1944
|
+
fieldName: "runId";
|
|
1945
1945
|
};
|
|
1946
1946
|
};
|
|
1947
|
-
|
|
1947
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
1948
|
+
_: {
|
|
1949
|
+
notNull: true;
|
|
1950
|
+
};
|
|
1951
|
+
} & {
|
|
1948
1952
|
_: {
|
|
1949
1953
|
tableName: "migration_run";
|
|
1950
1954
|
};
|
|
1951
1955
|
} & {
|
|
1952
1956
|
_: {
|
|
1953
|
-
fieldName: "
|
|
1957
|
+
fieldName: "startedAt";
|
|
1954
1958
|
};
|
|
1955
1959
|
};
|
|
1956
|
-
|
|
1960
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
1957
1961
|
_: {
|
|
1958
1962
|
tableName: "migration_run";
|
|
1959
1963
|
};
|
|
1960
1964
|
} & {
|
|
1961
1965
|
_: {
|
|
1962
|
-
fieldName: "
|
|
1966
|
+
fieldName: "completedAt";
|
|
1963
1967
|
};
|
|
1964
1968
|
};
|
|
1965
|
-
|
|
1966
|
-
_: {
|
|
1967
|
-
notNull: true;
|
|
1968
|
-
};
|
|
1969
|
-
} & {
|
|
1969
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
1970
1970
|
_: {
|
|
1971
1971
|
tableName: "migration_run";
|
|
1972
1972
|
};
|
|
1973
1973
|
} & {
|
|
1974
1974
|
_: {
|
|
1975
|
-
fieldName: "
|
|
1975
|
+
fieldName: "lastError";
|
|
1976
1976
|
};
|
|
1977
1977
|
};
|
|
1978
1978
|
dryRun: ConvexBooleanBuilderInitial<""> & {
|
package/package.json
CHANGED
package/skills/kitcn/SKILL.md
CHANGED
|
@@ -34,7 +34,7 @@ Only remember these non-parity deltas:
|
|
|
34
34
|
2. No `z.void()` outputs; omit `.output(...)` for no-value mutations.
|
|
35
35
|
3. `.output(...)` parses the handler's value as-is and substitutes nothing: a handler must return the schema's *input* type, so `z.string().nullable()` needs an explicit `null` (`?? null`), not `undefined`. Model absent values as `.nullable()`, never a top-level `.optional()` — Convex wires `undefined` as `null` and cannot express top-level optionality, so `.output(z.string().optional())` publishes `v.string()` and the deployment rejects the `null` whenever the handler returns `undefined`. `.optional()` inside an object is fine. The low-level `returns:` option on `zCustomQuery`/`zCustomMutation`/`zCustomAction` differs — it substitutes `null` for `undefined` before parsing.
|
|
36
36
|
4. Stacked `.input(...)` calls merge input shapes.
|
|
37
|
-
5. `.paginated({ limit, item })` must be before `.query()` and
|
|
37
|
+
5. `.paginated({ limit, item })` must be before `.query()` and adds `input.cursor`, `input.endCursor`, and `input.limit`; pass all three to ORM cursor queries so live splits stay bounded.
|
|
38
38
|
6. Metadata is codegen’d onto `@convex/api` leaves (`api.namespace.fn.meta`) so never put secrets in `.meta(...)`; chaining `.meta(...)` is shallow merge and supports `defaultMeta`.
|
|
39
39
|
7. Auth metadata drives client behavior: `auth: "optional"` waits for auth load then runs, `auth: "required"` waits then skips when logged out.
|
|
40
40
|
8. `ctx.orm` enforces constraints + RLS; `ctx.db` bypasses them.
|
|
@@ -245,6 +245,7 @@ export const listProjects = authQuery
|
|
|
245
245
|
where: { ownerId: ctx.userId },
|
|
246
246
|
orderBy: { updatedAt: "desc" },
|
|
247
247
|
cursor: input.cursor,
|
|
248
|
+
endCursor: input.endCursor,
|
|
248
249
|
limit: input.limit,
|
|
249
250
|
})
|
|
250
251
|
);
|
|
@@ -374,20 +374,19 @@ export const list = publicQuery
|
|
|
374
374
|
.input(z.object({ userId: z.string().optional() }))
|
|
375
375
|
.paginated({ limit: 20, item: SessionSchema })
|
|
376
376
|
.query(async ({ ctx, input }) => {
|
|
377
|
-
// input.cursor and input.limit auto-added
|
|
378
377
|
return ctx.orm.query.session.findMany({
|
|
379
378
|
where: input.userId ? { userId: input.userId } : undefined,
|
|
380
379
|
orderBy: { createdAt: 'desc' },
|
|
381
380
|
cursor: input.cursor,
|
|
381
|
+
endCursor: input.endCursor,
|
|
382
382
|
limit: input.limit,
|
|
383
383
|
});
|
|
384
|
-
// output auto-wrapped as { continueCursor, isDone, page }
|
|
385
384
|
});
|
|
386
385
|
```
|
|
387
386
|
|
|
388
387
|
`.paginated({ limit, item })`:
|
|
389
|
-
- Adds `cursor`
|
|
390
|
-
-
|
|
388
|
+
- Adds `cursor`, optional `endCursor`, and `limit` to input
|
|
389
|
+
- Accepts the full Convex page result, including `pageStatus` and `splitCursor`
|
|
391
390
|
- Must be called before `.query()`
|
|
392
391
|
|
|
393
392
|
### Return Value
|
|
@@ -414,7 +413,7 @@ const { data, isPlaceholderData } = useInfiniteQuery(
|
|
|
414
413
|
|
|
415
414
|
### Real-time & Error Recovery
|
|
416
415
|
|
|
417
|
-
Each page maintains its own WebSocket subscription.
|
|
416
|
+
Each page maintains its own WebSocket subscription. Split pages use `endCursor` to keep adjacent subscriptions bounded. An `InvalidCursor` on a loaded page resets the list cleanly to page 0. Pagination state persists in `queryClient` for scroll restoration.
|
|
418
417
|
|
|
419
418
|
---
|
|
420
419
|
|