Skip to content

Commit 234cd71

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#8)
1 parent 230366d commit 234cd71

File tree

9 files changed

+9
-139
lines changed

9 files changed

+9
-139
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: 67
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-40b24dabc4429084d4928122661865fb5b2feebac81de578d7de95c4d351621c.yml
1+
configured_endpoints: 65
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-f8d4f4ee9ccccf65054df0c205156f6022a8d207441b1494fa56bd950b44593b.yml

api.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -203,30 +203,6 @@ Methods:
203203

204204
- <code title="post /datasources/upload_params">client.datasources.upload_params.<a href="./src/asktable/resources/datasources/upload_params.py">create</a>(\*\*<a href="src/asktable/types/datasources/upload_param_create_params.py">params</a>) -> <a href="./src/asktable/types/datasources/upload_param_create_response.py">object</a></code>
205205

206-
## UploadFile
207-
208-
Types:
209-
210-
```python
211-
from asktable.types.datasources import UploadFileCreateResponse
212-
```
213-
214-
Methods:
215-
216-
- <code title="post /datasources/upload_file">client.datasources.upload_file.<a href="./src/asktable/resources/datasources/upload_file.py">create</a>(\*\*<a href="src/asktable/types/datasources/upload_file_create_params.py">params</a>) -> <a href="./src/asktable/types/datasources/upload_file_create_response.py">object</a></code>
217-
218-
## DownloadURL
219-
220-
Types:
221-
222-
```python
223-
from asktable.types.datasources import DownloadURLRetrieveResponse
224-
```
225-
226-
Methods:
227-
228-
- <code title="get /datasources/{datasource_id}/download_url">client.datasources.download_url.<a href="./src/asktable/resources/datasources/download_url.py">retrieve</a>(datasource_id) -> <a href="./src/asktable/types/datasources/download_url_retrieve_response.py">object</a></code>
229-
230206
# Bots
231207

232208
Types:

