@dcdr/contracts 1.9.8 → 1.9.9
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.
|
@@ -31,6 +31,18 @@ export declare enum ConditionOp {
|
|
|
31
31
|
NOT_EQUALS = "NOT_EQUALS",
|
|
32
32
|
VALID_URL = "VALID_URL"
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Boolean operators for composing multiple conditions.
|
|
36
|
+
*
|
|
37
|
+
* Notes
|
|
38
|
+
* - Used only when an intent uses a conditioned execution policy.
|
|
39
|
+
* - Keep values stable (wire-level behavior).
|
|
40
|
+
*/
|
|
41
|
+
export declare enum ConditionLogicOp {
|
|
42
|
+
NOT = "NOT",
|
|
43
|
+
AND = "AND",
|
|
44
|
+
OR = "OR"
|
|
45
|
+
}
|
|
34
46
|
/**
|
|
35
47
|
* Minimal condition contract for conditioned routing.
|
|
36
48
|
*
|
|
@@ -41,7 +53,7 @@ export declare enum ConditionOp {
|
|
|
41
53
|
export interface ImplementationCondition {
|
|
42
54
|
/** Dot-path relative to the evaluation scope (context or vars). */
|
|
43
55
|
path: string;
|
|
44
|
-
/**
|
|
56
|
+
/** Leaf operator to apply to the resolved value at `path`. */
|
|
45
57
|
op: ConditionOp;
|
|
46
58
|
/** Primary operator parameter. */
|
|
47
59
|
value1?: string | number | boolean | null;
|
|
@@ -52,6 +64,26 @@ export interface ImplementationCondition {
|
|
|
52
64
|
/** Optional trim for string operators. */
|
|
53
65
|
trim?: boolean;
|
|
54
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Recursive boolean condition used to compose multiple leaf conditions.
|
|
69
|
+
*
|
|
70
|
+
* Notes
|
|
71
|
+
* - The evaluation scope is still determined by the execution policy type:
|
|
72
|
+
* - CONDITION_ON_CONTEXT => request.context
|
|
73
|
+
* - CONDITION_ON_INPUT => effective vars
|
|
74
|
+
* - Children can be either leaf ImplementationCondition or another LogicalImplementationCondition.
|
|
75
|
+
*/
|
|
76
|
+
export interface LogicalImplementationCondition {
|
|
77
|
+
op: ConditionLogicOp;
|
|
78
|
+
/**
|
|
79
|
+
* Child conditions.
|
|
80
|
+
*
|
|
81
|
+
* Rules
|
|
82
|
+
* - NOT: must include exactly 1 child
|
|
83
|
+
* - AND/OR: must include 1+ children
|
|
84
|
+
*/
|
|
85
|
+
conditions?: Array<ImplementationCondition | LogicalImplementationCondition>;
|
|
86
|
+
}
|
|
55
87
|
/**
|
|
56
88
|
* Time window constraints for an implementation.
|
|
57
89
|
* If present, the implementation is eligible ONLY within these windows.
|
|
@@ -174,6 +206,6 @@ export interface ImplementationContract {
|
|
|
174
206
|
* Notes
|
|
175
207
|
* - Only evaluated when the intent executionPolicy type is CONDITION_ON_CONTEXT or CONDITION_ON_INPUT.
|
|
176
208
|
*/
|
|
177
|
-
condition?: ImplementationCondition;
|
|
209
|
+
condition?: ImplementationCondition | LogicalImplementationCondition;
|
|
178
210
|
}
|
|
179
211
|
//# sourceMappingURL=implementations.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementations.contract.d.ts","sourceRoot":"","sources":["../src/implementations.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,oBAAY,WAAW;IACrB,0EAA0E;IAC1E,SAAS,cAAc;IAGvB,IAAI,SAAS;IACb,KAAK,UAAU;IAGf,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,SAAS,cAAc;IAGvB,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAG/B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IAEb,
|
|
1
|
+
{"version":3,"file":"implementations.contract.d.ts","sourceRoot":"","sources":["../src/implementations.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,oBAAY,WAAW;IACrB,0EAA0E;IAC1E,SAAS,cAAc;IAGvB,IAAI,SAAS;IACb,KAAK,UAAU;IAGf,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,SAAS,cAAc;IAGvB,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAG/B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED;;;;;;GAMG;AACH,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,EAAE,OAAO;CACV;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IAEb,8DAA8D;IAC9D,EAAE,EAAE,WAAW,CAAC;IAEhB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAE1C,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAE1C,mDAAmD;IACnD,e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,EAAE,GAAG,CAAC;IAEpB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAEhB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,oCAAoC;IACpC,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,uBAAuB,GAAG,8BAA8B,CAAC;CACtE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionOp = void 0;
|
|
3
|
+
exports.ConditionLogicOp = exports.ConditionOp = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Condition operators for conditioned routing.
|
|
6
6
|
*
|
|
@@ -37,3 +37,16 @@ var ConditionOp;
|
|
|
37
37
|
ConditionOp["NOT_EQUALS"] = "NOT_EQUALS";
|
|
38
38
|
ConditionOp["VALID_URL"] = "VALID_URL";
|
|
39
39
|
})(ConditionOp || (exports.ConditionOp = ConditionOp = {}));
|
|
40
|
+
/**
|
|
41
|
+
* Boolean operators for composing multiple conditions.
|
|
42
|
+
*
|
|
43
|
+
* Notes
|
|
44
|
+
* - Used only when an intent uses a conditioned execution policy.
|
|
45
|
+
* - Keep values stable (wire-level behavior).
|
|
46
|
+
*/
|
|
47
|
+
var ConditionLogicOp;
|
|
48
|
+
(function (ConditionLogicOp) {
|
|
49
|
+
ConditionLogicOp["NOT"] = "NOT";
|
|
50
|
+
ConditionLogicOp["AND"] = "AND";
|
|
51
|
+
ConditionLogicOp["OR"] = "OR";
|
|
52
|
+
})(ConditionLogicOp || (exports.ConditionLogicOp = ConditionLogicOp = {}));
|