Skip to content

Commit dfd8fba

Browse files
committed
feat(api): update via SDK Studio
1 parent 0bd7ae4 commit dfd8fba

File tree

11 files changed

+55
-54
lines changed

11 files changed

+55
-54
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 108
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/intercom%2Fintercom-8db47de304da2cbdfa6db6fd50025e9d1d4ade3d8e75569120483556b1583be6.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/intercom%2Fintercom-52f67643df9a7d7b1390beca7892a18bd840aaedd848c5f8ee79d9fd9a666c99.yml

api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Methods:
4747

4848
- <code title="get /admins/{id}">client.admins.<a href="./src/intercom/resources/admins/admins.py">retrieve</a>(id) -> <a href="./src/intercom/types/shared/admin.py">Optional</a></code>
4949
- <code title="get /admins">client.admins.<a href="./src/intercom/resources/admins/admins.py">list</a>() -> <a href="./src/intercom/types/admin_list.py">AdminList</a></code>
50-
- <code title="put /admins/{id}/away">client.admins.<a href="./src/intercom/resources/admins/admins.py">away</a>(id, \*\*<a href="src/intercom/types/admin_away_params.py">params</a>) -> <a href="./src/intercom/types/shared/admin.py">Optional</a></code>
50+
- <code title="put /admins/{id}/away">client.admins.<a href="./src/intercom/resources/admins/admins.py">set_away</a>(id, \*\*<a href="src/intercom/types/admin_set_away_params.py">params</a>) -> <a href="./src/intercom/types/shared/admin.py">Optional</a></code>
5151

5252
## ActivityLogs
5353

@@ -85,7 +85,7 @@ Methods:
8585
Types:
8686

8787
```python
88-
from intercom.types.help_center import Collection, CollectionList, DeletedCollectionObject
88+
from intercom.types.help_center import Collection, CollectionList, DeletedCollection
8989
```
9090

9191
Methods:
@@ -94,7 +94,7 @@ Methods:
9494
- <code title="get /help_center/collections/{id}">client.help_center.collections.<a href="./src/intercom/resources/help_center/collections.py">retrieve</a>(id) -> <a href="./src/intercom/types/help_center/collection.py">Collection</a></code>
9595
- <code title="put /help_center/collections/{id}">client.help_center.collections.<a href="./src/intercom/resources/help_center/collections.py">update</a>(id, \*\*<a href="src/intercom/types/help_center/collection_update_params.py">params</a>) -> <a href="./src/intercom/types/help_center/collection.py">Collection</a></code>
9696
- <code title="get /help_center/collections">client.help_center.collections.<a href="./src/intercom/resources/help_center/collections.py">list</a>() -> <a href="./src/intercom/types/help_center/collection_list.py">CollectionList</a></code>
97-
- <code title="delete /help_center/collections/{id}">client.help_center.collections.<a href="./src/intercom/resources/help_center/collections.py">delete</a>(id) -> <a href="./src/intercom/types/help_center/deleted_collection_object.py">DeletedCollectionObject</a></code>
97+
- <code title="delete /help_center/collections/{id}">client.help_center.collections.<a href="./src/intercom/resources/help_center/collections.py">delete</a>(id) -> <a href="./src/intercom/types/help_center/deleted_collection.py">DeletedCollection</a></code>
9898

9999
## HelpCenters
100100

