diff --git a/package-lock.json b/package-lock.json index 1a6f830f8..3ee88cad5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -73,7 +73,7 @@ "react-scripts": "5.0.1", "source-map-explorer": "2.5.3", "typescript": "4.9.5", - "typescript-eslint": "^7.8.0", + "typescript-eslint": "7.8.0", "webpack": "5.91.0" } }, diff --git a/package.json b/package.json index 11a4ff72f..ae8b38efd 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "react-scripts": "5.0.1", "source-map-explorer": "2.5.3", "typescript": "4.9.5", - "typescript-eslint": "^7.8.0", + "typescript-eslint": "7.8.0", "webpack": "5.91.0" }, "browserslist": [ diff --git a/src/types/model.ts b/src/types/model.ts index 114f6bff3..ebb204baf 100644 --- a/src/types/model.ts +++ b/src/types/model.ts @@ -109,15 +109,34 @@ export interface Dataset { alias: string; datasetIdentifier: string; objectId: string; - /** - * TODO: Determine what type this is - */ - dataUse: unknown; + dataUse: DataUse; dacApproval: boolean; nihCertificationFile: FileStorageObject; alternativeDataSharingPlanFile: FileStorageObject; } +interface DataUseRequirements { + required: string[]; +} + +interface DataUseProperties { + [key: string]: DataUsePropertyFields; +} + +interface DataUsePropertyFields { + type: string; + [key: string]: string | DataUsePropertyFields; +} +export interface DataUse { + $id: string; + $schema: string; + title: string; + version: number; + type: string; + anyOf: DataUseRequirements[]; + properties: DataUseProperties; +} + export interface DatasetProperty { propertyName: string; propertyValue: string;