import { Amount } from '../../../commonStateTypes/amount'; import { ID } from '../../../commonStateTypes/common'; import { COTLineItemTracking } from '../../../commonStateTypes/recommendationBaseCore'; import { AccountBase } from '../../account/accountState'; import { ClassBase } from '../../class/classState'; import { CustomerBase } from '../../customer/customerState'; import { ProjectBase } from '../../project/projectState'; import { VendorBase } from '../../vendor/vendorState'; import { TransactionID } from './transactionID'; import { TransactionCategory, TransactionType } from './transactionType'; export interface AISummary { cot: string[]; reasoning: string; recommendationHash: string; recommendationType: string; } export interface AISummaries { categoryAISummaries: AISummary[]; classAISummaries: AISummary[]; vendorAISummaries: AISummary[]; } export interface TransactionLineBase { amount: Amount; id: ID; lineDescription: string; platformLineDetailType: PlatformLineDetailType; type: LineType; aiSummaries?: AISummaries; categorizationStatus?: CategorizationStatusType; recipientAmount?: Amount; reviewPendingReasons?: string[]; } export interface LinkedTransactionLine extends TransactionLineBase { linkedTransactions: TransactionID[]; } export interface TransactionWithAccountAndClassLine extends TransactionLineBase { account: AccountBase; billable: BillableStatus; isCategoryMiscategorized: boolean; isClassMiscategorized: boolean; class?: ClassBase; customer?: CustomerBase; project?: ProjectBase; vendor?: VendorBase; } export interface TransactionWithAccountAndClassLineWithCOTTracking extends TransactionWithAccountAndClassLine { cotViewingFlags?: COTLineItemTracking; } export interface TransactionWithProductOrServiceLine extends TransactionWithAccountAndClassLine { item: ProductOrService; lineDetailType: PlatformLineDetailType; } export interface JournalEntryTransactionLine extends TransactionWithAccountAndClassLine { lineTransactionType: TransactionType; postingType: TransactionCategory; postingTypeName: string; } export interface TransactionInfoLine extends TransactionLineBase { lineDetailType: PlatformLineDetailType; } export type Line = TransactionWithProductOrServiceLine | JournalEntryTransactionLine | TransactionWithAccountAndClassLine | TransactionInfoLine | LinkedTransactionLine | TransactionLineBase; export type LineWithCOTTracking = Line & { cotViewingFlags?: COTLineItemTracking; }; export declare const LINE_TYPE_LINKED: "linked_transaction_line"; export type LineType = typeof LINE_TYPE_LINKED | 'transaction_with_account_and_class_line' | 'transaction_with_product_or_service_line' | 'journal_entry_transaction_line' | 'transaction_info_line' | 'transaction_line_base'; export default Line; export interface ProductOrService { itemId: string; itemName: string; quantity: number; unitPrice: Amount; } export declare const toPlatformLineDetailType: (v: string) => "" | "sales_item_line_detail" | "account_based_expense_line_detail" | "item_based_expense_line_detail" | "journal_entry_line_detail" | "description_only_line_detail" | "sub_total_line_detail" | "deposit_line_detail" | "deposit_without_account_line_detail" | "group_line_detail" | "discount_line_detail"; export type PlatformLineDetailType = ReturnType; export type BillableStatus = 'billable' | 'not_billable' | 'has_been_billed'; export declare const CATEGORIZATION_STATUSES: readonly ["auto_categorized", "auto_reviewed", "pending_review", "review_complete"]; export declare const toCategorizationStatusType: (v: string) => "auto_categorized" | "auto_reviewed" | "pending_review" | "review_complete"; export type CategorizationStatusType = ReturnType;