From a3bad9aa12b9dadb2965ba69915fdfa7a2c6b08e Mon Sep 17 00:00:00 2001 From: Simon Axelsson Date: Mon, 7 Sep 2026 18:01:24 +0200 Subject: [PATCH] refactor: extract canonical dataset version types --- src/types/dataset-version.ts | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/types/dataset-version.ts diff --git a/src/types/dataset-version.ts b/src/types/dataset-version.ts new file mode 100644 index 0000000..be34ee2 --- /dev/null +++ b/src/types/dataset-version.ts @@ -0,0 +1,37 @@ +export interface DatasetVersion { + dataset_id: string; + version: number; + tenant_id: string; + project_id: string; + /** Canonical ST0RE artifact refs that make up this immutable version. */ + artifact_refs: string[]; + schema_version: string; + record_count?: number; + description?: string; + created_at: string; + created_by: string; + correlation_id?: string; +} + +export interface CreateDatasetVersionInput { + dataset_id: string; + tenant_id: string; + project_id: string; + artifact_refs: string[]; + schema_version: string; + record_count?: number; + description?: string; + created_by: string; + correlation_id?: string; + idempotency_key?: string; +} + +export interface DatasetExport { + export_id: string; + dataset_id: string; + version: number; + tenant_id: string; + artifact_ref: string; + format: "parquet" | "csv" | "json"; + created_at: string; +}