Skip to main content

Function: listDueFollowUpTasks()

listDueFollowUpTasks(svc, companyId, todayIso): Promise<DueTask[]>

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

Due follow-up tasks for the company: pending tasks whose due_date has arrived, plus snoozed tasks whose snoozed_until has elapsed (they re-surface). Step instructions/day-offset are joined in a second read keyed on (sequence_id, step_no) — the task only denormalizes channel/persona, and there is no composite FK PostgREST could embed. Ordered oldest-due first so overdue work floats up.

Parameters

svc

SupabaseClient

companyId

string

todayIso

string

Returns

Promise<DueTask[]>