@classytic/ledger 0.5.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { _ as TaxMetadata, a as Cents, c as DateRange, d as JournalType, f as MainType, g as TaxDetail, h as StatementType, i as CategoryKey, l as EntryState, m as ObjectId, n as CashFlowCategory, o as Currency, p as NormalBalance, s as DateOption, t as AccountType, u as JournalItem, v as TotalAccountOp } from "./core-BkGjuVZj.mjs";
2
2
  import { S as isValidCategory, a as getJournalTypeCodes, b as isBalanceSheet, c as CURRENCIES, d as isValidCurrency, f as CATEGORIES, i as getJournalType, l as getCurrency, n as JOURNAL_TYPES, o as isValidJournalType, p as CATEGORY_KEYS, r as getCustomJournalTypes, s as registerJournalType, t as JOURNAL_CODES, u as getMinorUnit, x as isIncomeStatement, y as getNormalBalance } from "./journals-C50E9mpo.mjs";
3
- import { a as TaxReportLine, i as TaxCodesByRegion, n as CountryPackInput, o as TaxReportTemplate, r as TaxCode, s as defineCountryPack, t as CountryPack } from "./index-GmfEFxVn.mjs";
3
+ import { i as defineCountryPack, n as CountryPackInput, r as JournalTemplate, t as CountryPack } from "./index-BX8miYdu.mjs";
4
4
  import { _ as PopulatedJournalEntry, a as exportToCsv, h as FlatJournalRow, i as quickbooksFieldMap, m as ExportFieldMap, p as ExportField, r as universalFieldMap, t as flattenJournalEntries } from "./index-D1ZjgVxn.mjs";
5
5
  import { Money, abs, add, allocate, equals, format, formatPlain, fromDecimal, isNegative, isPositive, isValid, isZero, max, min, multiply, negate, parseCents, percentage, round, splitTaxExclusive, splitTaxInclusive, subtract, toDecimal } from "./money.mjs";
6
- import { $ as AgedBucketConfig, A as BudgetVsActualReport, B as IncomeStatementReport, C as DimensionBreakdownReport, D as generateCashFlow, F as BalanceSheetReport, G as TaxReport, H as ReportAccount, I as CashFlowReport, J as TrialBalanceRow, K as TaxReturnSummary, L as CashFlowSection, M as generateBudgetVsActual, O as BudgetVsActualOptions, P as generateBalanceSheet, Q as AgedBalanceRow, R as GeneralLedgerAccount, S as DimensionBreakdownParams, T as generateDimensionBreakdown, U as ReportCategory, V as LedgerEntry, W as ReportGroup, X as AgedBalanceParams, Y as AgedBalanceOptions, Z as AgedBalanceReport, a as RevaluationReport, b as reopenFiscalPeriod, c as RevaluationRate, d as computeRevaluation, et as DEFAULT_BUCKETS, h as generateGeneralLedger, i as RevaluationParams, j as BudgetVsActualRow, k as BudgetVsActualParams, l as RevaluationResult, n as generateTrialBalance, nt as Logger, o as generateRevaluation, p as generateIncomeStatement, q as TrialBalanceReport, r as RevaluationOptions, rt as defaultLogger, s as AccountForeignBalance, tt as generateAgedBalance, u as buildRevaluationEntry, w as DimensionBreakdownRow, x as DimensionBreakdownOptions, y as closeFiscalPeriod, z as GeneralLedgerReport } from "./trial-balance-BZ7yOOFD.mjs";
7
- import { c as dateLockPlugin, i as fiscalLockPlugin, n as idempotencyPlugin, o as doubleEntryPlugin } from "./idempotency.plugin-WcQLZU9n.mjs";
6
+ import { $ as AgedBalanceParams, A as generateDimensionBreakdown, B as BalanceSheetReport, D as DimensionBreakdownParams, E as DimensionBreakdownOptions, F as BudgetVsActualReport, G as IncomeStatementReport, H as CashFlowSection, I as BudgetVsActualRow, J as ReportCategory, K as LedgerEntry, L as generateBudgetVsActual, M as generateCashFlow, N as BudgetVsActualOptions, O as DimensionBreakdownReport, P as BudgetVsActualParams, Q as AgedBalanceOptions, T as reopenFiscalPeriod, U as GeneralLedgerAccount, V as CashFlowReport, W as GeneralLedgerReport, X as TrialBalanceReport, Y as ReportGroup, Z as TrialBalanceRow, a as RevaluationReport, at as Logger, b as generateGeneralLedger, c as RevaluationRate, d as computeRevaluation, et as AgedBalanceReport, f as PartnerLedgerLine, g as generatePartnerLedger, h as PartnerLedgerReport, i as RevaluationParams, it as generateAgedBalance, k as DimensionBreakdownRow, l as RevaluationResult, m as PartnerLedgerParams, n as generateTrialBalance, nt as AgedBucketConfig, o as generateRevaluation, ot as defaultLogger, p as PartnerLedgerOptions, q as ReportAccount, r as RevaluationOptions, rt as DEFAULT_BUCKETS, s as AccountForeignBalance, tt as AgedBalanceRow, u as buildRevaluationEntry, v as generateIncomeStatement, w as closeFiscalPeriod, z as generateBalanceSheet } from "./trial-balance-DTc8kzTD.mjs";
7
+ import { A as OpenItem, C as AccountRepository, D as JournalItemRef, E as JournalEntryRepository, F as SeedOptions, I as SeedResult, M as ReconciliationRepository, N as ReverseOptions, O as JournalRepository, P as ReverseResult, S as creditLimitPlugin, T as BulkCreateResult, _ as FxRealizationPluginOptions, a as dailyLockPlugin, b as doubleEntryPlugin, c as periodResolver, d as LockAccountSelector, f as LockHit, g as idempotencyPlugin, i as FiscalLockPluginOptions, j as PostOptions, k as MatchInput, l as createLockPlugin, m as LockResolverContext, n as watermarkResolver, o as fiscalLockPlugin, p as LockResolver, r as DailyLockPluginOptions, s as PeriodResolverOptions, t as WatermarkResolverOptions, u as CreateLockPluginOptions, v as fxRealizationPlugin, w as BulkCreateInput, x as CreditLimitPluginOptions } from "./index-Bl0_ak5w.mjs";
8
8
  import { ClientSession, Connection, Model } from "mongoose";
