Skip to content

Commit

Permalink
Added DataUse type
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkobori committed May 14, 2024
1 parent bc5facf commit 8d58f26
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
27 changes: 23 additions & 4 deletions src/types/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d58f26

Please sign in to comment.