import { isly } from "isly"; import { Account as ModelAccount } from "../../Account"; import type { Card as ModelCard } from "../../Card"; import { Rail } from "../../Rail"; import type { Transaction as ModelTransaction } from "../../Transaction"; import type { Rule } from "../index"; import { Account as StateAccount } from "./Account"; import { Authorization as StateAuthorization } from "./Authorization"; import { Card as StateCard } from "./Card"; import { Organization as StateOrganization } from "./Organization"; import { Partial as StatePartial } from "./Partial"; import { Transaction as StateTransaction } from "./Transaction"; export interface State { account: State.Account; transaction: State.Transaction; authorization?: State.Authorization; card?: State.Card; organization?: State.Organization; } export declare namespace State { export import Partial = StatePartial; export import Authorization = StateAuthorization; export import Card = StateCard; export import Account = StateAccount; export import Transaction = StateTransaction; export import Organization = StateOrganization; type Outcome = (typeof Outcome.values)[number]; namespace Outcome { const values: readonly ["approve", "reject", "review"]; const type: isly.Type<"approve" | "reject" | "review">; } interface Evaluated extends State { outcomes: globalThis.Partial>; outcome: Outcome; flags: string[]; notes: ModelTransaction.Note[]; } function from(account: ModelAccount, address: Rail.Address, transaction: ModelTransaction.Creatable.Resolved | ModelTransaction, kind: Rule.Base.Kind, stage: "finalize" | "initiate", card?: Card, organization?: Organization): State; const type: Record; function fromPreTransaction(account: ModelAccount, address: Rail.Address, transaction: ModelTransaction.PreTransaction, card?: ModelCard & { statistics: Card.Statistics; }, organization?: Organization): State; }