diff --git a/frontend/public/openapi.json b/frontend/public/openapi.json index 2576917f..aaf746a4 100644 --- a/frontend/public/openapi.json +++ b/frontend/public/openapi.json @@ -751,6 +751,53 @@ } } }, + "/panel/api/inbounds/{id}/delAllClients": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Remove every client attached to a single inbound while keeping the inbound itself. Collects emails from settings.clients[] and feeds them into the optimized bulk-delete path (runtime user removal + traffic-row cleanup + SyncInbound). Destructive and cannot be undone.", + "operationId": "post_panel_api_inbounds_id_delAllClients", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "deleted": 12 + } + } + } + } + } + } + } + }, "/panel/api/inbounds/resetAllTraffics": { "post": { "tags": [ diff --git a/frontend/src/pages/api-docs/endpoints.ts b/frontend/src/pages/api-docs/endpoints.ts index 284c8034..1773da9c 100644 --- a/frontend/src/pages/api-docs/endpoints.ts +++ b/frontend/src/pages/api-docs/endpoints.ts @@ -174,6 +174,15 @@ export const sections: readonly Section[] = [ { name: 'id', in: 'path', type: 'number', desc: 'Inbound ID.' }, ], }, + { + method: 'POST', + path: '/panel/api/inbounds/:id/delAllClients', + summary: 'Remove every client attached to a single inbound while keeping the inbound itself. Collects emails from settings.clients[] and feeds them into the optimized bulk-delete path (runtime user removal + traffic-row cleanup + SyncInbound). Destructive and cannot be undone.', + params: [ + { name: 'id', in: 'path', type: 'number', desc: 'Inbound ID.' }, + ], + response: '{\n "success": true,\n "obj": {\n "deleted": 12\n }\n}', + }, { method: 'POST', path: '/panel/api/inbounds/resetAllTraffics',