Skip to content

Commit 82f70f4

Browse files
author
bird-release[bot]
committed
Release v0.16.0 (sdk-python/v0.16.0)
1 parent ec5d5da commit 82f70f4

4 files changed

Lines changed: 13 additions & 9 deletions

File tree

CHANGELOG.md

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

3+
## 0.16.0
4+
5+
- **Breaking:** a WhatsApp send addresses its template by `slug` (previously `name`), and a WhatsApp message read echoes `template.slug` (previously `template.name`). Templates carry the slug as their permanent handle; the display name is cosmetic and never affects sending.
6+
37
## 0.15.0
48

59
- Email message reads now report the message as delivered. For a send that used a template, `subject` and the bodies from the message-content endpoint previously returned the template source, tokens and all, which is content no recipient received; they now return that source with the send's substitution values applied. The values themselves are exposed as a new `parameters` field so the inputs stay visible beside the result. Sends that supplied their content inline are unaffected.

src/bird/_generated.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,14 +2824,14 @@ class WhatsAppMessageTemplate(BaseModel):
28242824
model_config = ConfigDict(
28252825
extra='allow',
28262826
)
2827-
name: Annotated[
2827+
slug: Annotated[
28282828
str,
28292829
Field(
28302830
description="The template's stable handle (for example `bird_otp`).",
28312831
examples=['bird_otp'],
2832-
max_length=512,
2832+
max_length=63,
28332833
min_length=1,
2834-
pattern='^[a-z0-9_]+$',
2834+
pattern='^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$',
28352835
),
28362836
]
28372837
category: Annotated[
@@ -2984,14 +2984,14 @@ class WhatsAppTemplateSend(BaseModel):
29842984
model_config = ConfigDict(
29852985
extra='allow',
29862986
)
2987-
name: Annotated[
2987+
slug: Annotated[
29882988
str,
29892989
Field(
2990-
description='The template to send, by its name (for example `bird_otp`).',
2990+
description='The template to send, by its slug (for example `bird_otp`).',
29912991
examples=['bird_otp'],
2992-
max_length=512,
2992+
max_length=63,
29932993
min_length=1,
2994-
pattern='^[a-z0-9_]+$',
2994+
pattern='^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$',
29952995
),
29962996
]
29972997
language: Annotated[

src/bird/_version.py

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

src/bird/resources/whatsapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _send_body(
2828
) -> dict[str, Any]:
2929
body: dict[str, Any] = {"to": to}
3030
if template is not None:
31-
tmpl: dict[str, Any] = {"name": template}
31+
tmpl: dict[str, Any] = {"slug": template}
3232
if language is not None:
3333
tmpl["language"] = language
3434
if components is not None:

0 commit comments

Comments
 (0)