From 6f08af33156f13b207750973fa28511408ff83c6 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Tue, 26 Mar 2024 16:58:38 -0300 Subject: [PATCH 01/17] [WIP] Added both V1 and V3 pagination for review --- .../acmeCo/companies.schema.yaml | 8 - .../acmeCo/contact_lists.schema.yaml | 117 ++++++++++ .../acmeCo/contacts.schema.yaml | 8 - .../acmeCo/deals.schema.yaml | 8 - .../acmeCo/engagements.schema.yaml | 8 - .../acmeCo/engagements_calls.schema.yaml | 117 ++++++++++ .../acmeCo/engagements_emails.schema.yaml | 141 ++++++++++++ .../acmeCo/engagements_meetings.schema.yaml | 117 ++++++++++ .../acmeCo/engagements_notes.schema.yaml | 117 ++++++++++ .../acmeCo/engagements_tasks.schema.yaml | 117 ++++++++++ source-hubspot-native/acmeCo/flow.yaml | 24 +++ .../acmeCo/properties.schema.yaml | 7 - .../acmeCo/tickets.schema.yaml | 8 - source-hubspot-native/poetry.lock | 70 +++--- source-hubspot-native/pyproject.toml | 2 +- .../source_hubspot_native/api.py | 201 +++++++++++++++++- .../source_hubspot_native/models.py | 174 ++++++++++++++- .../source_hubspot_native/resources.py | 83 ++++++-- source-hubspot-native/test.flow.yaml | 44 +++- 19 files changed, 1264 insertions(+), 107 deletions(-) create mode 100644 source-hubspot-native/acmeCo/contact_lists.schema.yaml create mode 100644 source-hubspot-native/acmeCo/engagements_calls.schema.yaml create mode 100644 source-hubspot-native/acmeCo/engagements_emails.schema.yaml create mode 100644 source-hubspot-native/acmeCo/engagements_meetings.schema.yaml create mode 100644 source-hubspot-native/acmeCo/engagements_notes.schema.yaml create mode 100644 source-hubspot-native/acmeCo/engagements_tasks.schema.yaml diff --git a/source-hubspot-native/acmeCo/companies.schema.yaml b/source-hubspot-native/acmeCo/companies.schema.yaml index 5ad1922690..40ad40ac5c 100644 --- a/source-hubspot-native/acmeCo/companies.schema.yaml +++ b/source-hubspot-native/acmeCo/companies.schema.yaml @@ -9,7 +9,6 @@ $defs: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata timestamp: format: date-time @@ -54,12 +53,6 @@ $defs: description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer - uuid: - default: 00000000-0000-0000-0000-000000000000 - description: UUID of the Document - format: uuid - title: Uuid - type: string required: - op title: Meta @@ -72,7 +65,6 @@ properties: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata id: title: Id diff --git a/source-hubspot-native/acmeCo/contact_lists.schema.yaml b/source-hubspot-native/acmeCo/contact_lists.schema.yaml new file mode 100644 index 0000000000..94f1932433 --- /dev/null +++ b/source-hubspot-native/acmeCo/contact_lists.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + lists: + default: [] + items: + type: integer + title: Lists + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: ContactLists +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/contacts.schema.yaml b/source-hubspot-native/acmeCo/contacts.schema.yaml index 2ff63016bf..0430919001 100644 --- a/source-hubspot-native/acmeCo/contacts.schema.yaml +++ b/source-hubspot-native/acmeCo/contacts.schema.yaml @@ -9,7 +9,6 @@ $defs: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata timestamp: format: date-time @@ -54,12 +53,6 @@ $defs: description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer - uuid: - default: 00000000-0000-0000-0000-000000000000 - description: UUID of the Document - format: uuid - title: Uuid - type: string required: - op title: Meta @@ -72,7 +65,6 @@ properties: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata id: title: Id diff --git a/source-hubspot-native/acmeCo/deals.schema.yaml b/source-hubspot-native/acmeCo/deals.schema.yaml index 76775fccc4..b49776714f 100644 --- a/source-hubspot-native/acmeCo/deals.schema.yaml +++ b/source-hubspot-native/acmeCo/deals.schema.yaml @@ -9,7 +9,6 @@ $defs: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata timestamp: format: date-time @@ -54,12 +53,6 @@ $defs: description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer - uuid: - default: 00000000-0000-0000-0000-000000000000 - description: UUID of the Document - format: uuid - title: Uuid - type: string required: - op title: Meta @@ -72,7 +65,6 @@ properties: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata id: title: Id diff --git a/source-hubspot-native/acmeCo/engagements.schema.yaml b/source-hubspot-native/acmeCo/engagements.schema.yaml index 185cc397b7..a1c6e42b3a 100644 --- a/source-hubspot-native/acmeCo/engagements.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements.schema.yaml @@ -9,7 +9,6 @@ $defs: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata timestamp: format: date-time @@ -54,12 +53,6 @@ $defs: description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer - uuid: - default: 00000000-0000-0000-0000-000000000000 - description: UUID of the Document - format: uuid - title: Uuid - type: string required: - op title: Meta @@ -72,7 +65,6 @@ properties: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata id: title: Id diff --git a/source-hubspot-native/acmeCo/engagements_calls.schema.yaml b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml new file mode 100644 index 0000000000..069f587a66 --- /dev/null +++ b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: EngagementCalls +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/engagements_emails.schema.yaml b/source-hubspot-native/acmeCo/engagements_emails.schema.yaml new file mode 100644 index 0000000000..c53f44b5f9 --- /dev/null +++ b/source-hubspot-native/acmeCo/engagements_emails.schema.yaml @@ -0,0 +1,141 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + contacts: + default: [] + items: + type: integer + title: Contacts + type: array + deals: + default: [] + items: + type: integer + title: Deals + type: array + companies: + default: [] + items: + type: integer + title: Companies + type: array + tickets: + default: [] + items: + type: integer + title: Tickets + type: array + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: EngagementEmails +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml new file mode 100644 index 0000000000..5c3f3e14d8 --- /dev/null +++ b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: EngagementMeetings +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/engagements_notes.schema.yaml b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml new file mode 100644 index 0000000000..048ac4c118 --- /dev/null +++ b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: EngagementNotes +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml new file mode 100644 index 0000000000..9af7471432 --- /dev/null +++ b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: EngagementTasks +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/flow.yaml b/source-hubspot-native/acmeCo/flow.yaml index 9aee86b58f..9791e8d61b 100644 --- a/source-hubspot-native/acmeCo/flow.yaml +++ b/source-hubspot-native/acmeCo/flow.yaml @@ -4,6 +4,10 @@ collections: schema: companies.schema.yaml key: - /id + acmeCo/contact_lists: + schema: contact_lists.schema.yaml + key: + - /id acmeCo/contacts: schema: contacts.schema.yaml key: @@ -16,6 +20,26 @@ collections: schema: engagements.schema.yaml key: - /id + acmeCo/engagements_calls: + schema: engagements_calls.schema.yaml + key: + - /id + acmeCo/engagements_emails: + schema: engagements_emails.schema.yaml + key: + - /id + acmeCo/engagements_meetings: + schema: engagements_meetings.schema.yaml + key: + - /id + acmeCo/engagements_notes: + schema: engagements_notes.schema.yaml + key: + - /id + acmeCo/engagements_tasks: + schema: engagements_tasks.schema.yaml + key: + - /id acmeCo/properties: schema: properties.schema.yaml key: diff --git a/source-hubspot-native/acmeCo/properties.schema.yaml b/source-hubspot-native/acmeCo/properties.schema.yaml index 695c6d243b..322a118173 100644 --- a/source-hubspot-native/acmeCo/properties.schema.yaml +++ b/source-hubspot-native/acmeCo/properties.schema.yaml @@ -15,12 +15,6 @@ $defs: description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer - uuid: - default: 00000000-0000-0000-0000-000000000000 - description: UUID of the Document - format: uuid - title: Uuid - type: string required: - op title: Meta @@ -33,7 +27,6 @@ properties: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata name: default: "" diff --git a/source-hubspot-native/acmeCo/tickets.schema.yaml b/source-hubspot-native/acmeCo/tickets.schema.yaml index bf599d4a39..ea5db38777 100644 --- a/source-hubspot-native/acmeCo/tickets.schema.yaml +++ b/source-hubspot-native/acmeCo/tickets.schema.yaml @@ -9,7 +9,6 @@ $defs: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata timestamp: format: date-time @@ -54,12 +53,6 @@ $defs: description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer - uuid: - default: 00000000-0000-0000-0000-000000000000 - description: UUID of the Document - format: uuid - title: Uuid - type: string required: - op title: Meta @@ -72,7 +65,6 @@ properties: default: op: u row_id: -1 - uuid: 00000000-0000-0000-0000-000000000000 description: Document metadata id: title: Id diff --git a/source-hubspot-native/poetry.lock b/source-hubspot-native/poetry.lock index 67f81d0f2e..359c93e28e 100644 --- a/source-hubspot-native/poetry.lock +++ b/source-hubspot-native/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "aiodns" @@ -488,38 +488,38 @@ files = [ [[package]] name = "mypy" -version = "1.8.0" +version = "1.9.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485a8942f671120f76afffff70f259e1cd0f0cfe08f81c05d8816d958d4577d3"}, - {file = "mypy-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:df9824ac11deaf007443e7ed2a4a26bebff98d2bc43c6da21b2b64185da011c4"}, - {file = "mypy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2afecd6354bbfb6e0160f4e4ad9ba6e4e003b767dd80d85516e71f2e955ab50d"}, - {file = "mypy-1.8.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8963b83d53ee733a6e4196954502b33567ad07dfd74851f32be18eb932fb1cb9"}, - {file = "mypy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:e46f44b54ebddbeedbd3d5b289a893219065ef805d95094d16a0af6630f5d410"}, - {file = "mypy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:855fe27b80375e5c5878492f0729540db47b186509c98dae341254c8f45f42ae"}, - {file = "mypy-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c886c6cce2d070bd7df4ec4a05a13ee20c0aa60cb587e8d1265b6c03cf91da3"}, - {file = "mypy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d19c413b3c07cbecf1f991e2221746b0d2a9410b59cb3f4fb9557f0365a1a817"}, - {file = "mypy-1.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9261ed810972061388918c83c3f5cd46079d875026ba97380f3e3978a72f503d"}, - {file = "mypy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:51720c776d148bad2372ca21ca29256ed483aa9a4cdefefcef49006dff2a6835"}, - {file = "mypy-1.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:52825b01f5c4c1c4eb0db253ec09c7aa17e1a7304d247c48b6f3599ef40db8bd"}, - {file = "mypy-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55"}, - {file = "mypy-1.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afe3fe972c645b4632c563d3f3eff1cdca2fa058f730df2b93a35e3b0c538218"}, - {file = "mypy-1.8.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:42c6680d256ab35637ef88891c6bd02514ccb7e1122133ac96055ff458f93fc3"}, - {file = "mypy-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:720a5ca70e136b675af3af63db533c1c8c9181314d207568bbe79051f122669e"}, - {file = "mypy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:028cf9f2cae89e202d7b6593cd98db6759379f17a319b5faf4f9978d7084cdc6"}, - {file = "mypy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4e6d97288757e1ddba10dd9549ac27982e3e74a49d8d0179fc14d4365c7add66"}, - {file = "mypy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f1478736fcebb90f97e40aff11a5f253af890c845ee0c850fe80aa060a267c6"}, - {file = "mypy-1.8.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42419861b43e6962a649068a61f4a4839205a3ef525b858377a960b9e2de6e0d"}, - {file = "mypy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:2b5b6c721bd4aabaadead3a5e6fa85c11c6c795e0c81a7215776ef8afc66de02"}, - {file = "mypy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c1538c38584029352878a0466f03a8ee7547d7bd9f641f57a0f3017a7c905b8"}, - {file = "mypy-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ef4be7baf08a203170f29e89d79064463b7fc7a0908b9d0d5114e8009c3a259"}, - {file = "mypy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178def594014aa6c35a8ff411cf37d682f428b3b5617ca79029d8ae72f5402b"}, - {file = "mypy-1.8.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ab3c84fa13c04aeeeabb2a7f67a25ef5d77ac9d6486ff33ded762ef353aa5592"}, - {file = "mypy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:99b00bc72855812a60d253420d8a2eae839b0afa4938f09f4d2aa9bb4654263a"}, - {file = "mypy-1.8.0-py3-none-any.whl", hash = "sha256:538fd81bb5e430cc1381a443971c0475582ff9f434c16cd46d2c66763ce85d9d"}, - {file = "mypy-1.8.0.tar.gz", hash = "sha256:6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07"}, + {file = "mypy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f8a67616990062232ee4c3952f41c779afac41405806042a8126fe96e098419f"}, + {file = "mypy-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d357423fa57a489e8c47b7c85dfb96698caba13d66e086b412298a1a0ea3b0ed"}, + {file = "mypy-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49c87c15aed320de9b438ae7b00c1ac91cd393c1b854c2ce538e2a72d55df150"}, + {file = "mypy-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:48533cdd345c3c2e5ef48ba3b0d3880b257b423e7995dada04248725c6f77374"}, + {file = "mypy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:4d3dbd346cfec7cb98e6cbb6e0f3c23618af826316188d587d1c1bc34f0ede03"}, + {file = "mypy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:653265f9a2784db65bfca694d1edd23093ce49740b2244cde583aeb134c008f3"}, + {file = "mypy-1.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3a3c007ff3ee90f69cf0a15cbcdf0995749569b86b6d2f327af01fd1b8aee9dc"}, + {file = "mypy-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2418488264eb41f69cc64a69a745fad4a8f86649af4b1041a4c64ee61fc61129"}, + {file = "mypy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:68edad3dc7d70f2f17ae4c6c1b9471a56138ca22722487eebacfd1eb5321d612"}, + {file = "mypy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:85ca5fcc24f0b4aeedc1d02f93707bccc04733f21d41c88334c5482219b1ccb3"}, + {file = "mypy-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd"}, + {file = "mypy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6"}, + {file = "mypy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185"}, + {file = "mypy-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913"}, + {file = "mypy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6"}, + {file = "mypy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e54396d70be04b34f31d2edf3362c1edd023246c82f1730bbf8768c28db5361b"}, + {file = "mypy-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5e6061f44f2313b94f920e91b204ec600982961e07a17e0f6cd83371cb23f5c2"}, + {file = "mypy-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a10926e5473c5fc3da8abb04119a1f5811a236dc3a38d92015cb1e6ba4cb9e"}, + {file = "mypy-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b685154e22e4e9199fc95f298661deea28aaede5ae16ccc8cbb1045e716b3e04"}, + {file = "mypy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:5d741d3fc7c4da608764073089e5f58ef6352bedc223ff58f2f038c2c4698a89"}, + {file = "mypy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:587ce887f75dd9700252a3abbc9c97bbe165a4a630597845c61279cf32dfbf02"}, + {file = "mypy-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f88566144752999351725ac623471661c9d1cd8caa0134ff98cceeea181789f4"}, + {file = "mypy-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61758fabd58ce4b0720ae1e2fea5cfd4431591d6d590b197775329264f86311d"}, + {file = "mypy-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e49499be624dead83927e70c756970a0bc8240e9f769389cdf5714b0784ca6bf"}, + {file = "mypy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:571741dc4194b4f82d344b15e8837e8c5fcc462d66d076748142327626a1b6e9"}, + {file = "mypy-1.9.0-py3-none-any.whl", hash = "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e"}, + {file = "mypy-1.9.0.tar.gz", hash = "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974"}, ] [package.dependencies] @@ -604,13 +604,13 @@ files = [ [[package]] name = "packaging" -version = "23.2" +version = "24.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, + {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, + {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, ] [[package]] @@ -707,13 +707,13 @@ files = [ [[package]] name = "pydantic" -version = "2.6.3" +version = "2.6.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.6.3-py3-none-any.whl", hash = "sha256:72c6034df47f46ccdf81869fddb81aade68056003900a8724a4f160700016a2a"}, - {file = "pydantic-2.6.3.tar.gz", hash = "sha256:e07805c4c7f5c6826e33a1d4c9d47950d7eaf34868e2690f8594d2e30241f11f"}, + {file = "pydantic-2.6.4-py3-none-any.whl", hash = "sha256:cc46fce86607580867bdc3361ad462bab9c222ef042d3da86f2fb333e1d916c5"}, + {file = "pydantic-2.6.4.tar.gz", hash = "sha256:b1704e0847db01817624a6b86766967f552dd9dbf3afba4004409f908dcc84e6"}, ] [package.dependencies] diff --git a/source-hubspot-native/pyproject.toml b/source-hubspot-native/pyproject.toml index 7f6d43873e..7c8b4b7f4d 100644 --- a/source-hubspot-native/pyproject.toml +++ b/source-hubspot-native/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "source_hubspot_native" -version = "0.1.0" +version = "0.1.1" description = "" authors = ["Johnny Graettinger "] diff --git a/source-hubspot-native/source_hubspot_native/api.py b/source-hubspot-native/source_hubspot_native/api.py index 214767b4c4..e32b183105 100644 --- a/source-hubspot-native/source_hubspot_native/api.py +++ b/source-hubspot-native/source_hubspot_native/api.py @@ -20,6 +20,12 @@ OldRecentDeals, OldRecentEngagements, OldRecentTicket, + OldRecentContactLists, + OldRecentEngagementsCalls, + OldRecentEngagementsEmails, + OldRecentEngagementsMeetings, + OldRecentEngagementsNotes, + OldRecentEngagementsTasks, PageResult, Properties, ) @@ -33,7 +39,7 @@ async def fetch_properties( if p := getattr(cls, "CACHED_PROPERTIES", None): return p - url = f"{HUB}/crm/v3/properties/{cls.NAME}" + url = f"{HUB}/crm/v3/properties/{cls.PROPERTY_SEARCH_NAME}" cls.CACHED_PROPERTIES = Properties.model_validate_json(await http.request(log, url)) for p in cls.CACHED_PROPERTIES.results: p.hubspotObject = cls.NAME @@ -51,7 +57,7 @@ async def fetch_page( cutoff: datetime, ) -> AsyncGenerator[CRMObject | str, None]: - url = f"{HUB}/crm/v3/objects/{cls.NAME}" + url = f"{HUB}/crm/v3/objects/{cls.PROPERTY_SEARCH_NAME}" properties = await fetch_properties(log, cls, http) property_names = ",".join(p.name for p in properties.results if not p.calculated) @@ -179,6 +185,7 @@ async def fetch_changes( while True: iter, next_page = await fetch_recent(log, http, log_cursor, next_page) + log.debug(f"NEXT PAGE IS {next_page}") for ts, id in iter: if ts > log_cursor: recent.append((ts, id)) @@ -186,6 +193,7 @@ async def fetch_changes( next_page = None if not next_page: + log.debug(f"NEXT PAGE BROKE") break recent.sort() # Oldest updates first. @@ -279,6 +287,195 @@ async def fetch_recent_tickets( ) return ((_ms_to_dt(r.timestamp), str(r.objectId)) for r in result), None +async def fetch_recent_contacts_lists( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + log.debug("FUNCTION STARTED") + url = f"{HUB}/contacts/v1/lists" + params = {"count": 100, "offset": page} if page else {"count": 250} + + result = OldRecentContactLists.model_validate_json( + await http.request(log, url, params=params) + ) + #log.debug(f"RESULT IS {result}") + log.debug(f"HAS MORE IS {result.hasMore}") + return ( + (_ms_to_dt(r.updatedAt), str(r.listId)) + for r in result.lists + ), result.hasMore and result.offset + +#same as the ticket_pipeline +async def fetch_recent_deal_pipelines( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm-pipelines/v1/pipelines/deals" + + result = OldRecentDealPipelines.model_validate_json( + await http.request(log, url, params=None) + ) + + return ( + (_ms_to_dt(r.updatedAt), str(r.pipelineId)) + for r in result.results + ), None and None + +async def fetch_recent_ticket_pipelines( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm-pipelines/v1/pipelines/tickets" + + result = OldRecentTicketPipelines.model_validate_json( + await http.request(log, url, params=None) + ) + print(result) + + return ( + (_ms_to_dt(r.updatedAt), str(r.pipelineId)) + for r in result.results + ), None and None + +async def fetch_recent_email_events( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/email/public/v1/events" + params = {"limit": 100, "offset": page} if page else {"limit": 1} + + result = OldRecentEmailEvents.model_json_schema( + await http.request(log, url, params=params) + ) + + return ( + (_ms_to_dt(r.created), str(r.id)) + for r in result.events + ), result.hasMore and result.offset + +async def fetch_recent_marketing_emails( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/marketing-emails/v1/emails/with-statistics" + params = {"limit": 300} + + result = OldRecentMarketingEmails.model_json_schema( + await http.request(log, url, params=params) + ) + + return ( + (_ms_to_dt(r.updated), str(r.id)) + for r in result.objects + ), None and None # This endpoint does not have pagination. + +async def fetch_recent_subscription_changes( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/email/public/v1/subscriptions/timeline" + + result = OldRecentSubscriptionChanges.model_json_schema( + await http.request(log, url, params=params) + ) + + return ( + (_ms_to_dt(r.timestamp), str(r.portalId)) + for r in result.timelines + ), result.hasMore and result.offset def _ms_to_dt(ms: int) -> datetime: return datetime.fromtimestamp(ms / 1000.0, tz=UTC) + + +## V3 + +async def fetch_engagements_calls( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/calls" + + result = OldRecentEngagementsCalls.model_validate_json( + await http.request(log, url, params=None) + ) + log.debug(result) + return ( + (r.createdAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_engagements_emails( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/emails" + + result = OldRecentEngagementsEmails.model_validate_json( + await http.request(log, url, params=None) + ) + log.debug(f"{result}") + return ( + (r.createdAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_engagements_meetings( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/meetings" + + result = OldRecentEngagementsMeetings.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.createdAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_engagements_tasks( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/tasks" + params = {"properties": "paging"} + + result = OldRecentEngagementsTasks.model_validate_json( + await http.request(log, url, params=params) + ) + + test2 = await http.request(log, url, params=params) + log.info(f"{test2}") + return ( + (r.createdAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_engagements_notes( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/notes" + + result = OldRecentEngagementsNotes.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.createdAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_engagements_calls( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/calls" + + result = OldRecentEngagementsCalls.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.createdAt, str(r.id)) + for r in result.results + ), None and None diff --git a/source-hubspot-native/source_hubspot_native/models.py b/source-hubspot-native/source_hubspot_native/models.py index 6791833516..35e17dad27 100644 --- a/source-hubspot-native/source_hubspot_native/models.py +++ b/source-hubspot-native/source_hubspot_native/models.py @@ -94,7 +94,21 @@ class Names(StrEnum): line_items = auto() properties = auto() tickets = auto() - + contact_lists = auto() + engagements_calls = auto() + engagements_emails = auto() + engagements_meetings = auto() + engagements_notes = auto() + engagements_tasks = auto() + +class PropertyNames(StrEnum): + emails = auto() + companies = auto() + calls = auto() + notes = auto() + tasks = auto() + meetings = auto() + contacts = auto() # A Property is a HubSpot or HubSpot-user defined attribute that's # attached to a HubSpot CRM object. @@ -113,6 +127,7 @@ class Properties(BaseDocument, extra="forbid"): class BaseCRMObject(BaseDocument, extra="forbid"): # Class-scoped metadata attached to concrete subclasses. NAME: ClassVar[str] + PROPERTY_SEARCH_NAME: ClassVar[str] ASSOCIATED_ENTITIES: ClassVar[list[str]] CACHED_PROPERTIES: ClassVar[Properties] @@ -206,7 +221,51 @@ class Ticket(BaseCRMObject): contacts: list[int] = [] engagements: list[int] = [] line_items: list[int] = [] + +class ContactLists(BaseCRMObject): + NAME = Names.contact_lists + ASSOCIATED_ENTITIES = [] + + lists: list[int] = [] + +class EngagementEmails(BaseCRMObject): + NAME = Names.engagements_emails + PROPERTY_SEARCH_NAME = PropertyNames.emails + ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + + contacts: list[int] = [] + deals: list[int] = [] + companies: list[int] = [] + tickets: list[int] = [] + results: list[int] = [] + +class EngagementCalls(BaseCRMObject): + NAME = Names.engagements_calls + PROPERTY_SEARCH_NAME = PropertyNames.calls + ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + results: list[int] = [] + +class EngagementMeetings(BaseCRMObject): + NAME = Names.engagements_meetings + PROPERTY_SEARCH_NAME = PropertyNames.meetings + ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + + results: list[int] = [] + +class EngagementNotes(BaseCRMObject): + NAME = Names.engagements_notes + PROPERTY_SEARCH_NAME = PropertyNames.notes + ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + + results: list[int] = [] + +class EngagementTasks(BaseCRMObject): + NAME = Names.engagements_tasks + PROPERTY_SEARCH_NAME = PropertyNames.tasks + ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + + results: list[int] = [] # An Association, as returned by the v4 associations API. class Association(BaseModel, extra="forbid"): @@ -351,3 +410,116 @@ class Engagement(BaseModel): class OldRecentTicket(BaseModel): timestamp: int objectId: int + +class OldRecentCampaigns(BaseModel): + + class Item(BaseModel): + + id: int + lastUpdatedTime: int + + campaigns : list[Item] + hasMore: bool + offset: str + +class OldRecentContactLists(BaseModel): + + class Item(BaseModel): + listId: int + updatedAt: int + + lists: list[Item] + hasMore: bool = Field(alias="has-more") + offset: int + +class OldRecentDealPipelines(BaseModel): + + class Item(BaseModel): + pipelineId: int + updatedAt: int + + results: list[Item] + +class OldRecentTicketPipelines(BaseModel): + + class Item(BaseModel): + pipelineId: int + updatedAt: int + + results: list[Item] + +class OldRecentEmailEvents(BaseModel): + + class Item(BaseModel): + id: int + appId: int + created: int + + + results: list[Item] + hasMore: bool + offset: str + +class OldRecentMarketingEmails(BaseModel): + + class Item(BaseModel): + id: int + updated: int + + objects: list[Item] + offset: int + +class OldRecentSubscriptionChanges(BaseModel): + + class Item(BaseModel): + timestamp: int + portalId: int + + timeline: list[Item] + hasMore: bool + offset: str + + +################################# v3 + + + + +class OldRecentEngagementsEmails(BaseModel): + class Item(BaseModel): + id: int + createdAt: datetime + + results: list[Item] + +class OldRecentEngagementsTasks(BaseModel): + + class Item(BaseModel): + id: int + createdAt: datetime + + results: list[Item] + +class OldRecentEngagementsNotes(BaseModel): + + class Item(BaseModel): + id: int + createdAt: datetime + + results: list[Item] + +class OldRecentEngagementsCalls(BaseModel): + + class Item(BaseModel): + id: int + createdAt: datetime + + results: list[Item] + +class OldRecentEngagementsMeetings(BaseModel): + + class Item(BaseModel): + id: int + createdAt: datetime + + results: list[Item] \ No newline at end of file diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index 8930a79505..4623cd4de2 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -5,7 +5,8 @@ from estuary_cdk.flow import CaptureBinding from estuary_cdk.capture import Task -from estuary_cdk.capture.common import Resource, LogCursor, PageCursor, open_binding +#from estuary_cdk.capture.common import Resource, LogCursor, PageCursor, open_binding +from estuary_cdk.capture import common from estuary_cdk.http import HTTPSession, HTTPMixin, TokenSource from .models import ( @@ -22,6 +23,12 @@ ResourceConfig, ResourceState, Ticket, + ContactLists, + EngagementCalls, + EngagementEmails, + EngagementMeetings, + EngagementNotes, + EngagementTasks, ) from .api import ( FetchRecentFn, @@ -33,26 +40,38 @@ fetch_recent_deals, fetch_recent_engagements, fetch_recent_tickets, + fetch_recent_contacts_lists, + fetch_engagements_calls, + fetch_engagements_emails, + fetch_engagements_notes, + fetch_engagements_tasks, + fetch_engagements_meetings, ) async def all_resources( log: Logger, http: HTTPMixin, config: EndpointConfig -) -> list[Resource]: +) -> list[common.Resource]: http.token_source = TokenSource(oauth_spec=OAUTH2_SPEC, credentials=config.credentials) return [ - crm_object(Company, http, fetch_recent_companies), - crm_object(Contact, http, fetch_recent_contacts), - crm_object(Deal, http, fetch_recent_deals), - crm_object(Engagement, http, fetch_recent_engagements), - crm_object(Ticket, http, fetch_recent_tickets), + crm_object_no_page(Company, http, fetch_recent_companies), + crm_object_no_page(Contact, http, fetch_recent_contacts), + crm_object_no_page(Deal, http, fetch_recent_deals), + crm_object_no_page(Engagement, http, fetch_recent_engagements), + crm_object_no_page(Ticket, http, fetch_recent_tickets), + crm_object_no_changes(EngagementCalls, http, fetch_engagements_calls), + crm_object_no_changes(EngagementEmails, http, fetch_engagements_emails), + crm_object_no_changes(EngagementMeetings, http, fetch_engagements_meetings), + crm_object_no_changes(EngagementNotes, http, fetch_engagements_notes), + crm_object_no_changes(EngagementTasks, http, fetch_engagements_tasks), + crm_object_no_page(ContactLists, http, fetch_recent_contacts_lists), properties(http), ] -def crm_object( +def crm_object_no_changes( cls: type[CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn -) -> Resource: +) -> common.Resource: def open( binding: CaptureBinding[ResourceConfig], @@ -60,18 +79,50 @@ def open( state: ResourceState, task: Task, ): - open_binding( + common.open_binding( binding, binding_index, state, task, - fetch_changes=functools.partial(fetch_changes, cls, fetch_recent, http), fetch_page=functools.partial(fetch_page, cls, http), ) started_at = datetime.now(tz=UTC) - return Resource( + return common.Resource( + name=cls.NAME, + key=["/id"], + model=cls, + open=open, + initial_state=ResourceState( + inc=ResourceState.Incremental(cursor=started_at), + backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), + ), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=5)), + schema_inference=True, + ) + +def crm_object_no_page( + cls: type[CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn +) -> common.Resource: + + def open( + binding: CaptureBinding[ResourceConfig], + binding_index: int, + state: ResourceState, + task: Task, + ): + common.open_binding( + binding, + binding_index, + state, + task, + fetch_changes=functools.partial(fetch_changes, cls, fetch_recent, http), + ) + + started_at = datetime.now(tz=UTC) + + return common.Resource( name=cls.NAME, key=["/id"], model=cls, @@ -80,12 +131,12 @@ def open( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=5)), schema_inference=True, ) -def properties(http: HTTPSession) -> Resource: +def properties(http: HTTPSession) -> common.Resource: async def snapshot(log: Logger) -> AsyncGenerator[Property, None]: classes: list[type[BaseCRMObject]] = [ @@ -106,7 +157,7 @@ def open( state: ResourceState, task: Task, ): - open_binding( + common.open_binding( binding, binding_index, state, @@ -115,7 +166,7 @@ def open( tombstone=Property(_meta=Property.Meta(op="d")), ) - return Resource( + return common.Resource( name=Names.properties, key=["/_meta/row_id"], model=Property, diff --git a/source-hubspot-native/test.flow.yaml b/source-hubspot-native/test.flow.yaml index f2ef27f9e2..14238c5da5 100644 --- a/source-hubspot-native/test.flow.yaml +++ b/source-hubspot-native/test.flow.yaml @@ -7,30 +7,64 @@ captures: local: command: - python - # - "-m" - # - "debugpy" - # - "--listen" - # - "0.0.0.0:5678" - # - "--wait-for-client" - "-m" - source_hubspot_native config: config.yaml bindings: - resource: name: companies + interval: PT300S target: acmeCo/companies + disable: true - resource: name: contacts + interval: PT300S target: acmeCo/contacts + disable: true - resource: name: deals + interval: PT300S target: acmeCo/deals + disable: true - resource: name: engagements + interval: PT300S target: acmeCo/engagements + disable: true - resource: name: tickets + interval: PT300S target: acmeCo/tickets + disable: true + - resource: + name: engagements_calls + interval: PT10S + target: acmeCo/engagements_calls + disable: true + - resource: + name: engagements_emails + interval: PT10S + target: acmeCo/engagements_emails + - resource: + name: engagements_meetings + interval: PT10S + target: acmeCo/engagements_meetings + disable: true + - resource: + name: engagements_notes + interval: PT10S + target: acmeCo/engagements_notes + disable: true + - resource: + name: engagements_tasks + interval: PT10S + target: acmeCo/engagements_tasks + disable: true + - resource: + name: contact_lists + interval: PT10S + target: acmeCo/contact_lists + disable: true - resource: name: properties interval: P1D From 5782cef1330d8d9789787715804eabc1ff997be8 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Fri, 29 Mar 2024 19:52:57 -0300 Subject: [PATCH 02/17] adding all streams & updating snapshots --- .../acmeCo/campaigns.schema.yaml | 44 + .../acmeCo/contact_lists.schema.yaml | 81 +- .../contacts_lists_subscription.schema.yaml | 44 + .../acmeCo/deal_pipelines.schema.yaml | 44 + .../acmeCo/email_events.schema.yaml | 44 + .../acmeCo/email_subscriptions.schema.yaml | 44 + .../acmeCo/engagements_calls.schema.yaml | 24 + .../acmeCo/engagements_meetings.schema.yaml | 24 + .../acmeCo/engagements_notes.schema.yaml | 24 + .../acmeCo/engagements_tasks.schema.yaml | 24 + .../acmeCo/feedback_submissions.schema.yaml | 117 + source-hubspot-native/acmeCo/flow.yaml | 62 +- .../acmeCo/goal_targets.schema.yaml | 117 + .../acmeCo/line_items.schema.yaml | 117 + .../acmeCo/marketing_emails.schema.yaml | 49 + .../acmeCo/marketing_forms.schema.yaml | 44 + .../acmeCo/owners.schema.yaml | 49 + .../acmeCo/products.schema.yaml | 117 + .../acmeCo/subscription_changes.schema.yaml | 44 + .../acmeCo/ticket_pipelines.schema.yaml | 121 + .../acmeCo/workflows.schema.yaml | 49 + source-hubspot-native/poetry.lock | 13 +- source-hubspot-native/pyproject.toml | 1 + .../source_hubspot_native/api.py | 468 +- .../source_hubspot_native/models.py | 359 +- .../source_hubspot_native/resources.py | 237 +- source-hubspot-native/test.flow.yaml | 103 +- ...tests_test_snapshots__capture__stdout.json | 5574 ----------------- ...ests_test_snapshots__discover__stdout.json | 3028 ++++++++- ...ve_tests_test_snapshots__spec__stdout.json | 2 +- 30 files changed, 5139 insertions(+), 5929 deletions(-) create mode 100644 source-hubspot-native/acmeCo/campaigns.schema.yaml create mode 100644 source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml create mode 100644 source-hubspot-native/acmeCo/deal_pipelines.schema.yaml create mode 100644 source-hubspot-native/acmeCo/email_events.schema.yaml create mode 100644 source-hubspot-native/acmeCo/email_subscriptions.schema.yaml create mode 100644 source-hubspot-native/acmeCo/feedback_submissions.schema.yaml create mode 100644 source-hubspot-native/acmeCo/goal_targets.schema.yaml create mode 100644 source-hubspot-native/acmeCo/line_items.schema.yaml create mode 100644 source-hubspot-native/acmeCo/marketing_emails.schema.yaml create mode 100644 source-hubspot-native/acmeCo/marketing_forms.schema.yaml create mode 100644 source-hubspot-native/acmeCo/owners.schema.yaml create mode 100644 source-hubspot-native/acmeCo/products.schema.yaml create mode 100644 source-hubspot-native/acmeCo/subscription_changes.schema.yaml create mode 100644 source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml create mode 100644 source-hubspot-native/acmeCo/workflows.schema.yaml delete mode 100644 source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json diff --git a/source-hubspot-native/acmeCo/campaigns.schema.yaml b/source-hubspot-native/acmeCo/campaigns.schema.yaml new file mode 100644 index 0000000000..f45d66374b --- /dev/null +++ b/source-hubspot-native/acmeCo/campaigns.schema.yaml @@ -0,0 +1,44 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: string + timeline: + default: [] + items: + type: integer + title: Timeline + type: array +required: + - id +title: Campaigns +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/contact_lists.schema.yaml b/source-hubspot-native/acmeCo/contact_lists.schema.yaml index 94f1932433..e020b66736 100644 --- a/source-hubspot-native/acmeCo/contact_lists.schema.yaml +++ b/source-hubspot-native/acmeCo/contact_lists.schema.yaml @@ -1,43 +1,5 @@ --- $defs: - History: - additionalProperties: false - properties: - _meta: - allOf: - - $ref: "#/$defs/Meta" - default: - op: u - row_id: -1 - description: Document metadata - timestamp: - format: date-time - title: Timestamp - type: string - value: - title: Value - type: string - sourceType: - title: Sourcetype - type: string - sourceId: - anyOf: - - type: string - - type: "null" - default: ~ - title: Sourceid - updatedByUserId: - anyOf: - - type: integer - - type: "null" - default: ~ - title: Updatedbyuserid - required: - - timestamp - - value - - sourceType - title: History - type: object Meta: properties: op: @@ -57,7 +19,7 @@ $defs: - op title: Meta type: object -additionalProperties: false +additionalProperties: true properties: _meta: allOf: @@ -66,40 +28,9 @@ properties: op: u row_id: -1 description: Document metadata - id: - title: Id - type: integer - createdAt: - format: date-time - title: Createdat - type: string - updatedAt: - format: date-time - title: Updatedat + listId: + title: Listid type: string - archived: - title: Archived - type: boolean - properties: - type: object - additionalProperties: - anyOf: - - type: string - - type: "null" - title: Properties - propertiesWithHistory: - additionalProperties: - items: - $ref: "#/$defs/History" - type: array - default: {} - title: Propertieswithhistory - type: object - associations: - additionalProperties: false - default: {} - title: Associations - type: object lists: default: [] items: @@ -107,11 +38,7 @@ properties: title: Lists type: array required: - - id - - createdAt - - updatedAt - - archived - - properties + - listId title: ContactLists type: object x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml b/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml new file mode 100644 index 0000000000..852bee016a --- /dev/null +++ b/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml @@ -0,0 +1,44 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + vid: + title: Vid + type: string + contacts: + default: [] + items: + type: integer + title: Contacts + type: array +required: + - vid +title: ContactSubscription +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml b/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml new file mode 100644 index 0000000000..fce87be55a --- /dev/null +++ b/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml @@ -0,0 +1,44 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + pipelineId: + title: Pipelineid + type: string + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - pipelineId +title: DealPipelines +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/email_events.schema.yaml b/source-hubspot-native/acmeCo/email_events.schema.yaml new file mode 100644 index 0000000000..65325c764d --- /dev/null +++ b/source-hubspot-native/acmeCo/email_events.schema.yaml @@ -0,0 +1,44 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: string + events: + default: [] + items: + type: integer + title: Events + type: array +required: + - id +title: EmailEvents +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml new file mode 100644 index 0000000000..5a61ebfb80 --- /dev/null +++ b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml @@ -0,0 +1,44 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + portalId: + title: Portalid + type: string + subscriptionDefinitions: + default: [] + items: + type: integer + title: Subscriptiondefinitions + type: array +required: + - portalId +title: EmailSubscriptions +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/engagements_calls.schema.yaml b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml index 069f587a66..794dac5a27 100644 --- a/source-hubspot-native/acmeCo/engagements_calls.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml @@ -100,6 +100,30 @@ properties: default: {} title: Associations type: object + contacts: + default: [] + items: + type: integer + title: Contacts + type: array + deals: + default: [] + items: + type: integer + title: Deals + type: array + companies: + default: [] + items: + type: integer + title: Companies + type: array + tickets: + default: [] + items: + type: integer + title: Tickets + type: array results: default: [] items: diff --git a/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml index 5c3f3e14d8..92c5bd55f0 100644 --- a/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml @@ -100,6 +100,30 @@ properties: default: {} title: Associations type: object + contacts: + default: [] + items: + type: integer + title: Contacts + type: array + deals: + default: [] + items: + type: integer + title: Deals + type: array + companies: + default: [] + items: + type: integer + title: Companies + type: array + tickets: + default: [] + items: + type: integer + title: Tickets + type: array results: default: [] items: diff --git a/source-hubspot-native/acmeCo/engagements_notes.schema.yaml b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml index 048ac4c118..4b0b18f8ef 100644 --- a/source-hubspot-native/acmeCo/engagements_notes.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml @@ -100,6 +100,30 @@ properties: default: {} title: Associations type: object + contacts: + default: [] + items: + type: integer + title: Contacts + type: array + deals: + default: [] + items: + type: integer + title: Deals + type: array + companies: + default: [] + items: + type: integer + title: Companies + type: array + tickets: + default: [] + items: + type: integer + title: Tickets + type: array results: default: [] items: diff --git a/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml index 9af7471432..5e236871d4 100644 --- a/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml @@ -100,6 +100,30 @@ properties: default: {} title: Associations type: object + contacts: + default: [] + items: + type: integer + title: Contacts + type: array + deals: + default: [] + items: + type: integer + title: Deals + type: array + companies: + default: [] + items: + type: integer + title: Companies + type: array + tickets: + default: [] + items: + type: integer + title: Tickets + type: array results: default: [] items: diff --git a/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml b/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml new file mode 100644 index 0000000000..1984fad025 --- /dev/null +++ b/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: FeedbackSubmissions +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/flow.yaml b/source-hubspot-native/acmeCo/flow.yaml index 9791e8d61b..529cf3136f 100644 --- a/source-hubspot-native/acmeCo/flow.yaml +++ b/source-hubspot-native/acmeCo/flow.yaml @@ -1,5 +1,9 @@ --- collections: + acmeCo/campaigns: + schema: campaigns.schema.yaml + key: + - /id acmeCo/companies: schema: companies.schema.yaml key: @@ -7,15 +11,31 @@ collections: acmeCo/contact_lists: schema: contact_lists.schema.yaml key: - - /id + - /listId acmeCo/contacts: schema: contacts.schema.yaml key: - /id + acmeCo/contacts_lists_subscription: + schema: contacts_lists_subscription.schema.yaml + key: + - /vid + acmeCo/deal_pipelines: + schema: deal_pipelines.schema.yaml + key: + - /pipelineId acmeCo/deals: schema: deals.schema.yaml key: - /id + acmeCo/email_events: + schema: email_events.schema.yaml + key: + - /id + acmeCo/email_subscriptions: + schema: email_subscriptions.schema.yaml + key: + - /portalId acmeCo/engagements: schema: engagements.schema.yaml key: @@ -40,11 +60,51 @@ collections: schema: engagements_tasks.schema.yaml key: - /id + acmeCo/feedback_submissions: + schema: feedback_submissions.schema.yaml + key: + - /id + acmeCo/goal_targets: + schema: goal_targets.schema.yaml + key: + - /id + acmeCo/line_items: + schema: line_items.schema.yaml + key: + - /id + acmeCo/marketing_emails: + schema: marketing_emails.schema.yaml + key: + - /id + acmeCo/marketing_forms: + schema: marketing_forms.schema.yaml + key: + - /id + acmeCo/owners: + schema: owners.schema.yaml + key: + - /id + acmeCo/products: + schema: products.schema.yaml + key: + - /id acmeCo/properties: schema: properties.schema.yaml key: - /_meta/row_id + acmeCo/subscription_changes: + schema: subscription_changes.schema.yaml + key: + - /portalId + acmeCo/ticket_pipelines: + schema: ticket_pipelines.schema.yaml + key: + - /pipelineId acmeCo/tickets: schema: tickets.schema.yaml key: - /id + acmeCo/workflows: + schema: workflows.schema.yaml + key: + - /id diff --git a/source-hubspot-native/acmeCo/goal_targets.schema.yaml b/source-hubspot-native/acmeCo/goal_targets.schema.yaml new file mode 100644 index 0000000000..4f1849eb84 --- /dev/null +++ b/source-hubspot-native/acmeCo/goal_targets.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: Goals +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/line_items.schema.yaml b/source-hubspot-native/acmeCo/line_items.schema.yaml new file mode 100644 index 0000000000..121fea9e06 --- /dev/null +++ b/source-hubspot-native/acmeCo/line_items.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: LineItems +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/marketing_emails.schema.yaml b/source-hubspot-native/acmeCo/marketing_emails.schema.yaml new file mode 100644 index 0000000000..787fe530ca --- /dev/null +++ b/source-hubspot-native/acmeCo/marketing_emails.schema.yaml @@ -0,0 +1,49 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + updatedAt: + format: date-time + title: Updatedat + type: string + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - updatedAt +title: MarketingEmails +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/marketing_forms.schema.yaml b/source-hubspot-native/acmeCo/marketing_forms.schema.yaml new file mode 100644 index 0000000000..f8dbf1590a --- /dev/null +++ b/source-hubspot-native/acmeCo/marketing_forms.schema.yaml @@ -0,0 +1,44 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id +title: MarketingForms +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/owners.schema.yaml b/source-hubspot-native/acmeCo/owners.schema.yaml new file mode 100644 index 0000000000..de05169c9f --- /dev/null +++ b/source-hubspot-native/acmeCo/owners.schema.yaml @@ -0,0 +1,49 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + updatedAt: + format: date-time + title: Updatedat + type: string + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - updatedAt +title: Owners +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/products.schema.yaml b/source-hubspot-native/acmeCo/products.schema.yaml new file mode 100644 index 0000000000..a83d114f9d --- /dev/null +++ b/source-hubspot-native/acmeCo/products.schema.yaml @@ -0,0 +1,117 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties +title: Products +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/subscription_changes.schema.yaml b/source-hubspot-native/acmeCo/subscription_changes.schema.yaml new file mode 100644 index 0000000000..95e2107716 --- /dev/null +++ b/source-hubspot-native/acmeCo/subscription_changes.schema.yaml @@ -0,0 +1,44 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + portalId: + title: Portalid + type: string + timeline: + default: [] + items: + type: integer + title: Timeline + type: array +required: + - portalId +title: SubscriptionChanges +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml b/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml new file mode 100644 index 0000000000..3f8ec151ca --- /dev/null +++ b/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml @@ -0,0 +1,121 @@ +--- +$defs: + History: + additionalProperties: false + properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: string + sourceType: + title: Sourcetype + type: string + sourceId: + anyOf: + - type: string + - type: "null" + default: ~ + title: Sourceid + updatedByUserId: + anyOf: + - type: integer + - type: "null" + default: ~ + title: Updatedbyuserid + required: + - timestamp + - value + - sourceType + title: History + type: object + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: false +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + createdAt: + format: date-time + title: Createdat + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + archived: + title: Archived + type: boolean + properties: + type: object + additionalProperties: + anyOf: + - type: string + - type: "null" + title: Properties + propertiesWithHistory: + additionalProperties: + items: + $ref: "#/$defs/History" + type: array + default: {} + title: Propertieswithhistory + type: object + associations: + additionalProperties: false + default: {} + title: Associations + type: object + pipelineId: + title: Pipelineid + type: string + results: + default: [] + items: + type: integer + title: Results + type: array +required: + - id + - createdAt + - updatedAt + - archived + - properties + - pipelineId +title: TicketPipelines +type: object +x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/workflows.schema.yaml b/source-hubspot-native/acmeCo/workflows.schema.yaml new file mode 100644 index 0000000000..2b4664549b --- /dev/null +++ b/source-hubspot-native/acmeCo/workflows.schema.yaml @@ -0,0 +1,49 @@ +--- +$defs: + Meta: + properties: + op: + description: "Operation type (c: Create, u: Update, d: Delete)" + enum: + - c + - u + - d + title: Op + type: string + row_id: + default: -1 + description: "Row ID of the Document, counting up from zero, or -1 if not known" + title: Row Id + type: integer + required: + - op + title: Meta + type: object +additionalProperties: true +properties: + _meta: + allOf: + - $ref: "#/$defs/Meta" + default: + op: u + row_id: -1 + description: Document metadata + id: + title: Id + type: integer + updatedAt: + format: date-time + title: Updatedat + type: string + workflows: + default: [] + items: + type: integer + title: Workflows + type: array +required: + - id + - updatedAt +title: Workflows +type: object +x-infer-schema: true diff --git a/source-hubspot-native/poetry.lock b/source-hubspot-native/poetry.lock index 359c93e28e..4af6e9d66c 100644 --- a/source-hubspot-native/poetry.lock +++ b/source-hubspot-native/poetry.lock @@ -850,6 +850,17 @@ files = [ pytest = ">=7.2.0,<9.0.0" wrapt = ">=1.14.1,<2.0.0" +[[package]] +name = "pytz" +version = "2024.1" +description = "World timezone definitions, modern and historical" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2024.1-py2.py3-none-any.whl", hash = "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319"}, + {file = "pytz-2024.1.tar.gz", hash = "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812"}, +] + [[package]] name = "typing-extensions" version = "4.10.0" @@ -1163,4 +1174,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "793b63109c205399f057c5819ac4876d16c51337c2a14207565347f24b2f0468" +content-hash = "cc806af8036356ab7479522d464dc3cc2b553da9a80889f3a6bc5227877c6da0" diff --git a/source-hubspot-native/pyproject.toml b/source-hubspot-native/pyproject.toml index 7c8b4b7f4d..4b1c2950bd 100644 --- a/source-hubspot-native/pyproject.toml +++ b/source-hubspot-native/pyproject.toml @@ -8,6 +8,7 @@ authors = ["Johnny Graettinger "] estuary-cdk = {path="../estuary-cdk", develop = true} pydantic = "^2" python = "^3.12" +pytz = "^2024.1" [tool.poetry.group.dev.dependencies] debugpy = "^1.8.0" diff --git a/source-hubspot-native/source_hubspot_native/api.py b/source-hubspot-native/source_hubspot_native/api.py index e32b183105..d19dee2613 100644 --- a/source-hubspot-native/source_hubspot_native/api.py +++ b/source-hubspot-native/source_hubspot_native/api.py @@ -2,9 +2,12 @@ from estuary_cdk.http import HTTPSession from logging import Logger from pydantic import TypeAdapter +import json +import pytz from typing import Iterable, Any, Callable, Awaitable, AsyncGenerator import asyncio import itertools +from copy import deepcopy from estuary_cdk.capture.common import ( PageCursor, @@ -15,17 +18,29 @@ Association, BatchResult, CRMObject, + WorkflowResult, + V1CustomCRMObject, + V1CustomCRMObject2, + V1CRMObject, OldRecentCompanies, OldRecentContacts, OldRecentDeals, OldRecentEngagements, OldRecentTicket, - OldRecentContactLists, OldRecentEngagementsCalls, OldRecentEngagementsEmails, OldRecentEngagementsMeetings, OldRecentEngagementsNotes, OldRecentEngagementsTasks, + OldRecentMarketingEmails, + OldRecentMarketingForms, + OldRecentOwners, + OldRecentLineItems, + OldRecentProducts, + OldRecentWorkflows, + OldRecentGoals, + OldRecentFeedbackSubmissions, + OldRecentEmailSubscriptions, PageResult, Properties, ) @@ -58,15 +73,26 @@ async def fetch_page( ) -> AsyncGenerator[CRMObject | str, None]: url = f"{HUB}/crm/v3/objects/{cls.PROPERTY_SEARCH_NAME}" - properties = await fetch_properties(log, cls, http) - property_names = ",".join(p.name for p in properties.results if not p.calculated) - input = { + if cls.IGNORE_PROPERTY_SEARCH is True: + input = { "associations": ",".join(cls.ASSOCIATED_ENTITIES), "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). - "properties": property_names, - "propertiesWithHistory": property_names, - } + } + if len(cls.ASSOCIATED_ENTITIES) == 0: + del input['associations'] + else: + properties = await fetch_properties(log, cls, http) + property_names = ",".join(p.name for p in properties.results if not p.calculated) + + input = { + "associations": ",".join(cls.ASSOCIATED_ENTITIES), + "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "properties": property_names, + "propertiesWithHistory": property_names, + } + if len(cls.ASSOCIATED_ENTITIES) == 0: + del input['associations'] if page: input["after"] = page @@ -83,6 +109,97 @@ async def fetch_page( yield result.paging.next.after +async def fetch_page_custom( + # Closed over via functools.partial: + cls: type[V1CRMObject], + http: HTTPSession, + # Remainder is common.FetchPageFn: + log: Logger, + page: str | None, + cutoff: datetime, +) -> AsyncGenerator[CRMObject | str, None]: + + url = f"{HUB}{cls.ENFORCE_URL}" + + if cls.IGNORE_PROPERTY_SEARCH is True: + input = { + "associations": ",".join(cls.ASSOCIATED_ENTITIES), + "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + } + if len(cls.ASSOCIATED_ENTITIES) == 0: + del input['associations'] + else: + properties = await fetch_properties(log, cls, http) + property_names = ",".join(p.name for p in properties.results if not p.calculated) + + input = { + "associations": ",".join(cls.ASSOCIATED_ENTITIES), + "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "properties": property_names, + "propertiesWithHistory": property_names, + } + if page: + input["after"] = page + + + data = json.loads(await http.request(log, url, method="GET", params=input)) + if data.get('total') is not None: + del data['total'] + _cls: Any = cls # Silence mypy false-positive. + result: PageResult[V1CRMObject] = PageResult[_cls].model_validate_json( + json.dumps(data) + ) + + + for doc in result.results: + if doc.updatedAt < cutoff: + yield doc + + if result.paging: + yield result.paging.next.after + +async def fetch_page_workflow( + # Closed over via functools.partial: + cls: type[V1CRMObject], + http: HTTPSession, + # Remainder is common.FetchPageFn: + log: Logger, + page: str | None, + cutoff: datetime, +) -> AsyncGenerator[CRMObject | str, None]: + + url = f"{HUB}{cls.ENFORCE_URL}" + + if cls.IGNORE_PROPERTY_SEARCH is True: + input = { + "associations": ",".join(cls.ASSOCIATED_ENTITIES), + "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + } + if len(cls.ASSOCIATED_ENTITIES) == 0: + del input['associations'] + else: + properties = await fetch_properties(log, cls, http) + property_names = ",".join(p.name for p in properties.results if not p.calculated) + + input = { + "associations": ",".join(cls.ASSOCIATED_ENTITIES), + "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "properties": property_names, + "propertiesWithHistory": property_names, + } + if page: + input["after"] = page + + _cls: Any = cls # Silence mypy false-positive. + result: WorkflowResult[V1CRMObject] = WorkflowResult[_cls].model_validate_json( + await http.request(log, url, method="GET", params=input) + ) + + for doc in result.workflows: + if doc.updatedAt < cutoff: + yield doc + + async def fetch_batch( log: Logger, cls: type[CRMObject], @@ -185,7 +302,6 @@ async def fetch_changes( while True: iter, next_page = await fetch_recent(log, http, log_cursor, next_page) - log.debug(f"NEXT PAGE IS {next_page}") for ts, id in iter: if ts > log_cursor: recent.append((ts, id)) @@ -193,7 +309,6 @@ async def fetch_changes( next_page = None if not next_page: - log.debug(f"NEXT PAGE BROKE") break recent.sort() # Oldest updates first. @@ -209,6 +324,41 @@ async def fetch_changes( if recent: yield recent[-1][0] + else: + return + + +async def fetch_changes_no_batch( + # Closed over via functools.partial: + cls: type[CRMObject], + fetch_recent: FetchRecentFn, + http: HTTPSession, + # Remainder is common.FetchChangesFn: + log: Logger, + log_cursor: LogCursor, +) -> AsyncGenerator[CRMObject | LogCursor, None]: + assert isinstance(log_cursor, datetime) + + recent: list[tuple[datetime, str]] = [] + next_page: PageCursor = None + _cls = cls + + while True: + iter, next_page = await fetch_recent(log, http, log_cursor, next_page) + + for ts, id, result in iter: + recent.append((ts, id)) # Used later to update log_cursor value + yield V1CRMObject.model_validate_json(json.dumps(result)) + + + if not next_page: + break + + if recent: + recent.sort() # Oldest updates first. + yield recent[-1][0] # Updates log_cursor value + else: + return async def fetch_recent_companies( @@ -279,110 +429,215 @@ async def fetch_recent_tickets( log: Logger, http: HTTPSession, since: datetime, cursor: PageCursor ) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - url = f"{HUB}/crm-objects/v1/change-log/tickets" - params = {"timestamp": int(since.timestamp() * 1000) - 1} - - result = TypeAdapter(list[OldRecentTicket]).validate_json( - await http.request(log, url, params=params) + url = f"{HUB}/crm/v3/objects/tickets" + + result = OldRecentTicket.model_validate_json( + await http.request(log, url, params=None) ) - return ((_ms_to_dt(r.timestamp), str(r.objectId)) for r in result), None + + return ( + (r.updatedAt, str(r.id)) + for r in result.results + ), None and None async def fetch_recent_contacts_lists( log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: +) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: - log.debug("FUNCTION STARTED") url = f"{HUB}/contacts/v1/lists" params = {"count": 100, "offset": page} if page else {"count": 250} - result = OldRecentContactLists.model_validate_json( - await http.request(log, url, params=params) + data = await http.request(log, url, params=params) + + + result = V1CustomCRMObject2.model_validate_json( + data ) - #log.debug(f"RESULT IS {result}") - log.debug(f"HAS MORE IS {result.hasMore}") - return ( - (_ms_to_dt(r.updatedAt), str(r.listId)) - for r in result.lists - ), result.hasMore and result.offset + + for item in result.lists: + item['listId'] = str(item['listId']) + + if result.hasMore is False: + return ( + (_ms_to_dt(r['updatedAt']), str(r['listId']), r) + for r in result.lists if _ms_to_dt(r['updatedAt']) > since + ), None + else: + return ( + (_ms_to_dt(r['updatedAt']), str(r['listId']), r) + for r in result.lists if _ms_to_dt(r['updatedAt']) > since + ), result.offset #same as the ticket_pipeline async def fetch_recent_deal_pipelines( log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: +) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: url = f"{HUB}/crm-pipelines/v1/pipelines/deals" - result = OldRecentDealPipelines.model_validate_json( + result = V1CRMObject.model_validate_json( await http.request(log, url, params=None) ) + # we want new deals + # plus updatedAt can be null + # and can compromise selection return ( - (_ms_to_dt(r.updatedAt), str(r.pipelineId)) - for r in result.results - ), None and None + (_ms_to_dt(r['createdAt']), str(r["pipelineId"]), r) + for r in result.results if _ms_to_dt(r['createdAt']) > since + ), None async def fetch_recent_ticket_pipelines( log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: +) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: url = f"{HUB}/crm-pipelines/v1/pipelines/tickets" - result = OldRecentTicketPipelines.model_validate_json( + result = V1CRMObject.model_validate_json( await http.request(log, url, params=None) ) - print(result) + # we want new tickets + # plus updatedAt can be null + # and can compromise selection return ( - (_ms_to_dt(r.updatedAt), str(r.pipelineId)) - for r in result.results - ), None and None + (_ms_to_dt(r['createdAt']), str(r["pipelineId"]), r) + for r in result.results if _ms_to_dt(r['createdAt']) > since + ), None async def fetch_recent_email_events( log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: +) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: url = f"{HUB}/email/public/v1/events" - params = {"limit": 100, "offset": page} if page else {"limit": 1} + params = {"offset": page} if page else None - result = OldRecentEmailEvents.model_json_schema( + result = V1CRMObject.model_validate_json( await http.request(log, url, params=params) ) + + if result.hasMore is False: + return ( + (_ms_to_dt(r["created"]), str(r["id"]), r) + for r in result.events if _ms_to_dt(r["created"]) > since), None - return ( - (_ms_to_dt(r.created), str(r.id)) - for r in result.events - ), result.hasMore and result.offset + else: + return ( + (_ms_to_dt(r['created']), str(r['id']), r) + for r in result.events if _ms_to_dt(r["created"]) > since), result.offset async def fetch_recent_marketing_emails( log: Logger, http: HTTPSession, since: datetime, page: PageCursor ) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - url = f"{HUB}/marketing-emails/v1/emails/with-statistics" - params = {"limit": 300} + url = f"{HUB}/marketing/v3/emails/" - result = OldRecentMarketingEmails.model_json_schema( - await http.request(log, url, params=params) + result = OldRecentMarketingEmails.model_validate_json( + await http.request(log, url, params=None) ) return ( - (_ms_to_dt(r.updated), str(r.id)) - for r in result.objects + ((r.updatedAt), str(r.id)) + for r in result.results ), None and None # This endpoint does not have pagination. async def fetch_recent_subscription_changes( log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: +) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: url = f"{HUB}/email/public/v1/subscriptions/timeline" + params = {"limit": 100, "offset": page} if page else {"limit": 1} - result = OldRecentSubscriptionChanges.model_json_schema( - await http.request(log, url, params=params) + data = await http.request(log, url, params=params) + + result = V1CRMObject.model_validate_json( + data + ) + + for item in result.timeline: + item["portalId"] = str(item["portalId"]) + + if result.hasMore is False: + return ( + (_ms_to_dt(r["timestamp"]), str(r["portalId"]), r) + for r in result.timeline if _ms_to_dt(r["timestamp"]) > since + ), None + + else: + return ( + (_ms_to_dt(r["timestamp"]), str(r["portalId"]), r) + for r in result.timeline if _ms_to_dt(r["timestamp"]) > since + ), result.offset + +async def fetch_email_subscriptions( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/communication-preferences/v3/definitions" + + + result = OldRecentEmailSubscriptions.model_validate_json( + await http.request(log, url, params=None) ) return ( - (_ms_to_dt(r.timestamp), str(r.portalId)) - for r in result.timelines - ), result.hasMore and result.offset + ((r.updatedAt), str(r.id)) + for r in result.subscriptionDefinitions + ), None and None # This endpoint does not have pagination. + +async def fetch_contacts_lists_subscription( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: + + url = f"{HUB}/contacts/v1/lists/all/contacts/all" + params = {"count": 100, "offset": page,"showListMemberships": "true"} if page else {"count": 1, "showListMemberships": "true"} + + data = await http.request(log, url, params=params) + + result = V1CustomCRMObject.model_validate_json( + data + ) + + for item in result.contacts: + item["vid"] = str(item["vid"]) + + + if result.hasMore is False: + return ( + (_ms_to_dt(int(r["properties"]["lastmodifieddate"]["value"])), str(r["vid"]), r) + for r in result.contacts if _ms_to_dt(int(r["properties"]["lastmodifieddate"]["value"])) > since + ), None + + else: + return ( + (_ms_to_dt(int(r["properties"]["lastmodifieddate"]["value"])), str(r["vid"]), r) + for r in result.contacts if _ms_to_dt(int(r["properties"]["lastmodifieddate"]["value"])) > since + ), result.offset + +async def fetch_campaigns( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor + ) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: + + url = f"{HUB}/email/public/v1/campaigns" + params = {"offset": page} if page else None + + data = await http.request(log, url, params=params) + + result = V1CRMObject.model_validate_json( + data + ) + + if result.hasMore is False: + return ( + (_ms_to_dt(int(r["lastUpdatedTime"])), str(r["id"]), r) + for r in result.campaigns if _ms_to_dt(int(r["lastUpdatedTime"])) > since + ), None + + else: + return ( + (_ms_to_dt(int(r["lastUpdatedTime"])), str(r["id"]), r) + for r in result.campaigns if _ms_to_dt(int(r["lastUpdatedTime"])) > since + ), result.offset def _ms_to_dt(ms: int) -> datetime: return datetime.fromtimestamp(ms / 1000.0, tz=UTC) @@ -399,7 +654,7 @@ async def fetch_engagements_calls( result = OldRecentEngagementsCalls.model_validate_json( await http.request(log, url, params=None) ) - log.debug(result) + return ( (r.createdAt, str(r.id)) for r in result.results @@ -414,7 +669,6 @@ async def fetch_engagements_emails( result = OldRecentEngagementsEmails.model_validate_json( await http.request(log, url, params=None) ) - log.debug(f"{result}") return ( (r.createdAt, str(r.id)) for r in result.results @@ -439,14 +693,11 @@ async def fetch_engagements_tasks( ) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: url = f"{HUB}/crm/v3/objects/tasks" - params = {"properties": "paging"} result = OldRecentEngagementsTasks.model_validate_json( - await http.request(log, url, params=params) + await http.request(log, url, params=None) ) - test2 = await http.request(log, url, params=params) - log.info(f"{test2}") return ( (r.createdAt, str(r.id)) for r in result.results @@ -466,16 +717,103 @@ async def fetch_engagements_notes( for r in result.results ), None and None -async def fetch_engagements_calls( + +async def fetch_marketing_forms( log: Logger, http: HTTPSession, since: datetime, page: PageCursor ) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - url = f"{HUB}/crm/v3/objects/calls" + url = f"{HUB}/marketing/v3/forms" - result = OldRecentEngagementsCalls.model_validate_json( - await http.request(log, url, params=None) + result = OldRecentMarketingForms.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.updatedAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_owners( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/owners" + + result = OldRecentOwners.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.updatedAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_line_items( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/line_items" # seems to be offline + + result = OldRecentLineItems.model_validate_json( + await http.request(log, url, params=None) ) return ( (r.createdAt, str(r.id)) for r in result.results ), None and None + +async def fetch_products( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/products" + + result = OldRecentProducts.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.createdAt, str(r.id)) + for r in result.results + ), None and None + +async def fetch_workflows( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/automation/v3/workflows" + + result = OldRecentWorkflows.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.updatedAt, str(r.id)) + for r in result.workflows + ), None and None + + +async def fetch_goals( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/goal_targets" + + result = OldRecentGoals.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.updatedAt, str(r.id)) + for r in result.results + ), None and None + + +async def fetch_feedback_submissions( + log: Logger, http: HTTPSession, since: datetime, page: PageCursor +) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: + + url = f"{HUB}/crm/v3/objects/feedback_submissions" + + result = OldRecentFeedbackSubmissions.model_validate_json( + await http.request(log, url, params=None) + ) + return ( + (r.updatedAt, str(r.id)) + for r in result.results + ), None and None \ No newline at end of file diff --git a/source-hubspot-native/source_hubspot_native/models.py b/source-hubspot-native/source_hubspot_native/models.py index 35e17dad27..ec45a11ce8 100644 --- a/source-hubspot-native/source_hubspot_native/models.py +++ b/source-hubspot-native/source_hubspot_native/models.py @@ -28,7 +28,10 @@ "files.ui_hidden.read", "forms", "forms-uploaded-files", + "service-feedback-access", "sales-email-read", + "communication_preferences.read", + "workflows-access-public-api", "tickets", ] @@ -87,6 +90,7 @@ class EndpointConfig(BaseModel): # Names of things within the HubSpot API domain. class Names(StrEnum): + campaigns = auto() companies = auto() contacts = auto() deals = auto() @@ -100,15 +104,47 @@ class Names(StrEnum): engagements_meetings = auto() engagements_notes = auto() engagements_tasks = auto() + ticket_pipelines = auto() + marketing_emails = auto() + deal_pipelines = auto() + subscription_changes = auto() + email_events = auto() + marketing_forms = auto() + owners = auto() + products = auto() + workflows = auto() + goal_targets = auto() + feedback_submissions = auto() + email_subscriptions = auto() + contacts_lists_subscription = auto() class PropertyNames(StrEnum): emails = auto() companies = auto() + deals = auto() + engagements = auto() + tickets = auto() calls = auto() notes = auto() tasks = auto() meetings = auto() contacts = auto() + forms = auto() + line_items = auto() + products = auto() + workflows = auto() + goal_targets = auto() + feedback_submissions = auto() + email_subscriptions = auto() + +class EnforceUrl(str): + owners = "/crm/v3/owners/" + forms = "/marketing/v3/forms" + workflows = "/automation/v3/workflows/" + email_subscriptions = "/communication-preferences/v3/definitions" + contact_subscription = "/contacts/v1/lists/all/contacts/all" + marketing_emails = "/marketing/v3/emails/" + contact_lists = "/contacts/v1/lists" # A Property is a HubSpot or HubSpot-user defined attribute that's # attached to a HubSpot CRM object. @@ -127,9 +163,12 @@ class Properties(BaseDocument, extra="forbid"): class BaseCRMObject(BaseDocument, extra="forbid"): # Class-scoped metadata attached to concrete subclasses. NAME: ClassVar[str] - PROPERTY_SEARCH_NAME: ClassVar[str] + PRIMARY_KEY: ClassVar[list[str]] = ["/id"] + PROPERTY_SEARCH_NAME: ClassVar[str] = None ASSOCIATED_ENTITIES: ClassVar[list[str]] CACHED_PROPERTIES: ClassVar[Properties] + IGNORE_PROPERTY_SEARCH: ClassVar[bool] = False + ENFORCE_URL: ClassVar[str] class History(BaseDocument, extra="forbid"): timestamp: datetime @@ -183,8 +222,48 @@ def _post_init(self) -> "BaseCRMObject": CRMObject = TypeVar("CRMObject", bound=BaseCRMObject) +class V1CRMObject(BaseDocument, extra="allow"): + # Class-scoped metadata attached to concrete subclasses. + NAME: ClassVar[str] + PRIMARY_KEY: ClassVar[list[str]] = ["/id"] + PROPERTY_SEARCH_NAME: ClassVar[str] + ASSOCIATED_ENTITIES: ClassVar[list[str]] + CACHED_PROPERTIES: ClassVar[Properties] + IGNORE_PROPERTY_SEARCH: ClassVar[bool] = False + ENFORCE_URL: ClassVar[str] + +class V1CustomCRMObject(BaseDocument, extra="allow"): + # Class-scoped metadata attached to concrete subclasses. + NAME: ClassVar[str] + PRIMARY_KEY: ClassVar[list[str]] = ["/id"] + PROPERTY_SEARCH_NAME: ClassVar[str] + ASSOCIATED_ENTITIES: ClassVar[list[str]] + CACHED_PROPERTIES: ClassVar[Properties] + IGNORE_PROPERTY_SEARCH: ClassVar[bool] = False + ENFORCE_URL: ClassVar[str] + + offset: int = Field(alias="vid-offset") + hasMore: bool = Field(alias="has-more") + +class V1CustomCRMObject2(BaseDocument, extra="allow"): + # Class-scoped metadata attached to concrete subclasses. + NAME: ClassVar[str] + PRIMARY_KEY: ClassVar[list[str]] = ["/id"] + PROPERTY_SEARCH_NAME: ClassVar[str] + ASSOCIATED_ENTITIES: ClassVar[list[str]] + CACHED_PROPERTIES: ClassVar[Properties] + IGNORE_PROPERTY_SEARCH: ClassVar[bool] = False + ENFORCE_URL: ClassVar[str] + + hasMore: bool = Field(alias="has-more") + +CustomCRMObject = TypeVar("CustomCRMObject", bound=V1CRMObject) +CustomCRMObject2 = TypeVar("CustomCRMObject2", bound=V1CustomCRMObject2) +CustomCRMObjectV1 = TypeVar("CustomCRMObjectV1", bound=V1CustomCRMObject) + class Company(BaseCRMObject): NAME = Names.companies + PROPERTY_SEARCH_NAME = PropertyNames.companies ASSOCIATED_ENTITIES = [Names.contacts, Names.deals] contacts: list[int] = [] @@ -193,6 +272,7 @@ class Company(BaseCRMObject): class Contact(BaseCRMObject): NAME = Names.contacts + PROPERTY_SEARCH_NAME = PropertyNames.contacts ASSOCIATED_ENTITIES = [Names.companies] companies: list[int] = [] @@ -200,6 +280,7 @@ class Contact(BaseCRMObject): class Deal(BaseCRMObject): NAME = Names.deals + PROPERTY_SEARCH_NAME = PropertyNames.deals ASSOCIATED_ENTITIES = [Names.contacts, Names.engagements, Names.line_items] contacts: list[int] = [] @@ -209,6 +290,7 @@ class Deal(BaseCRMObject): class Engagement(BaseCRMObject): NAME = Names.engagements + PROPERTY_SEARCH_NAME = PropertyNames.engagements ASSOCIATED_ENTITIES = [Names.deals] deals: list[int] = [] @@ -216,18 +298,33 @@ class Engagement(BaseCRMObject): class Ticket(BaseCRMObject): NAME = Names.tickets + PROPERTY_SEARCH_NAME = PropertyNames.tickets ASSOCIATED_ENTITIES = [Names.contacts, Names.engagements, Names.line_items] contacts: list[int] = [] engagements: list[int] = [] line_items: list[int] = [] -class ContactLists(BaseCRMObject): +class ContactLists(V1CRMObject): NAME = Names.contact_lists + PRIMARY_KEY = ["/listId"] ASSOCIATED_ENTITIES = [] + IGNORE_PROPERTY_SEARCH = True + ENFORCE_URL = EnforceUrl.contact_lists + listId: str lists: list[int] = [] +class ContactSubscription(V1CRMObject): + NAME = Names.contacts_lists_subscription + ASSOCIATED_ENTITIES = [] + PRIMARY_KEY = ["/vid"] + ENFORCE_URL = EnforceUrl.contact_subscription + IGNORE_PROPERTY_SEARCH = True + + vid: str + contacts: list[int] = [] + class EngagementEmails(BaseCRMObject): NAME = Names.engagements_emails PROPERTY_SEARCH_NAME = PropertyNames.emails @@ -244,6 +341,10 @@ class EngagementCalls(BaseCRMObject): PROPERTY_SEARCH_NAME = PropertyNames.calls ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + contacts: list[int] = [] + deals: list[int] = [] + companies: list[int] = [] + tickets: list[int] = [] results: list[int] = [] class EngagementMeetings(BaseCRMObject): @@ -251,6 +352,10 @@ class EngagementMeetings(BaseCRMObject): PROPERTY_SEARCH_NAME = PropertyNames.meetings ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + contacts: list[int] = [] + deals: list[int] = [] + companies: list[int] = [] + tickets: list[int] = [] results: list[int] = [] class EngagementNotes(BaseCRMObject): @@ -258,15 +363,142 @@ class EngagementNotes(BaseCRMObject): PROPERTY_SEARCH_NAME = PropertyNames.notes ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + contacts: list[int] = [] + deals: list[int] = [] + companies: list[int] = [] + tickets: list[int] = [] results: list[int] = [] class EngagementTasks(BaseCRMObject): NAME = Names.engagements_tasks PROPERTY_SEARCH_NAME = PropertyNames.tasks ASSOCIATED_ENTITIES = [Names.contacts, Names.deals, Names.companies, Names.tickets] + + contacts: list[int] = [] + deals: list[int] = [] + companies: list[int] = [] + tickets: list[int] = [] + results: list[int] = [] + +class TicketPipelines(BaseCRMObject): + NAME = Names.ticket_pipelines + PRIMARY_KEY = ['/pipelineId'] + ASSOCIATED_ENTITIES = [] + + pipelineId: str + results: list[int] = [] + +class MarketingEmails(V1CRMObject): + NAME = Names.marketing_emails + ENFORCE_URL = EnforceUrl.marketing_emails + IGNORE_PROPERTY_SEARCH = True + ASSOCIATED_ENTITIES = [] + + id: int + updatedAt: AwareDatetime + results: list[ int] = [] + +class SubscriptionChanges(V1CRMObject): + NAME = Names.subscription_changes + PRIMARY_KEY = ['/portalId'] + ASSOCIATED_ENTITIES = [] + + portalId: str + timeline: list[int] = [] + +class Campaigns(V1CRMObject): + NAME = Names.campaigns + ASSOCIATED_ENTITIES = [] + + id: str + timeline: list[int] = [] + +class DealPipelines(V1CRMObject): + NAME = Names.deal_pipelines + PRIMARY_KEY = ['/pipelineId'] + ASSOCIATED_ENTITIES = [] + + pipelineId: str + results: list[int] = [] + +class EmailEvents(V1CRMObject): + NAME = Names.email_events + ASSOCIATED_ENTITIES = [] + + id: str + events: list[int] = [] + +class MarketingForms(V1CRMObject): + NAME = Names.marketing_forms + ENFORCE_URL = EnforceUrl.forms + PROPERTY_SEARCH_NAME = PropertyNames.forms + IGNORE_PROPERTY_SEARCH = True + ASSOCIATED_ENTITIES = [] + + id: int + results: list[int] = [] + +class Owners(V1CRMObject): + NAME = Names.owners + ENFORCE_URL = EnforceUrl.owners + IGNORE_PROPERTY_SEARCH = True + ASSOCIATED_ENTITIES = [] + + id: int + updatedAt: AwareDatetime + results: list[int] = [] + +class LineItems(BaseCRMObject): + NAME = Names.line_items + IGNORE_PROPERTY_SEARCH = True + PROPERTY_SEARCH_NAME = PropertyNames.line_items + ASSOCIATED_ENTITIES = [] + + results: list[int] = [] + +class Products(BaseCRMObject): + NAME = Names.products + IGNORE_PROPERTY_SEARCH = True + PROPERTY_SEARCH_NAME = PropertyNames.products + ASSOCIATED_ENTITIES = [] + + results: list[int] = [] + +class Workflows(V1CRMObject): + NAME = Names.workflows + IGNORE_PROPERTY_SEARCH = True + ENFORCE_URL = EnforceUrl.workflows + ASSOCIATED_ENTITIES = [] + PROPERTY_SEARCH_NAME = PropertyNames.workflows + + id: int + updatedAt: AwareDatetime + workflows: list[int] = [] + +class Goals(BaseCRMObject): + NAME = Names.goal_targets + ASSOCIATED_ENTITIES = [] + PROPERTY_SEARCH_NAME = PropertyNames.goal_targets + + results: list[int] = [] + +class FeedbackSubmissions(BaseCRMObject): + NAME = Names.feedback_submissions + ASSOCIATED_ENTITIES = [Names.contacts] + PROPERTY_SEARCH_NAME = PropertyNames.feedback_submissions results: list[int] = [] +class EmailSubscriptions(V1CRMObject): + NAME = Names.email_subscriptions + PRIMARY_KEY = ['/portalId'] + ASSOCIATED_ENTITIES = [] + ENFORCE_URL = EnforceUrl.email_subscriptions + IGNORE_PROPERTY_SEARCH = True + + portalId: str + subscriptionDefinitions: list[int] = [] + # An Association, as returned by the v4 associations API. class Association(BaseModel, extra="forbid"): @@ -330,6 +562,9 @@ class Error(BaseModel, extra="forbid"): errors: list[Error] = [] numErrors: int = 0 +class WorkflowResult(BaseModel, Generic[Item], extra="forbid"): + workflows: list[Item] + # The following are models for HubSpot's "legacy" APIs for fetching # recently-changed entities. We model them because these APIs are @@ -408,8 +643,13 @@ class Engagement(BaseModel): class OldRecentTicket(BaseModel): - timestamp: int - objectId: int + class Item(BaseModel): + id: int + updatedAt: datetime + + results: list[Item] + hasMore: bool + offset: str class OldRecentCampaigns(BaseModel): @@ -422,104 +662,119 @@ class Item(BaseModel): hasMore: bool offset: str -class OldRecentContactLists(BaseModel): - class Item(BaseModel): - listId: int - updatedAt: int - - lists: list[Item] - hasMore: bool = Field(alias="has-more") - offset: int -class OldRecentDealPipelines(BaseModel): +################################# v3 - class Item(BaseModel): - pipelineId: int - updatedAt: int - - results: list[Item] -class OldRecentTicketPipelines(BaseModel): + + +class OldRecentMarketingEmails(BaseModel): class Item(BaseModel): - pipelineId: int - updatedAt: int + id: int + updatedAt: AwareDatetime results: list[Item] -class OldRecentEmailEvents(BaseModel): +class OldRecentEngagementsEmails(BaseModel): class Item(BaseModel): id: int - appId: int - created: int - + createdAt: AwareDatetime results: list[Item] - hasMore: bool - offset: str -class OldRecentMarketingEmails(BaseModel): +class OldRecentEngagementsTasks(BaseModel): + + class Item(BaseModel): + id: int + createdAt: AwareDatetime + + results: list[Item] +class OldRecentEngagementsNotes(BaseModel): + class Item(BaseModel): id: int - updated: int + createdAt: AwareDatetime + + results: list[Item] + +class OldRecentEngagementsCalls(BaseModel): - objects: list[Item] - offset: int + class Item(BaseModel): + id: int + createdAt: AwareDatetime -class OldRecentSubscriptionChanges(BaseModel): + results: list[Item] +class OldRecentEngagementsMeetings(BaseModel): + class Item(BaseModel): - timestamp: int - portalId: int + id: int + createdAt: AwareDatetime - timeline: list[Item] - hasMore: bool - offset: str + results: list[Item] +class OldRecentMarketingForms(BaseModel): -################################# v3 + class Item(BaseModel): + id: int + updatedAt: AwareDatetime + results: list[Item] +class OldRecentOwners(BaseModel): + class Item(BaseModel): + id: int + updatedAt: AwareDatetime -class OldRecentEngagementsEmails(BaseModel): + results: list[Item] + +class OldRecentLineItems(BaseModel): + class Item(BaseModel): id: int - createdAt: datetime + createdAt: AwareDatetime results: list[Item] -class OldRecentEngagementsTasks(BaseModel): +class OldRecentProducts(BaseModel): class Item(BaseModel): id: int - createdAt: datetime + createdAt: AwareDatetime results: list[Item] -class OldRecentEngagementsNotes(BaseModel): - +class OldRecentWorkflows(BaseModel): + + class Item(BaseModel): + id: int + updatedAt: AwareDatetime + + workflows: list[Item] + +class OldRecentGoals(BaseModel): class Item(BaseModel): id: int - createdAt: datetime + updatedAt: AwareDatetime results: list[Item] -class OldRecentEngagementsCalls(BaseModel): - +class OldRecentFeedbackSubmissions(BaseModel): class Item(BaseModel): id: int - createdAt: datetime + updatedAt: AwareDatetime results: list[Item] -class OldRecentEngagementsMeetings(BaseModel): - +class OldRecentEmailSubscriptions(BaseModel): + class Item(BaseModel): id: int - createdAt: datetime + updatedAt: AwareDatetime - results: list[Item] \ No newline at end of file + subscriptionDefinitions: list[Item] diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index 4623cd4de2..c5c6af1038 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -12,6 +12,7 @@ from .models import ( BaseCRMObject, CRMObject, + V1CRMObject, Company, Contact, Deal, @@ -29,12 +30,30 @@ EngagementMeetings, EngagementNotes, EngagementTasks, + TicketPipelines, + DealPipelines, + EmailEvents, + SubscriptionChanges, + MarketingEmails, + MarketingForms, + Owners, + LineItems, + Campaigns, + Products, + Workflows, + Goals, + FeedbackSubmissions, + EmailSubscriptions, + ContactSubscription, ) from .api import ( FetchRecentFn, fetch_page, + fetch_page_custom, + fetch_page_workflow, fetch_properties, fetch_changes, + fetch_changes_no_batch, fetch_recent_companies, fetch_recent_contacts, fetch_recent_deals, @@ -46,6 +65,21 @@ fetch_engagements_notes, fetch_engagements_tasks, fetch_engagements_meetings, + fetch_recent_ticket_pipelines, + fetch_recent_deal_pipelines, + fetch_recent_email_events, + fetch_recent_subscription_changes, + fetch_recent_marketing_emails, + fetch_campaigns, + fetch_marketing_forms, + fetch_owners, + fetch_line_items, + fetch_products, + fetch_workflows, + fetch_goals, + fetch_feedback_submissions, + fetch_email_subscriptions, + fetch_contacts_lists_subscription, ) @@ -54,25 +88,49 @@ async def all_resources( ) -> list[common.Resource]: http.token_source = TokenSource(oauth_spec=OAUTH2_SPEC, credentials=config.credentials) return [ - crm_object_no_page(Company, http, fetch_recent_companies), - crm_object_no_page(Contact, http, fetch_recent_contacts), - crm_object_no_page(Deal, http, fetch_recent_deals), - crm_object_no_page(Engagement, http, fetch_recent_engagements), - crm_object_no_page(Ticket, http, fetch_recent_tickets), - crm_object_no_changes(EngagementCalls, http, fetch_engagements_calls), - crm_object_no_changes(EngagementEmails, http, fetch_engagements_emails), - crm_object_no_changes(EngagementMeetings, http, fetch_engagements_meetings), - crm_object_no_changes(EngagementNotes, http, fetch_engagements_notes), - crm_object_no_changes(EngagementTasks, http, fetch_engagements_tasks), - crm_object_no_page(ContactLists, http, fetch_recent_contacts_lists), + crm_object_streamed(Company, http, fetch_recent_companies), + crm_object_streamed(Contact, http, fetch_recent_contacts), + crm_object_streamed(Deal, http, fetch_recent_deals), + crm_object_streamed(Engagement, http, fetch_recent_engagements), + crm_object_streamed_no_batch(ContactLists, http, fetch_recent_contacts_lists), + crm_object_streamed_no_batch(ContactSubscription, http, fetch_contacts_lists_subscription), + crm_object_streamed_no_batch(Campaigns, http, fetch_campaigns), + crm_object_streamed_no_batch(SubscriptionChanges, http, fetch_recent_subscription_changes), + crm_object_streamed_no_batch(EmailEvents, http, fetch_recent_email_events), + crm_object_streamed_no_batch(TicketPipelines, http, fetch_recent_ticket_pipelines), + crm_object_streamed_no_batch(DealPipelines, http, fetch_recent_deal_pipelines), + crm_object_paginated(EngagementCalls, http, fetch_engagements_calls), + crm_object_paginated(EngagementEmails, http, fetch_engagements_emails), + crm_object_paginated(EngagementMeetings, http, fetch_engagements_meetings), + crm_object_paginated(EngagementNotes, http, fetch_engagements_notes), + crm_object_paginated(EngagementTasks, http, fetch_engagements_tasks), + crm_object_paginated(Goals, http, fetch_goals), + crm_object_paginated(FeedbackSubmissions, http, fetch_feedback_submissions), + crm_object_paginated(LineItems, http, fetch_line_items), + crm_object_paginated(Products, http, fetch_products), + crm_object_paginated(Ticket, http, fetch_recent_tickets), + crm_object_custom(MarketingEmails, http, fetch_recent_marketing_emails), + crm_object_custom(EmailSubscriptions, http, fetch_email_subscriptions), + crm_object_custom(MarketingForms, http, fetch_marketing_forms), + crm_object_custom(Owners, http, fetch_owners), + workflow_object(Workflows, http, fetch_workflows), properties(http), ] -def crm_object_no_changes( +def crm_object_paginated( cls: type[CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn ) -> common.Resource: + """Base Resource to run V3 API objects using pagination + Args: + cls (type[CRMObject]): _description_ + http (HTTPSession): _description_ + fetch_recent (FetchRecentFn): _description_ + + Returns: + common.Resource: _description_ + """ def open( binding: CaptureBinding[ResourceConfig], binding_index: int, @@ -91,21 +149,80 @@ def open( return common.Resource( name=cls.NAME, - key=["/id"], + key=cls.PRIMARY_KEY, + model=cls, + open=open, + initial_state=ResourceState( + inc=ResourceState.Incremental(cursor=started_at), + backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), + ), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), + schema_inference=True, + ) + +def crm_object_custom( + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn +) -> common.Resource: + """Custom Resource to run V3 objects using pagination + This endpoint allows for different URL objects from the V3 API + and handle some data formatting. It works very similar to + 'crm_object_paginated' + + Args: + cls (type[V1CRMObject]): _description_ + http (HTTPSession): _description_ + fetch_recent (FetchRecentFn): _description_ + + Returns: + common.Resource: _description_ + """ + + def open( + binding: CaptureBinding[ResourceConfig], + binding_index: int, + state: ResourceState, + task: Task, + ): + common.open_binding( + binding, + binding_index, + state, + task, + fetch_page=functools.partial(fetch_page_custom, cls, http), + ) + + started_at = datetime.now(tz=UTC) + + return common.Resource( + name=cls.NAME, + key=cls.PRIMARY_KEY, model=cls, open=open, initial_state=ResourceState( inc=ResourceState.Incremental(cursor=started_at), backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=5)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), schema_inference=True, ) -def crm_object_no_page( + +def crm_object_streamed( cls: type[CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn ) -> common.Resource: + """Base Resource to run V1 API objects using stream + This resource uses an batch endpoint from Hubspot. It works + by getting the Ids and last_updated data from fetch_recent + and passing it to the batch endpoint later on. + Args: + cls (type[CRMObject]): _description_ + http (HTTPSession): _description_ + fetch_recent (FetchRecentFn): _description_ + + Returns: + common.Resource: _description_ + """ def open( binding: CaptureBinding[ResourceConfig], binding_index: int, @@ -122,6 +239,90 @@ def open( started_at = datetime.now(tz=UTC) + return common.Resource( + name=cls.NAME, + key=cls.PRIMARY_KEY, + model=cls, + open=open, + initial_state=ResourceState( + inc=ResourceState.Incremental(cursor=started_at), + backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), + ), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), + schema_inference=True, + ) + + + +def crm_object_streamed_no_batch( + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn +) -> common.Resource: + """Custom Resource to run V1 API objects using stream + This resource does not use the batch function from "crm_object_streamed" + Allowing for a more broad usage. + + Args: + cls (type[V1CRMObject]): _description_ + http (HTTPSession): _description_ + fetch_recent (FetchRecentFn): _description_ + + Returns: + common.Resource: _description_ + """ + + def open( + binding: CaptureBinding[ResourceConfig], + binding_index: int, + state: ResourceState, + task: Task, + ): + common.open_binding( + binding, + binding_index, + state, + task, + fetch_changes=functools.partial(fetch_changes_no_batch, cls, fetch_recent, http), + ) + + started_at = datetime.now(tz=UTC) + + return common.Resource( + name=cls.NAME, + key=cls.PRIMARY_KEY, + model=cls, + open=open, + initial_state=ResourceState( + inc=ResourceState.Incremental(cursor=started_at), + backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), + ), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), + schema_inference=True, + ) + +def workflow_object( + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn +) -> common.Resource: + + """Custom Resource to run specifically workflow stream objects + Workflow objects do not have pagination neither a usual schema, + so this resource was created to handle this specific case. + """ + def open( + binding: CaptureBinding[ResourceConfig], + binding_index: int, + state: ResourceState, + task: Task, + ): + common.open_binding( + binding, + binding_index, + state, + task, + fetch_page=functools.partial(fetch_page_workflow, cls, http), + ) + + started_at = datetime.now(tz=UTC) + return common.Resource( name=cls.NAME, key=["/id"], @@ -131,11 +332,13 @@ 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=5)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), schema_inference=True, ) + + def properties(http: HTTPSession) -> common.Resource: async def snapshot(log: Logger) -> AsyncGenerator[Property, None]: @@ -173,7 +376,7 @@ def open( open=open, initial_state=ResourceState(), initial_config=ResourceConfig( - name=Names.properties, interval=timedelta(days=1) + name=Names.properties, interval=timedelta(minutes=7) ), schema_inference=True, ) diff --git a/source-hubspot-native/test.flow.yaml b/source-hubspot-native/test.flow.yaml index 14238c5da5..34d81bb5f7 100644 --- a/source-hubspot-native/test.flow.yaml +++ b/source-hubspot-native/test.flow.yaml @@ -13,63 +13,112 @@ captures: bindings: - resource: name: companies - interval: PT300S + interval: PT420S target: acmeCo/companies - disable: true - resource: name: contacts - interval: PT300S + interval: PT420S target: acmeCo/contacts - disable: true - resource: name: deals - interval: PT300S + interval: PT420S target: acmeCo/deals - disable: true - resource: name: engagements - interval: PT300S + interval: PT420S target: acmeCo/engagements - disable: true - resource: - name: tickets - interval: PT300S - target: acmeCo/tickets - disable: true + name: contact_lists + interval: PT420S + target: acmeCo/contact_lists + - resource: + name: contacts_lists_subscription + interval: PT420S + target: acmeCo/contacts_lists_subscription + - resource: + name: campaigns + interval: PT420S + target: acmeCo/campaigns + - resource: + name: subscription_changes + interval: PT420S + target: acmeCo/subscription_changes + - resource: + name: email_events + interval: PT420S + target: acmeCo/email_events + - resource: + name: ticket_pipelines + interval: PT420S + target: acmeCo/ticket_pipelines + - resource: + name: deal_pipelines + interval: PT420S + target: acmeCo/deal_pipelines - resource: name: engagements_calls - interval: PT10S + interval: PT420S target: acmeCo/engagements_calls - disable: true - resource: name: engagements_emails - interval: PT10S + interval: PT420S target: acmeCo/engagements_emails - resource: name: engagements_meetings - interval: PT10S + interval: PT420S target: acmeCo/engagements_meetings - disable: true - resource: name: engagements_notes - interval: PT10S + interval: PT420S target: acmeCo/engagements_notes - disable: true - resource: name: engagements_tasks - interval: PT10S + interval: PT420S target: acmeCo/engagements_tasks - disable: true - resource: - name: contact_lists - interval: PT10S - target: acmeCo/contact_lists - disable: true + name: goal_targets + interval: PT420S + target: acmeCo/goal_targets + - resource: + name: feedback_submissions + interval: PT420S + target: acmeCo/feedback_submissions + - resource: + name: line_items + interval: PT420S + target: acmeCo/line_items + - resource: + name: products + interval: PT420S + target: acmeCo/products + - resource: + name: tickets + interval: PT420S + target: acmeCo/tickets + - resource: + name: marketing_emails + interval: PT420S + target: acmeCo/marketing_emails + - resource: + name: email_subscriptions + interval: PT420S + target: acmeCo/email_subscriptions + - resource: + name: marketing_forms + interval: PT420S + target: acmeCo/marketing_forms + - resource: + name: owners + interval: PT420S + target: acmeCo/owners + - resource: + name: workflows + interval: PT420S + target: acmeCo/workflows - resource: name: properties - interval: P1D + interval: PT420S target: acmeCo/properties - disable: true interval: 3m shards: logLevel: debug diff --git a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json deleted file mode 100644 index 7d274d2864..0000000000 --- a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json +++ /dev/null @@ -1,5574 +0,0 @@ -[ - [ - "acmeCo/companies", - { - "archived": false, - "createdAt": "2024-02-08T02:37:20.547000Z", - "id": 19015508755, - "properties": { - "address": "25 First Street", - "address2": "2nd Floor", - "annualrevenue": "10000000000", - "city": "Cambridge", - "country": "United States", - "createdate": "2024-02-08T02:37:20.547Z", - "description": "HubSpot is a leading CRM platform that provides software and support to help businesses grow better. Our platform includes marketing, sales, service, and website management products that start free and scale to meet our customers\u2019 needs at any stage of...", - "domain": "hubspot.com", - "facebook_company_page": "https://facebook.com/hubspot", - "founded_year": "2006", - "hs_all_owner_ids": "722900407", - "hs_created_by_user_id": "63843671", - "hs_date_entered_lead": "2024-02-08T02:37:20.547Z", - "hs_lastmodifieddate": "2024-02-08T02:37:23.482Z", - "hs_num_blockers": "0", - "hs_num_child_companies": "0", - "hs_num_contacts_with_buying_roles": "0", - "hs_num_decision_makers": "0", - "hs_num_open_deals": "0", - "hs_object_id": "19015508755", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_pipeline": "companies-lifecycle-pipeline", - "hs_target_account_probability": "0.4076234698295593", - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hubspot_owner_assigneddate": "2024-02-08T02:37:20.547Z", - "hubspot_owner_id": "722900407", - "industry": "COMPUTER_SOFTWARE", - "is_public": "true", - "lifecyclestage": "lead", - "linkedin_company_page": "https://www.linkedin.com/company/hubspot", - "linkedinbio": "HubSpot is a leading CRM platform that provides software and support to help businesses grow better. Our platform includes marketing, sales, service, and website management products that start free and scale to meet our customers\u2019 needs at any stage of...", - "name": "HubSpot, Inc.", - "num_associated_contacts": "0", - "numberofemployees": "10000", - "phone": "+1 888-482-7768", - "state": "MA", - "timezone": "America/New_York", - "twitterhandle": "HubSpot", - "web_technologies": "unbounce;app_nexus;piwik;salesforce;stripe;cloud_flare;dstillery;twitter_button;hubspot;youtube;vidyard;facebook_connect", - "website": "hubspot.com", - "zip": "02141" - }, - "propertiesWithHistory": { - "address": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "25 First Street" - } - ], - "address2": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "2nd Floor" - } - ], - "annualrevenue": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "10000000000" - } - ], - "city": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "Cambridge" - } - ], - "country": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "United States" - } - ], - "createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:37:20.547Z" - } - ], - "description": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "HubSpot is a leading CRM platform that provides software and support to help businesses grow better. Our platform includes marketing, sales, service, and website management products that start free and scale to meet our customers\u2019 needs at any stage of..." - } - ], - "domain": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "hubspot.com" - } - ], - "facebook_company_page": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "https://facebook.com/hubspot" - } - ], - "founded_year": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "2006" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:20.547000Z", - "value": "2024-02-08T02:37:20.547Z" - } - ], - "hs_lastmodifieddate": [ - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:23.482000Z", - "value": "2024-02-08T02:37:23.482Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:21.947000Z", - "value": "2024-02-08T02:37:21.947Z" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:21.338000Z", - "value": "2024-02-08T02:37:21.338Z" - }, - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.735000Z", - "value": "2024-02-08T02:37:20.735Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "value": "2024-02-08T02:37:20.547Z" - } - ], - "hs_num_blockers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:21.936000Z", - "value": "0" - } - ], - "hs_num_child_companies": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:21.937000Z", - "value": "0" - } - ], - "hs_num_contacts_with_buying_roles": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:21.936000Z", - "value": "0" - } - ], - "hs_num_decision_makers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:21.936000Z", - "value": "0" - } - ], - "hs_num_open_deals": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:21.937000Z", - "value": "0" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "19015508755" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_pipeline": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "companies-lifecycle-pipeline" - } - ], - "hs_target_account_probability": [ - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:23.482000Z", - "value": "0.4076234698295593" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:21.338000Z", - "value": "0.49565839767456055" - } - ], - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:37:20.547Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "industry": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "COMPUTER_SOFTWARE" - } - ], - "is_public": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "true" - } - ], - "lifecyclestage": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "lead" - } - ], - "linkedin_company_page": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "https://www.linkedin.com/company/hubspot" - } - ], - "linkedinbio": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "HubSpot is a leading CRM platform that provides software and support to help businesses grow better. Our platform includes marketing, sales, service, and website management products that start free and scale to meet our customers\u2019 needs at any stage of..." - } - ], - "name": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "HubSpot, Inc." - } - ], - "num_associated_contacts": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:21.936000Z", - "value": "0" - } - ], - "numberofemployees": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "10000" - } - ], - "phone": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "+1 888-482-7768" - } - ], - "state": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "MA" - } - ], - "timezone": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "America/New_York" - } - ], - "twitterhandle": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "HubSpot" - } - ], - "web_technologies": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:20.724000Z", - "value": "unbounce;app_nexus;piwik;salesforce;stripe;cloud_flare;dstillery;twitter_button;hubspot;youtube;vidyard;facebook_connect" - } - ], - "website": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "hubspot.com" - } - ], - "zip": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:20.547000Z", - "updatedByUserId": 63843671, - "value": "02141" - } - ] - }, - "updatedAt": "2024-02-08T02:37:23.482000Z" - } - ], - [ - "acmeCo/companies", - { - "archived": false, - "contacts": [ - 151, - 151 - ], - "createdAt": "2024-02-08T02:37:53.193000Z", - "id": 19015508766, - "properties": { - "address": "588 Broadway", - "address2": "502", - "annualrevenue": "1000000000", - "city": "New York", - "country": "United States", - "createdate": "2024-02-08T02:37:53.193Z", - "description": "LiveRamp Holdings, Inc., formerly known as Acxiom Corporation, is a San Francisco, California-based SaaS company that offers a data connectivity platform whose services include data onboarding, the transfer of offline data online for marketing purposes.", - "domain": "arbor.io", - "facebook_company_page": "https://facebook.com/liveramp", - "first_contact_createdate": "2024-02-08T16:09:32.359Z", - "founded_year": "1969", - "hs_all_owner_ids": "722900407", - "hs_analytics_first_timestamp": "2024-02-08T16:09:32.359Z", - "hs_analytics_latest_source": "OFFLINE", - "hs_analytics_latest_source_data_1": "CRM_UI", - "hs_analytics_latest_source_data_2": "userId:63843671", - "hs_analytics_latest_source_timestamp": "2024-02-08T16:09:32.494Z", - "hs_analytics_num_page_views": "0", - "hs_analytics_num_visits": "0", - "hs_analytics_source": "OFFLINE", - "hs_analytics_source_data_1": "CRM_UI", - "hs_analytics_source_data_2": "userId:63843671", - "hs_created_by_user_id": "63843671", - "hs_date_entered_lead": "2024-02-08T02:37:53.193Z", - "hs_lastmodifieddate": "2024-02-22T14:19:02.860Z", - "hs_num_blockers": "0", - "hs_num_child_companies": "0", - "hs_num_contacts_with_buying_roles": "0", - "hs_num_decision_makers": "0", - "hs_num_open_deals": "0", - "hs_object_id": "19015508766", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_parent_company_id": "19021320226", - "hs_pipeline": "companies-lifecycle-pipeline", - "hs_target_account_probability": "0.38625118136405945", - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hubspot_owner_assigneddate": "2024-02-08T02:37:53.193Z", - "hubspot_owner_id": "722900407", - "industry": "COMPUTER_SOFTWARE", - "is_public": "false", - "lifecyclestage": "lead", - "linkedin_company_page": "https://www.linkedin.com/company/liveramp", - "linkedinbio": "LiveRamp Holdings, Inc., formerly known as Acxiom Corporation, is a San Francisco, California-based SaaS company that offers a data connectivity platform whose services include data onboarding, the transfer of offline data online for marketing purposes.", - "name": "Arbor", - "num_associated_contacts": "1", - "num_conversion_events": "0", - "numberofemployees": "4001", - "phone": "+1 415-243-0776", - "state": "NY", - "timezone": "America/New_York", - "total_money_raised": "9050000", - "twitterhandle": "LiveRamp", - "web_technologies": "aws_route_53;google_tag_manager", - "website": "arbor.io", - "zip": "10012" - }, - "propertiesWithHistory": { - "address": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "588 Broadway" - } - ], - "address2": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-22T14:19:02.860000Z", - "value": "502" - } - ], - "annualrevenue": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "1000000000" - } - ], - "city": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "New York" - } - ], - "country": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "United States" - } - ], - "createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:37:53.193Z" - } - ], - "description": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "LiveRamp Holdings, Inc., formerly known as Acxiom Corporation, is a San Francisco, California-based SaaS company that offers a data connectivity platform whose services include data onboarding, the transfer of offline data online for marketing purposes." - } - ], - "domain": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "arbor.io" - } - ], - "facebook_company_page": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "https://facebook.com/liveramp" - } - ], - "first_contact_createdate": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.572000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "founded_year": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "1969" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_analytics_first_timestamp": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.572000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "hs_analytics_latest_source": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.203000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_latest_source_data_1": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.203000Z", - "value": "CRM_UI" - } - ], - "hs_analytics_latest_source_data_2": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.203000Z", - "value": "userId:63843671" - } - ], - "hs_analytics_latest_source_timestamp": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.203000Z", - "value": "2024-02-08T16:09:32.494Z" - } - ], - "hs_analytics_num_page_views": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.572000Z", - "value": "0" - } - ], - "hs_analytics_num_visits": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.572000Z", - "value": "0" - } - ], - "hs_analytics_source": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.205000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_source_data_1": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.203000Z", - "value": "CRM_UI" - } - ], - "hs_analytics_source_data_2": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.204000Z", - "value": "userId:63843671" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:53.193000Z", - "value": "2024-02-08T02:37:53.193Z" - } - ], - "hs_lastmodifieddate": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-22T14:19:02.860000Z", - "value": "2024-02-22T14:19:02.860Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.592000Z", - "value": "2024-02-08T22:09:56.592Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T22:08:41.735000Z", - "value": "2024-02-08T22:08:41.735Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T21:54:50.460000Z", - "value": "2024-02-08T21:54:50.460Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:10:05.886000Z", - "value": "2024-02-08T17:10:05.886Z" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T16:10:37.339000Z", - "value": "2024-02-08T16:10:37.339Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.220000Z", - "value": "2024-02-08T16:10:33.220Z" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:57.329000Z", - "value": "2024-02-08T02:37:57.329Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:54.821000Z", - "value": "2024-02-08T02:37:54.821Z" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:54.020000Z", - "value": "2024-02-08T02:37:54.020Z" - }, - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.538000Z", - "value": "2024-02-08T02:37:53.538Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "value": "2024-02-08T02:37:53.193Z" - } - ], - "hs_num_blockers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:54.800000Z", - "value": "0" - } - ], - "hs_num_child_companies": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:54.802000Z", - "value": "0" - } - ], - "hs_num_contacts_with_buying_roles": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:54.778000Z", - "value": "0" - } - ], - "hs_num_decision_makers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:54.800000Z", - "value": "0" - } - ], - "hs_num_open_deals": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:54.800000Z", - "value": "0" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "19015508766" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_parent_company_id": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:10:05.844000Z", - "value": "19021320226" - } - ], - "hs_pipeline": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "companies-lifecycle-pipeline" - } - ], - "hs_target_account_probability": [ - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T16:10:37.339000Z", - "value": "0.38625118136405945" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:57.329000Z", - "value": "0.4076234698295593" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:37:54.020000Z", - "value": "0.49565839767456055" - } - ], - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:37:53.193Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "industry": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "COMPUTER_SOFTWARE" - } - ], - "is_public": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-22T14:19:02.860000Z", - "value": "false" - }, - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "true" - } - ], - "lifecyclestage": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "lead" - } - ], - "linkedin_company_page": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "https://www.linkedin.com/company/liveramp" - } - ], - "linkedinbio": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "LiveRamp Holdings, Inc., formerly known as Acxiom Corporation, is a San Francisco, California-based SaaS company that offers a data connectivity platform whose services include data onboarding, the transfer of offline data online for marketing purposes." - } - ], - "name": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "Arbor" - } - ], - "num_associated_contacts": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:33.204000Z", - "value": "1" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:54.801000Z", - "value": "0" - } - ], - "num_conversion_events": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.572000Z", - "value": "0" - } - ], - "numberofemployees": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T22:08:41.735000Z", - "updatedByUserId": 63843671, - "value": "4001" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T21:54:50.460000Z", - "updatedByUserId": 63843671, - "value": "4000" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "5000" - } - ], - "phone": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "+1 415-243-0776" - } - ], - "state": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "NY" - } - ], - "timezone": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "America/New_York" - } - ], - "total_money_raised": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-22T14:19:02.860000Z", - "value": "9050000" - } - ], - "twitterhandle": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "LiveRamp" - } - ], - "web_technologies": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-22T14:19:02.860000Z", - "value": "aws_route_53;google_tag_manager" - }, - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:37:53.530000Z", - "value": "aws_route_53;wistia;wordpress;unbounce;facebook_advertiser;salesforce;app_nexus;drift;nginx;sendgrid;mailgun;marketo;google_analytics;google_apps;bug_herd;qualtrics;google_maps;live_chat;hotjar;google_tag_manager;bing_advertiser" - } - ], - "website": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "arbor.io" - } - ], - "zip": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:37:53.193000Z", - "updatedByUserId": 63843671, - "value": "10012" - } - ] - }, - "updatedAt": "2024-02-22T14:19:02.860000Z" - } - ], - [ - "acmeCo/companies", - { - "archived": false, - "contacts": [ - 51, - 201, - 51, - 201 - ], - "createdAt": "2024-02-08T02:36:27.739000Z", - "id": 19015593502, - "properties": { - "address": "244 5th Avenue", - "address2": "1277", - "annualrevenue": "1000000", - "city": "New York", - "country": "United States", - "createdate": "2024-02-08T02:36:27.739Z", - "description": "Estuary is a real-time data operations platform that helps organizations gain real-time access to their data without having to manage infrastructure. They provide fully managed real-time data pipelines, streaming SQL, and turnkey connectivity to clouds...", - "domain": "estuary.dev", - "first_contact_createdate": "2024-02-08T02:34:10.795Z", - "founded_year": "2019", - "hs_all_owner_ids": "722900407", - "hs_analytics_first_timestamp": "2024-02-08T02:34:10.795Z", - "hs_analytics_latest_source": "OFFLINE", - "hs_analytics_latest_source_data_1": "CRM_UI", - "hs_analytics_latest_source_data_2": "userId:63843671", - "hs_analytics_latest_source_timestamp": "2024-02-08T16:11:29.338Z", - "hs_analytics_num_page_views": "0", - "hs_analytics_num_visits": "0", - "hs_analytics_source": "OFFLINE", - "hs_analytics_source_data_1": "API", - "hs_analytics_source_data_2": "sample-contact", - "hs_created_by_user_id": "63843671", - "hs_date_entered_lead": "2024-02-08T02:36:27.739Z", - "hs_lastmodifieddate": "2024-02-29T17:12:01.335Z", - "hs_num_blockers": "0", - "hs_num_child_companies": "0", - "hs_num_contacts_with_buying_roles": "0", - "hs_num_decision_makers": "0", - "hs_num_open_deals": "0", - "hs_object_id": "19015593502", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_pipeline": "companies-lifecycle-pipeline", - "hs_target_account_probability": "0.5596858859062195", - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hubspot_owner_assigneddate": "2024-02-08T02:36:27.739Z", - "hubspot_owner_id": "722900407", - "industry": "COMPUTER_SOFTWARE", - "is_public": "false", - "lifecyclestage": "lead", - "linkedin_company_page": "https://www.linkedin.com/company/estuary-development", - "linkedinbio": "Estuary is a real-time data operations platform that helps organizations gain real-time access to their data without having to manage infrastructure. They provide fully managed real-time data pipelines, streaming SQL, and turnkey connectivity to clouds...", - "name": "Estuary", - "notes_last_updated": "2024-02-15T17:25:49.545Z", - "num_associated_contacts": "2", - "num_contacted_notes": "0", - "num_conversion_events": "0", - "num_notes": "1", - "numberofemployees": "16", - "state": "NY", - "timezone": "America/New_York", - "twitterhandle": "EstuaryDev", - "type": "PARTNER", - "web_technologies": "google_tag_manager;google_analytics;google_apps;hubspot", - "website": "estuary.dev", - "zip": "10001" - }, - "propertiesWithHistory": { - "address": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "244 5th Avenue" - } - ], - "address2": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "1277" - } - ], - "annualrevenue": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-29T17:12:01.335000Z", - "updatedByUserId": 63843671, - "value": "1000000" - }, - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "10000000" - } - ], - "city": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "New York" - } - ], - "country": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:36:27.924000Z", - "value": "United States" - } - ], - "createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:36:27.739Z" - } - ], - "description": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "Estuary is a real-time data operations platform that helps organizations gain real-time access to their data without having to manage infrastructure. They provide fully managed real-time data pipelines, streaming SQL, and turnkey connectivity to clouds..." - } - ], - "domain": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "estuary.dev" - } - ], - "first_contact_createdate": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:10:54.869000Z", - "value": "2024-02-08T02:34:10.795Z" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.440000Z", - "value": "2024-02-08T16:11:29.216Z" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.011000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "founded_year": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:36:27.924000Z", - "value": "2019" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_analytics_first_timestamp": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:10:54.869000Z", - "value": "2024-02-08T02:34:10.795Z" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.440000Z", - "value": "2024-02-08T16:11:29.216Z" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.011000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "hs_analytics_latest_source": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.017000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_latest_source_data_1": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.011000Z", - "value": "CRM_UI" - } - ], - "hs_analytics_latest_source_data_2": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.011000Z", - "value": "userId:63843671" - } - ], - "hs_analytics_latest_source_timestamp": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:58.715000Z", - "value": "2024-02-08T16:11:29.338Z" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.008000Z", - "value": "2024-02-08T16:09:32.494Z" - } - ], - "hs_analytics_num_page_views": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.011000Z", - "value": "0" - } - ], - "hs_analytics_num_visits": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.011000Z", - "value": "0" - } - ], - "hs_analytics_source": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.008000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_source_data_1": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:10:51.696000Z", - "value": "API" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.011000Z", - "value": "CRM_UI" - } - ], - "hs_analytics_source_data_2": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:10:51.690000Z", - "value": "sample-contact" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.010000Z", - "value": "userId:63843671" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:27.739000Z", - "value": "2024-02-08T02:36:27.739Z" - } - ], - "hs_lastmodifieddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-29T17:12:01.335000Z", - "updatedByUserId": 63843671, - "value": "2024-02-29T17:12:01.335Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-28T22:41:14.697000Z", - "updatedByUserId": 63843671, - "value": "2024-02-28T22:41:14.697Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-27T06:53:41.988000Z", - "updatedByUserId": 63843671, - "value": "2024-02-27T06:53:41.988Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:26:37.587000Z", - "updatedByUserId": 63843671, - "value": "2024-02-22T23:26:37.587Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:23:08.594000Z", - "updatedByUserId": 63843671, - "value": "2024-02-22T23:23:08.594Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-19T23:39:42.776000Z", - "updatedByUserId": 63843671, - "value": "2024-02-19T23:39:42.776Z" - }, - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "2024-02-19T21:39:53.367Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-18T17:52:20.186000Z", - "updatedByUserId": 63843671, - "value": "2024-02-18T17:52:20.186Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-18T06:08:57.124000Z", - "updatedByUserId": 63843671, - "value": "2024-02-18T06:08:57.124Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-18T03:29:14.434000Z", - "updatedByUserId": 63843671, - "value": "2024-02-18T03:29:14.434Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T21:17:08.372000Z", - "updatedByUserId": 63843671, - "value": "2024-02-17T21:17:08.372Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T20:53:35.872000Z", - "updatedByUserId": 63843671, - "value": "2024-02-17T20:53:35.872Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T20:47:43.798000Z", - "updatedByUserId": 63843671, - "value": "2024-02-17T20:47:43.798Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T20:29:18.374000Z", - "updatedByUserId": 63843671, - "value": "2024-02-17T20:29:18.374Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:02:54.959000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T23:02:54.959Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-16T22:56:59.886000Z", - "value": "2024-02-16T22:56:59.886Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T22:53:03.486000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T22:53:03.486Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T22:49:04.665000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T22:49:04.665Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T21:58:32.815000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T21:58:32.815Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T17:37:34.730000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T17:37:34.730Z" - } - ], - "hs_num_blockers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:29.174000Z", - "value": "0" - } - ], - "hs_num_child_companies": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:29.173000Z", - "value": "0" - } - ], - "hs_num_contacts_with_buying_roles": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:29.172000Z", - "value": "0" - } - ], - "hs_num_decision_makers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:29.172000Z", - "value": "0" - } - ], - "hs_num_open_deals": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:29.174000Z", - "value": "0" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "19015593502" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_pipeline": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "companies-lifecycle-pipeline" - } - ], - "hs_target_account_probability": [ - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T22:10:53.915000Z", - "value": "0.5596858859062195" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T22:09:58.632000Z", - "value": "0.38625118136405945" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T16:11:43.820000Z", - "value": "0.5596858859062195" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T16:10:22.578000Z", - "value": "0.38625118136405945" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:36:31.248000Z", - "value": "0.4076234698295593" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:36:28.052000Z", - "value": "0.49565839767456055" - } - ], - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:36:27.739Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "industry": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "COMPUTER_SOFTWARE" - } - ], - "is_public": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:36:27.924000Z", - "value": "false" - } - ], - "lifecyclestage": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "lead" - } - ], - "linkedin_company_page": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "https://www.linkedin.com/company/estuary-development" - } - ], - "linkedinbio": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "Estuary is a real-time data operations platform that helps organizations gain real-time access to their data without having to manage infrastructure. They provide fully managed real-time data pipelines, streaming SQL, and turnkey connectivity to clouds..." - } - ], - "name": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "Estuary" - } - ], - "notes_last_updated": [ - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-16T22:56:59.825000Z", - "value": "2024-02-15T17:25:49.545Z" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T18:06:43.556000Z", - "value": "2024-02-15T17:44:16.024Z" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T18:06:15.315000Z", - "value": "2024-02-15T18:06:08.845Z" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T18:06:02.541000Z", - "value": "2024-02-15T17:44:16.024Z" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T17:54:19.784000Z", - "value": "2024-02-15T17:54:14.726Z" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T17:44:21.881000Z", - "value": "2024-02-15T17:44:16.024Z" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T17:25:56.485000Z", - "value": "2024-02-15T17:25:49.545Z" - } - ], - "num_associated_contacts": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:10:51.689000Z", - "value": "2" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.439000Z", - "value": "1" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:42.224000Z", - "value": "2" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.008000Z", - "value": "1" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:29.172000Z", - "value": "0" - } - ], - "num_contacted_notes": [ - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T17:25:56.485000Z", - "value": "0" - } - ], - "num_conversion_events": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.010000Z", - "value": "0" - } - ], - "num_notes": [ - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-16T22:56:59.825000Z", - "value": "1" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T18:06:43.556000Z", - "value": "2" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T18:06:15.315000Z", - "value": "3" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T18:06:02.541000Z", - "value": "2" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T17:54:19.784000Z", - "value": "3" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T17:44:21.881000Z", - "value": "2" - }, - { - "sourceId": "rollup", - "sourceType": "ENGAGEMENTS", - "timestamp": "2024-02-15T17:25:56.485000Z", - "value": "1" - } - ], - "numberofemployees": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-28T22:41:14.697000Z", - "updatedByUserId": 63843671, - "value": "16" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-27T06:53:41.988000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:26:37.587000Z", - "updatedByUserId": 63843671, - "value": "16" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:23:08.594000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-19T23:39:42.776000Z", - "updatedByUserId": 63843671, - "value": "14" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-18T17:52:20.186000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-18T06:08:57.124000Z", - "updatedByUserId": 63843671, - "value": "14" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-18T03:29:14.434000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T21:17:08.372000Z", - "updatedByUserId": 63843671, - "value": "16" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T20:53:35.872000Z", - "updatedByUserId": 63843671, - "value": "14" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T20:47:43.798000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-17T20:29:18.374000Z", - "updatedByUserId": 63843671, - "value": "14" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:02:54.959000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T22:53:03.486000Z", - "updatedByUserId": 63843671, - "value": "14" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T22:49:04.665000Z", - "updatedByUserId": 63843671, - "value": "13" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T21:58:32.815000Z", - "updatedByUserId": 63843671, - "value": "14" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T17:37:34.730000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:24:50.065000Z", - "updatedByUserId": 63843671, - "value": "14" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:21:40.212000Z", - "updatedByUserId": 63843671, - "value": "15" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T16:22:08.223000Z", - "updatedByUserId": 63843671, - "value": "16" - } - ], - "state": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "NY" - } - ], - "timezone": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "America/New_York" - } - ], - "twitterhandle": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "EstuaryDev" - } - ], - "type": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-14T17:27:50.900000Z", - "updatedByUserId": 63843671, - "value": "PARTNER" - } - ], - "web_technologies": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "google_tag_manager;google_analytics;google_apps;hubspot" - }, - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-08T02:36:27.924000Z", - "value": "apache;hotjar;wordpress;google_tag_manager;google_analytics;piwik;google_apps;hubspot" - } - ], - "website": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:36:27.739000Z", - "updatedByUserId": 63843671, - "value": "estuary.dev" - } - ], - "zip": [ - { - "sourceType": "COMPANY_INSIGHTS", - "timestamp": "2024-02-19T21:39:53.367000Z", - "value": "10001" - } - ] - }, - "updatedAt": "2024-02-29T17:12:01.335000Z" - } - ], - [ - "acmeCo/companies", - { - "archived": false, - "createdAt": "2024-02-08T17:09:41.623000Z", - "id": 19021320226, - "properties": { - "city": "New York", - "createdate": "2024-02-08T17:09:41.623Z", - "hs_all_owner_ids": "722900407", - "hs_created_by_user_id": "63843671", - "hs_date_entered_lead": "2024-02-08T17:09:41.623Z", - "hs_lastmodifieddate": "2024-02-08T21:52:54.064Z", - "hs_num_blockers": "0", - "hs_num_child_companies": "1", - "hs_num_contacts_with_buying_roles": "0", - "hs_num_decision_makers": "0", - "hs_num_open_deals": "0", - "hs_object_id": "19021320226", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_pipeline": "companies-lifecycle-pipeline", - "hs_target_account_probability": "0.4076234698295593", - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hubspot_owner_assigneddate": "2024-02-08T17:09:41.623Z", - "hubspot_owner_id": "722900407", - "lifecyclestage": "lead", - "name": "LiveRamp", - "num_associated_contacts": "0", - "state": "NY", - "type": "PROSPECT" - }, - "propertiesWithHistory": { - "city": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T21:52:54.064000Z", - "updatedByUserId": 63843671, - "value": "New York" - } - ], - "createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T17:09:41.623Z" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:41.623000Z", - "value": "2024-02-08T17:09:41.623Z" - } - ], - "hs_lastmodifieddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T21:52:54.064000Z", - "value": "2024-02-08T21:52:54.064Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T20:47:47.235000Z", - "value": "2024-02-08T20:47:47.235Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:10:04.990000Z", - "value": "2024-02-08T17:10:04.990Z" - }, - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T17:09:46.673000Z", - "value": "2024-02-08T17:09:46.673Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:44.918000Z", - "value": "2024-02-08T17:09:44.918Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "value": "2024-02-08T17:09:41.623Z" - } - ], - "hs_num_blockers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:44.908000Z", - "value": "0" - } - ], - "hs_num_child_companies": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:10:04.974000Z", - "value": "1" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:44.908000Z", - "value": "0" - } - ], - "hs_num_contacts_with_buying_roles": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:44.934000Z", - "value": "0" - } - ], - "hs_num_decision_makers": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:44.908000Z", - "value": "0" - } - ], - "hs_num_open_deals": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:44.908000Z", - "value": "0" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "19021320226" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_pipeline": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "companies-lifecycle-pipeline" - } - ], - "hs_target_account_probability": [ - { - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T17:09:46.673000Z", - "value": "0.4076234698295593" - } - ], - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T17:09:41.623Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "lifecyclestage": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "lead" - } - ], - "name": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T17:09:41.623000Z", - "updatedByUserId": 63843671, - "value": "LiveRamp" - } - ], - "num_associated_contacts": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T17:09:44.908000Z", - "value": "0" - } - ], - "state": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T21:52:54.064000Z", - "updatedByUserId": 63843671, - "value": "NY" - } - ], - "type": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T20:47:47.235000Z", - "updatedByUserId": 63843671, - "value": "PROSPECT" - } - ] - }, - "updatedAt": "2024-02-08T21:52:54.064000Z" - } - ], - [ - "acmeCo/contacts", - { - "archived": false, - "createdAt": "2024-02-08T02:34:10.399000Z", - "id": 1, - "properties": { - "city": "Brisbane", - "company": "HubSpot", - "createdate": "2024-02-08T02:34:10.399Z", - "email": "emailmaria@hubspot.com", - "first_deal_created_date": "2024-02-08T02:34:37.277Z", - "firstname": "Maria", - "hs_analytics_average_page_views": "0", - "hs_analytics_first_timestamp": "2024-02-08T02:34:10.388Z", - "hs_analytics_num_event_completions": "0", - "hs_analytics_num_page_views": "0", - "hs_analytics_num_visits": "0", - "hs_analytics_revenue": "0.0", - "hs_analytics_source": "OFFLINE", - "hs_analytics_source_data_1": "API", - "hs_analytics_source_data_2": "sample-contact", - "hs_date_entered_lead": "2024-02-08T02:34:10.388Z", - "hs_date_entered_opportunity": "2024-02-08T02:34:38.253Z", - "hs_date_exited_lead": "2024-02-08T02:34:38.253Z", - "hs_is_unworked": "true", - "hs_latest_source": "OFFLINE", - "hs_latest_source_data_1": "API", - "hs_latest_source_data_2": "sample-contact", - "hs_latest_source_timestamp": "2024-02-08T02:34:10.499Z", - "hs_lifecyclestage_lead_date": "2024-02-08T02:34:10.388Z", - "hs_lifecyclestage_opportunity_date": "2024-02-08T02:34:38.253Z", - "hs_marketable_reason_id": "Sample Contact", - "hs_marketable_reason_type": "SAMPLE_CONTACT", - "hs_marketable_status": "true", - "hs_marketable_until_renewal": "true", - "hs_object_id": "1", - "hs_object_source": "API", - "hs_object_source_id": "sample-contact", - "hs_object_source_label": "INTERNAL_PROCESSING", - "hs_pipeline": "contacts-lifecycle-pipeline", - "hs_sequences_actively_enrolled_count": "0", - "hs_social_facebook_clicks": "0", - "hs_social_google_plus_clicks": "0", - "hs_social_linkedin_clicks": "0", - "hs_social_num_broadcast_clicks": "0", - "hs_social_twitter_clicks": "0", - "hs_time_between_contact_creation_and_deal_creation": "26878", - "hs_time_in_lead": "redacted", - "hs_time_in_opportunity": "redacted", - "hs_v2_cumulative_time_in_lead": "27865", - "hs_v2_date_entered_lead": "2024-02-08T02:34:10.388Z", - "hs_v2_date_entered_opportunity": "2024-02-08T02:34:38.253Z", - "hs_v2_date_exited_lead": "2024-02-08T02:34:38.253Z", - "hs_v2_latest_time_in_lead": "27865", - "jobtitle": "Salesperson", - "lastmodifieddate": "2024-02-08T02:34:44.268Z", - "lastname": "Johnson (Sample Contact)", - "lifecyclestage": "opportunity", - "num_associated_deals": "1", - "state": "QLD", - "website": "http://www.HubSpot.com" - }, - "propertiesWithHistory": { - "city": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "Brisbane" - } - ], - "company": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "HubSpot" - } - ], - "createdate": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.399000Z", - "value": "2024-02-08T02:34:10.399Z" - } - ], - "email": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "emailmaria@hubspot.com" - } - ], - "first_deal_created_date": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:39.295000Z", - "value": "2024-02-08T02:34:37.277Z" - } - ], - "firstname": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "Maria" - } - ], - "hs_analytics_average_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_analytics_first_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "2024-02-08T02:34:10.388Z" - } - ], - "hs_analytics_num_event_completions": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_analytics_num_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_analytics_num_visits": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_analytics_revenue": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0.0" - } - ], - "hs_analytics_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "API" - } - ], - "hs_analytics_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "sample-contact" - } - ], - "hs_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "2024-02-08T02:34:10.388Z" - } - ], - "hs_date_entered_opportunity": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.253000Z", - "value": "2024-02-08T02:34:38.253Z" - } - ], - "hs_date_exited_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.253000Z", - "value": "2024-02-08T02:34:38.253Z" - } - ], - "hs_is_unworked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:10.399000Z", - "value": "true" - } - ], - "hs_latest_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "OFFLINE" - } - ], - "hs_latest_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "API" - } - ], - "hs_latest_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "sample-contact" - } - ], - "hs_latest_source_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "2024-02-08T02:34:10.499Z" - } - ], - "hs_lifecyclestage_lead_date": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "2024-02-08T02:34:10.388Z" - } - ], - "hs_lifecyclestage_opportunity_date": [ - { - "sourceId": "deals-lifecycle-sync", - "sourceType": "DEALS", - "timestamp": "2024-02-08T02:34:38.253000Z", - "value": "2024-02-08T02:34:38.253Z" - } - ], - "hs_marketable_reason_id": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.693000Z", - "value": "Sample Contact" - } - ], - "hs_marketable_reason_type": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.693000Z", - "value": "SAMPLE_CONTACT" - } - ], - "hs_marketable_status": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.693000Z", - "value": "true" - } - ], - "hs_marketable_until_renewal": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.693000Z", - "value": "true" - } - ], - "hs_object_id": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.399000Z", - "value": "1" - } - ], - "hs_object_source": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.399000Z", - "value": "API" - } - ], - "hs_object_source_id": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.399000Z", - "value": "sample-contact" - } - ], - "hs_object_source_label": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.399000Z", - "value": "INTERNAL_PROCESSING" - } - ], - "hs_pipeline": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "contacts-lifecycle-pipeline" - } - ], - "hs_sequences_actively_enrolled_count": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:11.820000Z", - "value": "0" - } - ], - "hs_social_facebook_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_social_google_plus_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_social_linkedin_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_social_num_broadcast_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_social_twitter_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "0" - } - ], - "hs_time_between_contact_creation_and_deal_creation": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:39.306000Z", - "value": "26878" - } - ], - "hs_time_in_lead": "redacted", - "hs_time_in_opportunity": "redacted", - "hs_v2_cumulative_time_in_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:44.257000Z", - "value": "27865" - } - ], - "hs_v2_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:13.359000Z", - "value": "2024-02-08T02:34:10.388Z" - } - ], - "hs_v2_date_entered_opportunity": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:44.304000Z", - "value": "2024-02-08T02:34:38.253Z" - } - ], - "hs_v2_date_exited_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:44.258000Z", - "value": "2024-02-08T02:34:38.253Z" - } - ], - "hs_v2_latest_time_in_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:44.257000Z", - "value": "27865" - } - ], - "jobtitle": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "Salesperson" - } - ], - "lastmodifieddate": [ - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:44.268000Z", - "value": "2024-02-08T02:34:44.268Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:39.306000Z", - "value": "2024-02-08T02:34:39.306Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:38.253000Z", - "value": "2024-02-08T02:34:38.253Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:15.950000Z", - "value": "2024-02-08T02:34:15.950Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:13.375000Z", - "value": "2024-02-08T02:34:13.375Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:11.836000Z", - "value": "2024-02-08T02:34:11.836Z" - }, - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.693000Z", - "value": "2024-02-08T02:34:10.693Z" - }, - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.399000Z", - "value": "2024-02-08T02:34:10.399Z" - } - ], - "lastname": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "Johnson (Sample Contact)" - } - ], - "lifecyclestage": [ - { - "sourceId": "deals-lifecycle-sync", - "sourceType": "DEALS", - "timestamp": "2024-02-08T02:34:38.253000Z", - "value": "opportunity" - }, - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "lead" - } - ], - "num_associated_deals": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:39.295000Z", - "value": "1" - } - ], - "state": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "QLD" - } - ], - "website": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "http://www.HubSpot.com" - } - ] - }, - "updatedAt": "2024-02-08T02:34:44.268000Z" - } - ], - [ - "acmeCo/contacts", - { - "archived": false, - "companies": [ - 19015593502, - 19015593502 - ], - "createdAt": "2024-02-08T02:34:10.795000Z", - "id": 51, - "properties": { - "associatedcompanyid": "19015593502", - "city": "Cambridge", - "company": "HubSpot", - "createdate": "2024-02-08T02:34:10.795Z", - "email": "bh@hubspot.com", - "firstname": "Brian", - "hs_all_owner_ids": "722900407", - "hs_analytics_average_page_views": "0", - "hs_analytics_first_timestamp": "2024-02-08T02:34:10.795Z", - "hs_analytics_num_event_completions": "0", - "hs_analytics_num_page_views": "0", - "hs_analytics_num_visits": "0", - "hs_analytics_revenue": "0.0", - "hs_analytics_source": "OFFLINE", - "hs_analytics_source_data_1": "API", - "hs_analytics_source_data_2": "sample-contact", - "hs_count_is_unworked": "1", - "hs_count_is_worked": "0", - "hs_date_entered_lead": "2024-02-08T02:34:10.795Z", - "hs_is_unworked": "true", - "hs_latest_source": "OFFLINE", - "hs_latest_source_data_1": "API", - "hs_latest_source_data_2": "sample-contact", - "hs_latest_source_timestamp": "2024-02-08T02:34:10.891Z", - "hs_lifecyclestage_lead_date": "2024-02-08T02:34:10.795Z", - "hs_marketable_reason_id": "Sample Contact", - "hs_marketable_reason_type": "SAMPLE_CONTACT", - "hs_marketable_status": "true", - "hs_marketable_until_renewal": "true", - "hs_object_id": "51", - "hs_object_source": "API", - "hs_object_source_id": "sample-contact", - "hs_object_source_label": "INTERNAL_PROCESSING", - "hs_pipeline": "contacts-lifecycle-pipeline", - "hs_sequences_actively_enrolled_count": "0", - "hs_social_facebook_clicks": "0", - "hs_social_google_plus_clicks": "0", - "hs_social_linkedin_clicks": "0", - "hs_social_num_broadcast_clicks": "0", - "hs_social_twitter_clicks": "0", - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hs_v2_date_entered_lead": "2024-02-08T02:34:10.795Z", - "hubspot_owner_assigneddate": "2024-02-15T18:48:26.440Z", - "hubspot_owner_id": "722900407", - "jobtitle": "CEO", - "lastmodifieddate": "2024-02-15T18:48:26.440Z", - "lastname": "Halligan (Sample Contact)", - "lifecyclestage": "lead", - "state": "MA", - "twitterhandle": "bhalligan", - "twitterprofilephoto": "https://pbs.twimg.com/profile_images/3491742741/212e42c07d3348251da10872e85aa6b0.jpeg", - "website": "http://www.HubSpot.com" - }, - "propertiesWithHistory": { - "associatedcompanyid": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:10:54.210000Z", - "value": "19015593502" - } - ], - "city": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "Cambridge" - } - ], - "company": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "HubSpot" - } - ], - "createdate": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "2024-02-08T02:34:10.795Z" - } - ], - "email": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "bh@hubspot.com" - } - ], - "firstname": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "Brian" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_analytics_average_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_analytics_first_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "2024-02-08T02:34:10.795Z" - } - ], - "hs_analytics_num_event_completions": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_analytics_num_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_analytics_num_visits": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_analytics_revenue": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0.0" - } - ], - "hs_analytics_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "API" - } - ], - "hs_analytics_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "sample-contact" - } - ], - "hs_count_is_unworked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "1" - } - ], - "hs_count_is_worked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "2024-02-08T02:34:10.795Z" - } - ], - "hs_is_unworked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "true" - } - ], - "hs_latest_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "OFFLINE" - } - ], - "hs_latest_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "API" - } - ], - "hs_latest_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "sample-contact" - } - ], - "hs_latest_source_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "2024-02-08T02:34:10.891Z" - } - ], - "hs_lifecyclestage_lead_date": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "2024-02-08T02:34:10.795Z" - } - ], - "hs_marketable_reason_id": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:11.065000Z", - "value": "Sample Contact" - } - ], - "hs_marketable_reason_type": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:11.065000Z", - "value": "SAMPLE_CONTACT" - } - ], - "hs_marketable_status": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:11.065000Z", - "value": "true" - } - ], - "hs_marketable_until_renewal": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:11.065000Z", - "value": "true" - } - ], - "hs_object_id": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "51" - } - ], - "hs_object_source": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "API" - } - ], - "hs_object_source_id": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "sample-contact" - } - ], - "hs_object_source_label": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "INTERNAL_PROCESSING" - } - ], - "hs_pipeline": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "contacts-lifecycle-pipeline" - } - ], - "hs_sequences_actively_enrolled_count": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:12.843000Z", - "value": "0" - } - ], - "hs_social_facebook_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_social_google_plus_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_social_linkedin_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_social_num_broadcast_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_social_twitter_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "0" - } - ], - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_v2_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:14.672000Z", - "value": "2024-02-08T02:34:10.795Z" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:48:26.440Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "jobtitle": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "CEO" - } - ], - "lastmodifieddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:26.440000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:48:26.440Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:10:54.232000Z", - "value": "2024-02-08T22:10:54.232Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:19.025000Z", - "value": "2024-02-08T02:34:19.025Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:14.683000Z", - "value": "2024-02-08T02:34:14.683Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:12.856000Z", - "value": "2024-02-08T02:34:12.856Z" - }, - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:11.065000Z", - "value": "2024-02-08T02:34:11.065Z" - }, - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "2024-02-08T02:34:10.795Z" - } - ], - "lastname": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "Halligan (Sample Contact)" - } - ], - "lifecyclestage": [ - { - "sourceId": "sample-contact", - "sourceType": "API", - "timestamp": "2024-02-08T02:34:10.795000Z", - "value": "lead" - } - ], - "state": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "MA" - } - ], - "twitterhandle": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "bhalligan" - } - ], - "twitterprofilephoto": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "https://pbs.twimg.com/profile_images/3491742741/212e42c07d3348251da10872e85aa6b0.jpeg" - } - ], - "website": [ - { - "sourceId": "sample-contact", - "sourceType": "INTERNAL_PROCESSING", - "timestamp": "2024-02-08T02:34:10.388000Z", - "value": "http://www.HubSpot.com" - } - ] - }, - "updatedAt": "2024-02-15T18:48:26.440000Z" - } - ], - [ - "acmeCo/contacts", - { - "archived": false, - "companies": [ - 19015508766, - 19015508766 - ], - "createdAt": "2024-02-08T16:09:32.359000Z", - "id": 151, - "properties": { - "associatedcompanyid": "19015508766", - "createdate": "2024-02-08T16:09:32.359Z", - "email": "dave@estuary.dev", - "firstname": "Dave", - "hs_all_owner_ids": "722900407", - "hs_analytics_average_page_views": "0", - "hs_analytics_first_timestamp": "2024-02-08T16:09:32.359Z", - "hs_analytics_num_event_completions": "0", - "hs_analytics_num_page_views": "0", - "hs_analytics_num_visits": "0", - "hs_analytics_revenue": "0.0", - "hs_analytics_source": "OFFLINE", - "hs_analytics_source_data_1": "CRM_UI", - "hs_analytics_source_data_2": "userId:63843671", - "hs_count_is_unworked": "1", - "hs_count_is_worked": "0", - "hs_created_by_user_id": "63843671", - "hs_date_entered_lead": "2024-02-08T16:09:32.359Z", - "hs_is_unworked": "true", - "hs_latest_source": "OFFLINE", - "hs_latest_source_data_1": "CRM_UI", - "hs_latest_source_data_2": "userId:63843671", - "hs_latest_source_timestamp": "2024-02-08T16:09:32.494Z", - "hs_lifecyclestage_lead_date": "2024-02-08T16:09:32.359Z", - "hs_object_id": "151", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_pipeline": "contacts-lifecycle-pipeline", - "hs_sequences_actively_enrolled_count": "0", - "hs_social_facebook_clicks": "0", - "hs_social_google_plus_clicks": "0", - "hs_social_linkedin_clicks": "0", - "hs_social_num_broadcast_clicks": "0", - "hs_social_twitter_clicks": "0", - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hs_v2_date_entered_lead": "2024-02-08T16:09:32.359Z", - "hubspot_owner_assigneddate": "2024-02-08T16:09:32.359Z", - "hubspot_owner_id": "722900407", - "jobtitle": "CEO", - "lastmodifieddate": "2024-02-08T22:09:56.522Z", - "lastname": "Yaffe", - "lifecyclestage": "lead", - "phone": "+13125555555" - }, - "propertiesWithHistory": { - "associatedcompanyid": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.439000Z", - "value": "19015508766" - }, - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.142000Z", - "value": "19015593502" - } - ], - "createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T16:09:32.359Z" - } - ], - "email": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "dave@estuary.dev" - } - ], - "firstname": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "Dave" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_analytics_average_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_analytics_first_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "hs_analytics_num_event_completions": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_analytics_num_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_analytics_num_visits": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_analytics_revenue": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0.0" - } - ], - "hs_analytics_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "CRM_UI" - } - ], - "hs_analytics_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "userId:63843671" - } - ], - "hs_count_is_unworked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "1" - } - ], - "hs_count_is_worked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:09:32.359000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "hs_is_unworked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "true" - } - ], - "hs_latest_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "OFFLINE" - } - ], - "hs_latest_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "CRM_UI" - } - ], - "hs_latest_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "userId:63843671" - } - ], - "hs_latest_source_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "2024-02-08T16:09:32.494Z" - } - ], - "hs_lifecyclestage_lead_date": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T16:09:32.359Z" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "151" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_pipeline": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "contacts-lifecycle-pipeline" - } - ], - "hs_sequences_actively_enrolled_count": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:09:36.537000Z", - "value": "0" - } - ], - "hs_social_facebook_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_social_google_plus_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_social_linkedin_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_social_num_broadcast_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_social_twitter_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "0" - } - ], - "hs_time_in_lead": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_v2_date_entered_lead": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:12:15.492000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T16:09:32.359Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "jobtitle": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "CEO" - } - ], - "lastmodifieddate": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T22:09:56.522000Z", - "value": "2024-02-08T22:09:56.522Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T21:54:17.426000Z", - "value": "2024-02-08T21:54:17.426Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T16:12:15.532000Z", - "value": "2024-02-08T16:12:15.532Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:10:20.177000Z", - "value": "2024-02-08T16:10:20.177Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T16:09:52.612000Z", - "value": "2024-02-08T16:09:52.612Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:09:36.626000Z", - "value": "2024-02-08T16:09:36.626Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "value": "2024-02-08T16:09:32.359Z" - } - ], - "lastname": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "Yaffe" - } - ], - "lifecyclestage": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:09:32.359000Z", - "updatedByUserId": 63843671, - "value": "lead" - } - ], - "phone": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T21:54:17.404000Z", - "updatedByUserId": 63843671, - "value": "+13125555555" - } - ] - }, - "updatedAt": "2024-02-08T22:09:56.522000Z" - } - ], - [ - "acmeCo/contacts", - { - "archived": false, - "companies": [ - 19015593502, - 19015593502 - ], - "createdAt": "2024-02-08T16:11:29.216000Z", - "id": 201, - "properties": { - "associatedcompanyid": "19015593502", - "createdate": "2024-02-08T16:11:29.216Z", - "email": "phil@estuary.dev", - "firstname": "Phil", - "hs_all_owner_ids": "722900407", - "hs_analytics_average_page_views": "0", - "hs_analytics_first_timestamp": "2024-02-08T16:11:29.216Z", - "hs_analytics_num_event_completions": "0", - "hs_analytics_num_page_views": "0", - "hs_analytics_num_visits": "0", - "hs_analytics_revenue": "0.0", - "hs_analytics_source": "OFFLINE", - "hs_analytics_source_data_1": "CRM_UI", - "hs_analytics_source_data_2": "userId:63843671", - "hs_count_is_unworked": "1", - "hs_count_is_worked": "0", - "hs_created_by_user_id": "63843671", - "hs_date_entered_opportunity": "2024-02-08T16:11:29.216Z", - "hs_is_unworked": "true", - "hs_latest_source": "OFFLINE", - "hs_latest_source_data_1": "CRM_UI", - "hs_latest_source_data_2": "userId:63843671", - "hs_latest_source_timestamp": "2024-02-08T16:11:29.338Z", - "hs_lifecyclestage_opportunity_date": "2024-02-08T16:11:29.216Z", - "hs_object_id": "201", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_pipeline": "contacts-lifecycle-pipeline", - "hs_sequences_actively_enrolled_count": "0", - "hs_social_facebook_clicks": "0", - "hs_social_google_plus_clicks": "0", - "hs_social_linkedin_clicks": "0", - "hs_social_num_broadcast_clicks": "0", - "hs_social_twitter_clicks": "0", - "hs_time_in_opportunity": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hs_v2_date_entered_opportunity": "2024-02-08T16:11:29.216Z", - "hubspot_owner_assigneddate": "2024-02-08T16:11:29.216Z", - "hubspot_owner_id": "722900407", - "jobtitle": "SWE", - "lastmodifieddate": "2024-02-25T20:43:51.308Z", - "lifecyclestage": "opportunity", - "phone": "+13165565552" - }, - "propertiesWithHistory": { - "associatedcompanyid": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:40.271000Z", - "value": "19015593502" - } - ], - "createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T16:11:29.216Z" - } - ], - "email": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "phil@estuary.dev" - } - ], - "firstname": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "Phil" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_analytics_average_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_analytics_first_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "2024-02-08T16:11:29.216Z" - } - ], - "hs_analytics_num_event_completions": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_analytics_num_page_views": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_analytics_num_visits": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_analytics_revenue": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0.0" - } - ], - "hs_analytics_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "CRM_UI" - } - ], - "hs_analytics_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "userId:63843671" - } - ], - "hs_count_is_unworked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "1" - } - ], - "hs_count_is_worked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_date_entered_opportunity": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:29.216000Z", - "value": "2024-02-08T16:11:29.216Z" - } - ], - "hs_is_unworked": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "true" - } - ], - "hs_latest_source": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "OFFLINE" - } - ], - "hs_latest_source_data_1": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "CRM_UI" - } - ], - "hs_latest_source_data_2": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "userId:63843671" - } - ], - "hs_latest_source_timestamp": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "2024-02-08T16:11:29.338Z" - } - ], - "hs_lifecyclestage_opportunity_date": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T16:11:29.216Z" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "201" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_pipeline": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "contacts-lifecycle-pipeline" - } - ], - "hs_sequences_actively_enrolled_count": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:35.294000Z", - "value": "0" - } - ], - "hs_social_facebook_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_social_google_plus_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_social_linkedin_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_social_num_broadcast_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_social_twitter_clicks": [ - { - "sourceId": "WebAnalyticsPropertyCalculation", - "sourceType": "ANALYTICS", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "0" - } - ], - "hs_time_in_opportunity": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_v2_date_entered_opportunity": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:13:37.729000Z", - "value": "2024-02-08T16:11:29.216Z" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T16:11:29.216Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "jobtitle": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "SWE" - } - ], - "lastmodifieddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-25T20:43:51.308000Z", - "updatedByUserId": 63843671, - "value": "2024-02-25T20:43:51.308Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T21:18:43.915000Z", - "updatedByUserId": 63843671, - "value": "2024-02-23T21:18:43.915Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T21:18:23.203000Z", - "updatedByUserId": 63843671, - "value": "2024-02-23T21:18:23.203Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T20:03:39.843000Z", - "updatedByUserId": 63843671, - "value": "2024-02-23T20:03:39.843Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T07:49:42.666000Z", - "updatedByUserId": 63843671, - "value": "2024-02-23T07:49:42.666Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T00:57:11.352000Z", - "updatedByUserId": 63843671, - "value": "2024-02-23T00:57:11.352Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:45:35.227000Z", - "updatedByUserId": 63843671, - "value": "2024-02-22T23:45:35.227Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:28:08.073000Z", - "updatedByUserId": 63843671, - "value": "2024-02-22T23:28:08.073Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:44.711000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:48:44.711Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:24:22.905000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T17:24:22.905Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:22:27.142000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T17:22:27.142Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T16:13:37.738000Z", - "value": "2024-02-08T16:13:37.738Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T16:11:46.436000Z", - "value": "2024-02-08T16:11:46.436Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:40.303000Z", - "value": "2024-02-08T16:11:40.303Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T16:11:35.308000Z", - "value": "2024-02-08T16:11:35.308Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "value": "2024-02-08T16:11:29.216Z" - } - ], - "lifecyclestage": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T16:11:29.216000Z", - "updatedByUserId": 63843671, - "value": "opportunity" - } - ], - "phone": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-25T20:43:51.308000Z", - "updatedByUserId": 63843671, - "value": "+13165565552" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T21:18:43.915000Z", - "updatedByUserId": 63843671, - "value": "+13165565551" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T21:18:23.203000Z", - "updatedByUserId": 63843671, - "value": "+13165555551" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T20:03:39.843000Z", - "updatedByUserId": 63843671, - "value": "+13165555552" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T07:49:42.666000Z", - "updatedByUserId": 63843671, - "value": "+13165555553" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-23T00:57:11.352000Z", - "updatedByUserId": 63843671, - "value": "+13165555552" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:45:35.227000Z", - "updatedByUserId": 63843671, - "value": "+13165555551" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-22T23:28:08.073000Z", - "updatedByUserId": 63843671, - "value": "+13165555550" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:48:44.711000Z", - "updatedByUserId": 63843671, - "value": "+13165555557" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:24:22.905000Z", - "updatedByUserId": 63843671, - "value": "+13165555556" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:22:27.142000Z", - "updatedByUserId": 63843671, - "value": "+13165555555" - } - ] - }, - "updatedAt": "2024-02-25T20:43:51.308000Z" - } - ], - [ - "acmeCo/deals", - { - "archived": false, - "contacts": [ - 1 - ], - "createdAt": "2024-02-08T02:34:37.277000Z", - "id": 17423218541, - "properties": { - "amount": "1000.0", - "closedate": "2024-01-03T09:37:11.118Z", - "createdate": "2024-02-08T02:34:37.277Z", - "days_to_close": "0", - "dealname": "HubSpot - New Deal (Sample Deal)", - "dealstage": "appointmentscheduled", - "hs_analytics_latest_source_contact": "OFFLINE", - "hs_analytics_latest_source_data_1_contact": "API", - "hs_analytics_latest_source_data_2_contact": "sample-contact", - "hs_analytics_latest_source_timestamp_contact": "2024-02-08T02:34:10.499Z", - "hs_analytics_source": "OFFLINE", - "hs_analytics_source_data_1": "API", - "hs_analytics_source_data_2": "sample-contact", - "hs_closed_amount": "0", - "hs_closed_amount_in_home_currency": "0", - "hs_created_by_user_id": "63843671", - "hs_createdate": "2024-02-08T02:34:37.283Z", - "hs_date_entered_appointmentscheduled": "2024-02-08T02:34:37.283Z", - "hs_deal_stage_probability": "0.200000000000000011102230246251565404236316680908203125", - "hs_deal_stage_probability_shadow": "0.200000000000000011102230246251565404236316680908203125", - "hs_is_closed_won": "false", - "hs_is_deal_split": "false", - "hs_lastmodifieddate": "2024-02-08T02:34:41.578Z", - "hs_num_target_accounts": "0", - "hs_object_id": "17423218541", - "hs_object_source": "CRM_UI", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_projected_amount": "200.0000000000000111022302462515654042363166809082031250000", - "hs_projected_amount_in_home_currency": "200.0000000000000111022302462515654042363166809082031250000", - "hs_time_in_appointmentscheduled": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_v2_date_entered_appointmentscheduled": "2024-02-08T02:34:37.283Z", - "pipeline": "default" - }, - "propertiesWithHistory": { - "amount": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "1000.0" - } - ], - "closedate": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "2024-01-03T09:37:11.118Z" - } - ], - "createdate": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:34:37.277Z" - } - ], - "days_to_close": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "dealname": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "HubSpot - New Deal (Sample Deal)" - } - ], - "dealstage": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "appointmentscheduled" - } - ], - "hs_analytics_latest_source_contact": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.748000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_latest_source_data_1_contact": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.748000Z", - "value": "API" - } - ], - "hs_analytics_latest_source_data_2_contact": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.748000Z", - "value": "sample-contact" - } - ], - "hs_analytics_latest_source_timestamp_contact": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.748000Z", - "value": "2024-02-08T02:34:10.499Z" - } - ], - "hs_analytics_source": [ - { - "sourceId": "deal sync triggered by vid=1", - "sourceType": "DEALS", - "timestamp": "2024-02-08T02:34:38.283000Z", - "value": "OFFLINE" - } - ], - "hs_analytics_source_data_1": [ - { - "sourceId": "deal sync triggered by vid=1", - "sourceType": "DEALS", - "timestamp": "2024-02-08T02:34:38.283000Z", - "value": "API" - } - ], - "hs_analytics_source_data_2": [ - { - "sourceId": "deal sync triggered by vid=1", - "sourceType": "DEALS", - "timestamp": "2024-02-08T02:34:38.283000Z", - "value": "sample-contact" - } - ], - "hs_closed_amount": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_closed_amount_in_home_currency": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_created_by_user_id": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_createdate": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "2024-02-08T02:34:37.283Z" - } - ], - "hs_date_entered_appointmentscheduled": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "value": "2024-02-08T02:34:37.283Z" - } - ], - "hs_deal_stage_probability": [ - { - "sourceId": "DealStageProbabilityHandler", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.268000Z", - "value": "0.200000000000000011102230246251565404236316680908203125" - } - ], - "hs_deal_stage_probability_shadow": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "0.200000000000000011102230246251565404236316680908203125" - } - ], - "hs_is_closed_won": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "false" - } - ], - "hs_is_deal_split": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "false" - } - ], - "hs_lastmodifieddate": [ - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:41.578000Z", - "value": "2024-02-08T02:34:41.578Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.770000Z", - "value": "2024-02-08T02:34:38.770Z" - }, - { - "sourceType": "API", - "timestamp": "2024-02-08T02:34:38.295000Z", - "value": "2024-02-08T02:34:38.295Z" - }, - { - "sourceId": "DealStageProbabilityHandler", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.268000Z", - "value": "2024-02-08T02:34:38.268Z" - }, - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "value": "2024-02-08T02:34:37.283Z" - } - ], - "hs_num_target_accounts": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.748000Z", - "value": "0" - } - ], - "hs_object_id": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "17423218541" - } - ], - "hs_object_source": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_label": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_projected_amount": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.268000Z", - "value": "200.0000000000000111022302462515654042363166809082031250000" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_projected_amount_in_home_currency": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:38.268000Z", - "value": "200.0000000000000111022302462515654042363166809082031250000" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_time_in_appointmentscheduled": "redacted", - "hs_updated_by_user_id": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_v2_date_entered_appointmentscheduled": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-08T02:34:41.569000Z", - "value": "2024-02-08T02:34:37.283Z" - } - ], - "pipeline": [ - { - "sourceType": "CRM_UI", - "timestamp": "2024-02-08T02:34:37.283000Z", - "updatedByUserId": 63843671, - "value": "default" - } - ] - }, - "updatedAt": "2024-02-08T02:34:41.578000Z" - } - ], - [ - "acmeCo/engagements", - { - "archived": false, - "createdAt": "2024-02-15T17:25:55.752000Z", - "id": 47494434080, - "properties": { - "hs_all_owner_ids": "722900407", - "hs_body_preview": "This is an example note!", - "hs_body_preview_html": "\n \n \n
\n

This is an example note!

\n
\n \n", - "hs_body_preview_is_truncated": "false", - "hs_created_by": "63843671", - "hs_created_by_user_id": "63843671", - "hs_createdate": "2024-02-15T17:25:55.752Z", - "hs_engagement_source": "CRM_UI", - "hs_engagement_type": "NOTE", - "hs_lastmodifieddate": "2024-02-16T23:30:26.472Z", - "hs_modified_by": "63843671", - "hs_note_body": "

This is an example note!

", - "hs_object_id": "47494434080", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_timestamp": "2024-02-15T17:25:49.545Z", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hubspot_owner_assigneddate": "2024-02-15T17:25:55.752Z", - "hubspot_owner_id": "722900407" - }, - "propertiesWithHistory": { - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_body_preview": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:30:26.472000Z", - "updatedByUserId": 63843671, - "value": "This is an example note!" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:25:57.680000Z", - "updatedByUserId": 63843671, - "value": "This is an example note! I've updated it." - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:22:42.344000Z", - "updatedByUserId": 63843671, - "value": "This is an example note! I've updated it. And again." - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:22:14.952000Z", - "updatedByUserId": 63843671, - "value": "This is an example note! I've updated it." - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T17:43:44.008000Z", - "updatedByUserId": 63843671, - "value": "This is an example note!" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "This is an example note." - } - ], - "hs_body_preview_html": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:30:26.472000Z", - "updatedByUserId": 63843671, - "value": "\n \n \n
\n

This is an example note!

\n
\n \n" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:25:57.680000Z", - "updatedByUserId": 63843671, - "value": "\n \n \n
\n

This is an example note! I've updated it.

\n
\n \n" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:22:42.344000Z", - "updatedByUserId": 63843671, - "value": "\n \n \n
\n

This is an example note! I've updated it. And again.

\n
\n \n" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-16T23:22:14.952000Z", - "updatedByUserId": 63843671, - "value": "\n \n \n
\n

This is an example note! I've updated it.

\n
\n \n" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T17:43:44.008000Z", - "updatedByUserId": 63843671, - "value": "\n \n \n
\n

This is an example note!

\n
\n \n" - }, - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "\n \n \n
\n

This is an example note.

\n
\n \n" - } - ], - "hs_body_preview_is_truncated": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "false" - } - ], - "hs_created_by": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T17:25:55.752Z" - } - ], - "hs_engagement_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_engagement_type": [ - { - "sourceType": "UNKNOWN", - "timestamp": "2024-02-15T17:25:55.752000Z", - "value": "NOTE" - } - ], - "hs_lastmodifieddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:30:26.472000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T23:30:26.472Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:25:57.680000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T23:25:57.680Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:22:42.344000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T23:22:42.344Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:22:14.952000Z", - "updatedByUserId": 63843671, - "value": "2024-02-16T23:22:14.952Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:43:44.008000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T17:43:44.008Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T17:25:55.752Z" - } - ], - "hs_modified_by": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_note_body": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:30:26.472000Z", - "updatedByUserId": 63843671, - "value": "

