import type { CreateAccountRequest, UpdateAccountRequest, AccountQuery } from "@prodobit/types"; import type { Database } from "@prodobit/database"; export declare class AccountService { private db; constructor(db: Database); /** * List accounts with filters */ listAccounts(tenantId: string, filters?: Partial): Promise<{ id: string; tenantId: string; code: string; name: string; nameEn: string | null; parentAccountId: string | null; accountType: string; level: number; isGroup: boolean; isActive: boolean; currency: string; isBankAccount: boolean; isCashAccount: boolean; isReconcilable: boolean; requiresCostCenter: boolean; requiresProject: boolean; defaultTaxRateId: string | null; reportCategory: string | null; cashFlowCategory: string | null; description: string | null; notes: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }[]>; /** * Get account hierarchy (tree structure) */ getAccountHierarchy(tenantId: string): Promise; /** * Get a single account by ID */ getAccount(accountId: string, tenantId: string): Promise<{ id: string; tenantId: string; code: string; name: string; nameEn: string | null; parentAccountId: string | null; accountType: string; level: number; isGroup: boolean; isActive: boolean; currency: string; isBankAccount: boolean; isCashAccount: boolean; isReconcilable: boolean; requiresCostCenter: boolean; requiresProject: boolean; defaultTaxRateId: string | null; reportCategory: string | null; cashFlowCategory: string | null; description: string | null; notes: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Get account by code */ getAccountByCode(code: string, tenantId: string): Promise<{ id: string; tenantId: string; code: string; name: string; nameEn: string | null; parentAccountId: string | null; accountType: string; level: number; isGroup: boolean; isActive: boolean; currency: string; isBankAccount: boolean; isCashAccount: boolean; isReconcilable: boolean; requiresCostCenter: boolean; requiresProject: boolean; defaultTaxRateId: string | null; reportCategory: string | null; cashFlowCategory: string | null; description: string | null; notes: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Create a new account */ createAccount(tenantId: string, data: CreateAccountRequest, userId: string): Promise<{ id: string; name: string; description: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; tenantId: string; code: string; isActive: boolean; currency: string; notes: string | null; nameEn: string | null; accountType: string; level: number; isGroup: boolean; reportCategory: string | null; cashFlowCategory: string | null; parentAccountId: string | null; isBankAccount: boolean; isCashAccount: boolean; isReconcilable: boolean; requiresCostCenter: boolean; requiresProject: boolean; defaultTaxRateId: string | null; }>; /** * Update an existing account */ updateAccount(accountId: string, tenantId: string, data: UpdateAccountRequest): Promise<{ id: string; tenantId: string; code: string; name: string; nameEn: string | null; parentAccountId: string | null; accountType: string; level: number; isGroup: boolean; isActive: boolean; currency: string; isBankAccount: boolean; isCashAccount: boolean; isReconcilable: boolean; requiresCostCenter: boolean; requiresProject: boolean; defaultTaxRateId: string | null; reportCategory: string | null; cashFlowCategory: string | null; description: string | null; notes: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Delete an account (soft delete) */ deleteAccount(accountId: string, tenantId: string): Promise<{ id: string; tenantId: string; code: string; name: string; nameEn: string | null; parentAccountId: string | null; accountType: string; level: number; isGroup: boolean; isActive: boolean; currency: string; isBankAccount: boolean; isCashAccount: boolean; isReconcilable: boolean; requiresCostCenter: boolean; requiresProject: boolean; defaultTaxRateId: string | null; reportCategory: string | null; cashFlowCategory: string | null; description: string | null; notes: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Check if account code exists */ accountCodeExists(tenantId: string, code: string, excludeAccountId?: string): Promise; /** * Get available CoA templates */ getCoaTemplates(): Promise<{ id: string; code: string; name: string; country: string | null; description: string | null; isSystem: boolean; insertedAt: Date; }[]>; /** * Initialize chart of accounts from template */ initializeFromTemplate(tenantId: string, templateCode: string, userId: string): Promise<{ template: { id: string; code: string; name: string; country: string | null; description: string | null; isSystem: boolean; insertedAt: Date; }; accountsCreated: number; }>; } //# sourceMappingURL=AccountService.d.ts.map