import { FetchStateAndError, ID } from '../../../commonStateTypes/common'; import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport'; import { Address } from '../../../entity/address/addressState'; import { InvoicingInvoice } from '../../../entity/invoicing/invoice/invoiceState'; import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload'; import { RootState } from '../../../rootStateTypes'; /** * Read-only view for the invoice detail page: the invoice entity + its per-id * fetch state, with the per-invoice lifecycle-action run-state folded in. The * billing/shipping addresses are resolved here from the shared address store so * the view layer renders them without touching the store itself. */ export interface InvoiceDetailView extends SelectorView { actionState: FetchStateAndError; /** * Backend help copy for this screen's field group, keyed by field code. * Folded in here so the screen never reaches for the config view itself. */ fieldHelp: InvoicingFieldHelpByCode; /** * Every request the page renders from, reduced to one state: the invoice * record and the config behind its field help. The page holds a skeleton * until this is `Completed`, so the form mounts once with real values. */ pageFetchState: FetchStateAndError; billingAddress?: Address; invoice?: InvoicingInvoice; shippingAddress?: Address; } export declare const getInvoiceDetail: (state: RootState, invoiceId: ID) => InvoiceDetailView;