This is an example note!

" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:25:57.680000Z", - "updatedByUserId": 63843671, - "value": "

This is an example note! I've updated it.

" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:22:42.344000Z", - "updatedByUserId": 63843671, - "value": "

This is an example note! I've updated it. And again.

" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-16T23:22:14.952000Z", - "updatedByUserId": 63843671, - "value": "

This is an example note! I've updated it.

" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:43:44.008000Z", - "updatedByUserId": 63843671, - "value": "

This is an example note!

" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "

This is an example note.

" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "47494434080" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_timestamp": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T17:25:49.545Z" - } - ], - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T17:25:55.752Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T17:25:55.752000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ] - }, - "updatedAt": "2024-02-16T23:30:26.472000Z" - } - ], - [ - "acmeCo/tickets", - { - "archived": false, - "contacts": [ - 151 - ], - "createdAt": "2024-02-15T18:46:27.456000Z", - "id": 2371913597, - "properties": { - "content": "Description of this ticket.", - "createdate": "2024-02-15T18:46:27.456Z", - "hs_all_owner_ids": "722900407", - "hs_created_by_user_id": "63843671", - "hs_date_entered_1": "2024-02-15T18:46:27.456Z", - "hs_helpdesk_sort_timestamp": "2024-02-15T18:46:27.456Z", - "hs_is_visible_in_help_desk": "true", - "hs_last_message_from_visitor": "false", - "hs_lastmodifieddate": "2024-02-15T18:47:39.436Z", - "hs_num_associated_conversations": "0", - "hs_num_times_contacted": "0", - "hs_object_id": "2371913597", - "hs_object_source": "CRM_UI", - "hs_object_source_id": "userId:63843671", - "hs_object_source_label": "CRM_UI", - "hs_object_source_user_id": "63843671", - "hs_pipeline": "0", - "hs_pipeline_stage": "1", - "hs_time_in_1": "redacted", - "hs_updated_by_user_id": "63843671", - "hs_user_ids_of_all_owners": "63843671", - "hubspot_owner_assigneddate": "2024-02-15T18:46:27.456Z", - "hubspot_owner_id": "722900407", - "subject": "Example Ticket" - }, - "propertiesWithHistory": { - "content": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:47:39.436000Z", - "updatedByUserId": 63843671, - "value": "Description of this ticket." - } - ], - "createdate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:46:27.456Z" - } - ], - "hs_all_owner_ids": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "hs_created_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_date_entered_1": [ - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:27.456000Z", - "value": "2024-02-15T18:46:27.456Z" - } - ], - "hs_helpdesk_sort_timestamp": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:46:27.456Z" - } - ], - "hs_is_visible_in_help_desk": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:29.884000Z", - "value": "true" - } - ], - "hs_last_message_from_visitor": [ - { - "sourceId": "CalculatedPropertyComputer", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "false" - } - ], - "hs_lastmodifieddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:47:39.436000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:47:39.436Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:32.246000Z", - "value": "2024-02-15T18:46:32.246Z" - }, - { - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:29.884000Z", - "value": "2024-02-15T18:46:29.884Z" - }, - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:46:27.456Z" - } - ], - "hs_num_associated_conversations": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:29.812000Z", - "value": "0" - } - ], - "hs_num_times_contacted": [ - { - "sourceId": "RollupProperties", - "sourceType": "CALCULATED", - "timestamp": "2024-02-15T18:46:29.814000Z", - "value": "0" - } - ], - "hs_object_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "2371913597" - } - ], - "hs_object_source": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "userId:63843671" - } - ], - "hs_object_source_label": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "CRM_UI" - } - ], - "hs_object_source_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_pipeline": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "0" - } - ], - "hs_pipeline_stage": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "1" - } - ], - "hs_time_in_1": "redacted", - "hs_updated_by_user_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hs_user_ids_of_all_owners": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "63843671" - } - ], - "hubspot_owner_assigneddate": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "2024-02-15T18:46:27.456Z" - } - ], - "hubspot_owner_id": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "722900407" - } - ], - "subject": [ - { - "sourceId": "userId:63843671", - "sourceType": "CRM_UI", - "timestamp": "2024-02-15T18:46:27.456000Z", - "updatedByUserId": 63843671, - "value": "Example Ticket" - } - ] - }, - "updatedAt": "2024-02-15T18:47:39.436000Z" - } - ] -] 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 12a0fb1843..f2f4c99393 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 @@ -2,7 +2,8 @@ { "recommendedName": "companies", "resourceConfig": { - "name": "companies" + "name": "companies", + "interval": "PT420S" }, "documentSchema": { "$defs": { @@ -191,7 +192,8 @@ { "recommendedName": "contacts", "resourceConfig": { - "name": "contacts" + "name": "contacts", + "interval": "PT420S" }, "documentSchema": { "$defs": { @@ -372,7 +374,8 @@ { "recommendedName": "deals", "resourceConfig": { - "name": "deals" + "name": "deals", + "interval": "PT420S" }, "documentSchema": { "$defs": { @@ -569,7 +572,8 @@ { "recommendedName": "engagements", "resourceConfig": { - "name": "engagements" + "name": "engagements", + "interval": "PT420S" }, "documentSchema": { "$defs": { @@ -747,74 +751,2851 @@ "/id" ] }, + { + "recommendedName": "contact_lists", + "resourceConfig": { + "name": "contact_lists", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "listId": { + "title": "Listid", + "type": "string" + }, + "lists": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Lists", + "type": "array" + } + }, + "required": [ + "listId" + ], + "title": "ContactLists", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/listId" + ] + }, + { + "recommendedName": "contacts_lists_subscription", + "resourceConfig": { + "name": "contacts_lists_subscription", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "vid": { + "title": "Vid", + "type": "string" + }, + "contacts": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Contacts", + "type": "array" + } + }, + "required": [ + "vid" + ], + "title": "ContactSubscription", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/vid" + ] + }, + { + "recommendedName": "campaigns", + "resourceConfig": { + "name": "campaigns", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "string" + }, + "timeline": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Timeline", + "type": "array" + } + }, + "required": [ + "id" + ], + "title": "Campaigns", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "subscription_changes", + "resourceConfig": { + "name": "subscription_changes", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "portalId": { + "title": "Portalid", + "type": "string" + }, + "timeline": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Timeline", + "type": "array" + } + }, + "required": [ + "portalId" + ], + "title": "SubscriptionChanges", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/portalId" + ] + }, + { + "recommendedName": "email_events", + "resourceConfig": { + "name": "email_events", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "string" + }, + "events": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Events", + "type": "array" + } + }, + "required": [ + "id" + ], + "title": "EmailEvents", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "ticket_pipelines", + "resourceConfig": { + "name": "ticket_pipelines", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "pipelineId": { + "title": "Pipelineid", + "type": "string" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties", + "pipelineId" + ], + "title": "TicketPipelines", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/pipelineId" + ] + }, + { + "recommendedName": "deal_pipelines", + "resourceConfig": { + "name": "deal_pipelines", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "pipelineId": { + "title": "Pipelineid", + "type": "string" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "pipelineId" + ], + "title": "DealPipelines", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/pipelineId" + ] + }, + { + "recommendedName": "engagements_calls", + "resourceConfig": { + "name": "engagements_calls", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "contacts": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Contacts", + "type": "array" + }, + "deals": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Deals", + "type": "array" + }, + "companies": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Companies", + "type": "array" + }, + "tickets": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Tickets", + "type": "array" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "EngagementCalls", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "engagements_emails", + "resourceConfig": { + "name": "engagements_emails", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "contacts": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Contacts", + "type": "array" + }, + "deals": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Deals", + "type": "array" + }, + "companies": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Companies", + "type": "array" + }, + "tickets": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Tickets", + "type": "array" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "EngagementEmails", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "engagements_meetings", + "resourceConfig": { + "name": "engagements_meetings", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "contacts": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Contacts", + "type": "array" + }, + "deals": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Deals", + "type": "array" + }, + "companies": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Companies", + "type": "array" + }, + "tickets": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Tickets", + "type": "array" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "EngagementMeetings", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "engagements_notes", + "resourceConfig": { + "name": "engagements_notes", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "contacts": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Contacts", + "type": "array" + }, + "deals": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Deals", + "type": "array" + }, + "companies": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Companies", + "type": "array" + }, + "tickets": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Tickets", + "type": "array" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "EngagementNotes", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "engagements_tasks", + "resourceConfig": { + "name": "engagements_tasks", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "contacts": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Contacts", + "type": "array" + }, + "deals": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Deals", + "type": "array" + }, + "companies": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Companies", + "type": "array" + }, + "tickets": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Tickets", + "type": "array" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "EngagementTasks", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "goal_targets", + "resourceConfig": { + "name": "goal_targets", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "Goals", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "feedback_submissions", + "resourceConfig": { + "name": "feedback_submissions", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "FeedbackSubmissions", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "line_items", + "resourceConfig": { + "name": "line_items", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "LineItems", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "products", + "resourceConfig": { + "name": "products", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "Products", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, { "recommendedName": "tickets", "resourceConfig": { - "name": "tickets" + "name": "tickets", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + }, + "contacts": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Contacts", + "type": "array" + }, + "engagements": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Engagements", + "type": "array" + }, + "line_items": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Line Items", + "type": "array" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "Ticket", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "marketing_emails", + "resourceConfig": { + "name": "marketing_emails", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id", + "updatedAt" + ], + "title": "MarketingEmails", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "email_subscriptions", + "resourceConfig": { + "name": "email_subscriptions", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "portalId": { + "title": "Portalid", + "type": "string" + }, + "subscriptionDefinitions": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Subscriptiondefinitions", + "type": "array" + } + }, + "required": [ + "portalId" + ], + "title": "EmailSubscriptions", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/portalId" + ] + }, + { + "recommendedName": "marketing_forms", + "resourceConfig": { + "name": "marketing_forms", + "interval": "PT420S" }, "documentSchema": { "$defs": { - "History": { - "additionalProperties": false, + "Meta": { "properties": { - "_meta": { - "allOf": [ - { - "$ref": "#/$defs/Meta" - } + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" ], - "default": { - "op": "u", - "row_id": -1 - }, - "description": "Document metadata" - }, - "timestamp": { - "format": "date-time", - "title": "Timestamp", - "type": "string" - }, - "value": { - "title": "Value", - "type": "string" - }, - "sourceType": { - "title": "Sourcetype", + "title": "Op", "type": "string" }, - "sourceId": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Sourceid" - }, - "updatedByUserId": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Updatedbyuserid" + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" } }, "required": [ - "timestamp", - "value", - "sourceType" + "op" ], - "title": "History", + "title": "Meta", "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" }, + "results": { + "default": [], + "items": { + "type": "integer" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "id" + ], + "title": "MarketingForms", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "owners", + "resourceConfig": { + "name": "owners", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { "Meta": { "properties": { "op": { @@ -841,7 +3622,7 @@ "type": "object" } }, - "additionalProperties": false, + "additionalProperties": true, "properties": { "_meta": { "allOf": [ @@ -859,84 +3640,103 @@ "title": "Id", "type": "integer" }, - "createdAt": { - "format": "date-time", - "title": "Createdat", - "type": "string" - }, "updatedAt": { "format": "date-time", "title": "Updatedat", "type": "string" }, - "archived": { - "title": "Archived", - "type": "boolean" - }, - "properties": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "title": "Properties" - }, - "propertiesWithHistory": { - "additionalProperties": { - "items": { - "$ref": "#/$defs/History" - }, - "type": "array" - }, - "default": {}, - "title": "Propertieswithhistory", - "type": "object" - }, - "associations": { - "additionalProperties": false, - "default": {}, - "title": "Associations", - "type": "object" - }, - "contacts": { + "results": { "default": [], "items": { "type": "integer" }, - "title": "Contacts", + "title": "Results", "type": "array" - }, - "engagements": { - "default": [], - "items": { - "type": "integer" + } + }, + "required": [ + "id", + "updatedAt" + ], + "title": "Owners", + "type": "object", + "x-infer-schema": true + }, + "key": [ + "/id" + ] + }, + { + "recommendedName": "workflows", + "resourceConfig": { + "name": "workflows", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } }, - "title": "Engagements", - "type": "array" + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": true, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" }, - "line_items": { + "id": { + "title": "Id", + "type": "integer" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "workflows": { "default": [], "items": { "type": "integer" }, - "title": "Line Items", + "title": "Workflows", "type": "array" } }, "required": [ "id", - "createdAt", - "updatedAt", - "archived", - "properties" + "updatedAt" ], - "title": "Ticket", + "title": "Workflows", "type": "object", "x-infer-schema": true }, @@ -948,7 +3748,7 @@ "recommendedName": "properties", "resourceConfig": { "name": "properties", - "interval": "P1D" + "interval": "PT420S" }, "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 831606daa7..efcd3698e3 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 @@ -103,7 +103,7 @@ "documentationUrl": "https://docs.estuary.dev", "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%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}}", + "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%20service-feedback-access%20sales-email-read%20ommunication_preferences.read%20workflows-access-public-api%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}}", "accessTokenUrlTemplate": "https://api.hubapi.com/oauth/v1/token", "accessTokenBody": "grant_type=authorization_code&client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&client_secret={{#urlencode}}{{{ client_secret }}}{{/urlencode}}&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&code={{#urlencode}}{{{ code }}}{{/urlencode}}", "accessTokenHeaders": { From 9980d164415dc79439cc9f553ceb4380aa64d140 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Mon, 1 Apr 2024 11:11:13 -0300 Subject: [PATCH 03/17] Updated custom resources and removed unused functions --- .../source_hubspot_native/__init__.py | 5 + .../source_hubspot_native/api.py | 142 ++--------------- .../source_hubspot_native/custom_resources.py | 144 ++++++++++++++++++ .../source_hubspot_native/resources.py | 22 +-- 4 files changed, 170 insertions(+), 143 deletions(-) create mode 100644 source-hubspot-native/source_hubspot_native/custom_resources.py diff --git a/source-hubspot-native/source_hubspot_native/__init__.py b/source-hubspot-native/source_hubspot_native/__init__.py index a00c93b364..f8204de2eb 100644 --- a/source-hubspot-native/source_hubspot_native/__init__.py +++ b/source-hubspot-native/source_hubspot_native/__init__.py @@ -13,6 +13,7 @@ from estuary_cdk.http import HTTPMixin from .resources import all_resources +from .custom_resources import all_custom_resources from .models import ( ConnectorState, EndpointConfig, @@ -41,6 +42,10 @@ async def discover( self, log: Logger, discover: request.Discover[EndpointConfig] ) -> response.Discovered[ResourceConfig]: resources = await all_resources(log, self, discover.config) + custom_resources = await all_custom_resources(log, self, discover.config) + log.debug(f"{custom_resources}") + if custom_resources is not None: + resources += custom_resources return common.discovered(resources) async def validate( diff --git a/source-hubspot-native/source_hubspot_native/api.py b/source-hubspot-native/source_hubspot_native/api.py index d19dee2613..ae9871f061 100644 --- a/source-hubspot-native/source_hubspot_native/api.py +++ b/source-hubspot-native/source_hubspot_native/api.py @@ -4,7 +4,7 @@ from pydantic import TypeAdapter import json import pytz -from typing import Iterable, Any, Callable, Awaitable, AsyncGenerator +from typing import Iterable, Any, Callable, Awaitable, AsyncGenerator, Dict import asyncio import itertools from copy import deepcopy @@ -61,6 +61,15 @@ async def fetch_properties( return cls.CACHED_PROPERTIES +async def fetch_custom_objects( + log: Logger, http: HTTPSession +) -> Dict: + + url = f"{HUB}/crm/v3/schemas" + result = await http.request(log, url) + + return json.loads(result) + async def fetch_page( # Closed over via functools.partial: @@ -645,79 +654,6 @@ def _ms_to_dt(ms: int) -> datetime: ## V3 -async def fetch_engagements_calls( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/calls" - - result = OldRecentEngagementsCalls.model_validate_json( - await http.request(log, url, params=None) - ) - - return ( - (r.createdAt, str(r.id)) - for r in result.results - ), None and None - -async def fetch_engagements_emails( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/emails" - - result = OldRecentEngagementsEmails.model_validate_json( - await http.request(log, url, params=None) - ) - return ( - (r.createdAt, str(r.id)) - for r in result.results - ), None and None - -async def fetch_engagements_meetings( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/meetings" - - result = OldRecentEngagementsMeetings.model_validate_json( - await http.request(log, url, params=None) - ) - return ( - (r.createdAt, str(r.id)) - for r in result.results - ), None and None - -async def fetch_engagements_tasks( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/tasks" - - result = OldRecentEngagementsTasks.model_validate_json( - await http.request(log, url, params=None) - ) - - return ( - (r.createdAt, str(r.id)) - for r in result.results - ), None and None - -async def fetch_engagements_notes( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/notes" - - result = OldRecentEngagementsNotes.model_validate_json( - await http.request(log, url, params=None) - ) - return ( - (r.createdAt, str(r.id)) - for r in result.results - ), None and None - - async def fetch_marketing_forms( log: Logger, http: HTTPSession, since: datetime, page: PageCursor ) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: @@ -746,34 +682,6 @@ async def fetch_owners( for r in result.results ), None and None -async def fetch_line_items( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/line_items" # seems to be offline - - result = OldRecentLineItems.model_validate_json( - await http.request(log, url, params=None) - ) - return ( - (r.createdAt, str(r.id)) - for r in result.results - ), None and None - -async def fetch_products( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/products" - - result = OldRecentProducts.model_validate_json( - await http.request(log, url, params=None) - ) - return ( - (r.createdAt, str(r.id)) - for r in result.results - ), None and None - async def fetch_workflows( log: Logger, http: HTTPSession, since: datetime, page: PageCursor ) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: @@ -787,33 +695,3 @@ async def fetch_workflows( (r.updatedAt, str(r.id)) for r in result.workflows ), None and None - - -async def fetch_goals( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/goal_targets" - - result = OldRecentGoals.model_validate_json( - await http.request(log, url, params=None) - ) - return ( - (r.updatedAt, str(r.id)) - for r in result.results - ), None and None - - -async def fetch_feedback_submissions( - log: Logger, http: HTTPSession, since: datetime, page: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/feedback_submissions" - - result = OldRecentFeedbackSubmissions.model_validate_json( - await http.request(log, url, params=None) - ) - return ( - (r.updatedAt, str(r.id)) - for r in result.results - ), None and None \ No newline at end of file diff --git a/source-hubspot-native/source_hubspot_native/custom_resources.py b/source-hubspot-native/source_hubspot_native/custom_resources.py new file mode 100644 index 0000000000..232584af26 --- /dev/null +++ b/source-hubspot-native/source_hubspot_native/custom_resources.py @@ -0,0 +1,144 @@ +from datetime import datetime, UTC, timedelta +from typing import Literal, Generic, TypeVar, Annotated, ClassVar, TYPE_CHECKING, Dict, Any, Mapping +from pydantic import BaseModel, Field, AwareDatetime, model_validator +from logging import Logger +import functools + +from estuary_cdk.flow import CaptureBinding +from estuary_cdk.capture import Task +#from estuary_cdk.capture.common import Resource, LogCursor, PageCursor, open_binding +from estuary_cdk.capture import common +from estuary_cdk.http import HTTPSession, HTTPMixin, TokenSource + +from .api import fetch_custom_objects +from .models import EndpointConfig, CRMObject, OAUTH2_SPEC, ResourceConfig, ResourceState + +from estuary_cdk.capture.common import BaseDocument + +async def all_custom_resources( + log: Logger, http: HTTPMixin, config: EndpointConfig +) -> list[common.Resource]: + http.token_source = TokenSource(oauth_spec=OAUTH2_SPEC, credentials=config.credentials) + all_resources = [] + + all_custom_objects = await fetch_custom_objects(log, http) + if len(all_custom_objects["results"]) == 0: + return None + + for objects in all_custom_objects["results"]: + CustomObject.NAME = objects["labels"]["plural"] + CustomObject.PRIMARY_KEY = ["/" + name for name in objects["requiredProperties"]] + CustomObject.primare = objects["requiredProperties"] + CustomObject.PROPERTY_SEARCH_NAME = objects["labels"]["plural"] + schema = generate_schema(objects) + + all_resources.append(custom_objects(CustomObject, http, schema)) + + return all_resources + + +def custom_objects( + cls: type[CRMObject], http: HTTPSession, schema: Dict, +) -> common.Resource: + + def open( + binding: CaptureBinding[ResourceConfig], + binding_index: int, + state: ResourceState, + task: Task, + ): + common.open_binding( + binding, + binding_index, + state, + task, + fetch_page=functools.partial(fetch_page, cls, http), + ) + + + started_at = datetime.now(tz=UTC) + return common.Resource( + name=cls.NAME, + key=cls.PRIMARY_KEY, + model=common.Resource.FixedSchema(value=schema), + open=open, + initial_state=ResourceState( + inc=ResourceState.Incremental(cursor=started_at), + backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), + ), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), + schema_inference=False, + ) + + +class CustomObject(BaseDocument, extra="allow"): + + NAME: ClassVar[str] + PRIMARY_KEY: ClassVar[list[str]] + PROPERTY_SEARCH_NAME: ClassVar[str] + IGNORE_PROPERTY_SEARCH: ClassVar[bool] = False + +def generate_schema(raw_schema: Dict) -> Dict: + properties = {} + for field in raw_schema["properties"]: + properties[field["name"]] = field_to_property_schema(field) + + schema = { + "$defs": { + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "type": "object", + "title": raw_schema["labels"]["plural"], + "additionalProperties": True, + "properties": { + "createdAt": {"type": ["null", "string"], "format": "date-time"}, + "updatedAt": {"type": ["null", "string"], "format": "date-time"}, + "archived": {"type": ["null", "boolean"]}, + "properties": {"type": ["null", "object"], "properties": properties}, + }, + "required": raw_schema["requiredProperties"] + } + for prop in raw_schema["requiredProperties"]: + schema["properties"][f"{prop}"] = {"type":["string"]} + + return schema + +def field_to_property_schema(field: Dict[str, Any]) -> Mapping[str, Any]: + field_type = field["type"] + property_schema = {} + if field_type == "enumeration" or field_type == "string": + property_schema = {"type": ["null", "string"]} + elif field_type == "datetime" or field_type == "date": + property_schema = {"type": ["null", "string"], "format": "date-time"} + elif field_type == "number": + property_schema = {"type": ["null", "number"]} + elif field_type == "boolean" or field_type == "bool": + property_schema = {"type": ["null", "boolean"]} + else: + property_schema = {"type": ["null", "string"]} + + return property_schema \ No newline at end of file diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index c5c6af1038..f81f2f9d6c 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -99,16 +99,16 @@ async def all_resources( crm_object_streamed_no_batch(EmailEvents, http, fetch_recent_email_events), crm_object_streamed_no_batch(TicketPipelines, http, fetch_recent_ticket_pipelines), crm_object_streamed_no_batch(DealPipelines, http, fetch_recent_deal_pipelines), - crm_object_paginated(EngagementCalls, http, fetch_engagements_calls), - crm_object_paginated(EngagementEmails, http, fetch_engagements_emails), - crm_object_paginated(EngagementMeetings, http, fetch_engagements_meetings), - crm_object_paginated(EngagementNotes, http, fetch_engagements_notes), - crm_object_paginated(EngagementTasks, http, fetch_engagements_tasks), - crm_object_paginated(Goals, http, fetch_goals), - crm_object_paginated(FeedbackSubmissions, http, fetch_feedback_submissions), - crm_object_paginated(LineItems, http, fetch_line_items), - crm_object_paginated(Products, http, fetch_products), - crm_object_paginated(Ticket, http, fetch_recent_tickets), + crm_object_paginated(EngagementCalls, http), + crm_object_paginated(EngagementEmails, http), + crm_object_paginated(EngagementMeetings, http), + crm_object_paginated(EngagementNotes, http), + crm_object_paginated(EngagementTasks, http), + crm_object_paginated(Goals, http), + crm_object_paginated(FeedbackSubmissions, http), + crm_object_paginated(LineItems, http), + crm_object_paginated(Products, http), + crm_object_paginated(Ticket, http), crm_object_custom(MarketingEmails, http, fetch_recent_marketing_emails), crm_object_custom(EmailSubscriptions, http, fetch_email_subscriptions), crm_object_custom(MarketingForms, http, fetch_marketing_forms), @@ -119,7 +119,7 @@ async def all_resources( def crm_object_paginated( - cls: type[CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn + cls: type[CRMObject], http: HTTPSession ) -> common.Resource: """Base Resource to run V3 API objects using pagination From d05f4013055c39b53f5b54d8211c74967d74b685 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Mon, 1 Apr 2024 11:59:35 -0300 Subject: [PATCH 04/17] fixing non existing imports --- .../source_hubspot_native/__init__.py | 1 - .../source_hubspot_native/resources.py | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/source-hubspot-native/source_hubspot_native/__init__.py b/source-hubspot-native/source_hubspot_native/__init__.py index f8204de2eb..1f42d304b3 100644 --- a/source-hubspot-native/source_hubspot_native/__init__.py +++ b/source-hubspot-native/source_hubspot_native/__init__.py @@ -43,7 +43,6 @@ async def discover( ) -> response.Discovered[ResourceConfig]: resources = await all_resources(log, self, discover.config) custom_resources = await all_custom_resources(log, self, discover.config) - log.debug(f"{custom_resources}") if custom_resources is not None: resources += custom_resources return common.discovered(resources) diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index f81f2f9d6c..43178dab42 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -58,13 +58,7 @@ fetch_recent_contacts, fetch_recent_deals, fetch_recent_engagements, - fetch_recent_tickets, fetch_recent_contacts_lists, - fetch_engagements_calls, - fetch_engagements_emails, - fetch_engagements_notes, - fetch_engagements_tasks, - fetch_engagements_meetings, fetch_recent_ticket_pipelines, fetch_recent_deal_pipelines, fetch_recent_email_events, @@ -73,11 +67,7 @@ fetch_campaigns, fetch_marketing_forms, fetch_owners, - fetch_line_items, - fetch_products, fetch_workflows, - fetch_goals, - fetch_feedback_submissions, fetch_email_subscriptions, fetch_contacts_lists_subscription, ) From ce3cbf084de2fa3451a0435b0b2d4534b27eff9f Mon Sep 17 00:00:00 2001 From: Luishfs Date: Mon, 1 Apr 2024 13:30:50 -0300 Subject: [PATCH 05/17] Removed fixed schema generation and merged all resources in one function --- .../source_hubspot_native/__init__.py | 4 - .../source_hubspot_native/custom_resources.py | 144 ------------------ .../source_hubspot_native/models.py | 11 ++ .../source_hubspot_native/resources.py | 52 ++++++- 4 files changed, 61 insertions(+), 150 deletions(-) delete mode 100644 source-hubspot-native/source_hubspot_native/custom_resources.py diff --git a/source-hubspot-native/source_hubspot_native/__init__.py b/source-hubspot-native/source_hubspot_native/__init__.py index 1f42d304b3..a00c93b364 100644 --- a/source-hubspot-native/source_hubspot_native/__init__.py +++ b/source-hubspot-native/source_hubspot_native/__init__.py @@ -13,7 +13,6 @@ from estuary_cdk.http import HTTPMixin from .resources import all_resources -from .custom_resources import all_custom_resources from .models import ( ConnectorState, EndpointConfig, @@ -42,9 +41,6 @@ async def discover( self, log: Logger, discover: request.Discover[EndpointConfig] ) -> response.Discovered[ResourceConfig]: resources = await all_resources(log, self, discover.config) - custom_resources = await all_custom_resources(log, self, discover.config) - if custom_resources is not None: - resources += custom_resources return common.discovered(resources) async def validate( diff --git a/source-hubspot-native/source_hubspot_native/custom_resources.py b/source-hubspot-native/source_hubspot_native/custom_resources.py deleted file mode 100644 index 232584af26..0000000000 --- a/source-hubspot-native/source_hubspot_native/custom_resources.py +++ /dev/null @@ -1,144 +0,0 @@ -from datetime import datetime, UTC, timedelta -from typing import Literal, Generic, TypeVar, Annotated, ClassVar, TYPE_CHECKING, Dict, Any, Mapping -from pydantic import BaseModel, Field, AwareDatetime, model_validator -from logging import Logger -import functools - -from estuary_cdk.flow import CaptureBinding -from estuary_cdk.capture import Task -#from estuary_cdk.capture.common import Resource, LogCursor, PageCursor, open_binding -from estuary_cdk.capture import common -from estuary_cdk.http import HTTPSession, HTTPMixin, TokenSource - -from .api import fetch_custom_objects -from .models import EndpointConfig, CRMObject, OAUTH2_SPEC, ResourceConfig, ResourceState - -from estuary_cdk.capture.common import BaseDocument - -async def all_custom_resources( - log: Logger, http: HTTPMixin, config: EndpointConfig -) -> list[common.Resource]: - http.token_source = TokenSource(oauth_spec=OAUTH2_SPEC, credentials=config.credentials) - all_resources = [] - - all_custom_objects = await fetch_custom_objects(log, http) - if len(all_custom_objects["results"]) == 0: - return None - - for objects in all_custom_objects["results"]: - CustomObject.NAME = objects["labels"]["plural"] - CustomObject.PRIMARY_KEY = ["/" + name for name in objects["requiredProperties"]] - CustomObject.primare = objects["requiredProperties"] - CustomObject.PROPERTY_SEARCH_NAME = objects["labels"]["plural"] - schema = generate_schema(objects) - - all_resources.append(custom_objects(CustomObject, http, schema)) - - return all_resources - - -def custom_objects( - cls: type[CRMObject], http: HTTPSession, schema: Dict, -) -> common.Resource: - - def open( - binding: CaptureBinding[ResourceConfig], - binding_index: int, - state: ResourceState, - task: Task, - ): - common.open_binding( - binding, - binding_index, - state, - task, - fetch_page=functools.partial(fetch_page, cls, http), - ) - - - started_at = datetime.now(tz=UTC) - return common.Resource( - name=cls.NAME, - key=cls.PRIMARY_KEY, - model=common.Resource.FixedSchema(value=schema), - open=open, - initial_state=ResourceState( - inc=ResourceState.Incremental(cursor=started_at), - backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), - ), - initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), - schema_inference=False, - ) - - -class CustomObject(BaseDocument, extra="allow"): - - NAME: ClassVar[str] - PRIMARY_KEY: ClassVar[list[str]] - PROPERTY_SEARCH_NAME: ClassVar[str] - IGNORE_PROPERTY_SEARCH: ClassVar[bool] = False - -def generate_schema(raw_schema: Dict) -> Dict: - properties = {} - for field in raw_schema["properties"]: - properties[field["name"]] = field_to_property_schema(field) - - schema = { - "$defs": { - "Meta": { - "properties": { - "op": { - "description": "Operation type (c: Create, u: Update, d: Delete)", - "enum": [ - "c", - "u", - "d" - ], - "title": "Op", - "type": "string" - }, - "row_id": { - "default": -1, - "description": "Row ID of the Document, counting up from zero, or -1 if not known", - "title": "Row Id", - "type": "integer" - } - }, - "required": [ - "op" - ], - "title": "Meta", - "type": "object" - } - }, - "type": "object", - "title": raw_schema["labels"]["plural"], - "additionalProperties": True, - "properties": { - "createdAt": {"type": ["null", "string"], "format": "date-time"}, - "updatedAt": {"type": ["null", "string"], "format": "date-time"}, - "archived": {"type": ["null", "boolean"]}, - "properties": {"type": ["null", "object"], "properties": properties}, - }, - "required": raw_schema["requiredProperties"] - } - for prop in raw_schema["requiredProperties"]: - schema["properties"][f"{prop}"] = {"type":["string"]} - - return schema - -def field_to_property_schema(field: Dict[str, Any]) -> Mapping[str, Any]: - field_type = field["type"] - property_schema = {} - if field_type == "enumeration" or field_type == "string": - property_schema = {"type": ["null", "string"]} - elif field_type == "datetime" or field_type == "date": - property_schema = {"type": ["null", "string"], "format": "date-time"} - elif field_type == "number": - property_schema = {"type": ["null", "number"]} - elif field_type == "boolean" or field_type == "bool": - property_schema = {"type": ["null", "boolean"]} - else: - property_schema = {"type": ["null", "string"]} - - return property_schema \ No newline at end of file diff --git a/source-hubspot-native/source_hubspot_native/models.py b/source-hubspot-native/source_hubspot_native/models.py index ec45a11ce8..decc731093 100644 --- a/source-hubspot-native/source_hubspot_native/models.py +++ b/source-hubspot-native/source_hubspot_native/models.py @@ -261,6 +261,17 @@ class V1CustomCRMObject2(BaseDocument, extra="allow"): CustomCRMObject2 = TypeVar("CustomCRMObject2", bound=V1CustomCRMObject2) CustomCRMObjectV1 = TypeVar("CustomCRMObjectV1", bound=V1CustomCRMObject) +class CustomObject(BaseDocument, extra="allow"): + + NAME: ClassVar[str] + PRIMARY_KEY: ClassVar[list[str]] + PROPERTY_SEARCH_NAME: ClassVar[str] + IGNORE_PROPERTY_SEARCH: ClassVar[bool] = False + ASSOCIATED_ENTITIES: ClassVar[list[str]] = [] + + createdAt: AwareDatetime + updatedAt: AwareDatetime + class Company(BaseCRMObject): NAME = Names.companies PROPERTY_SEARCH_NAME = PropertyNames.companies diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index 43178dab42..fba0860fb0 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -1,5 +1,5 @@ from datetime import datetime, UTC, timedelta -from typing import AsyncGenerator, Awaitable, Iterable +from typing import AsyncGenerator, Awaitable, Iterable, Dict from logging import Logger import functools @@ -13,6 +13,7 @@ BaseCRMObject, CRMObject, V1CRMObject, + CustomObject, Company, Contact, Deal, @@ -70,6 +71,7 @@ fetch_workflows, fetch_email_subscriptions, fetch_contacts_lists_subscription, + fetch_custom_objects, ) @@ -77,7 +79,8 @@ async def all_resources( log: Logger, http: HTTPMixin, config: EndpointConfig ) -> list[common.Resource]: http.token_source = TokenSource(oauth_spec=OAUTH2_SPEC, credentials=config.credentials) - return [ + + resources_list = [ crm_object_streamed(Company, http, fetch_recent_companies), crm_object_streamed(Contact, http, fetch_recent_contacts), crm_object_streamed(Deal, http, fetch_recent_deals), @@ -107,6 +110,18 @@ async def all_resources( properties(http), ] + all_custom_objects = await fetch_custom_objects(log, http) + if len(all_custom_objects["results"]) != 0: + for objects in all_custom_objects["results"]: + BaseCRMObject.NAME = objects["labels"]["plural"].lower() + BaseCRMObject.PRIMARY_KEY = ["/id"] + BaseCRMObject.PROPERTY_SEARCH_NAME = objects["labels"]["plural"].lower() + BaseCRMObject.ASSOCIATED_ENTITIES = [] + + resources_list.append(custom_objects(BaseCRMObject, http)) + + return resources_list + def crm_object_paginated( cls: type[CRMObject], http: HTTPSession @@ -370,3 +385,36 @@ def open( ), schema_inference=True, ) + +def custom_objects( + cls: type[CRMObject], http: HTTPSession +) -> common.Resource: + + def open( + binding: CaptureBinding[ResourceConfig], + binding_index: int, + state: ResourceState, + task: Task, + ): + common.open_binding( + binding, + binding_index, + state, + task, + fetch_page=functools.partial(fetch_page, cls, http), + ) + + + started_at = datetime.now(tz=UTC) + return common.Resource( + name=cls.NAME, + key=cls.PRIMARY_KEY, + model=cls, + open=open, + initial_state=ResourceState( + inc=ResourceState.Incremental(cursor=started_at), + backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), + ), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), + schema_inference=False, + ) From 50e7f4d52b6b5f934e581408ecd8fa6fff7b1cc4 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Tue, 2 Apr 2024 16:39:22 -0300 Subject: [PATCH 06/17] Fixed all test-related bugs, at this point in time, all tests passes --- .../acmeCo/email_subscriptions.schema.yaml | 16 +- source-hubspot-native/acmeCo/flow.yaml | 2 +- source-hubspot-native/config.yaml | 10 +- .../source_hubspot_native/api.py | 22 + .../source_hubspot_native/models.py | 13 +- .../source_hubspot_native/resources.py | 40 +- source-hubspot-native/test.flow.yaml | 3 + ...tests_test_snapshots__capture__stdout.json | 2081 +++++++++++++++++ ...ests_test_snapshots__discover__stdout.json | 193 +- ...ve_tests_test_snapshots__spec__stdout.json | 2 +- source-hubspot-native/tests/test_snapshots.py | 13 - 11 files changed, 2360 insertions(+), 35 deletions(-) create mode 100644 source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json diff --git a/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml index 5a61ebfb80..eb40bb584d 100644 --- a/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml +++ b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml @@ -28,8 +28,16 @@ properties: op: u row_id: -1 description: Document metadata - portalId: - title: Portalid + id: + title: Id + type: string + updatedAt: + format: date-time + title: Updatedat + type: string + createdAt: + format: date-time + title: Createdat type: string subscriptionDefinitions: default: [] @@ -38,7 +46,9 @@ properties: title: Subscriptiondefinitions type: array required: - - portalId + - id + - updatedAt + - createdAt title: EmailSubscriptions type: object x-infer-schema: true diff --git a/source-hubspot-native/acmeCo/flow.yaml b/source-hubspot-native/acmeCo/flow.yaml index 529cf3136f..c558938377 100644 --- a/source-hubspot-native/acmeCo/flow.yaml +++ b/source-hubspot-native/acmeCo/flow.yaml @@ -35,7 +35,7 @@ collections: acmeCo/email_subscriptions: schema: email_subscriptions.schema.yaml key: - - /portalId + - /id acmeCo/engagements: schema: engagements.schema.yaml key: diff --git a/source-hubspot-native/config.yaml b/source-hubspot-native/config.yaml index 0c3e9e764f..b02df12654 100644 --- a/source-hubspot-native/config.yaml +++ b/source-hubspot-native/config.yaml @@ -1,8 +1,8 @@ credentials: - client_id_sops: ENC[AES256_GCM,data:cN4R7R7ixwd0QiX9uanxOSx9xsGmTi4oEHX6vNbTAdY6VFiU,iv:2fvIsHIOv4YtAgWb0P777akB5LZyRNXXpRU9IJp2q5Y=,tag:VqxBHJO6I21yMiHpw6nHBg==,type:str] - client_secret_sops: ENC[AES256_GCM,data:UlJR+XVn0rgji2eoxy6pe0xUFa3QqrfGyxsGDwo3ntRR4z0/,iv:zn0YVI1gE5vOKzfeaCw1qYe76375RhRBJdPDL/mO90k=,tag:P0ziOgenDQKUUdZyFp8sZA==,type:str] + client_id_sops: ENC[AES256_GCM,data:2llAUKkyKCACfkIFjpnsAuyPSULNs1afy8IhxqCf7haT+ylH,iv:uGa7YcSoxTsoQhj07pbS4gaeoOAft05TZKJdR7FZD4Q=,tag:bT7z59NzNm1nLWj+alouAg==,type:str] + client_secret_sops: ENC[AES256_GCM,data:UJTnS4mbkaiCUKbfZOPBpPPJa3GauK0tjLvYpdAAyjj+snG8,iv:Wf66M/WdQ857WEXhXgBBtRNz4DSfgqiJXzNnWse3rpo=,tag:WsgmnH8Dmi0wEwdZm5t29Q==,type:str] credentials_title: OAuth Credentials - refresh_token_sops: ENC[AES256_GCM,data:pv1aNqErp9iHsVpNk1uPExiwQfuAq2KFmAS9okXiBDAChIu4,iv:PWxe5ZwPd5GGOiW2MtEucGbrRbZs5U0zLYIvTsNBw5c=,tag:dblxNOWFmXynn1oqdslWBQ==,type:str] + refresh_token_sops: ENC[AES256_GCM,data:kTUyVUuNvofeZxm6+DgSAphLlHXWq5WKiloQz3Og6PHMtkPM,iv:M1xSJpdr5JC8hPF4LNkpXS1B8xkX0pCBNT6FkIYdIcU=,tag:GRd1uvS9JMREAZeSyqixRg==,type:str] token_expiry_date: "2024-02-01T17:01:21.703Z" sops: kms: [] @@ -13,8 +13,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-02-15T19:21:33Z" - mac: ENC[AES256_GCM,data:Z2MzPnszwAZ9uT7GBh0YWPibdvq7KdCOYvxpbGhQw8b+O5picVD5T3I+UOZNNbxrE7sYHo+HJ2FrJTkqOrT7RZyfmmjdv/cZuy5ecRJSIyhJrTu4GXLCfeHRyj0bbjZ6kif/qUMG2POUO/ZJXV9exXbi0X5HQSWe2hgBxYAUk60=,iv:l3WdO+yhJjfeX9xA/QQO91EH2KP8ICnzvpfi4eBYfu8=,tag:NGQDHhl8byl/hrrzSsOpSQ==,type:str] + lastmodified: "2024-04-02T19:03:51Z" + mac: ENC[AES256_GCM,data:8zgxwCO13ILg+xRWW1CVP+vtEfazwKZOYvZHo6NHyVxw4xUNzjRQuWcw+y9tcHig46OsY4db1pXc9R7tkj5pyZf7OZ2omCHfy9/r46ylYVAlCAsU9UXUSfrXcCHviWqIGkSuHAtfVNTSFXTVUAX9I066w6oGD/iAIQt1Ac4EXSE=,iv:vZW3taXXEwpnLcmtJ7aAlmBjAoeLyd9BdueHrQHEOck=,tag:nMXHQKwMJmmR21VtTmGtBA==,type:str] pgp: [] encrypted_suffix: _sops version: 3.8.1 diff --git a/source-hubspot-native/source_hubspot_native/api.py b/source-hubspot-native/source_hubspot_native/api.py index ae9871f061..dbeda27ff1 100644 --- a/source-hubspot-native/source_hubspot_native/api.py +++ b/source-hubspot-native/source_hubspot_native/api.py @@ -18,6 +18,8 @@ Association, BatchResult, CRMObject, + SubscriptionResult, + EmailSubscriptions, WorkflowResult, V1CustomCRMObject, V1CustomCRMObject2, @@ -208,6 +210,26 @@ async def fetch_page_workflow( if doc.updatedAt < cutoff: yield doc +async def fetch_page_subscriptions( + # Closed over via functools.partial: + cls: type[V1CRMObject], + http: HTTPSession, + # Remainder is common.FetchPageFn: + log: Logger, + page: str | None, + cutoff: datetime, +) -> AsyncGenerator[CRMObject | str, None]: + + url = f"{HUB}{cls.ENFORCE_URL}" + _cls: Any = cls # Silence mypy false-positive. + result: SubscriptionResult[EmailSubscriptions] = SubscriptionResult[_cls].model_validate_json( + await http.request(log, url, method="GET", params=None) + ) + + for doc in result.subscriptionDefinitions: + if doc.updatedAt < cutoff: + yield doc + async def fetch_batch( log: Logger, diff --git a/source-hubspot-native/source_hubspot_native/models.py b/source-hubspot-native/source_hubspot_native/models.py index decc731093..c191ed10aa 100644 --- a/source-hubspot-native/source_hubspot_native/models.py +++ b/source-hubspot-native/source_hubspot_native/models.py @@ -28,10 +28,9 @@ "files.ui_hidden.read", "forms", "forms-uploaded-files", - "service-feedback-access", "sales-email-read", "communication_preferences.read", - "workflows-access-public-api", + "communication_preferences.read_write", "tickets", ] @@ -271,6 +270,7 @@ class CustomObject(BaseDocument, extra="allow"): createdAt: AwareDatetime updatedAt: AwareDatetime + results: list[int] = [] class Company(BaseCRMObject): NAME = Names.companies @@ -502,12 +502,14 @@ class FeedbackSubmissions(BaseCRMObject): class EmailSubscriptions(V1CRMObject): NAME = Names.email_subscriptions - PRIMARY_KEY = ['/portalId'] + PRIMARY_KEY = ['/id'] ASSOCIATED_ENTITIES = [] ENFORCE_URL = EnforceUrl.email_subscriptions IGNORE_PROPERTY_SEARCH = True - portalId: str + id: str + updatedAt: AwareDatetime + createdAt: AwareDatetime subscriptionDefinitions: list[int] = [] # An Association, as returned by the v4 associations API. @@ -576,6 +578,9 @@ class Error(BaseModel, extra="forbid"): class WorkflowResult(BaseModel, Generic[Item], extra="forbid"): workflows: list[Item] +class SubscriptionResult(BaseModel, Generic[Item], extra="forbid"): + subscriptionDefinitions: list[Item] + # The following are models for HubSpot's "legacy" APIs for fetching # recently-changed entities. We model them because these APIs are diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index fba0860fb0..19528d67ce 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -52,6 +52,7 @@ fetch_page, fetch_page_custom, fetch_page_workflow, + fetch_page_subscriptions, fetch_properties, fetch_changes, fetch_changes_no_batch, @@ -103,7 +104,7 @@ async def all_resources( crm_object_paginated(Products, http), crm_object_paginated(Ticket, http), crm_object_custom(MarketingEmails, http, fetch_recent_marketing_emails), - crm_object_custom(EmailSubscriptions, http, fetch_email_subscriptions), + subscription_object(EmailSubscriptions, http, fetch_email_subscriptions), crm_object_custom(MarketingForms, http, fetch_marketing_forms), crm_object_custom(Owners, http, fetch_owners), workflow_object(Workflows, http, fetch_workflows), @@ -242,7 +243,7 @@ def open( fetch_changes=functools.partial(fetch_changes, cls, fetch_recent, http), ) - started_at = datetime.now(tz=UTC) + started_at = datetime.now(tz=UTC) - timedelta(days=1825) return common.Resource( name=cls.NAME, @@ -289,7 +290,7 @@ def open( fetch_changes=functools.partial(fetch_changes_no_batch, cls, fetch_recent, http), ) - started_at = datetime.now(tz=UTC) + started_at = datetime.now(tz=UTC) - timedelta(days=1825) return common.Resource( name=cls.NAME, @@ -326,7 +327,7 @@ def open( fetch_page=functools.partial(fetch_page_workflow, cls, http), ) - started_at = datetime.now(tz=UTC) + started_at = datetime.now(tz=UTC) - timedelta(days=1825) return common.Resource( name=cls.NAME, @@ -341,7 +342,38 @@ def open( schema_inference=True, ) +def subscription_object( + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn +) -> common.Resource: + + def open( + binding: CaptureBinding[ResourceConfig], + binding_index: int, + state: ResourceState, + task: Task, + ): + common.open_binding( + binding, + binding_index, + state, + task, + fetch_page=functools.partial(fetch_page_subscriptions, cls, http), + ) + + started_at = datetime.now(tz=UTC) + return common.Resource( + name=cls.NAME, + key=["/id"], + model=cls, + open=open, + initial_state=ResourceState( + inc=ResourceState.Incremental(cursor=started_at), + backfill=ResourceState.Backfill(next_page=None, cutoff=started_at), + ), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=7)), + schema_inference=True, + ) def properties(http: HTTPSession) -> common.Resource: diff --git a/source-hubspot-native/test.flow.yaml b/source-hubspot-native/test.flow.yaml index 34d81bb5f7..cde0a8069f 100644 --- a/source-hubspot-native/test.flow.yaml +++ b/source-hubspot-native/test.flow.yaml @@ -79,10 +79,12 @@ captures: name: goal_targets interval: PT420S target: acmeCo/goal_targets + disable: true - resource: name: feedback_submissions interval: PT420S target: acmeCo/feedback_submissions + disable: true - resource: name: line_items interval: PT420S @@ -115,6 +117,7 @@ captures: name: workflows interval: PT420S target: acmeCo/workflows + disable: true - resource: name: properties interval: PT420S diff --git a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json new file mode 100644 index 0000000000..957ebae5d1 --- /dev/null +++ b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json @@ -0,0 +1,2081 @@ +[ + [ + "acmeCo/marketing_emails", + { + "activeDomain": "45386308.hs-sites.com", + "archived": false, + "businessUnitId": "0", + "content": { + "templatePath": "@hubspot/email/dnd/Plain_email.html", + "widgets": { + "primary_rich_text_module": { + "body": { + "html": "Hi there,

Your ticket has been closed. Thanks for contacting our support team. We hope that your issue has been resolved to your satisfaction.

Please don't hesitate to reach out if your issue isn't resolved.

Request details
Contact email: {{contact.email}}
Date submitted: {{ticket.createdate}}
Reference number: {{ticket.hs_ticket_id}}
Issue: {{ticket.subject}}
Issue description: {{ticket.content}}
", + "module_id": 1155639 + }, + "id": "primary_rich_text_module", + "module_id": 1155639, + "name": "primary_rich_text_module", + "type": "module" + } + } + }, + "createdAt": "2024-02-27T07:05:00.658Z", + "createdById": "100", + "deletedAt": "1970-01-01T00:00:00Z", + "from": { + "fromName": "support@45386308.hs-inbox.com", + "replyTo": "support@45386308.hs-inbox.com" + }, + "id": 158518653207, + "isPublished": true, + "isTransactional": true, + "language": "en", + "name": "Ticket closed", + "publishDate": "2024-02-27T07:05:01.614Z", + "publishedById": "100", + "state": "AUTOMATED", + "subcategory": "ticket_closed_kickback_email", + "subject": "Your ticket '{{ticket.subject}}' has been closed", + "subscriptionDetails": { + "officeLocationId": "-1", + "subscriptionId": "-1" + }, + "to": { + "limitSendFrequency": false, + "suppressGraymail": false + }, + "type": "TICKET_EMAIL", + "updatedAt": "2024-02-27T07:05:01.976000Z", + "updatedById": "100" + } + ], + [ + "acmeCo/marketing_emails", + { + "activeDomain": "45386308.hs-sites.com", + "archived": false, + "businessUnitId": "0", + "content": { + "templatePath": "@hubspot/email/dnd/Plain_email.html", + "widgets": { + "primary_rich_text_module": { + "body": { + "html": "Hi there,
Your request has been received and is being reviewed by our support team. We'll get back to you as soon as we can.

Request details
Contact email: {{contact.email}}
Date submitted: {{ticket.createdate}}
Reference number: {{ticket.hs_ticket_id}}
Issue: {{ticket.subject}}
Issue description: {{ticket.content}}
", + "module_id": 1155639 + }, + "id": "primary_rich_text_module", + "module_id": 1155639, + "name": "primary_rich_text_module", + "type": "module" + } + } + }, + "createdAt": "2024-02-27T07:05:02.194Z", + "createdById": "100", + "deletedAt": "1970-01-01T00:00:00Z", + "from": { + "fromName": "support@45386308.hs-inbox.com", + "replyTo": "support@45386308.hs-inbox.com" + }, + "id": 158518708637, + "isPublished": true, + "isTransactional": true, + "language": "en", + "name": "Ticket received", + "publishDate": "2024-02-27T07:05:02.857Z", + "publishedById": "100", + "state": "AUTOMATED", + "subcategory": "ticket_opened_kickback_email", + "subject": "Your ticket '{{ticket.subject}}' has been received", + "subscriptionDetails": { + "officeLocationId": "158518862992", + "subscriptionId": "-1" + }, + "to": { + "limitSendFrequency": false, + "suppressGraymail": false + }, + "type": "TICKET_EMAIL", + "updatedAt": "2024-02-27T07:05:03.174000Z", + "updatedById": "100" + } + ], + [ + "acmeCo/marketing_emails", + { + "activeDomain": "45386308.hs-sites.com", + "archived": false, + "businessUnitId": "0", + "campaign": "c92d1583-d11b-4d32-9b08-762c077060c0", + "campaignName": "Abandoned cart", + "content": { + "flexAreas": { + "main": { + "boxFirstElementIndex": null, + "boxLastElementIndex": null, + "boxed": false, + "isSingleColumnFullWidth": false, + "sections": [ + { + "columns": [ + { + "id": "column-0-0", + "widgets": [ + "module-0-0-0" + ], + "width": 12 + } + ], + "id": "section-0", + "style": { + "backgroundType": "CONTENT", + "paddingBottom": "40px", + "paddingTop": "40px", + "stack": "LEFT_TO_RIGHT" + } + }, + { + "columns": [ + { + "id": "column-1-0", + "widgets": [ + "module-1-0-0" + ], + "width": 12 + } + ], + "id": "section-1", + "style": { + "backgroundColor": "", + "backgroundType": "CONTENT", + "paddingBottom": "0px", + "paddingTop": "0px", + "stack": "LEFT_TO_RIGHT" + } + } + ] + } + }, + "styleSettings": { + "backgroundColor": "#ffffff", + "bodyBorderWidth": 1, + "bodyColor": "#ffffff", + "buttonStyleSettings": { + "backgroundColor": "#197FC4", + "cornerRadius": 8, + "fontStyle": { + "bold": false, + "color": "#ffffff", + "font": "Arial, sans-serif", + "italic": false, + "size": 16, + "underline": false + } + }, + "dividerStyleSettings": { + "color": { + "color": "#000000", + "opacity": 100 + }, + "height": 1 + }, + "headingOneFont": { + "size": 28 + }, + "headingTwoFont": { + "size": 22 + }, + "linksFont": { + "bold": false, + "color": "#00a4bd", + "italic": false, + "underline": true + }, + "primaryFont": "Arial, sans-serif", + "primaryFontColor": "#23496d", + "primaryFontSize": 15, + "secondaryFont": "Arial, sans-serif", + "secondaryFontColor": "#23496d", + "secondaryFontSize": 12 + }, + "templatePath": "@hubspot/email/dnd/plain_text.html", + "widgets": { + "module-0-0-0": { + "body": { + "css_class": "dnd-module", + "html": "

Hello {{ contact.firstname }},

Plain text emails have minimal formatting so your reader can really focus on what you have to say. Introduce yourself and explain why you\u2019re reaching out.

Every email should try to lead the reader to some kind of action. Use this space to describe why the reader should want to click on the link below. Put the link on its own line to really draw their eye to it.

Link text

Now it\u2019s time to wrap up your email. Before your signature, thank the recipient for reading. You can also invite them to send this email to any of their colleagues who might be interested.

All the best,
Your full name
Your job title
Other contact information

", + "i18nKey": "richText.plainText", + "lineNumber": 32, + "parent_widget_container": null, + "path": "@hubspot/rich_text", + "schema_version": 2, + "startPosition": 19 + }, + "child_css": {}, + "css": {}, + "id": "module-0-0-0", + "label": null, + "module_id": 1155639, + "name": "module-0-0-0", + "order": 2, + "smart_type": null, + "styles": {}, + "type": "module" + }, + "module-1-0-0": { + "body": { + "align": "center", + "css_class": "dnd-module", + "font": { + "color": "#23496d", + "font": "Arial, sans-serif", + "size": { + "units": "px", + "value": 12 + } + }, + "lineNumber": 61, + "link_font": { + "color": "#00a4bd", + "font": "Helvetica,Arial,sans-serif", + "size": { + "units": "px", + "value": 12 + }, + "styles": { + "bold": false, + "italic": false, + "underline": true + } + }, + "parent_widget_container": null, + "path": "@hubspot/email_footer", + "schema_version": 2, + "startPosition": -697, + "unsubscribe_link_type": "both" + }, + "child_css": {}, + "css": {}, + "id": "module-1-0-0", + "label": null, + "module_id": 2869621, + "name": "module-1-0-0", + "order": 3, + "smart_type": null, + "styles": {}, + "type": "module" + }, + "preview_text": { + "body": { + "value": "" + }, + "child_css": {}, + "css": {}, + "id": "preview_text", + "label": "Preview Text This will be used as the preview text that displays in some email clients", + "name": "preview_text", + "order": 0, + "smart_type": null, + "styles": {}, + "type": "text" + } + } + }, + "createdAt": "2024-03-06T13:58:43.414Z", + "createdById": "51770238", + "deletedAt": "1970-01-01T00:00:00Z", + "from": { + "fromName": "Luis Henrique", + "replyTo": "leofs123@gmail.com" + }, + "id": 159647332871, + "isPublished": false, + "isTransactional": false, + "language": "en", + "name": "New email", + "publishDate": "2024-03-06T13:58:59Z", + "sendOnPublish": true, + "state": "DRAFT", + "subcategory": "batch", + "subject": "", + "subscriptionDetails": { + "officeLocationId": "158518862992", + "subscriptionId": "308082190" + }, + "to": { + "contactIds": { + "exclude": [], + "include": [] + }, + "contactLists": { + "exclude": [], + "include": [] + }, + "suppressGraymail": true + }, + "type": "BATCH_EMAIL", + "updatedAt": "2024-03-06T13:58:59.797000Z", + "updatedById": "51770238" + } + ], + [ + "acmeCo/marketing_emails", + { + "activeDomain": "45386308.hs-sites.com", + "archived": false, + "businessUnitId": "0", + "content": { + "flexAreas": { + "main": { + "boxFirstElementIndex": null, + "boxLastElementIndex": null, + "boxed": false, + "isSingleColumnFullWidth": false, + "sections": [ + { + "columns": [ + { + "id": "column-0-0", + "widgets": [ + "module-0-0-0" + ], + "width": 12 + } + ], + "id": "section-0", + "style": { + "backgroundColor": "#eaf0f6", + "backgroundType": "CONTENT", + "paddingBottom": "10px", + "paddingTop": "10px", + "stack": "LEFT_TO_RIGHT" + } + }, + { + "columns": [ + { + "id": "column-1-0", + "widgets": [ + "module-1-0-0" + ], + "width": 12 + } + ], + "id": "section-1", + "style": { + "backgroundType": "CONTENT", + "paddingBottom": "30px", + "paddingTop": "30px", + "stack": "LEFT_TO_RIGHT" + } + }, + { + "columns": [ + { + "id": "column-2-0", + "widgets": [ + "module-2-0-0" + ], + "width": 12 + } + ], + "id": "section-2", + "style": { + "backgroundColor": "", + "backgroundType": "CONTENT", + "paddingBottom": "20px", + "paddingTop": "20px", + "stack": "LEFT_TO_RIGHT" + } + } + ] + } + }, + "styleSettings": { + "backgroundColor": "#EAF0F6", + "bodyBorderColor": "#EAF0F6", + "bodyBorderColorChoice": "BORDER_MANUAL", + "bodyBorderWidth": 1, + "bodyColor": "#ffffff", + "buttonStyleSettings": { + "backgroundColor": "#00a4bd", + "cornerRadius": 8, + "fontStyle": { + "bold": false, + "color": "#ffffff", + "font": "Arial, sans-serif", + "italic": false, + "size": 16, + "underline": false + } + }, + "dividerStyleSettings": { + "color": { + "color": "#23496d", + "opacity": 100 + }, + "height": 1, + "lineType": "solid" + }, + "headingOneFont": { + "size": 28 + }, + "headingTwoFont": { + "size": 22 + }, + "linksFont": { + "bold": false, + "color": "#00a4bd", + "italic": false, + "underline": true + }, + "primaryFont": "Arial, sans-serif", + "primaryFontColor": "#23496d", + "primaryFontSize": 15, + "secondaryFont": "Arial, sans-serif", + "secondaryFontColor": "#23496d", + "secondaryFontSize": 12 + }, + "templatePath": "@hubspot/email/dnd/welcome.html", + "widgets": { + "module-0-0-0": { + "body": { + "alignment": "center", + "css_class": "dnd-module", + "hs_enable_module_padding": true, + "img": { + "alt": "HubSpot logo orange", + "height": 72, + "src": "https://static.hsappstatic.net/TemplateAssets/static-1.262/img/hs_default_template_images/email_dnd_template_images/company-logo-orange.png", + "width": 240 + }, + "lineNumber": 37, + "parent_widget_container": null, + "path": "@hubspot/image_email", + "schema_version": 2, + "startPosition": -241 + }, + "child_css": {}, + "css": {}, + "id": "module-0-0-0", + "label": null, + "module_id": 1367093, + "name": "module-0-0-0", + "order": 1, + "smart_type": null, + "styles": {}, + "type": "module" + }, + "module-1-0-0": { + "body": { + "css_class": "dnd-module", + "html": "

Welcome friend, thank the reader for signing up to your newsletter and welcome them on board. Below your introduction, add a few links to some popular pages or posts on your website to give the reader an idea of what\u2019s to come.

  1. Showcase your best stories
    Give an overview of an existing blog post or a popular story from a previous newsletter. Be sure to add a link so the reader can learn more.

  2. Help people get to know you
    Share a link to your website\u2019s about us page where the reader can learn more about you and your community.

  3. Keep the conversation going
    Tell your reader how they can get in touch if they have questions.

Thanks,
The Your Company Name team

", + "i18nKey": "richText.welcome.primary", + "lineNumber": 47, + "parent_widget_container": null, + "path": "@hubspot/rich_text", + "schema_version": 2, + "startPosition": 19 + }, + "child_css": {}, + "css": {}, + "id": "module-1-0-0", + "label": null, + "module_id": 1155639, + "name": "module-1-0-0", + "order": 3, + "smart_type": null, + "styles": {}, + "type": "module" + }, + "module-2-0-0": { + "body": { + "align": "center", + "css_class": "dnd-module", + "font": { + "color": "#23496d", + "font": "Arial, sans-serif", + "size": { + "units": "px", + "value": 12 + } + }, + "hs_enable_module_padding": false, + "lineNumber": 76, + "link_font": { + "color": "#00a4bd", + "font": "Helvetica,Arial,sans-serif", + "size": { + "units": "px", + "value": 12 + }, + "styles": { + "bold": false, + "italic": false, + "underline": true + } + }, + "parent_widget_container": null, + "path": "@hubspot/email_footer", + "schema_version": 2, + "startPosition": -729, + "unsubscribe_link_type": "both" + }, + "child_css": {}, + "css": {}, + "id": "module-2-0-0", + "label": null, + "module_id": 2869621, + "name": "module-2-0-0", + "order": 4, + "smart_type": null, + "styles": {}, + "type": "module" + }, + "preview_text": { + "body": { + "value": "" + }, + "child_css": {}, + "css": {}, + "id": "preview_text", + "label": "Preview Text This will be used as the preview text that displays in some email clients", + "name": "preview_text", + "order": 0, + "smart_type": null, + "styles": {}, + "type": "text" + } + } + }, + "createdAt": "2024-03-13T18:28:47.620Z", + "createdById": "51770238", + "deletedAt": "1970-01-01T00:00:00Z", + "from": { + "fromName": "Luis Henrique", + "replyTo": "leofs123@gmail.com" + }, + "id": 160599935909, + "isPublished": false, + "isTransactional": false, + "language": "en", + "name": "New email", + "publishDate": "2024-03-13T18:28:59Z", + "sendOnPublish": true, + "state": "DRAFT", + "subcategory": "batch", + "subject": "", + "subscriptionDetails": { + "officeLocationId": "158518862992", + "subscriptionId": "308082190" + }, + "to": { + "contactIds": { + "exclude": [], + "include": [] + }, + "contactLists": { + "exclude": [], + "include": [] + }, + "suppressGraymail": true + }, + "type": "BATCH_EMAIL", + "updatedAt": "2024-03-13T18:28:59.892000Z", + "updatedById": "51770238" + } + ], + [ + "acmeCo/email_subscriptions", + { + "communicationMethod": "Email", + "createdAt": "2024-02-27T07:05:00.536000Z", + "description": "Receive feedback requests and customer service information.", + "id": "308082187", + "isActive": true, + "isDefault": true, + "isInternal": true, + "name": "Customer Service Communication", + "purpose": "Service", + "updatedAt": "2024-02-27T07:05:00.536000Z" + } + ], + [ + "acmeCo/email_subscriptions", + { + "communicationMethod": "Email", + "createdAt": "2024-02-27T07:05:03.130000Z", + "description": "Marketing offers and updates.", + "id": "308082190", + "isActive": true, + "isDefault": true, + "isInternal": false, + "name": "Marketing Information", + "purpose": "Marketing", + "updatedAt": "2024-02-27T07:05:03.130000Z" + } + ], + [ + "acmeCo/email_subscriptions", + { + "communicationMethod": "Email", + "createdAt": "2024-02-27T07:05:03.192000Z", + "description": "One to One emails", + "id": "308082191", + "isActive": true, + "isDefault": true, + "isInternal": true, + "name": "One to One", + "purpose": "Sales", + "updatedAt": "2024-02-27T07:05:03.192000Z" + } + ], + [ + "acmeCo/owners", + { + "archived": false, + "createdAt": "2024-02-27T07:05:06.660Z", + "email": "leofs123@gmail.com", + "firstName": "Luis", + "id": 750122779, + "lastName": "Henrique", + "updatedAt": "2024-03-13T18:17:48.512000Z", + "userId": 51770238, + "userIdIncludingInactive": 51770238 + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 0 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:46.048Z", + "description": "Short about-company", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "About Us", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": false + }, + "name": "about_us", + "options": [], + "type": "string", + "updatedAt": "2022-05-27T22:46:58.812Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 1 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.422Z", + "description": "Calculation context property providing timestamp for rollup property closedate calculated as EARLIEST_VALUE via values of closedate on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "closedate_timestamp_earliest_value_a2a17e6e", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "closedate_timestamp_earliest_value_a2a17e6e", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:49:32.226Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 2 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:46.015Z", + "description": "Number of facebook fans", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "number", + "formField": false, + "groupName": "socialmediainformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Facebook Fans", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": false + }, + "name": "facebookfans", + "options": [], + "type": "number", + "updatedAt": "2022-05-27T22:53:52.737Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 3 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.392Z", + "description": "Calculation context property providing timestamp for rollup property first_contact_createdate calculated as EARLIEST_VALUE via values of createdate on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "first_contact_createdate_timestamp_earliest_value_78b50eea", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "first_contact_createdate_timestamp_earliest_value_78b50eea", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:54:23.365Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 4 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:46.539Z", + "description": "The first conversion date across all contacts associated this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "conversioninformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "First Conversion Date", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "first_conversion_date", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:54:38.680Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 5 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.266Z", + "description": "Calculation context property providing timestamp for rollup property first_conversion_date calculated as EARLIEST_VALUE via values of first_conversion_date on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "conversioninformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "first_conversion_date_timestamp_earliest_value_61f58f2c", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "first_conversion_date_timestamp_earliest_value_61f58f2c", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:54:53.981Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 6 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:46.570Z", + "description": "The first form submitted across all contacts associated this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "conversioninformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "First Conversion", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "first_conversion_event_name", + "options": [], + "type": "string", + "updatedAt": "2022-05-27T22:55:09.295Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 7 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.295Z", + "description": "Calculation context property providing timestamp for rollup property first_conversion_event_name calculated as EARLIEST_VALUE via values of first_conversion_event_name on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "conversioninformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "first_conversion_event_name_timestamp_earliest_value_68ddae0a", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "first_conversion_event_name_timestamp_earliest_value_68ddae0a", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:55:24.779Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 8 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:38.092Z", + "description": "Date the first deal was associated with this company record.", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "deal_information", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "First Deal Created Date", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "first_deal_created_date", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:55:55.396Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 9 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:37.951Z", + "description": "The year the company was created. Powered by HubSpot Insights. ", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": true, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Year Founded", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": false + }, + "name": "founded_year", + "options": [], + "type": "string", + "updatedAt": "2022-12-02T16:27:52.403Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 10 + }, + "calculated": false, + "createdAt": "2019-09-17T19:45:47.823Z", + "description": "Additional domains belonging to this company", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "checkbox", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Additional Domains", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyOptions": false, + "readOnlyValue": false + }, + "name": "hs_additional_domains", + "options": [], + "type": "enumeration", + "updatedAt": "2023-05-01T19:44:41.869Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 11 + }, + "calculated": false, + "createdAt": "1970-01-01T00:00:00Z", + "description": "The business units this record is assigned to.", + "displayOrder": -1, + "externalOptions": true, + "fieldType": "checkbox", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Business units", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": false + }, + "name": "hs_all_assigned_business_unit_ids", + "options": [], + "type": "enumeration", + "updatedAt": "2023-12-12T14:51:29.633Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 12 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:45.625Z", + "description": "The first activity for any contact associated with this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Time First Seen", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_first_timestamp", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:57:57.613Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 13 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.451Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_first_timestamp calculated as EARLIEST_VALUE via values of hs_analytics_first_timestamp on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_first_timestamp_timestamp_earliest_value_11e3a63a", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_first_timestamp_timestamp_earliest_value_11e3a63a", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:58:12.922Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 14 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:37.809Z", + "description": "The campaign responsible for the first touch creation of the first contact associated with this company", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "conversioninformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "First Touch Converting Campaign", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_first_touch_converting_campaign", + "options": [], + "type": "string", + "updatedAt": "2022-05-27T22:58:43.621Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 15 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.633Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_first_touch_converting_campaign calculated as EARLIEST_VALUE via values of hs_analytics_first_touch_converting_campaign on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_first_touch_converting_campaign_timestamp_earliest_value_4757fe10", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_first_touch_converting_campaign_timestamp_earliest_value_4757fe10", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:58:58.989Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 16 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:38.055Z", + "description": "Time of first session across all contacts associated with this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "conversioninformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Time of First Session", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_first_visit_timestamp", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:59:29.617Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 17 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.481Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_first_visit_timestamp calculated as EARLIEST_VALUE via values of hs_analytics_first_visit_timestamp on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_first_visit_timestamp_timestamp_earliest_value_accc17ae", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_first_visit_timestamp_timestamp_earliest_value_accc17ae", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T22:59:44.932Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 18 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:45.694Z", + "description": "Time last seen across all contacts associated with this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Time Last Seen", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_last_timestamp", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:00:00.346Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 19 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.511Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_last_timestamp calculated as LATEST_VALUE via values of hs_analytics_last_timestamp on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_last_timestamp_timestamp_latest_value_4e16365a", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_last_timestamp_timestamp_latest_value_4e16365a", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:00:15.673Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 20 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:37.423Z", + "description": "The campaign responsible for the last touch creation of the first contact associated with this company", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Last Touch Converting Campaign", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_last_touch_converting_campaign", + "options": [], + "type": "string", + "updatedAt": "2022-05-27T23:00:46.398Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 21 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.663Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_last_touch_converting_campaign calculated as LATEST_VALUE via values of hs_analytics_last_touch_converting_campaign on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_last_touch_converting_campaign_timestamp_latest_value_81a64e30", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_last_touch_converting_campaign_timestamp_latest_value_81a64e30", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:01:01.703Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 22 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:45.761Z", + "description": "Time of the last session attributed to any contacts that are associated with this company record.", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Time of Last Session", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_last_visit_timestamp", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:01:17.010Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 23 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.544Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_last_visit_timestamp calculated as LATEST_VALUE via values of hs_analytics_last_visit_timestamp on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_last_visit_timestamp_timestamp_latest_value_999a0fce", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_last_visit_timestamp_timestamp_latest_value_999a0fce", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:01:32.338Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 24 + }, + "calculated": false, + "createdAt": "2022-04-20T13:57:49.287Z", + "description": "Source of the last session attributed to any contacts that are associated with this company", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "select", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Latest Source", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_latest_source", + "options": [ + { + "description": "", + "displayOrder": 0, + "hidden": false, + "label": "Organic Search", + "value": "ORGANIC_SEARCH" + }, + { + "description": "", + "displayOrder": 1, + "hidden": false, + "label": "Paid Search", + "value": "PAID_SEARCH" + }, + { + "description": "", + "displayOrder": 2, + "hidden": false, + "label": "Email Marketing", + "value": "EMAIL_MARKETING" + }, + { + "description": "", + "displayOrder": 3, + "hidden": false, + "label": "Organic Social", + "value": "SOCIAL_MEDIA" + }, + { + "description": "", + "displayOrder": 4, + "hidden": false, + "label": "Referrals", + "value": "REFERRALS" + }, + { + "description": "", + "displayOrder": 5, + "hidden": false, + "label": "Other Campaigns", + "value": "OTHER_CAMPAIGNS" + }, + { + "description": "", + "displayOrder": 6, + "hidden": false, + "label": "Direct Traffic", + "value": "DIRECT_TRAFFIC" + }, + { + "description": "", + "displayOrder": 7, + "hidden": false, + "label": "Offline Sources", + "value": "OFFLINE" + }, + { + "description": "", + "displayOrder": 8, + "hidden": false, + "label": "Paid Social", + "value": "PAID_SOCIAL" + } + ], + "type": "enumeration", + "updatedAt": "2022-09-14T18:23:31.245Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 25 + }, + "calculated": false, + "createdAt": "2022-04-20T15:20:39.303Z", + "description": "Additional source details of the last session attributed to any contacts that are associated with this company", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Latest Source Data 1", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_latest_source_data_1", + "options": [], + "type": "string", + "updatedAt": "2022-09-14T18:23:31.245Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 26 + }, + "calculated": false, + "createdAt": "2022-04-20T15:37:21.799Z", + "description": "Additional source details of the last session attributed to any contacts that are associated with this company", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Latest Source Data 2", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_latest_source_data_2", + "options": [], + "type": "string", + "updatedAt": "2022-09-14T18:23:31.245Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 27 + }, + "calculated": false, + "createdAt": "2022-04-20T15:41:22.859Z", + "description": "Timestamp of when latest source occurred", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Latest Source Timestamp", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_latest_source_timestamp", + "options": [], + "type": "datetime", + "updatedAt": "2022-09-14T18:23:31.245Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 28 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:45.532Z", + "description": "Total number of page views across all contacts associated with this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "number", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Number of Pageviews", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_num_page_views", + "options": [], + "type": "number", + "updatedAt": "2022-05-27T23:02:49.266Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 29 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.572Z", + "description": "Calculation context property providing cardinality for rollup property hs_analytics_num_page_views calculated as SUM via values of hs_analytics_num_page_views on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_num_page_views_cardinality_sum_e46e85b0", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_num_page_views_cardinality_sum_e46e85b0", + "options": [], + "type": "number", + "updatedAt": "2022-05-27T23:03:04.596Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 30 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:45.566Z", + "description": "Total number of sessions across all contacts associated with this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "number", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Number of Sessions", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_num_visits", + "options": [], + "type": "number", + "updatedAt": "2022-05-27T23:03:19.930Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 31 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.602Z", + "description": "Calculation context property providing cardinality for rollup property hs_analytics_num_visits calculated as SUM via values of hs_analytics_num_visits on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_num_visits_cardinality_sum_53d952a6", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_num_visits_cardinality_sum_53d952a6", + "options": [], + "type": "number", + "updatedAt": "2022-05-27T23:03:35.372Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 32 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:37.732Z", + "description": "Original source for the contact with the earliest activity for this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "select", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Original Source", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyOptions": true, + "readOnlyValue": false + }, + "name": "hs_analytics_source", + "options": [ + { + "description": "", + "displayOrder": 0, + "hidden": false, + "label": "Organic Search", + "value": "ORGANIC_SEARCH" + }, + { + "description": "", + "displayOrder": 1, + "hidden": false, + "label": "Paid Search", + "value": "PAID_SEARCH" + }, + { + "description": "", + "displayOrder": 2, + "hidden": false, + "label": "Email Marketing", + "value": "EMAIL_MARKETING" + }, + { + "description": "", + "displayOrder": 3, + "hidden": false, + "label": "Organic Social", + "value": "SOCIAL_MEDIA" + }, + { + "description": "", + "displayOrder": 4, + "hidden": false, + "label": "Referrals", + "value": "REFERRALS" + }, + { + "description": "", + "displayOrder": 5, + "hidden": false, + "label": "Other Campaigns", + "value": "OTHER_CAMPAIGNS" + }, + { + "description": "", + "displayOrder": 6, + "hidden": false, + "label": "Direct Traffic", + "value": "DIRECT_TRAFFIC" + }, + { + "description": "", + "displayOrder": 7, + "hidden": false, + "label": "Offline Sources", + "value": "OFFLINE" + }, + { + "description": "", + "displayOrder": 8, + "hidden": false, + "label": "Paid Social", + "value": "PAID_SOCIAL" + } + ], + "type": "enumeration", + "updatedAt": "2024-02-21T13:01:02.383Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 33 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:37.915Z", + "description": "Additional information about the original source for the contact with the earliest activity for this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Original Source Drill-Down 1", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_source_data_1", + "options": [], + "type": "string", + "updatedAt": "2024-02-21T13:02:43.335Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 34 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.754Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_source_data_1 calculated as EARLIEST_VALUE via values of hs_analytics_source_data_1 on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_source_data_1_timestamp_earliest_value_9b2f1fa1", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_source_data_1_timestamp_earliest_value_9b2f1fa1", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:04:52.112Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 35 + }, + "calculated": false, + "createdAt": "2020-06-30T15:57:37.591Z", + "description": "Additional information about the original source for the contact with the earliest activity for this company or organization", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Original Source Drill-Down 2", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_source_data_2", + "options": [], + "type": "string", + "updatedAt": "2024-02-21T13:03:12.023Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 36 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.783Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_source_data_2 calculated as EARLIEST_VALUE via values of hs_analytics_source_data_2 on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_source_data_2_timestamp_earliest_value_9b2f9400", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_source_data_2_timestamp_earliest_value_9b2f9400", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:05:38.098Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 37 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:47.723Z", + "description": "Calculation context property providing timestamp for rollup property hs_analytics_source calculated as EARLIEST_VALUE via values of hs_analytics_source on object type ObjectTypeId{legacyObjectType=CONTACT}", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "analyticsinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "hs_analytics_source_timestamp_earliest_value_25a3a52c", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_analytics_source_timestamp_earliest_value_25a3a52c", + "options": [], + "type": "datetime", + "updatedAt": "2022-05-27T23:05:53.396Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 38 + }, + "calculated": false, + "calculationFormula": "'USD'", + "createdAt": "2023-03-02T13:20:44.637Z", + "description": "The currency code associated with the annual revenue amount", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "calculation_equation", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Annual Revenue Currency Code", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_annual_revenue_currency_code", + "options": [], + "type": "string", + "updatedAt": "2023-03-02T13:20:44.637Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 39 + }, + "calculated": false, + "createdAt": "2019-08-06T02:41:46.170Z", + "description": "The path in the FileManager CDN for this company's avatar override image. Automatically set by HubSpot.", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "text", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Avatar FileManager key", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_avatar_filemanager_key", + "options": [], + "type": "string", + "updatedAt": "2022-05-27T23:06:08.771Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 40 + }, + "calculated": false, + "createdAt": "2020-01-28T22:45:20.560Z", + "description": "The user that created this object. This value is automatically set by HubSpot and may not be modified.", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "number", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Created by user ID", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_created_by_user_id", + "options": [], + "type": "number", + "updatedAt": "2023-06-09T19:56:38.314Z" + } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 41 + }, + "calculated": false, + "createdAt": "1970-01-01T00:00:00Z", + "description": "The date and time at which this object was created. This value is automatically set by HubSpot and may not be modified.", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "date", + "formField": false, + "groupName": "companyinformation", + "hasUniqueValue": false, + "hidden": true, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Object create date/time", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": true, + "readOnlyValue": true + }, + "name": "hs_createdate", + "options": [], + "type": "datetime", + "updatedAt": "2023-12-05T17:03:58.823Z" + } + ] +] 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 f2f4c99393..d5fe27fe57 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 @@ -3492,8 +3492,18 @@ }, "description": "Document metadata" }, - "portalId": { - "title": "Portalid", + "id": { + "title": "Id", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", "type": "string" }, "subscriptionDefinitions": { @@ -3506,14 +3516,16 @@ } }, "required": [ - "portalId" + "id", + "updatedAt", + "createdAt" ], "title": "EmailSubscriptions", "type": "object", "x-infer-schema": true }, "key": [ - "/portalId" + "/id" ] }, { @@ -3815,5 +3827,178 @@ "key": [ "/_meta/row_id" ] + }, + { + "recommendedName": "venues", + "resourceConfig": { + "name": "venues", + "interval": "PT420S" + }, + "documentSchema": { + "$defs": { + "History": { + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "timestamp": { + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + }, + "sourceType": { + "title": "Sourcetype", + "type": "string" + }, + "sourceId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Sourceid" + }, + "updatedByUserId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Updatedbyuserid" + } + }, + "required": [ + "timestamp", + "value", + "sourceType" + ], + "title": "History", + "type": "object" + }, + "Meta": { + "properties": { + "op": { + "description": "Operation type (c: Create, u: Update, d: Delete)", + "enum": [ + "c", + "u", + "d" + ], + "title": "Op", + "type": "string" + }, + "row_id": { + "default": -1, + "description": "Row ID of the Document, counting up from zero, or -1 if not known", + "title": "Row Id", + "type": "integer" + } + }, + "required": [ + "op" + ], + "title": "Meta", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "_meta": { + "allOf": [ + { + "$ref": "#/$defs/Meta" + } + ], + "default": { + "op": "u", + "row_id": -1 + }, + "description": "Document metadata" + }, + "id": { + "title": "Id", + "type": "integer" + }, + "createdAt": { + "format": "date-time", + "title": "Createdat", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Updatedat", + "type": "string" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "title": "Properties" + }, + "propertiesWithHistory": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/History" + }, + "type": "array" + }, + "default": {}, + "title": "Propertieswithhistory", + "type": "object" + }, + "associations": { + "additionalProperties": false, + "default": {}, + "title": "Associations", + "type": "object" + } + }, + "required": [ + "id", + "createdAt", + "updatedAt", + "archived", + "properties" + ], + "title": "BaseCRMObject", + "type": "object" + }, + "key": [ + "/id" + ] } ] 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 efcd3698e3..94ef65acfe 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 @@ -103,7 +103,7 @@ "documentationUrl": "https://docs.estuary.dev", "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%20service-feedback-access%20sales-email-read%20ommunication_preferences.read%20workflows-access-public-api%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}}", + "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%20service-feedback-access%20sales-email-read%20communication_preferences.read%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}}", "accessTokenUrlTemplate": "https://api.hubapi.com/oauth/v1/token", "accessTokenBody": "grant_type=authorization_code&client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&client_secret={{#urlencode}}{{{ client_secret }}}{{/urlencode}}&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&code={{#urlencode}}{{{ code }}}{{/urlencode}}", "accessTokenHeaders": { diff --git a/source-hubspot-native/tests/test_snapshots.py b/source-hubspot-native/tests/test_snapshots.py index 6d30aa9831..85b0fb0a6e 100644 --- a/source-hubspot-native/tests/test_snapshots.py +++ b/source-hubspot-native/tests/test_snapshots.py @@ -20,19 +20,6 @@ def test_capture(request, snapshot): assert result.returncode == 0 lines = [json.loads(l) for l in result.stdout.splitlines()[:50]] - for l in lines: - _collection, record = l[0], l[1] - - for m in ["properties", "propertiesWithHistory"]: - for prop in [ - "hs_time_in_lead", - "hs_time_in_opportunity", - "hs_time_in_appointmentscheduled", - "hs_time_in_1", - ]: - if record[m].get(prop): - record[m][prop] = "redacted" - assert snapshot("stdout.json") == lines From e81165c618592c2edc532543d131787ea28c6af1 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Tue, 2 Apr 2024 16:49:33 -0300 Subject: [PATCH 07/17] NIT: removed testing variables that were modifing capture state --- source-hubspot-native/source_hubspot_native/resources.py | 6 +++--- ...e_hubspot_native_tests_test_snapshots__spec__stdout.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index 19528d67ce..25123ca2b8 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -243,7 +243,7 @@ def open( fetch_changes=functools.partial(fetch_changes, cls, fetch_recent, http), ) - started_at = datetime.now(tz=UTC) - timedelta(days=1825) + started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, @@ -290,7 +290,7 @@ def open( fetch_changes=functools.partial(fetch_changes_no_batch, cls, fetch_recent, http), ) - started_at = datetime.now(tz=UTC) - timedelta(days=1825) + started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, @@ -327,7 +327,7 @@ def open( fetch_page=functools.partial(fetch_page_workflow, cls, http), ) - started_at = datetime.now(tz=UTC) - timedelta(days=1825) + started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, 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 94ef65acfe..79c302fd4d 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 @@ -103,7 +103,7 @@ "documentationUrl": "https://docs.estuary.dev", "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%20service-feedback-access%20sales-email-read%20communication_preferences.read%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}}", + "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}}", "accessTokenUrlTemplate": "https://api.hubapi.com/oauth/v1/token", "accessTokenBody": "grant_type=authorization_code&client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&client_secret={{#urlencode}}{{{ client_secret }}}{{/urlencode}}&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&code={{#urlencode}}{{{ code }}}{{/urlencode}}", "accessTokenHeaders": { From 344be6d90aa7b0f286f210242c7afa9f77c1279d Mon Sep 17 00:00:00 2001 From: Luishfs Date: Wed, 3 Apr 2024 14:28:42 -0300 Subject: [PATCH 08/17] Modified estuary-cdk to set 'row_id' from BaseDocument meta as required, a simple modification to the BaseDocument was made by removing the default value from the field and adding it to the Field() method --- estuary-cdk/estuary_cdk/capture/common.py | 3 +-- source-hubspot-native/acmeCo/campaigns.schema.yaml | 2 +- source-hubspot-native/acmeCo/companies.schema.yaml | 2 +- source-hubspot-native/acmeCo/contact_lists.schema.yaml | 2 +- source-hubspot-native/acmeCo/contacts.schema.yaml | 2 +- .../acmeCo/contacts_lists_subscription.schema.yaml | 2 +- source-hubspot-native/acmeCo/deal_pipelines.schema.yaml | 2 +- source-hubspot-native/acmeCo/deals.schema.yaml | 2 +- source-hubspot-native/acmeCo/email_events.schema.yaml | 2 +- source-hubspot-native/acmeCo/email_subscriptions.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_calls.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_emails.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_meetings.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_notes.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_tasks.schema.yaml | 2 +- source-hubspot-native/acmeCo/feedback_submissions.schema.yaml | 2 +- source-hubspot-native/acmeCo/goal_targets.schema.yaml | 2 +- source-hubspot-native/acmeCo/line_items.schema.yaml | 2 +- source-hubspot-native/acmeCo/marketing_emails.schema.yaml | 2 +- source-hubspot-native/acmeCo/marketing_forms.schema.yaml | 2 +- source-hubspot-native/acmeCo/owners.schema.yaml | 2 +- source-hubspot-native/acmeCo/products.schema.yaml | 2 +- source-hubspot-native/acmeCo/properties.schema.yaml | 2 +- source-hubspot-native/acmeCo/subscription_changes.schema.yaml | 2 +- source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml | 2 +- source-hubspot-native/acmeCo/tickets.schema.yaml | 2 +- source-hubspot-native/acmeCo/workflows.schema.yaml | 2 +- 28 files changed, 28 insertions(+), 29 deletions(-) diff --git a/estuary-cdk/estuary_cdk/capture/common.py b/estuary-cdk/estuary_cdk/capture/common.py index 8d789716f2..66b0ce0d14 100644 --- a/estuary-cdk/estuary_cdk/capture/common.py +++ b/estuary-cdk/estuary_cdk/capture/common.py @@ -52,12 +52,11 @@ class Meta(BaseModel): description="Operation type (c: Create, u: Update, d: Delete)" ) row_id: int = Field( - default=-1, description="Row ID of the Document, counting up from zero, or -1 if not known", ) meta_: Meta = Field( - default=Meta(op="u"), alias="_meta", description="Document metadata" + default=Meta(op="u",row_id=-1), alias="_meta", description="Document metadata" ) diff --git a/source-hubspot-native/acmeCo/campaigns.schema.yaml b/source-hubspot-native/acmeCo/campaigns.schema.yaml index f45d66374b..02bebfdf6d 100644 --- a/source-hubspot-native/acmeCo/campaigns.schema.yaml +++ b/source-hubspot-native/acmeCo/campaigns.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/companies.schema.yaml b/source-hubspot-native/acmeCo/companies.schema.yaml index 40ad40ac5c..e90ef707dd 100644 --- a/source-hubspot-native/acmeCo/companies.schema.yaml +++ b/source-hubspot-native/acmeCo/companies.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/contact_lists.schema.yaml b/source-hubspot-native/acmeCo/contact_lists.schema.yaml index e020b66736..826cd0e40f 100644 --- a/source-hubspot-native/acmeCo/contact_lists.schema.yaml +++ b/source-hubspot-native/acmeCo/contact_lists.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/contacts.schema.yaml b/source-hubspot-native/acmeCo/contacts.schema.yaml index 0430919001..88cd3015bc 100644 --- a/source-hubspot-native/acmeCo/contacts.schema.yaml +++ b/source-hubspot-native/acmeCo/contacts.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml b/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml index 852bee016a..743ba39a0b 100644 --- a/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml +++ b/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml b/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml index fce87be55a..33e46f8d22 100644 --- a/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml +++ b/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/deals.schema.yaml b/source-hubspot-native/acmeCo/deals.schema.yaml index b49776714f..82db73d902 100644 --- a/source-hubspot-native/acmeCo/deals.schema.yaml +++ b/source-hubspot-native/acmeCo/deals.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/email_events.schema.yaml b/source-hubspot-native/acmeCo/email_events.schema.yaml index 65325c764d..652fb21ab5 100644 --- a/source-hubspot-native/acmeCo/email_events.schema.yaml +++ b/source-hubspot-native/acmeCo/email_events.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml index eb40bb584d..2bf921a13d 100644 --- a/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml +++ b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/engagements.schema.yaml b/source-hubspot-native/acmeCo/engagements.schema.yaml index a1c6e42b3a..99578865a0 100644 --- a/source-hubspot-native/acmeCo/engagements.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_calls.schema.yaml b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml index 794dac5a27..f53f9c6013 100644 --- a/source-hubspot-native/acmeCo/engagements_calls.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_emails.schema.yaml b/source-hubspot-native/acmeCo/engagements_emails.schema.yaml index c53f44b5f9..d791fa2f19 100644 --- a/source-hubspot-native/acmeCo/engagements_emails.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_emails.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml index 92c5bd55f0..d143265e11 100644 --- a/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_notes.schema.yaml b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml index 4b0b18f8ef..4deec59f1f 100644 --- a/source-hubspot-native/acmeCo/engagements_notes.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml index 5e236871d4..1c89836da4 100644 --- a/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml b/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml index 1984fad025..83b114ee81 100644 --- a/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml +++ b/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/goal_targets.schema.yaml b/source-hubspot-native/acmeCo/goal_targets.schema.yaml index 4f1849eb84..2c71d6eedb 100644 --- a/source-hubspot-native/acmeCo/goal_targets.schema.yaml +++ b/source-hubspot-native/acmeCo/goal_targets.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/line_items.schema.yaml b/source-hubspot-native/acmeCo/line_items.schema.yaml index 121fea9e06..4bf3937f2b 100644 --- a/source-hubspot-native/acmeCo/line_items.schema.yaml +++ b/source-hubspot-native/acmeCo/line_items.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/marketing_emails.schema.yaml b/source-hubspot-native/acmeCo/marketing_emails.schema.yaml index 787fe530ca..19aa05d2f5 100644 --- a/source-hubspot-native/acmeCo/marketing_emails.schema.yaml +++ b/source-hubspot-native/acmeCo/marketing_emails.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/marketing_forms.schema.yaml b/source-hubspot-native/acmeCo/marketing_forms.schema.yaml index f8dbf1590a..70853917e3 100644 --- a/source-hubspot-native/acmeCo/marketing_forms.schema.yaml +++ b/source-hubspot-native/acmeCo/marketing_forms.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/owners.schema.yaml b/source-hubspot-native/acmeCo/owners.schema.yaml index de05169c9f..0a0c8ce755 100644 --- a/source-hubspot-native/acmeCo/owners.schema.yaml +++ b/source-hubspot-native/acmeCo/owners.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/products.schema.yaml b/source-hubspot-native/acmeCo/products.schema.yaml index a83d114f9d..bb1b9eb8c4 100644 --- a/source-hubspot-native/acmeCo/products.schema.yaml +++ b/source-hubspot-native/acmeCo/products.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/properties.schema.yaml b/source-hubspot-native/acmeCo/properties.schema.yaml index 322a118173..b460a2b266 100644 --- a/source-hubspot-native/acmeCo/properties.schema.yaml +++ b/source-hubspot-native/acmeCo/properties.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/subscription_changes.schema.yaml b/source-hubspot-native/acmeCo/subscription_changes.schema.yaml index 95e2107716..871687f420 100644 --- a/source-hubspot-native/acmeCo/subscription_changes.schema.yaml +++ b/source-hubspot-native/acmeCo/subscription_changes.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml b/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml index 3f8ec151ca..9a797e899c 100644 --- a/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml +++ b/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/tickets.schema.yaml b/source-hubspot-native/acmeCo/tickets.schema.yaml index ea5db38777..6656088128 100644 --- a/source-hubspot-native/acmeCo/tickets.schema.yaml +++ b/source-hubspot-native/acmeCo/tickets.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/workflows.schema.yaml b/source-hubspot-native/acmeCo/workflows.schema.yaml index 2b4664549b..f85a4f0a5b 100644 --- a/source-hubspot-native/acmeCo/workflows.schema.yaml +++ b/source-hubspot-native/acmeCo/workflows.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: - default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op + - row_id title: Meta type: object additionalProperties: true From a484280098b57da301ffc5bc09ab89fa835fc8d0 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Wed, 3 Apr 2024 14:45:58 -0300 Subject: [PATCH 09/17] Added better comments for resource and api.py functions --- source-hubspot-native/source_hubspot_native/api.py | 12 ++++++++++++ .../source_hubspot_native/resources.py | 14 +++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/source-hubspot-native/source_hubspot_native/api.py b/source-hubspot-native/source_hubspot_native/api.py index dbeda27ff1..9423994760 100644 --- a/source-hubspot-native/source_hubspot_native/api.py +++ b/source-hubspot-native/source_hubspot_native/api.py @@ -370,6 +370,18 @@ async def fetch_changes_no_batch( ) -> AsyncGenerator[CRMObject | LogCursor, None]: assert isinstance(log_cursor, datetime) + """ + This functions differs of the base 'fetch_changes' function + by not using batch_result. (This is required because some + API endpoints do have a similar pagination, but do not have + a batch query endpoint ). + It works by getting the fetch_recent_X function defined in resources. + This function will return the actual API result within its 'iter' + This result is then passed on the V1CRMObject model as a json + to be validated + + """ + recent: list[tuple[datetime, str]] = [] next_page: PageCursor = None _cls = cls diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index 25123ca2b8..5821037662 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -5,7 +5,6 @@ from estuary_cdk.flow import CaptureBinding from estuary_cdk.capture import Task -#from estuary_cdk.capture.common import Resource, LogCursor, PageCursor, open_binding from estuary_cdk.capture import common from estuary_cdk.http import HTTPSession, HTTPMixin, TokenSource @@ -346,6 +345,12 @@ def subscription_object( cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn ) -> common.Resource: + """ + Custom Resource to run specifically subscription stream objects + subscription objects do not have pagination neither a usual schema, + so this resource was created to handle this specific case. + """ + def open( binding: CaptureBinding[ResourceConfig], binding_index: int, @@ -421,6 +426,13 @@ def open( def custom_objects( cls: type[CRMObject], http: HTTPSession ) -> common.Resource: + + """ + Custom Resource to run user-created objects. It works by + reading the v3/schema endpoint, in which returns all + user-created objects in a list. All user-created objects are + v3 objects, so we parse then using the base fetch_page function. + """ def open( binding: CaptureBinding[ResourceConfig], From 7adb471c35e643b2f54b8c3114c75106d45c41e7 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Wed, 3 Apr 2024 16:18:04 -0300 Subject: [PATCH 10/17] Removing unused function --- .../source_hubspot_native/api.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/source-hubspot-native/source_hubspot_native/api.py b/source-hubspot-native/source_hubspot_native/api.py index 9423994760..20d5cbf131 100644 --- a/source-hubspot-native/source_hubspot_native/api.py +++ b/source-hubspot-native/source_hubspot_native/api.py @@ -468,21 +468,6 @@ async def fetch_recent_engagements( ), result.hasMore and result.offset -async def fetch_recent_tickets( - log: Logger, http: HTTPSession, since: datetime, cursor: PageCursor -) -> tuple[Iterable[tuple[datetime, str]], PageCursor]: - - url = f"{HUB}/crm/v3/objects/tickets" - - result = OldRecentTicket.model_validate_json( - await http.request(log, url, params=None) - ) - - return ( - (r.updatedAt, str(r.id)) - for r in result.results - ), None and None - async def fetch_recent_contacts_lists( log: Logger, http: HTTPSession, since: datetime, page: PageCursor ) -> tuple[Iterable[tuple[datetime, str, Any]], PageCursor]: From 0b549e9f4cdfafdc3aadf8255959108dfb071aab Mon Sep 17 00:00:00 2001 From: Luishfs Date: Wed, 3 Apr 2024 17:05:19 -0300 Subject: [PATCH 11/17] Fixed tests with new estuary-cdk modification Raised pagination limit number --- .../source_hubspot_native/api.py | 12 +- .../source_hubspot_native/resources.py | 2 +- ...ests_test_snapshots__discover__stdout.json | 112 +++++++++--------- 3 files changed, 63 insertions(+), 63 deletions(-) diff --git a/source-hubspot-native/source_hubspot_native/api.py b/source-hubspot-native/source_hubspot_native/api.py index 20d5cbf131..94670699ca 100644 --- a/source-hubspot-native/source_hubspot_native/api.py +++ b/source-hubspot-native/source_hubspot_native/api.py @@ -88,7 +88,7 @@ async def fetch_page( if cls.IGNORE_PROPERTY_SEARCH is True: input = { "associations": ",".join(cls.ASSOCIATED_ENTITIES), - "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "limit": 10, # 50, # Maximum when requesting history. TODO(johnny). } if len(cls.ASSOCIATED_ENTITIES) == 0: del input['associations'] @@ -98,7 +98,7 @@ async def fetch_page( input = { "associations": ",".join(cls.ASSOCIATED_ENTITIES), - "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "limit": 10, # 50, # Maximum when requesting history. TODO(johnny). "properties": property_names, "propertiesWithHistory": property_names, } @@ -135,7 +135,7 @@ async def fetch_page_custom( if cls.IGNORE_PROPERTY_SEARCH is True: input = { "associations": ",".join(cls.ASSOCIATED_ENTITIES), - "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "limit": 10, # 50, # Maximum when requesting history. TODO(johnny). } if len(cls.ASSOCIATED_ENTITIES) == 0: del input['associations'] @@ -145,7 +145,7 @@ async def fetch_page_custom( input = { "associations": ",".join(cls.ASSOCIATED_ENTITIES), - "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "limit": 10, # 50, # Maximum when requesting history. TODO(johnny). "properties": property_names, "propertiesWithHistory": property_names, } @@ -184,7 +184,7 @@ async def fetch_page_workflow( if cls.IGNORE_PROPERTY_SEARCH is True: input = { "associations": ",".join(cls.ASSOCIATED_ENTITIES), - "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "limit": 10, # 50, # Maximum when requesting history. TODO(johnny). } if len(cls.ASSOCIATED_ENTITIES) == 0: del input['associations'] @@ -194,7 +194,7 @@ async def fetch_page_workflow( input = { "associations": ",".join(cls.ASSOCIATED_ENTITIES), - "limit": 2, # 50, # Maximum when requesting history. TODO(johnny). + "limit": 10, # 50, # Maximum when requesting history. TODO(johnny). "properties": property_names, "propertiesWithHistory": property_names, } diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index 5821037662..e3b3ba30b3 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -408,7 +408,7 @@ def open( state, task, fetch_snapshot=snapshot, - tombstone=Property(_meta=Property.Meta(op="d")), + tombstone=Property(_meta=Property.Meta(op="d",row_id=-1)), ) return common.Resource( 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 d5fe27fe57..a2939e1191 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 @@ -81,14 +81,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -271,14 +271,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -453,14 +453,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -651,14 +651,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -772,14 +772,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -844,14 +844,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -916,14 +916,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -988,14 +988,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -1060,14 +1060,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -1193,14 +1193,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -1319,14 +1319,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -1452,14 +1452,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -1666,14 +1666,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -1880,14 +1880,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -2094,14 +2094,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -2308,14 +2308,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -2522,14 +2522,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -2704,14 +2704,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -2886,14 +2886,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3068,14 +3068,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3250,14 +3250,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3387,14 +3387,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3465,14 +3465,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3549,14 +3549,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3621,14 +3621,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3699,14 +3699,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3777,14 +3777,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" @@ -3910,14 +3910,14 @@ "type": "string" }, "row_id": { - "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op" + "op", + "row_id" ], "title": "Meta", "type": "object" From 051e02e8056c6f40d56685a485d3ba9fc8674bed Mon Sep 17 00:00:00 2001 From: Luishfs Date: Thu, 4 Apr 2024 17:06:11 -0300 Subject: [PATCH 12/17] Reverting changes made to estuary-cdk --- estuary-cdk/estuary_cdk/capture/common.py | 3 ++- source-hubspot-native/acmeCo/campaigns.schema.yaml | 2 +- source-hubspot-native/acmeCo/companies.schema.yaml | 2 +- source-hubspot-native/acmeCo/contact_lists.schema.yaml | 2 +- source-hubspot-native/acmeCo/contacts.schema.yaml | 2 +- .../acmeCo/contacts_lists_subscription.schema.yaml | 2 +- source-hubspot-native/acmeCo/deal_pipelines.schema.yaml | 2 +- source-hubspot-native/acmeCo/deals.schema.yaml | 2 +- source-hubspot-native/acmeCo/email_events.schema.yaml | 2 +- .../acmeCo/email_subscriptions.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_calls.schema.yaml | 2 +- .../acmeCo/engagements_emails.schema.yaml | 2 +- .../acmeCo/engagements_meetings.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_notes.schema.yaml | 2 +- source-hubspot-native/acmeCo/engagements_tasks.schema.yaml | 2 +- .../acmeCo/feedback_submissions.schema.yaml | 2 +- source-hubspot-native/acmeCo/flow.yaml | 4 ++++ source-hubspot-native/acmeCo/goal_targets.schema.yaml | 2 +- source-hubspot-native/acmeCo/line_items.schema.yaml | 2 +- source-hubspot-native/acmeCo/marketing_emails.schema.yaml | 2 +- source-hubspot-native/acmeCo/marketing_forms.schema.yaml | 2 +- source-hubspot-native/acmeCo/owners.schema.yaml | 2 +- source-hubspot-native/acmeCo/products.schema.yaml | 2 +- source-hubspot-native/acmeCo/properties.schema.yaml | 2 +- .../acmeCo/subscription_changes.schema.yaml | 2 +- source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml | 2 +- source-hubspot-native/acmeCo/tickets.schema.yaml | 2 +- source-hubspot-native/acmeCo/workflows.schema.yaml | 2 +- source-hubspot-native/test.flow.yaml | 7 ++++--- 30 files changed, 37 insertions(+), 31 deletions(-) diff --git a/estuary-cdk/estuary_cdk/capture/common.py b/estuary-cdk/estuary_cdk/capture/common.py index 66b0ce0d14..8d789716f2 100644 --- a/estuary-cdk/estuary_cdk/capture/common.py +++ b/estuary-cdk/estuary_cdk/capture/common.py @@ -52,11 +52,12 @@ class Meta(BaseModel): description="Operation type (c: Create, u: Update, d: Delete)" ) row_id: int = Field( + default=-1, description="Row ID of the Document, counting up from zero, or -1 if not known", ) meta_: Meta = Field( - default=Meta(op="u",row_id=-1), alias="_meta", description="Document metadata" + default=Meta(op="u"), alias="_meta", description="Document metadata" ) diff --git a/source-hubspot-native/acmeCo/campaigns.schema.yaml b/source-hubspot-native/acmeCo/campaigns.schema.yaml index 02bebfdf6d..f45d66374b 100644 --- a/source-hubspot-native/acmeCo/campaigns.schema.yaml +++ b/source-hubspot-native/acmeCo/campaigns.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/companies.schema.yaml b/source-hubspot-native/acmeCo/companies.schema.yaml index e90ef707dd..40ad40ac5c 100644 --- a/source-hubspot-native/acmeCo/companies.schema.yaml +++ b/source-hubspot-native/acmeCo/companies.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/contact_lists.schema.yaml b/source-hubspot-native/acmeCo/contact_lists.schema.yaml index 826cd0e40f..e020b66736 100644 --- a/source-hubspot-native/acmeCo/contact_lists.schema.yaml +++ b/source-hubspot-native/acmeCo/contact_lists.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/contacts.schema.yaml b/source-hubspot-native/acmeCo/contacts.schema.yaml index 88cd3015bc..0430919001 100644 --- a/source-hubspot-native/acmeCo/contacts.schema.yaml +++ b/source-hubspot-native/acmeCo/contacts.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml b/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml index 743ba39a0b..852bee016a 100644 --- a/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml +++ b/source-hubspot-native/acmeCo/contacts_lists_subscription.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml b/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml index 33e46f8d22..fce87be55a 100644 --- a/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml +++ b/source-hubspot-native/acmeCo/deal_pipelines.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/deals.schema.yaml b/source-hubspot-native/acmeCo/deals.schema.yaml index 82db73d902..b49776714f 100644 --- a/source-hubspot-native/acmeCo/deals.schema.yaml +++ b/source-hubspot-native/acmeCo/deals.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/email_events.schema.yaml b/source-hubspot-native/acmeCo/email_events.schema.yaml index 652fb21ab5..65325c764d 100644 --- a/source-hubspot-native/acmeCo/email_events.schema.yaml +++ b/source-hubspot-native/acmeCo/email_events.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml index 2bf921a13d..eb40bb584d 100644 --- a/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml +++ b/source-hubspot-native/acmeCo/email_subscriptions.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/engagements.schema.yaml b/source-hubspot-native/acmeCo/engagements.schema.yaml index 99578865a0..a1c6e42b3a 100644 --- a/source-hubspot-native/acmeCo/engagements.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_calls.schema.yaml b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml index f53f9c6013..794dac5a27 100644 --- a/source-hubspot-native/acmeCo/engagements_calls.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_calls.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_emails.schema.yaml b/source-hubspot-native/acmeCo/engagements_emails.schema.yaml index d791fa2f19..c53f44b5f9 100644 --- a/source-hubspot-native/acmeCo/engagements_emails.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_emails.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml index d143265e11..92c5bd55f0 100644 --- a/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_meetings.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_notes.schema.yaml b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml index 4deec59f1f..4b0b18f8ef 100644 --- a/source-hubspot-native/acmeCo/engagements_notes.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_notes.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml index 1c89836da4..5e236871d4 100644 --- a/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml +++ b/source-hubspot-native/acmeCo/engagements_tasks.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml b/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml index 83b114ee81..1984fad025 100644 --- a/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml +++ b/source-hubspot-native/acmeCo/feedback_submissions.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/flow.yaml b/source-hubspot-native/acmeCo/flow.yaml index c558938377..b65f356a82 100644 --- a/source-hubspot-native/acmeCo/flow.yaml +++ b/source-hubspot-native/acmeCo/flow.yaml @@ -104,6 +104,10 @@ collections: schema: tickets.schema.yaml key: - /id + acmeCo/venues: + schema: venues.schema.yaml + key: + - /id acmeCo/workflows: schema: workflows.schema.yaml key: diff --git a/source-hubspot-native/acmeCo/goal_targets.schema.yaml b/source-hubspot-native/acmeCo/goal_targets.schema.yaml index 2c71d6eedb..4f1849eb84 100644 --- a/source-hubspot-native/acmeCo/goal_targets.schema.yaml +++ b/source-hubspot-native/acmeCo/goal_targets.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/line_items.schema.yaml b/source-hubspot-native/acmeCo/line_items.schema.yaml index 4bf3937f2b..121fea9e06 100644 --- a/source-hubspot-native/acmeCo/line_items.schema.yaml +++ b/source-hubspot-native/acmeCo/line_items.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/marketing_emails.schema.yaml b/source-hubspot-native/acmeCo/marketing_emails.schema.yaml index 19aa05d2f5..787fe530ca 100644 --- a/source-hubspot-native/acmeCo/marketing_emails.schema.yaml +++ b/source-hubspot-native/acmeCo/marketing_emails.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/marketing_forms.schema.yaml b/source-hubspot-native/acmeCo/marketing_forms.schema.yaml index 70853917e3..f8dbf1590a 100644 --- a/source-hubspot-native/acmeCo/marketing_forms.schema.yaml +++ b/source-hubspot-native/acmeCo/marketing_forms.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/owners.schema.yaml b/source-hubspot-native/acmeCo/owners.schema.yaml index 0a0c8ce755..de05169c9f 100644 --- a/source-hubspot-native/acmeCo/owners.schema.yaml +++ b/source-hubspot-native/acmeCo/owners.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/products.schema.yaml b/source-hubspot-native/acmeCo/products.schema.yaml index bb1b9eb8c4..a83d114f9d 100644 --- a/source-hubspot-native/acmeCo/products.schema.yaml +++ b/source-hubspot-native/acmeCo/products.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/properties.schema.yaml b/source-hubspot-native/acmeCo/properties.schema.yaml index b460a2b266..322a118173 100644 --- a/source-hubspot-native/acmeCo/properties.schema.yaml +++ b/source-hubspot-native/acmeCo/properties.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/subscription_changes.schema.yaml b/source-hubspot-native/acmeCo/subscription_changes.schema.yaml index 871687f420..95e2107716 100644 --- a/source-hubspot-native/acmeCo/subscription_changes.schema.yaml +++ b/source-hubspot-native/acmeCo/subscription_changes.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml b/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml index 9a797e899c..3f8ec151ca 100644 --- a/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml +++ b/source-hubspot-native/acmeCo/ticket_pipelines.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/tickets.schema.yaml b/source-hubspot-native/acmeCo/tickets.schema.yaml index 6656088128..ea5db38777 100644 --- a/source-hubspot-native/acmeCo/tickets.schema.yaml +++ b/source-hubspot-native/acmeCo/tickets.schema.yaml @@ -49,12 +49,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: false diff --git a/source-hubspot-native/acmeCo/workflows.schema.yaml b/source-hubspot-native/acmeCo/workflows.schema.yaml index f85a4f0a5b..2b4664549b 100644 --- a/source-hubspot-native/acmeCo/workflows.schema.yaml +++ b/source-hubspot-native/acmeCo/workflows.schema.yaml @@ -11,12 +11,12 @@ $defs: title: Op type: string row_id: + default: -1 description: "Row ID of the Document, counting up from zero, or -1 if not known" title: Row Id type: integer required: - op - - row_id title: Meta type: object additionalProperties: true diff --git a/source-hubspot-native/test.flow.yaml b/source-hubspot-native/test.flow.yaml index cde0a8069f..790bcc2279 100644 --- a/source-hubspot-native/test.flow.yaml +++ b/source-hubspot-native/test.flow.yaml @@ -79,12 +79,10 @@ captures: name: goal_targets interval: PT420S target: acmeCo/goal_targets - disable: true - resource: name: feedback_submissions interval: PT420S target: acmeCo/feedback_submissions - disable: true - resource: name: line_items interval: PT420S @@ -117,11 +115,14 @@ captures: name: workflows interval: PT420S target: acmeCo/workflows - disable: true - resource: name: properties interval: PT420S target: acmeCo/properties + - resource: + name: venues + interval: PT420S + target: acmeCo/venues interval: 3m shards: logLevel: debug From fda33783a560759e3bdc40251a9633277d602c9f Mon Sep 17 00:00:00 2001 From: Luishfs Date: Tue, 9 Apr 2024 09:48:23 -0300 Subject: [PATCH 13/17] Modified streams intervals and added start_date Small streams have 30 seconds interval longer streams have a 1 minute interval between syncs Removed unused custo stream Venues --- source-hubspot-native/acmeCo/flow.yaml | 4 - source-hubspot-native/config.yaml | 5 +- .../source_hubspot_native/models.py | 3 + .../source_hubspot_native/resources.py | 93 +++++++++---------- source-hubspot-native/test.flow.yaml | 58 ++++++------ 5 files changed, 75 insertions(+), 88 deletions(-) diff --git a/source-hubspot-native/acmeCo/flow.yaml b/source-hubspot-native/acmeCo/flow.yaml index b65f356a82..c558938377 100644 --- a/source-hubspot-native/acmeCo/flow.yaml +++ b/source-hubspot-native/acmeCo/flow.yaml @@ -104,10 +104,6 @@ collections: schema: tickets.schema.yaml key: - /id - acmeCo/venues: - schema: venues.schema.yaml - key: - - /id acmeCo/workflows: schema: workflows.schema.yaml key: diff --git a/source-hubspot-native/config.yaml b/source-hubspot-native/config.yaml index b02df12654..3e71a3a4a8 100644 --- a/source-hubspot-native/config.yaml +++ b/source-hubspot-native/config.yaml @@ -4,6 +4,7 @@ credentials: credentials_title: OAuth Credentials refresh_token_sops: ENC[AES256_GCM,data:kTUyVUuNvofeZxm6+DgSAphLlHXWq5WKiloQz3Og6PHMtkPM,iv:M1xSJpdr5JC8hPF4LNkpXS1B8xkX0pCBNT6FkIYdIcU=,tag:GRd1uvS9JMREAZeSyqixRg==,type:str] token_expiry_date: "2024-02-01T17:01:21.703Z" +start_date: "2024-04-09T12:12:34.898765Z" sops: kms: [] gcp_kms: @@ -13,8 +14,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-04-02T19:03:51Z" - mac: ENC[AES256_GCM,data:8zgxwCO13ILg+xRWW1CVP+vtEfazwKZOYvZHo6NHyVxw4xUNzjRQuWcw+y9tcHig46OsY4db1pXc9R7tkj5pyZf7OZ2omCHfy9/r46ylYVAlCAsU9UXUSfrXcCHviWqIGkSuHAtfVNTSFXTVUAX9I066w6oGD/iAIQt1Ac4EXSE=,iv:vZW3taXXEwpnLcmtJ7aAlmBjAoeLyd9BdueHrQHEOck=,tag:nMXHQKwMJmmR21VtTmGtBA==,type:str] + lastmodified: "2024-04-09T12:13:21Z" + mac: ENC[AES256_GCM,data:5NdZ3gQI+wPijmW6CxkZ+txTskMqn8VJB2YTA4hEMmUCgpkM71tRGh4ZLV9f0nwVSYRcVOnYiqaQrvi5Fi3sACwMvmQxmSMIvR88Hi1THFYWfTs6040WteNXXGCKOr81puUBHl+DzAKx5nb5ov1UO38Utxnl39jeHotG2ngBtdE=,iv:wX+2pRYXIXnosiAv4Hi5st1U1rJttSPp9oXhGuww0Ro=,tag:iKlD7LdQrKtcHsDFR46bqA==,type:str] pgp: [] encrypted_suffix: _sops version: 3.8.1 diff --git a/source-hubspot-native/source_hubspot_native/models.py b/source-hubspot-native/source_hubspot_native/models.py index c191ed10aa..e7d0355d08 100644 --- a/source-hubspot-native/source_hubspot_native/models.py +++ b/source-hubspot-native/source_hubspot_native/models.py @@ -81,6 +81,9 @@ class EndpointConfig(BaseModel): discriminator="credentials_title", title="Authentication", ) + start_date: AwareDatetime = Field( + title="start_date", + ) # We use ResourceState directly, without extending it. diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index e3b3ba30b3..fdbdcbc86e 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -81,32 +81,32 @@ async def all_resources( http.token_source = TokenSource(oauth_spec=OAUTH2_SPEC, credentials=config.credentials) resources_list = [ - crm_object_streamed(Company, http, fetch_recent_companies), - crm_object_streamed(Contact, http, fetch_recent_contacts), - crm_object_streamed(Deal, http, fetch_recent_deals), - crm_object_streamed(Engagement, http, fetch_recent_engagements), - crm_object_streamed_no_batch(ContactLists, http, fetch_recent_contacts_lists), - crm_object_streamed_no_batch(ContactSubscription, http, fetch_contacts_lists_subscription), - crm_object_streamed_no_batch(Campaigns, http, fetch_campaigns), - crm_object_streamed_no_batch(SubscriptionChanges, http, fetch_recent_subscription_changes), - crm_object_streamed_no_batch(EmailEvents, http, fetch_recent_email_events), - crm_object_streamed_no_batch(TicketPipelines, http, fetch_recent_ticket_pipelines), - crm_object_streamed_no_batch(DealPipelines, http, fetch_recent_deal_pipelines), - crm_object_paginated(EngagementCalls, http), - crm_object_paginated(EngagementEmails, http), - crm_object_paginated(EngagementMeetings, http), - crm_object_paginated(EngagementNotes, http), - crm_object_paginated(EngagementTasks, http), - crm_object_paginated(Goals, http), - crm_object_paginated(FeedbackSubmissions, http), - crm_object_paginated(LineItems, http), - crm_object_paginated(Products, http), - crm_object_paginated(Ticket, http), - crm_object_custom(MarketingEmails, http, fetch_recent_marketing_emails), - subscription_object(EmailSubscriptions, http, fetch_email_subscriptions), - crm_object_custom(MarketingForms, http, fetch_marketing_forms), - crm_object_custom(Owners, http, fetch_owners), - workflow_object(Workflows, http, fetch_workflows), + crm_object_streamed(Company, http, fetch_recent_companies, config.start_date), + crm_object_streamed(Contact, http, fetch_recent_contacts, config.start_date), + crm_object_streamed(Deal, http, fetch_recent_deals, config.start_date), + crm_object_streamed(Engagement, http, fetch_recent_engagements, config.start_date), + crm_object_streamed_no_batch(ContactLists, http, fetch_recent_contacts_lists, config.start_date), + crm_object_streamed_no_batch(ContactSubscription, http, fetch_contacts_lists_subscription, config.start_date), + crm_object_streamed_no_batch(Campaigns, http, fetch_campaigns, config.start_date), + crm_object_streamed_no_batch(SubscriptionChanges, http, fetch_recent_subscription_changes, config.start_date), + crm_object_streamed_no_batch(EmailEvents, http, fetch_recent_email_events, config.start_date), + crm_object_streamed_no_batch(TicketPipelines, http, fetch_recent_ticket_pipelines, config.start_date), + crm_object_streamed_no_batch(DealPipelines, http, fetch_recent_deal_pipelines, config.start_date), + crm_object_paginated(EngagementCalls, http, config.start_date), + crm_object_paginated(EngagementEmails, http, config.start_date), + crm_object_paginated(EngagementMeetings, http, config.start_date), + crm_object_paginated(EngagementNotes, http, config.start_date), + crm_object_paginated(EngagementTasks, http, config.start_date), + crm_object_paginated(Goals, http, config.start_date), + crm_object_paginated(FeedbackSubmissions, http, config.start_date), + crm_object_paginated(LineItems, http, config.start_date), + crm_object_paginated(Products, http, config.start_date), + crm_object_paginated(Ticket, http, config.start_date), + crm_object_custom(MarketingEmails, http, fetch_recent_marketing_emails, config.start_date), + subscription_object(EmailSubscriptions, http, fetch_email_subscriptions, config.start_date), + crm_object_custom(MarketingForms, http, fetch_marketing_forms, config.start_date), + crm_object_custom(Owners, http, fetch_owners, config.start_date), + workflow_object(Workflows, http, fetch_workflows, config.start_date), properties(http), ] @@ -118,13 +118,13 @@ async def all_resources( BaseCRMObject.PROPERTY_SEARCH_NAME = objects["labels"]["plural"].lower() BaseCRMObject.ASSOCIATED_ENTITIES = [] - resources_list.append(custom_objects(BaseCRMObject, http)) + resources_list.append(custom_objects(BaseCRMObject, http, config.start_date)) return resources_list def crm_object_paginated( - cls: type[CRMObject], http: HTTPSession + cls: type[CRMObject], http: HTTPSession, started_at = datetime.now(tz=UTC) ) -> common.Resource: """Base Resource to run V3 API objects using pagination @@ -150,8 +150,6 @@ def open( fetch_page=functools.partial(fetch_page, cls, http), ) - started_at = datetime.now(tz=UTC) - return common.Resource( name=cls.NAME, key=cls.PRIMARY_KEY, @@ -161,12 +159,12 @@ 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=7)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), schema_inference=True, ) def crm_object_custom( - cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn, started_at = datetime.now(tz=UTC) ) -> common.Resource: """Custom Resource to run V3 objects using pagination This endpoint allows for different URL objects from the V3 API @@ -196,7 +194,6 @@ def open( fetch_page=functools.partial(fetch_page_custom, cls, http), ) - started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, @@ -207,13 +204,13 @@ 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=7)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), schema_inference=True, ) def crm_object_streamed( - cls: type[CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn + cls: type[CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn, started_at = datetime.now(tz=UTC) ) -> common.Resource: """Base Resource to run V1 API objects using stream This resource uses an batch endpoint from Hubspot. It works @@ -242,7 +239,6 @@ def open( fetch_changes=functools.partial(fetch_changes, cls, fetch_recent, http), ) - started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, @@ -253,14 +249,14 @@ 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=7)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), schema_inference=True, ) def crm_object_streamed_no_batch( - cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn, started_at = datetime.now(tz=UTC) ) -> common.Resource: """Custom Resource to run V1 API objects using stream This resource does not use the batch function from "crm_object_streamed" @@ -289,8 +285,6 @@ def open( fetch_changes=functools.partial(fetch_changes_no_batch, cls, fetch_recent, http), ) - started_at = datetime.now(tz=UTC) - return common.Resource( name=cls.NAME, key=cls.PRIMARY_KEY, @@ -300,12 +294,12 @@ 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=7)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=1)), schema_inference=True, ) def workflow_object( - cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn, started_at = datetime.now(tz=UTC) ) -> common.Resource: """Custom Resource to run specifically workflow stream objects @@ -326,7 +320,6 @@ def open( fetch_page=functools.partial(fetch_page_workflow, cls, http), ) - started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, @@ -337,12 +330,12 @@ 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=7)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), schema_inference=True, ) def subscription_object( - cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn + cls: type[V1CRMObject], http: HTTPSession, fetch_recent: FetchRecentFn, started_at = datetime.now(tz=UTC) ) -> common.Resource: """ @@ -365,7 +358,6 @@ def open( fetch_page=functools.partial(fetch_page_subscriptions, cls, http), ) - started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, @@ -376,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(minutes=7)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(seconds=30)), schema_inference=True, ) @@ -418,13 +410,13 @@ def open( open=open, initial_state=ResourceState(), initial_config=ResourceConfig( - name=Names.properties, interval=timedelta(minutes=7) + name=Names.properties, interval=timedelta(seconds=30) ), schema_inference=True, ) def custom_objects( - cls: type[CRMObject], http: HTTPSession + cls: type[CRMObject], http: HTTPSession, started_at = datetime.now(tz=UTC) ) -> common.Resource: """ @@ -449,7 +441,6 @@ def open( ) - started_at = datetime.now(tz=UTC) return common.Resource( name=cls.NAME, key=cls.PRIMARY_KEY, @@ -459,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=7)), + initial_config=ResourceConfig(name=cls.NAME, interval=timedelta(minutes=1)), schema_inference=False, ) diff --git a/source-hubspot-native/test.flow.yaml b/source-hubspot-native/test.flow.yaml index 790bcc2279..c114f6c4b1 100644 --- a/source-hubspot-native/test.flow.yaml +++ b/source-hubspot-native/test.flow.yaml @@ -13,116 +13,112 @@ captures: bindings: - resource: name: companies - interval: PT420S + interval: PT30S target: acmeCo/companies - resource: name: contacts - interval: PT420S + interval: PT30S target: acmeCo/contacts - resource: name: deals - interval: PT420S + interval: PT30S target: acmeCo/deals - resource: name: engagements - interval: PT420S + interval: PT30S target: acmeCo/engagements - resource: name: contact_lists - interval: PT420S + interval: PT60S target: acmeCo/contact_lists - resource: name: contacts_lists_subscription - interval: PT420S + interval: PT60S target: acmeCo/contacts_lists_subscription - resource: name: campaigns - interval: PT420S + interval: PT60S target: acmeCo/campaigns - resource: name: subscription_changes - interval: PT420S + interval: PT60S target: acmeCo/subscription_changes - resource: name: email_events - interval: PT420S + interval: PT60S target: acmeCo/email_events - resource: name: ticket_pipelines - interval: PT420S + interval: PT60S target: acmeCo/ticket_pipelines - resource: name: deal_pipelines - interval: PT420S + interval: PT60S target: acmeCo/deal_pipelines - resource: name: engagements_calls - interval: PT420S + interval: PT30S target: acmeCo/engagements_calls - resource: name: engagements_emails - interval: PT420S + interval: PT30S target: acmeCo/engagements_emails - resource: name: engagements_meetings - interval: PT420S + interval: PT30S target: acmeCo/engagements_meetings - resource: name: engagements_notes - interval: PT420S + interval: PT30S target: acmeCo/engagements_notes - resource: name: engagements_tasks - interval: PT420S + interval: PT30S target: acmeCo/engagements_tasks - resource: name: goal_targets - interval: PT420S + interval: PT30S target: acmeCo/goal_targets - resource: name: feedback_submissions - interval: PT420S + interval: PT30S target: acmeCo/feedback_submissions - resource: name: line_items - interval: PT420S + interval: PT30S target: acmeCo/line_items - resource: name: products - interval: PT420S + interval: PT30S target: acmeCo/products - resource: name: tickets - interval: PT420S + interval: PT30S target: acmeCo/tickets - resource: name: marketing_emails - interval: PT420S + interval: PT30S target: acmeCo/marketing_emails - resource: name: email_subscriptions - interval: PT420S + interval: PT30S target: acmeCo/email_subscriptions - resource: name: marketing_forms - interval: PT420S + interval: PT30S target: acmeCo/marketing_forms - resource: name: owners - interval: PT420S + interval: PT30S target: acmeCo/owners - resource: name: workflows - interval: PT420S + interval: PT30S target: acmeCo/workflows - resource: name: properties - interval: PT420S + interval: PT30S target: acmeCo/properties - - resource: - name: venues - interval: PT420S - target: acmeCo/venues interval: 3m shards: logLevel: debug From 3176c72cd1416b5dc135f130d1467416aa43f93e Mon Sep 17 00:00:00 2001 From: Luishfs Date: Tue, 9 Apr 2024 14:36:37 -0300 Subject: [PATCH 14/17] Fixed snapshot tests to new configs --- ...ests_test_snapshots__discover__stdout.json | 168 +++++++++--------- ...ve_tests_test_snapshots__spec__stdout.json | 8 +- 2 files changed, 91 insertions(+), 85 deletions(-) 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 a2939e1191..f5ee108f3e 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": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -81,14 +81,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -193,7 +193,7 @@ "recommendedName": "contacts", "resourceConfig": { "name": "contacts", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -271,14 +271,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -375,7 +375,7 @@ "recommendedName": "deals", "resourceConfig": { "name": "deals", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -453,14 +453,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -573,7 +573,7 @@ "recommendedName": "engagements", "resourceConfig": { "name": "engagements", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -651,14 +651,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -755,7 +755,7 @@ "recommendedName": "contact_lists", "resourceConfig": { "name": "contact_lists", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -772,14 +772,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -827,7 +827,7 @@ "recommendedName": "contacts_lists_subscription", "resourceConfig": { "name": "contacts_lists_subscription", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -844,14 +844,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -899,7 +899,7 @@ "recommendedName": "campaigns", "resourceConfig": { "name": "campaigns", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -916,14 +916,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -971,7 +971,7 @@ "recommendedName": "subscription_changes", "resourceConfig": { "name": "subscription_changes", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -988,14 +988,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -1043,7 +1043,7 @@ "recommendedName": "email_events", "resourceConfig": { "name": "email_events", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -1060,14 +1060,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -1115,7 +1115,7 @@ "recommendedName": "ticket_pipelines", "resourceConfig": { "name": "ticket_pipelines", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -1193,14 +1193,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -1302,7 +1302,7 @@ "recommendedName": "deal_pipelines", "resourceConfig": { "name": "deal_pipelines", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -1319,14 +1319,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -1374,7 +1374,7 @@ "recommendedName": "engagements_calls", "resourceConfig": { "name": "engagements_calls", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -1452,14 +1452,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -1588,7 +1588,7 @@ "recommendedName": "engagements_emails", "resourceConfig": { "name": "engagements_emails", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -1666,14 +1666,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -1802,7 +1802,7 @@ "recommendedName": "engagements_meetings", "resourceConfig": { "name": "engagements_meetings", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -1880,14 +1880,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -2016,7 +2016,7 @@ "recommendedName": "engagements_notes", "resourceConfig": { "name": "engagements_notes", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -2094,14 +2094,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -2230,7 +2230,7 @@ "recommendedName": "engagements_tasks", "resourceConfig": { "name": "engagements_tasks", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -2308,14 +2308,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -2444,7 +2444,7 @@ "recommendedName": "goal_targets", "resourceConfig": { "name": "goal_targets", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -2522,14 +2522,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -2626,7 +2626,7 @@ "recommendedName": "feedback_submissions", "resourceConfig": { "name": "feedback_submissions", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -2704,14 +2704,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -2808,7 +2808,7 @@ "recommendedName": "line_items", "resourceConfig": { "name": "line_items", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -2886,14 +2886,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -2990,7 +2990,7 @@ "recommendedName": "products", "resourceConfig": { "name": "products", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3068,14 +3068,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3172,7 +3172,7 @@ "recommendedName": "tickets", "resourceConfig": { "name": "tickets", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3250,14 +3250,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3370,7 +3370,7 @@ "recommendedName": "marketing_emails", "resourceConfig": { "name": "marketing_emails", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3387,14 +3387,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3448,7 +3448,7 @@ "recommendedName": "email_subscriptions", "resourceConfig": { "name": "email_subscriptions", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3465,14 +3465,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3532,7 +3532,7 @@ "recommendedName": "marketing_forms", "resourceConfig": { "name": "marketing_forms", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3549,14 +3549,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3604,7 +3604,7 @@ "recommendedName": "owners", "resourceConfig": { "name": "owners", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3621,14 +3621,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3682,7 +3682,7 @@ "recommendedName": "workflows", "resourceConfig": { "name": "workflows", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3699,14 +3699,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3760,7 +3760,7 @@ "recommendedName": "properties", "resourceConfig": { "name": "properties", - "interval": "PT420S" + "interval": "PT30S" }, "documentSchema": { "$defs": { @@ -3777,14 +3777,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" @@ -3832,7 +3832,7 @@ "recommendedName": "venues", "resourceConfig": { "name": "venues", - "interval": "PT420S" + "interval": "PT60S" }, "documentSchema": { "$defs": { @@ -3910,14 +3910,14 @@ "type": "string" }, "row_id": { + "default": -1, "description": "Row ID of the Document, counting up from zero, or -1 if not known", "title": "Row Id", "type": "integer" } }, "required": [ - "op", - "row_id" + "op" ], "title": "Meta", "type": "object" 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 79c302fd4d..4621131691 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 @@ -69,10 +69,16 @@ } ], "title": "Authentication" + }, + "start_date": { + "format": "date-time", + "title": "start_date", + "type": "string" } }, "required": [ - "credentials" + "credentials", + "start_date" ], "title": "EndpointConfig", "type": "object" From d929e11982755ddf814ff0c1b9706376d33ca805 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Wed, 10 Apr 2024 15:49:41 -0300 Subject: [PATCH 15/17] Updating 'properties' stream interval --- source-hubspot-native/source_hubspot_native/resources.py | 2 +- ...e_hubspot_native_tests_test_snapshots__discover__stdout.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source-hubspot-native/source_hubspot_native/resources.py b/source-hubspot-native/source_hubspot_native/resources.py index fdbdcbc86e..2a5fd776f0 100644 --- a/source-hubspot-native/source_hubspot_native/resources.py +++ b/source-hubspot-native/source_hubspot_native/resources.py @@ -410,7 +410,7 @@ def open( open=open, initial_state=ResourceState(), initial_config=ResourceConfig( - name=Names.properties, interval=timedelta(seconds=30) + name=Names.properties, interval=timedelta(days=1) ), schema_inference=True, ) 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 f5ee108f3e..fcb2f4362c 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 @@ -3760,7 +3760,7 @@ "recommendedName": "properties", "resourceConfig": { "name": "properties", - "interval": "PT30S" + "interval": "P1D" }, "documentSchema": { "$defs": { From ae65e51c85616092acd08ece0c3ace515985e4d3 Mon Sep 17 00:00:00 2001 From: Luishfs Date: Thu, 11 Apr 2024 10:58:21 -0300 Subject: [PATCH 16/17] Updated 'properties' interval to 1 day & updated capture snapshot --- source-hubspot-native/test.flow.yaml | 2 +- ...tests_test_snapshots__capture__stdout.json | 45 +++++++++++++------ 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/source-hubspot-native/test.flow.yaml b/source-hubspot-native/test.flow.yaml index c114f6c4b1..1a50b00c99 100644 --- a/source-hubspot-native/test.flow.yaml +++ b/source-hubspot-native/test.flow.yaml @@ -117,7 +117,7 @@ captures: target: acmeCo/workflows - resource: name: properties - interval: PT30S + interval: P1D target: acmeCo/properties interval: 3m shards: diff --git a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json index 957ebae5d1..77546fb886 100644 --- a/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json +++ b/source-hubspot-native/tests/snapshots/source_hubspot_native_tests_test_snapshots__capture__stdout.json @@ -631,20 +631,6 @@ "updatedAt": "2024-02-27T07:05:03.192000Z" } ], - [ - "acmeCo/owners", - { - "archived": false, - "createdAt": "2024-02-27T07:05:06.660Z", - "email": "leofs123@gmail.com", - "firstName": "Luis", - "id": 750122779, - "lastName": "Henrique", - "updatedAt": "2024-03-13T18:17:48.512000Z", - "userId": 51770238, - "userIdIncludingInactive": 51770238 - } - ], [ "acmeCo/properties", { @@ -2077,5 +2063,36 @@ "type": "datetime", "updatedAt": "2023-12-05T17:03:58.823Z" } + ], + [ + "acmeCo/properties", + { + "_meta": { + "op": "c", + "row_id": 42 + }, + "calculated": false, + "createdAt": "2024-02-23T19:17:13.324Z", + "description": "This property stores the average sentiment of open support tickets at a given time", + "displayOrder": -1, + "externalOptions": false, + "fieldType": "number", + "formField": false, + "groupName": "company_activity", + "hasUniqueValue": false, + "hidden": false, + "hubspotDefined": true, + "hubspotObject": "companies", + "label": "Customer Success Ticket Sentiment", + "modificationMetadata": { + "archivable": true, + "readOnlyDefinition": false, + "readOnlyValue": true + }, + "name": "hs_customer_success_ticket_sentiment", + "options": [], + "type": "number", + "updatedAt": "2024-02-23T19:17:13.324Z" + } ] ] From 5af06a28af48390445682a40ef51f911fdc721da Mon Sep 17 00:00:00 2001 From: Luishfs Date: Fri, 12 Apr 2024 15:09:13 -0300 Subject: [PATCH 17/17] 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}}",