Skip to main content

Function: listFacilityTimeline()

listFacilityTimeline(svc, companyId, facilityId, limit?): Promise<FacilityTimelineEntry[]>

Defined in: src/db/queries/pipeline.ts:582

Facility 360 activity timeline (UX §): merges facility_notes with crm_activities from leads linked to this facility — both the prospect bridge (job_signals.crm_lead_id) and the won conversion (crm_leads.converted_facility_id). Newest first. Read with the service client after the caller has verified the facility belongs to companyId.

Parameters

svc

SupabaseClient

companyId

string

facilityId

string

limit?

number = 40

Returns

Promise<FacilityTimelineEntry[]>