/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type EntryChange } from "../shared/func/patch-draft.js"; import { type FitAnswers } from "../shared/func/use-fit.js"; import type { OptimiseSessions } from "../shared/func/use-optimise.js"; import type { AllocationDomain, AllocationValue, Context, Day, FitAsk, FitResult } from "./model.js"; /** * The fit, as the board asks it: of the day as drafted now, or of a plan the * board derives from it (a fill asks of the day without the reservation it * fills). */ export type AllocationFit = FitAnswers; /** * Why a question has no answer and none is coming: the board's fit failed (F3), or the record refused the day the * question is asked of (rule 10), that question alone. * * @param fit - The board's fit * @param ask - The question * @param of - The day it is asked of, where it is one the board derives * @returns The fit's words; `undefined` while an answer may yet come */ export declare function fitFailure(fit: AllocationFit, ask: FitAsk, of?: Day): string | undefined; /** What an ask takes beside its question: the board's sessions and their drafts. */ export interface AllocationFitAsked { /** The board's sessions over the records it edits — the bins' and the periods': what an ask takes its drafts from. */ readonly sessions: OptimiseSessions; /** The sessions' drafts, the same object while their bytes hold: an answer is kept for the drafts it was asked of. */ readonly drafts: object; } /** * The change from the day as drafted to a plan derived from it, entry by entry: a bin the derived plan leaves out, one * it adds, and one whose row it changes. * * @param base - The day as drafted * @param of - The plan derived from it * @returns Each changed bin's row before and after, by its key */ export declare function derivedChanges(base: Day, of: Day): EntryChange[]; /** * The board's fit (see the module docs). * * @param value - The payload: the fit's binding, the bins' record and the rail * @param domain - The bin row type's domain * @param day - The plan day * @param plan - The day as drafted * @param context - Every arrival and resource, as the board reads them * @param asked - The board's sessions and their drafts * @returns The fit */ export declare function useAllocationFit(value: AllocationValue, domain: AllocationDomain, day: Date, plan: Day, context: Context, asked: AllocationFitAsked): AllocationFit; //# sourceMappingURL=fit.d.ts.map