@cullet/erp-core 1.0.2 → 1.0.4
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 +24 -24
- package/dist/gate-engine-registry.js.map +1 -1
- package/dist/gate-v1-payload.schema.js +5 -0
- package/dist/gate-v1-payload.schema.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/outcome.js.map +1 -1
- package/dist/policies/engines/v1/gate/index.d.ts +1 -0
- package/dist/policies/engines/v1/gate/index.js.map +1 -1
- package/dist/policy-service.js.map +1 -1
- package/dist/validation-code.js.map +1 -1
- package/dist/validation-error.js.map +1 -1
- package/dist/validation-field.js.map +1 -1
- package/meta.json +67 -67
- package/package.json +56 -56
- package/src/core/application/commands/command.ts +3 -3
- package/src/core/application/commands/requested-by.ts +60 -60
- package/src/core/application/index.ts +21 -21
- package/src/core/application/policy-error-mapper.ts +54 -54
- package/src/core/application/ports/index.ts +6 -6
- package/src/core/application/ports/logger.port.ts +4 -4
- package/src/core/application/ports/metrics.port.ts +3 -3
- package/src/core/application/ports/policy-port.ts +7 -7
- package/src/core/application/ports/repository.port.ts +3 -3
- package/src/core/application/ports/temporal-repository.port.ts +4 -4
- package/src/core/application/ports/tracer.port.ts +7 -7
- package/src/core/application/queries/query.ts +13 -13
- package/src/core/application/temporal/index.ts +7 -7
- package/src/core/application/temporal/temporal-context.ts +20 -20
- package/src/core/application/temporal/temporal-use-case.ts +22 -22
- package/src/core/application/use-case.ts +10 -10
- package/src/core/config/core-config.instance.ts +1 -1
- package/src/core/config/core-config.ts +59 -59
- package/src/core/config/index.ts +6 -6
- package/src/core/config/policy-reporter.ts +31 -31
- package/src/core/config/silent-policy-reporter.ts +1 -1
- package/src/core/domain/entity.ts +44 -44
- package/src/core/domain/rulesets/entity-ruleset.contracts.ts +6 -6
- package/src/core/domain/rulesets/ruleset-registry.ts +49 -49
- package/src/core/domain/rulesets/ruleset.contracts.ts +6 -6
- package/src/core/domain/rulesets/value-object-ruleset.contracts.ts +5 -5
- package/src/core/domain/temporal/index.ts +11 -11
- package/src/core/domain/temporal/temporal-range.ts +16 -16
- package/src/core/domain/temporal/temporal-snapshot.ts +24 -24
- package/src/core/domain/temporal/transaction-time.ts +30 -30
- package/src/core/domain/temporal/valid-time.ts +29 -29
- package/src/core/domain/value-object.ts +16 -16
- package/src/core/errors/app-error.ts +64 -64
- package/src/core/errors/authentication-error.ts +134 -134
- package/src/core/errors/authorization-error.ts +154 -154
- package/src/core/errors/business-rule-violation-error.ts +15 -15
- package/src/core/errors/conflict-error.ts +202 -201
- package/src/core/errors/error-codes.ts +48 -48
- package/src/core/errors/idempotency-error.ts +324 -320
- package/src/core/errors/index.ts +50 -50
- package/src/core/errors/integration-error.ts +120 -120
- package/src/core/errors/legacy-incompatible-error.ts +13 -13
- package/src/core/errors/not-found-error.ts +14 -14
- package/src/core/errors/serialization-error.ts +167 -167
- package/src/core/errors/temporal-error.ts +109 -107
- package/src/core/errors/types.ts +35 -35
- package/src/core/errors/unexpected-error.ts +10 -10
- package/src/core/errors/utils/index.ts +2 -2
- package/src/core/errors/utils/json-safe.ts +53 -53
- package/src/core/errors/validation-error.ts +18 -18
- package/src/core/exceptions/business-rule-violation-exception.ts +6 -6
- package/src/core/exceptions/domain-exception.ts +5 -5
- package/src/core/exceptions/entity-not-found-exception.ts +6 -6
- package/src/core/exceptions/invalid-state-transition-exception.ts +8 -8
- package/src/core/exceptions/invariant-violation-exception.ts +3 -3
- package/src/core/exceptions/validation-code.ts +35 -29
- package/src/core/exceptions/validation-exception.ts +19 -19
- package/src/core/exceptions/validation-field.ts +20 -19
- package/src/core/index.ts +7 -7
- package/src/core/policies/asof/asof.ts +47 -47
- package/src/core/policies/catalog/catalog.instance.ts +8 -6
- package/src/core/policies/catalog/index.ts +4 -4
- package/src/core/policies/catalog/policy-catalog-entry.ts +199 -197
- package/src/core/policies/catalog/policy-catalog.ts +101 -101
- package/src/core/policies/catalog/policy-key.ts +51 -51
- package/src/core/policies/context/context-builder.ts +335 -313
- package/src/core/policies/context/context-registry.instance.ts +9 -9
- package/src/core/policies/context/context-registry.ts +61 -61
- package/src/core/policies/context/context-resolver.ts +12 -12
- package/src/core/policies/context/context-seed.ts +19 -15
- package/src/core/policies/context/index.ts +9 -9
- package/src/core/policies/context/path.ts +135 -128
- package/src/core/policies/defs/in-memory-policy-definition-repo.ts +56 -55
- package/src/core/policies/defs/index.ts +10 -10
- package/src/core/policies/defs/policy-definition-repository.ts +3 -3
- package/src/core/policies/defs/policy-definition.ts +143 -142
- package/src/core/policies/defs/policy-scope.ts +21 -19
- package/src/core/policies/defs/policy-semver.ts +51 -51
- package/src/core/policies/engines/compute-engine-registry.ts +43 -43
- package/src/core/policies/engines/compute-evaluator-registry.ts +20 -20
- package/src/core/policies/engines/compute-registry.ts +45 -45
- package/src/core/policies/engines/compute-types.ts +15 -15
- package/src/core/policies/engines/condition-evaluator-reporter.ts +17 -17
- package/src/core/policies/engines/gate-engine-registry.ts +27 -25
- package/src/core/policies/engines/gate-types.ts +28 -28
- package/src/core/policies/engines/index.ts +28 -28
- package/src/core/policies/engines/parse-compute-payload.ts +51 -45
- package/src/core/policies/engines/parse-gate-payload.ts +42 -42
- package/src/core/policies/engines/v1/compute/compute-engine-v1.ts +39 -37
- package/src/core/policies/engines/v1/compute/compute-payload.schema.ts +43 -41
- package/src/core/policies/engines/v1/compute/index.ts +6 -6
- package/src/core/policies/engines/v1/compute/resolve-decision-table-v1.ts +41 -39
- package/src/core/policies/engines/v1/condition-evaluator.ts +557 -504
- package/src/core/policies/engines/v1/condition-schema.ts +35 -35
- package/src/core/policies/engines/v1/condition-types.ts +21 -21
- package/src/core/policies/engines/v1/gate/gate-engine-v1.ts +134 -130
- package/src/core/policies/engines/v1/gate/gate-types-v1.ts +5 -5
- package/src/core/policies/engines/v1/gate/gate-v1-payload.schema.ts +32 -30
- package/src/core/policies/engines/v1/gate/index.ts +4 -4
- package/src/core/policies/engines/v1/index.ts +8 -8
- package/src/core/policies/index.ts +72 -72
- package/src/core/policies/package/policy-package.ts +3 -3
- package/src/core/policies/policy-ids.ts +25 -25
- package/src/core/policies/resolver/policy-resolver.ts +34 -34
- package/src/core/policies/service/index.ts +6 -6
- package/src/core/policies/service/policy-evaluation-error.ts +141 -133
- package/src/core/policies/service/policy-service.ts +432 -419
- package/src/core/policies/utils/date.ts +3 -3
- package/src/core/policies/utils/hash.ts +61 -61
- package/src/core/result/outcome.ts +131 -126
- package/src/core/result/result.ts +130 -127
- package/src/core/shared/aggregate-version.ts +5 -5
- package/src/core/shared/hashing.ts +18 -18
- package/src/core/shared/immutable.ts +29 -29
- package/src/core/shared/temporal-guards.ts +9 -9
- package/src/core/versioning/domain-event-contracts.ts +40 -40
- package/src/core/versioning/version.ts +19 -19
- package/src/examples/rulesets/entity/order-creation-rules-v1.ts +18 -18
- package/src/examples/rulesets/entity/order-invariants-v1.ts +31 -29
- package/src/examples/rulesets/entity/order-invariants-v2.ts +12 -12
- package/src/examples/rulesets/entity/order.ts +127 -127
- package/src/examples/rulesets/value-object/cpf-rules-v1.ts +41 -39
- package/src/examples/rulesets/value-object/cpf-rules-v2.ts +14 -12
- package/src/examples/rulesets/value-object/cpf.ts +24 -24
- package/src/examples/rulesets/value-object/customer.ts +42 -39
- package/src/examples/rulesets/value-object/person-name-rules-v1.ts +27 -27
- package/src/examples/rulesets/value-object/person-name-rules-v2.ts +13 -13
- package/src/examples/rulesets/value-object/person-name.ts +29 -26
- package/src/index.ts +2 -2
- package/src/version.ts +1 -1
|
@@ -15,62 +15,62 @@ export { Outcome } from "../result/outcome";
|
|
|
15
15
|
// ─── Utils ──────────────────────────────────────────────────────────────────
|
|
16
16
|
export { PolicyHashing } from "./utils";
|
|
17
17
|
export type {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
PolicyDecisionId,
|
|
19
|
+
PolicyDefinitionId,
|
|
20
|
+
SchoolId,
|
|
21
|
+
TenantId,
|
|
22
22
|
} from "./policy-ids";
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
asPolicyDecisionId,
|
|
25
|
+
asPolicyDefinitionId,
|
|
26
|
+
asSchoolId,
|
|
27
|
+
asTenantId,
|
|
28
28
|
} from "./policy-ids";
|
|
29
29
|
|
|
30
30
|
// ─── Catalog ────────────────────────────────────────────────────────────────
|
|
31
31
|
export type {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
AsOfSource,
|
|
33
|
+
PolicyCatalogEntryProps,
|
|
34
|
+
PolicyKind,
|
|
35
|
+
PolicyOwner,
|
|
36
|
+
PolicyScopeLevel,
|
|
37
37
|
} from "./catalog";
|
|
38
38
|
export { PolicyCatalog, PolicyCatalogFactory, PolicyKey } from "./catalog";
|
|
39
39
|
|
|
40
40
|
// ─── Definitions ────────────────────────────────────────────────────────────
|
|
41
41
|
export type {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
BasePolicyDefinitionProps,
|
|
43
|
+
ComputePolicyDefinitionProps,
|
|
44
|
+
FindCandidatesParams,
|
|
45
|
+
GatePolicyDefinitionProps,
|
|
46
|
+
PolicyDefinitionProps,
|
|
47
|
+
PolicyDefinitionStatus,
|
|
48
|
+
PolicyScope,
|
|
49
|
+
ScopeChain,
|
|
50
50
|
} from "./defs";
|
|
51
51
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
InMemoryPolicyDefinitionRepository,
|
|
53
|
+
PolicyDefinition,
|
|
54
|
+
PolicyScopeMatcher,
|
|
55
55
|
} from "./defs";
|
|
56
56
|
|
|
57
57
|
// ─── Context ────────────────────────────────────────────────────────────────
|
|
58
58
|
export type {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
ContextResolverCircuitBreakerOptions,
|
|
60
|
+
ContextResolverResilienceOptions,
|
|
61
|
+
ContextResolverRetryOptions,
|
|
62
|
+
ContextSeed,
|
|
63
|
+
ContextValueResolver,
|
|
64
|
+
PolicyContextBuilderOptions,
|
|
65
65
|
} from "./context";
|
|
66
66
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
ContextSeedValidator,
|
|
68
|
+
ContextResolverRegistry,
|
|
69
|
+
contextResolverRegistry,
|
|
70
|
+
PolicyContextBuilder,
|
|
71
|
+
PolicyContextPath,
|
|
72
|
+
registerNamespacedContextResolvers,
|
|
73
|
+
registerNamespacedContextResolversIn,
|
|
74
74
|
} from "./context";
|
|
75
75
|
|
|
76
76
|
// ─── AsOf ───────────────────────────────────────────────────────────────────
|
|
@@ -79,39 +79,39 @@ export { PolicyAsOfResolver } from "./asof";
|
|
|
79
79
|
|
|
80
80
|
// ─── Engines ────────────────────────────────────────────────────────────────
|
|
81
81
|
export type {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
82
|
+
ConditionEvaluationCause,
|
|
83
|
+
ConditionEvaluationOptions,
|
|
84
|
+
ConditionEvaluationReport,
|
|
85
|
+
ConditionEvaluationReportLevel,
|
|
86
|
+
ConditionEvaluationReportTag,
|
|
87
|
+
ConditionEvaluatorReporter,
|
|
88
|
+
GateOutcome,
|
|
89
|
+
GateOutcomeData,
|
|
90
|
+
GatePayload,
|
|
91
|
+
GateStatus,
|
|
92
|
+
GateTraceLeafSnapshot,
|
|
93
|
+
GateTraceNodeSnapshot,
|
|
94
|
+
GateViolationTrace,
|
|
95
|
+
PolicyContext,
|
|
96
|
+
PolicyViolation,
|
|
97
|
+
VersionedGateEngine,
|
|
98
98
|
} from "./engines";
|
|
99
99
|
export type {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
ComputeEvaluator,
|
|
101
|
+
ComputeEvaluatorRegistration,
|
|
102
|
+
ComputeOutcome,
|
|
103
|
+
ComputeOutcomeData,
|
|
104
|
+
ComputeStatus,
|
|
105
|
+
VersionedComputeEngine,
|
|
106
106
|
} from "./engines";
|
|
107
107
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
ComputeEngineRegistry,
|
|
109
|
+
ComputeEvaluatorRegistry,
|
|
110
|
+
ComputePayloadParsers,
|
|
111
|
+
ComputePayloadParserRegistry,
|
|
112
|
+
ComputeRegistry,
|
|
113
|
+
GateEngineRegistry,
|
|
114
|
+
GatePayloadParsers,
|
|
115
115
|
} from "./engines";
|
|
116
116
|
|
|
117
117
|
// ─── Resolver ───────────────────────────────────────────────────────────────
|
|
@@ -119,12 +119,12 @@ export { PolicyResolver } from "./resolver";
|
|
|
119
119
|
|
|
120
120
|
// ─── Service ────────────────────────────────────────────────────────────────
|
|
121
121
|
export type {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
EvaluateInput,
|
|
123
|
+
PolicyDecision,
|
|
124
|
+
PolicyEvaluationError,
|
|
125
|
+
PolicyEvaluationResult,
|
|
126
|
+
PolicyServiceParams,
|
|
127
|
+
PolicyServiceOptions,
|
|
128
128
|
} from "./service";
|
|
129
129
|
export { PolicyEvaluationErrors, PolicyService } from "./service";
|
|
130
130
|
|
|
@@ -11,7 +11,7 @@ import type { ComputeEvaluatorRegistration } from "../engines";
|
|
|
11
11
|
* - evaluators: compute evaluator registrations keyed by policy/version.
|
|
12
12
|
*/
|
|
13
13
|
export interface PolicyPackage {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
readonly catalogEntries: readonly PolicyCatalogEntryProps[];
|
|
15
|
+
readonly definitions: readonly PolicyDefinition[];
|
|
16
|
+
readonly evaluators: readonly ComputeEvaluatorRegistration[];
|
|
17
17
|
}
|
|
@@ -3,7 +3,7 @@ import { InvalidValueException } from "../exceptions/validation-exception";
|
|
|
3
3
|
import { ValidationField } from "../exceptions/validation-field";
|
|
4
4
|
|
|
5
5
|
type Brand<TValue, TBrand extends string> = TValue & {
|
|
6
|
-
|
|
6
|
+
readonly __brand: TBrand;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export type PolicyDefinitionId = Brand<string, "PolicyDefinitionId">;
|
|
@@ -17,44 +17,44 @@ const TENANT_ID_FIELD = ValidationField.of("tenantId");
|
|
|
17
17
|
const SCHOOL_ID_FIELD = ValidationField.of("schoolId");
|
|
18
18
|
|
|
19
19
|
function assertIdString(value: unknown, field: ValidationField): string {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
if (typeof value !== "string") {
|
|
21
|
+
throw new InvalidValueException(
|
|
22
|
+
field,
|
|
23
|
+
ValidationCode.INVALID_FORMAT,
|
|
24
|
+
`${field.value} must be a string, got ${typeof value}`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (value.trim().length === 0) {
|
|
29
|
+
throw new InvalidValueException(
|
|
30
|
+
field,
|
|
31
|
+
ValidationCode.BLANK,
|
|
32
|
+
`${field.value} must be a non-empty string`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return value;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function brandId<TBrand extends string>(
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
value: unknown,
|
|
41
|
+
field: ValidationField,
|
|
42
42
|
): Brand<string, TBrand> {
|
|
43
|
-
|
|
43
|
+
return assertIdString(value, field) as Brand<string, TBrand>;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export function asPolicyDefinitionId(value: string): PolicyDefinitionId {
|
|
47
|
-
|
|
47
|
+
return brandId<"PolicyDefinitionId">(value, POLICY_DEFINITION_ID_FIELD);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export function asPolicyDecisionId(value: string): PolicyDecisionId {
|
|
51
|
-
|
|
51
|
+
return brandId<"PolicyDecisionId">(value, POLICY_DECISION_ID_FIELD);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function asTenantId(value: string): TenantId {
|
|
55
|
-
|
|
55
|
+
return brandId<"TenantId">(value, TENANT_ID_FIELD);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export function asSchoolId(value: string): SchoolId {
|
|
59
|
-
|
|
59
|
+
return brandId<"SchoolId">(value, SCHOOL_ID_FIELD);
|
|
60
60
|
}
|
|
@@ -14,44 +14,44 @@ import { Result } from "../../result/result";
|
|
|
14
14
|
* 5. policyVersion descending (semver — final deterministic tiebreaker)
|
|
15
15
|
*/
|
|
16
16
|
export class PolicyResolver {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
resolveBest(
|
|
18
|
+
candidates: readonly PolicyDefinition[],
|
|
19
|
+
): Result<PolicyDefinition, string> {
|
|
20
|
+
if (candidates.length === 0) {
|
|
21
|
+
return Result.err(
|
|
22
|
+
"No matching policy definition found (candidates list is empty)",
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const sorted = [...candidates].sort((a, b) => {
|
|
27
|
+
// 1) Scope specificity (higher weight = more specific)
|
|
28
|
+
const scopeDiff =
|
|
29
|
+
PolicyScopeMatcher.weight(b.scope.level) -
|
|
30
|
+
PolicyScopeMatcher.weight(a.scope.level);
|
|
31
|
+
if (scopeDiff !== 0) return scopeDiff;
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
// 2) Priority DESC
|
|
34
|
+
const priorityDiff = b.priority - a.priority;
|
|
35
|
+
if (priorityDiff !== 0) return priorityDiff;
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
// 3) publishedAt DESC (fallback createdAt)
|
|
38
|
+
const aDate = a.publishedAt ?? a.createdAt;
|
|
39
|
+
const bDate = b.publishedAt ?? b.createdAt;
|
|
40
|
+
const dateDiff = bDate.getTime() - aDate.getTime();
|
|
41
|
+
if (dateDiff !== 0) return dateDiff;
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
// 4) Engine version DESC — prefers the definition running on the most
|
|
44
|
+
// capable engine when scope/priority/date are identical.
|
|
45
|
+
const aEngine = a.gateEngineVersion ?? a.computeEngineVersion ?? 0;
|
|
46
|
+
const bEngine = b.gateEngineVersion ?? b.computeEngineVersion ?? 0;
|
|
47
|
+
const engineDiff = bEngine - aEngine;
|
|
48
|
+
if (engineDiff !== 0) return engineDiff;
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
// 5) policyVersion DESC (semver) — final deterministic tiebreaker so
|
|
51
|
+
// the winner never depends on repository return order.
|
|
52
|
+
return comparePolicySemver(b.policyVersion, a.policyVersion);
|
|
53
|
+
});
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return Result.ok(sorted[0]);
|
|
56
|
+
}
|
|
57
57
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { PolicyService } from "./policy-service";
|
|
2
2
|
export { PolicyEvaluationErrors } from "./policy-evaluation-error";
|
|
3
3
|
export type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
EvaluateInput,
|
|
5
|
+
PolicyDecision,
|
|
6
|
+
PolicyEvaluationError,
|
|
7
|
+
PolicyEvaluationResult,
|
|
8
|
+
PolicyServiceOptions,
|
|
9
|
+
PolicyServiceParams,
|
|
10
10
|
} from "./policy-service";
|