|
1 | 1 | """Hubspot source settings and constants""" |
| 2 | + |
2 | 3 | from typing import Dict |
3 | 4 | from dlt.common import pendulum |
4 | 5 | from dlt.common.data_types import TDataType |
|
9 | 10 | CRM_CONTACTS_ENDPOINT = "/crm/v3/objects/contacts" |
10 | 11 | CRM_COMPANIES_ENDPOINT = "/crm/v3/objects/companies" |
11 | 12 | CRM_DEALS_ENDPOINT = "/crm/v3/objects/deals" |
| 13 | +CRM_CALLS_ENDPOINT = "/crm/v3/objects/calls" |
| 14 | +CRM_EMAILS_ENDPOINT = "/crm/v3/objects/emails" |
| 15 | +CRM_MEETINGS_ENDPOINT = "/crm/v3/objects/meetings" |
12 | 16 | CRM_PRODUCTS_ENDPOINT = "/crm/v3/objects/products" |
13 | 17 | CRM_TICKETS_ENDPOINT = "/crm/v3/objects/tickets" |
14 | 18 | CRM_QUOTES_ENDPOINT = "/crm/v3/objects/quotes" |
|
23 | 27 | "contact": CRM_CONTACTS_ENDPOINT, |
24 | 28 | "company": CRM_COMPANIES_ENDPOINT, |
25 | 29 | "deal": CRM_DEALS_ENDPOINT, |
| 30 | + "call": CRM_CALLS_ENDPOINT, |
| 31 | + "email": CRM_EMAILS_ENDPOINT, |
| 32 | + "meeting": CRM_MEETINGS_ENDPOINT, |
26 | 33 | "product": CRM_PRODUCTS_ENDPOINT, |
27 | 34 | "ticket": CRM_TICKETS_ENDPOINT, |
28 | 35 | "quote": CRM_QUOTES_ENDPOINT, |
|
33 | 40 | "contact": ["deals", "products", "tickets", "quotes"], |
34 | 41 | "company": ["contacts", "deals", "products", "tickets", "quotes"], |
35 | 42 | "deal": [], |
| 43 | + "call": [], |
| 44 | + "email": [], |
| 45 | + "meeting": [], |
36 | 46 | "product": [], |
37 | 47 | "ticket": [], |
38 | 48 | "quote": [], |
|
45 | 55 | "companies": "company", |
46 | 56 | "contacts": "contact", |
47 | 57 | "deals": "deal", |
| 58 | + "calls": "call", |
| 59 | + "emails": "email", |
| 60 | + "meetings": "meeting", |
48 | 61 | "tickets": "ticket", |
49 | 62 | "products": "product", |
50 | 63 | "quotes": "quote", |
|
82 | 95 | "pipeline", |
83 | 96 | ] |
84 | 97 |
|
| 98 | +DEFAULT_CALL_PROPS = [ |
| 99 | + "hs_object_id", |
| 100 | + "hs_createdate", |
| 101 | + "hs_call_title", |
| 102 | + "hs_body_preview", |
| 103 | + "hs_activity_type", |
| 104 | + "hubspot_owner_id", |
| 105 | + "hs_lastmodifieddate", |
| 106 | +] |
| 107 | + |
| 108 | +DEFAULT_EMAIL_PROPS = [ |
| 109 | + "hs_object_id", |
| 110 | + "hs_createdate", |
| 111 | + "hs_email_subject", |
| 112 | + "hs_body_preview", |
| 113 | + "hs_email_from_email", |
| 114 | + "hs_email_to_email", |
| 115 | + "hs_email_status", |
| 116 | + "hubspot_owner_id", |
| 117 | + "hs_lastmodifieddate", |
| 118 | +] |
| 119 | + |
| 120 | +DEFAULT_MEETING_PROPS = [ |
| 121 | + "hs_object_id", |
| 122 | + "hs_createdate", |
| 123 | + "hs_meeting_title", |
| 124 | + "hs_body_preview", |
| 125 | + "hs_meeting_start_time", |
| 126 | + "hs_activity_type", |
| 127 | + "hubspot_owner_id", |
| 128 | + "hs_lastmodifieddate", |
| 129 | +] |
| 130 | + |
85 | 131 | DEFAULT_TICKET_PROPS = [ |
86 | 132 | "createdate", |
87 | 133 | "content", |
|
117 | 163 | "company": DEFAULT_COMPANY_PROPS, |
118 | 164 | "contact": DEFAULT_CONTACT_PROPS, |
119 | 165 | "deal": DEFAULT_DEAL_PROPS, |
| 166 | + "call": DEFAULT_CALL_PROPS, |
| 167 | + "email": DEFAULT_EMAIL_PROPS, |
| 168 | + "meeting": DEFAULT_MEETING_PROPS, |
120 | 169 | "ticket": DEFAULT_TICKET_PROPS, |
121 | 170 | "product": DEFAULT_PRODUCT_PROPS, |
122 | 171 | "quote": DEFAULT_QUOTE_PROPS, |
|
126 | 175 | "company": "hs_lastmodifieddate", |
127 | 176 | "contact": "lastmodifieddate", |
128 | 177 | "deal": "hs_lastmodifieddate", |
| 178 | + "call": "hs_lastmodifieddate", |
| 179 | + "email": "hs_lastmodifieddate", |
| 180 | + "meeting": "hs_lastmodifieddate", |
129 | 181 | "ticket": "hs_lastmodifieddate", |
130 | 182 | "product": "hs_lastmodifieddate", |
131 | 183 | "quote": "hs_lastmodifieddate", |
|
0 commit comments