Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(openapi): declare the status delete 403 and label read timeout
Yudhi Armyndharis4dccf17d1dde
diff --git a/openapi.json b/openapi.jsonindex 57d7ea315..d332fad10 100644--- a/openapi.json+++ b/openapi.json@@ -6785,7 +6785,7 @@"description": "The active engine cannot list chats by label (Baileys)"},"503": {- "description": "The whatsapp-web.js page connection died mid-read, so nothing could be read. Deliberately not reported as a missing label — a page that went away says nothing about whether the label exists. The other engine never answers this: Baileys has no label query at all and answers 501 above."+ "description": "WhatsApp Web did not answer (the page died or the command timed out), so nothing could be read. Deliberately not reported as a missing label: no answer says nothing about whether the label exists. The other engine never answers this: Baileys has no label query at all and answers 501 above."}},"summary": "Get every chat carrying a label",@@ -7775,6 +7775,9 @@}}},+ "403": {+ "description": "Key lacks OPERATOR role, or (whatsapp-web.js) the id is not one of the account's own statuses"+ },"404": {"description": "No session is running under that id — it was never started, was stopped, or does not exist. These routes report an unstarted session as `404`, where the message and group routes report it as `400`."},diff --git a/src/modules/label/label.controller.ts b/src/modules/label/label.controller.tsindex b0782a083..8053b32df 100644--- a/src/modules/label/label.controller.ts+++ b/src/modules/label/label.controller.ts@@ -67,9 +67,9 @@ export class LabelController {@ApiResponse({status: 503,description:- 'The whatsapp-web.js page connection died mid-read, so nothing could be read. Deliberately not ' +- 'reported as a missing label — a page that went away says nothing about whether the label exists. ' +- 'The other engine never answers this: Baileys has no label query at all and answers 501 above.',+ 'WhatsApp Web did not answer (the page died or the command timed out), so nothing could be ' ++ 'read. Deliberately not reported as a missing label: no answer says nothing about whether the label ' ++ 'exists. The other engine never answers this: Baileys has no label query at all and answers 501 above.',})@ApiResponse({ status: 409, description: ENGINE_NOT_READY_409 })@ApiResponse({ status: 404, description: LABEL_NOT_FOUND_404 })diff --git a/src/modules/status/status.controller.ts b/src/modules/status/status.controller.tsindex 6b2d5ca3f..67eef034c 100644--- a/src/modules/status/status.controller.ts+++ b/src/modules/status/status.controller.ts@@ -163,6 +163,10 @@ export class StatusController {@ApiOperation({ summary: 'Delete own status' })@ApiParam({ name: 'id', description: 'Status ID' })@ApiResponse({ status: 200, description: 'Status deleted.', type: StatusDeletedResponseDto })+ @ApiResponse({+ status: 403,+ description: "Key lacks OPERATOR role, or (whatsapp-web.js) the id is not one of the account's own statuses",+ })@ApiResponse({ status: 409, description: ENGINE_NOT_READY_409 })@ApiResponse({ status: 404, description: SESSION_NOT_STARTED_404 })@ApiResponse({