/** * Shared verb: structured conversion-report accumulator. * * Part of the `quonfig-target/` verb library (plan §3.1, D1). Every * skip/drop/coerce path in a provider's `translate.ts` records a structured * entry here so it lands in `MIGRATION_REPORT.md` — nothing is silently * dropped (plan §5.4). * * The categories below are the LaunchDarkly v1 set; a second provider adds its * own categories. The accumulator itself is provider-independent. */ export type ConversionNoteCategory = /** A flag/segment that could not be converted at all. */ 'skipped-config' /** A rule dropped because a clause's operator has no v1 Quonfig mapping (D3). */ | 'skipped-rule' /** An individual/context target converted to a leading PROP_IS_ONE_OF rule (lossy — plan §5.4). */ | 'individual-target-as-rule' /** Prerequisites dropped — no cross-flag dependency operator in Quonfig v1. */ | 'dropped-prerequisite' /** `privateAttributes` dropped — no Quonfig equivalent. */ | 'dropped-private-attribute' /** Experiment rollout converted to plain weighted_values; seed/kind dropped. */ | 'dropped-experiment-metadata' /** Maintainer metadata dropped — Quonfig authorship lives in git history. */ | 'dropped-maintainer' /** `customProperties` dropped — report-only in v1 (D6). */ | 'dropped-custom-properties' /** * `usingMobileKey:true` collapsed into Quonfig's single client-visibility bool, * but the flag is still client-visible because `usingEnvironmentId` is also true. * No action required — pure rollup noise. */ | 'dropped-mobile-key-still-visible' /** * `usingMobileKey:true` but `usingEnvironmentId:false` — the flag was * mobile-only in LD and will no longer reach mobile clients after migration. * Must-fix before cutover. */ | 'dropped-mobile-key-now-server-only' /** A percentage rollout that will re-bucket users post-migration (plan §5.4). */ | 'rebucketed-rollout' /** A big/synced segment whose membership is not exportable via REST. */ | 'unexportable-segment-membership' /** An AI Config enumerated but not emitted (out of v1 scope, D9). */ | 'ai-config-skipped' /** * Flagsmith D-F1: a non-boolean feature was `enabled=false`. Flagsmith would have * served the SDK-side default (not visible to the migrator); Quonfig will now * serve the stored `feature_state_value`. The "coerced sentinel" framing in * `getCoercedSentinels()` is reused so the per-env counts surface in the report. */ | 'enabled-false-non-boolean' /** Flagsmith D-F5: same feature has different value types across envs. Coerced to string. */ | 'cross-env-value-type-coerced' /** Flagsmith identity override emitted as a leading PROP_IS_ONE_OF rule on the identifier attribute. */ | 'identity-override-as-rule' /** * Flagsmith identity-trait extraction: a context attribute referenced by a segment rule * (plan §5.5 / D-F6). Pure FYI — your SDK callers will need to send this attribute at * eval time. The `key` is the trait name; `detail` lists the segments referencing it. */ | 'identity-traits-referenced' /** * Imported rollout weights violated the weight predicate (neither an even * split nor a percent-scale sum of 100000) and were normalized to sum * 100000 — or, at zero total, replaced with an even split (qfg-wis6.11). */ | 'normalized-rollout-weights'; export interface ConversionNote { category: ConversionNoteCategory; /** Human-readable detail — names the exact thing lost and why. */ detail: string; /** Source key the note is about (flag or segment key). */ key: string; /** * Structured prereq edges on `dropped-prerequisite` notes — the renderer uses * this to produce the inverted "orphaned parent → downstream consumers" view * (qfg-nb4n). Absent on every other category. */ prerequisites?: Array<{ parentKey: string; variation: number; }>; } /** * Collects conversion notes during a migration run. A provider source holds * one instance, passes it to every `translate()` call, and surfaces its * contents through the `MigrationSource` reporting accessors. */ export declare class ConversionReport { private readonly notes; get size(): number; add(category: ConversionNoteCategory, key: string, detail: string, extras?: { prerequisites?: Array<{ parentKey: string; variation: number; }>; }): void; /** All notes, in insertion order. */ all(): ConversionNote[]; /** Notes of one category, in insertion order. */ byCategory(category: ConversionNoteCategory): ConversionNote[]; isEmpty(): boolean; reset(): void; }