@epilot/cli 0.1.142 → 0.1.144
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/journey.json +346 -26
- package/definitions/validation-rules.json +104 -5
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-TPJG2M3D.js → chunk-4EODPJ5A.js} +2 -1
- package/dist/{completion-6OBSXXHS.js → completion-HPDI7RNO.js} +1 -1
- package/dist/{upgrade-WSLV2SPC.js → upgrade-4LGBIDMY.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/definitions/app.json
CHANGED
|
@@ -1150,6 +1150,9 @@
|
|
|
1150
1150
|
"description": "Target version to create"
|
|
1151
1151
|
}
|
|
1152
1152
|
],
|
|
1153
|
+
"requestBody": {
|
|
1154
|
+
"$ref": "#/components/requestBodies/CloneVersionRequest"
|
|
1155
|
+
},
|
|
1153
1156
|
"responses": {
|
|
1154
1157
|
"201": {
|
|
1155
1158
|
"description": "New version created successfully",
|
|
@@ -1902,6 +1905,28 @@
|
|
|
1902
1905
|
"$ref": "#/components/schemas/Options"
|
|
1903
1906
|
},
|
|
1904
1907
|
"description": "Replaces the full set of app-level option declarations for this version.\nOption keys must be unique app-wide; `secret`-touching options are always\nsensitive and must not declare `sensitive: false`.\n"
|
|
1908
|
+
},
|
|
1909
|
+
"changelog": {
|
|
1910
|
+
"type": "string",
|
|
1911
|
+
"maxLength": 250,
|
|
1912
|
+
"description": "Short description of what changed in this version"
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
"CloneVersionRequest": {
|
|
1920
|
+
"required": false,
|
|
1921
|
+
"content": {
|
|
1922
|
+
"application/json": {
|
|
1923
|
+
"schema": {
|
|
1924
|
+
"type": "object",
|
|
1925
|
+
"properties": {
|
|
1926
|
+
"changelog": {
|
|
1927
|
+
"type": "string",
|
|
1928
|
+
"maxLength": 250,
|
|
1929
|
+
"description": "Short description of what the new version will change"
|
|
1905
1930
|
}
|
|
1906
1931
|
}
|
|
1907
1932
|
}
|
|
@@ -2009,7 +2034,7 @@
|
|
|
2009
2034
|
},
|
|
2010
2035
|
"Options": {
|
|
2011
2036
|
"type": "object",
|
|
2012
|
-
"description": "
|
|
2037
|
+
"description": "An option declaration — a setting the installing org fills in. Declared at app level.",
|
|
2013
2038
|
"required": [
|
|
2014
2039
|
"key",
|
|
2015
2040
|
"type"
|
|
@@ -2058,7 +2083,7 @@
|
|
|
2058
2083
|
},
|
|
2059
2084
|
"sensitive": {
|
|
2060
2085
|
"type": "boolean",
|
|
2061
|
-
"description": "Write-only, server-side only value — like a sensitive environment variable\n(app-level options only). Sensitive values are never serialized in any response;\nthey are resolvable only via server-side channels (API proxy injection, function\
|
|
2086
|
+
"description": "Write-only, server-side only value — like a sensitive environment variable\n(app-level options only). Sensitive values are never serialized in any response;\nthey are resolvable only via server-side channels (API proxy injection, function\nruns, the internal options/resolve endpoint). Non-sensitive values\nare readable wherever the app runs, including the end-customer browser (journey and\nportal runtime). Forced to true for `secret`-touching options. Default: false.\n"
|
|
2062
2087
|
},
|
|
2063
2088
|
"configured": {
|
|
2064
2089
|
"type": "boolean",
|
|
@@ -2179,6 +2204,7 @@
|
|
|
2179
2204
|
"EXTERNAL_PRODUCT_CATALOG",
|
|
2180
2205
|
"CUSTOM_PAGE",
|
|
2181
2206
|
"API_PROXY",
|
|
2207
|
+
"EXTERNAL_VALUES",
|
|
2182
2208
|
"APP_FUNCTION"
|
|
2183
2209
|
],
|
|
2184
2210
|
"description": "Type of app component"
|
|
@@ -2375,7 +2401,8 @@
|
|
|
2375
2401
|
"CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent",
|
|
2376
2402
|
"EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent",
|
|
2377
2403
|
"CUSTOM_PAGE": "#/components/schemas/CustomPageComponent",
|
|
2378
|
-
"API_PROXY": "#/components/schemas/ApiProxyComponent"
|
|
2404
|
+
"API_PROXY": "#/components/schemas/ApiProxyComponent",
|
|
2405
|
+
"EXTERNAL_VALUES": "#/components/schemas/ExternalValuesComponent"
|
|
2379
2406
|
}
|
|
2380
2407
|
},
|
|
2381
2408
|
"oneOf": [
|
|
@@ -2405,6 +2432,9 @@
|
|
|
2405
2432
|
},
|
|
2406
2433
|
{
|
|
2407
2434
|
"$ref": "#/components/schemas/ApiProxyComponent"
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
"$ref": "#/components/schemas/ExternalValuesComponent"
|
|
2408
2438
|
}
|
|
2409
2439
|
]
|
|
2410
2440
|
}
|
|
@@ -2428,6 +2458,25 @@
|
|
|
2428
2458
|
}
|
|
2429
2459
|
}
|
|
2430
2460
|
},
|
|
2461
|
+
"ExternalValuesComponent": {
|
|
2462
|
+
"type": "object",
|
|
2463
|
+
"description": "Exposes typed values resolved from an external system at runtime (e.g. a meter reading prediction). Consumers such as validation rules reference a hook and one of its results by id. Resolution is performed by the external-values-api on behalf of authenticated epilot 360 users and portal end customers.\n",
|
|
2464
|
+
"required": [
|
|
2465
|
+
"component_type",
|
|
2466
|
+
"configuration"
|
|
2467
|
+
],
|
|
2468
|
+
"properties": {
|
|
2469
|
+
"component_type": {
|
|
2470
|
+
"type": "string",
|
|
2471
|
+
"enum": [
|
|
2472
|
+
"EXTERNAL_VALUES"
|
|
2473
|
+
]
|
|
2474
|
+
},
|
|
2475
|
+
"configuration": {
|
|
2476
|
+
"$ref": "#/components/schemas/ExternalValuesConfig"
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
},
|
|
2431
2480
|
"CustomCapabilityComponent": {
|
|
2432
2481
|
"type": "object",
|
|
2433
2482
|
"required": [
|
|
@@ -3667,7 +3716,7 @@
|
|
|
3667
3716
|
"additionalProperties": false
|
|
3668
3717
|
},
|
|
3669
3718
|
"PortalExtensionHookVisualizationMetadata": {
|
|
3670
|
-
"description": "Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:\n - 200 with a JSON body of shape:\n {\n \"type_options\": [\n { \"id\": \"ht\", \"label\": { \"en\": \"High tariff\" }, \"aggregation_group\": \"consumption\", \"statistical_method\": \"sum\", \"unit\": \"kWh\", \"color\": \"primary\", \"precision\": 2 },\n ...\n ],\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\"],\n \"data_range\": { \"from\": \"2024-01-01T00:00:00Z\", \"to\": \"2026-05-01T00:00:00Z\" }\n }\n Each type option carries its own `statistical_method`, which describes the method already applied to that type's data and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. A single visualization can therefore mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.\n Each type option may also customize its rendering: `color` picks a Spark palette color (`primary`, `slate`, `mauve`, `orange`, `red`, `tomato`, `amber`, `green`, `blue`) used to draw the type's series; `precision` sets the number of decimal places to show for that type's values (axis labels, tooltips, summaries). Both are optional — the consumer falls back to its own defaults when they are omitted.\n `aggregation_group` controls how types within a group are visually combined (depends on the per-type `statistical_method`):\n - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.\n - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.\n All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.\nThe portal looks up this hook implicitly per extension (one `visualizationMetadata` hook per extension) — there is no need for a data-retrieval hook to reference it explicitly.\n",
|
|
3719
|
+
"description": "Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:\n - 200 with a JSON body of shape:\n {\n \"type_options\": [\n { \"id\": \"ht\", \"label\": { \"en\": \"High tariff\" }, \"aggregation_group\": \"consumption\", \"statistical_method\": \"sum\", \"unit\": \"kWh\", \"color\": \"primary\", \"precision\": 2 },\n ...\n ],\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\", \"P1Y\"],\n \"data_range\": { \"from\": \"2024-01-01T00:00:00Z\", \"to\": \"2026-05-01T00:00:00Z\" }\n }\n Each type option carries its own `statistical_method`, which describes the method already applied to that type's data and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. A single visualization can therefore mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.\n Each type option may also customize its rendering: `color` picks a Spark palette color (`primary`, `slate`, `mauve`, `orange`, `red`, `tomato`, `amber`, `green`, `blue`) used to draw the type's series; `precision` sets the number of decimal places to show for that type's values (axis labels, tooltips, summaries). Both are optional — the consumer falls back to its own defaults when they are omitted.\n `aggregation_group` controls how types within a group are visually combined (depends on the per-type `statistical_method`):\n - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.\n - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.\n All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.\nThe portal looks up this hook implicitly per extension (one `visualizationMetadata` hook per extension) — there is no need for a data-retrieval hook to reference it explicitly.\n",
|
|
3671
3720
|
"type": "object",
|
|
3672
3721
|
"properties": {
|
|
3673
3722
|
"id": {
|
|
@@ -5082,6 +5131,204 @@
|
|
|
5082
5131
|
}
|
|
5083
5132
|
}
|
|
5084
5133
|
},
|
|
5134
|
+
"ExternalValuesConfig": {
|
|
5135
|
+
"type": "object",
|
|
5136
|
+
"description": "Configuration for an EXTERNAL_VALUES component",
|
|
5137
|
+
"required": [
|
|
5138
|
+
"hooks"
|
|
5139
|
+
],
|
|
5140
|
+
"properties": {
|
|
5141
|
+
"hooks": {
|
|
5142
|
+
"type": "array",
|
|
5143
|
+
"description": "Hooks exposed by this component. Hook ids must be unique within the component.",
|
|
5144
|
+
"items": {
|
|
5145
|
+
"$ref": "#/components/schemas/ExternalValuesHook"
|
|
5146
|
+
}
|
|
5147
|
+
}
|
|
5148
|
+
}
|
|
5149
|
+
},
|
|
5150
|
+
"ExternalValuesHook": {
|
|
5151
|
+
"type": "object",
|
|
5152
|
+
"description": "One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Input`, `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse`.\n",
|
|
5153
|
+
"required": [
|
|
5154
|
+
"id",
|
|
5155
|
+
"name",
|
|
5156
|
+
"call",
|
|
5157
|
+
"result"
|
|
5158
|
+
],
|
|
5159
|
+
"properties": {
|
|
5160
|
+
"id": {
|
|
5161
|
+
"type": "string",
|
|
5162
|
+
"pattern": "^[a-zA-Z0-9_-]{1,100}$",
|
|
5163
|
+
"description": "Stable identifier; consumers (e.g. validation rules) reference it. Renaming breaks references."
|
|
5164
|
+
},
|
|
5165
|
+
"name": {
|
|
5166
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
5167
|
+
},
|
|
5168
|
+
"description": {
|
|
5169
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
5170
|
+
},
|
|
5171
|
+
"auth_type": {
|
|
5172
|
+
"type": "string",
|
|
5173
|
+
"enum": [
|
|
5174
|
+
"none",
|
|
5175
|
+
"header",
|
|
5176
|
+
"bearer",
|
|
5177
|
+
"hmac"
|
|
5178
|
+
],
|
|
5179
|
+
"default": "none",
|
|
5180
|
+
"description": "Static request authentication applied to the call.\n- `none`: no static authentication.\n- `header`: sends `auth_secret` in header `auth_header` (default `X-API-Key`).\n- `bearer`: sends `Authorization: Bearer <auth_secret>`.\n- `hmac`: signs the request per Standard Webhooks (headers `webhook-id`,\n `webhook-timestamp`, `webhook-signature` = `v1,<base64 HMAC-SHA256>` over\n `<id>.<timestamp>.<body>`) using `auth_secret` as a `whsec_`-prefixed\n base64 secret, exactly as epilot webhooks do.\n\n`auth_secret` is required when `auth_type` is `header`, `bearer` or `hmac`.\nCombine with `auth` (a pre-call that fetches a token) when the target needs both.\n"
|
|
5181
|
+
},
|
|
5182
|
+
"auth_header": {
|
|
5183
|
+
"type": "string",
|
|
5184
|
+
"description": "Header name used when `auth_type` is `header`. Defaults to `X-API-Key`."
|
|
5185
|
+
},
|
|
5186
|
+
"auth_secret": {
|
|
5187
|
+
"type": "string",
|
|
5188
|
+
"description": "Liquid template resolving to the secret, e.g. \"{{Options.api_key}}\". Must reference an option declared with `type: secret`; literals are rejected. Required when `auth_type` is `header`, `bearer` or `hmac`.",
|
|
5189
|
+
"example": "{{Options.api_key}}"
|
|
5190
|
+
},
|
|
5191
|
+
"auth": {
|
|
5192
|
+
"$ref": "#/components/schemas/PortalExtensionAuthBlock"
|
|
5193
|
+
},
|
|
5194
|
+
"call": {
|
|
5195
|
+
"type": "object",
|
|
5196
|
+
"required": [
|
|
5197
|
+
"url"
|
|
5198
|
+
],
|
|
5199
|
+
"properties": {
|
|
5200
|
+
"method": {
|
|
5201
|
+
"type": "string",
|
|
5202
|
+
"enum": [
|
|
5203
|
+
"GET",
|
|
5204
|
+
"POST",
|
|
5205
|
+
"PUT",
|
|
5206
|
+
"PATCH"
|
|
5207
|
+
],
|
|
5208
|
+
"default": "POST",
|
|
5209
|
+
"description": "HTTP method to use for the call"
|
|
5210
|
+
},
|
|
5211
|
+
"url": {
|
|
5212
|
+
"type": "string",
|
|
5213
|
+
"description": "URL to call. Supports variable interpolation."
|
|
5214
|
+
},
|
|
5215
|
+
"headers": {
|
|
5216
|
+
"type": "object",
|
|
5217
|
+
"description": "Headers to send with the call. Supports variable interpolation.",
|
|
5218
|
+
"additionalProperties": {
|
|
5219
|
+
"type": "string"
|
|
5220
|
+
}
|
|
5221
|
+
},
|
|
5222
|
+
"params": {
|
|
5223
|
+
"type": "object",
|
|
5224
|
+
"description": "Query parameters to append to the URL. Supports variable interpolation.",
|
|
5225
|
+
"additionalProperties": {
|
|
5226
|
+
"type": "string"
|
|
5227
|
+
}
|
|
5228
|
+
},
|
|
5229
|
+
"body": {
|
|
5230
|
+
"type": "object",
|
|
5231
|
+
"description": "JSON body to send. Values support variable interpolation. When omitted, `{ Input, Context, Consumer }` is sent as-is.",
|
|
5232
|
+
"additionalProperties": true
|
|
5233
|
+
}
|
|
5234
|
+
}
|
|
5235
|
+
},
|
|
5236
|
+
"result": {
|
|
5237
|
+
"type": "array",
|
|
5238
|
+
"minItems": 1,
|
|
5239
|
+
"description": "Typed results extracted from the response. Result ids must be unique within the hook.",
|
|
5240
|
+
"items": {
|
|
5241
|
+
"$ref": "#/components/schemas/ExternalValuesResult"
|
|
5242
|
+
}
|
|
5243
|
+
},
|
|
5244
|
+
"timeout_ms": {
|
|
5245
|
+
"type": "integer",
|
|
5246
|
+
"minimum": 500,
|
|
5247
|
+
"maximum": 5000,
|
|
5248
|
+
"default": 3000,
|
|
5249
|
+
"description": "Timeout for the external call in milliseconds."
|
|
5250
|
+
},
|
|
5251
|
+
"on_unavailable": {
|
|
5252
|
+
"type": "string",
|
|
5253
|
+
"enum": [
|
|
5254
|
+
"skip",
|
|
5255
|
+
"block"
|
|
5256
|
+
],
|
|
5257
|
+
"default": "skip",
|
|
5258
|
+
"description": "Behaviour when the external system is unavailable (timeout, network or upstream error). `skip`: consumers ignore conditions depending on this hook. `block`: consumers treat the dependent action as not allowed."
|
|
5259
|
+
},
|
|
5260
|
+
"cache": {
|
|
5261
|
+
"type": "object",
|
|
5262
|
+
"description": "Response caching. Off when omitted.",
|
|
5263
|
+
"required": [
|
|
5264
|
+
"ttl_seconds"
|
|
5265
|
+
],
|
|
5266
|
+
"properties": {
|
|
5267
|
+
"ttl_seconds": {
|
|
5268
|
+
"type": "integer",
|
|
5269
|
+
"minimum": 0,
|
|
5270
|
+
"maximum": 3600,
|
|
5271
|
+
"description": "Time to live in seconds. 0 disables caching."
|
|
5272
|
+
},
|
|
5273
|
+
"key": {
|
|
5274
|
+
"type": "string",
|
|
5275
|
+
"description": "Liquid template for the cache key. Defaults to a hash of org, app, hook, `Input` and `Context`."
|
|
5276
|
+
}
|
|
5277
|
+
}
|
|
5278
|
+
},
|
|
5279
|
+
"use_static_ips": {
|
|
5280
|
+
"type": "boolean",
|
|
5281
|
+
"description": "If set, requests are sent from epilot's static egress IPs. Mutually exclusive with secure_proxy."
|
|
5282
|
+
},
|
|
5283
|
+
"secure_proxy": {
|
|
5284
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
5285
|
+
}
|
|
5286
|
+
}
|
|
5287
|
+
},
|
|
5288
|
+
"ExternalValuesResult": {
|
|
5289
|
+
"type": "object",
|
|
5290
|
+
"description": "A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.\n",
|
|
5291
|
+
"required": [
|
|
5292
|
+
"id",
|
|
5293
|
+
"type",
|
|
5294
|
+
"name"
|
|
5295
|
+
],
|
|
5296
|
+
"properties": {
|
|
5297
|
+
"id": {
|
|
5298
|
+
"type": "string",
|
|
5299
|
+
"pattern": "^[a-zA-Z0-9_-]{1,100}$",
|
|
5300
|
+
"description": "Stable identifier of the result within the hook. Renaming breaks references."
|
|
5301
|
+
},
|
|
5302
|
+
"type": {
|
|
5303
|
+
"type": "string",
|
|
5304
|
+
"enum": [
|
|
5305
|
+
"number",
|
|
5306
|
+
"text",
|
|
5307
|
+
"date",
|
|
5308
|
+
"boolean"
|
|
5309
|
+
],
|
|
5310
|
+
"description": "Type the extracted value is coerced to."
|
|
5311
|
+
},
|
|
5312
|
+
"name": {
|
|
5313
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
5314
|
+
},
|
|
5315
|
+
"template": {
|
|
5316
|
+
"type": "string",
|
|
5317
|
+
"description": "Liquid template over `Response` etc.; output coerced to `type`.",
|
|
5318
|
+
"example": "{{Response.value}}"
|
|
5319
|
+
},
|
|
5320
|
+
"path": {
|
|
5321
|
+
"type": "string",
|
|
5322
|
+
"description": "Dot path into the response body, e.g. \"data.limit\".",
|
|
5323
|
+
"example": "data.limit"
|
|
5324
|
+
},
|
|
5325
|
+
"jsonata": {
|
|
5326
|
+
"type": "string",
|
|
5327
|
+
"description": "JSONata expression over `{ Response, Input, Context, Options, Env }`.",
|
|
5328
|
+
"example": "$sum(Response.items.amount)"
|
|
5329
|
+
}
|
|
5330
|
+
}
|
|
5331
|
+
},
|
|
5085
5332
|
"Grants": {
|
|
5086
5333
|
"type": "array",
|
|
5087
5334
|
"description": "Required grants for the app in order to call APIs for the installing tenant",
|
package/definitions/journey.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Journey API",
|
|
5
5
|
"description": "API to configure journeys",
|
|
6
|
-
"version": "1.4.
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
1711
|
+
"mode": {
|
|
1497
1712
|
"type": "string",
|
|
1498
1713
|
"enum": [
|
|
1499
1714
|
"auto",
|
|
@@ -1502,7 +1717,7 @@
|
|
|
1502
1717
|
"none"
|
|
1503
1718
|
]
|
|
1504
1719
|
},
|
|
1505
|
-
"
|
|
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
|
-
"
|
|
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)
|
|
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
|
-
"
|
|
2602
|
-
"
|
|
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
|
-
"
|
|
2611
|
-
|
|
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":
|
|
2616
|
-
|
|
2933
|
+
"lastName": [
|
|
2934
|
+
"rule456",
|
|
2935
|
+
"rule789"
|
|
2936
|
+
]
|
|
2617
2937
|
}
|
|
2618
2938
|
}
|
|
2619
2939
|
},
|
|
@@ -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-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.
|
|
14
|
+
version: "0.1.144",
|
|
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-HPDI7RNO.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-4LGBIDMY.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.144" : (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-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:
|
|
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",
|
|
@@ -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.144";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|