@swastikbhattacharyya/next-actions - v0.3.2
    Preparing search index...

    Type Alias ValidationHandler<InputSchema, Context, OutputContext, ErrorMap>

    ValidationHandler: (
        { params, context, }: {
            context: Context;
            params: z.infer<InputSchema>;
        },
    ) => Promise<ValidationResult<OutputContext, ErrorMap>>

    A function that performs validation before the action is executed.

    Type Parameters

    • InputSchema extends $ZodType

      A Zod schema used to define the shape of the action parameters. Note: The schema is not validated automatically, use a validator like zodValidator to enforce it.

    • Context extends object

      The context available to this validator.

    • OutputContext extends void | object

      Optional context to inject into the execution on success.

    • ErrorMap extends void | object

      A map where each key is an error code, and the corresponding value is the payload associated with that specific error.

    Type declaration