zodvex 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +349 -409
- package/dist/index.d.mts +1 -20
- package/dist/index.d.ts +1 -20
- package/dist/index.js +0 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -473,23 +473,4 @@ declare function safePick(schema: z.ZodObject<any>, mask: Mask): z.ZodObject<any
|
|
|
473
473
|
*/
|
|
474
474
|
declare function safeOmit(schema: z.ZodObject<any>, mask: Mask): z.ZodObject<any>;
|
|
475
475
|
|
|
476
|
-
|
|
477
|
-
returns?: R;
|
|
478
|
-
}): RegisteredQuery<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
479
|
-
declare function zInternalQuery<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(internalQuery: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
480
|
-
returns?: R;
|
|
481
|
-
}): RegisteredQuery<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
482
|
-
declare function zMutation<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(mutation: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
483
|
-
returns?: R;
|
|
484
|
-
}): RegisteredMutation<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
485
|
-
declare function zInternalMutation<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(internalMutation: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
486
|
-
returns?: R;
|
|
487
|
-
}): RegisteredMutation<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
488
|
-
declare function zAction<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(action: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
489
|
-
returns?: R;
|
|
490
|
-
}): RegisteredAction<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
491
|
-
declare function zInternalAction<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(internalAction: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
492
|
-
returns?: R;
|
|
493
|
-
}): RegisteredAction<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
494
|
-
|
|
495
|
-
export { type ConvexCodec, type ConvexValidatorFromZod, type ConvexValidatorFromZodFieldsAuto, type CustomBuilder, type ExtractCtx, type ExtractVisibility, type InferArgs, type InferHandlerReturns, type InferReturns, type PreserveReturnType, type Zid, type ZodToConvexArgs, type ZodValidator, convexCodec, customFnBuilder, findBaseCodec, formatZodIssues, fromConvexJS, getObjectShape, handleZodValidationError, isDateSchema, makeUnion, mapDateFieldToNumber, pick, pickShape, registerBaseCodec, registryHelpers, returnsAs, safeOmit, safePick, toConvexJS, zAction, zActionBuilder, zCustomAction, zCustomActionBuilder, zCustomMutation, zCustomMutationBuilder, zCustomQuery, zCustomQueryBuilder, zInternalAction, zInternalMutation, zInternalQuery, zMutation, zMutationBuilder, zPaginated, zQuery, zQueryBuilder, zid, zodDoc, zodDocOrNull, zodTable, zodToConvex, zodToConvexFields };
|
|
476
|
+
export { type ConvexCodec, type ConvexValidatorFromZod, type ConvexValidatorFromZodFieldsAuto, type CustomBuilder, type ExtractCtx, type ExtractVisibility, type InferArgs, type InferHandlerReturns, type InferReturns, type PreserveReturnType, type Zid, type ZodToConvexArgs, type ZodValidator, convexCodec, customFnBuilder, findBaseCodec, formatZodIssues, fromConvexJS, getObjectShape, handleZodValidationError, isDateSchema, makeUnion, mapDateFieldToNumber, pick, pickShape, registerBaseCodec, registryHelpers, returnsAs, safeOmit, safePick, toConvexJS, zActionBuilder, zCustomAction, zCustomActionBuilder, zCustomMutation, zCustomMutationBuilder, zCustomQuery, zCustomQueryBuilder, zMutationBuilder, zPaginated, zQueryBuilder, zid, zodDoc, zodDocOrNull, zodTable, zodToConvex, zodToConvexFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -473,23 +473,4 @@ declare function safePick(schema: z.ZodObject<any>, mask: Mask): z.ZodObject<any
|
|
|
473
473
|
*/
|
|
474
474
|
declare function safeOmit(schema: z.ZodObject<any>, mask: Mask): z.ZodObject<any>;
|
|
475
475
|
|
|
476
|
-
|
|
477
|
-
returns?: R;
|
|
478
|
-
}): RegisteredQuery<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
479
|
-
declare function zInternalQuery<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(internalQuery: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
480
|
-
returns?: R;
|
|
481
|
-
}): RegisteredQuery<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
482
|
-
declare function zMutation<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(mutation: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
483
|
-
returns?: R;
|
|
484
|
-
}): RegisteredMutation<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
485
|
-
declare function zInternalMutation<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(internalMutation: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
486
|
-
returns?: R;
|
|
487
|
-
}): RegisteredMutation<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
488
|
-
declare function zAction<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(action: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
489
|
-
returns?: R;
|
|
490
|
-
}): RegisteredAction<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
491
|
-
declare function zInternalAction<Builder extends (fn: any) => any, A extends z.ZodTypeAny | Record<string, z.ZodTypeAny>, R extends z.ZodTypeAny | undefined = undefined, Visibility extends FunctionVisibility = ExtractVisibility<Builder>>(internalAction: Builder, input: A, handler: (ctx: ExtractCtx<Builder>, args: ZodToConvexArgs<A>) => InferHandlerReturns<R> | Promise<InferHandlerReturns<R>>, options?: {
|
|
492
|
-
returns?: R;
|
|
493
|
-
}): RegisteredAction<Visibility, ZodToConvexArgs<A>, Promise<InferReturns<R>>>;
|
|
494
|
-
|
|
495
|
-
export { type ConvexCodec, type ConvexValidatorFromZod, type ConvexValidatorFromZodFieldsAuto, type CustomBuilder, type ExtractCtx, type ExtractVisibility, type InferArgs, type InferHandlerReturns, type InferReturns, type PreserveReturnType, type Zid, type ZodToConvexArgs, type ZodValidator, convexCodec, customFnBuilder, findBaseCodec, formatZodIssues, fromConvexJS, getObjectShape, handleZodValidationError, isDateSchema, makeUnion, mapDateFieldToNumber, pick, pickShape, registerBaseCodec, registryHelpers, returnsAs, safeOmit, safePick, toConvexJS, zAction, zActionBuilder, zCustomAction, zCustomActionBuilder, zCustomMutation, zCustomMutationBuilder, zCustomQuery, zCustomQueryBuilder, zInternalAction, zInternalMutation, zInternalQuery, zMutation, zMutationBuilder, zPaginated, zQuery, zQueryBuilder, zid, zodDoc, zodDocOrNull, zodTable, zodToConvex, zodToConvexFields };
|
|
476
|
+
export { type ConvexCodec, type ConvexValidatorFromZod, type ConvexValidatorFromZodFieldsAuto, type CustomBuilder, type ExtractCtx, type ExtractVisibility, type InferArgs, type InferHandlerReturns, type InferReturns, type PreserveReturnType, type Zid, type ZodToConvexArgs, type ZodValidator, convexCodec, customFnBuilder, findBaseCodec, formatZodIssues, fromConvexJS, getObjectShape, handleZodValidationError, isDateSchema, makeUnion, mapDateFieldToNumber, pick, pickShape, registerBaseCodec, registryHelpers, returnsAs, safeOmit, safePick, toConvexJS, zActionBuilder, zCustomAction, zCustomActionBuilder, zCustomMutation, zCustomMutationBuilder, zCustomQuery, zCustomQueryBuilder, zMutationBuilder, zPaginated, zQueryBuilder, zid, zodDoc, zodDocOrNull, zodTable, zodToConvex, zodToConvexFields };
|
package/dist/index.js
CHANGED
|
@@ -849,9 +849,6 @@ function zQuery(query, input, handler, options) {
|
|
|
849
849
|
}
|
|
850
850
|
});
|
|
851
851
|
}
|
|
852
|
-
function zInternalQuery(internalQuery, input, handler, options) {
|
|
853
|
-
return zQuery(internalQuery, input, handler, options);
|
|
854
|
-
}
|
|
855
852
|
function zMutation(mutation, input, handler, options) {
|
|
856
853
|
let zodSchema;
|
|
857
854
|
let args;
|
|
@@ -891,9 +888,6 @@ function zMutation(mutation, input, handler, options) {
|
|
|
891
888
|
}
|
|
892
889
|
});
|
|
893
890
|
}
|
|
894
|
-
function zInternalMutation(internalMutation, input, handler, options) {
|
|
895
|
-
return zMutation(internalMutation, input, handler, options);
|
|
896
|
-
}
|
|
897
891
|
function zAction(action, input, handler, options) {
|
|
898
892
|
let zodSchema;
|
|
899
893
|
let args;
|
|
@@ -933,9 +927,6 @@ function zAction(action, input, handler, options) {
|
|
|
933
927
|
}
|
|
934
928
|
});
|
|
935
929
|
}
|
|
936
|
-
function zInternalAction(internalAction, input, handler, options) {
|
|
937
|
-
return zAction(internalAction, input, handler, options);
|
|
938
|
-
}
|
|
939
930
|
|
|
940
931
|
// src/builders.ts
|
|
941
932
|
function zQueryBuilder(builder) {
|
|
@@ -1020,7 +1011,6 @@ exports.returnsAs = returnsAs;
|
|
|
1020
1011
|
exports.safeOmit = safeOmit;
|
|
1021
1012
|
exports.safePick = safePick;
|
|
1022
1013
|
exports.toConvexJS = toConvexJS;
|
|
1023
|
-
exports.zAction = zAction;
|
|
1024
1014
|
exports.zActionBuilder = zActionBuilder;
|
|
1025
1015
|
exports.zCustomAction = zCustomAction;
|
|
1026
1016
|
exports.zCustomActionBuilder = zCustomActionBuilder;
|
|
@@ -1028,13 +1018,8 @@ exports.zCustomMutation = zCustomMutation;
|
|
|
1028
1018
|
exports.zCustomMutationBuilder = zCustomMutationBuilder;
|
|
1029
1019
|
exports.zCustomQuery = zCustomQuery;
|
|
1030
1020
|
exports.zCustomQueryBuilder = zCustomQueryBuilder;
|
|
1031
|
-
exports.zInternalAction = zInternalAction;
|
|
1032
|
-
exports.zInternalMutation = zInternalMutation;
|
|
1033
|
-
exports.zInternalQuery = zInternalQuery;
|
|
1034
|
-
exports.zMutation = zMutation;
|
|
1035
1021
|
exports.zMutationBuilder = zMutationBuilder;
|
|
1036
1022
|
exports.zPaginated = zPaginated;
|
|
1037
|
-
exports.zQuery = zQuery;
|
|
1038
1023
|
exports.zQueryBuilder = zQueryBuilder;
|
|
1039
1024
|
exports.zid = zid;
|
|
1040
1025
|
exports.zodDoc = zodDoc;
|