src/asktable/resources/datasources/__init__.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,6 @@
1616
DatasourcesResourceWithStreamingResponse,
1717
AsyncDatasourcesResourceWithStreamingResponse,
1818
)
19-
from .upload_file import (
20-
UploadFileResource,
21-
AsyncUploadFileResource,
22-
UploadFileResourceWithRawResponse,
23-
AsyncUploadFileResourceWithRawResponse,
24-
UploadFileResourceWithStreamingResponse,
25-
AsyncUploadFileResourceWithStreamingResponse,
26-
)
27-
from .download_url import (
28-
DownloadURLResource,
29-
AsyncDownloadURLResource,
30-
DownloadURLResourceWithRawResponse,
31-
AsyncDownloadURLResourceWithRawResponse,
32-
DownloadURLResourceWithStreamingResponse,
33-
AsyncDownloadURLResourceWithStreamingResponse,
34-
)
3519
from .upload_params import (
3620
UploadParamsResource,
3721
AsyncUploadParamsResource,
@@ -54,18 +38,6 @@
5438
"AsyncUploadParamsResourceWithRawResponse",
5539
"UploadParamsResourceWithStreamingResponse",
5640
"AsyncUploadParamsResourceWithStreamingResponse",
57-
"UploadFileResource",
58-
"AsyncUploadFileResource",
59-
"UploadFileResourceWithRawResponse",
60-
"AsyncUploadFileResourceWithRawResponse",
61-
"UploadFileResourceWithStreamingResponse",
62-
"AsyncUploadFileResourceWithStreamingResponse",
63-
"DownloadURLResource",
64-
"AsyncDownloadURLResource",
65-
"DownloadURLResourceWithRawResponse",
66-
"AsyncDownloadURLResourceWithRawResponse",
67-
"DownloadURLResourceWithStreamingResponse",
68-
"AsyncDownloadURLResourceWithStreamingResponse",
6941
"DatasourcesResource",
7042
"AsyncDatasourcesResource",
7143
"DatasourcesResourceWithRawResponse",

src/asktable/resources/datasources/datasources.py

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,6 @@
2929
async_to_raw_response_wrapper,
3030
async_to_streamed_response_wrapper,
3131
)
32-
from .upload_file import (
33-
UploadFileResource,
34-
AsyncUploadFileResource,
35-
UploadFileResourceWithRawResponse,
36-
AsyncUploadFileResourceWithRawResponse,
37-
UploadFileResourceWithStreamingResponse,
38-
AsyncUploadFileResourceWithStreamingResponse,
39-
)
40-
from .download_url import (
41-
DownloadURLResource,
42-
AsyncDownloadURLResource,
43-
DownloadURLResourceWithRawResponse,
44-
AsyncDownloadURLResourceWithRawResponse,
45-
DownloadURLResourceWithStreamingResponse,
46-
AsyncDownloadURLResourceWithStreamingResponse,
47-
)
4832
from .upload_params import (
4933
UploadParamsResource,
5034
AsyncUploadParamsResource,
@@ -69,14 +53,6 @@ def meta(self) -> MetaResource:
6953
def upload_params(self) -> UploadParamsResource:
7054
return UploadParamsResource(self._client)
7155

72-
@cached_property
73-
def upload_file(self) -> UploadFileResource:
74-
return UploadFileResource(self._client)
75-
76-
@cached_property
77-
def download_url(self) -> DownloadURLResource:
78-
return DownloadURLResource(self._client)
79-
8056
@cached_property
8157
def with_raw_response(self) -> DatasourcesResourceWithRawResponse:
8258
"""
@@ -353,14 +329,6 @@ def meta(self) -> AsyncMetaResource:
353329
def upload_params(self) -> AsyncUploadParamsResource:
354330
return AsyncUploadParamsResource(self._client)
355331

356-
@cached_property
357-
def upload_file(self) -> AsyncUploadFileResource:
358-
return AsyncUploadFileResource(self._client)
359-
360-
@cached_property
361-
def download_url(self) -> AsyncDownloadURLResource:
362-
return AsyncDownloadURLResource(self._client)
363-
364332
@cached_property
365333
def with_raw_response(self) -> AsyncDatasourcesResourceWithRawResponse:
366334
"""
@@ -656,14 +624,6 @@ def meta(self) -> MetaResourceWithRawResponse:
656624
def upload_params(self) -> UploadParamsResourceWithRawResponse:
657625
return UploadParamsResourceWithRawResponse(self._datasources.upload_params)
658626

659-
@cached_property
660-
def upload_file(self) -> UploadFileResourceWithRawResponse:
661-
return UploadFileResourceWithRawResponse(self._datasources.upload_file)
662-
663-
@cached_property
664-
def download_url(self) -> DownloadURLResourceWithRawResponse:
665-
return DownloadURLResourceWithRawResponse(self._datasources.download_url)
666-
667627

668628
class AsyncDatasourcesResourceWithRawResponse:
669629
def __init__(self, datasources: AsyncDatasourcesResource) -> None:
@@ -693,14 +653,6 @@ def meta(self) -> AsyncMetaResourceWithRawResponse:
693653
def upload_params(self) -> AsyncUploadParamsResourceWithRawResponse:
694654
return AsyncUploadParamsResourceWithRawResponse(self._datasources.upload_params)
695655

696-
@cached_property
697-
def upload_file(self) -> AsyncUploadFileResourceWithRawResponse:
698-
return AsyncUploadFileResourceWithRawResponse(self._datasources.upload_file)
699-
700-
@cached_property
701-
def download_url(self) -> AsyncDownloadURLResourceWithRawResponse:
702-
return AsyncDownloadURLResourceWithRawResponse(self._datasources.download_url)
703-
704656

705657
class DatasourcesResourceWithStreamingResponse:
706658
def __init__(self, datasources: DatasourcesResource) -> None:
@@ -730,14 +682,6 @@ def meta(self) -> MetaResourceWithStreamingResponse:
730682
def upload_params(self) -> UploadParamsResourceWithStreamingResponse:
731683
return UploadParamsResourceWithStreamingResponse(self._datasources.upload_params)
732684

733-
@cached_property
734-
def upload_file(self) -> UploadFileResourceWithStreamingResponse:
735-
return UploadFileResourceWithStreamingResponse(self._datasources.upload_file)
736-
737-
@cached_property
738-
def download_url(self) -> DownloadURLResourceWithStreamingResponse:
739-
return DownloadURLResourceWithStreamingResponse(self._datasources.download_url)
740-
741685

742686
class AsyncDatasourcesResourceWithStreamingResponse:
743687
def __init__(self, datasources: AsyncDatasourcesResource) -> None:
@@ -766,11 +710,3 @@ def meta(self) -> AsyncMetaResourceWithStreamingResponse:
766710
@cached_property
767711
def upload_params(self) -> AsyncUploadParamsResourceWithStreamingResponse:
768712
return AsyncUploadParamsResourceWithStreamingResponse(self._datasources.upload_params)
769-
770-
@cached_property
771-
def upload_file(self) -> AsyncUploadFileResourceWithStreamingResponse:
772-
return AsyncUploadFileResourceWithStreamingResponse(self._datasources.upload_file)
773-
774-
@cached_property
775-
def download_url(self) -> AsyncDownloadURLResourceWithStreamingResponse:
776-
return AsyncDownloadURLResourceWithStreamingResponse(self._datasources.download_url)

src/asktable/types/data_source.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111

1212
class AccessConfig(BaseModel):
13-
engine: Literal["mysql", "tidb", "postgresql", "oceanbase", "clickhouse", "csv", "excel"]
14-
"""数据库引擎"""
15-
1613
db: Optional[str] = None
1714
"""数据库引擎可以管理多个数据库,此参数用于指定数据库名称"""
1815

src/asktable/types/datasource_create_params.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ class DatasourceCreateParams(TypedDict, total=False):
2626

2727

2828
class AccessConfig(TypedDict, total=False):
29-
engine: Required[Literal["mysql", "tidb", "postgresql", "oceanbase", "clickhouse", "csv", "excel"]]
30-
"""数据库引擎"""
31-
3229
db: Optional[str]
3330
"""数据库引擎可以管理多个数据库,此参数用于指定数据库名称"""
3431

src/asktable/types/datasource_update_params.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Optional
6-
from typing_extensions import Literal, Required, TypedDict
6+
from typing_extensions import Literal, TypedDict
77

88
__all__ = ["DatasourceUpdateParams", "AccessConfig"]
99

@@ -35,9 +35,6 @@ class DatasourceUpdateParams(TypedDict, total=False):
3535

3636

3737
class AccessConfig(TypedDict, total=False):
38-
engine: Required[Literal["mysql", "tidb", "postgresql", "oceanbase", "clickhouse", "csv", "excel"]]
39-
"""数据库引擎"""
40-
4138
db: Optional[str]
4239
"""数据库引擎可以管理多个数据库,此参数用于指定数据库名称"""
4340

src/asktable/types/datasources/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
from .meta import Meta as Meta
66
from .meta_update_params import MetaUpdateParams as MetaUpdateParams
77
from .meta_retrieve_params import MetaRetrieveParams as MetaRetrieveParams
8-
from .upload_file_create_params import UploadFileCreateParams as UploadFileCreateParams
98
from .upload_param_create_params import UploadParamCreateParams as UploadParamCreateParams

tests/api_resources/test_datasources.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TestDatasources:
2323
@parametrize
2424
def test_method_create(self, client: Asktable) -> None:
2525
datasource = client.datasources.create(
26-
access_config={"engine": "mysql"},
26+
access_config={},
2727
engine="mysql",
2828
)
2929
assert_matches_type(DataSource, datasource, path=["response"])
@@ -32,7 +32,6 @@ def test_method_create(self, client: Asktable) -> None:
3232
def test_method_create_with_all_params(self, client: Asktable) -> None:
3333
datasource = client.datasources.create(
3434
access_config={
35-
"engine": "mysql",
3635
"db": "test",
3736
"host": "192.168.0.10",
3837
"location_type": "local",
@@ -52,7 +51,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
5251
@parametrize
5352
def test_raw_response_create(self, client: Asktable) -> None:
5453
response = client.datasources.with_raw_response.create(
55-
access_config={"engine": "mysql"},
54+
access_config={},
5655
engine="mysql",
5756
)
5857

@@ -64,7 +63,7 @@ def test_raw_response_create(self, client: Asktable) -> None:
6463
@parametrize
6564
def test_streaming_response_create(self, client: Asktable) -> None:
6665
with client.datasources.with_streaming_response.create(
67-
access_config={"engine": "mysql"},
66+
access_config={},
6867
engine="mysql",
6968
) as response:
7069
assert not response.is_closed
@@ -125,7 +124,6 @@ def test_method_update_with_all_params(self, client: Asktable) -> None:
125124
datasource = client.datasources.update(
126125
datasource_id="datasource_id",
127126
access_config={
128-
"engine": "mysql",
129127
"db": "test",
130128
"host": "192.168.0.10",
131129
"location_type": "local",
@@ -255,7 +253,7 @@ class TestAsyncDatasources:
255253
@parametrize
256254
async def test_method_create(self, async_client: AsyncAsktable) -> None:
257255
datasource = await async_client.datasources.create(
258-
access_config={"engine": "mysql"},
256+
access_config={},
259257
engine="mysql",
260258
)
261259
assert_matches_type(DataSource, datasource, path=["response"])
@@ -264,7 +262,6 @@ async def test_method_create(self, async_client: AsyncAsktable) -> None:
264262
async def test_method_create_with_all_params(self, async_client: AsyncAsktable) -> None:
265263
datasource = await async_client.datasources.create(
266264
access_config={
267-
"engine": "mysql",
268265
"db": "test",
269266
"host": "192.168.0.10",
270267
"location_type": "local",
@@ -284,7 +281,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
284281
@parametrize
285282
async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
286283
response = await async_client.datasources.with_raw_response.create(
287-
access_config={"engine": "mysql"},
284+
access_config={},
288285
engine="mysql",
289286
)
290287

@@ -296,7 +293,7 @@ async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
296293
@parametrize
297294
async def test_streaming_response_create(self, async_client: AsyncAsktable) -> None:
298295
async with async_client.datasources.with_streaming_response.create(
299-
access_config={"engine": "mysql"},
296+
access_config={},
300297
engine="mysql",
301298
) as response:
302299
assert not response.is_closed
@@ -357,7 +354,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable)
357354
datasource = await async_client.datasources.update(
358355
datasource_id="datasource_id",
359356
access_config={
360-
"engine": "mysql",
361357
"db": "test",
362358
"host": "192.168.0.10",
363359
"location_type": "local",

0 commit comments

Comments
 (0)