/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; export type IssuesFilter = { /** * Filter by ticket status, can be `open`, `closed` or `all`. Will passthrough if none of the above match */ status?: Array | undefined; /** * Only return tickets since a specific date */ since?: Date | undefined; /** * Only return tickets assigned to a specific user */ assigneeId?: string | undefined; }; /** @internal */ export type IssuesFilter$Outbound = { status?: Array | undefined; since?: string | undefined; assignee_id?: string | undefined; }; /** @internal */ export const IssuesFilter$outboundSchema: z.ZodType< IssuesFilter$Outbound, z.ZodTypeDef, IssuesFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ status: z.array(z.string()).optional(), since: z.date().transform(v => v.toISOString()).optional(), assigneeId: z.string().optional(), }).transform((v) => { return remap$(v, { assigneeId: "assignee_id", }); }) ); export function issuesFilterToJSON(issuesFilter: IssuesFilter): string { return JSON.stringify(IssuesFilter$outboundSchema.parse(issuesFilter)); }