import { AccountBase } from '../../../entity/account/accountState'; import { ClassBase } from '../../../entity/class/classState'; import { InvoicingPlanPayload } from '../../../entity/invoicing/plan/planPayload'; import { InvoicingProductPayload } from '../../../entity/invoicing/product/productPayload'; import { ZeniAPIResponse } from '../../../responsePayload'; import { InvoicingCatalogItemFormLocalData } from './editInvoicingCatalogItemDetailViewState'; export type SaveInvoicingCatalogItemResponse = ZeniAPIResponse; /** * Resolves the QuickBooks ids the pickers submit back to the entities they name. * The payload carries the whole account and class, so the ids alone are not * enough; `saveInvoicingCatalogItemEpic` builds this from the shared lists. */ export interface InvoicingCatalogAccountingLookup { accountByQboId: (qboId: string) => AccountBase | undefined; classByQboId: (qboId: string) => ClassBase | undefined; } /** The accounting fields any price-point form collects. */ export interface InvoicingCatalogAccountingFields { accountingCategory: string; accountingCode: string; sku: string; } export declare const buildAccountingDetail: (subFamily: InvoicingCatalogAccountingFields, lookup: InvoicingCatalogAccountingLookup) => Record | undefined; /** * Build the parent catalog-item request body from the form draft. Creates omit * both parent and price point IDs; edits retain returned price point IDs. */ export declare const localDataToSaveInvoicingCatalogItemPayload: (localData: InvoicingCatalogItemFormLocalData, isCreate: boolean, lookup: InvoicingCatalogAccountingLookup) => Record; export type RunInvoicingCatalogPlanActionResponse = ZeniAPIResponse; export type RunInvoicingCatalogProductActionResponse = ZeniAPIResponse; export type InvoicingCatalogItemDetailResponse = ZeniAPIResponse;