Files
agentic-dev/packages/core-dsr/src/in-memory-data-export.ts

25 lines
686 B
TypeScript

import type { IDataExport } from "./data-export.interface";
import type { DsrFormat, UserDataBundle } from "./dsr-types";
/**
* Volatile in-memory IDataExport. Returns an empty bundle with the correct
* shape.
*
* Used in dev-seed and storybook contexts where Payload is unavailable.
* Not a recording double — use RecordingDataExport from @repo/core-testing for
* call-assertion in unit tests.
*/
export class InMemoryDataExport implements IDataExport {
async exportSubjectData(
subjectId: string,
format: DsrFormat,
): Promise<UserDataBundle> {
return {
subjectId,
exportedAt: new Date().toISOString(),
format,
data: {},
};
}
}