/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AuditControlAssessmentState, AuditControlAssessmentState$inboundSchema, } from "./auditcontrolassessmentstate.js"; /** * A control's auditor assessment returned by the assessment write endpoint. */ export type AuditorControlAssessment = { /** * The control this assessment belongs to. */ controlId: string; /** * The audit segment this assessment was written to. */ segmentId: string; /** * An auditor's assessment of a control within an audit. This is the full flat * * @remarks * union of every framework's assessment states (the superset); the selected * segment's framework determines which subset applies. `NOT_ASSESSED` is shared * by all frameworks and is the default for a control that has not yet been assessed. * * Which states apply to which framework: * - Most frameworks (e.g. SOC 2): `IN_PLACE`, `NOT_IN_PLACE`, `PARTIAL`, `NOT_ASSESSED` * - ISO 27001: `CONFORMING`, `MINOR_NON_CONFORMITY`, `MAJOR_NON_CONFORMITY`, `NOT_ASSESSED` * - FedRAMP: `SATISFIED`, `NOT_SATISFIED`, `OTHER_THAN_SATISFIED`, `NOT_ASSESSED` * - FedRAMP Key Security Indicators (KSI): `TRUE`, `FALSE`, `PARTIAL`, `NOT_ASSESSED` * * Distinct from `ControlStatus`, which is the computed tests/documents-passing * status — a different concept. */ assessmentState: AuditControlAssessmentState; /** * The recorded justification. */ justification: string; }; /** @internal */ export const AuditorControlAssessment$inboundSchema: z.ZodType< AuditorControlAssessment, z.ZodTypeDef, unknown > = z.object({ controlId: z.string(), segmentId: z.string(), assessmentState: AuditControlAssessmentState$inboundSchema, justification: z.string(), }); export function auditorControlAssessmentFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuditorControlAssessment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuditorControlAssessment' from JSON`, ); }