mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
HubSpot deal-contacts transport lives under infrastructure like the other API clients 🟪
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b96aceaf7b
commit
8fd808ffd9
7 changed files with 7 additions and 7 deletions
|
|
@ -30,7 +30,7 @@ from hubspot.crm.associations.v4.models import ( # type: ignore[reportMissingTy
|
|||
from backend.app.config import get_settings
|
||||
from etl.hubspot.company_data import CompanyData
|
||||
from etl.hubspot.project_data import ProjectData
|
||||
from etl.hubspot.retry import call_with_retry
|
||||
from infrastructure.hubspot.retry import call_with_retry
|
||||
from utils.logger import setup_logger
|
||||
|
||||
import mimetypes
|
||||
|
|
@ -86,7 +86,7 @@ class HubspotClient:
|
|||
# self.client
|
||||
|
||||
def _call_with_retry(self, fn: Callable[[], Any], max_retries: int = 2) -> Any:
|
||||
"""Delegates to the shared etl.hubspot.retry policy."""
|
||||
"""Delegates to the shared infrastructure.hubspot.retry policy."""
|
||||
return call_with_retry(fn, max_retries=max_retries, logger=self.logger)
|
||||
|
||||
def get_deal_ids_from_company(self, company_id: str) -> list[str]:
|
||||
|
|
|
|||
0
infrastructure/hubspot/__init__.py
Normal file
0
infrastructure/hubspot/__init__.py
Normal file
|
|
@ -5,8 +5,8 @@ from hubspot.client import Client # type: ignore[reportMissingTypeStubs]
|
|||
from hubspot.crm.associations.v4 import AssociationSpec # type: ignore[reportMissingTypeStubs]
|
||||
from hubspot.crm.contacts import SimplePublicObjectInputForCreate # type: ignore[reportMissingTypeStubs]
|
||||
|
||||
from etl.hubspot.errors import HubspotRequestError
|
||||
from etl.hubspot.retry import call_with_retry
|
||||
from infrastructure.hubspot.errors import HubspotRequestError
|
||||
from infrastructure.hubspot.retry import call_with_retry
|
||||
|
||||
# HubSpot-defined deal -> contact association ("deal_to_contact" in v3 terms).
|
||||
DEAL_TO_CONTACT_ASSOCIATION_TYPE_ID = 3
|
||||
|
|
@ -2,8 +2,8 @@ from dataclasses import dataclass
|
|||
from typing import Dict, List, Optional, Tuple, Union
|
||||
|
||||
from domain.abri.models import AbriRequestRejected, PlaceRef, Tenant
|
||||
from etl.hubspot.deal_contacts_client import HubspotDealContactsClient
|
||||
from etl.hubspot.errors import HubspotRequestError
|
||||
from infrastructure.hubspot.deal_contacts_client import HubspotDealContactsClient
|
||||
from infrastructure.hubspot.errors import HubspotRequestError
|
||||
from infrastructure.abri.abri_client import AbriClient
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from hubspot.crm.contacts import ApiException as ContactsApiException # type: i
|
|||
from hubspot.crm.contacts import SimplePublicObjectInputForCreate # type: ignore[reportMissingTypeStubs]
|
||||
|
||||
from domain.abri.models import AbriRequestRejected, PlaceRef
|
||||
from etl.hubspot.deal_contacts_client import HubspotDealContactsClient
|
||||
from infrastructure.hubspot.deal_contacts_client import HubspotDealContactsClient
|
||||
from infrastructure.abri.abri_client import AbriClient
|
||||
from infrastructure.abri.config import AbriConfig
|
||||
from infrastructure.abri.errors import AbriResponseParseError, AbriTransportError
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue