Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@socketsecurity/sdk

Package Overview
Dependencies
Maintainers
6
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socketsecurity/sdk - npm Package Compare versions

Comparing version 0.5.4 to 0.6.0

1

index.d.ts

@@ -24,2 +24,3 @@ export type SocketSdkOperations = keyof import('./types/api').operations;

getReport(id: string): Promise<SocketSdkResultType<'getReport'>>;
getReportSupportedFiles(): Promise<SocketSdkResultType<'getReportSupportedFiles'>>;
getQuota(): Promise<SocketSdkResultType<'getQuota'>>;

@@ -26,0 +27,0 @@ #private;

@@ -193,2 +193,15 @@ 'use strict'

/**
* @returns {Promise<SocketSdkResultType<'getReportSupportedFiles'>>}
*/
async getReportSupportedFiles () {
try {
const client = await this.#getClient()
const data = await client.get('report/supported').json()
return { success: true, status: 200, data }
} catch (err) {
return /** @type {SocketSdkErrorType<'getReportSupportedFiles'>} */ (this.#handleApiError(err))
}
}
/** @returns {Promise<SocketSdkResultType<'getQuota'>>} */

@@ -195,0 +208,0 @@ async getQuota () {

4

package.json
{
"name": "@socketsecurity/sdk",
"version": "0.5.4",
"version": "0.6.0",
"license": "MIT",

@@ -63,3 +63,3 @@ "description": "SDK for the Socket API client",

"type-coverage": "^2.24.1",
"typescript": "~4.9.5"
"typescript": "~5.0.4"
},

@@ -66,0 +66,0 @@ "scripts": {

@@ -56,2 +56,3 @@ # @socketsecurity/sdk

* `getReportList()`
* `getReportSupportedFiles()`
* `getReport(id)`

@@ -58,0 +59,0 @@ * `id`: A `string` representing the id of a created report

@@ -49,4 +49,2 @@ /**

*
* The supported lockfiles (and filenames) are: `package.json` and `package-lock.json`.
*
* For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.

@@ -66,2 +64,14 @@ *

};
"/report/supported": {
/**
* Get a list of supported files for project report generation.
* Files are categorized first by environment (e.g. NPM or PyPI), then by name.
*
* Files whose names match the patterns returned by this endpoint can be uploaded for report generation.
* Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`.
*
* This endpoint consumes 0 units of your quota.
*/
get: operations["getReportSupportedFiles"];
};
"/openapi": {

@@ -89,8 +99,8 @@ /**

SocketPackageScore: {
supplyChainRisk: components["schemas"]["SocketSupplyChainScore"];
quality: components["schemas"]["SocketQualityScore"];
maintenance: components["schemas"]["SocketMaintenanceScore"];
vulnerability: components["schemas"]["SocketVulnerabilityScore"];
license: components["schemas"]["SocketLicenseScore"];
miscellaneous: components["schemas"]["SocketMiscellaneousScore"];
supplyChainRisk: components["schemas"]["SocketMetricSchema"];
quality: components["schemas"]["SocketMetricSchema"];
maintenance: components["schemas"]["SocketMetricSchema"];
vulnerability: components["schemas"]["SocketMetricSchema"];
license: components["schemas"]["SocketMetricSchema"];
miscellaneous: components["schemas"]["SocketMetricSchema"];
/** @default 0 */

@@ -117,2 +127,4 @@ depscore: number;

};
/** @default */
url: string;
};

@@ -126,7 +138,9 @@ SocketIssue: Partial<{

props: {
/** @default 0 */
id: number;
/** @default */
id: string;
/** @default */
title: string;
/** @default critical */
/** @default */
description: string;
/** @default low */
severity: string;

@@ -146,6 +160,8 @@ /** @default */

props: {
/** @default 0 */
id: number;
/** @default */
id: string;
/** @default */
title: string;
/** @default */
description: string;
/** @default high */

@@ -166,6 +182,8 @@ severity: string;

props: {
/** @default 0 */
id: number;
/** @default */
id: string;
/** @default */
title: string;
/** @default */
description: string;
/** @default low */

@@ -1106,3 +1124,3 @@ severity: string;

/** @enum {string} */
type?: "gptMalware";
type?: "gptSecurity";
value?: components["schemas"]["SocketIssueBasics"] & {

@@ -1114,610 +1132,38 @@ /** @default */

notes: string;
/** @default 0 */
confidence: number;
/** @default 0 */
severity: number;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "gptAnomaly";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
notes: string;
/** @default 0 */
confidence: number;
/** @default 0 */
severity: number;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}>;
SocketSupplyChainScore: {
SocketMetricSchema: {
/** @default 0 */
score: number;
components: {
dependencyCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
devDependencyCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
downloadCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
supplyChainRiskIssueCritical: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
supplyChainRiskIssueHigh: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
supplyChainRiskIssueLow: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
supplyChainRiskIssueMid: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
totalDependencyCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
transitiveDependencyCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
[key: string]: components["schemas"]["SocketMetricComponent"];
};
/** @default 0 */
limit?: number;
/**
* @default 0
* @enum {string}
*/
limitingMetric?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8";
/** @default */
limitingMetric?: string;
};
SocketQualityScore: {
/** @default 0 */
score: number;
components: {
linesOfCode: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
qualityIssueCritical: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
qualityIssueHigh: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
qualityIssueLow: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
qualityIssueMid: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
readmeLength: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
bundlesize?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
forks?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
stargazers?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
watchers?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
};
/** @default 0 */
limit?: number;
/**
* @default 0
* @enum {string}
*/
limitingMetric?:
| "0"
| "1"
| "2"
| "3"
| "4"
| "5"
| "6"
| "7"
| "8"
| "9";
};
SocketMaintenanceScore: {
/** @default 0 */
score: number;
components: {
maintainerCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
maintenanceIssueCritical: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
maintenanceIssueHigh: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
maintenanceIssueLow: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
maintenanceIssueMid: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
versionCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
versionsLastMonth: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
versionsLastTwoMonths: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
versionsLastWeek: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
versionsLastYear: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
closedIssues?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
commits?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
commitsLastMonth?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
commitsLastTwoMonths?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
commitsLastWeek?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
commitsLastYear?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
openIssues?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
};
/** @default 0 */
limit?: number;
/**
* @default 0
* @enum {string}
*/
limitingMetric?:
| "0"
| "1"
| "2"
| "3"
| "4"
| "5"
| "6"
| "7"
| "8"
| "9"
| "10"
| "11"
| "12"
| "13"
| "14"
| "15"
| "16";
};
SocketVulnerabilityScore: {
/** @default 0 */
score: number;
components: {
dependencyVulnerabilityCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
vulnerabilityCount: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
vulnerabilityIssueCritical: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
vulnerabilityIssueHigh: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
vulnerabilityIssueLow: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
vulnerabilityIssueMid: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
};
/** @default 0 */
limit?: number;
/**
* @default 0
* @enum {string}
*/
limitingMetric?: "0" | "1" | "2" | "3" | "4" | "5";
};
SocketLicenseScore: {
/** @default 0 */
score: number;
components: {
licenseIssueCritical: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
licenseIssueHigh: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
licenseIssueLow: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
licenseIssueMid: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default 0 */
value: number;
};
licenseQuality: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
value: components["schemas"]["SocketLicenseQuality"];
};
};
/** @default 0 */
limit?: number;
/**
* @default 0
* @enum {string}
*/
limitingMetric?: "0" | "1" | "2" | "3" | "4";
};
SocketMiscellaneousScore: {
/** @default 0 */
score: number;
components: {
typeModule: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default false */
value: boolean;
};
defaultBranch?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default main */
value: string;
};
repoCreatedAt?: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default */
value: string;
};
};
/** @default 0 */
limit?: number;
/**
* @default 0
* @enum {string}
*/
limitingMetric?: "0" | "1" | "2";
};
SocketIssueBasics: {

@@ -1732,16 +1178,13 @@ severity: components["schemas"]["SocketIssueSeverity"];

};
SocketMetricComponent: {
/** @default 0 */
score: number;
/** @default 0 */
maxScore: number;
/** @default 0 */
limit: number;
/** @default null */
value: { [key: string]: unknown };
};
/**
* @default unknown
* @enum {string}
*/
SocketLicenseQuality:
| "model"
| "gold"
| "silver"
| "bronze"
| "lead"
| "nonfree"
| "unknown"
| "unlicensed";
/**
* @default low

@@ -1788,2 +1231,7 @@ * @enum {string}

value?: components["schemas"]["SocketRefWeb"];
}> &
Partial<{
/** @enum {string} */
type?: "pypi";
value?: components["schemas"]["SocketRefPyPI"];
}>;

@@ -1827,2 +1275,11 @@ SocketRefTextRange: {

};
SocketRefPyPI: {
/** @default */
package: string;
/** @default */
version?: string;
/** @default */
artifact?: string;
file?: components["schemas"]["SocketRefFile"];
};
};

@@ -2011,4 +1468,2 @@ responses: {

*
* The supported lockfiles (and filenames) are: `package.json` and `package-lock.json`.
*
* For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.

@@ -2070,2 +1525,30 @@ *

/**
* Get a list of supported files for project report generation.
* Files are categorized first by environment (e.g. NPM or PyPI), then by name.
*
* Files whose names match the patterns returned by this endpoint can be uploaded for report generation.
* Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`.
*
* This endpoint consumes 0 units of your quota.
*/
getReportSupportedFiles: {
responses: {
/** Glob patterns used to match supported files */
200: {
content: {
"application/json": {
[key: string]: {
[key: string]: {
/** @default */
pattern: string;
};
};
};
};
};
400: components["responses"]["SocketBadRequest"];
429: components["responses"]["SocketTooManyRequestsResponse"];
};
};
/**
* Retrieve the API specification in an Openapi JSON format.

@@ -2072,0 +1555,0 @@ *

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc