import { type FlagClient, type FlagClientOptions } from "@indigoai-us/hq-flags-client"; import type { VaultServiceConfig } from "../types.js"; export declare const TARGETED_UPSERT_EXACT_LIST_FLAG = "cost.sync-upsert-exact-list"; type FlagClientFactory = (options: FlagClientOptions) => FlagClient; type GateDependencies = { createClient?: FlagClientFactory; env?: Readonly<{ HQ_FLAGS_API_URL?: string; }>; now?: () => number; }; /** * Resolve the event-list optimization in the authenticated company's context. * A failed/missing flag read always leaves the legacy exact+descendant scope * intact. Failed refreshes also invalidate a previously true snapshot until a * later successful resolve, including a successful 304 response. Initial and * periodic refreshes run in the background so flag service latency never * delays a pull; without a healthy snapshot, the caller keeps legacy scope. */ export declare function createTargetedUpsertExactListGate(dependencies?: GateDependencies): (config: VaultServiceConfig, companyUid: string) => Promise; /** * Coordinator path coalescing can retain a parent while dropping original * descendant events. Exact upsert listing is safe only when the slice still * represents every event path; otherwise leave the whole slice on legacy * exact-plus-descendant listing so a delete or nested update is not lost. */ export declare function exactUpsertPathsForCoordinatorSlice(events: ReadonlyArray<{ relativePath: string; kind: "upsert" | "delete"; }>, slicePaths: ReadonlyArray): string[]; export declare function isTargetedUpsertExactListEnabled(config: VaultServiceConfig, companyUid: string): Promise; export {}; //# sourceMappingURL=targeted-upsert-exact-list.d.ts.map