import { Amount } from '../../../commonStateTypes/amount'; import { ID } from '../../../commonStateTypes/common'; import { BillTransactionDetailKey } from '../../../view/spendManagement/billPay/billDetailView/billDetailViewState'; import { AccountTypeSubConfigCodeKeyType, BillPaymentConfigCodeType, BillPaymentSubConfigCodeType } from '../../../view/spendManagement/billPay/billPayConfig/billPayConfigState'; import { ZeniDate } from '../../../zeniDayJS'; import { VendorTransaction } from '../../transaction/stateTypes/vendorTransaction'; import { InternationalTransferFeeBearerPaymentMethod } from './internationalTransferFeeBearerPaymentMethod'; export interface BillTransaction extends VendorTransaction { billPayInfo: BillPayInfo; candidateVendorName: string; createdBy: ID; deletionInfo: DeletionInfo; entityApprovalId: ID; isDeleted: boolean; isRecurring: boolean; paymentProcessingTotalFee: Amount; qboClassId: ID; recipientTotalAmount: Amount; transactionReferenceId: ID; updateTime: ZeniDate; bookCloseDate?: ZeniDate; bulkProcessingDetail?: BulkProcessingDetail; classId?: ID; className?: string; lastUpdatedByUserId?: ID; recurringBillConfigId?: ID; recurringBillInstance?: number; totalAmountInUSD?: Amount; totalAmountWithFeesInUSD?: Amount; } export interface BillPayInfo { billPaymentMethodType: BillPaymentMethod; billPaymentRefundStatus: BillPaymentRefundStatus; billPaymentStatus: BillPaymentStatus; billPaymentStatusMessage: string; billStatus: BillStatus; fromAccount: FromBillAccount; isCancelled: boolean; isCollectToAccountInfoFromVendorContact: boolean; stage: BillStage; stageMessage: string; toAccount: BillAccount; actualDepositDate?: ZeniDate; billPaymentStatusUpdateTime?: ZeniDate; billStageUpdateTime?: ZeniDate; expectedDepositDate?: ZeniDate; internationalTransferFeeBearerPaymentMethod?: InternationalTransferFeeBearerPaymentMethod; isRefundComplete?: boolean; isRefundInitiated?: boolean; outsideZeniTransactionPaymentMode?: OutsideZeniPaymentModeType; paymentDate?: ZeniDate; refundCompletionTime?: ZeniDate; refundInitiationTime?: ZeniDate; scheduledDate?: ZeniDate; toAccountVendorEmail?: string; } export interface BillStage { code: BillStageCodeType; name: string; } export interface BillPaymentStatus { description: string; name: string; summary: string; code?: BillPaymentStatusCodeType; descriptionCode?: BillPaymentStatusDescriptionCodeType; summaryCode?: BillPaymentStatusSummaryCodeType; } export interface BillPaymentRefundStatus { description: string; name: string; summary: string; code?: BillPaymentRefundStatusCodeType; } export interface BillStatus { code: BillStatusCodeType; description: string; name: string; summary: string; descriptionCode?: BillStatusSummaryCodeType; summaryCode?: BillStatusSummaryCodeType; } export interface BillPaymentMethod { code: BillPaymentConfigCodeType; name: string; subCode: BillPaymentSubConfigCodeType; } export interface BillAccount { billAccountHolderType?: BillAccountHolderType; billAccountId?: ID; billAccountType?: BillAccountType; } export interface FromBillAccount extends Omit { billAccountType?: AccountTypeSubConfigCodeKeyType; } export interface BillTransactionState { transactionById: Record; } export interface DeletionInfo { deletedByUserName?: string; deletionSource?: DeletionSourceType; } export interface BulkProcessingDetail { type: BulkProcessingStateType; error?: { code: string; message: string; }; inProgressMessage?: string; } declare const toBillStageCodeType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft"; export type BillStageCodeType = ReturnType; declare const toBillPaymentStatusCodeType: (v: string) => "failed" | "cancelled" | "paid" | "returned" | "processing" | "posted" | "pending_vendor_action" | "awaiting_to_be_marked_as_paid" | "mark_as_paid"; export type BillPaymentStatusCodeType = ReturnType; declare const toBillPaymentRefundStatusCodeType: (v: string) => "failed" | "completed" | "cancelled" | "returned" | "processing"; export type BillPaymentRefundStatusCodeType = ReturnType; declare const toBillStatusCodeType: (v: string) => "approved" | "rejected" | "pending_approval" | "initiated"; export type BillStatusCodeType = ReturnType; declare const toBillStatusSummaryCodeType: (v: string) => "rejected" | "approval_in_progress"; export type BillStatusSummaryCodeType = ReturnType; declare const toBillPaymentStatusSummaryCodeType: (v: string) => "pending_vendor_action" | "awaiting_to_be_marked_as_paid" | "mark_as_paid" | "preparing_for_payment" | "error_processing" | "bill_cancelled" | "insufficient_funds" | "issue_with_bill_payment" | "paid_via_ach"; export type BillPaymentStatusSummaryCodeType = ReturnType; declare const toBillPaymentStatusDescriptionCodeType: (v: string) => "pending_vendor_action" | "awaiting_to_be_marked_as_paid" | "mark_as_paid" | "preparing_for_payment" | "preparing_for_payment_without_expected_deposit_date" | "destination_bank_account_closed" | "destination_bank_declined_payment" | "invalid_bank_account" | "error_processing" | "funds_arrived" | "bill_cancelled" | "insufficient_funds"; export type BillPaymentStatusDescriptionCodeType = ReturnType; export declare const toBillAccountType: (v: string) => "deposit_account" | "payment_account" | "bank_account" | "payment_instrument"; type BillAccountType = ReturnType; export declare const toBillAccountHolderType: (v: string) => "vendor" | "customer"; type BillAccountHolderType = ReturnType; export declare const toDeletionSourceType: (v: string) => "zeni_dashboard" | "qbo" | "netsuite"; export type DeletionSourceType = ReturnType; export declare const toBulkProcessingStateType: (v: string) => "error" | "processed" | "processing" | "processing_queued"; export type BulkProcessingStateType = ReturnType; export declare const toOutsideZeniPaymentModeType: (v: string) => "check" | "ach" | "cash" | "ach_same_day" | "us_domestic_wire" | "international_wire" | "other"; export type OutsideZeniPaymentModeType = ReturnType; export {};