@epilot/cli 0.1.39 → 0.1.40
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/event-catalog.json +168 -12
- package/definitions/integration-toolkit.json +21 -1
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-XAAASNP5.js → chunk-HB3KW5QT.js} +2 -1
- package/dist/{completion-OBZ5RMOS.js → completion-SCM3DTVX.js} +1 -1
- package/dist/{upgrade-BOOVSPC3.js → upgrade-TC7RAJH5.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"get": {
|
|
132
132
|
"operationId": "getEventJSONSchema",
|
|
133
133
|
"summary": "getEventJSONSchema",
|
|
134
|
-
"description": "Retrieve the JSON Schema of a specific business event",
|
|
134
|
+
"description": "Retrieve the JSON Schema of a specific business event. Pass an optional\n`Epilot-Event-Version` header to retrieve a specific version's schema;\nwhen omitted, the event's latest version is returned.\n",
|
|
135
135
|
"tags": [
|
|
136
136
|
"Event Catalog"
|
|
137
137
|
],
|
|
@@ -144,6 +144,15 @@
|
|
|
144
144
|
"schema": {
|
|
145
145
|
"type": "string"
|
|
146
146
|
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "Epilot-Event-Version",
|
|
150
|
+
"in": "header",
|
|
151
|
+
"required": false,
|
|
152
|
+
"description": "Event payload version (`MAJOR.MINOR`). Defaults to the event's latest version.",
|
|
153
|
+
"schema": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
147
156
|
}
|
|
148
157
|
],
|
|
149
158
|
"responses": {
|
|
@@ -156,6 +165,9 @@
|
|
|
156
165
|
}
|
|
157
166
|
}
|
|
158
167
|
}
|
|
168
|
+
},
|
|
169
|
+
"404": {
|
|
170
|
+
"description": "Event or version not found"
|
|
159
171
|
}
|
|
160
172
|
}
|
|
161
173
|
}
|
|
@@ -164,7 +176,7 @@
|
|
|
164
176
|
"get": {
|
|
165
177
|
"operationId": "getEventExample",
|
|
166
178
|
"summary": "getEventExample",
|
|
167
|
-
"description": "Generate a sample event payload based on the event's JSON Schema",
|
|
179
|
+
"description": "Generate a sample event payload based on the event's JSON Schema. Pass an\noptional `Epilot-Event-Version` header to generate the example for a\nspecific version; when omitted, the event's latest version is used.\n",
|
|
168
180
|
"tags": [
|
|
169
181
|
"Event Catalog"
|
|
170
182
|
],
|
|
@@ -177,6 +189,15 @@
|
|
|
177
189
|
"schema": {
|
|
178
190
|
"type": "string"
|
|
179
191
|
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "Epilot-Event-Version",
|
|
195
|
+
"in": "header",
|
|
196
|
+
"required": false,
|
|
197
|
+
"description": "Event payload version (`MAJOR.MINOR`). Defaults to the event's latest version.",
|
|
198
|
+
"schema": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
}
|
|
180
201
|
}
|
|
181
202
|
],
|
|
182
203
|
"responses": {
|
|
@@ -190,6 +211,45 @@
|
|
|
190
211
|
}
|
|
191
212
|
}
|
|
192
213
|
}
|
|
214
|
+
},
|
|
215
|
+
"404": {
|
|
216
|
+
"description": "Event or version not found"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"/v1/events/{event_name}/versions": {
|
|
222
|
+
"get": {
|
|
223
|
+
"operationId": "listEventVersions",
|
|
224
|
+
"summary": "listEventVersions",
|
|
225
|
+
"description": "List every known version of an event, along with the `latest`\nand the set of currently `active` versions. See §3.2 of the\nEvent Payload Versioning RFC.\n",
|
|
226
|
+
"tags": [
|
|
227
|
+
"Event Catalog"
|
|
228
|
+
],
|
|
229
|
+
"parameters": [
|
|
230
|
+
{
|
|
231
|
+
"name": "event_name",
|
|
232
|
+
"in": "path",
|
|
233
|
+
"required": true,
|
|
234
|
+
"description": "Unique human readable name of the event",
|
|
235
|
+
"schema": {
|
|
236
|
+
"type": "string"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"responses": {
|
|
241
|
+
"200": {
|
|
242
|
+
"description": "Registry summary for the event.",
|
|
243
|
+
"content": {
|
|
244
|
+
"application/json": {
|
|
245
|
+
"schema": {
|
|
246
|
+
"$ref": "#/components/schemas/EventVersionRegistrySummary"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"404": {
|
|
252
|
+
"description": "Event not found"
|
|
193
253
|
}
|
|
194
254
|
}
|
|
195
255
|
}
|
|
@@ -265,7 +325,7 @@
|
|
|
265
325
|
"post": {
|
|
266
326
|
"operationId": "searchEventHistoryV2",
|
|
267
327
|
"summary": "searchEventHistoryV2",
|
|
268
|
-
"description": "Paginated history of events with projected/lightweight payload (v2).\n\nReturns `EventSummary` objects instead of fully hydrated `Event` objects:\
|
|
328
|
+
"description": "Paginated history of events with projected/lightweight payload (v2).\n\nReturns `EventSummary` objects instead of fully hydrated `Event` objects:\nhydrated entity objects (values carrying `_schema`/`_id`) are reduced to\nreference stubs `{_schema, _id, _title}` — the full entity is recoverable\nvia GET /v2/events/{event_name}/history/{event_id} or by hitting\nentity-api directly with the `_id`.\n",
|
|
269
329
|
"tags": [
|
|
270
330
|
"Event Catalog"
|
|
271
331
|
],
|
|
@@ -463,8 +523,8 @@
|
|
|
463
523
|
},
|
|
464
524
|
"event_version": {
|
|
465
525
|
"type": "string",
|
|
466
|
-
"description": "Event version (
|
|
467
|
-
"example": "1.0
|
|
526
|
+
"description": "Event payload version (MAJOR.MINOR)",
|
|
527
|
+
"example": "1.0"
|
|
468
528
|
},
|
|
469
529
|
"event_status": {
|
|
470
530
|
"type": "string",
|
|
@@ -704,7 +764,7 @@
|
|
|
704
764
|
},
|
|
705
765
|
"_event_version": {
|
|
706
766
|
"type": "string",
|
|
707
|
-
"description": "Event version (
|
|
767
|
+
"description": "Event payload version (MAJOR.MINOR)"
|
|
708
768
|
},
|
|
709
769
|
"_event_source": {
|
|
710
770
|
"type": "string",
|
|
@@ -841,8 +901,8 @@
|
|
|
841
901
|
},
|
|
842
902
|
"_event_version": {
|
|
843
903
|
"type": "string",
|
|
844
|
-
"description": "Event version (
|
|
845
|
-
"example": "1.0
|
|
904
|
+
"description": "Event payload version (MAJOR.MINOR)",
|
|
905
|
+
"example": "1.0"
|
|
846
906
|
},
|
|
847
907
|
"_event_source": {
|
|
848
908
|
"type": "string",
|
|
@@ -876,7 +936,7 @@
|
|
|
876
936
|
"_event_time": "2024-01-01T12:00:00Z",
|
|
877
937
|
"_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
|
|
878
938
|
"_event_name": "MeterReading",
|
|
879
|
-
"_event_version": "1.0
|
|
939
|
+
"_event_version": "1.0",
|
|
880
940
|
"_event_source": "api",
|
|
881
941
|
"_trigger_source_type": "api",
|
|
882
942
|
"_trigger_source": "user_123456",
|
|
@@ -897,7 +957,7 @@
|
|
|
897
957
|
},
|
|
898
958
|
"EventSummary": {
|
|
899
959
|
"type": "object",
|
|
900
|
-
"description": "A lightweight event summary returned by the v2 history endpoint.\n\nIncludes the standard `_*` metadata fields plus a projected subset of the\nevent payload. Hydrated entity objects (values carrying `_schema` or `_id
|
|
960
|
+
"description": "A lightweight event summary returned by the v2 history endpoint.\n\nIncludes the standard `_*` metadata fields plus a projected subset of the\nevent payload. Hydrated entity objects (values carrying `_schema` or `_id`)\n— and arrays of such objects — are reduced to reference stubs\n`{_schema, _id, _title}` so consumers can identify and follow up on each\nentity without paying the cost of the full hydrated graph. Fetch\n`GET /v2/events/{event_name}/history/{event_id}` for the full hydration.\n\nProjected scalar payload fields appear as additional top-level properties.\n",
|
|
901
961
|
"properties": {
|
|
902
962
|
"_org_id": {
|
|
903
963
|
"type": "string",
|
|
@@ -918,8 +978,8 @@
|
|
|
918
978
|
},
|
|
919
979
|
"_event_version": {
|
|
920
980
|
"type": "string",
|
|
921
|
-
"description": "Event version (
|
|
922
|
-
"example": "1.0
|
|
981
|
+
"description": "Event payload version (MAJOR.MINOR)",
|
|
982
|
+
"example": "1.0"
|
|
923
983
|
},
|
|
924
984
|
"_event_source": {
|
|
925
985
|
"type": "string",
|
|
@@ -1295,6 +1355,102 @@
|
|
|
1295
1355
|
"entity_id",
|
|
1296
1356
|
"version_index"
|
|
1297
1357
|
]
|
|
1358
|
+
},
|
|
1359
|
+
"FieldChange": {
|
|
1360
|
+
"type": "object",
|
|
1361
|
+
"description": "A field-level change descriptor. Powers the declarative half of the\nversion DSL.\n",
|
|
1362
|
+
"properties": {
|
|
1363
|
+
"field": {
|
|
1364
|
+
"type": "string",
|
|
1365
|
+
"description": "Name of the field affected by this change.",
|
|
1366
|
+
"example": "reading"
|
|
1367
|
+
},
|
|
1368
|
+
"op": {
|
|
1369
|
+
"type": "string",
|
|
1370
|
+
"enum": [
|
|
1371
|
+
"added",
|
|
1372
|
+
"removed",
|
|
1373
|
+
"type-changed"
|
|
1374
|
+
],
|
|
1375
|
+
"description": "Kind of change. Renames are NOT a first-class op — represent them\nas a `removed` + `added` pair (semantic intent goes into\n`change_summary` / `change_notes`).\n"
|
|
1376
|
+
},
|
|
1377
|
+
"type_old": {
|
|
1378
|
+
"type": "string",
|
|
1379
|
+
"description": "Type label for the previous shape (for `removed` and `type-changed`)."
|
|
1380
|
+
},
|
|
1381
|
+
"type_new": {
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"description": "Type label for the new shape (for `added` and `type-changed`)."
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
"required": [
|
|
1387
|
+
"field",
|
|
1388
|
+
"op"
|
|
1389
|
+
]
|
|
1390
|
+
},
|
|
1391
|
+
"VersionMeta": {
|
|
1392
|
+
"type": "object",
|
|
1393
|
+
"description": "One entry of an event's version timeline.",
|
|
1394
|
+
"properties": {
|
|
1395
|
+
"version": {
|
|
1396
|
+
"type": "string",
|
|
1397
|
+
"description": "MAJOR.MINOR version label.",
|
|
1398
|
+
"example": "1.0"
|
|
1399
|
+
},
|
|
1400
|
+
"released_at": {
|
|
1401
|
+
"type": "string",
|
|
1402
|
+
"description": "ISO 8601 release timestamp.",
|
|
1403
|
+
"example": "2025-11-15"
|
|
1404
|
+
},
|
|
1405
|
+
"change_summary": {
|
|
1406
|
+
"type": "string",
|
|
1407
|
+
"description": "Required one-liner describing what changed in this version (≤280 chars)."
|
|
1408
|
+
},
|
|
1409
|
+
"change_notes": {
|
|
1410
|
+
"type": "string",
|
|
1411
|
+
"description": "Optional longer-form prose (markdown)."
|
|
1412
|
+
},
|
|
1413
|
+
"changes": {
|
|
1414
|
+
"type": "array",
|
|
1415
|
+
"description": "Hand-authored list of field-level changes from the previous version. Empty for v1.",
|
|
1416
|
+
"items": {
|
|
1417
|
+
"$ref": "#/components/schemas/FieldChange"
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
"required": [
|
|
1422
|
+
"version",
|
|
1423
|
+
"released_at",
|
|
1424
|
+
"change_summary",
|
|
1425
|
+
"changes"
|
|
1426
|
+
]
|
|
1427
|
+
},
|
|
1428
|
+
"EventVersionRegistrySummary": {
|
|
1429
|
+
"type": "object",
|
|
1430
|
+
"description": "Summary of an event's version timeline returned by\n`GET /v1/events/{event_name}/versions`.\n",
|
|
1431
|
+
"properties": {
|
|
1432
|
+
"event_name": {
|
|
1433
|
+
"type": "string",
|
|
1434
|
+
"example": "MeterReadingAdded"
|
|
1435
|
+
},
|
|
1436
|
+
"latest": {
|
|
1437
|
+
"type": "string",
|
|
1438
|
+
"description": "The newest registered version.",
|
|
1439
|
+
"example": "1.0"
|
|
1440
|
+
},
|
|
1441
|
+
"versions": {
|
|
1442
|
+
"type": "array",
|
|
1443
|
+
"description": "Full version timeline, ordered oldest → newest.",
|
|
1444
|
+
"items": {
|
|
1445
|
+
"$ref": "#/components/schemas/VersionMeta"
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
"required": [
|
|
1450
|
+
"event_name",
|
|
1451
|
+
"latest",
|
|
1452
|
+
"versions"
|
|
1453
|
+
]
|
|
1298
1454
|
}
|
|
1299
1455
|
}
|
|
1300
1456
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Integration Toolkit API",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.12",
|
|
6
6
|
"description": "API for integrating with external systems in a standardised way."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -3144,6 +3144,12 @@
|
|
|
3144
3144
|
"maxLength": 255,
|
|
3145
3145
|
"description": "Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.\n",
|
|
3146
3146
|
"example": "evt-2025-05-01-12345-create-bp"
|
|
3147
|
+
},
|
|
3148
|
+
"use_case_id": {
|
|
3149
|
+
"type": "string",
|
|
3150
|
+
"nullable": true,
|
|
3151
|
+
"readOnly": true,
|
|
3152
|
+
"description": "Resolved use case ID for the inbound event. Null when no use case matched or for events ingested before this field was introduced. Server-populated only — ignored if supplied on inbound requests.\n"
|
|
3147
3153
|
}
|
|
3148
3154
|
}
|
|
3149
3155
|
},
|
|
@@ -6870,6 +6876,11 @@
|
|
|
6870
6876
|
"type": "string",
|
|
6871
6877
|
"description": "Filter by event name (alias for object_type)"
|
|
6872
6878
|
},
|
|
6879
|
+
"use_case_id": {
|
|
6880
|
+
"type": "string",
|
|
6881
|
+
"minLength": 1,
|
|
6882
|
+
"description": "Filter by use case ID"
|
|
6883
|
+
},
|
|
6873
6884
|
"limit": {
|
|
6874
6885
|
"type": "integer",
|
|
6875
6886
|
"description": "Maximum number of results to return",
|
|
@@ -7826,6 +7837,15 @@
|
|
|
7826
7837
|
"date"
|
|
7827
7838
|
],
|
|
7828
7839
|
"description": "Field to group the breakdown by"
|
|
7840
|
+
},
|
|
7841
|
+
"source": {
|
|
7842
|
+
"type": "string",
|
|
7843
|
+
"enum": [
|
|
7844
|
+
"monitoring",
|
|
7845
|
+
"incoming"
|
|
7846
|
+
],
|
|
7847
|
+
"default": "monitoring",
|
|
7848
|
+
"description": "Data source for the stats. \"monitoring\" (default) aggregates processed events from erp_monitoring_v2 — this counts every event produced throughout the processing tree (fan-out children, post-actions, relation resolutions, etc.). \"incoming\" counts only the initial inbound events actually received (distinct event_id from erp_incoming_events); only group_by=use_case_id is supported and status/level breakdown is not available for this source (success/error/warning/skipped counts are returned as 0).\n"
|
|
7829
7849
|
}
|
|
7830
7850
|
}
|
|
7831
7851
|
},
|
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-HB3KW5QT.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.40",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -30,8 +30,8 @@ var main = defineCommand({
|
|
|
30
30
|
auth: () => import("../auth-CN5EFFDE.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-SCM3DTVX.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-TC7RAJH5.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),
|
|
@@ -133,13 +133,13 @@ process.stderr.on("error", (err) => {
|
|
|
133
133
|
if (err.code === "EPIPE") process.exit(0);
|
|
134
134
|
throw err;
|
|
135
135
|
});
|
|
136
|
-
var VERSION = true ? "0.1.
|
|
136
|
+
var VERSION = true ? "0.1.40" : (await null).default.version;
|
|
137
137
|
var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
|
|
138
138
|
process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
|
|
139
139
|
var args = process.argv.slice(2);
|
|
140
140
|
var completionsIdx = args.indexOf("--_completions");
|
|
141
141
|
if (completionsIdx >= 0) {
|
|
142
|
-
const { handleCompletions } = await import("../completion-
|
|
142
|
+
const { handleCompletions } = await import("../completion-SCM3DTVX.js");
|
|
143
143
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
144
144
|
process.exit(0);
|
|
145
145
|
}
|
|
@@ -679,13 +679,14 @@ var API_LIST = [
|
|
|
679
679
|
kebabName: "event-catalog",
|
|
680
680
|
title: "Event Catalog API",
|
|
681
681
|
serverUrl: "https://event-catalog.sls.epilot.io",
|
|
682
|
-
operationCount:
|
|
682
|
+
operationCount: 10,
|
|
683
683
|
operationIds: [
|
|
684
684
|
"listEvents",
|
|
685
685
|
"getEvent",
|
|
686
686
|
"patchEvent",
|
|
687
687
|
"getEventJSONSchema",
|
|
688
688
|
"getEventExample",
|
|
689
|
+
"listEventVersions",
|
|
689
690
|
"searchEventHistory",
|
|
690
691
|
"searchEventHistoryV2",
|
|
691
692
|
"getHistoricalEvent",
|
|
@@ -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.40";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|