/**
 * Pure, entity-agnostic helpers for the "Models in Production" panel.
 *
 * Nothing here knows about any specific entity, column, or domain — they operate on raw value arrays
 * and cron strings. Kept separate from the Angular component so they're trivially unit-testable and
 * reusable.
 */
/** Max rows pulled when sampling a target column's population for the distribution. */
export declare const PRODUCTION_SAMPLE_CAP = 5000;
/** One bucket in a written-column distribution (a tercile band or a class value). */
export interface DistributionBucket {
    /** Display label for the bucket (band name or class value). */
    label: string;
    /** Number of records in this bucket. */
    count: number;
    /** Share of the sampled population, 0..100 (rounded for display). */
    pct: number;
}
/** Result of bucketing a written column's current values across the population. */
export interface DistributionResult {
    /** 'numeric' → neutral terciles (Low/Mid/High bands); 'categorical' → group-by-value. */
    kind: 'numeric' | 'categorical';
    buckets: DistributionBucket[];
    /** Total records sampled (post NOT-NULL filter, pre-cap if the population is larger). */
    sampled: number;
    /** True when the population hit {@link PRODUCTION_SAMPLE_CAP} and the distribution is a sample. */
    capped: boolean;
}
/**
 * Build a generic distribution from a column's raw values.
 *
 * - **Numeric** (probabilities, scores, regression outputs): neutral terciles over the observed
 *   [min,max] range — "Lower third / Middle third / Upper third". No moral direction (no "risk",
 *   no "good/bad") — just neutral bands so the panel stays entity-agnostic.
 * - **Categorical** (class labels, strings, booleans): group-by-value counts, biggest first, with
 *   the long tail folded into "Other" beyond {@link MAX_CATEGORICAL_BUCKETS}.
 *
 * @param values raw column values (may contain null/undefined/empty — those are dropped)
 * @param numeric whether the bound column is numeric (caller derives this from entity field metadata)
 */
export declare function buildDistribution(values: ReadonlyArray<unknown>, numeric: boolean): DistributionResult;
/**
 * Turn a 5- or 6-field cron expression into a short human phrase ("Daily at 06:00", "Monthly",
 * "Weekly on Mon") for common cases, falling back to the raw expression when it doesn't match a
 * recognized pattern. Purely best-effort and locale-neutral — no external cron library.
 *
 * Field order: [second?] minute hour dayOfMonth month dayOfWeek
 */
export declare function humanizeCron(cron: string | null | undefined): string | null;
/** Status-pill colour variants used across the panel (matches the `.ps-badge` token set). */
export type StatusVariant = 'green' | 'amber' | 'red' | 'gray' | 'blue';
/**
 * Build the model display label for a production row: "<Pipeline> v<Version>", falling back to
 * "Model v<Version>" when no pipeline name is available, and "Unknown model" when the model itself
 * is missing (a dangling binding). Entity-agnostic — operates on plain pipeline/version inputs.
 *
 * @param pipeline denormalized pipeline name (may be null/empty/whitespace)
 * @param version  model version number (null when the model couldn't be resolved)
 */
export declare function modelLabel(pipeline: string | null | undefined, version: number | null | undefined): string;
/**
 * Map a Process-Run status to a {@link StatusVariant} pill colour. Unknown/empty statuses fall back
 * to neutral gray so a new run state never renders an undefined badge.
 */
export declare function runStatusVariant(status: string | null | undefined): StatusVariant;
/** Map a scoring mode to its badge colour. OnDemand/unknown → neutral gray. */
export declare function modeBadgeClass(mode: string | null | undefined): StatusVariant;
/** Minimal raw shape of a Process Run consumed by {@link summarizeRun} (decoupled from the entity). */
export interface RawRun {
    Status: string;
    EndTime?: Date | null;
    StartTime?: Date | null;
    CreatedAt?: Date | null;
    SuccessCount?: number | null;
    ErrorCount?: number | null;
    TotalItemCount?: number | null;
}
/** A summarized last-run view-model rendered in the panel's "Last run" cell. */
export interface RunSummary {
    status: string;
    statusVariant: StatusVariant;
    /** Best available timestamp: EndTime → StartTime → CreatedAt → null. */
    when: Date | null;
    successCount: number;
    errorCount: number;
    totalCount: number | null;
}
/**
 * Summarize the latest Process Run for a production binding into a display-ready view-model. Picks the
 * most meaningful timestamp (end, else start, else created), coerces nullable counts to 0, and derives
 * the status-pill variant. Pure — no entity/provider dependency.
 *
 * @param run the latest run, or null/undefined when the binding has never run
 */
export declare function summarizeRun(run: RawRun | null | undefined): RunSummary | null;
//# sourceMappingURL=production-distribution.d.ts.map