/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; /** * Request body for duplicating an IRL audit into a new audit engagement. */ export type DuplicateAuditRequest = { /** * ID of the source IRL audit to duplicate. */ sourceAuditId: string; /** * Display name for the new audit engagement. */ displayName: string; /** * Start of the audit window for the new audit. */ auditStartDate: Date; /** * End of the audit window for the new audit. */ auditEndDate: Date; /** * When auditors gain access to the new audit. */ earlyAccessStartsAt: Date; /** * Emails of auditors who may access the new audit. Minimum one entry required. * * @remarks * Each email must match an active user in the authenticated audit firm's domain. */ allowAuditorEmails: Array; }; /** @internal */ export type DuplicateAuditRequest$Outbound = { sourceAuditId: string; displayName: string; auditStartDate: string; auditEndDate: string; earlyAccessStartsAt: string; allowAuditorEmails: Array; }; /** @internal */ export const DuplicateAuditRequest$outboundSchema: z.ZodType< DuplicateAuditRequest$Outbound, z.ZodTypeDef, DuplicateAuditRequest > = z.object({ sourceAuditId: z.string(), displayName: z.string(), auditStartDate: z.date().transform(v => v.toISOString()), auditEndDate: z.date().transform(v => v.toISOString()), earlyAccessStartsAt: z.date().transform(v => v.toISOString()), allowAuditorEmails: z.array(z.string()), }); export function duplicateAuditRequestToJSON( duplicateAuditRequest: DuplicateAuditRequest, ): string { return JSON.stringify( DuplicateAuditRequest$outboundSchema.parse(duplicateAuditRequest), ); }