/* * 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 ListAuditRisksRequest = { /** * The audit ID */ auditId: string; /** * The risk assessment snapshot ID */ snapshotId: 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 risk scenario description */ search?: string | undefined; /** * Field to sort results by. Allowed: "riskId", "riskScenario", "inherentRisk", "treatment", "residualRisk", "reviewStatus", "owner", "categories", "ciaCategories", "identified". Default: "identified" */ orderBy?: components.RiskOrderBy | undefined; /** * Sort direction: "asc" or "desc". Default: "desc" */ orderDirection?: components.OrderDirection | undefined; }; /** @internal */ export type ListAuditRisksRequest$Outbound = { auditId: string; snapshotId: string; pageSize: number; pageCursor?: string | undefined; search?: string | undefined; orderBy?: string | undefined; orderDirection?: string | undefined; }; /** @internal */ export const ListAuditRisksRequest$outboundSchema: z.ZodType< ListAuditRisksRequest$Outbound, z.ZodTypeDef, ListAuditRisksRequest > = z.object({ auditId: z.string(), snapshotId: z.string(), pageSize: z.number().int().default(10), pageCursor: z.string().optional(), search: z.string().optional(), orderBy: components.RiskOrderBy$outboundSchema.optional(), orderDirection: components.OrderDirection$outboundSchema.optional(), }); export function listAuditRisksRequestToJSON( listAuditRisksRequest: ListAuditRisksRequest, ): string { return JSON.stringify( ListAuditRisksRequest$outboundSchema.parse(listAuditRisksRequest), ); }