Skip to content

Commit 83045c6

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#24)
1 parent 6527b96 commit 83045c6

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
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: 68
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-ee37f8c507467e4f519c00e4be1534035d89b52a2745d99900e1cc9998b968f0.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-fc90c3d40bc51cdb08158dafb21ffc24ce3814479e3cc73810bf11c2d1260b1a.yml

src/asktable/resources/datasources/datasources.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ def create_from_file(
323323
*,
324324
name: str,
325325
file: FileTypes,
326+
async_process_meta: bool | NotGiven = NOT_GIVEN,
326327
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
327328
# The extra values given here take precedence over values defined on the client or passed to this method.
328329
extra_headers: Headers | None = None,
@@ -358,7 +359,11 @@ def create_from_file(
358359
extra_body=extra_body,
359360
timeout=timeout,
360361
query=maybe_transform(
361-
{"name": name}, datasource_create_from_file_params.DatasourceCreateFromFileParams
362+
{
363+
"name": name,
364+
"async_process_meta": async_process_meta,
365+
},
366+
datasource_create_from_file_params.DatasourceCreateFromFileParams,
362367
),
363368
),
364369
cast_to=DataSource,
@@ -637,6 +642,7 @@ async def create_from_file(
637642
*,
638643
name: str,
639644
file: FileTypes,
645+
async_process_meta: bool | NotGiven = NOT_GIVEN,
640646
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
641647
# The extra values given here take precedence over values defined on the client or passed to this method.
642648
extra_headers: Headers | None = None,
@@ -672,7 +678,11 @@ async def create_from_file(
672678
extra_body=extra_body,
673679
timeout=timeout,
674680
query=await async_maybe_transform(
675-
{"name": name}, datasource_create_from_file_params.DatasourceCreateFromFileParams
681+
{
682+
"name": name,
683+
"async_process_meta": async_process_meta,
684+
},
685+
datasource_create_from_file_params.DatasourceCreateFromFileParams,
676686
),
677687
),
678688
cast_to=DataSource,

src/asktable/types/datasource_create_from_file_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ class DatasourceCreateFromFileParams(TypedDict, total=False):
1313
name: Required[str]
1414

1515
file: Required[FileTypes]
16+
17+
async_process_meta: bool

tests/api_resources/test_datasources.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,15 @@ def test_method_create_from_file(self, client: Asktable) -> None:
250250
)
251251
assert_matches_type(DataSource, datasource, path=["response"])
252252

253+
@parametrize
254+
def test_method_create_from_file_with_all_params(self, client: Asktable) -> None:
255+
datasource = client.datasources.create_from_file(
256+
name="name",
257+
file=b"raw file contents",
258+
async_process_meta=True,
259+
)
260+
assert_matches_type(DataSource, datasource, path=["response"])
261+
253262
@parametrize
254263
def test_raw_response_create_from_file(self, client: Asktable) -> None:
255264
response = client.datasources.with_raw_response.create_from_file(
@@ -510,6 +519,15 @@ async def test_method_create_from_file(self, async_client: AsyncAsktable) -> Non
510519
)
511520
assert_matches_type(DataSource, datasource, path=["response"])
512521

522+
@parametrize
523+
async def test_method_create_from_file_with_all_params(self, async_client: AsyncAsktable) -> None:
524+
datasource = await async_client.datasources.create_from_file(
525+
name="name",
526+
file=b"raw file contents",
527+
async_process_meta=True,
528+
)
529+
assert_matches_type(DataSource, datasource, path=["response"])
530+
513531
@parametrize
514532
async def test_raw_response_create_from_file(self, async_client: AsyncAsktable) -> None:
515533
response = await async_client.datasources.with_raw_response.create_from_file(

0 commit comments

Comments
 (0)