Skip to content

Commit f6c238f

Browse files
Release 1.5.0
1 parent 14dcefb commit f6c238f

13 files changed

+177
-61
lines changed

README.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "polytomic"
3-
version = "1.4.0"
3+
version = "1.5.0"
44
description = ""
55
readme = "README.md"
66
authors = []

src/polytomic/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@
163163
users,
164164
webhooks,
165165
)
166+
from .bulk_sync import (
167+
FieldConfiguration,
168+
SchemaConfiguration,
169+
V2CreateBulkSyncRequestSchemasItem,
170+
V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem,
171+
V2UpdateBulkSyncRequestSchemasItem,
172+
V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem,
173+
)
166174
from .environment import PolytomicEnvironment
167175
from .version import __version__
168176

@@ -224,6 +232,7 @@
224232
"ExecutionLogResponse",
225233
"ExecutionLogsResponseEnvelope",
226234
"ExecutionStatus",
235+
"FieldConfiguration",
227236
"Filter",
228237
"FilterFieldReferenceType",
229238
"FilterFunction",
@@ -286,6 +295,7 @@
286295
"ScheduleScheduleOption",
287296
"Schema",
288297
"SchemaAssociation",
298+
"SchemaConfiguration",
289299
"SchemaField",
290300
"SchemaIdentityFunction",
291301
"SchemaRecordsResponseEnvelope",
@@ -305,10 +315,14 @@
305315
"UnprocessableEntityError",
306316
"User",
307317
"UserEnvelope",
318+
"V2CreateBulkSyncRequestSchemasItem",
319+
"V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem",
308320
"V2EnricherConfiguration",
309321
"V2EnricherMapping",
310322
"V2GetEnrichmentInputFieldsResponseEnvelope",
311323
"V2SampleRecord",
324+
"V2UpdateBulkSyncRequestSchemasItem",
325+
"V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem",
312326
"Webhook",
313327
"WebhookEnvelope",
314328
"WebhookListEnvelope",
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# This file was auto-generated by Fern from our API Definition.
22

3+
from .types import (
4+
FieldConfiguration,
5+
SchemaConfiguration,
6+
V2CreateBulkSyncRequestSchemasItem,
7+
V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem,
8+
V2UpdateBulkSyncRequestSchemasItem,
9+
V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem,
10+
)
311
from . import executions, schemas
412

5-
__all__ = ["executions", "schemas"]
13+
__all__ = [
14+
"FieldConfiguration",
15+
"SchemaConfiguration",
16+
"V2CreateBulkSyncRequestSchemasItem",
17+
"V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem",
18+
"V2UpdateBulkSyncRequestSchemasItem",
19+
"V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem",
20+
"executions",
21+
"schemas",
22+
]

src/polytomic/bulk_sync/client.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
from ..types.rest_err_response import RestErrResponse
2929
from .executions.client import AsyncExecutionsClient, ExecutionsClient
3030
from .schemas.client import AsyncSchemasClient, SchemasClient
31+
from .types.v_2_create_bulk_sync_request_schemas_item import V2CreateBulkSyncRequestSchemasItem
32+
from .types.v_2_update_bulk_sync_request_schemas_item import V2UpdateBulkSyncRequestSchemasItem
3133