src/intercom/resources/admins/admins.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ...types import admin_away_params
10+
from ...types import admin_set_away_params
1111
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1212
from ..._utils import (
1313
maybe_transform,
@@ -163,7 +163,7 @@ def list(
163163
cast_to=AdminList,
164164
)
165165

166-
def away(
166+
def set_away(
167167
self,
168168
id: int,
169169
*,
@@ -224,7 +224,7 @@ def away(
224224
"away_mode_enabled": away_mode_enabled,
225225
"away_mode_reassign": away_mode_reassign,
226226
},
227-
admin_away_params.AdminAwayParams,
227+
admin_set_away_params.AdminSetAwayParams,
228228
),
229229
options=make_request_options(
230230
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -357,7 +357,7 @@ async def list(
357357
cast_to=AdminList,
358358
)
359359

360-
async def away(
360+
async def set_away(
361361
self,
362362
id: int,
363363
*,
@@ -418,7 +418,7 @@ async def away(
418418
"away_mode_enabled": away_mode_enabled,
419419
"away_mode_reassign": away_mode_reassign,
420420
},
421-
admin_away_params.AdminAwayParams,
421+
admin_set_away_params.AdminSetAwayParams,
422422
),
423423
options=make_request_options(
424424
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -437,8 +437,8 @@ def __init__(self, admins: AdminsResource) -> None:
437437
self.list = to_raw_response_wrapper(
438438
admins.list,
439439
)
440-
self.away = to_raw_response_wrapper(
441-
admins.away,
440+
self.set_away = to_raw_response_wrapper(
441+
admins.set_away,
442442
)
443443

444444
@cached_property
@@ -456,8 +456,8 @@ def __init__(self, admins: AsyncAdminsResource) -> None:
456456
self.list = async_to_raw_response_wrapper(
457457
admins.list,
458458
)
459-
self.away = async_to_raw_response_wrapper(
460-
admins.away,
459+
self.set_away = async_to_raw_response_wrapper(
460+
admins.set_away,
461461
)
462462

463463
@cached_property
@@ -475,8 +475,8 @@ def __init__(self, admins: AdminsResource) -> None:
475475
self.list = to_streamed_response_wrapper(
476476
admins.list,
477477
)
478-
self.away = to_streamed_response_wrapper(
479-
admins.away,
478+
self.set_away = to_streamed_response_wrapper(
479+
admins.set_away,
480480
)
481481

482482
@cached_property
@@ -494,8 +494,8 @@ def __init__(self, admins: AsyncAdminsResource) -> None:
494494
self.list = async_to_streamed_response_wrapper(
495495
admins.list,
496496
)
497-
self.away = async_to_streamed_response_wrapper(
498-
admins.away,
497+
self.set_away = async_to_streamed_response_wrapper(
498+
admins.set_away,
499499
)
500500

501501
@cached_property

src/intercom/resources/help_center/collections.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from ...types.help_center import collection_create_params, collection_update_params
2929
from ...types.help_center.collection import Collection
3030
from ...types.help_center.collection_list import CollectionList
31-
from ...types.help_center.deleted_collection_object import DeletedCollectionObject
31+
from ...types.help_center.deleted_collection import DeletedCollection
3232

3333
__all__ = ["CollectionsResource", "AsyncCollectionsResource"]
3434

@@ -358,7 +358,7 @@ def delete(
358358
extra_query: Query | None = None,
359359
extra_body: Body | None = None,
360360
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
361-
) -> DeletedCollectionObject:
361+
) -> DeletedCollection:
362362
"""
363363
You can delete a single collection by making a DELETE request to
364364
`https://api.intercom.io/collections/<id>`.
@@ -381,7 +381,7 @@ def delete(
381381
options=make_request_options(
382382
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
383383
),
384-
cast_to=DeletedCollectionObject,
384+
cast_to=DeletedCollection,
385385
)
386386

387387

@@ -710,7 +710,7 @@ async def delete(
710710
extra_query: Query | None = None,
711711
extra_body: Body | None = None,
712712
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
713-
) -> DeletedCollectionObject:
713+
) -> DeletedCollection:
714714
"""
715715
You can delete a single collection by making a DELETE request to
716716
`https://api.intercom.io/collections/<id>`.
@@ -733,7 +733,7 @@ async def delete(
733733
options=make_request_options(
734734
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
735735
),
736-
cast_to=DeletedCollectionObject,
736+
cast_to=DeletedCollection,
737737
)
738738

739739

src/intercom/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from .contact_deleted import ContactDeleted as ContactDeleted
4444
from .contact_archived import ContactArchived as ContactArchived
4545
from .ticket_type_list import TicketTypeList as TicketTypeList
46-
from .admin_away_params import AdminAwayParams as AdminAwayParams
4746
from .conversation_list import ConversationList as ConversationList
4847
from .contact_unarchived import ContactUnarchived as ContactUnarchived
4948
from .data_event_summary import DataEventSummary as DataEventSummary
@@ -54,6 +53,7 @@
5453
from .contact_merge_params import ContactMergeParams as ContactMergeParams
5554
from .ticket_create_params import TicketCreateParams as TicketCreateParams
5655
from .ticket_search_params import TicketSearchParams as TicketSearchParams
56+
from .admin_set_away_params import AdminSetAwayParams as AdminSetAwayParams
5757
from .article_create_params import ArticleCreateParams as ArticleCreateParams
5858
from .article_search_params import ArticleSearchParams as ArticleSearchParams
5959
from .article_update_params import ArticleUpdateParams as ArticleUpdateParams

src/intercom/types/admin_away_params.py renamed to src/intercom/types/admin_set_away_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
from .._utils import PropertyInfo
88

9-
__all__ = ["AdminAwayParams"]
9+
__all__ = ["AdminSetAwayParams"]
1010

1111

12-
class AdminAwayParams(TypedDict, total=False):
12+
class AdminSetAwayParams(TypedDict, total=False):
1313
away_mode_enabled: Required[bool]
1414
"""Set to "true" to change the status of the admin to away."""
1515

src/intercom/types/help_center/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
from .help_center import HelpCenter as HelpCenter
77
from .collection_list import CollectionList as CollectionList
88
from .help_center_list import HelpCenterList as HelpCenterList
9+
from .deleted_collection import DeletedCollection as DeletedCollection
910
from .collection_create_params import CollectionCreateParams as CollectionCreateParams
1011
from .collection_update_params import CollectionUpdateParams as CollectionUpdateParams
11-
from .deleted_collection_object import DeletedCollectionObject as DeletedCollectionObject

src/intercom/types/help_center/deleted_collection_object.py renamed to src/intercom/types/help_center/deleted_collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
from ..._models import BaseModel
77

8-
__all__ = ["DeletedCollectionObject"]
8+
__all__ = ["DeletedCollection"]
99

1010

11-
class DeletedCollectionObject(BaseModel):
11+
class DeletedCollection(BaseModel):
1212
id: Optional[str] = None
1313
"""The unique identifier for the collection which you provided in the URL."""
1414

src/intercom/types/shared/company.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Dict, List, Optional
44
from typing_extensions import Literal
55

6+
from .tag import Tag
67
from ..segment import Segment
78
from ..._models import BaseModel
89

@@ -28,7 +29,7 @@ class Segments(BaseModel):
2829

2930

3031
class Tags(BaseModel):
31-
tags: Optional[List[object]] = None
32+
tags: Optional[List[Tag]] = None
3233

3334
type: Optional[Literal["tag.list"]] = None
3435
"""The type of the object"""

tests/api_resources/help_center/test_collections.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from intercom.types.help_center import (
1313
Collection,
1414
CollectionList,
15-
DeletedCollectionObject,
15+
DeletedCollection,
1616
)
1717

1818
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -557,15 +557,15 @@ def test_method_delete(self, client: Intercom) -> None:
557557
collection = client.help_center.collections.delete(
558558
0,
559559
)
560-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
560+
assert_matches_type(DeletedCollection, collection, path=["response"])
561561

562562
@parametrize
563563
def test_method_delete_with_all_params(self, client: Intercom) -> None:
564564
collection = client.help_center.collections.delete(
565565
0,
566566
intercom_version="2.11",
567567
)
568-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
568+
assert_matches_type(DeletedCollection, collection, path=["response"])
569569

570570
@parametrize
571571
def test_raw_response_delete(self, client: Intercom) -> None:
@@ -576,7 +576,7 @@ def test_raw_response_delete(self, client: Intercom) -> None:
576576
assert response.is_closed is True
577577
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
578578
collection = response.parse()
579-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
579+
assert_matches_type(DeletedCollection, collection, path=["response"])
580580

581581
@parametrize
582582
def test_streaming_response_delete(self, client: Intercom) -> None:
@@ -587,7 +587,7 @@ def test_streaming_response_delete(self, client: Intercom) -> None:
587587
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
588588

589589
collection = response.parse()
590-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
590+
assert_matches_type(DeletedCollection, collection, path=["response"])
591591

592592
assert cast(Any, response.is_closed) is True
593593

@@ -1131,15 +1131,15 @@ async def test_method_delete(self, async_client: AsyncIntercom) -> None:
11311131
collection = await async_client.help_center.collections.delete(
11321132
0,
11331133
)
1134-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
1134+
assert_matches_type(DeletedCollection, collection, path=["response"])
11351135

11361136
@parametrize
11371137
async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None:
11381138
collection = await async_client.help_center.collections.delete(
11391139
0,
11401140
intercom_version="2.11",
11411141
)
1142-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
1142+
assert_matches_type(DeletedCollection, collection, path=["response"])
11431143

11441144
@parametrize
11451145
async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None:
@@ -1150,7 +1150,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None:
11501150
assert response.is_closed is True
11511151
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
11521152
collection = await response.parse()
1153-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
1153+
assert_matches_type(DeletedCollection, collection, path=["response"])
11541154

11551155
@parametrize
11561156
async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None:
@@ -1161,6 +1161,6 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N
11611161
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
11621162

11631163
collection = await response.parse()
1164-
assert_matches_type(DeletedCollectionObject, collection, path=["response"])
1164+
assert_matches_type(DeletedCollection, collection, path=["response"])
11651165

11661166
assert cast(Any, response.is_closed) is True

tests/api_resources/test_admins.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ def test_streaming_response_list(self, client: Intercom) -> None:
9090
assert cast(Any, response.is_closed) is True
9191

9292
@parametrize
93-
def test_method_away(self, client: Intercom) -> None:
94-
admin = client.admins.away(
93+
def test_method_set_away(self, client: Intercom) -> None:
94+
admin = client.admins.set_away(
9595
0,
9696
away_mode_enabled=True,
9797
away_mode_reassign=True,
9898
)
9999
assert_matches_type(Optional[Admin], admin, path=["response"])
100100

101101
@parametrize
102-
def test_method_away_with_all_params(self, client: Intercom) -> None:
103-
admin = client.admins.away(
102+
def test_method_set_away_with_all_params(self, client: Intercom) -> None:
103+
admin = client.admins.set_away(
104104
0,
105105
away_mode_enabled=True,
106106
away_mode_reassign=True,
@@ -109,8 +109,8 @@ def test_method_away_with_all_params(self, client: Intercom) -> None:
109109
assert_matches_type(Optional[Admin], admin, path=["response"])
110110

111111
@parametrize
112-
def test_raw_response_away(self, client: Intercom) -> None:
113-
response = client.admins.with_raw_response.away(
112+
def test_raw_response_set_away(self, client: Intercom) -> None:
113+
response = client.admins.with_raw_response.set_away(
114114
0,
115115
away_mode_enabled=True,
116116
away_mode_reassign=True,
@@ -122,8 +122,8 @@ def test_raw_response_away(self, client: Intercom) -> None:
122122
assert_matches_type(Optional[Admin], admin, path=["response"])
123123

124124
@parametrize
125-
def test_streaming_response_away(self, client: Intercom) -> None:
126-
with client.admins.with_streaming_response.away(
125+
def test_streaming_response_set_away(self, client: Intercom) -> None:
126+
with client.admins.with_streaming_response.set_away(
127127
0,
128128
away_mode_enabled=True,
129129
away_mode_reassign=True,
@@ -212,17 +212,17 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non
212212
assert cast(Any, response.is_closed) is True
213213

214214
@parametrize
215-
async def test_method_away(self, async_client: AsyncIntercom) -> None:
216-
admin = await async_client.admins.away(
215+
async def test_method_set_away(self, async_client: AsyncIntercom) -> None:
216+
admin = await async_client.admins.set_away(
217217
0,
218218
away_mode_enabled=True,
219219
away_mode_reassign=True,
220220
)
221221
assert_matches_type(Optional[Admin], admin, path=["response"])
222222

223223
@parametrize
224-
async def test_method_away_with_all_params(self, async_client: AsyncIntercom) -> None:
225-
admin = await async_client.admins.away(
224+
async def test_method_set_away_with_all_params(self, async_client: AsyncIntercom) -> None:
225+
admin = await async_client.admins.set_away(
226226
0,
227227
away_mode_enabled=True,
228228
away_mode_reassign=True,
@@ -231,8 +231,8 @@ async def test_method_away_with_all_params(self, async_client: AsyncIntercom) ->
231231
assert_matches_type(Optional[Admin], admin, path=["response"])
232232

233233
@parametrize
234-
async def test_raw_response_away(self, async_client: AsyncIntercom) -> None:
235-
response = await async_client.admins.with_raw_response.away(
234+
async def test_raw_response_set_away(self, async_client: AsyncIntercom) -> None:
235+
response = await async_client.admins.with_raw_response.set_away(
236236
0,
237237
away_mode_enabled=True,
238238
away_mode_reassign=True,
@@ -244,8 +244,8 @@ async def test_raw_response_away(self, async_client: AsyncIntercom) -> None:
244244
assert_matches_type(Optional[Admin], admin, path=["response"])
245245

246246
@parametrize
247-
async def test_streaming_response_away(self, async_client: AsyncIntercom) -> None:
248-
async with async_client.admins.with_streaming_response.away(
247+
async def test_streaming_response_set_away(self, async_client: AsyncIntercom) -> None:
248+
async with async_client.admins.with_streaming_response.set_away(
249249
0,
250250
away_mode_enabled=True,
251251
away_mode_reassign=True,

0 commit comments

Comments
 (0)