/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import * as components from "../components/index.js"; export type ListAuditIssuesRequest = { /** * The audit ID */ auditId: string; /** * Maximum number of results per page (1-100, default 10) */ pageSize?: number | undefined; /** * Pagination cursor from previous response */ pageCursor?: string | undefined; /** * Search term for filtering by issue title and description */ search?: string | undefined; /** * Filter issues to specific snapshots by snapshot ID */ snapshotIdMatchesAny?: Array | undefined; /** * Filter to issues created on or after this date (ISO 8601) */ createdAfterDate?: Date | undefined; /** * Filter to issues created on or before this date (ISO 8601) */ createdBeforeDate?: Date | undefined; /** * Filter to issues detected on or after this date (ISO 8601) */ detectedAfterDate?: Date | undefined; /** * Filter to issues detected on or before this date (ISO 8601) */ detectedBeforeDate?: Date | undefined; /** * Field to sort results by. Allowed: "createdAt", "lastModifiedAt", "detectedAt". Default: "createdAt" */ orderBy?: components.IssueSnapshotItemOrderBy | undefined; /** * Sort direction: "asc" or "desc". Default: "desc" */ orderDirection?: components.OrderDirection | undefined; }; /** @internal */ export type ListAuditIssuesRequest$Outbound = { auditId: string; pageSize: number; pageCursor?: string | undefined; search?: string | undefined; snapshotIdMatchesAny?: Array | undefined; createdAfterDate?: string | undefined; createdBeforeDate?: string | undefined; detectedAfterDate?: string | undefined; detectedBeforeDate?: string | undefined; orderBy?: string | undefined; orderDirection?: string | undefined; }; /** @internal */ export const ListAuditIssuesRequest$outboundSchema: z.ZodType< ListAuditIssuesRequest$Outbound, z.ZodTypeDef, ListAuditIssuesRequest > = z.object({ auditId: z.string(), pageSize: z.number().int().default(10), pageCursor: z.string().optional(), search: z.string().optional(), snapshotIdMatchesAny: z.array(z.string()).optional(), createdAfterDate: z.date().transform(v => v.toISOString()).optional(), createdBeforeDate: z.date().transform(v => v.toISOString()).optional(), detectedAfterDate: z.date().transform(v => v.toISOString()).optional(), detectedBeforeDate: z.date().transform(v => v.toISOString()).optional(), orderBy: components.IssueSnapshotItemOrderBy$outboundSchema.optional(), orderDirection: components.OrderDirection$outboundSchema.optional(), }); export function listAuditIssuesRequestToJSON( listAuditIssuesRequest: ListAuditIssuesRequest, ): string { return JSON.stringify( ListAuditIssuesRequest$outboundSchema.parse(listAuditIssuesRequest), ); }