Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2ae0197
codegen metadata
stainless-app[bot] May 12, 2026
af59542
codegen metadata
stainless-app[bot] May 12, 2026
6922c89
codegen metadata
stainless-app[bot] May 12, 2026
6a9645a
codegen metadata
stainless-app[bot] May 12, 2026
545b0a7
codegen metadata
stainless-app[bot] May 12, 2026
caa4eb3
codegen metadata
stainless-app[bot] May 12, 2026
69d6225
codegen metadata
stainless-app[bot] May 12, 2026
962b426
codegen metadata
stainless-app[bot] May 12, 2026
28a9ae1
codegen metadata
stainless-app[bot] May 12, 2026
f12a73c
codegen metadata
stainless-app[bot] May 12, 2026
f3387a2
codegen metadata
stainless-app[bot] May 12, 2026
c4ef325
codegen metadata
stainless-app[bot] May 13, 2026
56b3fa2
codegen metadata
stainless-app[bot] May 13, 2026
ece8552
ci: pin GitHub Actions to commit SHAs
stainless-app[bot] May 13, 2026
40ef460
codegen metadata
stainless-app[bot] May 13, 2026
d55ce86
codegen metadata
stainless-app[bot] May 13, 2026
c73db29
codegen metadata
stainless-app[bot] May 13, 2026
b5a8878
codegen metadata
stainless-app[bot] May 13, 2026
00e21e5
codegen metadata
stainless-app[bot] May 13, 2026
416779c
codegen metadata
stainless-app[bot] May 13, 2026
bac8fc1
codegen metadata
stainless-app[bot] May 13, 2026
623d77b
codegen metadata
stainless-app[bot] May 13, 2026
802a833
codegen metadata
stainless-app[bot] May 13, 2026
8c91675
codegen metadata
stainless-app[bot] May 13, 2026
b8e96a6
codegen metadata
stainless-app[bot] May 13, 2026
a594a44
codegen metadata
stainless-app[bot] May 13, 2026
c5e7146
codegen metadata
stainless-app[bot] May 13, 2026
0f2b218
codegen metadata
stainless-app[bot] May 13, 2026
0fdb038
codegen metadata
stainless-app[bot] May 13, 2026
4b53156
codegen metadata
stainless-app[bot] May 13, 2026
1f17aed
codegen metadata
stainless-app[bot] May 13, 2026
7d5b0b4
feat(api): api update
stainless-app[bot] May 14, 2026
975e78b
codegen metadata
stainless-app[bot] May 14, 2026
81cf4f5
codegen metadata
stainless-app[bot] May 14, 2026
9fb25c5
codegen metadata
stainless-app[bot] May 14, 2026
b7b2c30
codegen metadata
stainless-app[bot] May 14, 2026
5d6bd8a
codegen metadata
stainless-app[bot] May 14, 2026
5fc31a7
codegen metadata
stainless-app[bot] May 14, 2026
537f9a4
codegen metadata
stainless-app[bot] May 14, 2026
510ad8e
release: 0.26.0
stainless-app[bot] May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/sent-dm-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.10.2'

Expand All @@ -43,10 +43,10 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/sent-dm-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.10.2'

Expand All @@ -61,7 +61,7 @@ jobs:
github.repository == 'stainless-sdks/sent-dm-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -81,10 +81,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/sent-dm-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.10.2'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.9.13'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'sentdm/sent-dm-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.25.0"
".": "0.26.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 40
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent/sent-dm-cd3602173bd6a0a9492974a8541e246b36758015cb5f3e214b4abec90f3f9306.yml
openapi_spec_hash: 4d6829284030da47b715b4f5557167db
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent/sent-dm-f11b6b07e154570d2c9298e1a196f6a17d1459b87c1c9f836d476e1876e8bbe5.yml
openapi_spec_hash: 969f82ebb2d5e6be2af05c56c4dea585
config_hash: 7fe4b7f38470a511342b783de698aa99
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.26.0 (2026-05-14)

