kitcn 0.12.18 → 0.12.19
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 +1 -1
- package/dist/{api-entry-BckXqaLb.js → api-entry-BMCQSsCw.js} +6 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +13 -13
- package/dist/auth/index.js +1 -1
- package/dist/auth/nextjs/index.d.ts +1 -1
- package/dist/{backend-core-CGjsBIOp.mjs → backend-core-C0uwGXLx.mjs} +107 -14
- package/dist/{builder-Bh18Y2t0.js → builder-Cb6gloDB.js} +160 -6
- package/dist/cli.mjs +1 -1
- package/dist/{context-utils-HPC5nXzx.d.ts → context-utils-BvWW0Ilq.d.ts} +8 -1
- package/dist/crpc/index.d.ts +2 -2
- package/dist/{generated-contract-disabled-Dzx2IRId.d.ts → generated-contract-disabled-UsFjh8jz.d.ts} +30 -30
- package/dist/{http-types-BS63Nsug.d.ts → http-types-BLFA9zS7.d.ts} +2 -1
- package/dist/{middleware-C5P1Q29c.js → middleware-DkIhQXwg.js} +1 -1
- package/dist/{middleware-CU0mDiRs.d.ts → middleware-nS_qXecO.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-DL0Ubgky.js → procedure-caller-AjLfkHyF.js} +1 -1
- package/dist/{procedure-caller-DloN1DNv.d.ts → procedure-name-D-fDCBlo.d.ts} +28 -128
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/ratelimit/index.js +3 -3
- package/dist/rsc/index.d.ts +3 -3
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +4 -4
- package/dist/{types-DrB2VeNb.d.ts → types-C6pQrnzD.d.ts} +1 -1
- package/dist/{types-BqUIoMfT.d.ts → types-a-RHmrDZ.d.ts} +9 -1
- package/dist/watcher.mjs +12 -9
- package/dist/{where-clause-compiler-Dw3EVdi6.d.ts → where-clause-compiler-CuH2JNxb.d.ts} +30 -30
- package/package.json +1 -1
- package/skills/convex/SKILL.md +5 -4
- package/skills/convex/references/features/auth-organizations.md +7 -2
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { t as VRequired } from "./validators-vzRKjBJC.js";
|
|
2
|
-
import { C as HttpProcedure, D as ProcedureMeta, R as getTransformer, S as HttpMethod, c as InferHttpInput, d as CRPCHttpRouter, j as DataTransformerOptions, l as InferHttpOutput, p as HttpRouterRecord, w as HttpProcedureBuilderDef, x as HttpHandlerOpts } from "./http-types-
|
|
3
|
-
import {
|
|
2
|
+
import { C as HttpProcedure, D as ProcedureMeta, R as getTransformer, S as HttpMethod, c as InferHttpInput, d as CRPCHttpRouter, j as DataTransformerOptions, l as InferHttpOutput, p as HttpRouterRecord, w as HttpProcedureBuilderDef, x as HttpHandlerOpts } from "./http-types-BLFA9zS7.js";
|
|
3
|
+
import { g as UnsetMarker, i as IntersectIfDefined, o as MiddlewareBuilder, p as Overwrite$1, s as MiddlewareFunction, t as AnyMiddleware } from "./types-a-RHmrDZ.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
|
-
import * as convex_server0 from "convex/server";
|
|
6
5
|
import { ActionBuilder, ArgsArrayToObject, DefaultFunctionArgs, FunctionReference, FunctionReturnType, FunctionVisibility, GenericActionCtx, GenericDataModel, GenericMutationCtx, GenericQueryCtx, MutationBuilder, QueryBuilder, RegisteredAction, RegisteredMutation, RegisteredQuery, TableNamesInDataModel } from "convex/server";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
import * as z$1 from "zod/v4";
|
|
@@ -593,6 +592,8 @@ interface HttpProcedureBuilder<TInitialCtx, TCtx, TInput extends UnsetMarker | z
|
|
|
593
592
|
* Return Response for custom responses, or plain object for auto JSON serialization.
|
|
594
593
|
*/
|
|
595
594
|
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>;
|
|
595
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
596
|
+
name(value: string): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
|
|
596
597
|
/** Define response schema */
|
|
597
598
|
output<TSchema extends z.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TSchema, TParams, TQuery, TMeta, TMethod, TForm>;
|
|
598
599
|
/** Define path parameter schema (for :param in path) */
|
|
@@ -736,6 +737,7 @@ type ProcedureBuilderDef<TMeta = object> = {
|
|
|
736
737
|
inputSchemas: Record<string, any>[];
|
|
737
738
|
outputSchema?: z.ZodTypeAny;
|
|
738
739
|
meta?: TMeta;
|
|
740
|
+
procedureName?: string;
|
|
739
741
|
functionConfig: InternalFunctionConfig; /** Whether this procedure uses internal function (not exposed to clients) */
|
|
740
742
|
isInternal?: boolean;
|
|
741
743
|
};
|
|
@@ -760,39 +762,11 @@ declare class ProcedureBuilder<TBaseCtx, _TContext, TContextOverrides extends Un
|
|
|
760
762
|
protected _output<TNewOutput extends z.ZodTypeAny>(schema: TNewOutput): ProcedureBuilderDef<TMeta>;
|
|
761
763
|
/** Set procedure metadata (shallow merged when chained) - to be overridden by subclasses */
|
|
762
764
|
protected _meta(value: TMeta): ProcedureBuilderDef<TMeta>;
|
|
765
|
+
/** Set server-only procedure name for middleware/logging */
|
|
766
|
+
protected _name(value: string): ProcedureBuilderDef<TMeta>;
|
|
763
767
|
/** Merge all input schemas into one */
|
|
764
768
|
protected _getMergedInput(): Record<string, any> | undefined;
|
|
765
|
-
protected _createFunction(handler: any, baseFunction: any, customFn: typeof zCustomQuery | typeof zCustomMutation | typeof zCustomAction, fnType: 'query' | 'mutation' | 'action'):
|
|
766
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
767
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
768
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
769
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
770
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
771
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
772
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
773
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
774
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
775
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
776
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
777
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
778
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
779
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
780
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
781
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
782
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
783
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
784
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
785
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
786
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
787
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
788
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
789
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
790
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
791
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
792
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
793
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
794
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
795
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>;
|
|
769
|
+
protected _createFunction(handler: any, baseFunction: any, customFn: typeof zCustomQuery | typeof zCustomMutation | typeof zCustomAction, fnType: 'query' | 'mutation' | 'action'): Record<string, unknown>;
|
|
796
770
|
}
|
|
797
771
|
/**
|
|
798
772
|
* Query-specific procedure builder
|
|
@@ -808,6 +782,8 @@ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extend
|
|
|
808
782
|
TMeta, $ContextOverridesOut, InferMiddlewareInput<TInput>>): QueryProcedureBuilder<TBaseCtx, TContext, Overwrite$1<TContextOverrides, $ContextOverridesOut>, TInput, TClientInput, TOutput, TMeta>;
|
|
809
783
|
/** Set procedure metadata (shallow merged when chained) */
|
|
810
784
|
meta(value: TMeta): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
|
|
785
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
786
|
+
name(value: string): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
|
|
811
787
|
/** Define input schema (chainable - schemas are merged) */
|
|
812
788
|
input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, IntersectIfDefined<TClientInput, TNewInput>, TOutput, TMeta>;
|
|
813
789
|
/**
|
|
@@ -833,37 +809,7 @@ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extend
|
|
|
833
809
|
query<TResult>(handler: (opts: {
|
|
834
810
|
ctx: Overwrite$1<TContext, TContextOverrides>;
|
|
835
811
|
input: InferInput<TInput>;
|
|
836
|
-
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>):
|
|
837
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
838
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
839
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
840
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
841
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
842
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
843
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
844
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
845
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
846
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
847
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
848
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
849
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
850
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
851
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
852
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
853
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
854
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
855
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
856
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
857
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
858
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
859
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
860
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
861
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
862
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
863
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
864
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
865
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
866
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>) & CRPCFunctionTypeHint<InferClientInput<TClientInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
812
|
+
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TClientInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
867
813
|
/** Mark as internal - returns chainable builder using internal function */
|
|
868
814
|
internal(): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
|
|
869
815
|
}
|
|
@@ -881,6 +827,8 @@ declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides ext
|
|
|
881
827
|
TMeta, $ContextOverridesOut, InferMiddlewareInput<TInput>>): MutationProcedureBuilder<TBaseCtx, TContext, Overwrite$1<TContextOverrides, $ContextOverridesOut>, TInput, TOutput, TMeta>;
|
|
882
828
|
/** Set procedure metadata (shallow merged when chained) */
|
|
883
829
|
meta(value: TMeta): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
830
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
831
|
+
name(value: string): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
884
832
|
/** Define input schema (chainable - schemas are merged) */
|
|
885
833
|
input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
|
|
886
834
|
/** Define output schema */
|
|
@@ -889,37 +837,7 @@ declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides ext
|
|
|
889
837
|
mutation<TResult>(handler: (opts: {
|
|
890
838
|
ctx: Overwrite$1<TContext, TContextOverrides>;
|
|
891
839
|
input: InferInput<TInput>;
|
|
892
|
-
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>):
|
|
893
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
894
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
895
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
896
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
897
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
898
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
899
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
900
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
901
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
902
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
903
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
904
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
905
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
906
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
907
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
908
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
909
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
910
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
911
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
912
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
913
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
914
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
915
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
916
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
917
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
918
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
919
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
920
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
921
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
922
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>) & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
840
|
+
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
923
841
|
/** Mark as internal - returns chainable builder using internal function */
|
|
924
842
|
internal(): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
925
843
|
}
|
|
@@ -933,6 +851,8 @@ declare class ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides exten
|
|
|
933
851
|
TMeta, $ContextOverridesOut, InferMiddlewareInput<TInput>>): ActionProcedureBuilder<TBaseCtx, TContext, Overwrite$1<TContextOverrides, $ContextOverridesOut>, TInput, TOutput, TMeta>;
|
|
934
852
|
/** Set procedure metadata (shallow merged when chained) */
|
|
935
853
|
meta(value: TMeta): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
854
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
855
|
+
name(value: string): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
936
856
|
/** Define input schema (chainable - schemas are merged) */
|
|
937
857
|
input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
|
|
938
858
|
/** Define output schema */
|
|
@@ -941,37 +861,7 @@ declare class ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides exten
|
|
|
941
861
|
action<TResult>(handler: (opts: {
|
|
942
862
|
ctx: Overwrite$1<TContext, TContextOverrides>;
|
|
943
863
|
input: InferInput<TInput>;
|
|
944
|
-
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>):
|
|
945
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
946
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
947
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
948
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
949
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
950
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
951
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
952
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
953
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
954
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
955
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
956
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
957
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
958
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
959
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
960
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
961
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
962
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
963
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
964
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
965
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
966
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
967
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
968
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
969
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
970
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
971
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
972
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
973
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
974
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>) & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
864
|
+
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
975
865
|
/** Mark as internal - returns chainable builder using internal function */
|
|
976
866
|
internal(): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
977
867
|
}
|
|
@@ -1466,4 +1356,14 @@ type GeneratedRegistrySource<TCallerRegistry extends GeneratedProcedureRegistry,
|
|
|
1466
1356
|
type GeneratedRegistryRuntimeResult<TQueryCtx, TMutationCtx, TCallerRegistry extends GeneratedProcedureRegistry, TActionCtx, THandlerRegistry extends GeneratedProcedureRegistry | undefined> = THandlerRegistry extends GeneratedProcedureRegistry ? GeneratedRegistryRuntimeWithHandler<TQueryCtx, TMutationCtx, TCallerRegistry, Exclude<THandlerRegistry, undefined>, TActionCtx> : GeneratedRegistryRuntime<TQueryCtx, TMutationCtx, TCallerRegistry, TActionCtx>;
|
|
1467
1357
|
declare function createGeneratedRegistryRuntime<TQueryCtx, TMutationCtx, TCallerRegistry extends GeneratedProcedureRegistry, TActionCtx = never, THandlerRegistry extends GeneratedProcedureRegistry | undefined = undefined>(createRegistryOrRegistry: GeneratedRegistrySource<TCallerRegistry, THandlerRegistry>): GeneratedRegistryRuntimeResult<TQueryCtx, TMutationCtx, TCallerRegistry, TActionCtx, THandlerRegistry>;
|
|
1468
1358
|
//#endregion
|
|
1469
|
-
|
|
1359
|
+
//#region src/server/procedure-name.d.ts
|
|
1360
|
+
type ProcedureNameEntry = {
|
|
1361
|
+
column: number;
|
|
1362
|
+
line: number;
|
|
1363
|
+
name: string;
|
|
1364
|
+
};
|
|
1365
|
+
type ProcedureNameLookup = Record<string, ProcedureNameEntry[]>;
|
|
1366
|
+
declare function registerProcedureNameLookup(lookup: ProcedureNameLookup, functionsDirHint: string): void;
|
|
1367
|
+
declare function inferProcedureNameFromCallsite(): string | undefined;
|
|
1368
|
+
//#endregion
|
|
1369
|
+
export { CRPCFunctionTypeHint as $, CRPCError as A, createEnv as B, createProcedureHandlerFactory as C, zid as Ct, WithHttpRouter as D, zodToConvexFields as Dt, typedProcedureResolver as E, zodToConvex as Et, getCRPCErrorFromUnknown as F, CallerMeta as G, createCallerFactory as H, getHTTPStatusCodeFromError as I, createServerCaller as J, CallerOpts as K, isCRPCError as L, CRPCErrorData as M, CRPC_ERROR_CODES_BY_KEY as N, inferApiInputs as O, CRPC_ERROR_CODE_TO_HTTP as P, ActionProcedureBuilder as Q, toCRPCError as R, createProcedureCallerFactory as S, zCustomQuery as St, getGeneratedFunctionReference as T, zodOutputToConvexFields as Tt, LazyCaller as U, ConvexContext as V, createLazyCaller as W, createGeneratedFunctionReference as X, createApiLeaf as Y, getGeneratedValue as Z, ProcedureSchedulableCallerFromRegistry as _, convexToZod as _t, CreateProcedureCallerFactoryOptions as a, HttpProcedureBuilder as at, createGenericCallerFactory as b, zCustomAction as bt, GeneratedRegistryCallerFactory as c, handleHttpError as ct, GeneratedRegistryHandlerForContext as d, ConvexValidatorFromZodOutput as dt, MutationProcedureBuilder as et, ProcedureActionCallerFromRegistry as f, CustomBuilder as ft, ProcedureFromFunctionReference as g, ZodValidatorFromConvex as gt, ProcedureDefinition as h, ZodFromValidatorBase as ht, registerProcedureNameLookup as i, initCRPC as it, CRPCErrorCode as j, inferApiOutputs as k, GeneratedRegistryCallerForContext as l, matchPathParams as lt, ProcedureCallerFromRegistry as m, Zid as mt, ProcedureNameLookup as n, QueryProcedureBuilder as nt, GeneratedProcedureRegistry as o, createHttpProcedureBuilder as ot, ProcedureCaller as p, ZCustomCtx as pt, ServerCaller as q, inferProcedureNameFromCallsite as r, createMiddlewareFactory as rt, GeneratedProcedureRegistryEntry as s, extractPathParams as st, ProcedureNameEntry as t, ProcedureBuilder as tt, GeneratedRegistryHandlerFactory as u, ConvexValidatorFromZod as ut, ProcedureScheduleCallerFromRegistry as v, convexToZodFields as vt, defineProcedure as w, zodOutputToConvex as wt, createGenericHandlerFactory as x, zCustomMutation as xt, createGeneratedRegistryRuntime as y, withSystemFields as yt, CreateEnvOptions as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as MiddlewareBuilder } from "../types-
|
|
2
|
-
import { t as Plugin } from "../middleware-
|
|
1
|
+
import { o as MiddlewareBuilder } from "../types-a-RHmrDZ.js";
|
|
2
|
+
import { t as Plugin } from "../middleware-nS_qXecO.js";
|
|
3
3
|
import * as convex_server0 from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/ratelimit/duration.d.ts
|
package/dist/ratelimit/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as definePlugin } from "../middleware-
|
|
1
|
+
import { u as requireMutationCtx } from "../api-entry-BMCQSsCw.js";
|
|
2
|
+
import { _ as CRPCError } from "../builder-Cb6gloDB.js";
|
|
3
|
+
import { t as definePlugin } from "../middleware-DkIhQXwg.js";
|
|
4
4
|
import { v } from "convex/values";
|
|
5
5
|
import { mutationGeneric, queryGeneric } from "convex/server";
|
|
6
6
|
|
package/dist/rsc/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as DeepPartial, o as Simplify, r as DistributiveOmit } from "../types-BTb_4BaU.js";
|
|
2
|
-
import { C as HttpProcedure, d as CRPCHttpRouter, j as DataTransformerOptions, p as HttpRouterRecord } from "../http-types-
|
|
3
|
-
import {
|
|
4
|
-
import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-
|
|
2
|
+
import { C as HttpProcedure, d as CRPCHttpRouter, j as DataTransformerOptions, p as HttpRouterRecord } from "../http-types-BLFA9zS7.js";
|
|
3
|
+
import { g as UnsetMarker } from "../types-a-RHmrDZ.js";
|
|
4
|
+
import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-C6pQrnzD.js";
|
|
5
5
|
import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { DefaultError, QueryFilters, SkipToken, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { C as HttpProcedure, D as ProcedureMeta, E as InferHttpInput, S as HttpMethod, T as HttpRouteDefinition, _ as extractRouteMap, b as HttpActionHandler, d as CRPCHttpRouter, f as HttpRouterDef, g as createHttpRouterFactory, h as createHttpRouter, m as HttpRouterWithHono, p as HttpRouterRecord, v as CRPCHonoHandler, w as HttpProcedureBuilderDef, x as HttpHandlerOpts, y as HttpActionConstructor } from "../http-types-
|
|
3
|
-
import { a as MergeZodObjects, c as MiddlewareMarker, d as
|
|
4
|
-
import { a as
|
|
5
|
-
export { ActionProcedureBuilder, AnyMiddleware, AnyMiddlewareBuilder, CRPCError, CRPCErrorCode, CRPCErrorData, CRPCFunctionTypeHint, CRPCHonoHandler, CRPCHttpRouter, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, CallerMeta, CallerOpts, ConvexContext, ConvexValidatorFromZod, ConvexValidatorFromZodOutput, CreateEnvOptions, CreateProcedureCallerFactoryOptions, CustomBuilder, GeneratedProcedureRegistry, GeneratedProcedureRegistryEntry, GeneratedRegistryCallerFactory, GeneratedRegistryCallerForContext, GeneratedRegistryHandlerFactory, GeneratedRegistryHandlerForContext, GenericCtx, GetRawInputFn, HttpActionConstructor, HttpActionHandler, HttpHandlerOpts, HttpMethod, HttpProcedure, HttpProcedureBuilder, HttpProcedureBuilderDef, HttpRouteDefinition, HttpRouterDef, HttpRouterRecord, HttpRouterWithHono, InferHttpInput, IntersectIfDefined, LazyCaller, MergeZodObjects, MiddlewareBuilder, MiddlewareFunction, MiddlewareMarker, MiddlewareNext, MiddlewareResult, MutationProcedureBuilder, Overwrite, ProcedureActionCallerFromRegistry, ProcedureBuilder, ProcedureCaller, ProcedureCallerFromRegistry, ProcedureDefinition, ProcedureFromFunctionReference, ProcedureMeta, ProcedureSchedulableCallerFromRegistry, ProcedureScheduleCallerFromRegistry, QueryProcedureBuilder, ResolveIfSet, RunMutationCtx, ServerCaller, Simplify, UnsetMarker, WithHttpRouter, ZCustomCtx, Zid, ZodFromValidatorBase, ZodValidatorFromConvex, convexToZod, convexToZodFields, createApiLeaf, createCallerFactory, createEnv, createGeneratedFunctionReference, createGeneratedRegistryRuntime, createGenericCallerFactory, createGenericHandlerFactory, createHttpProcedureBuilder, createHttpRouter, createHttpRouterFactory, createLazyCaller, createMiddlewareFactory, createProcedureCallerFactory, createProcedureHandlerFactory, createServerCaller, defineProcedure, extractPathParams, extractRouteMap, getCRPCErrorFromUnknown, getGeneratedFunctionReference, getGeneratedValue, getHTTPStatusCodeFromError, handleHttpError, inferApiInputs, inferApiOutputs, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, matchPathParams, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
|
|
1
|
+
import { $ as CRPCFunctionTypeHint, A as CRPCError, B as createEnv, C as createProcedureHandlerFactory, Ct as zid, D as WithHttpRouter, Dt as zodToConvexFields, E as typedProcedureResolver, Et as zodToConvex, F as getCRPCErrorFromUnknown, G as CallerMeta, H as createCallerFactory, I as getHTTPStatusCodeFromError, J as createServerCaller, K as CallerOpts, L as isCRPCError, M as CRPCErrorData, N as CRPC_ERROR_CODES_BY_KEY, O as inferApiInputs, P as CRPC_ERROR_CODE_TO_HTTP, Q as ActionProcedureBuilder, R as toCRPCError, S as createProcedureCallerFactory, St as zCustomQuery, T as getGeneratedFunctionReference, Tt as zodOutputToConvexFields, U as LazyCaller, V as ConvexContext, W as createLazyCaller, X as createGeneratedFunctionReference, Y as createApiLeaf, Z as getGeneratedValue, _ as ProcedureSchedulableCallerFromRegistry, _t as convexToZod, a as CreateProcedureCallerFactoryOptions, at as HttpProcedureBuilder, b as createGenericCallerFactory, bt as zCustomAction, c as GeneratedRegistryCallerFactory, ct as handleHttpError, d as GeneratedRegistryHandlerForContext, dt as ConvexValidatorFromZodOutput, et as MutationProcedureBuilder, f as ProcedureActionCallerFromRegistry, ft as CustomBuilder, g as ProcedureFromFunctionReference, gt as ZodValidatorFromConvex, h as ProcedureDefinition, ht as ZodFromValidatorBase, i as registerProcedureNameLookup, it as initCRPC, j as CRPCErrorCode, k as inferApiOutputs, l as GeneratedRegistryCallerForContext, lt as matchPathParams, m as ProcedureCallerFromRegistry, mt as Zid, n as ProcedureNameLookup, nt as QueryProcedureBuilder, o as GeneratedProcedureRegistry, ot as createHttpProcedureBuilder, p as ProcedureCaller, pt as ZCustomCtx, q as ServerCaller, r as inferProcedureNameFromCallsite, rt as createMiddlewareFactory, s as GeneratedProcedureRegistryEntry, st as extractPathParams, t as ProcedureNameEntry, tt as ProcedureBuilder, u as GeneratedRegistryHandlerFactory, ut as ConvexValidatorFromZod, v as ProcedureScheduleCallerFromRegistry, vt as convexToZodFields, w as defineProcedure, wt as zodOutputToConvex, x as createGenericHandlerFactory, xt as zCustomMutation, y as createGeneratedRegistryRuntime, yt as withSystemFields, z as CreateEnvOptions } from "../procedure-name-D-fDCBlo.js";
|
|
2
|
+
import { C as HttpProcedure, D as ProcedureMeta, E as InferHttpInput, S as HttpMethod, T as HttpRouteDefinition, _ as extractRouteMap, b as HttpActionHandler, d as CRPCHttpRouter, f as HttpRouterDef, g as createHttpRouterFactory, h as createHttpRouter, m as HttpRouterWithHono, p as HttpRouterRecord, v as CRPCHonoHandler, w as HttpProcedureBuilderDef, x as HttpHandlerOpts, y as HttpActionConstructor } from "../http-types-BLFA9zS7.js";
|
|
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-a-RHmrDZ.js";
|
|
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-BvWW0Ilq.js";
|
|
5
|
+
export { ActionProcedureBuilder, AnyMiddleware, AnyMiddlewareBuilder, CRPCError, CRPCErrorCode, CRPCErrorData, CRPCFunctionTypeHint, CRPCHonoHandler, CRPCHttpRouter, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, CallerMeta, CallerOpts, ConvexContext, ConvexValidatorFromZod, ConvexValidatorFromZodOutput, CreateEnvOptions, CreateProcedureCallerFactoryOptions, CustomBuilder, GeneratedProcedureRegistry, GeneratedProcedureRegistryEntry, GeneratedRegistryCallerFactory, GeneratedRegistryCallerForContext, GeneratedRegistryHandlerFactory, GeneratedRegistryHandlerForContext, GenericCtx, GetRawInputFn, HttpActionConstructor, HttpActionHandler, HttpHandlerOpts, HttpMethod, HttpProcedure, HttpProcedureBuilder, HttpProcedureBuilderDef, HttpRouteDefinition, HttpRouterDef, HttpRouterRecord, HttpRouterWithHono, InferHttpInput, IntersectIfDefined, LazyCaller, MergeZodObjects, MiddlewareBuilder, MiddlewareFunction, MiddlewareMarker, MiddlewareNext, MiddlewareProcedureInfo, MiddlewareProcedureType, MiddlewareResult, MutationProcedureBuilder, Overwrite, ProcedureActionCallerFromRegistry, ProcedureBuilder, ProcedureCaller, ProcedureCallerFromRegistry, ProcedureDefinition, ProcedureFromFunctionReference, ProcedureMeta, ProcedureNameEntry, ProcedureNameLookup, ProcedureSchedulableCallerFromRegistry, ProcedureScheduleCallerFromRegistry, QueryProcedureBuilder, ResolveIfSet, RunMutationCtx, SchedulerCtx, ServerCaller, Simplify, UnsetMarker, WithHttpRouter, ZCustomCtx, Zid, ZodFromValidatorBase, ZodValidatorFromConvex, 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, inferApiInputs, inferApiOutputs, 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 };
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as isMutationCtx, c as
|
|
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-BMCQSsCw.js";
|
|
2
2
|
import { n as createLazyCaller, r as createServerCaller, t as createCallerFactory } from "../caller-factory-cTXNvYdz.js";
|
|
3
|
-
import { A as
|
|
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-
|
|
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-Cb6gloDB.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-AjLfkHyF.js";
|
|
5
5
|
|
|
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, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, matchPathParams, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
|
|
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as CombinedDataTransformer, n as HttpClientError } from "./http-types-
|
|
1
|
+
import { O as CombinedDataTransformer, n as HttpClientError } from "./http-types-BLFA9zS7.js";
|
|
2
2
|
import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
|
|
3
3
|
|
|
4
4
|
//#region src/crpc/http-client.d.ts
|
|
@@ -9,6 +9,13 @@ type UnsetMarker = {
|
|
|
9
9
|
type MiddlewareMarker = {
|
|
10
10
|
readonly __brand: 'MiddlewareMarker';
|
|
11
11
|
};
|
|
12
|
+
type MiddlewareProcedureType = 'query' | 'mutation' | 'action' | 'httpAction';
|
|
13
|
+
type MiddlewareProcedureInfo = {
|
|
14
|
+
readonly type: MiddlewareProcedureType;
|
|
15
|
+
readonly name?: string;
|
|
16
|
+
readonly method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
17
|
+
readonly path?: string;
|
|
18
|
+
};
|
|
12
19
|
/** Flatten intersection types for better IDE display */
|
|
13
20
|
type Simplify<T> = { [K in keyof T]: T[K] } & {};
|
|
14
21
|
/**
|
|
@@ -68,6 +75,7 @@ type MiddlewareNext<TContext, TContextOverridesIn> = <TNextContext extends objec
|
|
|
68
75
|
type MiddlewareFunction<TContext, TMeta, TContextOverridesIn, $ContextOverridesOut, TInputOut = unknown> = (opts: {
|
|
69
76
|
ctx: CurrentMiddlewareContext<TContext, TContextOverridesIn>;
|
|
70
77
|
meta: TMeta;
|
|
78
|
+
procedure: MiddlewareProcedureInfo;
|
|
71
79
|
input: TInputOut;
|
|
72
80
|
getRawInput: GetRawInputFn;
|
|
73
81
|
next: MiddlewareNext<TContext, TContextOverridesIn>;
|
|
@@ -90,4 +98,4 @@ type MiddlewareBuilder<TContext, TMeta, $ContextOverridesOut, TInputOut = unknow
|
|
|
90
98
|
/** Type-erased middleware builder for runtime */
|
|
91
99
|
type AnyMiddlewareBuilder = MiddlewareBuilder<any, any, any, any>;
|
|
92
100
|
//#endregion
|
|
93
|
-
export { MergeZodObjects as a, MiddlewareMarker as c,
|
|
101
|
+
export { MergeZodObjects as a, MiddlewareMarker as c, MiddlewareProcedureType as d, MiddlewareResult as f, UnsetMarker as g, Simplify as h, IntersectIfDefined as i, MiddlewareNext as l, ResolveIfSet as m, AnyMiddlewareBuilder as n, MiddlewareBuilder as o, Overwrite as p, GetRawInputFn as r, MiddlewareFunction as s, AnyMiddleware as t, MiddlewareProcedureInfo as u };
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as resolveConfiguredBackend, Ct as generateMeta, P as resolveRunDeps, Tt as logger, wt as getConvexConfig } from "./backend-core-
|
|
2
|
+
import { A as resolveConfiguredBackend, Ct as generateMeta, K as withLocalCodegenEnv, P as resolveRunDeps, Tt as logger, wt as getConvexConfig } from "./backend-core-C0uwGXLx.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -44,22 +44,25 @@ function shouldIgnoreWatchPath(watchedPath, functionsDir, outputFile) {
|
|
|
44
44
|
if (normalizedPath === generatedFile) return true;
|
|
45
45
|
if (normalizedPath === convexGeneratedDir || normalizedPath.startsWith(`${convexGeneratedDir}${path.sep}`)) return true;
|
|
46
46
|
if (normalizedPath === generatedDir || normalizedPath.startsWith(`${generatedDir}${path.sep}`)) return true;
|
|
47
|
-
return normalizedPath.endsWith(".runtime.ts");
|
|
47
|
+
return normalizedPath.endsWith(".runtime.ts") || normalizedPath.endsWith(".kitcn-parse.ts");
|
|
48
48
|
}
|
|
49
49
|
async function runWatcherCodegen(params, deps = {}) {
|
|
50
50
|
const resolveRunDepsFn = deps.resolveRunDeps ?? resolveRunDeps;
|
|
51
51
|
const resolveConfiguredBackendFn = deps.resolveConfiguredBackendFn ?? resolveConfiguredBackend;
|
|
52
52
|
const { execa: execaFn, generateMeta: generateMetaFn, loadCliConfig: loadCliConfigFn } = resolveRunDepsFn();
|
|
53
53
|
const config = loadCliConfigFn(params.configPath);
|
|
54
|
-
|
|
54
|
+
const backend = resolveConfiguredBackendFn({
|
|
55
55
|
backendArg: params.backendArg,
|
|
56
56
|
config
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
});
|
|
58
|
+
if (backend !== "concave") {
|
|
59
|
+
await withLocalCodegenEnv(params.sharedDir, backend, async () => {
|
|
60
|
+
await generateMetaFn(params.sharedDir, {
|
|
61
|
+
debug: params.debug,
|
|
62
|
+
silent: true,
|
|
63
|
+
scope: params.scope,
|
|
64
|
+
trimSegments: params.trimSegments
|
|
65
|
+
});
|
|
63
66
|
});
|
|
64
67
|
return;
|
|
65
68
|
}
|
|
@@ -3717,6 +3717,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3717
3717
|
readonly aggregate_bucket: ConvexTableWithColumns<{
|
|
3718
3718
|
name: "aggregate_bucket";
|
|
3719
3719
|
columns: {
|
|
3720
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
3721
|
+
_: {
|
|
3722
|
+
notNull: true;
|
|
3723
|
+
};
|
|
3724
|
+
} & {
|
|
3725
|
+
_: {
|
|
3726
|
+
tableName: "aggregate_bucket";
|
|
3727
|
+
};
|
|
3728
|
+
} & {
|
|
3729
|
+
_: {
|
|
3730
|
+
fieldName: "count";
|
|
3731
|
+
};
|
|
3732
|
+
};
|
|
3720
3733
|
tableKey: ConvexTextBuilderInitial<""> & {
|
|
3721
3734
|
_: {
|
|
3722
3735
|
notNull: true;
|
|
@@ -3786,19 +3799,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3786
3799
|
fieldName: "keyParts";
|
|
3787
3800
|
};
|
|
3788
3801
|
};
|
|
3789
|
-
count: ConvexNumberBuilderInitial<""> & {
|
|
3790
|
-
_: {
|
|
3791
|
-
notNull: true;
|
|
3792
|
-
};
|
|
3793
|
-
} & {
|
|
3794
|
-
_: {
|
|
3795
|
-
tableName: "aggregate_bucket";
|
|
3796
|
-
};
|
|
3797
|
-
} & {
|
|
3798
|
-
_: {
|
|
3799
|
-
fieldName: "count";
|
|
3800
|
-
};
|
|
3801
|
-
};
|
|
3802
3802
|
sumValues: (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>>>) & {
|
|
3803
3803
|
_: {
|
|
3804
3804
|
tableName: "aggregate_bucket";
|
|
@@ -3992,6 +3992,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3992
3992
|
readonly aggregate_extrema: ConvexTableWithColumns<{
|
|
3993
3993
|
name: "aggregate_extrema";
|
|
3994
3994
|
columns: {
|
|
3995
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
3996
|
+
_: {
|
|
3997
|
+
notNull: true;
|
|
3998
|
+
};
|
|
3999
|
+
} & {
|
|
4000
|
+
_: {
|
|
4001
|
+
tableName: "aggregate_extrema";
|
|
4002
|
+
};
|
|
4003
|
+
} & {
|
|
4004
|
+
_: {
|
|
4005
|
+
fieldName: "count";
|
|
4006
|
+
};
|
|
4007
|
+
};
|
|
3995
4008
|
value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
|
|
3996
4009
|
_: {
|
|
3997
4010
|
$type: convex_values0.Value;
|
|
@@ -4061,19 +4074,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4061
4074
|
fieldName: "keyHash";
|
|
4062
4075
|
};
|
|
4063
4076
|
};
|
|
4064
|
-
count: ConvexNumberBuilderInitial<""> & {
|
|
4065
|
-
_: {
|
|
4066
|
-
notNull: true;
|
|
4067
|
-
};
|
|
4068
|
-
} & {
|
|
4069
|
-
_: {
|
|
4070
|
-
tableName: "aggregate_extrema";
|
|
4071
|
-
};
|
|
4072
|
-
} & {
|
|
4073
|
-
_: {
|
|
4074
|
-
fieldName: "count";
|
|
4075
|
-
};
|
|
4076
|
-
};
|
|
4077
4077
|
fieldName: ConvexTextBuilderInitial<""> & {
|
|
4078
4078
|
_: {
|
|
4079
4079
|
notNull: true;
|
|
@@ -4398,22 +4398,22 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4398
4398
|
readonly migration_state: ConvexTableWithColumns<{
|
|
4399
4399
|
name: "migration_state";
|
|
4400
4400
|
columns: {
|
|
4401
|
-
|
|
4401
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
4402
4402
|
_: {
|
|
4403
4403
|
tableName: "migration_state";
|
|
4404
4404
|
};
|
|
4405
4405
|
} & {
|
|
4406
4406
|
_: {
|
|
4407
|
-
fieldName: "
|
|
4407
|
+
fieldName: "direction";
|
|
4408
4408
|
};
|
|
4409
4409
|
};
|
|
4410
|
-
|
|
4410
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4411
4411
|
_: {
|
|
4412
4412
|
tableName: "migration_state";
|
|
4413
4413
|
};
|
|
4414
4414
|
} & {
|
|
4415
4415
|
_: {
|
|
4416
|
-
fieldName: "
|
|
4416
|
+
fieldName: "cursor";
|
|
4417
4417
|
};
|
|
4418
4418
|
};
|
|
4419
4419
|
status: ConvexTextBuilderInitial<""> & {
|
package/package.json
CHANGED
package/skills/convex/SKILL.md
CHANGED
|
@@ -54,7 +54,7 @@ Only remember these non-parity deltas:
|
|
|
54
54
|
19. On the kitcn auth client path, use `createAuthMutations(authClient)` wrappers so logout unsubscribes auth queries before sign out. Raw Convex preset keeps a smaller plain `authClient`.
|
|
55
55
|
20. **NEVER** use `ctx.runQuery`/`ctx.runMutation`/`ctx.runAction` directly for module-to-module calls. Use `create<Module>Handler(ctx)` or `create<Module>Caller(ctx)` from `convex/functions/generated/<module>.runtime` instead.
|
|
56
56
|
21. **`create<Module>Handler(ctx)`** — default choice for queries/mutations. Bypasses input validation, middleware, output validation → zero overhead. Query/mutation ctx only. Import from `./generated/<module>.runtime`.
|
|
57
|
-
22. **`create<Module>Caller(ctx)`** — use in actions and HTTP routes (where handler is unavailable). Goes through validation + middleware. Root caller exposes query+mutation procedures. In `ActionCtx`, action procedures are under `caller.actions.*`; scheduling is under `caller.schedule.now|after|at` with `caller.schedule.cancel(id)`. If your code widened `ctx` to a union like `MutationCtx | ActionCtx`, narrow it before accessing `caller.actions.*` (for example with `requireActionCtx(ctx)`). Import from `./generated/<module>.runtime`. Each caller/handler eagerly loads every procedure in its module (no lazy loading) — split large modules to keep bundles lean.
|
|
57
|
+
22. **`create<Module>Caller(ctx)`** — use in actions and HTTP routes (where handler is unavailable). Goes through validation + middleware. Root caller exposes query+mutation procedures. In `ActionCtx`, action procedures are under `caller.actions.*`; scheduling is under `caller.schedule.now|after|at` with `caller.schedule.cancel(id)`. If your code widened `ctx` to a union like `MutationCtx | ActionCtx`, narrow it before accessing `caller.actions.*` (for example with `requireActionCtx(ctx)`). For scheduling from `GenericCtx` or `MutationCtx | ActionCtx`, use `requireSchedulerCtx(ctx)` instead of pretending the path is action-only. Import from `./generated/<module>.runtime`. Each caller/handler eagerly loads every procedure in its module (no lazy loading) — split large modules to keep bundles lean.
|
|
58
58
|
23. API types (`Api`, `ApiInputs`, `ApiOutputs`, `Select`, `Insert`, `TableName`) import from `@convex/api` — no manual `inferApiInputs<typeof api>`.
|
|
59
59
|
24. HTTP router must export as `httpRouter` (not `appRouter`) for codegen.
|
|
60
60
|
25. Server wiring imports come from `convex/functions/generated/` directory: `getAuth`, `defineAuth` from `generated/auth`; `initCRPC`, `QueryCtx`, `MutationCtx`, `OrmCtx` from `generated/server`; `create<Module>Caller`, `create<Module>Handler` from `generated/<module>.runtime`. No manual `convex/lib/orm.ts`.
|
|
@@ -226,9 +226,10 @@ Builder rules that matter:
|
|
|
226
226
|
|
|
227
227
|
1. Build `public`, `optional`, `auth`, and `private` procedure families once in `convex/lib/crpc.ts`.
|
|
228
228
|
2. `.meta(...)` is client-visible via generated API metadata. Never put secrets there.
|
|
229
|
-
3.
|
|
230
|
-
4.
|
|
231
|
-
5.
|
|
229
|
+
3. Middleware receives server-only `procedure` info. When procedures are built from your app `generated/server` helper, standard `export const` queries, mutations, and actions infer `module:function` automatically from file path + export name. Use `.name("module:function")` only to override or cover unusual export shapes.
|
|
230
|
+
4. Resolve session/user once in middleware. Do not re-fetch auth state in every procedure.
|
|
231
|
+
5. Shared `c.middleware()` chains preserve mutation writer types on mutation procedures. If the middleware itself performs writes, type it as mutation-only with `c.middleware<MutationCtx>(...)`.
|
|
232
|
+
6. Keep deeper auth/runtime edge cases in `references/setup/server.md` and `references/features/auth*.md`.
|
|
232
233
|
|
|
233
234
|
### 3) Query + Mutation Procedure Template
|
|
234
235
|
|