kitcn 0.25.0 → 0.25.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/dist/aggregate/index.d.ts +10 -10
- package/dist/aggregate/index.js +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/auth/nextjs/index.d.ts +1 -1
- package/dist/{builder-1Vx-tEnS.js → builder-DoeyW4Vq.js} +71 -65
- package/dist/cli.mjs +154 -39
- package/dist/{customFunctions-BbhgdRGl.js → customFunctions-ivbc6-_g.js} +1 -1
- package/dist/{definitions-D9vhJ6OV.js → definitions-Dzk8mSTL.js} +2 -2
- package/dist/{extensions-DzjCJXYl.js → extensions-Blzsyekm.js} +1 -1
- package/dist/{id-Bibg34Yb.js → id-CuSfWa5q.js} +1 -1
- package/dist/{local-env-Du24tdbp.mjs → local-env-Dkh4a_BK.mjs} +1 -0
- package/dist/{middleware-cJDRHTRY.js → middleware-DIj-bwVi.js} +1 -1
- package/dist/orm/aggregate-index/index.js +3 -3
- package/dist/orm/index.d.ts +2 -2
- package/dist/orm/index.js +43 -10
- package/dist/orm/migrations/index.d.ts +1 -1
- package/dist/orm/migrations/index.js +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-DIzXfX2E.js → procedure-caller-Dxae9DW5.js} +3 -3
- package/dist/{procedure-name-B09-cf1-.d.ts → procedure-name-l2YusEZI.d.ts} +55 -52
- package/dist/ratelimit/index.js +2 -2
- package/dist/{runtime-DfGsZtx3.js → runtime-BdqTbgKh.js} +9 -3
- package/dist/{schema-Besl-rpv.js → schema-D8sVYuYO.js} +28 -14
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/dist/{table-rmJm5Qio.js → table-CX2lnX7e.js} +1 -1
- package/dist/{validators-Dmbhsd3U.js → validators-CIoUYCqO.js} +1 -0
- package/dist/{validators-V4eM2-Jg.d.ts → validators-wOIjhkfN.d.ts} +7 -1
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-mohWFiG0.d.ts → where-clause-compiler-TMNQB6US.d.ts} +103 -56
- package/package.json +4 -3
- package/skills/kitcn/SKILL.md +1 -1
- package/skills/kitcn/references/features/auth-polar.md +2 -2
- package/skills/kitcn/references/features/scheduling.md +1 -1
- package/skills/kitcn/references/setup/auth.md +1 -1
- package/skills/kitcn/references/setup/index.md +3 -3
|
@@ -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,
|
|
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
|
-
|
|
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 =
|
|
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
|
|
643
|
-
type InferNestedValue<TInput extends NestedInput> = TInput extends AnyColumnBuilder ? InferBuilderNestedValue<TInput> : TInput extends
|
|
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 |
|
|
646
|
-
type ConvexCustomBuilderInitial<TName extends string, TValidator extends
|
|
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
|
|
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
|
|
663
|
-
declare function custom<TName extends string, TValidator extends
|
|
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[],
|
|
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, [
|
|
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<"",
|
|
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
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1025
|
+
_: {
|
|
1026
|
+
notNull: true;
|
|
1027
|
+
};
|
|
1028
|
+
} & {
|
|
1029
|
+
_: {
|
|
1030
|
+
tableName: "aggregate_bucket";
|
|
1031
|
+
};
|
|
1032
|
+
} & {
|
|
1033
|
+
_: {
|
|
1034
|
+
fieldName: "indexName";
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1018
1037
|
tableKey: ConvexTextBuilderInitial<""> & {
|
|
1019
1038
|
_: {
|
|
1020
1039
|
notNull: true;
|
|
@@ -1028,7 +1047,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1028
1047
|
fieldName: "tableKey";
|
|
1029
1048
|
};
|
|
1030
1049
|
};
|
|
1031
|
-
|
|
1050
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
1032
1051
|
_: {
|
|
1033
1052
|
notNull: true;
|
|
1034
1053
|
};
|
|
@@ -1038,7 +1057,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1038
1057
|
};
|
|
1039
1058
|
} & {
|
|
1040
1059
|
_: {
|
|
1041
|
-
fieldName: "
|
|
1060
|
+
fieldName: "count";
|
|
1042
1061
|
};
|
|
1043
1062
|
};
|
|
1044
1063
|
keyHash: ConvexTextBuilderInitial<""> & {
|
|
@@ -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.
|
|
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
|
-
|
|
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: "
|
|
1107
|
+
fieldName: "sumValues";
|
|
1085
1108
|
};
|
|
1086
1109
|
};
|
|
1087
|
-
|
|
1110
|
+
nonNullCountValues: ConvexCustomBuilderInitial<"", ConvexValidatorLike> & {
|
|
1088
1111
|
_: {
|
|
1089
|
-
|
|
1112
|
+
$type: Record<string, number>;
|
|
1090
1113
|
};
|
|
1091
1114
|
} & {
|
|
1092
1115
|
_: {
|
|
1093
|
-
|
|
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
|
};
|
|
@@ -1137,7 +1159,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1137
1159
|
fieldName: "updatedAt";
|
|
1138
1160
|
};
|
|
1139
1161
|
};
|
|
1140
|
-
|
|
1162
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1141
1163
|
_: {
|
|
1142
1164
|
notNull: true;
|
|
1143
1165
|
};
|
|
@@ -1147,10 +1169,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1147
1169
|
};
|
|
1148
1170
|
} & {
|
|
1149
1171
|
_: {
|
|
1150
|
-
fieldName: "
|
|
1172
|
+
fieldName: "indexName";
|
|
1151
1173
|
};
|
|
1152
1174
|
};
|
|
1153
|
-
|
|
1175
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
1154
1176
|
_: {
|
|
1155
1177
|
notNull: true;
|
|
1156
1178
|
};
|
|
@@ -1160,7 +1182,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1160
1182
|
};
|
|
1161
1183
|
} & {
|
|
1162
1184
|
_: {
|
|
1163
|
-
fieldName: "
|
|
1185
|
+
fieldName: "tableKey";
|
|
1164
1186
|
};
|
|
1165
1187
|
};
|
|
1166
1188
|
keyHash: ConvexTextBuilderInitial<""> & {
|
|
@@ -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.
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
1356
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
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: "
|
|
1366
|
+
fieldName: "indexName";
|
|
1321
1367
|
};
|
|
1322
1368
|
};
|
|
1323
|
-
|
|
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: "
|
|
1379
|
+
fieldName: "tableKey";
|
|
1334
1380
|
};
|
|
1335
1381
|
};
|
|
1336
|
-
|
|
1382
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
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: "
|
|
1392
|
+
fieldName: "count";
|
|
1347
1393
|
};
|
|
1348
1394
|
};
|
|
1349
|
-
|
|
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: "
|
|
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:
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
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.
|
|
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.
|
|
1555
|
+
subtrees: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.Validator<any, "required", any>, "required">> & {
|
|
1509
1556
|
_: {
|
|
1510
1557
|
$type: string[];
|
|
1511
1558
|
};
|
|
@@ -1621,7 +1668,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1621
1668
|
fieldName: "lastError";
|
|
1622
1669
|
};
|
|
1623
1670
|
};
|
|
1624
|
-
|
|
1671
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1625
1672
|
_: {
|
|
1626
1673
|
notNull: true;
|
|
1627
1674
|
};
|
|
@@ -1631,10 +1678,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1631
1678
|
};
|
|
1632
1679
|
} & {
|
|
1633
1680
|
_: {
|
|
1634
|
-
fieldName: "
|
|
1681
|
+
fieldName: "indexName";
|
|
1635
1682
|
};
|
|
1636
1683
|
};
|
|
1637
|
-
|
|
1684
|
+
keyDefinitionHash: ConvexTextBuilderInitial<""> & {
|
|
1638
1685
|
_: {
|
|
1639
1686
|
notNull: true;
|
|
1640
1687
|
};
|
|
@@ -1644,10 +1691,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1644
1691
|
};
|
|
1645
1692
|
} & {
|
|
1646
1693
|
_: {
|
|
1647
|
-
fieldName: "
|
|
1694
|
+
fieldName: "keyDefinitionHash";
|
|
1648
1695
|
};
|
|
1649
1696
|
};
|
|
1650
|
-
|
|
1697
|
+
metricDefinitionHash: ConvexTextBuilderInitial<""> & {
|
|
1651
1698
|
_: {
|
|
1652
1699
|
notNull: true;
|
|
1653
1700
|
};
|
|
@@ -1657,10 +1704,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1657
1704
|
};
|
|
1658
1705
|
} & {
|
|
1659
1706
|
_: {
|
|
1660
|
-
fieldName: "
|
|
1707
|
+
fieldName: "metricDefinitionHash";
|
|
1661
1708
|
};
|
|
1662
1709
|
};
|
|
1663
|
-
|
|
1710
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
1664
1711
|
_: {
|
|
1665
1712
|
notNull: true;
|
|
1666
1713
|
};
|
|
@@ -1670,7 +1717,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1670
1717
|
};
|
|
1671
1718
|
} & {
|
|
1672
1719
|
_: {
|
|
1673
|
-
fieldName: "
|
|
1720
|
+
fieldName: "tableKey";
|
|
1674
1721
|
};
|
|
1675
1722
|
};
|
|
1676
1723
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kitcn",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2",
|
|
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:
|
|
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",
|
package/skills/kitcn/SKILL.md
CHANGED
|
@@ -231,7 +231,7 @@ Builder rules that matter:
|
|
|
231
231
|
### 3) Query + Mutation Procedure Template
|
|
232
232
|
|
|
233
233
|
```ts
|
|
234
|
-
import
|
|
234
|
+
import * as z from "zod";
|
|
235
235
|
import { eq } from "kitcn/orm";
|
|
236
236
|
import { CRPCError } from "kitcn/server";
|
|
237
237
|
import { authMutation, authQuery } from "../lib/crpc";
|
|
@@ -388,7 +388,7 @@ webhooks({
|
|
|
388
388
|
// convex/functions/polarCustomer.ts
|
|
389
389
|
import '../lib/polar-polyfills';
|
|
390
390
|
import { CRPCError } from 'kitcn/server';
|
|
391
|
-
import
|
|
391
|
+
import * as z from 'zod';
|
|
392
392
|
import { privateAction, privateMutation } from '../lib/crpc';
|
|
393
393
|
import { getPolarClient } from '../lib/polar-client';
|
|
394
394
|
|
|
@@ -434,7 +434,7 @@ export const updateUserPolarCustomerId = privateMutation
|
|
|
434
434
|
// convex/functions/polarSubscription.ts
|
|
435
435
|
import '../lib/polar-polyfills';
|
|
436
436
|
import { CRPCError } from 'kitcn/server';
|
|
437
|
-
import
|
|
437
|
+
import * as z from 'zod';
|
|
438
438
|
import { privateMutation, privateQuery } from '../lib/crpc';
|
|
439
439
|
import { authAction } from '../lib/crpc-action';
|
|
440
440
|
import { getPolarClient } from '../lib/polar-client';
|
|
@@ -66,7 +66,7 @@ Format: `minute hour day-of-month month day-of-week`. Runs in **UTC**. Minimum i
|
|
|
66
66
|
|
|
67
67
|
```ts
|
|
68
68
|
// convex/functions/crons.ts
|
|
69
|
-
import
|
|
69
|
+
import * as z from 'zod';
|
|
70
70
|
import { privateMutation, privateAction } from '../lib/crpc';
|
|
71
71
|
import { createAnalyticsCaller } from './generated/analytics.runtime';
|
|
72
72
|
import { createReportsCaller } from './generated/reports.runtime';
|
|
@@ -397,7 +397,7 @@ When multiple Convex functions and libs share env values (auth, billing, dev gua
|
|
|
397
397
|
|
|
398
398
|
```ts
|
|
399
399
|
import { createEnv } from "kitcn/server";
|
|
400
|
-
import
|
|
400
|
+
import * as z from "zod";
|
|
401
401
|
|
|
402
402
|
export const getEnv = createEnv({
|
|
403
403
|
schema: z.object({
|
|
@@ -447,7 +447,7 @@ If you want the same operational model as the scaffolded baseline, use these can
|
|
|
447
447
|
**Create:** `convex/functions/init.ts`
|
|
448
448
|
|
|
449
449
|
```ts
|
|
450
|
-
import
|
|
450
|
+
import * as z from "zod";
|
|
451
451
|
|
|
452
452
|
import { createUser } from "../lib/auth/auth-helpers";
|
|
453
453
|
import { privateMutation } from "../lib/crpc";
|
|
@@ -499,7 +499,7 @@ export default privateMutation
|
|
|
499
499
|
/** biome-ignore-all lint/suspicious/noExplicitAny: dev */
|
|
500
500
|
import { eq } from "kitcn/orm";
|
|
501
501
|
import { CRPCError } from "kitcn/server";
|
|
502
|
-
import
|
|
502
|
+
import * as z from "zod";
|
|
503
503
|
|
|
504
504
|
import { privateAction, privateMutation } from "../lib/crpc";
|
|
505
505
|
import { getEnv } from "../lib/get-env";
|