import type * as TsMorphTypes from 'ts-morph'; import type { CodemodRunOptions, CodemodRunResult } from './runner.js'; export declare const POLICY_RULES_TODO = "v3 policy rules are flat ({ id, match, model, prompt, ... }) instead of { consent, ui }. Rewrite hand-written rules; preset calls need no change."; interface OptionsObject { object: TsMorphTypes.ObjectLiteralExpression; entry: string; } /** Finds option objects passed to the provider, typed as its options, or given to the v2 runtime. */ declare const findOptionsObjects: (sourceFile: TsMorphTypes.SourceFile) => OptionsObject[]; /** * Whether policy packs may be hand-written rather than preset calls: an * array that holds an object literal, followed through a property or a * variable initialized in the same file. A value the codemod cannot read, * such as an import or a call, counts too, so it gets a TODO. */ export declare const hasHandWrittenRules: (value: TsMorphTypes.Node | undefined, depth?: number) => boolean; export { findOptionsObjects }; /** * Renames `ConsentManagerProvider` and its option types to `ConsentProvider`, * turns `mode`/`backendURL`/`offlinePolicy` into `hosted({ backendURL })` or * `offline()` transports, and renames `iframeBlockerConfig` to * `iframeBlocker`. The transports come from the React entry, also for a * provider imported from the Next.js or TanStack Start entry, whose * `hosted()` is plain data for `defineConsentConfig`. A mode that is * already `manifest()`, `hosted()`, `offline()` or `custom()` is left alone. * Custom mode gets a `TODO(c15t v3)` comment. * * @param options - Codemod execution options. * @returns Changed files and non-fatal per-file errors. */ export declare const runConsentProviderOptionsCodemod: (options: CodemodRunOptions) => Promise;