export type WebhookLifecycleStatus = 'creating' | 'active' | 'resolved';
export interface WebhookLifecycleRecord {
    lifecycleId: string;
    connectorId: string;
    dedupKey: string;
    status: WebhookLifecycleStatus;
    chatId?: string;
    creatorLarkAppId?: string;
    pendingResolved?: boolean;
    creatingExpiresAt?: string;
    createdAt: string;
    updatedAt: string;
    resolvedAt?: string;
}
export type BeginLifecycleFiringResult = {
    action: 'create';
    record: WebhookLifecycleRecord;
} | {
    action: 'reuse';
    record: WebhookLifecycleRecord;
} | {
    action: 'creating';
    record: WebhookLifecycleRecord;
};
export interface WebhookLifecycleStoreFile {
    version: 1;
    records: WebhookLifecycleRecord[];
}
export declare function listWebhookLifecycleRecords(opts?: {
    connectorId?: string;
    status?: WebhookLifecycleStatus;
}, dataDir?: string): WebhookLifecycleRecord[];
export declare function beginWebhookLifecycleFiring(connectorId: string, dedupKey: string, dataDir?: string): Promise<BeginLifecycleFiringResult>;
export declare function activateWebhookLifecycleGroup(connectorId: string, dedupKey: string, lifecycleId: string, chatId: string, opts?: {
    creatorLarkAppId?: string;
}, dataDir?: string): Promise<{
    status: 'active' | 'pending_resolved' | 'stale';
    record?: WebhookLifecycleRecord;
}>;
export declare function failWebhookLifecycleGroup(connectorId: string, dedupKey: string, lifecycleId: string, dataDir?: string): Promise<void>;
export declare function resolveWebhookLifecycleGroup(connectorId: string, dedupKey: string, dataDir?: string): Promise<{
    action: 'close' | 'pending' | 'noop';
    record?: WebhookLifecycleRecord;
}>;
//# sourceMappingURL=webhook-lifecycle-store.d.ts.map