@epilot/cli 0.1.64 → 0.1.66

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.64 — CLI for epilot APIs
32
+ epilot v0.1.66 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -480,6 +480,142 @@
480
480
  }
481
481
  }
482
482
  },
483
+ "/v1/portal/exports": {
484
+ "post": {
485
+ "operationId": "createExport",
486
+ "summary": "createExport",
487
+ "description": "Request an asynchronous CSV export of the portal user's contracts, delivery points and meters. Returns a job id to poll.",
488
+ "tags": [
489
+ "ECP"
490
+ ],
491
+ "parameters": [
492
+ {
493
+ "in": "query",
494
+ "name": "language",
495
+ "required": false,
496
+ "schema": {
497
+ "type": "string",
498
+ "enum": [
499
+ "de",
500
+ "en"
501
+ ]
502
+ },
503
+ "description": "Output language for headers and value formatting. Defaults to German when omitted or unsupported."
504
+ }
505
+ ],
506
+ "security": [
507
+ {
508
+ "PortalAuth": []
509
+ }
510
+ ],
511
+ "responses": {
512
+ "202": {
513
+ "description": "Export job accepted.",
514
+ "content": {
515
+ "application/json": {
516
+ "schema": {
517
+ "type": "object",
518
+ "properties": {
519
+ "jobId": {
520
+ "type": "string"
521
+ },
522
+ "status": {
523
+ "type": "string",
524
+ "enum": [
525
+ "queued",
526
+ "running",
527
+ "ready",
528
+ "failed"
529
+ ]
530
+ }
531
+ }
532
+ }
533
+ }
534
+ }
535
+ },
536
+ "401": {
537
+ "$ref": "#/components/responses/Unauthorized"
538
+ },
539
+ "403": {
540
+ "$ref": "#/components/responses/Forbidden"
541
+ },
542
+ "404": {
543
+ "description": "No export profile configured for this organization."
544
+ },
545
+ "500": {
546
+ "$ref": "#/components/responses/InternalServerError"
547
+ }
548
+ }
549
+ }
550
+ },
551
+ "/v1/portal/exports/{jobId}": {
552
+ "get": {
553
+ "operationId": "getExport",
554
+ "summary": "getExport",
555
+ "description": "Get the status of an export job, including the download URL once ready.",
556
+ "tags": [
557
+ "ECP"
558
+ ],
559
+ "parameters": [
560
+ {
561
+ "in": "path",
562
+ "name": "jobId",
563
+ "required": true,
564
+ "schema": {
565
+ "type": "string"
566
+ },
567
+ "description": "The export job id returned by createExport."
568
+ }
569
+ ],
570
+ "security": [
571
+ {
572
+ "PortalAuth": []
573
+ }
574
+ ],
575
+ "responses": {
576
+ "200": {
577
+ "description": "Export job status.",
578
+ "content": {
579
+ "application/json": {
580
+ "schema": {
581
+ "type": "object",
582
+ "properties": {
583
+ "jobId": {
584
+ "type": "string"
585
+ },
586
+ "status": {
587
+ "type": "string",
588
+ "enum": [
589
+ "queued",
590
+ "running",
591
+ "ready",
592
+ "failed",
593
+ "expired"
594
+ ]
595
+ },
596
+ "downloadUrl": {
597
+ "type": "string"
598
+ },
599
+ "error": {
600
+ "type": "string"
601
+ }
602
+ }
603
+ }
604
+ }
605
+ }
606
+ },
607
+ "401": {
608
+ "$ref": "#/components/responses/Unauthorized"
609
+ },
610
+ "404": {
611
+ "description": "Export job not found."
612
+ },
613
+ "500": {
614
+ "$ref": "#/components/responses/InternalServerError"
615
+ }
616
+ }
617
+ }
618
+ },
483
619
  "/v2/portal/extensions": {
484
620
  "get": {
485
621
  "operationId": "getPortalExtensions",
@@ -2929,6 +3065,10 @@
2929
3065
  },
2930
3066
  "is_main_entity": {
2931
3067
  "type": "boolean"
3068
+ },
3069
+ "journey_registration_email": {
3070
+ "type": "string",
3071
+ "description": "The email address registered in the journey's Login & Registration block"
2932
3072
  }
2933
3073
  }
