Skip to content

Commit 2c408fb

Browse files
release: 7.6.0 (#119)
* codegen metadata * chore(internal): codegen related update * feat(api): remove audit_events/automations/brands/bulk/inbound/translations/tenants.templates * release: 7.6.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 86ad58a commit 2c408fb

File tree

13 files changed

+325
-9
lines changed

13 files changed

+325
-9
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "7.5.0"
2+
".": "7.6.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 77
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-fab4ee8a24b719456f38d4a6050f4e40158db57937a1d55035be9325df494941.yml
3-
openapi_spec_hash: be1371c71559511c79a4285238b7131c
4-
config_hash: 54d2059f36ceee17804ef6c2800affd2
1+
configured_endpoints: 78
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-e3c16e3181f58323091b425c9ca546efdefbe4681255d611ff21de9050c249ee.yml
3+
openapi_spec_hash: 9cc15d56d3c522db4dce917cec791142
4+
config_hash: b8333ea2756bea772420159bf539b168

CHANGELOG.md

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

3+
## 7.6.0 (2026-01-08)
4+
5+
Full Changelog: [v7.5.0...v7.6.0](https://github.com/trycourier/courier-python/compare/v7.5.0...v7.6.0)
6+
7+
### Features
8+
9+
* **api:** remove audit_events/automations/brands/bulk/inbound/translations/tenants.templates ([9967cc0](https://github.com/trycourier/courier-python/commit/9967cc0183c5d3a8af38bae19f384c8d12c66b26))
10+
11+
12+
### Chores
13+
14+
* **internal:** codegen related update ([0e618c3](https://github.com/trycourier/courier-python/commit/0e618c3ef16b92452a1488f378ef968cee961a6c))
15+
316
## 7.5.0 (2025-12-22)
417

518
Full Changelog: [v7.4.0...v7.5.0](https://github.com/trycourier/courier-python/compare/v7.4.0...v7.5.0)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Courier
189+
Copyright 2026 Courier
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

api.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,17 @@ Methods:
139139
Types:
140140

141141
```python
142-
from courier.types import AutomationInvokeResponse
142+
from courier.types import (
143+
AutomationInvokeResponse,
144+
AutomationTemplate,
145+
AutomationTemplateListResponse,
146+
)
143147
```
144148

149+
Methods:
150+
151+
- <code title="get /automations">client.automations.<a href="./src/courier/resources/automations/automations.py">list</a>(\*\*<a href="src/courier/types/automation_list_params.py">params</a>) -> <a href="./src/courier/types/automation_template_list_response.py">AutomationTemplateListResponse</a></code>
152+
145153
## Invoke
146154

147155
Methods:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "trycourier"
3-
version = "7.5.0"
3+
version = "7.6.0"
44
description = "The official Python library for the Courier API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/courier/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "courier"
4-
__version__ = "7.5.0" # x-release-please-version
4+
__version__ = "7.6.0" # x-release-please-version

src/courier/resources/automations/automations.py

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
from __future__ import annotations
44

5+
from typing_extensions import Literal
6+
7+
import httpx
8+
59
from .invoke import (
610
InvokeResource,
711
AsyncInvokeResource,
@@ -10,8 +14,19 @@
1014
InvokeResourceWithStreamingResponse,
1115
AsyncInvokeResourceWithStreamingResponse,
1216
)
17+
from ...types import automation_list_params
18+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
19+
from ..._utils import maybe_transform, async_maybe_transform
1320
from ..._compat import cached_property
1421
from ..._resource import SyncAPIResource, AsyncAPIResource
22+
from ..._response import (
23+
to_raw_response_wrapper,
24+
to_streamed_response_wrapper,
25+
async_to_raw_response_wrapper,
26+
async_to_streamed_response_wrapper,
27+
)
28+
from ..._base_client import make_request_options
29+
from ...types.automation_template_list_response import AutomationTemplateListResponse
1530

1631
__all__ = ["AutomationsResource", "AsyncAutomationsResource"]
1732

@@ -40,6 +55,55 @@ def with_streaming_response(self) -> AutomationsResourceWithStreamingResponse:
4055
"""
4156
return AutomationsResourceWithStreamingResponse(self)
4257

58+
def list(
59+
self,
60+
*,
61+
cursor: str | Omit = omit,
62+
version: Literal["published", "draft"] | Omit = omit,
63+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
64+
# The extra values given here take precedence over values defined on the client or passed to this method.
65+
extra_headers: Headers | None = None,
66+
extra_query: Query | None = None,
67+
extra_body: Body | None = None,
68+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
69+
) -> AutomationTemplateListResponse:
70+
"""Get the list of automations.
71+
72+
Args:
73+
cursor: A cursor token for pagination.
74+
75+
Use the cursor from the previous response to
76+
fetch the next page of results.
77+
78+
version: The version of templates to retrieve. Accepted values are published (for
79+
published templates) or draft (for draft templates). Defaults to published.
80+
81+
extra_headers: Send extra headers
82+
83+
extra_query: Add additional query parameters to the request
84+
85+
extra_body: Add additional JSON properties to the request
86+
87+
timeout: Override the client-level default timeout for this request, in seconds
88+
"""
89+
return self._get(
90+
"/automations",
91+
options=make_request_options(
92+
extra_headers=extra_headers,
93+
extra_query=extra_query,
94+
extra_body=extra_body,
95+
timeout=timeout,
96+
query=maybe_transform(
97+
{
98+
"cursor": cursor,
99+
"version": version,
100+
},
101+
automation_list_params.AutomationListParams,
102+
),
103+
),
104+
cast_to=AutomationTemplateListResponse,
105+
)
106+
43107

44108
class AsyncAutomationsResource(AsyncAPIResource):
45109
@cached_property
@@ -65,11 +129,64 @@ def with_streaming_response(self) -> AsyncAutomationsResourceWithStreamingRespon
65129
"""
66130
return AsyncAutomationsResourceWithStreamingResponse(self)
67131

132+
async def list(
133+
self,
134+
*,
135+
cursor: str | Omit = omit,
136+
version: Literal["published", "draft"] | Omit = omit,
137+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
138+
# The extra values given here take precedence over values defined on the client or passed to this method.
139+
extra_headers: Headers | None = None,
140+
extra_query: Query | None = None,
141+
extra_body: Body | None = None,
142+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
143+
) -> AutomationTemplateListResponse:
144+
"""Get the list of automations.
145+
146+
Args:
147+
cursor: A cursor token for pagination.
148+
149+
Use the cursor from the previous response to
150+
fetch the next page of results.
151+
152+
version: The version of templates to retrieve. Accepted values are published (for
153+
published templates) or draft (for draft templates). Defaults to published.
154+
155+
extra_headers: Send extra headers
156+
157+
extra_query: Add additional query parameters to the request
158+
159+
extra_body: Add additional JSON properties to the request
160+
161+
timeout: Override the client-level default timeout for this request, in seconds
162+
"""
163+
return await self._get(
164+
"/automations",
165+
options=make_request_options(
166+
extra_headers=extra_headers,
167+
extra_query=extra_query,
168+
extra_body=extra_body,
169+
timeout=timeout,
170+
query=await async_maybe_transform(
171+
{
172+
"cursor": cursor,
173+
"version": version,
174+
},
175+
automation_list_params.AutomationListParams,
176+
),
177+
),
178+
cast_to=AutomationTemplateListResponse,
179+
)
180+
68181

69182
class AutomationsResourceWithRawResponse:
70183
def __init__(self, automations: AutomationsResource) -> None:
71184
self._automations = automations
72185

186+
self.list = to_raw_response_wrapper(
187+
automations.list,
188+
)
189+
73190
@cached_property
74191
def invoke(self) -> InvokeResourceWithRawResponse:
75192
return InvokeResourceWithRawResponse(self._automations.invoke)
@@ -79,6 +196,10 @@ class AsyncAutomationsResourceWithRawResponse:
79196
def __init__(self, automations: AsyncAutomationsResource) -> None:
80197
self._automations = automations
81198

199+
self.list = async_to_raw_response_wrapper(
200+
automations.list,
201+
)
202+
82203
@cached_property
83204
def invoke(self) -> AsyncInvokeResourceWithRawResponse:
84205
return AsyncInvokeResourceWithRawResponse(self._automations.invoke)
@@ -88,6 +209,10 @@ class AutomationsResourceWithStreamingResponse:
88209
def __init__(self, automations: AutomationsResource) -> None:
89210
self._automations = automations
90211

212+
self.list = to_streamed_response_wrapper(
213+
automations.list,
214+
)
215+
91216
@cached_property
92217
def invoke(self) -> InvokeResourceWithStreamingResponse:
93218
return InvokeResourceWithStreamingResponse(self._automations.invoke)
@@ -97,6 +222,10 @@ class AsyncAutomationsResourceWithStreamingResponse:
97222
def __init__(self, automations: AsyncAutomationsResource) -> None:
98223
self._automations = automations
99224

225+
self.list = async_to_streamed_response_wrapper(
226+
automations.list,
227+
)
228+
100229
@cached_property
101230
def invoke(self) -> AsyncInvokeResourceWithStreamingResponse:
102231
return AsyncInvokeResourceWithStreamingResponse(self._automations.invoke)

src/courier/types/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
from .list_update_params import ListUpdateParams as ListUpdateParams
117117
from .tenant_association import TenantAssociation as TenantAssociation
118118
from .tenant_list_params import TenantListParams as TenantListParams
119+
from .automation_template import AutomationTemplate as AutomationTemplate
119120
from .brand_create_params import BrandCreateParams as BrandCreateParams
120121
from .brand_list_response import BrandListResponse as BrandListResponse
121122
from .brand_snippet_param import BrandSnippetParam as BrandSnippetParam
@@ -142,6 +143,7 @@
142143
from .send_message_response import SendMessageResponse as SendMessageResponse
143144
from .audience_list_response import AudienceListResponse as AudienceListResponse
144145
from .audience_update_params import AudienceUpdateParams as AudienceUpdateParams
146+
from .automation_list_params import AutomationListParams as AutomationListParams
145147
from .bulk_create_job_params import BulkCreateJobParams as BulkCreateJobParams
146148
from .bulk_list_users_params import BulkListUsersParams as BulkListUsersParams
147149
from .message_history_params import MessageHistoryParams as MessageHistoryParams
@@ -185,6 +187,7 @@
185187
from .audience_list_members_response import AudienceListMembersResponse as AudienceListMembersResponse
186188
from .inbound_bulk_message_user_param import InboundBulkMessageUserParam as InboundBulkMessageUserParam
187189
from .base_template_tenant_association import BaseTemplateTenantAssociation as BaseTemplateTenantAssociation
190+
from .automation_template_list_response import AutomationTemplateListResponse as AutomationTemplateListResponse
188191
from .put_subscriptions_recipient_param import PutSubscriptionsRecipientParam as PutSubscriptionsRecipientParam
189192
from .subscribe_to_lists_request_item_param import SubscribeToListsRequestItemParam as SubscribeToListsRequestItemParam
190193

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal, TypedDict
6+
7+
__all__ = ["AutomationListParams"]
8+
9+
10+
class AutomationListParams(TypedDict, total=False):
11+
cursor: str
12+
"""A cursor token for pagination.
13+
14+
Use the cursor from the previous response to fetch the next page of results.
15+
"""
16+
17+
version: Literal["published", "draft"]
18+
"""The version of templates to retrieve.
19+
20+
Accepted values are published (for published templates) or draft (for draft
21+
templates). Defaults to published.
22+
"""

0 commit comments

Comments
 (0)