prorm API Reference
    Preparing search index...

    Class PrivacyImpactAssessment

    Index
    • Initialize the PrivacyImpactAssessment model and sync the tables. Call once at application startup.

      Parameters

      • prorm: any

        The Prorm instance

      • tableName: string = 'pia_assessments'

        Override the default table name 'pia_assessments'

      Returns Promise<void>

    • Create a new Privacy Impact Assessment.

      Parameters

      • name: string

        Name/title of the assessment

      • dataTypes: string[]

        List of data types being processed

      • processingPurpose: string

        Purpose of the processing operation

      Returns Promise<PIARecord>

      The created PIA record

    • Record a risk associated with a PIA assessment.

      Parameters

      • assessmentId: number

        The ID of the assessment to add the risk to

      • risk: string

        Description of the identified risk

      • severity: RiskSeverity

        Severity level of the risk

      • mitigation: string

        Mitigation measures for the risk

      Returns Promise<RiskRecord>

      The created risk record

    • Approve a Privacy Impact Assessment. Sets status to 'approved' and records approver information.

      Parameters

      • assessmentId: number

        The ID of the assessment to approve

      • approver: string

        Name/ID of the approver (e.g., DPO name)

      Returns Promise<PIARecord>

      The updated PIA record

    • Get a Privacy Impact Assessment by ID. Includes associated risks.

      Parameters

      • assessmentId: number

        The ID of the assessment to retrieve

      Returns Promise<any>

      The PIA record with associated risks

    • Link a model to a PIA assessment. Useful for tracking which models are covered by the assessment.

      Parameters

      • assessmentId: number

        The ID of the assessment

      • model: any

        The model class to link (can be a Prorm model or string name)

      Returns Promise<PIARecord>

      The updated PIA record

    • Reject a Privacy Impact Assessment.

      Parameters

      • assessmentId: number

        The ID of the assessment to reject

      • reason: string

        Reason for rejection

      Returns Promise<PIARecord>

      The updated PIA record

    • Submit an assessment for review. Changes status from 'draft' to 'in_review'.

      Parameters

      • assessmentId: number

        The ID of the assessment to submit

      Returns Promise<PIARecord>

      The updated PIA record

    • Check if an assessment has any high or critical risks without mitigations.

      Parameters

      • assessmentId: number

        The ID of the assessment

      Returns Promise<boolean>

      True if there are unresolved high-risk items

    • List all models linked to a PIA assessment.

      Parameters

      • assessmentId: number

        The ID of the assessment

      Returns Promise<string[]>

      Array of linked model names