prorm API Reference
    Preparing search index...

    Class DataPortabilityExporter

    Index
    export: (Model: any, options: ExportOptions) => Promise<ExportResult> = exportData

    Type Declaration

      • (Model: any, options: ExportOptions): Promise<ExportResult>
      • Main export function.

        Parameters

        Returns Promise<ExportResult>

    exportStream: (
        Model: any,
        options: StreamExportOptions,
    ) => Promise<{ recordCount: number; exportedAt: Date }> = exportStream

    Type Declaration

      • (
            Model: any,
            options: StreamExportOptions,
        ): Promise<{ recordCount: number; exportedAt: Date }>
      • Stream export for large datasets. Writes directly to a callback to avoid loading everything in memory.

        Parameters

        Returns Promise<{ recordCount: number; exportedAt: Date }>

    createDSARResponse: (
        subjectId: string,
        models: { model: any; where?: Record<string, any> }[],
        options?: { format?: ExportFormat; include?: any[] },
    ) => Promise<
        { subjectId: string; requestedAt: Date; exports: ExportResult[] },
    > = createDSARResponse

    Type Declaration

      • (
            subjectId: string,
            models: { model: any; where?: Record<string, any> }[],
            options?: { format?: ExportFormat; include?: any[] },
        ): Promise<
            { subjectId: string; requestedAt: Date; exports: ExportResult[] },
        >
      • Generate a DSAR response object ready for API return.

        Parameters

        • subjectId: string
        • models: { model: any; where?: Record<string, any> }[]
        • options: { format?: ExportFormat; include?: any[] } = {}

        Returns Promise<{ subjectId: string; requestedAt: Date; exports: ExportResult[] }>