Skip to content

feat(api): update via SDK Studio #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 12 additions & 1 deletion bin/check-release-environment
Original file line number Diff line number Diff line change
@@ -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[@]}
Expand Down
4 changes: 2 additions & 2 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
16 changes: 8 additions & 8 deletions tests/api_resources/contacts/test_companies.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,22 @@ 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"])

@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
Expand All @@ -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"
Expand Down Expand Up @@ -230,22 +230,22 @@ 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"])

@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
Expand All @@ -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"
Expand Down