2934
3074
  }
@@ -11624,6 +11764,10 @@
11624
11764
  "CommonConfigAttributes": {
11625
11765
  "type": "object",
11626
11766
  "properties": {
11767
+ "mobile_config": {
11768
+ "description": "Mobile app configuration (top-level; moved out of the config blob).",
11769
+ "$ref": "#/components/schemas/MobileConfig"
11770
+ },
11627
11771
  "enabled": {
11628
11772
  "type": "boolean",
11629
11773
  "description": "Enable/Disable the portal access"
@@ -17814,6 +17958,10 @@
17814
17958
  "CommonConfigAttributesV3": {
17815
17959
  "type": "object",
17816
17960
  "properties": {
17961
+ "mobile_config": {
17962
+ "description": "Mobile app configuration (top-level; moved out of the config blob).",
17963
+ "$ref": "#/components/schemas/MobileConfig"
17964
+ },
17817
17965
  "enabled": {
17818
17966
  "type": "boolean",
17819
17967
  "description": "Enable/Disable the portal access"
@@ -27,6 +27,10 @@
27
27
  {
28
28
  "name": "Snapshots",
29
29
  "description": "Snapshot CRUD and restore operations"
30
+ },
31
+ {
32
+ "name": "ScheduledSnapshots",
33
+ "description": "Enrollment and configuration for scheduled org snapshots"
30
34
  }
31
35
  ],
32
36
  "paths": {
@@ -160,7 +164,7 @@
160
164
  "post": {
161
165
  "operationId": "captureOrgSnapshot",
162
166
  "summary": "captureOrgSnapshot",
163
- "description": "Snapshot the caller's whole organization now. Fetches a fresh inventory\nof the org's configuration resources from configuration-hub-api, persists\nit as an inventory artifact, and starts a `scope: \"org\"` chunked capture.\nAsync — returns immediately with a snapshot ID; client polls `getSnapshot`\nand watches `capture_summary` fill in until `create.status` moves from\n`in_progress` to `completed` or `failed`.\n\nSensitive types (`access_token`, `environment_variable`), types with no\nengine adapter, and any `excluded_types` are dropped from the capture and\nrecorded in the snapshot's coverage report.\n",
167
+ "description": "Snapshot the caller's whole organization now. Creates a `scope: \"org\"`\nsnapshot row and starts a chunked capture Step Function, then returns\nimmediately. The capture asynchronously fetches a fresh inventory of the\norg's configuration resources from configuration-hub-api, persists it as\nan inventory artifact, and captures each resource. Client polls\n`getSnapshot` and watches `capture_summary` fill in until `create.status`\nmoves from `in_progress` to `completed` or `failed`. An org with no\ncapturable resources finalizes as a completed 0-resource snapshot.\n\nSensitive types (`access_token`, `environment_variable`), types with no\nengine adapter, and any `excluded_types` are dropped from the capture and\nrecorded in the snapshot's coverage report.\n",
164
168
  "tags": [
165
169
  "Snapshots"
166
170
  ],
@@ -187,9 +191,6 @@
187
191
  },
188
192
  "401": {
189
193
  "$ref": "#/components/responses/Unauthorized"
190
- },
191
- "422": {
192
- "$ref": "#/components/responses/UnprocessableEntity"
193
194
  }
194
195
  }
195
196
  }
@@ -383,6 +384,89 @@
383
384
  }
384
385
  }
385
386
  },
387
+ "/v1/org-snapshot-schedule": {
388
+ "get": {
389
+ "operationId": "getOrgSnapshotSchedule",
390
+ "summary": "getOrgSnapshotSchedule",
391
+ "description": "Return the scheduled-snapshot enrollment config for the caller's org.\nReturns 404 when the org has not yet enrolled.\n",
392
+ "tags": [
393
+ "ScheduledSnapshots"
394
+ ],
395
+ "responses": {
396
+ "200": {
397
+ "description": "Org snapshot schedule config",
398
+ "content": {
399
+ "application/json": {
400
+ "schema": {
401
+ "$ref": "#/components/schemas/OrgSnapshotSchedule"
402
+ }
403
+ }
404
+ }
405
+ },
406
+ "401": {
407
+ "$ref": "#/components/responses/Unauthorized"
408
+ },
409
+ "404": {
410
+ "$ref": "#/components/responses/NotFound"
411
+ }
412
+ }
413
+ },
414
+ "put": {
415
+ "operationId": "putOrgSnapshotSchedule",
416
+ "summary": "putOrgSnapshotSchedule",
417
+ "description": "Create or update the scheduled-snapshot enrollment config for the\ncaller's org (upsert). The cron expression and retention window are\nvalidated server-side; invalid values are rejected with 400.\n\nDefaults applied when a field is omitted on first create:\n - `cron_expression`: `cron(0 2 * * ? *)` (daily at 02:00)\n - `timezone`: `Europe/Berlin`\n - `retention`: `{ value: 90, unit: \"days\" }`\n - `enabled`: `true`\n\n**Note:** this call persists the row only. EventBridge schedule\nmaterialization is performed by a subsequent reconcile step (Task 6).\nThe row is the authoritative source of truth for the UI.\n",
418
+ "tags": [
419
+ "ScheduledSnapshots"
420
+ ],
421
+ "requestBody": {
422
+ "required": false,
423
+ "content": {
424
+ "application/json": {
425
+ "schema": {
426
+ "$ref": "#/components/schemas/PutOrgSnapshotScheduleRequest"
427
+ }
428
+ }
429
+ }
430
+ },
431
+ "responses": {
432
+ "200": {
433
+ "description": "Stored config (after upsert)",
434
+ "content": {
435
+ "application/json": {
436
+ "schema": {
437
+ "$ref": "#/components/schemas/OrgSnapshotSchedule"
438
+ }
439
+ }
440
+ }
441
+ },
442
+ "400": {
443
+ "$ref": "#/components/responses/BadRequest"
444
+ },
445
+ "401": {
446
+ "$ref": "#/components/responses/Unauthorized"
447
+ }
448
+ }
449
+ },
450
+ "delete": {
451
+ "operationId": "deleteOrgSnapshotSchedule",
452
+ "summary": "deleteOrgSnapshotSchedule",
453
+ "description": "Remove the scheduled-snapshot enrollment for the caller's org.\nReturns 404 when no schedule exists.\nThe corresponding EventBridge schedule is removed by a reconcile\nstep (Task 6).\n",
454
+ "tags": [
455
+ "ScheduledSnapshots"
456
+ ],
457
+ "responses": {
458
+ "204": {
459
+ "description": "Deleted"
460
+ },
461
+ "401": {
462
+ "$ref": "#/components/responses/Unauthorized"
463
+ },
464
+ "404": {
465
+ "$ref": "#/components/responses/NotFound"
466
+ }
467
+ }
468
+ }
469
+ },
386
470
  "/v1/snapshots:list-dependencies": {
387
471
  "post": {
388
472
  "operationId": "listDependencies",
@@ -489,16 +573,6 @@
489
573
  }
490
574
  }
491
575
  }
