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.6.0 to 0.7.0

4

index.d.ts

@@ -26,4 +26,8 @@ export type SocketSdkOperations = keyof import('./types/api').operations;

getQuota(): Promise<SocketSdkResultType<'getQuota'>>;
getOrganizations(): Promise<SocketSdkResultType<'getOrganizations'>>;
postSettings(selectors: Array<{
organization?: string;
}>): Promise<SocketSdkResultType<'postSettings'>>;
#private;
}
//# sourceMappingURL=index.d.ts.map

@@ -217,3 +217,30 @@ 'use strict'

/** @returns {Promise<SocketSdkResultType<'getOrganizations'>>} */
async getOrganizations () {
try {
const client = await this.#getClient()
const data = await client.get('organizations').json()
return { success: true, status: 200, data }
} catch (err) {
return /** @type {SocketSdkErrorType<'getQuota'>} */ (this.#handleApiError(err))
}
}
/**
* @param {Array<{ organization?: string }>} selectors
* @returns {Promise<SocketSdkResultType<'postSettings'>>}
*/
async postSettings (selectors) {
try {
const client = await this.#getClient()
const data = await client.post('settings', {
json: selectors
}).json()
return { success: true, status: 200, data }
} catch (err) {
return /** @type {SocketSdkErrorType<'postSettings'>} */ (this.#handleApiError(err))
}
}
/**
* @param {unknown} err

@@ -220,0 +247,0 @@ * @returns {{ success: false, status: number, error: Record<string,unknown> }}

12

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

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

"engines": {
"node": "^14.18.0 || >=16.0.0"
"node": ">=16.10.0"
},

@@ -43,3 +43,3 @@ "dependencies": {

"@typescript-eslint/parser": "^5.51.0",
"c8": "^7.12.0",
"c8": "^8.0.0",
"chai": "^4.3.7",

@@ -59,7 +59,7 @@ "chai-as-promised": "^7.1.1",

"husky": "^8.0.3",
"installed-check": "^6.0.5",
"installed-check": "^8.0.0",
"mocha": "^10.1.0",
"nock": "^13.2.9",
"npm-run-all2": "^6.0.4",
"openapi-typescript": "^5.4.1",
"openapi-typescript": "^6.3.2",
"type-coverage": "^2.24.1",

@@ -88,2 +88,2 @@ "typescript": "~5.0.4"

}
}
}

@@ -63,2 +63,5 @@ # @socketsecurity/sdk

* `getQuota()`
* `getOrganizations()`
* `postSettings(selectors)`
* `selectors`: An array of settings selectors, e.g. `[{ organization: 'id' }]`

@@ -65,0 +68,0 @@ ## Additional exports

@@ -6,10 +6,12 @@ /**

export interface paths {
"/npm/{package}/{version}/issues": {
/**
* Get all the issues related with a particular npm package version.
* Get issues by package
* @description Get all the issues related with a particular npm package version.
* This endpoint returns the issue type, location, and additional details related to each issue in the `props` attribute.
*
*
* You can [see here](https://socket.dev/npm/issue) the full list of issues.
*
*
* This endpoint consumes 1 unit of your quota.

@@ -21,4 +23,5 @@ */

/**
* Get all the scores and metrics by category that are used to evaluate the package version.
*
* Get score by package
* @description Get all the scores and metrics by category that are used to evaluate the package version.
*
* This endpoint consumes 1 unit of your quota.

@@ -30,4 +33,5 @@ */

/**
* Delete a specific project report.
*
* Delete a report
* @description Delete a specific project report.
*
* This endpoint consumes 10 units of your quota.

@@ -39,4 +43,5 @@ */

/**
* Get all your project reports.
*
* Get list of reports
* @description Get all your project reports.
*
* This endpoint consumes 10 units of your quota.

@@ -48,9 +53,10 @@ */

/**
* Upload a lockfile to get your project analyzed by Socket.
* Create a report
* @description Upload a lockfile to get your project analyzed by Socket.
* You can upload multiple lockfiles in the same request, but each filename must be unique.
*
*
* The name of the file must be in the supported list.
*
*
* For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.
*
*
* This endpoint consumes 100 units of your quota.

@@ -62,4 +68,5 @@ */

/**
* Get all the issues, packages, and scores related to an specific project report.
*
* View a report
* @description Get all the issues, packages, and scores related to an specific project report.
*
* This endpoint consumes 10 units of your quota.

@@ -71,8 +78,9 @@ */

/**
* Get a list of supported files for project report generation.
* Get supported files for report
* @description 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.

@@ -84,4 +92,5 @@ */

/**
* Retrieve the API specification in an Openapi JSON format.
*
* Returns the OpenAPI definition
* @description Retrieve the API specification in an Openapi JSON format.
*
* This endpoint consumes 0 units of your quota.

@@ -93,4 +102,5 @@ */

/**
* Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota.
*
* Get quota
* @description Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota.
*
* This endpoint consumes 0 units of your quota.

@@ -100,7 +110,36 @@ */

};
"/organizations": {
/**
* List organizations
* @description Get information on the current organizations associated with the API key.
*
* This endpoint consumes 0 units of your quota.
*/
get: operations["getOrganizations"];
};
"/settings": {
/**
* Calculate settings
* @description Get your current settings the requested organizations and default settings to allow deferals.
*
* This endpoint consumes 0 units of your quota.
*/
post: operations["postSettings"];
};
"/repo/list": {
/**
* Get list of repos and their latest project report
* @description Get all repositories in an org including their latest project report.
*
* This endpoint consumes 0 units of your quota.
*/
get: operations["getRepoList"];
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
SocketIssueList: components["schemas"]["SocketIssue"][];
SocketIssueList: (components["schemas"]["SocketIssue"])[];
SocketPackageScore: {

@@ -137,3 +176,3 @@ supplyChainRisk: components["schemas"]["SocketMetricSchema"];

};
SocketIssue: Partial<{
SocketIssue: ({
/** @enum {string} */

@@ -158,1004 +197,966 @@ type?: "criticalCVE";

};
}> &
Partial<{
/** @enum {string} */
type?: "cve";
value?: components["schemas"]["SocketIssueBasics"] & {
}) | ({
/** @enum {string} */
type?: "cve";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
id: string;
/** @default */
title: string;
/** @default */
description: string;
/** @default high */
severity: string;
/** @default */
url: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "mildCVE";
value?: components["schemas"]["SocketIssueBasics"] & {
id: string;
/** @default */
description: string;
props: {
/** @default */
id: string;
/** @default */
title: string;
/** @default */
description: string;
/** @default low */
severity: string;
/** @default */
url: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "installScripts";
value?: components["schemas"]["SocketIssueBasics"] & {
title: string;
/** @default */
description: string;
props: {
/** @default */
script: string;
/** @default */
source: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "hasNativeCode";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default high */
severity: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
url: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "binScriptConfusion";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "mildCVE";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
binScript: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "shellScriptOverride";
value?: components["schemas"]["SocketIssueBasics"] & {
id: string;
/** @default */
description: string;
props: {
/** @default */
binScript: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "filesystemAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
title: string;
/** @default */
description: string;
props: {
/** @default fs */
module: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "networkAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default low */
severity: string;
/** @default */
description: string;
props: {
/** @default net */
module: string;
};
usage?: components["schemas"]["SocketUsageRef"];
url: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "shellAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "installScripts";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default child_process */
module: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "debugAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
script: string;
/** @default */
description: string;
props: {
/** @default vm */
module: string;
};
usage?: components["schemas"]["SocketUsageRef"];
source: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "longStrings";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "hasNativeCode";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "binScriptConfusion";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
binScript: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "highEntropyStrings";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "shellScriptOverride";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
binScript: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "urlStrings";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
urlFragment: string;
};
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "filesystemAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default fs */
module: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "usesEval";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default eval */
evalType: string;
};
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "networkAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default net */
module: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "dynamicRequire";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "shellAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default child_process */
module: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "envVars";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
envVars: string;
};
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "debugAccess";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default vm */
module: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "missingDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "longStrings";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "highEntropyStrings";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "urlStrings";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
name: string;
};
usage?: components["schemas"]["SocketUsageRef"];
urlFragment: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "unusedDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
name: string;
/** @default */
version: string;
};
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "usesEval";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default eval */
evalType: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "peerDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "dynamicRequire";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "envVars";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
name: string;
};
usage?: components["schemas"]["SocketUsageRef"];
envVars: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "uncaughtOptionalDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "missingDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
name: string;
};
usage?: components["schemas"]["SocketUsageRef"];
name: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "unresolvedRequire";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unusedDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "extraneousDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
name: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
version: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "obfuscatedRequire";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "peerDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
name: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "obfuscatedFile";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "uncaughtOptionalDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default 0 */
confidence: number;
};
usage?: components["schemas"]["SocketUsageRef"];
name: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "minifiedFile";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
confidence: number;
};
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unresolvedRequire";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "extraneousDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "obfuscatedRequire";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "obfuscatedFile";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
confidence: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "bidi";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "minifiedFile";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
confidence: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "zeroWidth";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "bidi";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "zeroWidth";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "badEncoding";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default utf8 */
encoding: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "badEncoding";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "homoglyphs";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "invisibleChars";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "suspiciousString";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default utf8 */
encoding: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "homoglyphs";
value?: components["schemas"]["SocketIssueBasics"] & {
pattern: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
explanation: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "invisibleChars";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "invalidPackageJSON";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "httpDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "suspiciousString";
value?: components["schemas"]["SocketIssueBasics"] & {
packageName: string;
/** @default */
description: string;
props: {
/** @default */
pattern: string;
/** @default */
explanation: string;
};
usage?: components["schemas"]["SocketUsageRef"];
url: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "invalidPackageJSON";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "gitDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "httpDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
packageName: string;
/** @default */
description: string;
props: {
/** @default */
packageName: string;
/** @default */
url: string;
};
usage?: components["schemas"]["SocketUsageRef"];
url: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "gitDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "gitHubDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
packageName: string;
/** @default */
url: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "gitHubDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
packageName: string;
/** @default */
description: string;
props: {
/** @default */
packageName: string;
/** @default */
githubUser: string;
/** @default */
githubRepo: string;
/** @default */
commitsh: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "fileDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
githubUser: string;
/** @default */
description: string;
props: {
/** @default */
packageName: string;
/** @default */
filePath: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "noTests";
value?: components["schemas"]["SocketIssueBasics"] & {
githubRepo: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
commitsh: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "noRepository";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "fileDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "badSemver";
value?: components["schemas"]["SocketIssueBasics"] & {
packageName: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
filePath: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "badSemverDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "noTests";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "noRepository";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "badSemver";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "badSemverDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
packageName: string;
/** @default */
packageVersion: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "noV1";
value?: components["schemas"]["SocketIssueBasics"] & {
packageName: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
packageVersion: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "noWebsite";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "noV1";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "noWebsite";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "noBugTracker";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "noAuthorData";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "typeModuleCompatibility";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "floatingDependency";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
dependency: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "noBugTracker";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "manifestConfusion";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "emptyPackage";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "trivialPackage";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
linesOfCode: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "noAuthorData";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "noREADME";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "shrinkwrap";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "deprecated";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default This package is deprecated */
reason: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "typeModuleCompatibility";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "chronoAnomaly";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "emptyPackage";
value?: components["schemas"]["SocketIssueBasics"] & {
prevChronoDate: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "trivialPackage";
value?: components["schemas"]["SocketIssueBasics"] & {
prevChronoVersion: string;
/** @default */
description: string;
props: {
/** @default 0 */
linesOfCode: number;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "noREADME";
value?: components["schemas"]["SocketIssueBasics"] & {
prevSemverDate: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
prevSemverVersion: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "deprecated";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "semverAnomaly";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default This package is deprecated */
reason: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "chronoAnomaly";
value?: components["schemas"]["SocketIssueBasics"] & {
prevVersion: string;
/** @default */
description: string;
props: {
/** @default */
prevChronoDate: string;
/** @default */
prevChronoVersion: string;
/** @default */
prevSemverDate: string;
/** @default */
prevSemverVersion: string;
};
usage?: components["schemas"]["SocketUsageRef"];
newVersion: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "semverAnomaly";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "newAuthor";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
prevVersion: string;
/** @default */
newVersion: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "newAuthor";
value?: components["schemas"]["SocketIssueBasics"] & {
prevAuthor: string;
/** @default */
description: string;
props: {
/** @default */
prevAuthor: string;
/** @default */
newAuthor: string;
};
usage?: components["schemas"]["SocketUsageRef"];
newAuthor: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "unstableOwnership";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unstableOwnership";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
author: string;
};
usage?: components["schemas"]["SocketUsageRef"];
author: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "missingAuthor";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "missingAuthor";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unmaintained";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
lastPublish: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "unmaintained";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unpublished";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
lastPublish: string;
};
usage?: components["schemas"]["SocketUsageRef"];
version: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "unpublished";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
version: string;
};
usage?: components["schemas"]["SocketUsageRef"];
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "majorRefactor";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
linesChanged: number;
/** @default 0 */
prevSize: number;
/** @default 0 */
curSize: number;
/** @default 0 */
changedPercent: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "majorRefactor";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "missingTarball";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unpopularPackage";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unsafeCopyright";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "licenseChange";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default 0 */
linesChanged: number;
/** @default 0 */
prevSize: number;
/** @default 0 */
curSize: number;
/** @default 0 */
changedPercent: number;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "missingTarball";
value?: components["schemas"]["SocketIssueBasics"] & {
prevLicenseId: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
newLicenseId: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "unsafeCopyright";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "nonOSILicense";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
licenseId: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "licenseChange";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "deprecatedLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
prevLicenseId: string;
/** @default */
newLicenseId: string;
};
usage?: components["schemas"]["SocketUsageRef"];
licenseId: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "nonOSILicense";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "missingLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "nonSPDXLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "unclearLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
licenseId: string;
};
usage?: components["schemas"]["SocketUsageRef"];
possibleLicenseId: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "deprecatedLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "mixedLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
licenseId: string;
};
usage?: components["schemas"]["SocketUsageRef"];
licenseId: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "missingLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "notice";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: Record<string, never>;
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "modifiedLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
licenseId: string;
/** @default 0 */
similarity: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "nonSPDXLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "modifiedException";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "unclearLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
exceptionId: string;
/** @default 0 */
similarity: number;
/** @default */
description: string;
props: {
/** @default */
possibleLicenseId: string;
};
usage?: components["schemas"]["SocketUsageRef"];
comments: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "mixedLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "licenseException";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
licenseId: string;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "notice";
value?: components["schemas"]["SocketIssueBasics"] & {
exceptionId: string;
/** @default */
description: string;
props: { [key: string]: unknown };
usage?: components["schemas"]["SocketUsageRef"];
comments: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "modifiedLicense";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "deprecatedException";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
licenseId: string;
/** @default 0 */
similarity: number;
};
usage?: components["schemas"]["SocketUsageRef"];
};
}> &
Partial<{
/** @enum {string} */
type?: "modifiedException";
value?: components["schemas"]["SocketIssueBasics"] & {
exceptionId: string;
/** @default */
description: string;
props: {
/** @default */
exceptionId: string;
/** @default 0 */
similarity: number;
/** @default */
comments: string;
};
usage?: components["schemas"]["SocketUsageRef"];
comments: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "licenseException";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "didYouMean";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default */
exceptionId: string;
/** @default */
comments: string;
};
usage?: components["schemas"]["SocketUsageRef"];
alternatePackage: string;
/** @default 0 */
editDistance: number;
/** @default 0 */
downloads: number;
/** @default 1 */
downloadsRatio: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "deprecatedException";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "malware";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
id: number;
/** @default */
description: string;
props: {
/** @default */
exceptionId: string;
/** @default */
comments: string;
};
usage?: components["schemas"]["SocketUsageRef"];
note: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "didYouMean";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "telemetry";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
id: number;
/** @default */
description: string;
props: {
/** @default */
alternatePackage: string;
/** @default 0 */
editDistance: number;
/** @default 0 */
downloads: number;
/** @default 1 */
downloadsRatio: number;
};
usage?: components["schemas"]["SocketUsageRef"];
note: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "malware";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "troll";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default 0 */
id: number;
/** @default */
description: string;
props: {
/** @default 0 */
id: number;
/** @default */
note: string;
};
usage?: components["schemas"]["SocketUsageRef"];
note: string;
};
}> &
Partial<{
/** @enum {string} */
type?: "telemetry";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "gptSecurity";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default 0 */
id: number;
/** @default */
note: string;
};
usage?: components["schemas"]["SocketUsageRef"];
notes: string;
/** @default 0 */
confidence: number;
/** @default 0 */
severity: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "troll";
value?: components["schemas"]["SocketIssueBasics"] & {
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "gptAnomaly";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @default */
description: string;
props: {
/** @default 0 */
id: number;
/** @default */
note: string;
};
usage?: components["schemas"]["SocketUsageRef"];
notes: string;
/** @default 0 */
confidence: number;
/** @default 0 */
severity: number;
};
}> &
Partial<{
/** @enum {string} */
type?: "gptSecurity";
value?: components["schemas"]["SocketIssueBasics"] & {
/** @default */
description: string;
props: {
/** @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"];
};
}>;
usage?: components["schemas"]["SocketUsageRef"];
};
});
SocketMetricSchema: {

@@ -1165,3 +1166,3 @@ /** @default 0 */

components: {
[key: string]: components["schemas"]["SocketMetricComponent"];
[key: string]: components["schemas"]["SocketMetricComponent"] | undefined;
};

@@ -1190,6 +1191,6 @@ /** @default 0 */

/** @default null */
value: { [key: string]: unknown };
value: Record<string, never>;
};
/**
* @default low
* @default low
* @enum {string}

@@ -1199,13 +1200,7 @@ */

/**
* @default miscellaneous
* @default miscellaneous
* @enum {string}
*/
SocketCategory:
| "supplyChainRisk"
| "quality"
| "maintenance"
| "vulnerability"
| "license"
| "miscellaneous";
SocketRefList: components["schemas"]["SocketRef"][];
SocketCategory: "supplyChainRisk" | "quality" | "maintenance" | "vulnerability" | "license" | "miscellaneous";
SocketRefList: (components["schemas"]["SocketRef"])[];
SocketRefFile: {

@@ -1217,27 +1212,23 @@ /** @default */

};
SocketRef: Partial<{
SocketRef: {
/** @enum {string} */
type?: "unknown";
value?: { [key: string]: unknown };
}> &
Partial<{
/** @enum {string} */
type?: "npm";
value?: components["schemas"]["SocketRefNPM"];
}> &
Partial<{
/** @enum {string} */
type?: "git";
value?: components["schemas"]["SocketRefGit"];
}> &
Partial<{
/** @enum {string} */
type?: "web";
value?: components["schemas"]["SocketRefWeb"];
}> &
Partial<{
/** @enum {string} */
type?: "pypi";
value?: components["schemas"]["SocketRefPyPI"];
}>;
value?: Record<string, never>;
} | {
/** @enum {string} */
type?: "npm";
value?: components["schemas"]["SocketRefNPM"];
} | {
/** @enum {string} */
type?: "git";
value?: components["schemas"]["SocketRefGit"];
} | {
/** @enum {string} */
type?: "web";
value?: components["schemas"]["SocketRefWeb"];
} | {
/** @enum {string} */
type?: "pypi";
value?: components["schemas"]["SocketRefPyPI"];
};
SocketRefTextRange: {

@@ -1291,3 +1282,3 @@ /** @default 0 */

responses: {
/** Bad request */
/** @description Bad request */
SocketBadRequest: {

@@ -1303,3 +1294,3 @@ content: {

};
/** Unauthorized */
/** @description Unauthorized */
SocketUnauthorized: {

@@ -1315,3 +1306,3 @@ content: {

};
/** Insufficient max_quota for API method */
/** @description Insufficient max_quota for API method */
SocketForbidden: {

@@ -1327,3 +1318,3 @@ content: {

};
/** Resource not found */
/** @description Resource not found */
SocketNotFoundResponse: {

@@ -1339,7 +1330,7 @@ content: {

};
/** Insufficient quota for API route */
/** @description Insufficient quota for API route */
SocketTooManyRequestsResponse: {
headers: {
/**
* Retry contacting the endpoint *at least* after seconds.
* @description Retry contacting the endpoint *at least* after seconds.
* See https://tools.ietf.org/html/rfc7231#section-7.1.3

@@ -1359,12 +1350,20 @@ */

};
requestBodies: {};
parameters: never;
requestBodies: {
};
headers: never;
pathItems: never;
}
export type external = Record<string, never>;
export interface operations {
/**
* Get all the issues related with a particular npm package version.
* Get issues by package
* @description Get all the issues related with a particular npm package version.
* This endpoint returns the issue type, location, and additional details related to each issue in the `props` attribute.
*
*
* You can [see here](https://socket.dev/npm/issue) the full list of issues.
*
*
* This endpoint consumes 1 unit of your quota.

@@ -1380,3 +1379,3 @@ */

responses: {
/** Socket issue lists */
/** @description Socket issue lists */
200: {

@@ -1395,4 +1394,5 @@ content: {

/**
* Get all the scores and metrics by category that are used to evaluate the package version.
*
* Get score by package
* @description Get all the scores and metrics by category that are used to evaluate the package version.
*
* This endpoint consumes 1 unit of your quota.

@@ -1408,3 +1408,3 @@ */

responses: {
/** Socket package scores */
/** @description Socket package scores */
200: {

@@ -1423,4 +1423,5 @@ content: {

/**
* Delete a specific project report.
*
* Delete a report
* @description Delete a specific project report.
*
* This endpoint consumes 10 units of your quota.

@@ -1435,3 +1436,3 @@ */

responses: {
/** Success */
/** @description Success */
200: {

@@ -1453,4 +1454,5 @@ content: {

/**
* Get all your project reports.
*
* Get list of reports
* @description Get all your project reports.
*
* This endpoint consumes 10 units of your quota.

@@ -1460,11 +1462,11 @@ */

responses: {
/** List of project reports */
/** @description List of project reports */
200: {
content: {
"application/json": {
/** @default */
id: string;
/** @default */
url: string;
}[];
"application/json": ({
/** @default */
id: string;
/** @default */
url: string;
})[];
};

@@ -1480,14 +1482,25 @@ };

/**
* Upload a lockfile to get your project analyzed by Socket.
* Create a report
* @description Upload a lockfile to get your project analyzed by Socket.
* You can upload multiple lockfiles in the same request, but each filename must be unique.
*
*
* The name of the file must be in the supported list.
*
*
* For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.
*
*
* This endpoint consumes 100 units of your quota.
*/
createReport: {
requestBody?: {
content: {
"multipart/form-data": {
issueRules?: {
[key: string]: boolean | undefined;
};
[key: string]: undefined;
};
};
};
responses: {
/** ID and URL of the project report */
/** @description ID and URL of the project report */
200: {

@@ -1508,13 +1521,7 @@ content: {

};
requestBody: {
content: {
"multipart/form-data": {
issueRules?: { [key: string]: boolean };
} & { [key: string]: never };
};
};
};
/**
* Get all the issues, packages, and scores related to an specific project report.
*
* View a report
* @description Get all the issues, packages, and scores related to an specific project report.
*
* This endpoint consumes 10 units of your quota.

@@ -1529,3 +1536,3 @@ */

responses: {
/** Socket report */
/** @description Socket report */
200: {

@@ -1544,8 +1551,9 @@ content: {

/**
* Get a list of supported files for project report generation.
* Get supported files for report
* @description 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.

@@ -1555,12 +1563,12 @@ */

responses: {
/** Glob patterns used to match supported files */
/** @description Glob patterns used to match supported files */
200: {
content: {
"application/json": {
[key: string]: {
[key: string]: ({
[key: string]: {
/** @default */
pattern: string;
};
};
} | undefined;
}) | undefined;
};

@@ -1574,4 +1582,5 @@ };

/**
* Retrieve the API specification in an Openapi JSON format.
*
* Returns the OpenAPI definition
* @description Retrieve the API specification in an Openapi JSON format.
*
* This endpoint consumes 0 units of your quota.

@@ -1581,3 +1590,3 @@ */

responses: {
/** OpenAPI specification */
/** @description OpenAPI specification */
200: {

@@ -1592,4 +1601,5 @@ content: {

/**
* Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota.
*
* Get quota
* @description Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota.
*
* This endpoint consumes 0 units of your quota.

@@ -1599,3 +1609,3 @@ */

responses: {
/** Quota amount */
/** @description Quota amount */
200: {

@@ -1613,5 +1623,129 @@ content: {

};
/**
* List organizations
* @description Get information on the current organizations associated with the API key.
*
* This endpoint consumes 0 units of your quota.
*/
getOrganizations: {
responses: {
/** @description Organizations information */
200: {
content: {
"application/json": {
organizations: {
[key: string]: {
/** @default */
id: string;
/** @default */
name: string;
/** @default */
image: string;
/** @default */
plan: string;
} | undefined;
};
};
};
};
401: components["responses"]["SocketUnauthorized"];
429: components["responses"]["SocketTooManyRequestsResponse"];
};
};
/**
* Calculate settings
* @description Get your current settings the requested organizations and default settings to allow deferals.
*
* This endpoint consumes 0 units of your quota.
*/
postSettings: {
requestBody?: {
content: {
"application/json": ({
/** @default */
organization?: string;
})[];
};
};
responses: {
/** @description Organization settings */
200: {
content: {
"application/json": {
defaults: {
issueRules: {
[key: string]: ({
/** @enum {string} */
action?: "error" | "ignore" | "warn";
}) | undefined;
};
};
entries: ({
/** @default */
start: string | null;
settings: {
deferTo?: string | null;
issueRules?: {
[key: string]: ({
/** @enum {string} */
action?: "defer" | "error" | "ignore" | "warn";
}) | undefined;
};
};
})[];
};
};
};
401: components["responses"]["SocketUnauthorized"];
403: components["responses"]["SocketForbidden"];
429: components["responses"]["SocketTooManyRequestsResponse"];
};
};
/**
* Get list of repos and their latest project report
* @description Get all repositories in an org including their latest project report.
*
* This endpoint consumes 0 units of your quota.
*/
getRepoList: {
responses: {
/** @description List of repos and their latest project report for the organization associated with the token used */
200: {
content: {
"application/json": {
results: ({
/** @default */
id?: string;
/** @default */
created_at?: string;
/** @default */
updated_at?: string;
/** @default */
github_install_id?: string;
/** @default */
github_repo_id?: string;
/** @default */
name?: string;
/** @default */
github_full_name?: string;
/** @default */
organization_id?: string;
latest_project_report?: {
/** @default */
id: string;
/** @default */
created_at: string;
};
})[];
};
};
};
400: components["responses"]["SocketBadRequest"];
401: components["responses"]["SocketUnauthorized"];
403: components["responses"]["SocketForbidden"];
404: components["responses"]["SocketNotFoundResponse"];
429: components["responses"]["SocketTooManyRequestsResponse"];
};
};
}
export interface external {}

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