import type { ConnectorProxy } from './connector-proxy.js'; import type { JsonValue, TriggerKeySnapshot, TriggerSchedule } from '../browser/project-change.js'; export declare const maximumPollCheckpointBytes: number; export declare const maximumPollDedupeKeyBytes = 1024; export declare const maximumPollEventsPerPage = 100; export interface PollEvent { readonly dedupeKey: string; readonly payload: Readonly>; } export interface PollResult { readonly checkpoint: JsonValue; readonly events: readonly PollEvent[]; readonly filtered?: number; readonly hasMore?: boolean; } export interface PollContext { readonly checkpoint: JsonValue; readonly config: Readonly>; readonly connector: ConnectorProxy; readonly now: Date; readonly signal?: AbortSignal; } export interface PollDefinition { readonly poll: (context: PollContext) => Promise; readonly snapshot: TriggerKeySnapshot & { readonly type: 'poll'; }; } export declare class PollConnectionError extends Error { readonly name = "PollConnectionError"; } export declare class PermanentPollError extends Error { readonly name = "PermanentPollError"; } export declare class TransientPollError extends Error { readonly name = "TransientPollError"; } export declare function pollPageClaimId(bindingId: string, runtimeVersion: number, rootOccurrenceId: string, page: number): Promise; export declare function providerEventId(bindingId: string, triggerKey: string, dedupeKey: string): Promise; export interface PollConformanceFixture { readonly config: Readonly>; readonly connectionId: string; readonly publishedAt: string; readonly rules: readonly TriggerSchedule[]; } export interface PollConformanceState { readonly calls: number; readonly checkpoint: JsonValue; readonly health: 'healthy' | 'initializing'; readonly payloads: readonly JsonValue[]; } export interface PollConformanceHarness { dispose(): Promise; replayLast(): Promise; republish(at: string, change?: { readonly config?: Readonly>; readonly connectionId?: string; }): Promise; restart(): Promise; retire(at: string): Promise; state(): Promise; tick(at: string, pages: readonly PollResult[]): Promise; } export interface PollConformanceCase { readonly fixture: PollConformanceFixture; readonly name: string; verify(harness: PollConformanceHarness): Promise; } export declare const pollConformanceCases: readonly PollConformanceCase[];