492
- },
493
- "UnprocessableEntity": {
494
- "description": "Unprocessable entity",
495
- "content": {
496
- "application/json": {
497
- "schema": {
498
- "$ref": "#/components/schemas/EmptyInventoryError"
499
- }
500
- }
501
- }
502
576
  }
503
577
  },
504
578
  "schemas": {
@@ -517,38 +591,6 @@
517
591
  }
518
592
  }
519
593
  },
520
- "EmptyInventoryError": {
521
- "type": "object",
522
- "required": [
523
- "message",
524
- "skipped_types"
525
- ],
526
- "description": "Returned (422) when the org inventory contains no capturable resources\nafter filtering out sensitive, unsupported, and excluded types. The\n`skipped_types` array explains why every type was dropped.\n",
527
- "properties": {
528
- "message": {
529
- "type": "string",
530
- "example": "No capturable resources in the org inventory"
531
- },
532
- "skipped_types": {
533
- "type": "array",
534
- "items": {
535
- "type": "object",
536
- "required": [
537
- "type",
538
- "reason"
539
- ],
540
- "properties": {
541
- "type": {
542
- "type": "string"
543
- },
544
- "reason": {
545
- "type": "string"
546
- }
547
- }
548
- }
549
- }
550
- }
551
- },
552
594
  "ResourceRef": {
553
595
  "type": "object",
554
596
  "required": [
@@ -929,6 +971,132 @@
929
971
  "type": "string"
930
972
  }
931
973
  }
