From 1d7b9803017d9e047e3484ec7c1ca689bb36ae60 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Jul 2026 11:37:42 +0000 Subject: [PATCH] fix(sat): unify Campaign/CampaignSummary status into shared enum schema Campaign.status was an untyped free-form string while the identical conceptual field on CampaignSummary carried the real enum (Created/Queued/In progress/Emails Sent/Completed/Draft/In Review/Approved). Callers of getCampaign/listCampaigns got no schema-level validation or generated typing for status, unlike callers of the summary endpoints, even though both surface the same underlying value. Factor the enum out into a shared CampaignStatus schema referenced by both. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_015NduBfA4wkj37PDwy343fc --- sat/openapi.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sat/openapi.yaml b/sat/openapi.yaml index 3f455d1..a4dba0e 100644 --- a/sat/openapi.yaml +++ b/sat/openapi.yaml @@ -84,6 +84,14 @@ components: type: boolean required: [message, success] + CampaignStatus: + type: string + description: > + Lifecycle state of a campaign. Draft/In Review/Approved reflect the + approval workflow (see the submit-review/approve/reject endpoints); + Created/Queued/In progress/Emails Sent/Completed reflect send progress. + enum: [Created, Queued, "In progress", "Emails Sent", Completed, Draft, "In Review", Approved] + CampaignStats: type: object properties: @@ -122,8 +130,7 @@ components: type: string format: date-time status: - type: string - enum: [Created, Queued, "In progress", "Emails Sent", Completed, Draft, "In Review", Approved] + $ref: '#/components/schemas/CampaignStatus' stats: $ref: '#/components/schemas/CampaignStats' @@ -165,7 +172,7 @@ components: type: string format: date-time status: - type: string + $ref: '#/components/schemas/CampaignStatus' template: $ref: '#/components/schemas/TemplateRef' page: