diff --git a/pyproject.toml b/pyproject.toml index 26af50f..9ed158f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "polytomic" [tool.poetry] name = "polytomic" -version = "1.15.5" +version = "0.0.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index c7dc842..b7d9dfb 100644 --- a/reference.md +++ b/reference.md @@ -2548,7 +2548,7 @@ client.models.get_enrichment_source(
-**params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]]` +**params:** `typing.Optional[typing.Dict[str, typing.Sequence[str]]]`
@@ -3432,7 +3432,7 @@ client.model_sync.get_source(
-**params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]]` +**params:** `typing.Optional[typing.Dict[str, typing.Sequence[str]]]`
@@ -3497,7 +3497,7 @@ client.model_sync.get_source_fields(
-**params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]]` +**params:** `typing.Optional[typing.Dict[str, typing.Sequence[str]]]`
@@ -4663,8 +4663,8 @@ client = Polytomic( token="YOUR_TOKEN", ) client.jobs.get( - id="248df4b7-aa70-47b8-a036-33ac447e668d", type="createmodel", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) ``` @@ -4681,7 +4681,7 @@ client.jobs.get(
-**id:** `str` +**type:** `str`
@@ -4689,7 +4689,7 @@ client.jobs.get(
-**type:** `str` +**id:** `str`
@@ -5519,8 +5519,8 @@ client = Polytomic( token="YOUR_TOKEN", ) client.users.get( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) ``` @@ -5537,7 +5537,7 @@ client.users.get(
-**id:** `str` +**org_id:** `str`
@@ -5545,7 +5545,7 @@ client.users.get(
-**org_id:** `str` +**id:** `str`
@@ -5601,8 +5601,8 @@ client = Polytomic( token="YOUR_TOKEN", ) client.users.update( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", email="mail@example.com", ) @@ -5620,7 +5620,7 @@ client.users.update(
-**id:** `str` +**org_id:** `str`
@@ -5628,7 +5628,7 @@ client.users.update(
-**org_id:** `str` +**id:** `str`
@@ -5700,8 +5700,8 @@ client = Polytomic( token="YOUR_TOKEN", ) client.users.remove( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) ``` @@ -5718,7 +5718,7 @@ client.users.remove(
-**id:** `str` +**org_id:** `str`
@@ -5726,7 +5726,7 @@ client.users.remove(
-**org_id:** `str` +**id:** `str`
@@ -6762,7 +6762,7 @@ client.bulk_sync.schemas.list(
-**filters:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]` +**filters:** `typing.Optional[typing.Dict[str, str]]`
@@ -6999,7 +6999,7 @@ client.bulk_sync.schemas.update(
-**filters:** `typing.Optional[typing.Sequence[BulkFilter]]` +**filters:** `typing.Optional[typing.Sequence[BulkFilter2]]`
diff --git a/src/polytomic/__init__.py b/src/polytomic/__init__.py index 6bf93da..8ec3aec 100644 --- a/src/polytomic/__init__.py +++ b/src/polytomic/__init__.py @@ -15,6 +15,7 @@ BulkFetchMode, BulkField, BulkFilter, + BulkFilter2, BulkItemizedSchedule, BulkMultiScheduleConfiguration, BulkNormalizeNames, @@ -50,6 +51,7 @@ CancelModelSyncResponseEnvelope, CommonOutputActor, ConfigurationValue, + ConfigurationValue2, ConnectCardResponse, ConnectCardResponseEnvelope, ConnectionListResponseEnvelope, @@ -122,6 +124,7 @@ Override, Pagination, PaginationDetails, + PaginationDetails2, PickValue, PolicyAction, PolicyResponse, @@ -247,6 +250,7 @@ "BulkFetchMode", "BulkField", "BulkFilter", + "BulkFilter2", "BulkItemizedSchedule", "BulkMultiScheduleConfiguration", "BulkNormalizeNames", @@ -282,6 +286,7 @@ "CancelModelSyncResponseEnvelope", "CommonOutputActor", "ConfigurationValue", + "ConfigurationValue2", "ConflictError", "ConnectCardResponse", "ConnectCardResponseEnvelope", @@ -358,6 +363,7 @@ "Override", "Pagination", "PaginationDetails", + "PaginationDetails2", "PickValue", "PolicyAction", "PolicyResponse", diff --git a/src/polytomic/bulk_sync/schemas/client.py b/src/polytomic/bulk_sync/schemas/client.py index b20a8a8..e8bae08 100644 --- a/src/polytomic/bulk_sync/schemas/client.py +++ b/src/polytomic/bulk_sync/schemas/client.py @@ -20,7 +20,7 @@ from ...types.bulk_schema_envelope import BulkSchemaEnvelope import datetime as dt from ...types.update_bulk_field import UpdateBulkField -from ...types.bulk_filter import BulkFilter +from ...types.bulk_filter_2 import BulkFilter2 from ...core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters @@ -35,7 +35,7 @@ def list( self, id: str, *, - filters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None, + filters: typing.Optional[typing.Dict[str, str]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ListBulkSchema: """ @@ -43,7 +43,7 @@ def list( ---------- id : str - filters : typing.Optional[typing.Dict[str, typing.Optional[str]]] + filters : typing.Optional[typing.Dict[str, str]] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -298,7 +298,7 @@ def update( disable_data_cutoff: typing.Optional[bool] = OMIT, enabled: typing.Optional[bool] = OMIT, fields: typing.Optional[typing.Sequence[UpdateBulkField]] = OMIT, - filters: typing.Optional[typing.Sequence[BulkFilter]] = OMIT, + filters: typing.Optional[typing.Sequence[BulkFilter2]] = OMIT, partition_key: typing.Optional[str] = OMIT, tracking_field: typing.Optional[str] = OMIT, user_output_name: typing.Optional[str] = OMIT, @@ -319,7 +319,7 @@ def update( fields : typing.Optional[typing.Sequence[UpdateBulkField]] - filters : typing.Optional[typing.Sequence[BulkFilter]] + filters : typing.Optional[typing.Sequence[BulkFilter2]] partition_key : typing.Optional[str] @@ -359,7 +359,7 @@ def update( object_=fields, annotation=typing.Sequence[UpdateBulkField], direction="write" ), "filters": convert_and_respect_annotation_metadata( - object_=filters, annotation=typing.Sequence[BulkFilter], direction="write" + object_=filters, annotation=typing.Sequence[BulkFilter2], direction="write" ), "partition_key": partition_key, "tracking_field": tracking_field, @@ -434,7 +434,7 @@ async def list( self, id: str, *, - filters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None, + filters: typing.Optional[typing.Dict[str, str]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ListBulkSchema: """ @@ -442,7 +442,7 @@ async def list( ---------- id : str - filters : typing.Optional[typing.Dict[str, typing.Optional[str]]] + filters : typing.Optional[typing.Dict[str, str]] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -721,7 +721,7 @@ async def update( disable_data_cutoff: typing.Optional[bool] = OMIT, enabled: typing.Optional[bool] = OMIT, fields: typing.Optional[typing.Sequence[UpdateBulkField]] = OMIT, - filters: typing.Optional[typing.Sequence[BulkFilter]] = OMIT, + filters: typing.Optional[typing.Sequence[BulkFilter2]] = OMIT, partition_key: typing.Optional[str] = OMIT, tracking_field: typing.Optional[str] = OMIT, user_output_name: typing.Optional[str] = OMIT, @@ -742,7 +742,7 @@ async def update( fields : typing.Optional[typing.Sequence[UpdateBulkField]] - filters : typing.Optional[typing.Sequence[BulkFilter]] + filters : typing.Optional[typing.Sequence[BulkFilter2]] partition_key : typing.Optional[str] @@ -790,7 +790,7 @@ async def main() -> None: object_=fields, annotation=typing.Sequence[UpdateBulkField], direction="write" ), "filters": convert_and_respect_annotation_metadata( - object_=filters, annotation=typing.Sequence[BulkFilter], direction="write" + object_=filters, annotation=typing.Sequence[BulkFilter2], direction="write" ), "partition_key": partition_key, "tracking_field": tracking_field, diff --git a/src/polytomic/client.py b/src/polytomic/client.py index f0762a7..5518539 100644 --- a/src/polytomic/client.py +++ b/src/polytomic/client.py @@ -53,7 +53,7 @@ class Polytomic: - version : typing.Optional[str] + version : typing.Optional[typing.Any] token : typing.Union[str, typing.Callable[[], str]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -79,7 +79,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: PolytomicEnvironment = PolytomicEnvironment.DEFAULT, - version: typing.Optional[str] = None, + version: typing.Optional[typing.Any] = None, token: typing.Union[str, typing.Callable[[], str]], timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, @@ -131,7 +131,7 @@ class AsyncPolytomic: - version : typing.Optional[str] + version : typing.Optional[typing.Any] token : typing.Union[str, typing.Callable[[], str]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -157,7 +157,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: PolytomicEnvironment = PolytomicEnvironment.DEFAULT, - version: typing.Optional[str] = None, + version: typing.Optional[typing.Any] = None, token: typing.Union[str, typing.Callable[[], str]], timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, diff --git a/src/polytomic/core/client_wrapper.py b/src/polytomic/core/client_wrapper.py index bd3a034..221e1e0 100644 --- a/src/polytomic/core/client_wrapper.py +++ b/src/polytomic/core/client_wrapper.py @@ -10,7 +10,7 @@ class BaseClientWrapper: def __init__( self, *, - version: typing.Optional[str] = None, + version: typing.Optional[typing.Any] = None, token: typing.Union[str, typing.Callable[[], str]], base_url: str, timeout: typing.Optional[float] = None, @@ -24,7 +24,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "polytomic", - "X-Fern-SDK-Version": "1.15.5", + "X-Fern-SDK-Version": "0.0.0", } if self._version is not None: headers["X-Polytomic-Version"] = self._version @@ -48,7 +48,7 @@ class SyncClientWrapper(BaseClientWrapper): def __init__( self, *, - version: typing.Optional[str] = None, + version: typing.Optional[typing.Any] = None, token: typing.Union[str, typing.Callable[[], str]], base_url: str, timeout: typing.Optional[float] = None, @@ -67,7 +67,7 @@ class AsyncClientWrapper(BaseClientWrapper): def __init__( self, *, - version: typing.Optional[str] = None, + version: typing.Optional[typing.Any] = None, token: typing.Union[str, typing.Callable[[], str]], base_url: str, timeout: typing.Optional[float] = None, diff --git a/src/polytomic/jobs/client.py b/src/polytomic/jobs/client.py index 32ba6b8..8b8141f 100644 --- a/src/polytomic/jobs/client.py +++ b/src/polytomic/jobs/client.py @@ -22,15 +22,15 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper def get( - self, id: str, type: str, *, request_options: typing.Optional[RequestOptions] = None + self, type: str, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> JobResponseEnvelope: """ Parameters ---------- - id : str - type : str + id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -48,8 +48,8 @@ def get( token="YOUR_TOKEN", ) client.jobs.get( - id="248df4b7-aa70-47b8-a036-33ac447e668d", type="createmodel", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) """ _response = self._client_wrapper.httpx_client.request( @@ -117,15 +117,15 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper async def get( - self, id: str, type: str, *, request_options: typing.Optional[RequestOptions] = None + self, type: str, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> JobResponseEnvelope: """ Parameters ---------- - id : str - type : str + id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -148,8 +148,8 @@ async def get( async def main() -> None: await client.jobs.get( - id="248df4b7-aa70-47b8-a036-33ac447e668d", type="createmodel", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) diff --git a/src/polytomic/model_sync/client.py b/src/polytomic/model_sync/client.py index b5a0048..a5e7363 100644 --- a/src/polytomic/model_sync/client.py +++ b/src/polytomic/model_sync/client.py @@ -53,7 +53,7 @@ def get_source( self, id: str, *, - params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] = None, + params: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetModelSyncSourceMetaEnvelope: """ @@ -61,7 +61,7 @@ def get_source( ---------- id : str - params : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] + params : typing.Optional[typing.Dict[str, typing.Sequence[str]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -159,7 +159,7 @@ def get_source_fields( self, id: str, *, - params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] = None, + params: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ModelFieldResponse: """ @@ -167,7 +167,7 @@ def get_source_fields( ---------- id : str - params : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] + params : typing.Optional[typing.Dict[str, typing.Sequence[str]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1468,7 +1468,7 @@ async def get_source( self, id: str, *, - params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] = None, + params: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetModelSyncSourceMetaEnvelope: """ @@ -1476,7 +1476,7 @@ async def get_source( ---------- id : str - params : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] + params : typing.Optional[typing.Dict[str, typing.Sequence[str]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1582,7 +1582,7 @@ async def get_source_fields( self, id: str, *, - params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] = None, + params: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ModelFieldResponse: """ @@ -1590,7 +1590,7 @@ async def get_source_fields( ---------- id : str - params : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] + params : typing.Optional[typing.Dict[str, typing.Sequence[str]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/polytomic/models/client.py b/src/polytomic/models/client.py index 45efe7f..b46897b 100644 --- a/src/polytomic/models/client.py +++ b/src/polytomic/models/client.py @@ -38,7 +38,7 @@ def get_enrichment_source( self, id: str, *, - params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] = None, + params: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetModelSyncSourceMetaEnvelope: """ @@ -46,7 +46,7 @@ def get_enrichment_source( ---------- id : str - params : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] + params : typing.Optional[typing.Dict[str, typing.Sequence[str]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1041,7 +1041,7 @@ async def get_enrichment_source( self, id: str, *, - params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] = None, + params: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetModelSyncSourceMetaEnvelope: """ @@ -1049,7 +1049,7 @@ async def get_enrichment_source( ---------- id : str - params : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]] + params : typing.Optional[typing.Dict[str, typing.Sequence[str]]] request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/polytomic/types/__init__.py b/src/polytomic/types/__init__.py index fdf1e45..1062e4c 100644 --- a/src/polytomic/types/__init__.py +++ b/src/polytomic/types/__init__.py @@ -15,6 +15,7 @@ from .bulk_fetch_mode import BulkFetchMode from .bulk_field import BulkField from .bulk_filter import BulkFilter +from .bulk_filter_2 import BulkFilter2 from .bulk_itemized_schedule import BulkItemizedSchedule from .bulk_multi_schedule_configuration import BulkMultiScheduleConfiguration from .bulk_normalize_names import BulkNormalizeNames @@ -50,6 +51,7 @@ from .cancel_model_sync_response_envelope import CancelModelSyncResponseEnvelope from .common_output_actor import CommonOutputActor from .configuration_value import ConfigurationValue +from .configuration_value_2 import ConfigurationValue2 from .connect_card_response import ConnectCardResponse from .connect_card_response_envelope import ConnectCardResponseEnvelope from .connection_list_response_envelope import ConnectionListResponseEnvelope @@ -122,6 +124,7 @@ from .override import Override from .pagination import Pagination from .pagination_details import PaginationDetails +from .pagination_details_2 import PaginationDetails2 from .pick_value import PickValue from .policy_action import PolicyAction from .policy_response import PolicyResponse @@ -216,6 +219,7 @@ "BulkFetchMode", "BulkField", "BulkFilter", + "BulkFilter2", "BulkItemizedSchedule", "BulkMultiScheduleConfiguration", "BulkNormalizeNames", @@ -251,6 +255,7 @@ "CancelModelSyncResponseEnvelope", "CommonOutputActor", "ConfigurationValue", + "ConfigurationValue2", "ConnectCardResponse", "ConnectCardResponseEnvelope", "ConnectionListResponseEnvelope", @@ -323,6 +328,7 @@ "Override", "Pagination", "PaginationDetails", + "PaginationDetails2", "PickValue", "PolicyAction", "PolicyResponse", diff --git a/src/polytomic/types/bulk_filter_2.py b/src/polytomic/types/bulk_filter_2.py new file mode 100644 index 0000000..0d6e162 --- /dev/null +++ b/src/polytomic/types/bulk_filter_2.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import pydantic +from .filter_function import FilterFunction +from ..core.pydantic_utilities import IS_PYDANTIC_V2 + + +class BulkFilter2(UniversalBaseModel): + field_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Schema field ID to filter on. + """ + + function: FilterFunction + value: typing.Optional[typing.Optional[typing.Any]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/polytomic/types/bulk_schema.py b/src/polytomic/types/bulk_schema.py index 22ce3f7..8dba581 100644 --- a/src/polytomic/types/bulk_schema.py +++ b/src/polytomic/types/bulk_schema.py @@ -4,7 +4,7 @@ import typing import datetime as dt from .bulk_field import BulkField -from .bulk_filter import BulkFilter +from .bulk_filter_2 import BulkFilter2 from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic @@ -14,7 +14,7 @@ class BulkSchema(UniversalBaseModel): disable_data_cutoff: typing.Optional[bool] = None enabled: typing.Optional[bool] = None fields: typing.Optional[typing.List[BulkField]] = None - filters: typing.Optional[typing.List[BulkFilter]] = None + filters: typing.Optional[typing.List[BulkFilter2]] = None id: typing.Optional[str] = None output_name: typing.Optional[str] = None partition_key: typing.Optional[str] = None diff --git a/src/polytomic/types/configuration_value_2.py b/src/polytomic/types/configuration_value_2.py new file mode 100644 index 0000000..73ef8bc --- /dev/null +++ b/src/polytomic/types/configuration_value_2.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ConfigurationValue2(UniversalBaseModel): + items: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None + type: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/polytomic/types/list_bulk_sync_executions_envelope.py b/src/polytomic/types/list_bulk_sync_executions_envelope.py index a63f897..37de437 100644 --- a/src/polytomic/types/list_bulk_sync_executions_envelope.py +++ b/src/polytomic/types/list_bulk_sync_executions_envelope.py @@ -3,14 +3,14 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing from .bulk_sync_execution import BulkSyncExecution -from .pagination_details import PaginationDetails +from .pagination_details_2 import PaginationDetails2 from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic class ListBulkSyncExecutionsEnvelope(UniversalBaseModel): data: typing.Optional[typing.List[BulkSyncExecution]] = None - pagination: typing.Optional[PaginationDetails] = None + pagination: typing.Optional[PaginationDetails2] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/polytomic/types/model_sync_source_meta_response.py b/src/polytomic/types/model_sync_source_meta_response.py index 552befd..79ea47b 100644 --- a/src/polytomic/types/model_sync_source_meta_response.py +++ b/src/polytomic/types/model_sync_source_meta_response.py @@ -2,14 +2,14 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing -from .configuration_value import ConfigurationValue +from .configuration_value_2 import ConfigurationValue2 from .source_meta import SourceMeta from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic class ModelSyncSourceMetaResponse(UniversalBaseModel): - configuration: typing.Optional[typing.Dict[str, ConfigurationValue]] = None + configuration: typing.Optional[typing.Dict[str, ConfigurationValue2]] = None items: typing.Optional[typing.Dict[str, typing.Optional[SourceMeta]]] = None requires_one_of: typing.Optional[typing.List[str]] = None diff --git a/src/polytomic/types/pagination_details_2.py b/src/polytomic/types/pagination_details_2.py new file mode 100644 index 0000000..eac847e --- /dev/null +++ b/src/polytomic/types/pagination_details_2.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class PaginationDetails2(UniversalBaseModel): + next_page_token: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/polytomic/users/client.py b/src/polytomic/users/client.py index aa0148e..2f67590 100644 --- a/src/polytomic/users/client.py +++ b/src/polytomic/users/client.py @@ -194,7 +194,7 @@ def create( raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text) raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json) - def get(self, id: str, org_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserEnvelope: + def get(self, org_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserEnvelope: """ > 🚧 Requires partner key > @@ -202,10 +202,10 @@ def get(self, id: str, org_id: str, *, request_options: typing.Optional[RequestO Parameters ---------- - id : str - org_id : str + id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -223,8 +223,8 @@ def get(self, id: str, org_id: str, *, request_options: typing.Optional[RequestO token="YOUR_TOKEN", ) client.users.get( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) """ _response = self._client_wrapper.httpx_client.request( @@ -278,8 +278,8 @@ def get(self, id: str, org_id: str, *, request_options: typing.Optional[RequestO def update( self, - id: str, org_id: str, + id: str, *, email: str, role: typing.Optional[str] = OMIT, @@ -292,10 +292,10 @@ def update( Parameters ---------- - id : str - org_id : str + id : str + email : str role : typing.Optional[str] @@ -317,8 +317,8 @@ def update( token="YOUR_TOKEN", ) client.users.update( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", email="mail@example.com", ) """ @@ -379,7 +379,7 @@ def update( raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text) raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json) - def remove(self, id: str, org_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserEnvelope: + def remove(self, org_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserEnvelope: """ > 🚧 Requires partner key > @@ -387,10 +387,10 @@ def remove(self, id: str, org_id: str, *, request_options: typing.Optional[Reque Parameters ---------- - id : str - org_id : str + id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -408,8 +408,8 @@ def remove(self, id: str, org_id: str, *, request_options: typing.Optional[Reque token="YOUR_TOKEN", ) client.users.remove( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) """ _response = self._client_wrapper.httpx_client.request( @@ -746,7 +746,7 @@ async def main() -> None: raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json) async def get( - self, id: str, org_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, org_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> UserEnvelope: """ > 🚧 Requires partner key @@ -755,10 +755,10 @@ async def get( Parameters ---------- - id : str - org_id : str + id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -781,8 +781,8 @@ async def get( async def main() -> None: await client.users.get( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", ) @@ -839,8 +839,8 @@ async def main() -> None: async def update( self, - id: str, org_id: str, + id: str, *, email: str, role: typing.Optional[str] = OMIT, @@ -853,10 +853,10 @@ async def update( Parameters ---------- - id : str - org_id : str + id : str + email : str role : typing.Optional[str] @@ -883,8 +883,8 @@ async def update( async def main() -> None: await client.users.update( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", email="mail@example.com", ) @@ -949,7 +949,7 @@ async def main() -> None: raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json) async def remove( - self, id: str, org_id: str, *, request_options: typing.Optional[RequestOptions] = None + self, org_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> UserEnvelope: """ > 🚧 Requires partner key @@ -958,10 +958,10 @@ async def remove( Parameters ---------- - id : str - org_id : str + id : str + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -984,8 +984,8 @@ async def remove( async def main() -> None: await client.users.remove( - id="248df4b7-aa70-47b8-a036-33ac447e668d", org_id="248df4b7-aa70-47b8-a036-33ac447e668d", + id="248df4b7-aa70-47b8-a036-33ac447e668d", )