export declare const CREATE_TASK = "\n  INSERT INTO lt_tasks\n    (workflow_id, workflow_type, lt_type, task_queue, signal_id,\n     parent_workflow_id, origin_id, parent_id, envelope, metadata, priority,\n     trace_id, span_id, initiated_by, principal_type, executing_as, status)\n  VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, COALESCE($17, 'pending'))\n  RETURNING *";
export declare const APPEND_MILESTONES = "\n  UPDATE lt_tasks\n  SET milestones = milestones || $1::jsonb\n  WHERE id = $2\n  RETURNING *";
export declare const GET_TASK = "SELECT * FROM lt_tasks WHERE id = $1";
export declare const GET_TASK_BY_SIGNAL_ID = "SELECT * FROM lt_tasks WHERE signal_id = $1";
export declare const GET_TASK_BY_WORKFLOW_ID = "SELECT * FROM lt_tasks WHERE workflow_id = $1 ORDER BY created_at DESC LIMIT 1";
export declare const RESOLVE_TASK_BY_WORKFLOW_ID = "SELECT workflow_type, task_queue FROM lt_tasks WHERE workflow_id = $1 ORDER BY created_at DESC LIMIT 1";
export declare const RESOLVE_CONFIG_TASK_QUEUE = "SELECT task_queue FROM lt_config_workflows WHERE workflow_type = $1";
export declare const RESOLVE_JOB_ENTITY = "SELECT entity FROM durable.jobs WHERE key = $1 LIMIT 1";
export declare const GET_PROCESS_TASKS = "SELECT * FROM lt_tasks WHERE origin_id = $1 ORDER BY created_at ASC";
/**
 * Build the process-stats totals CTE query for a given interval.
 * The interval value MUST come from the VALID_PERIODS whitelist.
 */
export declare function processStatsTotals(interval: string): string;
/**
 * Build the process-stats-by-type CTE query for a given interval.
 * The interval value MUST come from the VALID_PERIODS whitelist.
 */
export declare function processStatsByType(interval: string): string;
