Ir para o conteúdo

base_client

module wittgenstein_crm_client.base_client

Classes

  • CRMClient — Abstract Base Class for CRM clients.

  • BaseAsyncCRMClient — Base class for HTTP-based CRM clients, providing HTTP clients and retry mechanisms.

wittgenstein_crm_client.base_client.CRMClient

class CRMClient()

Bases : ABC

Abstract Base Class for CRM clients.

Methods

wittgenstein_crm_client.base_client.CRMClient.get_lead

async method CRMClient.get_lead(self, lead_id: str) → LeadRecord

Fetch a single lead record by ID.

wittgenstein_crm_client.base_client.CRMClient.list_leads

async method CRMClient.list_leads(self, stage: FunnelStage, **filters) → List[LeadRecord]

List leads in a specific funnel stage.

wittgenstein_crm_client.base_client.CRMClient.update_stage

async method CRMClient.update_stage(self, lead_id: str, stage: FunnelStage, reason: str) → None

Update the funnel stage of a lead.

wittgenstein_crm_client.base_client.CRMClient.add_activity

async method CRMClient.add_activity(self, lead_id: str, activity: CRMActivity) → None

Add an activity log to a lead.

wittgenstein_crm_client.base_client.CRMClient.create_task

async method CRMClient.create_task(self, lead_id: str, assignee: str, briefing: str) → None

Create a follow-up task inside the CRM.

wittgenstein_crm_client.base_client.CRMClient.create_contact

async method CRMClient.create_contact(self, contact: ContactRecord) → str

Create a contact record in the CRM, returning the contact ID.

wittgenstein_crm_client.base_client.CRMClient.enroll_sequence

async method CRMClient.enroll_sequence(self, contact_id: str, sequence_id: str) → None

Enroll a contact into an outreach sequence.

wittgenstein_crm_client.base_client.CRMClient.get_engagements

async method CRMClient.get_engagements(self, company_id: str, since: datetime) → List[EngagementEvent]

Fetch recent engagement events for a company.

wittgenstein_crm_client.base_client.BaseAsyncCRMClient

class BaseAsyncCRMClient(base_url: str, access_token: str, timeout: float = 30.0, max_retries: int = 3)

Bases : CRMClient, ABC

Base class for HTTP-based CRM clients, providing HTTP clients and retry mechanisms.

Methods

  • close — Close the underlying HTTP client.

wittgenstein_crm_client.base_client.BaseAsyncCRMClient.close

async method BaseAsyncCRMClient.close(self) → None

Close the underlying HTTP client.