@epilot/cli 0.1.142 → 0.1.143

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.142 — CLI for epilot APIs
32
+ epilot v0.1.143 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Journey API",
5
5
  "description": "API to configure journeys",
6
- "version": "1.4.2"
6
+ "version": "1.4.3"
7
7
  },
8
8
  "security": [
9
9
  {
@@ -149,7 +149,14 @@
149
149
  "content": {
150
150
  "application/json": {
151
151
  "schema": {
152
- "$ref": "#/components/schemas/Journey"
152
+ "allOf": [
153
+ {
154
+ "$ref": "#/components/schemas/Journey"
155
+ },
156
+ {
157
+ "$ref": "#/components/schemas/JourneyActivationGuarantee"
158
+ }
159
+ ]
153
160
  }
154
161
  }
155
162
  }
@@ -200,6 +207,62 @@
200
207
  }
201
208
  }
202
209
  },
210
+ "/v1/journey/configuration/{id}/environment": {
211
+ "get": {
212
+ "operationId": "getJourneyEnvironment",
213
+ "summary": "getJourneyEnvironment",
214
+ "description": "Resolve the environment variables referenced by this journey. Only browser-safe value types are returned.",
215
+ "security": [
216
+ {
217
+ "EpilotAuth": []
218
+ }
219
+ ],
220
+ "tags": [
221
+ "Journeys"
222
+ ],
223
+ "parameters": [
224
+ {
225
+ "name": "id",
226
+ "in": "path",
227
+ "description": "Journey ID bound to the supplied journey access token",
228
+ "required": true,
229
+ "schema": {
230
+ "type": "string",
231
+ "format": "uuid"
232
+ }
233
+ }
234
+ ],
235
+ "responses": {
236
+ "200": {
237
+ "description": "Resolved environment-backed datasources",
238
+ "headers": {
239
+ "Cache-Control": {
240
+ "schema": {
241
+ "type": "string"
242
+ },
243
+ "description": "Always private, no-store"
244
+ }
245
+ },
246
+ "content": {
247
+ "application/json": {
248
+ "schema": {
249
+ "$ref": "#/components/schemas/JourneyEnvironmentResponse"
250
+ }
251
+ }
252
+ }
253
+ },
254
+ "401": {
255
+ "description": "Journey access token missing"
256
+ },
257
+ "403": {
258
+ "description": "Journey access token does not match the journey"
259
+ },
260
+ "502": {
261
+ "description": "Environment resolver unavailable"
262
+ }
263
+ }
264
+ }
265
+ },
203
266
  "/v1/journey/products/{id}": {
204
267
  "get": {
205
268
  "operationId": "getJourneyProducts",
@@ -736,7 +799,14 @@
736
799
  "content": {
737
800
  "application/json": {
738
801
  "schema": {
739
- "$ref": "#/components/schemas/JourneyCreationRequestV2"
802
+ "allOf": [
803
+ {
804
+ "$ref": "#/components/schemas/JourneyCreationRequestV2"
805
+ },
806
+ {
807
+ "$ref": "#/components/schemas/JourneyActivationGuarantee"
808
+ }
809
+ ]
740
810
  }
741
811
  }
742
812
  }
@@ -938,6 +1008,124 @@
938
1008
  },
939
1009
  "components": {
940
1010
  "schemas": {
1011
+ "EnvironmentMapEntry": {
1012
+ "type": "object",
1013
+ "required": [
1014
+ "key",
1015
+ "value"
1016
+ ],
1017
+ "properties": {
1018
+ "key": {
1019
+ "type": "string"
1020
+ },
1021
+ "value": {
1022
+ "oneOf": [
1023
+ {
1024
+ "type": "string"
1025
+ },
1026
+ {
1027
+ "type": "object",
1028
+ "additionalProperties": {
1029
+ "type": "string"
1030
+ }
1031
+ }
1032
+ ]
1033
+ }
1034
+ }
1035
+ },
1036
+ "EnvironmentMap": {
1037
+ "type": "object",
1038
+ "required": [
1039
+ "options"
1040
+ ],
1041
+ "properties": {
1042
+ "fallbackLanguage": {
1043
+ "type": "string",
1044
+ "default": "de"
1045
+ },
1046
+ "options": {
1047
+ "type": "array",
1048
+ "items": {
1049
+ "$ref": "#/components/schemas/EnvironmentMapEntry"
1050
+ }
1051
+ }
1052
+ }
1053
+ },
1054
+ "JourneyEnvironmentResponse": {
1055
+ "type": "object",
1056
+ "required": [
1057
+ "items",
1058
+ "errors"
1059
+ ],
1060
+ "properties": {
1061
+ "items": {
1062
+ "type": "array",
1063
+ "items": {
1064
+ "type": "object",
1065
+ "required": [
1066
+ "datasourceId",
1067
+ "type",
1068
+ "value"
1069
+ ],
1070
+ "properties": {
1071
+ "datasourceId": {
1072
+ "type": "string"
1073
+ },
1074
+ "type": {
1075
+ "type": "string",
1076
+ "enum": [
1077
+ "Text",
1078
+ "Number",
1079
+ "Boolean",
1080
+ "Map"
1081
+ ]
1082
+ },
1083
+ "value": {
1084
+ "oneOf": [
1085
+ {
1086
+ "type": "string"
1087
+ },
1088
+ {
1089
+ "type": "number"
1090
+ },
1091
+ {
1092
+ "type": "boolean"
1093
+ },
1094
+ {
1095
+ "$ref": "#/components/schemas/EnvironmentMap"
1096
+ }
1097
+ ]
1098
+ }
1099
+ }
1100
+ }
1101
+ },
1102
+ "errors": {
1103
+ "type": "array",
1104
+ "items": {
1105
+ "type": "object",
1106
+ "required": [
1107
+ "datasourceId",
1108
+ "code"
1109
+ ],
1110
+ "properties": {
1111
+ "datasourceId": {
1112
+ "type": "string"
1113
+ },
1114
+ "code": {
1115
+ "type": "string",
1116
+ "enum": [
1117
+ "not_found",
1118
+ "unsupported_type",
1119
+ "not_set",
1120
+ "invalid_value",
1121
+ "incompatible_consumer"
1122
+ ]
1123
+ }
1124
+ }
1125
+ }
1126
+ }
1127
+ }
1128
+ },
941
1129
  "GetJourneysResponse": {
942
1130
  "type": "object"
943
1131
  },
@@ -1064,6 +1252,13 @@
1064
1252
  "type": "boolean",
1065
1253
  "nullable": true
1066
1254
  },
1255
+ "stepperType": {
1256
+ "type": "string",
1257
+ "enum": [
1258
+ "numbers",
1259
+ "progress bar"
1260
+ ]
1261
+ },
1067
1262
  "hideNextButton": {
1068
1263
  "type": "boolean",
1069
1264
  "nullable": true
@@ -1296,6 +1491,12 @@
1296
1491
  "shouldLoadEntity": {
1297
1492
  "type": "boolean",
1298
1493
  "description": "If type is not text, we can instruct the journey to fetch the entity id we receive as value"
1494
+ },
1495
+ "description": {
1496
+ "type": "string",
1497
+ "nullable": true,
1498
+ "maxLength": 500,
1499
+ "description": "Human-readable note describing the parameter's purpose. Free text; may contain newlines."
1299
1500
  }
1300
1501
  },
1301
1502
  "required": [
@@ -1336,11 +1537,7 @@
1336
1537
  },
1337
1538
  "lang": {
1338
1539
  "type": "string",
1339
- "enum": [
1340
- "de",
1341
- "en",
1342
- "fr"
1343
- ]
1540
+ "example": "de"
1344
1541
  },
1345
1542
  "width": {
1346
1543
  "type": "string"
@@ -1382,7 +1579,8 @@
1382
1579
  "type": "string"
1383
1580
  },
1384
1581
  "templateId": {
1385
- "type": "string"
1582
+ "type": "string",
1583
+ "nullable": true
1386
1584
  },
1387
1585
  "entityId": {
1388
1586
  "type": "string",
@@ -1391,6 +1589,10 @@
1391
1589
  "mappingsAutomationId": {
1392
1590
  "type": "string"
1393
1591
  },
1592
+ "newMappings": {
1593
+ "description": "When true, the journey is created without a mapping config or automation; mappings are managed as advanced mappings on a lazily created automation.",
1594
+ "type": "boolean"
1595
+ },
1394
1596
  "targetedCustomer": {
1395
1597
  "type": "string"
1396
1598
  },
@@ -1481,6 +1683,19 @@
1481
1683
  "PRIVATE"
1482
1684
  ]
1483
1685
  },
1686
+ "authGate": {
1687
+ "type": "object",
1688
+ "description": "Steps after this step require an authenticated session (auth gate)",
1689
+ "required": [
1690
+ "stepId"
1691
+ ],
1692
+ "properties": {
1693
+ "stepId": {
1694
+ "type": "string",
1695
+ "description": "The step containing the Login & Registration block"
1696
+ }
1697
+ }
1698
+ },
1484
1699
  "isPublished": {
1485
1700
  "type": "boolean"
1486
1701
  },
@@ -1493,7 +1708,7 @@
1493
1708
  "savingProgress": {
1494
1709
  "type": "object",
1495
1710
  "properties": {
1496
- "savingMode": {
1711
+ "mode": {
1497
1712
  "type": "string",
1498
1713
  "enum": [
1499
1714
  "auto",
@@ -1502,7 +1717,7 @@
1502
1717
  "none"
1503
1718
  ]
1504
1719
  },
1505
- "supportedVersion": {
1720
+ "supportedRevision": {
1506
1721
  "type": "number"
1507
1722
  }
1508
1723
  }
@@ -1591,6 +1806,13 @@
1591
1806
  "type": "boolean",
1592
1807
  "nullable": true
1593
1808
  },
1809
+ "stepperType": {
1810
+ "type": "string",
1811
+ "enum": [
1812
+ "numbers",
1813
+ "progress bar"
1814
+ ]
1815
+ },
1594
1816
  "hideNextButton": {
1595
1817
  "type": "boolean",
1596
1818
  "nullable": true
@@ -1823,6 +2045,12 @@
1823
2045
  "shouldLoadEntity": {
1824
2046
  "type": "boolean",
1825
2047
  "description": "If type is not text, we can instruct the journey to fetch the entity id we receive as value"
2048
+ },
2049
+ "description": {
2050
+ "type": "string",
2051
+ "nullable": true,
2052
+ "maxLength": 500,
2053
+ "description": "Human-readable note describing the parameter's purpose. Free text; may contain newlines."
1826
2054
  }
1827
2055
  },
1828
2056
  "required": [
@@ -1863,11 +2091,7 @@
1863
2091
  },
1864
2092
  "lang": {
1865
2093
  "type": "string",
1866
- "enum": [
1867
- "de",
1868
- "en",
1869
- "fr"
1870
- ]
2094
+ "example": "de"
1871
2095
  },
1872
2096
  "width": {
1873
2097
  "type": "string"
@@ -1910,8 +2134,13 @@
1910
2134
  "mappingsAutomationId": {
1911
2135
  "type": "string"
1912
2136
  },
2137
+ "newMappings": {
2138
+ "description": "When true, the journey is created without a mapping config or automation; mappings are managed as advanced mappings on a lazily created automation.",
2139
+ "type": "boolean"
2140
+ },
1913
2141
  "templateId": {
1914
- "type": "string"
2142
+ "type": "string",
2143
+ "nullable": true
1915
2144
  },
1916
2145
  "targetedCustomer": {
1917
2146
  "type": "string"
@@ -1992,12 +2221,46 @@
1992
2221
  "PRIVATE"
1993
2222
  ]
1994
2223
  },
2224
+ "authGate": {
2225
+ "type": "object",
2226
+ "description": "Steps after this step require an authenticated session (auth gate)",
2227
+ "required": [
2228
+ "stepId"
2229
+ ],
2230
+ "properties": {
2231
+ "stepId": {
2232
+ "type": "string",
2233
+ "description": "The step containing the Login & Registration block"
2234
+ }
2235
+ }
2236
+ },
1995
2237
  "enableDarkMode": {
1996
2238
  "type": "boolean",
1997
2239
  "description": "If true, the journey shows an icon to toggle dark mode"
1998
2240
  },
2241
+ "useAustrianLabels": {
2242
+ "type": "boolean",
2243
+ "description": "If true, some journey input labels are in Austrian format"
2244
+ },
1999
2245
  "isActive": {
2000
2246
  "type": "boolean"
2247
+ },
2248
+ "savingProgress": {
2249
+ "type": "object",
2250
+ "properties": {
2251
+ "mode": {
2252
+ "type": "string",
2253
+ "enum": [
2254
+ "auto",
2255
+ "local",
2256
+ "remote",
2257
+ "none"
2258
+ ]
2259
+ },
2260
+ "supportedRevision": {
2261
+ "type": "number"
2262
+ }
2263
+ }
2001
2264
  }
2002
2265
  },
2003
2266
  "additionalProperties": false
@@ -2169,6 +2432,27 @@
2169
2432
  }
2170
2433
  ]
