Skip to content

Commit d6ba4a2

Browse files
Add optional fields to model
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
1 parent a14edaf commit d6ba4a2

4 files changed

Lines changed: 65 additions & 8 deletions

File tree

dist/index.js

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/model.d.ts

Lines changed: 22 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as helpers from "./helper.js";
33

44
const baselineCodeJSON: CodeJSON = {
55
name: "",
6+
version: "",
67
description: "",
78
longDescription: "",
89
status: "",
@@ -18,9 +19,12 @@ const baselineCodeJSON: CodeJSON = {
1819
},
1920
organization: "",
2021
repositoryURL: "",
21-
projectURL: "",
2222
repositoryHost: "github",
2323
repositoryVisibility: "",
24+
homepageURL: "",
25+
downloadURL: "",
26+
disclaimerURL: "",
27+
disclaimerText: "",
2428
vcs: "git",
2529
laborHours: 0,
2630
reuseFrequency: {
@@ -33,6 +37,10 @@ const baselineCodeJSON: CodeJSON = {
3337
languages: [],
3438
maintenance: "",
3539
contractNumber: [],
40+
SBOM: "",
41+
relatedCode: [],
42+
reusedCode: [],
43+
partners: [],
3644
date: {
3745
created: "",
3846
lastModified: "",
@@ -52,7 +60,6 @@ const baselineCodeJSON: CodeJSON = {
5260
group: "",
5361
projects: [],
5462
systems: [],
55-
upstream: "",
5663
subsetInHealthcare: [],
5764
userType: [],
5865
maturityModelTier: 0,

src/model.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
export interface CodeJSON {
22
name: string; // calculated
3+
version?: string;
34
description: string; // calculated
45
longDescription: string;
56
status: string;
67
permissions: Permissions;
78
organization: string;
89
repositoryURL: string; // calculated
9-
projectURL: string;
1010
repositoryHost: string;
1111
repositoryVisibility: string; // calculated
12+
homepageURL?: string;
13+
downloadURL?: string;
14+
disclaimerURL?: string;
15+
disclaimerText?: string;
1216
vcs: string;
1317
laborHours: number; // calculated
1418
reuseFrequency: ReuseFrequency; // semi-calculated
@@ -18,6 +22,10 @@ export interface CodeJSON {
1822
languages: string[]; // calculated
1923
maintenance: string;
2024
contractNumber: string[];
25+
SBOM: string;
26+
relatedCode?: RelatedCode[];
27+
reusedCode?: ReusedCode[];
28+
partners?: Partner[];
2129
date: Date; // calculated
2230
tags: string[]; // calculated
2331
contact: Contact;
@@ -30,7 +38,6 @@ export interface CodeJSON {
3038
group: string;
3139
projects: string[];
3240
systems: string[];
33-
upstream: string;
3441
subsetInHealthcare: string[];
3542
userType: string[];
3643
maturityModelTier: number;
@@ -52,6 +59,22 @@ export interface License {
5259
URL: string;
5360
}
5461

62+
export interface RelatedCode {
63+
name: string;
64+
URL: string;
65+
isGovernmentRepo: boolean;
66+
}
67+
68+
export interface ReusedCode {
69+
name: string;
70+
URL: string;
71+
}
72+
73+
export interface Partner {
74+
name: string;
75+
email: string;
76+
}
77+
5578
export interface Date {
5679
created: string;
5780
lastModified: string;

0 commit comments

Comments
 (0)