Skip to content

Commit cdd8c20

Browse files
release: 7.11.2 (#132)
* fix(types): make note optional in ResultNotification, flatten template response * fix(types): flatten NotificationTemplateResponse structure * release: 7.11.2 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent a21d5fe commit cdd8c20

16 files changed

Lines changed: 89 additions & 82 deletions

.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.11.1"
2+
".": "7.11.2"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-f0ac5c2fa86eabda773c549f5809d3e2d109e3e1d5a07f6fe1ace18355e4680a.yml
3-
openapi_spec_hash: b25dc0b42dd9386ab4a025bb2143bde6
4-
config_hash: 6037e4a9909efb8b2edac2dcc907b84f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3f78581b4e078a1f620d9f587f18d77bcde6d20f56b0e4ae798648f4236494fb.yml
3+
openapi_spec_hash: 6bd33e0396d85e11bb46f0d549af93a3
4+
config_hash: afcc4f6f8c33ca3f338589e32e086f56

CHANGELOG.md

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

3+
## 7.11.2 (2026-04-14)
4+
5+
Full Changelog: [v7.11.1...v7.11.2](https://github.com/trycourier/courier-python/compare/v7.11.1...v7.11.2)
6+
7+
### Bug Fixes
8+
9+
* **types:** flatten NotificationTemplateResponse structure ([de82b20](https://github.com/trycourier/courier-python/commit/de82b206f9d038b259de06360a6e52420c97c156))
10+
* **types:** make note optional in ResultNotification, flatten template response ([b7dc001](https://github.com/trycourier/courier-python/commit/b7dc001d77e093a2d93b4c8e7b7c93f5b4518edd))
11+
312
## 7.11.1 (2026-04-13)
413

514
Full Changelog: [v7.11.0...v7.11.1](https://github.com/trycourier/courier-python/compare/v7.11.0...v7.11.1)

api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,9 @@ from courier.types import (
351351
NotificationGetContent,
352352
NotificationLocalePutRequest,
353353
NotificationTemplateCreateRequest,
354-
NotificationTemplateGetResponse,
355354
NotificationTemplatePayload,
356355
NotificationTemplatePublishRequest,
356+
NotificationTemplateResponse,
357357
NotificationTemplateState,
358358
NotificationTemplateSummary,
359359
NotificationTemplateUpdateRequest,
@@ -366,16 +366,16 @@ from courier.types import (
366366

367367
Methods:
368368

369-
- <code title="post /notifications">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">create</a>(\*\*<a href="src/courier/types/notification_create_params.py">params</a>) -> <a href="./src/courier/types/notification_template_get_response.py">NotificationTemplateGetResponse</a></code>
370-
- <code title="get /notifications/{id}">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">retrieve</a>(id, \*\*<a href="src/courier/types/notification_retrieve_params.py">params</a>) -> <a href="./src/courier/types/notification_template_get_response.py">NotificationTemplateGetResponse</a></code>
369+
- <code title="post /notifications">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">create</a>(\*\*<a href="src/courier/types/notification_create_params.py">params</a>) -> <a href="./src/courier/types/notification_template_response.py">NotificationTemplateResponse</a></code>
370+
- <code title="get /notifications/{id}">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">retrieve</a>(id, \*\*<a href="src/courier/types/notification_retrieve_params.py">params</a>) -> <a href="./src/courier/types/notification_template_response.py">NotificationTemplateResponse</a></code>
371371
- <code title="get /notifications">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">list</a>(\*\*<a href="src/courier/types/notification_list_params.py">params</a>) -> <a href="./src/courier/types/notification_list_response.py">NotificationListResponse</a></code>
372372
- <code title="delete /notifications/{id}">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">archive</a>(id) -> None</code>
373373
- <code title="get /notifications/{id}/versions">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">list_versions</a>(id, \*\*<a href="src/courier/types/notification_list_versions_params.py">params</a>) -> <a href="./src/courier/types/notification_template_version_list_response.py">NotificationTemplateVersionListResponse</a></code>
374374
- <code title="post /notifications/{id}/publish">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">publish</a>(id, \*\*<a href="src/courier/types/notification_publish_params.py">params</a>) -> None</code>
375375
- <code title="put /notifications/{id}/content">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">put_content</a>(id, \*\*<a href="src/courier/types/notification_put_content_params.py">params</a>) -> <a href="./src/courier/types/notification_content_mutation_response.py">NotificationContentMutationResponse</a></code>
376376
- <code title="put /notifications/{id}/elements/{elementId}">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">put_element</a>(element_id, \*, id, \*\*<a href="src/courier/types/notification_put_element_params.py">params</a>) -> <a href="./src/courier/types/notification_content_mutation_response.py">NotificationContentMutationResponse</a></code>
377377
- <code title="put /notifications/{id}/locales/{localeId}">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">put_locale</a>(locale_id, \*, id, \*\*<a href="src/courier/types/notification_put_locale_params.py">params</a>) -> <a href="./src/courier/types/notification_content_mutation_response.py">NotificationContentMutationResponse</a></code>
378-
- <code title="put /notifications/{id}">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">replace</a>(id, \*\*<a href="src/courier/types/notification_replace_params.py">params</a>) -> <a href="./src/courier/types/notification_template_get_response.py">NotificationTemplateGetResponse</a></code>
378+
- <code title="put /notifications/{id}">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">replace</a>(id, \*\*<a href="src/courier/types/notification_replace_params.py">params</a>) -> <a href="./src/courier/types/notification_template_response.py">NotificationTemplateResponse</a></code>
379379
- <code title="get /notifications/{id}/content">client.notifications.<a href="./src/courier/resources/notifications/notifications.py">retrieve_content</a>(id, \*\*<a href="src/courier/types/notification_retrieve_content_params.py">params</a>) -> <a href="./src/courier/types/notification_retrieve_content_response.py">NotificationRetrieveContentResponse</a></code>
380380

381381
## Checks

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.11.1"
3+
version = "7.11.2"
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.11.1" # x-release-please-version
4+
__version__ = "7.11.2" # x-release-please-version

src/courier/resources/notifications/checks.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def update(
5959
timeout: float | httpx.Timeout | None | NotGiven = not_given,
6060
) -> CheckUpdateResponse:
6161
"""
62+
Replace the checks for a notification template submission.
63+
6264
Args:
6365
extra_headers: Send extra headers
6466
@@ -94,6 +96,8 @@ def list(
9496
timeout: float | httpx.Timeout | None | NotGiven = not_given,
9597
) -> CheckListResponse:
9698
"""
99+
Retrieve the checks for a notification template submission.
100+
97101
Args:
98102
extra_headers: Send extra headers
99103
@@ -128,6 +132,8 @@ def delete(
128132
timeout: float | httpx.Timeout | None | NotGiven = not_given,
129133
) -> None:
130134
"""
135+
Cancel a notification template submission.
136+
131137
Args:
132138
extra_headers: Send extra headers
133139
@@ -185,6 +191,8 @@ async def update(
185191
timeout: float | httpx.Timeout | None | NotGiven = not_given,
186192
) -> CheckUpdateResponse:
187193
"""
194+
Replace the checks for a notification template submission.
195+
188196
Args:
189197
extra_headers: Send extra headers
190198
@@ -220,6 +228,8 @@ async def list(
220228
timeout: float | httpx.Timeout | None | NotGiven = not_given,
221229
) -> CheckListResponse:
222230
"""
231+
Retrieve the checks for a notification template submission.
232+
223233
Args:
224234
extra_headers: Send extra headers
225235
@@ -254,6 +264,8 @@ async def delete(
254264
timeout: float | httpx.Timeout | None | NotGiven = not_given,
255265
) -> None:
256266
"""
267+
Cancel a notification template submission.
268+
257269
Args:
258270
extra_headers: Send extra headers
259271

src/courier/resources/notifications/notifications.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from ..._base_client import make_request_options
4242
from ...types.notification_list_response import NotificationListResponse
4343
from ...types.notification_template_state import NotificationTemplateState
44-
from ...types.notification_template_get_response import NotificationTemplateGetResponse
44+
from ...types.notification_template_response import NotificationTemplateResponse
4545
from ...types.notification_template_payload_param import NotificationTemplatePayloadParam
4646
from ...types.notification_content_mutation_response import NotificationContentMutationResponse
4747
from ...types.notification_retrieve_content_response import NotificationRetrieveContentResponse
@@ -85,15 +85,15 @@ def create(
8585
extra_query: Query | None = None,
8686
extra_body: Body | None = None,
8787
timeout: float | httpx.Timeout | None | NotGiven = not_given,
88-
) -> NotificationTemplateGetResponse:
88+
) -> NotificationTemplateResponse:
8989
"""Create a notification template.
9090
9191
Requires all fields in the notification object.
9292
Templates are created in draft state by default.
9393
9494
Args:
95-
notification: Full document shape used in POST and PUT request bodies, and returned inside the
96-
GET response envelope.
95+
notification: Core template fields used in POST and PUT request bodies (nested under a
96+
`notification` key) and returned at the top level in responses.
9797
9898
state: Template state after creation. Case-insensitive input, normalized to uppercase
9999
in the response. Defaults to "DRAFT".
@@ -118,7 +118,7 @@ def create(
118118
options=make_request_options(
119119
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
120120
),
121-
cast_to=NotificationTemplateGetResponse,
121+
cast_to=NotificationTemplateResponse,
122122
)
123123

124124
def retrieve(
@@ -132,7 +132,7 @@ def retrieve(
132132
extra_query: Query | None = None,
133133
extra_body: Body | None = None,
134134
timeout: float | httpx.Timeout | None | NotGiven = not_given,
135-
) -> NotificationTemplateGetResponse:
135+
) -> NotificationTemplateResponse:
136136
"""Retrieve a notification template by ID.
137137
138138
Returns the published version by
@@ -161,7 +161,7 @@ def retrieve(
161161
timeout=timeout,
162162
query=maybe_transform({"version": version}, notification_retrieve_params.NotificationRetrieveParams),
163163
),
164-
cast_to=NotificationTemplateGetResponse,
164+
cast_to=NotificationTemplateResponse,
165165
)
166166

167167
def list(
@@ -511,14 +511,14 @@ def replace(
511511
extra_query: Query | None = None,
512512
extra_body: Body | None = None,
513513
timeout: float | httpx.Timeout | None | NotGiven = not_given,
514-
) -> NotificationTemplateGetResponse:
514+
) -> NotificationTemplateResponse:
515515
"""Replace a notification template.
516516
517517
All fields are required.
518518
519519
Args:
520-
notification: Full document shape used in POST and PUT request bodies, and returned inside the
521-
GET response envelope.
520+
notification: Core template fields used in POST and PUT request bodies (nested under a
521+
`notification` key) and returned at the top level in responses.
522522
523523
state: Template state after update. Case-insensitive input, normalized to uppercase in
524524
the response. Defaults to "DRAFT".
@@ -545,7 +545,7 @@ def replace(
545545
options=make_request_options(
546546
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
547547
),
548-
cast_to=NotificationTemplateGetResponse,
548+
cast_to=NotificationTemplateResponse,
549549
)
550550

551551
def retrieve_content(
@@ -636,15 +636,15 @@ async def create(
636636
extra_query: Query | None = None,
637637
extra_body: Body | None = None,
638638
timeout: float | httpx.Timeout | None | NotGiven = not_given,
639-
) -> NotificationTemplateGetResponse:
639+
) -> NotificationTemplateResponse:
640640
"""Create a notification template.
641641
642642
Requires all fields in the notification object.
643643
Templates are created in draft state by default.
644644
645645
Args:
646-
notification: Full document shape used in POST and PUT request bodies, and returned inside the
647-
GET response envelope.
646+
notification: Core template fields used in POST and PUT request bodies (nested under a
647+
`notification` key) and returned at the top level in responses.
648648
649649
state: Template state after creation. Case-insensitive input, normalized to uppercase
650650
in the response. Defaults to "DRAFT".
@@ -669,7 +669,7 @@ async def create(
669669
options=make_request_options(
670670
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
671671
),
672-
cast_to=NotificationTemplateGetResponse,
672+
cast_to=NotificationTemplateResponse,
673673
)
674674

675675
async def retrieve(
@@ -683,7 +683,7 @@ async def retrieve(
683683
extra_query: Query | None = None,
684684
extra_body: Body | None = None,
685685
timeout: float | httpx.Timeout | None | NotGiven = not_given,
686-
) -> NotificationTemplateGetResponse:
686+
) -> NotificationTemplateResponse:
687687
"""Retrieve a notification template by ID.
688688
689689
Returns the published version by
@@ -714,7 +714,7 @@ async def retrieve(
714714
{"version": version}, notification_retrieve_params.NotificationRetrieveParams
715715
),
716716
),
717-
cast_to=NotificationTemplateGetResponse,
717+
cast_to=NotificationTemplateResponse,
718718
)
719719

720720
async def list(
@@ -1066,14 +1066,14 @@ async def replace(
10661066
extra_query: Query | None = None,
10671067
extra_body: Body | None = None,
10681068
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1069-
) -> NotificationTemplateGetResponse:
1069+
) -> NotificationTemplateResponse:
10701070
"""Replace a notification template.
10711071
10721072
All fields are required.
10731073
10741074
Args:
1075-
notification: Full document shape used in POST and PUT request bodies, and returned inside the
1076-
GET response envelope.
1075+
notification: Core template fields used in POST and PUT request bodies (nested under a
1076+
`notification` key) and returned at the top level in responses.
10771077
10781078
state: Template state after update. Case-insensitive input, normalized to uppercase in
10791079
the response. Defaults to "DRAFT".
@@ -1100,7 +1100,7 @@ async def replace(
11001100
options=make_request_options(
11011101
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
11021102
),
1103-
cast_to=NotificationTemplateGetResponse,
1103+
cast_to=NotificationTemplateResponse,
11041104
)
11051105

11061106
async def retrieve_content(

src/courier/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
from .translation_retrieve_response import TranslationRetrieveResponse as TranslationRetrieveResponse
216216
from .audience_list_members_response import AudienceListMembersResponse as AudienceListMembersResponse
217217
from .notification_put_locale_params import NotificationPutLocaleParams as NotificationPutLocaleParams
218+
from .notification_template_response import NotificationTemplateResponse as NotificationTemplateResponse
218219
from .routing_strategy_create_params import RoutingStrategyCreateParams as RoutingStrategyCreateParams
219220
from .routing_strategy_list_response import RoutingStrategyListResponse as RoutingStrategyListResponse
220221
from .inbound_bulk_message_user_param import InboundBulkMessageUserParam as InboundBulkMessageUserParam
@@ -226,7 +227,6 @@
226227
from .notification_content_get_response import NotificationContentGetResponse as NotificationContentGetResponse
227228
from .notification_list_versions_params import NotificationListVersionsParams as NotificationListVersionsParams
228229
from .put_subscriptions_recipient_param import PutSubscriptionsRecipientParam as PutSubscriptionsRecipientParam
229-
from .notification_template_get_response import NotificationTemplateGetResponse as NotificationTemplateGetResponse
230230
from .notification_template_payload_param import NotificationTemplatePayloadParam as NotificationTemplatePayloadParam
231231
from .notification_retrieve_content_params import NotificationRetrieveContentParams as NotificationRetrieveContentParams
232232
from .associated_notification_list_response import (

src/courier/types/notification_create_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
class NotificationCreateParams(TypedDict, total=False):
1313
notification: Required[NotificationTemplatePayloadParam]
1414
"""
15-
Full document shape used in POST and PUT request bodies, and returned inside the
16-
GET response envelope.
15+
Core template fields used in POST and PUT request bodies (nested under a
16+
`notification` key) and returned at the top level in responses.
1717
"""
1818

1919
state: Literal["DRAFT", "PUBLISHED"]

0 commit comments

Comments
 (0)