Skip to content
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: 70
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-eacc19681b584d12739c5775cf012c0a50792f7cf1e12d80d28d2ac0786a896f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-55b1b1224cfcd2083a3df4a1752689ebf1b16821d0baeef75030854010fd6cd4.yml
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ from asktable.types import AnswerModel, Message, Policy
Types:

```python
from asktable.types import SecureTunnel, SecuretunnelUpdateResponse, SecuretunnelListResponse
from asktable.types import SecureTunnel, SecuretunnelListResponse
```

Methods:

- <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>
- <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>
- <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>
- <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>
- <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>
- <code title="delete /securetunnels/{securetunnel_id}">client.securetunnels.<a href="./src/asktable/resources/securetunnels/securetunnels.py">delete</a>(securetunnel_id) -> None</code>

Expand Down
8 changes: 4 additions & 4 deletions src/asktable/resources/securetunnels/securetunnels.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
) -> SecureTunnel:
"""
更新某个 ATST

Expand Down Expand Up @@ -173,7 +173,7 @@ def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=object,
cast_to=SecureTunnel,
)

def list(
Expand Down Expand Up @@ -361,7 +361,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
) -> SecureTunnel:
"""
更新某个 ATST

Expand Down Expand Up @@ -395,7 +395,7 @@ async def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=object,
cast_to=SecureTunnel,
)

async def list(
Expand Down
4 changes: 2 additions & 2 deletions src/asktable/types/securetunnels/secure_tunnel_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
class Item(BaseModel):
id: str

atst_id: str

created_at: datetime

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

proxy_port: int

securetunnel_id: str

status: str

target_host: str
Expand Down
16 changes: 8 additions & 8 deletions tests/api_resources/test_securetunnels.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_method_update(self, client: Asktable) -> None:
securetunnel = client.securetunnels.update(
securetunnel_id="securetunnel_id",
)
assert_matches_type(object, securetunnel, path=["response"])
assert_matches_type(SecureTunnel, securetunnel, path=["response"])

@parametrize
def test_method_update_with_all_params(self, client: Asktable) -> None:
Expand All @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None:
name="我的测试机",
unique_key="unique_key",
)
assert_matches_type(object, securetunnel, path=["response"])
assert_matches_type(SecureTunnel, securetunnel, path=["response"])

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

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

securetunnel = response.parse()
assert_matches_type(object, securetunnel, path=["response"])
assert_matches_type(SecureTunnel, securetunnel, path=["response"])

assert cast(Any, response.is_closed) is True

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

@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncAsktable) -> None:
Expand All @@ -298,7 +298,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable)
name="我的测试机",
unique_key="unique_key",
)
assert_matches_type(object, securetunnel, path=["response"])
assert_matches_type(SecureTunnel, securetunnel, path=["response"])

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

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

securetunnel = await response.parse()
assert_matches_type(object, securetunnel, path=["response"])
assert_matches_type(SecureTunnel, securetunnel, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down