@epilot/cli 0.1.120 → 0.1.121

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 CHANGED
@@ -29,7 +29,7 @@ npm install -g @epilot/cli
29
29
 
30
30
  <!-- usage-help -->
31
31
  ```
32
- epilot v0.1.120 — CLI for epilot APIs
32
+ epilot v0.1.121 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -2038,6 +2038,9 @@
2038
2038
  "maxLength": 200,
2039
2039
  "description": "Message shown to the end user when this condition fails."
2040
2040
  },
2041
+ "applies_when": {
2042
+ "$ref": "#/components/schemas/AppliesWhen"
2043
+ },
2041
2044
  "allow_failure": {
2042
2045
  "type": "boolean",
2043
2046
  "default": false,
@@ -2181,8 +2184,16 @@
2181
2184
  ]
2182
2185
  },
2183
2186
  "value": {
2184
- "type": "number",
2185
- "minimum": 0
2187
+ "description": "The adjustment amount - a fixed number, or a context path resolving to a number\n(e.g. a per-contract percentage limit). Contextual adjustment values must not\ncarry a nested adjustment.\n",
2188
+ "oneOf": [
2189
+ {
2190
+ "type": "number",
2191
+ "minimum": 0
2192
+ },
2193
+ {
2194
+ "$ref": "#/components/schemas/ContextValue"
2195
+ }
2196
+ ]
2186
2197
  },
2187
2198
  "direction": {
2188
2199
  "type": "string",
@@ -2190,6 +2201,14 @@
2190
2201
  "increase",
2191
2202
  "decrease"
2192
2203
  ]
2204
+ },
2205
+ "rounding": {
2206
+ "type": "string",
2207
+ "enum": [
2208
+ "up",
2209
+ "down"
2210
+ ],
2211
+ "description": "Rounds the adjusted result to a whole number - `up` (ceiling) or `down` (floor).\nOmitted means no rounding. Used for bounds like \"round up(current × 0.9) to whole euros\".\n"
2193
2212
  }
2194
2213
  }
2195
2214
  },
@@ -2272,6 +2291,52 @@
2272
2291
  }
2273
2292
  }
2274
2293
  },
2294
+ "AppliesWhen": {
2295
+ "type": "object",
2296
+ "description": "Optional precondition on a condition: the condition only takes part in the\nvalidation when this comparison over context holds. Examples: apply the\ndual-tariff reference only when `contract.htnt` is not empty, or run a\nplausibility check only when a context value reaches a threshold.\n",
2297
+ "required": [
2298
+ "path",
2299
+ "operator"
2300
+ ],
2301
+ "additionalProperties": false,
2302
+ "properties": {
2303
+ "path": {
2304
+ "type": "string",
2305
+ "minLength": 1,
2306
+ "maxLength": 200,
2307
+ "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z0-9_]+)*$",
2308
+ "description": "Dot-separated context path whose first segment must match a declared context schema."
2309
+ },
2310
+ "operator": {
2311
+ "type": "string",
2312
+ "enum": [
2313
+ "equal",
2314
+ "notEqual",
2315
+ "greaterThan",
2316
+ "greaterThanInclusive",
2317
+ "lessThan",
2318
+ "lessThanInclusive",
2319
+ "isEmpty",
2320
+ "isNotEmpty"
2321
+ ],
2322
+ "description": "Comparison applied to the resolved context value. `isEmpty` / `isNotEmpty`\ntake no `value`; all other operators require one.\n"
2323
+ },
2324
+ "value": {
2325
+ "description": "Static comparison value for binary operators.",
2326
+ "oneOf": [
2327
+ {
2328
+ "type": "number"
2329
+ },
2330
+ {
2331
+ "type": "string"
2332
+ },
2333
+ {
2334
+ "type": "boolean"
2335
+ }
2336
+ ]
2337
+ }
2338
+ }
2339
+ },
2275
2340
  "ContextRequirement": {
2276
2341
  "type": "object",
2277
2342
  "description": "An entity context source the rule needs at evaluation time, referenced by `context`\nvalue paths via the schema slug as their first segment (e.g. `contract.installment_amount`).\nHow the source is resolved (which entity instance) is decided by the consuming surface,\nnot by the rule. Meter reading comparisons use the meter/meter_counter entity schemas\n(e.g. `meter_counter.current_consumption` for the previous reading value).\n",
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
11
11
  var main = defineCommand({
12
12
  meta: {
13
13
  name: "epilot",
14
- version: "0.1.120",
14
+ version: "0.1.121",
15
15
  description: "CLI for epilot APIs"
16
16
  },
17
17
  args: {
@@ -31,7 +31,7 @@ var main = defineCommand({
31
31
  profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
32
32
  config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
33
33
  completion: () => import("../completion-F6MX5VSK.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-FXQ5SOGV.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-ILRFCGYF.js").then((m) => m.default),
35
35
  "access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
36
36
  address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
37
37
  "address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
@@ -134,7 +134,7 @@ process.stderr.on("error", (err) => {
134
134
  if (err.code === "EPIPE") process.exit(0);
135
135
  throw err;
136
136
  });
137
- var VERSION = true ? "0.1.120" : (await null).default.version;
137
+ var VERSION = true ? "0.1.121" : (await null).default.version;
138
138
  var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
139
139
  process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
140
140
  var args = process.argv.slice(2);
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
72
72
  }
73
73
  });
74
74
  var getCurrentVersion = () => {
75
- if (true) return "0.1.120";
75
+ if (true) return "0.1.121";
76
76
  try {
77
77
  const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
78
78
  encoding: "utf-8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/cli",
3
- "version": "0.1.120",
3
+ "version": "0.1.121",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {