fix(api): type initial_message_status as a Literal enum

str | None under-specified the field: the implementation and the TS SDK
union both constrain it to queue_full / refused_closed, and the Literal
projects a proper enum into the generated OpenAPI spec so clients
reject unexpected values. Specs regenerated.
This commit is contained in:
Patrick Buckley
2026-07-07 07:58:58 -07:00
parent e60c19befd
commit fa1ba2cc01
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -2568,6 +2568,10 @@
"initial_message_status": {
"anyOf": [
{
"enum": [
"queue_full",
"refused_closed"
],
"type": "string"
},
{
+1 -1
View File
@@ -224,7 +224,7 @@ class CreateWorkstreamResponse(BaseModel):
"/v1/api/workstreams/{ws_id}/send."
),
)
initial_message_status: str | None = Field(
initial_message_status: Literal["queue_full", "refused_closed"] | None = Field(
default=None,
description=(
"Present ONLY when the workstream was created but its "