974
+ },
975
+ "RetentionConfig": {
976
+ "type": "object",
977
+ "required": [
978
+ "value",
979
+ "unit"
980
+ ],
981
+ "description": "Flat retention window for a scheduled snapshot.\nConverted to a `ttl` epoch at capture time. Capped at ~24 months.\n",
982
+ "properties": {
983
+ "value": {
984
+ "type": "integer",
985
+ "minimum": 1,
986
+ "description": "Numeric quantity of retention (e.g. 90 for \"90 days\")."
987
+ },
988
+ "unit": {
989
+ "type": "string",
990
+ "enum": [
991
+ "days",
992
+ "weeks",
993
+ "months"
994
+ ]
995
+ }
996
+ }
997
+ },
998
+ "PutOrgSnapshotScheduleRequest": {
999
+ "type": "object",
1000
+ "description": "Body for `putOrgSnapshotSchedule`. All fields optional; unset fields\nreceive defaults on first create and are left unchanged on updates\n(except `updated_at`).\n",
1001
+ "properties": {
1002
+ "enabled": {
1003
+ "type": "boolean",
1004
+ "default": true,
1005
+ "description": "Whether the schedule is active."
1006
+ },
1007
+ "cron_expression": {
1008
+ "type": "string",
1009
+ "description": "6-field EventBridge cron expression, e.g. `cron(0 2 * * ? *)`.\nValidated server-side: minute + hour must be concrete single integers\n(no `*`, lists, ranges, or steps) to cap cadence at ≤ once/day.\nExactly one of day-of-month / day-of-week must be `?`.\n",
1010
+ "example": "cron(0 2 * * ? *)"
1011
+ },
1012
+ "timezone": {
1013
+ "type": "string",
1014
+ "description": "IANA timezone string passed to EventBridge `ScheduleExpressionTimezone`,\ne.g. `Europe/Berlin`. AWS handles DST natively.\n",
1015
+ "example": "Europe/Berlin"
1016
+ },
1017
+ "retention": {
1018
+ "$ref": "#/components/schemas/RetentionConfig"
1019
+ },
1020
+ "excluded_types": {
1021
+ "type": "array",
1022
+ "description": "Resource types to exclude from the scheduled capture, in addition\nto the always-excluded sensitive types (`access_token`,\n`environment_variable`).\n",
1023
+ "items": {
1024
+ "type": "string"
1025
+ }
1026
+ }
1027
+ }
1028
+ },
1029
+ "OrgSnapshotSchedule": {
1030
+ "type": "object",
1031
+ "required": [
1032
+ "org_id",
1033
+ "enabled",
1034
+ "cron_expression",
1035
+ "timezone",
1036
+ "retention",
1037
+ "schedule_name",
1038
+ "created_by",
1039
+ "created_at",
1040
+ "updated_at"
1041
+ ],
1042
+ "description": "Enrollment record for a scheduled org snapshot. One row per org.\nThis table — not EventBridge — is the source of truth; the EventBridge\nschedule entry is the materialization of this row (reconciled on write\nby Task 6).\n",
1043
+ "properties": {
1044
+ "org_id": {
1045
+ "type": "string"
1046
+ },
1047
+ "enabled": {
1048
+ "type": "boolean"
1049
+ },
1050
+ "cron_expression": {
1051
+ "type": "string",
1052
+ "description": "Validated 6-field EventBridge cron. Default `cron(0 2 * * ? *)`.",
1053
+ "example": "cron(0 2 * * ? *)"
1054
+ },
1055
+ "timezone": {
1056
+ "type": "string",
1057
+ "description": "IANA timezone. Default `Europe/Berlin`."
1058
+ },
1059
+ "retention": {
1060
+ "$ref": "#/components/schemas/RetentionConfig"
1061
+ },
1062
+ "excluded_types": {
1063
+ "type": "array",
1064
+ "items": {
1065
+ "type": "string"
1066
+ }
1067
+ },
1068
+ "schedule_name": {
1069
+ "type": "string",
1070
+ "description": "Name of the EventBridge Scheduler entry this row owns.\nSet at enrollment time as `org-snapshot-{orgId}`.\n"
1071
+ },
1072
+ "last_started_at": {
1073
+ "type": "string",
1074
+ "format": "date-time"
1075
+ },
1076
+ "last_completed_at": {
1077
+ "type": "string",
1078
+ "format": "date-time"
1079
+ },
1080
+ "last_status": {
1081
+ "type": "string",
1082
+ "enum": [
1083
+ "completed",
1084
+ "partial",
1085
+ "failed"
1086
+ ]
1087
+ },
1088
+ "created_by": {
1089
+ "type": "string"
1090
+ },
1091
+ "created_at": {
1092
+ "type": "string",
1093
+ "format": "date-time"
1094
+ },
1095
+ "updated_at": {
1096
+ "type": "string",
1097
+ "format": "date-time"
1098
+ }
1099
+ }
932
1100
  }
