@epilot/cli 0.1.65 → 0.1.67
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/billing.json +1571 -198
- package/definitions/snapshot.json +214 -46
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-VZZG4HRP.js → chunk-6TKZSKWB.js} +9 -2
- package/dist/{completion-TNGF5M2C.js → completion-BZQQTKHB.js} +1 -1
- package/dist/{upgrade-WOJSCMM6.js → upgrade-3AUH2MLE.js} +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
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
|
}
|
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-6TKZSKWB.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.67",
|
|
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-BZQQTKHB.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-3AUH2MLE.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.67" : (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-BZQQTKHB.js");
|
|
144
144
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
145
145
|
process.exit(0);
|
|
146
146
|
}
|
|
@@ -143,7 +143,7 @@ var API_LIST = [
|
|
|
143
143
|
kebabName: "billing",
|
|
144
144
|
title: "Billing API",
|
|
145
145
|
serverUrl: "https://billing.sls.epilot.io",
|
|
146
|
-
operationCount:
|
|
146
|
+
operationCount: 14,
|
|
147
147
|
operationIds: [
|
|
148
148
|
"getBillingEvents",
|
|
149
149
|
"createBillingEvent",
|
|
@@ -154,6 +154,10 @@ var API_LIST = [
|
|
|
154
154
|
"createContractEntity",
|
|
155
155
|
"updateContractEntity",
|
|
156
156
|
"deleteContractEntity",
|
|
157
|
+
"getContractPricingInformation",
|
|
158
|
+
"getBillingAccountPricingInformation",
|
|
159
|
+
"getContractConfigurationHistory",
|
|
160
|
+
"getBillingAccountConfigurationHistory",
|
|
157
161
|
"getCustomerBalance"
|
|
158
162
|
]
|
|
159
163
|
},
|
|
@@ -1202,7 +1206,7 @@ var API_LIST = [
|
|
|
1202
1206
|
kebabName: "snapshot",
|
|
1203
1207
|
title: "Snapshot API",
|
|
1204
1208
|
serverUrl: "https://snapshot.sls.epilot.io",
|
|
1205
|
-
operationCount:
|
|
1209
|
+
operationCount: 12,
|
|
1206
1210
|
operationIds: [
|
|
1207
1211
|
"listSnapshots",
|
|
1208
1212
|
"createSnapshot",
|
|
@@ -1212,6 +1216,9 @@ var API_LIST = [
|
|
|
1212
1216
|
"restoreSnapshot",
|
|
1213
1217
|
"listSnapshotResources",
|
|
1214
1218
|
"getSnapshotResource",
|
|
1219
|
+
"getOrgSnapshotSchedule",
|
|
1220
|
+
"putOrgSnapshotSchedule",
|
|
1221
|
+
"deleteOrgSnapshotSchedule",
|
|
1215
1222
|
"listDependencies"
|
|
1216
1223
|
]
|
|
1217
1224
|
},
|
|
@@ -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.67";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|