Skip to content

Commit 5a4660f

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#33)
1 parent 268e767 commit 5a4660f

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
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: 70
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-eacc19681b584d12739c5775cf012c0a50792f7cf1e12d80d28d2ac0786a896f.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-55b1b1224cfcd2083a3df4a1752689ebf1b16821d0baeef75030854010fd6cd4.yml

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ from asktable.types import AnswerModel, Message, Policy
99
Types:
1010

1111
```python
12-
from asktable.types import SecureTunnel, SecuretunnelUpdateResponse, SecuretunnelListResponse
12+
from asktable.types import SecureTunnel, SecuretunnelListResponse
1313
```
1414

1515
Methods:
1616

1717
- <code title="post /securetunnels">client.securetunnels.<a href="./src/asktable/resources/securetunnels/securetunnels.py">create</a>(\*\*<a href="src/asktable/types/securetunnel_create_params.py">params</a>) -> <a href="./src/asktable/types/secure_tunnel.py">SecureTunnel</a></code>
1818
- <code title="get /securetunnels/{securetunnel_id}">client.securetunnels.<a href="./src/asktable/resources/securetunnels/securetunnels.py">retrieve</a>(securetunnel_id) -> <a href="./src/asktable/types/secure_tunnel.py">SecureTunnel</a></code>
19-
- <code title="patch /securetunnels/{securetunnel_id}">client.securetunnels.<a href="./src/asktable/resources/securetunnels/securetunnels.py">update</a>(securetunnel_id, \*\*<a href="src/asktable/types/securetunnel_update_params.py">params</a>) -> <a href="./src/asktable/types/securetunnel_update_response.py">object</a></code>
19+
- <code title="patch /securetunnels/{securetunnel_id}">client.securetunnels.<a href="./src/asktable/resources/securetunnels/securetunnels.py">update</a>(securetunnel_id, \*\*<a href="src/asktable/types/securetunnel_update_params.py">params</a>) -> <a href="./src/asktable/types/secure_tunnel.py">SecureTunnel</a></code>
2020
- <code title="get /securetunnels">client.securetunnels.<a href="./src/asktable/resources/securetunnels/securetunnels.py">list</a>(\*\*<a href="src/asktable/types/securetunnel_list_params.py">params</a>) -> <a href="./src/asktable/types/securetunnel_list_response.py">SecuretunnelListResponse</a></code>
2121
- <code title="delete /securetunnels/{securetunnel_id}">client.securetunnels.<a href="./src/asktable/resources/securetunnels/securetunnels.py">delete</a>(securetunnel_id) -> None</code>
2222

src/asktable/resources/securetunnels/securetunnels.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def update(
139139
extra_query: Query | None = None,
140140
extra_body: Body | None = None,
141141
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
142-
) -> object:
142+
) -> SecureTunnel:
143143
"""
144144
更新某个 ATST
145145
@@ -173,7 +173,7 @@ def update(
173173
options=make_request_options(
174174
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
175175
),
176-
cast_to=object,
176+
cast_to=SecureTunnel,
177177
)
178178

179179
def list(
@@ -361,7 +361,7 @@ async def update(
361361
extra_query: Query | None = None,
362362
extra_body: Body | None = None,
363363
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
364-
) -> object:
364+
) -> SecureTunnel:
365365
"""
366366
更新某个 ATST
367367
@@ -395,7 +395,7 @@ async def update(
395395
options=make_request_options(
396396
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
397397
),
398-
cast_to=object,
398+
cast_to=SecureTunnel,
399399
)
400400

401401
async def list(

src/asktable/types/securetunnels/secure_tunnel_link.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
class Item(BaseModel):
1212
id: str
1313

14+
atst_id: str
15+
1416
created_at: datetime
1517

1618
datasource_ids: List[str]
@@ -19,8 +21,6 @@ class Item(BaseModel):
1921

2022
proxy_port: int
2123

22-
securetunnel_id: str
23-
2424
status: str
2525

2626
target_host: str

tests/api_resources/test_securetunnels.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_method_update(self, client: Asktable) -> None:
9595
securetunnel = client.securetunnels.update(
9696
securetunnel_id="securetunnel_id",
9797
)
98-
assert_matches_type(object, securetunnel, path=["response"])
98+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
9999

100100
@parametrize
101101
def test_method_update_with_all_params(self, client: Asktable) -> None:
@@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None:
105105
name="我的测试机",
106106
unique_key="unique_key",
107107
)
108-
assert_matches_type(object, securetunnel, path=["response"])
108+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
109109

110110
@parametrize
111111
def test_raw_response_update(self, client: Asktable) -> None:
@@ -116,7 +116,7 @@ def test_raw_response_update(self, client: Asktable) -> None:
116116
assert response.is_closed is True
117117
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
118118
securetunnel = response.parse()
119-
assert_matches_type(object, securetunnel, path=["response"])
119+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
120120

121121
@parametrize
122122
def test_streaming_response_update(self, client: Asktable) -> None:
@@ -127,7 +127,7 @@ def test_streaming_response_update(self, client: Asktable) -> None:
127127
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
128128

129129
securetunnel = response.parse()
130-
assert_matches_type(object, securetunnel, path=["response"])
130+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
131131

132132
assert cast(Any, response.is_closed) is True
133133

@@ -288,7 +288,7 @@ async def test_method_update(self, async_client: AsyncAsktable) -> None:
288288
securetunnel = await async_client.securetunnels.update(
289289
securetunnel_id="securetunnel_id",
290290
)
291-
assert_matches_type(object, securetunnel, path=["response"])
291+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
292292

293293
@parametrize
294294
async def test_method_update_with_all_params(self, async_client: AsyncAsktable) -> None:
@@ -298,7 +298,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable)
298298
name="我的测试机",
299299
unique_key="unique_key",
300300
)
301-
assert_matches_type(object, securetunnel, path=["response"])
301+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
302302

303303
@parametrize
304304
async def test_raw_response_update(self, async_client: AsyncAsktable) -> None:
@@ -309,7 +309,7 @@ async def test_raw_response_update(self, async_client: AsyncAsktable) -> None:
309309
assert response.is_closed is True
310310
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
311311
securetunnel = await response.parse()
312-
assert_matches_type(object, securetunnel, path=["response"])
312+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
313313

314314
@parametrize
315315
async def test_streaming_response_update(self, async_client: AsyncAsktable) -> None:
@@ -320,7 +320,7 @@ async def test_streaming_response_update(self, async_client: AsyncAsktable) -> N
320320
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
321321

322322
securetunnel = await response.parse()
323-
assert_matches_type(object, securetunnel, path=["response"])
323+
assert_matches_type(SecureTunnel, securetunnel, path=["response"])
324324

325325
assert cast(Any, response.is_closed) is True
326326

0 commit comments

Comments
 (0)