Create a new compliance audit with a prebuilt policy pack (AML, GDPR, or SOC2)
Authorization header or authenticated session cookies.
See Authentication for details.
aml - Anti-Money Laundering rulesgdpr - General Data Protection Regulation rulessoc2 - SOC 2 compliance rules["Access Control", "Encryption"]CreateAuditSchema (Zod validation)getUserIdFromRequest()policy_type (AML, GDPR, or SOC2)selected_categories if providedpolicies tablerules table with enriched metadatapolicies table: user_id = auth.uid()rules table: Filtered by policy_id owned by the authenticated user/api/policies/ingest - Extract rules from PDF documents/api/policies/generate-rules - Generate rules using AIaudit_id is a logical session identifier, not stored in the database (MVP design)historical_context metadata stored as JSONis_active: true by defaultactive and type to prebuilt