import type { VoyantFetcher } from "../index.js"; export type PushStatus = "pending" | "ok" | "failed" | "compensated"; export interface ChannelBookingLinkRow { link: { id: string; channelId: string; bookingId: string; bookingItemId: string | null; sourceKind: string | null; sourceConnectionId: string | null; pushStatus: PushStatus | string; pushAttempts: number; lastPushAt: string | null; lastError: string | null; externalBookingId: string | null; externalReference: string | null; externalStatus: string | null; createdAt: string; }; channelName: string; channelKind: string; } export interface LinksResponse { data: ChannelBookingLinkRow[]; counts: Record; } export interface DeliveryRow { id: string; sourceModule: string; sourceEvent: string; sourceEntityId: string | null; targetUrl: string; targetKind: string | null; targetRef: string | null; requestMethod: string; responseStatus: number | null; responseBodyExcerpt: string | null; attemptNumber: number; status: string; errorClass: string | null; errorMessage: string | null; durationMs: number | null; createdAt: string; } export interface DeliveriesResponse { data: DeliveryRow[]; } export interface ThrottlingRow { channelId: string | null; count: number; } export interface ThrottlingResponse { data: ThrottlingRow[]; sinceMs: number; } export interface ReconcilerResult { scanned: number; triggered: number; } export interface RetryPushResult { ok: boolean; bookingId: string; attempted?: number; succeeded?: number; failed?: number; compensated?: number; targetCount?: number; insertedLinks?: number; reason?: "no_pending_links" | "booking_missing" | "no_targets" | string; outcomes?: Array<{ channelId: string; bookingItemId: string | null; status: "ok" | "failed" | "skipped" | "compensated" | string; upstreamRef?: string; error?: string; }>; } export type RetryFeedbackKind = "processed" | "booking_missing" | "no_pending_links" | "no_targets" | "no_adapter" | "no_mapping" | "failed" | "ok"; export interface BookingRecord { id: string; bookingNumber: string; status: string; } export interface BookingsResponse { data: BookingRecord[]; } export interface ChannelRecord { id: string; name: string; kind: string; status: string; } export interface ChannelsResponse { data: ChannelRecord[]; } export interface ChannelSyncPageProps { baseUrl?: string; fetcher?: VoyantFetcher; className?: string; } export declare const channelPushAdminPaths: { readonly links: "/v1/admin/distribution/links"; readonly throttling: "/v1/admin/distribution/throttling"; readonly deliveries: "/v1/admin/distribution/deliveries"; readonly retry: (bookingId: string) => string; readonly reconcile: (flow: "bookings" | "availability" | "content") => string; }; export declare function fetchJson(path: string, options: { baseUrl: string; fetcher: VoyantFetcher; }, init?: RequestInit): Promise; export declare const STATUS_VARIANTS: Record; export declare const STATUS_TILES: ReadonlyArray<{ key: PushStatus; tone: "default" | "secondary" | "destructive" | "outline"; }>; export declare const LINKS_REFETCH_MS = 15000; export declare const THROTTLING_REFETCH_MS = 60000; export declare function useDebouncedValue(value: T, delayMs: number): T; export declare function joinUrl(baseUrl: string, path: string): string; export declare function formatChannelKind(kind: string): string; export declare function formatShortDuration(seconds: number): string; export declare function formatRelative(iso: string): string; export declare function formatTemplate(template: string, values: Record): string; export declare function unwrapData(body: T | { data: T; }): T; export declare function classifyRetryResult(result: RetryPushResult): RetryFeedbackKind;