@classytic/ledger 0.4.2 → 0.5.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.
Files changed (38) hide show
  1. package/README.md +227 -189
  2. package/dist/constants/index.d.mts +1 -1
  3. package/dist/constants/index.mjs +2 -3
  4. package/dist/country/index.d.mts +1 -1
  5. package/dist/{journals-BfwnCFam.mjs → currencies-CsuBGfgs.mjs} +80 -1
  6. package/dist/{date-lock.plugin-DL6pe24p.mjs → date-lock.plugin-B2Jy0ukX.mjs} +61 -10
  7. package/dist/errors-BmRjW38t.mjs +33 -0
  8. package/dist/exports/index.d.mts +1 -1
  9. package/dist/exports/index.mjs +1 -1
  10. package/dist/{fiscal-close-B2_7WMTe.mjs → fiscal-close-Dk3yRT9i.mjs} +14 -4
  11. package/dist/{index-CxZqRaOU.d.mts → index-GmfEFxVn.d.mts} +1 -1
  12. package/dist/index.d.mts +525 -344
  13. package/dist/index.mjs +1814 -170
  14. package/dist/{journals-DTipb_rz.d.mts → journals-C50E9mpo.d.mts} +1 -1
  15. package/dist/plugins/index.d.mts +1 -1
  16. package/dist/plugins/index.mjs +1 -1
  17. package/dist/reports/index.d.mts +1 -1
  18. package/dist/reports/index.mjs +1 -1
  19. package/dist/{trial-balance-DcQ0xj_4.d.mts → trial-balance-BZ7yOOFD.d.mts} +16 -4
  20. package/package.json +1 -11
  21. package/dist/currencies-W8kQAkm0.mjs +0 -80
  22. package/dist/engine-scgOvxHJ.d.mts +0 -130
  23. package/dist/errors-B_dyYZc_.mjs +0 -26
  24. package/dist/journal-entry.schema-JqrfbvB4.d.mts +0 -103
  25. package/dist/logger-UbTdBb1x.d.mts +0 -14
  26. package/dist/reconciliation.repository-D-D_ITL-.d.mts +0 -135
  27. package/dist/reconciliation.repository-fPwFKvrk.mjs +0 -542
  28. package/dist/reconciliation.schema-BA1lPv4t.mjs +0 -666
  29. package/dist/repositories/index.d.mts +0 -2
  30. package/dist/repositories/index.mjs +0 -2
  31. package/dist/schemas/index.d.mts +0 -71
  32. package/dist/schemas/index.mjs +0 -2
  33. package/dist/tenant-guard-r17Se3Bb.mjs +0 -13
  34. /package/dist/{categories-DWogBUgQ.mjs → categories-BkKdv16V.mjs} +0 -0
  35. /package/dist/{core-8Xfnpn6g.d.mts → core-BkGjuVZj.d.mts} +0 -0
  36. /package/dist/{exports-DoGQQtMQ.mjs → exports-BP-0Ni5W.mjs} +0 -0
  37. /package/dist/{idempotency.plugin-zU-GKJ0-.d.mts → idempotency.plugin-CK7LHnBn.d.mts} +0 -0
  38. /package/dist/{index-J-XIbXH-.d.mts → index-D1ZjgVxn.d.mts} +0 -0
@@ -1,71 +0,0 @@
1
- import { s as SchemaOptions, t as AccountingEngineConfig } from "../engine-scgOvxHJ.mjs";
2
- import { n as createFiscalPeriodSchema, r as createAccountSchema, t as createJournalEntrySchema } from "../journal-entry.schema-JqrfbvB4.mjs";
3
- import mongoose from "mongoose";
4
-
5
- //#region src/schemas/budget.schema.d.ts
6
- declare function createBudgetSchema(config: AccountingEngineConfig, options?: SchemaOptions): mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
7
- timestamps: true;
8
- }, {
9
- [x: number]: any;
10
- [x: string]: any;
11
- } & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
12
- [x: number]: any;
13
- [x: string]: any;
14
- } & mongoose.DefaultTimestampProps, {
15
- id: string;
16
- }, Omit<mongoose.DefaultSchemaOptions, "timestamps"> & {
17
- timestamps: true;
18
- }> & Omit<{
19
- [x: number]: any;
20
- [x: string]: any;
21
- } & mongoose.DefaultTimestampProps & {
22
- _id: mongoose.Types.ObjectId;
23
- } & {
24
- __v: number;
25
- }, "id"> & {
26
- id: string;
27
- }, unknown, {
28
- [x: number]: any;
29
- [x: string]: any;
30
- createdAt: NativeDate;
31
- updatedAt: NativeDate;
32
- } & {
33
- _id: mongoose.Types.ObjectId;
34
- } & {
35
- __v: number;
36
- }>;
37
- //#endregion
38
- //#region src/schemas/reconciliation.schema.d.ts
39
- declare function createReconciliationSchema(config: AccountingEngineConfig, accountModelName: string, journalEntryModelName: string, options?: SchemaOptions): mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
40
- timestamps: true;
41
- }, {
42
- [x: number]: any;
43
- [x: string]: any;
44
- } & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
45
- [x: number]: any;
46
- [x: string]: any;
47
- } & mongoose.DefaultTimestampProps, {
48
- id: string;
49
- }, Omit<mongoose.DefaultSchemaOptions, "timestamps"> & {
50
- timestamps: true;
51
- }> & Omit<{
52
- [x: number]: any;
53
- [x: string]: any;
54
- } & mongoose.DefaultTimestampProps & {
55
- _id: mongoose.Types.ObjectId;
56
- } & {
57
- __v: number;
58
- }, "id"> & {
59
- id: string;
60
- }, unknown, {
61
- [x: number]: any;
62
- [x: string]: any;
63
- createdAt: NativeDate;
64
- updatedAt: NativeDate;
65
- } & {
66
- _id: mongoose.Types.ObjectId;
67
- } & {
68
- __v: number;
69
- }>;
70
- //#endregion
71
- export { createAccountSchema, createBudgetSchema, createFiscalPeriodSchema, createJournalEntrySchema, createReconciliationSchema };
@@ -1,2 +0,0 @@
1
- import { a as createAccountSchema, i as createBudgetSchema, n as createJournalEntrySchema, r as createFiscalPeriodSchema, t as createReconciliationSchema } from "../reconciliation.schema-BA1lPv4t.mjs";
2
- export { createAccountSchema, createBudgetSchema, createFiscalPeriodSchema, createJournalEntrySchema, createReconciliationSchema };
@@ -1,13 +0,0 @@
1
- import { n as Errors } from "./errors-B_dyYZc_.mjs";
2
- //#region src/utils/tenant-guard.ts
3
- /**
4
- * Multi-tenant scope guard.
5
- *
6
- * Throws when orgField is configured (multi-tenant mode active) but
7
- * organizationId is missing — preventing unscoped cross-tenant queries.
8
- */
9
- function requireOrgScope(orgField, organizationId) {
10
- if (orgField && !organizationId) throw Errors.validation("organizationId is required when multi-tenant mode is configured (orgField: \"" + orgField + "\"). Refusing to run unscoped query.");
11
- }
12
- //#endregion
13
- export { requireOrgScope as t };