From 92615cdfde125cf2481dfe8bf22f2476e1819307 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 20 Jan 2026 07:37:45 +0000 Subject: [PATCH] fix(openapi): sync with openapi definition --- openapi.json | 277 ++++++++++++++++++++++++++++++++++++++++++++++--- types/api.d.ts | 130 +++++++++++++++++++++-- 2 files changed, 386 insertions(+), 21 deletions(-) diff --git a/openapi.json b/openapi.json index 53232f75..21a88dd6 100644 --- a/openapi.json +++ b/openapi.json @@ -318,6 +318,45 @@ }, "description": "Internal server error" }, + "SocketConflict": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "error": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "details": { + "type": "object", + "description": "", + "default": null, + "nullable": true + } + }, + "required": [ + "details", + "message" + ] + } + }, + "required": [ + "error" + ] + } + } + }, + "description": "Resource already exists" + }, "SocketGone": { "content": { "application/json": { @@ -4560,6 +4599,58 @@ } } }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "tooManyFiles" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "fileCount": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "fileCount" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, { "type": "object", "additionalProperties": false, @@ -15717,6 +15808,9 @@ "404": { "$ref": "#/components/responses/SocketNotFoundResponse" }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -16114,6 +16208,9 @@ "404": { "$ref": "#/components/responses/SocketNotFoundResponse" }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -18758,6 +18855,27 @@ "action" ] }, + "tooManyFiles": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for tooManyFiles issues." + } + }, + "required": [ + "action" + ] + }, "generic": { "type": "object", "additionalProperties": false, @@ -21341,6 +21459,27 @@ "action" ] }, + "tooManyFiles": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for tooManyFiles issues." + } + }, + "required": [ + "action" + ] + }, "generic": { "type": "object", "additionalProperties": false, @@ -24237,6 +24376,27 @@ "action" ] }, + "tooManyFiles": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for tooManyFiles issues." + } + }, + "required": [ + "action" + ] + }, "generic": { "type": "object", "additionalProperties": false, @@ -26823,6 +26983,27 @@ "action" ] }, + "tooManyFiles": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for tooManyFiles issues." + } + }, + "required": [ + "action" + ] + }, "generic": { "type": "object", "additionalProperties": false, @@ -29362,6 +29543,27 @@ "action" ] }, + "tooManyFiles": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for tooManyFiles issues." + } + }, + "required": [ + "action" + ] + }, "generic": { "type": "object", "additionalProperties": false, @@ -35945,6 +36147,13 @@ "type": "string", "description": "ID of the Socket user who created the API Token", "default": "", + "format": "uuid", + "nullable": true + }, + "group_uuid": { + "type": "string", + "description": "The stable group UUID that remains constant across token rotations", + "default": "", "format": "uuid" }, "token": { @@ -35960,13 +36169,14 @@ }, "required": [ "created_by", + "group_uuid", "hash", "token" ] } } }, - "description": "The newly created api token and its hash." + "description": "The newly created api token with its stable UUID and hash." }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -36057,7 +36267,7 @@ "include", "omit" ], - "default": "include" + "default": "omit" } } ], @@ -36141,6 +36351,12 @@ "default": "", "format": "date" }, + "group_uuid": { + "type": "string", + "description": "The stable group UUID that remains constant across token rotations", + "default": "", + "format": "uuid" + }, "hash": { "type": "string", "description": "SRI-format hash of the token (e.g., sha512-base64hash). Null for tokens created before hash column was added.", @@ -36278,6 +36494,7 @@ "committers", "created_at", "created_by", + "group_uuid", "hash", "id", "last_used_at", @@ -36486,14 +36703,25 @@ "description": "Name for the API Token", "default": "api token" }, + "uuid": { + "type": "string", + "description": "The stable group UUID to update (provide uuid, id, token, or hash. May provide uuid+hash together for validation)", + "default": "", + "format": "uuid" + }, + "id": { + "type": "string", + "description": "The API token ID to update (provide uuid, id, token, or hash)", + "default": "" + }, "token": { "type": "string", - "description": "The API token to update (provide either token or hash)", + "description": "The API token to update (provide uuid, id, token, or hash)", "default": "" }, "hash": { "type": "string", - "description": "The API token hash to update (provide either token or hash)", + "description": "The API token hash to update (provide uuid, id, token, or hash)", "default": "" } }, @@ -36531,14 +36759,14 @@ "additionalProperties": false, "description": "", "properties": { - "token": { + "hash": { "type": "string", - "description": "", + "description": "SRI-format hash of the API token (e.g., sha512-base64hash)", "default": "" } }, "required": [ - "token" + "hash" ] } } @@ -36583,6 +36811,12 @@ "type": "object", "additionalProperties": false, "properties": { + "uuid": { + "type": "string", + "description": "The stable group UUID of the API token to rotate", + "default": "", + "format": "uuid" + }, "token": { "type": "string", "description": "", @@ -36594,11 +36828,11 @@ "default": "" } }, - "description": "The API Token or hash to rotate. Must provide either token or hash, but not both." + "description": "The API Token identifier to rotate. Provide uuid (recommended), token, or hash. May provide uuid+hash together for validation." } } }, - "description": "The API Token or hash to rotate. Must provide either token or hash, but not both.", + "description": "The API Token identifier to rotate. Provide uuid (recommended), token, or hash. May provide uuid+hash together for validation.", "required": false }, "security": [ @@ -36623,6 +36857,17 @@ "additionalProperties": false, "description": "", "properties": { + "id": { + "type": "string", + "description": "The database ID of the new API token", + "default": "" + }, + "group_uuid": { + "type": "string", + "description": "The stable group UUID (unchanged after rotation)", + "default": "", + "format": "uuid" + }, "created_by": { "type": "string", "description": "ID of the Socket user who created the API Token", @@ -36643,13 +36888,15 @@ }, "required": [ "created_by", + "group_uuid", "hash", + "id", "token" ] } } }, - "description": "The replacement API Token and its hash" + "description": "The replacement API Token with its stable UUID, new token value, and hash" }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -36689,6 +36936,12 @@ "type": "object", "additionalProperties": false, "properties": { + "uuid": { + "type": "string", + "description": "The stable group UUID of the API token to revoke", + "default": "", + "format": "uuid" + }, "token": { "type": "string", "description": "", @@ -36700,11 +36953,11 @@ "default": "" } }, - "description": "The token or hash to revoke. Must provide either token or hash, but not both." + "description": "The API token identifier to revoke. Provide uuid (recommended), token, or hash. May provide uuid+hash together for validation." } } }, - "description": "The token or hash to revoke. Must provide either token or hash, but not both.", + "description": "The API token identifier to revoke. Provide uuid (recommended), token, or hash. May provide uuid+hash together for validation.", "required": false }, "security": [ diff --git a/types/api.d.ts b/types/api.d.ts index 25d36b03..68c33e66 100644 --- a/types/api.d.ts +++ b/types/api.d.ts @@ -3294,6 +3294,19 @@ export interface components { usage?: components['schemas']['SocketUsageRef'] } } + | { + /** @enum {string} */ + type?: 'tooManyFiles' + value?: components['schemas']['SocketIssueBasics'] & { + /** @default */ + description: string + props: { + /** @default 0 */ + fileCount: number + } + usage?: components['schemas']['SocketUsageRef'] + } + } | { /** @enum {string} */ type?: 'generic' @@ -5098,6 +5111,19 @@ export interface components { } } } + /** @description Resource already exists */ + SocketConflict: { + content: { + 'application/json': { + error: { + /** @default */ + message: string + /** @default null */ + details: Record | null + } + } + } + } /** @description Gone */ SocketGone: { content: { @@ -6893,6 +6919,7 @@ export interface operations { 401: components['responses']['SocketUnauthorized'] 403: components['responses']['SocketForbidden'] 404: components['responses']['SocketNotFoundResponse'] + 409: components['responses']['SocketConflict'] 429: components['responses']['SocketTooManyRequestsResponse'] } } @@ -7019,6 +7046,7 @@ export interface operations { 401: components['responses']['SocketUnauthorized'] 403: components['responses']['SocketForbidden'] 404: components['responses']['SocketNotFoundResponse'] + 409: components['responses']['SocketConflict'] 429: components['responses']['SocketTooManyRequestsResponse'] } } @@ -8300,6 +8328,13 @@ export interface operations { */ action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' } + tooManyFiles?: { + /** + * @description The action to take for tooManyFiles issues. + * @enum {string} + */ + action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' + } generic?: { /** * @description The action to take for generic issues. @@ -9186,6 +9221,13 @@ export interface operations { */ action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' } + tooManyFiles?: { + /** + * @description The action to take for tooManyFiles issues. + * @enum {string} + */ + action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' + } generic?: { /** * @description The action to take for generic issues. @@ -10226,6 +10268,13 @@ export interface operations { */ action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' } + tooManyFiles?: { + /** + * @description The action to take for tooManyFiles issues. + * @enum {string} + */ + action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' + } generic?: { /** * @description The action to take for generic issues. @@ -11105,6 +11154,13 @@ export interface operations { */ action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' } + tooManyFiles?: { + /** + * @description The action to take for tooManyFiles issues. + * @enum {string} + */ + action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' + } generic?: { /** * @description The action to take for generic issues. @@ -11953,6 +12009,13 @@ export interface operations { */ action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' } + tooManyFiles?: { + /** + * @description The action to take for tooManyFiles issues. + * @enum {string} + */ + action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' + } generic?: { /** * @description The action to take for generic issues. @@ -14361,6 +14424,12 @@ export interface operations { * @default */ created_at: string + /** + * Format: uuid + * @description The stable group UUID that remains constant across token rotations + * @default + */ + group_uuid: string /** * @description SRI-format hash of the token (e.g., sha512-base64hash). Null for tokens created before hash column was added. * @default @@ -14653,7 +14722,7 @@ export interface operations { } } responses: { - /** @description The newly created api token and its hash. */ + /** @description The newly created api token with its stable UUID and hash. */ 200: { content: { 'application/json': { @@ -14662,7 +14731,13 @@ export interface operations { * @description ID of the Socket user who created the API Token * @default */ - created_by: string + created_by: string | null + /** + * Format: uuid + * @description The stable group UUID that remains constant across token rotations + * @default + */ + group_uuid: string /** @default */ token: string /** @default */ @@ -14817,12 +14892,23 @@ export interface operations { */ name?: string /** - * @description The API token to update (provide either token or hash) + * Format: uuid + * @description The stable group UUID to update (provide uuid, id, token, or hash. May provide uuid+hash together for validation) + * @default + */ + uuid?: string + /** + * @description The API token ID to update (provide uuid, id, token, or hash) + * @default + */ + id?: string + /** + * @description The API token to update (provide uuid, id, token, or hash) * @default */ token?: string /** - * @description The API token hash to update (provide either token or hash) + * @description The API token hash to update (provide uuid, id, token, or hash) * @default */ hash?: string @@ -14834,8 +14920,11 @@ export interface operations { 200: { content: { 'application/json': { - /** @default */ - token: string + /** + * @description SRI-format hash of the API token (e.g., sha512-base64hash) + * @default + */ + hash: string } } } @@ -14860,10 +14949,16 @@ export interface operations { org_slug: string } } - /** @description The API Token or hash to rotate. Must provide either token or hash, but not both. */ + /** @description The API Token identifier to rotate. Provide uuid (recommended), token, or hash. May provide uuid+hash together for validation. */ requestBody?: { content: { 'application/json': { + /** + * Format: uuid + * @description The stable group UUID of the API token to rotate + * @default + */ + uuid?: string /** @default */ token?: string /** @default */ @@ -14872,10 +14967,21 @@ export interface operations { } } responses: { - /** @description The replacement API Token and its hash */ + /** @description The replacement API Token with its stable UUID, new token value, and hash */ 200: { content: { 'application/json': { + /** + * @description The database ID of the new API token + * @default + */ + id: string + /** + * Format: uuid + * @description The stable group UUID (unchanged after rotation) + * @default + */ + group_uuid: string /** * Format: uuid * @description ID of the Socket user who created the API Token @@ -14910,10 +15016,16 @@ export interface operations { org_slug: string } } - /** @description The token or hash to revoke. Must provide either token or hash, but not both. */ + /** @description The API token identifier to revoke. Provide uuid (recommended), token, or hash. May provide uuid+hash together for validation. */ requestBody?: { content: { 'application/json': { + /** + * Format: uuid + * @description The stable group UUID of the API token to revoke + * @default + */ + uuid?: string /** @default */ token?: string /** @default */