@epilot/cli 0.1.74 → 0.1.76
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 +458 -3
- package/definitions/email-settings.json +853 -16
- package/definitions/metering.json +134 -7
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-UI4BIEZG.js → chunk-Z6XZLCPF.js} +20 -4
- package/dist/{completion-JJWJGP6Q.js → completion-SRBQ67FX.js} +1 -1
- package/dist/{upgrade-UYOI7T7H.js → upgrade-VBSV2FKU.js} +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Metering API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.2.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": [
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"properties": {
|
|
105
105
|
"last_reading": {
|
|
106
106
|
"type": "string",
|
|
107
|
-
"example": "2022-10-
|
|
107
|
+
"example": "2022-10-10",
|
|
108
108
|
"description": "The timestamp of the last reading"
|
|
109
109
|
},
|
|
110
110
|
"current_consumption": {
|
|
@@ -791,6 +791,101 @@
|
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
793
|
},
|
|
794
|
+
"/v2/metering/readings/prune": {
|
|
795
|
+
"post": {
|
|
796
|
+
"operationId": "pruneMeterReadings",
|
|
797
|
+
"summary": "pruneMeterReadings",
|
|
798
|
+
"description": "Deletes every reading of a meter whose `external_id` is NOT in the provided keep list — in a single request.\n\nThe prune scope can optionally be narrowed to a single counter (`counter_id`) and/or a reading `source` (e.g. `ERP`).\nReplaces the client-side pattern of paginating the full reading history and issuing chunked batch deletes.\n\nReadings without an `external_id`:\n- when a `source` filter is provided, they are **deleted** — they cannot be referenced by any keep list\n- when no `source` filter is provided, they are **kept** (conservative default)\n\nDeletions reuse the same internal path as `batchWriteMeterReadings` with `operation: delete`: the same\nper-reading lifecycle events are emitted, and providing `activity_id` suppresses the per-reading delete\nactivities and attaches the given activity to the affected meter and counters instead. Delete operations\nnever create manual-intervention tickets; `create_ticket` is accepted for call-site parity with\n`batchWriteMeterReadings`.\n\n`keep_external_ids` is limited to 10000 entries.\n",
|
|
799
|
+
"tags": [
|
|
800
|
+
"ECP Admin"
|
|
801
|
+
],
|
|
802
|
+
"security": [
|
|
803
|
+
{
|
|
804
|
+
"EpilotAuth": []
|
|
805
|
+
}
|
|
806
|
+
],
|
|
807
|
+
"parameters": [
|
|
808
|
+
{
|
|
809
|
+
"in": "query",
|
|
810
|
+
"name": "async",
|
|
811
|
+
"description": "Don't wait for the deletions to become visible in GetReadings API. Useful for large prunes",
|
|
812
|
+
"required": false,
|
|
813
|
+
"schema": {
|
|
814
|
+
"type": "boolean",
|
|
815
|
+
"default": true
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"$ref": "#/components/parameters/ActivityIdQueryParam"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"$ref": "#/components/parameters/CreateTicketQueryParam"
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"in": "query",
|
|
826
|
+
"name": "dry_run",
|
|
827
|
+
"description": "When true, computes and returns the deleted/kept counts without deleting anything.",
|
|
828
|
+
"required": false,
|
|
829
|
+
"schema": {
|
|
830
|
+
"type": "boolean",
|
|
831
|
+
"default": false
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
],
|
|
835
|
+
"requestBody": {
|
|
836
|
+
"description": "Prune scope and keep list.",
|
|
837
|
+
"required": true,
|
|
838
|
+
"content": {
|
|
839
|
+
"application/json": {
|
|
840
|
+
"schema": {
|
|
841
|
+
"$ref": "#/components/schemas/PruneMeterReadingsPayload"
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"responses": {
|
|
847
|
+
"200": {
|
|
848
|
+
"description": "Meter readings pruned successfully.",
|
|
849
|
+
"content": {
|
|
850
|
+
"application/json": {
|
|
851
|
+
"schema": {
|
|
852
|
+
"type": "object",
|
|
853
|
+
"properties": {
|
|
854
|
+
"data": {
|
|
855
|
+
"type": "object",
|
|
856
|
+
"properties": {
|
|
857
|
+
"deleted_count": {
|
|
858
|
+
"type": "integer",
|
|
859
|
+
"description": "Number of readings deleted (or that would be deleted when `dry_run=true`).",
|
|
860
|
+
"example": 42
|
|
861
|
+
},
|
|
862
|
+
"kept_count": {
|
|
863
|
+
"type": "integer",
|
|
864
|
+
"description": "Number of readings in scope that were kept.",
|
|
865
|
+
"example": 12
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
"400": {
|
|
875
|
+
"$ref": "#/components/responses/InvalidRequest"
|
|
876
|
+
},
|
|
877
|
+
"401": {
|
|
878
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
879
|
+
},
|
|
880
|
+
"403": {
|
|
881
|
+
"$ref": "#/components/responses/Forbidden"
|
|
882
|
+
},
|
|
883
|
+
"500": {
|
|
884
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
},
|
|
794
889
|
"/v1/metering/reading/submission": {
|
|
795
890
|
"post": {
|
|
796
891
|
"operationId": "createMeterReadingFromSubmission",
|
|
@@ -2035,7 +2130,7 @@
|
|
|
2035
2130
|
},
|
|
2036
2131
|
"calibration_date": {
|
|
2037
2132
|
"type": "string",
|
|
2038
|
-
"example": "2022-10-
|
|
2133
|
+
"example": "2022-10-10",
|
|
2039
2134
|
"description": "The calibration date of the meter"
|
|
2040
2135
|
},
|
|
2041
2136
|
"contract": {
|
|
@@ -2151,7 +2246,7 @@
|
|
|
2151
2246
|
"timestamp": {
|
|
2152
2247
|
"type": "string",
|
|
2153
2248
|
"description": "If the value is not provided, the system will be set with the time the request is processed.",
|
|
2154
|
-
"example": "2022-10-
|
|
2249
|
+
"example": "2022-10-10",
|
|
2155
2250
|
"format": "date-time"
|
|
2156
2251
|
},
|
|
2157
2252
|
"source": {
|
|
@@ -2353,6 +2448,38 @@
|
|
|
2353
2448
|
"propertyName": "operation"
|
|
2354
2449
|
}
|
|
2355
2450
|
},
|
|
2451
|
+
"PruneMeterReadingsPayload": {
|
|
2452
|
+
"type": "object",
|
|
2453
|
+
"required": [
|
|
2454
|
+
"meter_id",
|
|
2455
|
+
"keep_external_ids"
|
|
2456
|
+
],
|
|
2457
|
+
"properties": {
|
|
2458
|
+
"meter_id": {
|
|
2459
|
+
"$ref": "#/components/schemas/EntityId",
|
|
2460
|
+
"description": "The ID of the meter whose readings are pruned"
|
|
2461
|
+
},
|
|
2462
|
+
"counter_id": {
|
|
2463
|
+
"$ref": "#/components/schemas/EntityId",
|
|
2464
|
+
"description": "Optionally narrows the prune scope to a single counter of the meter"
|
|
2465
|
+
},
|
|
2466
|
+
"source": {
|
|
2467
|
+
"$ref": "#/components/schemas/Source",
|
|
2468
|
+
"description": "Optionally only prune readings with this source (e.g. `ERP`)"
|
|
2469
|
+
},
|
|
2470
|
+
"keep_external_ids": {
|
|
2471
|
+
"type": "array",
|
|
2472
|
+
"items": {
|
|
2473
|
+
"type": "string"
|
|
2474
|
+
},
|
|
2475
|
+
"description": "Readings whose `external_id` is contained in this list are kept; every other reading in scope is deleted.\nAn empty array deletes all readings in scope (subject to the no-external-id rule described on the endpoint).\nLimited to 10000 entries.\n",
|
|
2476
|
+
"example": [
|
|
2477
|
+
"erp-reading-1",
|
|
2478
|
+
"erp-reading-2"
|
|
2479
|
+
]
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2356
2483
|
"UpdateMeterReading": {
|
|
2357
2484
|
"type": "object",
|
|
2358
2485
|
"required": [
|
|
@@ -2387,7 +2514,7 @@
|
|
|
2387
2514
|
"timestamp": {
|
|
2388
2515
|
"type": "string",
|
|
2389
2516
|
"description": "If the value is not provided, the system will be set with the time the request is processed.",
|
|
2390
|
-
"example": "2022-10-
|
|
2517
|
+
"example": "2022-10-10",
|
|
2391
2518
|
"format": "date-time"
|
|
2392
2519
|
},
|
|
2393
2520
|
"source": {
|
|
@@ -2466,7 +2593,7 @@
|
|
|
2466
2593
|
},
|
|
2467
2594
|
"forecast_as_of": {
|
|
2468
2595
|
"type": "string",
|
|
2469
|
-
"example": "2022-12-
|
|
2596
|
+
"example": "2022-12-10",
|
|
2470
2597
|
"description": "The date as of which the forecast reading value is applicable"
|
|
2471
2598
|
},
|
|
2472
2599
|
"current_consumption": {
|
|
@@ -2476,7 +2603,7 @@
|
|
|
2476
2603
|
},
|
|
2477
2604
|
"last_reading": {
|
|
2478
2605
|
"type": "string",
|
|
2479
|
-
"example": "2022-10-
|
|
2606
|
+
"example": "2022-10-10",
|
|
2480
2607
|
"description": "The timestamp of the last reading"
|
|
2481
2608
|
},
|
|
2482
2609
|
"conversion_factor": {
|
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-Z6XZLCPF.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.76",
|
|
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-SRBQ67FX.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-VBSV2FKU.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.76" : (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-SRBQ67FX.js");
|
|
144
144
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
145
145
|
process.exit(0);
|
|
146
146
|
}
|
|
@@ -69,7 +69,7 @@ var API_LIST = [
|
|
|
69
69
|
kebabName: "app",
|
|
70
70
|
title: "App API",
|
|
71
71
|
serverUrl: "https://app.sls.epilot.io",
|
|
72
|
-
operationCount:
|
|
72
|
+
operationCount: 35,
|
|
73
73
|
operationIds: [
|
|
74
74
|
"getPublicFacingComponent",
|
|
75
75
|
"listConfigurations",
|
|
@@ -102,7 +102,10 @@ var API_LIST = [
|
|
|
102
102
|
"promoteVersion",
|
|
103
103
|
"ingestEvent",
|
|
104
104
|
"publicProxyGet",
|
|
105
|
-
"publicProxyPost"
|
|
105
|
+
"publicProxyPost",
|
|
106
|
+
"publicProxyPut",
|
|
107
|
+
"publicProxyPatch",
|
|
108
|
+
"publicProxyDelete"
|
|
106
109
|
]
|
|
107
110
|
},
|
|
108
111
|
{
|
|
@@ -518,7 +521,7 @@ var API_LIST = [
|
|
|
518
521
|
kebabName: "email-settings",
|
|
519
522
|
title: "Messaging Settings API",
|
|
520
523
|
serverUrl: "https://email-settings.sls.epilot.io",
|
|
521
|
-
operationCount:
|
|
524
|
+
operationCount: 48,
|
|
522
525
|
operationIds: [
|
|
523
526
|
"provisionEpilotEmailAddress",
|
|
524
527
|
"setEmailAddressPrimary",
|
|
@@ -535,6 +538,9 @@ var API_LIST = [
|
|
|
535
538
|
"listInboxBuckets",
|
|
536
539
|
"connectOutlook",
|
|
537
540
|
"getOutlookConnectionStatus",
|
|
541
|
+
"getCalendarAdminConsentStatus",
|
|
542
|
+
"getMyCalendarConnection",
|
|
543
|
+
"disconnectMyCalendar",
|
|
538
544
|
"disconnectOutlook",
|
|
539
545
|
"connectMsTeams",
|
|
540
546
|
"disconnectMsTeams",
|
|
@@ -545,6 +551,15 @@ var API_LIST = [
|
|
|
545
551
|
"getMailboxSyncStatus",
|
|
546
552
|
"retryMailboxSync",
|
|
547
553
|
"getConnectedOutlookEmails",
|
|
554
|
+
"listSmtpConnections",
|
|
555
|
+
"createSmtpConnection",
|
|
556
|
+
"getSmtpConnection",
|
|
557
|
+
"updateSmtpConnection",
|
|
558
|
+
"deleteSmtpConnection",
|
|
559
|
+
"testSmtpConnection",
|
|
560
|
+
"listSmtpSenders",
|
|
561
|
+
"connectSmtpSender",
|
|
562
|
+
"disconnectSmtpSender",
|
|
548
563
|
"outlookOAuthCallback",
|
|
549
564
|
"getSettings",
|
|
550
565
|
"addSetting",
|
|
@@ -953,7 +968,7 @@ var API_LIST = [
|
|
|
953
968
|
kebabName: "metering",
|
|
954
969
|
title: "Metering API",
|
|
955
970
|
serverUrl: "https://metering.sls.epilot.io",
|
|
956
|
-
operationCount:
|
|
971
|
+
operationCount: 21,
|
|
957
972
|
operationIds: [
|
|
958
973
|
"getCustomerMeters",
|
|
959
974
|
"getMetersByContractId",
|
|
@@ -965,6 +980,7 @@ var API_LIST = [
|
|
|
965
980
|
"createMeterReadings",
|
|
966
981
|
"createPortalMeterReadings",
|
|
967
982
|
"batchWriteMeterReadings",
|
|
983
|
+
"pruneMeterReadings",
|
|
968
984
|
"createMeterReadingFromSubmission",
|
|
969
985
|
"getAllowedReadingForMeter",
|
|
970
986
|
"createReadingWithMeter",
|
|
@@ -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.76";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|