933
1101
  }
934
1102
  }
@@ -1715,6 +1715,10 @@
1715
1715
  "type": "string",
1716
1716
  "description": "stringified payload of the webhook request"
1717
1717
  },
1718
+ "original_payload": {
1719
+ "type": "string",
1720
+ "description": "Stringified pre-transform original payload — the raw input captured before any JSONata transform was applied. Returned by getEventById for non-catalog events that have a locally stored original source (inline or claim-checked to S3, hydrated here). Omitted when no original source exists or when the payload would exceed the inline response size limit. Catalog-backed events (event_-prefixed) do not carry a local original — their pre-transform payload is sourced from the event catalog instead."
1721
+ },
1718
1722
  "retry_attempt": {
1719
1723
  "type": "integer",
1720
1724
  "description": "Number of automatic delivery retries that preceded this terminal outcome. 0 means the event was delivered (or finally failed) on the first attempt."
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "../chunk-36WJHV3M.js";
4
+ } from "../chunk-BI57DDAE.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.64",
14
+ version: "0.1.66",
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-H6LKKRG6.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-ZXBNY2DJ.js").then((m) => m.default),
33
+ completion: () => import("../completion-3GW2YDYA.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-XPAZQL23.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.64" : (await null).default.version;
137
+ var VERSION = true ? "0.1.66" : (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-H6LKKRG6.js");
143
+ const { handleCompletions } = await import("../completion-3GW2YDYA.js");
144
144
  handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
145
145
  process.exit(0);
146
146
  }
@@ -268,7 +268,7 @@ var API_LIST = [
268
268
  kebabName: "customer-portal",
269
269
  title: "Portal API",
270
270
  serverUrl: "https://customer-portal-api.sls.epilot.io",
271
- operationCount: 156,
271
+ operationCount: 158,
272
272
  operationIds: [
273
273
  "upsertPortal",
274
274
  "createUser",
@@ -278,6 +278,8 @@ var API_LIST = [
278
278
  "getPortalConfigByDomain",
279
279
  "getPortalConfig",
280
280
  "deletePortal",
281
+ "createExport",
282
+ "getExport",
281
283
  "getPortalExtensions",
282
284
  "getPublicPortalExtensionDetails",
283
285
  "getPortalExtensionsV3",
@@ -1200,7 +1202,7 @@ var API_LIST = [
1200
1202
  kebabName: "snapshot",
1201
1203
  title: "Snapshot API",
1202
1204
  serverUrl: "https://snapshot.sls.epilot.io",
1203
- operationCount: 9,
1205
+ operationCount: 12,
1204
1206
  operationIds: [
1205
1207
  "listSnapshots",
1206
1208
  "createSnapshot",
@@ -1210,6 +1212,9 @@ var API_LIST = [
1210
1212
  "restoreSnapshot",
1211
1213
  "listSnapshotResources",
1212
1214
  "getSnapshotResource",
1215
+ "getOrgSnapshotSchedule",
1216
+ "putOrgSnapshotSchedule",
1217
+ "deleteOrgSnapshotSchedule",
1213
1218
  "listDependencies"
1214
1219
  ]
1215
1220
  },
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "./chunk-36WJHV3M.js";
4
+ } from "./chunk-BI57DDAE.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.64";
75
+ if (true) return "0.1.66";
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.64",
3
+ "version": "0.1.66",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {