import { Amount } from '../../commonStateTypes/amount'; import { FetchState, FetchStateAndError, FetchedState, ID } from '../../commonStateTypes/common'; import { Recommendation } from '../../commonStateTypes/recommendationBase'; import { AccountBase } from '../../entity/account/accountState'; import { ClassBase } from '../../entity/class/classState'; import { CustomerBase } from '../../entity/customer/customerState'; import { EntityType } from '../../entity/genericEntity/entity'; import { ProjectBase } from '../../entity/project/projectState'; import { Transaction } from '../../entity/transaction/stateTypes/transaction'; import { TransactionID } from '../../entity/transaction/stateTypes/transactionID'; import { TransactionCategory } from '../../entity/transaction/stateTypes/transactionType'; import { VendorBase } from '../../entity/vendor/vendorState'; import { EntityRecommendationKey } from '../recommendation/recommendationState'; import { TransactionDetailLineItemData, TransactionDetailLocalData } from './transactionDetailTypes'; export declare const getTransactionDetailKey: (transactionId: TransactionID) => `${string}_expense` | `${string}_check` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`; export type TransactionDetailKey = ReturnType; export declare const getZeniTransactionDetailKey: (transactionId: TransactionID) => `${string}_expense` | `${string}_check` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`; export type ZeniTransactionDetailKey = ReturnType; export declare const getThirdPartyIdFromTransactionId: (transactionId: TransactionID) => string; /** * Returns actual QBO transaction ID. * @param zeniGeneratedId zeni transaciton Id in the form of tran_: * @returns retruns the actual QBO transaction Id. * @note in case if the given transaction id itself is QBO id, the it just passes it back. */ export declare const getActualTransactionID: (zeniGeneratedId: string) => string; export declare function getAllLinkedTransactions(transaction: Transaction): TransactionID[]; export interface SupportedTransactionDetail extends FetchedState { deleteStatusByAttachmentName: Record; transactionDetailLocalData: TransactionDetailLocalData; transactionDetailUpdateStatus: { bulkUpdateStatus: FetchStateAndError; consolidatedFetchState: FetchState; markAsNotMiscatStatus: FetchStateAndError; recommendationUpdateStatus: FetchStateAndError; saveStatus: FetchStateAndError; }; attachments?: AccountingProviderAttachment; isUpdateNotAllowed?: boolean; transactionId?: TransactionID; } interface AccountingProviderAttachment { blobs: []; fetchState: FetchStateAndError; } export declare const initialSupportedTransactionDetail: SupportedTransactionDetail; export interface TransactionDetailState { accountingProviderAttachment: { attachmentDataByID: Record; fetchState: FetchState; }; transactionDetailById: Record; } export interface TransactionLineUpdates { account?: AccountBase; amount?: Amount; class?: ClassBase; customer?: CustomerBase; lineDescription?: string; postingType?: TransactionCategory; postingTypeName?: string; project?: ProjectBase; recommendation?: Recommendation[]; vendor?: VendorBase; } export interface TransactionUpdates { updatesByLineId: Record; customerId?: ID; documentId?: string; memo?: string; project?: ProjectBase; vendorId?: ID; } export interface EntityRelatedRecommendationUpdates { entityId: ID | null; entityType: EntityType; isBulkUpdate: boolean; recommendations: Recommendation; updatedEntityId: ID | undefined; vendorName?: string; } export interface TransactionSaveUpdates { anyBulkUpdates: boolean; entityRelatedUpdates: Record; markAsMiscatUpdates: boolean; updates: TransactionUpdates; addedLines?: TransactionDetailLineItemData[]; deletedLineIds?: ID[]; } export {};