import type { ConversionJob } from '@prisma/client'; /** * Wiring for the GDPR data export (issue #68). The conversion worker builds a * `data_export` job through this token — never by importing the service — so * the worker's file stays free of a construction cycle (mirrors the import * pipeline's {@link ./import.constants.ts}). */ export const DATA_EXPORT_PROCESSOR = Symbol('DATA_EXPORT_PROCESSOR'); /** The {@link ConversionJob.kind} of a self-service account data export. */ export const DATA_EXPORT_KIND = 'data_export'; /** How long a generated export stays downloadable before its bytes are purged * (security.md §Privacy: data minimization — the archive is a transient copy, * not stored indefinitely). */ export const DATA_EXPORT_TTL_MS = 24 * 60 * 60 * 1000; /** Builds the ZIP for a `data_export` job. The worker resolves this behind the * token above and stores the returned bytes as the job result. */ export interface DataExportProcessor { build(job: ConversionJob): Promise<{ bytes: Buffer; mimeType: string }>; }