Skip to content

Commit 6f08cd8

Browse files
author
stlc-bot
committed
Build SDK
Stainless-Generated-From: a43eb58ed698395c426040da5f2d9b2fa5b2d3f2
1 parent 0e870ed commit 6f08cd8

6 files changed

Lines changed: 69 additions & 23 deletions

File tree

‎src/sent_dm/resources/me.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ def retrieve(
7474
`rcs`. Each channel has a `configured` boolean. Configured channels expose
7575
additional details such as `phone_number`.
7676
77+
**Sending number:** `sending_phone_number` is the account's US SMS sender. It is
78+
intentionally the same value as `channels.sms.phone_number` — the two are kept
79+
in step, and it is published under both names because `sending_phone_number` is
80+
what this value is called on `GET /v3/profiles`. Read either. One difference:
81+
`sending_phone_number` is always present, including as `null`, while
82+
`channels.sms.phone_number` is omitted when there is no sender.
83+
84+
`sending_phone_number_profile_id` names the account that holds that number in
85+
inventory — normally this account, and a different one where a number is shared.
86+
Both are `null` when the account has no US SMS sender.
87+
7788
Args:
7889
extra_headers: Send extra headers
7990
@@ -147,6 +158,17 @@ async def retrieve(
147158
`rcs`. Each channel has a `configured` boolean. Configured channels expose
148159
additional details such as `phone_number`.
149160
161+
**Sending number:** `sending_phone_number` is the account's US SMS sender. It is
162+
intentionally the same value as `channels.sms.phone_number` — the two are kept
163+
in step, and it is published under both names because `sending_phone_number` is
164+
what this value is called on `GET /v3/profiles`. Read either. One difference:
165+
`sending_phone_number` is always present, including as `null`, while
166+
`channels.sms.phone_number` is omitted when there is no sender.
167+
168+
`sending_phone_number_profile_id` names the account that holds that number in
169+
inventory — normally this account, and a different one where a number is shared.
170+
Both are `null` when the account has no US SMS sender.
171+
150172
Args:
151173
extra_headers: Send extra headers
152174

‎src/sent_dm/types/inbound_message_event_payload.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ class InboundMessageEventPayload(BaseModel):
1313
Delivered when a contact messages one of your numbers.
1414
"""
1515

16+
inbound_number: str
17+
"""The contact's number in E.164 format, meaning the number the message came from."""
18+
19+
received_at: str
20+
"""When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ)."""
21+
1622
account_id: Optional[str] = None
1723
"""The account the message belongs to."""
1824

1925
channel: Optional[str] = None
2026
"""The channel the message arrived on, for example sms or whatsapp."""
2127

22-
inbound_number: Optional[str] = None
23-
"""The contact's number in E.164 format, meaning the number the message came from."""
24-
2528
message_id: Optional[str] = None
2629
"""The inbound message."""
2730

2831
outbound_number: Optional[str] = None
2932
"""Your number in E.164 format, meaning the number the message was addressed to."""
3033

31-
received_at: Optional[str] = None
32-
"""When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ)."""
33-
3434
text: Optional[str] = None
3535
"""The message body.
3636

‎src/sent_dm/types/me_retrieve_response.py‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,30 @@ class Data(BaseModel):
242242
types)
243243
"""
244244

245+
sending_phone_number: Optional[str] = None
246+
"""The SMS sender this account sends from in the United States, in E.164 form.
247+
248+
Null when the account has no US SMS sender.
249+
250+
The same value as channels.sms.phone_number, published under both names on
251+
purpose: sending_phone_number is what this value is already called on GET
252+
/v3/profiles, so the same key answers the same question whichever of the two
253+
endpoints you ask. Neither name is preferred over the other and neither is
254+
deprecated.
255+
256+
The same value, not the same presence: this key is always written, including as
257+
null, whereas channels.sms.phone_number is left out entirely when there is no
258+
sender.
259+
"""
260+
261+
sending_phone_number_profile_id: Optional[str] = None
262+
"""
263+
The account that holds sending_phone_number in number inventory: normally this
264+
account itself, and a different account when the number is held elsewhere. Null
265+
when there is no US sender, or when the sender is not a number drawn from
266+
inventory — an alphanumeric sender ID or a short code.
267+
"""
268+
245269
settings: Optional[DataSettings] = None
246270
"""Profile configuration settings"""
247271

‎src/sent_dm/types/message_event_payload.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ class MessageEventPayload(BaseModel):
1414
message produces several of these as it moves toward a terminal status.
1515
"""
1616

17+
message_status: str
18+
"""The status the message just reached, for example SENT, DELIVERED, or FAILED.
19+
20+
Sent means dispatched and delivered means confirmed, so treat them as distinct
21+
outcomes.
22+
"""
23+
1724
account_id: Optional[str] = None
1825
"""The account the message belongs to."""
1926

@@ -33,13 +40,6 @@ class MessageEventPayload(BaseModel):
3340
them.
3441
"""
3542

36-
message_status: Optional[str] = None
37-
"""The status the message just reached, for example SENT, DELIVERED, or FAILED.
38-
39-
Sent means dispatched and delivered means confirmed, so treat them as distinct
40-
outcomes.
41-
"""
42-
4343
outbound_number: Optional[str] = None
4444
"""The recipient's number in E.164 format."""
4545

‎src/sent_dm/types/template_event_payload.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ class TemplateEventPayload(BaseModel):
1414
react without polling.
1515
"""
1616

17+
status: str
18+
"""The review status the template just reached, for example APPROVED or REJECTED."""
19+
20+
whatsapp_template_id: str
21+
"""
22+
The template's identifier with Meta, assigned when the template is submitted for
23+
review.
24+
"""
25+
1726
account_id: Optional[str] = None
1827
"""The account the template belongs to."""
1928

@@ -32,17 +41,8 @@ class TemplateEventPayload(BaseModel):
3241
Populated on a rejection.
3342
"""
3443

35-
status: Optional[str] = None
36-
"""The review status the template just reached, for example APPROVED or REJECTED."""
37-
3844
template_id: Optional[str] = None
3945
"""The template in Sent."""
4046

4147
template_name: Optional[str] = None
4248
"""The template's display name."""
43-
44-
whatsapp_template_id: Optional[str] = None
45-
"""
46-
The template's identifier with Meta, assigned when the template is submitted for
47-
review.
48-
"""

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)