9
9
  import { PaginationConfig, PluginType, Repository } from "@classytic/mongokit";
10
10
 
@@ -16,6 +16,7 @@ interface LedgerRepositoryPlugins {
16
16
  fiscalPeriod?: PluginType[];
17
17
  budget?: PluginType[];
18
18
  reconciliation?: PluginType[];
19
+ journal?: PluginType[];
19
20
  }
20
21
  /** Pagination caps per repository. Omit a key to use mongokit defaults. */
21
22
  interface LedgerPaginationConfig {
@@ -24,6 +25,7 @@ interface LedgerPaginationConfig {
24
25
  fiscalPeriod?: PaginationConfig;
25
26
  budget?: PaginationConfig;
26
27
  reconciliation?: PaginationConfig;
28
+ journal?: PaginationConfig;
27
29
  }
28
30
  /** Multi-tenant configuration */
29
31
  interface MultiTenantConfig {
@@ -101,6 +103,7 @@ interface ModelNames {
101
103
  fiscalPeriod?: string;
102
104
  budget?: string;
103
105
  reconciliation?: string;
106
+ journal?: string;
104
107
  }
105
108
  /** Main engine configuration */
106
109
  interface AccountingEngineConfig {
@@ -118,6 +121,7 @@ interface AccountingEngineConfig {
118
121
  fiscalPeriod?: SchemaOptions;
119
122
  budget?: SchemaOptions;
120
123
  reconciliation?: SchemaOptions;
124
+ journal?: SchemaOptions;
121
125
  };
122
126
  /** Country pack providing account types, tax codes, and templates */
123
127
  country: CountryPack;
@@ -159,6 +163,7 @@ interface LedgerModels {
159
163
  FiscalPeriod: Model<unknown>;
160
164
  Budget: Model<unknown>;
161
165
  Reconciliation: Model<unknown>;
166
+ Journal: Model<unknown>;
162
167
  }
163
168
  interface ResolvedModelNames {
164
169
  account: string;
@@ -166,110 +171,11 @@ interface ResolvedModelNames {
166
171
  fiscalPeriod: string;
167
172
  budget: string;
168
173
  reconciliation: string;
174
+ journal: string;
169
175
  }
170
176
  declare function resolveModelNames(overrides?: ModelNames): ResolvedModelNames;
171
- /**
172
- * Create (or reuse) all ledger models on the given connection.
173
- *
174
- * If a model with the same name is already registered on the connection,
175
- * the existing model is reused — this allows multiple engine instances
176
- * to share models and prevents "OverwriteModelError".
177
- */
178
177
  declare function createModels(connection: Connection, config: AccountingEngineConfig): LedgerModels;
179
178
  //#endregion
180
- //#region src/types/repositories.d.ts
181
- interface PostOptions {
182
- session?: ClientSession | null;
183
- /** Actor performing this operation (required when strictness.requireActor is enabled) */
184
- actorId?: unknown;
185
- }
186
- interface ReverseOptions extends PostOptions {
187
- /** Date for the reversal entry (defaults to now) */
188
- reversalDate?: Date;
189
- }
190
- interface SeedOptions {
191
- session?: ClientSession | null;
192
- }
193
- interface SeedResult {
194
- created: number;
195
- skipped: number;
196
- }
197
- interface BulkCreateInput {
198
- accountTypeCode?: string;
199
- accountNumber?: string;
200
- name?: string;
201
- active?: boolean;
202
- isCashAccount?: boolean;
203
- }
204
- interface BulkCreateResult {
205
- summary: {
206
- total: number;
207
- created: number;
208
- skipped: number;
209
- errors: number;
210
- };
211
- created: Array<Record<string, unknown>>;
212
- skipped: Array<Record<string, unknown>>;
213
- errors: Array<Record<string, unknown>>;
214
- }
215
- interface ReverseResult {
216
- original: Record<string, unknown>;
217
- reversal: Record<string, unknown>;
218
- }
219
- interface ReconcileParams {
220
- accountId: unknown;
221
- journalEntryIds: unknown[];
222
- organizationId?: unknown;
223
- note?: string;
224
- session?: ClientSession;
225
- }
226
- /**
227
- * Journal Entry Repository — extends mongokit Repository with accounting domain methods.
228
- *
229
- * Inherits ALL Repository<TDoc> methods: create, getById, getAll, update,
230
- * delete, count, exists, distinct, aggregate, withTransaction, etc.
231
- */
232
- interface JournalEntryRepository<TDoc = unknown> extends Repository<TDoc> {
233
- /** Post an entry (draft → posted). Validates items, balance, and accounts. */
234
- post(id: unknown, orgId?: unknown, options?: PostOptions): Promise<Record<string, unknown>>;
235
- /** Unpost an entry (posted → draft). Resets state for re-editing. */
236
- unpost(id: unknown, orgId?: unknown, options?: PostOptions): Promise<Record<string, unknown>>;
237
- /** Archive a draft entry (draft → archived). Preserves audit trail. */
238
- archive(id: unknown, orgId?: unknown, options?: PostOptions): Promise<Record<string, unknown>>;
239
- /** Duplicate an entry as a new draft. Copies items, type, and label. */
240
- duplicate(id: unknown, orgId?: unknown, options?: PostOptions): Promise<Record<string, unknown>>;
241
- /** Reverse a posted entry. Creates mirror entry with flipped debits/credits. */
242
- reverse(id: unknown, orgId?: unknown, options?: ReverseOptions): Promise<ReverseResult>;
243
- }
244
- /**
245
- * Account Repository — extends mongokit Repository with seed and bulk operations.
246
- */
247
- interface AccountRepository<TDoc = unknown> extends Repository<TDoc> {
248
- /** Seed standard posting accounts for an org from the country pack. */
249
- seedAccounts(orgId: unknown, options?: SeedOptions): Promise<SeedResult>;
250
- /** Bulk create accounts with validation and skip-if-exists logic. */
251
- bulkCreate(accounts: BulkCreateInput[], orgId: unknown): Promise<BulkCreateResult>;
252
- }
253
- /**
254
- * Reconciliation Repository — extends mongokit Repository with bank reconciliation methods.
255
- */
256
- interface ReconciliationRepository<TDoc = unknown> extends Repository<TDoc> {
257
- /** Reconcile journal entries for a specific account. */
258
- reconcile(params: ReconcileParams): Promise<Record<string, unknown>>;
259
- /** Remove a reconciliation record. */
260
- unreconcile(params: {
261
- reconciliationId: unknown;
262
- organizationId?: unknown;
263
- }): Promise<{
264
- success: boolean;
265
- }>;
266
- /** Get unreconciled journal entries for an account. */
267
- getUnreconciled(params: {
268
- accountId: unknown;
269
- organizationId?: unknown;
270
- }): Promise<Record<string, unknown>[]>;
271
- }
272
- //#endregion
273
179
  //#region src/repositories/factory.d.ts
274
180
  interface LedgerRepositories {
275
181
  accounts: AccountRepository<unknown>;
@@ -277,6 +183,7 @@ interface LedgerRepositories {
277
183
  fiscalPeriods: Repository<unknown>;
278
184
  budgets: Repository<unknown>;
279
185
  reconciliations: ReconciliationRepository<unknown>;
186
+ journals: JournalRepository<unknown>;
280
187
  }
281
188
  /**
282
189
  * Build all ledger repositories with plugins + domain methods pre-wired.
@@ -349,23 +256,18 @@ interface IntrospectAPI {
349
256
  * Agents use this to discover what analytics they can run.
350
257
  */
351
258
  reports(): ReadonlyArray<ReportDescriptor>;
352
- /**
353
- * List tax codes — all of them, or filtered by region.
354
- */
355
- taxCodes(region?: string): ReadonlyArray<TaxCode>;
356
259
  /**
357
260
  * List fiscal periods for an organization.
358
261
  */
359
262
  fiscalPeriods(organizationId?: unknown, session?: ClientSession | null): Promise<FiscalPeriodSummary[]>;
360
263
  /**
361
264
  * A one-shot snapshot of everything an agent needs to start working:
362
- * accounts, journal types, reports, tax codes, fiscal periods.
265
+ * accounts, journal types, reports, fiscal periods.
363
266
  */
364
267
  catalog(organizationId?: unknown): Promise<{
365
268
  accounts: AccountSummary[];
366
269
  journalTypes: ReadonlyArray<JournalType>;
367
270
  reports: ReadonlyArray<ReportDescriptor>;
368
- taxCodes: ReadonlyArray<TaxCode>;
369
271
  fiscalPeriods: FiscalPeriodSummary[];
370
272
  }>;
371
273
  }
@@ -385,21 +287,6 @@ interface ActorContext {
385
287
  type AccountCode = string;
386
288
  /** Integer-cents amount. */
387
289
  type Cents$1 = number;
388
- interface TaxInput {
389
- /** Tax code from the country pack (e.g. 'HST', 'GST', 'VAT') */
390
- readonly code: string;
391
- /**
392
- * Account type code where the tax amount posts.
393
- * For sales: the tax-payable account (e.g. '2300' HST Collected).
394
- * For expenses: the tax-recoverable (ITC) account (e.g. '2400' HST Paid).
395
- */
396
- readonly account: AccountCode;
397
- /**
398
- * If true, `amount` is tax-inclusive and will be split into base + tax.
399
- * If false (default), `amount` is the tax-exclusive base and tax is added.
400
- */
401
- readonly inclusive?: boolean;
402
- }
403
290
  /**
404
291
  * Options passed to every record.* operation. Matches mongokit's
405
292
  * RepositoryContext shape so audit/observability plugins pick them up
@@ -424,14 +311,16 @@ interface RecordOptions {
424
311
  interface RecordSaleInput {
425
312
  /** Transaction date */
426
313
  readonly date: Date;
427
- /** Tax-exclusive sale amount in integer cents (unless `tax.inclusive` is true) */
314
+ /** Sale amount in integer cents. Tax, if any, is the caller's responsibility
315
+ * — compute it with your tax engine (e.g. `@classytic/bd-tax`,
316
+ * `@classytic/ca-tax`) and either pre-add it to `amount` + include a
317
+ * tax journal item via `record.adjustment`, or post the entry directly
318
+ * via `engine.repositories.journalEntries.create`. */
428
319
  readonly amount: Cents$1;
429
320
  /** Account that receives the money — either Cash or Accounts Receivable */
430
321
  readonly receivableAccount: AccountCode;
431
322
  /** Revenue account */
432
323
  readonly revenueAccount: AccountCode;
433
- /** Tax info — optional */
434
- readonly tax?: TaxInput;
435
324
  /** Free-text label / memo */
436
325
  readonly label?: string;
437
326
  /** Optional reference number override (otherwise auto-generated) */
@@ -443,14 +332,13 @@ interface RecordSaleInput {
443
332
  }
444
333
  interface RecordExpenseInput {
445
334
  readonly date: Date;
446
- /** Tax-exclusive expense amount in cents (unless `tax.inclusive` is true) */
335
+ /** Expense amount in integer cents. Tax is caller's responsibility — see
336
+ * `RecordSaleInput.amount` comment. */
447
337
  readonly amount: Cents$1;
448
338
  /** Expense category account (e.g. '6010' Rent) */
449
339
  readonly expenseAccount: AccountCode;
450
340
  /** Where the money came from — either Cash or Accounts Payable */
451
341
  readonly paidFromAccount: AccountCode;
452
- /** Tax info (recoverable input tax credit) */
453
- readonly tax?: TaxInput;
454
342
  readonly label?: string;
455
343
  readonly reference?: string;
456
344
  readonly dimensions?: Record<string, unknown>;
@@ -495,23 +383,25 @@ interface RecordAdjustmentInput {
495
383
  }
496
384
  interface RecordAPI {
497
385
  /**
498
- * Record a sale. Debits cash/AR, credits revenue, splits tax if provided.
386
+ * Record a sale. Debits cash/AR, credits revenue. Tax lines if needed —
387
+ * are the consumer's responsibility (compute via your tax engine and
388
+ * either add to `amount` or use `record.adjustment`).
499
389
  *
500
390
  * @example
501
391
  * ```typescript
502
392
  * await engine.record.sale(orgId, {
503
393
  * date: new Date('2025-04-01'),
504
- * amount: 10000, // $100.00 base
394
+ * amount: 10000, // $100.00 total
505
395
  * receivableAccount: '1001', // Cash
506
396
  * revenueAccount: '4010', // Service Revenue
507
- * tax: { code: 'HST', account: '2300' }, // 13% HST Collected
508
397
  * label: 'Invoice #INV-001',
509
398
  * });
510
399
  * ```
511
400
  */
512
401
  sale(organizationId: unknown, input: RecordSaleInput, options?: RecordOptions): Promise<unknown>;
513
402
  /**
514
- * Record an expense. Debits expense, credits cash/AP, splits input tax credit if provided.
403
+ * Record an expense. Debits expense, credits cash/AP. Tax is caller's
404
+ * responsibility — see `sale()`.
515
405
  */
516
406
  expense(organizationId: unknown, input: RecordExpenseInput, options?: RecordOptions): Promise<unknown>;
517
407
  /**
@@ -650,8 +540,6 @@ declare class AccountingEngine {
650
540
  isValidAccountType(code: string): boolean;
651
541
  /** Get account type definition by code */
652
542
  getAccountType(code: string): AccountType | undefined;
653
- /** Get tax codes for a region */
654
- getTaxCodesForRegion(region: string): TaxCode[];
655
543
  private _buildReports;
656
544
  }
657
545
  declare function createAccountingEngine(config: AccountingEngineConfig): AccountingEngine;
@@ -789,7 +677,12 @@ declare const Errors: {
789
677
  readonly notFound: (msg: string, fields?: ReadonlyArray<FieldError>) => AccountingError;
790
678
  readonly conflict: (msg: string, fields?: ReadonlyArray<FieldError>) => AccountingError;
791
679
  readonly immutable: (msg: string, fields?: ReadonlyArray<FieldError>) => AccountingError;
792
- readonly fiscal: (msg: string, fields?: ReadonlyArray<FieldError>) => AccountingError;
680
+ /**
681
+ * Period/scope lock violation. Replaces the old `fiscal` factory — use the
682
+ * `scope` argument to distinguish fiscal / tax / daily / bank / etc. The
683
+ * resulting error code is `PERIOD_LOCKED_{SCOPE}` (e.g. `PERIOD_LOCKED_FISCAL`).
684
+ */
685
+ readonly locked: (scope: string, msg: string, fields?: ReadonlyArray<FieldError>) => AccountingError;
793
686
  };
794
687
  //#endregion
795
688
  //#region src/utils/filter-builder.d.ts
@@ -871,4 +764,4 @@ interface PostingResult {
871
764
  idempotencyKeys?: string[];
872
765
  }
873
766
  //#endregion
874
- export { type AccountCode, type AccountForeignBalance, type AccountRepository, type AccountSummary, type AccountType, AccountingEngine, type AccountingEngineConfig, AccountingError, type ActorContext, type AgedBalanceOptions, type AgedBalanceParams, type AgedBalanceReport, type AgedBalanceRow, type AgedBucketConfig, type AuditConfig, type BalanceSheetReport, type BudgetVsActualOptions, type BudgetVsActualParams, type BudgetVsActualReport, type BudgetVsActualRow, type BulkCreateInput, type BulkCreateResult, CATEGORIES, CATEGORY_KEYS, CURRENCIES, type CashFlowCategory, type CashFlowReport, type CashFlowSection, type CategoryKey, type Cents, type CountryPack, type CountryPackInput, type Currency, DEFAULT_BUCKETS, type DateOption, type DateRange, type DimensionBreakdownOptions, type DimensionBreakdownParams, type DimensionBreakdownReport, type DimensionBreakdownRow, type DimensionDefinition, type EntryState, Errors, type ExportField, type ExportFieldMap, type FieldError, type FiscalPeriodSummary, type FlatJournalRow, type GeneralLedgerAccount, type GeneralLedgerReport, type IncomeStatementReport, type IntrospectAPI, JOURNAL_CODES, JOURNAL_TYPES, type JournalEntryRepository, type JournalItem, type JournalSchemaOptions, type JournalType, type LedgerEntry, type LedgerModels, type LedgerPaginationConfig, type LedgerRepositories, type LedgerRepositoryPlugins, type Logger, type MainType, type ModelNames, Money, type MultiCurrencyConfig, type MultiTenantConfig, type NormalBalance, type PopulatedJournalEntry, type PostOptions, type PostingContract, type PostingResult, type ReconcileParams, type ReconciliationRepository, type RecordAPI, type RecordAdjustmentInput, type RecordAdjustmentLine, type RecordExpenseInput, type RecordOptions, type RecordPaymentInput, type RecordSaleInput, type RecordTransferInput, type ReportAccount, type ReportCategory, type ReportDescriptor, type ReportGroup, type ResolvedModelNames, type RevaluationOptions, type RevaluationParams, type RevaluationRate, type RevaluationReport, type RevaluationResult, type ReverseOptions, type ReverseResult, type SchemaOptions, type SeedOptions, type SeedResult, type Cents$1 as SemanticCents, type SessionResult, type StatementType, type StrictnessConfig, type SubledgerJournalItem, type SubledgerPostingInput, type TaxCode, type TaxCodesByRegion, type TaxDetail, type TaxInput, type TaxMetadata, type TaxReport, type TaxReportLine, type TaxReportTemplate, type TaxReturnSummary, type TotalAccountOp, type TrialBalanceReport, type TrialBalanceRow, acquireSession, add, allocate, buildAccountTypeMap, buildDimensionFields, buildDimensionIndexes, buildItemFilters, buildRevaluationEntry, calculateTotal, closeFiscalPeriod, computeEndingBalance, computeRevaluation, createAccountingEngine, createModels, createRepositories, dateLockPlugin, defaultLogger, defineCountryPack, doubleEntryPlugin, exportToCsv, finalizeSession, fiscalLockPlugin, flattenJournalEntries, format, formatPlain, fromDecimal, generateAgedBalance, generateBalanceSheet, generateBudgetVsActual, generateCashFlow, generateDimensionBreakdown, generateGeneralLedger, generateIncomeStatement, generateRevaluation, generateTrialBalance, getCurrency, getCustomJournalTypes, getDateRange, getFiscalYearStart, getJournalType, getJournalTypeCodes, getMinorUnit, getNormalBalance, idempotencyPlugin, isBalanceSheet, isIncomeStatement, isValidCategory, isValidCurrency, isValidJournalType, isVirtualTaxAccount, multiply, parseCents, percentage, quickbooksFieldMap, registerJournalType, reopenFiscalPeriod, resolveModelNames, splitTaxExclusive, splitTaxInclusive, subtract, toDecimal, universalFieldMap };
767
+ export { type AccountCode, type AccountForeignBalance, type AccountRepository, type AccountSummary, type AccountType, AccountingEngine, type AccountingEngineConfig, AccountingError, type ActorContext, type AgedBalanceOptions, type AgedBalanceParams, type AgedBalanceReport, type AgedBalanceRow, type AgedBucketConfig, type AuditConfig, type BalanceSheetReport, type BudgetVsActualOptions, type BudgetVsActualParams, type BudgetVsActualReport, type BudgetVsActualRow, type BulkCreateInput, type BulkCreateResult, CATEGORIES, CATEGORY_KEYS, CURRENCIES, type CashFlowCategory, type CashFlowReport, type CashFlowSection, type CategoryKey, type Cents, type CountryPack, type CountryPackInput, type CreateLockPluginOptions, type CreditLimitPluginOptions, type Currency, DEFAULT_BUCKETS, type DailyLockPluginOptions, type DateOption, type DateRange, type DimensionBreakdownOptions, type DimensionBreakdownParams, type DimensionBreakdownReport, type DimensionBreakdownRow, type DimensionDefinition, type EntryState, Errors, type ExportField, type ExportFieldMap, type FieldError, type FiscalLockPluginOptions, type FiscalPeriodSummary, type FlatJournalRow, type FxRealizationPluginOptions, type GeneralLedgerAccount, type GeneralLedgerReport, type IncomeStatementReport, type IntrospectAPI, JOURNAL_CODES, JOURNAL_TYPES, type JournalEntryRepository, type JournalItem, type JournalItemRef, type JournalRepository, type JournalSchemaOptions, type JournalTemplate, type JournalType, type LedgerEntry, type LedgerModels, type LedgerPaginationConfig, type LedgerRepositories, type LedgerRepositoryPlugins, type LockAccountSelector, type LockHit, type LockResolver, type LockResolverContext, type Logger, type MainType, type MatchInput, type ModelNames, Money, type MultiCurrencyConfig, type MultiTenantConfig, type NormalBalance, type OpenItem, type PartnerLedgerLine, type PartnerLedgerOptions, type PartnerLedgerParams, type PartnerLedgerReport, type PeriodResolverOptions, type PopulatedJournalEntry, type PostOptions, type PostingContract, type PostingResult, type ReconciliationRepository, type RecordAPI, type RecordAdjustmentInput, type RecordAdjustmentLine, type RecordExpenseInput, type RecordOptions, type RecordPaymentInput, type RecordSaleInput, type RecordTransferInput, type ReportAccount, type ReportCategory, type ReportDescriptor, type ReportGroup, type ResolvedModelNames, type RevaluationOptions, type RevaluationParams, type RevaluationRate, type RevaluationReport, type RevaluationResult, type ReverseOptions, type ReverseResult, type SchemaOptions, type SeedOptions, type SeedResult, type Cents$1 as SemanticCents, type SessionResult, type StatementType, type StrictnessConfig, type SubledgerJournalItem, type SubledgerPostingInput, type TaxDetail, type TaxMetadata, type TotalAccountOp, type TrialBalanceReport, type TrialBalanceRow, type WatermarkResolverOptions, acquireSession, add, allocate, buildAccountTypeMap, buildDimensionFields, buildDimensionIndexes, buildItemFilters, buildRevaluationEntry, calculateTotal, closeFiscalPeriod, computeEndingBalance, computeRevaluation, createAccountingEngine, createLockPlugin, createModels, createRepositories, creditLimitPlugin, dailyLockPlugin, defaultLogger, defineCountryPack, doubleEntryPlugin, exportToCsv, finalizeSession, fiscalLockPlugin, flattenJournalEntries, format, formatPlain, fromDecimal, fxRealizationPlugin, generateAgedBalance, generateBalanceSheet, generateBudgetVsActual, generateCashFlow, generateDimensionBreakdown, generateGeneralLedger, generateIncomeStatement, generatePartnerLedger, generateRevaluation, generateTrialBalance, getCurrency, getCustomJournalTypes, getDateRange, getFiscalYearStart, getJournalType, getJournalTypeCodes, getMinorUnit, getNormalBalance, idempotencyPlugin, isBalanceSheet, isIncomeStatement, isValidCategory, isValidCurrency, isValidJournalType, isVirtualTaxAccount, multiply, parseCents, percentage, periodResolver, quickbooksFieldMap, registerJournalType, reopenFiscalPeriod, resolveModelNames, splitTaxExclusive, splitTaxInclusive, subtract, toDecimal, universalFieldMap, watermarkResolver };