Membrane SDK - v0.29.2
    Preparing search index...

    Function zodDateCoercion

    • Custom Zod type that coerces ISO datetime strings or numeric timestamps to Date objects. Accepts Date objects, ISO strings, and numbers; returns a Date. Shows as plain string in JSON/OpenAPI schema (no format: date-time) to avoid issues with strict OpenAPI generators that reject date-time request body fields.

      Returns ZodPipe<
          ZodTransform<unknown, unknown>,
          ZodPipe<ZodString, ZodTransform<Date, string>>,
      >