Skip to content

Commit 5510876

Browse files
fix(openapi): sync with openapi definition (#171)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent dfb3103 commit 5510876

File tree

2 files changed

+67
-5
lines changed

2 files changed

+67
-5
lines changed

openapi.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5591,7 +5591,7 @@
55915591
"basicAuth": []
55925592
}
55935593
],
5594-
"description": "Get all the scores and metrics by category that are used to evaluate the package version.\n\nThis endpoint consumes 1 unit of your quota.",
5594+
"description": "Get all the scores and metrics by category that are used to evaluate the package version.\n\n- depscore: The average of all score factors. (0-1)\n- supplyChainRisk: Score factors relating to supply chain security (0-1)\n- downloadCount: The number of downloads for the package. Higher downloads contribute to a higher score.\n- supplyChainRiskIssueLow/Mid/High/Critical: The number of supply chain risk issues of varying severity. Lower numbers contribute to a higher score.\n- dependencyCount: The number of production dependencies. Lower count contributes to a higher score.\n- devDependencyCount: The number of development dependencies. Lower count contributes to a higher score.\n- transitiveDependencyCount: The number of transitive dependencies. Lower count contributes to a higher score.\n- totalDependencyCount: The total number of dependencies (production + development + transitive). Lower count contributes to a higher score.\n- quality: Score factors relating to code quality (0-1)\n- qualityIssueLow/Mid/High/Critical: The number of code quality issues of varying severity. Lower numbers contribute to a higher score.\n- linesOfCode: The number of lines of code in the package. Lower count contributes to a higher score.\n- readmeLength: The length of the package's README file. Longer READMEs contribute to a higher score.\n- maintenance: Score factors relating to package maintenance (0-1)\n- maintainerCount: The number of maintainers for the package. More maintainers contribute to a higher score.\n- versionsLastWeek/Month/TwoMonths/Year: The number of versions released in different time periods. More recent releases contribute to a higher score.\n- versionCount: The total number of versions released. Higher count contributes to a higher score.\n- maintenanceIssueLow/Mid/High/Critical: The number of maintenance issues of varying severity. Lower numbers contribute to a higher score.\n- vulnerability: Score factors relating to package vulnerabilities (0-1)\n- vulnerabilityIssueLow/Mid/High/Critical: The number of vulnerability issues of varying severity. Lower numbers contribute to a higher score.\n- dependencyVulnerabilityCount: The number of vulnerabilities in the package's dependencies. Lower count contributes to a higher score.\n- vulnerabilityCount: The number of vulnerabilities in the package itself. Lower count contributes to a higher score.\n- license: Score factors relating to package licensing (0-1)\n- licenseIssueLow/Mid/High/Critical: The number of license issues of varying severity. Lower numbers contribute to a higher score.\n- licenseQuality: A score indicating the quality/permissiveness of the package's license. Higher quality contributes to a higher score.\n- miscellaneous: Miscellaneous metadata about the package version.\n- versionAuthorName/Email: The name and email of the version author.\n- fileCount: The number of files in the package.\n- byteCount: The total size in bytes of the package.\n- typeModule: Whether the package declares a \"type\": \"module\" field.\n\nThis endpoint consumes 1 unit of your quota.",
55955595
"responses": {
55965596
"200": {
55975597
"content": {
@@ -8005,8 +8005,8 @@
80058005
},
80068006
"top_five_alert_types": {
80078007
"type": "object",
8008-
"additionalProperties": false,
8009-
"properties": {}
8008+
"default": {},
8009+
"additionalProperties": false
80108010
}
80118011
},
80128012
"required": [
@@ -8164,8 +8164,8 @@
81648164
},
81658165
"top_five_alert_types": {
81668166
"type": "object",
8167-
"additionalProperties": false,
8168-
"properties": {}
8167+
"default": {},
8168+
"additionalProperties": false
81698169
}
81708170
},
81718171
"required": [

types/api.d.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,36 @@ export interface paths {
2222
* Get score by package
2323
* @description Get all the scores and metrics by category that are used to evaluate the package version.
2424
*
25+
* - depscore: The average of all score factors. (0-1)
26+
* - supplyChainRisk: Score factors relating to supply chain security (0-1)
27+
* - downloadCount: The number of downloads for the package. Higher downloads contribute to a higher score.
28+
* - supplyChainRiskIssueLow/Mid/High/Critical: The number of supply chain risk issues of varying severity. Lower numbers contribute to a higher score.
29+
* - dependencyCount: The number of production dependencies. Lower count contributes to a higher score.
30+
* - devDependencyCount: The number of development dependencies. Lower count contributes to a higher score.
31+
* - transitiveDependencyCount: The number of transitive dependencies. Lower count contributes to a higher score.
32+
* - totalDependencyCount: The total number of dependencies (production + development + transitive). Lower count contributes to a higher score.
33+
* - quality: Score factors relating to code quality (0-1)
34+
* - qualityIssueLow/Mid/High/Critical: The number of code quality issues of varying severity. Lower numbers contribute to a higher score.
35+
* - linesOfCode: The number of lines of code in the package. Lower count contributes to a higher score.
36+
* - readmeLength: The length of the package's README file. Longer READMEs contribute to a higher score.
37+
* - maintenance: Score factors relating to package maintenance (0-1)
38+
* - maintainerCount: The number of maintainers for the package. More maintainers contribute to a higher score.
39+
* - versionsLastWeek/Month/TwoMonths/Year: The number of versions released in different time periods. More recent releases contribute to a higher score.
40+
* - versionCount: The total number of versions released. Higher count contributes to a higher score.
41+
* - maintenanceIssueLow/Mid/High/Critical: The number of maintenance issues of varying severity. Lower numbers contribute to a higher score.
42+
* - vulnerability: Score factors relating to package vulnerabilities (0-1)
43+
* - vulnerabilityIssueLow/Mid/High/Critical: The number of vulnerability issues of varying severity. Lower numbers contribute to a higher score.
44+
* - dependencyVulnerabilityCount: The number of vulnerabilities in the package's dependencies. Lower count contributes to a higher score.
45+
* - vulnerabilityCount: The number of vulnerabilities in the package itself. Lower count contributes to a higher score.
46+
* - license: Score factors relating to package licensing (0-1)
47+
* - licenseIssueLow/Mid/High/Critical: The number of license issues of varying severity. Lower numbers contribute to a higher score.
48+
* - licenseQuality: A score indicating the quality/permissiveness of the package's license. Higher quality contributes to a higher score.
49+
* - miscellaneous: Miscellaneous metadata about the package version.
50+
* - versionAuthorName/Email: The name and email of the version author.
51+
* - fileCount: The number of files in the package.
52+
* - byteCount: The total size in bytes of the package.
53+
* - typeModule: Whether the package declares a "type": "module" field.
54+
*
2555
* This endpoint consumes 1 unit of your quota.
2656
*/
2757
get: operations["getScoreByNPMPackage"];
@@ -1742,6 +1772,36 @@ export interface operations {
17421772
* Get score by package
17431773
* @description Get all the scores and metrics by category that are used to evaluate the package version.
17441774
*
1775+
* - depscore: The average of all score factors. (0-1)
1776+
* - supplyChainRisk: Score factors relating to supply chain security (0-1)
1777+
* - downloadCount: The number of downloads for the package. Higher downloads contribute to a higher score.
1778+
* - supplyChainRiskIssueLow/Mid/High/Critical: The number of supply chain risk issues of varying severity. Lower numbers contribute to a higher score.
1779+
* - dependencyCount: The number of production dependencies. Lower count contributes to a higher score.
1780+
* - devDependencyCount: The number of development dependencies. Lower count contributes to a higher score.
1781+
* - transitiveDependencyCount: The number of transitive dependencies. Lower count contributes to a higher score.
1782+
* - totalDependencyCount: The total number of dependencies (production + development + transitive). Lower count contributes to a higher score.
1783+
* - quality: Score factors relating to code quality (0-1)
1784+
* - qualityIssueLow/Mid/High/Critical: The number of code quality issues of varying severity. Lower numbers contribute to a higher score.
1785+
* - linesOfCode: The number of lines of code in the package. Lower count contributes to a higher score.
1786+
* - readmeLength: The length of the package's README file. Longer READMEs contribute to a higher score.
1787+
* - maintenance: Score factors relating to package maintenance (0-1)
1788+
* - maintainerCount: The number of maintainers for the package. More maintainers contribute to a higher score.
1789+
* - versionsLastWeek/Month/TwoMonths/Year: The number of versions released in different time periods. More recent releases contribute to a higher score.
1790+
* - versionCount: The total number of versions released. Higher count contributes to a higher score.
1791+
* - maintenanceIssueLow/Mid/High/Critical: The number of maintenance issues of varying severity. Lower numbers contribute to a higher score.
1792+
* - vulnerability: Score factors relating to package vulnerabilities (0-1)
1793+
* - vulnerabilityIssueLow/Mid/High/Critical: The number of vulnerability issues of varying severity. Lower numbers contribute to a higher score.
1794+
* - dependencyVulnerabilityCount: The number of vulnerabilities in the package's dependencies. Lower count contributes to a higher score.
1795+
* - vulnerabilityCount: The number of vulnerabilities in the package itself. Lower count contributes to a higher score.
1796+
* - license: Score factors relating to package licensing (0-1)
1797+
* - licenseIssueLow/Mid/High/Critical: The number of license issues of varying severity. Lower numbers contribute to a higher score.
1798+
* - licenseQuality: A score indicating the quality/permissiveness of the package's license. Higher quality contributes to a higher score.
1799+
* - miscellaneous: Miscellaneous metadata about the package version.
1800+
* - versionAuthorName/Email: The name and email of the version author.
1801+
* - fileCount: The number of files in the package.
1802+
* - byteCount: The total size in bytes of the package.
1803+
* - typeModule: Whether the package declares a "type": "module" field.
1804+
*
17451805
* This endpoint consumes 1 unit of your quota.
17461806
*/
17471807
getScoreByNPMPackage: {
@@ -2810,6 +2870,7 @@ export interface operations {
28102870
total_medium_prevented: number;
28112871
/** @default 0 */
28122872
total_low_prevented: number;
2873+
/** @default {} */
28132874
top_five_alert_types: Record<string, never>;
28142875
}[];
28152876
};
@@ -2870,6 +2931,7 @@ export interface operations {
28702931
total_medium_prevented: number;
28712932
/** @default 0 */
28722933
total_low_prevented: number;
2934+
/** @default {} */
28732935
top_five_alert_types: Record<string, never>;
28742936
}[];
28752937
};

0 commit comments

Comments
 (0)