Skip to content

Commit 1e6ad9f

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#42)
1 parent 2a8bbdd commit 1e6ad9f

21 files changed

+170
-9
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: 69
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-f78191153cae54be3e273ca76fbb91453dec4696f00fc6d679ca2ffc3d533ede.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-4bee800ad604492e6ee5776c10e1668037755aeaae6ff6faa2d09a0c3763eeee.yml

src/asktable/resources/datasources/datasources.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def create(
8787
*,
8888
engine: Literal["mysql", "tidb", "postgresql", "oceanbase", "clickhouse", "csv", "excel", "starrocks"],
8989
async_process_meta: bool | NotGiven = NOT_GIVEN,
90+
value_index: bool | NotGiven = NOT_GIVEN,
9091
access_config: Optional[datasource_create_params.AccessConfig] | NotGiven = NOT_GIVEN,
9192
name: Optional[str] | NotGiven = NOT_GIVEN,
9293
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -130,7 +131,11 @@ def create(
130131
extra_body=extra_body,
131132
timeout=timeout,
132133
query=maybe_transform(
133-
{"async_process_meta": async_process_meta}, datasource_create_params.DatasourceCreateParams
134+
{
135+
"async_process_meta": async_process_meta,
136+
"value_index": value_index,
137+
},
138+
datasource_create_params.DatasourceCreateParams,
134139
),
135140
),
136141
cast_to=DatasourceCreateResponse,
@@ -330,6 +335,7 @@ def create_from_file(
330335
file: FileTypes,
331336
async_process_meta: bool | NotGiven = NOT_GIVEN,
332337
name: str | NotGiven = NOT_GIVEN,
338+
value_index: bool | NotGiven = NOT_GIVEN,
333339
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
334340
# The extra values given here take precedence over values defined on the client or passed to this method.
335341
extra_headers: Headers | None = None,
@@ -368,6 +374,7 @@ def create_from_file(
368374
{
369375
"async_process_meta": async_process_meta,
370376
"name": name,
377+
"value_index": value_index,
371378
},
372379
datasource_create_from_file_params.DatasourceCreateFromFileParams,
373380
),
@@ -409,6 +416,7 @@ async def create(
409416
*,
410417
engine: Literal["mysql", "tidb", "postgresql", "oceanbase", "clickhouse", "csv", "excel", "starrocks"],
411418
async_process_meta: bool | NotGiven = NOT_GIVEN,
419+
value_index: bool | NotGiven = NOT_GIVEN,
412420
access_config: Optional[datasource_create_params.AccessConfig] | NotGiven = NOT_GIVEN,
413421
name: Optional[str] | NotGiven = NOT_GIVEN,
414422
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -452,7 +460,11 @@ async def create(
452460
extra_body=extra_body,
453461
timeout=timeout,
454462
query=await async_maybe_transform(
455-
{"async_process_meta": async_process_meta}, datasource_create_params.DatasourceCreateParams
463+
{
464+
"async_process_meta": async_process_meta,
465+
"value_index": value_index,
466+
},
467+
datasource_create_params.DatasourceCreateParams,
456468
),
457469
),
458470
cast_to=DatasourceCreateResponse,
@@ -652,6 +664,7 @@ async def create_from_file(
652664
file: FileTypes,
653665
async_process_meta: bool | NotGiven = NOT_GIVEN,
654666
name: str | NotGiven = NOT_GIVEN,
667+
value_index: bool | NotGiven = NOT_GIVEN,
655668
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
656669
# The extra values given here take precedence over values defined on the client or passed to this method.
657670
extra_headers: Headers | None = None,
@@ -690,6 +703,7 @@ async def create_from_file(
690703
{
691704
"async_process_meta": async_process_meta,
692705
"name": name,
706+
"value_index": value_index,
693707
},
694708
datasource_create_from_file_params.DatasourceCreateFromFileParams,
695709
),

src/asktable/resources/datasources/meta.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def create(
5454
datasource_id: str,
5555
*,
5656
name: str,
57+
async_process_meta: bool | NotGiven = NOT_GIVEN,
58+
value_index: bool | NotGiven = NOT_GIVEN,
5759
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
5860
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5961
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -88,6 +90,8 @@ def create(
8890
datasource_id: str,
8991
*,
9092
body: None,
93+
async_process_meta: bool | NotGiven = NOT_GIVEN,
94+
value_index: bool | NotGiven = NOT_GIVEN,
9195
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9296
# The extra values given here take precedence over values defined on the client or passed to this method.
9397
extra_headers: Headers | None = None,
@@ -119,6 +123,8 @@ def create(
119123
datasource_id: str,
120124
*,
121125
name: str | NotGiven = NOT_GIVEN,
126+
async_process_meta: bool | NotGiven = NOT_GIVEN,
127+
value_index: bool | NotGiven = NOT_GIVEN,
122128
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
123129
body: None | NotGiven = NOT_GIVEN,
124130
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -141,7 +147,17 @@ def create(
141147
meta_create_params.MetaCreateParams,
142148
),
143149
options=make_request_options(
144-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150+
extra_headers=extra_headers,
151+
extra_query=extra_query,
152+
extra_body=extra_body,
153+
timeout=timeout,
154+
query=maybe_transform(
155+
{
156+
"async_process_meta": async_process_meta,
157+
"value_index": value_index,
158+
},
159+
meta_create_params.MetaCreateParams,
160+
),
145161
),
146162
cast_to=object,
147163
)
@@ -296,6 +312,8 @@ async def create(
296312
datasource_id: str,
297313
*,
298314
name: str,
315+
async_process_meta: bool | NotGiven = NOT_GIVEN,
316+
value_index: bool | NotGiven = NOT_GIVEN,
299317
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
300318
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
301319
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -330,6 +348,8 @@ async def create(
330348
datasource_id: str,
331349
*,
332350
body: None,
351+
async_process_meta: bool | NotGiven = NOT_GIVEN,
352+
value_index: bool | NotGiven = NOT_GIVEN,
333353
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
334354
# The extra values given here take precedence over values defined on the client or passed to this method.
335355
extra_headers: Headers | None = None,
@@ -361,6 +381,8 @@ async def create(
361381
datasource_id: str,
362382
*,
363383
name: str | NotGiven = NOT_GIVEN,
384+
async_process_meta: bool | NotGiven = NOT_GIVEN,
385+
value_index: bool | NotGiven = NOT_GIVEN,
364386
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
365387
body: None | NotGiven = NOT_GIVEN,
366388
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -383,7 +405,17 @@ async def create(
383405
meta_create_params.MetaCreateParams,
384406
),
385407
options=make_request_options(
386-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
408+
extra_headers=extra_headers,
409+
extra_query=extra_query,
410+
extra_body=extra_body,
411+
timeout=timeout,
412+
query=await async_maybe_transform(
413+
{
414+
"async_process_meta": async_process_meta,
415+
"value_index": value_index,
416+
},
417+
meta_create_params.MetaCreateParams,
418+
),
387419
),
388420
cast_to=object,
389421
)

src/asktable/resources/integration/excel_csv.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def create(
4848
self,
4949
*,
5050
file_url: str,
51+
value_index: bool | NotGiven = NOT_GIVEN,
5152
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5253
# The extra values given here take precedence over values defined on the client or passed to this method.
5354
extra_headers: Headers | None = None,
@@ -74,7 +75,13 @@ def create(
7475
extra_query=extra_query,
7576
extra_body=extra_body,
7677
timeout=timeout,
77-
query=maybe_transform({"file_url": file_url}, excel_csv_create_params.ExcelCsvCreateParams),
78+
query=maybe_transform(
79+
{
80+
"file_url": file_url,
81+
"value_index": value_index,
82+
},
83+
excel_csv_create_params.ExcelCsvCreateParams,
84+
),
7885
),
7986
cast_to=ExcelCsvCreateResponse,
8087
)
@@ -104,6 +111,7 @@ async def create(
104111
self,
105112
*,
106113
file_url: str,
114+
value_index: bool | NotGiven = NOT_GIVEN,
107115
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
108116
# The extra values given here take precedence over values defined on the client or passed to this method.
109117
extra_headers: Headers | None = None,
@@ -130,7 +138,13 @@ async def create(
130138
extra_query=extra_query,
131139
extra_body=extra_body,
132140
timeout=timeout,
133-
query=await async_maybe_transform({"file_url": file_url}, excel_csv_create_params.ExcelCsvCreateParams),
141+
query=await async_maybe_transform(
142+
{
143+
"file_url": file_url,
144+
"value_index": value_index,
145+
},
146+
excel_csv_create_params.ExcelCsvCreateParams,
147+
),
134148
),
135149
cast_to=ExcelCsvCreateResponse,
136150
)

src/asktable/resources/integration/integration.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def excel_csv_ask(
6363
*,
6464
file_url: str,
6565
question: str,
66+
value_index: bool | NotGiven = NOT_GIVEN,
6667
with_json: Optional[bool] | NotGiven = NOT_GIVEN,
6768
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6869
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -100,7 +101,13 @@ def excel_csv_ask(
100101
integration_excel_csv_ask_params.IntegrationExcelCsvAskParams,
101102
),
102103
options=make_request_options(
103-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
104+
extra_headers=extra_headers,
105+
extra_query=extra_query,
106+
extra_body=extra_body,
107+
timeout=timeout,
108+
query=maybe_transform(
109+
{"value_index": value_index}, integration_excel_csv_ask_params.IntegrationExcelCsvAskParams
110+
),
104111
),
105112
cast_to=IntegrationExcelCsvAskResponse,
106113
)
@@ -135,6 +142,7 @@ async def excel_csv_ask(
135142
*,
136143
file_url: str,
137144
question: str,
145+
value_index: bool | NotGiven = NOT_GIVEN,
138146
with_json: Optional[bool] | NotGiven = NOT_GIVEN,
139147
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
140148
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -172,7 +180,13 @@ async def excel_csv_ask(
172180
integration_excel_csv_ask_params.IntegrationExcelCsvAskParams,
173181
),
174182
options=make_request_options(
175-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
183+
extra_headers=extra_headers,
184+
extra_query=extra_query,
185+
extra_body=extra_body,
186+
timeout=timeout,
187+
query=await async_maybe_transform(
188+
{"value_index": value_index}, integration_excel_csv_ask_params.IntegrationExcelCsvAskParams
189+
),
176190
),
177191
cast_to=IntegrationExcelCsvAskResponse,
178192
)

src/asktable/resources/sys/projects/projects.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def update(
144144
self,
145145
project_id: str,
146146
*,
147+
llm_model_group: Optional[str] | NotGiven = NOT_GIVEN,
147148
locked: Optional[bool] | NotGiven = NOT_GIVEN,
148149
name: Optional[str] | NotGiven = NOT_GIVEN,
149150
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -157,6 +158,8 @@ def update(
157158
Update Project
158159
159160
Args:
161+
llm_model_group: 模型组
162+
160163
locked: 是否锁定
161164
162165
name: 项目名称
@@ -175,6 +178,7 @@ def update(
175178
f"/sys/projects/{project_id}",
176179
body=maybe_transform(
177180
{
181+
"llm_model_group": llm_model_group,
178182
"locked": locked,
179183
"name": name,
180184
},
@@ -369,6 +373,7 @@ async def update(
369373
self,
370374
project_id: str,
371375
*,
376+
llm_model_group: Optional[str] | NotGiven = NOT_GIVEN,
372377
locked: Optional[bool] | NotGiven = NOT_GIVEN,
373378
name: Optional[str] | NotGiven = NOT_GIVEN,
374379
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -382,6 +387,8 @@ async def update(
382387
Update Project
383388
384389
Args:
390+
llm_model_group: 模型组
391+
385392
locked: 是否锁定
386393
387394
name: 项目名称
@@ -400,6 +407,7 @@ async def update(
400407
f"/sys/projects/{project_id}",
401408
body=await async_maybe_transform(
402409
{
410+
"llm_model_group": llm_model_group,
403411
"locked": locked,
404412
"name": name,
405413
},

src/asktable/types/datasource_create_from_file_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ class DatasourceCreateFromFileParams(TypedDict, total=False):
1515
async_process_meta: bool
1616

1717
name: str
18+
19+
value_index: bool

src/asktable/types/datasource_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class DatasourceCreateParams(TypedDict, total=False):
1414

1515
async_process_meta: bool
1616

17+
value_index: bool
18+
1719
access_config: Optional[AccessConfig]
1820
"""不同引擎有不同的配置"""
1921

src/asktable/types/datasources/meta_create_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class MetaCreate(TypedDict, total=False):
1919
name: Required[str]
2020
"""metadata_name"""
2121

22+
async_process_meta: bool
23+
24+
value_index: bool
25+
2226
schemas: Dict[str, MetaCreateSchemas]
2327

2428

@@ -62,5 +66,9 @@ class MetaCreateSchemas(TypedDict, total=False):
6266
class Variant1(TypedDict, total=False):
6367
body: Required[None]
6468

69+
async_process_meta: bool
70+
71+
value_index: bool
72+
6573

6674
MetaCreateParams: TypeAlias = Union[MetaCreate, Variant1]

src/asktable/types/integration/excel_csv_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@
99

1010
class ExcelCsvCreateParams(TypedDict, total=False):
1111
file_url: Required[str]
12+
13+
value_index: bool

0 commit comments

Comments
 (0)