diff --git a/.stats.yml b/.stats.yml index cbd13d7f..93aea242 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 96 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-89441bb57f08015241a214ce4e51c76bac21e202f1f9cdc0a90e91c4ccbe4ff0.yml -openapi_spec_hash: 2642d0ba1cbd7daa3dd69af0d3076a26 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-9c2cc4835126cc880e27db1bda2225bd20ca2d6e766000ce4cdcb52a44b24624.yml +openapi_spec_hash: 9c022d30348c22d12c883cf4db075771 config_hash: 575ddfb316392e5f7f3c7b7999796a03 diff --git a/src/asktable/resources/bots.py b/src/asktable/resources/bots.py index 40985b20..b803683c 100644 --- a/src/asktable/resources/bots.py +++ b/src/asktable/resources/bots.py @@ -248,6 +248,7 @@ def update( def list( self, *, + bot_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, size: int | NotGiven = NOT_GIVEN, @@ -262,6 +263,8 @@ def list( 查询所有 Bot Args: + bot_ids: Bot ID + name: 名称 page: Page number @@ -286,6 +289,7 @@ def list( timeout=timeout, query=maybe_transform( { + "bot_ids": bot_ids, "name": name, "page": page, "size": size, @@ -589,6 +593,7 @@ async def update( def list( self, *, + bot_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, size: int | NotGiven = NOT_GIVEN, @@ -603,6 +608,8 @@ def list( 查询所有 Bot Args: + bot_ids: Bot ID + name: 名称 page: Page number @@ -627,6 +634,7 @@ def list( timeout=timeout, query=maybe_transform( { + "bot_ids": bot_ids, "name": name, "page": page, "size": size, diff --git a/src/asktable/resources/datasources/datasources.py b/src/asktable/resources/datasources/datasources.py index a7c346d4..a2b1b03e 100644 --- a/src/asktable/resources/datasources/datasources.py +++ b/src/asktable/resources/datasources/datasources.py @@ -487,6 +487,10 @@ def update_field( field_name: str, schema_name: str, table_name: str, + identifiable_type: Optional[ + Literal["plain", "person_name", "email", "ssn", "id", "phone", "address", "company"] + ] + | NotGiven = NOT_GIVEN, visibility: Optional[bool] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -499,6 +503,8 @@ def update_field( 更新数据源的某个字段的描述 Args: + identifiable_type: identifiable type + visibility: field visibility extra_headers: Send extra headers @@ -514,7 +520,11 @@ def update_field( return self._patch( f"/v1/datasources/{datasource_id}/field", body=maybe_transform( - {"visibility": visibility}, datasource_update_field_params.DatasourceUpdateFieldParams + { + "identifiable_type": identifiable_type, + "visibility": visibility, + }, + datasource_update_field_params.DatasourceUpdateFieldParams, ), options=make_request_options( extra_headers=extra_headers, @@ -959,6 +969,10 @@ async def update_field( field_name: str, schema_name: str, table_name: str, + identifiable_type: Optional[ + Literal["plain", "person_name", "email", "ssn", "id", "phone", "address", "company"] + ] + | NotGiven = NOT_GIVEN, visibility: Optional[bool] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -971,6 +985,8 @@ async def update_field( 更新数据源的某个字段的描述 Args: + identifiable_type: identifiable type + visibility: field visibility extra_headers: Send extra headers @@ -986,7 +1002,11 @@ async def update_field( return await self._patch( f"/v1/datasources/{datasource_id}/field", body=await async_maybe_transform( - {"visibility": visibility}, datasource_update_field_params.DatasourceUpdateFieldParams + { + "identifiable_type": identifiable_type, + "visibility": visibility, + }, + datasource_update_field_params.DatasourceUpdateFieldParams, ), options=make_request_options( extra_headers=extra_headers, diff --git a/src/asktable/types/bot_list_params.py b/src/asktable/types/bot_list_params.py index af394450..2463c813 100644 --- a/src/asktable/types/bot_list_params.py +++ b/src/asktable/types/bot_list_params.py @@ -2,13 +2,16 @@ from __future__ import annotations -from typing import Optional +from typing import List, Optional from typing_extensions import TypedDict __all__ = ["BotListParams"] class BotListParams(TypedDict, total=False): + bot_ids: Optional[List[str]] + """Bot ID""" + name: Optional[str] """名称""" diff --git a/src/asktable/types/datasource_update_field_params.py b/src/asktable/types/datasource_update_field_params.py index 9236c80e..f756bdf4 100644 --- a/src/asktable/types/datasource_update_field_params.py +++ b/src/asktable/types/datasource_update_field_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Optional -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["DatasourceUpdateFieldParams"] @@ -15,5 +15,8 @@ class DatasourceUpdateFieldParams(TypedDict, total=False): table_name: Required[str] + identifiable_type: Optional[Literal["plain", "person_name", "email", "ssn", "id", "phone", "address", "company"]] + """identifiable type""" + visibility: Optional[bool] """field visibility""" diff --git a/src/asktable/types/datasources/meta_create_params.py b/src/asktable/types/datasources/meta_create_params.py index 864118fc..4d452ff8 100644 --- a/src/asktable/types/datasources/meta_create_params.py +++ b/src/asktable/types/datasources/meta_create_params.py @@ -28,6 +28,9 @@ class MetaSchemasTablesFields(TypedDict, total=False): data_type: Optional[str] """field data type""" + identifiable_type: Literal["plain", "person_name", "email", "ssn", "id", "phone", "address", "company"] + """identifiable type""" + sample_data: Optional[str] """field sample data""" diff --git a/src/asktable/types/datasources/meta_update_params.py b/src/asktable/types/datasources/meta_update_params.py index 0fc2d2ce..862f0776 100644 --- a/src/asktable/types/datasources/meta_update_params.py +++ b/src/asktable/types/datasources/meta_update_params.py @@ -26,6 +26,9 @@ class MetaSchemasTablesFields(TypedDict, total=False): data_type: Optional[str] """field data type""" + identifiable_type: Literal["plain", "person_name", "email", "ssn", "id", "phone", "address", "company"] + """identifiable type""" + sample_data: Optional[str] """field sample data""" diff --git a/src/asktable/types/meta.py b/src/asktable/types/meta.py index 6b6a42b6..05cd5f20 100644 --- a/src/asktable/types/meta.py +++ b/src/asktable/types/meta.py @@ -34,6 +34,11 @@ class SchemasTablesFields(BaseModel): data_type: Optional[str] = None """field data type""" + identifiable_type: Optional[ + Literal["plain", "person_name", "email", "ssn", "id", "phone", "address", "company"] + ] = None + """identifiable type""" + sample_data: Optional[str] = None """field sample data""" diff --git a/tests/api_resources/datasources/test_meta.py b/tests/api_resources/datasources/test_meta.py index 2cc85d2f..91a71800 100644 --- a/tests/api_resources/datasources/test_meta.py +++ b/tests/api_resources/datasources/test_meta.py @@ -45,6 +45,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None: "name": "name", "origin_desc": "origin_desc", "data_type": "data_type", + "identifiable_type": "plain", "sample_data": "sample_data", "visibility": True, } @@ -155,6 +156,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None: "name": "name", "origin_desc": "origin_desc", "data_type": "data_type", + "identifiable_type": "plain", "sample_data": "sample_data", "visibility": True, } @@ -274,6 +276,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable) "name": "name", "origin_desc": "origin_desc", "data_type": "data_type", + "identifiable_type": "plain", "sample_data": "sample_data", "visibility": True, } @@ -384,6 +387,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable) "name": "name", "origin_desc": "origin_desc", "data_type": "data_type", + "identifiable_type": "plain", "sample_data": "sample_data", "visibility": True, } diff --git a/tests/api_resources/test_bots.py b/tests/api_resources/test_bots.py index 50f88b41..d3001846 100644 --- a/tests/api_resources/test_bots.py +++ b/tests/api_resources/test_bots.py @@ -172,6 +172,7 @@ def test_method_list(self, client: Asktable) -> None: @parametrize def test_method_list_with_all_params(self, client: Asktable) -> None: bot = client.bots.list( + bot_ids=["string"], name="name", page=1, size=1, @@ -436,6 +437,7 @@ async def test_method_list(self, async_client: AsyncAsktable) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncAsktable) -> None: bot = await async_client.bots.list( + bot_ids=["string"], name="name", page=1, size=1, diff --git a/tests/api_resources/test_datasources.py b/tests/api_resources/test_datasources.py index a99d4858..8d85594f 100644 --- a/tests/api_resources/test_datasources.py +++ b/tests/api_resources/test_datasources.py @@ -390,6 +390,7 @@ def test_method_update_field_with_all_params(self, client: Asktable) -> None: field_name="field_name", schema_name="schema_name", table_name="table_name", + identifiable_type="plain", visibility=True, ) assert_matches_type(object, datasource, path=["response"]) @@ -806,6 +807,7 @@ async def test_method_update_field_with_all_params(self, async_client: AsyncAskt field_name="field_name", schema_name="schema_name", table_name="table_name", + identifiable_type="plain", visibility=True, ) assert_matches_type(object, datasource, path=["response"])