Function: eventConfigToValidationSchema

@torque-labs/torque-utilsDocs


@torque-labs/torque-utils / eventConfigToValidationSchema

Function: eventConfigToValidationSchema()

function eventConfigToValidationSchema(config): ZodObject<{}, "strip", ZodTypeAny, {}, {}>

Parameters

Parameter
Type

config

{ description: null | string; eventName: string; fields: ({ description: null | string; image: null | string; label: null | string; name: string; } & { type: "string"; validation: { match: null | string; required: null | boolean; }; } | { description: null | string; image: null | string; label: null | string; name: string; } & { type: "number"; validation: { max: null | number; min: null | number; }; } | { description: null | string; image: null | string; label: null | string; name: string; } & { type: "boolean"; validation: { match: null | boolean; }; })[]; formEnabled: boolean; targetUrl: null | string; } | { fields: ({ description: null | string; image: null | string; label: null | string; name: string; } & { type: "string"; validation: { match: null | string; required: null | boolean; }; } | { description: null | string; image: null | string; label: null | string; name: string; } & { type: "number"; validation: { max: null | number; min: null | number; }; } | { description: null | string; image: null | string; label: null | string; name: string; } & { type: "boolean"; validation: { match: null | boolean; }; })[]; }

Returns

ZodObject<{}, "strip", ZodTypeAny, {}, {}>

Defined in

lib/events.ts:6

Last updated