import type { Diagnostic } from '../../diagnostics/index.js'; import type { OrderCall } from './call.js'; import type { OrderSide } from './intent.js'; import type { MappedOrder, PlacingContext } from './place.js'; /** * An order this bar has already sent, which is what OS7013 is asked about. * * The bar's own record, and the only rule left that is scoped to a bar: two * opposite orders on one leg on one bar are refused because which of them to * honour has no defensible answer, and that question is about one bar's * decision rather than about what the destination still has. What a close is * measured against is a different question with a different scope, and it is * answered from the ledger's rows (`closable.ts`). * * The record is the bar's rather than the execution's, so a bar declared * `onUnconfirmed` and executed again is still one bar for it: the orders of its * earlier executions really were handed over. */ export interface SentOnBar { readonly name: string; readonly line: number; readonly side: OrderSide; } /** * What the call itself is wrong about, before anything is computed from it. * * Four refusals. Three are about what the script wrote and nothing else, so * they are the same on every bar and on every host. The fourth, OS7017, is the * one quantity a script writes that is a claim about the leg rather than about * itself, so it is answered here, against the leg, before the call is mapped: * a close whose stated quantity is refused has to send nothing at all, and a * close that flattens a tag on a leg holding nothing else maps to no order for * the mapping to refuse. */ export declare function refusalInCall(call: OrderCall, ctx: PlacingContext): Diagnostic | undefined; /** * What one order this call produced is wrong about. * * Asked of every order a call sends, before any of them is given an id, so a * call that sends two sends both or neither. */ export declare function refusalInOrder(call: OrderCall, order: MappedOrder, ctx: PlacingContext, sent: readonly SentOnBar[]): Diagnostic | undefined; //# sourceMappingURL=refuse.d.ts.map