Full Changelog: [v0.25.0...v0.26.0](https://github.com/sentdm/sent-dm-python/compare/v0.25.0...v0.26.0)

### Features

* **api:** api update ([7d5b0b4](https://github.com/sentdm/sent-dm-python/commit/7d5b0b48d8bc5743269603ffa0bddec5aa8a8814))

## 0.25.0 (2026-05-12)

Full Changelog: [v0.24.1...v0.25.0](https://github.com/sentdm/sent-dm-python/compare/v0.24.1...v0.25.0)
Expand Down
99 changes: 43 additions & 56 deletions api.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sentdm"
version = "0.25.0"
version = "0.26.0"
description = "The official Python library for the Sent API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/sent_dm/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "sent_dm"
__version__ = "0.25.0" # x-release-please-version
__version__ = "0.26.0" # x-release-please-version
54 changes: 20 additions & 34 deletions src/sent_dm/resources/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Dict, Optional
from typing import Optional

import httpx

Expand All @@ -19,7 +19,9 @@
)
from .._base_client import make_request_options
from ..types.contact_list_response import ContactListResponse
from ..types.api_response_of_contact import APIResponseOfContact
from ..types.contact_create_response import ContactCreateResponse
from ..types.contact_update_response import ContactUpdateResponse
from ..types.contact_retrieve_response import ContactRetrieveResponse

__all__ = ["ContactsResource", "AsyncContactsResource"]

Expand Down Expand Up @@ -59,7 +61,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> APIResponseOfContact:
) -> ContactCreateResponse:
"""
Creates a new contact by phone number and associates it with the authenticated
customer.
Expand Down Expand Up @@ -99,7 +101,7 @@ def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=APIResponseOfContact,
cast_to=ContactCreateResponse,
)

def retrieve(
Expand All @@ -113,7 +115,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> APIResponseOfContact:
) -> ContactRetrieveResponse:
"""Retrieves a specific contact by their unique identifier.

Returns detailed
Expand All @@ -137,14 +139,13 @@ def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=APIResponseOfContact,
cast_to=ContactRetrieveResponse,
)

def update(
self,
id: str,
*,
channel_consent: Optional[Dict[str, str]] | Omit = omit,
default_channel: Optional[str] | Omit = omit,
opt_out: Optional[bool] | Omit = omit,
sandbox: bool | Omit = omit,
Expand All @@ -156,23 +157,17 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> APIResponseOfContact:
) -> ContactUpdateResponse:
"""Updates a contact's default channel and/or opt-out status.

Inherited contacts
cannot be updated.

Args:
channel_consent: Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
"opted_out". All entries must have the same status — mixed values (e.g., sms:
opted_out + whatsapp: opted_in) are rejected with 400. The provided status is
applied to ALL channels regardless of which keys are specified, because consent
is global across channels. When provided, takes precedence over the opt_out
field.

default_channel: Default messaging channel: "sms" or "whatsapp"

opt_out: Whether the contact has opted out of messaging
opt_out: Whether the contact has opted out of messaging. Single source of truth — opt-out
is per-contact, not per-channel.

sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
for testing integrations without actual execution
Expand Down Expand Up @@ -200,7 +195,6 @@ def update(
path_template("/v3/contacts/{id}", id=id),
body=maybe_transform(
{
"channel_consent": channel_consent,
"default_channel": default_channel,
"opt_out": opt_out,
"sandbox": sandbox,
Expand All @@ -210,7 +204,7 @@ def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=APIResponseOfContact,
cast_to=ContactUpdateResponse,
)

def list(
Expand Down Expand Up @@ -354,7 +348,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> APIResponseOfContact:
) -> ContactCreateResponse:
"""
Creates a new contact by phone number and associates it with the authenticated
customer.
Expand Down Expand Up @@ -394,7 +388,7 @@ async def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=APIResponseOfContact,
cast_to=ContactCreateResponse,
)

async def retrieve(
Expand All @@ -408,7 +402,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> APIResponseOfContact:
) -> ContactRetrieveResponse:
"""Retrieves a specific contact by their unique identifier.

Returns detailed
Expand All @@ -432,14 +426,13 @@ async def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=APIResponseOfContact,
cast_to=ContactRetrieveResponse,
)

async def update(
self,
id: str,
*,
channel_consent: Optional[Dict[str, str]] | Omit = omit,
default_channel: Optional[str] | Omit = omit,
opt_out: Optional[bool] | Omit = omit,
sandbox: bool | Omit = omit,
Expand All @@ -451,23 +444,17 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> APIResponseOfContact:
) -> ContactUpdateResponse:
"""Updates a contact's default channel and/or opt-out status.

Inherited contacts
cannot be updated.

Args:
channel_consent: Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
"opted_out". All entries must have the same status — mixed values (e.g., sms:
opted_out + whatsapp: opted_in) are rejected with 400. The provided status is
applied to ALL channels regardless of which keys are specified, because consent
is global across channels. When provided, takes precedence over the opt_out
field.

default_channel: Default messaging channel: "sms" or "whatsapp"

opt_out: Whether the contact has opted out of messaging
opt_out: Whether the contact has opted out of messaging. Single source of truth — opt-out
is per-contact, not per-channel.

sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
for testing integrations without actual execution
Expand Down Expand Up @@ -495,7 +482,6 @@ async def update(
path_template("/v3/contacts/{id}", id=id),
body=await async_maybe_transform(
{
"channel_consent": channel_consent,
"default_channel": default_channel,
"opt_out": opt_out,
"sandbox": sandbox,
Expand All @@ -505,7 +491,7 @@ async def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=APIResponseOfContact,
cast_to=ContactUpdateResponse,
)

async def list(
Expand Down
8 changes: 4 additions & 4 deletions src/sent_dm/resources/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def send(

Args:
channel: Channels to broadcast on, e.g. ["whatsapp", "sms"]. Each channel produces a
separate message per recipient. "sent" = auto-detect, "rcs" = reserved
(skipped). Defaults to ["sent"] (auto-detect) if omitted.
separate message per recipient. "sent" = auto-detect. Defaults to ["sent"]
(auto-detect) if omitted.

sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
for testing integrations without actual execution
Expand Down Expand Up @@ -315,8 +315,8 @@ async def send(

Args:
channel: Channels to broadcast on, e.g. ["whatsapp", "sms"]. Each channel produces a
separate message per recipient. "sent" = auto-detect, "rcs" = reserved
(skipped). Defaults to ["sent"] (auto-detect) if omitted.
separate message per recipient. "sent" = auto-detect. Defaults to ["sent"]
(auto-detect) if omitted.

sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful
for testing integrations without actual execution
Expand Down
Loading
Loading