import { ApiCompany } from "./ApiCompany"; import { ApiPerson } from "./ApiPerson"; import { ApiProduct } from "./ApiProduct"; type ApiDocItem = { id: string; batchSeries: { id: string; code: string; type: "L" | "S" } | null; productId: string; inputDepartmentId: string | null; outputDepartmentId: string; quantity: number; unitPrice: number; weight: { net: number; gross: number; }; }; type ApiDocPayt = { id: string; taxRate: number; agreementRate: number; agreementTacRate: number; companyTacRate: number; shouldUpdateFinancial: boolean; dueDate: string; groupingDescription: string; paymentMethodId: string; naturezaLancamentoId: string; agreementPersonId: string | null; financialPersonId: string | null; writeOffTypeId: string | null; cardholderName: string | null; cardAuthorizationNumber: string | null; cardUniqueSequentialNumber: string | null; checkNumber: string; days: number; daysInterval: number; daysForFirstInstallment: number; daysReceipt: number; installments: number; installmentsReceipt: number; titleNumber: number; amount: number; amountFees: number; amountTacAgreement: number; amountTacCompany: number; }; export type ApiDocument = { accessKey: string; id: string; number: string; inventoryBatchId: string; nfStatus: "N" | "A" | "C" | "D" | "I" | "R" | "S" | "E" | "X"; commDocStatus: string; purposeType: string; documentType: "C" | "F" | "N" | "O" | "S" | "T"; released: boolean; canceled: boolean; businessUnit: { id: string; code: string; description: string } | null; sellerCompanyCode: string; issuedAt: string; refDate: string; paymentRefDate: string; operationId: string; customerId: string; items: ApiDocItem[]; originEntityName: string | null; billing: string | null; payments: ApiDocPayt[]; note: string; messages: { id: string; code: string; description: string }[]; }; export type ApiDocumentExpanded = Omit & { items: (ApiDocItem & { product: ApiProduct | null })[]; sellerCompany: ApiCompany | null; customer: ApiPerson | null; };