2171
2434
  },
2435
+ "JourneyActivationGuarantee": {
2436
+ "description": "Journeys read from the API always carry an explicit `settings.isActive`. The flag remains optional in request bodies.\n",
2437
+ "type": "object",
2438
+ "required": [
2439
+ "settings"
2440
+ ],
2441
+ "properties": {
2442
+ "settings": {
2443
+ "type": "object",
2444
+ "required": [
2445
+ "isActive"
2446
+ ],
2447
+ "properties": {
2448
+ "isActive": {
2449
+ "type": "boolean",
2450
+ "description": "Whether the journey is active (accessible to end customers)"
2451
+ }
2452
+ }
2453
+ }
2454
+ }
2455
+ },
2172
2456
  "JourneyFeatureFlags": {
2173
2457
  "type": "object",
2174
2458
  "properties": {
@@ -2534,6 +2818,11 @@
2534
2818
  }
2535
2819
  }
2536
2820
  },
2821
+ "context_entity_id": {
2822
+ "description": "Entity id used to resolve entity and relational template variables",
2823
+ "type": "string",
2824
+ "format": "uuid"
2825
+ },
2537
2826
  "language": {
2538
2827
  "description": "Language code for the document",
2539
2828
  "type": "string",
@@ -2583,13 +2872,22 @@
2583
2872
  },
