@epilot/cli 0.1.67 → 0.1.68
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 +63 -1
- package/definitions/integration-toolkit.json +26 -19
- package/definitions/metering.json +22 -2
- package/definitions/notification.json +14 -0
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-6TKZSKWB.js → chunk-HIU6WP36.js} +1 -1
- package/dist/{completion-BZQQTKHB.js → completion-7FZ4RKFG.js} +1 -1
- package/dist/{upgrade-3AUH2MLE.js → upgrade-M6TGNG6M.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -593,6 +593,23 @@
|
|
|
593
593
|
"description": "Whether this event can be explicitly triggered by automations.\nWhen true, the event will appear in the automation builder as a\n\"Trigger Event\" action option.\nDefaults to false if not specified.\n",
|
|
594
594
|
"default": false,
|
|
595
595
|
"example": true
|
|
596
|
+
},
|
|
597
|
+
"success_criteria": {
|
|
598
|
+
"type": "array",
|
|
599
|
+
"description": "Org-defined success criteria for this event: the entity attributes that an\norganization considers must be captured for an event change request to be\ntreated as complete (e.g. for telephony / self-service flows).\n\nAdvisory metadata — event-catalog does NOT require an org to define any and\ndoes NOT enforce them when an event is triggered or published. The org may\ndefine none (empty array or omitted). When provided, each entry is validated\nfor well-formedness on write (see SuccessCriterion).\n",
|
|
600
|
+
"items": {
|
|
601
|
+
"$ref": "#/components/schemas/SuccessCriterion"
|
|
602
|
+
},
|
|
603
|
+
"example": [
|
|
604
|
+
{
|
|
605
|
+
"entity_schema": "contract",
|
|
606
|
+
"attribute": "installment_amount"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"entity_schema": "billing_account",
|
|
610
|
+
"attribute": "due_date"
|
|
611
|
+
}
|
|
612
|
+
]
|
|
596
613
|
}
|
|
597
614
|
}
|
|
598
615
|
},
|
|
@@ -613,7 +630,7 @@
|
|
|
613
630
|
]
|
|
614
631
|
},
|
|
615
632
|
"UpdateEventPayload": {
|
|
616
|
-
"description": "Payload for updating an event configuration.\nAccepts the same fields as EventConfig (all optional for PATCH).\nCurrently `enabled` and `
|
|
633
|
+
"description": "Payload for updating an event configuration.\nAccepts the same fields as EventConfig (all optional for PATCH).\nCurrently `enabled`, `auto_trigger` and `success_criteria` fields are processed.\n",
|
|
617
634
|
"allOf": [
|
|
618
635
|
{
|
|
619
636
|
"$ref": "#/components/schemas/EventConfigBase"
|
|
@@ -696,6 +713,26 @@
|
|
|
696
713
|
}
|
|
697
714
|
]
|
|
698
715
|
},
|
|
716
|
+
"SuccessCriterion": {
|
|
717
|
+
"type": "object",
|
|
718
|
+
"description": "A single org-defined success criterion: an entity attribute that must be captured\nfor this event's change request to be considered complete.\n\nIdentity is the entity schema plus the attribute name — mirroring the\nEntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both\n`attribute` and `entity_schema` are required and `entity_schema` must match the\n`schema` of a node in the event's `entity_graph` (else the request is rejected) —\nthis prevents unsatisfiable criteria. The criteria themselves are advisory and are\nnever enforced when an event is triggered or published.\n",
|
|
719
|
+
"properties": {
|
|
720
|
+
"entity_schema": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"description": "Entity schema slug the attribute belongs to (matches a node schema in the event's entity_graph).",
|
|
723
|
+
"example": "contract"
|
|
724
|
+
},
|
|
725
|
+
"attribute": {
|
|
726
|
+
"type": "string",
|
|
727
|
+
"description": "Attribute name on the entity schema.",
|
|
728
|
+
"example": "installment_amount"
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
"required": [
|
|
732
|
+
"entity_schema",
|
|
733
|
+
"attribute"
|
|
734
|
+
]
|
|
735
|
+
},
|
|
699
736
|
"CommonEventMetadata": {
|
|
700
737
|
"type": "object",
|
|
701
738
|
"description": "Common metadata fields present in all event payloads",
|
|
@@ -878,6 +915,24 @@
|
|
|
878
915
|
]
|
|
879
916
|
}
|
|
880
917
|
},
|
|
918
|
+
"InlineDowngradeStep": {
|
|
919
|
+
"type": "object",
|
|
920
|
+
"description": "One step of an event's inline `_downgrades` chain. Maps the current-version payload to the previous version via a JSONata expression. Stamped by Event Catalog at publish time; executed by consumers during walk-back, never by EC itself.",
|
|
921
|
+
"properties": {
|
|
922
|
+
"to": {
|
|
923
|
+
"type": "string",
|
|
924
|
+
"description": "Version label this step downgrades to (the previous version)."
|
|
925
|
+
},
|
|
926
|
+
"jsonata": {
|
|
927
|
+
"type": "string",
|
|
928
|
+
"description": "JSONata expression mapping the current-shape payload to the previous-shape payload."
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
"required": [
|
|
932
|
+
"to",
|
|
933
|
+
"jsonata"
|
|
934
|
+
]
|
|
935
|
+
},
|
|
881
936
|
"Event": {
|
|
882
937
|
"type": "object",
|
|
883
938
|
"description": "An event instance in the event history",
|
|
@@ -920,6 +975,13 @@
|
|
|
920
975
|
"_ack_id": {
|
|
921
976
|
"type": "string",
|
|
922
977
|
"description": "Unique acknowledgment tracking ID for the event.\nUsed to track event delivery and processing status.\n"
|
|
978
|
+
},
|
|
979
|
+
"_downgrades": {
|
|
980
|
+
"type": "array",
|
|
981
|
+
"description": "Inline downgrade chain stamped by Event Catalog at publish time, ordered newest-to-oldest. Present ONLY on multi-version events. Internal versioning transport: consumers (e.g. svc-webhooks) walk the payload back to a pinned version using these JSONata steps, then strip the field before delivery -- end customers never receive it.",
|
|
982
|
+
"items": {
|
|
983
|
+
"$ref": "#/components/schemas/InlineDowngradeStep"
|
|
984
|
+
}
|
|
923
985
|
}
|
|
924
986
|
},
|
|
925
987
|
"required": [
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Integration Toolkit API",
|
|
5
|
-
"version": "1.5.
|
|
5
|
+
"version": "1.5.5",
|
|
6
6
|
"description": "API for integrating with external systems in a standardised way."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -1876,11 +1876,10 @@
|
|
|
1876
1876
|
"name": "limit",
|
|
1877
1877
|
"in": "query",
|
|
1878
1878
|
"required": false,
|
|
1879
|
-
"description": "
|
|
1879
|
+
"description": "Requested number of items to return. Values above 100 are accepted and clamped server-side to 100 (the enforcement point is the handler, not this schema), so a large value never 400s at the contract layer.",
|
|
1880
1880
|
"schema": {
|
|
1881
1881
|
"type": "integer",
|
|
1882
1882
|
"minimum": 1,
|
|
1883
|
-
"maximum": 100,
|
|
1884
1883
|
"default": 50
|
|
1885
1884
|
}
|
|
1886
1885
|
},
|
|
@@ -4645,16 +4644,15 @@
|
|
|
4645
4644
|
},
|
|
4646
4645
|
"NotificationRule": {
|
|
4647
4646
|
"type": "object",
|
|
4648
|
-
"description": "A single notification rule. Only the params relevant to a given type are set. The id is
|
|
4647
|
+
"description": "A single notification rule. Only the params relevant to a given type are set. The id is optional on write: the server mints a ULID when omitted and preserves a supplied id verbatim (a stable id keeps a rule's AlertState across config saves).",
|
|
4649
4648
|
"required": [
|
|
4650
|
-
"id",
|
|
4651
4649
|
"type",
|
|
4652
4650
|
"enabled"
|
|
4653
4651
|
],
|
|
4654
4652
|
"properties": {
|
|
4655
4653
|
"id": {
|
|
4656
4654
|
"type": "string",
|
|
4657
|
-
"description": "Stable
|
|
4655
|
+
"description": "Stable AlertState + baseline key. Optional on write — the server mints a ULID when omitted; a supplied id is preserved verbatim."
|
|
4658
4656
|
},
|
|
4659
4657
|
"name": {
|
|
4660
4658
|
"type": "string",
|
|
@@ -4662,20 +4660,14 @@
|
|
|
4662
4660
|
},
|
|
4663
4661
|
"type": {
|
|
4664
4662
|
"type": "string",
|
|
4665
|
-
"description": "Rule trigger type.
|
|
4663
|
+
"description": "Rule trigger type. These are the only supported types; each is produced by a real alerter.",
|
|
4666
4664
|
"enum": [
|
|
4667
4665
|
"critical_error",
|
|
4668
4666
|
"error_threshold",
|
|
4669
4667
|
"warning_threshold",
|
|
4670
4668
|
"success_rate_drop",
|
|
4671
4669
|
"recovery",
|
|
4672
|
-
"silence"
|
|
4673
|
-
"consecutive_failures",
|
|
4674
|
-
"first_error",
|
|
4675
|
-
"new_error_code",
|
|
4676
|
-
"auth_expiry",
|
|
4677
|
-
"ack_timeout",
|
|
4678
|
-
"validation_surge"
|
|
4670
|
+
"silence"
|
|
4679
4671
|
]
|
|
4680
4672
|
},
|
|
4681
4673
|
"enabled": {
|
|
@@ -4726,10 +4718,6 @@
|
|
|
4726
4718
|
"type": "integer",
|
|
4727
4719
|
"description": "success_rate_drop minimum sample size guard."
|
|
4728
4720
|
},
|
|
4729
|
-
"consecutive": {
|
|
4730
|
-
"type": "integer",
|
|
4731
|
-
"description": "consecutive_failures count."
|
|
4732
|
-
},
|
|
4733
4721
|
"quietPeriod": {
|
|
4734
4722
|
"type": "string",
|
|
4735
4723
|
"description": "silence quiet period, e.g. '12h'."
|
|
@@ -7082,6 +7070,11 @@
|
|
|
7082
7070
|
},
|
|
7083
7071
|
"response": {
|
|
7084
7072
|
"$ref": "#/components/schemas/FileProxyResponseConfig"
|
|
7073
|
+
},
|
|
7074
|
+
"prevent_indirect_serving": {
|
|
7075
|
+
"type": "boolean",
|
|
7076
|
+
"default": false,
|
|
7077
|
+
"description": "When `true`, files that are too large to be served directly in the proxy response\n(and would otherwise be served indirectly via a temporary S3 redirect) are not served.\nInstead the proxy responds with an error and logs a warning. Use this when files must\nnever transit epilot's temporary S3 storage. Defaults to `false` (large files are\ntransparently served via S3).\n"
|
|
7085
7078
|
}
|
|
7086
7079
|
}
|
|
7087
7080
|
},
|
|
@@ -9366,7 +9359,21 @@
|
|
|
9366
9359
|
"managed_call",
|
|
9367
9360
|
"secure_proxy"
|
|
9368
9361
|
],
|
|
9369
|
-
"description": "Filter stats by use case type"
|
|
9362
|
+
"description": "Filter stats by a single use case type"
|
|
9363
|
+
},
|
|
9364
|
+
"use_case_types": {
|
|
9365
|
+
"type": "array",
|
|
9366
|
+
"items": {
|
|
9367
|
+
"type": "string",
|
|
9368
|
+
"enum": [
|
|
9369
|
+
"inbound",
|
|
9370
|
+
"outbound",
|
|
9371
|
+
"file_proxy",
|
|
9372
|
+
"managed_call",
|
|
9373
|
+
"secure_proxy"
|
|
9374
|
+
]
|
|
9375
|
+
},
|
|
9376
|
+
"description": "Filter stats to this set of use case types (matches any). Takes precedence over `use_case_type` when both are present. Used by the notification producers to scope alerts/digests to the integration's `monitoredUseCases`."
|
|
9370
9377
|
},
|
|
9371
9378
|
"group_by": {
|
|
9372
9379
|
"type": "string",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Metering API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.1.0",
|
|
6
6
|
"description": "The Metering API manages smart meter data, meter counters, and meter readings for epilot customers and administrators.\n\nIt supports two audiences:\n- **ECP (End Customer Portal)**: Portal users can view their meters, counters, and submit readings via the customer portal.\n- **ECP Admin**: Internal epilot users and ERP integrations can create, update, and bulk-manage meter readings.\n\nKey capabilities:\n- Retrieve meters and counters associated with a customer or contract\n- Submit individual or bulk meter readings (with optional validation skip)\n- Batch upsert/delete readings using the v2 endpoint\n- Query historical readings by date interval with cumulative or relative consumption modes\n- Retrieve allowed reading ranges to guide end customers entering readings\n"
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -554,6 +554,9 @@
|
|
|
554
554
|
},
|
|
555
555
|
{
|
|
556
556
|
"$ref": "#/components/parameters/DirectQueryParam"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"$ref": "#/components/parameters/CreateTicketQueryParam"
|
|
557
560
|
}
|
|
558
561
|
],
|
|
559
562
|
"requestBody": {
|
|
@@ -722,6 +725,9 @@
|
|
|
722
725
|
},
|
|
723
726
|
{
|
|
724
727
|
"$ref": "#/components/parameters/DirectQueryParam"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"$ref": "#/components/parameters/CreateTicketQueryParam"
|
|
725
731
|
}
|
|
726
732
|
],
|
|
727
733
|
"requestBody": {
|
|
@@ -2969,6 +2975,16 @@
|
|
|
2969
2975
|
"$ref": "#/components/schemas/ActivityId"
|
|
2970
2976
|
}
|
|
2971
2977
|
},
|
|
2978
|
+
"CreateTicketQueryParam": {
|
|
2979
|
+
"name": "create_ticket",
|
|
2980
|
+
"in": "query",
|
|
2981
|
+
"required": false,
|
|
2982
|
+
"description": "Controls whether a manual-intervention (\"Übermittlung Zählerstand\") ticket is created for the\nwritten readings. Defaults to true, preserving portal/journey behaviour (readings with\nsource ECP or journey-submission mint a review ticket).\n\nSet to false for authoritative, system-driven writes — e.g. the ERP inbound integration\npipeline — whose readings arrive already confirmed and must not spawn a review ticket. This\nalso prevents the ticket-triggered `ServiceMeterReadingAdded` echo back to the ERP.\n",
|
|
2983
|
+
"schema": {
|
|
2984
|
+
"type": "boolean",
|
|
2985
|
+
"default": true
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2972
2988
|
"SkipValidationQueryParam": {
|
|
2973
2989
|
"name": "skip_validation",
|
|
2974
2990
|
"in": "query",
|
|
@@ -2981,5 +2997,9 @@
|
|
|
2981
2997
|
}
|
|
2982
2998
|
}
|
|
2983
2999
|
},
|
|
2984
|
-
"servers": [
|
|
3000
|
+
"servers": [
|
|
3001
|
+
{
|
|
3002
|
+
"url": "https://metering.sls.epilot.io"
|
|
3003
|
+
}
|
|
3004
|
+
]
|
|
2985
3005
|
}
|
|
@@ -1013,6 +1013,20 @@
|
|
|
1013
1013
|
"in_app": false
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
|
+
},
|
|
1017
|
+
"allowed_channels": {
|
|
1018
|
+
"description": "Optional delivery-channel ceiling. When present, delivery is restricted to the intersection of this set and each recipient's own notification preferences — it can only NARROW delivery, never force a channel on. Absent means no restriction (recipient preferences and per-type defaults apply as before). An empty array suppresses all channels.",
|
|
1019
|
+
"type": "array",
|
|
1020
|
+
"items": {
|
|
1021
|
+
"type": "string",
|
|
1022
|
+
"enum": [
|
|
1023
|
+
"email",
|
|
1024
|
+
"in_app"
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
"example": [
|
|
1028
|
+
"in_app"
|
|
1029
|
+
]
|
|
1016
1030
|
}
|
|
1017
1031
|
},
|
|
1018
1032
|
"required": [
|
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-HIU6WP36.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.68",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -30,8 +30,8 @@ var main = defineCommand({
|
|
|
30
30
|
auth: () => import("../auth-4HG7B2GC.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-7FZ4RKFG.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-M6TGNG6M.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.68" : (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-7FZ4RKFG.js");
|
|
144
144
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
145
145
|
process.exit(0);
|
|
146
146
|
}
|
|
@@ -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.68";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|