@cullet/erp-core 1.2.0 → 1.4.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/KIT_CONTEXT.md +5 -3
- package/README.md +160 -0
- package/dist/abac/index.cjs +7 -0
- package/dist/abac/index.d.cts +2 -0
- package/dist/abac/index.d.ts +2 -0
- package/dist/abac/index.js +2 -0
- package/dist/app-error.cjs +193 -0
- package/dist/app-error.cjs.map +1 -0
- package/dist/app-error.d.cts +108 -0
- package/dist/app-error.js +170 -0
- package/dist/app-error.js.map +1 -0
- package/dist/application/index.cjs +27 -0
- package/dist/application/index.d.cts +3 -0
- package/dist/application/index.d.ts +2 -1
- package/dist/application/index.js +2 -1
- package/dist/authorization-error.cjs +157 -0
- package/dist/authorization-error.cjs.map +1 -0
- package/dist/authorization-error.d.cts +113 -0
- package/dist/authorization-error.d.ts +113 -0
- package/dist/authorization-error.js +152 -0
- package/dist/authorization-error.js.map +1 -0
- package/dist/authorizer.port.d.cts +130 -0
- package/dist/authorizer.port.d.ts +130 -0
- package/dist/composite-authorizer.d.cts +216 -0
- package/dist/composite-authorizer.d.ts +216 -0
- package/dist/condition-evaluator.cjs +565 -0
- package/dist/condition-evaluator.cjs.map +1 -0
- package/dist/condition-evaluator.js +536 -0
- package/dist/condition-evaluator.js.map +1 -0
- package/dist/core-config.d.cts +172 -0
- package/dist/{gate-types.d.ts → core-config.d.ts} +78 -77
- package/dist/domain/index.cjs +17 -0
- package/dist/domain/index.d.cts +4 -0
- package/dist/domain/index.d.ts +2 -1
- package/dist/domain/index.js +2 -1
- package/dist/domain-event-contracts.cjs +34 -0
- package/dist/domain-event-contracts.cjs.map +1 -0
- package/dist/domain-event-contracts.d.cts +27 -0
- package/dist/domain-event-contracts.js +2 -1
- package/dist/domain-event-contracts.js.map +1 -1
- package/dist/domain-exception.cjs +17 -0
- package/dist/domain-exception.cjs.map +1 -0
- package/dist/domain-exception.d.cts +7 -0
- package/dist/entity.cjs +126 -0
- package/dist/entity.cjs.map +1 -0
- package/dist/entity.js +115 -0
- package/dist/entity.js.map +1 -0
- package/dist/errors/index.cjs +43 -0
- package/dist/errors/index.d.cts +4 -0
- package/dist/errors/index.d.ts +2 -1
- package/dist/errors/index.js +4 -2
- package/dist/exceptions/index.cjs +17 -0
- package/dist/exceptions/index.d.cts +5 -0
- package/dist/exceptions/validation-field.cjs +3 -0
- package/dist/exceptions/validation-field.d.cts +2 -0
- package/dist/gate-engine-registry.cjs +309 -0
- package/dist/gate-engine-registry.cjs.map +1 -0
- package/dist/gate-engine-registry.d.cts +82 -0
- package/dist/gate-engine-registry.d.ts +3 -2
- package/dist/gate-engine-registry.js +2 -1
- package/dist/gate-engine-registry.js.map +1 -1
- package/dist/gate-v1-payload.schema.cjs +76 -0
- package/dist/gate-v1-payload.schema.cjs.map +1 -0
- package/dist/gate-v1-payload.schema.js +1 -533
- package/dist/gate-v1-payload.schema.js.map +1 -1
- package/dist/hashing.cjs +66 -0
- package/dist/hashing.cjs.map +1 -0
- package/dist/immutable.cjs +77 -0
- package/dist/immutable.cjs.map +1 -0
- package/dist/immutable.d.cts +6 -0
- package/dist/index.cjs +181 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +37 -0
- package/dist/index.d.ts +19 -12
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/invalid-state-transition-exception.cjs +47 -0
- package/dist/invalid-state-transition-exception.cjs.map +1 -0
- package/dist/invariant-violation-exception.cjs +16 -0
- package/dist/invariant-violation-exception.cjs.map +1 -0
- package/dist/not-found-error.cjs +65 -0
- package/dist/not-found-error.cjs.map +1 -0
- package/dist/not-found-error.js +1 -1
- package/dist/outcome.cjs +97 -0
- package/dist/outcome.cjs.map +1 -0
- package/dist/outcome.d.cts +58 -0
- package/dist/outcome.d.ts +1 -83
- package/dist/parse-gate-payload.d.cts +62 -0
- package/dist/parse-gate-payload.d.ts +2 -2
- package/dist/path.d.cts +90 -0
- package/dist/path.d.ts +2 -2
- package/dist/plugin.cjs +79 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts +85 -0
- package/dist/plugins/index.cjs +3 -0
- package/dist/plugins/index.d.cts +2 -0
- package/dist/policies/engines/index.cjs +10 -0
- package/dist/policies/engines/index.d.cts +4 -0
- package/dist/policies/engines/index.d.ts +1 -1
- package/dist/policies/engines/v1/gate/index.cjs +92 -0
- package/dist/policies/engines/v1/gate/index.cjs.map +1 -0
- package/dist/policies/engines/v1/gate/index.d.cts +121 -0
- package/dist/policies/engines/v1/gate/index.d.ts +2 -2
- package/dist/policies/engines/v1/gate/index.js +2 -1
- package/dist/policies/engines/v1/gate/index.js.map +1 -1
- package/dist/policies/index.cjs +41 -0
- package/dist/policies/index.d.cts +8 -0
- package/dist/policies/index.d.ts +3 -2
- package/dist/policies/index.js +2 -2
- package/dist/policy-bridge.cjs +437 -0
- package/dist/policy-bridge.cjs.map +1 -0
- package/dist/policy-bridge.d.cts +185 -0
- package/dist/policy-bridge.d.ts +185 -0
- package/dist/policy-bridge.js +396 -0
- package/dist/policy-bridge.js.map +1 -0
- package/dist/policy-service.cjs +1190 -0
- package/dist/policy-service.cjs.map +1 -0
- package/dist/policy-service.d.cts +559 -0
- package/dist/policy-service.d.ts +2 -2
- package/dist/policy-service.js +239 -239
- package/dist/policy-service.js.map +1 -1
- package/dist/rbac/index.cjs +9 -0
- package/dist/rbac/index.d.cts +3 -0
- package/dist/rbac/index.d.ts +3 -0
- package/dist/rbac/index.js +2 -0
- package/dist/requested-by.cjs +54 -0
- package/dist/requested-by.cjs.map +1 -0
- package/dist/requested-by.d.cts +25 -0
- package/dist/requested-by.d.ts +25 -0
- package/dist/requested-by.js +49 -0
- package/dist/requested-by.js.map +1 -0
- package/dist/result/index.cjs +7 -0
- package/dist/result/index.d.cts +3 -0
- package/dist/result/index.d.ts +2 -1
- package/dist/result.cjs +135 -0
- package/dist/result.cjs.map +1 -0
- package/dist/result.d.cts +84 -0
- package/dist/result.d.ts +84 -0
- package/dist/rule.cjs +327 -0
- package/dist/rule.cjs.map +1 -0
- package/dist/rule.js +298 -0
- package/dist/rule.js.map +1 -0
- package/dist/ruleset-registry.cjs +47 -0
- package/dist/ruleset-registry.cjs.map +1 -0
- package/dist/rulesets/index.cjs +3 -0
- package/dist/rulesets/index.d.cts +2 -0
- package/dist/temporal-guards.cjs +32 -0
- package/dist/temporal-guards.cjs.map +1 -0
- package/dist/temporal-use-case.cjs +139 -0
- package/dist/temporal-use-case.cjs.map +1 -0
- package/dist/temporal-use-case.d.cts +282 -0
- package/dist/temporal-use-case.d.ts +5 -27
- package/dist/temporal-use-case.js +2 -48
- package/dist/temporal-use-case.js.map +1 -1
- package/dist/unexpected-error.cjs +19 -0
- package/dist/unexpected-error.cjs.map +1 -0
- package/dist/unexpected-error.js +2 -167
- package/dist/unexpected-error.js.map +1 -1
- package/dist/use-case.cjs +96 -0
- package/dist/use-case.cjs.map +1 -0
- package/dist/uuid-identifier.cjs +65 -0
- package/dist/uuid-identifier.cjs.map +1 -0
- package/dist/uuid-identifier.d.cts +147 -0
- package/dist/uuid-identifier.d.ts +2 -85
- package/dist/validation-code.cjs +60 -0
- package/dist/validation-code.cjs.map +1 -0
- package/dist/validation-code.d.cts +23 -0
- package/dist/validation-error.cjs +887 -0
- package/dist/validation-error.cjs.map +1 -0
- package/dist/validation-error.d.cts +681 -0
- package/dist/validation-error.d.ts +2 -98
- package/dist/validation-error.js +7 -134
- package/dist/validation-error.js.map +1 -1
- package/dist/validation-exception.cjs +41 -0
- package/dist/validation-exception.cjs.map +1 -0
- package/dist/validation-exception.d.cts +50 -0
- package/dist/validation-field.cjs +28 -0
- package/dist/validation-field.cjs.map +1 -0
- package/dist/validation-field.d.cts +12 -0
- package/dist/value-object-ruleset.contracts.d.cts +36 -0
- package/dist/value-object.cjs +85 -0
- package/dist/value-object.cjs.map +1 -0
- package/dist/value-object.d.cts +89 -0
- package/dist/value-object.d.ts +89 -0
- package/dist/value-object.js +1 -112
- package/dist/value-object.js.map +1 -1
- package/dist/version.d.cts +10 -0
- package/dist/versioning/index.cjs +7 -0
- package/dist/versioning/index.d.cts +3 -0
- package/meta.json +19 -4
- package/package.json +173 -28
- package/src/abac/index.ts +1 -0
- package/src/core/abac/abac-request.ts +29 -0
- package/src/core/abac/attributes.ts +39 -0
- package/src/core/abac/authorizer.ts +108 -0
- package/src/core/abac/combining.ts +63 -0
- package/src/core/abac/composite-authorizer.ts +45 -0
- package/src/core/abac/domain/policy-set.ts +52 -0
- package/src/core/abac/domain/rule.ts +197 -0
- package/src/core/abac/index.ts +21 -0
- package/src/core/application/ports/abac-authorizer.port.ts +20 -0
- package/src/core/application/ports/authorizer.port.ts +22 -0
- package/src/core/errors/authorization-error.ts +26 -0
- package/src/core/errors/error-codes.ts +1 -0
- package/src/core/index.ts +7 -0
- package/src/core/rbac/access-request.ts +32 -0
- package/src/core/rbac/authorizer.ts +91 -0
- package/src/core/rbac/domain/grant.ts +96 -0
- package/src/core/rbac/domain/permission-set.ts +67 -0
- package/src/core/rbac/domain/permission.ts +119 -0
- package/src/core/rbac/domain/role.ts +101 -0
- package/src/core/rbac/domain/scope.ts +84 -0
- package/src/core/rbac/index.ts +15 -0
- package/src/core/rbac/policy-bridge.ts +44 -0
- package/src/examples/application/authorize-cancel-order-abac.example.ts +107 -0
- package/src/examples/application/authorize-cancel-order.example.ts +101 -0
- package/src/rbac/index.ts +1 -0
- package/src/version.ts +1 -1
package/dist/hashing.cjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
let node_crypto = require("node:crypto");
|
|
2
|
+
//#region src/core/shared/hashing.ts
|
|
3
|
+
const CIRCULAR_STRUCTURE_MESSAGE = "Cannot stably stringify a circular structure";
|
|
4
|
+
function sha256Hex(value) {
|
|
5
|
+
return (0, node_crypto.createHash)("sha256").update(value, "utf8").digest("hex");
|
|
6
|
+
}
|
|
7
|
+
function sortKeysDeep(value, seen) {
|
|
8
|
+
if (Array.isArray(value)) {
|
|
9
|
+
if (seen.has(value)) throw new TypeError(CIRCULAR_STRUCTURE_MESSAGE);
|
|
10
|
+
seen.add(value);
|
|
11
|
+
const mapped = value.map((item) => sortKeysDeep(item, seen));
|
|
12
|
+
seen.delete(value);
|
|
13
|
+
return mapped;
|
|
14
|
+
}
|
|
15
|
+
if (value instanceof Date) return value;
|
|
16
|
+
if (value && typeof value === "object") {
|
|
17
|
+
if (seen.has(value)) throw new TypeError(CIRCULAR_STRUCTURE_MESSAGE);
|
|
18
|
+
seen.add(value);
|
|
19
|
+
const record = value;
|
|
20
|
+
const ordered = Object.create(null);
|
|
21
|
+
for (const key of Object.keys(record).sort()) ordered[key] = sortKeysDeep(record[key], seen);
|
|
22
|
+
seen.delete(value);
|
|
23
|
+
return ordered;
|
|
24
|
+
}
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Deterministic JSON string with object keys sorted recursively, so key order
|
|
29
|
+
* does not affect the output.
|
|
30
|
+
*
|
|
31
|
+
* Follows `JSON.stringify` semantics for the values it serializes: `undefined`,
|
|
32
|
+
* functions and symbols are dropped, non-finite numbers become `null`, `bigint`
|
|
33
|
+
* throws, and `Map`/`Set` serialize as `{}`. Distinct payloads can therefore
|
|
34
|
+
* collapse to the same string — for collision-resistant hashing use
|
|
35
|
+
* `PolicyHashing.canonicalJson` (policies/utils), which rejects those values
|
|
36
|
+
* up front.
|
|
37
|
+
*
|
|
38
|
+
* @throws {TypeError} On circular references (mirroring `JSON.stringify`).
|
|
39
|
+
*/
|
|
40
|
+
function stableStringify(value) {
|
|
41
|
+
return JSON.stringify(sortKeysDeep(value, /* @__PURE__ */ new WeakSet()));
|
|
42
|
+
}
|
|
43
|
+
function payloadHash(value) {
|
|
44
|
+
return sha256Hex(stableStringify(value));
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
Object.defineProperty(exports, "payloadHash", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function() {
|
|
50
|
+
return payloadHash;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "sha256Hex", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function() {
|
|
56
|
+
return sha256Hex;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "stableStringify", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function() {
|
|
62
|
+
return stableStringify;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=hashing.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashing.cjs","names":[],"sources":["../src/core/shared/hashing.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\n\nconst CIRCULAR_STRUCTURE_MESSAGE =\n \"Cannot stably stringify a circular structure\";\n\nfunction sha256Hex(value: string): string {\n return createHash(\"sha256\").update(value, \"utf8\").digest(\"hex\");\n}\n\n// `seen` holds the current traversal branch so true cycles are rejected while\n// repeated (acyclic) references are still serialized — matching JSON.stringify.\nfunction sortKeysDeep(value: unknown, seen: WeakSet<object>): unknown {\n if (Array.isArray(value)) {\n if (seen.has(value)) {\n throw new TypeError(CIRCULAR_STRUCTURE_MESSAGE);\n }\n seen.add(value);\n const mapped = value.map((item) => sortKeysDeep(item, seen));\n seen.delete(value);\n return mapped;\n }\n\n if (value instanceof Date) {\n return value;\n }\n\n if (value && typeof value === \"object\") {\n if (seen.has(value)) {\n throw new TypeError(CIRCULAR_STRUCTURE_MESSAGE);\n }\n seen.add(value);\n const record = value as Record<string, unknown>;\n const ordered = Object.create(null) as Record<string, unknown>;\n\n for (const key of Object.keys(record).sort()) {\n ordered[key] = sortKeysDeep(record[key], seen);\n }\n seen.delete(value);\n\n return ordered;\n }\n\n return value;\n}\n\n/**\n * Deterministic JSON string with object keys sorted recursively, so key order\n * does not affect the output.\n *\n * Follows `JSON.stringify` semantics for the values it serializes: `undefined`,\n * functions and symbols are dropped, non-finite numbers become `null`, `bigint`\n * throws, and `Map`/`Set` serialize as `{}`. Distinct payloads can therefore\n * collapse to the same string — for collision-resistant hashing use\n * `PolicyHashing.canonicalJson` (policies/utils), which rejects those values\n * up front.\n *\n * @throws {TypeError} On circular references (mirroring `JSON.stringify`).\n */\nfunction stableStringify(value: unknown): string {\n return JSON.stringify(sortKeysDeep(value, new WeakSet<object>()));\n}\n\nfunction payloadHash(value: unknown): string {\n return sha256Hex(stableStringify(value));\n}\n\nexport { payloadHash, sha256Hex, stableStringify };\n"],"mappings":";;AAEA,MAAM,6BACF;AAEJ,SAAS,UAAU,OAAuB;CACtC,QAAA,GAAA,YAAA,YAAkB,QAAQ,EAAE,OAAO,OAAO,MAAM,EAAE,OAAO,KAAK;AAClE;AAIA,SAAS,aAAa,OAAgB,MAAgC;CAClE,IAAI,MAAM,QAAQ,KAAK,GAAG;EACtB,IAAI,KAAK,IAAI,KAAK,GACd,MAAM,IAAI,UAAU,0BAA0B;EAElD,KAAK,IAAI,KAAK;EACd,MAAM,SAAS,MAAM,KAAK,SAAS,aAAa,MAAM,IAAI,CAAC;EAC3D,KAAK,OAAO,KAAK;EACjB,OAAO;CACX;CAEA,IAAI,iBAAiB,MACjB,OAAO;CAGX,IAAI,SAAS,OAAO,UAAU,UAAU;EACpC,IAAI,KAAK,IAAI,KAAK,GACd,MAAM,IAAI,UAAU,0BAA0B;EAElD,KAAK,IAAI,KAAK;EACd,MAAM,SAAS;EACf,MAAM,UAAU,OAAO,OAAO,IAAI;EAElC,KAAK,MAAM,OAAO,OAAO,KAAK,MAAM,EAAE,KAAK,GACvC,QAAQ,OAAO,aAAa,OAAO,MAAM,IAAI;EAEjD,KAAK,OAAO,KAAK;EAEjB,OAAO;CACX;CAEA,OAAO;AACX;;;;;;;;;;;;;;AAeA,SAAS,gBAAgB,OAAwB;CAC7C,OAAO,KAAK,UAAU,aAAa,uBAAO,IAAI,QAAgB,CAAC,CAAC;AACpE;AAEA,SAAS,YAAY,OAAwB;CACzC,OAAO,UAAU,gBAAgB,KAAK,CAAC;AAC3C"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const require_invariant_violation_exception = require("./invariant-violation-exception.cjs");
|
|
2
|
+
//#region src/core/versioning/version.ts
|
|
3
|
+
const CONTRACT_VERSION_PROPERTY = "CONTRACT_VERSION";
|
|
4
|
+
const CONTRACT_VERSION_PATTERN = /^\d+\.\d+$/;
|
|
5
|
+
function version(contractVersion) {
|
|
6
|
+
if (!CONTRACT_VERSION_PATTERN.test(contractVersion)) throw new TypeError(`Invalid contract version "${contractVersion}". Expected MAJOR.MINOR.`);
|
|
7
|
+
return (target) => {
|
|
8
|
+
Object.defineProperty(target, CONTRACT_VERSION_PROPERTY, {
|
|
9
|
+
value: contractVersion,
|
|
10
|
+
writable: false,
|
|
11
|
+
configurable: false,
|
|
12
|
+
enumerable: false
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region \0@oxc-project+runtime@0.132.0/helpers/decorate.js
|
|
18
|
+
function __decorate(decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/core/shared/immutable.ts
|
|
26
|
+
function deepFreeze(value) {
|
|
27
|
+
return deepFreezeInternal(value, /* @__PURE__ */ new WeakSet());
|
|
28
|
+
}
|
|
29
|
+
function deepFreezeInternal(value, seen) {
|
|
30
|
+
if (typeof value !== "object" || value === null || value instanceof Date) return value;
|
|
31
|
+
if (seen.has(value)) return value;
|
|
32
|
+
seen.add(value);
|
|
33
|
+
if (Array.isArray(value)) {
|
|
34
|
+
for (const item of value) deepFreezeInternal(item, seen);
|
|
35
|
+
return Object.freeze(value);
|
|
36
|
+
}
|
|
37
|
+
const objectValue = value;
|
|
38
|
+
for (const propertyKey of Reflect.ownKeys(objectValue)) deepFreezeInternal(objectValue[propertyKey], seen);
|
|
39
|
+
return Object.freeze(value);
|
|
40
|
+
}
|
|
41
|
+
function makeImmutable(value) {
|
|
42
|
+
if (typeof value !== "object" || value === null) return value;
|
|
43
|
+
let snapshot;
|
|
44
|
+
try {
|
|
45
|
+
snapshot = structuredClone(value);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
throw new require_invariant_violation_exception.InvariantViolationException(`makeImmutable requires a structured-cloneable value: ${error instanceof Error ? error.message : String(error)}`);
|
|
48
|
+
}
|
|
49
|
+
return deepFreeze(snapshot);
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
Object.defineProperty(exports, "CONTRACT_VERSION_PROPERTY", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function() {
|
|
55
|
+
return CONTRACT_VERSION_PROPERTY;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "__decorate", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function() {
|
|
61
|
+
return __decorate;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "makeImmutable", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function() {
|
|
67
|
+
return makeImmutable;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "version", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function() {
|
|
73
|
+
return version;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=immutable.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"immutable.cjs","names":["InvariantViolationException"],"sources":["../src/core/versioning/version.ts","../src/core/shared/immutable.ts"],"sourcesContent":["type ContractVersion = `${number}.${number}`;\n\ntype VersionedTarget = {\n readonly prototype: object;\n};\n\nconst CONTRACT_VERSION_PROPERTY = \"CONTRACT_VERSION\" as const;\nconst CONTRACT_VERSION_PATTERN = /^\\d+\\.\\d+$/;\n\nfunction version<const TVersion extends ContractVersion>(\n contractVersion: TVersion,\n) {\n if (!CONTRACT_VERSION_PATTERN.test(contractVersion)) {\n throw new TypeError(\n `Invalid contract version \"${contractVersion}\". Expected MAJOR.MINOR.`,\n );\n }\n\n return (target: VersionedTarget): void => {\n Object.defineProperty(target, CONTRACT_VERSION_PROPERTY, {\n value: contractVersion,\n writable: false,\n configurable: false,\n enumerable: false,\n });\n };\n}\n\nexport {\n CONTRACT_VERSION_PROPERTY,\n type ContractVersion,\n version,\n type VersionedTarget,\n};\n","import { InvariantViolationException } from \"../exceptions/invariant-violation-exception.js\";\n\ntype PrimitiveValue =\n | bigint\n | boolean\n | null\n | number\n | string\n | symbol\n | undefined;\n\ntype DeepReadonly<T> = T extends PrimitiveValue | Date\n ? T\n : T extends readonly (infer TItem)[]\n ? readonly DeepReadonly<TItem>[]\n : { readonly [TKey in keyof T]: DeepReadonly<T[TKey]> };\n\nfunction deepFreeze<T>(value: T): T {\n return deepFreezeInternal(value, new WeakSet<object>());\n}\n\nfunction deepFreezeInternal<T>(value: T, seen: WeakSet<object>): T {\n // Primitives and `null` need no freezing. `Date` is intentionally returned\n // as-is: `Object.freeze` cannot stop a Date's mutators (`setTime`,\n // `setFullYear`, …) because they write an internal slot, not an own\n // property — freezing it is a no-op against mutation. `makeImmutable`\n // already hands us a `structuredClone` copy, so the caller's original Date\n // is never aliased; deep-freezing of nested Dates is deliberately skipped.\n if (typeof value !== \"object\" || value === null || value instanceof Date) {\n return value;\n }\n\n // A value already on `seen` has been visited on this pass (cyclic graph or a\n // shared reference); revisiting it would recurse forever.\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n\n if (Array.isArray(value)) {\n for (const item of value) {\n deepFreezeInternal(item, seen);\n }\n\n return Object.freeze(value);\n }\n\n const objectValue = value as Record<PropertyKey, object | PrimitiveValue>;\n\n for (const propertyKey of Reflect.ownKeys(objectValue)) {\n deepFreezeInternal(objectValue[propertyKey], seen);\n }\n\n return Object.freeze(value);\n}\n\nfunction makeImmutable<T>(value: T): DeepReadonly<T> {\n if (typeof value !== \"object\" || value === null) {\n return value as DeepReadonly<T>;\n }\n\n let snapshot: T;\n try {\n snapshot = structuredClone(value);\n } catch (error) {\n // `structuredClone` throws `DataCloneError` for functions, symbols and\n // class instances. Surface it as a domain invariant instead of leaking\n // a host-specific runtime error to callers building value objects.\n throw new InvariantViolationException(\n `makeImmutable requires a structured-cloneable value: ${\n error instanceof Error ? error.message : String(error)\n }`,\n );\n }\n\n return deepFreeze(snapshot) as DeepReadonly<T>;\n}\n\nexport { deepFreeze, makeImmutable, type DeepReadonly };\n"],"mappings":";;AAMA,MAAM,4BAA4B;AAClC,MAAM,2BAA2B;AAEjC,SAAS,QACL,iBACF;CACE,IAAI,CAAC,yBAAyB,KAAK,eAAe,GAC9C,MAAM,IAAI,UACN,6BAA6B,gBAAgB,yBACjD;CAGJ,QAAQ,WAAkC;EACtC,OAAO,eAAe,QAAQ,2BAA2B;GACrD,OAAO;GACP,UAAU;GACV,cAAc;GACd,YAAY;EAChB,CAAC;CACL;AACJ;;;;;;;;;;;ACTA,SAAS,WAAc,OAAa;CAChC,OAAO,mBAAmB,uBAAO,IAAI,QAAgB,CAAC;AAC1D;AAEA,SAAS,mBAAsB,OAAU,MAA0B;CAO/D,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,iBAAiB,MAChE,OAAO;CAKX,IAAI,KAAK,IAAI,KAAK,GACd,OAAO;CAEX,KAAK,IAAI,KAAK;CAEd,IAAI,MAAM,QAAQ,KAAK,GAAG;EACtB,KAAK,MAAM,QAAQ,OACf,mBAAmB,MAAM,IAAI;EAGjC,OAAO,OAAO,OAAO,KAAK;CAC9B;CAEA,MAAM,cAAc;CAEpB,KAAK,MAAM,eAAe,QAAQ,QAAQ,WAAW,GACjD,mBAAmB,YAAY,cAAc,IAAI;CAGrD,OAAO,OAAO,OAAO,KAAK;AAC9B;AAEA,SAAS,cAAiB,OAA2B;CACjD,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,OAAO;CAGX,IAAI;CACJ,IAAI;EACA,WAAW,gBAAgB,KAAK;CACpC,SAAS,OAAO;EAIZ,MAAM,IAAIA,sCAAAA,4BACN,wDACI,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAE7D;CACJ;CAEA,OAAO,WAAW,QAAQ;AAC9B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/core/shared/immutable.d.ts
|
|
2
|
+
type PrimitiveValue = bigint | boolean | null | number | string | symbol | undefined;
|
|
3
|
+
type DeepReadonly<T> = T extends PrimitiveValue | Date ? T : T extends readonly (infer TItem)[] ? readonly DeepReadonly<TItem>[] : { readonly [TKey in keyof T]: DeepReadonly<T[TKey]> };
|
|
4
|
+
//#endregion
|
|
5
|
+
export { DeepReadonly as t };
|
|
6
|
+
//# sourceMappingURL=immutable.d.cts.map
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_app_error = require("./app-error.cjs");
|
|
3
|
+
const require_validation_error = require("./validation-error.cjs");
|
|
4
|
+
const require_authorization_error = require("./authorization-error.cjs");
|
|
5
|
+
const require_not_found_error = require("./not-found-error.cjs");
|
|
6
|
+
const require_hashing = require("./hashing.cjs");
|
|
7
|
+
const require_unexpected_error = require("./unexpected-error.cjs");
|
|
8
|
+
const require_validation_code = require("./validation-code.cjs");
|
|
9
|
+
const require_validation_field = require("./validation-field.cjs");
|
|
10
|
+
const require_domain_exception = require("./domain-exception.cjs");
|
|
11
|
+
const require_invalid_state_transition_exception = require("./invalid-state-transition-exception.cjs");
|
|
12
|
+
const require_invariant_violation_exception = require("./invariant-violation-exception.cjs");
|
|
13
|
+
const require_validation_exception = require("./validation-exception.cjs");
|
|
14
|
+
const require_immutable = require("./immutable.cjs");
|
|
15
|
+
const require_use_case = require("./use-case.cjs");
|
|
16
|
+
const require_requested_by = require("./requested-by.cjs");
|
|
17
|
+
const require_temporal_use_case = require("./temporal-use-case.cjs");
|
|
18
|
+
const require_entity = require("./entity.cjs");
|
|
19
|
+
const require_plugin = require("./plugin.cjs");
|
|
20
|
+
const require_value_object = require("./value-object.cjs");
|
|
21
|
+
const require_uuid_identifier = require("./uuid-identifier.cjs");
|
|
22
|
+
const require_ruleset_registry = require("./ruleset-registry.cjs");
|
|
23
|
+
const require_result = require("./result.cjs");
|
|
24
|
+
const require_policy_bridge = require("./policy-bridge.cjs");
|
|
25
|
+
const require_rule = require("./rule.cjs");
|
|
26
|
+
const require_condition_evaluator = require("./condition-evaluator.cjs");
|
|
27
|
+
const require_policy_service = require("./policy-service.cjs");
|
|
28
|
+
const require_domain_event_contracts = require("./domain-event-contracts.cjs");
|
|
29
|
+
const require_outcome = require("./outcome.cjs");
|
|
30
|
+
const require_gate_engine_registry = require("./gate-engine-registry.cjs");
|
|
31
|
+
//#region src/version.ts
|
|
32
|
+
const version$1 = "1.4.0";
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/index.ts
|
|
35
|
+
const ERP_CORE_NAME = "erp-core";
|
|
36
|
+
const ERP_CORE_VERSION = version$1;
|
|
37
|
+
const erpCoreRelease = {
|
|
38
|
+
name: ERP_CORE_NAME,
|
|
39
|
+
version: ERP_CORE_VERSION
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
exports.AbacAuthorizer = require_rule.AbacAuthorizer;
|
|
43
|
+
exports.AbacPolicySet = require_rule.AbacPolicySet;
|
|
44
|
+
exports.AbacRule = require_rule.AbacRule;
|
|
45
|
+
exports.AlreadyExistsError = require_validation_error.AlreadyExistsError;
|
|
46
|
+
exports.AppError = require_app_error.AppError;
|
|
47
|
+
exports.AuthenticationError = require_validation_error.AuthenticationError;
|
|
48
|
+
exports.AuthorizationError = require_authorization_error.AuthorizationError;
|
|
49
|
+
exports.BusinessRuleViolationError = require_not_found_error.BusinessRuleViolationError;
|
|
50
|
+
exports.BusinessRuleViolationException = require_invalid_state_transition_exception.BusinessRuleViolationException;
|
|
51
|
+
exports.CONTRACT_VERSION_PROPERTY = require_immutable.CONTRACT_VERSION_PROPERTY;
|
|
52
|
+
Object.defineProperty(exports, "Command", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function() {
|
|
55
|
+
return require_temporal_use_case.Command;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
exports.CompositeAuthorizer = require_rule.CompositeAuthorizer;
|
|
59
|
+
exports.ComputeEngineRegistry = require_gate_engine_registry.ComputeEngineRegistry;
|
|
60
|
+
exports.ComputeEvaluatorRegistry = require_gate_engine_registry.ComputeEvaluatorRegistry;
|
|
61
|
+
exports.ComputePayloadParserRegistry = require_gate_engine_registry.ComputePayloadParserRegistry;
|
|
62
|
+
exports.ComputePayloadParsers = require_gate_engine_registry.ComputePayloadParsers;
|
|
63
|
+
exports.ComputeRegistry = require_gate_engine_registry.ComputeRegistry;
|
|
64
|
+
exports.ConflictError = require_validation_error.ConflictError;
|
|
65
|
+
exports.ContextResolverRegistry = require_policy_service.ContextResolverRegistry;
|
|
66
|
+
exports.ContextSeedValidator = require_policy_service.ContextSeedValidator;
|
|
67
|
+
exports.CoreConfig = require_condition_evaluator.CoreConfig;
|
|
68
|
+
exports.DeserializationError = require_validation_error.SerializationInError;
|
|
69
|
+
exports.DomainException = require_domain_exception.DomainException;
|
|
70
|
+
exports.DuplicateError = require_validation_error.DuplicateError;
|
|
71
|
+
exports.ERP_CORE_NAME = ERP_CORE_NAME;
|
|
72
|
+
exports.ERP_CORE_VERSION = ERP_CORE_VERSION;
|
|
73
|
+
Object.defineProperty(exports, "Entity", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function() {
|
|
76
|
+
return require_entity.Entity;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
exports.EntityNotFoundException = require_invalid_state_transition_exception.EntityNotFoundException;
|
|
80
|
+
exports.Err = require_result.Err;
|
|
81
|
+
exports.ErrorCodes = require_app_error.ErrorCodes;
|
|
82
|
+
exports.ExpiredError = require_validation_error.ExpiredError;
|
|
83
|
+
exports.GateEngineRegistry = require_gate_engine_registry.GateEngineRegistry;
|
|
84
|
+
exports.GatePayloadParsers = require_gate_engine_registry.GatePayloadParsers;
|
|
85
|
+
exports.Grant = require_policy_bridge.Grant;
|
|
86
|
+
exports.IdempotencyError = require_validation_error.IdempotencyError;
|
|
87
|
+
exports.IdempotencyInProgressError = require_validation_error.IdempotencyInProgressError;
|
|
88
|
+
exports.IdempotencyKeyMissingError = require_validation_error.IdempotencyKeyMissingError;
|
|
89
|
+
exports.IdempotencyPayloadMismatchError = require_validation_error.IdempotencyPayloadMismatchError;
|
|
90
|
+
exports.IdempotencyReplayNotSupportedError = require_validation_error.IdempotencyReplayNotSupportedError;
|
|
91
|
+
exports.InMemoryPolicyDefinitionRepository = require_policy_service.InMemoryPolicyDefinitionRepository;
|
|
92
|
+
exports.IntegrationError = require_validation_error.IntegrationError;
|
|
93
|
+
exports.InvalidStateTransitionException = require_invalid_state_transition_exception.InvalidStateTransitionException;
|
|
94
|
+
exports.InvalidValueException = require_validation_exception.InvalidValueException;
|
|
95
|
+
exports.InvariantViolationException = require_invariant_violation_exception.InvariantViolationException;
|
|
96
|
+
exports.LegacyIncompatibleError = require_validation_error.LegacyIncompatibleError;
|
|
97
|
+
exports.MultipleValidationException = require_validation_exception.MultipleValidationException;
|
|
98
|
+
exports.NotFoundError = require_not_found_error.NotFoundError;
|
|
99
|
+
exports.NotYetValidError = require_validation_error.NotYetValidError;
|
|
100
|
+
exports.Ok = require_result.Ok;
|
|
101
|
+
exports.Outcome = require_outcome.Outcome;
|
|
102
|
+
exports.Permission = require_policy_bridge.Permission;
|
|
103
|
+
exports.PermissionSet = require_policy_bridge.PermissionSet;
|
|
104
|
+
exports.PluginManager = require_plugin.PluginManager;
|
|
105
|
+
exports.PolicyAsOfResolver = require_policy_service.PolicyAsOfResolver;
|
|
106
|
+
exports.PolicyCatalog = require_policy_service.PolicyCatalog;
|
|
107
|
+
exports.PolicyCatalogFactory = require_policy_service.PolicyCatalogFactory;
|
|
108
|
+
exports.PolicyContextBuilder = require_policy_service.PolicyContextBuilder;
|
|
109
|
+
exports.PolicyContextPath = require_condition_evaluator.PolicyContextPath;
|
|
110
|
+
exports.PolicyDefinition = require_policy_service.PolicyDefinition;
|
|
111
|
+
exports.PolicyEvaluationErrors = require_policy_service.PolicyEvaluationErrors;
|
|
112
|
+
exports.PolicyHashing = require_policy_service.PolicyHashing;
|
|
113
|
+
exports.PolicyKey = require_policy_service.PolicyKey;
|
|
114
|
+
exports.PolicyResolver = require_policy_service.PolicyResolver;
|
|
115
|
+
exports.PolicyScopeMatcher = require_policy_service.PolicyScopeMatcher;
|
|
116
|
+
exports.PolicyService = require_policy_service.PolicyService;
|
|
117
|
+
Object.defineProperty(exports, "Query", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function() {
|
|
120
|
+
return require_temporal_use_case.Query;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
exports.RbacAuthorizer = require_policy_bridge.RbacAuthorizer;
|
|
124
|
+
exports.RequestedBy = require_requested_by.RequestedBy;
|
|
125
|
+
exports.Result = require_result.Result;
|
|
126
|
+
exports.Role = require_policy_bridge.Role;
|
|
127
|
+
exports.RulesetRegistry = require_ruleset_registry.RulesetRegistry;
|
|
128
|
+
exports.Scope = require_policy_bridge.Scope;
|
|
129
|
+
exports.SerializationCodes = require_validation_error.SerializationCodes;
|
|
130
|
+
exports.SerializationError = require_validation_error.SerializationError;
|
|
131
|
+
exports.SerializationInError = require_validation_error.SerializationInError;
|
|
132
|
+
exports.SerializationMessages = require_validation_error.SerializationMessages;
|
|
133
|
+
exports.SerializationOutError = require_validation_error.SerializationOutError;
|
|
134
|
+
exports.TemporalError = require_validation_error.TemporalError;
|
|
135
|
+
exports.TemporalUseCase = require_temporal_use_case.TemporalUseCase;
|
|
136
|
+
exports.UnexpectedError = require_unexpected_error.UnexpectedError;
|
|
137
|
+
exports.UniqueConstraintViolationError = require_validation_error.UniqueConstraintViolationError;
|
|
138
|
+
Object.defineProperty(exports, "UseCase", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function() {
|
|
141
|
+
return require_use_case.UseCase;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
exports.UuidIdentifier = require_uuid_identifier.UuidIdentifier;
|
|
145
|
+
exports.ValidationCode = require_validation_code.ValidationCode;
|
|
146
|
+
exports.ValidationError = require_validation_error.ValidationError;
|
|
147
|
+
exports.ValidationException = require_validation_exception.ValidationException;
|
|
148
|
+
exports.ValidationField = require_validation_field.ValidationField;
|
|
149
|
+
Object.defineProperty(exports, "ValueObject", {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function() {
|
|
152
|
+
return require_value_object.ValueObject;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
exports.abacContext = require_rule.abacContext;
|
|
156
|
+
exports.asPolicyDecisionId = require_policy_service.asPolicyDecisionId;
|
|
157
|
+
exports.asPolicyDefinitionId = require_policy_service.asPolicyDefinitionId;
|
|
158
|
+
exports.asSchoolId = require_policy_service.asSchoolId;
|
|
159
|
+
exports.asTenantId = require_policy_service.asTenantId;
|
|
160
|
+
exports.assertJsonSafeMetadata = require_app_error.assertJsonSafeMetadata;
|
|
161
|
+
exports.assertTemporalContext = require_temporal_use_case.assertTemporalContext;
|
|
162
|
+
exports.buildDomainEventContractVersions = require_domain_event_contracts.buildDomainEventContractVersions;
|
|
163
|
+
exports.contextResolverRegistry = require_policy_service.contextResolverRegistry;
|
|
164
|
+
exports.coreConfig = require_condition_evaluator.coreConfig;
|
|
165
|
+
exports.createDomainEventEnvelope = require_domain_event_contracts.createDomainEventEnvelope;
|
|
166
|
+
exports.createTemporalContext = require_temporal_use_case.createTemporalContext;
|
|
167
|
+
exports.erpCoreRelease = erpCoreRelease;
|
|
168
|
+
exports.evaluateTemporalWindow = require_validation_error.evaluateTemporalWindow;
|
|
169
|
+
exports.mapPolicyEvaluationError = require_temporal_use_case.mapPolicyEvaluationError;
|
|
170
|
+
exports.payloadHash = require_hashing.payloadHash;
|
|
171
|
+
exports.rbacContextFields = require_policy_bridge.rbacContextFields;
|
|
172
|
+
exports.registerNamespacedContextResolvers = require_policy_service.registerNamespacedContextResolvers;
|
|
173
|
+
exports.registerNamespacedContextResolversIn = require_policy_service.registerNamespacedContextResolversIn;
|
|
174
|
+
exports.safePreview = require_validation_error.safePreview;
|
|
175
|
+
exports.serializationErrorCode = require_app_error.serializationErrorCode;
|
|
176
|
+
exports.sha256Hex = require_hashing.sha256Hex;
|
|
177
|
+
exports.stableStringify = require_hashing.stableStringify;
|
|
178
|
+
exports.translateUniqueViolationToDuplicate = require_validation_error.translateUniqueViolationToDuplicate;
|
|
179
|
+
exports.version = require_immutable.version;
|
|
180
|
+
|
|
181
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["version","version"],"sources":["../src/version.ts","../src/index.ts"],"sourcesContent":["// Versao do kit, sincronizada com package.json por scripts/sync-kit-version.mjs.\n// Nao edite a mao: rode `npm run sync-kit-version` (ou e regenerado no release).\n//\n// Mantemos a versao aqui, dentro de src/, para que a copia full-control seja\n// auto-contida: ao copiar so o conteudo de src/, o entry nao depende de um\n// `../package.json` que deixaria de existir no projeto consumidor.\nexport const version = \"1.4.0\";\n","import { version } from \"./version.js\";\n\nexport * from \"./core/index.js\";\n\nexport const ERP_CORE_NAME = \"erp-core\";\nexport const ERP_CORE_VERSION = version;\n\nexport const erpCoreRelease = {\n name: ERP_CORE_NAME,\n version: ERP_CORE_VERSION,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAaA,YAAU;;;ACFvB,MAAa,gBAAgB;AAC7B,MAAa,mBAAmBC;AAEhC,MAAa,iBAAiB;CAC1B,MAAM;CACN,SAAS;AACb"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { n as RequestedByKind, t as RequestedBy } from "./requested-by.cjs";
|
|
2
|
+
import { a as AbacPolicySet, c as AbacRuleProps, d as AbacAuthorizerPort, f as AbacAttributes, i as AbacDecision, l as RuleEffect, n as CompositeAuthorizer, o as CombiningAlgorithm, p as AbacRequest, r as AbacAuthorizer, s as AbacRule, t as CompositeAccessRequest, u as abacContext } from "./composite-authorizer.cjs";
|
|
3
|
+
import { a as JsonSafeRecord, i as JsonSafePrimitive, n as AppErrorOptions, o as JsonSafeValue, r as ErrorSeverity, t as AppError } from "./app-error.cjs";
|
|
4
|
+
import { i as AuthorizationRequirement, n as AuthorizationErrorMetadata, r as AuthorizationErrorReason, t as AuthorizationError } from "./authorization-error.cjs";
|
|
5
|
+
import { n as Ok, r as Result, t as Err } from "./result.cjs";
|
|
6
|
+
import { n as Outcome, t as CommonOutcomeStatus } from "./outcome.cjs";
|
|
7
|
+
import { C as GateTraceNodeSnapshot, D as VersionedGateEngine, E as PolicyViolation, O as GatePayload, S as GateTraceLeafSnapshot, T as PolicyContext, _ as ConditionEvaluationReportTag, a as PolicyDecisionId, b as GateOutcomeData, c as TenantId, d as asSchoolId, f as asTenantId, g as ConditionEvaluationReportLevel, h as ConditionEvaluationReport, l as asPolicyDecisionId, m as ConditionEvaluationOptions, n as CoreConfigOptions, o as PolicyDefinitionId, p as ConditionEvaluationCause, r as CoreObservabilityConfig, s as SchoolId, t as CoreConfig, u as asPolicyDefinitionId, v as ConditionEvaluatorReporter, w as GateViolationTrace, x as GateStatus, y as GateOutcome } from "./core-config.cjs";
|
|
8
|
+
import { a as PolicyPackage, c as coreConfig, i as PolicyCatalogFactory, n as contextResolverRegistry, o as InMemoryPolicyDefinitionRepository, r as registerNamespacedContextResolvers, s as PolicyHashing, t as PolicyContextPath } from "./path.cjs";
|
|
9
|
+
import { a as PluginContract, i as PipelineReducer, n as BasePlugin, r as InvokeOptions, t as PluginManager } from "./plugin.cjs";
|
|
10
|
+
import { t as DeepReadonly } from "./immutable.cjs";
|
|
11
|
+
import { i as version, n as ContractVersion, r as VersionedTarget, t as CONTRACT_VERSION_PROPERTY } from "./version.cjs";
|
|
12
|
+
import { n as ValueObjectPluginContract, t as ValueObject } from "./value-object.cjs";
|
|
13
|
+
import { a as Permission, i as ScopeProps, n as AccessRequest, o as PermissionProps, r as Scope, t as AuthorizerPort } from "./authorizer.port.cjs";
|
|
14
|
+
import { A as LogPayload, C as UseCase, D as TracerPort, E as TraceSpan, O as MetricLabels, S as MaybePromise, T as TraceAttributeValue, _ as PolicyEvaluationOutput, a as TemporalContext, b as Command, c as CacheStrategy, d as mapPolicyEvaluationError, f as TemporalHistory, g as PolicyEvaluationInput, h as ResultRepository, i as CreateTemporalContextInput, j as LoggerPort, k as MetricsPort, l as Page, m as Repository, n as TemporalUseCaseInput, o as assertTemporalContext, p as TemporalRepository, r as TemporalizedContextSeed, s as createTemporalContext, t as TemporalUseCase, u as Query, v as PolicyPort, w as UseCaseObservability, x as CommandInput, y as PolicyPortError } from "./temporal-use-case.cjs";
|
|
15
|
+
import { A as IdempotencyPayloadMismatchError, B as UniqueConstraintViolation, C as IntegrationErrorMetadata, D as IdempotencyFailureKind, E as IdempotencyErrorMetadata, F as AlreadyExistsError, G as AuthenticationErrorMetadata, H as translateUniqueViolationToDuplicate, I as ConflictError, J as ErrorCodes, K as AuthenticationErrorReason, L as ConflictErrorMetadata, M as payloadHash, N as sha256Hex, O as IdempotencyInProgressError, P as stableStringify, R as ConflictKind, S as IntegrationError, T as IdempotencyError, U as BusinessRuleViolationError, V as UniqueConstraintViolationError, W as AuthenticationError, Y as serializationErrorCode, _ as SerializationMessages, a as TemporalError, b as NotFoundError, c as TemporalPrecision, d as SerializationCodes, f as SerializationDirection, g as SerializationInError, h as SerializationFailureCategory, i as NotYetValidError, j as IdempotencyReplayNotSupportedError, k as IdempotencyKeyMissingError, l as evaluateTemporalWindow, m as SerializationErrorMetadata, n as UnexpectedError, o as TemporalErrorMetadata, p as SerializationError, q as assertJsonSafeMetadata, r as ExpiredError, s as TemporalKind, t as ValidationError, u as SerializationBoundary, v as SerializationOutError, w as IntegrationErrorReason, x as LegacyIncompatibleError, y as safePreview, z as DuplicateError } from "./validation-error.cjs";
|
|
16
|
+
import { t as ValidationCode } from "./validation-code.cjs";
|
|
17
|
+
import { t as ValidationField } from "./validation-field.cjs";
|
|
18
|
+
import { A as PolicyScope, C as BasePolicyDefinitionProps, D as PolicyDefinition, E as GatePolicyDefinitionProps, F as PolicyKey, I as AsOfSource, L as PolicyKind, M as ScopeChain, N as PolicyCatalog, O as PolicyDefinitionProps, P as PolicyCatalogEntryProps, R as PolicyOwner, T as FindCandidatesParams, _ as ContextResolverResilienceOptions, a as PolicyServiceOptions, b as ContextSeed, c as PolicyEvaluationErrors, d as PolicyAsOfResolver, f as PolicyContextBuilder, g as ContextResolverCircuitBreakerOptions, h as registerNamespacedContextResolversIn, i as PolicyService, j as PolicyScopeMatcher, k as PolicyDefinitionStatus, l as PolicyResolver, m as ContextResolverRegistry, n as PolicyDecision, o as PolicyServiceParams, p as PolicyContextBuilderOptions, r as PolicyEvaluationResult, s as PolicyEvaluationError, t as EvaluateInput, u as DeriveAsOfOptions, v as ContextResolverRetryOptions, w as ComputePolicyDefinitionProps, x as ContextSeedValidator, y as ContextValueResolver, z as PolicyScopeLevel } from "./policy-service.cjs";
|
|
19
|
+
import { a as ComputeOutcome, c as VersionedComputeEngine, i as ComputeEvaluatorRegistration, n as ComputeRegistry, o as ComputeOutcomeData, r as ComputeEvaluator, s as ComputeStatus, t as GateEngineRegistry } from "./gate-engine-registry.cjs";
|
|
20
|
+
import { a as ComputePayloadParserRegistry, c as ComputeEvaluatorRegistry, o as ComputePayloadParsers, r as GatePayloadParsers, s as ComputeEngineRegistry } from "./parse-gate-payload.cjs";
|
|
21
|
+
import { n as Entity, r as EntityState, t as UuidIdentifier } from "./uuid-identifier.cjs";
|
|
22
|
+
import { t as DomainException } from "./domain-exception.cjs";
|
|
23
|
+
import { a as InvariantViolationException, c as BusinessRuleViolationException, i as ValidationViolation, n as MultipleValidationException, o as InvalidStateTransitionException, r as ValidationException, s as EntityNotFoundException, t as InvalidValueException } from "./validation-exception.cjs";
|
|
24
|
+
import { a as Ruleset, i as InvariantRuleset, n as RulesetRegistry, o as RulesetId, r as CreationRuleset, t as ValueObjectRuleset } from "./value-object-ruleset.contracts.cjs";
|
|
25
|
+
import { a as GrantProps, i as Grant, n as PermissionSet, o as Role, r as RbacAuthorizer, s as RoleProps, t as rbacContextFields } from "./policy-bridge.cjs";
|
|
26
|
+
import { a as buildDomainEventContractVersions, i as DomainEventEnvelope, n as DomainEventContractSelection, o as createDomainEventEnvelope, r as DomainEventContractVersions, t as CreateDomainEventEnvelopeInput } from "./domain-event-contracts.cjs";
|
|
27
|
+
|
|
28
|
+
//#region src/index.d.ts
|
|
29
|
+
declare const ERP_CORE_NAME = "erp-core";
|
|
30
|
+
declare const ERP_CORE_VERSION = "1.4.0";
|
|
31
|
+
declare const erpCoreRelease: {
|
|
32
|
+
readonly name: "erp-core";
|
|
33
|
+
readonly version: "1.4.0";
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { AbacAttributes, AbacAuthorizer, AbacAuthorizerPort, AbacDecision, AbacPolicySet, AbacRequest, AbacRule, AbacRuleProps, AccessRequest, AlreadyExistsError, AppError, AppErrorOptions, AsOfSource, AuthenticationError, AuthenticationErrorMetadata, AuthenticationErrorReason, AuthorizationError, AuthorizationErrorMetadata, AuthorizationErrorReason, AuthorizationRequirement, AuthorizerPort, BasePlugin, BasePolicyDefinitionProps, BusinessRuleViolationError, BusinessRuleViolationException, CONTRACT_VERSION_PROPERTY, CacheStrategy, CombiningAlgorithm, Command, CommandInput, CommonOutcomeStatus, CompositeAccessRequest, CompositeAuthorizer, ComputeEngineRegistry, ComputeEvaluator, ComputeEvaluatorRegistration, ComputeEvaluatorRegistry, ComputeOutcome, ComputeOutcomeData, ComputePayloadParserRegistry, ComputePayloadParsers, ComputePolicyDefinitionProps, ComputeRegistry, ComputeStatus, ConditionEvaluationCause, ConditionEvaluationOptions, ConditionEvaluationReport, ConditionEvaluationReportLevel, ConditionEvaluationReportTag, ConditionEvaluatorReporter, ConflictError, ConflictErrorMetadata, ConflictKind, ContextResolverCircuitBreakerOptions, ContextResolverRegistry, ContextResolverResilienceOptions, ContextResolverRetryOptions, ContextSeed, ContextSeedValidator, ContextValueResolver, ContractVersion, CoreConfig, CoreConfigOptions, CoreObservabilityConfig, CreateDomainEventEnvelopeInput, CreateTemporalContextInput, CreationRuleset, DeepReadonly, DeriveAsOfOptions, SerializationInError as DeserializationError, SerializationInError, DomainEventContractSelection, DomainEventContractVersions, DomainEventEnvelope, DomainException, DuplicateError, ERP_CORE_NAME, ERP_CORE_VERSION, Entity, EntityNotFoundException, EntityState, Err, ErrorCodes, ErrorSeverity, EvaluateInput, ExpiredError, TemporalErrorMetadata as ExpiredErrorMetadata, TemporalErrorMetadata, TemporalPrecision as ExpiredErrorPrecision, TemporalPrecision, FindCandidatesParams, GateEngineRegistry, GateOutcome, GateOutcomeData, GatePayload, GatePayloadParsers, GatePolicyDefinitionProps, GateStatus, GateTraceLeafSnapshot, GateTraceNodeSnapshot, GateViolationTrace, Grant, GrantProps, IdempotencyError, IdempotencyErrorMetadata, IdempotencyFailureKind, IdempotencyInProgressError, IdempotencyKeyMissingError, IdempotencyPayloadMismatchError, IdempotencyReplayNotSupportedError, InMemoryPolicyDefinitionRepository, IntegrationError, IntegrationErrorMetadata, IntegrationErrorReason, InvalidStateTransitionException, InvalidValueException, InvariantRuleset, InvariantViolationException, InvokeOptions, JsonSafePrimitive, JsonSafeRecord, JsonSafeValue, LegacyIncompatibleError, LogPayload, LoggerPort, MaybePromise, MetricLabels, MetricsPort, MultipleValidationException, NotFoundError, NotYetValidError, Ok, Outcome, Page, Permission, PermissionProps, PermissionSet, PipelineReducer, PluginContract, PluginManager, PolicyAsOfResolver, PolicyCatalog, PolicyCatalogEntryProps, PolicyCatalogFactory, PolicyContext, PolicyContextBuilder, PolicyContextBuilderOptions, PolicyContextPath, PolicyDecision, PolicyDecisionId, PolicyDefinition, PolicyDefinitionId, PolicyDefinitionProps, PolicyDefinitionStatus, PolicyEvaluationError, PolicyEvaluationErrors, PolicyEvaluationInput, PolicyEvaluationOutput, PolicyEvaluationResult, PolicyHashing, PolicyKey, PolicyKind, PolicyOwner, PolicyPackage, PolicyPort, PolicyPortError, PolicyResolver, PolicyScope, PolicyScopeLevel, PolicyScopeMatcher, PolicyService, PolicyServiceOptions, PolicyServiceParams, PolicyViolation, Query, RbacAuthorizer, Repository, RequestedBy, RequestedByKind, Result, ResultRepository, Role, RoleProps, RuleEffect, Ruleset, RulesetId, RulesetRegistry, SchoolId, Scope, ScopeChain, ScopeProps, SerializationBoundary, SerializationCodes, SerializationDirection, SerializationError, SerializationErrorMetadata, SerializationFailureCategory, SerializationMessages, SerializationOutError, TemporalContext, TemporalError, TemporalHistory, TemporalKind, TemporalRepository, TemporalUseCase, TemporalUseCaseInput, TemporalizedContextSeed, TenantId, TraceAttributeValue, TraceSpan, TracerPort, UnexpectedError, UniqueConstraintViolation, UniqueConstraintViolationError, UseCase, UseCaseObservability, UuidIdentifier, ValidationCode, ValidationError, ValidationException, ValidationField, ValidationViolation, ValueObject, ValueObjectPluginContract, ValueObjectRuleset, VersionedComputeEngine, VersionedGateEngine, VersionedTarget, abacContext, asPolicyDecisionId, asPolicyDefinitionId, asSchoolId, asTenantId, assertJsonSafeMetadata, assertTemporalContext, buildDomainEventContractVersions, contextResolverRegistry, coreConfig, createDomainEventEnvelope, createTemporalContext, erpCoreRelease, evaluateTemporalWindow, mapPolicyEvaluationError, payloadHash, rbacContextFields, registerNamespacedContextResolvers, registerNamespacedContextResolversIn, safePreview, serializationErrorCode, sha256Hex, stableStringify, translateUniqueViolationToDuplicate, version };
|
|
37
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { A as MetricLabels, C as RequestedByKind, D as TraceAttributeValue, E as UseCaseObservability, M as LogPayload, N as LoggerPort, O as TraceSpan, S as RequestedBy, T as UseCase, _ as PolicyEvaluationOutput, a as TemporalContext, b as Command, c as CacheStrategy, d as mapPolicyEvaluationError, f as TemporalHistory, g as PolicyEvaluationInput, h as ResultRepository, i as CreateTemporalContextInput, j as MetricsPort, k as TracerPort, l as Page, m as Repository, n as TemporalUseCaseInput, o as assertTemporalContext, p as TemporalRepository, r as TemporalizedContextSeed, s as createTemporalContext, t as TemporalUseCase, u as Query, v as PolicyPort, w as MaybePromise, x as CommandInput, y as PolicyPortError } from "./temporal-use-case.js";
|
|
1
|
+
import { n as RequestedByKind, t as RequestedBy } from "./requested-by.js";
|
|
2
|
+
import { a as AbacPolicySet, c as AbacRuleProps, d as AbacAuthorizerPort, f as AbacAttributes, i as AbacDecision, l as RuleEffect, n as CompositeAuthorizer, o as CombiningAlgorithm, p as AbacRequest, r as AbacAuthorizer, s as AbacRule, t as CompositeAccessRequest, u as abacContext } from "./composite-authorizer.js";
|
|
4
3
|
import { a as JsonSafeRecord, i as JsonSafePrimitive, n as AppErrorOptions, o as JsonSafeValue, r as ErrorSeverity, t as AppError } from "./app-error.js";
|
|
5
|
-
import {
|
|
4
|
+
import { i as AuthorizationRequirement, n as AuthorizationErrorMetadata, r as AuthorizationErrorReason, t as AuthorizationError } from "./authorization-error.js";
|
|
5
|
+
import { n as Ok, r as Result, t as Err } from "./result.js";
|
|
6
|
+
import { n as Outcome, t as CommonOutcomeStatus } from "./outcome.js";
|
|
7
|
+
import { C as GateTraceNodeSnapshot, D as VersionedGateEngine, E as PolicyViolation, O as GatePayload, S as GateTraceLeafSnapshot, T as PolicyContext, _ as ConditionEvaluationReportTag, a as PolicyDecisionId, b as GateOutcomeData, c as TenantId, d as asSchoolId, f as asTenantId, g as ConditionEvaluationReportLevel, h as ConditionEvaluationReport, l as asPolicyDecisionId, m as ConditionEvaluationOptions, n as CoreConfigOptions, o as PolicyDefinitionId, p as ConditionEvaluationCause, r as CoreObservabilityConfig, s as SchoolId, t as CoreConfig, u as asPolicyDefinitionId, v as ConditionEvaluatorReporter, w as GateViolationTrace, x as GateStatus, y as GateOutcome } from "./core-config.js";
|
|
8
|
+
import { a as PolicyPackage, c as coreConfig, i as PolicyCatalogFactory, n as contextResolverRegistry, o as InMemoryPolicyDefinitionRepository, r as registerNamespacedContextResolvers, s as PolicyHashing, t as PolicyContextPath } from "./path.js";
|
|
9
|
+
import { a as PluginContract, i as PipelineReducer, n as BasePlugin, r as InvokeOptions, t as PluginManager } from "./plugin.js";
|
|
10
|
+
import { t as DeepReadonly } from "./immutable.js";
|
|
11
|
+
import { i as version, n as ContractVersion, r as VersionedTarget, t as CONTRACT_VERSION_PROPERTY } from "./version.js";
|
|
12
|
+
import { n as ValueObjectPluginContract, t as ValueObject } from "./value-object.js";
|
|
13
|
+
import { a as Permission, i as ScopeProps, n as AccessRequest, o as PermissionProps, r as Scope, t as AuthorizerPort } from "./authorizer.port.js";
|
|
14
|
+
import { A as LogPayload, C as UseCase, D as TracerPort, E as TraceSpan, O as MetricLabels, S as MaybePromise, T as TraceAttributeValue, _ as PolicyEvaluationOutput, a as TemporalContext, b as Command, c as CacheStrategy, d as mapPolicyEvaluationError, f as TemporalHistory, g as PolicyEvaluationInput, h as ResultRepository, i as CreateTemporalContextInput, j as LoggerPort, k as MetricsPort, l as Page, m as Repository, n as TemporalUseCaseInput, o as assertTemporalContext, p as TemporalRepository, r as TemporalizedContextSeed, s as createTemporalContext, t as TemporalUseCase, u as Query, v as PolicyPort, w as UseCaseObservability, x as CommandInput, y as PolicyPortError } from "./temporal-use-case.js";
|
|
15
|
+
import { A as IdempotencyPayloadMismatchError, B as UniqueConstraintViolation, C as IntegrationErrorMetadata, D as IdempotencyFailureKind, E as IdempotencyErrorMetadata, F as AlreadyExistsError, G as AuthenticationErrorMetadata, H as translateUniqueViolationToDuplicate, I as ConflictError, J as ErrorCodes, K as AuthenticationErrorReason, L as ConflictErrorMetadata, M as payloadHash, N as sha256Hex, O as IdempotencyInProgressError, P as stableStringify, R as ConflictKind, S as IntegrationError, T as IdempotencyError, U as BusinessRuleViolationError, V as UniqueConstraintViolationError, W as AuthenticationError, Y as serializationErrorCode, _ as SerializationMessages, a as TemporalError, b as NotFoundError, c as TemporalPrecision, d as SerializationCodes, f as SerializationDirection, g as SerializationInError, h as SerializationFailureCategory, i as NotYetValidError, j as IdempotencyReplayNotSupportedError, k as IdempotencyKeyMissingError, l as evaluateTemporalWindow, m as SerializationErrorMetadata, n as UnexpectedError, o as TemporalErrorMetadata, p as SerializationError, q as assertJsonSafeMetadata, r as ExpiredError, s as TemporalKind, t as ValidationError, u as SerializationBoundary, v as SerializationOutError, w as IntegrationErrorReason, x as LegacyIncompatibleError, y as safePreview, z as DuplicateError } from "./validation-error.js";
|
|
6
16
|
import { t as ValidationCode } from "./validation-code.js";
|
|
7
17
|
import { t as ValidationField } from "./validation-field.js";
|
|
8
|
-
import { A as ConditionEvaluationReportTag, C as asPolicyDefinitionId, D as ConditionEvaluationOptions, E as ConditionEvaluationCause, O as ConditionEvaluationReport, S as asPolicyDecisionId, T as asTenantId, a as GateTraceNodeSnapshot, b as SchoolId, c as PolicyViolation, g as CoreObservabilityConfig, h as CoreConfigOptions, i as GateTraceLeafSnapshot, j as ConditionEvaluatorReporter, k as ConditionEvaluationReportLevel, l as VersionedGateEngine, m as CoreConfig, n as GateOutcomeData, o as GateViolationTrace, r as GateStatus, s as PolicyContext, t as GateOutcome, u as GatePayload, v as PolicyDecisionId, w as asSchoolId, x as TenantId, y as PolicyDefinitionId } from "./gate-types.js";
|
|
9
|
-
import { a as PolicyPackage, c as coreConfig, i as PolicyCatalogFactory, n as contextResolverRegistry, o as InMemoryPolicyDefinitionRepository, r as registerNamespacedContextResolvers, s as PolicyHashing, t as PolicyContextPath } from "./path.js";
|
|
10
18
|
import { A as PolicyScope, C as BasePolicyDefinitionProps, D as PolicyDefinition, E as GatePolicyDefinitionProps, F as PolicyKey, I as AsOfSource, L as PolicyKind, M as ScopeChain, N as PolicyCatalog, O as PolicyDefinitionProps, P as PolicyCatalogEntryProps, R as PolicyOwner, T as FindCandidatesParams, _ as ContextResolverResilienceOptions, a as PolicyServiceOptions, b as ContextSeed, c as PolicyEvaluationErrors, d as PolicyAsOfResolver, f as PolicyContextBuilder, g as ContextResolverCircuitBreakerOptions, h as registerNamespacedContextResolversIn, i as PolicyService, j as PolicyScopeMatcher, k as PolicyDefinitionStatus, l as PolicyResolver, m as ContextResolverRegistry, n as PolicyDecision, o as PolicyServiceParams, p as PolicyContextBuilderOptions, r as PolicyEvaluationResult, s as PolicyEvaluationError, t as EvaluateInput, u as DeriveAsOfOptions, v as ContextResolverRetryOptions, w as ComputePolicyDefinitionProps, x as ContextSeedValidator, y as ContextValueResolver, z as PolicyScopeLevel } from "./policy-service.js";
|
|
11
19
|
import { a as ComputeOutcome, c as VersionedComputeEngine, i as ComputeEvaluatorRegistration, n as ComputeRegistry, o as ComputeOutcomeData, r as ComputeEvaluator, s as ComputeStatus, t as GateEngineRegistry } from "./gate-engine-registry.js";
|
|
12
20
|
import { a as ComputePayloadParserRegistry, c as ComputeEvaluatorRegistry, o as ComputePayloadParsers, r as GatePayloadParsers, s as ComputeEngineRegistry } from "./parse-gate-payload.js";
|
|
13
|
-
import { t as
|
|
14
|
-
import { a as EntityState, i as Entity, n as ValueObject, r as ValueObjectPluginContract, t as UuidIdentifier } from "./uuid-identifier.js";
|
|
15
|
-
import { a as PluginContract, i as PipelineReducer, n as BasePlugin, r as InvokeOptions, t as PluginManager } from "./plugin.js";
|
|
21
|
+
import { n as Entity, r as EntityState, t as UuidIdentifier } from "./uuid-identifier.js";
|
|
16
22
|
import { t as DomainException } from "./domain-exception.js";
|
|
17
23
|
import { a as InvariantViolationException, c as BusinessRuleViolationException, i as ValidationViolation, n as MultipleValidationException, o as InvalidStateTransitionException, r as ValidationException, s as EntityNotFoundException, t as InvalidValueException } from "./validation-exception.js";
|
|
18
24
|
import { a as Ruleset, i as InvariantRuleset, n as RulesetRegistry, o as RulesetId, r as CreationRuleset, t as ValueObjectRuleset } from "./value-object-ruleset.contracts.js";
|
|
25
|
+
import { a as GrantProps, i as Grant, n as PermissionSet, o as Role, r as RbacAuthorizer, s as RoleProps, t as rbacContextFields } from "./policy-bridge.js";
|
|
19
26
|
import { a as buildDomainEventContractVersions, i as DomainEventEnvelope, n as DomainEventContractSelection, o as createDomainEventEnvelope, r as DomainEventContractVersions, t as CreateDomainEventEnvelopeInput } from "./domain-event-contracts.js";
|
|
20
27
|
|
|
21
28
|
//#region src/index.d.ts
|
|
22
29
|
declare const ERP_CORE_NAME = "erp-core";
|
|
23
|
-
declare const ERP_CORE_VERSION = "1.
|
|
30
|
+
declare const ERP_CORE_VERSION = "1.4.0";
|
|
24
31
|
declare const erpCoreRelease: {
|
|
25
32
|
readonly name: "erp-core";
|
|
26
|
-
readonly version: "1.
|
|
33
|
+
readonly version: "1.4.0";
|
|
27
34
|
};
|
|
28
35
|
//#endregion
|
|
29
|
-
export { AlreadyExistsError, AppError, AppErrorOptions, AsOfSource, AuthenticationError, AuthenticationErrorMetadata, AuthenticationErrorReason, AuthorizationError, AuthorizationErrorMetadata, AuthorizationErrorReason, AuthorizationRequirement, BasePlugin, BasePolicyDefinitionProps, BusinessRuleViolationError, BusinessRuleViolationException, CONTRACT_VERSION_PROPERTY, CacheStrategy, Command, CommandInput, CommonOutcomeStatus, ComputeEngineRegistry, ComputeEvaluator, ComputeEvaluatorRegistration, ComputeEvaluatorRegistry, ComputeOutcome, ComputeOutcomeData, ComputePayloadParserRegistry, ComputePayloadParsers, ComputePolicyDefinitionProps, ComputeRegistry, ComputeStatus, ConditionEvaluationCause, ConditionEvaluationOptions, ConditionEvaluationReport, ConditionEvaluationReportLevel, ConditionEvaluationReportTag, ConditionEvaluatorReporter, ConflictError, ConflictErrorMetadata, ConflictKind, ContextResolverCircuitBreakerOptions, ContextResolverRegistry, ContextResolverResilienceOptions, ContextResolverRetryOptions, ContextSeed, ContextSeedValidator, ContextValueResolver, ContractVersion, CoreConfig, CoreConfigOptions, CoreObservabilityConfig, CreateDomainEventEnvelopeInput, CreateTemporalContextInput, CreationRuleset, DeepReadonly, DeriveAsOfOptions, SerializationInError as DeserializationError, SerializationInError, DomainEventContractSelection, DomainEventContractVersions, DomainEventEnvelope, DomainException, DuplicateError, ERP_CORE_NAME, ERP_CORE_VERSION, Entity, EntityNotFoundException, EntityState, Err, ErrorCodes, ErrorSeverity, EvaluateInput, ExpiredError, TemporalErrorMetadata as ExpiredErrorMetadata, TemporalErrorMetadata, TemporalPrecision as ExpiredErrorPrecision, TemporalPrecision, FindCandidatesParams, GateEngineRegistry, GateOutcome, GateOutcomeData, GatePayload, GatePayloadParsers, GatePolicyDefinitionProps, GateStatus, GateTraceLeafSnapshot, GateTraceNodeSnapshot, GateViolationTrace, IdempotencyError, IdempotencyErrorMetadata, IdempotencyFailureKind, IdempotencyInProgressError, IdempotencyKeyMissingError, IdempotencyPayloadMismatchError, IdempotencyReplayNotSupportedError, InMemoryPolicyDefinitionRepository, IntegrationError, IntegrationErrorMetadata, IntegrationErrorReason, InvalidStateTransitionException, InvalidValueException, InvariantRuleset, InvariantViolationException, InvokeOptions, JsonSafePrimitive, JsonSafeRecord, JsonSafeValue, LegacyIncompatibleError, LogPayload, LoggerPort, MaybePromise, MetricLabels, MetricsPort, MultipleValidationException, NotFoundError, NotYetValidError, Ok, Outcome, Page, PipelineReducer, PluginContract, PluginManager, PolicyAsOfResolver, PolicyCatalog, PolicyCatalogEntryProps, PolicyCatalogFactory, PolicyContext, PolicyContextBuilder, PolicyContextBuilderOptions, PolicyContextPath, PolicyDecision, PolicyDecisionId, PolicyDefinition, PolicyDefinitionId, PolicyDefinitionProps, PolicyDefinitionStatus, PolicyEvaluationError, PolicyEvaluationErrors, PolicyEvaluationInput, PolicyEvaluationOutput, PolicyEvaluationResult, PolicyHashing, PolicyKey, PolicyKind, PolicyOwner, PolicyPackage, PolicyPort, PolicyPortError, PolicyResolver, PolicyScope, PolicyScopeLevel, PolicyScopeMatcher, PolicyService, PolicyServiceOptions, PolicyServiceParams, PolicyViolation, Query, Repository, RequestedBy, RequestedByKind, Result, ResultRepository, Ruleset, RulesetId, RulesetRegistry, SchoolId, ScopeChain, SerializationBoundary, SerializationCodes, SerializationDirection, SerializationError, SerializationErrorMetadata, SerializationFailureCategory, SerializationMessages, SerializationOutError, TemporalContext, TemporalError, TemporalHistory, TemporalKind, TemporalRepository, TemporalUseCase, TemporalUseCaseInput, TemporalizedContextSeed, TenantId, TraceAttributeValue, TraceSpan, TracerPort, UnexpectedError, UniqueConstraintViolation, UniqueConstraintViolationError, UseCase, UseCaseObservability, UuidIdentifier, ValidationCode, ValidationError, ValidationException, ValidationField, ValidationViolation, ValueObject, ValueObjectPluginContract, ValueObjectRuleset, VersionedComputeEngine, VersionedGateEngine, VersionedTarget, asPolicyDecisionId, asPolicyDefinitionId, asSchoolId, asTenantId, assertJsonSafeMetadata, assertTemporalContext, buildDomainEventContractVersions, contextResolverRegistry, coreConfig, createDomainEventEnvelope, createTemporalContext, erpCoreRelease, evaluateTemporalWindow, mapPolicyEvaluationError, payloadHash, registerNamespacedContextResolvers, registerNamespacedContextResolversIn, safePreview, serializationErrorCode, sha256Hex, stableStringify, translateUniqueViolationToDuplicate, version };
|
|
36
|
+
export { AbacAttributes, AbacAuthorizer, AbacAuthorizerPort, AbacDecision, AbacPolicySet, AbacRequest, AbacRule, AbacRuleProps, AccessRequest, AlreadyExistsError, AppError, AppErrorOptions, AsOfSource, AuthenticationError, AuthenticationErrorMetadata, AuthenticationErrorReason, AuthorizationError, AuthorizationErrorMetadata, AuthorizationErrorReason, AuthorizationRequirement, AuthorizerPort, BasePlugin, BasePolicyDefinitionProps, BusinessRuleViolationError, BusinessRuleViolationException, CONTRACT_VERSION_PROPERTY, CacheStrategy, CombiningAlgorithm, Command, CommandInput, CommonOutcomeStatus, CompositeAccessRequest, CompositeAuthorizer, ComputeEngineRegistry, ComputeEvaluator, ComputeEvaluatorRegistration, ComputeEvaluatorRegistry, ComputeOutcome, ComputeOutcomeData, ComputePayloadParserRegistry, ComputePayloadParsers, ComputePolicyDefinitionProps, ComputeRegistry, ComputeStatus, ConditionEvaluationCause, ConditionEvaluationOptions, ConditionEvaluationReport, ConditionEvaluationReportLevel, ConditionEvaluationReportTag, ConditionEvaluatorReporter, ConflictError, ConflictErrorMetadata, ConflictKind, ContextResolverCircuitBreakerOptions, ContextResolverRegistry, ContextResolverResilienceOptions, ContextResolverRetryOptions, ContextSeed, ContextSeedValidator, ContextValueResolver, ContractVersion, CoreConfig, CoreConfigOptions, CoreObservabilityConfig, CreateDomainEventEnvelopeInput, CreateTemporalContextInput, CreationRuleset, DeepReadonly, DeriveAsOfOptions, SerializationInError as DeserializationError, SerializationInError, DomainEventContractSelection, DomainEventContractVersions, DomainEventEnvelope, DomainException, DuplicateError, ERP_CORE_NAME, ERP_CORE_VERSION, Entity, EntityNotFoundException, EntityState, Err, ErrorCodes, ErrorSeverity, EvaluateInput, ExpiredError, TemporalErrorMetadata as ExpiredErrorMetadata, TemporalErrorMetadata, TemporalPrecision as ExpiredErrorPrecision, TemporalPrecision, FindCandidatesParams, GateEngineRegistry, GateOutcome, GateOutcomeData, GatePayload, GatePayloadParsers, GatePolicyDefinitionProps, GateStatus, GateTraceLeafSnapshot, GateTraceNodeSnapshot, GateViolationTrace, Grant, GrantProps, IdempotencyError, IdempotencyErrorMetadata, IdempotencyFailureKind, IdempotencyInProgressError, IdempotencyKeyMissingError, IdempotencyPayloadMismatchError, IdempotencyReplayNotSupportedError, InMemoryPolicyDefinitionRepository, IntegrationError, IntegrationErrorMetadata, IntegrationErrorReason, InvalidStateTransitionException, InvalidValueException, InvariantRuleset, InvariantViolationException, InvokeOptions, JsonSafePrimitive, JsonSafeRecord, JsonSafeValue, LegacyIncompatibleError, LogPayload, LoggerPort, MaybePromise, MetricLabels, MetricsPort, MultipleValidationException, NotFoundError, NotYetValidError, Ok, Outcome, Page, Permission, PermissionProps, PermissionSet, PipelineReducer, PluginContract, PluginManager, PolicyAsOfResolver, PolicyCatalog, PolicyCatalogEntryProps, PolicyCatalogFactory, PolicyContext, PolicyContextBuilder, PolicyContextBuilderOptions, PolicyContextPath, PolicyDecision, PolicyDecisionId, PolicyDefinition, PolicyDefinitionId, PolicyDefinitionProps, PolicyDefinitionStatus, PolicyEvaluationError, PolicyEvaluationErrors, PolicyEvaluationInput, PolicyEvaluationOutput, PolicyEvaluationResult, PolicyHashing, PolicyKey, PolicyKind, PolicyOwner, PolicyPackage, PolicyPort, PolicyPortError, PolicyResolver, PolicyScope, PolicyScopeLevel, PolicyScopeMatcher, PolicyService, PolicyServiceOptions, PolicyServiceParams, PolicyViolation, Query, RbacAuthorizer, Repository, RequestedBy, RequestedByKind, Result, ResultRepository, Role, RoleProps, RuleEffect, Ruleset, RulesetId, RulesetRegistry, SchoolId, Scope, ScopeChain, ScopeProps, SerializationBoundary, SerializationCodes, SerializationDirection, SerializationError, SerializationErrorMetadata, SerializationFailureCategory, SerializationMessages, SerializationOutError, TemporalContext, TemporalError, TemporalHistory, TemporalKind, TemporalRepository, TemporalUseCase, TemporalUseCaseInput, TemporalizedContextSeed, TenantId, TraceAttributeValue, TraceSpan, TracerPort, UnexpectedError, UniqueConstraintViolation, UniqueConstraintViolationError, UseCase, UseCaseObservability, UuidIdentifier, ValidationCode, ValidationError, ValidationException, ValidationField, ValidationViolation, ValueObject, ValueObjectPluginContract, ValueObjectRuleset, VersionedComputeEngine, VersionedGateEngine, VersionedTarget, abacContext, asPolicyDecisionId, asPolicyDefinitionId, asSchoolId, asTenantId, assertJsonSafeMetadata, assertTemporalContext, buildDomainEventContractVersions, contextResolverRegistry, coreConfig, createDomainEventEnvelope, createTemporalContext, erpCoreRelease, evaluateTemporalWindow, mapPolicyEvaluationError, payloadHash, rbacContextFields, registerNamespacedContextResolvers, registerNamespacedContextResolversIn, safePreview, serializationErrorCode, sha256Hex, stableStringify, translateUniqueViolationToDuplicate, version };
|
|
30
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as translateUniqueViolationToDuplicate, S as UniqueConstraintViolationError,
|
|
1
|
+
import { i as serializationErrorCode, n as assertJsonSafeMetadata, r as ErrorCodes, t as AppError } from "./app-error.js";
|
|
2
|
+
import { C as translateUniqueViolationToDuplicate, S as UniqueConstraintViolationError, _ as IdempotencyPayloadMismatchError, a as evaluateTemporalWindow, b as ConflictError, c as SerializationInError, d as safePreview, f as LegacyIncompatibleError, g as IdempotencyKeyMissingError, h as IdempotencyInProgressError, i as TemporalError, l as SerializationMessages, m as IdempotencyError, n as ExpiredError, o as SerializationCodes, p as IntegrationError, r as NotYetValidError, s as SerializationError, t as ValidationError, u as SerializationOutError, v as IdempotencyReplayNotSupportedError, w as AuthenticationError, x as DuplicateError, y as AlreadyExistsError } from "./validation-error.js";
|
|
3
|
+
import { t as AuthorizationError } from "./authorization-error.js";
|
|
3
4
|
import { n as BusinessRuleViolationError, t as NotFoundError } from "./not-found-error.js";
|
|
4
5
|
import { n as sha256Hex, r as stableStringify, t as payloadHash } from "./hashing.js";
|
|
6
|
+
import { t as UnexpectedError } from "./unexpected-error.js";
|
|
5
7
|
import { t as ValidationCode } from "./validation-code.js";
|
|
6
8
|
import { t as ValidationField } from "./validation-field.js";
|
|
7
9
|
import { t as DomainException } from "./domain-exception.js";
|
|
@@ -10,19 +12,23 @@ import { t as InvariantViolationException } from "./invariant-violation-exceptio
|
|
|
10
12
|
import { n as MultipleValidationException, r as ValidationException, t as InvalidValueException } from "./validation-exception.js";
|
|
11
13
|
import { i as version, r as CONTRACT_VERSION_PROPERTY } from "./immutable.js";
|
|
12
14
|
import { t as UseCase } from "./use-case.js";
|
|
13
|
-
import {
|
|
14
|
-
import { n as
|
|
15
|
+
import { t as RequestedBy } from "./requested-by.js";
|
|
16
|
+
import { a as mapPolicyEvaluationError, i as Query, n as assertTemporalContext, o as Command, r as createTemporalContext, t as TemporalUseCase } from "./temporal-use-case.js";
|
|
17
|
+
import { t as Entity } from "./entity.js";
|
|
15
18
|
import { t as PluginManager } from "./plugin.js";
|
|
19
|
+
import { t as ValueObject } from "./value-object.js";
|
|
16
20
|
import { t as UuidIdentifier } from "./uuid-identifier.js";
|
|
17
21
|
import { t as RulesetRegistry } from "./ruleset-registry.js";
|
|
18
|
-
import { n as createDomainEventEnvelope, t as buildDomainEventContractVersions } from "./domain-event-contracts.js";
|
|
19
|
-
import { c as CoreConfig, o as PolicyContextPath, s as coreConfig } from "./gate-v1-payload.schema.js";
|
|
20
22
|
import { n as Ok, r as Result, t as Err } from "./result.js";
|
|
23
|
+
import { a as Role, i as Scope, n as PermissionSet, o as Permission, r as Grant, s as RbacAuthorizer, t as rbacContextFields } from "./policy-bridge.js";
|
|
24
|
+
import { a as abacContext, i as AbacAuthorizer, n as AbacPolicySet, r as CompositeAuthorizer, t as AbacRule } from "./rule.js";
|
|
25
|
+
import { i as CoreConfig, n as PolicyContextPath, r as coreConfig } from "./condition-evaluator.js";
|
|
26
|
+
import { _ as contextResolverRegistry, a as PolicyDefinition, b as registerNamespacedContextResolversIn, c as PolicyKey, d as asPolicyDecisionId, f as asPolicyDefinitionId, g as ContextSeedValidator, h as PolicyHashing, i as PolicyAsOfResolver, l as PolicyCatalogFactory, m as asTenantId, n as PolicyEvaluationErrors, o as InMemoryPolicyDefinitionRepository, p as asSchoolId, r as PolicyResolver, s as PolicyScopeMatcher, t as PolicyService, u as PolicyCatalog, v as registerNamespacedContextResolvers, x as PolicyContextBuilder, y as ContextResolverRegistry } from "./policy-service.js";
|
|
27
|
+
import { n as createDomainEventEnvelope, t as buildDomainEventContractVersions } from "./domain-event-contracts.js";
|
|
21
28
|
import { t as Outcome } from "./outcome.js";
|
|
22
|
-
import { _ as asPolicyDecisionId, a as ContextSeedValidator, b as asTenantId, c as ContextResolverRegistry, d as PolicyDefinition, f as InMemoryPolicyDefinitionRepository, g as PolicyCatalog, h as PolicyCatalogFactory, i as PolicyAsOfResolver, l as registerNamespacedContextResolversIn, m as PolicyKey, n as PolicyEvaluationErrors, o as contextResolverRegistry, p as PolicyScopeMatcher, r as PolicyResolver, s as registerNamespacedContextResolvers, t as PolicyService, u as PolicyContextBuilder, v as asPolicyDefinitionId, x as PolicyHashing, y as asSchoolId } from "./policy-service.js";
|
|
23
29
|
import { a as ComputeEvaluatorRegistry, c as ComputePayloadParsers, i as ComputeRegistry, o as ComputeEngineRegistry, r as GatePayloadParsers, s as ComputePayloadParserRegistry, t as GateEngineRegistry } from "./gate-engine-registry.js";
|
|
24
30
|
//#region src/version.ts
|
|
25
|
-
const version$1 = "1.
|
|
31
|
+
const version$1 = "1.4.0";
|
|
26
32
|
//#endregion
|
|
27
33
|
//#region src/index.ts
|
|
28
34
|
const ERP_CORE_NAME = "erp-core";
|
|
@@ -32,6 +38,6 @@ const erpCoreRelease = {
|
|
|
32
38
|
version: ERP_CORE_VERSION
|
|
33
39
|
};
|
|
34
40
|
//#endregion
|
|
35
|
-
export { AlreadyExistsError, AppError, AuthenticationError, AuthorizationError, BusinessRuleViolationError, BusinessRuleViolationException, CONTRACT_VERSION_PROPERTY, Command, ComputeEngineRegistry, ComputeEvaluatorRegistry, ComputePayloadParserRegistry, ComputePayloadParsers, ComputeRegistry, ConflictError, ContextResolverRegistry, ContextSeedValidator, CoreConfig, SerializationInError as DeserializationError, SerializationInError, DomainException, DuplicateError, ERP_CORE_NAME, ERP_CORE_VERSION, Entity, EntityNotFoundException, Err, ErrorCodes, ExpiredError, GateEngineRegistry, GatePayloadParsers, IdempotencyError, IdempotencyInProgressError, IdempotencyKeyMissingError, IdempotencyPayloadMismatchError, IdempotencyReplayNotSupportedError, InMemoryPolicyDefinitionRepository, IntegrationError, InvalidStateTransitionException, InvalidValueException, InvariantViolationException, LegacyIncompatibleError, MultipleValidationException, NotFoundError, NotYetValidError, Ok, Outcome, PluginManager, PolicyAsOfResolver, PolicyCatalog, PolicyCatalogFactory, PolicyContextBuilder, PolicyContextPath, PolicyDefinition, PolicyEvaluationErrors, PolicyHashing, PolicyKey, PolicyResolver, PolicyScopeMatcher, PolicyService, Query, RequestedBy, Result, RulesetRegistry, SerializationCodes, SerializationError, SerializationMessages, SerializationOutError, TemporalError, TemporalUseCase, UnexpectedError, UniqueConstraintViolationError, UseCase, UuidIdentifier, ValidationCode, ValidationError, ValidationException, ValidationField, ValueObject, asPolicyDecisionId, asPolicyDefinitionId, asSchoolId, asTenantId, assertJsonSafeMetadata, assertTemporalContext, buildDomainEventContractVersions, contextResolverRegistry, coreConfig, createDomainEventEnvelope, createTemporalContext, erpCoreRelease, evaluateTemporalWindow, mapPolicyEvaluationError, payloadHash, registerNamespacedContextResolvers, registerNamespacedContextResolversIn, safePreview, serializationErrorCode, sha256Hex, stableStringify, translateUniqueViolationToDuplicate, version };
|
|
41
|
+
export { AbacAuthorizer, AbacPolicySet, AbacRule, AlreadyExistsError, AppError, AuthenticationError, AuthorizationError, BusinessRuleViolationError, BusinessRuleViolationException, CONTRACT_VERSION_PROPERTY, Command, CompositeAuthorizer, ComputeEngineRegistry, ComputeEvaluatorRegistry, ComputePayloadParserRegistry, ComputePayloadParsers, ComputeRegistry, ConflictError, ContextResolverRegistry, ContextSeedValidator, CoreConfig, SerializationInError as DeserializationError, SerializationInError, DomainException, DuplicateError, ERP_CORE_NAME, ERP_CORE_VERSION, Entity, EntityNotFoundException, Err, ErrorCodes, ExpiredError, GateEngineRegistry, GatePayloadParsers, Grant, IdempotencyError, IdempotencyInProgressError, IdempotencyKeyMissingError, IdempotencyPayloadMismatchError, IdempotencyReplayNotSupportedError, InMemoryPolicyDefinitionRepository, IntegrationError, InvalidStateTransitionException, InvalidValueException, InvariantViolationException, LegacyIncompatibleError, MultipleValidationException, NotFoundError, NotYetValidError, Ok, Outcome, Permission, PermissionSet, PluginManager, PolicyAsOfResolver, PolicyCatalog, PolicyCatalogFactory, PolicyContextBuilder, PolicyContextPath, PolicyDefinition, PolicyEvaluationErrors, PolicyHashing, PolicyKey, PolicyResolver, PolicyScopeMatcher, PolicyService, Query, RbacAuthorizer, RequestedBy, Result, Role, RulesetRegistry, Scope, SerializationCodes, SerializationError, SerializationMessages, SerializationOutError, TemporalError, TemporalUseCase, UnexpectedError, UniqueConstraintViolationError, UseCase, UuidIdentifier, ValidationCode, ValidationError, ValidationException, ValidationField, ValueObject, abacContext, asPolicyDecisionId, asPolicyDefinitionId, asSchoolId, asTenantId, assertJsonSafeMetadata, assertTemporalContext, buildDomainEventContractVersions, contextResolverRegistry, coreConfig, createDomainEventEnvelope, createTemporalContext, erpCoreRelease, evaluateTemporalWindow, mapPolicyEvaluationError, payloadHash, rbacContextFields, registerNamespacedContextResolvers, registerNamespacedContextResolversIn, safePreview, serializationErrorCode, sha256Hex, stableStringify, translateUniqueViolationToDuplicate, version };
|
|
36
42
|
|
|
37
43
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["version","version"],"sources":["../src/version.ts","../src/index.ts"],"sourcesContent":["// Versao do kit, sincronizada com package.json por scripts/sync-kit-version.mjs.\n// Nao edite a mao: rode `npm run sync-kit-version` (ou e regenerado no release).\n//\n// Mantemos a versao aqui, dentro de src/, para que a copia full-control seja\n// auto-contida: ao copiar so o conteudo de src/, o entry nao depende de um\n// `../package.json` que deixaria de existir no projeto consumidor.\nexport const version = \"1.
|
|
1
|
+
{"version":3,"file":"index.js","names":["version","version"],"sources":["../src/version.ts","../src/index.ts"],"sourcesContent":["// Versao do kit, sincronizada com package.json por scripts/sync-kit-version.mjs.\n// Nao edite a mao: rode `npm run sync-kit-version` (ou e regenerado no release).\n//\n// Mantemos a versao aqui, dentro de src/, para que a copia full-control seja\n// auto-contida: ao copiar so o conteudo de src/, o entry nao depende de um\n// `../package.json` que deixaria de existir no projeto consumidor.\nexport const version = \"1.4.0\";\n","import { version } from \"./version.js\";\n\nexport * from \"./core/index.js\";\n\nexport const ERP_CORE_NAME = \"erp-core\";\nexport const ERP_CORE_VERSION = version;\n\nexport const erpCoreRelease = {\n name: ERP_CORE_NAME,\n version: ERP_CORE_VERSION,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAaA,YAAU;;;ACFvB,MAAa,gBAAgB;AAC7B,MAAa,mBAAmBC;AAEhC,MAAa,iBAAiB;CAC1B,MAAM;CACN,SAAS;AACb"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const require_domain_exception = require("./domain-exception.cjs");
|
|
2
|
+
//#region src/core/exceptions/business-rule-violation-exception.ts
|
|
3
|
+
var BusinessRuleViolationException = class extends require_domain_exception.DomainException {
|
|
4
|
+
constructor(rule, message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.rule = rule;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/core/exceptions/entity-not-found-exception.ts
|
|
11
|
+
var EntityNotFoundException = class extends require_domain_exception.DomainException {
|
|
12
|
+
constructor(entityName, identifier) {
|
|
13
|
+
super(`${entityName} with identifier ${identifier} was not found.`);
|
|
14
|
+
this.entityName = entityName;
|
|
15
|
+
this.identifier = identifier;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/core/exceptions/invalid-state-transition-exception.ts
|
|
20
|
+
var InvalidStateTransitionException = class extends require_domain_exception.DomainException {
|
|
21
|
+
constructor(from, to, message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.from = from;
|
|
24
|
+
this.to = to;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
Object.defineProperty(exports, "BusinessRuleViolationException", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function() {
|
|
31
|
+
return BusinessRuleViolationException;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "EntityNotFoundException", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function() {
|
|
37
|
+
return EntityNotFoundException;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "InvalidStateTransitionException", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function() {
|
|
43
|
+
return InvalidStateTransitionException;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=invalid-state-transition-exception.cjs.map
|