Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.16.0"
".": "7.17.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 123
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-f54bd32a07b6d85cfda75812728f86aa295b0f3fb662ead7670179f809195896.yml
openapi_spec_hash: 0a283754d97445ef84d50720ba47081a
config_hash: 3536872b17998fc451577505e15afb3d
configured_endpoints: 134
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-e0c54fd2a28d7beec2c18a6c7abb833e0dd9b14e99c48cf1cfd126f664f1dc62.yml
openapi_spec_hash: 713a396d0875e2000de918032b499b2e
config_hash: 83c79a6ad0a0b5dcce3b85208026343b
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 7.17.0 (2026-06-24)

Full Changelog: [v7.16.0...v7.17.0](https://github.com/trycourier/courier-python/compare/v7.16.0...v7.17.0)

### Features

* **preferences:** workspace preference sections & nested topics endpoints ([362609a](https://github.com/trycourier/courier-python/commit/362609ad7f9f9416c9b3bfabb846128c595dcda6))

## 7.16.0 (2026-06-23)

Full Changelog: [v7.15.0...v7.16.0](https://github.com/trycourier/courier-python/compare/v7.15.0...v7.16.0)
Expand Down
37 changes: 37 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,43 @@ Methods:
- <code title="get /routing-strategies/{id}/notifications">client.routing_strategies.<a href="./src/courier/resources/routing_strategies.py">list_notifications</a>(id, \*\*<a href="src/courier/types/routing_strategy_list_notifications_params.py">params</a>) -> <a href="./src/courier/types/associated_notification_list_response.py">AssociatedNotificationListResponse</a></code>
- <code title="put /routing-strategies/{id}">client.routing_strategies.<a href="./src/courier/resources/routing_strategies.py">replace</a>(id, \*\*<a href="src/courier/types/routing_strategy_replace_params.py">params</a>) -> <a href="./src/courier/types/routing_strategy_get_response.py">RoutingStrategyGetResponse</a></code>

# PreferenceSections

Types:

```python
from courier.types import (
PreferenceSectionCreateRequest,
PreferenceSectionGetResponse,
PreferenceSectionListResponse,
PreferenceSectionReplaceRequest,
PreferenceTopicCreateRequest,
PreferenceTopicGetResponse,
PreferenceTopicListResponse,
PreferenceTopicReplaceRequest,
PublishPreferencesResponse,
)
```

Methods:

- <code title="post /preferences/sections">client.preference_sections.<a href="./src/courier/resources/preference_sections/preference_sections.py">create</a>(\*\*<a href="src/courier/types/preference_section_create_params.py">params</a>) -> <a href="./src/courier/types/preference_section_get_response.py">PreferenceSectionGetResponse</a></code>
- <code title="get /preferences/sections/{section_id}">client.preference_sections.<a href="./src/courier/resources/preference_sections/preference_sections.py">retrieve</a>(section_id) -> <a href="./src/courier/types/preference_section_get_response.py">PreferenceSectionGetResponse</a></code>
- <code title="get /preferences/sections">client.preference_sections.<a href="./src/courier/resources/preference_sections/preference_sections.py">list</a>() -> <a href="./src/courier/types/preference_section_list_response.py">PreferenceSectionListResponse</a></code>
- <code title="delete /preferences/sections/{section_id}">client.preference_sections.<a href="./src/courier/resources/preference_sections/preference_sections.py">archive</a>(section_id) -> None</code>
- <code title="post /preferences/publish">client.preference_sections.<a href="./src/courier/resources/preference_sections/preference_sections.py">publish</a>() -> <a href="./src/courier/types/publish_preferences_response.py">PublishPreferencesResponse</a></code>
- <code title="put /preferences/sections/{section_id}">client.preference_sections.<a href="./src/courier/resources/preference_sections/preference_sections.py">replace</a>(section_id, \*\*<a href="src/courier/types/preference_section_replace_params.py">params</a>) -> <a href="./src/courier/types/preference_section_get_response.py">PreferenceSectionGetResponse</a></code>

## Topics

Methods:

- <code title="post /preferences/sections/{section_id}/topics">client.preference_sections.topics.<a href="./src/courier/resources/preference_sections/topics.py">create</a>(section_id, \*\*<a href="src/courier/types/preference_sections/topic_create_params.py">params</a>) -> <a href="./src/courier/types/preference_topic_get_response.py">PreferenceTopicGetResponse</a></code>
- <code title="get /preferences/sections/{section_id}/topics/{topic_id}">client.preference_sections.topics.<a href="./src/courier/resources/preference_sections/topics.py">retrieve</a>(topic_id, \*, section_id) -> <a href="./src/courier/types/preference_topic_get_response.py">PreferenceTopicGetResponse</a></code>
- <code title="get /preferences/sections/{section_id}/topics">client.preference_sections.topics.<a href="./src/courier/resources/preference_sections/topics.py">list</a>(section_id) -> <a href="./src/courier/types/preference_topic_list_response.py">PreferenceTopicListResponse</a></code>
- <code title="delete /preferences/sections/{section_id}/topics/{topic_id}">client.preference_sections.topics.<a href="./src/courier/resources/preference_sections/topics.py">archive</a>(topic_id, \*, section_id) -> None</code>
- <code title="put /preferences/sections/{section_id}/topics/{topic_id}">client.preference_sections.topics.<a href="./src/courier/resources/preference_sections/topics.py">replace</a>(topic_id, \*, section_id, \*\*<a href="src/courier/types/preference_sections/topic_replace_params.py">params</a>) -> <a href="./src/courier/types/preference_topic_get_response.py">PreferenceTopicGetResponse</a></code>

# Profiles

Types:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "trycourier"
version = "7.16.0"
version = "7.17.0"
description = "The official Python library for the Courier API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
41 changes: 41 additions & 0 deletions src/courier/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
translations,
notifications,
routing_strategies,
preference_sections,
)
from .resources.auth import AuthResource, AsyncAuthResource
from .resources.bulk import BulkResource, AsyncBulkResource
Expand All @@ -77,6 +78,10 @@
from .resources.providers.providers import ProvidersResource, AsyncProvidersResource
from .resources.automations.automations import AutomationsResource, AsyncAutomationsResource
from .resources.notifications.notifications import NotificationsResource, AsyncNotificationsResource
from .resources.preference_sections.preference_sections import (
PreferenceSectionsResource,
AsyncPreferenceSectionsResource,
)

__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Courier", "AsyncCourier", "Client", "AsyncClient"]

Expand Down Expand Up @@ -241,6 +246,12 @@ def routing_strategies(self) -> RoutingStrategiesResource:

return RoutingStrategiesResource(self)

@cached_property
def preference_sections(self) -> PreferenceSectionsResource:
from .resources.preference_sections import PreferenceSectionsResource

return PreferenceSectionsResource(self)

@cached_property
def profiles(self) -> ProfilesResource:
from .resources.profiles import ProfilesResource
Expand Down Expand Up @@ -538,6 +549,12 @@ def routing_strategies(self) -> AsyncRoutingStrategiesResource:

return AsyncRoutingStrategiesResource(self)

@cached_property
def preference_sections(self) -> AsyncPreferenceSectionsResource:
from .resources.preference_sections import AsyncPreferenceSectionsResource

return AsyncPreferenceSectionsResource(self)

@cached_property
def profiles(self) -> AsyncProfilesResource:
from .resources.profiles import AsyncProfilesResource
Expand Down Expand Up @@ -777,6 +794,12 @@ def routing_strategies(self) -> routing_strategies.RoutingStrategiesResourceWith

return RoutingStrategiesResourceWithRawResponse(self._client.routing_strategies)

@cached_property
def preference_sections(self) -> preference_sections.PreferenceSectionsResourceWithRawResponse:
from .resources.preference_sections import PreferenceSectionsResourceWithRawResponse

return PreferenceSectionsResourceWithRawResponse(self._client.preference_sections)

@cached_property
def profiles(self) -> profiles.ProfilesResourceWithRawResponse:
from .resources.profiles import ProfilesResourceWithRawResponse
Expand Down Expand Up @@ -904,6 +927,12 @@ def routing_strategies(self) -> routing_strategies.AsyncRoutingStrategiesResourc

return AsyncRoutingStrategiesResourceWithRawResponse(self._client.routing_strategies)

@cached_property
def preference_sections(self) -> preference_sections.AsyncPreferenceSectionsResourceWithRawResponse:
from .resources.preference_sections import AsyncPreferenceSectionsResourceWithRawResponse

return AsyncPreferenceSectionsResourceWithRawResponse(self._client.preference_sections)

@cached_property
def profiles(self) -> profiles.AsyncProfilesResourceWithRawResponse:
from .resources.profiles import AsyncProfilesResourceWithRawResponse
Expand Down Expand Up @@ -1031,6 +1060,12 @@ def routing_strategies(self) -> routing_strategies.RoutingStrategiesResourceWith

return RoutingStrategiesResourceWithStreamingResponse(self._client.routing_strategies)

@cached_property
def preference_sections(self) -> preference_sections.PreferenceSectionsResourceWithStreamingResponse:
from .resources.preference_sections import PreferenceSectionsResourceWithStreamingResponse

return PreferenceSectionsResourceWithStreamingResponse(self._client.preference_sections)

@cached_property
def profiles(self) -> profiles.ProfilesResourceWithStreamingResponse:
from .resources.profiles import ProfilesResourceWithStreamingResponse
Expand Down Expand Up @@ -1158,6 +1193,12 @@ def routing_strategies(self) -> routing_strategies.AsyncRoutingStrategiesResourc

return AsyncRoutingStrategiesResourceWithStreamingResponse(self._client.routing_strategies)

@cached_property
def preference_sections(self) -> preference_sections.AsyncPreferenceSectionsResourceWithStreamingResponse:
from .resources.preference_sections import AsyncPreferenceSectionsResourceWithStreamingResponse

return AsyncPreferenceSectionsResourceWithStreamingResponse(self._client.preference_sections)

@cached_property
def profiles(self) -> profiles.AsyncProfilesResourceWithStreamingResponse:
from .resources.profiles import AsyncProfilesResourceWithStreamingResponse
Expand Down
2 changes: 1 addition & 1 deletion src/courier/_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__ = "courier"
__version__ = "7.16.0" # x-release-please-version
__version__ = "7.17.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/courier/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@
RoutingStrategiesResourceWithStreamingResponse,
AsyncRoutingStrategiesResourceWithStreamingResponse,
)
from .preference_sections import (
PreferenceSectionsResource,
AsyncPreferenceSectionsResource,
PreferenceSectionsResourceWithRawResponse,
AsyncPreferenceSectionsResourceWithRawResponse,
PreferenceSectionsResourceWithStreamingResponse,
AsyncPreferenceSectionsResourceWithStreamingResponse,
)

__all__ = [
"SendResource",
Expand Down Expand Up @@ -258,6 +266,12 @@
"AsyncRoutingStrategiesResourceWithRawResponse",
"RoutingStrategiesResourceWithStreamingResponse",
"AsyncRoutingStrategiesResourceWithStreamingResponse",
"PreferenceSectionsResource",
"AsyncPreferenceSectionsResource",
"PreferenceSectionsResourceWithRawResponse",
"AsyncPreferenceSectionsResourceWithRawResponse",
"PreferenceSectionsResourceWithStreamingResponse",
"AsyncPreferenceSectionsResourceWithStreamingResponse",
"ProfilesResource",
"AsyncProfilesResource",
"ProfilesResourceWithRawResponse",
Expand Down
33 changes: 33 additions & 0 deletions src/courier/resources/preference_sections/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .topics import (
TopicsResource,
AsyncTopicsResource,
TopicsResourceWithRawResponse,
AsyncTopicsResourceWithRawResponse,
TopicsResourceWithStreamingResponse,
AsyncTopicsResourceWithStreamingResponse,
)
from .preference_sections import (
PreferenceSectionsResource,
AsyncPreferenceSectionsResource,
PreferenceSectionsResourceWithRawResponse,
AsyncPreferenceSectionsResourceWithRawResponse,
PreferenceSectionsResourceWithStreamingResponse,
AsyncPreferenceSectionsResourceWithStreamingResponse,
)

__all__ = [
"TopicsResource",
"AsyncTopicsResource",
"TopicsResourceWithRawResponse",
"AsyncTopicsResourceWithRawResponse",
"TopicsResourceWithStreamingResponse",
"AsyncTopicsResourceWithStreamingResponse",
"PreferenceSectionsResource",
"AsyncPreferenceSectionsResource",
"PreferenceSectionsResourceWithRawResponse",
"AsyncPreferenceSectionsResourceWithRawResponse",
"PreferenceSectionsResourceWithStreamingResponse",
"AsyncPreferenceSectionsResourceWithStreamingResponse",
]
Loading