From 35af217c3ce6fb0ac47aa0ecde8a08a99b4819ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 17:51:29 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#263) --- .stats.yml | 2 +- bin/check-release-environment | 13 ++++++++++++- scripts/mock | 4 ++-- tests/api_resources/contacts/test_companies.py | 16 ++++++++-------- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 75bc5ebf..d3cca5f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 108 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/intercom%2Fintercom-61fd2f21fb0fb6a94c5e87ea423d828bf37d1dd90ca1511eda9b91d58ccb5d39.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/intercom%2Fintercom-a52cc0e4313a38d4329e6c2f40afa341d800389762fc643b9bf5b13248f8c5da.yml diff --git a/bin/check-release-environment b/bin/check-release-environment index 688f9f7e..b99d829c 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -1,9 +1,20 @@ #!/usr/bin/env bash +warnings=() errors=() if [ -z "${PYPI_TOKEN}" ]; then - errors+=("The INTERCOM_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") + warnings+=("The INTERCOM_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") +fi + +lenWarnings=${#warnings[@]} + +if [[ lenWarnings -gt 0 ]]; then + echo -e "Found the following warnings in the release environment:\n" + + for warning in "${warnings[@]}"; do + echo -e "- $warning\n" + done fi lenErrors=${#errors[@]} diff --git a/scripts/mock b/scripts/mock index f5861576..fe89a1d0 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" fi diff --git a/tests/api_resources/contacts/test_companies.py b/tests/api_resources/contacts/test_companies.py index 71a0abab..9dab6c9a 100644 --- a/tests/api_resources/contacts/test_companies.py +++ b/tests/api_resources/contacts/test_companies.py @@ -72,14 +72,14 @@ def test_path_params_create(self, client: Intercom) -> None: @parametrize def test_method_list(self, client: Intercom) -> None: company = client.contacts.companies.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: company = client.contacts.companies.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @@ -87,7 +87,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.contacts.companies.with_raw_response.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -98,7 +98,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.contacts.companies.with_streaming_response.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -230,14 +230,14 @@ async def test_path_params_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @@ -245,7 +245,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.companies.with_raw_response.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -256,7 +256,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.companies.with_streaming_response.list( - contact_id="contact_id", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python"