From 5b2b1d2b143d3e2177fbc28f02cbc03909afe0f4 Mon Sep 17 00:00:00 2001 From: polytomic-sdk-bot Date: Wed, 3 Jul 2024 22:06:14 +0000 Subject: [PATCH] Release 1.8.0 --- pyproject.toml | 2 +- src/polytomic/__init__.py | 22 +++++++++ src/polytomic/bulk_sync/executions/client.py | 10 +++- src/polytomic/core/client_wrapper.py | 2 +- src/polytomic/types/__init__.py | 22 +++++++++ .../types/bulk_sync_canceled_event.py | 34 +++++++++++++ .../types/bulk_sync_completed_event.py | 35 ++++++++++++++ .../bulk_sync_completed_with_error_event.py | 35 ++++++++++++++ src/polytomic/types/bulk_sync_failed_event.py | 35 ++++++++++++++ .../types/bulk_sync_running_event.py | 34 +++++++++++++ src/polytomic/types/event.py | 3 +- src/polytomic/types/event_body.py | 27 +++++++++++ src/polytomic/types/sync_canceled_event.py | 35 ++++++++++++++ src/polytomic/types/sync_completed_event.py | 48 +++++++++++++++++++ .../types/sync_completed_with_errors_event.py | 36 ++++++++++++++ src/polytomic/types/sync_failed_event.py | 34 +++++++++++++ src/polytomic/types/sync_running_event.py | 33 +++++++++++++ 17 files changed, 442 insertions(+), 5 deletions(-) create mode 100644 src/polytomic/types/bulk_sync_canceled_event.py create mode 100644 src/polytomic/types/bulk_sync_completed_event.py create mode 100644 src/polytomic/types/bulk_sync_completed_with_error_event.py create mode 100644 src/polytomic/types/bulk_sync_failed_event.py create mode 100644 src/polytomic/types/bulk_sync_running_event.py create mode 100644 src/polytomic/types/event_body.py create mode 100644 src/polytomic/types/sync_canceled_event.py create mode 100644 src/polytomic/types/sync_completed_event.py create mode 100644 src/polytomic/types/sync_completed_with_errors_event.py create mode 100644 src/polytomic/types/sync_failed_event.py create mode 100644 src/polytomic/types/sync_running_event.py diff --git a/pyproject.toml b/pyproject.toml index 1b7a254..05e729a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "polytomic" -version = "1.7.0" +version = "1.8.0" description = "" readme = "README.md" authors = [] diff --git a/src/polytomic/__init__.py b/src/polytomic/__init__.py index eadd8ba..3a65a98 100644 --- a/src/polytomic/__init__.py +++ b/src/polytomic/__init__.py @@ -18,14 +18,19 @@ BulkSchemaEnvelope, BulkSchemaExecutionStatus, BulkSelectiveMode, + BulkSyncCanceledEvent, + BulkSyncCompletedEvent, + BulkSyncCompletedWithErrorEvent, BulkSyncDest, BulkSyncDestEnvelope, BulkSyncExecution, BulkSyncExecutionEnvelope, BulkSyncExecutionStatus, + BulkSyncFailedEvent, BulkSyncListEnvelope, BulkSyncResponse, BulkSyncResponseEnvelope, + BulkSyncRunningEvent, BulkSyncSchemaExecution, BulkSyncSchemaExecutionStatus, BulkSyncSource, @@ -54,6 +59,7 @@ CreateModelRequest, Enrichment, Event, + EventBody, EventTypesEnvelope, EventsEnvelope, ExecutionCounts, @@ -130,7 +136,12 @@ StartModelSyncResponseEnvelope, StartModelSyncResponseSchema, SupportedMode, + SyncCanceledEvent, + SyncCompletedEvent, + SyncCompletedWithErrorsEvent, SyncDestinationProperties, + SyncFailedEvent, + SyncRunningEvent, SyncStatusEnvelope, SyncStatusResponse, Target, @@ -198,14 +209,19 @@ "BulkSchemaEnvelope", "BulkSchemaExecutionStatus", "BulkSelectiveMode", + "BulkSyncCanceledEvent", + "BulkSyncCompletedEvent", + "BulkSyncCompletedWithErrorEvent", "BulkSyncDest", "BulkSyncDestEnvelope", "BulkSyncExecution", "BulkSyncExecutionEnvelope", "BulkSyncExecutionStatus", + "BulkSyncFailedEvent", "BulkSyncListEnvelope", "BulkSyncResponse", "BulkSyncResponseEnvelope", + "BulkSyncRunningEvent", "BulkSyncSchemaExecution", "BulkSyncSchemaExecutionStatus", "BulkSyncSource", @@ -234,6 +250,7 @@ "CreateModelRequest", "Enrichment", "Event", + "EventBody", "EventTypesEnvelope", "EventsEnvelope", "ExecutionCounts", @@ -314,7 +331,12 @@ "StartModelSyncResponseEnvelope", "StartModelSyncResponseSchema", "SupportedMode", + "SyncCanceledEvent", + "SyncCompletedEvent", + "SyncCompletedWithErrorsEvent", "SyncDestinationProperties", + "SyncFailedEvent", + "SyncRunningEvent", "SyncStatusEnvelope", "SyncStatusResponse", "Target", diff --git a/src/polytomic/bulk_sync/executions/client.py b/src/polytomic/bulk_sync/executions/client.py index e8e1e6f..78cb674 100644 --- a/src/polytomic/bulk_sync/executions/client.py +++ b/src/polytomic/bulk_sync/executions/client.py @@ -59,7 +59,10 @@ def list_status( version="YOUR_VERSION", token="YOUR_TOKEN", ) - client.bulk_sync.executions.list_status() + client.bulk_sync.executions.list_status( + all_=True, + active=True, + ) """ _response = self._client_wrapper.httpx_client.request( method="GET", @@ -273,7 +276,10 @@ async def list_status( version="YOUR_VERSION", token="YOUR_TOKEN", ) - await client.bulk_sync.executions.list_status() + await client.bulk_sync.executions.list_status( + all_=True, + active=True, + ) """ _response = await self._client_wrapper.httpx_client.request( method="GET", diff --git a/src/polytomic/core/client_wrapper.py b/src/polytomic/core/client_wrapper.py index 671c113..2a80c17 100644 --- a/src/polytomic/core/client_wrapper.py +++ b/src/polytomic/core/client_wrapper.py @@ -25,7 +25,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.7.0", + "X-Fern-SDK-Version": "1.8.0", } if self._version is not None: headers["X-Polytomic-Version"] = self._version diff --git a/src/polytomic/types/__init__.py b/src/polytomic/types/__init__.py index e74b9b6..de74e42 100644 --- a/src/polytomic/types/__init__.py +++ b/src/polytomic/types/__init__.py @@ -17,14 +17,19 @@ from .bulk_schema_envelope import BulkSchemaEnvelope from .bulk_schema_execution_status import BulkSchemaExecutionStatus from .bulk_selective_mode import BulkSelectiveMode +from .bulk_sync_canceled_event import BulkSyncCanceledEvent +from .bulk_sync_completed_event import BulkSyncCompletedEvent +from .bulk_sync_completed_with_error_event import BulkSyncCompletedWithErrorEvent from .bulk_sync_dest import BulkSyncDest from .bulk_sync_dest_envelope import BulkSyncDestEnvelope from .bulk_sync_execution import BulkSyncExecution from .bulk_sync_execution_envelope import BulkSyncExecutionEnvelope from .bulk_sync_execution_status import BulkSyncExecutionStatus +from .bulk_sync_failed_event import BulkSyncFailedEvent from .bulk_sync_list_envelope import BulkSyncListEnvelope from .bulk_sync_response import BulkSyncResponse from .bulk_sync_response_envelope import BulkSyncResponseEnvelope +from .bulk_sync_running_event import BulkSyncRunningEvent from .bulk_sync_schema_execution import BulkSyncSchemaExecution from .bulk_sync_schema_execution_status import BulkSyncSchemaExecutionStatus from .bulk_sync_source import BulkSyncSource @@ -53,6 +58,7 @@ from .create_model_request import CreateModelRequest from .enrichment import Enrichment from .event import Event +from .event_body import EventBody from .event_types_envelope import EventTypesEnvelope from .events_envelope import EventsEnvelope from .execution_counts import ExecutionCounts @@ -129,7 +135,12 @@ from .start_model_sync_response_envelope import StartModelSyncResponseEnvelope from .start_model_sync_response_schema import StartModelSyncResponseSchema from .supported_mode import SupportedMode +from .sync_canceled_event import SyncCanceledEvent +from .sync_completed_event import SyncCompletedEvent +from .sync_completed_with_errors_event import SyncCompletedWithErrorsEvent from .sync_destination_properties import SyncDestinationProperties +from .sync_failed_event import SyncFailedEvent +from .sync_running_event import SyncRunningEvent from .sync_status_envelope import SyncStatusEnvelope from .sync_status_response import SyncStatusResponse from .target import Target @@ -169,14 +180,19 @@ "BulkSchemaEnvelope", "BulkSchemaExecutionStatus", "BulkSelectiveMode", + "BulkSyncCanceledEvent", + "BulkSyncCompletedEvent", + "BulkSyncCompletedWithErrorEvent", "BulkSyncDest", "BulkSyncDestEnvelope", "BulkSyncExecution", "BulkSyncExecutionEnvelope", "BulkSyncExecutionStatus", + "BulkSyncFailedEvent", "BulkSyncListEnvelope", "BulkSyncResponse", "BulkSyncResponseEnvelope", + "BulkSyncRunningEvent", "BulkSyncSchemaExecution", "BulkSyncSchemaExecutionStatus", "BulkSyncSource", @@ -205,6 +221,7 @@ "CreateModelRequest", "Enrichment", "Event", + "EventBody", "EventTypesEnvelope", "EventsEnvelope", "ExecutionCounts", @@ -281,7 +298,12 @@ "StartModelSyncResponseEnvelope", "StartModelSyncResponseSchema", "SupportedMode", + "SyncCanceledEvent", + "SyncCompletedEvent", + "SyncCompletedWithErrorsEvent", "SyncDestinationProperties", + "SyncFailedEvent", + "SyncRunningEvent", "SyncStatusEnvelope", "SyncStatusResponse", "Target", diff --git a/src/polytomic/types/bulk_sync_canceled_event.py b/src/polytomic/types/bulk_sync_canceled_event.py new file mode 100644 index 0000000..4dcc4a6 --- /dev/null +++ b/src/polytomic/types/bulk_sync_canceled_event.py @@ -0,0 +1,34 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class BulkSyncCanceledEvent(pydantic_v1.BaseModel): + destination_connection_id: typing.Optional[str] = None + execution_id: typing.Optional[str] = None + name: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + source_connection_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/bulk_sync_completed_event.py b/src/polytomic/types/bulk_sync_completed_event.py new file mode 100644 index 0000000..28b75f5 --- /dev/null +++ b/src/polytomic/types/bulk_sync_completed_event.py @@ -0,0 +1,35 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class BulkSyncCompletedEvent(pydantic_v1.BaseModel): + destination_connection_id: typing.Optional[str] = None + execution_id: typing.Optional[str] = None + name: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + source_connection_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + trigger_source: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/bulk_sync_completed_with_error_event.py b/src/polytomic/types/bulk_sync_completed_with_error_event.py new file mode 100644 index 0000000..50e8d6e --- /dev/null +++ b/src/polytomic/types/bulk_sync_completed_with_error_event.py @@ -0,0 +1,35 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class BulkSyncCompletedWithErrorEvent(pydantic_v1.BaseModel): + destination_connection_id: typing.Optional[str] = None + execution_id: typing.Optional[str] = None + name: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + source_connection_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + trigger_source: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/bulk_sync_failed_event.py b/src/polytomic/types/bulk_sync_failed_event.py new file mode 100644 index 0000000..f63d2e7 --- /dev/null +++ b/src/polytomic/types/bulk_sync_failed_event.py @@ -0,0 +1,35 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class BulkSyncFailedEvent(pydantic_v1.BaseModel): + destination_connection_id: typing.Optional[str] = None + error: typing.Optional[str] = None + execution_id: typing.Optional[str] = None + name: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + source_connection_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/bulk_sync_running_event.py b/src/polytomic/types/bulk_sync_running_event.py new file mode 100644 index 0000000..ca64c0b --- /dev/null +++ b/src/polytomic/types/bulk_sync_running_event.py @@ -0,0 +1,34 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class BulkSyncRunningEvent(pydantic_v1.BaseModel): + destination_connection_id: typing.Optional[str] = None + execution_id: typing.Optional[str] = None + name: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + source_connection_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/event.py b/src/polytomic/types/event.py index 3b6ef5e..c82e829 100644 --- a/src/polytomic/types/event.py +++ b/src/polytomic/types/event.py @@ -5,11 +5,12 @@ from ..core.datetime_utils import serialize_datetime from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .event_body import EventBody class Event(pydantic_v1.BaseModel): created_at: typing.Optional[dt.datetime] = None - event: typing.Optional[typing.Any] = None + event: typing.Optional[EventBody] = None id: typing.Optional[str] = None organization_id: typing.Optional[str] = None type: typing.Optional[str] = None diff --git a/src/polytomic/types/event_body.py b/src/polytomic/types/event_body.py new file mode 100644 index 0000000..ae9a223 --- /dev/null +++ b/src/polytomic/types/event_body.py @@ -0,0 +1,27 @@ +# This file was auto-generated from our API Definition. + +import typing + +from .bulk_sync_canceled_event import BulkSyncCanceledEvent +from .bulk_sync_completed_event import BulkSyncCompletedEvent +from .bulk_sync_completed_with_error_event import BulkSyncCompletedWithErrorEvent +from .bulk_sync_failed_event import BulkSyncFailedEvent +from .bulk_sync_running_event import BulkSyncRunningEvent +from .sync_canceled_event import SyncCanceledEvent +from .sync_completed_event import SyncCompletedEvent +from .sync_completed_with_errors_event import SyncCompletedWithErrorsEvent +from .sync_failed_event import SyncFailedEvent +from .sync_running_event import SyncRunningEvent + +EventBody = typing.Union[ + SyncRunningEvent, + SyncCompletedEvent, + SyncFailedEvent, + SyncCanceledEvent, + SyncCompletedWithErrorsEvent, + BulkSyncRunningEvent, + BulkSyncCompletedEvent, + BulkSyncCanceledEvent, + BulkSyncCompletedWithErrorEvent, + BulkSyncFailedEvent, +] diff --git a/src/polytomic/types/sync_canceled_event.py b/src/polytomic/types/sync_canceled_event.py new file mode 100644 index 0000000..b12c628 --- /dev/null +++ b/src/polytomic/types/sync_canceled_event.py @@ -0,0 +1,35 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .execution_status import ExecutionStatus + + +class SyncCanceledEvent(pydantic_v1.BaseModel): + execution_id: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + status: typing.Optional[ExecutionStatus] = None + sync_id: typing.Optional[str] = None + sync_name: typing.Optional[str] = None + target_connection_id: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/sync_completed_event.py b/src/polytomic/types/sync_completed_event.py new file mode 100644 index 0000000..419e008 --- /dev/null +++ b/src/polytomic/types/sync_completed_event.py @@ -0,0 +1,48 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .execution_status import ExecutionStatus + + +class SyncCompletedEvent(pydantic_v1.BaseModel): + deleted_records: typing.Optional[typing.List[str]] = None + error_count: typing.Optional[int] = None + errored_records: typing.Optional[typing.List[str]] = None + execution_id: typing.Optional[str] = None + inserted_count: typing.Optional[int] = None + inserted_records: typing.Optional[typing.List[str]] = None + name: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + record_count: typing.Optional[int] = None + status: typing.Optional[ExecutionStatus] = None + sync_id: typing.Optional[str] = None + target_connection_id: typing.Optional[str] = None + total_records: typing.Optional[typing.List[str]] = None + trigger: typing.Optional[str] = None + updated_count: typing.Optional[int] = None + updated_records: typing.Optional[typing.List[str]] = None + upserted_count: typing.Optional[int] = None + warning_count: typing.Optional[int] = None + warnings: typing.Optional[typing.List[str]] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/sync_completed_with_errors_event.py b/src/polytomic/types/sync_completed_with_errors_event.py new file mode 100644 index 0000000..242471c --- /dev/null +++ b/src/polytomic/types/sync_completed_with_errors_event.py @@ -0,0 +1,36 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class SyncCompletedWithErrorsEvent(pydantic_v1.BaseModel): + error: typing.Optional[str] = None + execution_id: typing.Optional[str] = None + number_of_errors: typing.Optional[int] = None + number_of_warnings: typing.Optional[int] = None + organization_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + sync_name: typing.Optional[str] = None + target_connection_id: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/sync_failed_event.py b/src/polytomic/types/sync_failed_event.py new file mode 100644 index 0000000..01596af --- /dev/null +++ b/src/polytomic/types/sync_failed_event.py @@ -0,0 +1,34 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class SyncFailedEvent(pydantic_v1.BaseModel): + error: typing.Optional[str] = None + execution_id: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + sync_name: typing.Optional[str] = None + target_connection_id: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/polytomic/types/sync_running_event.py b/src/polytomic/types/sync_running_event.py new file mode 100644 index 0000000..e0c277e --- /dev/null +++ b/src/polytomic/types/sync_running_event.py @@ -0,0 +1,33 @@ +# This file was auto-generated from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime +from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class SyncRunningEvent(pydantic_v1.BaseModel): + execution_id: typing.Optional[str] = None + name: typing.Optional[str] = None + organization_id: typing.Optional[str] = None + sync_id: typing.Optional[str] = None + target_connection_id: typing.Optional[str] = None + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs} + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none) + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime}