import type { SubstrateEvent, SubstrateEventType } from "../../events/types.js";
export type SubscriptionDeliveryMethod = "webhook" | "sse";
/** Parsed subscription row from `entity_snapshots.snapshot` + entity ownership. */
export interface SubscriptionRecord {
    entity_id: string;
    user_id: string;
    subscription_id: string;
    watch_entity_types?: string[];
    watch_entity_ids?: string[];
    watch_event_types?: SubstrateEventType[];
    delivery_method: SubscriptionDeliveryMethod;
    webhook_url?: string;
    webhook_secret?: string;
    /** Skip deliveries when `event.source_peer_id` equals this value (peer loop prevention). */
    sync_peer_id?: string;
    active: boolean;
    created_at?: string;
    last_delivered_at?: string;
    consecutive_failures: number;
    max_failures: number;
}
export declare function parseSubscriptionSnapshot(entityId: string, userId: string, snapshot: Record<string, unknown>): SubscriptionRecord | null;
export declare function subscriptionMatchesEvent(sub: SubscriptionRecord, event: SubstrateEvent): boolean;
//# sourceMappingURL=subscription_types.d.ts.map