import { type ProvisionIfAbsent } from './helpers';
import type { LTApiAuth, LTApiResult } from '../../types/sdk';
/**
 * Find escalations by a metadata key-value pair.
 *
 * Single query with window function for count. Results are
 * RBAC-scoped to the caller's visible roles.
 */
export declare function findByMetadata(input: {
    key: string;
    value: string;
    status?: string;
    limit?: number;
    offset?: number;
}, auth: LTApiAuth): Promise<LTApiResult>;
/**
 * Claim an escalation by metadata key-value pair.
 *
 * Single atomic query. RBAC is enforced in the SQL WHERE clause —
 * if the caller doesn't have an allowed role, zero rows match and
 * the claim never happens. No pre-flight find, no TOCTOU.
 */
export declare function claimByMetadata(input: {
    key: string;
    value: string;
    durationMinutes?: number;
    assignee?: string;
    metadata?: Record<string, any>;
    provisionIfAbsent?: ProvisionIfAbsent;
}, auth: LTApiAuth): Promise<LTApiResult>;
/**
 * Resolve an escalation by metadata key-value pair.
 *
 * Single atomic query with signal guard:
 * - No signal_id → claim + resolve atomically in SQL. One query. Done.
 * - signal_id present → SQL returns the signal info without resolving.
 *   Caller signals the workflow; conditionLT resolves durably inside
 *   the workflow via ltResolveEscalation.
 *
 * Never does SELECT-then-UPDATE. The SQL CTE handles find + RBAC +
 * claim + resolve (or signal detection) in one round-trip.
 */
export declare function resolveByMetadata(input: {
    key: string;
    value: string;
    resolverPayload: Record<string, any>;
    assignee?: string;
    metadata?: Record<string, any>;
}, auth: LTApiAuth): Promise<LTApiResult>;
