import type { NylasV3Client } from '@nylas-labs/cli-kit'; import type { ProjectState } from '../state/schema.js'; import { type AppHealthOptions } from './app-health.js'; export declare const WEBHOOK_TRIGGER_TYPES: string[]; export type RealtimeWebhookResult = { status: 'registered'; callbackUrl: string; secretStored: boolean; } | { status: 'skipped'; reason: 'manual-hosting' | 'non-cloudflare-hosting' | 'missing-app-url' | 'unhealthy-app'; } | { status: 'failed'; callbackUrl: string; requestId?: string; reason?: 'ambiguous-ownmail-destinations' | 'tracked-destination-ownership-mismatch' | 'unrecognized-callback-destination'; }; export type RealtimeWebhookOptions = AppHealthOptions & { checkHealth?: boolean; baseUrl?: string; }; type RealtimeWebhookClient = { reconcileWebhook?: NylasV3Client['reconcileWebhook']; rotateWebhookSecret?: NylasV3Client['rotateWebhookSecret']; deleteWebhook?: NylasV3Client['deleteWebhook']; /** Compatibility for injected clients created before reconciliation shipped. */ ensureWebhook?: NylasV3Client['ensureWebhook']; }; export declare function setupRealtimeWebhook(project: ProjectState, v3: RealtimeWebhookClient, options?: RealtimeWebhookOptions): Promise; export declare function projectAppUrl(project: ProjectState): string | undefined; export declare function projectCustomAppUrls(project: ProjectState): string[]; export declare function webhookBaseUrl(project: ProjectState): string | null; export {}; //# sourceMappingURL=webhook.d.ts.map