@classytic/ledger 0.7.0 → 0.9.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/README.md +221 -115
- package/dist/bridges/index.d.mts +2 -0
- package/dist/bridges/index.mjs +1 -0
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +2 -2
- package/dist/country/index.d.mts +1 -1
- package/dist/errors-BI5k4iak.mjs +121 -0
- package/dist/events/index.d.mts +2 -0
- package/dist/events/index.mjs +2 -0
- package/dist/exports/index.d.mts +1 -1
- package/dist/exports/index.mjs +1 -1
- package/dist/{fx-realization.plugin-CfYy1tB6.mjs → fx-realization.plugin-Bxlb8cIx.mjs} +45 -2
- package/dist/{index-BX8miYdu.d.mts → index-08IpHhrU.d.mts} +12 -1
- package/dist/{index-Bl0_ak5w.d.mts → index-Db0n_6Z8.d.mts} +1 -1
- package/dist/index-dqkjgpII.d.mts +104 -0
- package/dist/index.d.mts +344 -65
- package/dist/index.mjs +539 -110
- package/dist/{journals-C50E9mpo.d.mts → journals-DUpWwFt1.d.mts} +1 -1
- package/dist/opening-balance-1cixYh6Y.mjs +60 -0
- package/dist/outbox-store-DQbL-KYT.mjs +132 -0
- package/dist/outbox-store-UYC4eZpI.d.mts +249 -0
- package/dist/{partner-ledger-D9H5hegI.mjs → partner-ledger-BoebloHk.mjs} +2 -2
- package/dist/plugins/index.d.mts +1 -1
- package/dist/plugins/index.mjs +1 -1
- package/dist/reports/index.d.mts +1 -1
- package/dist/reports/index.mjs +1 -1
- package/dist/sync/index.d.mts +313 -0
- package/dist/sync/index.mjs +527 -0
- package/dist/sync-JvchM3FO.d.mts +152 -0
- package/dist/{trial-balance-DTc8kzTD.d.mts → trial-balance-DyNm5bFu.d.mts} +2 -2
- package/docs/country-packs.md +71 -47
- package/docs/engine.md +3 -2
- package/docs/subledger-integration.md +29 -8
- package/docs/sync.md +330 -0
- package/package.json +36 -14
- package/dist/errors-CSDQPNyt.mjs +0 -33
- /package/dist/{categories-BkKdv16V.mjs → categories-FJlrvzcl.mjs} +0 -0
- /package/dist/{core-BkGjuVZj.d.mts → core-DwjkrRkJ.d.mts} +0 -0
- /package/dist/{currencies-CsuBGfgs.mjs → currencies-Jo5oaM_4.mjs} +0 -0
- /package/dist/{exports-BP-0Ni5W.mjs → exports-C30yRapf.mjs} +0 -0
- /package/dist/{index-D1ZjgVxn.d.mts → index-J-XIbXH-.d.mts} +0 -0
package/dist/errors-CSDQPNyt.mjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//#region src/utils/errors.ts
|
|
2
|
-
var AccountingError = class extends Error {
|
|
3
|
-
status;
|
|
4
|
-
code;
|
|
5
|
-
fields;
|
|
6
|
-
constructor(message, status = 400, code = "ACCOUNTING_ERROR", fields) {
|
|
7
|
-
super(message);
|
|
8
|
-
this.name = "AccountingError";
|
|
9
|
-
this.status = status;
|
|
10
|
-
this.code = code;
|
|
11
|
-
if (fields && fields.length > 0) this.fields = Object.freeze([...fields]);
|
|
12
|
-
}
|
|
13
|
-
/** Serialize to a plain object for API responses and logs. */
|
|
14
|
-
toJSON() {
|
|
15
|
-
return {
|
|
16
|
-
name: this.name,
|
|
17
|
-
message: this.message,
|
|
18
|
-
status: this.status,
|
|
19
|
-
code: this.code,
|
|
20
|
-
...this.fields ? { fields: this.fields } : {}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
/** Convenience factory functions. */
|
|
25
|
-
const Errors = {
|
|
26
|
-
validation: (msg, fields) => new AccountingError(msg, 400, "VALIDATION_ERROR", fields),
|
|
27
|
-
notFound: (msg, fields) => new AccountingError(msg, 404, "NOT_FOUND", fields),
|
|
28
|
-
conflict: (msg, fields) => new AccountingError(msg, 409, "CONFLICT", fields),
|
|
29
|
-
immutable: (msg, fields) => new AccountingError(msg, 403, "IMMUTABLE_ENTRY", fields),
|
|
30
|
-
locked: (scope, msg, fields) => new AccountingError(msg, 409, `PERIOD_LOCKED_${scope.toUpperCase()}`, fields)
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
export { Errors as n, AccountingError as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|