2584
2873
  "ValidationRuleRef": {
2585
2874
  "type": "object",
2586
- "description": "References to validation rules organized by blocks and fields.\nMaps block IDs to either rule IDs (for block-level rules) or rule references (for field-level rules).\n",
2875
+ "description": "References to validation rules organized by blocks and fields.\nMaps block IDs to either one or more ordered rule IDs (for block-level rules)\nor rule references (for field-level rules).\n",
2587
2876
  "additionalProperties": {
2588
2877
  "oneOf": [
2589
2878
  {
2590
2879
  "type": "string",
2591
2880
  "description": "Rule ID for block-level validation"
2592
2881
  },
2882
+ {
2883
+ "type": "array",
2884
+ "description": "Ordered rule IDs for block-level validation",
2885
+ "minItems": 1,
2886
+ "uniqueItems": true,
2887
+ "items": {
2888
+ "type": "string"
2889
+ }
2890
+ },
2593
2891
  {
2594
2892
  "$ref": "#/components/schemas/RuleRef"
2595
2893
  }
@@ -2597,23 +2895,45 @@
2597
2895
  },
2598
2896
  "example": {
2599
2897
  "block1": "rule123",
2600
- "block2": {
2601
- "field1": "rule456",
2602
- "field2": "rule789"
2898
+ "block2": [
2899
+ "rule456",
2900
+ "rule789"
2901
+ ],
2902
+ "block3": {
2903
+ "field1": "rule101",
2904
+ "field2": [
2905
+ "rule102",
2906
+ "rule103"
2907
+ ]
2603
2908
  }
2604
2909
  }
2605
2910
  },
2606
2911
  "RuleRef": {
2607
2912
  "type": "object",
2608
- "description": "Field-level rule references within a block.\nMaps field names to rule IDs.\n",
2913
+ "description": "Field-level rule references within a block.\nMaps field names to one or more ordered rule IDs.\n",
2609
2914
  "additionalProperties": {
2610
- "type": "string",
2611
- "description": "Rule ID for field-level validation"
2915
+ "oneOf": [
2916
+ {
2917
+ "type": "string",
2918
+ "description": "Rule ID for field-level validation"
2919
+ },
2920
+ {
2921
+ "type": "array",
2922
+ "description": "Ordered rule IDs for field-level validation",
2923
+ "minItems": 1,
2924
+ "uniqueItems": true,
2925
+ "items": {
2926
+ "type": "string"
2927
+ }
2928
+ }
2929
+ ]
2612
2930
  },
2613
2931
  "example": {
2614
2932
  "firstName": "rule123",
2615
- "lastName": "rule456",
2616
- "email": "rule789"
2933
+ "lastName": [
2934
+ "rule456",
2935
+ "rule789"
2936
+ ]
2617
2937
  }
2618
2938
  }
2619
2939
  },
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "../chunk-TPJG2M3D.js";
4
+ } from "../chunk-4EODPJ5A.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.142",
14
+ version: "0.1.143",
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-6OBSXXHS.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-WSLV2SPC.js").then((m) => m.default),
33
+ completion: () => import("../completion-HPDI7RNO.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-7VYPWNEV.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.142" : (await null).default.version;
137
+ var VERSION = true ? "0.1.143" : (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-6OBSXXHS.js");
143
+ const { handleCompletions } = await import("../completion-HPDI7RNO.js");
144
144
  handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
145
145
  process.exit(0);
146
146
  }
@@ -962,11 +962,12 @@ var API_LIST = [
962
962
  kebabName: "journey",
963
963
  title: "Journey API",
964
964
  serverUrl: "https://journey-config.sls.epilot.io",
965
- operationCount: 16,
965
+ operationCount: 17,
966
966
  operationIds: [
967
967
  "getJourneysByOrgId",
968
968
  "getJourney",
969
969
  "removeJourney",
970
+ "getJourneyEnvironment",
970
971
  "getJourneyProducts",
971
972
  "createJourney",
972
973
  "updateJourney",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "./chunk-TPJG2M3D.js";
4
+ } from "./chunk-4EODPJ5A.js";
5
5
  import {
6
6
  DIM,
7
7
  GREEN,
@@ -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.142";
75
+ if (true) return "0.1.143";
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.142",
3
+ "version": "0.1.143",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {