@happyvertical/smrt-ledgers 0.56.0 → 0.56.2
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/AGENTS.md +9 -0
- package/dist/collections/JournalEntries.d.ts +30 -0
- package/dist/collections/JournalEntries.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +62 -4
- package/dist/smrt-knowledge.json +200 -922
- package/package.json +5 -5
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-ledgers",
|
|
6
|
-
"packageVersion": "0.56.
|
|
6
|
+
"packageVersion": "0.56.2",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
12
|
-
"agents": "
|
|
10
|
+
"manifest": "f66d780ebdf5d9c5df206e95aad3beab3a71db98c426482dab2d07b2d1ed3d51",
|
|
11
|
+
"packageJson": "95156dfd5d9cfeb23198a11fd27f84017f208c9a24882f5cb447ddbe048af261",
|
|
12
|
+
"agents": "a1bece3d7fcf3112b2b5193fdc51cf4438ba8446af146d1c8ac1c95c8ed2f0c8"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
15
15
|
".",
|
|
@@ -155,102 +155,6 @@
|
|
|
155
155
|
}
|
|
156
156
|
],
|
|
157
157
|
"surfaces": [
|
|
158
|
-
{
|
|
159
|
-
"kind": "api",
|
|
160
|
-
"name": "accounts.findByNumber",
|
|
161
|
-
"operation": "findByNumber",
|
|
162
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
163
|
-
"path": "/accounts/findByNumber",
|
|
164
|
-
"method": "POST"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"kind": "api",
|
|
168
|
-
"name": "accounts.findByType",
|
|
169
|
-
"operation": "findByType",
|
|
170
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
171
|
-
"path": "/accounts/findByType",
|
|
172
|
-
"method": "POST"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"kind": "api",
|
|
176
|
-
"name": "accounts.findActive",
|
|
177
|
-
"operation": "findActive",
|
|
178
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
179
|
-
"path": "/accounts/findActive",
|
|
180
|
-
"method": "POST"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"kind": "api",
|
|
184
|
-
"name": "accounts.findTopLevel",
|
|
185
|
-
"operation": "findTopLevel",
|
|
186
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
187
|
-
"path": "/accounts/findTopLevel",
|
|
188
|
-
"method": "POST"
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"kind": "api",
|
|
192
|
-
"name": "accounts.findChildren",
|
|
193
|
-
"operation": "findChildren",
|
|
194
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
195
|
-
"path": "/accounts/findChildren",
|
|
196
|
-
"method": "POST"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"kind": "api",
|
|
200
|
-
"name": "accounts.getTree",
|
|
201
|
-
"operation": "getTree",
|
|
202
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
203
|
-
"path": "/accounts/getTree",
|
|
204
|
-
"method": "POST"
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"kind": "api",
|
|
208
|
-
"name": "accounts.getOrCreateByNumber",
|
|
209
|
-
"operation": "getOrCreateByNumber",
|
|
210
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
211
|
-
"path": "/accounts/getOrCreateByNumber",
|
|
212
|
-
"method": "POST"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"kind": "api",
|
|
216
|
-
"name": "accounts.groupByType",
|
|
217
|
-
"operation": "groupByType",
|
|
218
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
219
|
-
"path": "/accounts/groupByType",
|
|
220
|
-
"method": "POST"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"kind": "api",
|
|
224
|
-
"name": "accounts.getDescendants",
|
|
225
|
-
"operation": "getDescendants",
|
|
226
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
227
|
-
"path": "/accounts/getDescendants",
|
|
228
|
-
"method": "POST"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"kind": "api",
|
|
232
|
-
"name": "accounts.findByTenant",
|
|
233
|
-
"operation": "findByTenant",
|
|
234
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
235
|
-
"path": "/accounts/findByTenant",
|
|
236
|
-
"method": "POST"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"kind": "api",
|
|
240
|
-
"name": "accounts.findGlobal",
|
|
241
|
-
"operation": "findGlobal",
|
|
242
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
243
|
-
"path": "/accounts/findGlobal",
|
|
244
|
-
"method": "POST"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"kind": "api",
|
|
248
|
-
"name": "accounts.findWithGlobals",
|
|
249
|
-
"operation": "findWithGlobals",
|
|
250
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
251
|
-
"path": "/accounts/findWithGlobals",
|
|
252
|
-
"method": "POST"
|
|
253
|
-
},
|
|
254
158
|
{
|
|
255
159
|
"kind": "cli",
|
|
256
160
|
"name": "accountcollection_findByNumber",
|
|
@@ -322,77 +226,91 @@
|
|
|
322
226
|
"name": "accountcollection_findWithGlobals",
|
|
323
227
|
"operation": "findWithGlobals",
|
|
324
228
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
325
|
-
}
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"withheldSurfaces": [
|
|
326
232
|
{
|
|
327
|
-
"kind": "
|
|
328
|
-
"
|
|
329
|
-
"
|
|
233
|
+
"kind": "api",
|
|
234
|
+
"operation": "findActive",
|
|
235
|
+
"code": "not-included",
|
|
236
|
+
"reason": "not listed in api.include",
|
|
330
237
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
331
238
|
},
|
|
332
239
|
{
|
|
333
|
-
"kind": "
|
|
334
|
-
"
|
|
335
|
-
"
|
|
240
|
+
"kind": "api",
|
|
241
|
+
"operation": "findByNumber",
|
|
242
|
+
"code": "not-included",
|
|
243
|
+
"reason": "not listed in api.include",
|
|
336
244
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
337
245
|
},
|
|
338
246
|
{
|
|
339
|
-
"kind": "
|
|
340
|
-
"
|
|
341
|
-
"
|
|
247
|
+
"kind": "api",
|
|
248
|
+
"operation": "findByTenant",
|
|
249
|
+
"code": "not-included",
|
|
250
|
+
"reason": "not listed in api.include",
|
|
342
251
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
343
252
|
},
|
|
344
253
|
{
|
|
345
|
-
"kind": "
|
|
346
|
-
"
|
|
347
|
-
"
|
|
254
|
+
"kind": "api",
|
|
255
|
+
"operation": "findByType",
|
|
256
|
+
"code": "not-included",
|
|
257
|
+
"reason": "not listed in api.include",
|
|
348
258
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
349
259
|
},
|
|
350
260
|
{
|
|
351
|
-
"kind": "
|
|
352
|
-
"name": "accountcollection_findchildren",
|
|
261
|
+
"kind": "api",
|
|
353
262
|
"operation": "findChildren",
|
|
263
|
+
"code": "not-included",
|
|
264
|
+
"reason": "not listed in api.include",
|
|
354
265
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
355
266
|
},
|
|
356
267
|
{
|
|
357
|
-
"kind": "
|
|
358
|
-
"
|
|
359
|
-
"
|
|
268
|
+
"kind": "api",
|
|
269
|
+
"operation": "findGlobal",
|
|
270
|
+
"code": "not-included",
|
|
271
|
+
"reason": "not listed in api.include",
|
|
360
272
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
361
273
|
},
|
|
362
274
|
{
|
|
363
|
-
"kind": "
|
|
364
|
-
"
|
|
365
|
-
"
|
|
275
|
+
"kind": "api",
|
|
276
|
+
"operation": "findTopLevel",
|
|
277
|
+
"code": "not-included",
|
|
278
|
+
"reason": "not listed in api.include",
|
|
366
279
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
367
280
|
},
|
|
368
281
|
{
|
|
369
|
-
"kind": "
|
|
370
|
-
"
|
|
371
|
-
"
|
|
282
|
+
"kind": "api",
|
|
283
|
+
"operation": "findWithGlobals",
|
|
284
|
+
"code": "not-included",
|
|
285
|
+
"reason": "not listed in api.include",
|
|
372
286
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
373
287
|
},
|
|
374
288
|
{
|
|
375
|
-
"kind": "
|
|
376
|
-
"name": "accountcollection_getdescendants",
|
|
289
|
+
"kind": "api",
|
|
377
290
|
"operation": "getDescendants",
|
|
291
|
+
"code": "not-included",
|
|
292
|
+
"reason": "not listed in api.include",
|
|
378
293
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
379
294
|
},
|
|
380
295
|
{
|
|
381
|
-
"kind": "
|
|
382
|
-
"
|
|
383
|
-
"
|
|
296
|
+
"kind": "api",
|
|
297
|
+
"operation": "getOrCreateByNumber",
|
|
298
|
+
"code": "not-included",
|
|
299
|
+
"reason": "not listed in api.include",
|
|
384
300
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
385
301
|
},
|
|
386
302
|
{
|
|
387
|
-
"kind": "
|
|
388
|
-
"
|
|
389
|
-
"
|
|
303
|
+
"kind": "api",
|
|
304
|
+
"operation": "getTree",
|
|
305
|
+
"code": "not-included",
|
|
306
|
+
"reason": "not listed in api.include",
|
|
390
307
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
391
308
|
},
|
|
392
309
|
{
|
|
393
|
-
"kind": "
|
|
394
|
-
"
|
|
395
|
-
"
|
|
310
|
+
"kind": "api",
|
|
311
|
+
"operation": "groupByType",
|
|
312
|
+
"code": "not-included",
|
|
313
|
+
"reason": "not listed in api.include",
|
|
396
314
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
397
315
|
}
|
|
398
316
|
],
|
|
@@ -421,7 +339,8 @@
|
|
|
421
339
|
"getAccountBalance",
|
|
422
340
|
"getAccountLedger",
|
|
423
341
|
"getTotalsForDateRange",
|
|
424
|
-
"getTrialBalance"
|
|
342
|
+
"getTrialBalance",
|
|
343
|
+
"listPostedMovements"
|
|
425
344
|
],
|
|
426
345
|
"methodSignatures": [
|
|
427
346
|
{
|
|
@@ -502,89 +421,17 @@
|
|
|
502
421
|
"asOfDate?: Date"
|
|
503
422
|
],
|
|
504
423
|
"returns": "Promise<TrialBalanceRow[]>"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "listPostedMovements",
|
|
427
|
+
"async": true,
|
|
428
|
+
"params": [
|
|
429
|
+
"options: PostedJournalMovementOptions"
|
|
430
|
+
],
|
|
431
|
+
"returns": "Promise<PostedJournalMovement[]>"
|
|
505
432
|
}
|
|
506
433
|
],
|
|
507
434
|
"surfaces": [
|
|
508
|
-
{
|
|
509
|
-
"kind": "api",
|
|
510
|
-
"name": "journalentries.findByJournal",
|
|
511
|
-
"operation": "findByJournal",
|
|
512
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
513
|
-
"path": "/journalentries/findByJournal",
|
|
514
|
-
"method": "POST"
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
"kind": "api",
|
|
518
|
-
"name": "journalentries.findByAccount",
|
|
519
|
-
"operation": "findByAccount",
|
|
520
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
521
|
-
"path": "/journalentries/findByAccount",
|
|
522
|
-
"method": "POST"
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
"kind": "api",
|
|
526
|
-
"name": "journalentries.getAccountBalance",
|
|
527
|
-
"operation": "getAccountBalance",
|
|
528
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
529
|
-
"path": "/journalentries/getAccountBalance",
|
|
530
|
-
"method": "POST"
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
"kind": "api",
|
|
534
|
-
"name": "journalentries.getTrialBalance",
|
|
535
|
-
"operation": "getTrialBalance",
|
|
536
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
537
|
-
"path": "/journalentries/getTrialBalance",
|
|
538
|
-
"method": "POST"
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
"kind": "api",
|
|
542
|
-
"name": "journalentries.getTotalsForDateRange",
|
|
543
|
-
"operation": "getTotalsForDateRange",
|
|
544
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
545
|
-
"path": "/journalentries/getTotalsForDateRange",
|
|
546
|
-
"method": "POST"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
"kind": "api",
|
|
550
|
-
"name": "journalentries.findByAccounts",
|
|
551
|
-
"operation": "findByAccounts",
|
|
552
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
553
|
-
"path": "/journalentries/findByAccounts",
|
|
554
|
-
"method": "POST"
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
"kind": "api",
|
|
558
|
-
"name": "journalentries.getAccountLedger",
|
|
559
|
-
"operation": "getAccountLedger",
|
|
560
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
561
|
-
"path": "/journalentries/getAccountLedger",
|
|
562
|
-
"method": "POST"
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
"kind": "api",
|
|
566
|
-
"name": "journalentries.findByTenant",
|
|
567
|
-
"operation": "findByTenant",
|
|
568
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
569
|
-
"path": "/journalentries/findByTenant",
|
|
570
|
-
"method": "POST"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"kind": "api",
|
|
574
|
-
"name": "journalentries.findGlobal",
|
|
575
|
-
"operation": "findGlobal",
|
|
576
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
577
|
-
"path": "/journalentries/findGlobal",
|
|
578
|
-
"method": "POST"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
"kind": "api",
|
|
582
|
-
"name": "journalentries.findWithGlobals",
|
|
583
|
-
"operation": "findWithGlobals",
|
|
584
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
585
|
-
"path": "/journalentries/findWithGlobals",
|
|
586
|
-
"method": "POST"
|
|
587
|
-
},
|
|
588
435
|
{
|
|
589
436
|
"kind": "cli",
|
|
590
437
|
"name": "journalentrycollection_findByJournal",
|
|
@@ -621,6 +468,12 @@
|
|
|
621
468
|
"operation": "findByAccounts",
|
|
622
469
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
623
470
|
},
|
|
471
|
+
{
|
|
472
|
+
"kind": "cli",
|
|
473
|
+
"name": "journalentrycollection_listPostedMovements",
|
|
474
|
+
"operation": "listPostedMovements",
|
|
475
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
476
|
+
},
|
|
624
477
|
{
|
|
625
478
|
"kind": "cli",
|
|
626
479
|
"name": "journalentrycollection_getAccountLedger",
|
|
@@ -644,67 +497,86 @@
|
|
|
644
497
|
"name": "journalentrycollection_findWithGlobals",
|
|
645
498
|
"operation": "findWithGlobals",
|
|
646
499
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
"withheldSurfaces": [
|
|
503
|
+
{
|
|
504
|
+
"kind": "api",
|
|
505
|
+
"operation": "findByAccount",
|
|
506
|
+
"code": "not-included",
|
|
507
|
+
"reason": "not listed in api.include",
|
|
508
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
647
509
|
},
|
|
648
510
|
{
|
|
649
|
-
"kind": "
|
|
650
|
-
"
|
|
651
|
-
"
|
|
511
|
+
"kind": "api",
|
|
512
|
+
"operation": "findByAccounts",
|
|
513
|
+
"code": "not-included",
|
|
514
|
+
"reason": "not listed in api.include",
|
|
652
515
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
653
516
|
},
|
|
654
517
|
{
|
|
655
|
-
"kind": "
|
|
656
|
-
"
|
|
657
|
-
"
|
|
518
|
+
"kind": "api",
|
|
519
|
+
"operation": "findByJournal",
|
|
520
|
+
"code": "not-included",
|
|
521
|
+
"reason": "not listed in api.include",
|
|
658
522
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
659
523
|
},
|
|
660
524
|
{
|
|
661
|
-
"kind": "
|
|
662
|
-
"
|
|
663
|
-
"
|
|
525
|
+
"kind": "api",
|
|
526
|
+
"operation": "findByTenant",
|
|
527
|
+
"code": "not-included",
|
|
528
|
+
"reason": "not listed in api.include",
|
|
664
529
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
665
530
|
},
|
|
666
531
|
{
|
|
667
|
-
"kind": "
|
|
668
|
-
"
|
|
669
|
-
"
|
|
532
|
+
"kind": "api",
|
|
533
|
+
"operation": "findGlobal",
|
|
534
|
+
"code": "not-included",
|
|
535
|
+
"reason": "not listed in api.include",
|
|
670
536
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
671
537
|
},
|
|
672
538
|
{
|
|
673
|
-
"kind": "
|
|
674
|
-
"
|
|
675
|
-
"
|
|
539
|
+
"kind": "api",
|
|
540
|
+
"operation": "findWithGlobals",
|
|
541
|
+
"code": "not-included",
|
|
542
|
+
"reason": "not listed in api.include",
|
|
676
543
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
677
544
|
},
|
|
678
545
|
{
|
|
679
|
-
"kind": "
|
|
680
|
-
"
|
|
681
|
-
"
|
|
546
|
+
"kind": "api",
|
|
547
|
+
"operation": "getAccountBalance",
|
|
548
|
+
"code": "not-included",
|
|
549
|
+
"reason": "not listed in api.include",
|
|
682
550
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
683
551
|
},
|
|
684
552
|
{
|
|
685
|
-
"kind": "
|
|
686
|
-
"name": "journalentrycollection_getaccountledger",
|
|
553
|
+
"kind": "api",
|
|
687
554
|
"operation": "getAccountLedger",
|
|
555
|
+
"code": "not-included",
|
|
556
|
+
"reason": "not listed in api.include",
|
|
688
557
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
689
558
|
},
|
|
690
559
|
{
|
|
691
|
-
"kind": "
|
|
692
|
-
"
|
|
693
|
-
"
|
|
560
|
+
"kind": "api",
|
|
561
|
+
"operation": "getTotalsForDateRange",
|
|
562
|
+
"code": "not-included",
|
|
563
|
+
"reason": "not listed in api.include",
|
|
694
564
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
695
565
|
},
|
|
696
566
|
{
|
|
697
|
-
"kind": "
|
|
698
|
-
"
|
|
699
|
-
"
|
|
567
|
+
"kind": "api",
|
|
568
|
+
"operation": "getTrialBalance",
|
|
569
|
+
"code": "not-included",
|
|
570
|
+
"reason": "not listed in api.include",
|
|
700
571
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
701
572
|
},
|
|
702
573
|
{
|
|
703
|
-
"kind": "
|
|
704
|
-
"
|
|
705
|
-
"
|
|
706
|
-
"
|
|
707
|
-
|
|
574
|
+
"kind": "api",
|
|
575
|
+
"operation": "listPostedMovements",
|
|
576
|
+
"code": "not-included",
|
|
577
|
+
"reason": "not listed in api.include",
|
|
578
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
579
|
+
}
|
|
708
580
|
],
|
|
709
581
|
"relationshipFeatures": [
|
|
710
582
|
"uuidColumns"
|
|
@@ -846,118 +718,6 @@
|
|
|
846
718
|
}
|
|
847
719
|
],
|
|
848
720
|
"surfaces": [
|
|
849
|
-
{
|
|
850
|
-
"kind": "api",
|
|
851
|
-
"name": "journals.findByNumber",
|
|
852
|
-
"operation": "findByNumber",
|
|
853
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
854
|
-
"path": "/journals/findByNumber",
|
|
855
|
-
"method": "POST"
|
|
856
|
-
},
|
|
857
|
-
{
|
|
858
|
-
"kind": "api",
|
|
859
|
-
"name": "journals.findByDateRange",
|
|
860
|
-
"operation": "findByDateRange",
|
|
861
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
862
|
-
"path": "/journals/findByDateRange",
|
|
863
|
-
"method": "POST"
|
|
864
|
-
},
|
|
865
|
-
{
|
|
866
|
-
"kind": "api",
|
|
867
|
-
"name": "journals.findBySource",
|
|
868
|
-
"operation": "findBySource",
|
|
869
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
870
|
-
"path": "/journals/findBySource",
|
|
871
|
-
"method": "POST"
|
|
872
|
-
},
|
|
873
|
-
{
|
|
874
|
-
"kind": "api",
|
|
875
|
-
"name": "journals.findByStatus",
|
|
876
|
-
"operation": "findByStatus",
|
|
877
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
878
|
-
"path": "/journals/findByStatus",
|
|
879
|
-
"method": "POST"
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
"kind": "api",
|
|
883
|
-
"name": "journals.findDrafts",
|
|
884
|
-
"operation": "findDrafts",
|
|
885
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
886
|
-
"path": "/journals/findDrafts",
|
|
887
|
-
"method": "POST"
|
|
888
|
-
},
|
|
889
|
-
{
|
|
890
|
-
"kind": "api",
|
|
891
|
-
"name": "journals.findPosted",
|
|
892
|
-
"operation": "findPosted",
|
|
893
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
894
|
-
"path": "/journals/findPosted",
|
|
895
|
-
"method": "POST"
|
|
896
|
-
},
|
|
897
|
-
{
|
|
898
|
-
"kind": "api",
|
|
899
|
-
"name": "journals.createWithEntries",
|
|
900
|
-
"operation": "createWithEntries",
|
|
901
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
902
|
-
"path": "/journals/createWithEntries",
|
|
903
|
-
"method": "POST"
|
|
904
|
-
},
|
|
905
|
-
{
|
|
906
|
-
"kind": "api",
|
|
907
|
-
"name": "journals.post",
|
|
908
|
-
"operation": "post",
|
|
909
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
910
|
-
"path": "/journals/post",
|
|
911
|
-
"method": "POST"
|
|
912
|
-
},
|
|
913
|
-
{
|
|
914
|
-
"kind": "api",
|
|
915
|
-
"name": "journals.void",
|
|
916
|
-
"operation": "void",
|
|
917
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
918
|
-
"path": "/journals/void",
|
|
919
|
-
"method": "POST"
|
|
920
|
-
},
|
|
921
|
-
{
|
|
922
|
-
"kind": "api",
|
|
923
|
-
"name": "journals.findBySourceRef",
|
|
924
|
-
"operation": "findBySourceRef",
|
|
925
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
926
|
-
"path": "/journals/findBySourceRef",
|
|
927
|
-
"method": "POST"
|
|
928
|
-
},
|
|
929
|
-
{
|
|
930
|
-
"kind": "api",
|
|
931
|
-
"name": "journals.findByMonth",
|
|
932
|
-
"operation": "findByMonth",
|
|
933
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
934
|
-
"path": "/journals/findByMonth",
|
|
935
|
-
"method": "POST"
|
|
936
|
-
},
|
|
937
|
-
{
|
|
938
|
-
"kind": "api",
|
|
939
|
-
"name": "journals.findByTenant",
|
|
940
|
-
"operation": "findByTenant",
|
|
941
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
942
|
-
"path": "/journals/findByTenant",
|
|
943
|
-
"method": "POST"
|
|
944
|
-
},
|
|
945
|
-
{
|
|
946
|
-
"kind": "api",
|
|
947
|
-
"name": "journals.findGlobal",
|
|
948
|
-
"operation": "findGlobal",
|
|
949
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
950
|
-
"path": "/journals/findGlobal",
|
|
951
|
-
"method": "POST"
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
"kind": "api",
|
|
955
|
-
"name": "journals.findWithGlobals",
|
|
956
|
-
"operation": "findWithGlobals",
|
|
957
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
958
|
-
"path": "/journals/findWithGlobals",
|
|
959
|
-
"method": "POST"
|
|
960
|
-
},
|
|
961
721
|
{
|
|
962
722
|
"kind": "cli",
|
|
963
723
|
"name": "journalcollection_findByNumber",
|
|
@@ -1041,89 +801,105 @@
|
|
|
1041
801
|
"name": "journalcollection_findWithGlobals",
|
|
1042
802
|
"operation": "findWithGlobals",
|
|
1043
803
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1044
|
-
}
|
|
804
|
+
}
|
|
805
|
+
],
|
|
806
|
+
"withheldSurfaces": [
|
|
1045
807
|
{
|
|
1046
|
-
"kind": "
|
|
1047
|
-
"
|
|
1048
|
-
"
|
|
808
|
+
"kind": "api",
|
|
809
|
+
"operation": "createWithEntries",
|
|
810
|
+
"code": "not-included",
|
|
811
|
+
"reason": "not listed in api.include",
|
|
1049
812
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1050
813
|
},
|
|
1051
814
|
{
|
|
1052
|
-
"kind": "
|
|
1053
|
-
"name": "journalcollection_findbydaterange",
|
|
815
|
+
"kind": "api",
|
|
1054
816
|
"operation": "findByDateRange",
|
|
817
|
+
"code": "not-included",
|
|
818
|
+
"reason": "not listed in api.include",
|
|
1055
819
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1056
820
|
},
|
|
1057
821
|
{
|
|
1058
|
-
"kind": "
|
|
1059
|
-
"
|
|
1060
|
-
"
|
|
822
|
+
"kind": "api",
|
|
823
|
+
"operation": "findByMonth",
|
|
824
|
+
"code": "not-included",
|
|
825
|
+
"reason": "not listed in api.include",
|
|
1061
826
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1062
827
|
},
|
|
1063
828
|
{
|
|
1064
|
-
"kind": "
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
829
|
+
"kind": "api",
|
|
830
|
+
"operation": "findByNumber",
|
|
831
|
+
"code": "not-included",
|
|
832
|
+
"reason": "not listed in api.include",
|
|
1067
833
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1068
834
|
},
|
|
1069
835
|
{
|
|
1070
|
-
"kind": "
|
|
1071
|
-
"
|
|
1072
|
-
"
|
|
836
|
+
"kind": "api",
|
|
837
|
+
"operation": "findBySource",
|
|
838
|
+
"code": "not-included",
|
|
839
|
+
"reason": "not listed in api.include",
|
|
1073
840
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1074
841
|
},
|
|
1075
842
|
{
|
|
1076
|
-
"kind": "
|
|
1077
|
-
"
|
|
1078
|
-
"
|
|
843
|
+
"kind": "api",
|
|
844
|
+
"operation": "findBySourceRef",
|
|
845
|
+
"code": "not-included",
|
|
846
|
+
"reason": "not listed in api.include",
|
|
1079
847
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1080
848
|
},
|
|
1081
849
|
{
|
|
1082
|
-
"kind": "
|
|
1083
|
-
"
|
|
1084
|
-
"
|
|
850
|
+
"kind": "api",
|
|
851
|
+
"operation": "findByStatus",
|
|
852
|
+
"code": "not-included",
|
|
853
|
+
"reason": "not listed in api.include",
|
|
1085
854
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1086
855
|
},
|
|
1087
856
|
{
|
|
1088
|
-
"kind": "
|
|
1089
|
-
"
|
|
1090
|
-
"
|
|
857
|
+
"kind": "api",
|
|
858
|
+
"operation": "findByTenant",
|
|
859
|
+
"code": "not-included",
|
|
860
|
+
"reason": "not listed in api.include",
|
|
1091
861
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1092
862
|
},
|
|
1093
863
|
{
|
|
1094
|
-
"kind": "
|
|
1095
|
-
"
|
|
1096
|
-
"
|
|
864
|
+
"kind": "api",
|
|
865
|
+
"operation": "findDrafts",
|
|
866
|
+
"code": "not-included",
|
|
867
|
+
"reason": "not listed in api.include",
|
|
1097
868
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1098
869
|
},
|
|
1099
870
|
{
|
|
1100
|
-
"kind": "
|
|
1101
|
-
"
|
|
1102
|
-
"
|
|
871
|
+
"kind": "api",
|
|
872
|
+
"operation": "findGlobal",
|
|
873
|
+
"code": "not-included",
|
|
874
|
+
"reason": "not listed in api.include",
|
|
1103
875
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1104
876
|
},
|
|
1105
877
|
{
|
|
1106
|
-
"kind": "
|
|
1107
|
-
"
|
|
1108
|
-
"
|
|
878
|
+
"kind": "api",
|
|
879
|
+
"operation": "findPosted",
|
|
880
|
+
"code": "not-included",
|
|
881
|
+
"reason": "not listed in api.include",
|
|
1109
882
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1110
883
|
},
|
|
1111
884
|
{
|
|
1112
|
-
"kind": "
|
|
1113
|
-
"
|
|
1114
|
-
"
|
|
885
|
+
"kind": "api",
|
|
886
|
+
"operation": "findWithGlobals",
|
|
887
|
+
"code": "not-included",
|
|
888
|
+
"reason": "not listed in api.include",
|
|
1115
889
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1116
890
|
},
|
|
1117
891
|
{
|
|
1118
|
-
"kind": "
|
|
1119
|
-
"
|
|
1120
|
-
"
|
|
892
|
+
"kind": "api",
|
|
893
|
+
"operation": "post",
|
|
894
|
+
"code": "not-included",
|
|
895
|
+
"reason": "not listed in api.include",
|
|
1121
896
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1122
897
|
},
|
|
1123
898
|
{
|
|
1124
|
-
"kind": "
|
|
1125
|
-
"
|
|
1126
|
-
"
|
|
899
|
+
"kind": "api",
|
|
900
|
+
"operation": "void",
|
|
901
|
+
"code": "not-included",
|
|
902
|
+
"reason": "not listed in api.include",
|
|
1127
903
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
1128
904
|
}
|
|
1129
905
|
],
|
|
@@ -2298,102 +2074,6 @@
|
|
|
2298
2074
|
}
|
|
2299
2075
|
],
|
|
2300
2076
|
"surfaces": [
|
|
2301
|
-
{
|
|
2302
|
-
"kind": "api",
|
|
2303
|
-
"name": "accounts.findByNumber",
|
|
2304
|
-
"operation": "findByNumber",
|
|
2305
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2306
|
-
"path": "/accounts/findByNumber",
|
|
2307
|
-
"method": "POST"
|
|
2308
|
-
},
|
|
2309
|
-
{
|
|
2310
|
-
"kind": "api",
|
|
2311
|
-
"name": "accounts.findByType",
|
|
2312
|
-
"operation": "findByType",
|
|
2313
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2314
|
-
"path": "/accounts/findByType",
|
|
2315
|
-
"method": "POST"
|
|
2316
|
-
},
|
|
2317
|
-
{
|
|
2318
|
-
"kind": "api",
|
|
2319
|
-
"name": "accounts.findActive",
|
|
2320
|
-
"operation": "findActive",
|
|
2321
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2322
|
-
"path": "/accounts/findActive",
|
|
2323
|
-
"method": "POST"
|
|
2324
|
-
},
|
|
2325
|
-
{
|
|
2326
|
-
"kind": "api",
|
|
2327
|
-
"name": "accounts.findTopLevel",
|
|
2328
|
-
"operation": "findTopLevel",
|
|
2329
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2330
|
-
"path": "/accounts/findTopLevel",
|
|
2331
|
-
"method": "POST"
|
|
2332
|
-
},
|
|
2333
|
-
{
|
|
2334
|
-
"kind": "api",
|
|
2335
|
-
"name": "accounts.findChildren",
|
|
2336
|
-
"operation": "findChildren",
|
|
2337
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2338
|
-
"path": "/accounts/findChildren",
|
|
2339
|
-
"method": "POST"
|
|
2340
|
-
},
|
|
2341
|
-
{
|
|
2342
|
-
"kind": "api",
|
|
2343
|
-
"name": "accounts.getTree",
|
|
2344
|
-
"operation": "getTree",
|
|
2345
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2346
|
-
"path": "/accounts/getTree",
|
|
2347
|
-
"method": "POST"
|
|
2348
|
-
},
|
|
2349
|
-
{
|
|
2350
|
-
"kind": "api",
|
|
2351
|
-
"name": "accounts.getOrCreateByNumber",
|
|
2352
|
-
"operation": "getOrCreateByNumber",
|
|
2353
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2354
|
-
"path": "/accounts/getOrCreateByNumber",
|
|
2355
|
-
"method": "POST"
|
|
2356
|
-
},
|
|
2357
|
-
{
|
|
2358
|
-
"kind": "api",
|
|
2359
|
-
"name": "accounts.groupByType",
|
|
2360
|
-
"operation": "groupByType",
|
|
2361
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2362
|
-
"path": "/accounts/groupByType",
|
|
2363
|
-
"method": "POST"
|
|
2364
|
-
},
|
|
2365
|
-
{
|
|
2366
|
-
"kind": "api",
|
|
2367
|
-
"name": "accounts.getDescendants",
|
|
2368
|
-
"operation": "getDescendants",
|
|
2369
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2370
|
-
"path": "/accounts/getDescendants",
|
|
2371
|
-
"method": "POST"
|
|
2372
|
-
},
|
|
2373
|
-
{
|
|
2374
|
-
"kind": "api",
|
|
2375
|
-
"name": "accounts.findByTenant",
|
|
2376
|
-
"operation": "findByTenant",
|
|
2377
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2378
|
-
"path": "/accounts/findByTenant",
|
|
2379
|
-
"method": "POST"
|
|
2380
|
-
},
|
|
2381
|
-
{
|
|
2382
|
-
"kind": "api",
|
|
2383
|
-
"name": "accounts.findGlobal",
|
|
2384
|
-
"operation": "findGlobal",
|
|
2385
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2386
|
-
"path": "/accounts/findGlobal",
|
|
2387
|
-
"method": "POST"
|
|
2388
|
-
},
|
|
2389
|
-
{
|
|
2390
|
-
"kind": "api",
|
|
2391
|
-
"name": "accounts.findWithGlobals",
|
|
2392
|
-
"operation": "findWithGlobals",
|
|
2393
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection",
|
|
2394
|
-
"path": "/accounts/findWithGlobals",
|
|
2395
|
-
"method": "POST"
|
|
2396
|
-
},
|
|
2397
2077
|
{
|
|
2398
2078
|
"kind": "cli",
|
|
2399
2079
|
"name": "accountcollection_findByNumber",
|
|
@@ -2467,180 +2147,28 @@
|
|
|
2467
2147
|
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2468
2148
|
},
|
|
2469
2149
|
{
|
|
2470
|
-
"kind": "
|
|
2471
|
-
"name": "
|
|
2472
|
-
"operation": "
|
|
2473
|
-
"objectName": "@happyvertical/smrt-ledgers:
|
|
2474
|
-
},
|
|
2475
|
-
{
|
|
2476
|
-
"kind": "mcp",
|
|
2477
|
-
"name": "accountcollection_findbytype",
|
|
2478
|
-
"operation": "findByType",
|
|
2479
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2150
|
+
"kind": "cli",
|
|
2151
|
+
"name": "journalentrycollection_findByJournal",
|
|
2152
|
+
"operation": "findByJournal",
|
|
2153
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2480
2154
|
},
|
|
2481
2155
|
{
|
|
2482
|
-
"kind": "
|
|
2483
|
-
"name": "
|
|
2484
|
-
"operation": "
|
|
2485
|
-
"objectName": "@happyvertical/smrt-ledgers:
|
|
2156
|
+
"kind": "cli",
|
|
2157
|
+
"name": "journalentrycollection_findByAccount",
|
|
2158
|
+
"operation": "findByAccount",
|
|
2159
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2486
2160
|
},
|
|
2487
2161
|
{
|
|
2488
|
-
"kind": "
|
|
2489
|
-
"name": "
|
|
2490
|
-
"operation": "
|
|
2491
|
-
"objectName": "@happyvertical/smrt-ledgers:
|
|
2162
|
+
"kind": "cli",
|
|
2163
|
+
"name": "journalentrycollection_getAccountBalance",
|
|
2164
|
+
"operation": "getAccountBalance",
|
|
2165
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2492
2166
|
},
|
|
2493
2167
|
{
|
|
2494
|
-
"kind": "
|
|
2495
|
-
"name": "
|
|
2496
|
-
"operation": "
|
|
2497
|
-
"objectName": "@happyvertical/smrt-ledgers:
|
|
2498
|
-
},
|
|
2499
|
-
{
|
|
2500
|
-
"kind": "mcp",
|
|
2501
|
-
"name": "accountcollection_gettree",
|
|
2502
|
-
"operation": "getTree",
|
|
2503
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2504
|
-
},
|
|
2505
|
-
{
|
|
2506
|
-
"kind": "mcp",
|
|
2507
|
-
"name": "accountcollection_getorcreatebynumber",
|
|
2508
|
-
"operation": "getOrCreateByNumber",
|
|
2509
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2510
|
-
},
|
|
2511
|
-
{
|
|
2512
|
-
"kind": "mcp",
|
|
2513
|
-
"name": "accountcollection_groupbytype",
|
|
2514
|
-
"operation": "groupByType",
|
|
2515
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2516
|
-
},
|
|
2517
|
-
{
|
|
2518
|
-
"kind": "mcp",
|
|
2519
|
-
"name": "accountcollection_getdescendants",
|
|
2520
|
-
"operation": "getDescendants",
|
|
2521
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2522
|
-
},
|
|
2523
|
-
{
|
|
2524
|
-
"kind": "mcp",
|
|
2525
|
-
"name": "accountcollection_findbytenant",
|
|
2526
|
-
"operation": "findByTenant",
|
|
2527
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2528
|
-
},
|
|
2529
|
-
{
|
|
2530
|
-
"kind": "mcp",
|
|
2531
|
-
"name": "accountcollection_findglobal",
|
|
2532
|
-
"operation": "findGlobal",
|
|
2533
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2534
|
-
},
|
|
2535
|
-
{
|
|
2536
|
-
"kind": "mcp",
|
|
2537
|
-
"name": "accountcollection_findwithglobals",
|
|
2538
|
-
"operation": "findWithGlobals",
|
|
2539
|
-
"objectName": "@happyvertical/smrt-ledgers:AccountCollection"
|
|
2540
|
-
},
|
|
2541
|
-
{
|
|
2542
|
-
"kind": "api",
|
|
2543
|
-
"name": "journalentries.findByJournal",
|
|
2544
|
-
"operation": "findByJournal",
|
|
2545
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2546
|
-
"path": "/journalentries/findByJournal",
|
|
2547
|
-
"method": "POST"
|
|
2548
|
-
},
|
|
2549
|
-
{
|
|
2550
|
-
"kind": "api",
|
|
2551
|
-
"name": "journalentries.findByAccount",
|
|
2552
|
-
"operation": "findByAccount",
|
|
2553
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2554
|
-
"path": "/journalentries/findByAccount",
|
|
2555
|
-
"method": "POST"
|
|
2556
|
-
},
|
|
2557
|
-
{
|
|
2558
|
-
"kind": "api",
|
|
2559
|
-
"name": "journalentries.getAccountBalance",
|
|
2560
|
-
"operation": "getAccountBalance",
|
|
2561
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2562
|
-
"path": "/journalentries/getAccountBalance",
|
|
2563
|
-
"method": "POST"
|
|
2564
|
-
},
|
|
2565
|
-
{
|
|
2566
|
-
"kind": "api",
|
|
2567
|
-
"name": "journalentries.getTrialBalance",
|
|
2568
|
-
"operation": "getTrialBalance",
|
|
2569
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2570
|
-
"path": "/journalentries/getTrialBalance",
|
|
2571
|
-
"method": "POST"
|
|
2572
|
-
},
|
|
2573
|
-
{
|
|
2574
|
-
"kind": "api",
|
|
2575
|
-
"name": "journalentries.getTotalsForDateRange",
|
|
2576
|
-
"operation": "getTotalsForDateRange",
|
|
2577
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2578
|
-
"path": "/journalentries/getTotalsForDateRange",
|
|
2579
|
-
"method": "POST"
|
|
2580
|
-
},
|
|
2581
|
-
{
|
|
2582
|
-
"kind": "api",
|
|
2583
|
-
"name": "journalentries.findByAccounts",
|
|
2584
|
-
"operation": "findByAccounts",
|
|
2585
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2586
|
-
"path": "/journalentries/findByAccounts",
|
|
2587
|
-
"method": "POST"
|
|
2588
|
-
},
|
|
2589
|
-
{
|
|
2590
|
-
"kind": "api",
|
|
2591
|
-
"name": "journalentries.getAccountLedger",
|
|
2592
|
-
"operation": "getAccountLedger",
|
|
2593
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2594
|
-
"path": "/journalentries/getAccountLedger",
|
|
2595
|
-
"method": "POST"
|
|
2596
|
-
},
|
|
2597
|
-
{
|
|
2598
|
-
"kind": "api",
|
|
2599
|
-
"name": "journalentries.findByTenant",
|
|
2600
|
-
"operation": "findByTenant",
|
|
2601
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2602
|
-
"path": "/journalentries/findByTenant",
|
|
2603
|
-
"method": "POST"
|
|
2604
|
-
},
|
|
2605
|
-
{
|
|
2606
|
-
"kind": "api",
|
|
2607
|
-
"name": "journalentries.findGlobal",
|
|
2608
|
-
"operation": "findGlobal",
|
|
2609
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2610
|
-
"path": "/journalentries/findGlobal",
|
|
2611
|
-
"method": "POST"
|
|
2612
|
-
},
|
|
2613
|
-
{
|
|
2614
|
-
"kind": "api",
|
|
2615
|
-
"name": "journalentries.findWithGlobals",
|
|
2616
|
-
"operation": "findWithGlobals",
|
|
2617
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection",
|
|
2618
|
-
"path": "/journalentries/findWithGlobals",
|
|
2619
|
-
"method": "POST"
|
|
2620
|
-
},
|
|
2621
|
-
{
|
|
2622
|
-
"kind": "cli",
|
|
2623
|
-
"name": "journalentrycollection_findByJournal",
|
|
2624
|
-
"operation": "findByJournal",
|
|
2625
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2626
|
-
},
|
|
2627
|
-
{
|
|
2628
|
-
"kind": "cli",
|
|
2629
|
-
"name": "journalentrycollection_findByAccount",
|
|
2630
|
-
"operation": "findByAccount",
|
|
2631
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2632
|
-
},
|
|
2633
|
-
{
|
|
2634
|
-
"kind": "cli",
|
|
2635
|
-
"name": "journalentrycollection_getAccountBalance",
|
|
2636
|
-
"operation": "getAccountBalance",
|
|
2637
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2638
|
-
},
|
|
2639
|
-
{
|
|
2640
|
-
"kind": "cli",
|
|
2641
|
-
"name": "journalentrycollection_getTrialBalance",
|
|
2642
|
-
"operation": "getTrialBalance",
|
|
2643
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2168
|
+
"kind": "cli",
|
|
2169
|
+
"name": "journalentrycollection_getTrialBalance",
|
|
2170
|
+
"operation": "getTrialBalance",
|
|
2171
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2644
2172
|
},
|
|
2645
2173
|
{
|
|
2646
2174
|
"kind": "cli",
|
|
@@ -2654,6 +2182,12 @@
|
|
|
2654
2182
|
"operation": "findByAccounts",
|
|
2655
2183
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2656
2184
|
},
|
|
2185
|
+
{
|
|
2186
|
+
"kind": "cli",
|
|
2187
|
+
"name": "journalentrycollection_listPostedMovements",
|
|
2188
|
+
"operation": "listPostedMovements",
|
|
2189
|
+
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2190
|
+
},
|
|
2657
2191
|
{
|
|
2658
2192
|
"kind": "cli",
|
|
2659
2193
|
"name": "journalentrycollection_getAccountLedger",
|
|
@@ -2678,178 +2212,6 @@
|
|
|
2678
2212
|
"operation": "findWithGlobals",
|
|
2679
2213
|
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2680
2214
|
},
|
|
2681
|
-
{
|
|
2682
|
-
"kind": "mcp",
|
|
2683
|
-
"name": "journalentrycollection_findbyjournal",
|
|
2684
|
-
"operation": "findByJournal",
|
|
2685
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2686
|
-
},
|
|
2687
|
-
{
|
|
2688
|
-
"kind": "mcp",
|
|
2689
|
-
"name": "journalentrycollection_findbyaccount",
|
|
2690
|
-
"operation": "findByAccount",
|
|
2691
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2692
|
-
},
|
|
2693
|
-
{
|
|
2694
|
-
"kind": "mcp",
|
|
2695
|
-
"name": "journalentrycollection_getaccountbalance",
|
|
2696
|
-
"operation": "getAccountBalance",
|
|
2697
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2698
|
-
},
|
|
2699
|
-
{
|
|
2700
|
-
"kind": "mcp",
|
|
2701
|
-
"name": "journalentrycollection_gettrialbalance",
|
|
2702
|
-
"operation": "getTrialBalance",
|
|
2703
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2704
|
-
},
|
|
2705
|
-
{
|
|
2706
|
-
"kind": "mcp",
|
|
2707
|
-
"name": "journalentrycollection_gettotalsfordaterange",
|
|
2708
|
-
"operation": "getTotalsForDateRange",
|
|
2709
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2710
|
-
},
|
|
2711
|
-
{
|
|
2712
|
-
"kind": "mcp",
|
|
2713
|
-
"name": "journalentrycollection_findbyaccounts",
|
|
2714
|
-
"operation": "findByAccounts",
|
|
2715
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2716
|
-
},
|
|
2717
|
-
{
|
|
2718
|
-
"kind": "mcp",
|
|
2719
|
-
"name": "journalentrycollection_getaccountledger",
|
|
2720
|
-
"operation": "getAccountLedger",
|
|
2721
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2722
|
-
},
|
|
2723
|
-
{
|
|
2724
|
-
"kind": "mcp",
|
|
2725
|
-
"name": "journalentrycollection_findbytenant",
|
|
2726
|
-
"operation": "findByTenant",
|
|
2727
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2728
|
-
},
|
|
2729
|
-
{
|
|
2730
|
-
"kind": "mcp",
|
|
2731
|
-
"name": "journalentrycollection_findglobal",
|
|
2732
|
-
"operation": "findGlobal",
|
|
2733
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2734
|
-
},
|
|
2735
|
-
{
|
|
2736
|
-
"kind": "mcp",
|
|
2737
|
-
"name": "journalentrycollection_findwithglobals",
|
|
2738
|
-
"operation": "findWithGlobals",
|
|
2739
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalEntryCollection"
|
|
2740
|
-
},
|
|
2741
|
-
{
|
|
2742
|
-
"kind": "api",
|
|
2743
|
-
"name": "journals.findByNumber",
|
|
2744
|
-
"operation": "findByNumber",
|
|
2745
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2746
|
-
"path": "/journals/findByNumber",
|
|
2747
|
-
"method": "POST"
|
|
2748
|
-
},
|
|
2749
|
-
{
|
|
2750
|
-
"kind": "api",
|
|
2751
|
-
"name": "journals.findByDateRange",
|
|
2752
|
-
"operation": "findByDateRange",
|
|
2753
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2754
|
-
"path": "/journals/findByDateRange",
|
|
2755
|
-
"method": "POST"
|
|
2756
|
-
},
|
|
2757
|
-
{
|
|
2758
|
-
"kind": "api",
|
|
2759
|
-
"name": "journals.findBySource",
|
|
2760
|
-
"operation": "findBySource",
|
|
2761
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2762
|
-
"path": "/journals/findBySource",
|
|
2763
|
-
"method": "POST"
|
|
2764
|
-
},
|
|
2765
|
-
{
|
|
2766
|
-
"kind": "api",
|
|
2767
|
-
"name": "journals.findByStatus",
|
|
2768
|
-
"operation": "findByStatus",
|
|
2769
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2770
|
-
"path": "/journals/findByStatus",
|
|
2771
|
-
"method": "POST"
|
|
2772
|
-
},
|
|
2773
|
-
{
|
|
2774
|
-
"kind": "api",
|
|
2775
|
-
"name": "journals.findDrafts",
|
|
2776
|
-
"operation": "findDrafts",
|
|
2777
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2778
|
-
"path": "/journals/findDrafts",
|
|
2779
|
-
"method": "POST"
|
|
2780
|
-
},
|
|
2781
|
-
{
|
|
2782
|
-
"kind": "api",
|
|
2783
|
-
"name": "journals.findPosted",
|
|
2784
|
-
"operation": "findPosted",
|
|
2785
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2786
|
-
"path": "/journals/findPosted",
|
|
2787
|
-
"method": "POST"
|
|
2788
|
-
},
|
|
2789
|
-
{
|
|
2790
|
-
"kind": "api",
|
|
2791
|
-
"name": "journals.createWithEntries",
|
|
2792
|
-
"operation": "createWithEntries",
|
|
2793
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2794
|
-
"path": "/journals/createWithEntries",
|
|
2795
|
-
"method": "POST"
|
|
2796
|
-
},
|
|
2797
|
-
{
|
|
2798
|
-
"kind": "api",
|
|
2799
|
-
"name": "journals.post",
|
|
2800
|
-
"operation": "post",
|
|
2801
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2802
|
-
"path": "/journals/post",
|
|
2803
|
-
"method": "POST"
|
|
2804
|
-
},
|
|
2805
|
-
{
|
|
2806
|
-
"kind": "api",
|
|
2807
|
-
"name": "journals.void",
|
|
2808
|
-
"operation": "void",
|
|
2809
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2810
|
-
"path": "/journals/void",
|
|
2811
|
-
"method": "POST"
|
|
2812
|
-
},
|
|
2813
|
-
{
|
|
2814
|
-
"kind": "api",
|
|
2815
|
-
"name": "journals.findBySourceRef",
|
|
2816
|
-
"operation": "findBySourceRef",
|
|
2817
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2818
|
-
"path": "/journals/findBySourceRef",
|
|
2819
|
-
"method": "POST"
|
|
2820
|
-
},
|
|
2821
|
-
{
|
|
2822
|
-
"kind": "api",
|
|
2823
|
-
"name": "journals.findByMonth",
|
|
2824
|
-
"operation": "findByMonth",
|
|
2825
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2826
|
-
"path": "/journals/findByMonth",
|
|
2827
|
-
"method": "POST"
|
|
2828
|
-
},
|
|
2829
|
-
{
|
|
2830
|
-
"kind": "api",
|
|
2831
|
-
"name": "journals.findByTenant",
|
|
2832
|
-
"operation": "findByTenant",
|
|
2833
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2834
|
-
"path": "/journals/findByTenant",
|
|
2835
|
-
"method": "POST"
|
|
2836
|
-
},
|
|
2837
|
-
{
|
|
2838
|
-
"kind": "api",
|
|
2839
|
-
"name": "journals.findGlobal",
|
|
2840
|
-
"operation": "findGlobal",
|
|
2841
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2842
|
-
"path": "/journals/findGlobal",
|
|
2843
|
-
"method": "POST"
|
|
2844
|
-
},
|
|
2845
|
-
{
|
|
2846
|
-
"kind": "api",
|
|
2847
|
-
"name": "journals.findWithGlobals",
|
|
2848
|
-
"operation": "findWithGlobals",
|
|
2849
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection",
|
|
2850
|
-
"path": "/journals/findWithGlobals",
|
|
2851
|
-
"method": "POST"
|
|
2852
|
-
},
|
|
2853
2215
|
{
|
|
2854
2216
|
"kind": "cli",
|
|
2855
2217
|
"name": "journalcollection_findByNumber",
|
|
@@ -2934,90 +2296,6 @@
|
|
|
2934
2296
|
"operation": "findWithGlobals",
|
|
2935
2297
|
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2936
2298
|
},
|
|
2937
|
-
{
|
|
2938
|
-
"kind": "mcp",
|
|
2939
|
-
"name": "journalcollection_findbynumber",
|
|
2940
|
-
"operation": "findByNumber",
|
|
2941
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2942
|
-
},
|
|
2943
|
-
{
|
|
2944
|
-
"kind": "mcp",
|
|
2945
|
-
"name": "journalcollection_findbydaterange",
|
|
2946
|
-
"operation": "findByDateRange",
|
|
2947
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2948
|
-
},
|
|
2949
|
-
{
|
|
2950
|
-
"kind": "mcp",
|
|
2951
|
-
"name": "journalcollection_findbysource",
|
|
2952
|
-
"operation": "findBySource",
|
|
2953
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2954
|
-
},
|
|
2955
|
-
{
|
|
2956
|
-
"kind": "mcp",
|
|
2957
|
-
"name": "journalcollection_findbystatus",
|
|
2958
|
-
"operation": "findByStatus",
|
|
2959
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2960
|
-
},
|
|
2961
|
-
{
|
|
2962
|
-
"kind": "mcp",
|
|
2963
|
-
"name": "journalcollection_finddrafts",
|
|
2964
|
-
"operation": "findDrafts",
|
|
2965
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2966
|
-
},
|
|
2967
|
-
{
|
|
2968
|
-
"kind": "mcp",
|
|
2969
|
-
"name": "journalcollection_findposted",
|
|
2970
|
-
"operation": "findPosted",
|
|
2971
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2972
|
-
},
|
|
2973
|
-
{
|
|
2974
|
-
"kind": "mcp",
|
|
2975
|
-
"name": "journalcollection_createwithentries",
|
|
2976
|
-
"operation": "createWithEntries",
|
|
2977
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2978
|
-
},
|
|
2979
|
-
{
|
|
2980
|
-
"kind": "mcp",
|
|
2981
|
-
"name": "journalcollection_post",
|
|
2982
|
-
"operation": "post",
|
|
2983
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2984
|
-
},
|
|
2985
|
-
{
|
|
2986
|
-
"kind": "mcp",
|
|
2987
|
-
"name": "journalcollection_void",
|
|
2988
|
-
"operation": "void",
|
|
2989
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2990
|
-
},
|
|
2991
|
-
{
|
|
2992
|
-
"kind": "mcp",
|
|
2993
|
-
"name": "journalcollection_findbysourceref",
|
|
2994
|
-
"operation": "findBySourceRef",
|
|
2995
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
2996
|
-
},
|
|
2997
|
-
{
|
|
2998
|
-
"kind": "mcp",
|
|
2999
|
-
"name": "journalcollection_findbymonth",
|
|
3000
|
-
"operation": "findByMonth",
|
|
3001
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
3002
|
-
},
|
|
3003
|
-
{
|
|
3004
|
-
"kind": "mcp",
|
|
3005
|
-
"name": "journalcollection_findbytenant",
|
|
3006
|
-
"operation": "findByTenant",
|
|
3007
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
3008
|
-
},
|
|
3009
|
-
{
|
|
3010
|
-
"kind": "mcp",
|
|
3011
|
-
"name": "journalcollection_findglobal",
|
|
3012
|
-
"operation": "findGlobal",
|
|
3013
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
3014
|
-
},
|
|
3015
|
-
{
|
|
3016
|
-
"kind": "mcp",
|
|
3017
|
-
"name": "journalcollection_findwithglobals",
|
|
3018
|
-
"operation": "findWithGlobals",
|
|
3019
|
-
"objectName": "@happyvertical/smrt-ledgers:JournalCollection"
|
|
3020
|
-
},
|
|
3021
2299
|
{
|
|
3022
2300
|
"kind": "api",
|
|
3023
2301
|
"name": "accounts.list",
|
|
@@ -3442,7 +2720,7 @@
|
|
|
3442
2720
|
"polymorphicAssociations": 0,
|
|
3443
2721
|
"uuidColumns": 18
|
|
3444
2722
|
},
|
|
3445
|
-
"agentDoc": "# @happyvertical/smrt-ledgers\n\nDouble-entry accounting with chart of accounts, journal lifecycle, and balance enforcement.\n\n## Models\n\n- **Account**: 5 types (asset/liability/equity/revenue/expense). Hierarchical via `parentId`. Debit-normal (asset, expense) vs credit-normal (liability, equity, revenue). Methods: `getAncestors()`, `getFullPath()`, `toTreeNode()`, `getBalance(asOfDate?)`. Stored in `ledger_accounts` (explicit `tableName`), never the derived `accounts`: smrt-messages declares an unrelated `Account` on that table (#3098). `src/migrations/ledger-accounts-table.ts` (`smrt db:migrate-ledger-accounts`) moves pre-#3098 rows; the README has the operator sequence.\n- **Journal**: lifecycle `draft → posted → voided`. **Immutable after posting** (can only void, not edit). `sourceModule`/`sourceRef` for cross-package attribution. Auto-numbered (e.g., \"JNL-0001\"). `summarize()` is AI-powered via the smrt-prompts registry (see Prompt Registry below).\n- **JournalEntry**: debit XOR credit (not both, validated on save). Multi-currency via `exchangeRate`. Non-negative amounts required.\n\n## Key Methods\n\n- **`Journal.summarize()`**: Generates a natural-language summary via the registered `smrtLedgers.journal.summarize` prompt, resolved through `@happyvertical/smrt-prompts`. Tenants can override the template, model, temperature, or other params via `_smrt_prompt_overrides` without code changes. Only non-PII fields (number, date, description, status, aggregate total, entry count, balanced flag) reach the AI provider.\n\n## Prompt Registry\n\nRegistered at module-load time via `definePrompt()` in `src/prompts.ts`. Side-effect imported from `src/index.ts` so consumers automatically see the prompts after importing any export from this package.\n\n| Key | Method | Variables |\n|-----|--------|-----------|\n| `smrtLedgers.journal.summarize` | `Journal.summarize()` | `journalNumber`, `journalDate`, `journalDescription`, `journalStatus`, `journalTotal`, `entryCount`, `journalBalanced` |\n\nPII-conscious variable selection: `tenantId`, `sourceRef` (may reference customer/vendor identifiers), per-entry `accountId`/`id`, and the extensible `metadata` blob are intentionally NOT exposed as prompt variables. Tenants who need richer context should override the template via `PromptOverride` and supply their own variables through a custom call site.\n\n## Balance Enforcement\n\n`journal.post()` validates `Math.abs(totalDebits - totalCredits) < BALANCE_EPSILON` where `BALANCE_EPSILON = 0.01` (float rounding tolerance). Unbalanced journals cannot be posted.\n\n**This package is unit-agnostic** — `debit` / `credit` are plain DECIMAL numbers and the balance check only compares the two sides, so it holds for whatever unit the posting module uses. As of #2401, journals posted from `@happyvertical/smrt-commerce` (`Payment.recordPayment()`, `Invoice.recognizeRevenue()`) carry **integer minor units**, which balance exactly rather than merely within the epsilon. A consumer mixing modules that post in different units will get arithmetically balanced but semantically meaningless journals; pick one unit per ledger.\n\n## Gotchas\n\n- **Float tolerance**: 0.01 epsilon for balance check — not exact equality\n- **Entry requires journalId**: save Journal first, then add entries\n- **Posted journals cannot be modified**: only voided (`voidReason`, `voidedAt`)\n- **Account types inherited by children**: child cannot differ from parent type\n- **getBalance() is async**: requires JournalEntryCollection query (not stored on Account)\n- **Optional tenancy** on all models\n- **Same-named `Account`**: reference the ledger model by constructor (`@foreignKey(Account)`) or qualified name (`@happyvertical/smrt-ledgers:Account`), never the bare string. The PostgreSQL lanes are `pnpm test:postgres` here (ledgers alone) and in smrt-messages (both packages loaded)\n",
|
|
2723
|
+
"agentDoc": "# @happyvertical/smrt-ledgers\n\nDouble-entry accounting with chart of accounts, journal lifecycle, and balance enforcement.\n\n## Models\n\n- **Account**: 5 types (asset/liability/equity/revenue/expense). Hierarchical via `parentId`. Debit-normal (asset, expense) vs credit-normal (liability, equity, revenue). Methods: `getAncestors()`, `getFullPath()`, `toTreeNode()`, `getBalance(asOfDate?)`. Stored in `ledger_accounts` (explicit `tableName`), never the derived `accounts`: smrt-messages declares an unrelated `Account` on that table (#3098). `src/migrations/ledger-accounts-table.ts` (`smrt db:migrate-ledger-accounts`) moves pre-#3098 rows; the README has the operator sequence.\n- **Journal**: lifecycle `draft → posted → voided`. **Immutable after posting** (can only void, not edit). `sourceModule`/`sourceRef` for cross-package attribution. Auto-numbered (e.g., \"JNL-0001\"). `summarize()` is AI-powered via the smrt-prompts registry (see Prompt Registry below).\n- **JournalEntry**: debit XOR credit (not both, validated on save). Multi-currency via `exchangeRate`. Non-negative amounts required.\n\n## Key Methods\n\n- **`Journal.summarize()`**: Generates a natural-language summary via the registered `smrtLedgers.journal.summarize` prompt, resolved through `@happyvertical/smrt-prompts`. Tenants can override the template, model, temperature, or other params via `_smrt_prompt_overrides` without code changes. Only non-PII fields (number, date, description, status, aggregate total, entry count, balanced flag) reach the AI provider.\n\n## Prompt Registry\n\nRegistered at module-load time via `definePrompt()` in `src/prompts.ts`. Side-effect imported from `src/index.ts` so consumers automatically see the prompts after importing any export from this package.\n\n| Key | Method | Variables |\n|-----|--------|-----------|\n| `smrtLedgers.journal.summarize` | `Journal.summarize()` | `journalNumber`, `journalDate`, `journalDescription`, `journalStatus`, `journalTotal`, `entryCount`, `journalBalanced` |\n\nPII-conscious variable selection: `tenantId`, `sourceRef` (may reference customer/vendor identifiers), per-entry `accountId`/`id`, and the extensible `metadata` blob are intentionally NOT exposed as prompt variables. Tenants who need richer context should override the template via `PromptOverride` and supply their own variables through a custom call site.\n\n## Balance Enforcement\n\n`journal.post()` validates `Math.abs(totalDebits - totalCredits) < BALANCE_EPSILON` where `BALANCE_EPSILON = 0.01` (float rounding tolerance). Unbalanced journals cannot be posted.\n\n**This package is unit-agnostic** — `debit` / `credit` are plain DECIMAL numbers and the balance check only compares the two sides, so it holds for whatever unit the posting module uses. As of #2401, journals posted from `@happyvertical/smrt-commerce` (`Payment.recordPayment()`, `Invoice.recognizeRevenue()`) carry **integer minor units**, which balance exactly rather than merely within the epsilon. A consumer mixing modules that post in different units will get arithmetically balanced but semantically meaningless journals; pick one unit per ledger.\n\n`JournalEntryCollection.listPostedMovements({ tenantId, accountIds, from, to,\ncurrency })` is the bounded reporting input. It joins only rows whose entry and\njournal share the requested tenant, includes every posted source (including\nmanual journals), and excludes drafts and voids. Its debit, credit, and\n`creditMinusDebit` values are raw ledger units; commerce must verify its\nminor-unit convention before using them in an exact tax report. Each returned\nmovement retains the requested `tenantId` so consumers can reject a fact that\ncrosses the reporting boundary.\n\n## Gotchas\n\n- **Float tolerance**: 0.01 epsilon for balance check — not exact equality\n- **Entry requires journalId**: save Journal first, then add entries\n- **Posted journals cannot be modified**: only voided (`voidReason`, `voidedAt`)\n- **Account types inherited by children**: child cannot differ from parent type\n- **getBalance() is async**: requires JournalEntryCollection query (not stored on Account)\n- **Optional tenancy** on all models\n- **Same-named `Account`**: reference the ledger model by constructor (`@foreignKey(Account)`) or qualified name (`@happyvertical/smrt-ledgers:Account`), never the bare string. The PostgreSQL lanes are `pnpm test:postgres` here (ledgers alone) and in smrt-messages (both packages loaded)\n",
|
|
3446
2724
|
"recipes": [
|
|
3447
2725
|
{
|
|
3448
2726
|
"id": "ledgers.bookkeeping",
|