Skip to content

Commit 638c48b

Browse files
committed
feat(api): update via SDK Studio
1 parent bce089e commit 638c48b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1697
-1450
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 109
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/intercom%2Fintercom-d17455c223bf0fd303bc315e4af87966adb063bfb2d5c5ec53ac7336cae26448.yml
1+
configured_endpoints: 107
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/intercom%2Fintercom-8db47de304da2cbdfa6db6fd50025e9d1d4ade3d8e75569120483556b1583be6.yml

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,5 +505,3 @@ Methods:
505505
- <code title="get /visitors">client.visitors.<a href="./src/intercom/resources/visitors.py">retrieve</a>(\*\*<a href="src/intercom/types/visitor_retrieve_params.py">params</a>) -> <a href="./src/intercom/types/visitor.py">Optional</a></code>
506506
- <code title="put /visitors">client.visitors.<a href="./src/intercom/resources/visitors.py">update</a>(\*\*<a href="src/intercom/types/visitor_update_params.py">params</a>) -> <a href="./src/intercom/types/visitor.py">Optional</a></code>
507507
- <code title="post /visitors/convert">client.visitors.<a href="./src/intercom/resources/visitors.py">convert</a>(\*\*<a href="src/intercom/types/visitor_convert_params.py">params</a>) -> <a href="./src/intercom/types/shared/contact.py">Contact</a></code>
508-
- <code title="delete /visitors/{id}">client.visitors.<a href="./src/intercom/resources/visitors.py">delete_by_id</a>(id) -> <a href="./src/intercom/types/visitor_deleted_object.py">VisitorDeletedObject</a></code>
509-
- <code title="get /visitors/{id}">client.visitors.<a href="./src/intercom/resources/visitors.py">retrieve_by_id</a>(id) -> <a href="./src/intercom/types/visitor.py">Optional</a></code>

