@epilot/cli 0.1.143 → 0.1.145
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 +1 -1
- package/definitions/app.json +251 -4
- package/definitions/automation.json +344 -12
- package/definitions/event-catalog.json +431 -12
- package/definitions/validation-rules.json +104 -5
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-4EODPJ5A.js → chunk-GNZOIBKX.js} +5 -1
- package/dist/{completion-HPDI7RNO.js → completion-RZ6CSKPV.js} +1 -1
- package/dist/{upgrade-7VYPWNEV.js → upgrade-4DRMPNCM.js} +1 -1
- package/package.json +1 -1
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
210
|
"400": {
|
|
211
|
-
"description": "Bad Request - Invalid request body",
|
|
211
|
+
"description": "Bad Request - Invalid request body. Invalid external comparison values additionally carry a\n`code` (`external_value_not_found` when the app is not installed or the hook / result does not\nexist, `external_value_incompatible` when the result type does not match the compared kind).\n",
|
|
212
212
|
"content": {
|
|
213
213
|
"application/json": {
|
|
214
214
|
"schema": {
|
|
@@ -217,6 +217,13 @@
|
|
|
217
217
|
"message": {
|
|
218
218
|
"type": "string",
|
|
219
219
|
"example": "Invalid request body"
|
|
220
|
+
},
|
|
221
|
+
"code": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"enum": [
|
|
224
|
+
"external_value_not_found",
|
|
225
|
+
"external_value_incompatible"
|
|
226
|
+
]
|
|
220
227
|
}
|
|
221
228
|
}
|
|
222
229
|
}
|
|
@@ -484,7 +491,7 @@
|
|
|
484
491
|
}
|
|
485
492
|
},
|
|
486
493
|
"400": {
|
|
487
|
-
"description": "Bad Request - Invalid request body",
|
|
494
|
+
"description": "Bad Request - Invalid request body. Invalid external comparison values additionally carry a\n`code` (`external_value_not_found` when the app is not installed or the hook / result does not\nexist, `external_value_incompatible` when the result type does not match the compared kind).\n",
|
|
488
495
|
"content": {
|
|
489
496
|
"application/json": {
|
|
490
497
|
"schema": {
|
|
@@ -493,6 +500,13 @@
|
|
|
493
500
|
"message": {
|
|
494
501
|
"type": "string",
|
|
495
502
|
"example": "Invalid request body"
|
|
503
|
+
},
|
|
504
|
+
"code": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"enum": [
|
|
507
|
+
"external_value_not_found",
|
|
508
|
+
"external_value_incompatible"
|
|
509
|
+
]
|
|
496
510
|
}
|
|
497
511
|
}
|
|
498
512
|
}
|
|
@@ -1984,7 +1998,7 @@
|
|
|
1984
1998
|
},
|
|
1985
1999
|
"ComparisonRuleType": {
|
|
1986
2000
|
"type": "object",
|
|
1987
|
-
"description": "Declarative validation rule (schema version v2). Supports predefined comparison operators\nover number, date and text inputs, with static, dynamic (context path)
|
|
2001
|
+
"description": "Declarative validation rule (schema version v2). Supports predefined comparison operators\nover number, date and text inputs, with static, dynamic (context path), relative-date and\nexternal (app-provided) comparison values.\n",
|
|
1988
2002
|
"required": [
|
|
1989
2003
|
"input_type",
|
|
1990
2004
|
"conditions"
|
|
@@ -2088,6 +2102,12 @@
|
|
|
2088
2102
|
{
|
|
2089
2103
|
"$ref": "#/components/schemas/RelativeDateValue"
|
|
2090
2104
|
},
|
|
2105
|
+
{
|
|
2106
|
+
"$ref": "#/components/schemas/EnvironmentValue"
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"$ref": "#/components/schemas/ExternalValue"
|
|
2110
|
+
},
|
|
2091
2111
|
{
|
|
2092
2112
|
"$ref": "#/components/schemas/RangeValue"
|
|
2093
2113
|
},
|
|
@@ -2097,7 +2117,7 @@
|
|
|
2097
2117
|
]
|
|
2098
2118
|
},
|
|
2099
2119
|
"ScalarValue": {
|
|
2100
|
-
"description": "A single comparison value - static, resolved from context,
|
|
2120
|
+
"description": "A single comparison value - static, resolved from context, a relative date, an organisation environment variable, or an external value.",
|
|
2101
2121
|
"oneOf": [
|
|
2102
2122
|
{
|
|
2103
2123
|
"$ref": "#/components/schemas/StaticValue"
|
|
@@ -2107,9 +2127,82 @@
|
|
|
2107
2127
|
},
|
|
2108
2128
|
{
|
|
2109
2129
|
"$ref": "#/components/schemas/RelativeDateValue"
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
"$ref": "#/components/schemas/EnvironmentValue"
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
"$ref": "#/components/schemas/ExternalValue"
|
|
2110
2136
|
}
|
|
2111
2137
|
]
|
|
2112
2138
|
},
|
|
2139
|
+
"EnvironmentValue": {
|
|
2140
|
+
"type": "object",
|
|
2141
|
+
"description": "A comparison value resolved at evaluation time from an organisation environment variable\n(environments-api). The rule stores the key, never the value, so one change to the variable\nreaches every rule that references it and a blueprint install never overwrites the\norganisation's own value.\n\nOnly browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for\ntext comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.\n`String` and `SecretString` variables are rejected at write time. Write-time validation also\nchecks that the variable exists in the organisation; a variable that exists without a value\n(for example seeded by a blueprint install) is accepted and resolves as unavailable until set.\n",
|
|
2142
|
+
"required": [
|
|
2143
|
+
"source",
|
|
2144
|
+
"key"
|
|
2145
|
+
],
|
|
2146
|
+
"additionalProperties": false,
|
|
2147
|
+
"properties": {
|
|
2148
|
+
"source": {
|
|
2149
|
+
"type": "string",
|
|
2150
|
+
"enum": [
|
|
2151
|
+
"environment"
|
|
2152
|
+
]
|
|
2153
|
+
},
|
|
2154
|
+
"key": {
|
|
2155
|
+
"type": "string",
|
|
2156
|
+
"pattern": "^[a-z0-9][a-z0-9_.\\-]{0,127}$",
|
|
2157
|
+
"description": "Environment variable key, e.g. `abschlag.max`."
|
|
2158
|
+
},
|
|
2159
|
+
"adjust": {
|
|
2160
|
+
"$ref": "#/components/schemas/ValueAdjustment"
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
},
|
|
2164
|
+
"ExternalValue": {
|
|
2165
|
+
"type": "object",
|
|
2166
|
+
"description": "A comparison value produced at evaluation time by an External Values hook of an installed\napp (component type `EXTERNAL_VALUES`). The rule stores the reference only; the value is\nresolved server-side by the external-values-api, which executes the hook's HTTP call with\nthe app's credentials and returns the typed result identified by `result_id`.\n\nWrite-time validation checks that the app is installed in the organisation, that the hook\nand result exist, and that the result's type is compatible with the compared kind\n(`number` results for numeric comparisons, `text` for text, `date` for date). External values\nare resolved only for authenticated consumers (epilot 360 users and portal end customers);\nin public journeys the dependent conditions are skipped.\n",
|
|
2167
|
+
"required": [
|
|
2168
|
+
"source",
|
|
2169
|
+
"app_id",
|
|
2170
|
+
"hook_id",
|
|
2171
|
+
"result_id"
|
|
2172
|
+
],
|
|
2173
|
+
"additionalProperties": false,
|
|
2174
|
+
"properties": {
|
|
2175
|
+
"source": {
|
|
2176
|
+
"type": "string",
|
|
2177
|
+
"enum": [
|
|
2178
|
+
"external"
|
|
2179
|
+
]
|
|
2180
|
+
},
|
|
2181
|
+
"app_id": {
|
|
2182
|
+
"type": "string",
|
|
2183
|
+
"minLength": 1,
|
|
2184
|
+
"maxLength": 100,
|
|
2185
|
+
"description": "ID of the installed app that provides the External Values component."
|
|
2186
|
+
},
|
|
2187
|
+
"hook_id": {
|
|
2188
|
+
"type": "string",
|
|
2189
|
+
"minLength": 1,
|
|
2190
|
+
"maxLength": 100,
|
|
2191
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2192
|
+
"description": "ID of the hook within the app's External Values component."
|
|
2193
|
+
},
|
|
2194
|
+
"result_id": {
|
|
2195
|
+
"type": "string",
|
|
2196
|
+
"minLength": 1,
|
|
2197
|
+
"maxLength": 100,
|
|
2198
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2199
|
+
"description": "ID of the result entry within the hook whose value is compared."
|
|
2200
|
+
},
|
|
2201
|
+
"adjust": {
|
|
2202
|
+
"$ref": "#/components/schemas/ValueAdjustment"
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
},
|
|
2113
2206
|
"StaticValue": {
|
|
2114
2207
|
"type": "object",
|
|
2115
2208
|
"description": "A fixed comparison value.",
|
|
@@ -2194,6 +2287,9 @@
|
|
|
2194
2287
|
},
|
|
2195
2288
|
{
|
|
2196
2289
|
"$ref": "#/components/schemas/ContextValue"
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
"$ref": "#/components/schemas/EnvironmentValue"
|
|
2197
2293
|
}
|
|
2198
2294
|
]
|
|
2199
2295
|
},
|
|
@@ -2324,7 +2420,7 @@
|
|
|
2324
2420
|
"description": "Comparison applied to the resolved context value. `isEmpty` / `isNotEmpty`\ntake no `value`; all other operators require one.\n"
|
|
2325
2421
|
},
|
|
2326
2422
|
"value": {
|
|
2327
|
-
"description": "
|
|
2423
|
+
"description": "Comparison value for binary operators: a static number, string or boolean, or an\norganisation environment variable (`Number`, `Text` or `Boolean`) so a precondition\ncan act as a per-organisation switch or threshold.\n",
|
|
2328
2424
|
"oneOf": [
|
|
2329
2425
|
{
|
|
2330
2426
|
"type": "number"
|
|
@@ -2334,6 +2430,9 @@
|
|
|
2334
2430
|
},
|
|
2335
2431
|
{
|
|
2336
2432
|
"type": "boolean"
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
"$ref": "#/components/schemas/EnvironmentValue"
|
|
2337
2436
|
}
|
|
2338
2437
|
]
|
|
2339
2438
|
}
|
package/dist/bin/epilot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
API_LIST
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-GNZOIBKX.js";
|
|
5
5
|
|
|
6
6
|
// bin/epilot.ts
|
|
7
7
|
import { runMain } from "citty";
|
|
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
|
|
|
11
11
|
var main = defineCommand({
|
|
12
12
|
meta: {
|
|
13
13
|
name: "epilot",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.145",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -30,8 +30,8 @@ var main = defineCommand({
|
|
|
30
30
|
auth: () => import("../auth-WMXFMPWE.js").then((m) => m.default),
|
|
31
31
|
profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
|
|
32
32
|
config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
|
|
33
|
-
completion: () => import("../completion-
|
|
34
|
-
upgrade: () => import("../upgrade-
|
|
33
|
+
completion: () => import("../completion-RZ6CSKPV.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-4DRMPNCM.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,13 +134,13 @@ 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.
|
|
137
|
+
var VERSION = true ? "0.1.145" : (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);
|
|
141
141
|
var completionsIdx = args.indexOf("--_completions");
|
|
142
142
|
if (completionsIdx >= 0) {
|
|
143
|
-
const { handleCompletions } = await import("../completion-
|
|
143
|
+
const { handleCompletions } = await import("../completion-RZ6CSKPV.js");
|
|
144
144
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
145
145
|
process.exit(0);
|
|
146
146
|
}
|
|
@@ -810,11 +810,15 @@ var API_LIST = [
|
|
|
810
810
|
kebabName: "event-catalog",
|
|
811
811
|
title: "Event Catalog API",
|
|
812
812
|
serverUrl: "https://event-catalog.sls.epilot.io",
|
|
813
|
-
operationCount:
|
|
813
|
+
operationCount: 14,
|
|
814
814
|
operationIds: [
|
|
815
815
|
"listEvents",
|
|
816
|
+
"createCustomEvent",
|
|
816
817
|
"getEvent",
|
|
817
818
|
"patchEvent",
|
|
819
|
+
"deprecateCustomEvent",
|
|
820
|
+
"previewCustomEvent",
|
|
821
|
+
"publishCustomEventDefinition",
|
|
818
822
|
"getEventJSONSchema",
|
|
819
823
|
"getEventExample",
|
|
820
824
|
"listEventVersions",
|
|
@@ -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.
|
|
75
|
+
if (true) return "0.1.145";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|