Skip to content

Commit 549ecf3

Browse files
author
bird-release[bot]
committed
Release v0.57.0 (sdk-python/v0.57.0)
1 parent 6a5cce6 commit 549ecf3

5 files changed

Lines changed: 14 additions & 21 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.57.0
4+
5+
- A sending domain's DNS record now sets `error` while its status is still `pending`, reporting that the record published in DNS does not match the expected value.
6+
- **Breaking:** a template's `status` is a closed set of `draft`, `pending`, `active`, `rejected` and `inactive`, so it no longer widens to an arbitrary string. TypeScript callers reading `TemplateStatus.Active` or the `TemplateStatusValue` type should use the `TemplateStatus` union with the string literals, and Python callers should read `TemplateStatus.active` in place of `TemplateStatus.ACTIVE`.
7+
- **Breaking:** a send that quotes a message Bird does not hold now fails with `404` `WhatsAppReferencedMessageNotFound` instead of `422` `WhatsAppInReplyToNotFound`; one Bird holds but cannot quote answers `422` `WhatsAppMessageNotQuotable`, and a quote Bird cannot look up answers `503` `WhatsAppMessageLookupUnavailable`, which is worth retrying. Update anything matching the old codes.
8+
39
## 0.56.0
410

511
- Add `broadcast_id` to the per-recipient outbound email events, naming the broadcast a send went out as part of so you can group a broadcast's events without looking each send up. It is null on a send with no broadcast behind it.

‎src/bird/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
SMSTemplate,
7979
SMSTemplateList,
8080
EmailTemplateSummary,
81+
TemplateStatus,
8182
EmailLookup,
8283
PhoneNumberLookup,
8384
Verification,
@@ -157,7 +158,6 @@
157158
SMSSuppressionOrigin,
158159
SMSSuppressionReason,
159160
TemplateLanguageStatus,
160-
TemplateStatus,
161161
VerificationAttemptFailureReason,
162162
VerificationChannel,
163163
VerificationTerminalReason,

