import { ID } from '../../../commonStateTypes/common'; import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport'; import { Address } from '../../../entity/address/addressState'; import { InvoicingFieldHelpByCode, InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload'; import { InvoicingProduct } from '../../../entity/invoicing/product/productState'; import { RootState } from '../../../rootStateTypes'; import { InvoicingCreateInvoiceFormLocalData } from './createInvoiceState'; /** * One catalog plan price, split into its two naming parts so consumers can * compose the label themselves (the plan family name and the price point/price * name are separate columns in the catalog). `price` is the price point's * catalog price in whole USD (never minor units), absent when the catalog * carries no price for it. */ export interface InvoicingPlanNameOption { planName: string; subFamilyName: string; price?: number; } /** One customer row of the create-invoice customer picker. */ export interface InvoicingCreateInvoiceCustomerOption { id: ID; name: string; billingAddress?: Address; email?: string; } export interface CreateInvoiceFormView extends SelectorView { customers: InvoicingCreateInvoiceCustomerOption[]; /** * 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; localData: InvoicingCreateInvoiceFormLocalData; planNames: InvoicingPlanNameOption[]; products: InvoicingProduct[]; savedInvoiceId?: ID; settings?: InvoicingSettingsPayload; } /** * Single bundled view for the create-invoice screen — web-ui consumes only this. * Carries the form draft (`localData`), the option sources the form needs * (customer picker rows, catalog plan names, products, settings), the * create-invoice fetch state/error, and the id of the invoice last created * (`savedInvoiceId`, to navigate on success). */ export declare const getCreateInvoiceFormView: (state: RootState) => CreateInvoiceFormView;