src/intercom/resources/companies/companies.py

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,18 @@ def create(
8686
"""
8787
You can create or update a company.
8888
89-
> 📘 Companies with no users
90-
>
91-
> Companies will be only visible in Intercom when there is at least one
92-
> associated user.
89+
Companies will be only visible in Intercom when there is at least one associated
90+
user.
9391
9492
Companies are looked up via `company_id` in a `POST` request, if not found via
9593
`company_id`, the new company will be created, if found, that company will be
9694
updated.
9795
96+
{% admonition type="attention" name="Using `company_id`" %} You can set a unique
97+
`company_id` value when creating a company. However, it is not possible to
98+
update `company_id`. Be sure to set a unique value once upon creation of the
99+
company. {% /admonition %}
100+
98101
Args:
99102
company_id: The company id you have defined for the company. Can't be updated
100103
@@ -193,7 +196,11 @@ def update(
193196
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
194197
) -> Company:
195198
"""
196-
You can update a single company
199+
You can update a single company using the Intercom provisioned `id`.
200+
201+
{% admonition type="attention" name="Using `company_id`" %} When updating a
202+
company it is not possible to update `company_id`. This can only be set once
203+
upon creation of the company. {% /admonition %}
197204
198205
Args:
199206
extra_headers: Send extra headers
@@ -217,10 +224,9 @@ def update(
217224
def list(
218225
self,
219226
*,
220-
filter: company_list_params.Filter,
221227
order: str | NotGiven = NOT_GIVEN,
222-
page: str | NotGiven = NOT_GIVEN,
223-
per_page: str | NotGiven = NOT_GIVEN,
228+
page: int | NotGiven = NOT_GIVEN,
229+
per_page: int | NotGiven = NOT_GIVEN,
224230
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
225231
# The extra values given here take precedence over values defined on the client or passed to this method.
226232
extra_headers: Headers | None = None,
@@ -236,22 +242,23 @@ def list(
236242
Note that the API does not include companies who have no associated users in
237243
list responses.
238244
239-
> 📘
240-
>
241-
> When using the Companies endpoint and the pages object to iterate through the
242-
> returned companies, there is a limit of 10,000 Companies that can be returned.
243-
> If you need to list or iterate on more than 10,000 Companies, please use the
244-
> [Scroll API](https://developers.intercom.com/reference#iterating-over-all-companies).
245+
When using the Companies endpoint and the pages object to iterate through the
246+
returned companies, there is a limit of 10,000 Companies that can be returned.
247+
If you need to list or iterate on more than 10,000 Companies, please use the
248+
[Scroll API](https://developers.intercom.com/reference#iterating-over-all-companies).
249+
{% admonition type="warning" name="Pagination" %} You can use pagination to
250+
limit the number of results returned. The default is `20` results per page. See
251+
the
252+
[pagination section](https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/pagination/#pagination-for-list-apis)
253+
for more details on how to use the `starting_after` param. {% /admonition %}
245254
246255
Args:
247-
filter: The `id` of the tag to filter by.
248-
249256
order: `asc` or `desc`. Return the companies in ascending or descending order. Defaults
250257
to desc
251258
252-
page: what page of results to fetch. Defaults to first page
259+
page: The page of results to fetch. Defaults to first page
253260
254-
per_page: how many results per page. Defaults to 15
261+
per_page: How many results to return per page. Defaults to 15
255262
256263
extra_headers: Send extra headers
257264
@@ -270,7 +277,6 @@ def list(
270277
timeout=timeout,
271278
query=maybe_transform(
272279
{
273-
"filter": filter,
274280
"order": order,
275281
"page": page,
276282
"per_page": per_page,
@@ -335,22 +341,16 @@ def scroll(
335341
- If the end of the scroll is reached, "companies" will be empty and the scroll
336342
parameter will expire
337343
338-
> 📘 Scroll Parameter
339-
>
340-
> You can get the first page of companies by simply sending a GET request to the
341-
> scroll endpoint. For subsequent requests you will need to use the scroll
342-
> parameter from the response.
343-
344-
> ❗️ Scroll network timeouts
345-
>
346-
> Since scroll is often used on large datasets network errors such as timeouts
347-
> can be encountered. When this occurs you will need to restart your scroll
348-
> query as it is not possible to continue from a specific point when using
349-
> scroll.
350-
>
351-
> When this occurs you will see a HTTP 500 error with the following message:
352-
> "Request failed due to an internal network error. Please restart the scroll
353-
> operation."
344+
{% admonition type="info" name="Scroll Parameter" %} You can get the first page
345+
of companies by simply sending a GET request to the scroll endpoint. For
346+
subsequent requests you will need to use the scroll parameter from the response.
347+
{% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %}
348+
Since scroll is often used on large datasets network errors such as timeouts can
349+
be encountered. When this occurs you will see a HTTP 500 error with the
350+
following message: "Request failed due to an internal network error. Please
351+
restart the scroll operation." If this happens, you will need to restart your
352+
scroll query: It is not possible to continue from a specific point when using
353+
scroll. {% /admonition %}
354354
355355
Args:
356356
extra_headers: Send extra headers
@@ -413,15 +413,18 @@ async def create(
413413
"""
414414
You can create or update a company.
415415
416-
> 📘 Companies with no users
417-
>
418-
> Companies will be only visible in Intercom when there is at least one
419-
> associated user.
416+
Companies will be only visible in Intercom when there is at least one associated
417+
user.
420418
421419
Companies are looked up via `company_id` in a `POST` request, if not found via
422420
`company_id`, the new company will be created, if found, that company will be
423421
updated.
424422
423+
{% admonition type="attention" name="Using `company_id`" %} You can set a unique
424+
`company_id` value when creating a company. However, it is not possible to
425+
update `company_id`. Be sure to set a unique value once upon creation of the
426+
company. {% /admonition %}
427+
425428
Args:
426429
company_id: The company id you have defined for the company. Can't be updated
427430
@@ -520,7 +523,11 @@ async def update(
520523
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
521524
) -> Company:
522525
"""
523-
You can update a single company
526+
You can update a single company using the Intercom provisioned `id`.
527+
528+
{% admonition type="attention" name="Using `company_id`" %} When updating a
529+
company it is not possible to update `company_id`. This can only be set once
530+
upon creation of the company. {% /admonition %}
524531
525532
Args:
526533
extra_headers: Send extra headers
@@ -544,10 +551,9 @@ async def update(
544551
async def list(
545552
self,
546553
*,
547-
filter: company_list_params.Filter,
548554
order: str | NotGiven = NOT_GIVEN,
549-
page: str | NotGiven = NOT_GIVEN,
550-
per_page: str | NotGiven = NOT_GIVEN,
555+
page: int | NotGiven = NOT_GIVEN,
556+
per_page: int | NotGiven = NOT_GIVEN,
551557
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
552558
# The extra values given here take precedence over values defined on the client or passed to this method.
553559
extra_headers: Headers | None = None,
@@ -563,22 +569,23 @@ async def list(
563569
Note that the API does not include companies who have no associated users in
564570
list responses.
565571
566-
> 📘
567-
>
568-
> When using the Companies endpoint and the pages object to iterate through the
569-
> returned companies, there is a limit of 10,000 Companies that can be returned.
570-
> If you need to list or iterate on more than 10,000 Companies, please use the
571-
> [Scroll API](https://developers.intercom.com/reference#iterating-over-all-companies).
572+
When using the Companies endpoint and the pages object to iterate through the
573+
returned companies, there is a limit of 10,000 Companies that can be returned.
574+
If you need to list or iterate on more than 10,000 Companies, please use the
575+
[Scroll API](https://developers.intercom.com/reference#iterating-over-all-companies).
576+
{% admonition type="warning" name="Pagination" %} You can use pagination to
577+
limit the number of results returned. The default is `20` results per page. See
578+
the
579+
[pagination section](https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/pagination/#pagination-for-list-apis)
580+
for more details on how to use the `starting_after` param. {% /admonition %}
572581
573582
Args:
574-
filter: The `id` of the tag to filter by.
575-
576583
order: `asc` or `desc`. Return the companies in ascending or descending order. Defaults
577584
to desc
578585
579-
page: what page of results to fetch. Defaults to first page
586+
page: The page of results to fetch. Defaults to first page
580587
581-
per_page: how many results per page. Defaults to 15
588+
per_page: How many results to return per page. Defaults to 15
582589
583590
extra_headers: Send extra headers
584591
@@ -597,7 +604,6 @@ async def list(
597604
timeout=timeout,
598605
query=await async_maybe_transform(
599606
{
600-
"filter": filter,
601607
"order": order,
602608
"page": page,
603609
"per_page": per_page,
@@ -662,22 +668,16 @@ async def scroll(
662668
- If the end of the scroll is reached, "companies" will be empty and the scroll
663669
parameter will expire
664670
665-
> 📘 Scroll Parameter
666-
>
667-
> You can get the first page of companies by simply sending a GET request to the
668-
> scroll endpoint. For subsequent requests you will need to use the scroll
669-
> parameter from the response.
670-
671-
> ❗️ Scroll network timeouts
672-
>
673-
> Since scroll is often used on large datasets network errors such as timeouts
674-
> can be encountered. When this occurs you will need to restart your scroll
675-
> query as it is not possible to continue from a specific point when using
676-
> scroll.
677-
>
678-
> When this occurs you will see a HTTP 500 error with the following message:
679-
> "Request failed due to an internal network error. Please restart the scroll
680-
> operation."
671+
{% admonition type="info" name="Scroll Parameter" %} You can get the first page
672+
of companies by simply sending a GET request to the scroll endpoint. For
673+
subsequent requests you will need to use the scroll parameter from the response.
674+
{% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %}
675+
Since scroll is often used on large datasets network errors such as timeouts can
676+
be encountered. When this occurs you will see a HTTP 500 error with the
677+
following message: "Request failed due to an internal network error. Please
678+
restart the scroll operation." If this happens, you will need to restart your
679+
scroll query: It is not possible to continue from a specific point when using
680+
scroll. {% /admonition %}
681681
682682
Args:
683683
extra_headers: Send extra headers

0 commit comments

Comments
 (0)