‎src/bird/_generated.py‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,9 +1895,8 @@ class SMSTemplate(BaseModel):
18951895
scope: Annotated[TemplateScope, Field(
18961896
description="Whether the template is one of our built-in templates (`system`) or one your workspace created (`workspace`). Every SMS template is `system`.",
18971897
)]
1898-
status: Annotated[Union[TemplateStatus, str], Field(
1899-
description="Where the template stands as a whole. The same five states on every channel.\n\n- `draft`: nothing has ever gone live.\n- `pending`: nothing is live and at least one language is in review.\n- `active`: at least one language is live, so something can be sent.\n- `rejected`: it was reviewed and every language was refused.\n- `inactive`: nothing is live and nothing is in review, so content was withdrawn or was blocked before anything went live.\n\nThis summary answers whether the template is usable at all. A template with\none language live is `active` even while another is still drafted or refused.\nRead `languages` to determine the state of each language and its reason.\n\nWhich of the five a template can reach follows its channel's review model. A\nchannel whose content a third party reviews reaches all five; one whose\ncontent goes live on publish moves between `draft`, `active` and `inactive`.\n\nOpen enum: treat a value you do not recognize as a new one rather than as\nan error.",
1900-
union_mode="left_to_right",
1898+
status: Annotated[TemplateStatus, Field(
1899+
description="Where the template stands as a whole. The same five states on every channel.\n\n- `draft`: nothing has ever gone live.\n- `pending`: nothing is live and at least one language is in review.\n- `active`: at least one language is live, so something can be sent.\n- `rejected`: it was reviewed and every language was refused.\n- `inactive`: nothing is live and nothing is in review, so content was withdrawn or was blocked before anything went live.\n\nA template with one language live is `active` even while another is still\ndrafted or refused. Read `languages` for the state of each language and its\nreason.\n\nWhich values a channel reports follows its review model. A channel whose\ncontent a third party reviews uses all five. On email and SMS, where content\ngoes live on publish, a template is `draft`, `active` or `inactive`, and\n`pending` and `rejected` are reserved for the review stage coming to both, so\na template reaching either is not a breaking change.",
19011900
)]
19021901
category: Annotated[SMSMessageCategory, Field(
19031902
description="Content classification applied to messages sent from this template.",
@@ -4713,7 +4712,7 @@ class WhatsAppMessageSendRequest(BaseModel):
47134712
min_length=1,
47144713
)] = None
47154714
in_reply_to_message_id: Annotated[Optional[str], Field(
4716-
description="Quote a message the contact will see above this one, the way replying in the WhatsApp client does. Name a message from the same conversation: one this workspace sent to this recipient, or received from them. Any content quotes, template or free-form. A message this workspace does not hold, or one older than the 15-day window we keep provider ids for, returns a `422` `WhatsAppInReplyToNotFound`. A message that never reached WhatsApp, or one from a different conversation than this send's `to` and `from`, returns a `422` `WhatsAppInReplyToNotQuotable`.",
4715+
description="Quote a message the contact will see above this one, the way replying in the WhatsApp client does. Name a message from the same conversation: one this workspace sent to this recipient, or received from them. Any content quotes, template or free-form. The quote is resolved before the send is accepted, so a quote WhatsApp cannot render fails this request rather than the message. An id naming no message this workspace holds, or one older than the 15 days we keep provider ids for, answers `404`; a message that never reached WhatsApp, or one from a different conversation than this send's `to` and `from`, answers `422`. Nothing is charged either way.",
47174716
examples=["wam_01kya19eknftrs2s6p82asmvnh"],
47184717
)] = None
47194718
tags: Annotated[Optional[List[Tag]], Field(
@@ -6018,7 +6017,7 @@ class DNSRecord(BaseModel):
60186017
min_length=1,
60196018
)]
60206019
error: Annotated[Optional[str], Field(
6021-
description="Human-readable detail for a failed check on this record: what was found in DNS and why it did not match. `null` when the record is verified or not yet checked.",
6020+
description="Human-readable detail for a check that did not pass on this record: what was found in DNS and why it did not match. Also set while `pending` when the record is published but does not match the expected value, which is the case you can act on. `null` when the record is `verified`, when nothing is published at this name yet, or before the first check.",
60226021
)] = None
60236022
safe_to_remove: Annotated[Optional[bool], Field(
60246023
description="Only set on `deprecated` records: `true` once the record is no longer referenced by in-flight mail or live tracked links and can be deleted from your DNS. `null` on `active` and `pending` records.",
@@ -6261,9 +6260,8 @@ class EmailTemplateSummary(BaseModel):
62616260
scope: Annotated[TemplateScope, Field(
62626261
description="Whether the template is one of our built-in templates (`system`) or one your workspace created (`workspace`). Every SMS template is `system`.",
62636262
)]
6264-
status: Annotated[Union[TemplateStatus, str], Field(
6265-
description="Where the template stands as a whole. The same five states on every channel.\n\n- `draft`: nothing has ever gone live.\n- `pending`: nothing is live and at least one language is in review.\n- `active`: at least one language is live, so something can be sent.\n- `rejected`: it was reviewed and every language was refused.\n- `inactive`: nothing is live and nothing is in review, so content was withdrawn or was blocked before anything went live.\n\nThis summary answers whether the template is usable at all. A template with\none language live is `active` even while another is still drafted or refused.\nRead `languages` to determine the state of each language and its reason.\n\nWhich of the five a template can reach follows its channel's review model. A\nchannel whose content a third party reviews reaches all five; one whose\ncontent goes live on publish moves between `draft`, `active` and `inactive`.\n\nOpen enum: treat a value you do not recognize as a new one rather than as\nan error.",
6266-
union_mode="left_to_right",
6263+
status: Annotated[TemplateStatus, Field(
6264+
description="Where the template stands as a whole. The same five states on every channel.\n\n- `draft`: nothing has ever gone live.\n- `pending`: nothing is live and at least one language is in review.\n- `active`: at least one language is live, so something can be sent.\n- `rejected`: it was reviewed and every language was refused.\n- `inactive`: nothing is live and nothing is in review, so content was withdrawn or was blocked before anything went live.\n\nA template with one language live is `active` even while another is still\ndrafted or refused. Read `languages` for the state of each language and its\nreason.\n\nWhich values a channel reports follows its review model. A channel whose\ncontent a third party reviews uses all five. On email and SMS, where content\ngoes live on publish, a template is `draft`, `active` or `inactive`, and\n`pending` and `rejected` are reserved for the review stage coming to both, so\na template reaching either is not a breaking change.",
62676265
)]
62686266
category: Annotated[EmailTemplateCategory, Field(
62696267
description="Whether the template is for `transactional` email or `marketing` email.",

‎src/bird/_open_enums.py‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,6 @@ class TemplateLanguageStatus:
193193
SUPERSEDED: Final = "superseded"
194194

195195

196-
class TemplateStatus:
197-
"""Values of TemplateStatus known at this SDK version (open enum)."""
198-
199-
ACTIVE: Final = "active"
200-
DRAFT: Final = "draft"
201-
INACTIVE: Final = "inactive"
202-
PENDING: Final = "pending"
203-
REJECTED: Final = "rejected"
204-
205-
206196
class VerificationAttemptFailureReason:
207197
"""Values of VerificationAttemptFailureReason known at this SDK version (open enum)."""
208198

@@ -333,7 +323,6 @@ class WhatsAppTemplateParameterType:
333323
"SMSSuppressionOrigin",
334324
"SMSSuppressionReason",
335325
"TemplateLanguageStatus",
336-
"TemplateStatus",
337326
"VerificationAttemptFailureReason",
338327
"VerificationChannel",
339328
"VerificationTerminalReason",

‎src/bird/_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.56.0"
1+
__version__ = "0.57.0"

0 commit comments

Comments
 (0)