kitcn 0.25.1 → 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.
@@ -1,3 +1,3 @@
1
- import { n as resolvePluginOptions, t as definePlugin } from "../middleware-CdqNVyp8.js";
1
+ import { n as resolvePluginOptions, t as definePlugin } from "../middleware-DIj-bwVi.js";
2
2
 
3
3
  export { definePlugin, resolvePluginOptions };
@@ -1,6 +1,6 @@
1
1
  import { i as decodeWire, o as encodeWire } from "./transformer-D8wO-kEj.js";
2
- import { _ as CRPCError } from "./builder-C6JSHkRK.js";
3
- import { z } from "zod";
2
+ import { _ as CRPCError } from "./builder-DoeyW4Vq.js";
3
+ import * as z$1 from "zod";
4
4
 
5
5
  //#region src/server/env.ts
6
6
  function createEnv(options) {
@@ -34,7 +34,7 @@ function createEnv(options) {
34
34
  ...Object.fromEntries(Object.entries(schema.shape).map(([key, zodType]) => {
35
35
  const result = zodType.safeParse(void 0);
36
36
  if (!result.success) {
37
- if (zodType instanceof z.ZodEnum && Array.isArray(zodType.options) && zodType.options.length > 0) return [key, zodType.options[0]];
37
+ if (zodType instanceof z$1.ZodEnum && Array.isArray(zodType.options) && zodType.options.length > 0) return [key, zodType.options[0]];
38
38
  return [key, ""];
39
39
  }
40
40
  return [key, typeof result.data === "string" ? result.data : void 0];
@@ -3,8 +3,8 @@ import { A as HttpProcedureBuilderDef, D as HttpHandlerOpts, L as DataTransforme
3
3
  import { g as UnsetMarker, i as IntersectIfDefined, o as MiddlewareBuilder, p as Overwrite$1, s as MiddlewareFunction, t as AnyMiddleware } from "./types-eNzQmbqM.js";
4
4
  import { ConvexError, GenericId, GenericValidator, ObjectType, OptionalProperty, PropertyValidators, VAny, VArray, VBoolean, VBytes, VFloat64, VId, VInt64, VLiteral, VNull, VObject, VOptional, VRecord, VString, VUnion, Validator, Value as Value$1 } from "convex/values";
5
5
  import { ActionBuilder, ArgsArrayToObject, DefaultFunctionArgs, FunctionReference, FunctionReturnType, FunctionVisibility, GenericActionCtx, GenericDataModel, GenericMutationCtx, GenericQueryCtx, MutationBuilder, QueryBuilder, RegisteredAction, RegisteredMutation, RegisteredQuery, TableNamesInDataModel } from "convex/server";
6
- import { z } from "zod";
7
- import * as z$1 from "zod/v4";
6
+ import * as z$1 from "zod";
7
+ import * as z$2 from "zod/v4";
8
8
  import * as zCore from "zod/v4/core";
9
9
 
10
10
  //#region src/internal/upstream/index.d.ts
@@ -264,7 +264,7 @@ declare function zCustomAction<CustomArgsValidator extends PropertyValidators, C
264
264
  */
265
265
  declare const zid: <DataModel extends GenericDataModel, TableName extends TableNamesInDataModel<DataModel> = TableNamesInDataModel<DataModel>>(tableName: TableName) => Zid<TableName>;
266
266
  /** The type of Convex validators in Zod */
267
- type Zid<TableName extends string> = z$1.ZodCustom<GenericId<TableName>> & zCore.$ZodRecordKey;
267
+ type Zid<TableName extends string> = z$2.ZodCustom<GenericId<TableName>> & zCore.$ZodRecordKey;
268
268
  /**
269
269
  * Useful to get the input context type for a custom function using Zod.
270
270
  */
@@ -490,7 +490,7 @@ declare function withSystemFields<Table extends string, T extends {
490
490
  [key: string]: zCore.$ZodType;
491
491
  }>(tableName: Table, zObject: T): T & {
492
492
  _id: Zid<Table>;
493
- _creationTime: z$1.ZodNumber;
493
+ _creationTime: z$2.ZodNumber;
494
494
  };
495
495
  /**
496
496
  * A builder that customizes a Convex function, whether or not it validates
@@ -534,7 +534,7 @@ type Returns<T> = Promise<NullToUndefinedOrNull<T>> | NullToUndefinedOrNull<T>;
534
534
  type ReturnValueInput<ReturnsValidator extends zCore.$ZodType | ZodFields | void> = [ReturnsValidator] extends [zCore.$ZodType] ? Returns<zCore.input<ReturnsValidator>> : [ReturnsValidator] extends [ZodFields] ? Returns<zCore.input<zCore.$ZodObject<ReturnsValidator>>> : any;
535
535
  type ReturnValueOutput<ReturnsValidator extends zCore.$ZodType | ZodFields | void> = [ReturnsValidator] extends [zCore.$ZodType] ? Returns<zCore.output<ReturnsValidator>> : [ReturnsValidator] extends [ZodFields] ? Returns<zCore.output<zCore.$ZodObject<ReturnsValidator, zCore.$strict>>> : any;
536
536
  type ReturnValueForHandler<ReturnsValidator extends zCore.$ZodType | ZodFields | void, SkipZodReturnsValidation extends boolean> = SkipZodReturnsValidation extends true ? ReturnValueOutput<ReturnsValidator> : ReturnValueInput<ReturnsValidator>;
537
- type ArgsInput<ArgsValidator extends ZodFields | zCore.$ZodObject<any> | void> = [ArgsValidator] extends [zCore.$ZodObject<any>] ? [zCore.input<ArgsValidator>] : ArgsValidator extends Record<string, never> ? [{}] : [ArgsValidator] extends [Record<string, z$1.ZodTypeAny>] ? [zCore.input<zCore.$ZodObject<ArgsValidator, zCore.$strict>>] : OneArgArray;
537
+ type ArgsInput<ArgsValidator extends ZodFields | zCore.$ZodObject<any> | void> = [ArgsValidator] extends [zCore.$ZodObject<any>] ? [zCore.input<ArgsValidator>] : ArgsValidator extends Record<string, never> ? [{}] : [ArgsValidator] extends [Record<string, z$2.ZodTypeAny>] ? [zCore.input<zCore.$ZodObject<ArgsValidator, zCore.$strict>>] : OneArgArray;
538
538
  type ArgsOutput<ArgsValidator extends ZodFields | zCore.$ZodObject<any> | void> = [ArgsValidator] extends [zCore.$ZodObject<any>] ? [zCore.output<ArgsValidator>] : [ArgsValidator] extends [ZodFields] ? [zCore.output<zCore.$ZodObject<ArgsValidator, zCore.$strict>>] : OneArgArray;
539
539
  type Overwrite<T, U> = Omit<T, keyof U> & U;
540
540
  type OneArgArray<ArgsObject extends DefaultFunctionArgs = DefaultFunctionArgs> = [ArgsObject];
@@ -567,14 +567,14 @@ type IsUnknownOrAny<T> = 0 extends 1 & T ? true : unknown extends T ? true : fal
567
567
  * ZodValidatorFromConvex<typeof v.string()> // → z.ZodString
568
568
  * ```
569
569
  */
570
- type ZodValidatorFromConvex<V extends GenericValidator> = V extends Validator<any, 'optional', any> ? z$1.ZodOptional<ZodFromValidatorBase<VRequired<V>>> : ZodFromValidatorBase<V>;
571
- type ZodFromValidatorBase<V extends GenericValidator> = V extends VId<infer Type> ? Zid<TableNameFromType<NotUndefined<Type>>> : V extends VString<infer T> ? BrandIfBranded<T, z$1.ZodString> : V extends VFloat64<infer T> ? BrandIfBranded<T, z$1.ZodNumber> : V extends VInt64<any> ? z$1.ZodBigInt : V extends {
570
+ type ZodValidatorFromConvex<V extends GenericValidator> = V extends Validator<any, 'optional', any> ? z$2.ZodOptional<ZodFromValidatorBase<VRequired<V>>> : ZodFromValidatorBase<V>;
571
+ type ZodFromValidatorBase<V extends GenericValidator> = V extends VId<infer Type> ? Zid<TableNameFromType<NotUndefined<Type>>> : V extends VString<infer T> ? BrandIfBranded<T, z$2.ZodString> : V extends VFloat64<infer T> ? BrandIfBranded<T, z$2.ZodNumber> : V extends VInt64<any> ? z$2.ZodBigInt : V extends {
572
572
  readonly kind: 'commitTs';
573
573
  readonly type: infer Type;
574
- } ? z$1.ZodType<NotUndefined<Type>> : V extends VBoolean<any> ? z$1.ZodBoolean : V extends VNull<any> ? z$1.ZodNull : V extends VArray<any, infer Element> ? Element extends VArray<any, any> ? z$1.ZodArray<zCore.SomeType> : z$1.ZodArray<ZodFromValidatorBase<Element>> : V extends VObject<any, infer Fields extends Record<string, GenericValidator>> ? z$1.ZodObject<ZodShapeFromConvexObject<Fields>, zCore.$strict> : V extends VBytes<any, any> ? never : V extends VLiteral<infer T extends zCore.util.Literal, OptionalProperty> ? z$1.ZodLiteral<NotUndefined<T>> : V extends VRecord<any, infer Key, infer Value, OptionalProperty, any> ? z$1.ZodRecord<ZodFromStringValidator<Key>, ZodFromValidatorBase<Value>> : V extends VUnion<any, [], OptionalProperty, any> ? z$1.ZodNever : V extends VUnion<any, [infer I extends GenericValidator], OptionalProperty, any> ? ZodValidatorFromConvex<I> : V extends VUnion<any, [infer A extends GenericValidator, ...infer Rest extends GenericValidator[]], OptionalProperty, any> ? z$1.ZodUnion<readonly [ZodValidatorFromConvex<A>, ...{ [K in keyof Rest]: ZodValidatorFromConvex<Rest[K]> }]> : V extends VAny<any, OptionalProperty, any> ? z$1.ZodAny : never;
574
+ } ? z$2.ZodType<NotUndefined<Type>> : V extends VBoolean<any> ? z$2.ZodBoolean : V extends VNull<any> ? z$2.ZodNull : V extends VArray<any, infer Element> ? Element extends VArray<any, any> ? z$2.ZodArray<zCore.SomeType> : z$2.ZodArray<ZodFromValidatorBase<Element>> : V extends VObject<any, infer Fields extends Record<string, GenericValidator>> ? z$2.ZodObject<ZodShapeFromConvexObject<Fields>, zCore.$strict> : V extends VBytes<any, any> ? never : V extends VLiteral<infer T extends zCore.util.Literal, OptionalProperty> ? z$2.ZodLiteral<NotUndefined<T>> : V extends VRecord<any, infer Key, infer Value, OptionalProperty, any> ? z$2.ZodRecord<ZodFromStringValidator<Key>, ZodFromValidatorBase<Value>> : V extends VUnion<any, [], OptionalProperty, any> ? z$2.ZodNever : V extends VUnion<any, [infer I extends GenericValidator], OptionalProperty, any> ? ZodValidatorFromConvex<I> : V extends VUnion<any, [infer A extends GenericValidator, ...infer Rest extends GenericValidator[]], OptionalProperty, any> ? z$2.ZodUnion<readonly [ZodValidatorFromConvex<A>, ...{ [K in keyof Rest]: ZodValidatorFromConvex<Rest[K]> }]> : V extends VAny<any, OptionalProperty, any> ? z$2.ZodAny : never;
575
575
  type BrandIfBranded<InnerType, Validator extends zCore.SomeType> = InnerType extends zCore.$brand<infer Brand> ? zCore.$ZodBranded<Validator, Brand> : Validator;
576
576
  type StringValidator = Validator<string, 'required', any>;
577
- type ZodFromStringValidator<V extends StringValidator> = V extends VId<GenericId<infer TableName extends string>> ? Zid<TableName> : V extends VString<infer T, any> ? BrandIfBranded<T, z$1.ZodString> : V extends VLiteral<infer Literal extends string> ? z$1.ZodLiteral<Literal> : V extends VUnion<any, [], any, any> ? z$1.ZodNever : V extends VUnion<any, [infer I extends GenericValidator], any, any> ? ZodFromStringValidator<I> : V extends VUnion<any, [infer A extends GenericValidator, ...infer Rest extends GenericValidator[]], any, any> ? z$1.ZodUnion<readonly [ZodFromStringValidator<A>, ...{ [K in keyof Rest]: ZodFromStringValidator<Rest[K]> }]> : never;
577
+ type ZodFromStringValidator<V extends StringValidator> = V extends VId<GenericId<infer TableName extends string>> ? Zid<TableName> : V extends VString<infer T, any> ? BrandIfBranded<T, z$2.ZodString> : V extends VLiteral<infer Literal extends string> ? z$2.ZodLiteral<Literal> : V extends VUnion<any, [], any, any> ? z$2.ZodNever : V extends VUnion<any, [infer I extends GenericValidator], any, any> ? ZodFromStringValidator<I> : V extends VUnion<any, [infer A extends GenericValidator, ...infer Rest extends GenericValidator[]], any, any> ? z$2.ZodUnion<readonly [ZodFromStringValidator<A>, ...{ [K in keyof Rest]: ZodFromStringValidator<Rest[K]> }]> : never;
578
578
  type ZodShapeFromConvexObject<Fields extends Record<string, GenericValidator>> = Fields extends infer F ? { [K in keyof F]: F[K] extends GenericValidator ? ZodValidatorFromConvex<F[K]> : never } : never;
579
579
  type NotUndefined<T> = Exclude<T, undefined>;
580
580
  type TableNameFromType<T> = T extends GenericId<infer TableName> ? TableName : string;
@@ -591,16 +591,16 @@ declare function handleHttpError(error: unknown): Response;
591
591
  * - Factory function creates implementation objects
592
592
  * - This preserves literal types like 'GET' through method chains
593
593
  */
594
- interface HttpProcedureBuilder<TInitialCtx, TCtx, TInput extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TOutput extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TParams extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TQuery extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TMeta extends ProcedureMeta = ProcedureMeta, TMethod extends HttpMethod = HttpMethod, TForm extends UnsetMarker | z.ZodTypeAny = UnsetMarker> {
594
+ interface HttpProcedureBuilder<TInitialCtx, TCtx, TInput extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TOutput extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TParams extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TQuery extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TMeta extends ProcedureMeta = ProcedureMeta, TMethod extends HttpMethod = HttpMethod, TForm extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker> {
595
595
  _def: HttpProcedureBuilderDef<TCtx, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
596
596
  /** DELETE endpoint (Hono-style) */
597
597
  delete(path: string): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, 'DELETE', TForm>;
598
598
  /** Define form data schema (for multipart/form-data uploads) */
599
- form<TSchema extends z.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TSchema>;
599
+ form<TSchema extends z$1.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TSchema>;
600
600
  /** GET endpoint (Hono-style) */
601
601
  get(path: string): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, 'GET', TForm>;
602
602
  /** Define request body schema (for POST/PUT/PATCH) */
603
- input<TSchema extends z.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TSchema, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
603
+ input<TSchema extends z$1.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TSchema, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
604
604
  /** Set procedure metadata (shallow merged when chained) */
605
605
  meta(value: TMeta): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
606
606
  /**
@@ -608,13 +608,13 @@ interface HttpProcedureBuilder<TInitialCtx, TCtx, TInput extends UnsetMarker | z
608
608
  * Handler receives Hono Context `c` for Response helpers (c.json, c.body, c.text).
609
609
  * Return Response for custom responses, or plain object for auto JSON serialization.
610
610
  */
611
- mutation<TResult>(handler: (opts: HttpHandlerOpts<TCtx, TInput, TParams, TQuery, TForm>) => Promise<Response | (TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult)>): HttpProcedure<TInput, TOutput, TParams, TQuery, TMethod, TForm>;
611
+ mutation<TResult>(handler: (opts: HttpHandlerOpts<TCtx, TInput, TParams, TQuery, TForm>) => Promise<Response | (TOutput extends z$1.ZodTypeAny ? z$1.infer<TOutput> : TResult)>): HttpProcedure<TInput, TOutput, TParams, TQuery, TMethod, TForm>;
612
612
  /** Set a server-only procedure name for middleware/logging */
613
613
  name(value: string): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
614
614
  /** Define response schema */
615
- output<TSchema extends z.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TSchema, TParams, TQuery, TMeta, TMethod, TForm>;
615
+ output<TSchema extends z$1.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TSchema, TParams, TQuery, TMeta, TMethod, TForm>;
616
616
  /** Define path parameter schema (for :param in path) */
617
- params<TSchema extends z.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TSchema, TQuery, TMeta, TMethod, TForm>;
617
+ params<TSchema extends z$1.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TSchema, TQuery, TMeta, TMethod, TForm>;
618
618
  /** PATCH endpoint (Hono-style) */
619
619
  patch(path: string): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, 'PATCH', TForm>;
620
620
  /** POST endpoint (Hono-style) */
@@ -626,11 +626,11 @@ interface HttpProcedureBuilder<TInitialCtx, TCtx, TInput extends UnsetMarker | z
626
626
  * Handler receives Hono Context `c` for Response helpers (c.json, c.body, c.text).
627
627
  * Return Response for custom responses, or plain object for auto JSON serialization.
628
628
  */
629
- query<TResult>(handler: (opts: HttpHandlerOpts<TCtx, TInput, TParams, TQuery, TForm>) => Promise<Response | (TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult)>): HttpProcedure<TInput, TOutput, TParams, TQuery, TMethod, TForm>;
629
+ query<TResult>(handler: (opts: HttpHandlerOpts<TCtx, TInput, TParams, TQuery, TForm>) => Promise<Response | (TOutput extends z$1.ZodTypeAny ? z$1.infer<TOutput> : TResult)>): HttpProcedure<TInput, TOutput, TParams, TQuery, TMethod, TForm>;
630
630
  /** Define the route path and HTTP method */
631
631
  route<M extends HttpMethod>(path: string, method: M): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, M, TForm>;
632
632
  /** Define query parameter schema (?key=value) */
633
- searchParams<TSchema extends z.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TSchema, TMeta, TMethod, TForm>;
633
+ searchParams<TSchema extends z$1.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TSchema, TMeta, TMethod, TForm>;
634
634
  /** Add middleware to the procedure */
635
635
  use<$ContextOverridesOut extends object>(middlewareOrBuilder: MiddlewareFunction<TCtx, TMeta, UnsetMarker, $ContextOverridesOut, unknown> | MiddlewareBuilder<any, // Allow reusable middleware with any context
636
636
  TMeta, $ContextOverridesOut, unknown>): HttpProcedureBuilder<TInitialCtx, Overwrite$1<TCtx, $ContextOverridesOut>, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
@@ -651,32 +651,32 @@ declare function createHttpProcedureBuilder<TCtx, TMeta extends ProcedureMeta>(c
651
651
  * After .paginated() applies defaults, cursor and limit are always defined.
652
652
  * The actual runtime schema uses .default() and .transform() for validation.
653
653
  */
654
- declare const paginatedSchemaForTypes: z.ZodObject<{
655
- cursor: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
656
- limit: z.ZodNumber;
657
- }, z.core.$strip>;
654
+ declare const paginatedSchemaForTypes: z$1.ZodObject<{
655
+ cursor: z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNull]>;
656
+ limit: z$1.ZodNumber;
657
+ }, z$1.core.$strip>;
658
658
  /** Paginated schema type - both cursor and limit are required after .paginated() */
659
659
  type PaginatedInputSchema = typeof paginatedSchemaForTypes;
660
660
  /** Paginated schema type for external callers - both fields are optional due defaults. */
661
- declare const paginatedSchemaForClientTypes: z.ZodObject<{
662
- cursor: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
663
- limit: z.ZodOptional<z.ZodNumber>;
664
- }, z.core.$strip>;
661
+ declare const paginatedSchemaForClientTypes: z$1.ZodObject<{
662
+ cursor: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNull]>>;
663
+ limit: z$1.ZodOptional<z$1.ZodNumber>;
664
+ }, z$1.core.$strip>;
665
665
  type PaginatedClientInputSchema = typeof paginatedSchemaForClientTypes;
666
666
  /**
667
667
  * Infer input type from ZodObject schema (for handlers)
668
668
  */
669
- type InferInput<T> = T extends UnsetMarker ? Record<string, never> : T extends z.ZodObject<any> ? z.infer<T> : never;
669
+ type InferInput<T> = T extends UnsetMarker ? Record<string, never> : T extends z$1.ZodObject<any> ? z$1.infer<T> : never;
670
670
  /**
671
671
  * Infer raw client input before defaults/transforms.
672
672
  * Used for generated API arg typing.
673
673
  */
674
- type InferClientInput<T> = T extends UnsetMarker ? Record<string, never> : T extends z.ZodObject<any> ? z.input<T> : never;
674
+ type InferClientInput<T> = T extends UnsetMarker ? Record<string, never> : T extends z$1.ZodObject<any> ? z$1.input<T> : never;
675
675
  /**
676
676
  * Infer input type for middleware (returns unknown for UnsetMarker, matching tRPC)
677
677
  * Middleware before .input() receives unknown input
678
678
  */
679
- type InferMiddlewareInput<T> = T extends UnsetMarker ? unknown : T extends z.ZodObject<any> ? z.infer<T> : unknown;
679
+ type InferMiddlewareInput<T> = T extends UnsetMarker ? unknown : T extends z$1.ZodObject<any> ? z$1.infer<T> : unknown;
680
680
  /**
681
681
  * Static-only type hint attached to cRPC exports.
682
682
  *
@@ -756,8 +756,8 @@ type ProcedureBuilderDef<TMeta = object> = {
756
756
  * (`.refine()`, `.superRefine()`, strict/catchall) only survive on the
757
757
  * schema itself.
758
758
  */
759
- inputSchemas: z.ZodObject<any>[];
760
- outputSchema?: z.ZodTypeAny;
759
+ inputSchemas: z$1.ZodObject<any>[];
760
+ outputSchema?: z$1.ZodTypeAny;
761
761
  meta?: TMeta;
762
762
  procedureName?: string;
763
763
  functionConfig: InternalFunctionConfig; /** Whether this procedure uses internal function (not exposed to clients) */
@@ -773,15 +773,15 @@ type ProcedureBuilderDef<TMeta = object> = {
773
773
  * @typeParam TOutput - Output schema (starts as UnsetMarker)
774
774
  * @typeParam TMeta - Procedure metadata type
775
775
  */
776
- declare class ProcedureBuilder<TBaseCtx, _TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z.ZodObject<any> = UnsetMarker, TOutput extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TMeta extends object = object> {
776
+ declare class ProcedureBuilder<TBaseCtx, _TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z$1.ZodObject<any> = UnsetMarker, TOutput extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TMeta extends object = object> {
777
777
  protected readonly _def: ProcedureBuilderDef<TMeta>;
778
778
  constructor(def: ProcedureBuilderDef<TMeta>);
779
779
  /** Add middleware that transforms the context - to be overridden by subclasses */
780
780
  protected _use<$ContextOverridesOut>(middlewareOrBuilder: MiddlewareFunction<TBaseCtx, TMeta, TContextOverrides, $ContextOverridesOut> | MiddlewareBuilder<TBaseCtx, TMeta, $ContextOverridesOut>): ProcedureBuilderDef<TMeta>;
781
781
  /** Define input schema (chainable - schemas are merged) - to be overridden by subclasses */
782
- protected _input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): ProcedureBuilderDef<TMeta>;
782
+ protected _input<TNewInput extends z$1.ZodObject<any>>(schema: TNewInput): ProcedureBuilderDef<TMeta>;
783
783
  /** Define output schema - to be overridden by subclasses */
784
- protected _output<TNewOutput extends z.ZodTypeAny>(schema: TNewOutput): ProcedureBuilderDef<TMeta>;
784
+ protected _output<TNewOutput extends z$1.ZodTypeAny>(schema: TNewOutput): ProcedureBuilderDef<TMeta>;
785
785
  /** Set procedure metadata (shallow merged when chained) - to be overridden by subclasses */
786
786
  protected _meta(value: TMeta): ProcedureBuilderDef<TMeta>;
787
787
  /** Set server-only procedure name for middleware/logging */
@@ -794,7 +794,7 @@ declare class ProcedureBuilder<TBaseCtx, _TContext, TContextOverrides extends Un
794
794
  * Query-specific procedure builder
795
795
  * Only exposes .query() and .internalQuery() methods
796
796
  */
797
- declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z.ZodObject<any> = UnsetMarker, TClientInput extends UnsetMarker | z.ZodObject<any> = TInput, TOutput extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TMeta extends object = object> extends ProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta> {
797
+ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z$1.ZodObject<any> = UnsetMarker, TClientInput extends UnsetMarker | z$1.ZodObject<any> = TInput, TOutput extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TMeta extends object = object> extends ProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta> {
798
798
  /**
799
799
  * Add middleware that transforms the context
800
800
  * Middleware receives typed input if called after .input(), unknown otherwise
@@ -807,7 +807,7 @@ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extend
807
807
  /** Set a server-only procedure name for middleware/logging */
808
808
  name(value: string): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
809
809
  /** Define input schema (chainable - schemas are merged) */
810
- input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, IntersectIfDefined<TClientInput, TNewInput>, TOutput, TMeta>;
810
+ input<TNewInput extends z$1.ZodObject<any>>(schema: TNewInput): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, IntersectIfDefined<TClientInput, TNewInput>, TOutput, TMeta>;
811
811
  /**
812
812
  * Add pagination input (chainable before .query())
813
813
  *
@@ -817,21 +817,21 @@ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extend
817
817
  * @param opts.limit - Default/max items per page
818
818
  * @param opts.item - Zod schema for each item in the page array
819
819
  */
820
- paginated<TItem extends z.ZodTypeAny>(opts: {
820
+ paginated<TItem extends z$1.ZodTypeAny>(opts: {
821
821
  limit: number;
822
822
  item: TItem;
823
- }): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, PaginatedInputSchema>, IntersectIfDefined<TClientInput, PaginatedClientInputSchema>, z.ZodObject<{
824
- continueCursor: z.ZodUnion<[z.ZodString, z.ZodNull]>;
825
- isDone: z.ZodBoolean;
826
- page: z.ZodArray<TItem>;
823
+ }): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, PaginatedInputSchema>, IntersectIfDefined<TClientInput, PaginatedClientInputSchema>, z$1.ZodObject<{
824
+ continueCursor: z$1.ZodUnion<[z$1.ZodString, z$1.ZodNull]>;
825
+ isDone: z$1.ZodBoolean;
826
+ page: z$1.ZodArray<TItem>;
827
827
  }>, TMeta>;
828
828
  /** Define output schema */
829
- output<TNewOutput extends z.ZodTypeAny>(schema: TNewOutput): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TNewOutput, TMeta>;
829
+ output<TNewOutput extends z$1.ZodTypeAny>(schema: TNewOutput): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TNewOutput, TMeta>;
830
830
  /** Create a query */
831
831
  query<TResult>(handler: (opts: {
832
832
  ctx: Overwrite$1<TContext, TContextOverrides>;
833
833
  input: InferInput<TInput>;
834
- }) => Promise<TOutput extends z.ZodTypeAny ? z.input<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TClientInput>, TOutput extends z.ZodTypeAny ? z.output<TOutput> : TResult>;
834
+ }) => Promise<TOutput extends z$1.ZodTypeAny ? z$1.input<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TClientInput>, TOutput extends z$1.ZodTypeAny ? z$1.output<TOutput> : TResult>;
835
835
  /** Mark as internal - returns chainable builder using internal function */
836
836
  internal(): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
837
837
  }
@@ -839,7 +839,7 @@ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extend
839
839
  * Mutation-specific procedure builder
840
840
  * Only exposes .mutation() and .internalMutation() methods
841
841
  */
842
- declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z.ZodObject<any> = UnsetMarker, TOutput extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TMeta extends object = object> extends ProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta> {
842
+ declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z$1.ZodObject<any> = UnsetMarker, TOutput extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TMeta extends object = object> extends ProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta> {
843
843
  /**
844
844
  * Add middleware that transforms the context
845
845
  * Middleware receives typed input if called after .input(), unknown otherwise
@@ -852,14 +852,14 @@ declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides ext
852
852
  /** Set a server-only procedure name for middleware/logging */
853
853
  name(value: string): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
854
854
  /** Define input schema (chainable - schemas are merged) */
855
- input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
855
+ input<TNewInput extends z$1.ZodObject<any>>(schema: TNewInput): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
856
856
  /** Define output schema */
857
- output<TNewOutput extends z.ZodTypeAny>(schema: TNewOutput): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TNewOutput, TMeta>;
857
+ output<TNewOutput extends z$1.ZodTypeAny>(schema: TNewOutput): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TNewOutput, TMeta>;
858
858
  /** Create a mutation */
859
859
  mutation<TResult>(handler: (opts: {
860
860
  ctx: Overwrite$1<TContext, TContextOverrides>;
861
861
  input: InferInput<TInput>;
862
- }) => Promise<TOutput extends z.ZodTypeAny ? z.input<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.output<TOutput> : TResult>;
862
+ }) => Promise<TOutput extends z$1.ZodTypeAny ? z$1.input<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z$1.ZodTypeAny ? z$1.output<TOutput> : TResult>;
863
863
  /** Mark as internal - returns chainable builder using internal function */
864
864
  internal(): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
865
865
  }
@@ -867,7 +867,7 @@ declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides ext
867
867
  * Action-specific procedure builder
868
868
  * Only exposes .action() and .internalAction() methods
869
869
  */
870
- declare class ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z.ZodObject<any> = UnsetMarker, TOutput extends UnsetMarker | z.ZodTypeAny = UnsetMarker, TMeta extends object = object> extends ProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta> {
870
+ declare class ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides extends UnsetMarker | object = UnsetMarker, TInput extends UnsetMarker | z$1.ZodObject<any> = UnsetMarker, TOutput extends UnsetMarker | z$1.ZodTypeAny = UnsetMarker, TMeta extends object = object> extends ProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta> {
871
871
  /** Add middleware that transforms the context - $ContextOverridesOut is inferred from next() */
872
872
  use<$ContextOverridesOut extends object>(middlewareOrBuilder: MiddlewareFunction<Overwrite$1<TContext, TContextOverrides>, TMeta, TContextOverrides, $ContextOverridesOut, InferMiddlewareInput<TInput>> | MiddlewareBuilder<any, // Allow reusable middleware with any context
873
873
  TMeta, $ContextOverridesOut, InferMiddlewareInput<TInput>>): ActionProcedureBuilder<TBaseCtx, TContext, Overwrite$1<TContextOverrides, $ContextOverridesOut>, TInput, TOutput, TMeta>;
@@ -876,14 +876,14 @@ declare class ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides exten
876
876
  /** Set a server-only procedure name for middleware/logging */
877
877
  name(value: string): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
878
878
  /** Define input schema (chainable - schemas are merged) */
879
- input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
879
+ input<TNewInput extends z$1.ZodObject<any>>(schema: TNewInput): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
880
880
  /** Define output schema */
881
- output<TNewOutput extends z.ZodTypeAny>(schema: TNewOutput): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TNewOutput, TMeta>;
881
+ output<TNewOutput extends z$1.ZodTypeAny>(schema: TNewOutput): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TNewOutput, TMeta>;
882
882
  /** Create an action */
883
883
  action<TResult>(handler: (opts: {
884
884
  ctx: Overwrite$1<TContext, TContextOverrides>;
885
885
  input: InferInput<TInput>;
886
- }) => Promise<TOutput extends z.ZodTypeAny ? z.input<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.output<TOutput> : TResult>;
886
+ }) => Promise<TOutput extends z$1.ZodTypeAny ? z$1.input<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z$1.ZodTypeAny ? z$1.output<TOutput> : TResult>;
887
887
  /** Mark as internal - returns chainable builder using internal function */
888
888
  internal(): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
889
889
  }
@@ -1133,14 +1133,14 @@ declare function createCallerFactory<TApi extends Record<string, unknown>>(opts:
1133
1133
  //#endregion
1134
1134
  //#region src/server/env.d.ts
1135
1135
  type RuntimeEnv = Record<string, string | undefined>;
1136
- type CreateEnvOptions<TSchema extends z.ZodObject<z.ZodRawShape>> = {
1136
+ type CreateEnvOptions<TSchema extends z$1.ZodObject<z$1.ZodRawShape>> = {
1137
1137
  cache?: boolean;
1138
1138
  codegenFallback?: boolean;
1139
1139
  readOptionalRuntimeEnv?: readonly string[];
1140
1140
  runtimeEnv?: RuntimeEnv;
1141
1141
  schema: TSchema;
1142
1142
  };
1143
- declare function createEnv<TSchema extends z.ZodObject<z.ZodRawShape>>(options: CreateEnvOptions<TSchema>): () => z.infer<TSchema>;
1143
+ declare function createEnv<TSchema extends z$1.ZodObject<z$1.ZodRawShape>>(options: CreateEnvOptions<TSchema>): () => z$1.infer<TSchema>;
1144
1144
  //#endregion
1145
1145
  //#region src/server/error.d.ts
1146
1146
  /** JSON-RPC 2.0 error codes (tRPC-style) */
@@ -1,6 +1,6 @@
1
1
  import { u as requireMutationCtx } from "../api-entry-CkDpGYVg.js";
2
- import { _ as CRPCError } from "../builder-C6JSHkRK.js";
3
- import { t as definePlugin } from "../middleware-CdqNVyp8.js";
2
+ import { _ as CRPCError } from "../builder-DoeyW4Vq.js";
3
+ import { t as definePlugin } from "../middleware-DIj-bwVi.js";
4
4
  import { v } from "convex/values";
5
5
  import { mutationGeneric, queryGeneric } from "convex/server";
6
6
 
@@ -92,21 +92,21 @@ function findRelationIndex(table, columns, relationName, targetTableName, strict
92
92
  }
93
93
 
94
94
  //#endregion
95
- //#region src/orm/write-fanout.ts
95
+ //#region src/internal/concurrency.ts
96
96
  /**
97
- * Shared primitives for fanning out independent writes.
97
+ * Bounded-concurrency fan-out, shared by the ORM write path, relation loading
98
+ * and the CLI's entry-point analyzer.
98
99
  *
99
- * Deliberately dependency-free: `mutation-utils`, `lifecycle` and `query` all
100
- * import it, and Convex bundles every static import of a function entry.
100
+ * Deliberately dependency-free: ORM callers reach it from a Convex function
101
+ * entry, and Convex bundles every static import of an entry.
101
102
  */
102
- const ORMLIFECYCLE_HOOKED_TABLES = Symbol.for("kitcn:OrmLifecycleHookedTables");
103
- /** Matches the ORM's relation-loading default. */
104
- const DEFAULT_WRITE_FANOUT_CONCURRENCY = 25;
105
103
  /**
106
104
  * Runs `worker` over `items` with at most `limit` in flight. Results keep input
107
- * order. Unbounded `Promise.all` is not an option here: a fan-out is bounded
108
- * only by `mutationMaxRows` (10,000), and that many simultaneous in-flight
109
- * syscalls is its own failure mode.
105
+ * order, so callers can rely on a stable mapping back to `items`.
106
+ *
107
+ * Unbounded `Promise.all` is not an option for the ORM caller: a fan-out is
108
+ * bounded only by `mutationMaxRows` (10,000), and that many simultaneous
109
+ * in-flight syscalls is its own failure mode.
110
110
  */
111
111
  async function mapWithConcurrency(items, limit, worker) {
112
112
  if (items.length === 0) return [];
@@ -124,6 +124,20 @@ async function mapWithConcurrency(items, limit, worker) {
124
124
  await Promise.all(Array.from({ length: width }, () => runWorker()));
125
125
  return results;
126
126
  }
127
+
128
+ //#endregion
129
+ //#region src/orm/write-fanout.ts
130
+ /**
131
+ * Lifecycle bookkeeping for the ORM write path.
132
+ *
133
+ * Deliberately dependency-free: `mutation-utils`, `lifecycle` and `query` all
134
+ * import it, and Convex bundles every static import of a function entry. The
135
+ * bounded fan-out primitive itself lives in `internal/concurrency` so the CLI
136
+ * can share it without dragging this module in.
137
+ */
138
+ const ORMLIFECYCLE_HOOKED_TABLES = Symbol.for("kitcn:OrmLifecycleHookedTables");
139
+ /** Matches the ORM's relation-loading default. */
140
+ const DEFAULT_WRITE_FANOUT_CONCURRENCY = 25;
127
141
  /**
128
142
  * Records which tables the lifecycle writer intercepts, so write fan-out can
129
143
  * see it without importing `lifecycle` (which would close an import cycle
@@ -1408,4 +1422,4 @@ function aggregateExtension() {
1408
1422
  }
1409
1423
 
1410
1424
  //#endregion
1411
- export { serializeFilterExpression as $, ensureNonNullValues as A, getMutationExecutionMode as B, deserializeFilterExpression as C, enforcePolymorphicWrite as D, enforceForeignKeys as E, getChecks as F, getUniqueIndexes as G, getTableColumns as H, getColumnName as I, normalizeDateFieldsForWrite as J, hardDeleteRow as K, getForeignKeys as L, evaluateCheckConstraintTriState as M, evaluateFilter as N, enforceUniqueIndexes as O, extractPrimaryIdLookup as P, selectReturningRowWithHydration as Q, getMutationAsyncDelayMs as R, decodeUndefinedDeep as S, enforceCheckConstraints as T, getTableDeleteConfig as U, getOrmContext as V, getTableName as W, patchReferencingRows as X, normalizeTemporalComparableValue as Y, resolveOrmRuntimeDefaults as Z, applyIncomingForeignKeyActionsOnUpdate as _, usesSystemCreatedAtAlias as _t, aggregateExtension as a, markLifecycleHookedTables as at, collectMutationRowsBounded as b, AGGREGATE_ERROR as c, findSearchIndexByName as ct, createCountError as d, getIndexes as dt, softDeleteRow as et, createError as f, getRankIndexes as ft, applyIncomingForeignKeyActionsOnDelete as g, PUBLIC_CREATED_AT_FIELD as gt, applyDefaults as h, INTERNAL_CREATION_TIME_FIELD as ht, AGGREGATE_STATE_TABLE as i, mapWithConcurrency as it, ensureNullableColumns as j, ensureDefaultColumns as k, COUNT_ERROR as l, findVectorIndexByName as lt, ensureCountAllowedForRls as m, CREATED_AT_MIGRATION_MESSAGE as mt, AGGREGATE_EXTREMA_TABLE as n, takeRowsWithinByteBudget as nt, getAggregateIndexDefinitions as o, findIndexForColumns as ot, ensureAggregateAllowedForRls as p, resolveIndexOrderPushdown as pt, hydrateDateFieldsForRead as q, AGGREGATE_MEMBER_TABLE as r, toConvexFilter as rt, getRankIndexDefinitions as s, findRelationIndex as st, AGGREGATE_BUCKET_TABLE as t, splitReturningSelection as tt, createAggregateError as u, getAggregateIndexes as ut, buildForeignKeyGraph as v, encodeUndefinedDeep as w, collectPrimaryIdLookupRows as x, canUsePrimaryIdLookupCursor as y, getMutationCollectionLimits as z };
1425
+ export { serializeFilterExpression as $, ensureNonNullValues as A, getMutationExecutionMode as B, deserializeFilterExpression as C, enforcePolymorphicWrite as D, enforceForeignKeys as E, getChecks as F, getUniqueIndexes as G, getTableColumns as H, getColumnName as I, normalizeDateFieldsForWrite as J, hardDeleteRow as K, getForeignKeys as L, evaluateCheckConstraintTriState as M, evaluateFilter as N, enforceUniqueIndexes as O, extractPrimaryIdLookup as P, selectReturningRowWithHydration as Q, getMutationAsyncDelayMs as R, decodeUndefinedDeep as S, enforceCheckConstraints as T, getTableDeleteConfig as U, getOrmContext as V, getTableName as W, patchReferencingRows as X, normalizeTemporalComparableValue as Y, resolveOrmRuntimeDefaults as Z, applyIncomingForeignKeyActionsOnUpdate as _, PUBLIC_CREATED_AT_FIELD as _t, aggregateExtension as a, markLifecycleHookedTables as at, collectMutationRowsBounded as b, AGGREGATE_ERROR as c, findRelationIndex as ct, createCountError as d, getAggregateIndexes as dt, softDeleteRow as et, createError as f, getIndexes as ft, applyIncomingForeignKeyActionsOnDelete as g, INTERNAL_CREATION_TIME_FIELD as gt, applyDefaults as h, CREATED_AT_MIGRATION_MESSAGE as ht, AGGREGATE_STATE_TABLE as i, hasLifecycleHooks as it, ensureNullableColumns as j, ensureDefaultColumns as k, COUNT_ERROR as l, findSearchIndexByName as lt, ensureCountAllowedForRls as m, resolveIndexOrderPushdown as mt, AGGREGATE_EXTREMA_TABLE as n, takeRowsWithinByteBudget as nt, getAggregateIndexDefinitions as o, mapWithConcurrency as ot, ensureAggregateAllowedForRls as p, getRankIndexes as pt, hydrateDateFieldsForRead as q, AGGREGATE_MEMBER_TABLE as r, toConvexFilter as rt, getRankIndexDefinitions as s, findIndexForColumns as st, AGGREGATE_BUCKET_TABLE as t, splitReturningSelection as tt, createAggregateError as u, findVectorIndexByName as ut, buildForeignKeyGraph as v, usesSystemCreatedAtAlias as vt, encodeUndefinedDeep as w, collectPrimaryIdLookupRows as x, canUsePrimaryIdLookupCursor as y, getMutationCollectionLimits as z };
@@ -1,4 +1,4 @@
1
- import { $ as ActionProcedureBuilder, A as CRPCError, B as RuntimeEnv, C as createProcedureHandlerFactory, Ct as zCustomQuery, D as WithHttpRouter, Dt as zodToConvex, E as typedProcedureResolver, Et as zodOutputToConvexFields, F as getCRPCErrorFromUnknown, G as createLazyCaller, H as ConvexContext, I as getHTTPStatusCodeFromError, J as ServerCaller, K as CallerMeta, L as isCRPCError, M as CRPCErrorData, N as CRPC_ERROR_CODES_BY_KEY, O as inferApiInputs, Ot as zodToConvexFields, P as CRPC_ERROR_CODE_TO_HTTP, Q as getGeneratedValue, R as toCRPCError, S as createProcedureCallerFactory, St as zCustomMutation, T as getGeneratedFunctionReference, Tt as zodOutputToConvex, U as createCallerFactory, V as createEnv, W as LazyCaller, X as createApiLeaf, Y as createServerCaller, Z as createGeneratedFunctionReference, _ as ProcedureSchedulableCallerFromRegistry, _t as ZodValidatorFromConvex, a as CreateProcedureCallerFactoryOptions, at as initCRPC, b as createGenericCallerFactory, bt as withSystemFields, c as GeneratedRegistryCallerFactory, ct as extractPathParams, d as GeneratedRegistryHandlerForContext, dt as ConvexValidatorFromZod, et as CRPCFunctionTypeHint, f as ProcedureActionCallerFromRegistry, ft as ConvexValidatorFromZodOutput, g as ProcedureFromFunctionReference, gt as ZodFromValidatorBase, h as ProcedureDefinition, ht as Zid, i as registerProcedureNameLookup, it as createMiddlewareFactory, j as CRPCErrorCode, k as inferApiOutputs, l as GeneratedRegistryCallerForContext, lt as handleHttpError, m as ProcedureCallerFromRegistry, mt as ZCustomCtx, n as ProcedureNameLookup, nt as ProcedureBuilder, o as GeneratedProcedureRegistry, ot as HttpProcedureBuilder, p as ProcedureCaller, pt as CustomBuilder, q as CallerOpts, r as inferProcedureNameFromCallsite, rt as QueryProcedureBuilder, s as GeneratedProcedureRegistryEntry, st as createHttpProcedureBuilder, t as ProcedureNameEntry, tt as MutationProcedureBuilder, u as GeneratedRegistryHandlerFactory, ut as matchPathParams, v as ProcedureScheduleCallerFromRegistry, vt as convexToZod, w as defineProcedure, wt as zid, x as createGenericHandlerFactory, xt as zCustomAction, y as createGeneratedRegistryRuntime, yt as convexToZodFields, z as CreateEnvOptions } from "../procedure-name-Bjw1JDIS.js";
1
+ import { $ as ActionProcedureBuilder, A as CRPCError, B as RuntimeEnv, C as createProcedureHandlerFactory, Ct as zCustomQuery, D as WithHttpRouter, Dt as zodToConvex, E as typedProcedureResolver, Et as zodOutputToConvexFields, F as getCRPCErrorFromUnknown, G as createLazyCaller, H as ConvexContext, I as getHTTPStatusCodeFromError, J as ServerCaller, K as CallerMeta, L as isCRPCError, M as CRPCErrorData, N as CRPC_ERROR_CODES_BY_KEY, O as inferApiInputs, Ot as zodToConvexFields, P as CRPC_ERROR_CODE_TO_HTTP, Q as getGeneratedValue, R as toCRPCError, S as createProcedureCallerFactory, St as zCustomMutation, T as getGeneratedFunctionReference, Tt as zodOutputToConvex, U as createCallerFactory, V as createEnv, W as LazyCaller, X as createApiLeaf, Y as createServerCaller, Z as createGeneratedFunctionReference, _ as ProcedureSchedulableCallerFromRegistry, _t as ZodValidatorFromConvex, a as CreateProcedureCallerFactoryOptions, at as initCRPC, b as createGenericCallerFactory, bt as withSystemFields, c as GeneratedRegistryCallerFactory, ct as extractPathParams, d as GeneratedRegistryHandlerForContext, dt as ConvexValidatorFromZod, et as CRPCFunctionTypeHint, f as ProcedureActionCallerFromRegistry, ft as ConvexValidatorFromZodOutput, g as ProcedureFromFunctionReference, gt as ZodFromValidatorBase, h as ProcedureDefinition, ht as Zid, i as registerProcedureNameLookup, it as createMiddlewareFactory, j as CRPCErrorCode, k as inferApiOutputs, l as GeneratedRegistryCallerForContext, lt as handleHttpError, m as ProcedureCallerFromRegistry, mt as ZCustomCtx, n as ProcedureNameLookup, nt as ProcedureBuilder, o as GeneratedProcedureRegistry, ot as HttpProcedureBuilder, p as ProcedureCaller, pt as CustomBuilder, q as CallerOpts, r as inferProcedureNameFromCallsite, rt as QueryProcedureBuilder, s as GeneratedProcedureRegistryEntry, st as createHttpProcedureBuilder, t as ProcedureNameEntry, tt as MutationProcedureBuilder, u as GeneratedRegistryHandlerFactory, ut as matchPathParams, v as ProcedureScheduleCallerFromRegistry, vt as convexToZod, w as defineProcedure, wt as zid, x as createGenericHandlerFactory, xt as zCustomAction, y as createGeneratedRegistryRuntime, yt as convexToZodFields, z as CreateEnvOptions } from "../procedure-name-l2YusEZI.js";
2
2
  import { A as HttpProcedureBuilderDef, C as extractRouteMap, D as HttpHandlerOpts, E as HttpActionHandler, M as InferHttpInput, N as ProcedureMeta, O as HttpMethod, S as createHttpRouterFactory, T as HttpActionConstructor, _ as CRPCHttpRouter, b as HttpRouterWithHono, j as HttpRouteDefinition, k as HttpProcedure, v as HttpRouterDef, w as CRPCHonoHandler, x as createHttpRouter, y as HttpRouterRecord } from "../http-types-90mapMP9.js";
3
3
  import { a as MergeZodObjects, c as MiddlewareMarker, d as MiddlewareProcedureType, f as MiddlewareResult, g as UnsetMarker, h as Simplify, i as IntersectIfDefined, l as MiddlewareNext, m as ResolveIfSet, n as AnyMiddlewareBuilder, o as MiddlewareBuilder, p as Overwrite, r as GetRawInputFn, s as MiddlewareFunction, t as AnyMiddleware, u as MiddlewareProcedureInfo } from "../types-eNzQmbqM.js";
4
4
  import { a as isMutationCtx, c as isSchedulerCtx, d as requireQueryCtx, f as requireRunMutationCtx, i as isActionCtx, l as requireActionCtx, n as RunMutationCtx, o as isQueryCtx, p as requireSchedulerCtx, r as SchedulerCtx, s as isRunMutationCtx, t as GenericCtx, u as requireMutationCtx } from "../context-utils-DwZ3Cam1.js";
@@ -1,6 +1,6 @@
1
1
  import { a as isMutationCtx, c as isSchedulerCtx, d as requireQueryCtx, f as requireRunMutationCtx, i as isActionCtx, l as requireActionCtx, n as createGeneratedFunctionReference, o as isQueryCtx, p as requireSchedulerCtx, r as getGeneratedValue, s as isRunMutationCtx, t as createApiLeaf, u as requireMutationCtx } from "../api-entry-CkDpGYVg.js";
2
2
  import { n as createLazyCaller, r as createServerCaller, t as createCallerFactory } from "../caller-factory-Dd3H7j3V.js";
3
- import { A as zid, C as toCRPCError, D as zCustomAction, E as withSystemFields, M as zodOutputToConvexFields, N as zodToConvex, O as zCustomMutation, P as zodToConvexFields, S as isCRPCError, T as convexToZodFields, _ as CRPCError, a as createMiddlewareFactory, b as getCRPCErrorFromUnknown, c as registerProcedureNameLookup, d as createHttpRouterFactory, f as extractRouteMap, g as matchPathParams, h as handleHttpError, i as QueryProcedureBuilder, j as zodOutputToConvex, k as zCustomQuery, l as HttpRouterWithHono, m as extractPathParams, n as MutationProcedureBuilder, o as initCRPC, p as createHttpProcedureBuilder, r as ProcedureBuilder, s as inferProcedureNameFromCallsite, t as ActionProcedureBuilder, u as createHttpRouter, v as CRPC_ERROR_CODES_BY_KEY, w as convexToZod, x as getHTTPStatusCodeFromError, y as CRPC_ERROR_CODE_TO_HTTP } from "../builder-C6JSHkRK.js";
4
- import { a as createProcedureHandlerFactory, c as typedProcedureResolver, i as createProcedureCallerFactory, l as createEnv, n as createGenericCallerFactory, o as defineProcedure, r as createGenericHandlerFactory, s as getGeneratedFunctionReference, t as createGeneratedRegistryRuntime } from "../procedure-caller-CgLWu5F9.js";
3
+ import { A as zid, C as toCRPCError, D as zCustomAction, E as withSystemFields, M as zodOutputToConvexFields, N as zodToConvex, O as zCustomMutation, P as zodToConvexFields, S as isCRPCError, T as convexToZodFields, _ as CRPCError, a as createMiddlewareFactory, b as getCRPCErrorFromUnknown, c as registerProcedureNameLookup, d as createHttpRouterFactory, f as extractRouteMap, g as matchPathParams, h as handleHttpError, i as QueryProcedureBuilder, j as zodOutputToConvex, k as zCustomQuery, l as HttpRouterWithHono, m as extractPathParams, n as MutationProcedureBuilder, o as initCRPC, p as createHttpProcedureBuilder, r as ProcedureBuilder, s as inferProcedureNameFromCallsite, t as ActionProcedureBuilder, u as createHttpRouter, v as CRPC_ERROR_CODES_BY_KEY, w as convexToZod, x as getHTTPStatusCodeFromError, y as CRPC_ERROR_CODE_TO_HTTP } from "../builder-DoeyW4Vq.js";
4
+ import { a as createProcedureHandlerFactory, c as typedProcedureResolver, i as createProcedureCallerFactory, l as createEnv, n as createGenericCallerFactory, o as defineProcedure, r as createGenericHandlerFactory, s as getGeneratedFunctionReference, t as createGeneratedRegistryRuntime } from "../procedure-caller-Dxae9DW5.js";
5
5
 
6
6
  export { ActionProcedureBuilder, CRPCError, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, HttpRouterWithHono, MutationProcedureBuilder, ProcedureBuilder, QueryProcedureBuilder, convexToZod, convexToZodFields, createApiLeaf, createCallerFactory, createEnv, createGeneratedFunctionReference, createGeneratedRegistryRuntime, createGenericCallerFactory, createGenericHandlerFactory, createHttpProcedureBuilder, createHttpRouter, createHttpRouterFactory, createLazyCaller, createMiddlewareFactory, createProcedureCallerFactory, createProcedureHandlerFactory, createServerCaller, defineProcedure, extractPathParams, extractRouteMap, getCRPCErrorFromUnknown, getGeneratedFunctionReference, getGeneratedValue, getHTTPStatusCodeFromError, handleHttpError, inferProcedureNameFromCallsite, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, isSchedulerCtx, matchPathParams, registerProcedureNameLookup, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, requireSchedulerCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
@@ -1021,7 +1021,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1021
1021
  fieldName: "updatedAt";
1022
1022
  };
1023
1023
  };
1024
- count: ConvexNumberBuilderInitial<""> & {
1024
+ indexName: ConvexTextBuilderInitial<""> & {
1025
1025
  _: {
1026
1026
  notNull: true;
1027
1027
  };
@@ -1031,7 +1031,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1031
1031
  };
1032
1032
  } & {
1033
1033
  _: {
1034
- fieldName: "count";
1034
+ fieldName: "indexName";
1035
1035
  };
1036
1036
  };
1037
1037
  tableKey: ConvexTextBuilderInitial<""> & {
@@ -1047,7 +1047,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1047
1047
  fieldName: "tableKey";
1048
1048
  };
1049
1049
  };
1050
- indexName: ConvexTextBuilderInitial<""> & {
1050
+ count: ConvexNumberBuilderInitial<""> & {
1051
1051
  _: {
1052
1052
  notNull: true;
1053
1053
  };
@@ -1057,7 +1057,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1057
1057
  };
1058
1058
  } & {
1059
1059
  _: {
1060
- fieldName: "indexName";
1060
+ fieldName: "count";
1061
1061
  };
1062
1062
  };
1063
1063
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1159,7 +1159,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1159
1159
  fieldName: "updatedAt";
1160
1160
  };
1161
1161
  };
1162
- tableKey: ConvexTextBuilderInitial<""> & {
1162
+ indexName: ConvexTextBuilderInitial<""> & {
1163
1163
  _: {
1164
1164
  notNull: true;
1165
1165
  };
@@ -1169,10 +1169,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1169
1169
  };
1170
1170
  } & {
1171
1171
  _: {
1172
- fieldName: "tableKey";
1172
+ fieldName: "indexName";
1173
1173
  };
1174
1174
  };
1175
- indexName: ConvexTextBuilderInitial<""> & {
1175
+ tableKey: ConvexTextBuilderInitial<""> & {
1176
1176
  _: {
1177
1177
  notNull: true;
1178
1178
  };
@@ -1182,7 +1182,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1182
1182
  };
1183
1183
  } & {
1184
1184
  _: {
1185
- fieldName: "indexName";
1185
+ fieldName: "tableKey";
1186
1186
  };
1187
1187
  };
1188
1188
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1353,7 +1353,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1353
1353
  fieldName: "updatedAt";
1354
1354
  };
1355
1355
  };
1356
- count: ConvexNumberBuilderInitial<""> & {
1356
+ indexName: ConvexTextBuilderInitial<""> & {
1357
1357
  _: {
1358
1358
  notNull: true;
1359
1359
  };
@@ -1363,7 +1363,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1363
1363
  };
1364
1364
  } & {
1365
1365
  _: {
1366
- fieldName: "count";
1366
+ fieldName: "indexName";
1367
1367
  };
1368
1368
  };
1369
1369
  tableKey: ConvexTextBuilderInitial<""> & {
@@ -1379,7 +1379,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1379
1379
  fieldName: "tableKey";
1380
1380
  };
1381
1381
  };
1382
- indexName: ConvexTextBuilderInitial<""> & {
1382
+ count: ConvexNumberBuilderInitial<""> & {
1383
1383
  _: {
1384
1384
  notNull: true;
1385
1385
  };
@@ -1389,7 +1389,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1389
1389
  };
1390
1390
  } & {
1391
1391
  _: {
1392
- fieldName: "indexName";
1392
+ fieldName: "count";
1393
1393
  };
1394
1394
  };
1395
1395
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1668,7 +1668,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1668
1668
  fieldName: "lastError";
1669
1669
  };
1670
1670
  };
1671
- tableKey: ConvexTextBuilderInitial<""> & {
1671
+ indexName: ConvexTextBuilderInitial<""> & {
1672
1672
  _: {
1673
1673
  notNull: true;
1674
1674
  };
@@ -1678,10 +1678,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1678
1678
  };
1679
1679
  } & {
1680
1680
  _: {
1681
- fieldName: "tableKey";
1681
+ fieldName: "indexName";
1682
1682
  };
1683
1683
  };
1684
- indexName: ConvexTextBuilderInitial<""> & {
1684
+ keyDefinitionHash: ConvexTextBuilderInitial<""> & {
1685
1685
  _: {
1686
1686
  notNull: true;
1687
1687
  };
@@ -1691,10 +1691,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1691
1691
  };
1692
1692
  } & {
1693
1693
  _: {
1694
- fieldName: "indexName";
1694
+ fieldName: "keyDefinitionHash";
1695
1695
  };
1696
1696
  };
1697
- keyDefinitionHash: ConvexTextBuilderInitial<""> & {
1697
+ metricDefinitionHash: ConvexTextBuilderInitial<""> & {
1698
1698
  _: {
1699
1699
  notNull: true;
1700
1700
  };
@@ -1704,10 +1704,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1704
1704
  };
1705
1705
  } & {
1706
1706
  _: {
1707
- fieldName: "keyDefinitionHash";
1707
+ fieldName: "metricDefinitionHash";
1708
1708
  };
1709
1709
  };
1710
- metricDefinitionHash: ConvexTextBuilderInitial<""> & {
1710
+ tableKey: ConvexTextBuilderInitial<""> & {
1711
1711
  _: {
1712
1712
  notNull: true;
1713
1713
  };
@@ -1717,7 +1717,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1717
1717
  };
1718
1718
  } & {
1719
1719
  _: {
1720
- fieldName: "metricDefinitionHash";
1720
+ fieldName: "tableKey";
1721
1721
  };
1722
1722
  };
1723
1723
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",