@happyvertical/smrt-ledgers 0.51.32 → 0.51.33

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.ts CHANGED
@@ -1,717 +1,73 @@
1
- import { DatabaseInterface } from '@happyvertical/smrt-core/migrations';
2
- import { PromptDefinition } from '@happyvertical/smrt-prompts';
3
- import { ResolvedPromptAI } from '@happyvertical/smrt-prompts';
4
- import { SmrtClassOptions } from '@happyvertical/smrt-core';
5
- import { SmrtCollection } from '@happyvertical/smrt-core';
6
- import { SmrtHierarchical } from '@happyvertical/smrt-core';
7
- import { SmrtObject } from '@happyvertical/smrt-core';
8
-
9
- export declare class Account extends SmrtHierarchical {
10
- /**
11
- * Tenant ID for multi-tenancy support (nullable for global accounts)
12
- */
13
- tenantId: string | null;
14
- /**
15
- * Account number (e.g., "1000", "5030")
16
- */
17
- number: string;
18
- /**
19
- * Account name (e.g., "Cash", "Coffee Expense")
20
- */
21
- name: string;
22
- /**
23
- * Account description
24
- */
25
- description: string;
26
- /**
27
- * Account type - one of the 5 core types
28
- */
29
- type: AccountType;
30
- /**
31
- * Whether the account is active
32
- */
33
- active: boolean;
34
- /**
35
- * Extensible metadata
36
- */
37
- metadata: Record<string, unknown>;
38
- constructor(options?: AccountOptions);
39
- /**
40
- * Check if this is a top-level account (no parent)
41
- */
42
- isTopLevel(): boolean;
43
- /**
44
- * Check if this is a debit-normal account (Asset, Expense)
45
- * Debit-normal accounts increase with debits
46
- */
47
- isDebitNormal(): boolean;
48
- /**
49
- * Check if this is a credit-normal account (Liability, Equity, Revenue)
50
- * Credit-normal accounts increase with credits
51
- */
52
- isCreditNormal(): boolean;
53
- /**
54
- * Get full account path (e.g., "Assets > Current > Cash")
55
- */
56
- getFullPath(): Promise<string>;
57
- /**
58
- * Build tree node for this account and its children
59
- */
60
- toTreeNode(): Promise<AccountTreeNode>;
61
- /**
62
- * Get the current balance of this account
63
- */
64
- getBalance(asOfDate?: Date): Promise<number>;
65
- /**
66
- * Create a sub-account under this account
67
- */
68
- createChild(options: Omit<AccountOptions, 'parentId' | 'type'>): Promise<Account>;
69
- }
70
-
71
- export declare class AccountCollection extends SmrtCollection<Account> {
72
- static readonly _itemClass: typeof Account;
73
- /**
74
- * Find account by number
75
- *
76
- * @param number - Account number
77
- * @returns Account or null
78
- */
79
- findByNumber(number: string): Promise<Account | null>;
80
- /**
81
- * Find accounts by type
82
- *
83
- * @param type - Account type
84
- * @returns Array of accounts
85
- */
86
- findByType(type: AccountType): Promise<Account[]>;
87
- /**
88
- * Find all active accounts
89
- *
90
- * @returns Array of active accounts
91
- */
92
- findActive(): Promise<Account[]>;
93
- /**
94
- * Find top-level accounts (no parent)
95
- *
96
- * @returns Array of top-level accounts
97
- */
98
- findTopLevel(): Promise<Account[]>;
99
- /**
100
- * Find direct children of an account
101
- *
102
- * @param parentId - Parent account ID
103
- * @returns Array of child accounts
104
- */
105
- findChildren(parentId: string): Promise<Account[]>;
106
- /**
107
- * Get the complete account tree
108
- *
109
- * @returns AccountTree structure
110
- */
111
- getTree(): Promise<AccountTree>;
112
- /**
113
- * Get or create an account by number
114
- *
115
- * @param number - Account number
116
- * @param defaults - Default values if creating
117
- * @returns Account
118
- */
119
- getOrCreateByNumber(number: string, defaults?: Partial<{
120
- name: string;
121
- description: string;
122
- type: AccountType;
123
- parentId: string | null;
124
- }>): Promise<Account>;
125
- /**
126
- * Find accounts grouped by type
127
- *
128
- * @returns Record of type to accounts array
129
- */
130
- groupByType(): Promise<Record<AccountType, Account[]>>;
131
- /**
132
- * Get all descendants of an account recursively
133
- *
134
- * @param accountId - Account ID
135
- * @returns Array of all descendant accounts
136
- */
137
- getDescendants(accountId: string): Promise<Account[]>;
138
- /**
139
- * Find all accounts belonging to a specific tenant
140
- *
141
- * @param tenantId - Tenant ID
142
- * @returns Array of tenant's accounts
143
- */
144
- findByTenant(tenantId: string): Promise<Account[]>;
145
- /**
146
- * Find all global accounts (no tenant association).
147
- *
148
- * Routes through the shared tenant-global helper so it does not throw under
149
- * an active tenant context (an explicit `tenant_id IS NULL` filter would be
150
- * flagged as an isolation violation). (#1600)
151
- *
152
- * @returns Array of global accounts
153
- */
154
- findGlobal(): Promise<Account[]>;
155
- /**
156
- * Find accounts for a tenant plus all global accounts.
157
- *
158
- * Fails closed if an active tenant context requests a different tenant's
159
- * rows; the admin/system path keeps the cross-tenant capability. (#1600)
160
- *
161
- * @param tenantId - Tenant ID
162
- * @returns Array of tenant's accounts and global accounts
163
- */
164
- findWithGlobals(tenantId: string): Promise<Account[]>;
165
- }
166
-
167
- /**
168
- * Options for creating an Account
169
- */
170
- export declare interface AccountOptions extends SmrtClassOptions {
171
- tenantId?: string | null;
172
- number?: string;
173
- name?: string;
174
- description?: string;
175
- type?: AccountType;
176
- parentId?: string | null;
177
- active?: boolean;
178
- metadata?: Record<string, unknown>;
179
- }
180
-
181
- /**
182
- * Account tree structure
183
- */
184
- export declare interface AccountTree {
185
- roots: AccountTreeNode[];
186
- }
187
-
188
- /**
189
- * Account tree node for hierarchical display
190
- */
191
- export declare interface AccountTreeNode {
192
- account: Account;
193
- children: AccountTreeNode[];
194
- }
195
-
196
- /**
197
- * The five core account types in double-entry accounting
198
- */
199
- export declare type AccountType = 'asset' | 'liability' | 'equity' | 'revenue' | 'expense';
200
-
201
- /**
202
- * Data for creating a complete journal with entries
203
- */
204
- export declare interface CreateJournalData {
205
- date?: Date;
206
- description: string;
207
- sourceModule?: string;
208
- sourceRef?: string | null;
209
- entries: JournalEntryData[];
210
- metadata?: Record<string, unknown>;
211
- }
212
-
213
- export declare class Journal extends SmrtObject {
214
- /**
215
- * Tenant ID for multi-tenancy support (nullable for global journals)
216
- */
217
- tenantId: string | null;
218
- /**
219
- * Journal number (auto-generated sequence, e.g., "JNL-0001")
220
- */
221
- number: string;
222
- /**
223
- * Transaction date
224
- */
225
- date: Date;
226
- /**
227
- * Description of the financial event
228
- */
229
- description: string;
230
- /**
231
- * Source module that created this journal (e.g., "smrt-commerce", "manual")
232
- */
233
- sourceModule: string;
234
- /**
235
- * External reference (e.g., order ID, invoice number)
236
- */
237
- sourceRef: string | null;
238
- /**
239
- * Journal status: draft, posted, voided
240
- */
241
- status: JournalStatus;
242
- /**
243
- * When the journal was posted (finalized)
244
- */
245
- postedAt: Date | null;
246
- /**
247
- * When the journal was voided
248
- */
249
- voidedAt: Date | null;
250
- /**
251
- * Reason for voiding (if voided)
252
- */
253
- voidReason: string | null;
254
- /**
255
- * Extensible metadata
256
- */
257
- metadata: Record<string, unknown>;
258
- constructor(options?: JournalOptions);
259
- /**
260
- * Check if journal is in draft status
261
- */
262
- isDraft(): boolean;
263
- /**
264
- * Check if journal has been posted
265
- */
266
- isPosted(): boolean;
267
- /**
268
- * Check if journal has been voided
269
- */
270
- isVoided(): boolean;
271
- /**
272
- * Check if journal can be modified
273
- */
274
- isEditable(): boolean;
275
- /**
276
- * Get all entries for this journal
277
- */
278
- getEntries(): Promise< JournalEntry[]>;
279
- /**
280
- * Calculate total debits
281
- */
282
- getTotalDebits(): Promise<number>;
283
- /**
284
- * Calculate total credits
285
- */
286
- getTotalCredits(): Promise<number>;
287
- /**
288
- * Check if journal entries are balanced (debits = credits)
289
- */
290
- isBalanced(): Promise<boolean>;
291
- /**
292
- * Add an entry to this journal (only if draft)
293
- */
294
- addEntry(data: JournalEntryData): Promise<void>;
295
- /**
296
- * Post the journal (finalize and make immutable)
297
- */
298
- post(): Promise<void>;
299
- /**
300
- * Void the journal (mark as cancelled with reason)
301
- */
302
- void(reason: string): Promise<void>;
303
- /**
304
- * AI-powered: Generate a summary of this journal.
305
- *
306
- * Uses the `smrtLedgers.journal.summarize` prompt registered via
307
- * `@happyvertical/smrt-prompts`, allowing tenant- or instance-level
308
- * overrides of the template, model, and parameters at runtime.
309
- *
310
- * Only non-PII journal fields (number, date, description, status, balanced
311
- * flag) plus aggregate totals and entry count are sent to the AI provider.
312
- * Internal foreign-key fields (tenantId, sourceRef, individual entry
313
- * account IDs) and the extensible `metadata` blob are intentionally
314
- * excluded.
315
- *
316
- * @returns Generated summary text
317
- */
318
- summarize(): Promise<string>;
319
- }
320
-
321
- export declare class JournalCollection extends SmrtCollection<Journal> {
322
- static readonly _itemClass: typeof Journal;
323
- /**
324
- * Generate next journal number
325
- *
326
- * Uses timestamp and random component to avoid collisions
327
- * in concurrent environments without relying on shared state.
328
- */
329
- private generateJournalNumber;
330
- /**
331
- * Find journal by number
332
- *
333
- * @param number - Journal number
334
- * @returns Journal or null
335
- */
336
- findByNumber(number: string): Promise<Journal | null>;
337
- /**
338
- * Find journals by date range
339
- *
340
- * @param start - Start date
341
- * @param end - End date
342
- * @returns Array of journals
343
- */
344
- findByDateRange(start: Date, end: Date): Promise<Journal[]>;
345
- /**
346
- * Find journals by source module
347
- *
348
- * @param sourceModule - Source module name
349
- * @returns Array of journals
350
- */
351
- findBySource(sourceModule: string): Promise<Journal[]>;
352
- /**
353
- * Find journals by status
354
- *
355
- * @param status - Journal status
356
- * @returns Array of journals
357
- */
358
- findByStatus(status: JournalStatus): Promise<Journal[]>;
359
- /**
360
- * Find draft journals
361
- *
362
- * @returns Array of draft journals
363
- */
364
- findDrafts(): Promise<Journal[]>;
365
- /**
366
- * Find posted journals
367
- *
368
- * @returns Array of posted journals
369
- */
370
- findPosted(): Promise<Journal[]>;
371
- /**
372
- * Create a complete journal with entries
373
- *
374
- * @param data - Journal data with entries
375
- * @returns Created journal
376
- */
377
- createWithEntries(data: CreateJournalData): Promise<Journal>;
378
- /**
379
- * Post a journal by ID
380
- *
381
- * @param journalId - Journal ID
382
- * @returns Posted journal
383
- */
384
- post(journalId: string): Promise<Journal>;
385
- /**
386
- * Void a journal by ID
387
- *
388
- * @param journalId - Journal ID
389
- * @param reason - Reason for voiding
390
- * @returns Voided journal
391
- */
392
- void(journalId: string, reason: string): Promise<Journal>;
393
- /**
394
- * Find journals by source reference
395
- *
396
- * @param sourceRef - External reference
397
- * @returns Array of journals
398
- */
399
- findBySourceRef(sourceRef: string): Promise<Journal[]>;
400
- /**
401
- * Get journals for a specific month
402
- *
403
- * @param year - Year
404
- * @param month - Month (1-12)
405
- * @returns Array of journals
406
- */
407
- findByMonth(year: number, month: number): Promise<Journal[]>;
408
- /**
409
- * Find all journals belonging to a specific tenant
410
- *
411
- * @param tenantId - Tenant ID
412
- * @returns Array of tenant's journals
413
- */
414
- findByTenant(tenantId: string): Promise<Journal[]>;
415
- /**
416
- * Find all global journals (no tenant association).
417
- *
418
- * Routes through the shared tenant-global helper so it does not throw under
419
- * an active tenant context. (#1600)
420
- *
421
- * @returns Array of global journals
422
- */
423
- findGlobal(): Promise<Journal[]>;
424
- /**
425
- * Find journals for a tenant plus all global journals.
426
- *
427
- * Fails closed if an active tenant context requests a different tenant's
428
- * rows; the admin/system path keeps the cross-tenant capability. (#1600)
429
- *
430
- * @param tenantId - Tenant ID
431
- * @returns Array of tenant's journals and global journals
432
- */
433
- findWithGlobals(tenantId: string): Promise<Journal[]>;
434
- }
435
-
436
- export declare class JournalEntry extends SmrtObject {
437
- /**
438
- * Tenant ID for multi-tenancy support (nullable for global entries)
439
- */
440
- tenantId: string | null;
441
- /**
442
- * Parent journal ID (required)
443
- */
444
- journalId: string;
445
- /**
446
- * Account ID (required)
447
- */
448
- accountId: string;
449
- /**
450
- * Debit amount (left side)
451
- */
452
- debit: number;
453
- /**
454
- * Credit amount (right side)
455
- */
456
- credit: number;
457
- /**
458
- * Currency code (e.g., "USD", "CAD", "EUR")
459
- */
460
- currency: string;
461
- /**
462
- * Exchange rate to base currency
463
- */
464
- exchangeRate: number;
465
- /**
466
- * Line memo/description
467
- */
468
- memo: string;
469
- /**
470
- * Extensible metadata
471
- */
472
- metadata: Record<string, unknown>;
473
- constructor(options?: JournalEntryOptions);
474
- /**
475
- * Validate entry before save
476
- */
477
- protected validateBeforeSave(): Promise<void>;
478
- /**
479
- * Check if this is a debit entry
480
- */
481
- isDebit(): boolean;
482
- /**
483
- * Check if this is a credit entry
484
- */
485
- isCredit(): boolean;
486
- /**
487
- * Get the entry amount (positive value regardless of debit/credit)
488
- */
489
- getAmount(): number;
490
- /**
491
- * Get the amount in base currency
492
- */
493
- getBaseAmount(): number;
494
- /**
495
- * Get the parent journal
496
- */
497
- getJournal(): Promise< Journal | null>;
498
- /**
499
- * Get the account
500
- */
501
- getAccount(): Promise< Account | null>;
502
- /**
503
- * Get a formatted description of this entry
504
- */
505
- getDescription(): Promise<string>;
506
- }
507
-
508
- export declare class JournalEntryCollection extends SmrtCollection<JournalEntry> {
509
- static readonly _itemClass: typeof JournalEntry;
510
- /**
511
- * Find entries by journal
512
- *
513
- * @param journalId - Journal ID
514
- * @returns Array of entries
515
- */
516
- findByJournal(journalId: string): Promise<JournalEntry[]>;
517
- /**
518
- * Find entries by account
519
- *
520
- * @param accountId - Account ID
521
- * @returns Array of entries
522
- */
523
- findByAccount(accountId: string): Promise<JournalEntry[]>;
524
- /**
525
- * Get account balance
526
- *
527
- * For debit-normal accounts (Asset, Expense): balance = debits - credits
528
- * For credit-normal accounts (Liability, Equity, Revenue): balance = credits - debits
529
- *
530
- * @param accountId - Account ID
531
- * @param asOfDate - Optional date to calculate balance as of
532
- * @returns Account balance
533
- */
534
- getAccountBalance(accountId: string, asOfDate?: Date): Promise<number>;
535
- /**
536
- * Get trial balance
537
- *
538
- * @param asOfDate - Optional date for trial balance
539
- * @returns Array of trial balance rows
540
- */
541
- getTrialBalance(asOfDate?: Date): Promise<TrialBalanceRow[]>;
542
- /**
543
- * Get total debits and credits for a date range
544
- *
545
- * @param start - Start date
546
- * @param end - End date
547
- * @returns Object with totalDebits and totalCredits
548
- */
549
- getTotalsForDateRange(start: Date, end: Date): Promise<{
550
- totalDebits: number;
551
- totalCredits: number;
552
- }>;
553
- /**
554
- * Get entries for multiple accounts
555
- *
556
- * @param accountIds - Array of account IDs
557
- * @returns Array of entries
558
- */
559
- findByAccounts(accountIds: string[]): Promise<JournalEntry[]>;
560
- /**
561
- * Get the running balance for an account (list of entries with running total)
562
- *
563
- * @param accountId - Account ID
564
- * @returns Array of entries with running balance
565
- */
566
- getAccountLedger(accountId: string): Promise<Array<{
567
- entry: JournalEntry;
568
- runningBalance: number;
569
- }>>;
570
- /**
571
- * Find all journal entries belonging to a specific tenant
572
- *
573
- * @param tenantId - Tenant ID
574
- * @returns Array of tenant's journal entries
575
- */
576
- findByTenant(tenantId: string): Promise<JournalEntry[]>;
577
- /**
578
- * Find all global journal entries (no tenant association).
579
- *
580
- * Routes through the shared tenant-global helper so it does not throw under
581
- * an active tenant context. (#1600)
582
- *
583
- * @returns Array of global journal entries
584
- */
585
- findGlobal(): Promise<JournalEntry[]>;
586
- /**
587
- * Find journal entries for a tenant plus all global entries.
588
- *
589
- * Fails closed if an active tenant context requests a different tenant's
590
- * rows; the admin/system path keeps the cross-tenant capability. (#1600)
591
- *
592
- * @param tenantId - Tenant ID
593
- * @returns Array of tenant's entries and global entries
594
- */
595
- findWithGlobals(tenantId: string): Promise<JournalEntry[]>;
596
- }
597
-
598
- /**
599
- * Entry data for creating journal entries
600
- */
601
- export declare interface JournalEntryData {
602
- accountId: string;
603
- debit?: number;
604
- credit?: number;
605
- currency?: string;
606
- exchangeRate?: number;
607
- memo?: string;
608
- }
609
-
610
- /**
611
- * Options for creating a JournalEntry
612
- */
613
- export declare interface JournalEntryOptions extends SmrtClassOptions {
614
- tenantId?: string | null;
615
- journalId?: string;
616
- accountId?: string;
617
- debit?: number;
618
- credit?: number;
619
- currency?: string;
620
- exchangeRate?: number;
621
- memo?: string;
622
- metadata?: Record<string, unknown>;
623
- }
624
-
625
- /**
626
- * Options for creating a Journal
627
- */
628
- export declare interface JournalOptions extends SmrtClassOptions {
629
- tenantId?: string | null;
630
- number?: string;
631
- date?: Date;
632
- description?: string;
633
- sourceModule?: string;
634
- sourceRef?: string | null;
635
- status?: JournalStatus;
636
- postedAt?: Date | null;
637
- voidedAt?: Date | null;
638
- voidReason?: string | null;
639
- metadata?: Record<string, unknown>;
640
- }
641
-
642
- /**
643
- * Journal status lifecycle
644
- */
645
- export declare type JournalStatus = 'draft' | 'posted' | 'voided';
646
-
647
- export declare const LEDGER_ACCOUNTS_TABLE = "ledger_accounts";
648
-
649
- export declare const LEDGER_ACCOUNTS_TABLE_MOVE = "@happyvertical/smrt-ledgers:ledger-accounts-table:v1";
650
-
651
- export declare class LedgerAccountsTableMoveError extends Error {
652
- constructor(message: string);
653
- }
654
-
655
- export declare interface LedgerAccountsTableMoveOptions {
656
- backfillName?: string;
657
- packageName?: string;
658
- /** PostgreSQL `lock_timeout`, milliseconds (default 30000). */
659
- lockTimeout?: number;
660
- /** PostgreSQL `statement_timeout`, milliseconds (default 60000). */
661
- statementTimeout?: number;
662
- }
663
-
664
- export declare interface LedgerAccountsTableMovePlan {
665
- /** Whether a legacy `accounts` table with ledger columns exists. */
666
- legacyTable: boolean;
667
- /** Ledger rows still in `accounts` that this migration would move. */
668
- pending: number;
669
- /** Messaging rows that stay in `accounts`. */
670
- messagingRows: number;
671
- }
672
-
673
- export declare interface LedgerAccountsTableMoveResult {
674
- ran: boolean;
675
- moved: number;
676
- /** Rows (messaging accounts) left in `accounts`. */
677
- remainingLegacyRows: number;
678
- /** `table.column` foreign keys detached from `accounts`. */
679
- detachedForeignKeys: string[];
680
- }
681
-
682
- export declare const LEGACY_ACCOUNTS_TABLE = "accounts";
683
-
684
- /**
685
- * Move ledger accounts from `accounts` into `ledger_accounts` in one
686
- * transaction under an exclusive lock. Operator-invoked and idempotent: a
687
- * rerun, or a database that never had ledger rows in `accounts`, is a no-op.
688
- */
689
- export declare function migrateLedgerAccountsTable(db: DatabaseInterface, options?: LedgerAccountsTableMoveOptions): Promise<LedgerAccountsTableMoveResult>;
690
-
691
- /**
692
- * Inspect the legacy table without changing anything. Read-only portable SQL,
693
- * so it also reports what a SQLite database would need moved.
694
- */
695
- export declare function planLedgerAccountsTableMove(db: DatabaseInterface): Promise<LedgerAccountsTableMovePlan>;
696
-
697
- export declare function promptMessageOptions(ai: ResolvedPromptAI): {
698
- maxTokens?: number | undefined;
699
- temperature?: number | undefined;
700
- model?: string | undefined;
701
- };
702
-
703
- export declare const smrtLedgersJournalSummarizePrompt: PromptDefinition;
704
-
705
- /**
706
- * A row in the trial balance report
707
- */
708
- export declare interface TrialBalanceRow {
709
- accountId: string;
710
- accountNumber: string;
711
- accountName: string;
712
- accountType: AccountType;
713
- debitBalance: number;
714
- creditBalance: number;
715
- }
716
-
717
- export { }
1
+ /**
2
+ * @happyvertical/smrt-ledgers
3
+ *
4
+ * Double-entry accounting ledger for the SMRT framework.
5
+ *
6
+ * This package provides models for managing a general ledger with proper
7
+ * double-entry accounting: every journal must balance (debits = credits).
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import {
12
+ * Account,
13
+ * AccountCollection,
14
+ * Journal,
15
+ * JournalCollection,
16
+ * JournalEntry,
17
+ * JournalEntryCollection
18
+ * } from '@happyvertical/smrt-ledgers';
19
+ *
20
+ * // Create collections
21
+ * const accounts = await AccountCollection.create({
22
+ * db: { type: 'sqlite', url: 'ledger.db' }
23
+ * });
24
+ * const journals = await JournalCollection.create({
25
+ * db: { type: 'sqlite', url: 'ledger.db' }
26
+ * });
27
+ *
28
+ * // Create chart of accounts
29
+ * const cash = await accounts.create({
30
+ * number: '1000',
31
+ * name: 'Cash',
32
+ * type: 'asset'
33
+ * });
34
+ * await cash.save();
35
+ *
36
+ * const revenue = await accounts.create({
37
+ * number: '4000',
38
+ * name: 'Sales Revenue',
39
+ * type: 'revenue'
40
+ * });
41
+ * await revenue.save();
42
+ *
43
+ * // Create a balanced journal entry (IDs guaranteed after save())
44
+ * const journal = await journals.createWithEntries({
45
+ * description: 'Cash sale',
46
+ * entries: [
47
+ * { accountId: cash.id!, debit: 100 },
48
+ * { accountId: revenue.id!, credit: 100 }
49
+ * ]
50
+ * });
51
+ *
52
+ * // Post the journal (finalize it)
53
+ * await journal.post();
54
+ *
55
+ * // Get account balance
56
+ * const cashBalance = await cash.getBalance();
57
+ * console.log(`Cash balance: $${cashBalance}`);
58
+ * ```
59
+ *
60
+ * @packageDocumentation
61
+ */
62
+ import './__smrt-register__.js';
63
+ import './prompts.js';
64
+ export { AccountCollection } from './collections/Accounts';
65
+ export { JournalEntryCollection } from './collections/JournalEntries';
66
+ export { JournalCollection } from './collections/Journals';
67
+ export { LEDGER_ACCOUNTS_TABLE, LEDGER_ACCOUNTS_TABLE_MOVE, LEGACY_ACCOUNTS_TABLE, LedgerAccountsTableMoveError, type LedgerAccountsTableMoveOptions, type LedgerAccountsTableMovePlan, type LedgerAccountsTableMoveResult, migrateLedgerAccountsTable, planLedgerAccountsTableMove, } from './migrations/ledger-accounts-table';
68
+ export { Account } from './models/Account';
69
+ export { Journal } from './models/Journal';
70
+ export { JournalEntry } from './models/JournalEntry';
71
+ export { promptMessageOptions, smrtLedgersJournalSummarizePrompt, } from './prompts';
72
+ export type { AccountOptions, AccountTree, AccountTreeNode, AccountType, CreateJournalData, JournalEntryData, JournalEntryOptions, JournalOptions, JournalStatus, TrialBalanceRow, } from './types';
73
+ //# sourceMappingURL=index.d.ts.map