From 5ecc912059749ac9fadd95a2f17615c41a982348 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 13 Feb 2026 21:10:44 +0000
Subject: [PATCH] SDK regeneration
---
pyproject.toml | 2 +-
reference.md | 603 ++++++------------
src/polytomic/__init__.py | 34 +-
src/polytomic/bulk_sync/__init__.py | 6 +-
src/polytomic/bulk_sync/client.py | 274 ++++----
src/polytomic/bulk_sync/executions/client.py | 50 +-
src/polytomic/bulk_sync/schedules/client.py | 34 +-
src/polytomic/bulk_sync/schemas/client.py | 46 +-
src/polytomic/bulk_sync/types/__init__.py | 6 +-
...5create_bulk_sync_request_schemas_item.py} | 2 +-
...5update_bulk_sync_request_schemas_item.py} | 2 +-
src/polytomic/client.py | 8 +-
src/polytomic/connections/client.py | 90 +--
src/polytomic/core/client_wrapper.py | 8 +-
src/polytomic/events/client.py | 23 +-
src/polytomic/jobs/client.py | 20 +-
src/polytomic/model_sync/client.py | 305 +++------
src/polytomic/model_sync/executions/client.py | 279 +-------
src/polytomic/model_sync/targets/client.py | 26 +-
src/polytomic/models/client.py | 74 ++-
src/polytomic/notifications/client.py | 2 +-
src/polytomic/organization/client.py | 20 +-
src/polytomic/permissions/policies/client.py | 20 +-
src/polytomic/permissions/roles/client.py | 20 +-
src/polytomic/query_runner/client.py | 14 +-
src/polytomic/schemas/client.py | 62 +-
src/polytomic/types/__init__.py | 72 ++-
src/polytomic/types/bulk_filter2.py | 26 +
src/polytomic/types/bulk_schema.py | 4 +-
src/polytomic/types/bulk_sync_schedule.py | 34 +
...elope.py => bulk_sync_schedule_request.py} | 16 +-
...se_envelope.py => configuration_value2.py} | 6 +-
.../types/connection_response_schema.py | 6 +-
src/polytomic/types/connection_type.py | 2 +-
src/polytomic/types/enrichment.py | 4 +-
src/polytomic/types/jsonschema_schema.py | 2 +-
.../list_bulk_sync_executions_envelope.py | 4 +-
.../list_model_sync_response_envelope.py | 6 +-
src/polytomic/types/model_sample.py | 2 +-
.../types/model_sync_list_response.py | 41 ++
.../types/model_sync_source_meta_response.py | 4 +-
...ync_response.py => pagination_details2.py} | 4 +-
src/polytomic/types/pagination_details3.py | 19 +
src/polytomic/types/run_after2.py | 20 +
src/polytomic/types/schedule2.py | 33 +
src/polytomic/types/schema_configuration.py | 2 +-
...onnection_form.py => v2connection_form.py} | 0
...uration.py => v2enricher_configuration.py} | 0
...icher_mapping.py => v2enricher_mapping.py} | 0
...on_log_type.py => v2execution_log_type.py} | 0
...ichment_input_fields_response_envelope.py} | 0
...g_github_com_invopop_jsonschema_schema.py} | 0
..._2_sample_record.py => v2sample_record.py} | 0
... => v2schema_configuration_fields_item.py} | 0
..._logs.py => v4bulk_sync_execution_logs.py} | 0
...=> v4bulk_sync_execution_logs_envelope.py} | 2 +-
...ule_api.py => v4bulk_sync_schedule_api.py} | 0
...lope.py => v4export_sync_logs_envelope.py} | 2 +-
...onse.py => v4export_sync_logs_response.py} | 0
...=> v4global_error_subscribers_response.py} | 0
...nvelope.py => v4query_results_envelope.py} | 2 +-
...ry_envelope.py => v4run_query_envelope.py} | 2 +-
..._query_result.py => v4run_query_result.py} | 0
..._target_creator.py => v4target_creator.py} | 0
... => v4target_objects_response_envelope.py} | 2 +-
..._values.py => v4target_property_values.py} | 0
...y => v4target_property_values_envelope.py} | 2 +-
...eld_request.py => v4user_field_request.py} | 0
src/polytomic/types/v5bulk_sync_response.py | 72 +++
.../types/v5bulk_sync_response_envelope.py | 20 +
src/polytomic/users/client.py | 86 ++-
src/polytomic/webhooks/client.py | 36 +-
72 files changed, 1096 insertions(+), 1467 deletions(-)
rename src/polytomic/bulk_sync/types/{v_2_create_bulk_sync_request_schemas_item.py => v5create_bulk_sync_request_schemas_item.py} (70%)
rename src/polytomic/bulk_sync/types/{v_2_update_bulk_sync_request_schemas_item.py => v5update_bulk_sync_request_schemas_item.py} (70%)
create mode 100644 src/polytomic/types/bulk_filter2.py
create mode 100644 src/polytomic/types/bulk_sync_schedule.py
rename src/polytomic/types/{bulk_sync_response_envelope.py => bulk_sync_schedule_request.py} (52%)
rename src/polytomic/types/{cancel_model_sync_response_envelope.py => configuration_value2.py} (73%)
create mode 100644 src/polytomic/types/model_sync_list_response.py
rename src/polytomic/types/{cancel_model_sync_response.py => pagination_details2.py} (84%)
create mode 100644 src/polytomic/types/pagination_details3.py
create mode 100644 src/polytomic/types/run_after2.py
create mode 100644 src/polytomic/types/schedule2.py
rename src/polytomic/types/{v_2_connection_form.py => v2connection_form.py} (100%)
rename src/polytomic/types/{v_2_enricher_configuration.py => v2enricher_configuration.py} (100%)
rename src/polytomic/types/{v_2_enricher_mapping.py => v2enricher_mapping.py} (100%)
rename src/polytomic/types/{v_2_execution_log_type.py => v2execution_log_type.py} (100%)
rename src/polytomic/types/{v_2_get_enrichment_input_fields_response_envelope.py => v2get_enrichment_input_fields_response_envelope.py} (100%)
rename src/polytomic/types/{v_2_ordered_map_string_github_com_invopop_jsonschema_schema.py => v2ordered_map_string_github_com_invopop_jsonschema_schema.py} (100%)
rename src/polytomic/types/{v_2_sample_record.py => v2sample_record.py} (100%)
rename src/polytomic/types/{v_2_schema_configuration_fields_item.py => v2schema_configuration_fields_item.py} (100%)
rename src/polytomic/types/{v_4_bulk_sync_execution_logs.py => v4bulk_sync_execution_logs.py} (100%)
rename src/polytomic/types/{v_4_bulk_sync_execution_logs_envelope.py => v4bulk_sync_execution_logs_envelope.py} (90%)
rename src/polytomic/types/{v_4_bulk_sync_schedule_api.py => v4bulk_sync_schedule_api.py} (100%)
rename src/polytomic/types/{v_4_export_sync_logs_envelope.py => v4export_sync_logs_envelope.py} (91%)
rename src/polytomic/types/{v_4_export_sync_logs_response.py => v4export_sync_logs_response.py} (100%)
rename src/polytomic/types/{v_4_global_error_subscribers_response.py => v4global_error_subscribers_response.py} (100%)
rename src/polytomic/types/{v_4_query_results_envelope.py => v4query_results_envelope.py} (93%)
rename src/polytomic/types/{v_4_run_query_envelope.py => v4run_query_envelope.py} (92%)
rename src/polytomic/types/{v_4_run_query_result.py => v4run_query_result.py} (100%)
rename src/polytomic/types/{v_4_target_creator.py => v4target_creator.py} (100%)
rename src/polytomic/types/{v_4_target_objects_response_envelope.py => v4target_objects_response_envelope.py} (93%)
rename src/polytomic/types/{v_4_target_property_values.py => v4target_property_values.py} (100%)
rename src/polytomic/types/{v_4_target_property_values_envelope.py => v4target_property_values_envelope.py} (90%)
rename src/polytomic/types/{v_4_user_field_request.py => v4user_field_request.py} (100%)
create mode 100644 src/polytomic/types/v5bulk_sync_response.py
create mode 100644 src/polytomic/types/v5bulk_sync_response_envelope.py
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..fd9a3fc 100644
--- a/reference.md
+++ b/reference.md
@@ -19,9 +19,7 @@ client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
-client.bulk_sync.list(
- active=True,
-)
+client.bulk_sync.list()
```
@@ -109,20 +107,25 @@ to see configurations for particular integrations (for example, [here](https://a
```python
-from polytomic import BulkSchedule, Polytomic
+from polytomic import BulkSyncScheduleRequest, Polytomic
client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
client.bulk_sync.create(
- destination_configuration={"schema": "my_schema"},
- destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Bulk Sync",
- schedule=BulkSchedule(
- frequency="manual",
- ),
- source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ destination_configuration={"destination_configuration": {"key": "value"}},
+ destination_connection_id="destination_connection_id",
+ name="name",
+ schedules=[
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ ],
+ source_connection_id="source_connection_id",
)
```
@@ -163,7 +166,7 @@ client.bulk_sync.create(
-
-**schedule:** `BulkSchedule`
+**schedules:** `typing.Sequence[BulkSyncScheduleRequest]`
@@ -227,14 +230,6 @@ client.bulk_sync.create(
-
-**discover:** `typing.Optional[bool]` — DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead
-
-
-
-
-
--
-
**mode:** `typing.Optional[BulkSyncMode]`
@@ -275,7 +270,7 @@ client.bulk_sync.create(
-
-**schemas:** `typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]]` — List of schemas to sync; if omitted, all schemas will be selected for syncing.
+**schemas:** `typing.Optional[typing.Sequence[V5CreateBulkSyncRequestSchemasItem]]` — List of schemas to sync; if omitted, all schemas will be selected for syncing.
@@ -323,8 +318,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- refresh_schemas=True,
+ id="id",
)
```
@@ -373,22 +367,6 @@ client.bulk_sync.get(
-
-#### 📝 Description
-
-
--
-
-
--
-
-> 📘 Updating schemas
->
-> Schema updates can be performed using the [Update Bulk Sync Schemas](https://apidocs.polytomic.com/api-reference/bulk-sync/schemas/patch) endpoint.
-
-
-
-
-
#### 🔌 Usage
@@ -398,21 +376,26 @@ client.bulk_sync.get(
-
```python
-from polytomic import BulkSchedule, Polytomic
+from polytomic import BulkSyncScheduleRequest, Polytomic
client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
client.bulk_sync.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- destination_configuration={"schema": "my_schema"},
- destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Bulk Sync",
- schedule=BulkSchedule(
- frequency="manual",
- ),
- source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
+ destination_configuration={"destination_configuration": {"key": "value"}},
+ destination_connection_id="destination_connection_id",
+ name="name",
+ schedules=[
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ ],
+ source_connection_id="source_connection_id",
)
```
@@ -461,7 +444,7 @@ client.bulk_sync.update(
-
-**schedule:** `BulkSchedule`
+**schedules:** `typing.Sequence[BulkSyncScheduleRequest]`
@@ -525,14 +508,6 @@ client.bulk_sync.update(
-
-**discover:** `typing.Optional[bool]` — DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead
-
-
-
-
-
--
-
**mode:** `typing.Optional[BulkSyncMode]`
@@ -573,7 +548,7 @@ client.bulk_sync.update(
-
-**schemas:** `typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]]` — List of schemas to sync; if omitted, all schemas will be selected for syncing.
+**schemas:** `typing.Optional[typing.Sequence[V5UpdateBulkSyncRequestSchemasItem]]` — List of schemas to sync; if omitted, all schemas will be selected for syncing.
@@ -621,8 +596,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- refresh_schemas=True,
+ id="id",
)
```
@@ -687,7 +661,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.activate(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
active=True,
)
@@ -753,7 +727,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.start(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -842,7 +816,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -899,8 +873,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.get_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- include_fields=True,
+ id="id",
)
```
@@ -965,7 +938,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.get_destination(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -1070,7 +1043,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.get_connection_type_schema(
- id="postgresql",
+ id="id",
)
```
@@ -1174,15 +1147,9 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.create(
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "********",
- "port": 5432,
- "username": "user",
- },
- name="My Postgres Connection",
- type="postgresql",
+ configuration={"configuration": {"key": "value"}},
+ name="name",
+ type="type",
)
```
@@ -1317,7 +1284,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.connect(
- name="Salesforce Connection",
+ name="name",
redirect_url="redirect_url",
)
@@ -1437,14 +1404,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.test_connection(
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "password",
- "port": 5432,
- "username": "user",
- },
- type="postgresql",
+ configuration={"configuration": {"key": "value"}},
+ type="type",
)
```
@@ -1517,7 +1478,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -1574,15 +1535,9 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "********",
- "port": 5432,
- "username": "user",
- },
- name="My Postgres Connection",
+ id="id",
+ configuration={"configuration": {"key": "value"}},
+ name="name",
)
```
@@ -1703,8 +1658,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- force=True,
+ id="id",
)
```
@@ -1769,7 +1723,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.connections.get_parameter_values(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -1827,8 +1781,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.query_runner.run_query(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- query="SELECT * FROM table",
+ connection_id="connection_id",
)
```
@@ -1893,7 +1846,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.query_runner.get_query(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -1959,8 +1912,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.upsert_field(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
```
@@ -2033,9 +1986,9 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.delete_field(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
- field_id="first_name",
+ connection_id="connection_id",
+ schema_id="schema_id",
+ field_id="field_id",
)
```
@@ -2108,8 +2061,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.set_primary_keys(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
```
@@ -2196,8 +2149,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.reset_primary_keys(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
```
@@ -2262,7 +2215,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.refresh(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -2333,7 +2286,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -2390,8 +2343,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ id="id",
+ schema_id="schema_id",
)
```
@@ -2456,8 +2409,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.schemas.get_records(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ id="id",
+ schema_id="schema_id",
)
```
@@ -2523,7 +2476,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.get_enrichment_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -2548,7 +2501,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]]]`
@@ -2602,7 +2555,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.post(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
)
```
@@ -2667,9 +2620,9 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.preview(
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
```
@@ -2869,9 +2822,9 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.create(
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
```
@@ -3024,7 +2977,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -3089,11 +3042,10 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- async_=False,
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ id="id",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
```
@@ -3262,7 +3214,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -3341,7 +3293,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.models.sample(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -3407,7 +3359,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.get_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -3432,7 +3384,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]]]`
@@ -3472,7 +3424,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.get_source_fields(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -3497,7 +3449,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]]]`
@@ -3536,10 +3488,7 @@ client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
-client.model_sync.list(
- active=True,
- target_connection_id="0b155265-c537-44c9-9359-a3ceb468a4da",
-)
+client.model_sync.list()
```
@@ -3579,6 +3528,22 @@ client.model_sync.list(
-
+**page_token:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**limit:** `typing.Optional[int]` — Maximum number of syncs to return. Default and maximum is 50.
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3682,14 +3647,17 @@ client = Polytomic(
client.model_sync.create(
fields=[
ModelSyncField(
- target="name",
- )
+ target="target",
+ ),
+ ModelSyncField(
+ target="target",
+ ),
],
mode="create",
- name="Users Sync",
+ name="name",
schedule=Schedule(),
target=Target(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
),
)
@@ -3922,7 +3890,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -3979,17 +3947,20 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
fields=[
ModelSyncField(
- target="name",
- )
+ target="target",
+ ),
+ ModelSyncField(
+ target="target",
+ ),
],
mode="create",
- name="Users Sync",
+ name="name",
schedule=Schedule(),
target=Target(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
),
)
@@ -4183,7 +4154,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -4240,7 +4211,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.activate(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
active=True,
)
@@ -4282,63 +4253,6 @@ client.model_sync.activate(
-
-
-
-
-client.model_sync.cancel(...)
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from polytomic import Polytomic
-
-client = Polytomic(
- version="YOUR_VERSION",
- token="YOUR_TOKEN",
-)
-client.model_sync.cancel(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
-)
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**id:** `str` — The active execution of this sync ID will be cancelled.
-
-
-
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
@@ -4379,7 +4293,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.start(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -4460,7 +4374,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -4511,23 +4425,13 @@ client.model_sync.get_status(
-
```python
-import datetime
-
from polytomic import Polytomic
client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
-client.events.list(
- organization_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- starting_after=datetime.datetime.fromisoformat(
- "2020-01-01 00:00:00+00:00",
- ),
- ending_before=datetime.datetime.fromisoformat(
- "2020-01-01 00:00:00+00:00",
- ),
-)
+client.events.list()
```
@@ -4663,8 +4567,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.jobs.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- type="createmodel",
+ type="type",
+ id="id",
)
```
@@ -4681,7 +4585,7 @@ client.jobs.get(
-
-**id:** `str`
+**type:** `str`
@@ -4689,7 +4593,7 @@ client.jobs.get(
-
-**type:** `str`
+**id:** `str`
@@ -4974,7 +4878,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.organization.create(
- name="My Organization",
+ name="name",
)
```
@@ -5087,7 +4991,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.organization.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -5160,8 +5064,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.organization.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Organization",
+ id="id",
+ name="name",
)
```
@@ -5282,7 +5186,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.organization.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -5356,7 +5260,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.users.list(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ org_id="org_id",
)
```
@@ -5429,8 +5333,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.users.create(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- email="mail@example.com",
+ org_id="org_id",
+ email="email",
)
```
@@ -5519,8 +5423,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.users.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ org_id="org_id",
+ id="id",
)
```
@@ -5537,7 +5441,7 @@ client.users.get(
-
-**id:** `str`
+**org_id:** `str`
@@ -5545,7 +5449,7 @@ client.users.get(
-
-**org_id:** `str`
+**id:** `str`
@@ -5601,9 +5505,9 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.users.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- email="mail@example.com",
+ org_id="org_id",
+ id="id",
+ email="email",
)
```
@@ -5620,7 +5524,7 @@ client.users.update(
-
-**id:** `str`
+**org_id:** `str`
@@ -5628,7 +5532,7 @@ client.users.update(
-
-**org_id:** `str`
+**id:** `str`
@@ -5700,8 +5604,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.users.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ org_id="org_id",
+ id="id",
)
```
@@ -5718,7 +5622,7 @@ client.users.remove(
-
-**id:** `str`
+**org_id:** `str`
@@ -5726,7 +5630,7 @@ client.users.remove(
-
-**org_id:** `str`
+**id:** `str`
@@ -5782,9 +5686,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.users.create_api_key(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- force=True,
+ org_id="org_id",
+ id="id",
)
```
@@ -5941,8 +5844,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.webhooks.create(
- endpoint="https://example.com/webhook",
- secret="secret",
+ endpoint="endpoint",
+ secret="banana",
)
```
@@ -6033,7 +5936,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.webhooks.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -6108,9 +6011,9 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.webhooks.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- endpoint="https://example.com/webhook",
- secret="secret",
+ id="id",
+ endpoint="endpoint",
+ secret="banana",
)
```
@@ -6191,7 +6094,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.webhooks.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -6248,7 +6151,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.webhooks.disable(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -6305,7 +6208,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.webhooks.enable(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -6362,10 +6265,7 @@ client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
-client.bulk_sync.executions.list_status(
- all_=True,
- active=True,
-)
+client.bulk_sync.executions.list_status()
```
@@ -6437,11 +6337,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- page_token="AmkYh8v0jR5B3kls2Qcc9y8MjrPmvR4CvaK7H0F4rEwqvg76K==",
- only_terminal=True,
- ascending=True,
- limit=100,
+ id="id",
)
```
@@ -6530,8 +6426,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- exec_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
+ exec_id="exec_id",
)
```
@@ -6596,8 +6492,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.get_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ execution_id="execution_id",
)
```
@@ -6662,8 +6558,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.export_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ execution_id="execution_id",
)
```
@@ -6737,7 +6633,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -6762,7 +6658,7 @@ client.bulk_sync.schemas.list(
-
-**filters:** `typing.Optional[typing.Dict[str, typing.Optional[str]]]`
+**filters:** `typing.Optional[typing.Dict[str, str]]`
@@ -6802,7 +6698,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.patch(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -6867,8 +6763,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="Contact",
+ id="id",
+ schema_id="schema_id",
)
```
@@ -6933,8 +6829,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="contact",
+ id="id",
+ schema_id="schema_id",
)
```
@@ -6999,7 +6895,7 @@ client.bulk_sync.schemas.update(
-
-**filters:** `typing.Optional[typing.Sequence[BulkFilter]]`
+**filters:** `typing.Optional[typing.Sequence[BulkFilter2]]`
@@ -7064,7 +6960,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.list(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
)
```
@@ -7121,7 +7017,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.create(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
schedule=V4BulkSyncScheduleApi(
frequency="manual",
),
@@ -7189,8 +7085,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.get(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
)
```
@@ -7255,8 +7151,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.update(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
schedule=V4BulkSyncScheduleApi(
frequency="manual",
),
@@ -7332,8 +7228,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.delete(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
)
```
@@ -7399,7 +7295,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.targets.get_target(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -7472,9 +7368,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.targets.get_target_fields(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- target="database.table",
- refresh=False,
+ id="id",
+ target="target",
)
```
@@ -7577,7 +7472,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.targets.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -7677,7 +7572,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.targets.get_create_property(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
property="property",
)
@@ -7744,10 +7639,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.executions.list(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- page_token="AmkYh8v0jR5B3kls2Qcc9y8MjrPmvR4CvaK7H0F4rEwqvg76K==",
- only_completed=True,
- ascending=True,
+ sync_id="sync_id",
)
```
@@ -7828,8 +7720,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.executions.get(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ id="id",
)
```
@@ -7870,81 +7762,6 @@ client.model_sync.executions.get(
-
-
-
-
-client.model_sync.executions.update(...)
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from polytomic import Polytomic
-
-client = Polytomic(
- version="YOUR_VERSION",
- token="YOUR_TOKEN",
-)
-client.model_sync.executions.update(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- status="created",
-)
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**sync_id:** `str`
-
-
-
-
-
--
-
-**id:** `str` — The ID of the execution to update.
-
-
-
-
-
--
-
-**status:** `ExecutionStatus`
-
-
-
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
@@ -7969,8 +7786,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.executions.get_log_urls(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ id="id",
type="records",
)
@@ -8044,10 +7861,10 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.model_sync.executions.get_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="0ecd09c1-b901-4d27-9053-f0367c427254",
+ sync_id="sync_id",
+ id="id",
type="records",
- filename="path/to/file.json",
+ filename="filename",
)
```
@@ -8176,7 +7993,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.policies.create(
- name="Custom",
+ name="name",
)
```
@@ -8249,7 +8066,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.policies.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -8306,8 +8123,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.policies.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Custom",
+ id="id",
+ name="name",
)
```
@@ -8388,7 +8205,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.policies.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -8493,7 +8310,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.roles.create(
- name="Custom",
+ name="name",
)
```
@@ -8558,7 +8375,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.roles.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
@@ -8615,8 +8432,8 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.roles.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Custom",
+ id="id",
+ name="name",
)
```
@@ -8689,7 +8506,7 @@ client = Polytomic(
token="YOUR_TOKEN",
)
client.permissions.roles.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
```
diff --git a/src/polytomic/__init__.py b/src/polytomic/__init__.py
index 6bf93da..b611877 100644
--- a/src/polytomic/__init__.py
+++ b/src/polytomic/__init__.py
@@ -15,6 +15,7 @@
BulkFetchMode,
BulkField,
BulkFilter,
+ BulkFilter2,
BulkItemizedSchedule,
BulkMultiScheduleConfiguration,
BulkNormalizeNames,
@@ -35,8 +36,9 @@
BulkSyncListEnvelope,
BulkSyncMode,
BulkSyncResponse,
- BulkSyncResponseEnvelope,
BulkSyncRunningEvent,
+ BulkSyncSchedule,
+ BulkSyncScheduleRequest,
BulkSyncSchemaExecution,
BulkSyncSchemaExecutionStatus,
BulkSyncSource,
@@ -46,10 +48,9 @@
BulkSyncSourceStatusEnvelope,
BulkSyncStatusEnvelope,
BulkSyncStatusResponse,
- CancelModelSyncResponse,
- CancelModelSyncResponseEnvelope,
CommonOutputActor,
ConfigurationValue,
+ ConfigurationValue2,
ConnectCardResponse,
ConnectCardResponseEnvelope,
ConnectionListResponseEnvelope,
@@ -112,6 +113,7 @@
ModelSample,
ModelSampleResponseEnvelope,
ModelSyncField,
+ ModelSyncListResponse,
ModelSyncMode,
ModelSyncResponse,
ModelSyncResponseEnvelope,
@@ -122,6 +124,8 @@
Override,
Pagination,
PaginationDetails,
+ PaginationDetails2,
+ PaginationDetails3,
PickValue,
PolicyAction,
PolicyResponse,
@@ -133,7 +137,9 @@
RoleResponse,
RoleResponseEnvelope,
RunAfter,
+ RunAfter2,
Schedule,
+ Schedule2,
ScheduleEnvelope,
ScheduleFrequency,
ScheduleOptionResponse,
@@ -195,6 +201,8 @@
V4TargetPropertyValues,
V4TargetPropertyValuesEnvelope,
V4UserFieldRequest,
+ V5BulkSyncResponse,
+ V5BulkSyncResponseEnvelope,
Webhook,
WebhookEnvelope,
WebhookListEnvelope,
@@ -225,7 +233,7 @@
users,
webhooks,
)
-from .bulk_sync import V2CreateBulkSyncRequestSchemasItem, V2UpdateBulkSyncRequestSchemasItem
+from .bulk_sync import V5CreateBulkSyncRequestSchemasItem, V5UpdateBulkSyncRequestSchemasItem
from .client import AsyncPolytomic, Polytomic
from .environment import PolytomicEnvironment
from .version import __version__
@@ -247,6 +255,7 @@
"BulkFetchMode",
"BulkField",
"BulkFilter",
+ "BulkFilter2",
"BulkItemizedSchedule",
"BulkMultiScheduleConfiguration",
"BulkNormalizeNames",
@@ -267,8 +276,9 @@
"BulkSyncListEnvelope",
"BulkSyncMode",
"BulkSyncResponse",
- "BulkSyncResponseEnvelope",
"BulkSyncRunningEvent",
+ "BulkSyncSchedule",
+ "BulkSyncScheduleRequest",
"BulkSyncSchemaExecution",
"BulkSyncSchemaExecutionStatus",
"BulkSyncSource",
@@ -278,10 +288,9 @@
"BulkSyncSourceStatusEnvelope",
"BulkSyncStatusEnvelope",
"BulkSyncStatusResponse",
- "CancelModelSyncResponse",
- "CancelModelSyncResponseEnvelope",
"CommonOutputActor",
"ConfigurationValue",
+ "ConfigurationValue2",
"ConflictError",
"ConnectCardResponse",
"ConnectCardResponseEnvelope",
@@ -347,6 +356,7 @@
"ModelSample",
"ModelSampleResponseEnvelope",
"ModelSyncField",
+ "ModelSyncListResponse",
"ModelSyncMode",
"ModelSyncResponse",
"ModelSyncResponseEnvelope",
@@ -358,6 +368,8 @@
"Override",
"Pagination",
"PaginationDetails",
+ "PaginationDetails2",
+ "PaginationDetails3",
"PickValue",
"PolicyAction",
"PolicyResponse",
@@ -371,7 +383,9 @@
"RoleResponse",
"RoleResponseEnvelope",
"RunAfter",
+ "RunAfter2",
"Schedule",
+ "Schedule2",
"ScheduleEnvelope",
"ScheduleFrequency",
"ScheduleOptionResponse",
@@ -414,7 +428,6 @@
"UtilEnumValue",
"UtilFieldType",
"V2ConnectionForm",
- "V2CreateBulkSyncRequestSchemasItem",
"V2EnricherConfiguration",
"V2EnricherMapping",
"V2ExecutionLogType",
@@ -422,7 +435,6 @@
"V2OrderedMapStringGithubComInvopopJsonschemaSchema",
"V2SampleRecord",
"V2SchemaConfigurationFieldsItem",
- "V2UpdateBulkSyncRequestSchemasItem",
"V4BulkSyncExecutionLogs",
"V4BulkSyncExecutionLogsEnvelope",
"V4BulkSyncScheduleApi",
@@ -437,6 +449,10 @@
"V4TargetPropertyValues",
"V4TargetPropertyValuesEnvelope",
"V4UserFieldRequest",
+ "V5BulkSyncResponse",
+ "V5BulkSyncResponseEnvelope",
+ "V5CreateBulkSyncRequestSchemasItem",
+ "V5UpdateBulkSyncRequestSchemasItem",
"Webhook",
"WebhookEnvelope",
"WebhookListEnvelope",
diff --git a/src/polytomic/bulk_sync/__init__.py b/src/polytomic/bulk_sync/__init__.py
index 13ec86b..106f403 100644
--- a/src/polytomic/bulk_sync/__init__.py
+++ b/src/polytomic/bulk_sync/__init__.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from .types import V2CreateBulkSyncRequestSchemasItem, V2UpdateBulkSyncRequestSchemasItem
+from .types import V5CreateBulkSyncRequestSchemasItem, V5UpdateBulkSyncRequestSchemasItem
from . import executions, schedules, schemas
__all__ = [
- "V2CreateBulkSyncRequestSchemasItem",
- "V2UpdateBulkSyncRequestSchemasItem",
+ "V5CreateBulkSyncRequestSchemasItem",
+ "V5UpdateBulkSyncRequestSchemasItem",
"executions",
"schedules",
"schemas",
diff --git a/src/polytomic/bulk_sync/client.py b/src/polytomic/bulk_sync/client.py
index d7c1313..c97d978 100644
--- a/src/polytomic/bulk_sync/client.py
+++ b/src/polytomic/bulk_sync/client.py
@@ -14,20 +14,20 @@
from ..types.api_error import ApiError as types_api_error_ApiError
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError as core_api_error_ApiError
-from ..types.bulk_schedule import BulkSchedule
+from ..types.bulk_sync_schedule_request import BulkSyncScheduleRequest
from ..types.bulk_discover import BulkDiscover
import datetime as dt
from ..types.bulk_sync_mode import BulkSyncMode
from ..types.bulk_normalize_names import BulkNormalizeNames
-from .types.v_2_create_bulk_sync_request_schemas_item import V2CreateBulkSyncRequestSchemasItem
-from ..types.bulk_sync_response_envelope import BulkSyncResponseEnvelope
+from .types.v5create_bulk_sync_request_schemas_item import V5CreateBulkSyncRequestSchemasItem
+from ..types.v5bulk_sync_response_envelope import V5BulkSyncResponseEnvelope
from ..core.serialization import convert_and_respect_annotation_metadata
from ..errors.bad_request_error import BadRequestError
from ..errors.forbidden_error import ForbiddenError
from ..errors.unprocessable_entity_error import UnprocessableEntityError
from ..core.jsonable_encoder import jsonable_encoder
from ..errors.not_found_error import NotFoundError
-from .types.v_2_update_bulk_sync_request_schemas_item import V2UpdateBulkSyncRequestSchemasItem
+from .types.v5update_bulk_sync_request_schemas_item import V5UpdateBulkSyncRequestSchemasItem
from ..types.activate_sync_envelope import ActivateSyncEnvelope
from ..types.bulk_fetch_mode import BulkFetchMode
from ..types.bulk_sync_execution_envelope import BulkSyncExecutionEnvelope
@@ -75,9 +75,7 @@ def list(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
- client.bulk_sync.list(
- active=True,
- )
+ client.bulk_sync.list()
"""
_response = self._client_wrapper.httpx_client.request(
"api/bulk/syncs",
@@ -127,7 +125,7 @@ def create(
destination_configuration: typing.Dict[str, typing.Optional[typing.Any]],
destination_connection_id: str,
name: str,
- schedule: BulkSchedule,
+ schedules: typing.Sequence[BulkSyncScheduleRequest],
source_connection_id: str,
active: typing.Optional[bool] = OMIT,
automatically_add_new_fields: typing.Optional[BulkDiscover] = OMIT,
@@ -135,16 +133,15 @@ def create(
concurrency_limit: typing.Optional[int] = OMIT,
data_cutoff_timestamp: typing.Optional[dt.datetime] = OMIT,
disable_record_timestamps: typing.Optional[bool] = OMIT,
- discover: typing.Optional[bool] = OMIT,
mode: typing.Optional[BulkSyncMode] = OMIT,
normalize_names: typing.Optional[BulkNormalizeNames] = OMIT,
organization_id: typing.Optional[str] = OMIT,
policies: typing.Optional[typing.Sequence[str]] = OMIT,
resync_concurrency_limit: typing.Optional[int] = OMIT,
- schemas: typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]] = OMIT,
+ schemas: typing.Optional[typing.Sequence[V5CreateBulkSyncRequestSchemasItem]] = OMIT,
source_configuration: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BulkSyncResponseEnvelope:
+ ) -> V5BulkSyncResponseEnvelope:
"""
Create a new Bulk Sync from a source to a destination (data warehouse, database, or cloud storage bucket like S3).
@@ -181,7 +178,7 @@ def create(
name : str
- schedule : BulkSchedule
+ schedules : typing.Sequence[BulkSyncScheduleRequest]
source_connection_id : str
@@ -198,9 +195,6 @@ def create(
disable_record_timestamps : typing.Optional[bool]
- discover : typing.Optional[bool]
- DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead
-
mode : typing.Optional[BulkSyncMode]
normalize_names : typing.Optional[BulkNormalizeNames]
@@ -212,7 +206,7 @@ def create(
resync_concurrency_limit : typing.Optional[int]
Override the default resync concurrency limit for this sync.
- schemas : typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]]
+ schemas : typing.Optional[typing.Sequence[V5CreateBulkSyncRequestSchemasItem]]
List of schemas to sync; if omitted, all schemas will be selected for syncing.
source_configuration : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
@@ -222,25 +216,30 @@ def create(
Returns
-------
- BulkSyncResponseEnvelope
+ V5BulkSyncResponseEnvelope
OK
Examples
--------
- from polytomic import BulkSchedule, Polytomic
+ from polytomic import BulkSyncScheduleRequest, Polytomic
client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
client.bulk_sync.create(
- destination_configuration={"schema": "my_schema"},
- destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Bulk Sync",
- schedule=BulkSchedule(
- frequency="manual",
- ),
- source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ destination_configuration={"destination_configuration": {"key": "value"}},
+ destination_connection_id="destination_connection_id",
+ name="name",
+ schedules=[
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ ],
+ source_connection_id="source_connection_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -255,18 +254,17 @@ def create(
"destination_configuration": destination_configuration,
"destination_connection_id": destination_connection_id,
"disable_record_timestamps": disable_record_timestamps,
- "discover": discover,
"mode": mode,
"name": name,
"normalize_names": normalize_names,
"organization_id": organization_id,
"policies": policies,
"resync_concurrency_limit": resync_concurrency_limit,
- "schedule": convert_and_respect_annotation_metadata(
- object_=schedule, annotation=BulkSchedule, direction="write"
+ "schedules": convert_and_respect_annotation_metadata(
+ object_=schedules, annotation=typing.Sequence[BulkSyncScheduleRequest], direction="write"
),
"schemas": convert_and_respect_annotation_metadata(
- object_=schemas, annotation=typing.Sequence[V2CreateBulkSyncRequestSchemasItem], direction="write"
+ object_=schemas, annotation=typing.Sequence[V5CreateBulkSyncRequestSchemasItem], direction="write"
),
"source_configuration": source_configuration,
"source_connection_id": source_connection_id,
@@ -280,9 +278,9 @@ def create(
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- BulkSyncResponseEnvelope,
+ V5BulkSyncResponseEnvelope,
parse_obj_as(
- type_=BulkSyncResponseEnvelope, # type: ignore
+ type_=V5BulkSyncResponseEnvelope, # type: ignore
object_=_response.json(),
),
)
@@ -347,7 +345,7 @@ def get(
*,
refresh_schemas: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BulkSyncResponseEnvelope:
+ ) -> V5BulkSyncResponseEnvelope:
"""
Parameters
----------
@@ -360,7 +358,7 @@ def get(
Returns
-------
- BulkSyncResponseEnvelope
+ V5BulkSyncResponseEnvelope
OK
Examples
@@ -372,8 +370,7 @@ def get(
token="YOUR_TOKEN",
)
client.bulk_sync.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- refresh_schemas=True,
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -387,9 +384,9 @@ def get(
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- BulkSyncResponseEnvelope,
+ V5BulkSyncResponseEnvelope,
parse_obj_as(
- type_=BulkSyncResponseEnvelope, # type: ignore
+ type_=V5BulkSyncResponseEnvelope, # type: ignore
object_=_response.json(),
),
)
@@ -425,7 +422,7 @@ def update(
destination_configuration: typing.Dict[str, typing.Optional[typing.Any]],
destination_connection_id: str,
name: str,
- schedule: BulkSchedule,
+ schedules: typing.Sequence[BulkSyncScheduleRequest],
source_connection_id: str,
active: typing.Optional[bool] = OMIT,
automatically_add_new_fields: typing.Optional[BulkDiscover] = OMIT,
@@ -433,21 +430,16 @@ def update(
concurrency_limit: typing.Optional[int] = OMIT,
data_cutoff_timestamp: typing.Optional[dt.datetime] = OMIT,
disable_record_timestamps: typing.Optional[bool] = OMIT,
- discover: typing.Optional[bool] = OMIT,
mode: typing.Optional[BulkSyncMode] = OMIT,
normalize_names: typing.Optional[BulkNormalizeNames] = OMIT,
organization_id: typing.Optional[str] = OMIT,
policies: typing.Optional[typing.Sequence[str]] = OMIT,
resync_concurrency_limit: typing.Optional[int] = OMIT,
- schemas: typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]] = OMIT,
+ schemas: typing.Optional[typing.Sequence[V5UpdateBulkSyncRequestSchemasItem]] = OMIT,
source_configuration: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BulkSyncResponseEnvelope:
+ ) -> V5BulkSyncResponseEnvelope:
"""
- > 📘 Updating schemas
- >
- > Schema updates can be performed using the [Update Bulk Sync Schemas](https://apidocs.polytomic.com/api-reference/bulk-sync/schemas/patch) endpoint.
-
Parameters
----------
id : str
@@ -458,7 +450,7 @@ def update(
name : str
- schedule : BulkSchedule
+ schedules : typing.Sequence[BulkSyncScheduleRequest]
source_connection_id : str
@@ -475,9 +467,6 @@ def update(
disable_record_timestamps : typing.Optional[bool]
- discover : typing.Optional[bool]
- DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead
-
mode : typing.Optional[BulkSyncMode]
normalize_names : typing.Optional[BulkNormalizeNames]
@@ -489,7 +478,7 @@ def update(
resync_concurrency_limit : typing.Optional[int]
Override the default resync concurrency limit for this sync.
- schemas : typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]]
+ schemas : typing.Optional[typing.Sequence[V5UpdateBulkSyncRequestSchemasItem]]
List of schemas to sync; if omitted, all schemas will be selected for syncing.
source_configuration : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
@@ -499,26 +488,31 @@ def update(
Returns
-------
- BulkSyncResponseEnvelope
+ V5BulkSyncResponseEnvelope
OK
Examples
--------
- from polytomic import BulkSchedule, Polytomic
+ from polytomic import BulkSyncScheduleRequest, Polytomic
client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
client.bulk_sync.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- destination_configuration={"schema": "my_schema"},
- destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Bulk Sync",
- schedule=BulkSchedule(
- frequency="manual",
- ),
- source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
+ destination_configuration={"destination_configuration": {"key": "value"}},
+ destination_connection_id="destination_connection_id",
+ name="name",
+ schedules=[
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ ],
+ source_connection_id="source_connection_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -533,18 +527,17 @@ def update(
"destination_configuration": destination_configuration,
"destination_connection_id": destination_connection_id,
"disable_record_timestamps": disable_record_timestamps,
- "discover": discover,
"mode": mode,
"name": name,
"normalize_names": normalize_names,
"organization_id": organization_id,
"policies": policies,
"resync_concurrency_limit": resync_concurrency_limit,
- "schedule": convert_and_respect_annotation_metadata(
- object_=schedule, annotation=BulkSchedule, direction="write"
+ "schedules": convert_and_respect_annotation_metadata(
+ object_=schedules, annotation=typing.Sequence[BulkSyncScheduleRequest], direction="write"
),
"schemas": convert_and_respect_annotation_metadata(
- object_=schemas, annotation=typing.Sequence[V2UpdateBulkSyncRequestSchemasItem], direction="write"
+ object_=schemas, annotation=typing.Sequence[V5UpdateBulkSyncRequestSchemasItem], direction="write"
),
"source_configuration": source_configuration,
"source_connection_id": source_connection_id,
@@ -558,9 +551,9 @@ def update(
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- BulkSyncResponseEnvelope,
+ V5BulkSyncResponseEnvelope,
parse_obj_as(
- type_=BulkSyncResponseEnvelope, # type: ignore
+ type_=V5BulkSyncResponseEnvelope, # type: ignore
object_=_response.json(),
),
)
@@ -649,8 +642,7 @@ def remove(
token="YOUR_TOKEN",
)
client.bulk_sync.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- refresh_schemas=True,
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -736,7 +728,7 @@ def activate(
token="YOUR_TOKEN",
)
client.bulk_sync.activate(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
active=True,
)
"""
@@ -843,7 +835,7 @@ def start(
token="YOUR_TOKEN",
)
client.bulk_sync.start(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -928,7 +920,7 @@ def get_status(self, id: str, *, request_options: typing.Optional[RequestOptions
token="YOUR_TOKEN",
)
client.bulk_sync.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1011,8 +1003,7 @@ def get_source(
token="YOUR_TOKEN",
)
client.bulk_sync.get_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- include_fields=True,
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1102,7 +1093,7 @@ def get_destination(
token="YOUR_TOKEN",
)
client.bulk_sync.get_destination(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1201,9 +1192,7 @@ async def list(
async def main() -> None:
- await client.bulk_sync.list(
- active=True,
- )
+ await client.bulk_sync.list()
asyncio.run(main())
@@ -1256,7 +1245,7 @@ async def create(
destination_configuration: typing.Dict[str, typing.Optional[typing.Any]],
destination_connection_id: str,
name: str,
- schedule: BulkSchedule,
+ schedules: typing.Sequence[BulkSyncScheduleRequest],
source_connection_id: str,
active: typing.Optional[bool] = OMIT,
automatically_add_new_fields: typing.Optional[BulkDiscover] = OMIT,
@@ -1264,16 +1253,15 @@ async def create(
concurrency_limit: typing.Optional[int] = OMIT,
data_cutoff_timestamp: typing.Optional[dt.datetime] = OMIT,
disable_record_timestamps: typing.Optional[bool] = OMIT,
- discover: typing.Optional[bool] = OMIT,
mode: typing.Optional[BulkSyncMode] = OMIT,
normalize_names: typing.Optional[BulkNormalizeNames] = OMIT,
organization_id: typing.Optional[str] = OMIT,
policies: typing.Optional[typing.Sequence[str]] = OMIT,
resync_concurrency_limit: typing.Optional[int] = OMIT,
- schemas: typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]] = OMIT,
+ schemas: typing.Optional[typing.Sequence[V5CreateBulkSyncRequestSchemasItem]] = OMIT,
source_configuration: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BulkSyncResponseEnvelope:
+ ) -> V5BulkSyncResponseEnvelope:
"""
Create a new Bulk Sync from a source to a destination (data warehouse, database, or cloud storage bucket like S3).
@@ -1310,7 +1298,7 @@ async def create(
name : str
- schedule : BulkSchedule
+ schedules : typing.Sequence[BulkSyncScheduleRequest]
source_connection_id : str
@@ -1327,9 +1315,6 @@ async def create(
disable_record_timestamps : typing.Optional[bool]
- discover : typing.Optional[bool]
- DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead
-
mode : typing.Optional[BulkSyncMode]
normalize_names : typing.Optional[BulkNormalizeNames]
@@ -1341,7 +1326,7 @@ async def create(
resync_concurrency_limit : typing.Optional[int]
Override the default resync concurrency limit for this sync.
- schemas : typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]]
+ schemas : typing.Optional[typing.Sequence[V5CreateBulkSyncRequestSchemasItem]]
List of schemas to sync; if omitted, all schemas will be selected for syncing.
source_configuration : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
@@ -1351,14 +1336,14 @@ async def create(
Returns
-------
- BulkSyncResponseEnvelope
+ V5BulkSyncResponseEnvelope
OK
Examples
--------
import asyncio
- from polytomic import AsyncPolytomic, BulkSchedule
+ from polytomic import AsyncPolytomic, BulkSyncScheduleRequest
client = AsyncPolytomic(
version="YOUR_VERSION",
@@ -1368,13 +1353,20 @@ async def create(
async def main() -> None:
await client.bulk_sync.create(
- destination_configuration={"schema": "my_schema"},
- destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Bulk Sync",
- schedule=BulkSchedule(
- frequency="manual",
- ),
- source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ destination_configuration={
+ "destination_configuration": {"key": "value"}
+ },
+ destination_connection_id="destination_connection_id",
+ name="name",
+ schedules=[
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ ],
+ source_connection_id="source_connection_id",
)
@@ -1392,18 +1384,17 @@ async def main() -> None:
"destination_configuration": destination_configuration,
"destination_connection_id": destination_connection_id,
"disable_record_timestamps": disable_record_timestamps,
- "discover": discover,
"mode": mode,
"name": name,
"normalize_names": normalize_names,
"organization_id": organization_id,
"policies": policies,
"resync_concurrency_limit": resync_concurrency_limit,
- "schedule": convert_and_respect_annotation_metadata(
- object_=schedule, annotation=BulkSchedule, direction="write"
+ "schedules": convert_and_respect_annotation_metadata(
+ object_=schedules, annotation=typing.Sequence[BulkSyncScheduleRequest], direction="write"
),
"schemas": convert_and_respect_annotation_metadata(
- object_=schemas, annotation=typing.Sequence[V2CreateBulkSyncRequestSchemasItem], direction="write"
+ object_=schemas, annotation=typing.Sequence[V5CreateBulkSyncRequestSchemasItem], direction="write"
),
"source_configuration": source_configuration,
"source_connection_id": source_connection_id,
@@ -1417,9 +1408,9 @@ async def main() -> None:
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- BulkSyncResponseEnvelope,
+ V5BulkSyncResponseEnvelope,
parse_obj_as(
- type_=BulkSyncResponseEnvelope, # type: ignore
+ type_=V5BulkSyncResponseEnvelope, # type: ignore
object_=_response.json(),
),
)
@@ -1484,7 +1475,7 @@ async def get(
*,
refresh_schemas: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BulkSyncResponseEnvelope:
+ ) -> V5BulkSyncResponseEnvelope:
"""
Parameters
----------
@@ -1497,7 +1488,7 @@ async def get(
Returns
-------
- BulkSyncResponseEnvelope
+ V5BulkSyncResponseEnvelope
OK
Examples
@@ -1514,8 +1505,7 @@ async def get(
async def main() -> None:
await client.bulk_sync.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- refresh_schemas=True,
+ id="id",
)
@@ -1532,9 +1522,9 @@ async def main() -> None:
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- BulkSyncResponseEnvelope,
+ V5BulkSyncResponseEnvelope,
parse_obj_as(
- type_=BulkSyncResponseEnvelope, # type: ignore
+ type_=V5BulkSyncResponseEnvelope, # type: ignore
object_=_response.json(),
),
)
@@ -1570,7 +1560,7 @@ async def update(
destination_configuration: typing.Dict[str, typing.Optional[typing.Any]],
destination_connection_id: str,
name: str,
- schedule: BulkSchedule,
+ schedules: typing.Sequence[BulkSyncScheduleRequest],
source_connection_id: str,
active: typing.Optional[bool] = OMIT,
automatically_add_new_fields: typing.Optional[BulkDiscover] = OMIT,
@@ -1578,21 +1568,16 @@ async def update(
concurrency_limit: typing.Optional[int] = OMIT,
data_cutoff_timestamp: typing.Optional[dt.datetime] = OMIT,
disable_record_timestamps: typing.Optional[bool] = OMIT,
- discover: typing.Optional[bool] = OMIT,
mode: typing.Optional[BulkSyncMode] = OMIT,
normalize_names: typing.Optional[BulkNormalizeNames] = OMIT,
organization_id: typing.Optional[str] = OMIT,
policies: typing.Optional[typing.Sequence[str]] = OMIT,
resync_concurrency_limit: typing.Optional[int] = OMIT,
- schemas: typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]] = OMIT,
+ schemas: typing.Optional[typing.Sequence[V5UpdateBulkSyncRequestSchemasItem]] = OMIT,
source_configuration: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BulkSyncResponseEnvelope:
+ ) -> V5BulkSyncResponseEnvelope:
"""
- > 📘 Updating schemas
- >
- > Schema updates can be performed using the [Update Bulk Sync Schemas](https://apidocs.polytomic.com/api-reference/bulk-sync/schemas/patch) endpoint.
-
Parameters
----------
id : str
@@ -1603,7 +1588,7 @@ async def update(
name : str
- schedule : BulkSchedule
+ schedules : typing.Sequence[BulkSyncScheduleRequest]
source_connection_id : str
@@ -1620,9 +1605,6 @@ async def update(
disable_record_timestamps : typing.Optional[bool]
- discover : typing.Optional[bool]
- DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead
-
mode : typing.Optional[BulkSyncMode]
normalize_names : typing.Optional[BulkNormalizeNames]
@@ -1634,7 +1616,7 @@ async def update(
resync_concurrency_limit : typing.Optional[int]
Override the default resync concurrency limit for this sync.
- schemas : typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]]
+ schemas : typing.Optional[typing.Sequence[V5UpdateBulkSyncRequestSchemasItem]]
List of schemas to sync; if omitted, all schemas will be selected for syncing.
source_configuration : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
@@ -1644,14 +1626,14 @@ async def update(
Returns
-------
- BulkSyncResponseEnvelope
+ V5BulkSyncResponseEnvelope
OK
Examples
--------
import asyncio
- from polytomic import AsyncPolytomic, BulkSchedule
+ from polytomic import AsyncPolytomic, BulkSyncScheduleRequest
client = AsyncPolytomic(
version="YOUR_VERSION",
@@ -1661,14 +1643,21 @@ async def update(
async def main() -> None:
await client.bulk_sync.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- destination_configuration={"schema": "my_schema"},
- destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Bulk Sync",
- schedule=BulkSchedule(
- frequency="manual",
- ),
- source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
+ destination_configuration={
+ "destination_configuration": {"key": "value"}
+ },
+ destination_connection_id="destination_connection_id",
+ name="name",
+ schedules=[
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ BulkSyncScheduleRequest(
+ frequency="manual",
+ ),
+ ],
+ source_connection_id="source_connection_id",
)
@@ -1686,18 +1675,17 @@ async def main() -> None:
"destination_configuration": destination_configuration,
"destination_connection_id": destination_connection_id,
"disable_record_timestamps": disable_record_timestamps,
- "discover": discover,
"mode": mode,
"name": name,
"normalize_names": normalize_names,
"organization_id": organization_id,
"policies": policies,
"resync_concurrency_limit": resync_concurrency_limit,
- "schedule": convert_and_respect_annotation_metadata(
- object_=schedule, annotation=BulkSchedule, direction="write"
+ "schedules": convert_and_respect_annotation_metadata(
+ object_=schedules, annotation=typing.Sequence[BulkSyncScheduleRequest], direction="write"
),
"schemas": convert_and_respect_annotation_metadata(
- object_=schemas, annotation=typing.Sequence[V2UpdateBulkSyncRequestSchemasItem], direction="write"
+ object_=schemas, annotation=typing.Sequence[V5UpdateBulkSyncRequestSchemasItem], direction="write"
),
"source_configuration": source_configuration,
"source_connection_id": source_connection_id,
@@ -1711,9 +1699,9 @@ async def main() -> None:
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- BulkSyncResponseEnvelope,
+ V5BulkSyncResponseEnvelope,
parse_obj_as(
- type_=BulkSyncResponseEnvelope, # type: ignore
+ type_=V5BulkSyncResponseEnvelope, # type: ignore
object_=_response.json(),
),
)
@@ -1807,8 +1795,7 @@ async def remove(
async def main() -> None:
await client.bulk_sync.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- refresh_schemas=True,
+ id="id",
)
@@ -1902,7 +1889,7 @@ async def activate(
async def main() -> None:
await client.bulk_sync.activate(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
active=True,
)
@@ -2017,7 +2004,7 @@ async def start(
async def main() -> None:
await client.bulk_sync.start(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -2112,7 +2099,7 @@ async def get_status(
async def main() -> None:
await client.bulk_sync.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -2203,8 +2190,7 @@ async def get_source(
async def main() -> None:
await client.bulk_sync.get_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- include_fields=True,
+ id="id",
)
@@ -2302,7 +2288,7 @@ async def get_destination(
async def main() -> None:
await client.bulk_sync.get_destination(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
diff --git a/src/polytomic/bulk_sync/executions/client.py b/src/polytomic/bulk_sync/executions/client.py
index a47b5ad..35a9578 100644
--- a/src/polytomic/bulk_sync/executions/client.py
+++ b/src/polytomic/bulk_sync/executions/client.py
@@ -14,8 +14,8 @@
from ...types.list_bulk_sync_executions_envelope import ListBulkSyncExecutionsEnvelope
from ...core.jsonable_encoder import jsonable_encoder
from ...types.bulk_sync_execution_envelope import BulkSyncExecutionEnvelope
-from ...types.v_4_bulk_sync_execution_logs_envelope import V4BulkSyncExecutionLogsEnvelope
-from ...types.v_4_export_sync_logs_envelope import V4ExportSyncLogsEnvelope
+from ...types.v4bulk_sync_execution_logs_envelope import V4BulkSyncExecutionLogsEnvelope
+from ...types.v4export_sync_logs_envelope import V4ExportSyncLogsEnvelope
from ...errors.bad_request_error import BadRequestError
from ...errors.internal_server_error import InternalServerError
from ...core.client_wrapper import AsyncClientWrapper
@@ -61,10 +61,7 @@ def list_status(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
- client.bulk_sync.executions.list_status(
- all_=True,
- active=True,
- )
+ client.bulk_sync.executions.list_status()
"""
_response = self._client_wrapper.httpx_client.request(
"api/bulk/syncs/status",
@@ -150,11 +147,7 @@ def list(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- page_token="AmkYh8v0jR5B3kls2Qcc9y8MjrPmvR4CvaK7H0F4rEwqvg76K==",
- only_terminal=True,
- ascending=True,
- limit=100,
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -229,8 +222,8 @@ def get(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- exec_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
+ exec_id="exec_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -299,8 +292,8 @@ def get_logs(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.get_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ execution_id="execution_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -377,8 +370,8 @@ def export_logs(
token="YOUR_TOKEN",
)
client.bulk_sync.executions.export_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ execution_id="execution_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -489,10 +482,7 @@ async def list_status(
async def main() -> None:
- await client.bulk_sync.executions.list_status(
- all_=True,
- active=True,
- )
+ await client.bulk_sync.executions.list_status()
asyncio.run(main())
@@ -586,11 +576,7 @@ async def list(
async def main() -> None:
await client.bulk_sync.executions.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- page_token="AmkYh8v0jR5B3kls2Qcc9y8MjrPmvR4CvaK7H0F4rEwqvg76K==",
- only_terminal=True,
- ascending=True,
- limit=100,
+ id="id",
)
@@ -673,8 +659,8 @@ async def get(
async def main() -> None:
await client.bulk_sync.executions.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- exec_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
+ exec_id="exec_id",
)
@@ -751,8 +737,8 @@ async def get_logs(
async def main() -> None:
await client.bulk_sync.executions.get_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ execution_id="execution_id",
)
@@ -837,8 +823,8 @@ async def export_logs(
async def main() -> None:
await client.bulk_sync.executions.export_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ execution_id="execution_id",
)
diff --git a/src/polytomic/bulk_sync/schedules/client.py b/src/polytomic/bulk_sync/schedules/client.py
index 2d941ad..c19436f 100644
--- a/src/polytomic/bulk_sync/schedules/client.py
+++ b/src/polytomic/bulk_sync/schedules/client.py
@@ -14,7 +14,7 @@
from ...errors.internal_server_error import InternalServerError
from json.decoder import JSONDecodeError
from ...core.api_error import ApiError as core_api_error_ApiError
-from ...types.v_4_bulk_sync_schedule_api import V4BulkSyncScheduleApi
+from ...types.v4bulk_sync_schedule_api import V4BulkSyncScheduleApi
from ...types.schedule_envelope import ScheduleEnvelope
from ...core.serialization import convert_and_respect_annotation_metadata
from ...errors.bad_request_error import BadRequestError
@@ -51,7 +51,7 @@ def list(self, sync_id: str, *, request_options: typing.Optional[RequestOptions]
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.list(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -140,7 +140,7 @@ def create(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.create(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
schedule=V4BulkSyncScheduleApi(
frequency="manual",
),
@@ -251,8 +251,8 @@ def get(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.get(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -348,8 +348,8 @@ def update(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.update(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
schedule=V4BulkSyncScheduleApi(
frequency="manual",
),
@@ -459,8 +459,8 @@ def delete(
token="YOUR_TOKEN",
)
client.bulk_sync.schedules.delete(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -549,7 +549,7 @@ async def list(self, sync_id: str, *, request_options: typing.Optional[RequestOp
async def main() -> None:
await client.bulk_sync.schedules.list(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
)
@@ -646,7 +646,7 @@ async def create(
async def main() -> None:
await client.bulk_sync.schedules.create(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
schedule=V4BulkSyncScheduleApi(
frequency="manual",
),
@@ -765,8 +765,8 @@ async def get(
async def main() -> None:
await client.bulk_sync.schedules.get(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
)
@@ -870,8 +870,8 @@ async def update(
async def main() -> None:
await client.bulk_sync.schedules.update(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
schedule=V4BulkSyncScheduleApi(
frequency="manual",
),
@@ -989,8 +989,8 @@ async def delete(
async def main() -> None:
await client.bulk_sync.schedules.delete(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schedule_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ schedule_id="schedule_id",
)
diff --git a/src/polytomic/bulk_sync/schemas/client.py b/src/polytomic/bulk_sync/schemas/client.py
index b20a8a8..218dc1b 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_filter2 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.
@@ -62,7 +62,7 @@ def list(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -138,7 +138,7 @@ def patch(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.patch(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -246,8 +246,8 @@ def get(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="Contact",
+ id="id",
+ schema_id="schema_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -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]
@@ -344,8 +344,8 @@ def update(
token="YOUR_TOKEN",
)
client.bulk_sync.schemas.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="contact",
+ id="id",
+ schema_id="schema_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -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.
@@ -466,7 +466,7 @@ async def list(
async def main() -> None:
await client.bulk_sync.schemas.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -550,7 +550,7 @@ async def patch(
async def main() -> None:
await client.bulk_sync.schemas.patch(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -666,8 +666,8 @@ async def get(
async def main() -> None:
await client.bulk_sync.schemas.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="Contact",
+ id="id",
+ schema_id="schema_id",
)
@@ -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]
@@ -772,8 +772,8 @@ async def update(
async def main() -> None:
await client.bulk_sync.schemas.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="contact",
+ id="id",
+ schema_id="schema_id",
)
@@ -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/bulk_sync/types/__init__.py b/src/polytomic/bulk_sync/types/__init__.py
index 09a2010..4271b24 100644
--- a/src/polytomic/bulk_sync/types/__init__.py
+++ b/src/polytomic/bulk_sync/types/__init__.py
@@ -1,6 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
-from .v_2_create_bulk_sync_request_schemas_item import V2CreateBulkSyncRequestSchemasItem
-from .v_2_update_bulk_sync_request_schemas_item import V2UpdateBulkSyncRequestSchemasItem
+from .v5create_bulk_sync_request_schemas_item import V5CreateBulkSyncRequestSchemasItem
+from .v5update_bulk_sync_request_schemas_item import V5UpdateBulkSyncRequestSchemasItem
-__all__ = ["V2CreateBulkSyncRequestSchemasItem", "V2UpdateBulkSyncRequestSchemasItem"]
+__all__ = ["V5CreateBulkSyncRequestSchemasItem", "V5UpdateBulkSyncRequestSchemasItem"]
diff --git a/src/polytomic/bulk_sync/types/v_2_create_bulk_sync_request_schemas_item.py b/src/polytomic/bulk_sync/types/v5create_bulk_sync_request_schemas_item.py
similarity index 70%
rename from src/polytomic/bulk_sync/types/v_2_create_bulk_sync_request_schemas_item.py
rename to src/polytomic/bulk_sync/types/v5create_bulk_sync_request_schemas_item.py
index 5808811..5001908 100644
--- a/src/polytomic/bulk_sync/types/v_2_create_bulk_sync_request_schemas_item.py
+++ b/src/polytomic/bulk_sync/types/v5create_bulk_sync_request_schemas_item.py
@@ -3,4 +3,4 @@
import typing
from ...types.schema_configuration import SchemaConfiguration
-V2CreateBulkSyncRequestSchemasItem = typing.Union[str, SchemaConfiguration]
+V5CreateBulkSyncRequestSchemasItem = typing.Union[str, SchemaConfiguration]
diff --git a/src/polytomic/bulk_sync/types/v_2_update_bulk_sync_request_schemas_item.py b/src/polytomic/bulk_sync/types/v5update_bulk_sync_request_schemas_item.py
similarity index 70%
rename from src/polytomic/bulk_sync/types/v_2_update_bulk_sync_request_schemas_item.py
rename to src/polytomic/bulk_sync/types/v5update_bulk_sync_request_schemas_item.py
index ea51f93..3b75914 100644
--- a/src/polytomic/bulk_sync/types/v_2_update_bulk_sync_request_schemas_item.py
+++ b/src/polytomic/bulk_sync/types/v5update_bulk_sync_request_schemas_item.py
@@ -3,4 +3,4 @@
import typing
from ...types.schema_configuration import SchemaConfiguration
-V2UpdateBulkSyncRequestSchemasItem = typing.Union[str, SchemaConfiguration]
+V5UpdateBulkSyncRequestSchemasItem = typing.Union[str, SchemaConfiguration]
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/connections/client.py b/src/polytomic/connections/client.py
index c7915c6..e050b5a 100644
--- a/src/polytomic/connections/client.py
+++ b/src/polytomic/connections/client.py
@@ -118,7 +118,7 @@ def get_connection_type_schema(
token="YOUR_TOKEN",
)
client.connections.get_connection_type_schema(
- id="postgresql",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -283,15 +283,9 @@ def create(
token="YOUR_TOKEN",
)
client.connections.create(
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "********",
- "port": 5432,
- "username": "user",
- },
- name="My Postgres Connection",
- type="postgresql",
+ configuration={"configuration": {"key": "value"}},
+ name="name",
+ type="type",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -439,7 +433,7 @@ def connect(
token="YOUR_TOKEN",
)
client.connections.connect(
- name="Salesforce Connection",
+ name="name",
redirect_url="redirect_url",
)
"""
@@ -553,14 +547,8 @@ def test_connection(
token="YOUR_TOKEN",
)
client.connections.test_connection(
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "password",
- "port": 5432,
- "username": "user",
- },
- type="postgresql",
+ configuration={"configuration": {"key": "value"}},
+ type="type",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -648,7 +636,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
token="YOUR_TOKEN",
)
client.connections.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -754,15 +742,9 @@ def update(
token="YOUR_TOKEN",
)
client.connections.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "********",
- "port": 5432,
- "username": "user",
- },
- name="My Postgres Connection",
+ id="id",
+ configuration={"configuration": {"key": "value"}},
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -884,8 +866,7 @@ def remove(
token="YOUR_TOKEN",
)
client.connections.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- force=True,
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -979,7 +960,7 @@ def get_parameter_values(
token="YOUR_TOKEN",
)
client.connections.get_parameter_values(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1137,7 +1118,7 @@ async def get_connection_type_schema(
async def main() -> None:
await client.connections.get_connection_type_schema(
- id="postgresql",
+ id="id",
)
@@ -1318,15 +1299,9 @@ async def create(
async def main() -> None:
await client.connections.create(
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "********",
- "port": 5432,
- "username": "user",
- },
- name="My Postgres Connection",
- type="postgresql",
+ configuration={"configuration": {"key": "value"}},
+ name="name",
+ type="type",
)
@@ -1482,7 +1457,7 @@ async def connect(
async def main() -> None:
await client.connections.connect(
- name="Salesforce Connection",
+ name="name",
redirect_url="redirect_url",
)
@@ -1604,14 +1579,8 @@ async def test_connection(
async def main() -> None:
await client.connections.test_connection(
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "password",
- "port": 5432,
- "username": "user",
- },
- type="postgresql",
+ configuration={"configuration": {"key": "value"}},
+ type="type",
)
@@ -1709,7 +1678,7 @@ async def get(
async def main() -> None:
await client.connections.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1823,15 +1792,9 @@ async def update(
async def main() -> None:
await client.connections.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- configuration={
- "database": "example",
- "hostname": "postgres.example.com",
- "password": "********",
- "port": 5432,
- "username": "user",
- },
- name="My Postgres Connection",
+ id="id",
+ configuration={"configuration": {"key": "value"}},
+ name="name",
)
@@ -1961,8 +1924,7 @@ async def remove(
async def main() -> None:
await client.connections.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- force=True,
+ id="id",
)
@@ -2064,7 +2026,7 @@ async def get_parameter_values(
async def main() -> None:
await client.connections.get_parameter_values(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
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/events/client.py b/src/polytomic/events/client.py
index 01d4d77..baa2ae0 100644
--- a/src/polytomic/events/client.py
+++ b/src/polytomic/events/client.py
@@ -55,23 +55,13 @@ def list(
Examples
--------
- import datetime
-
from polytomic import Polytomic
client = Polytomic(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
- client.events.list(
- organization_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- starting_after=datetime.datetime.fromisoformat(
- "2020-01-01 00:00:00+00:00",
- ),
- ending_before=datetime.datetime.fromisoformat(
- "2020-01-01 00:00:00+00:00",
- ),
- )
+ client.events.list()
"""
_response = self._client_wrapper.httpx_client.request(
"api/events",
@@ -219,7 +209,6 @@ async def list(
Examples
--------
import asyncio
- import datetime
from polytomic import AsyncPolytomic
@@ -230,15 +219,7 @@ async def list(
async def main() -> None:
- await client.events.list(
- organization_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- starting_after=datetime.datetime.fromisoformat(
- "2020-01-01 00:00:00+00:00",
- ),
- ending_before=datetime.datetime.fromisoformat(
- "2020-01-01 00:00:00+00:00",
- ),
- )
+ await client.events.list()
asyncio.run(main())
diff --git a/src/polytomic/jobs/client.py b/src/polytomic/jobs/client.py
index 32ba6b8..79451ce 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",
+ type="type",
+ id="id",
)
"""
_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",
+ type="type",
+ id="id",
)
diff --git a/src/polytomic/model_sync/client.py b/src/polytomic/model_sync/client.py
index b5a0048..2161001 100644
--- a/src/polytomic/model_sync/client.py
+++ b/src/polytomic/model_sync/client.py
@@ -32,7 +32,6 @@
from ..types.schedule_option_response_envelope import ScheduleOptionResponseEnvelope
from ..errors.conflict_error import ConflictError
from ..types.activate_sync_envelope import ActivateSyncEnvelope
-from ..types.cancel_model_sync_response_envelope import CancelModelSyncResponseEnvelope
from ..types.start_model_sync_response_envelope import StartModelSyncResponseEnvelope
from ..types.sync_status_envelope import SyncStatusEnvelope
from ..core.client_wrapper import AsyncClientWrapper
@@ -53,7 +52,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 +60,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.
@@ -80,7 +79,7 @@ def get_source(
token="YOUR_TOKEN",
)
client.model_sync.get_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -159,7 +158,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 +166,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.
@@ -186,7 +185,7 @@ def get_source_fields(
token="YOUR_TOKEN",
)
client.model_sync.get_source_fields(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -267,6 +266,8 @@ def list(
active: typing.Optional[bool] = None,
mode: typing.Optional[ModelSyncMode] = None,
target_connection_id: typing.Optional[str] = None,
+ page_token: typing.Optional[str] = None,
+ limit: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> ListModelSyncResponseEnvelope:
"""
@@ -278,6 +279,11 @@ def list(
target_connection_id : typing.Optional[str]
+ page_token : typing.Optional[str]
+
+ limit : typing.Optional[int]
+ Maximum number of syncs to return. Default and maximum is 50.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -294,10 +300,7 @@ def list(
version="YOUR_VERSION",
token="YOUR_TOKEN",
)
- client.model_sync.list(
- active=True,
- target_connection_id="0b155265-c537-44c9-9359-a3ceb468a4da",
- )
+ client.model_sync.list()
"""
_response = self._client_wrapper.httpx_client.request(
"api/syncs",
@@ -306,6 +309,8 @@ def list(
"active": active,
"mode": mode,
"target_connection_id": target_connection_id,
+ "page_token": page_token,
+ "limit": limit,
},
request_options=request_options,
)
@@ -509,14 +514,17 @@ def create(
client.model_sync.create(
fields=[
ModelSyncField(
- target="name",
- )
+ target="target",
+ ),
+ ModelSyncField(
+ target="target",
+ ),
],
mode="create",
- name="Users Sync",
+ name="name",
schedule=Schedule(),
target=Target(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
),
)
"""
@@ -710,7 +718,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
token="YOUR_TOKEN",
)
client.model_sync.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -852,17 +860,20 @@ def update(
token="YOUR_TOKEN",
)
client.model_sync.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
fields=[
ModelSyncField(
- target="name",
- )
+ target="target",
+ ),
+ ModelSyncField(
+ target="target",
+ ),
],
mode="create",
- name="Users Sync",
+ name="name",
schedule=Schedule(),
target=Target(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
),
)
"""
@@ -1002,7 +1013,7 @@ def remove(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.model_sync.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1095,7 +1106,7 @@ def activate(
token="YOUR_TOKEN",
)
client.model_sync.activate(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
active=True,
)
"""
@@ -1162,94 +1173,6 @@ def activate(
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 cancel(
- self, id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> CancelModelSyncResponseEnvelope:
- """
- Parameters
- ----------
- id : str
- The active execution of this sync ID will be cancelled.
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- CancelModelSyncResponseEnvelope
- OK
-
- Examples
- --------
- from polytomic import Polytomic
-
- client = Polytomic(
- version="YOUR_VERSION",
- token="YOUR_TOKEN",
- )
- client.model_sync.cancel(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- f"api/syncs/{jsonable_encoder(id)}/cancel",
- method="POST",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- return typing.cast(
- CancelModelSyncResponseEnvelope,
- parse_obj_as(
- type_=CancelModelSyncResponseEnvelope, # type: ignore
- object_=_response.json(),
- ),
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- typing.cast(
- RestErrResponse,
- parse_obj_as(
- type_=RestErrResponse, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 403:
- raise ForbiddenError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 404:
- raise NotFoundError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 500:
- raise InternalServerError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- _response_json = _response.json()
- except JSONDecodeError:
- 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 start(
self,
id: str,
@@ -1291,7 +1214,7 @@ def start(
token="YOUR_TOKEN",
)
client.model_sync.start(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1405,7 +1328,7 @@ def get_status(self, id: str, *, request_options: typing.Optional[RequestOptions
token="YOUR_TOKEN",
)
client.model_sync.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1468,7 +1391,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 +1399,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.
@@ -1500,7 +1423,7 @@ async def get_source(
async def main() -> None:
await client.model_sync.get_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1582,7 +1505,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 +1513,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.
@@ -1614,7 +1537,7 @@ async def get_source_fields(
async def main() -> None:
await client.model_sync.get_source_fields(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1698,6 +1621,8 @@ async def list(
active: typing.Optional[bool] = None,
mode: typing.Optional[ModelSyncMode] = None,
target_connection_id: typing.Optional[str] = None,
+ page_token: typing.Optional[str] = None,
+ limit: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> ListModelSyncResponseEnvelope:
"""
@@ -1709,6 +1634,11 @@ async def list(
target_connection_id : typing.Optional[str]
+ page_token : typing.Optional[str]
+
+ limit : typing.Optional[int]
+ Maximum number of syncs to return. Default and maximum is 50.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1730,10 +1660,7 @@ async def list(
async def main() -> None:
- await client.model_sync.list(
- active=True,
- target_connection_id="0b155265-c537-44c9-9359-a3ceb468a4da",
- )
+ await client.model_sync.list()
asyncio.run(main())
@@ -1745,6 +1672,8 @@ async def main() -> None:
"active": active,
"mode": mode,
"target_connection_id": target_connection_id,
+ "page_token": page_token,
+ "limit": limit,
},
request_options=request_options,
)
@@ -1953,14 +1882,17 @@ async def main() -> None:
await client.model_sync.create(
fields=[
ModelSyncField(
- target="name",
- )
+ target="target",
+ ),
+ ModelSyncField(
+ target="target",
+ ),
],
mode="create",
- name="Users Sync",
+ name="name",
schedule=Schedule(),
target=Target(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
),
)
@@ -2172,7 +2104,7 @@ async def get(
async def main() -> None:
await client.model_sync.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -2322,17 +2254,20 @@ async def update(
async def main() -> None:
await client.model_sync.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
fields=[
ModelSyncField(
- target="name",
- )
+ target="target",
+ ),
+ ModelSyncField(
+ target="target",
+ ),
],
mode="create",
- name="Users Sync",
+ name="name",
schedule=Schedule(),
target=Target(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
),
)
@@ -2480,7 +2415,7 @@ async def remove(self, id: str, *, request_options: typing.Optional[RequestOptio
async def main() -> None:
await client.model_sync.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -2581,7 +2516,7 @@ async def activate(
async def main() -> None:
await client.model_sync.activate(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
active=True,
)
@@ -2651,102 +2586,6 @@ async def main() -> None:
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)
- async def cancel(
- self, id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> CancelModelSyncResponseEnvelope:
- """
- Parameters
- ----------
- id : str
- The active execution of this sync ID will be cancelled.
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- CancelModelSyncResponseEnvelope
- OK
-
- Examples
- --------
- import asyncio
-
- from polytomic import AsyncPolytomic
-
- client = AsyncPolytomic(
- version="YOUR_VERSION",
- token="YOUR_TOKEN",
- )
-
-
- async def main() -> None:
- await client.model_sync.cancel(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- )
-
-
- asyncio.run(main())
- """
- _response = await self._client_wrapper.httpx_client.request(
- f"api/syncs/{jsonable_encoder(id)}/cancel",
- method="POST",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- return typing.cast(
- CancelModelSyncResponseEnvelope,
- parse_obj_as(
- type_=CancelModelSyncResponseEnvelope, # type: ignore
- object_=_response.json(),
- ),
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- typing.cast(
- RestErrResponse,
- parse_obj_as(
- type_=RestErrResponse, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 403:
- raise ForbiddenError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 404:
- raise NotFoundError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 500:
- raise InternalServerError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- _response_json = _response.json()
- except JSONDecodeError:
- 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)
-
async def start(
self,
id: str,
@@ -2793,7 +2632,7 @@ async def start(
async def main() -> None:
await client.model_sync.start(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -2917,7 +2756,7 @@ async def get_status(
async def main() -> None:
await client.model_sync.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
diff --git a/src/polytomic/model_sync/executions/client.py b/src/polytomic/model_sync/executions/client.py
index a1e1140..374f80b 100644
--- a/src/polytomic/model_sync/executions/client.py
+++ b/src/polytomic/model_sync/executions/client.py
@@ -1,7 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import typing
from ...core.client_wrapper import SyncClientWrapper
+import typing
from ...core.request_options import RequestOptions
from ...types.list_execution_response_envelope import ListExecutionResponseEnvelope
from ...core.jsonable_encoder import jsonable_encoder
@@ -14,16 +14,11 @@
from ...core.api_error import ApiError as core_api_error_ApiError
from ...types.get_execution_response_envelope import GetExecutionResponseEnvelope
from ...errors.internal_server_error import InternalServerError
-from ...types.execution_status import ExecutionStatus
-from ...errors.bad_request_error import BadRequestError
-from ...errors.forbidden_error import ForbiddenError
-from ...types.v_2_execution_log_type import V2ExecutionLogType
+from ...types.v2execution_log_type import V2ExecutionLogType
from ...types.execution_logs_response_envelope import ExecutionLogsResponseEnvelope
+from ...errors.bad_request_error import BadRequestError
from ...core.client_wrapper import AsyncClientWrapper
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
class ExecutionsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -66,10 +61,7 @@ def list(
token="YOUR_TOKEN",
)
client.model_sync.executions.list(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- page_token="AmkYh8v0jR5B3kls2Qcc9y8MjrPmvR4CvaK7H0F4rEwqvg76K==",
- only_completed=True,
- ascending=True,
+ sync_id="sync_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -143,8 +135,8 @@ def get(
token="YOUR_TOKEN",
)
client.model_sync.executions.get(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -196,117 +188,6 @@ def get(
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 update(
- self, sync_id: str, id: str, *, status: ExecutionStatus, request_options: typing.Optional[RequestOptions] = None
- ) -> GetExecutionResponseEnvelope:
- """
- Parameters
- ----------
- sync_id : str
-
- id : str
- The ID of the execution to update.
-
- status : ExecutionStatus
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- GetExecutionResponseEnvelope
- OK
-
- Examples
- --------
- from polytomic import Polytomic
-
- client = Polytomic(
- version="YOUR_VERSION",
- token="YOUR_TOKEN",
- )
- client.model_sync.executions.update(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- status="created",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- f"api/syncs/{jsonable_encoder(sync_id)}/executions/{jsonable_encoder(id)}",
- method="PUT",
- json={
- "status": status,
- },
- headers={
- "content-type": "application/json",
- },
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if 200 <= _response.status_code < 300:
- return typing.cast(
- GetExecutionResponseEnvelope,
- parse_obj_as(
- type_=GetExecutionResponseEnvelope, # type: ignore
- object_=_response.json(),
- ),
- )
- if _response.status_code == 400:
- raise BadRequestError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- typing.cast(
- RestErrResponse,
- parse_obj_as(
- type_=RestErrResponse, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 403:
- raise ForbiddenError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 404:
- raise NotFoundError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 500:
- raise InternalServerError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- _response_json = _response.json()
- except JSONDecodeError:
- 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_log_urls(
self,
sync_id: str,
@@ -341,8 +222,8 @@ def get_log_urls(
token="YOUR_TOKEN",
)
client.model_sync.executions.get_log_urls(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ id="id",
type="records",
)
"""
@@ -441,10 +322,10 @@ def get_logs(
token="YOUR_TOKEN",
)
client.model_sync.executions.get_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="0ecd09c1-b901-4d27-9053-f0367c427254",
+ sync_id="sync_id",
+ id="id",
type="records",
- filename="path/to/file.json",
+ filename="filename",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -547,10 +428,7 @@ async def list(
async def main() -> None:
await client.model_sync.executions.list(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- page_token="AmkYh8v0jR5B3kls2Qcc9y8MjrPmvR4CvaK7H0F4rEwqvg76K==",
- only_completed=True,
- ascending=True,
+ sync_id="sync_id",
)
@@ -632,8 +510,8 @@ async def get(
async def main() -> None:
await client.model_sync.executions.get(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ id="id",
)
@@ -688,125 +566,6 @@ async def main() -> None:
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)
- async def update(
- self, sync_id: str, id: str, *, status: ExecutionStatus, request_options: typing.Optional[RequestOptions] = None
- ) -> GetExecutionResponseEnvelope:
- """
- Parameters
- ----------
- sync_id : str
-
- id : str
- The ID of the execution to update.
-
- status : ExecutionStatus
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- GetExecutionResponseEnvelope
- OK
-
- Examples
- --------
- import asyncio
-
- from polytomic import AsyncPolytomic
-
- client = AsyncPolytomic(
- version="YOUR_VERSION",
- token="YOUR_TOKEN",
- )
-
-
- async def main() -> None:
- await client.model_sync.executions.update(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- status="created",
- )
-
-
- asyncio.run(main())
- """
- _response = await self._client_wrapper.httpx_client.request(
- f"api/syncs/{jsonable_encoder(sync_id)}/executions/{jsonable_encoder(id)}",
- method="PUT",
- json={
- "status": status,
- },
- headers={
- "content-type": "application/json",
- },
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if 200 <= _response.status_code < 300:
- return typing.cast(
- GetExecutionResponseEnvelope,
- parse_obj_as(
- type_=GetExecutionResponseEnvelope, # type: ignore
- object_=_response.json(),
- ),
- )
- if _response.status_code == 400:
- raise BadRequestError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- typing.cast(
- RestErrResponse,
- parse_obj_as(
- type_=RestErrResponse, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 403:
- raise ForbiddenError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 404:
- raise NotFoundError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 500:
- raise InternalServerError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- _response_json = _response.json()
- except JSONDecodeError:
- 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)
-
async def get_log_urls(
self,
sync_id: str,
@@ -846,8 +605,8 @@ async def get_log_urls(
async def main() -> None:
await client.model_sync.executions.get_log_urls(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ sync_id="sync_id",
+ id="id",
type="records",
)
@@ -954,10 +713,10 @@ async def get_logs(
async def main() -> None:
await client.model_sync.executions.get_logs(
- sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="0ecd09c1-b901-4d27-9053-f0367c427254",
+ sync_id="sync_id",
+ id="id",
type="records",
- filename="path/to/file.json",
+ filename="filename",
)
diff --git a/src/polytomic/model_sync/targets/client.py b/src/polytomic/model_sync/targets/client.py
index 59dcf67..480fcd1 100644
--- a/src/polytomic/model_sync/targets/client.py
+++ b/src/polytomic/model_sync/targets/client.py
@@ -16,8 +16,8 @@
from json.decoder import JSONDecodeError
from ...core.api_error import ApiError as core_api_error_ApiError
from ...types.target_response_envelope import TargetResponseEnvelope
-from ...types.v_4_target_objects_response_envelope import V4TargetObjectsResponseEnvelope
-from ...types.v_4_target_property_values_envelope import V4TargetPropertyValuesEnvelope
+from ...types.v4target_objects_response_envelope import V4TargetObjectsResponseEnvelope
+from ...types.v4target_property_values_envelope import V4TargetPropertyValuesEnvelope
from ...core.client_wrapper import AsyncClientWrapper
@@ -59,7 +59,7 @@ def get_target(
token="YOUR_TOKEN",
)
client.model_sync.targets.get_target(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -169,9 +169,8 @@ def get_target_fields(
token="YOUR_TOKEN",
)
client.model_sync.targets.get_target_fields(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- target="database.table",
- refresh=False,
+ id="id",
+ target="target",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -280,7 +279,7 @@ def list(
token="YOUR_TOKEN",
)
client.model_sync.targets.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -410,7 +409,7 @@ def get_create_property(
token="YOUR_TOKEN",
)
client.model_sync.targets.get_create_property(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
property="property",
)
"""
@@ -527,7 +526,7 @@ async def get_target(
async def main() -> None:
await client.model_sync.targets.get_target(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -645,9 +644,8 @@ async def get_target_fields(
async def main() -> None:
await client.model_sync.targets.get_target_fields(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- target="database.table",
- refresh=False,
+ id="id",
+ target="target",
)
@@ -764,7 +762,7 @@ async def list(
async def main() -> None:
await client.model_sync.targets.list(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -902,7 +900,7 @@ async def get_create_property(
async def main() -> None:
await client.model_sync.targets.get_create_property(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
property="property",
)
diff --git a/src/polytomic/models/client.py b/src/polytomic/models/client.py
index 45efe7f..de8e49e 100644
--- a/src/polytomic/models/client.py
+++ b/src/polytomic/models/client.py
@@ -15,8 +15,8 @@
from ..errors.internal_server_error import InternalServerError
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError as core_api_error_ApiError
-from ..types.v_2_enricher_configuration import V2EnricherConfiguration
-from ..types.v_2_get_enrichment_input_fields_response_envelope import V2GetEnrichmentInputFieldsResponseEnvelope
+from ..types.v2enricher_configuration import V2EnricherConfiguration
+from ..types.v2get_enrichment_input_fields_response_envelope import V2GetEnrichmentInputFieldsResponseEnvelope
from ..types.model_model_field_request import ModelModelFieldRequest
from ..types.enrichment import Enrichment
from ..types.model_relation import ModelRelation
@@ -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.
@@ -65,7 +65,7 @@ def get_enrichment_source(
token="YOUR_TOKEN",
)
client.models.get_enrichment_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -173,7 +173,7 @@ def post(
token="YOUR_TOKEN",
)
client.models.post(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -306,9 +306,9 @@ def preview(
token="YOUR_TOKEN",
)
client.models.preview(
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -519,9 +519,9 @@ def create(
token="YOUR_TOKEN",
)
client.models.create(
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -634,7 +634,7 @@ def get(
token="YOUR_TOKEN",
)
client.models.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -759,11 +759,10 @@ def update(
token="YOUR_TOKEN",
)
client.models.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- async_=False,
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ id="id",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -879,7 +878,7 @@ def remove(
token="YOUR_TOKEN",
)
client.models.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -967,7 +966,7 @@ def sample(
token="YOUR_TOKEN",
)
client.models.sample(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1041,7 +1040,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 +1048,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.
@@ -1073,7 +1072,7 @@ async def get_enrichment_source(
async def main() -> None:
await client.models.get_enrichment_source(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1189,7 +1188,7 @@ async def post(
async def main() -> None:
await client.models.post(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ connection_id="connection_id",
)
@@ -1330,9 +1329,9 @@ async def preview(
async def main() -> None:
await client.models.preview(
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
@@ -1559,9 +1558,9 @@ async def create(
async def main() -> None:
await client.models.create(
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
@@ -1682,7 +1681,7 @@ async def get(
async def main() -> None:
await client.models.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1815,11 +1814,10 @@ async def update(
async def main() -> None:
await client.models.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- async_=False,
- configuration={"table": "public.users"},
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Users",
+ id="id",
+ configuration={"configuration": {"key": "value"}},
+ connection_id="connection_id",
+ name="name",
)
@@ -1943,7 +1941,7 @@ async def remove(
async def main() -> None:
await client.models.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -2039,7 +2037,7 @@ async def sample(
async def main() -> None:
await client.models.sample(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
diff --git a/src/polytomic/notifications/client.py b/src/polytomic/notifications/client.py
index aed56ee..290abf1 100644
--- a/src/polytomic/notifications/client.py
+++ b/src/polytomic/notifications/client.py
@@ -3,7 +3,7 @@
import typing
from ..core.client_wrapper import SyncClientWrapper
from ..core.request_options import RequestOptions
-from ..types.v_4_global_error_subscribers_response import V4GlobalErrorSubscribersResponse
+from ..types.v4global_error_subscribers_response import V4GlobalErrorSubscribersResponse
from ..core.pydantic_utilities import parse_obj_as
from ..errors.unauthorized_error import UnauthorizedError
from ..types.rest_err_response import RestErrResponse
diff --git a/src/polytomic/organization/client.py b/src/polytomic/organization/client.py
index 8929e07..c02bfb5 100644
--- a/src/polytomic/organization/client.py
+++ b/src/polytomic/organization/client.py
@@ -138,7 +138,7 @@ def create(
token="YOUR_TOKEN",
)
client.organization.create(
- name="My Organization",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -239,7 +239,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
token="YOUR_TOKEN",
)
client.organization.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -331,8 +331,8 @@ def update(
token="YOUR_TOKEN",
)
client.organization.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Organization",
+ id="id",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -432,7 +432,7 @@ def remove(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.organization.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -608,7 +608,7 @@ async def create(
async def main() -> None:
await client.organization.create(
- name="My Organization",
+ name="name",
)
@@ -717,7 +717,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
async def main() -> None:
await client.organization.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -817,8 +817,8 @@ async def update(
async def main() -> None:
await client.organization.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="My Organization",
+ id="id",
+ name="name",
)
@@ -926,7 +926,7 @@ async def remove(self, id: str, *, request_options: typing.Optional[RequestOptio
async def main() -> None:
await client.organization.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
diff --git a/src/polytomic/permissions/policies/client.py b/src/polytomic/permissions/policies/client.py
index a0fc74a..a8a9950 100644
--- a/src/polytomic/permissions/policies/client.py
+++ b/src/polytomic/permissions/policies/client.py
@@ -123,7 +123,7 @@ def create(
token="YOUR_TOKEN",
)
client.permissions.policies.create(
- name="Custom",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -229,7 +229,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
token="YOUR_TOKEN",
)
client.permissions.policies.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -318,8 +318,8 @@ def update(
token="YOUR_TOKEN",
)
client.permissions.policies.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Custom",
+ id="id",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -424,7 +424,7 @@ def remove(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.permissions.policies.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -593,7 +593,7 @@ async def create(
async def main() -> None:
await client.permissions.policies.create(
- name="Custom",
+ name="name",
)
@@ -707,7 +707,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
async def main() -> None:
await client.permissions.policies.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -804,8 +804,8 @@ async def update(
async def main() -> None:
await client.permissions.policies.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Custom",
+ id="id",
+ name="name",
)
@@ -918,7 +918,7 @@ async def remove(self, id: str, *, request_options: typing.Optional[RequestOptio
async def main() -> None:
await client.permissions.policies.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
diff --git a/src/polytomic/permissions/roles/client.py b/src/polytomic/permissions/roles/client.py
index b7a80bc..ee1c8db 100644
--- a/src/polytomic/permissions/roles/client.py
+++ b/src/polytomic/permissions/roles/client.py
@@ -118,7 +118,7 @@ def create(
token="YOUR_TOKEN",
)
client.permissions.roles.create(
- name="Custom",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -221,7 +221,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
token="YOUR_TOKEN",
)
client.permissions.roles.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -297,8 +297,8 @@ def update(
token="YOUR_TOKEN",
)
client.permissions.roles.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Custom",
+ id="id",
+ name="name",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -400,7 +400,7 @@ def remove(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.permissions.roles.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -566,7 +566,7 @@ async def create(
async def main() -> None:
await client.permissions.roles.create(
- name="Custom",
+ name="name",
)
@@ -677,7 +677,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
async def main() -> None:
await client.permissions.roles.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -761,8 +761,8 @@ async def update(
async def main() -> None:
await client.permissions.roles.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- name="Custom",
+ id="id",
+ name="name",
)
@@ -872,7 +872,7 @@ async def remove(self, id: str, *, request_options: typing.Optional[RequestOptio
async def main() -> None:
await client.permissions.roles.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
diff --git a/src/polytomic/query_runner/client.py b/src/polytomic/query_runner/client.py
index cd5fc5b..80a1812 100644
--- a/src/polytomic/query_runner/client.py
+++ b/src/polytomic/query_runner/client.py
@@ -3,7 +3,7 @@
import typing
from ..core.client_wrapper import SyncClientWrapper
from ..core.request_options import RequestOptions
-from ..types.v_4_run_query_envelope import V4RunQueryEnvelope
+from ..types.v4run_query_envelope import V4RunQueryEnvelope
from ..core.jsonable_encoder import jsonable_encoder
from ..core.pydantic_utilities import parse_obj_as
from ..errors.bad_request_error import BadRequestError
@@ -14,7 +14,7 @@
from ..errors.internal_server_error import InternalServerError
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError as core_api_error_ApiError
-from ..types.v_4_query_results_envelope import V4QueryResultsEnvelope
+from ..types.v4query_results_envelope import V4QueryResultsEnvelope
from ..core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
@@ -57,8 +57,7 @@ def run_query(
token="YOUR_TOKEN",
)
client.query_runner.run_query(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- query="SELECT * FROM table",
+ connection_id="connection_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -155,7 +154,7 @@ def get_query(
token="YOUR_TOKEN",
)
client.query_runner.get_query(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -262,8 +261,7 @@ async def run_query(
async def main() -> None:
await client.query_runner.run_query(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- query="SELECT * FROM table",
+ connection_id="connection_id",
)
@@ -368,7 +366,7 @@ async def get_query(
async def main() -> None:
await client.query_runner.get_query(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
diff --git a/src/polytomic/schemas/client.py b/src/polytomic/schemas/client.py
index 04edb01..8a8986a 100644
--- a/src/polytomic/schemas/client.py
+++ b/src/polytomic/schemas/client.py
@@ -2,7 +2,7 @@
import typing
from ..core.client_wrapper import SyncClientWrapper
-from ..types.v_4_user_field_request import V4UserFieldRequest
+from ..types.v4user_field_request import V4UserFieldRequest
from ..core.request_options import RequestOptions
from ..core.jsonable_encoder import jsonable_encoder
from ..core.serialization import convert_and_respect_annotation_metadata
@@ -63,8 +63,8 @@ def upsert_field(
token="YOUR_TOKEN",
)
client.schemas.upsert_field(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -162,9 +162,9 @@ def delete_field(
token="YOUR_TOKEN",
)
client.schemas.delete_field(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
- field_id="first_name",
+ connection_id="connection_id",
+ schema_id="schema_id",
+ field_id="field_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -253,8 +253,8 @@ def set_primary_keys(
token="YOUR_TOKEN",
)
client.schemas.set_primary_keys(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -347,8 +347,8 @@ def reset_primary_keys(
token="YOUR_TOKEN",
)
client.schemas.reset_primary_keys(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -426,7 +426,7 @@ def refresh(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.schemas.refresh(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -509,7 +509,7 @@ def get_status(
token="YOUR_TOKEN",
)
client.schemas.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -598,8 +598,8 @@ def get(
token="YOUR_TOKEN",
)
client.schemas.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ id="id",
+ schema_id="schema_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -688,8 +688,8 @@ def get_records(
token="YOUR_TOKEN",
)
client.schemas.get_records(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ id="id",
+ schema_id="schema_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -804,8 +804,8 @@ async def upsert_field(
async def main() -> None:
await client.schemas.upsert_field(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
@@ -911,9 +911,9 @@ async def delete_field(
async def main() -> None:
await client.schemas.delete_field(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
- field_id="first_name",
+ connection_id="connection_id",
+ schema_id="schema_id",
+ field_id="field_id",
)
@@ -1010,8 +1010,8 @@ async def set_primary_keys(
async def main() -> None:
await client.schemas.set_primary_keys(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
@@ -1112,8 +1112,8 @@ async def reset_primary_keys(
async def main() -> None:
await client.schemas.reset_primary_keys(
- connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ connection_id="connection_id",
+ schema_id="schema_id",
)
@@ -1199,7 +1199,7 @@ async def refresh(self, id: str, *, request_options: typing.Optional[RequestOpti
async def main() -> None:
await client.schemas.refresh(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1290,7 +1290,7 @@ async def get_status(
async def main() -> None:
await client.schemas.get_status(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1387,8 +1387,8 @@ async def get(
async def main() -> None:
await client.schemas.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ id="id",
+ schema_id="schema_id",
)
@@ -1485,8 +1485,8 @@ async def get_records(
async def main() -> None:
await client.schemas.get_records(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- schema_id="public.users",
+ id="id",
+ schema_id="schema_id",
)
diff --git a/src/polytomic/types/__init__.py b/src/polytomic/types/__init__.py
index fdf1e45..d0e7c8f 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_filter2 import BulkFilter2
from .bulk_itemized_schedule import BulkItemizedSchedule
from .bulk_multi_schedule_configuration import BulkMultiScheduleConfiguration
from .bulk_normalize_names import BulkNormalizeNames
@@ -35,8 +36,9 @@
from .bulk_sync_list_envelope import BulkSyncListEnvelope
from .bulk_sync_mode import BulkSyncMode
from .bulk_sync_response import BulkSyncResponse
-from .bulk_sync_response_envelope import BulkSyncResponseEnvelope
from .bulk_sync_running_event import BulkSyncRunningEvent
+from .bulk_sync_schedule import BulkSyncSchedule
+from .bulk_sync_schedule_request import BulkSyncScheduleRequest
from .bulk_sync_schema_execution import BulkSyncSchemaExecution
from .bulk_sync_schema_execution_status import BulkSyncSchemaExecutionStatus
from .bulk_sync_source import BulkSyncSource
@@ -46,10 +48,9 @@
from .bulk_sync_source_status_envelope import BulkSyncSourceStatusEnvelope
from .bulk_sync_status_envelope import BulkSyncStatusEnvelope
from .bulk_sync_status_response import BulkSyncStatusResponse
-from .cancel_model_sync_response import CancelModelSyncResponse
-from .cancel_model_sync_response_envelope import CancelModelSyncResponseEnvelope
from .common_output_actor import CommonOutputActor
from .configuration_value import ConfigurationValue
+from .configuration_value2 import ConfigurationValue2
from .connect_card_response import ConnectCardResponse
from .connect_card_response_envelope import ConnectCardResponseEnvelope
from .connection_list_response_envelope import ConnectionListResponseEnvelope
@@ -112,6 +113,7 @@
from .model_sample import ModelSample
from .model_sample_response_envelope import ModelSampleResponseEnvelope
from .model_sync_field import ModelSyncField
+from .model_sync_list_response import ModelSyncListResponse
from .model_sync_mode import ModelSyncMode
from .model_sync_response import ModelSyncResponse
from .model_sync_response_envelope import ModelSyncResponseEnvelope
@@ -122,6 +124,8 @@
from .override import Override
from .pagination import Pagination
from .pagination_details import PaginationDetails
+from .pagination_details2 import PaginationDetails2
+from .pagination_details3 import PaginationDetails3
from .pick_value import PickValue
from .policy_action import PolicyAction
from .policy_response import PolicyResponse
@@ -133,7 +137,9 @@
from .role_response import RoleResponse
from .role_response_envelope import RoleResponseEnvelope
from .run_after import RunAfter
+from .run_after2 import RunAfter2
from .schedule import Schedule
+from .schedule2 import Schedule2
from .schedule_envelope import ScheduleEnvelope
from .schedule_frequency import ScheduleFrequency
from .schedule_option_response import ScheduleOptionResponse
@@ -172,30 +178,32 @@
from .user_envelope import UserEnvelope
from .util_enum_value import UtilEnumValue
from .util_field_type import UtilFieldType
-from .v_2_connection_form import V2ConnectionForm
-from .v_2_enricher_configuration import V2EnricherConfiguration
-from .v_2_enricher_mapping import V2EnricherMapping
-from .v_2_execution_log_type import V2ExecutionLogType
-from .v_2_get_enrichment_input_fields_response_envelope import V2GetEnrichmentInputFieldsResponseEnvelope
-from .v_2_ordered_map_string_github_com_invopop_jsonschema_schema import (
+from .v2connection_form import V2ConnectionForm
+from .v2enricher_configuration import V2EnricherConfiguration
+from .v2enricher_mapping import V2EnricherMapping
+from .v2execution_log_type import V2ExecutionLogType
+from .v2get_enrichment_input_fields_response_envelope import V2GetEnrichmentInputFieldsResponseEnvelope
+from .v2ordered_map_string_github_com_invopop_jsonschema_schema import (
V2OrderedMapStringGithubComInvopopJsonschemaSchema,
)
-from .v_2_sample_record import V2SampleRecord
-from .v_2_schema_configuration_fields_item import V2SchemaConfigurationFieldsItem
-from .v_4_bulk_sync_execution_logs import V4BulkSyncExecutionLogs
-from .v_4_bulk_sync_execution_logs_envelope import V4BulkSyncExecutionLogsEnvelope
-from .v_4_bulk_sync_schedule_api import V4BulkSyncScheduleApi
-from .v_4_export_sync_logs_envelope import V4ExportSyncLogsEnvelope
-from .v_4_export_sync_logs_response import V4ExportSyncLogsResponse
-from .v_4_global_error_subscribers_response import V4GlobalErrorSubscribersResponse
-from .v_4_query_results_envelope import V4QueryResultsEnvelope
-from .v_4_run_query_envelope import V4RunQueryEnvelope
-from .v_4_run_query_result import V4RunQueryResult
-from .v_4_target_creator import V4TargetCreator
-from .v_4_target_objects_response_envelope import V4TargetObjectsResponseEnvelope
-from .v_4_target_property_values import V4TargetPropertyValues
-from .v_4_target_property_values_envelope import V4TargetPropertyValuesEnvelope
-from .v_4_user_field_request import V4UserFieldRequest
+from .v2sample_record import V2SampleRecord
+from .v2schema_configuration_fields_item import V2SchemaConfigurationFieldsItem
+from .v4bulk_sync_execution_logs import V4BulkSyncExecutionLogs
+from .v4bulk_sync_execution_logs_envelope import V4BulkSyncExecutionLogsEnvelope
+from .v4bulk_sync_schedule_api import V4BulkSyncScheduleApi
+from .v4export_sync_logs_envelope import V4ExportSyncLogsEnvelope
+from .v4export_sync_logs_response import V4ExportSyncLogsResponse
+from .v4global_error_subscribers_response import V4GlobalErrorSubscribersResponse
+from .v4query_results_envelope import V4QueryResultsEnvelope
+from .v4run_query_envelope import V4RunQueryEnvelope
+from .v4run_query_result import V4RunQueryResult
+from .v4target_creator import V4TargetCreator
+from .v4target_objects_response_envelope import V4TargetObjectsResponseEnvelope
+from .v4target_property_values import V4TargetPropertyValues
+from .v4target_property_values_envelope import V4TargetPropertyValuesEnvelope
+from .v4user_field_request import V4UserFieldRequest
+from .v5bulk_sync_response import V5BulkSyncResponse
+from .v5bulk_sync_response_envelope import V5BulkSyncResponseEnvelope
from .webhook import Webhook
from .webhook_envelope import WebhookEnvelope
from .webhook_list_envelope import WebhookListEnvelope
@@ -216,6 +224,7 @@
"BulkFetchMode",
"BulkField",
"BulkFilter",
+ "BulkFilter2",
"BulkItemizedSchedule",
"BulkMultiScheduleConfiguration",
"BulkNormalizeNames",
@@ -236,8 +245,9 @@
"BulkSyncListEnvelope",
"BulkSyncMode",
"BulkSyncResponse",
- "BulkSyncResponseEnvelope",
"BulkSyncRunningEvent",
+ "BulkSyncSchedule",
+ "BulkSyncScheduleRequest",
"BulkSyncSchemaExecution",
"BulkSyncSchemaExecutionStatus",
"BulkSyncSource",
@@ -247,10 +257,9 @@
"BulkSyncSourceStatusEnvelope",
"BulkSyncStatusEnvelope",
"BulkSyncStatusResponse",
- "CancelModelSyncResponse",
- "CancelModelSyncResponseEnvelope",
"CommonOutputActor",
"ConfigurationValue",
+ "ConfigurationValue2",
"ConnectCardResponse",
"ConnectCardResponseEnvelope",
"ConnectionListResponseEnvelope",
@@ -313,6 +322,7 @@
"ModelSample",
"ModelSampleResponseEnvelope",
"ModelSyncField",
+ "ModelSyncListResponse",
"ModelSyncMode",
"ModelSyncResponse",
"ModelSyncResponseEnvelope",
@@ -323,6 +333,8 @@
"Override",
"Pagination",
"PaginationDetails",
+ "PaginationDetails2",
+ "PaginationDetails3",
"PickValue",
"PolicyAction",
"PolicyResponse",
@@ -334,7 +346,9 @@
"RoleResponse",
"RoleResponseEnvelope",
"RunAfter",
+ "RunAfter2",
"Schedule",
+ "Schedule2",
"ScheduleEnvelope",
"ScheduleFrequency",
"ScheduleOptionResponse",
@@ -396,6 +410,8 @@
"V4TargetPropertyValues",
"V4TargetPropertyValuesEnvelope",
"V4UserFieldRequest",
+ "V5BulkSyncResponse",
+ "V5BulkSyncResponseEnvelope",
"Webhook",
"WebhookEnvelope",
"WebhookListEnvelope",
diff --git a/src/polytomic/types/bulk_filter2.py b/src/polytomic/types/bulk_filter2.py
new file mode 100644
index 0000000..0d6e162
--- /dev/null
+++ b/src/polytomic/types/bulk_filter2.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..2c6f491 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_filter2 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/bulk_sync_schedule.py b/src/polytomic/types/bulk_sync_schedule.py
new file mode 100644
index 0000000..587722a
--- /dev/null
+++ b/src/polytomic/types/bulk_sync_schedule.py
@@ -0,0 +1,34 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+import datetime as dt
+from .common_output_actor import CommonOutputActor
+from .schedule_frequency import ScheduleFrequency
+from .bulk_selective_mode import BulkSelectiveMode
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BulkSyncSchedule(UniversalBaseModel):
+ created_at: typing.Optional[dt.datetime] = None
+ created_by: typing.Optional[CommonOutputActor] = None
+ day_of_month: typing.Optional[str] = None
+ day_of_week: typing.Optional[str] = None
+ frequency: ScheduleFrequency
+ hour: typing.Optional[str] = None
+ id: typing.Optional[str] = None
+ minute: typing.Optional[str] = None
+ month: typing.Optional[str] = None
+ selective_mode: typing.Optional[BulkSelectiveMode] = None
+ updated_at: typing.Optional[dt.datetime] = None
+ updated_by: typing.Optional[CommonOutputActor] = 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_sync_response_envelope.py b/src/polytomic/types/bulk_sync_schedule_request.py
similarity index 52%
rename from src/polytomic/types/bulk_sync_response_envelope.py
rename to src/polytomic/types/bulk_sync_schedule_request.py
index 5a9db4c..9bdc898 100644
--- a/src/polytomic/types/bulk_sync_response_envelope.py
+++ b/src/polytomic/types/bulk_sync_schedule_request.py
@@ -1,17 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-from .bulk_itemized_schedule import BulkItemizedSchedule
-from .bulk_multi_schedule_configuration import BulkMultiScheduleConfiguration
-from .bulk_schedule import BulkSchedule
import typing
-from .bulk_sync_response import BulkSyncResponse
+from .schedule_frequency import ScheduleFrequency
+from .bulk_selective_mode import BulkSelectiveMode
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-class BulkSyncResponseEnvelope(UniversalBaseModel):
- data: typing.Optional[BulkSyncResponse] = None
+class BulkSyncScheduleRequest(UniversalBaseModel):
+ day_of_month: typing.Optional[str] = None
+ day_of_week: typing.Optional[str] = None
+ frequency: ScheduleFrequency
+ hour: typing.Optional[str] = None
+ minute: typing.Optional[str] = None
+ month: typing.Optional[str] = None
+ selective_mode: typing.Optional[BulkSelectiveMode] = 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/cancel_model_sync_response_envelope.py b/src/polytomic/types/configuration_value2.py
similarity index 73%
rename from src/polytomic/types/cancel_model_sync_response_envelope.py
rename to src/polytomic/types/configuration_value2.py
index 0e32aa2..73ef8bc 100644
--- a/src/polytomic/types/cancel_model_sync_response_envelope.py
+++ b/src/polytomic/types/configuration_value2.py
@@ -2,13 +2,13 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .cancel_model_sync_response import CancelModelSyncResponse
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-class CancelModelSyncResponseEnvelope(UniversalBaseModel):
- data: typing.Optional[CancelModelSyncResponse] = None
+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
diff --git a/src/polytomic/types/connection_response_schema.py b/src/polytomic/types/connection_response_schema.py
index cf08ff0..29efa76 100644
--- a/src/polytomic/types/connection_response_schema.py
+++ b/src/polytomic/types/connection_response_schema.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
import pydantic
import datetime as dt
from .common_output_actor import CommonOutputActor
@@ -10,7 +12,9 @@
class ConnectionResponseSchema(UniversalBaseModel):
- api_calls_last_24_hours: typing.Optional[int] = pydantic.Field(default=None)
+ api_calls_last24hours: typing_extensions.Annotated[
+ typing.Optional[int], FieldMetadata(alias="api_calls_last_24_hours")
+ ] = pydantic.Field(default=None)
"""
API calls made to service in the last 24h (supported integrations only).
"""
diff --git a/src/polytomic/types/connection_type.py b/src/polytomic/types/connection_type.py
index fe2bd1f..9e4fd64 100644
--- a/src/polytomic/types/connection_type.py
+++ b/src/polytomic/types/connection_type.py
@@ -4,7 +4,7 @@
from .backend_connection_capabilities import BackendConnectionCapabilities
import typing_extensions
import typing
-from .v_2_connection_form import V2ConnectionForm
+from .v2connection_form import V2ConnectionForm
from ..core.serialization import FieldMetadata
from .backend_o_auth_prompt import BackendOAuthPrompt
from ..core.pydantic_utilities import IS_PYDANTIC_V2
diff --git a/src/polytomic/types/enrichment.py b/src/polytomic/types/enrichment.py
index 7def672..d326c4e 100644
--- a/src/polytomic/types/enrichment.py
+++ b/src/polytomic/types/enrichment.py
@@ -2,10 +2,10 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .v_2_enricher_configuration import V2EnricherConfiguration
+from .v2enricher_configuration import V2EnricherConfiguration
import pydantic
from .model_field import ModelField
-from .v_2_enricher_mapping import V2EnricherMapping
+from .v2enricher_mapping import V2EnricherMapping
from ..core.pydantic_utilities import IS_PYDANTIC_V2
diff --git a/src/polytomic/types/jsonschema_schema.py b/src/polytomic/types/jsonschema_schema.py
index cc657fb..335b46c 100644
--- a/src/polytomic/types/jsonschema_schema.py
+++ b/src/polytomic/types/jsonschema_schema.py
@@ -5,7 +5,7 @@
import typing_extensions
import typing
from ..core.serialization import FieldMetadata
-from .v_2_ordered_map_string_github_com_invopop_jsonschema_schema import (
+from .v2ordered_map_string_github_com_invopop_jsonschema_schema import (
V2OrderedMapStringGithubComInvopopJsonschemaSchema,
)
from ..core.pydantic_utilities import IS_PYDANTIC_V2
diff --git a/src/polytomic/types/list_bulk_sync_executions_envelope.py b/src/polytomic/types/list_bulk_sync_executions_envelope.py
index a63f897..fc60a5e 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_details2 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/list_model_sync_response_envelope.py b/src/polytomic/types/list_model_sync_response_envelope.py
index f4d9ade..8186b10 100644
--- a/src/polytomic/types/list_model_sync_response_envelope.py
+++ b/src/polytomic/types/list_model_sync_response_envelope.py
@@ -2,13 +2,15 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .model_sync_response import ModelSyncResponse
+from .model_sync_list_response import ModelSyncListResponse
+from .pagination_details3 import PaginationDetails3
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
class ListModelSyncResponseEnvelope(UniversalBaseModel):
- data: typing.Optional[typing.List[ModelSyncResponse]] = None
+ data: typing.Optional[typing.List[ModelSyncListResponse]] = None
+ pagination: typing.Optional[PaginationDetails3] = 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_sample.py b/src/polytomic/types/model_sample.py
index 10ce391..d07a40b 100644
--- a/src/polytomic/types/model_sample.py
+++ b/src/polytomic/types/model_sample.py
@@ -2,7 +2,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .v_2_sample_record import V2SampleRecord
+from .v2sample_record import V2SampleRecord
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
diff --git a/src/polytomic/types/model_sync_list_response.py b/src/polytomic/types/model_sync_list_response.py
new file mode 100644
index 0000000..b0e3cd1
--- /dev/null
+++ b/src/polytomic/types/model_sync_list_response.py
@@ -0,0 +1,41 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+import datetime as dt
+from .common_output_actor import CommonOutputActor
+import pydantic
+from .schedule2 import Schedule2
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class ModelSyncListResponse(UniversalBaseModel):
+ active: typing.Optional[bool] = None
+ created_at: typing.Optional[dt.datetime] = None
+ created_by: typing.Optional[CommonOutputActor] = None
+ id: typing.Optional[str] = None
+ mode: typing.Optional[str] = None
+ model_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Model IDs used in the sync.
+ """
+
+ name: typing.Optional[str] = None
+ only_enrich_updates: typing.Optional[bool] = None
+ organization_id: typing.Optional[str] = None
+ schedule: typing.Optional[Schedule2] = None
+ skip_initial_backfill: typing.Optional[bool] = None
+ sync_all_records: typing.Optional[bool] = None
+ target_connection_id: typing.Optional[str] = None
+ target_object: typing.Optional[str] = None
+ updated_at: typing.Optional[dt.datetime] = None
+ updated_by: typing.Optional[CommonOutputActor] = 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/model_sync_source_meta_response.py b/src/polytomic/types/model_sync_source_meta_response.py
index 552befd..578fbd5 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_value2 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/cancel_model_sync_response.py b/src/polytomic/types/pagination_details2.py
similarity index 84%
rename from src/polytomic/types/cancel_model_sync_response.py
rename to src/polytomic/types/pagination_details2.py
index e827be1..eac847e 100644
--- a/src/polytomic/types/cancel_model_sync_response.py
+++ b/src/polytomic/types/pagination_details2.py
@@ -6,8 +6,8 @@
import pydantic
-class CancelModelSyncResponse(UniversalBaseModel):
- message: typing.Optional[str] = None
+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
diff --git a/src/polytomic/types/pagination_details3.py b/src/polytomic/types/pagination_details3.py
new file mode 100644
index 0000000..29b6c85
--- /dev/null
+++ b/src/polytomic/types/pagination_details3.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 PaginationDetails3(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/types/run_after2.py b/src/polytomic/types/run_after2.py
new file mode 100644
index 0000000..53b6842
--- /dev/null
+++ b/src/polytomic/types/run_after2.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 RunAfter2(UniversalBaseModel):
+ bulk_sync_ids: typing.Optional[typing.List[str]] = None
+ sync_ids: typing.Optional[typing.List[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/schedule2.py b/src/polytomic/types/schedule2.py
new file mode 100644
index 0000000..2632167
--- /dev/null
+++ b/src/polytomic/types/schedule2.py
@@ -0,0 +1,33 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from .schedule_frequency import ScheduleFrequency
+from .run_after2 import RunAfter2
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class Schedule2(UniversalBaseModel):
+ connection_id: typing.Optional[str] = None
+ day_of_month: typing.Optional[str] = None
+ day_of_week: typing.Optional[str] = None
+ frequency: typing.Optional[ScheduleFrequency] = None
+ hour: typing.Optional[str] = None
+ job_id: typing.Optional[int] = None
+ minute: typing.Optional[str] = None
+ month: typing.Optional[str] = None
+ run_after: typing.Optional[RunAfter2] = None
+ run_after_success_only: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ If true, the sync will only run if the dependent syncs completed successfully.
+ """
+
+ 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/schema_configuration.py b/src/polytomic/types/schema_configuration.py
index 530c3f4..36bf064 100644
--- a/src/polytomic/types/schema_configuration.py
+++ b/src/polytomic/types/schema_configuration.py
@@ -4,7 +4,7 @@
import typing
import datetime as dt
import pydantic
-from .v_2_schema_configuration_fields_item import V2SchemaConfigurationFieldsItem
+from .v2schema_configuration_fields_item import V2SchemaConfigurationFieldsItem
from .bulk_filter import BulkFilter
from ..core.pydantic_utilities import IS_PYDANTIC_V2
diff --git a/src/polytomic/types/v_2_connection_form.py b/src/polytomic/types/v2connection_form.py
similarity index 100%
rename from src/polytomic/types/v_2_connection_form.py
rename to src/polytomic/types/v2connection_form.py
diff --git a/src/polytomic/types/v_2_enricher_configuration.py b/src/polytomic/types/v2enricher_configuration.py
similarity index 100%
rename from src/polytomic/types/v_2_enricher_configuration.py
rename to src/polytomic/types/v2enricher_configuration.py
diff --git a/src/polytomic/types/v_2_enricher_mapping.py b/src/polytomic/types/v2enricher_mapping.py
similarity index 100%
rename from src/polytomic/types/v_2_enricher_mapping.py
rename to src/polytomic/types/v2enricher_mapping.py
diff --git a/src/polytomic/types/v_2_execution_log_type.py b/src/polytomic/types/v2execution_log_type.py
similarity index 100%
rename from src/polytomic/types/v_2_execution_log_type.py
rename to src/polytomic/types/v2execution_log_type.py
diff --git a/src/polytomic/types/v_2_get_enrichment_input_fields_response_envelope.py b/src/polytomic/types/v2get_enrichment_input_fields_response_envelope.py
similarity index 100%
rename from src/polytomic/types/v_2_get_enrichment_input_fields_response_envelope.py
rename to src/polytomic/types/v2get_enrichment_input_fields_response_envelope.py
diff --git a/src/polytomic/types/v_2_ordered_map_string_github_com_invopop_jsonschema_schema.py b/src/polytomic/types/v2ordered_map_string_github_com_invopop_jsonschema_schema.py
similarity index 100%
rename from src/polytomic/types/v_2_ordered_map_string_github_com_invopop_jsonschema_schema.py
rename to src/polytomic/types/v2ordered_map_string_github_com_invopop_jsonschema_schema.py
diff --git a/src/polytomic/types/v_2_sample_record.py b/src/polytomic/types/v2sample_record.py
similarity index 100%
rename from src/polytomic/types/v_2_sample_record.py
rename to src/polytomic/types/v2sample_record.py
diff --git a/src/polytomic/types/v_2_schema_configuration_fields_item.py b/src/polytomic/types/v2schema_configuration_fields_item.py
similarity index 100%
rename from src/polytomic/types/v_2_schema_configuration_fields_item.py
rename to src/polytomic/types/v2schema_configuration_fields_item.py
diff --git a/src/polytomic/types/v_4_bulk_sync_execution_logs.py b/src/polytomic/types/v4bulk_sync_execution_logs.py
similarity index 100%
rename from src/polytomic/types/v_4_bulk_sync_execution_logs.py
rename to src/polytomic/types/v4bulk_sync_execution_logs.py
diff --git a/src/polytomic/types/v_4_bulk_sync_execution_logs_envelope.py b/src/polytomic/types/v4bulk_sync_execution_logs_envelope.py
similarity index 90%
rename from src/polytomic/types/v_4_bulk_sync_execution_logs_envelope.py
rename to src/polytomic/types/v4bulk_sync_execution_logs_envelope.py
index dc1a325..0107fa9 100644
--- a/src/polytomic/types/v_4_bulk_sync_execution_logs_envelope.py
+++ b/src/polytomic/types/v4bulk_sync_execution_logs_envelope.py
@@ -2,7 +2,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .v_4_bulk_sync_execution_logs import V4BulkSyncExecutionLogs
+from .v4bulk_sync_execution_logs import V4BulkSyncExecutionLogs
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
diff --git a/src/polytomic/types/v_4_bulk_sync_schedule_api.py b/src/polytomic/types/v4bulk_sync_schedule_api.py
similarity index 100%
rename from src/polytomic/types/v_4_bulk_sync_schedule_api.py
rename to src/polytomic/types/v4bulk_sync_schedule_api.py
diff --git a/src/polytomic/types/v_4_export_sync_logs_envelope.py b/src/polytomic/types/v4export_sync_logs_envelope.py
similarity index 91%
rename from src/polytomic/types/v_4_export_sync_logs_envelope.py
rename to src/polytomic/types/v4export_sync_logs_envelope.py
index c4d35c0..3d7ca23 100644
--- a/src/polytomic/types/v_4_export_sync_logs_envelope.py
+++ b/src/polytomic/types/v4export_sync_logs_envelope.py
@@ -2,7 +2,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .v_4_export_sync_logs_response import V4ExportSyncLogsResponse
+from .v4export_sync_logs_response import V4ExportSyncLogsResponse
from .job_response import JobResponse
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
diff --git a/src/polytomic/types/v_4_export_sync_logs_response.py b/src/polytomic/types/v4export_sync_logs_response.py
similarity index 100%
rename from src/polytomic/types/v_4_export_sync_logs_response.py
rename to src/polytomic/types/v4export_sync_logs_response.py
diff --git a/src/polytomic/types/v_4_global_error_subscribers_response.py b/src/polytomic/types/v4global_error_subscribers_response.py
similarity index 100%
rename from src/polytomic/types/v_4_global_error_subscribers_response.py
rename to src/polytomic/types/v4global_error_subscribers_response.py
diff --git a/src/polytomic/types/v_4_query_results_envelope.py b/src/polytomic/types/v4query_results_envelope.py
similarity index 93%
rename from src/polytomic/types/v_4_query_results_envelope.py
rename to src/polytomic/types/v4query_results_envelope.py
index ddadfc2..24e00e7 100644
--- a/src/polytomic/types/v_4_query_results_envelope.py
+++ b/src/polytomic/types/v4query_results_envelope.py
@@ -2,7 +2,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .v_4_run_query_result import V4RunQueryResult
+from .v4run_query_result import V4RunQueryResult
from .pagination import Pagination
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
diff --git a/src/polytomic/types/v_4_run_query_envelope.py b/src/polytomic/types/v4run_query_envelope.py
similarity index 92%
rename from src/polytomic/types/v_4_run_query_envelope.py
rename to src/polytomic/types/v4run_query_envelope.py
index 9e16f20..ec8352b 100644
--- a/src/polytomic/types/v_4_run_query_envelope.py
+++ b/src/polytomic/types/v4run_query_envelope.py
@@ -2,7 +2,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .v_4_run_query_result import V4RunQueryResult
+from .v4run_query_result import V4RunQueryResult
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
diff --git a/src/polytomic/types/v_4_run_query_result.py b/src/polytomic/types/v4run_query_result.py
similarity index 100%
rename from src/polytomic/types/v_4_run_query_result.py
rename to src/polytomic/types/v4run_query_result.py
diff --git a/src/polytomic/types/v_4_target_creator.py b/src/polytomic/types/v4target_creator.py
similarity index 100%
rename from src/polytomic/types/v_4_target_creator.py
rename to src/polytomic/types/v4target_creator.py
diff --git a/src/polytomic/types/v_4_target_objects_response_envelope.py b/src/polytomic/types/v4target_objects_response_envelope.py
similarity index 93%
rename from src/polytomic/types/v_4_target_objects_response_envelope.py
rename to src/polytomic/types/v4target_objects_response_envelope.py
index 178d0f9..144febe 100644
--- a/src/polytomic/types/v_4_target_objects_response_envelope.py
+++ b/src/polytomic/types/v4target_objects_response_envelope.py
@@ -3,7 +3,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .target_object import TargetObject
-from .v_4_target_creator import V4TargetCreator
+from .v4target_creator import V4TargetCreator
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
diff --git a/src/polytomic/types/v_4_target_property_values.py b/src/polytomic/types/v4target_property_values.py
similarity index 100%
rename from src/polytomic/types/v_4_target_property_values.py
rename to src/polytomic/types/v4target_property_values.py
diff --git a/src/polytomic/types/v_4_target_property_values_envelope.py b/src/polytomic/types/v4target_property_values_envelope.py
similarity index 90%
rename from src/polytomic/types/v_4_target_property_values_envelope.py
rename to src/polytomic/types/v4target_property_values_envelope.py
index 1986743..9a97e3a 100644
--- a/src/polytomic/types/v_4_target_property_values_envelope.py
+++ b/src/polytomic/types/v4target_property_values_envelope.py
@@ -2,7 +2,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .v_4_target_property_values import V4TargetPropertyValues
+from .v4target_property_values import V4TargetPropertyValues
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
diff --git a/src/polytomic/types/v_4_user_field_request.py b/src/polytomic/types/v4user_field_request.py
similarity index 100%
rename from src/polytomic/types/v_4_user_field_request.py
rename to src/polytomic/types/v4user_field_request.py
diff --git a/src/polytomic/types/v5bulk_sync_response.py b/src/polytomic/types/v5bulk_sync_response.py
new file mode 100644
index 0000000..94358c3
--- /dev/null
+++ b/src/polytomic/types/v5bulk_sync_response.py
@@ -0,0 +1,72 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from .bulk_discover import BulkDiscover
+import pydantic
+import datetime as dt
+from .common_output_actor import CommonOutputActor
+from .bulk_sync_mode import BulkSyncMode
+from .bulk_normalize_names import BulkNormalizeNames
+from .bulk_sync_schedule import BulkSyncSchedule
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class V5BulkSyncResponse(UniversalBaseModel):
+ active: typing.Optional[bool] = None
+ automatically_add_new_fields: typing.Optional[BulkDiscover] = None
+ automatically_add_new_objects: typing.Optional[BulkDiscover] = None
+ concurrency_limit: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Per-sync concurrency limit override.
+ """
+
+ created_at: typing.Optional[dt.datetime] = None
+ created_by: typing.Optional[CommonOutputActor] = None
+ data_cutoff_timestamp: typing.Optional[dt.datetime] = None
+ destination_configuration: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(
+ default=None
+ )
+ """
+ Destination-specific bulk sync configuration. e.g. output schema name, s3 file format, etc.
+ """
+
+ destination_connection_id: typing.Optional[str] = None
+ disable_record_timestamps: typing.Optional[bool] = None
+ id: typing.Optional[str] = None
+ mode: typing.Optional[BulkSyncMode] = None
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the bulk sync
+ """
+
+ normalize_names: typing.Optional[BulkNormalizeNames] = None
+ organization_id: typing.Optional[str] = None
+ policies: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ List of permissions policies applied to the bulk sync.
+ """
+
+ resync_concurrency_limit: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Per-sync resync concurrency limit override.
+ """
+
+ schedules: typing.Optional[typing.List[BulkSyncSchedule]] = None
+ source_configuration: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
+ """
+ Source-specific bulk sync configuration. e.g. replication slot name, sync lookback, etc.
+ """
+
+ source_connection_id: typing.Optional[str] = None
+ updated_at: typing.Optional[dt.datetime] = None
+ updated_by: typing.Optional[CommonOutputActor] = 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/v5bulk_sync_response_envelope.py b/src/polytomic/types/v5bulk_sync_response_envelope.py
new file mode 100644
index 0000000..2e5d539
--- /dev/null
+++ b/src/polytomic/types/v5bulk_sync_response_envelope.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 .v5bulk_sync_response import V5BulkSyncResponse
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class V5BulkSyncResponseEnvelope(UniversalBaseModel):
+ data: typing.Optional[V5BulkSyncResponse] = 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..5b0f28a 100644
--- a/src/polytomic/users/client.py
+++ b/src/polytomic/users/client.py
@@ -53,7 +53,7 @@ def list(self, org_id: str, *, request_options: typing.Optional[RequestOptions]
token="YOUR_TOKEN",
)
client.users.list(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ org_id="org_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -133,8 +133,8 @@ def create(
token="YOUR_TOKEN",
)
client.users.create(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- email="mail@example.com",
+ org_id="org_id",
+ email="email",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -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",
+ org_id="org_id",
+ id="id",
)
"""
_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,9 +317,9 @@ def update(
token="YOUR_TOKEN",
)
client.users.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- email="mail@example.com",
+ org_id="org_id",
+ id="id",
+ email="email",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -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",
+ org_id="org_id",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -499,9 +499,8 @@ def create_api_key(
token="YOUR_TOKEN",
)
client.users.create_api_key(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- force=True,
+ org_id="org_id",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -593,7 +592,7 @@ async def list(self, org_id: str, *, request_options: typing.Optional[RequestOpt
async def main() -> None:
await client.users.list(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ org_id="org_id",
)
@@ -681,8 +680,8 @@ async def create(
async def main() -> None:
await client.users.create(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- email="mail@example.com",
+ org_id="org_id",
+ email="email",
)
@@ -746,7 +745,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 +754,10 @@ async def get(
Parameters
----------
- id : str
-
org_id : str
+ id : str
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -781,8 +780,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",
+ org_id="org_id",
+ id="id",
)
@@ -839,8 +838,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 +852,10 @@ async def update(
Parameters
----------
- id : str
-
org_id : str
+ id : str
+
email : str
role : typing.Optional[str]
@@ -883,9 +882,9 @@ async def update(
async def main() -> None:
await client.users.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- email="mail@example.com",
+ org_id="org_id",
+ id="id",
+ email="email",
)
@@ -949,7 +948,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 +957,10 @@ async def remove(
Parameters
----------
- id : str
-
org_id : str
+ id : str
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -984,8 +983,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",
+ org_id="org_id",
+ id="id",
)
@@ -1083,9 +1082,8 @@ async def create_api_key(
async def main() -> None:
await client.users.create_api_key(
- org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- force=True,
+ org_id="org_id",
+ id="id",
)
diff --git a/src/polytomic/webhooks/client.py b/src/polytomic/webhooks/client.py
index e50958d..3ea06fa 100644
--- a/src/polytomic/webhooks/client.py
+++ b/src/polytomic/webhooks/client.py
@@ -132,8 +132,8 @@ def create(
token="YOUR_TOKEN",
)
client.webhooks.create(
- endpoint="https://example.com/webhook",
- secret="secret",
+ endpoint="endpoint",
+ secret="banana",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -223,7 +223,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
token="YOUR_TOKEN",
)
client.webhooks.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -308,9 +308,9 @@ def update(
token="YOUR_TOKEN",
)
client.webhooks.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- endpoint="https://example.com/webhook",
- secret="secret",
+ id="id",
+ endpoint="endpoint",
+ secret="banana",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -393,7 +393,7 @@ def remove(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.webhooks.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -462,7 +462,7 @@ def disable(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.webhooks.disable(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -537,7 +537,7 @@ def enable(self, id: str, *, request_options: typing.Optional[RequestOptions] =
token="YOUR_TOKEN",
)
client.webhooks.enable(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -714,8 +714,8 @@ async def create(
async def main() -> None:
await client.webhooks.create(
- endpoint="https://example.com/webhook",
- secret="secret",
+ endpoint="endpoint",
+ secret="banana",
)
@@ -813,7 +813,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
async def main() -> None:
await client.webhooks.get(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -906,9 +906,9 @@ async def update(
async def main() -> None:
await client.webhooks.update(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
- endpoint="https://example.com/webhook",
- secret="secret",
+ id="id",
+ endpoint="endpoint",
+ secret="banana",
)
@@ -999,7 +999,7 @@ async def remove(self, id: str, *, request_options: typing.Optional[RequestOptio
async def main() -> None:
await client.webhooks.remove(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1076,7 +1076,7 @@ async def disable(self, id: str, *, request_options: typing.Optional[RequestOpti
async def main() -> None:
await client.webhooks.disable(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)
@@ -1159,7 +1159,7 @@ async def enable(self, id: str, *, request_options: typing.Optional[RequestOptio
async def main() -> None:
await client.webhooks.enable(
- id="248df4b7-aa70-47b8-a036-33ac447e668d",
+ id="id",
)