3234
# this is used as the default value for optional parameters
3335
OMIT = typing.cast(typing.Any, ...)
@@ -110,7 +112,7 @@ def create(
110112
discover: typing.Optional[bool] = OMIT,
111113
organization_id: typing.Optional[str] = OMIT,
112114
policies: typing.Optional[typing.Sequence[str]] = OMIT,
113-
schemas: typing.Optional[typing.Sequence[str]] = OMIT,
115+
schemas: typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]] = OMIT,
114116
source_configuration: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
115117
request_options: typing.Optional[RequestOptions] = None,
116118
) -> BulkSyncResponseEnvelope:
@@ -145,7 +147,8 @@ def create(
145147
146148
policies : typing.Optional[typing.Sequence[str]]
147149
148-
schemas : typing.Optional[typing.Sequence[str]]
150+
schemas : typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]]
151+
List of schemas to sync; if omitted, all schemas will be selected for syncing.
149152
150153
source_configuration : typing.Optional[typing.Dict[str, typing.Any]]
151154
@@ -340,7 +343,7 @@ def update(
340343
discover: typing.Optional[bool] = OMIT,
341344
organization_id: typing.Optional[str] = OMIT,
342345
policies: typing.Optional[typing.Sequence[str]] = OMIT,
343-
schemas: typing.Optional[typing.Sequence[str]] = OMIT,
346+
schemas: typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]] = OMIT,
344347
source_configuration: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
345348
request_options: typing.Optional[RequestOptions] = None,
346349
) -> BulkSyncResponseEnvelope:
@@ -381,7 +384,8 @@ def update(
381384
382385
policies : typing.Optional[typing.Sequence[str]]
383386
384-
schemas : typing.Optional[typing.Sequence[str]]
387+
schemas : typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]]
388+
List of schemas to sync; if omitted, all schemas will be selected for syncing.
385389
386390
source_configuration : typing.Optional[typing.Dict[str, typing.Any]]
387391
@@ -1023,7 +1027,7 @@ async def create(
10231027
discover: typing.Optional[bool] = OMIT,
10241028
organization_id: typing.Optional[str] = OMIT,
10251029
policies: typing.Optional[typing.Sequence[str]] = OMIT,
1026-
schemas: typing.Optional[typing.Sequence[str]] = OMIT,
1030+
schemas: typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]] = OMIT,
10271031
source_configuration: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
10281032
request_options: typing.Optional[RequestOptions] = None,
10291033
) -> BulkSyncResponseEnvelope:
@@ -1058,7 +1062,8 @@ async def create(
10581062
10591063
policies : typing.Optional[typing.Sequence[str]]
10601064
1061-
schemas : typing.Optional[typing.Sequence[str]]
1065+
schemas : typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]]
1066+
List of schemas to sync; if omitted, all schemas will be selected for syncing.
10621067
10631068
source_configuration : typing.Optional[typing.Dict[str, typing.Any]]
10641069
@@ -1253,7 +1258,7 @@ async def update(
12531258
discover: typing.Optional[bool] = OMIT,
12541259
organization_id: typing.Optional[str] = OMIT,
12551260
policies: typing.Optional[typing.Sequence[str]] = OMIT,
1256-
schemas: typing.Optional[typing.Sequence[str]] = OMIT,
1261+
schemas: typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]] = OMIT,
12571262
source_configuration: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
12581263
request_options: typing.Optional[RequestOptions] = None,
12591264
) -> BulkSyncResponseEnvelope:
@@ -1294,7 +1299,8 @@ async def update(
12941299
12951300
policies : typing.Optional[typing.Sequence[str]]
12961301
1297-
schemas : typing.Optional[typing.Sequence[str]]
1302+
schemas : typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]]
1303+
List of schemas to sync; if omitted, all schemas will be selected for syncing.
12981304
12991305
source_configuration : typing.Optional[typing.Dict[str, typing.Any]]
13001306
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from .field_configuration import FieldConfiguration
4+
from .schema_configuration import SchemaConfiguration
5+
from .v_2_create_bulk_sync_request_schemas_item import V2CreateBulkSyncRequestSchemasItem
6+
from .v_2_create_bulk_sync_request_schemas_item_enabled_fields_item import (
7+
V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem,
8+
)
9+
from .v_2_update_bulk_sync_request_schemas_item import V2UpdateBulkSyncRequestSchemasItem
10+
from .v_2_update_bulk_sync_request_schemas_item_enabled_fields_item import (
11+
V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem,
12+
)
13+
14+
__all__ = [
15+
"FieldConfiguration",
16+
"SchemaConfiguration",
17+
"V2CreateBulkSyncRequestSchemasItem",
18+
"V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem",
19+
"V2UpdateBulkSyncRequestSchemasItem",
20+
"V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem",
21+
]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This file was auto-generated from our API Definition.
2+
3+
import datetime as dt
4+
import typing
5+
6+
from ...core.datetime_utils import serialize_datetime
7+
from ...core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8+
9+
10+
class FieldConfiguration(pydantic_v1.BaseModel):
11+
enabled: typing.Optional[bool] = pydantic_v1.Field(default=None)
12+
"""
13+
Whether the field is enabled for syncing.
14+
"""
15+
16+
id: typing.Optional[str] = None
17+
obfuscate: typing.Optional[bool] = pydantic_v1.Field(default=None)
18+
"""
19+
Whether the field should be obfuscated.
20+
"""
21+
22+
def json(self, **kwargs: typing.Any) -> str:
23+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24+
return super().json(**kwargs_with_defaults)
25+
26+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
28+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
29+
30+
return deep_union_pydantic_dicts(
31+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
32+
)
33+
34+
class Config:
35+
frozen = True
36+
smart_union = True
37+
extra = pydantic_v1.Extra.allow
38+
json_encoders = {dt.datetime: serialize_datetime}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file was auto-generated from our API Definition.
2+
3+
import datetime as dt
4+
import typing
5+
6+
from ...core.datetime_utils import serialize_datetime
7+
from ...core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8+
from .v_2_update_bulk_sync_request_schemas_item_enabled_fields_item import (
9+
V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem,
10+
)
11+
12+
13+
class SchemaConfiguration(pydantic_v1.BaseModel):
14+
enabled: typing.Optional[bool] = pydantic_v1.Field(default=None)
15+
"""
16+
Whether the schema is enabled for syncing.
17+
"""
18+
19+
fields: typing.Optional[typing.List[V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem]] = None
20+
id: typing.Optional[str] = None
21+
partition_key: typing.Optional[str] = pydantic_v1.Field(alias="partitionKey", default=None)
22+
tracking_field: typing.Optional[str] = pydantic_v1.Field(alias="trackingField", default=None)
23+
24+
def json(self, **kwargs: typing.Any) -> str:
25+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
26+
return super().json(**kwargs_with_defaults)
27+
28+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
29+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
30+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
31+
32+
return deep_union_pydantic_dicts(
33+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
34+
)
35+
36+
class Config:
37+
frozen = True
38+
smart_union = True
39+
allow_population_by_field_name = True
40+
populate_by_name = True
41+
extra = pydantic_v1.Extra.allow
42+
json_encoders = {dt.datetime: serialize_datetime}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was auto-generated from our API Definition.
2+
3+
import typing
4+
5+
from .schema_configuration import SchemaConfiguration
6+
7+
V2CreateBulkSyncRequestSchemasItem = typing.Union[str, SchemaConfiguration]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was auto-generated from our API Definition.
2+
3+
import typing
4+
5+
from .field_configuration import FieldConfiguration
6+
7+
V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem = typing.Union[str, FieldConfiguration]

0 commit comments

Comments
 (0)