Bad request
diff --git a/docs/docs/api/v2/mgmt/sidebar.js b/docs/docs/api/v2/mgmt/sidebar.js
index 756270e22..1d0d801e1 100644
--- a/docs/docs/api/v2/mgmt/sidebar.js
+++ b/docs/docs/api/v2/mgmt/sidebar.js
@@ -1 +1 @@
-module.exports = [{"type":"doc","id":"api/v2/mgmt/management-api"},{"type":"category","label":"Customers","link":{"type":"doc","id":"api/v2/mgmt/customers"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-customers","label":"List customers","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/upsert-customer","label":"Upsert customer","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/get-customer","label":"Get customer","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/delete-customer","label":"Delete customer","className":"api-method delete"}]},{"type":"category","label":"Connections","link":{"type":"doc","id":"api/v2/mgmt/connections"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-connections","label":"List connections","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-connection","label":"Create a connection","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-provider-user-id","label":"Get logged in User ID and details","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/get-connection","label":"Get connection","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/delete-connection","label":"Delete connection","className":"api-method delete"},{"type":"doc","id":"api/v2/mgmt/get-connection-rate-limit-info","label":"Get connection rate limit info","className":"api-method get"}]},{"type":"category","label":"ConnectionSyncConfigs","link":{"type":"doc","id":"api/v2/mgmt/connection-sync-configs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-connection-sync-config","label":"Get connection sync config","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/upsert-connection-sync-config","label":"Upsert connection sync config","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-connection-sync-config","label":"Delete connection sync config","className":"api-method delete"}]},{"type":"category","label":"Destinations","link":{"type":"doc","id":"api/v2/mgmt/destinations"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-destinations","label":"List destinations","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-destination","label":"Create destination","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-destination","label":"Get destination","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/update-destination","label":"Update destination","className":"api-method put"}]},{"type":"category","label":"Magic Links","link":{"type":"doc","id":"api/v2/mgmt/magic-links"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-magic-links","label":"List magic links","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-magic-link","label":"Create magic link","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/delete-magic-link","label":"Delete magic link","className":"api-method delete"}]},{"type":"category","label":"Providers","link":{"type":"doc","id":"api/v2/mgmt/providers"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-providers","label":"List providers","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-provider","label":"Create provider","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-provider","label":"Get provider","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/update-provider","label":"Update provider","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-provider","label":"Delete provider","className":"api-method delete"}]},{"type":"category","label":"Schemas","link":{"type":"doc","id":"api/v2/mgmt/schemas"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-schemas","label":"List schemas","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/create-schema","label":"Create schema","className":"menu__list-item--deprecated api-method post"},{"type":"doc","id":"api/v2/mgmt/get-schema","label":"Get schema","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/update-schema","label":"Update schema","className":"menu__list-item--deprecated api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-schema","label":"Delete schema","className":"menu__list-item--deprecated api-method delete"}]},{"type":"category","label":"Entities","link":{"type":"doc","id":"api/v2/mgmt/entities"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-entities","label":"List entities","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/create-entity","label":"Create entity","className":"menu__list-item--deprecated api-method post"},{"type":"doc","id":"api/v2/mgmt/get-entity","label":"Get entity","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/update-entity","label":"Update entity","className":"menu__list-item--deprecated api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-entity","label":"Delete entity","className":"menu__list-item--deprecated api-method delete"}]},{"type":"category","label":"EntityMappings","link":{"type":"doc","id":"api/v2/mgmt/entity-mappings"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/list-entity-mappings","label":"List entity mappings.","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/upsert-entity-mapping","label":"Upsert entity mapping","className":"menu__list-item--deprecated api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-entity-mapping","label":"Delete entity mapping","className":"menu__list-item--deprecated api-method delete"}]},{"type":"category","label":"SchemaMappings","link":{"type":"doc","id":"api/v2/mgmt/schema-mappings"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/list-field-mappings","label":"List schema mappings","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/update-object-field-mappings","label":"Update schema mappings","className":"menu__list-item--deprecated api-method put"}]},{"type":"category","label":"SyncConfigs","link":{"type":"doc","id":"api/v2/mgmt/sync-configs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-sync-configs","label":"List Sync Configs","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-sync-config","label":"Create Sync Config","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-sync-config","label":"Get Sync Config","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/update-sync-config","label":"Update Sync Config","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-sync-config","label":"Delete Sync Config","className":"api-method delete"}]},{"type":"category","label":"SyncRuns","link":{"type":"doc","id":"api/v2/mgmt/sync-runs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/list-sync-runs","label":"List SyncRuns","className":"api-method get"}]},{"type":"category","label":"Syncs","link":{"type":"doc","id":"api/v2/mgmt/syncs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/list-syncs","label":"List Syncs","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/pause-sync","label":"Pause sync","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/resume-sync","label":"Resume sync","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/trigger-sync","label":"Trigger sync","className":"api-method post"}]},{"type":"category","label":"Webhook Events","collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/sync-complete","label":"Sync complete","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/sync-paused","label":"Sync paused","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/connection-created","label":"Customer connection created","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/connection-deleted","label":"Customer connection deleted","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/entity-entity-mapping-created","label":"Entity mapping created","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/entity-entity-mapping-updated","label":"Entity mapping updated","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/entity-entity-mapping-deleted","label":"Entity mapping deleted","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/object-field-mapping-created","label":"Object field mapping created","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/object-field-mapping-updated","label":"Object field mapping updated","className":"menu__list-item--deprecated api-method event"}]}];
\ No newline at end of file
+module.exports = [{"type":"doc","id":"api/v2/mgmt/management-api"},{"type":"category","label":"Customers","link":{"type":"doc","id":"api/v2/mgmt/customers"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-customers","label":"List customers","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/upsert-customer","label":"Upsert customer","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/get-customer","label":"Get customer","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/delete-customer","label":"Delete customer","className":"api-method delete"}]},{"type":"category","label":"Connections","link":{"type":"doc","id":"api/v2/mgmt/connections"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-connections","label":"List connections","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-connection","label":"Create a connection","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-provider-user-id","label":"Get logged in User ID and details","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/get-connection","label":"Get connection","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/delete-connection","label":"Delete connection","className":"api-method delete"},{"type":"doc","id":"api/v2/mgmt/get-connection-rate-limit-info","label":"Get connection rate limit info","className":"api-method get"}]},{"type":"category","label":"ConnectionSyncConfigs","link":{"type":"doc","id":"api/v2/mgmt/connection-sync-configs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-connection-sync-config","label":"Get connection sync config","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/upsert-connection-sync-config","label":"Upsert connection sync config","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-connection-sync-config","label":"Delete connection sync config","className":"api-method delete"}]},{"type":"category","label":"Destinations","link":{"type":"doc","id":"api/v2/mgmt/destinations"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-destinations","label":"List destinations","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-destination","label":"Create destination","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-destination","label":"Get destination","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/update-destination","label":"Update destination","className":"api-method put"}]},{"type":"category","label":"Magic Links","link":{"type":"doc","id":"api/v2/mgmt/magic-links"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-magic-links","label":"List magic links","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-magic-link","label":"Create magic link","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/delete-magic-link","label":"Delete magic link","className":"api-method delete"}]},{"type":"category","label":"Providers","link":{"type":"doc","id":"api/v2/mgmt/providers"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-providers","label":"List providers","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-provider","label":"Create provider","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-provider","label":"Get provider","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/update-provider","label":"Update provider","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-provider","label":"Delete provider","className":"api-method delete"}]},{"type":"category","label":"Schemas","link":{"type":"doc","id":"api/v2/mgmt/schemas"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-schemas","label":"List schemas","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/create-schema","label":"Create schema","className":"menu__list-item--deprecated api-method post"},{"type":"doc","id":"api/v2/mgmt/get-schema","label":"Get schema","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/update-schema","label":"Update schema","className":"menu__list-item--deprecated api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-schema","label":"Delete schema","className":"menu__list-item--deprecated api-method delete"}]},{"type":"category","label":"Entities","link":{"type":"doc","id":"api/v2/mgmt/entities"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-entities","label":"List entities","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/create-entity","label":"Create entity","className":"menu__list-item--deprecated api-method post"},{"type":"doc","id":"api/v2/mgmt/get-entity","label":"Get entity","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/update-entity","label":"Update entity","className":"menu__list-item--deprecated api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-entity","label":"Delete entity","className":"menu__list-item--deprecated api-method delete"}]},{"type":"category","label":"EntityMappings","link":{"type":"doc","id":"api/v2/mgmt/entity-mappings"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/list-entity-mappings","label":"List entity mappings.","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/upsert-entity-mapping","label":"Upsert entity mapping","className":"menu__list-item--deprecated api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-entity-mapping","label":"Delete entity mapping","className":"menu__list-item--deprecated api-method delete"}]},{"type":"category","label":"SchemaMappings","link":{"type":"doc","id":"api/v2/mgmt/schema-mappings"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/list-field-mappings","label":"List schema mappings","className":"menu__list-item--deprecated api-method get"},{"type":"doc","id":"api/v2/mgmt/update-object-field-mappings","label":"Update schema mappings","className":"menu__list-item--deprecated api-method put"}]},{"type":"category","label":"SyncConfigs","link":{"type":"doc","id":"api/v2/mgmt/sync-configs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-sync-configs","label":"List Sync Configs","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/create-sync-config","label":"Create Sync Config","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/get-sync-config","label":"Get Sync Config","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/update-sync-config","label":"Update Sync Config","className":"api-method put"},{"type":"doc","id":"api/v2/mgmt/delete-sync-config","label":"Delete Sync Config","className":"api-method delete"}]},{"type":"category","label":"SyncRuns","link":{"type":"doc","id":"api/v2/mgmt/sync-runs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-sync-runs","label":"Get SyncRuns","className":"api-method get"}]},{"type":"category","label":"Syncs","link":{"type":"doc","id":"api/v2/mgmt/syncs"},"collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/get-syncs","label":"Get Syncs","className":"api-method get"},{"type":"doc","id":"api/v2/mgmt/pause-sync","label":"Pause sync","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/resume-sync","label":"Resume sync","className":"api-method post"},{"type":"doc","id":"api/v2/mgmt/trigger-sync","label":"Trigger sync","className":"api-method post"}]},{"type":"category","label":"Webhook Events","collapsed":true,"items":[{"type":"doc","id":"api/v2/mgmt/sync-complete","label":"Sync complete","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/sync-paused","label":"Sync paused","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/connection-created","label":"Customer connection created","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/connection-deleted","label":"Customer connection deleted","className":"api-method event"},{"type":"doc","id":"api/v2/mgmt/entity-entity-mapping-created","label":"Entity mapping created","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/entity-entity-mapping-updated","label":"Entity mapping updated","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/entity-entity-mapping-deleted","label":"Entity mapping deleted","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/object-field-mapping-created","label":"Object field mapping created","className":"menu__list-item--deprecated api-method event"},{"type":"doc","id":"api/v2/mgmt/object-field-mapping-updated","label":"Object field mapping updated","className":"menu__list-item--deprecated api-method event"}]}];
\ No newline at end of file
diff --git a/docs/docs/api/v2/mgmt/sync-complete.api.mdx b/docs/docs/api/v2/mgmt/sync-complete.api.mdx
index 95b411152..11ed79c0b 100644
--- a/docs/docs/api/v2/mgmt/sync-complete.api.mdx
+++ b/docs/docs/api/v2/mgmt/sync-complete.api.mdx
@@ -5,7 +5,7 @@ description: "Notification of the completion of a sync"
sidebar_label: "Sync complete"
hide_title: true
hide_table_of_contents: true
-api: eJzdVUtv4zYQ/isEe7VsS47txKd2Ax+CPlLYWCyKbuBQ5MjWrkSqfDgxDP/3zlCKs0o2m1MvdQ4h58GZ+b6Z0ZErcNKWjS+N5gv+h/FlUUpBV2YK5nfApKmbCp4kgrmDlnzATQM22t0odCThdWsIqHxMYA/aJ/7QQKcd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v2/mgmt/management-api
custom_edit_url: null
@@ -32,7 +32,7 @@ Notification of the completion of a sync
## Request
-
Body
oneOfrelated_sync_states objectrequired
property name* related_sync_states
+
Body
Return a 200 status to indicate that the data was received successfully
diff --git a/docs/docs/api/v2/mgmt/trigger-sync.api.mdx b/docs/docs/api/v2/mgmt/trigger-sync.api.mdx
index 5ba09fea5..992c1c0f8 100644
--- a/docs/docs/api/v2/mgmt/trigger-sync.api.mdx
+++ b/docs/docs/api/v2/mgmt/trigger-sync.api.mdx
@@ -5,7 +5,7 @@ description: "Trigger sync"
sidebar_label: "Trigger sync"
hide_title: true
hide_table_of_contents: true
-api: eJztXQtv2zgS/iuEDgvcAVHiR+zY3tu7i/PouW2aXJxuWySBl5YoW60kqpSUxA3832+GlGz5kSYp9rA576RFa1HkaDgvfvOpcO8tGQvFU19GPdfqWKnyRyOh+pPIsbaslI8Sq3Np4WViXW9ZiXAy5acTGLy37mwe+/YXgVfXU7irxNdMJGlXujB0ry99JUBsqjKxZTkySkWU4i0ex4Hv6MfufE5khGOJMxYhx08yEqeefkQ6iQVoJYefhZOiQn4a4MAhTzkLpSuCDjvVNxNrq/TAy3zJQAvYKgRcT7eeJvNAhqGMWN+o9HtKPopg1BeoritiJcAIcwuVHyNw4mTguyD7ego/eDuJZZTAYjBSrVLBv1yROMqP0ZLwJHQUy30IYv5nNv+efXx87oJ1lmyltYrgE2gy0LMTUHsAg54/MgMxzxLhPt2q62Pgj9Dkyf4tKzf39XM0up5rgJMsEyS76+Kiy12WZ+dzgmJ5w7HCaqG3B3eFUlIlpXlcKT6BaX4qwuTx9bCb+ZwEojYaaauVFd9nWeSD3sx30UieLxTzpGLpGIaiJOWRI5j09LXWZ5udKXkDs2HIT1gqWZLFsVQpux2LiOHWOVg3GrF+FvNRkIltdMAdD2NtyXa92RTecNduecOqvctrLXvoDSt2y216bcdpDhtOw5qimin3g6dswMwULivdWFR5QYEzY6MJu+GgXMJuIZNZJFO89t0Ou7y/svzkV7y4sjoeDxKx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YMOSHYGqfHH7CwzfoDjGzUtDu/Y3y46hW1f7oSjEE7t2opCMwJ1/6yHB6lVnHt93KlhEuH0g3L9VUzKL0pi/53ANyUzwxVzlk22RGWe9RjMwrcaGrkxV9zAwQlpoN90GHCnXagVArsigjo3la0LsPtoTi8aRnMw8wSPXK4w9nKqs2Pl70rQhEKBR8KBlwXBQAlPiWQ8o8f9yJMoEG1p1Kxs1xrbtVKqnvAIygK+f9KKbc1Ed2axU5gS+5zQFEJXOsm/Zm4A/AT3Fv20cHMl8/4CP6yHQDdvka7g1y8igMkCzYV2WtQMCpOT4YUO9W32WWbM4RFDgle/TsI5sDLUq8p5Avjb4IFEU/tz/Jts41O1Kl2eaMewj+fvcfDXX3+9ih4JuXyWfj8C4QwPLtlsqbQs7H4Wa6m4S3fiAE47FKLtd5/nxKWlcwKWzrICYthghEvr/n4ICn9UwXSKwxBDiMwurzVG8/EbtvBq1l7oNHJ9/dVbbnEuLes0e/No/fU8T9y/sd+zNq3dtE6+lRqrjw0Yt7CC/WbFl+vRDxVYLo8LKphJBzm4vTA9dzFj5T3tfIWByD+cW66KZ6d9bI+KJjw0R6Tit1hM4c+OdQW/sA4UyPrejN9bAY9GmWnQjVysMDzDUCqXNlPH8g8YFcWtaFLSslzzzEbwT9zW2ul/x8SBovmP2XRz58EFsxJqZqMjrkHh/wLtBT0e
sidebar_class_name: "post api-method"
info_path: api/v2/mgmt/management-api
custom_edit_url: null
@@ -36,7 +36,7 @@ Trigger sync
Sync triggered
-
+
Bad request
diff --git a/docs/docs/tutorials/build-settings-page.mdx b/docs/docs/tutorials/build-settings-page.mdx
index 04cd4504b..367dfa4c5 100644
--- a/docs/docs/tutorials/build-settings-page.mdx
+++ b/docs/docs/tutorials/build-settings-page.mdx
@@ -33,7 +33,7 @@ A **SyncRun** is an execution of a Sync. Triggering a Sync creates a SyncRun and
### Show sync run stats
-You can use the [SyncRuns Management API](../api/v2/mgmt/list-sync-runs) to list the latest SyncRun for a Sync. The response will include the SyncRun's status, the number of records synced, and other metadata about the SyncRun.
+You can use the [SyncRuns Management API](../api/v2/mgmt/get-sync-runs) to get the latest SyncRun for a Sync. The response will include the SyncRun's status, the number of records synced, and other metadata about the SyncRun.
Below we use a Nextjs [Server Component](https://nextjs.org/docs/getting-started/react-essentials#server-components) to fetch the latest SyncRun for a Sync and display the status and number of records synced for an object, `contact`.
diff --git a/docs/docs/tutorials/transformations/processing-order.mdx b/docs/docs/tutorials/transformations/processing-order.mdx
deleted file mode 100644
index e8dcb3e41..000000000
--- a/docs/docs/tutorials/transformations/processing-order.mdx
+++ /dev/null
@@ -1,100 +0,0 @@
-import ThemedImage from '@theme/ThemedImage';
-
-# Processing order for objects
-
-In many transformation use cases, you may wish to process objects in a particular order, depending on your application's data model and decisions you made around referential integrity. For example, you may want to process parent objects, like Accounts, before dependent objects, like Contacts, if you have foreign keys from Contacts to Accounts.
-
-To help make this easier for you, Supaglue's [`sync.complete` webhook event](https://docs.supaglue.com/api/v2/mgmt/sync-complete) and [Management (Sync) API](https://docs.supaglue.com/api/v2/mgmt/list-syncs) provide information about whether related object Syncs have `finished` and their high-water mark.
-
-## Related Sync States
-
-The webhook and API endpoint above both provide a `related_sync_states` field that has information that looks like the following:
-
-```json
-"related_sync_states": {
- "account": {
- "object": "account",
- "object_type": "common",
- "strategy_type": "full then incremental",
- "finished": true,
- "synced_records_up_to_watermark": 1701728827881
- },
- "contact": {
- "object": "account",
- "object_type": "common",
- "strategy_type": "full then incremental",
- "finished": false,
- "synced_records_up_to_watermark": 1701728850969
- }
-}
-```
-
-In this field, we provide you with two critical pieces of information:
-
-1. Whether the sync has finished at the point of Supaglue firing the webhook or you making the API call
-2. The epoch Supaglue has finished syncing records up to (the high-water mark)
-
-Using (1), you can determine when to proceed with processing Accounts and Contacts together by waiting for both objects to be in the `finished: true` state.
-
-
-
-Using (2), you can process up to the minimum of both objects' high-water marks.
-
-## Webhook example
-
-```typescript
-
-const highWaterMarks = {
- contact: 0;
- account: 0;
-}
-
-router.post('/supaglue_webhook_endpoint', async (req: Request, res: Response) => {
- // validate webhook event
-
- // we only care about `sync.complete`; ignore the rest
- if (req.body.webhook_event_type !== 'sync.complete') {
- return res.status(200);
- }
-
- const areAccountAndContactSyncsFinished = req.body.related_sync_states.account.finished && req.body.related_sync_states.contact.finished;
- const isAccountOrContactSync = req.body.object === 'account' || req.body.object === 'contact';
-
- // ignore `sync.complete` events until both accounts and contacts finish
- if (!(isAccountOrContactSync && areAccountAndContactSyncsFinished)) {
- return res.status(200);
-
- }
-
- // only process up to the older of the two high-water marks
- const minOfBothHighWaterMark = Math.min(req.body.related_sync_states.account.synced_records_up_to_watermark, req.body.related_sync_states.contact.synced_records_up_to_watermark);
-
- // process accounts (see example below)
- // process contacts (see example below)
-
- highWaterMarks.account = minOfBothHighWaterMark;
- highWaterMarks.contact = minOfBothHighWaterMark;
-
- return res.status(200);
- });
-```
-
-### Managed Syncs example
-
-Supaglue will continuously sync Accounts and Contacts into your database using Managed Syncs at the specified frequencies. Still, you can only process and set up foreign keys for records older than or equal to the `minOfBothHighWaterMark`.
-
-To only show processed records, you could filter on `last_modified_at` or `_supaglue_last_modified_at` at query time using:
-
-- A Postgres view
-- An ORM query filter
-
-### Listing API example
-
-If you are syncing data and transforming it using Supaglue's Listing API, you can filter for records up to `minOfBothHighWaterMark` by passing the `modified_at` query parameter by converting epoch to ISO 8601.
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 244ab7ed4..ca9e44ca0 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -248,11 +248,6 @@ const sidebars = {
type: 'doc',
label: 'Pagination',
},
- {
- id: 'tutorials/transformations/processing-order',
- type: 'doc',
- label: 'Processing order for objects',
- },
{
id: 'tutorials/transformations/common-schema',
type: 'doc',
diff --git a/docs/static/img/aggregate-webhook-event.png b/docs/static/img/aggregate-webhook-event.png
deleted file mode 100644
index 1fec33851..000000000
Binary files a/docs/static/img/aggregate-webhook-event.png and /dev/null differ
diff --git a/openapi/v2/mgmt/components/schemas/objects/related_sync_states.yaml b/openapi/v2/mgmt/components/schemas/objects/related_sync_states.yaml
deleted file mode 100644
index faa36a61a..000000000
--- a/openapi/v2/mgmt/components/schemas/objects/related_sync_states.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-type: object
-properties:
- object:
- type: string
- object_type:
- type: string
- finished:
- type: boolean
- example: true
- description: |
- A point-in-time snapshot of whether the sync has finished. Use this to help you process your transformations in the correct order. E.g. you may want to wait for Accounts to finish before processing Contacts.
-
- **Note:** If syncs take longer than your specified sync frequency in your SyncConfig, you may never see finished transition be true. Please ensure that your sync frequencies are longer than sync durations.
- strategy_type:
- type: string
- synced_records_up_to_watermark:
- type: number
- example: 1701725470926
- description: |
- The high-water mark (epoch) for Supaglue syncs for this object, scoped by provider and customer. Records before this watermark have been synced.
-
- **Note:** In some situations, you may need Supaglue's high-water mark state to process your transformations.
diff --git a/openapi/v2/mgmt/components/schemas/objects/sync.yaml b/openapi/v2/mgmt/components/schemas/objects/sync.yaml
index c3a2f5b39..25aa7757f 100644
--- a/openapi/v2/mgmt/components/schemas/objects/sync.yaml
+++ b/openapi/v2/mgmt/components/schemas/objects/sync.yaml
@@ -1,7 +1,7 @@
# this is verbose because our docs generator can't handle allOf with nested oneOf correctly
oneOf:
- type: object
- title: 'Data model: Common Schema'
+ title: 'Data model: Objects'
properties:
id:
type: string
@@ -15,11 +15,13 @@ oneOf:
type: string
enum:
- common
+ - standard
+ - custom
example: standard
object:
type: string
example: contact
- description: Supaglue's object name
+ description: The Provider's object name (case sensitive)
connection_id:
type: string
example: 3217ea51-11c8-43c9-9547-6f197e02e5e4
@@ -38,7 +40,7 @@ oneOf:
- sync_config_id
- paused
- type: object
- title: 'Data model: Objects'
+ title: 'Data model: Common Schema'
properties:
id:
type: string
@@ -52,13 +54,11 @@ oneOf:
type: string
enum:
- common
- - standard
- - custom
example: standard
object:
type: string
example: contact
- description: The Provider's object name (case sensitive)
+ description: Supaglue's object name
connection_id:
type: string
example: 3217ea51-11c8-43c9-9547-6f197e02e5e4
diff --git a/openapi/v2/mgmt/components/schemas/objects/sync_with_provider_and_customer.yaml b/openapi/v2/mgmt/components/schemas/objects/sync_with_provider_and_customer.yaml
index 3eeaad1bf..cec6a7ee8 100644
--- a/openapi/v2/mgmt/components/schemas/objects/sync_with_provider_and_customer.yaml
+++ b/openapi/v2/mgmt/components/schemas/objects/sync_with_provider_and_customer.yaml
@@ -36,12 +36,6 @@ oneOf:
customer_id:
type: string
example: my-customer-1
- related_sync_states:
- type: object
- description: |
- Sync state information related to all customer syncs. This is only returned if there is a customer context, e.g. filtering by `customer_id` or in a webhook event.
- additionalProperties:
- $ref: 'related_sync_states.yaml'
required:
- id
- type
@@ -81,10 +75,6 @@ oneOf:
customer_id:
type: string
example: my-customer-1
- related_sync_states:
- type: object
- additionalProperties:
- $ref: 'related_sync_states.yaml'
required:
- id
- type
diff --git a/openapi/v2/mgmt/openapi.bundle.json b/openapi/v2/mgmt/openapi.bundle.json
index ef24e6efc..a05f990e4 100644
--- a/openapi/v2/mgmt/openapi.bundle.json
+++ b/openapi/v2/mgmt/openapi.bundle.json
@@ -2697,7 +2697,7 @@
},
"/syncs": {
"get": {
- "operationId": "listSyncs",
+ "operationId": "getSyncs",
"tags": [
"Syncs"
],
@@ -2706,7 +2706,7 @@
"x-api-key": []
}
],
- "summary": "List Syncs",
+ "summary": "Get Syncs",
"description": "Get a list of Syncs.",
"parameters": [
{
@@ -3218,7 +3218,7 @@
},
"/sync-runs": {
"get": {
- "operationId": "listSyncRuns",
+ "operationId": "getSyncRuns",
"tags": [
"SyncRuns"
],
@@ -3227,7 +3227,7 @@
"x-api-key": []
}
],
- "summary": "List SyncRuns",
+ "summary": "Get SyncRuns",
"description": "Get a list of SyncRuns.",
"parameters": [
{
@@ -3442,30 +3442,6 @@
}
},
"schemas": {
- "related_sync_states": {
- "type": "object",
- "properties": {
- "object": {
- "type": "string"
- },
- "object_type": {
- "type": "string"
- },
- "finished": {
- "type": "boolean",
- "example": true,
- "description": "A point-in-time snapshot of whether the sync has finished. Use this to help you process your transformations in the correct order. E.g. you may want to wait for Accounts to finish before processing Contacts.\n\n**Note:** If syncs take longer than your specified sync frequency in your SyncConfig, you may never see finished transition be true. Please ensure that your sync frequencies are longer than sync durations.\n"
- },
- "strategy_type": {
- "type": "string"
- },
- "synced_records_up_to_watermark": {
- "type": "number",
- "example": 1701725470926,
- "description": "The high-water mark (epoch) for Supaglue syncs for this object, scoped by provider and customer. Records before this watermark have been synced. \n\n**Note:** In some situations, you may need Supaglue's high-water mark state to process your transformations.\n"
- }
- }
- },
"pagination": {
"type": "object",
"properties": {
@@ -5321,7 +5297,7 @@
"oneOf": [
{
"type": "object",
- "title": "Data model: Common Schema",
+ "title": "Data model: Objects",
"properties": {
"id": {
"type": "string",
@@ -5337,14 +5313,16 @@
"object_type": {
"type": "string",
"enum": [
- "common"
+ "common",
+ "standard",
+ "custom"
],
"example": "standard"
},
"object": {
"type": "string",
"example": "contact",
- "description": "Supaglue's object name"
+ "description": "The Provider's object name (case sensitive)"
},
"connection_id": {
"type": "string",
@@ -5371,7 +5349,7 @@
},
{
"type": "object",
- "title": "Data model: Objects",
+ "title": "Data model: Common Schema",
"properties": {
"id": {
"type": "string",
@@ -5387,16 +5365,14 @@
"object_type": {
"type": "string",
"enum": [
- "common",
- "standard",
- "custom"
+ "common"
],
"example": "standard"
},
"object": {
"type": "string",
"example": "contact",
- "description": "The Provider's object name (case sensitive)"
+ "description": "Supaglue's object name"
},
"connection_id": {
"type": "string",
@@ -5514,13 +5490,6 @@
"customer_id": {
"type": "string",
"example": "my-customer-1"
- },
- "related_sync_states": {
- "type": "object",
- "description": "Sync state information related to all customer syncs. This is only returned if there is a customer context, e.g. filtering by `customer_id` or in a webhook event.\n",
- "additionalProperties": {
- "$ref": "#/components/schemas/related_sync_states"
- }
}
},
"required": [
@@ -5573,12 +5542,6 @@
"customer_id": {
"type": "string",
"example": "my-customer-1"
- },
- "related_sync_states": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/related_sync_states"
- }
}
},
"required": [
@@ -7242,16 +7205,9 @@
"object": {
"type": "string",
"example": "contact"
- },
- "related_sync_states": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/related_sync_states"
- }
}
},
"required": [
- "related_sync_states",
"webhook_event_type",
"run_id",
"connection_id",
@@ -8156,16 +8112,9 @@
"object": {
"type": "string",
"example": "contact"
- },
- "related_sync_states": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/related_sync_states"
- }
}
},
"required": [
- "related_sync_states",
"webhook_event_type",
"run_id",
"connection_id",
diff --git a/openapi/v2/mgmt/openapi.yaml b/openapi/v2/mgmt/openapi.yaml
index 4d4e6e3c3..2bb1f8260 100644
--- a/openapi/v2/mgmt/openapi.yaml
+++ b/openapi/v2/mgmt/openapi.yaml
@@ -115,8 +115,6 @@ components:
x-api-key:
$ref: ../../common/components/securitySchemes/x-api-key.yaml
schemas:
- related_sync_states:
- $ref: './components/schemas/objects/related_sync_states.yaml'
pagination:
$ref: ../../common/components/schemas/pagination.yaml
customer:
diff --git a/openapi/v2/mgmt/paths/sync_runs.yaml b/openapi/v2/mgmt/paths/sync_runs.yaml
index 0bbeef596..5715f2e38 100644
--- a/openapi/v2/mgmt/paths/sync_runs.yaml
+++ b/openapi/v2/mgmt/paths/sync_runs.yaml
@@ -1,10 +1,10 @@
get:
- operationId: listSyncRuns
+ operationId: getSyncRuns
tags:
- SyncRuns
security:
- x-api-key: []
- summary: List SyncRuns
+ summary: Get SyncRuns
description: >-
Get a list of SyncRuns.
parameters:
diff --git a/openapi/v2/mgmt/paths/syncs.yaml b/openapi/v2/mgmt/paths/syncs.yaml
index 5ccf560a7..ec2803946 100644
--- a/openapi/v2/mgmt/paths/syncs.yaml
+++ b/openapi/v2/mgmt/paths/syncs.yaml
@@ -1,10 +1,10 @@
get:
- operationId: listSyncs
+ operationId: getSyncs
tags:
- Syncs
security:
- x-api-key: []
- summary: List Syncs
+ summary: Get Syncs
description: >-
Get a list of Syncs.
parameters:
diff --git a/openapi/v2/mgmt/webhooks/sync.complete.yaml b/openapi/v2/mgmt/webhooks/sync.complete.yaml
index 04cb21be0..0af017d43 100644
--- a/openapi/v2/mgmt/webhooks/sync.complete.yaml
+++ b/openapi/v2/mgmt/webhooks/sync.complete.yaml
@@ -64,12 +64,7 @@ post:
object:
type: string
example: contact
- related_sync_states:
- type: object
- additionalProperties:
- $ref: '../components/schemas/objects/related_sync_states.yaml'
required:
- - related_sync_states
- webhook_event_type
- run_id
- connection_id
diff --git a/packages/core/lib/index.ts b/packages/core/lib/index.ts
index 083d9f491..d388f90f5 100644
--- a/packages/core/lib/index.ts
+++ b/packages/core/lib/index.ts
@@ -5,6 +5,5 @@ export * from './logger';
export * from './pagination';
export * from './postgres';
export * from './ratelimit';
-export * from './sync';
export * from './util';
export * from './webhook';
diff --git a/packages/core/lib/sync.ts b/packages/core/lib/sync.ts
deleted file mode 100644
index 920592223..000000000
--- a/packages/core/lib/sync.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import type { ObjectSync, ObjectSyncDTO, RelatedSyncStates } from '@supaglue/types/sync';
-
-export function generateRelatedObjectSyncStates(
- syncs: (ObjectSyncDTO | ObjectSync)[]
-): Record {
- return syncs.reduce(
- (acc, sync) => {
- let syncedRecordsUpToWatermark = 0;
-
- if (sync.strategyType === 'full then incremental' && sync.state.phase !== 'created') {
- syncedRecordsUpToWatermark = sync.state.maxLastModifiedAtMs ?? 0;
- } else {
- syncedRecordsUpToWatermark = Date.now(); // synthetic watermark for "full only" sync strategies
- }
-
- acc[sync.object] = {
- strategyType: sync.strategyType,
- object: sync.object,
- objectType: sync.objectType,
- finished: sync.state.phase === 'created' ? false : sync.state.status === 'done',
- syncedRecordsUpToWatermark,
- };
-
- return acc;
- },
- {} as Record
- );
-}
diff --git a/packages/schemas/gen/v2/mgmt.ts b/packages/schemas/gen/v2/mgmt.ts
index 4535bd36b..453ffa17c 100644
--- a/packages/schemas/gen/v2/mgmt.ts
+++ b/packages/schemas/gen/v2/mgmt.ts
@@ -340,10 +340,10 @@ export interface paths {
};
"/syncs": {
/**
- * List Syncs
+ * Get Syncs
* @description Get a list of Syncs.
*/
- get: operations["listSyncs"];
+ get: operations["getSyncs"];
};
"/syncs/_pause": {
/** Pause sync */
@@ -377,10 +377,10 @@ export interface paths {
};
"/sync-runs": {
/**
- * List SyncRuns
+ * Get SyncRuns
* @description Get a list of SyncRuns.
*/
- get: operations["listSyncRuns"];
+ get: operations["getSyncRuns"];
};
}
@@ -457,27 +457,6 @@ export interface webhooks {
export interface components {
schemas: {
- related_sync_states: {
- object?: string;
- object_type?: string;
- /**
- * @description A point-in-time snapshot of whether the sync has finished. Use this to help you process your transformations in the correct order. E.g. you may want to wait for Accounts to finish before processing Contacts.
- *
- * **Note:** If syncs take longer than your specified sync frequency in your SyncConfig, you may never see finished transition be true. Please ensure that your sync frequencies are longer than sync durations.
- *
- * @example true
- */
- finished?: boolean;
- strategy_type?: string;
- /**
- * @description The high-water mark (epoch) for Supaglue syncs for this object, scoped by provider and customer. Records before this watermark have been synced.
- *
- * **Note:** In some situations, you may need Supaglue's high-water mark state to process your transformations.
- *
- * @example 1701725470926
- */
- synced_records_up_to_watermark?: number;
- };
pagination: {
/** @example eyJpZCI6IjQyNTc5ZjczLTg1MjQtNDU3MC05YjY3LWVjYmQ3MDJjNmIxNCIsInJldmVyc2UiOmZhbHNlfQ== */
next: string | null;
@@ -1255,9 +1234,9 @@ export interface components {
* @example standard
* @enum {string}
*/
- object_type: "common";
+ object_type: "common" | "standard" | "custom";
/**
- * @description Supaglue's object name
+ * @description The Provider's object name (case sensitive)
* @example contact
*/
object: string;
@@ -1279,9 +1258,9 @@ export interface components {
* @example standard
* @enum {string}
*/
- object_type: "common" | "standard" | "custom";
+ object_type: "common";
/**
- * @description The Provider's object name (case sensitive)
+ * @description Supaglue's object name
* @example contact
*/
object: string;
@@ -1333,10 +1312,6 @@ export interface components {
provider_name: string;
/** @example my-customer-1 */
customer_id: string;
- /** @description Sync state information related to all customer syncs. This is only returned if there is a customer context, e.g. filtering by `customer_id` or in a webhook event. */
- related_sync_states?: {
- [key: string]: components["schemas"]["related_sync_states"];
- };
}, {
/** @example 971cb76d-9558-42fe-8f3b-8a531c32bd5f */
id: string;
@@ -1357,9 +1332,6 @@ export interface components {
provider_name: string;
/** @example my-customer-1 */
customer_id: string;
- related_sync_states?: {
- [key: string]: components["schemas"]["related_sync_states"];
- };
}]>;
sync_run: OneOf<[{
/** @example 20eb4da3-6b38-4ec6-a82d-ecee59a9d6d9 */
@@ -3231,10 +3203,10 @@ export interface operations {
};
};
/**
- * List Syncs
+ * Get Syncs
* @description Get a list of Syncs.
*/
- listSyncs: {
+ getSyncs: {
parameters: {
query?: {
/**
@@ -3461,10 +3433,10 @@ export interface operations {
};
};
/**
- * List SyncRuns
+ * Get SyncRuns
* @description Get a list of SyncRuns.
*/
- listSyncRuns: {
+ getSyncRuns: {
parameters: {
query?: {
/**
@@ -3580,9 +3552,6 @@ export interface operations {
object_type: "common" | "standard" | "custom";
/** @example contact */
object: string;
- related_sync_states: {
- [key: string]: components["schemas"]["related_sync_states"];
- };
}, {
/**
* @example sync.complete
diff --git a/packages/schemas/v2/mgmt.ts b/packages/schemas/v2/mgmt.ts
index e7dc63e4c..ed0846417 100644
--- a/packages/schemas/v2/mgmt.ts
+++ b/packages/schemas/v2/mgmt.ts
@@ -327,11 +327,11 @@ export type DeleteConnectionSyncConfigFailureResponse = Exclude<
>;
export type GetSyncsPathParams = never;
-export type GetSyncsQueryParams = Required['parameters']['query'];
+export type GetSyncsQueryParams = Required['parameters']['query'];
export type GetSyncsRequest = never;
export type GetSyncsResponse =
- operations['listSyncs']['responses'][keyof operations['listSyncs']['responses']]['content']['application/json'];
-export type GetSyncsSuccessfulResponse = operations['listSyncs']['responses']['200']['content']['application/json'];
+ operations['getSyncs']['responses'][keyof operations['getSyncs']['responses']]['content']['application/json'];
+export type GetSyncsSuccessfulResponse = operations['getSyncs']['responses']['200']['content']['application/json'];
export type GetSyncsFailureResponse = Exclude;
export type PauseSyncPathParams = never;
@@ -360,12 +360,12 @@ export type TriggerSyncSuccessfulResponse =
export type TriggerSyncFailureResponse = Exclude;
export type GetSyncRunsPathParams = never;
-export type GetSyncRunsQueryParams = Required['parameters']['query'];
+export type GetSyncRunsQueryParams = Required['parameters']['query'];
export type GetSyncRunsRequest = never;
export type GetSyncRunsResponse =
- operations['listSyncRuns']['responses'][keyof operations['listSyncRuns']['responses']]['content']['application/json'];
+ operations['getSyncRuns']['responses'][keyof operations['getSyncRuns']['responses']]['content']['application/json'];
export type GetSyncRunsSuccessfulResponse =
- operations['listSyncRuns']['responses']['200']['content']['application/json'];
+ operations['getSyncRuns']['responses']['200']['content']['application/json'];
export type GetSyncRunsFailureResponse = Exclude;
export type GetEntitiesPathParams = never;
diff --git a/packages/sync-workflows/activities/get_all_customer_syncs.ts b/packages/sync-workflows/activities/get_all_customer_syncs.ts
deleted file mode 100644
index 925133454..000000000
--- a/packages/sync-workflows/activities/get_all_customer_syncs.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import type { ObjectSync } from '@supaglue/types/sync';
-import type { SyncService } from '../services/sync_service';
-
-export type GetAllRelatedCustomerSyncsArgs = {
- syncId: string;
- connectionId: string;
-};
-
-export type GetAllRelatedCustomerSyncsResult = {
- syncs: ObjectSync[];
-};
-
-export function createGetAllRelatedCustomerObjectSyncs(syncService: SyncService) {
- return async function getAllRelatedCustomerObjectSyncs({
- syncId,
- connectionId,
- }: GetAllRelatedCustomerSyncsArgs): Promise {
- const syncs = await syncService.getAllRelatedCustomerObjectSyncs(syncId, connectionId);
- return {
- syncs,
- };
- };
-}
diff --git a/packages/sync-workflows/activities/index.ts b/packages/sync-workflows/activities/index.ts
index 0cde5c314..444b73c0b 100644
--- a/packages/sync-workflows/activities/index.ts
+++ b/packages/sync-workflows/activities/index.ts
@@ -13,7 +13,6 @@ import type { SystemSettingsService } from '@supaglue/core/services/system_setti
import type { ApplicationService, SyncService } from '../services';
import { createClearSyncArgsForNextRun } from './clear_sync_args_for_next_run';
import { createDoProcessSyncChanges } from './do_process_sync_changes';
-import { createGetAllRelatedCustomerObjectSyncs } from './get_all_customer_syncs';
import { createGetEntity } from './get_entity';
import { createGetSync } from './get_sync';
import { createGetSyncStrategy } from './get_sync_strategy';
@@ -54,7 +53,6 @@ export const createActivities = ({
}) => {
return {
getSync: createGetSync(syncService),
- getAllRelatedCustomerObjectSyncs: createGetAllRelatedCustomerObjectSyncs(syncService),
pauseSync: createPauseSync(syncService, connectionService, notificationService, applicationService),
doProcessSyncChanges: createDoProcessSyncChanges(syncService, systemSettingsService),
updateSyncState: createUpdateSyncState(syncService),
diff --git a/packages/sync-workflows/activities/maybe_send_sync_finish_webhook.ts b/packages/sync-workflows/activities/maybe_send_sync_finish_webhook.ts
index ee5f13d47..b302759b1 100644
--- a/packages/sync-workflows/activities/maybe_send_sync_finish_webhook.ts
+++ b/packages/sync-workflows/activities/maybe_send_sync_finish_webhook.ts
@@ -1,6 +1,5 @@
import { maybeSendWebhookPayload } from '@supaglue/core/lib/webhook';
import type { ConnectionService, ProviderService, WebhookService } from '@supaglue/core/services';
-import type { RelatedSyncStates } from '@supaglue/types/sync';
import { snakecaseKeys } from '@supaglue/utils';
import type { ApplicationService } from '../services';
@@ -10,16 +9,12 @@ export type MaybeSendSyncFinishWebhookArgs = {
status: 'SYNC_SUCCESS' | 'SYNC_ERROR';
numRecordsSynced: number;
errorMessage?: string;
-
- // Object only, not Entity
- relatedSyncStates: Record;
} & (
| {
type: 'object';
objectType: 'common' | 'standard' | 'custom';
object: string;
}
- // @deprecated
| {
type: 'entity';
entityId: string;
diff --git a/packages/sync-workflows/services/sync_service.ts b/packages/sync-workflows/services/sync_service.ts
index 8a7f6530c..231938906 100644
--- a/packages/sync-workflows/services/sync_service.ts
+++ b/packages/sync-workflows/services/sync_service.ts
@@ -40,43 +40,6 @@ export class SyncService {
this.#webhookService = webhookService;
}
- /**
- * Get all customer object syncs that are configured by the same SyncConfig.
- *
- * Inputs are {syncId, connectionId} because the lookup originates from run_object_sync
- * which doesn't have an readily-accessible handle on SyncConfig or Customer.
- */
- public async getAllRelatedCustomerObjectSyncs(syncId: string, connectionId: string): Promise {
- const sync = await this.#prisma.sync.findUnique({
- where: {
- id: syncId,
- },
- });
-
- if (!sync) {
- throw new Error('Sync not found');
- }
-
- const connection = await this.#connectionService.getSafeById(connectionId);
-
- const { syncConfigId } = sync;
- const { customerId } = connection;
-
- const models = await this.#prisma.sync.findMany({
- where: {
- type: 'object',
- syncConfigId,
- connection: {
- customer: {
- externalIdentifier: customerId,
- },
- },
- },
- });
-
- return models.map((model) => fromSyncModel(model) as ObjectSync);
- }
-
public async getSyncById(id: string): Promise {
const model = await this.#prisma.sync.findUniqueOrThrow({
where: {
diff --git a/packages/sync-workflows/workflows/run_object_sync.ts b/packages/sync-workflows/workflows/run_object_sync.ts
index 3ab556f72..92a338207 100644
--- a/packages/sync-workflows/workflows/run_object_sync.ts
+++ b/packages/sync-workflows/workflows/run_object_sync.ts
@@ -2,7 +2,6 @@ import type { ProviderCategory } from '@supaglue/types/common';
import { ActivityFailure, ApplicationFailure, proxyActivities } from '@temporalio/workflow';
// Only import the activity types
import { ForbiddenError, PaymentRequiredError, UnauthorizedError } from '@supaglue/core/errors';
-import { generateRelatedObjectSyncStates } from '@supaglue/core/lib/sync';
import type { FullThenIncrementalSync, Sync } from '@supaglue/types/sync';
import type { createActivities } from '../activities/index';
@@ -20,7 +19,6 @@ const { syncObjectRecords, syncEntityRecords } = proxyActivities {
const { sync, runId } = await getSync({ syncId });
- const { syncs } = await getAllRelatedCustomerObjectSyncs({ syncId, connectionId });
- const relatedSyncStates = sync.type === 'object' ? generateRelatedObjectSyncStates(syncs) : {}; // NOTE: not implementing for entity
const strategy = await getSyncStrategy({ sync });
@@ -128,7 +124,6 @@ export async function runObjectSync({ syncId, connectionId, category }: RunObjec
objectType: sync.objectType,
object: sync.object,
errorMessage,
- relatedSyncStates: {},
});
} else {
const {
@@ -144,7 +139,6 @@ export async function runObjectSync({ syncId, connectionId, category }: RunObjec
entityId: sync.entityId,
errorMessage,
entityName,
- relatedSyncStates: {},
});
}
@@ -171,7 +165,6 @@ export async function runObjectSync({ syncId, connectionId, category }: RunObjec
type: 'object',
objectType: sync.objectType,
object: sync.object,
- relatedSyncStates,
});
} else {
const {
@@ -186,7 +179,6 @@ export async function runObjectSync({ syncId, connectionId, category }: RunObjec
type: 'entity',
entityId: sync.entityId,
entityName,
- relatedSyncStates,
});
}
}
diff --git a/packages/types/sync.ts b/packages/types/sync.ts
index 45167f1fa..af20cf73b 100644
--- a/packages/types/sync.ts
+++ b/packages/types/sync.ts
@@ -51,13 +51,6 @@ export type FullOnlySync = FullOnlyObjectSync | FullOnlyEntitySync;
export type Sync = ObjectSync | EntitySync;
export type SnakecasedSync = SnakecasedKeys;
-export type ObjectSyncDTO = Sync & {
- type: 'object';
- // External Id
- customerId: string;
- providerName: string;
-};
-
export type SyncDTO = Sync & {
// External Id
customerId: string;
@@ -113,11 +106,3 @@ export type SyncFilter = {
// eslint-disable-next-line @typescript-eslint/ban-types
| {}
);
-
-export type RelatedSyncStates = {
- strategyType: 'full only' | 'full then incremental';
- finished: boolean;
- object: string;
- objectType: 'common' | 'standard' | 'custom';
- syncedRecordsUpToWatermark: number;
-};