Skip to content

Commit 343d8d1

Browse files
feat(api): api update
1 parent a6b8536 commit 343d8d1

File tree

8 files changed

+46
-27
lines changed

8 files changed

+46
-27
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 105
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-20f6354d1acc8d000ad9bd08d232772aff326fec68ace682be61121517da5bb2.yml
3-
openapi_spec_hash: d6f05e251c09ddeb6383382cf2217be1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-39e6a02a4b1efbdc298cc690c13278116fc24056874c9d9e67ffa7f716a37689.yml
3+
openapi_spec_hash: 6cd27ccd9e4616130078dcd0d7c95ba4
44
config_hash: acdf4142177ed1932c2d82372693f811

src/asktable/resources/ats/ats.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

79
from .task import (
@@ -185,7 +187,7 @@ def update(
185187
def list(
186188
self,
187189
*,
188-
datasource_id: str,
190+
datasource_id: Optional[str] | Omit = omit,
189191
page: int | Omit = omit,
190192
size: int | Omit = omit,
191193
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -199,7 +201,7 @@ def list(
199201
Get Test Sets Endpoint
200202
201203
Args:
202-
datasource_id: 数据源 ID
204+
datasource_id: 数据源 ID,可选过滤条件
203205
204206
page: Page number
205207
@@ -418,7 +420,7 @@ async def update(
418420
def list(
419421
self,
420422
*,
421-
datasource_id: str,
423+
datasource_id: Optional[str] | Omit = omit,
422424
page: int | Omit = omit,
423425
size: int | Omit = omit,
424426
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -432,7 +434,7 @@ def list(
432434
Get Test Sets Endpoint
433435
434436
Args:
435-
datasource_id: 数据源 ID
437+
datasource_id: 数据源 ID,可选过滤条件
436438
437439
page: Page number
438440

src/asktable/types/ats_create_response.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from typing import Optional
34
from datetime import datetime
45

56
from .._models import BaseModel
@@ -25,3 +26,9 @@ class ATSCreateResponse(BaseModel):
2526

2627
project_id: str
2728
"""项目 ID"""
29+
30+
case_count: Optional[int] = None
31+
"""测试用例数量"""
32+
33+
datasource_name: Optional[str] = None
34+
"""数据源名称"""

src/asktable/types/ats_list_params.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing import Optional
6+
from typing_extensions import TypedDict
67

78
__all__ = ["ATSListParams"]
89

910

1011
class ATSListParams(TypedDict, total=False):
11-
datasource_id: Required[str]
12-
"""数据源 ID"""
12+
datasource_id: Optional[str]
13+
"""数据源 ID,可选过滤条件"""
1314

1415
page: int
1516
"""Page number"""

src/asktable/types/ats_list_response.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from typing import Optional
34
from datetime import datetime
45

56
from .._models import BaseModel
@@ -25,3 +26,9 @@ class ATSListResponse(BaseModel):
2526

2627
project_id: str
2728
"""项目 ID"""
29+
30+
case_count: Optional[int] = None
31+
"""测试用例数量"""
32+
33+
datasource_name: Optional[str] = None
34+
"""数据源名称"""

src/asktable/types/ats_retrieve_response.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from typing import Optional
34
from datetime import datetime
45

56
from .._models import BaseModel
@@ -25,3 +26,9 @@ class ATSRetrieveResponse(BaseModel):
2526

2627
project_id: str
2728
"""项目 ID"""
29+
30+
case_count: Optional[int] = None
31+
"""测试用例数量"""
32+
33+
datasource_name: Optional[str] = None
34+
"""数据源名称"""

src/asktable/types/ats_update_response.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from typing import Optional
34
from datetime import datetime
45

56
from .._models import BaseModel
@@ -25,3 +26,9 @@ class ATSUpdateResponse(BaseModel):
2526

2627
project_id: str
2728
"""项目 ID"""
29+
30+
case_count: Optional[int] = None
31+
"""测试用例数量"""
32+
33+
datasource_name: Optional[str] = None
34+
"""数据源名称"""

tests/api_resources/test_ats.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ def test_path_params_update(self, client: Asktable) -> None:
139139

140140
@parametrize
141141
def test_method_list(self, client: Asktable) -> None:
142-
ats = client.ats.list(
143-
datasource_id="datasource_id",
144-
)
142+
ats = client.ats.list()
145143
assert_matches_type(SyncPage[ATSListResponse], ats, path=["response"])
146144

147145
@parametrize
@@ -155,9 +153,7 @@ def test_method_list_with_all_params(self, client: Asktable) -> None:
155153

156154
@parametrize
157155
def test_raw_response_list(self, client: Asktable) -> None:
158-
response = client.ats.with_raw_response.list(
159-
datasource_id="datasource_id",
160-
)
156+
response = client.ats.with_raw_response.list()
161157

162158
assert response.is_closed is True
163159
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -166,9 +162,7 @@ def test_raw_response_list(self, client: Asktable) -> None:
166162

167163
@parametrize
168164
def test_streaming_response_list(self, client: Asktable) -> None:
169-
with client.ats.with_streaming_response.list(
170-
datasource_id="datasource_id",
171-
) as response:
165+
with client.ats.with_streaming_response.list() as response:
172166
assert not response.is_closed
173167
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
174168

@@ -341,9 +335,7 @@ async def test_path_params_update(self, async_client: AsyncAsktable) -> None:
341335

342336
@parametrize
343337
async def test_method_list(self, async_client: AsyncAsktable) -> None:
344-
ats = await async_client.ats.list(
345-
datasource_id="datasource_id",
346-
)
338+
ats = await async_client.ats.list()
347339
assert_matches_type(AsyncPage[ATSListResponse], ats, path=["response"])
348340

349341
@parametrize
@@ -357,9 +349,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncAsktable) ->
357349

358350
@parametrize
359351
async def test_raw_response_list(self, async_client: AsyncAsktable) -> None:
360-
response = await async_client.ats.with_raw_response.list(
361-
datasource_id="datasource_id",
362-
)
352+
response = await async_client.ats.with_raw_response.list()
363353

364354
assert response.is_closed is True
365355
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -368,9 +358,7 @@ async def test_raw_response_list(self, async_client: AsyncAsktable) -> None:
368358

369359
@parametrize
370360
async def test_streaming_response_list(self, async_client: AsyncAsktable) -> None:
371-
async with async_client.ats.with_streaming_response.list(
372-
datasource_id="datasource_id",
373-
) as response:
361+
async with async_client.ats.with_streaming_response.list() as response:
374362
assert not response.is_closed
375363
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
376364

0 commit comments

Comments
 (0)