From 5af06a28af48390445682a40ef51f911fdc721da Mon Sep 17 00:00:00 2001 From: Luishfs Date: Fri, 12 Apr 2024 15:09:13 -0300 Subject: [PATCH] Updating intervals to 0S & adding docs link --- .../source_hubspot_native/__init__.py | 2 +- .../source_hubspot_native/resources.py | 14 ++--- source-hubspot-native/test.flow.yaml | 52 +++++++++--------- ...ests_test_snapshots__discover__stdout.json | 54 +++++++++---------- ...ve_tests_test_snapshots__spec__stdout.json | 2 +- 5 files changed, 62 insertions(+), 62 deletions(-) diff --git a/source-hubspot-native/source_hubspot_native/__init__.py b/source-hubspot-native/source_hubspot_native/__init__.py index a00c93b364..efcfff3048 100644 --- a/source-hubspot-native/source_hubspot_native/__init__.py +++ b/source-hubspot-native/source_hubspot_native/__init__.py @@ -30,7 +30,7 @@ def request_class(self): async def spec(self, log: Logger, _: request.Spec) -> ConnectorSpec: return ConnectorSpec( - documentationUrl="https://docs.estuary.dev", + documentationUrl="https://go.estuary.dev/source-hubspot-native", configSchema=EndpointConfig.model_json_schema(), oauth2=OAUTH2_SPEC, resourceConfigSchema=ResourceConfig.model_json_schema(), diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index 2a5fd776f0..1aefe58193 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -159,7 +159,7 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=0)), schema_inference=True, ) @@ -204,7 +204,7 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=0)), schema_inference=True, ) @@ -249,7 +249,7 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=0)), schema_inference=True, ) @@ -294,7 +294,7 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=1)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=0)), schema_inference=True, ) @@ -330,7 +330,7 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=0)), schema_inference=True, ) @@ -368,7 +368,7 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=0)), schema_inference=True, ) @@ -450,6 +450,6 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=1)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=0)), schema_inference=False, ) diff --git a/source-hubspot-native/test.flow.yaml b/source-hubspot-native/test.flow.yaml index 1a50b00c99..8c7c00d745 100644 --- a/source-hubspot-native/test.flow.yaml +++ b/source-hubspot-native/test.flow.yaml @@ -13,107 +13,107 @@ captures: bindings: - resource: name: companies - interval: PT30S + interval: PT0S target: acmeCo/companies - resource: name: contacts - interval: PT30S + interval: PT0S target: acmeCo/contacts - resource: name: deals - interval: PT30S + interval: PT0S target: acmeCo/deals - resource: name: engagements - interval: PT30S + interval: PT0S target: acmeCo/engagements - resource: name: contact_lists - interval: PT60S + interval: PT0S target: acmeCo/contact_lists - resource: name: contacts_lists_subscription - interval: PT60S + interval: PT0S target: acmeCo/contacts_lists_subscription - resource: name: campaigns - interval: PT60S + interval: PT0S target: acmeCo/campaigns - resource: name: subscription_changes - interval: PT60S + interval: PT0S target: acmeCo/subscription_changes - resource: name: email_events - interval: PT60S + interval: PT0S target: acmeCo/email_events - resource: name: ticket_pipelines - interval: PT60S + interval: PT0S target: acmeCo/ticket_pipelines - resource: name: deal_pipelines - interval: PT60S + interval: PT0S target: acmeCo/deal_pipelines - resource: name: engagements_calls - interval: PT30S + interval: PT0S target: acmeCo/engagements_calls - resource: name: engagements_emails - interval: PT30S + interval: PT0S target: acmeCo/engagements_emails - resource: name: engagements_meetings - interval: PT30S + interval: PT0S target: acmeCo/engagements_meetings - resource: name: engagements_notes - interval: PT30S + interval: PT0S target: acmeCo/engagements_notes - resource: name: engagements_tasks - interval: PT30S + interval: PT0S target: acmeCo/engagements_tasks - resource: name: goal_targets - interval: PT30S + interval: PT0S target: acmeCo/goal_targets - resource: name: feedback_submissions - interval: PT30S + interval: PT0S target: acmeCo/feedback_submissions - resource: name: line_items - interval: PT30S + interval: PT0S target: acmeCo/line_items - resource: name: products - interval: PT30S + interval: PT0S target: acmeCo/products - resource: name: tickets - interval: PT30S + interval: PT0S target: acmeCo/tickets - resource: name: marketing_emails - interval: PT30S + interval: PT0S target: acmeCo/marketing_emails - resource: name: email_subscriptions - interval: PT30S + interval: PT0S target: acmeCo/email_subscriptions - resource: name: marketing_forms - interval: PT30S + interval: PT0S target: acmeCo/marketing_forms - resource: name: owners - interval: PT30S + interval: PT0S target: acmeCo/owners - resource: name: workflows - interval: PT30S + interval: PT0S target: acmeCo/workflows - resource: name: properties diff --git a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__discover__stdout.json b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__discover__stdout.json index fcb2f4362c..a3ad65b8df 100644 --- a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__discover__stdout.json +++ b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__discover__stdout.json @@ -3,7 +3,7 @@ "recommendedName": "companies", "resourceConfig": { "name": "companies", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -193,7 +193,7 @@ "recommendedName": "contacts", "resourceConfig": { "name": "contacts", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -375,7 +375,7 @@ "recommendedName": "deals", "resourceConfig": { "name": "deals", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -573,7 +573,7 @@ "recommendedName": "engagements", "resourceConfig": { "name": "engagements", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -755,7 +755,7 @@ "recommendedName": "contact_lists", "resourceConfig": { "name": "contact_lists", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -827,7 +827,7 @@ "recommendedName": "contacts_lists_subscription", "resourceConfig": { "name": "contacts_lists_subscription", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -899,7 +899,7 @@ "recommendedName": "campaigns", "resourceConfig": { "name": "campaigns", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -971,7 +971,7 @@ "recommendedName": "subscription_changes", "resourceConfig": { "name": "subscription_changes", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -1043,7 +1043,7 @@ "recommendedName": "email_events", "resourceConfig": { "name": "email_events", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -1115,7 +1115,7 @@ "recommendedName": "ticket_pipelines", "resourceConfig": { "name": "ticket_pipelines", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -1302,7 +1302,7 @@ "recommendedName": "deal_pipelines", "resourceConfig": { "name": "deal_pipelines", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -1374,7 +1374,7 @@ "recommendedName": "engagements_calls", "resourceConfig": { "name": "engagements_calls", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -1588,7 +1588,7 @@ "recommendedName": "engagements_emails", "resourceConfig": { "name": "engagements_emails", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -1802,7 +1802,7 @@ "recommendedName": "engagements_meetings", "resourceConfig": { "name": "engagements_meetings", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -2016,7 +2016,7 @@ "recommendedName": "engagements_notes", "resourceConfig": { "name": "engagements_notes", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -2230,7 +2230,7 @@ "recommendedName": "engagements_tasks", "resourceConfig": { "name": "engagements_tasks", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -2444,7 +2444,7 @@ "recommendedName": "goal_targets", "resourceConfig": { "name": "goal_targets", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -2626,7 +2626,7 @@ "recommendedName": "feedback_submissions", "resourceConfig": { "name": "feedback_submissions", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -2808,7 +2808,7 @@ "recommendedName": "line_items", "resourceConfig": { "name": "line_items", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -2990,7 +2990,7 @@ "recommendedName": "products", "resourceConfig": { "name": "products", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -3172,7 +3172,7 @@ "recommendedName": "tickets", "resourceConfig": { "name": "tickets", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -3370,7 +3370,7 @@ "recommendedName": "marketing_emails", "resourceConfig": { "name": "marketing_emails", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -3448,7 +3448,7 @@ "recommendedName": "email_subscriptions", "resourceConfig": { "name": "email_subscriptions", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -3532,7 +3532,7 @@ "recommendedName": "marketing_forms", "resourceConfig": { "name": "marketing_forms", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -3604,7 +3604,7 @@ "recommendedName": "owners", "resourceConfig": { "name": "owners", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -3682,7 +3682,7 @@ "recommendedName": "workflows", "resourceConfig": { "name": "workflows", - "interval": "PT30S" + "interval": "PT0S" }, "documentSchema": { "$defs": { @@ -3832,7 +3832,7 @@ "recommendedName": "venues", "resourceConfig": { "name": "venues", - "interval": "PT60S" + "interval": "PT0S" }, "documentSchema": { "$defs": { diff --git a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json index 4621131691..be201151d2 100644 --- a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json +++ b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__spec__stdout.json @@ -106,7 +106,7 @@ "title": "ResourceConfig", "type": "object" }, - "documentationUrl": "https://docs.estuary.dev", + "documentationUrl": "https://go.estuary.dev/source-hubspot-native", "oauth2": { "provider": "hubspot", "authUrlTemplate": "https://app.hubspot.com/oauth/authorize?client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&scope=crm.lists.read%20crm.objects.companies.read%20crm.objects.contacts.read%20crm.objects.deals.read%20crm.objects.owners.read%20crm.schemas.companies.read%20crm.schemas.contacts.read%20crm.schemas.deals.read%20e-commerce%20files%20files.ui_hidden.read%20forms%20forms-uploaded-files%20sales-email-read%20communication_preferences.read%20communication_preferences.read_write%20tickets&optional_scope=automation%20content%20crm.objects.custom.read%20crm.objects.feedback_submissions.read%20crm.objects.goals.read%20crm.schemas.custom.read&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&response_type=code&state={{#urlencode}}{{{ state }}}{{/urlencode}}",