From 2677204576bea283de2c5f7e17cad008a0ca497b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:04:30 +0000 Subject: [PATCH 01/13] chore: update SDK settings --- .github/workflows/publish-pypi.yml | 31 +++++++++ .github/workflows/release-doctor.yml | 21 ++++++ .release-please-manifest.json | 3 + .stats.yml | 2 +- CONTRIBUTING.md | 4 +- README.md | 14 ++-- bin/check-release-environment | 21 ++++++ pyproject.toml | 6 +- release-please-config.json | 66 +++++++++++++++++++ src/courier/_version.py | 2 +- src/courier/resources/audiences.py | 8 +-- src/courier/resources/audit_events.py | 8 +-- src/courier/resources/auth.py | 8 +-- .../resources/automations/automations.py | 8 +-- src/courier/resources/brands.py | 8 +-- src/courier/resources/bulk.py | 8 +-- src/courier/resources/inbound.py | 8 +-- src/courier/resources/lists/lists.py | 8 +-- src/courier/resources/lists/subscriptions.py | 8 +-- src/courier/resources/messages.py | 8 +-- src/courier/resources/notifications/checks.py | 8 +-- src/courier/resources/notifications/draft.py | 8 +-- .../resources/notifications/notifications.py | 8 +-- src/courier/resources/profiles/lists.py | 8 +-- src/courier/resources/profiles/profiles.py | 8 +-- src/courier/resources/requests.py | 8 +-- src/courier/resources/send.py | 8 +-- .../default_preferences.py | 8 +-- .../tenants/default_preferences/items.py | 8 +-- src/courier/resources/tenants/tenants.py | 8 +-- src/courier/resources/translations.py | 8 +-- src/courier/resources/users/preferences.py | 8 +-- src/courier/resources/users/tenants.py | 8 +-- src/courier/resources/users/tokens.py | 8 +-- src/courier/resources/users/users.py | 8 +-- 35 files changed, 256 insertions(+), 114 deletions(-) create mode 100644 .github/workflows/publish-pypi.yml create mode 100644 .github/workflows/release-doctor.yml create mode 100644 .release-please-manifest.json create mode 100644 bin/check-release-environment create mode 100644 release-please-config.json diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 00000000..696c4856 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,31 @@ +# This workflow is triggered when a GitHub release is created. +# It can also be run manually to re-publish to PyPI in case it failed for some reason. +# You can run this workflow by navigating to https://www.github.com/trycourier/courier-python/actions/workflows/publish-pypi.yml +name: Publish PyPI +on: + workflow_dispatch: + + release: + types: [published] + +jobs: + publish: + name: publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: '0.44.0' + RYE_INSTALL_OPTION: '--yes' + + - name: Publish to PyPI + run: | + bash ./bin/publish-pypi + env: + PYPI_TOKEN: ${{ secrets.COURIER_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml new file mode 100644 index 00000000..d247bf85 --- /dev/null +++ b/.github/workflows/release-doctor.yml @@ -0,0 +1,21 @@ +name: Release Doctor +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + release_doctor: + name: release doctor + runs-on: ubuntu-latest + if: github.repository == 'trycourier/courier-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + + steps: + - uses: actions/checkout@v4 + + - name: Check release environment + run: | + bash ./bin/check-release-environment + env: + PYPI_TOKEN: ${{ secrets.COURIER_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..1332969b --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.0.1" +} \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 30c36e88..701ad0cb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: b55b2c9e5e02889f4d064330de42fa3e +config_hash: bc694815ece73d3eac3f62025f8d2ffe diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33899b39..f1e3d0c9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```sh -$ pip install git+ssh://git@github.com/stainless-sdks/courier-python.git +$ pip install git+ssh://git@github.com/trycourier/courier-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -120,7 +120,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/stainless-sdks/courier-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/trycourier/courier-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index fc44891b..40befcd2 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ The full API of this library can be found in [api.md](api.md). ## Installation ```sh -# install from this staging repo -pip install git+ssh://git@github.com/stainless-sdks/courier-python.git +# install from the production repo +pip install git+ssh://git@github.com/trycourier/courier-python.git ``` > [!NOTE] @@ -89,8 +89,8 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv You can enable this by installing `aiohttp`: ```sh -# install from this staging repo -pip install 'courier[aiohttp] @ git+ssh://git@github.com/stainless-sdks/courier-python.git' +# install from the production repo +pip install 'courier[aiohttp] @ git+ssh://git@github.com/trycourier/courier-python.git' ``` Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: @@ -309,9 +309,9 @@ send = response.parse() # get the object that `send.send_message()` would have print(send.request_id) ``` -These methods return an [`APIResponse`](https://github.com/stainless-sdks/courier-python/tree/main/src/courier/_response.py) object. +These methods return an [`APIResponse`](https://github.com/trycourier/courier-python/tree/main/src/courier/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/courier-python/tree/main/src/courier/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/trycourier/courier-python/tree/main/src/courier/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -422,7 +422,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/courier-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/trycourier/courier-python/issues) with questions, bugs, or suggestions. ### Determining the installed version diff --git a/bin/check-release-environment b/bin/check-release-environment new file mode 100644 index 00000000..b845b0f4 --- /dev/null +++ b/bin/check-release-environment @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +errors=() + +if [ -z "${PYPI_TOKEN}" ]; then + errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") +fi + +lenErrors=${#errors[@]} + +if [[ lenErrors -gt 0 ]]; then + echo -e "Found the following errors in the release environment:\n" + + for error in "${errors[@]}"; do + echo -e "- $error\n" + done + + exit 1 +fi + +echo "The environment is ready to push releases!" diff --git a/pyproject.toml b/pyproject.toml index 344a3512..a876f732 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,8 +35,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/stainless-sdks/courier-python" -Repository = "https://github.com/stainless-sdks/courier-python" +Homepage = "https://github.com/trycourier/courier-python" +Repository = "https://github.com/trycourier/courier-python" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"] @@ -124,7 +124,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/stainless-sdks/courier-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/trycourier/courier-python/tree/main/\g<2>)' [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..eb8148d4 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,66 @@ +{ + "packages": { + ".": {} + }, + "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "include-v-in-tag": true, + "include-component-in-tag": false, + "versioning": "prerelease", + "prerelease": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "pull-request-header": "Automated Release PR", + "pull-request-title-pattern": "release: ${version}", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "chore", + "section": "Chores" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "refactor", + "section": "Refactors" + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "release-type": "python", + "extra-files": [ + "src/courier/_version.py" + ] +} \ No newline at end of file diff --git a/src/courier/_version.py b/src/courier/_version.py index 6701d5c8..30017fcc 100644 --- a/src/courier/_version.py +++ b/src/courier/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "courier" -__version__ = "0.0.1" +__version__ = "0.0.1" # x-release-please-version diff --git a/src/courier/resources/audiences.py b/src/courier/resources/audiences.py index 7554043b..473249e7 100644 --- a/src/courier/resources/audiences.py +++ b/src/courier/resources/audiences.py @@ -34,7 +34,7 @@ def with_raw_response(self) -> AudiencesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AudiencesResourceWithRawResponse(self) @@ -43,7 +43,7 @@ def with_streaming_response(self) -> AudiencesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AudiencesResourceWithStreamingResponse(self) @@ -249,7 +249,7 @@ def with_raw_response(self) -> AsyncAudiencesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncAudiencesResourceWithRawResponse(self) @@ -258,7 +258,7 @@ def with_streaming_response(self) -> AsyncAudiencesResourceWithStreamingResponse """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncAudiencesResourceWithStreamingResponse(self) diff --git a/src/courier/resources/audit_events.py b/src/courier/resources/audit_events.py index 667e0f2b..48d31d55 100644 --- a/src/courier/resources/audit_events.py +++ b/src/courier/resources/audit_events.py @@ -31,7 +31,7 @@ def with_raw_response(self) -> AuditEventsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AuditEventsResourceWithRawResponse(self) @@ -40,7 +40,7 @@ def with_streaming_response(self) -> AuditEventsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AuditEventsResourceWithStreamingResponse(self) @@ -122,7 +122,7 @@ def with_raw_response(self) -> AsyncAuditEventsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncAuditEventsResourceWithRawResponse(self) @@ -131,7 +131,7 @@ def with_streaming_response(self) -> AsyncAuditEventsResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncAuditEventsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/auth.py b/src/courier/resources/auth.py index e1e25ab9..58b76279 100644 --- a/src/courier/resources/auth.py +++ b/src/courier/resources/auth.py @@ -30,7 +30,7 @@ def with_raw_response(self) -> AuthResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AuthResourceWithRawResponse(self) @@ -39,7 +39,7 @@ def with_streaming_response(self) -> AuthResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AuthResourceWithStreamingResponse(self) @@ -105,7 +105,7 @@ def with_raw_response(self) -> AsyncAuthResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncAuthResourceWithRawResponse(self) @@ -114,7 +114,7 @@ def with_streaming_response(self) -> AsyncAuthResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncAuthResourceWithStreamingResponse(self) diff --git a/src/courier/resources/automations/automations.py b/src/courier/resources/automations/automations.py index ed1f58ea..7a5f1921 100644 --- a/src/courier/resources/automations/automations.py +++ b/src/courier/resources/automations/automations.py @@ -30,7 +30,7 @@ def with_raw_response(self) -> AutomationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AutomationsResourceWithRawResponse(self) @@ -39,7 +39,7 @@ def with_streaming_response(self) -> AutomationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AutomationsResourceWithStreamingResponse(self) @@ -150,7 +150,7 @@ def with_raw_response(self) -> AsyncAutomationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncAutomationsResourceWithRawResponse(self) @@ -159,7 +159,7 @@ def with_streaming_response(self) -> AsyncAutomationsResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncAutomationsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/brands.py b/src/courier/resources/brands.py index 9f51af88..974ca1a7 100644 --- a/src/courier/resources/brands.py +++ b/src/courier/resources/brands.py @@ -33,7 +33,7 @@ def with_raw_response(self) -> BrandsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return BrandsResourceWithRawResponse(self) @@ -42,7 +42,7 @@ def with_streaming_response(self) -> BrandsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return BrandsResourceWithStreamingResponse(self) @@ -249,7 +249,7 @@ def with_raw_response(self) -> AsyncBrandsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncBrandsResourceWithRawResponse(self) @@ -258,7 +258,7 @@ def with_streaming_response(self) -> AsyncBrandsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncBrandsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/bulk.py b/src/courier/resources/bulk.py index 35556582..9b055cc6 100644 --- a/src/courier/resources/bulk.py +++ b/src/courier/resources/bulk.py @@ -34,7 +34,7 @@ def with_raw_response(self) -> BulkResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return BulkResourceWithRawResponse(self) @@ -43,7 +43,7 @@ def with_streaming_response(self) -> BulkResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return BulkResourceWithStreamingResponse(self) @@ -231,7 +231,7 @@ def with_raw_response(self) -> AsyncBulkResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncBulkResourceWithRawResponse(self) @@ -240,7 +240,7 @@ def with_streaming_response(self) -> AsyncBulkResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncBulkResourceWithStreamingResponse(self) diff --git a/src/courier/resources/inbound.py b/src/courier/resources/inbound.py index 47124a59..4c1a58c9 100644 --- a/src/courier/resources/inbound.py +++ b/src/courier/resources/inbound.py @@ -31,7 +31,7 @@ def with_raw_response(self) -> InboundResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return InboundResourceWithRawResponse(self) @@ -40,7 +40,7 @@ def with_streaming_response(self) -> InboundResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return InboundResourceWithStreamingResponse(self) @@ -106,7 +106,7 @@ def with_raw_response(self) -> AsyncInboundResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncInboundResourceWithRawResponse(self) @@ -115,7 +115,7 @@ def with_streaming_response(self) -> AsyncInboundResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncInboundResourceWithStreamingResponse(self) diff --git a/src/courier/resources/lists/lists.py b/src/courier/resources/lists/lists.py index c79606ef..3db68ff3 100644 --- a/src/courier/resources/lists/lists.py +++ b/src/courier/resources/lists/lists.py @@ -44,7 +44,7 @@ def with_raw_response(self) -> ListsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return ListsResourceWithRawResponse(self) @@ -53,7 +53,7 @@ def with_streaming_response(self) -> ListsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return ListsResourceWithStreamingResponse(self) @@ -262,7 +262,7 @@ def with_raw_response(self) -> AsyncListsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncListsResourceWithRawResponse(self) @@ -271,7 +271,7 @@ def with_streaming_response(self) -> AsyncListsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncListsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/lists/subscriptions.py b/src/courier/resources/lists/subscriptions.py index c5fb434d..a2e86025 100644 --- a/src/courier/resources/lists/subscriptions.py +++ b/src/courier/resources/lists/subscriptions.py @@ -37,7 +37,7 @@ def with_raw_response(self) -> SubscriptionsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return SubscriptionsResourceWithRawResponse(self) @@ -46,7 +46,7 @@ def with_streaming_response(self) -> SubscriptionsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return SubscriptionsResourceWithStreamingResponse(self) @@ -252,7 +252,7 @@ def with_raw_response(self) -> AsyncSubscriptionsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncSubscriptionsResourceWithRawResponse(self) @@ -261,7 +261,7 @@ def with_streaming_response(self) -> AsyncSubscriptionsResourceWithStreamingResp """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncSubscriptionsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/messages.py b/src/courier/resources/messages.py index 27870c10..7a92fcee 100644 --- a/src/courier/resources/messages.py +++ b/src/courier/resources/messages.py @@ -34,7 +34,7 @@ def with_raw_response(self) -> MessagesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return MessagesResourceWithRawResponse(self) @@ -43,7 +43,7 @@ def with_streaming_response(self) -> MessagesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return MessagesResourceWithStreamingResponse(self) @@ -302,7 +302,7 @@ def with_raw_response(self) -> AsyncMessagesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncMessagesResourceWithRawResponse(self) @@ -311,7 +311,7 @@ def with_streaming_response(self) -> AsyncMessagesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncMessagesResourceWithStreamingResponse(self) diff --git a/src/courier/resources/notifications/checks.py b/src/courier/resources/notifications/checks.py index f840a9a3..cf5bf8e7 100644 --- a/src/courier/resources/notifications/checks.py +++ b/src/courier/resources/notifications/checks.py @@ -32,7 +32,7 @@ def with_raw_response(self) -> ChecksResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return ChecksResourceWithRawResponse(self) @@ -41,7 +41,7 @@ def with_streaming_response(self) -> ChecksResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return ChecksResourceWithStreamingResponse(self) @@ -158,7 +158,7 @@ def with_raw_response(self) -> AsyncChecksResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncChecksResourceWithRawResponse(self) @@ -167,7 +167,7 @@ def with_streaming_response(self) -> AsyncChecksResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncChecksResourceWithStreamingResponse(self) diff --git a/src/courier/resources/notifications/draft.py b/src/courier/resources/notifications/draft.py index b40b182d..bbbab8db 100644 --- a/src/courier/resources/notifications/draft.py +++ b/src/courier/resources/notifications/draft.py @@ -26,7 +26,7 @@ def with_raw_response(self) -> DraftResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return DraftResourceWithRawResponse(self) @@ -35,7 +35,7 @@ def with_streaming_response(self) -> DraftResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return DraftResourceWithStreamingResponse(self) @@ -78,7 +78,7 @@ def with_raw_response(self) -> AsyncDraftResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncDraftResourceWithRawResponse(self) @@ -87,7 +87,7 @@ def with_streaming_response(self) -> AsyncDraftResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncDraftResourceWithStreamingResponse(self) diff --git a/src/courier/resources/notifications/notifications.py b/src/courier/resources/notifications/notifications.py index 8ba48321..6347bba3 100644 --- a/src/courier/resources/notifications/notifications.py +++ b/src/courier/resources/notifications/notifications.py @@ -55,7 +55,7 @@ def with_raw_response(self) -> NotificationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return NotificationsResourceWithRawResponse(self) @@ -64,7 +64,7 @@ def with_streaming_response(self) -> NotificationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return NotificationsResourceWithStreamingResponse(self) @@ -157,7 +157,7 @@ def with_raw_response(self) -> AsyncNotificationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncNotificationsResourceWithRawResponse(self) @@ -166,7 +166,7 @@ def with_streaming_response(self) -> AsyncNotificationsResourceWithStreamingResp """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncNotificationsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/profiles/lists.py b/src/courier/resources/profiles/lists.py index f8622557..cf58e969 100644 --- a/src/courier/resources/profiles/lists.py +++ b/src/courier/resources/profiles/lists.py @@ -32,7 +32,7 @@ def with_raw_response(self) -> ListsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return ListsResourceWithRawResponse(self) @@ -41,7 +41,7 @@ def with_streaming_response(self) -> ListsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return ListsResourceWithStreamingResponse(self) @@ -163,7 +163,7 @@ def with_raw_response(self) -> AsyncListsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncListsResourceWithRawResponse(self) @@ -172,7 +172,7 @@ def with_streaming_response(self) -> AsyncListsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncListsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/profiles/profiles.py b/src/courier/resources/profiles/profiles.py index 13c659a3..0ff7ffa3 100644 --- a/src/courier/resources/profiles/profiles.py +++ b/src/courier/resources/profiles/profiles.py @@ -44,7 +44,7 @@ def with_raw_response(self) -> ProfilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return ProfilesResourceWithRawResponse(self) @@ -53,7 +53,7 @@ def with_streaming_response(self) -> ProfilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return ProfilesResourceWithStreamingResponse(self) @@ -249,7 +249,7 @@ def with_raw_response(self) -> AsyncProfilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncProfilesResourceWithRawResponse(self) @@ -258,7 +258,7 @@ def with_streaming_response(self) -> AsyncProfilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncProfilesResourceWithStreamingResponse(self) diff --git a/src/courier/resources/requests.py b/src/courier/resources/requests.py index f1723356..677f793d 100644 --- a/src/courier/resources/requests.py +++ b/src/courier/resources/requests.py @@ -25,7 +25,7 @@ def with_raw_response(self) -> RequestsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return RequestsResourceWithRawResponse(self) @@ -34,7 +34,7 @@ def with_streaming_response(self) -> RequestsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return RequestsResourceWithStreamingResponse(self) @@ -80,7 +80,7 @@ def with_raw_response(self) -> AsyncRequestsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncRequestsResourceWithRawResponse(self) @@ -89,7 +89,7 @@ def with_streaming_response(self) -> AsyncRequestsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncRequestsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/send.py b/src/courier/resources/send.py index 766b5c27..fbad7710 100644 --- a/src/courier/resources/send.py +++ b/src/courier/resources/send.py @@ -29,7 +29,7 @@ def with_raw_response(self) -> SendResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return SendResourceWithRawResponse(self) @@ -38,7 +38,7 @@ def with_streaming_response(self) -> SendResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return SendResourceWithStreamingResponse(self) @@ -84,7 +84,7 @@ def with_raw_response(self) -> AsyncSendResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncSendResourceWithRawResponse(self) @@ -93,7 +93,7 @@ def with_streaming_response(self) -> AsyncSendResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncSendResourceWithStreamingResponse(self) diff --git a/src/courier/resources/tenants/default_preferences/default_preferences.py b/src/courier/resources/tenants/default_preferences/default_preferences.py index 3019ab39..88917a35 100644 --- a/src/courier/resources/tenants/default_preferences/default_preferences.py +++ b/src/courier/resources/tenants/default_preferences/default_preferences.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> DefaultPreferencesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return DefaultPreferencesResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> DefaultPreferencesResourceWithStreamingResp """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return DefaultPreferencesResourceWithStreamingResponse(self) @@ -52,7 +52,7 @@ def with_raw_response(self) -> AsyncDefaultPreferencesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncDefaultPreferencesResourceWithRawResponse(self) @@ -61,7 +61,7 @@ def with_streaming_response(self) -> AsyncDefaultPreferencesResourceWithStreamin """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncDefaultPreferencesResourceWithStreamingResponse(self) diff --git a/src/courier/resources/tenants/default_preferences/items.py b/src/courier/resources/tenants/default_preferences/items.py index 67d376ae..8aa38ebd 100644 --- a/src/courier/resources/tenants/default_preferences/items.py +++ b/src/courier/resources/tenants/default_preferences/items.py @@ -31,7 +31,7 @@ def with_raw_response(self) -> ItemsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return ItemsResourceWithRawResponse(self) @@ -40,7 +40,7 @@ def with_streaming_response(self) -> ItemsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return ItemsResourceWithStreamingResponse(self) @@ -143,7 +143,7 @@ def with_raw_response(self) -> AsyncItemsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncItemsResourceWithRawResponse(self) @@ -152,7 +152,7 @@ def with_streaming_response(self) -> AsyncItemsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncItemsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/tenants/tenants.py b/src/courier/resources/tenants/tenants.py index b222b751..f8386f15 100644 --- a/src/courier/resources/tenants/tenants.py +++ b/src/courier/resources/tenants/tenants.py @@ -45,7 +45,7 @@ def with_raw_response(self) -> TenantsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return TenantsResourceWithRawResponse(self) @@ -54,7 +54,7 @@ def with_streaming_response(self) -> TenantsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return TenantsResourceWithStreamingResponse(self) @@ -299,7 +299,7 @@ def with_raw_response(self) -> AsyncTenantsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncTenantsResourceWithRawResponse(self) @@ -308,7 +308,7 @@ def with_streaming_response(self) -> AsyncTenantsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncTenantsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/translations.py b/src/courier/resources/translations.py index 05693c7d..cd3fed95 100644 --- a/src/courier/resources/translations.py +++ b/src/courier/resources/translations.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> TranslationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return TranslationsResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> TranslationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return TranslationsResourceWithStreamingResponse(self) @@ -123,7 +123,7 @@ def with_raw_response(self) -> AsyncTranslationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncTranslationsResourceWithRawResponse(self) @@ -132,7 +132,7 @@ def with_streaming_response(self) -> AsyncTranslationsResourceWithStreamingRespo """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncTranslationsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/users/preferences.py b/src/courier/resources/users/preferences.py index e9fecdad..2c05bc71 100644 --- a/src/courier/resources/users/preferences.py +++ b/src/courier/resources/users/preferences.py @@ -36,7 +36,7 @@ def with_raw_response(self) -> PreferencesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return PreferencesResourceWithRawResponse(self) @@ -45,7 +45,7 @@ def with_streaming_response(self) -> PreferencesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return PreferencesResourceWithStreamingResponse(self) @@ -192,7 +192,7 @@ def with_raw_response(self) -> AsyncPreferencesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncPreferencesResourceWithRawResponse(self) @@ -201,7 +201,7 @@ def with_streaming_response(self) -> AsyncPreferencesResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncPreferencesResourceWithStreamingResponse(self) diff --git a/src/courier/resources/users/tenants.py b/src/courier/resources/users/tenants.py index c326586c..1fa37aba 100644 --- a/src/courier/resources/users/tenants.py +++ b/src/courier/resources/users/tenants.py @@ -31,7 +31,7 @@ def with_raw_response(self) -> TenantsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return TenantsResourceWithRawResponse(self) @@ -40,7 +40,7 @@ def with_streaming_response(self) -> TenantsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return TenantsResourceWithStreamingResponse(self) @@ -253,7 +253,7 @@ def with_raw_response(self) -> AsyncTenantsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncTenantsResourceWithRawResponse(self) @@ -262,7 +262,7 @@ def with_streaming_response(self) -> AsyncTenantsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncTenantsResourceWithStreamingResponse(self) diff --git a/src/courier/resources/users/tokens.py b/src/courier/resources/users/tokens.py index 9a64d0a8..be75ade4 100644 --- a/src/courier/resources/users/tokens.py +++ b/src/courier/resources/users/tokens.py @@ -32,7 +32,7 @@ def with_raw_response(self) -> TokensResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return TokensResourceWithRawResponse(self) @@ -41,7 +41,7 @@ def with_streaming_response(self) -> TokensResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return TokensResourceWithStreamingResponse(self) @@ -297,7 +297,7 @@ def with_raw_response(self) -> AsyncTokensResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncTokensResourceWithRawResponse(self) @@ -306,7 +306,7 @@ def with_streaming_response(self) -> AsyncTokensResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncTokensResourceWithStreamingResponse(self) diff --git a/src/courier/resources/users/users.py b/src/courier/resources/users/users.py index 7e30648f..185580b7 100644 --- a/src/courier/resources/users/users.py +++ b/src/courier/resources/users/users.py @@ -51,7 +51,7 @@ def with_raw_response(self) -> UsersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return UsersResourceWithRawResponse(self) @@ -60,7 +60,7 @@ def with_streaming_response(self) -> UsersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return UsersResourceWithStreamingResponse(self) @@ -84,7 +84,7 @@ def with_raw_response(self) -> AsyncUsersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/stainless-sdks/courier-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/trycourier/courier-python#accessing-raw-response-data-eg-headers """ return AsyncUsersResourceWithRawResponse(self) @@ -93,7 +93,7 @@ def with_streaming_response(self) -> AsyncUsersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/stainless-sdks/courier-python#with_streaming_response + For more information, see https://www.github.com/trycourier/courier-python#with_streaming_response """ return AsyncUsersResourceWithStreamingResponse(self) From beb33e80cef778926acd0942086028fdf47d576d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:04:52 +0000 Subject: [PATCH 02/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 701ad0cb..7e55a881 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: bc694815ece73d3eac3f62025f8d2ffe +config_hash: 381e1c6d531344004ac7898cebe4b842 From ab66fbe30550f0890fc9db8cd55fed090ed3ebd7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:05:14 +0000 Subject: [PATCH 03/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7e55a881..d32da0ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: 381e1c6d531344004ac7898cebe4b842 +config_hash: c84a706be3f7921abb3279d7364a2d7b From 220c6af611cc5f7245faee2f1d71249205b8f4ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:10:39 +0000 Subject: [PATCH 04/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d32da0ff..21c97a60 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: c84a706be3f7921abb3279d7364a2d7b +config_hash: d97e46bac2e674b08f6e1f661c9c837d From ad292d4bb899594b9000e3c4c8a059e007854bbb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:55:17 +0000 Subject: [PATCH 05/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 21c97a60..cad74b14 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: d97e46bac2e674b08f6e1f661c9c837d +config_hash: f4c65a60addbed19f59da9b66b7f9998 From d6fd62b464325b66c9e17afe50835283d7ecf276 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 20:33:33 +0000 Subject: [PATCH 06/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index cad74b14..27731e1b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: f4c65a60addbed19f59da9b66b7f9998 +config_hash: 95eeff6eb3e84bae51819c372640d9ae From 51a28efc4e1d20328556ae691fe4a768bbb277b4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 21:20:05 +0000 Subject: [PATCH 07/13] feat(api): manual updates Send name change --- .stats.yml | 2 +- README.md | 18 ++++----- api.md | 4 +- src/courier/resources/send.py | 36 +++++++++--------- src/courier/types/__init__.py | 4 +- ...ssage_params.py => send_message_params.py} | 4 +- ...e_response.py => send_message_response.py} | 4 +- tests/api_resources/test_send.py | 38 +++++++++---------- tests/test_client.py | 20 +++++----- 9 files changed, 65 insertions(+), 65 deletions(-) rename src/courier/types/{send_send_message_params.py => send_message_params.py} (77%) rename src/courier/types/{send_send_message_response.py => send_message_response.py} (91%) diff --git a/.stats.yml b/.stats.yml index 27731e1b..56b45225 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: 95eeff6eb3e84bae51819c372640d9ae +config_hash: d99e176269a6a45a76f40d093dbdf91d diff --git a/README.md b/README.md index 40befcd2..97f1d319 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ client = Courier( api_key=os.environ.get("COURIER_API_KEY"), # This is the default and can be omitted ) -response = client.send.send_message( +response = client.send.message( message={ "content": { "elements": [{}], @@ -66,7 +66,7 @@ client = AsyncCourier( async def main() -> None: - response = await client.send.send_message( + response = await client.send.message( message={ "content": { "elements": [{}], @@ -106,7 +106,7 @@ async def main() -> None: api_key="My API Key", http_client=DefaultAioHttpClient(), ) as client: - response = await client.send.send_message( + response = await client.send.message( message={ "content": { "elements": [{}], @@ -167,7 +167,7 @@ from courier import Courier client = Courier() try: - client.send.send_message( + client.send.message( message={ "content": { "elements": [{}], @@ -217,7 +217,7 @@ client = Courier( ) # Or, configure per-request: -client.with_options(max_retries=5).send.send_message( +client.with_options(max_retries=5).send.message( message={ "content": { "elements": [{}], @@ -247,7 +247,7 @@ client = Courier( ) # Override per-request: -client.with_options(timeout=5.0).send.send_message( +client.with_options(timeout=5.0).send.message( message={ "content": { "elements": [{}], @@ -295,7 +295,7 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to from courier import Courier client = Courier() -response = client.send.with_raw_response.send_message( +response = client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -305,7 +305,7 @@ response = client.send.with_raw_response.send_message( ) print(response.headers.get('X-My-Header')) -send = response.parse() # get the object that `send.send_message()` would have returned +send = response.parse() # get the object that `send.message()` would have returned print(send.request_id) ``` @@ -320,7 +320,7 @@ The above interface eagerly reads the full response body when you make the reque To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods. ```python -with client.send.with_streaming_response.send_message( +with client.send.with_streaming_response.message( message={ "content": { "elements": [{}], diff --git a/api.md b/api.md index e55019ae..9dd9665d 100644 --- a/api.md +++ b/api.md @@ -17,13 +17,13 @@ from courier.types import ( RoutingMethod, SlackBaseProperties, Utm, - SendSendMessageResponse, + SendMessageResponse, ) ``` Methods: -- client.send.send_message(\*\*params) -> SendSendMessageResponse +- client.send.message(\*\*params) -> SendMessageResponse # Audiences diff --git a/src/courier/resources/send.py b/src/courier/resources/send.py index fbad7710..d9e02fc1 100644 --- a/src/courier/resources/send.py +++ b/src/courier/resources/send.py @@ -4,7 +4,7 @@ import httpx -from ..types import send_send_message_params +from ..types import send_message_params from .._types import Body, Query, Headers, NotGiven, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -17,7 +17,7 @@ ) from .._base_client import make_request_options from ..types.message_param import MessageParam -from ..types.send_send_message_response import SendSendMessageResponse +from ..types.send_message_response import SendMessageResponse __all__ = ["SendResource", "AsyncSendResource"] @@ -42,7 +42,7 @@ def with_streaming_response(self) -> SendResourceWithStreamingResponse: """ return SendResourceWithStreamingResponse(self) - def send_message( + def message( self, *, message: MessageParam, @@ -52,7 +52,7 @@ def send_message( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SendSendMessageResponse: + ) -> SendMessageResponse: """ Use the send API to send a message to one or more recipients. @@ -69,11 +69,11 @@ def send_message( """ return self._post( "/send", - body=maybe_transform({"message": message}, send_send_message_params.SendSendMessageParams), + body=maybe_transform({"message": message}, send_message_params.SendMessageParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=SendSendMessageResponse, + cast_to=SendMessageResponse, ) @@ -97,7 +97,7 @@ def with_streaming_response(self) -> AsyncSendResourceWithStreamingResponse: """ return AsyncSendResourceWithStreamingResponse(self) - async def send_message( + async def message( self, *, message: MessageParam, @@ -107,7 +107,7 @@ async def send_message( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SendSendMessageResponse: + ) -> SendMessageResponse: """ Use the send API to send a message to one or more recipients. @@ -124,11 +124,11 @@ async def send_message( """ return await self._post( "/send", - body=await async_maybe_transform({"message": message}, send_send_message_params.SendSendMessageParams), + body=await async_maybe_transform({"message": message}, send_message_params.SendMessageParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=SendSendMessageResponse, + cast_to=SendMessageResponse, ) @@ -136,8 +136,8 @@ class SendResourceWithRawResponse: def __init__(self, send: SendResource) -> None: self._send = send - self.send_message = to_raw_response_wrapper( - send.send_message, + self.message = to_raw_response_wrapper( + send.message, ) @@ -145,8 +145,8 @@ class AsyncSendResourceWithRawResponse: def __init__(self, send: AsyncSendResource) -> None: self._send = send - self.send_message = async_to_raw_response_wrapper( - send.send_message, + self.message = async_to_raw_response_wrapper( + send.message, ) @@ -154,8 +154,8 @@ class SendResourceWithStreamingResponse: def __init__(self, send: SendResource) -> None: self._send = send - self.send_message = to_streamed_response_wrapper( - send.send_message, + self.message = to_streamed_response_wrapper( + send.message, ) @@ -163,6 +163,6 @@ class AsyncSendResourceWithStreamingResponse: def __init__(self, send: AsyncSendResource) -> None: self._send = send - self.send_message = async_to_streamed_response_wrapper( - send.send_message, + self.message = async_to_streamed_response_wrapper( + send.message, ) diff --git a/src/courier/types/__init__.py b/src/courier/types/__init__.py index 7bdf08e9..f01ec212 100644 --- a/src/courier/types/__init__.py +++ b/src/courier/types/__init__.py @@ -51,6 +51,7 @@ from .default_preferences import DefaultPreferences as DefaultPreferences from .filter_config_param import FilterConfigParam as FilterConfigParam from .message_list_params import MessageListParams as MessageListParams +from .send_message_params import SendMessageParams as SendMessageParams from .audience_list_params import AudienceListParams as AudienceListParams from .brand_settings_param import BrandSettingsParam as BrandSettingsParam from .brand_snippets_param import BrandSnippetsParam as BrandSnippetsParam @@ -66,6 +67,7 @@ from .message_list_response import MessageListResponse as MessageListResponse from .profile_create_params import ProfileCreateParams as ProfileCreateParams from .profile_update_params import ProfileUpdateParams as ProfileUpdateParams +from .send_message_response import SendMessageResponse as SendMessageResponse from .audience_list_response import AudienceListResponse as AudienceListResponse from .audience_update_params import AudienceUpdateParams as AudienceUpdateParams from .bulk_create_job_params import BulkCreateJobParams as BulkCreateJobParams @@ -84,7 +86,6 @@ from .notification_get_content import NotificationGetContent as NotificationGetContent from .notification_list_params import NotificationListParams as NotificationListParams from .profile_replace_response import ProfileReplaceResponse as ProfileReplaceResponse -from .send_send_message_params import SendSendMessageParams as SendSendMessageParams from .tenant_list_users_params import TenantListUsersParams as TenantListUsersParams from .audit_event_list_response import AuditEventListResponse as AuditEventListResponse from .auth_issue_token_response import AuthIssueTokenResponse as AuthIssueTokenResponse @@ -100,7 +101,6 @@ from .inbound_track_event_params import InboundTrackEventParams as InboundTrackEventParams from .nested_filter_config_param import NestedFilterConfigParam as NestedFilterConfigParam from .notification_list_response import NotificationListResponse as NotificationListResponse -from .send_send_message_response import SendSendMessageResponse as SendSendMessageResponse from .tenant_list_users_response import TenantListUsersResponse as TenantListUsersResponse from .slack_base_properties_param import SlackBasePropertiesParam as SlackBasePropertiesParam from .audience_list_members_params import AudienceListMembersParams as AudienceListMembersParams diff --git a/src/courier/types/send_send_message_params.py b/src/courier/types/send_message_params.py similarity index 77% rename from src/courier/types/send_send_message_params.py rename to src/courier/types/send_message_params.py index 116d7554..61f93df8 100644 --- a/src/courier/types/send_send_message_params.py +++ b/src/courier/types/send_message_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["SendSendMessageParams"] +__all__ = ["SendMessageParams"] -class SendSendMessageParams(TypedDict, total=False): +class SendMessageParams(TypedDict, total=False): message: Required["MessageParam"] """Defines the message to be delivered""" diff --git a/src/courier/types/send_send_message_response.py b/src/courier/types/send_message_response.py similarity index 91% rename from src/courier/types/send_send_message_response.py rename to src/courier/types/send_message_response.py index eebbbceb..c6e1c445 100644 --- a/src/courier/types/send_send_message_response.py +++ b/src/courier/types/send_message_response.py @@ -4,10 +4,10 @@ from .._models import BaseModel -__all__ = ["SendSendMessageResponse"] +__all__ = ["SendMessageResponse"] -class SendSendMessageResponse(BaseModel): +class SendMessageResponse(BaseModel): request_id: str = FieldInfo(alias="requestId") """ A successful call to `POST /send` returns a `202` status code along with a diff --git a/tests/api_resources/test_send.py b/tests/api_resources/test_send.py index e0f17407..9bfaf2f2 100644 --- a/tests/api_resources/test_send.py +++ b/tests/api_resources/test_send.py @@ -9,7 +9,7 @@ from courier import Courier, AsyncCourier from tests.utils import assert_matches_type -from courier.types import SendSendMessageResponse +from courier.types import SendMessageResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,8 +19,8 @@ class TestSend: @pytest.mark.skip(reason="Prism tests are disabled") @parametrize - def test_method_send_message(self, client: Courier) -> None: - send = client.send.send_message( + def test_method_message(self, client: Courier) -> None: + send = client.send.message( message={ "content": { "elements": [{}], @@ -28,12 +28,12 @@ def test_method_send_message(self, client: Courier) -> None: } }, ) - assert_matches_type(SendSendMessageResponse, send, path=["response"]) + assert_matches_type(SendMessageResponse, send, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize - def test_raw_response_send_message(self, client: Courier) -> None: - response = client.send.with_raw_response.send_message( + def test_raw_response_message(self, client: Courier) -> None: + response = client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -45,12 +45,12 @@ def test_raw_response_send_message(self, client: Courier) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" send = response.parse() - assert_matches_type(SendSendMessageResponse, send, path=["response"]) + assert_matches_type(SendMessageResponse, send, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize - def test_streaming_response_send_message(self, client: Courier) -> None: - with client.send.with_streaming_response.send_message( + def test_streaming_response_message(self, client: Courier) -> None: + with client.send.with_streaming_response.message( message={ "content": { "elements": [{}], @@ -62,7 +62,7 @@ def test_streaming_response_send_message(self, client: Courier) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" send = response.parse() - assert_matches_type(SendSendMessageResponse, send, path=["response"]) + assert_matches_type(SendMessageResponse, send, path=["response"]) assert cast(Any, response.is_closed) is True @@ -74,8 +74,8 @@ class TestAsyncSend: @pytest.mark.skip(reason="Prism tests are disabled") @parametrize - async def test_method_send_message(self, async_client: AsyncCourier) -> None: - send = await async_client.send.send_message( + async def test_method_message(self, async_client: AsyncCourier) -> None: + send = await async_client.send.message( message={ "content": { "elements": [{}], @@ -83,12 +83,12 @@ async def test_method_send_message(self, async_client: AsyncCourier) -> None: } }, ) - assert_matches_type(SendSendMessageResponse, send, path=["response"]) + assert_matches_type(SendMessageResponse, send, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize - async def test_raw_response_send_message(self, async_client: AsyncCourier) -> None: - response = await async_client.send.with_raw_response.send_message( + async def test_raw_response_message(self, async_client: AsyncCourier) -> None: + response = await async_client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -100,12 +100,12 @@ async def test_raw_response_send_message(self, async_client: AsyncCourier) -> No assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" send = await response.parse() - assert_matches_type(SendSendMessageResponse, send, path=["response"]) + assert_matches_type(SendMessageResponse, send, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize - async def test_streaming_response_send_message(self, async_client: AsyncCourier) -> None: - async with async_client.send.with_streaming_response.send_message( + async def test_streaming_response_message(self, async_client: AsyncCourier) -> None: + async with async_client.send.with_streaming_response.message( message={ "content": { "elements": [{}], @@ -117,6 +117,6 @@ async def test_streaming_response_send_message(self, async_client: AsyncCourier) assert response.http_request.headers.get("X-Stainless-Lang") == "python" send = await response.parse() - assert_matches_type(SendSendMessageResponse, send, path=["response"]) + assert_matches_type(SendMessageResponse, send, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/test_client.py b/tests/test_client.py index c2b944c0..0a0ce01b 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -715,7 +715,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien respx_mock.post("/send").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - client.send.with_streaming_response.send_message( + client.send.with_streaming_response.message( message={ "content": { "elements": [{}], @@ -732,7 +732,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client respx_mock.post("/send").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - client.send.with_streaming_response.send_message( + client.send.with_streaming_response.message( message={ "content": { "elements": [{}], @@ -768,7 +768,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/send").mock(side_effect=retry_handler) - response = client.send.with_raw_response.send_message( + response = client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -799,7 +799,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/send").mock(side_effect=retry_handler) - response = client.send.with_raw_response.send_message( + response = client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -830,7 +830,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/send").mock(side_effect=retry_handler) - response = client.send.with_raw_response.send_message( + response = client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -1569,7 +1569,7 @@ async def test_retrying_timeout_errors_doesnt_leak( respx_mock.post("/send").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - await async_client.send.with_streaming_response.send_message( + await async_client.send.with_streaming_response.message( message={ "content": { "elements": [{}], @@ -1586,7 +1586,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, respx_mock.post("/send").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - await async_client.send.with_streaming_response.send_message( + await async_client.send.with_streaming_response.message( message={ "content": { "elements": [{}], @@ -1623,7 +1623,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/send").mock(side_effect=retry_handler) - response = await client.send.with_raw_response.send_message( + response = await client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -1655,7 +1655,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/send").mock(side_effect=retry_handler) - response = await client.send.with_raw_response.send_message( + response = await client.send.with_raw_response.message( message={ "content": { "elements": [{}], @@ -1687,7 +1687,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/send").mock(side_effect=retry_handler) - response = await client.send.with_raw_response.send_message( + response = await client.send.with_raw_response.message( message={ "content": { "elements": [{}], From dec4195de0270ae67e3f0e23369f355f229f41df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 21:32:37 +0000 Subject: [PATCH 08/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 56b45225..857df84a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: d99e176269a6a45a76f40d093dbdf91d +config_hash: 378bde789aaf92394a1aa4fe02fe0063 From 024edd29f6582dc462e654b614505c1c89889ce3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 21:36:37 +0000 Subject: [PATCH 09/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 857df84a..faebbcb8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: 378bde789aaf92394a1aa4fe02fe0063 +config_hash: 5e00923835ae1232d2c1ee8b18be2548 From 724778fbb126eab4557c73217a53bc511b502adf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 21:43:55 +0000 Subject: [PATCH 10/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index faebbcb8..70b71825 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: 5e00923835ae1232d2c1ee8b18be2548 +config_hash: 6308a26568cc14808d687505c6cd4280 From 2e6a07ab17a63673de30d2dd088a492e1ecf5073 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 16:47:41 +0000 Subject: [PATCH 11/13] feat(api): manual updates --- .stats.yml | 2 +- README.md | 60 +++++++++++++++++++++++++----------------------------- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/.stats.yml b/.stats.yml index 70b71825..4b15b6a4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: 6308a26568cc14808d687505c6cd4280 +config_hash: effd99dd6c72790f75bceb1021a91e47 diff --git a/README.md b/README.md index 97f1d319..190add5a 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,9 @@ client = Courier( response = client.send.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": {"user_id": "your_user_id"}, + "template": "your_template", + "data": {"foo": "bar"}, }, ) print(response.request_id) @@ -68,10 +67,9 @@ client = AsyncCourier( async def main() -> None: response = await client.send.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": {"user_id": "your_user_id"}, + "template": "your_template", + "data": {"foo": "bar"}, }, ) print(response.request_id) @@ -108,10 +106,9 @@ async def main() -> None: ) as client: response = await client.send.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": {"user_id": "your_user_id"}, + "template": "your_template", + "data": {"foo": "bar"}, }, ) print(response.request_id) @@ -169,10 +166,9 @@ client = Courier() try: client.send.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": {"user_id": "your_user_id"}, + "template": "your_template", + "data": {"foo": "bar"}, }, ) except courier.APIConnectionError as e: @@ -219,10 +215,9 @@ client = Courier( # Or, configure per-request: client.with_options(max_retries=5).send.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": {"user_id": "your_user_id"}, + "template": "your_template", + "data": {"foo": "bar"}, }, ) ``` @@ -249,10 +244,9 @@ client = Courier( # Override per-request: client.with_options(timeout=5.0).send.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": {"user_id": "your_user_id"}, + "template": "your_template", + "data": {"foo": "bar"}, }, ) ``` @@ -297,10 +291,13 @@ from courier import Courier client = Courier() response = client.send.with_raw_response.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": { + "user_id": "your_user_id" + }, + "template": "your_template", + "data": { + "foo": "bar" + }, }, ) print(response.headers.get('X-My-Header')) @@ -322,10 +319,9 @@ To stream the response body, use `.with_streaming_response` instead, which requi ```python with client.send.with_streaming_response.message( message={ - "content": { - "elements": [{}], - "version": "version", - } + "to": {"user_id": "your_user_id"}, + "template": "your_template", + "data": {"foo": "bar"}, }, ) as response: print(response.headers.get("X-My-Header")) From 3317d9ec8f294d05ddd89e3b2e7f5da9a8716127 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 18:30:33 +0000 Subject: [PATCH 12/13] chore: update SDK settings --- .stats.yml | 2 +- README.md | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4b15b6a4..3a90d69d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 75 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9edfa04d0cd081138f4834ed9b8d45403d7ee75a5f02f8eecc8e45575df21bb8.yml openapi_spec_hash: 195e8cd1061046ffc3009f50262d92b2 -config_hash: effd99dd6c72790f75bceb1021a91e47 +config_hash: e7f646e730e7b27205b2bd6a6dc3e572 diff --git a/README.md b/README.md index 190add5a..8be321b4 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,10 @@ The full API of this library can be found in [api.md](api.md). ## Installation ```sh -# install from the production repo -pip install git+ssh://git@github.com/trycourier/courier-python.git +# install from PyPI +pip install courier ``` -> [!NOTE] -> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install courier` - ## Usage The full API of this library can be found in [api.md](api.md). @@ -87,8 +84,8 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv You can enable this by installing `aiohttp`: ```sh -# install from the production repo -pip install 'courier[aiohttp] @ git+ssh://git@github.com/trycourier/courier-python.git' +# install from PyPI +pip install courier[aiohttp] ``` Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: From 9d78261be8baec47da06c47fffde2c6d5080d3ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 18:30:50 +0000 Subject: [PATCH 13/13] release: 6.4.0-alpha0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 20 ++++++++++++++++++++ README.md | 4 ++-- pyproject.toml | 2 +- src/courier/_version.py | 2 +- 5 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1332969b..2efa7124 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.1" + ".": "6.4.0-alpha0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..47208418 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +## 6.4.0-alpha0 (2025-10-02) + +Full Changelog: [v0.0.1...v6.4.0-alpha0](https://github.com/trycourier/courier-python/compare/v0.0.1...v6.4.0-alpha0) + +### Features + +* **api:** manual updates ([2e6a07a](https://github.com/trycourier/courier-python/commit/2e6a07ab17a63673de30d2dd088a492e1ecf5073)) +* **api:** manual updates ([51a28ef](https://github.com/trycourier/courier-python/commit/51a28efc4e1d20328556ae691fe4a768bbb277b4)) +* **api:** manual updates ([b16bac2](https://github.com/trycourier/courier-python/commit/b16bac2553d106e3ddc040bdfe3beac79f8c0408)) +* **api:** manual updates ([cd9ed1b](https://github.com/trycourier/courier-python/commit/cd9ed1b563215b6896734669bd041c091f0db29a)) + + +### Chores + +* configure new SDK language ([f004f07](https://github.com/trycourier/courier-python/commit/f004f07aabba46f78d7834c62b4ef1ce4ec11759)) +* **internal:** codegen related update ([6fb395b](https://github.com/trycourier/courier-python/commit/6fb395bb3062bb749130c8f6345fbfcd693d2584)) +* update SDK settings ([3317d9e](https://github.com/trycourier/courier-python/commit/3317d9ec8f294d05ddd89e3b2e7f5da9a8716127)) +* update SDK settings ([2677204](https://github.com/trycourier/courier-python/commit/2677204576bea283de2c5f7e17cad008a0ca497b)) diff --git a/README.md b/README.md index 8be321b4..de3168f1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The full API of this library can be found in [api.md](api.md). ```sh # install from PyPI -pip install courier +pip install --pre courier ``` ## Usage @@ -85,7 +85,7 @@ You can enable this by installing `aiohttp`: ```sh # install from PyPI -pip install courier[aiohttp] +pip install --pre courier[aiohttp] ``` Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: diff --git a/pyproject.toml b/pyproject.toml index a876f732..4d6c3c4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "courier" -version = "0.0.1" +version = "6.4.0-alpha0" description = "The official Python library for the courier API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/courier/_version.py b/src/courier/_version.py index 30017fcc..950a0d6e 100644 --- a/src/courier/_version.py +++ b/src/courier/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "courier" -__version__ = "0.0.1" # x-release-please-version +__version__ = "6.4.0-alpha0" # x-release-please-version