From ee51c32fb070d87b432fd93be02325c3b6c7d3a0 Mon Sep 17 00:00:00 2001 From: "socket-pr-bot[bot]" <294242679+socket-pr-bot[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2026 07:29:03 +0000 Subject: [PATCH] fix(openapi): sync API contracts --- docs/api.md | 20 +- openapi-v1.json | 12 + openapi.json | 156 +- types/api-v1.d.ts | 4406 +++++++++++++++++++++++---------------------- types/api.d.ts | 186 +- 5 files changed, 2583 insertions(+), 2197 deletions(-) diff --git a/docs/api.md b/docs/api.md index d73fca65..ca0e1899 100644 --- a/docs/api.md +++ b/docs/api.md @@ -5947,19 +5947,19 @@ const scanFixtures = { #### `$defs` (type) -Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L9775). +Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L9806). #### `components` (type) -Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L3085). +Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L3103). #### `external` (type) -Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L9777). +Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L9808). #### `operations` (type) -Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L35257). +Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L35383). #### `paths` (type) @@ -5969,7 +5969,7 @@ Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L6). #### `webhooks` (type) -Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L3083). +Canonical generated API declaration: [types/api.d.ts](../types/api.d.ts#L3101). @@ -6041,19 +6041,19 @@ type OpReturnType = Operation extends { #### `$defs` (type) -Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L1875). +Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L295). #### `components` (type) -Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L1866). +Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L286). #### `external` (type) -Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L1877). +Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L297). #### `operations` (type) -Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L1879). +Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L299). #### `paths` (type) @@ -6061,6 +6061,6 @@ Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L1 #### `webhooks` (type) -Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L1864). +Canonical generated API declaration: [types/api-v1.d.ts](../types/api-v1.d.ts#L284). diff --git a/openapi-v1.json b/openapi-v1.json index 7df8de4a..d07b37bc 100644 --- a/openapi-v1.json +++ b/openapi-v1.json @@ -18,6 +18,7 @@ "paths": { "/v1/openapi": { "get": { + "operationId": "getV1OpenApi", "summary": "Returns the OpenAPI definition", "tags": ["meta"], "description": "Returns the OpenAPI 3.1 specification for the v1 API. No authentication required.", @@ -30,6 +31,7 @@ }, "/v1/openapi.json": { "get": { + "operationId": "getV1OpenApiJson", "summary": "Returns the OpenAPI definition", "tags": ["meta"], "description": "Returns the OpenAPI 3.1 specification for the v1 API. No authentication required.", @@ -42,6 +44,7 @@ }, "/v1/oauth2/device/authorize": { "post": { + "operationId": "createV1OAuthDeviceAuthorization", "requestBody": { "required": true, "content": { @@ -186,6 +189,7 @@ }, "/v1/oauth2/device/verify": { "post": { + "operationId": "verifyV1OAuthDevice", "requestBody": { "required": true, "content": { @@ -5327,6 +5331,7 @@ }, "/v1/orgs/{org_slug}/events/": { "post": { + "operationId": "createV1OrgEvents", "summary": "Post organization events", "tags": ["events"], "description": "Send events directly to Socket.\n\nAuthentication: Organization API token only.\nRequired token scopes: *", @@ -5663,6 +5668,7 @@ }, "/v1/orgs/{org_slug}/packages/checks": { "post": { + "operationId": "checkV1OrgPackages", "summary": "Evaluate package versions against organization policy", "tags": ["packages"], "description": "Evaluates cached facts for published, explicitly versioned public npm and PyPI packages against the organization default policy. This endpoint does not start scans.", @@ -6083,6 +6089,7 @@ }, "/v1/orgs/{org_slug}/packages/summaries": { "post": { + "operationId": "getV1OrgPackageSummaries", "summary": "Summarize package intelligence and findings", "tags": ["packages"], "description": "Returns organization-default policy decisions, per-artifact scores, findings, and detail links for cached published public npm and PyPI artifacts. This endpoint does not start scans.", @@ -6643,6 +6650,7 @@ }, "/v1/orgs/{org_slug}/purl/versions/{purl}": { "get": { + "operationId": "getV1OrgPurlVersions", "summary": "List published versions for a package by PURL", "tags": ["packages"], "description": "Given a package URL (PURL) *without* a version, returns every version\nSocket knows about for that package along with its publish date, sorted\nnewest-first by publish date.\n\nThis lets you enforce version policies such as \"N-1\" (allow the previous\nrelease, block the newest) without querying a package registry directly.\nVersions with no known publish date are listed last.\n\n**Ordering includes prereleases.** Sorting is by publish date only, so\nindex 0 is the most recently *published* version, not necessarily the\nnewest stable release. On npm in particular the newest publishes are\noften canaries or release candidates, so a consumer that reads index 1\nas \"N-1\" can land on a prerelease. Each entry carries a `prerelease`\nflag for this: filter out entries where `prerelease` is `true` before\napplying an N-1 rule. `prerelease` is `null` when the ecosystem's\nversion grammar has no canonical prerelease parser, or when the version\nstring itself does not parse — treat null according to your own policy\nrather than as an error.\n\nPass `limit` to cap how many entries come back; it is applied after\nsorting, so `limit=2` is all the N-1 use case needs. A `limit` that\nis not a positive integer is rejected with a 400 rather than clamped.\n\nThe PURL must be percent-encoded as a single path segment\n(`encodeURIComponent`); an unencoded `/` will not match this route.\nAny version on the PURL is ignored — the full history always comes back.\nThe HuggingFace `type` qualifier (model, dataset, or space) is honored.\n\nA well-formed PURL for an ecosystem that does not support version\nlisting returns a 400 rather than a server error.\n\nAuthentication: Organization API token, OAuth2, or NextAuth session.\nRequired token scope: `packages:list`. Costs 100 quota units.", @@ -6853,6 +6861,7 @@ }, "/v1/orgs/{org_slug}/threat-campaigns/": { "get": { + "operationId": "listV1OrgThreatCampaigns", "summary": "List threat campaigns", "tags": ["threat-campaigns"], "description": "Returns a paginated list of supply chain attack campaigns. Supports filtering\nby status, ecosystem, and an incremental sync parameter (`updated_after`).\n\nPackage PURLs are not inlined on the campaign object — they are their own\npaginated resource. Fetch them per campaign from\n`/threat-campaigns/:campaign_id/packages`.\n\nAuthentication: Organization API token, OAuth2, or NextAuth session.\nRequired token scope: `threat-campaigns:list`.\n\nThis endpoint requires an Enterprise Plan with the Threat Feed add-on.", @@ -7143,6 +7152,7 @@ }, "/v1/orgs/{org_slug}/threat-campaigns/{campaign_id}/": { "get": { + "operationId": "getV1OrgThreatCampaign", "summary": "Get a threat campaign", "tags": ["threat-campaigns"], "description": "Returns a single supply chain attack campaign by ID. Same shape as one item\nfrom the campaigns list; package PURLs are not inlined — fetch them from the\npaginated `/threat-campaigns/:campaign_id/packages` resource instead.\n\nUseful for filling in cached campaign metadata client-side when crawling the\ncampaigns list or packages feed.\n\nAuthentication: Organization API token, OAuth2, or NextAuth session.\nRequired token scope: `threat-campaigns:list`.\n\nThis endpoint requires an Enterprise Plan with the Threat Feed add-on.", @@ -7381,6 +7391,7 @@ }, "/v1/orgs/{org_slug}/threat-campaigns/{campaign_id}/packages": { "get": { + "operationId": "listV1OrgThreatCampaignPackages", "summary": "List packages for a threat campaign", "tags": ["threat-campaigns"], "description": "Returns a cursor-paginated list of package PURLs affected by a single supply\nchain attack campaign. This is the primary way to retrieve all packages for a\nknown campaign without an inline, unbounded list on the campaign object.\n\nPagination follows the same `{ items, endCursor }` envelope as the campaigns\nlist. Pass the `endCursor` value back as `cursor` to fetch the next page.\n\nAuthentication: Organization API token, OAuth2, or NextAuth session.\nRequired token scope: `threat-campaigns:list`.\n\nThis endpoint requires an Enterprise Plan with the Threat Feed add-on.", @@ -7584,6 +7595,7 @@ }, "/v1/packages/malware/checks": { "post": { + "operationId": "checkV1Malware", "summary": "Check public npm packages for known malware", "tags": ["packages"], "description": "Returns bounded public malware observations for exact npm releases. Results are for this request only and are not cached.", diff --git a/openapi.json b/openapi.json index 95ae48c2..e32dd7dd 100644 --- a/openapi.json +++ b/openapi.json @@ -10433,6 +10433,11 @@ "description": "", "default": 0 }, + "purl_ecosystem_unsupported": { + "type": "integer", + "description": "", + "default": 0 + }, "purl_ecosystem_not_enabled": { "type": "integer", "description": "", @@ -10447,6 +10452,7 @@ "required": [ "package_not_found", "purl_ecosystem_not_enabled", + "purl_ecosystem_unsupported", "purl_malformed" ] } @@ -10849,6 +10855,11 @@ "description": "Action to take for this alert (e.g., error, warn, ignore)", "default": "" }, + "actionAfterPullRequestIgnore": { + "type": "string", + "description": "Action this alert keeps when a pull or merge request comment ignores its package (error, warn or monitor). Set on GET diff-scans/{id}, GET full-scans/diff and GET full-scans/{id}; absent when the ignore removes the alert", + "default": "" + }, "actionSource": { "type": "object", "additionalProperties": true, @@ -14561,7 +14572,7 @@ }, "group_uuid": { "type": "string", - "description": "The stable group UUID that remains constant across token rotations", + "description": "The stable group UUID that remains constant across token rotations. OAuth tokens in one refresh family may share this UUID; use id or hash to identify one token.", "default": "", "format": "uuid" }, @@ -14897,13 +14908,13 @@ }, "security": [ { - "bearerAuth": [] + "bearerAuth": ["dependencies:list"] }, { - "basicAuth": [] + "basicAuth": ["dependencies:list"] } ], - "description": "Search for any dependency that is being used in your organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- No Scopes Required, but authentication is required", + "description": "Search for any dependency that is being used in your organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- dependencies:list", "responses": { "200": { "content": { @@ -21412,11 +21423,11 @@ "default": "" } }, - "description": "The API token identifier to revoke. Provide uuid (recommended), id, token, or hash. May provide uuid+hash together for validation." + "description": "The API token identifier to revoke. Provide id, token, hash, or an unambiguous uuid. Use uuid+hash to select one token within a shared group." } } }, - "description": "The API token identifier to revoke. Provide uuid (recommended), id, token, or hash. May provide uuid+hash together for validation.", + "description": "The API token identifier to revoke. Provide id, token, hash, or an unambiguous uuid. Use uuid+hash to select one token within a shared group.", "required": false }, "security": [ @@ -21510,11 +21521,11 @@ "default": "" } }, - "description": "The API Token identifier to rotate. Provide uuid (recommended), id, token, or hash. May provide uuid+hash together for validation." + "description": "The API Token identifier to rotate. Provide id, token, hash, or an unambiguous uuid. Use uuid+hash to select one token within a shared group." } } }, - "description": "The API Token identifier to rotate. Provide uuid (recommended), id, token, or hash. May provide uuid+hash together for validation.", + "description": "The API Token identifier to rotate. Provide id, token, hash, or an unambiguous uuid. Use uuid+hash to select one token within a shared group.", "required": false }, "security": [ @@ -21860,7 +21871,7 @@ }, "uuid": { "type": "string", - "description": "The stable group UUID to update (provide uuid, id, token, or hash. May provide uuid+hash together for validation)", + "description": "The stable group UUID to update. Shared groups require a matching hash; id, token, or hash alone also identify one token.", "default": "", "format": "uuid" }, @@ -21895,7 +21906,7 @@ "basicAuth": ["api-tokens:create"] } ], - "description": "Update an API Token. The API Token created must use a subset of permissions the API token creating them.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:create", + "description": "Update an API token. The caller must have all requested scopes. Set repository access when creating the token. Omit `resources` when updating other settings. Including the field, even as an empty array or null, rejects the entire update with HTTP 400.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:create", "responses": { "200": { "content": { @@ -21917,6 +21928,9 @@ }, "description": "The updated token." }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, "401": { "$ref": "#/components/responses/SocketUnauthorized" }, @@ -22308,7 +22322,7 @@ "basicAuth": ["packages:list"] } ], - "description": "**This endpoint is deprecated.** Deprecated since 2026-01-05.\n\nBatch retrieval of package metadata and alerts by PURL strings. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\nAdd `notFoundAlerts=true` (with `alerts=true`) to get synthetic\n`notFound` artifacts, evaluated by the organization's policy, while every\nother purlError stays: a timed-out input remains a `retryable` purlError,\nso \"no record\" and \"no answer\" stay distinguishable.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n**Conda (temporary compatibility):** `pkg:conda` inputs are served from the\nalready-scanned PyPI package with the same normalized name and version when\none exists; the response row keeps the original conda PURL in `inputPurl`\nbut reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel`\nqualifiers are ignored, and conda packages without a scanned PyPI\ncounterpart return the normal `notFound` result. This mapping will be\nreplaced by native conda support.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up an PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", + "description": "**This endpoint is deprecated.** Deprecated since 2026-01-05.\n\nBatch retrieval of package metadata and alerts by PURL strings. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\nAdd `notFoundAlerts=true` (with `alerts=true`) to get synthetic\n`notFound` artifacts, evaluated by the organization's policy, while every\nother purlError stays: a timed-out input remains a `retryable` purlError,\nso \"no record\" and \"no answer\" stay distinguishable.\n\nInputs whose purl type is a valid spec type that Socket does not yet support\n(for example `pkg:hex`, `pkg:deb` or `pkg:docker`) are not looked up. With\n`purlErrors=true` each returns a `purlError` naming the unsupported type,\nand `summary=true` counts them in `errors.purl_ecosystem_unsupported`.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n**Conda (temporary compatibility):** `pkg:conda` inputs are served from the\nalready-scanned PyPI package with the same normalized name and version when\none exists; the response row keeps the original conda PURL in `inputPurl`\nbut reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel`\nqualifiers are ignored, and conda packages without a scanned PyPI\ncounterpart return the normal `notFound` result. This mapping will be\nreplaced by native conda support.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up an PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", "responses": { "200": { "content": { @@ -22532,7 +22546,7 @@ "basicAuth": ["packages:list"] } ], - "description": "Batch retrieval of package metadata and alerts by PURL strings for a specific organization. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\nAdd `notFoundAlerts=true` (with `alerts=true`) to get synthetic\n`notFound` artifacts, evaluated by the organization's policy, while every\nother purlError stays: a timed-out input remains a `retryable` purlError,\nso \"no record\" and \"no answer\" stay distinguishable.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n**Conda (temporary compatibility):** `pkg:conda` inputs are served from the\nalready-scanned PyPI package with the same normalized name and version when\none exists; the response row keeps the original conda PURL in `inputPurl`\nbut reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel`\nqualifiers are ignored, and conda packages without a scanned PyPI\ncounterpart return the normal `notFound` result. This mapping will be\nreplaced by native conda support.\n\n## Query Parameters\n\nThis endpoint supports all query parameters from `POST /v0/purl` including: `alerts`, `actions`, `compact`, `mode`, `fixable`, `licenseattrib`, `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and `summary`.\n\nAdditionally, you may provide a `labels` query parameter to apply a repository label's security policies. Pass the label slug as the value (e.g., `?labels=production`). Only one label is currently supported.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up a PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### With label and options (query parameters):\n\n```\nPOST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", + "description": "Batch retrieval of package metadata and alerts by PURL strings for a specific organization. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\nAdd `notFoundAlerts=true` (with `alerts=true`) to get synthetic\n`notFound` artifacts, evaluated by the organization's policy, while every\nother purlError stays: a timed-out input remains a `retryable` purlError,\nso \"no record\" and \"no answer\" stay distinguishable.\n\nInputs whose purl type is a valid spec type that Socket does not yet support\n(for example `pkg:hex`, `pkg:deb` or `pkg:docker`) are not looked up. With\n`purlErrors=true` each returns a `purlError` naming the unsupported type,\nand `summary=true` counts them in `errors.purl_ecosystem_unsupported`.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n**Conda (temporary compatibility):** `pkg:conda` inputs are served from the\nalready-scanned PyPI package with the same normalized name and version when\none exists; the response row keeps the original conda PURL in `inputPurl`\nbut reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel`\nqualifiers are ignored, and conda packages without a scanned PyPI\ncounterpart return the normal `notFound` result. This mapping will be\nreplaced by native conda support.\n\n## Query Parameters\n\nThis endpoint supports all query parameters from `POST /v0/purl` including: `alerts`, `actions`, `compact`, `mode`, `fixable`, `licenseattrib`, `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and `summary`.\n\nAdditionally, you may provide a `labels` query parameter to apply a repository label's security policies. Pass the label slug as the value (e.g., `?labels=production`). Only one label is currently supported.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up a PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### With label and options (query parameters):\n\n```\nPOST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", "responses": { "200": { "content": { @@ -29890,7 +29904,25 @@ } } }, - "description": "The difference between the two Full Scans in the diff scan." + "description": "The difference between the two Full Scans in the diff scan.", + "headers": { + "X-Socket-Immutable-Scan-Cached": { + "description": "Set to 1 when the response is served from the stored result. Only sent with cached or if_cached.", + "required": false, + "schema": { + "type": "string", + "enum": ["1"] + } + }, + "X-Socket-Scanned-At": { + "description": "When the stored result was built, as an ISO 8601 timestamp. Only sent with cached or if_cached, and absent when the build time is unknown.", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + } + } }, "202": { "content": { @@ -30057,7 +30089,7 @@ { "name": "include_scores", "in": "query", - "required": true, + "required": false, "description": "Include scores event in the response. include_scores_details implies this flag", "schema": { "type": "boolean", @@ -30089,18 +30121,18 @@ { "name": "include_license_details", "in": "query", - "required": true, + "required": false, "description": "Include license details in the response. This can increase the response size significantly.", "schema": { "type": "boolean", - "default": false + "default": true } }, { "name": "cached", "in": "query", "required": false, - "description": "Return cached immutable scan results. When enabled and results are cached, returns the pre-computed scan. When results are not yet cached, returns 202 Accepted and enqueues a background job.", + "description": "Return the cached immutable scan results when they exist, otherwise return 202 Accepted and enqueue a background job", "schema": { "type": "boolean", "default": false @@ -30110,7 +30142,7 @@ "name": "if_cached", "in": "query", "required": false, - "description": "Return the cached immutable scan results when they exist, otherwise 404. Never enqueues a scan job. Implies cached.", + "description": "Return the cached immutable scan results when they exist, otherwise return 404 Not Found. Never enqueues a scan job. Implies cached.", "schema": { "type": "boolean", "default": false @@ -30125,7 +30157,7 @@ "basicAuth": ["full-scans:list"] } ], - "description": "Stream all SBOM artifacts for a full scan.\n\nThis endpoint returns the latest, available alert data for artifacts in the full scan (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nA vulnerability alert reports two statuses of its own:\n\n- \"reachability\": the result of reachability analysis, under \"head\"\n- \"patch\": the Socket patch applied in the scanned project that fixes the alert, when there is one\n\nA package with an applied Socket patch also names it under \"patch.appliedPatch\".\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- full-scans:list", + "description": "Stream all SBOM artifacts for a full scan.\n\nEvery read returns a snapshot of the result from when the scan was built. Alerts and policy decisions are not recomputed on read.\nIf the result is not built yet, the request waits for it, returning 202 if the build does not finish in time.\nTo get an updated build with the current alerts, create a new scan with:\nPOST /orgs/{org_slug}/full-scans/{full_scan_id}/rescan?mode=deep and read that scan.\n\nA vulnerability alert reports two statuses of its own:\n\n- \"reachability\": the result of reachability analysis, under \"head\"\n- \"patch\": the Socket patch applied in the scanned project that fixes the alert, when there is one\n\nA package with an applied Socket patch also names it under \"patch.appliedPatch\".\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- full-scans:list", "responses": { "200": { "content": { @@ -30153,7 +30185,25 @@ } } }, - "description": "Socket issue lists and scores for all packages, followed by a final scores event" + "description": "Socket issue lists for all packages. With include_scores or include_scores_details, a scores event is always the last line, except for results stored before 2026-03-25 (see X-Socket-Scanned-At), which have none. Without said flags there is no scores event.", + "headers": { + "X-Socket-Immutable-Scan-Cached": { + "description": "Set to 1 when the response is served from the stored result.", + "required": true, + "schema": { + "type": "string", + "enum": ["1"] + } + }, + "X-Socket-Scanned-At": { + "description": "When the stored result was built, as an ISO 8601 timestamp. Absent when the build time is unknown.", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + } + } }, "202": { "content": { @@ -38266,6 +38316,27 @@ "default": false, "description": "True when either side of the diff was truncated at the plan's dependency limit. When set, the comments contain a limit-exceeded notice instead of a report rendered from the imbalanced diff." }, + "alert_counts": { + "type": "object", + "additionalProperties": true, + "description": "Counts of the new alerts the alerts comment reports, by action. Null when incomplete is true, because alerts are not computed from an imbalanced diff.", + "properties": { + "blocking": { + "type": "integer", + "description": "Number of new alerts with the Block action.", + "default": 0, + "minimum": 0 + }, + "warning": { + "type": "integer", + "description": "Number of new alerts with the Warn action.", + "default": 0, + "minimum": 0 + } + }, + "required": ["blocking", "warning"], + "nullable": true + }, "platform": { "type": "string", "enum": ["github", "gitlab", "origin"], @@ -38293,6 +38364,7 @@ }, "required": [ "after_full_scan", + "alert_counts", "api_url", "before_full_scan", "comments", @@ -43193,6 +43265,41 @@ "404": { "$ref": "#/components/responses/SocketNotFoundResponse" }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "description": "", + "properties": { + "error": { + "type": "object", + "additionalProperties": true, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "details": { + "type": "object", + "additionalProperties": true, + "description": "", + "default": null, + "nullable": true + } + }, + "required": ["details", "message"] + } + }, + "required": ["error"] + } + } + }, + "description": "This socket-cli version cannot apply this organization's Policies" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -50105,10 +50212,10 @@ "AdminOauthClientUpdated", "AdminOauthClientDeleted", "AdminOauthClientSecretRotated", + "AdminOauthClientTokensRevoked", "AdminSyncGithubInstall", "AdminTriggerFullScan", "AdminUnlinkGithubInstall", - "AdminUpdateCustomerCampaignAlerts", "AdminUpdateGithubInstallWorkspace", "AdminUpdateGithubInstallationSettings", "AdminUpdateOrganizationSetting", @@ -50143,6 +50250,7 @@ "CreateTicket", "CreateTicketingConfiguration", "CreateTicketingDestination", + "BulkMigrateTicketingDestinations", "CoanaCliLegacyModeCutoffUpdated", "CoanaCliLegacyModeDemoteOrg", "CoanaCliLegacyModePromoteOrg", @@ -50164,6 +50272,7 @@ "DeleteRepoAccessRule", "DeleteReport", "DeleteRepository", + "CloseArchivedRepositoryAlerts", "DeleteTicketingConfiguration", "DeleteTicketingDestination", "DeleteWebhook", @@ -50180,6 +50289,7 @@ "EndPolicyException", "EnqueueAutopatchMergeRun", "EnqueueAutopatchPrepareJob", + "ExpireAlertResolution", "FinalizeAlertPolicyMigration", "OrganizationIpPolicyDenied", "OptOutRulesAndPolicies", @@ -50236,6 +50346,7 @@ "SvdImportLegacyGithubMatches", "SvdImportLegacyOnlyGhsas", "SvdImportLegacyOverlay", + "SvdReemitGithubRepoAdvisories", "SvdReprocessClusters", "SvdRetransformGhsaMirror", "SvdSeedLegacyGithubMatches", @@ -50282,7 +50393,8 @@ "OAuthClientSecretRotated", "OAuthClientDisabled", "OAuthClientEnabled", - "OAuthClientDeleted" + "OAuthClientDeleted", + "OAuthClientEnrollmentDeleted" ] } }, diff --git a/types/api-v1.d.ts b/types/api-v1.d.ts index 1c29ae06..28cd45c2 100644 --- a/types/api-v1.d.ts +++ b/types/api-v1.d.ts @@ -24,16 +24,7 @@ export interface paths { * Returns the OpenAPI 3.1 specification for the v1 API. No authentication * required. */ - get: { - responses: { - /** - * Default Response. - */ - 200: { - content: never - } - } - } + get: operations['getV1OpenApi'] } '/v1/openapi.json': { /** @@ -42,138 +33,13 @@ export interface paths { * Returns the OpenAPI 3.1 specification for the v1 API. No authentication * required. */ - get: { - responses: { - /** - * Default Response. - */ - 200: { - content: never - } - } - } + get: operations['getV1OpenApiJson'] } '/v1/oauth2/device/authorize': { - post: { - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - client_id: string - scope?: string - [key: string]: unknown - } - } - } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - device_code: string - user_code: string - verification_uri: string - verification_uri_complete: string - expires_in: number - interval: number - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode?: number - error: string - message?: string - error_description?: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 500: { - content: { - 'application/json': { - statusCode?: number - error: string - message?: string - error_description?: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 503: { - content: { - 'application/json': { - statusCode?: number - error: string - message?: string - error_description?: string - [key: string]: unknown - } - } - } - } - } + post: operations['createV1OAuthDeviceAuthorization'] } '/v1/oauth2/device/verify': { - post: { - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - user_code: string - organization_id?: string - } - } - } - responses: { - /** - * Default Response. - */ - 302: { - content: never - } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': '' - } - } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': '' - } - } - /** - * Default Response. - */ - 503: { - content: { - 'application/json': { - statusCode?: number - error: string - message?: string - error_description?: string - [key: string]: unknown - } - } - } - } - } + post: operations['verifyV1OAuthDevice'] } '/v1/orgs/{org_slug}/access-management/members/': { /** @@ -284,169 +150,7 @@ export interface paths { * Authentication: Organization API token only. * Required token scopes: * */ - post: { - parameters: { - path: { - /** - * Organization slug. - */ - org_slug: string - } - } - /** - * Array of event payloads. - */ - requestBody: { - content: { - 'application/json': { - action?: string - alert_action?: string - alert_count?: number - api_error?: string - artifact_purl?: string - block_reason?: string - block_source?: string - blocked_alert_count?: number - cached?: boolean - client_action?: string - client_ip?: string - decision?: string - event_category?: string - event_id?: string - event_kind?: string - event_sender_created_at?: string - event_type?: string - ignore_reason?: string - input_purl?: string - machine_id?: string - monitor_reason?: string - parser_name?: string - parser_version?: string - private_registry_request_id?: string - purlCheckLatencyMs?: number - purl_check_latency_ms?: number - registryFqdn?: string - repo?: string - request_id?: string - response_code?: number - socket_api_response_code?: number - socket_client_version?: string - source_path?: string - stale?: boolean - trace_id?: string - upstream_host?: string - upstream_path?: string - upstream_status?: number - user_agent?: string - versions?: { - [key: string]: string - } - warn_reason?: string - [key: string]: unknown - }[] - } - } - responses: { - /** - * Events ingestion metadata. - */ - 200: { - content: { - 'application/json': { - [key: string]: unknown - } - } - } - /** - * Events ingestion metadata. - */ - 201: { - content: { - 'application/json': { - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 413: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 500: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - } - } + post: operations['createV1OrgEvents'] } '/v1/orgs/{org_slug}/packages/checks': { /** @@ -456,224 +160,7 @@ export interface paths { * PyPI packages against the organization default policy. This endpoint does * not start scans. */ - post: { - parameters: { - path: { - org_slug: string - } - } - requestBody: { - content: { - 'application/json': { - packages: { - purl: string - }[] - } - } - } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - context: { - /** - * @enum {unknown} - */ - mode: 'organization' - organizationSlug: string - /** - * @enum {unknown} - */ - policyScope: 'organization-default' - policyRevision: number - [key: string]: unknown - } - results: { - index: number - inputPurl: string - resolvedPurls: string[] - /** - * @enum {unknown} - */ - status: - | 'complete' - | 'pending' - | 'unknown' - | 'unsupported' - | 'error' - /** - * @enum {unknown} - */ - action: 'block' | 'warn' | 'monitor' | 'allow' | 'indeterminate' - reasons: { - /** - * @enum {unknown} - */ - code: - | 'invalid_purl' - | 'version_required' - | 'unsupported_ecosystem' - | 'unsupported_identity' - | 'metadata_unavailable' - | 'analysis_pending' - | 'analysis_stale' - | 'artifact_limit' - | 'result_limit' - | 'deadline_exceeded' - | 'lookup_failed' - | 'policy_action_unavailable' - | 'policy_block' - | 'policy_warn' - | 'policy_monitor' - alertKey?: string - alertType?: string - artifactPurls?: string[] - [key: string]: unknown - }[] - coverage: { - /** - * @enum {unknown} - */ - scope: 'published-artifacts' - complete: boolean - artifactCount: number - evaluatedArtifactCount: number - /** - * @enum {null|string} - */ - reason: - | 'metadata_unavailable' - | 'analysis_incomplete' - | 'artifact_limit' - | 'result_limit' - | 'deadline_exceeded' - | 'lookup_failed' - | null - [key: string]: unknown - } - freshness: { - /** - * Format: date-time. - */ - evaluatedAt: string - analysisAt: null - /** - * @enum {unknown} - */ - source: 'artifact-state' - /** - * @enum {unknown} - */ - state: 'current' | 'stale' | 'unknown' - [key: string]: unknown - } - [key: string]: unknown - }[] - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 413: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 429: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 503: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - } - } + post: operations['checkV1OrgPackages'] } '/v1/orgs/{org_slug}/packages/summaries': { /** @@ -683,270 +170,7 @@ export interface paths { * findings, and detail links for cached published public npm and PyPI * artifacts. This endpoint does not start scans. */ - post: { - parameters: { - path: { - org_slug: string - } - } - requestBody: { - content: { - 'application/json': { - packages: { - purl: string - }[] - } - } - } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - context: { - /** - * @enum {unknown} - */ - mode: 'organization' - organizationSlug: string - /** - * @enum {unknown} - */ - policyScope: 'organization-default' - policyRevision: number - [key: string]: unknown - } - results: { - index: number - inputPurl: string - resolvedPurls: string[] - /** - * @enum {unknown} - */ - status: - | 'complete' - | 'pending' - | 'unknown' - | 'unsupported' - | 'error' - /** - * @enum {unknown} - */ - action: 'block' | 'warn' | 'monitor' | 'allow' | 'indeterminate' - reasons: { - /** - * @enum {unknown} - */ - code: - | 'invalid_purl' - | 'version_required' - | 'unsupported_ecosystem' - | 'unsupported_identity' - | 'metadata_unavailable' - | 'analysis_pending' - | 'analysis_stale' - | 'artifact_limit' - | 'result_limit' - | 'deadline_exceeded' - | 'lookup_failed' - | 'policy_action_unavailable' - | 'policy_block' - | 'policy_warn' - | 'policy_monitor' - alertKey?: string - alertType?: string - artifactPurls?: string[] - [key: string]: unknown - }[] - coverage: { - /** - * @enum {unknown} - */ - scope: 'published-artifacts' - complete: boolean - artifactCount: number - evaluatedArtifactCount: number - /** - * @enum {null|string} - */ - reason: - | 'metadata_unavailable' - | 'analysis_incomplete' - | 'artifact_limit' - | 'result_limit' - | 'deadline_exceeded' - | 'lookup_failed' - | null - [key: string]: unknown - } - freshness: { - /** - * Format: date-time. - */ - evaluatedAt: string - analysisAt: null - /** - * @enum {unknown} - */ - source: 'artifact-state' - /** - * @enum {unknown} - */ - state: 'current' | 'stale' | 'unknown' - [key: string]: unknown - } - artifacts: { - reference: string - purl: string - /** - * @enum {unknown} - */ - state: - | 'complete' - | 'pending' - | 'revalidate' - | 'error' - | 'unknown' - scores: null | { - supplyChain: number - quality: number - maintenance: number - vulnerability: number - license: number - overall: number - [key: string]: unknown - } - alerts: { - key: string - type: string - /** - * @enum {null|string} - */ - action: 'error' | 'warn' | 'monitor' | 'ignore' | null - [key: string]: unknown - }[] - /** - * Format: uri. - */ - detailUrl: string - [key: string]: unknown - }[] - alerts: { - key: string - type: string - /** - * @enum {null|string} - */ - action: 'error' | 'warn' | 'monitor' | 'ignore' | null - artifactPurls: string[] - [key: string]: unknown - }[] - [key: string]: unknown - }[] - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 413: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 429: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 503: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - } - } + post: operations['getV1OrgPackageSummaries'] } '/v1/orgs/{org_slug}/purl/versions/{purl}': { /** @@ -986,137 +210,7 @@ export interface paths { * Authentication: Organization API token, OAuth2, or NextAuth session. * Required token scope: `packages:list`. Costs 100 quota units. */ - get: { - parameters: { - query?: { - /** - * Maximum number of version entries to return, applied after sorting. - * Omit for the full history. - */ - limit?: number - } - path: { - /** - * Organization slug. - */ - org_slug: string - /** - * Package URL, percent-encoded as a single path segment. Example: - * pkg%3Anpm%2F%40babel%2Fcore. - */ - purl: string - } - } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - /** - * The PURL as received, echoed back. - */ - purl: string - /** - * Known versions, newest-first by publish date. Ordering includes - * prereleases, so index 0 is the most recent publish rather than - * the newest stable release. - */ - versions: { - /** - * The version string as the ecosystem reports it. - */ - version: string - /** - * ISO-8601 publish date, or null when the ecosystem reports - * none. Undated versions are listed last. - */ - publishedAt: null | string - /** - * True when this version is a prerelease (canary, release - * candidate, dev, beta) according to the ecosystem's own - * version grammar. Null means unknown — either the ecosystem - * has no canonical prerelease parser, or this version string - * does not parse. Null is not an error. - */ - prerelease: null | boolean - }[] - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 429: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - } - } + get: operations['getV1OrgPurlVersions'] } '/v1/orgs/{org_slug}/threat-campaigns/': { /** @@ -1135,159 +229,7 @@ export interface paths { * * This endpoint requires an Enterprise Plan with the Threat Feed add-on. */ - get: { - parameters: { - query?: { - /** - * Filter by campaign status. Defaults to ongoing. - */ - status?: 'ongoing' | 'past' - /** - * Filter by ecosystem (e.g. npm, pypi, maven). - */ - ecosystem?: string - /** - * Unix timestamp in seconds. Only return campaigns updated after this - * time. Omit to return all matching campaigns. - */ - updated_after?: string - /** - * Number of campaigns per page. Default 30, max 100. - */ - per_page?: number - /** - * Opaque cursor for pagination. Use the endCursor value from the - * previous response. - */ - cursor?: string - } - path: { - /** - * Organization slug. - */ - org_slug: string - } - } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - items: { - id: string - name: string - description: string - /** - * @enum {string} - */ - status: 'ongoing' | 'past' - ecosystem: null | string[] - firstDiscovered: null | string - lastActivity: null | string - blogUrls: string[] - /** - * Number of threat feed entries linked to this campaign. - */ - linkedThreatCount: number - /** - * Number of distinct package artifacts linked to this - * campaign. - */ - linkedPackageArtifactsCount: number - /** - * URL of the public campaign page on socket.dev, or null if - * the campaign has no public page. - */ - htmlUrl: null | string - /** - * Format: date-time. - */ - createdAt: string - /** - * Format: date-time. - */ - updatedAt: string - [key: string]: unknown - }[] - endCursor?: null | string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 429: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - } - } + get: operations['listV1OrgThreatCampaigns'] } '/v1/orgs/{org_slug}/threat-campaigns/{campaign_id}/': { /** @@ -1306,134 +248,7 @@ export interface paths { * * This endpoint requires an Enterprise Plan with the Threat Feed add-on. */ - get: { - parameters: { - path: { - /** - * Organization slug. - */ - org_slug: string - /** - * Campaign ID. - */ - campaign_id: string - } - } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - id: string - name: string - description: string - /** - * @enum {string} - */ - status: 'ongoing' | 'past' - ecosystem: null | string[] - firstDiscovered: null | string - lastActivity: null | string - blogUrls: string[] - /** - * Number of threat feed entries linked to this campaign. - */ - linkedThreatCount: number - /** - * Number of distinct package artifacts linked to this campaign. - */ - linkedPackageArtifactsCount: number - /** - * URL of the public campaign page on socket.dev, or null if the - * campaign has no public page. - */ - htmlUrl: null | string - /** - * Format: date-time. - */ - createdAt: string - /** - * Format: date-time. - */ - updatedAt: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 429: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - } - } + get: operations['getV1OrgThreatCampaign'] } '/v1/orgs/{org_slug}/threat-campaigns/{campaign_id}/packages': { /** @@ -1453,430 +268,185 @@ export interface paths { * * This endpoint requires an Enterprise Plan with the Threat Feed add-on. */ - get: { - parameters: { - query?: { - /** - * Number of packages per page. Default 100, max 1000. - */ - per_page?: number - /** - * Opaque cursor for pagination. Use the endCursor value from the - * previous response. - */ - cursor?: string - } - path: { - /** - * Organization slug. - */ - org_slug: string - /** - * Campaign ID. - */ - campaign_id: string - } + get: operations['listV1OrgThreatCampaignPackages'] + } + '/v1/packages/malware/checks': { + /** + * Check public npm packages for known malware. + * + * Returns bounded public malware observations for exact npm releases. + * Results are for this request only and are not cached. + */ + post: operations['checkV1Malware'] + } +} + +export type webhooks = Record + +export interface components { + schemas: {} + responses: never + parameters: never + requestBodies: never + headers: never + pathItems: never +} + +export type $defs = Record + +export type external = Record + +export interface operations { + /** + * Returns the OpenAPI definition. + * + * Returns the OpenAPI 3.1 specification for the v1 API. No authentication + * required. + */ + getV1OpenApi: { + responses: { + /** + * Default Response. + */ + 200: { + content: never } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - /** - * Package PURLs associated with this campaign. - */ - items: string[] - endCursor?: null | string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } + } + } + /** + * Returns the OpenAPI definition. + * + * Returns the OpenAPI 3.1 specification for the v1 API. No authentication + * required. + */ + getV1OpenApiJson: { + responses: { + /** + * Default Response. + */ + 200: { + content: never + } + } + } + createV1OAuthDeviceAuthorization: { + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + client_id: string + scope?: string + [key: string]: unknown } - /** - * Default Response. - */ - 401: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + device_code: string + user_code: string + verification_uri: string + verification_uri_complete: string + expires_in: number + interval: number } } - /** - * Default Response. - */ - 403: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - [key: string]: unknown - } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode?: number + error: string + message?: string + error_description?: string + [key: string]: unknown } } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } + } + /** + * Default Response. + */ + 500: { + content: { + 'application/json': { + statusCode?: number + error: string + message?: string + error_description?: string + [key: string]: unknown } } - /** - * Default Response. - */ - 429: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } + } + /** + * Default Response. + */ + 503: { + content: { + 'application/json': { + statusCode?: number + error: string + message?: string + error_description?: string + [key: string]: unknown } } } } } - '/v1/packages/malware/checks': { - /** - * Check public npm packages for known malware. - * - * Returns bounded public malware observations for exact npm releases. - * Results are for this request only and are not cached. - */ - post: { - requestBody: { - content: { - 'application/json': { - packages: { - purl: string - }[] - candidateRevision?: string - } + verifyV1OAuthDevice: { + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + user_code: string + organization_id?: string } } - responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - context: { - /** - * @enum {unknown} - */ - mode: 'public-malware' - /** - * @enum {unknown} - */ - evaluatorVersion: 'public-malware-v1' - /** - * @enum {unknown} - */ - consistency: 'request-observation' - intelligenceRevision: null - /** - * Format: date-time. - */ - observedAt: string - /** - * @enum {unknown} - */ - reuse: 'none' - expiresAt: null - sourceAsOf: null - } - results: OneOf< - [ - { - index: number - inputPurl: string - canonicalPurl: string | null - /** - * @enum {unknown} - */ - status: 'confirmed_malware' - reasonCodes: unknown[] - findings: { - /** - * @enum {unknown} - */ - scope: 'version' | 'package' | 'author' - /** - * @enum {unknown} - */ - code: - | 'reviewed_malware' - | 'package_bad_intent' - | 'author_bad_intent' - /** - * Format: uri. - */ - url: string - }[] - findingsTruncated: boolean - coverage: { - /** - * @enum {unknown} - */ - registry: 'https://registry.npmjs.org' - /** - * @enum {unknown} - */ - reviewedThreats: 'complete' | 'unavailable' - /** - * @enum {unknown} - */ - packageVerdicts: 'complete' | 'unavailable' - /** - * @enum {unknown} - */ - authorVerdicts: 'complete' | 'unknown' | 'unavailable' - /** - * @enum {unknown} - */ - identity: 'known' | 'unknown' - } - }, - { - index: number - inputPurl: string - canonicalPurl: string | null - /** - * @enum {unknown} - */ - status: 'no_known_malware' - reasonCodes: unknown[] - findings: unknown[] - /** - * @enum {unknown} - */ - findingsTruncated: '' - coverage: { - /** - * @enum {unknown} - */ - registry: 'https://registry.npmjs.org' - /** - * @enum {unknown} - */ - reviewedThreats: 'complete' - /** - * @enum {unknown} - */ - packageVerdicts: 'complete' - /** - * @enum {unknown} - */ - authorVerdicts: 'complete' - /** - * @enum {unknown} - */ - identity: 'known' - } - }, - { - index: number - inputPurl: string - canonicalPurl: string | null - /** - * @enum {unknown} - */ - status: 'unknown' - reasonCodes: ( - | 'identity_not_observed' - | 'author_evidence_missing' - | 'coverage_incomplete' - )[] - findings: unknown[] - /** - * @enum {unknown} - */ - findingsTruncated: '' - coverage: { - /** - * @enum {unknown} - */ - registry: 'https://registry.npmjs.org' - /** - * @enum {unknown} - */ - reviewedThreats: 'complete' | 'unavailable' - /** - * @enum {unknown} - */ - packageVerdicts: 'complete' | 'unavailable' - /** - * @enum {unknown} - */ - authorVerdicts: 'complete' | 'unknown' | 'unavailable' - /** - * @enum {unknown} - */ - identity: 'known' | 'unknown' - } - }, - { - index: number - inputPurl: string - canonicalPurl: string | null - /** - * @enum {unknown} - */ - status: 'unsupported' - reasonCodes: ( - | 'unsupported_ecosystem' - | 'unsupported_identity' - )[] - findings: unknown[] - /** - * @enum {unknown} - */ - findingsTruncated: '' - coverage: null - }, - { - index: number - inputPurl: string - canonicalPurl: string | null - /** - * @enum {unknown} - */ - status: 'error' - reasonCodes: ( - | 'invalid_purl' - | 'version_required' - | 'lookup_failed' - | 'deadline_exceeded' - )[] - findings: unknown[] - /** - * @enum {unknown} - */ - findingsTruncated: '' - coverage: null - }, - ] - >[] - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 404: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } - } - /** - * Default Response. - */ - 413: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } + } + responses: { + /** + * Default Response. + */ + 302: { + content: never + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': '' } - /** - * Default Response. - */ - 429: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } - } + } + /** + * Default Response. + */ + 403: { + content: { + 'application/json': '' } - /** - * Default Response. - */ - 503: { - content: { - 'application/json': { - statusCode: number - error: string - message: string - [key: string]: unknown - } + } + /** + * Default Response. + */ + 503: { + content: { + 'application/json': { + statusCode?: number + error: string + message?: string + error_description?: string + [key: string]: unknown } } } } } -} - -export type webhooks = Record - -export interface components { - schemas: {} - responses: never - parameters: never - requestBodies: never - headers: never - pathItems: never -} - -export type $defs = Record - -export type external = Record - -export interface operations { /** * Discover organization members and access restrictions. * @@ -3313,7 +1883,1735 @@ export interface operations { /** * Default Response. */ - 404: { + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 409: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 429: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + } + } + /** + * Reset to inherited member access. + * + * Requires access-policy:attach and current semantic organization-wide + * management authority. New commands require an enabled memberAccessLifecycle + * rollout, a matching current preview, and Idempotency-Key. State, logical + * audit, and receipt commit atomically. An authorized exact retry returns its + * historical receipt without changing current state, including while rollout + * is paused; refresh the member after replay. Reset can still result in + * denied access. Protected Owner/Admin memberships cannot be restricted or + * revoked. Legacy authority and rollback-open cohorts return 409. Generic + * custom-policy authoring is not required. + */ + resetMemberAccess: { + parameters: { + header: { + 'idempotency-key': string + } + path: { + org_slug: string + membership_id: string + } + } + requestBody: { + content: { + 'application/json': { + /** + * @enum {string} + */ + resource_kind: 'repository_access' | 'workspace_access' + selection?: { + /** + * @enum {string} + */ + scope: 'all' | 'selected' + repositoryIds?: string[] + workspaceIds?: string[] + } & OneOf< + [ + { + /** + * @enum {unknown} + */ + scope?: 'all' + }, + { + /** + * @enum {unknown} + */ + scope?: 'selected' + }, + ] + > + /** + * Format: uuid. + */ + preview_id: string + expected_revision: string + } + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + receiptId: string + /** + * @enum {string} + */ + operation: 'restrict' | 'reset' | 'revoke' + changed: boolean + replayed: boolean + state: { + organizationId: string + membershipId: string + /** + * @enum {string} + */ + resourceKind: 'repository_access' | 'workspace_access' + revision: string + configuration: { + ceiling: + | ({ + /** + * @enum {string} + */ + scope: 'all' | 'selected' + repositoryIds?: string[] + workspaceIds?: string[] + } & OneOf< + [ + { + /** + * @enum {unknown} + */ + scope?: 'all' + }, + { + /** + * @enum {unknown} + */ + scope?: 'selected' + }, + ] + >) + | null + revocations: + | ({ + /** + * @enum {string} + */ + scope: 'all' | 'selected' + repositoryIds?: string[] + workspaceIds?: string[] + } & OneOf< + [ + { + /** + * @enum {unknown} + */ + scope?: 'all' + }, + { + /** + * @enum {unknown} + */ + scope?: 'selected' + }, + ] + >) + | null + compatibilityRestricted: boolean + principalId: null | string + contributions: { + id: string + /** + * @enum {string} + */ + owner: 'legacy_repository_access' | 'native_repository_access' + repositoryId: null | string + workspaceId: null | string + scope: string + }[] + /** + * @enum {string} + */ + state: + | 'inherited' + | 'restricted' + | 'revoked' + | 'restricted_and_revoked' + | 'no_direct_grants' + } + organizationMode: { + repositoryManaged: boolean + workspaceManaged: boolean + } + effective: { + /** + * @enum {string} + */ + context: 'member_web_repository_list' + /** + * @enum {string} + */ + independentCredentials: 'unchanged' + allowedRepositoryIds: string[] + deniedRepositoryIds: string[] + decisions: { + repositoryId: string + allowed: boolean + reasonCodes: string[] + matchingPolicyIds: string[] + }[] + capabilityScopes: string[] + policies: { + id: string + /** + * @enum {string} + */ + kind: 'repository_access' | 'workspace_access' + /** + * @enum {string} + */ + owner: 'custom' | 'repository_access' + }[] + evaluatedAt: string + } + } + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 403: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 409: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 429: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + } + } + /** + * Revoke member access. + * + * Requires access-policy:attach and current semantic organization-wide + * management authority. New commands require an enabled memberAccessLifecycle + * rollout, a matching current preview, and Idempotency-Key. State, logical + * audit, and receipt commit atomically. An authorized exact retry returns its + * historical receipt without changing current state, including while rollout + * is paused; refresh the member after replay. Reset can still result in + * denied access. Protected Owner/Admin memberships cannot be restricted or + * revoked. Legacy authority and rollback-open cohorts return 409. Generic + * custom-policy authoring is not required. + */ + revokeMemberAccess: { + parameters: { + header: { + 'idempotency-key': string + } + path: { + org_slug: string + membership_id: string + } + } + requestBody: { + content: { + 'application/json': { + /** + * @enum {string} + */ + resource_kind: 'repository_access' | 'workspace_access' + selection?: { + /** + * @enum {string} + */ + scope: 'all' | 'selected' + repositoryIds?: string[] + workspaceIds?: string[] + } & OneOf< + [ + { + /** + * @enum {unknown} + */ + scope?: 'all' + }, + { + /** + * @enum {unknown} + */ + scope?: 'selected' + }, + ] + > + /** + * Format: uuid. + */ + preview_id: string + expected_revision: string + } + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + receiptId: string + /** + * @enum {string} + */ + operation: 'restrict' | 'reset' | 'revoke' + changed: boolean + replayed: boolean + state: { + organizationId: string + membershipId: string + /** + * @enum {string} + */ + resourceKind: 'repository_access' | 'workspace_access' + revision: string + configuration: { + ceiling: + | ({ + /** + * @enum {string} + */ + scope: 'all' | 'selected' + repositoryIds?: string[] + workspaceIds?: string[] + } & OneOf< + [ + { + /** + * @enum {unknown} + */ + scope?: 'all' + }, + { + /** + * @enum {unknown} + */ + scope?: 'selected' + }, + ] + >) + | null + revocations: + | ({ + /** + * @enum {string} + */ + scope: 'all' | 'selected' + repositoryIds?: string[] + workspaceIds?: string[] + } & OneOf< + [ + { + /** + * @enum {unknown} + */ + scope?: 'all' + }, + { + /** + * @enum {unknown} + */ + scope?: 'selected' + }, + ] + >) + | null + compatibilityRestricted: boolean + principalId: null | string + contributions: { + id: string + /** + * @enum {string} + */ + owner: 'legacy_repository_access' | 'native_repository_access' + repositoryId: null | string + workspaceId: null | string + scope: string + }[] + /** + * @enum {string} + */ + state: + | 'inherited' + | 'restricted' + | 'revoked' + | 'restricted_and_revoked' + | 'no_direct_grants' + } + organizationMode: { + repositoryManaged: boolean + workspaceManaged: boolean + } + effective: { + /** + * @enum {string} + */ + context: 'member_web_repository_list' + /** + * @enum {string} + */ + independentCredentials: 'unchanged' + allowedRepositoryIds: string[] + deniedRepositoryIds: string[] + decisions: { + repositoryId: string + allowed: boolean + reasonCodes: string[] + matchingPolicyIds: string[] + }[] + capabilityScopes: string[] + policies: { + id: string + /** + * @enum {string} + */ + kind: 'repository_access' | 'workspace_access' + /** + * @enum {string} + */ + owner: 'custom' | 'repository_access' + }[] + evaluatedAt: string + } + } + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 403: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 409: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 429: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + details?: { + code?: string + field: string + message: string + suggestion?: string + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + } + } + /** + * Post organization events. + * + * Send events directly to Socket. + * + * Authentication: Organization API token only. + * Required token scopes: * + */ + createV1OrgEvents: { + parameters: { + path: { + /** + * Organization slug. + */ + org_slug: string + } + } + /** + * Array of event payloads. + */ + requestBody: { + content: { + 'application/json': { + action?: string + alert_action?: string + alert_count?: number + api_error?: string + artifact_purl?: string + block_reason?: string + block_source?: string + blocked_alert_count?: number + cached?: boolean + client_action?: string + client_ip?: string + decision?: string + event_category?: string + event_id?: string + event_kind?: string + event_sender_created_at?: string + event_type?: string + ignore_reason?: string + input_purl?: string + machine_id?: string + monitor_reason?: string + parser_name?: string + parser_version?: string + private_registry_request_id?: string + purlCheckLatencyMs?: number + purl_check_latency_ms?: number + registryFqdn?: string + repo?: string + request_id?: string + response_code?: number + socket_api_response_code?: number + socket_client_version?: string + source_path?: string + stale?: boolean + trace_id?: string + upstream_host?: string + upstream_path?: string + upstream_status?: number + user_agent?: string + versions?: { + [key: string]: string + } + warn_reason?: string + [key: string]: unknown + }[] + } + } + responses: { + /** + * Events ingestion metadata. + */ + 200: { + content: { + 'application/json': { + [key: string]: unknown + } + } + } + /** + * Events ingestion metadata. + */ + 201: { + content: { + 'application/json': { + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 403: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 413: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 500: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + } + } + /** + * Evaluate package versions against organization policy. + * + * Evaluates cached facts for published, explicitly versioned public npm and + * PyPI packages against the organization default policy. This endpoint does + * not start scans. + */ + checkV1OrgPackages: { + parameters: { + path: { + org_slug: string + } + } + requestBody: { + content: { + 'application/json': { + packages: { + purl: string + }[] + } + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + context: { + /** + * @enum {unknown} + */ + mode: 'organization' + organizationSlug: string + /** + * @enum {unknown} + */ + policyScope: 'organization-default' + policyRevision: number + [key: string]: unknown + } + results: { + index: number + inputPurl: string + resolvedPurls: string[] + /** + * @enum {unknown} + */ + status: + | 'complete' + | 'pending' + | 'unknown' + | 'unsupported' + | 'error' + /** + * @enum {unknown} + */ + action: 'block' | 'warn' | 'monitor' | 'allow' | 'indeterminate' + reasons: { + /** + * @enum {unknown} + */ + code: + | 'invalid_purl' + | 'version_required' + | 'unsupported_ecosystem' + | 'unsupported_identity' + | 'metadata_unavailable' + | 'analysis_pending' + | 'analysis_stale' + | 'artifact_limit' + | 'result_limit' + | 'deadline_exceeded' + | 'lookup_failed' + | 'policy_action_unavailable' + | 'policy_block' + | 'policy_warn' + | 'policy_monitor' + alertKey?: string + alertType?: string + artifactPurls?: string[] + [key: string]: unknown + }[] + coverage: { + /** + * @enum {unknown} + */ + scope: 'published-artifacts' + complete: boolean + artifactCount: number + evaluatedArtifactCount: number + /** + * @enum {null|string} + */ + reason: + | 'metadata_unavailable' + | 'analysis_incomplete' + | 'artifact_limit' + | 'result_limit' + | 'deadline_exceeded' + | 'lookup_failed' + | null + [key: string]: unknown + } + freshness: { + /** + * Format: date-time. + */ + evaluatedAt: string + analysisAt: null + /** + * @enum {unknown} + */ + source: 'artifact-state' + /** + * @enum {unknown} + */ + state: 'current' | 'stale' | 'unknown' + [key: string]: unknown + } + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 403: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 413: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 429: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 503: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + } + } + /** + * Summarize package intelligence and findings. + * + * Returns organization-default policy decisions, per-artifact scores, + * findings, and detail links for cached published public npm and PyPI + * artifacts. This endpoint does not start scans. + */ + getV1OrgPackageSummaries: { + parameters: { + path: { + org_slug: string + } + } + requestBody: { + content: { + 'application/json': { + packages: { + purl: string + }[] + } + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + context: { + /** + * @enum {unknown} + */ + mode: 'organization' + organizationSlug: string + /** + * @enum {unknown} + */ + policyScope: 'organization-default' + policyRevision: number + [key: string]: unknown + } + results: { + index: number + inputPurl: string + resolvedPurls: string[] + /** + * @enum {unknown} + */ + status: + | 'complete' + | 'pending' + | 'unknown' + | 'unsupported' + | 'error' + /** + * @enum {unknown} + */ + action: 'block' | 'warn' | 'monitor' | 'allow' | 'indeterminate' + reasons: { + /** + * @enum {unknown} + */ + code: + | 'invalid_purl' + | 'version_required' + | 'unsupported_ecosystem' + | 'unsupported_identity' + | 'metadata_unavailable' + | 'analysis_pending' + | 'analysis_stale' + | 'artifact_limit' + | 'result_limit' + | 'deadline_exceeded' + | 'lookup_failed' + | 'policy_action_unavailable' + | 'policy_block' + | 'policy_warn' + | 'policy_monitor' + alertKey?: string + alertType?: string + artifactPurls?: string[] + [key: string]: unknown + }[] + coverage: { + /** + * @enum {unknown} + */ + scope: 'published-artifacts' + complete: boolean + artifactCount: number + evaluatedArtifactCount: number + /** + * @enum {null|string} + */ + reason: + | 'metadata_unavailable' + | 'analysis_incomplete' + | 'artifact_limit' + | 'result_limit' + | 'deadline_exceeded' + | 'lookup_failed' + | null + [key: string]: unknown + } + freshness: { + /** + * Format: date-time. + */ + evaluatedAt: string + analysisAt: null + /** + * @enum {unknown} + */ + source: 'artifact-state' + /** + * @enum {unknown} + */ + state: 'current' | 'stale' | 'unknown' + [key: string]: unknown + } + artifacts: { + reference: string + purl: string + /** + * @enum {unknown} + */ + state: + | 'complete' + | 'pending' + | 'revalidate' + | 'error' + | 'unknown' + scores: null | { + supplyChain: number + quality: number + maintenance: number + vulnerability: number + license: number + overall: number + [key: string]: unknown + } + alerts: { + key: string + type: string + /** + * @enum {null|string} + */ + action: 'error' | 'warn' | 'monitor' | 'ignore' | null + [key: string]: unknown + }[] + /** + * Format: uri. + */ + detailUrl: string + [key: string]: unknown + }[] + alerts: { + key: string + type: string + /** + * @enum {null|string} + */ + action: 'error' | 'warn' | 'monitor' | 'ignore' | null + artifactPurls: string[] + [key: string]: unknown + }[] + [key: string]: unknown + }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 403: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 413: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 429: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 503: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + } + } + /** + * List published versions for a package by PURL. + * + * Given a package URL (PURL) *without* a version, returns every version + * Socket knows about for that package along with its publish date, sorted + * newest-first by publish date. + * + * This lets you enforce version policies such as "N-1" (allow the previous + * release, block the newest) without querying a package registry directly. + * Versions with no known publish date are listed last. + * + * **Ordering includes prereleases.** Sorting is by publish date only, so + * index 0 is the most recently *published* version, not necessarily the + * newest stable release. On npm in particular the newest publishes are + * often canaries or release candidates, so a consumer that reads index 1 + * as "N-1" can land on a prerelease. Each entry carries a `prerelease` + * flag for this: filter out entries where `prerelease` is `true` before + * applying an N-1 rule. `prerelease` is `null` when the ecosystem's + * version grammar has no canonical prerelease parser, or when the version + * string itself does not parse — treat null according to your own policy + * rather than as an error. + * + * Pass `limit` to cap how many entries come back; it is applied after + * sorting, so `limit=2` is all the N-1 use case needs. A `limit` that + * is not a positive integer is rejected with a 400 rather than clamped. + * + * The PURL must be percent-encoded as a single path segment + * (`encodeURIComponent`); an unencoded `/` will not match this route. + * Any version on the PURL is ignored — the full history always comes back. + * The HuggingFace `type` qualifier (model, dataset, or space) is honored. + * + * A well-formed PURL for an ecosystem that does not support version + * listing returns a 400 rather than a server error. + * + * Authentication: Organization API token, OAuth2, or NextAuth session. + * Required token scope: `packages:list`. Costs 100 quota units. + */ + getV1OrgPurlVersions: { + parameters: { + query?: { + /** + * Maximum number of version entries to return, applied after sorting. + * Omit for the full history. + */ + limit?: number + } + path: { + /** + * Organization slug. + */ + org_slug: string + /** + * Package URL, percent-encoded as a single path segment. Example: + * pkg%3Anpm%2F%40babel%2Fcore. + */ + purl: string + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + /** + * The PURL as received, echoed back. + */ + purl: string + /** + * Known versions, newest-first by publish date. Ordering includes + * prereleases, so index 0 is the most recent publish rather than + * the newest stable release. + */ + versions: { + /** + * The version string as the ecosystem reports it. + */ + version: string + /** + * ISO-8601 publish date, or null when the ecosystem reports + * none. Undated versions are listed last. + */ + publishedAt: null | string + /** + * True when this version is a prerelease (canary, release + * candidate, dev, beta) according to the ecosystem's own + * version grammar. Null means unknown — either the ecosystem + * has no canonical prerelease parser, or this version string + * does not parse. Null is not an error. + */ + prerelease: null | boolean + }[] + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 403: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + /** + * @enum {string} + */ + code?: 'missing_scope' | 'missing_capability' + requiredScopes?: string[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 429: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + } + } + /** + * List threat campaigns. + * + * Returns a paginated list of supply chain attack campaigns. Supports + * filtering by status, ecosystem, and an incremental sync parameter + * (`updated_after`). + * + * Package PURLs are not inlined on the campaign object — they are their own + * paginated resource. Fetch them per campaign from + * `/threat-campaigns/:campaign_id/packages`. + * + * Authentication: Organization API token, OAuth2, or NextAuth session. + * Required token scope: `threat-campaigns:list`. + * + * This endpoint requires an Enterprise Plan with the Threat Feed add-on. + */ + listV1OrgThreatCampaigns: { + parameters: { + query?: { + /** + * Filter by campaign status. Defaults to ongoing. + */ + status?: 'ongoing' | 'past' + /** + * Filter by ecosystem (e.g. npm, pypi, maven). + */ + ecosystem?: string + /** + * Unix timestamp in seconds. Only return campaigns updated after this + * time. Omit to return all matching campaigns. + */ + updated_after?: string + /** + * Number of campaigns per page. Default 30, max 100. + */ + per_page?: number + /** + * Opaque cursor for pagination. Use the endCursor value from the + * previous response. + */ + cursor?: string + } + path: { + /** + * Organization slug. + */ + org_slug: string + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + items: { + id: string + name: string + description: string + /** + * @enum {string} + */ + status: 'ongoing' | 'past' + ecosystem: null | string[] + firstDiscovered: null | string + lastActivity: null | string + blogUrls: string[] + /** + * Number of threat feed entries linked to this campaign. + */ + linkedThreatCount: number + /** + * Number of distinct package artifacts linked to this campaign. + */ + linkedPackageArtifactsCount: number + /** + * URL of the public campaign page on socket.dev, or null if the + * campaign has no public page. + */ + htmlUrl: null | string + /** + * Format: date-time. + */ + createdAt: string + /** + * Format: date-time. + */ + updatedAt: string + [key: string]: unknown + }[] + endCursor?: null | string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 401: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 403: { content: { 'application/json': { statusCode: number @@ -3324,13 +3622,6 @@ export interface operations { */ code?: 'missing_scope' | 'missing_capability' requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3338,24 +3629,12 @@ export interface operations { /** * Default Response. */ - 409: { + 404: { content: { 'application/json': { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3369,18 +3648,6 @@ export interface operations { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3388,64 +3655,31 @@ export interface operations { } } /** - * Reset to inherited member access. + * Get a threat campaign. * - * Requires access-policy:attach and current semantic organization-wide - * management authority. New commands require an enabled memberAccessLifecycle - * rollout, a matching current preview, and Idempotency-Key. State, logical - * audit, and receipt commit atomically. An authorized exact retry returns its - * historical receipt without changing current state, including while rollout - * is paused; refresh the member after replay. Reset can still result in - * denied access. Protected Owner/Admin memberships cannot be restricted or - * revoked. Legacy authority and rollback-open cohorts return 409. Generic - * custom-policy authoring is not required. + * Returns a single supply chain attack campaign by ID. Same shape as one item + * from the campaigns list; package PURLs are not inlined — fetch them from + * the paginated `/threat-campaigns/:campaign_id/packages` resource instead. + * + * Useful for filling in cached campaign metadata client-side when crawling + * the campaigns list or packages feed. + * + * Authentication: Organization API token, OAuth2, or NextAuth session. + * Required token scope: `threat-campaigns:list`. + * + * This endpoint requires an Enterprise Plan with the Threat Feed add-on. */ - resetMemberAccess: { + getV1OrgThreatCampaign: { parameters: { - header: { - 'idempotency-key': string - } path: { + /** + * Organization slug. + */ org_slug: string - membership_id: string - } - } - requestBody: { - content: { - 'application/json': { - /** - * @enum {string} - */ - resource_kind: 'repository_access' | 'workspace_access' - selection?: { - /** - * @enum {string} - */ - scope: 'all' | 'selected' - repositoryIds?: string[] - workspaceIds?: string[] - } & OneOf< - [ - { - /** - * @enum {unknown} - */ - scope?: 'all' - }, - { - /** - * @enum {unknown} - */ - scope?: 'selected' - }, - ] - > - /** - * Format: uuid. - */ - preview_id: string - expected_revision: string - } + /** + * Campaign ID. + */ + campaign_id: string } } responses: { @@ -3455,154 +3689,38 @@ export interface operations { 200: { content: { 'application/json': { - receiptId: string + id: string + name: string + description: string /** * @enum {string} */ - operation: 'restrict' | 'reset' | 'revoke' - changed: boolean - replayed: boolean - state: { - organizationId: string - membershipId: string - /** - * @enum {string} - */ - resourceKind: 'repository_access' | 'workspace_access' - revision: string - configuration: { - ceiling: - | ({ - /** - * @enum {string} - */ - scope: 'all' | 'selected' - repositoryIds?: string[] - workspaceIds?: string[] - } & OneOf< - [ - { - /** - * @enum {unknown} - */ - scope?: 'all' - }, - { - /** - * @enum {unknown} - */ - scope?: 'selected' - }, - ] - >) - | null - revocations: - | ({ - /** - * @enum {string} - */ - scope: 'all' | 'selected' - repositoryIds?: string[] - workspaceIds?: string[] - } & OneOf< - [ - { - /** - * @enum {unknown} - */ - scope?: 'all' - }, - { - /** - * @enum {unknown} - */ - scope?: 'selected' - }, - ] - >) - | null - compatibilityRestricted: boolean - principalId: null | string - contributions: { - id: string - /** - * @enum {string} - */ - owner: 'legacy_repository_access' | 'native_repository_access' - repositoryId: null | string - workspaceId: null | string - scope: string - }[] - /** - * @enum {string} - */ - state: - | 'inherited' - | 'restricted' - | 'revoked' - | 'restricted_and_revoked' - | 'no_direct_grants' - } - organizationMode: { - repositoryManaged: boolean - workspaceManaged: boolean - } - effective: { - /** - * @enum {string} - */ - context: 'member_web_repository_list' - /** - * @enum {string} - */ - independentCredentials: 'unchanged' - allowedRepositoryIds: string[] - deniedRepositoryIds: string[] - decisions: { - repositoryId: string - allowed: boolean - reasonCodes: string[] - matchingPolicyIds: string[] - }[] - capabilityScopes: string[] - policies: { - id: string - /** - * @enum {string} - */ - kind: 'repository_access' | 'workspace_access' - /** - * @enum {string} - */ - owner: 'custom' | 'repository_access' - }[] - evaluatedAt: string - } - } - } - } - } - /** - * Default Response. - */ - 400: { - content: { - 'application/json': { - statusCode: number - error: string - message: string + status: 'ongoing' | 'past' + ecosystem: null | string[] + firstDiscovered: null | string + lastActivity: null | string + blogUrls: string[] /** - * @enum {string} + * Number of threat feed entries linked to this campaign. */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] + linkedThreatCount: number + /** + * Number of distinct package artifacts linked to this campaign. + */ + linkedPackageArtifactsCount: number + /** + * URL of the public campaign page on socket.dev, or null if the + * campaign has no public page. + */ + htmlUrl: null | string + /** + * Format: date-time. + */ + createdAt: string + /** + * Format: date-time. + */ + updatedAt: string [key: string]: unknown } } @@ -3610,24 +3728,12 @@ export interface operations { /** * Default Response. */ - 401: { + 400: { content: { 'application/json': { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3635,24 +3741,12 @@ export interface operations { /** * Default Response. */ - 403: { + 401: { content: { 'application/json': { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3660,7 +3754,7 @@ export interface operations { /** * Default Response. */ - 404: { + 403: { content: { 'application/json': { statusCode: number @@ -3671,13 +3765,6 @@ export interface operations { */ code?: 'missing_scope' | 'missing_capability' requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3685,24 +3772,12 @@ export interface operations { /** * Default Response. */ - 409: { + 404: { content: { 'application/json': { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3716,18 +3791,6 @@ export interface operations { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3735,197 +3798,59 @@ export interface operations { } } /** - * Revoke member access. + * List packages for a threat campaign. * - * Requires access-policy:attach and current semantic organization-wide - * management authority. New commands require an enabled memberAccessLifecycle - * rollout, a matching current preview, and Idempotency-Key. State, logical - * audit, and receipt commit atomically. An authorized exact retry returns its - * historical receipt without changing current state, including while rollout - * is paused; refresh the member after replay. Reset can still result in - * denied access. Protected Owner/Admin memberships cannot be restricted or - * revoked. Legacy authority and rollback-open cohorts return 409. Generic - * custom-policy authoring is not required. + * Returns a cursor-paginated list of package PURLs affected by a single + * supply chain attack campaign. This is the primary way to retrieve all + * packages for a known campaign without an inline, unbounded list on the + * campaign object. + * + * Pagination follows the same `{ items, endCursor }` envelope as the + * campaigns list. Pass the `endCursor` value back as `cursor` to fetch the + * next page. + * + * Authentication: Organization API token, OAuth2, or NextAuth session. + * Required token scope: `threat-campaigns:list`. + * + * This endpoint requires an Enterprise Plan with the Threat Feed add-on. */ - revokeMemberAccess: { + listV1OrgThreatCampaignPackages: { parameters: { - header: { - 'idempotency-key': string + query?: { + /** + * Number of packages per page. Default 100, max 1000. + */ + per_page?: number + /** + * Opaque cursor for pagination. Use the endCursor value from the + * previous response. + */ + cursor?: string } path: { + /** + * Organization slug. + */ org_slug: string - membership_id: string - } - } - requestBody: { - content: { - 'application/json': { - /** - * @enum {string} - */ - resource_kind: 'repository_access' | 'workspace_access' - selection?: { - /** - * @enum {string} - */ - scope: 'all' | 'selected' - repositoryIds?: string[] - workspaceIds?: string[] - } & OneOf< - [ - { - /** - * @enum {unknown} - */ - scope?: 'all' - }, - { - /** - * @enum {unknown} - */ - scope?: 'selected' - }, - ] - > - /** - * Format: uuid. - */ - preview_id: string - expected_revision: string - } + /** + * Campaign ID. + */ + campaign_id: string } } responses: { - /** - * Default Response. - */ - 200: { - content: { - 'application/json': { - receiptId: string - /** - * @enum {string} - */ - operation: 'restrict' | 'reset' | 'revoke' - changed: boolean - replayed: boolean - state: { - organizationId: string - membershipId: string - /** - * @enum {string} - */ - resourceKind: 'repository_access' | 'workspace_access' - revision: string - configuration: { - ceiling: - | ({ - /** - * @enum {string} - */ - scope: 'all' | 'selected' - repositoryIds?: string[] - workspaceIds?: string[] - } & OneOf< - [ - { - /** - * @enum {unknown} - */ - scope?: 'all' - }, - { - /** - * @enum {unknown} - */ - scope?: 'selected' - }, - ] - >) - | null - revocations: - | ({ - /** - * @enum {string} - */ - scope: 'all' | 'selected' - repositoryIds?: string[] - workspaceIds?: string[] - } & OneOf< - [ - { - /** - * @enum {unknown} - */ - scope?: 'all' - }, - { - /** - * @enum {unknown} - */ - scope?: 'selected' - }, - ] - >) - | null - compatibilityRestricted: boolean - principalId: null | string - contributions: { - id: string - /** - * @enum {string} - */ - owner: 'legacy_repository_access' | 'native_repository_access' - repositoryId: null | string - workspaceId: null | string - scope: string - }[] - /** - * @enum {string} - */ - state: - | 'inherited' - | 'restricted' - | 'revoked' - | 'restricted_and_revoked' - | 'no_direct_grants' - } - organizationMode: { - repositoryManaged: boolean - workspaceManaged: boolean - } - effective: { - /** - * @enum {string} - */ - context: 'member_web_repository_list' - /** - * @enum {string} - */ - independentCredentials: 'unchanged' - allowedRepositoryIds: string[] - deniedRepositoryIds: string[] - decisions: { - repositoryId: string - allowed: boolean - reasonCodes: string[] - matchingPolicyIds: string[] - }[] - capabilityScopes: string[] - policies: { - id: string - /** - * @enum {string} - */ - kind: 'repository_access' | 'workspace_access' - /** - * @enum {string} - */ - owner: 'custom' | 'repository_access' - }[] - evaluatedAt: string - } - } + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + /** + * Package PURLs associated with this campaign. + */ + items: string[] + endCursor?: null | string + [key: string]: unknown } } } @@ -3938,18 +3863,6 @@ export interface operations { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3963,18 +3876,6 @@ export interface operations { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -3993,13 +3894,6 @@ export interface operations { */ code?: 'missing_scope' | 'missing_capability' requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -4013,18 +3907,6 @@ export interface operations { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -4032,24 +3914,277 @@ export interface operations { /** * Default Response. */ - 409: { + 429: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + } + } + /** + * Check public npm packages for known malware. + * + * Returns bounded public malware observations for exact npm releases. Results + * are for this request only and are not cached. + */ + checkV1Malware: { + requestBody: { + content: { + 'application/json': { + packages: { + purl: string + }[] + candidateRevision?: string + } + } + } + responses: { + /** + * Default Response. + */ + 200: { + content: { + 'application/json': { + context: { + /** + * @enum {unknown} + */ + mode: 'public-malware' + /** + * @enum {unknown} + */ + evaluatorVersion: 'public-malware-v1' + /** + * @enum {unknown} + */ + consistency: 'request-observation' + intelligenceRevision: null + /** + * Format: date-time. + */ + observedAt: string + /** + * @enum {unknown} + */ + reuse: 'none' + expiresAt: null + sourceAsOf: null + } + results: OneOf< + [ + { + index: number + inputPurl: string + canonicalPurl: string | null + /** + * @enum {unknown} + */ + status: 'confirmed_malware' + reasonCodes: unknown[] + findings: { + /** + * @enum {unknown} + */ + scope: 'version' | 'package' | 'author' + /** + * @enum {unknown} + */ + code: + | 'reviewed_malware' + | 'package_bad_intent' + | 'author_bad_intent' + /** + * Format: uri. + */ + url: string + }[] + findingsTruncated: boolean + coverage: { + /** + * @enum {unknown} + */ + registry: 'https://registry.npmjs.org' + /** + * @enum {unknown} + */ + reviewedThreats: 'complete' | 'unavailable' + /** + * @enum {unknown} + */ + packageVerdicts: 'complete' | 'unavailable' + /** + * @enum {unknown} + */ + authorVerdicts: 'complete' | 'unknown' | 'unavailable' + /** + * @enum {unknown} + */ + identity: 'known' | 'unknown' + } + }, + { + index: number + inputPurl: string + canonicalPurl: string | null + /** + * @enum {unknown} + */ + status: 'no_known_malware' + reasonCodes: unknown[] + findings: unknown[] + /** + * @enum {unknown} + */ + findingsTruncated: '' + coverage: { + /** + * @enum {unknown} + */ + registry: 'https://registry.npmjs.org' + /** + * @enum {unknown} + */ + reviewedThreats: 'complete' + /** + * @enum {unknown} + */ + packageVerdicts: 'complete' + /** + * @enum {unknown} + */ + authorVerdicts: 'complete' + /** + * @enum {unknown} + */ + identity: 'known' + } + }, + { + index: number + inputPurl: string + canonicalPurl: string | null + /** + * @enum {unknown} + */ + status: 'unknown' + reasonCodes: ( + | 'identity_not_observed' + | 'author_evidence_missing' + | 'coverage_incomplete' + )[] + findings: unknown[] + /** + * @enum {unknown} + */ + findingsTruncated: '' + coverage: { + /** + * @enum {unknown} + */ + registry: 'https://registry.npmjs.org' + /** + * @enum {unknown} + */ + reviewedThreats: 'complete' | 'unavailable' + /** + * @enum {unknown} + */ + packageVerdicts: 'complete' | 'unavailable' + /** + * @enum {unknown} + */ + authorVerdicts: 'complete' | 'unknown' | 'unavailable' + /** + * @enum {unknown} + */ + identity: 'known' | 'unknown' + } + }, + { + index: number + inputPurl: string + canonicalPurl: string | null + /** + * @enum {unknown} + */ + status: 'unsupported' + reasonCodes: ( + | 'unsupported_ecosystem' + | 'unsupported_identity' + )[] + findings: unknown[] + /** + * @enum {unknown} + */ + findingsTruncated: '' + coverage: null + }, + { + index: number + inputPurl: string + canonicalPurl: string | null + /** + * @enum {unknown} + */ + status: 'error' + reasonCodes: ( + | 'invalid_purl' + | 'version_required' + | 'lookup_failed' + | 'deadline_exceeded' + )[] + findings: unknown[] + /** + * @enum {unknown} + */ + findingsTruncated: '' + coverage: null + }, + ] + >[] + } + } + } + /** + * Default Response. + */ + 400: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 404: { + content: { + 'application/json': { + statusCode: number + error: string + message: string + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 413: { content: { 'application/json': { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] [key: string]: unknown } } @@ -4063,18 +4198,19 @@ export interface operations { statusCode: number error: string message: string - /** - * @enum {string} - */ - code?: 'missing_scope' | 'missing_capability' - requiredScopes?: string[] - details?: { - code?: string - field: string - message: string - suggestion?: string - [key: string]: unknown - }[] + [key: string]: unknown + } + } + } + /** + * Default Response. + */ + 503: { + content: { + 'application/json': { + statusCode: number + error: string + message: string [key: string]: unknown } } diff --git a/types/api.d.ts b/types/api.d.ts index e2038a81..c6e9f457 100644 --- a/types/api.d.ts +++ b/types/api.d.ts @@ -98,7 +98,7 @@ export interface paths { * * This endpoint requires the following org token scopes: * - * - No Scopes Required, but authentication is required + * - Dependencies:list */ post: operations['searchDependencies'] } @@ -765,8 +765,10 @@ export interface paths { /** * Update API Token. * - * Update an API Token. The API Token created must use a subset of - * permissions the API token creating them. + * Update an API token. The caller must have all requested scopes. Set + * repository access when creating the token. Omit `resources` when updating + * other settings. Including the field, even as an empty array or null, + * rejects the entire update with HTTP 400. * * This endpoint consumes 10 units of your quota. * @@ -849,6 +851,12 @@ export interface paths { * other purlError stays: a timed-out input remains a `retryable` purlError, * so "no record" and "no answer" stay distinguishable. * + * Inputs whose purl type is a valid spec type that Socket does not yet + * support (for example `pkg:hex`, `pkg:deb` or `pkg:docker`) are not looked + * up. With `purlErrors=true` each returns a `purlError` naming the + * unsupported type, and `summary=true` counts them in + * `errors.purl_ecosystem_unsupported`. + * * Use `poll=false` (default) to fail open and return the current known * state quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` * for pending analysis before returning. @@ -968,6 +976,12 @@ export interface paths { * other purlError stays: a timed-out input remains a `retryable` purlError, * so "no record" and "no answer" stay distinguishable. * + * Inputs whose purl type is a valid spec type that Socket does not yet + * support (for example `pkg:hex`, `pkg:deb` or `pkg:docker`) are not looked + * up. With `purlErrors=true` each returns a `purlError` naming the + * unsupported type, and `summary=true` counts them in + * `errors.purl_ecosystem_unsupported`. + * * Use `poll=false` (default) to fail open and return the current known * state quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` * for pending analysis before returning. @@ -1555,9 +1569,13 @@ export interface paths { * * Stream all SBOM artifacts for a full scan. * - * This endpoint returns the latest, available alert data for artifacts in - * the full scan (stale while revalidate). Actively running analysis will be - * returned when available on subsequent runs. + * Every read returns a snapshot of the result from when the scan was built. + * Alerts and policy decisions are not recomputed on read. If the result is + * not built yet, the request waits for it, returning 202 if the build does + * not finish in time. To get an updated build with the current alerts, + * create a new scan with: POST + * /orgs/{org_slug}/full-scans/{full_scan_id}/rescan?mode=deep and read that + * scan. * * A vulnerability alert reports two statuses of its own: * @@ -8314,6 +8332,10 @@ export interface components { * @default 0 */ purl_malformed: number + /** + * @default 0 + */ + purl_ecosystem_unsupported: number /** * @default 0 */ @@ -8644,6 +8666,15 @@ export interface components { * @default */ action?: string + /** + * Action this alert keeps when a pull or merge request comment ignores + * its package (error, warn or monitor). Set on GET diff-scans/{id}, GET + * full-scans/diff and GET full-scans/{id}; absent when the ignore removes + * the alert. + * + * @default + */ + actionAfterPullRequestIgnore?: string actionSource?: { /** * Type of action source (e.g., policy, override) @@ -11054,7 +11085,8 @@ export interface operations { * Format: uuid. * * The stable group UUID that remains constant across token - * rotations. + * rotations. OAuth tokens in one refresh family may share this + * UUID; use id or hash to identify one token. * * @default */ @@ -11577,7 +11609,7 @@ export interface operations { * * This endpoint requires the following org token scopes: * - * - No Scopes Required, but authentication is required + * - Dependencies:list */ searchDependencies: { requestBody?: { @@ -15452,8 +15484,9 @@ export interface operations { } } /** - * The API token identifier to revoke. Provide uuid (recommended), id, - * token, or hash. May provide uuid+hash together for validation. + * The API token identifier to revoke. Provide id, token, hash, or an + * unambiguous uuid. Use uuid+hash to select one token within a shared + * group. */ requestBody?: { content: { @@ -15527,8 +15560,9 @@ export interface operations { } } /** - * The API Token identifier to rotate. Provide uuid (recommended), id, - * token, or hash. May provide uuid+hash together for validation. + * The API Token identifier to rotate. Provide id, token, hash, or an + * unambiguous uuid. Use uuid+hash to select one token within a shared + * group. */ requestBody?: { content: { @@ -15658,8 +15692,10 @@ export interface operations { /** * Update API Token. * - * Update an API Token. The API Token created must use a subset of permissions - * the API token creating them. + * Update an API token. The caller must have all requested scopes. Set + * repository access when creating the token. Omit `resources` when updating + * other settings. Including the field, even as an empty array or null, + * rejects the entire update with HTTP 400. * * This endpoint consumes 10 units of your quota. * @@ -15855,8 +15891,8 @@ export interface operations { /** * Format: uuid. * - * The stable group UUID to update (provide uuid, id, token, or hash. - * May provide uuid+hash together for validation) + * The stable group UUID to update. Shared groups require a matching + * hash; id, token, or hash alone also identify one token. * * @default */ @@ -15899,6 +15935,7 @@ export interface operations { } } } + 400: components['responses']['SocketBadRequest'] 401: components['responses']['SocketUnauthorized'] 403: components['responses']['SocketForbidden'] 404: components['responses']['SocketNotFoundResponse'] @@ -16075,6 +16112,12 @@ export interface operations { * other purlError stays: a timed-out input remains a `retryable` purlError, * so "no record" and "no answer" stay distinguishable. * + * Inputs whose purl type is a valid spec type that Socket does not yet + * support (for example `pkg:hex`, `pkg:deb` or `pkg:docker`) are not looked + * up. With `purlErrors=true` each returns a `purlError` naming the + * unsupported type, and `summary=true` counts them in + * `errors.purl_ecosystem_unsupported`. + * * Use `poll=false` (default) to fail open and return the current known state * quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for * pending analysis before returning. @@ -16295,6 +16338,12 @@ export interface operations { * other purlError stays: a timed-out input remains a `retryable` purlError, * so "no record" and "no answer" stay distinguishable. * + * Inputs whose purl type is a valid spec type that Socket does not yet + * support (for example `pkg:hex`, `pkg:deb` or `pkg:docker`) are not looked + * up. With `purlErrors=true` each returns a `purlError` naming the + * unsupported type, and `summary=true` counts them in + * `errors.purl_ecosystem_unsupported`. + * * Use `poll=false` (default) to fail open and return the current known state * quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for * pending analysis before returning. @@ -21687,6 +21736,19 @@ export interface operations { * The difference between the two Full Scans in the diff scan. */ 200: { + headers: { + /** + * Set to 1 when the response is served from the stored result. Only + * sent with cached or if_cached. + */ + 'X-Socket-Immutable-Scan-Cached'?: '1' + /** + * When the stored result was built, as an ISO 8601 timestamp. Only + * sent with cached or if_cached, and absent when the build time is + * unknown. + */ + 'X-Socket-Scanned-At'?: string + } content: { 'application/json': { diff_scan: { @@ -21985,9 +22047,13 @@ export interface operations { * * Stream all SBOM artifacts for a full scan. * - * This endpoint returns the latest, available alert data for artifacts in the - * full scan (stale while revalidate). Actively running analysis will be - * returned when available on subsequent runs. + * Every read returns a snapshot of the result from when the scan was built. + * Alerts and policy decisions are not recomputed on read. If the result is + * not built yet, the request waits for it, returning 202 if the build does + * not finish in time. To get an updated build with the current alerts, create + * a new scan with: POST + * /orgs/{org_slug}/full-scans/{full_scan_id}/rescan?mode=deep and read that + * scan. * * A vulnerability alert reports two statuses of its own: * @@ -22006,7 +22072,7 @@ export interface operations { */ getOrgFullScan: { parameters: { - query: { + query?: { /** * Control which alert priority fields to include in the response. Set * to "true" to include all fields, "false" to exclude all fields, or @@ -22018,7 +22084,7 @@ export interface operations { * Include scores event in the response. include_scores_details implies * this flag. */ - include_scores: boolean + include_scores?: boolean /** * Control which score detail fields to include in the scores event. Set * to "true" to include all fields, "false" to exclude all fields, or @@ -22030,16 +22096,15 @@ export interface operations { * Include license details in the response. This can increase the * response size significantly. */ - include_license_details: boolean + include_license_details?: boolean /** - * Return cached immutable scan results. When enabled and results are - * cached, returns the pre-computed scan. When results are not yet - * cached, returns 202 Accepted and enqueues a background job. + * Return the cached immutable scan results when they exist, otherwise + * return 202 Accepted and enqueue a background job. */ cached?: boolean /** - * Return the cached immutable scan results when they exist, otherwise 404. - * Never enqueues a scan job. Implies cached. + * Return the cached immutable scan results when they exist, otherwise + * return 404 Not Found. Never enqueues a scan job. Implies cached. */ if_cached?: boolean } @@ -22056,10 +22121,23 @@ export interface operations { } responses: { /** - * Socket issue lists and scores for all packages, followed by a final - * scores event. + * Socket issue lists for all packages. With include_scores or + * include_scores_details, a scores event is always the last line, except + * for results stored before 2026-03-25 (see X-Socket-Scanned-At), which + * have none. Without said flags there is no scores event. */ 200: { + headers: { + /** + * Set to 1 when the response is served from the stored result. + */ + 'X-Socket-Immutable-Scan-Cached': '1' + /** + * When the stored result was built, as an ISO 8601 timestamp. Absent + * when the build time is unknown. + */ + 'X-Socket-Scanned-At'?: string + } content: { 'application/x-ndjson': | components['schemas']['SocketScanArtifact'] @@ -26651,6 +26729,26 @@ export interface operations { * @default false */ incomplete: boolean + /** + * Counts of the new alerts the alerts comment reports, by action. + * Null when incomplete is true, because alerts are not computed + * from an imbalanced diff. + */ + alert_counts: { + /** + * Number of new alerts with the Block action. + * + * @default 0 + */ + blocking: number + /** + * Number of new alerts with the Warn action. + * + * @default 0 + */ + warning: number + [key: string]: unknown + } | null /** * The platform the comments were rendered for. * @@ -29607,6 +29705,29 @@ export interface operations { 401: components['responses']['SocketUnauthorized'] 403: components['responses']['SocketForbidden'] 404: components['responses']['SocketNotFoundResponse'] + /** + * This socket-cli version cannot apply this organization's Policies. + */ + 409: { + content: { + 'application/json': { + error: { + /** + * @default + */ + message: string + /** + * @default null + */ + details: { + [key: string]: unknown + } | null + [key: string]: unknown + } + [key: string]: unknown + } + } + } 429: components['responses']['SocketTooManyRequestsResponse'] } } @@ -33556,10 +33677,10 @@ export interface operations { | 'AdminOauthClientUpdated' | 'AdminOauthClientDeleted' | 'AdminOauthClientSecretRotated' + | 'AdminOauthClientTokensRevoked' | 'AdminSyncGithubInstall' | 'AdminTriggerFullScan' | 'AdminUnlinkGithubInstall' - | 'AdminUpdateCustomerCampaignAlerts' | 'AdminUpdateGithubInstallWorkspace' | 'AdminUpdateGithubInstallationSettings' | 'AdminUpdateOrganizationSetting' @@ -33594,6 +33715,7 @@ export interface operations { | 'CreateTicket' | 'CreateTicketingConfiguration' | 'CreateTicketingDestination' + | 'BulkMigrateTicketingDestinations' | 'CoanaCliLegacyModeCutoffUpdated' | 'CoanaCliLegacyModeDemoteOrg' | 'CoanaCliLegacyModePromoteOrg' @@ -33615,6 +33737,7 @@ export interface operations { | 'DeleteRepoAccessRule' | 'DeleteReport' | 'DeleteRepository' + | 'CloseArchivedRepositoryAlerts' | 'DeleteTicketingConfiguration' | 'DeleteTicketingDestination' | 'DeleteWebhook' @@ -33631,6 +33754,7 @@ export interface operations { | 'EndPolicyException' | 'EnqueueAutopatchMergeRun' | 'EnqueueAutopatchPrepareJob' + | 'ExpireAlertResolution' | 'FinalizeAlertPolicyMigration' | 'OrganizationIpPolicyDenied' | 'OptOutRulesAndPolicies' @@ -33687,6 +33811,7 @@ export interface operations { | 'SvdImportLegacyGithubMatches' | 'SvdImportLegacyOnlyGhsas' | 'SvdImportLegacyOverlay' + | 'SvdReemitGithubRepoAdvisories' | 'SvdReprocessClusters' | 'SvdRetransformGhsaMirror' | 'SvdSeedLegacyGithubMatches' @@ -33734,6 +33859,7 @@ export interface operations { | 'OAuthClientDisabled' | 'OAuthClientEnabled' | 'OAuthClientDeleted' + | 'OAuthClientEnrollmentDeleted' /** * Number of events per page. */