@epilot/cli 0.1.71 → 0.1.73

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.71 — CLI for epilot APIs
32
+ epilot v0.1.73 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -5929,10 +5929,77 @@
5929
5929
  }
5930
5930
  }
5931
5931
  },
5932
+ "patch": {
5933
+ "operationId": "updateContract",
5934
+ "summary": "updateContract",
5935
+ "description": "Update a contract by id. Use getPortalUserEntity instead.",
5936
+ "deprecated": true,
5937
+ "tags": [
5938
+ "ECP"
5939
+ ],
5940
+ "security": [
5941
+ {
5942
+ "PortalAuth": []
5943
+ }
5944
+ ],
5945
+ "parameters": [
5946
+ {
5947
+ "in": "path",
5948
+ "name": "id",
5949
+ "schema": {
5950
+ "$ref": "#/components/schemas/EntityId"
5951
+ },
5952
+ "required": true,
5953
+ "description": "The ID of the contract"
5954
+ }
5955
+ ],
5956
+ "requestBody": {
5957
+ "description": "Requested contract body to update",
5958
+ "required": true,
5959
+ "content": {
5960
+ "application/json": {
5961
+ "schema": {
5962
+ "$ref": "#/components/schemas/Entity"
5963
+ }
5964
+ }
5965
+ }
5966
+ },
5967
+ "responses": {
5968
+ "200": {
5969
+ "description": "Updated the contract successfully.",
5970
+ "content": {
5971
+ "application/json": {
5972
+ "schema": {
5973
+ "type": "object",
5974
+ "properties": {
5975
+ "data": {
5976
+ "$ref": "#/components/schemas/Contract"
5977
+ }
5978
+ }
5979
+ }
5980
+ }
5981
+ }
5982
+ },
5983
+ "401": {
5984
+ "$ref": "#/components/responses/Unauthorized"
5985
+ },
5986
+ "403": {
5987
+ "$ref": "#/components/responses/ForbiddenByRule"
5988
+ },
5989
+ "404": {
5990
+ "$ref": "#/components/responses/NotFound"
5991
+ },
5992
+ "500": {
5993
+ "$ref": "#/components/responses/InternalServerError"
5994
+ }
5995
+ }
5996
+ }
5997
+ },
5998
+ "/v2/portal/contract/{id}/resolve-templates": {
5932
5999
  "post": {
5933
6000
  "operationId": "getContractWithTemplates",
5934
6001
  "summary": "getContractWithTemplates",
5935
- "description": "Get a contract by id, resolving the provided Handlebars templates against each related meter into templates_output. POST variant of getContract that accepts a request body; the GET remains as a fallback.",
6002
+ "description": "Resolve Handlebars templates against a contract's related meters and return the contract with templates_output populated per meter. This is a read-only operation — it does not modify the contract. It uses POST only so the templates can be passed in the request body. Prefer getPortalUserEntity / getContract for reads that don't need templates.",
5936
6003
  "tags": [
5937
6004
  "ECP"
5938
6005
  ],
@@ -6047,71 +6114,6 @@
6047
6114
  "$ref": "#/components/responses/InternalServerError"
6048
6115
  }
6049
6116
  }
6050
- },
6051
- "patch": {
6052
- "operationId": "updateContract",
6053
- "summary": "updateContract",
6054
- "description": "Update a contract by id. Use getPortalUserEntity instead.",
6055
- "deprecated": true,
6056
- "tags": [
6057
- "ECP"
6058
- ],
6059
- "security": [
6060
- {
6061
- "PortalAuth": []
6062
- }
6063
- ],
6064
- "parameters": [
6065
- {
6066
- "in": "path",
6067
- "name": "id",
6068
- "schema": {
6069
- "$ref": "#/components/schemas/EntityId"
6070
- },
6071
- "required": true,
6072
- "description": "The ID of the contract"
6073
- }
6074
- ],
6075
- "requestBody": {
6076
- "description": "Requested contract body to update",
6077
- "required": true,
6078
- "content": {
6079
- "application/json": {
6080
- "schema": {
6081
- "$ref": "#/components/schemas/Entity"
6082
- }
6083
- }
6084
- }
6085
- },
6086
- "responses": {
6087
- "200": {
6088
- "description": "Updated the contract successfully.",
6089
- "content": {
6090
- "application/json": {
6091
- "schema": {
6092
- "type": "object",
6093
- "properties": {
6094
- "data": {
6095
- "$ref": "#/components/schemas/Contract"
6096
- }
6097
- }
6098
- }
6099
- }
6100
- }
6101
- },
6102
- "401": {
6103
- "$ref": "#/components/responses/Unauthorized"
6104
- },
6105
- "403": {
6106
- "$ref": "#/components/responses/ForbiddenByRule"
6107
- },
6108
- "404": {
6109
- "$ref": "#/components/responses/NotFound"
6110
- },
6111
- "500": {
6112
- "$ref": "#/components/responses/InternalServerError"
6113
- }
6114
- }
6115
6117
  }
6116
6118
  },
6117
6119
  "/v2/portal/contract/by-identifiers": {
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "File API",
5
- "version": "1.12.0",
5
+ "version": "1.13.0",
6
6
  "description": "The File API enables you to upload, store, manage, and share files within the epilot platform.\n\n## Key Features\n- **Upload files** to temporary storage and save them permanently as File entities\n- **Generate previews** (thumbnails) for images and documents\n- **Create public links** to share private files externally\n- **Organize files** into collections for better management\n- **Version control** with automatic file versioning on updates\n\n## File Upload Workflow\n1. Call `uploadFileV2` to get a pre-signed S3 URL\n2. Upload your file directly to S3 using the pre-signed URL (PUT request)\n3. Call `saveFileV2` with the S3 reference to create a permanent File entity\n\n## Changelog\n<a href=\"changelog\">View API Changelog</a>\n"
7
7
  },
8
8
  "tags": [
@@ -640,11 +640,11 @@
640
640
  "name": "s3_key",
641
641
  "in": "query",
642
642
  "required": true,
643
- "description": "The S3 object key",
643
+ "description": "The S3 object key, as returned in `s3ref.key` of the file entity.\n\nNote: object keys store the filename segment percent-encoded. For example, a file named\n`Straße 1.pdf` is stored under the key `.../Stra%C3%9Fe%201.pdf`, and that is the value\n`s3ref.key` contains. Pass it exactly as returned by the API and make sure your HTTP client\nURL-encodes the query parameter value, so a literal `%` arrives encoded as `%25`.\n",
644
644
  "schema": {
645
645
  "type": "string"
646
646
  },
647
- "example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
647
+ "example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/Stra%C3%9Fe%201.pdf"
648
648
  },
649
649
  {
650
650
  "name": "s3_bucket",
@@ -691,6 +691,9 @@
691
691
  "401": {
692
692
  "$ref": "#/components/responses/UnauthorizedError"
693
693
  },
694
+ "403": {
695
+ "$ref": "#/components/responses/ForbiddenError"
696
+ },
694
697
  "404": {
695
698
  "$ref": "#/components/responses/NotFoundError"
696
699
  },
@@ -1125,6 +1128,54 @@
1125
1128
  }
1126
1129
  }
1127
1130
  },
1131
+ "/v1/files/{id}/text": {
1132
+ "get": {
1133
+ "operationId": "getFileText",
1134
+ "summary": "getFileText",
1135
+ "description": "Get the plain-text representation of a file entity. Returns status `not_ready` while text is being prepared and `unsupported` when text is unavailable for the file or organization.",
1136
+ "tags": [
1137
+ "File"
1138
+ ],
1139
+ "parameters": [
1140
+ {
1141
+ "name": "id",
1142
+ "in": "path",
1143
+ "required": true,
1144
+ "description": "The UUID of the file entity",
1145
+ "schema": {
1146
+ "$ref": "#/components/schemas/FileEntityId"
1147
+ }
1148
+ }
1149
+ ],
1150
+ "responses": {
1151
+ "200": {
1152
+ "description": "Text state for the file entity",
1153
+ "content": {
1154
+ "application/json": {
1155
+ "schema": {
1156
+ "$ref": "#/components/schemas/FileText"
1157
+ }
1158
+ }
1159
+ }
1160
+ },
1161
+ "400": {
1162
+ "$ref": "#/components/responses/BadRequestError"
1163
+ },
1164
+ "401": {
1165
+ "$ref": "#/components/responses/UnauthorizedError"
1166
+ },
1167
+ "403": {
1168
+ "$ref": "#/components/responses/ForbiddenError"
1169
+ },
1170
+ "404": {
1171
+ "$ref": "#/components/responses/NotFoundError"
1172
+ },
1173
+ "500": {
1174
+ "$ref": "#/components/responses/InternalServerError"
1175
+ }
1176
+ }
1177
+ }
1178
+ },
1128
1179
  "/v1/files/{id}/preview": {
1129
1180
  "get": {
1130
1181
  "operationId": "previewFile",
@@ -1446,6 +1497,27 @@
1446
1497
  }
1447
1498
  }
1448
1499
  },
1500
+ "204": {
1501
+ "description": "No preview could be generated and no redirect target is available\n(the file has no public URL). No body is returned.\n"
1502
+ },
1503
+ "302": {
1504
+ "description": "The preview could not be optimized (e.g. image dimensions above the input\npixel limit, an oversized file, or an unsupported/undecodable format).\nSince the file is public, the client is redirected to the original file,\nwhich the browser can render directly.\n",
1505
+ "headers": {
1506
+ "Location": {
1507
+ "description": "URL of the original public file",
1508
+ "schema": {
1509
+ "type": "string",
1510
+ "format": "uri"
1511
+ }
1512
+ },
1513
+ "Cache-Control": {
1514
+ "description": "Caching policy for the redirect",
1515
+ "schema": {
1516
+ "type": "string"
1517
+ }
1518
+ }
1519
+ }
1520
+ },
1449
1521
  "304": {
1450
1522
  "description": "The preview is unchanged since the version identified by the `If-None-Match`\nrequest header. No body is returned; the cached copy should be reused.\n",
1451
1523
  "headers": {
@@ -2377,6 +2449,12 @@
2377
2449
  "description": "Human readable file size",
2378
2450
  "readOnly": true
2379
2451
  },
2452
+ "etag": {
2453
+ "type": "string",
2454
+ "description": "Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.",
2455
+ "example": "9bb58f26192e4ba00f01e2e7b136bbd8",
2456
+ "readOnly": true
2457
+ },
2380
2458
  "access_control": {
2381
2459
  "type": "string",
2382
2460
  "default": "private",
@@ -2523,6 +2601,109 @@
2523
2601
  }
2524
2602
  }
2525
2603
  },
2604
+ "FileTextStatus": {
2605
+ "type": "string",
2606
+ "description": "Availability of the plain-text representation for a file entity.",
2607
+ "enum": [
2608
+ "ready",
2609
+ "not_ready",
2610
+ "unsupported"
2611
+ ],
2612
+ "readOnly": true
2613
+ },
2614
+ "FileText": {
2615
+ "type": "object",
2616
+ "properties": {
2617
+ "status": {
2618
+ "$ref": "#/components/schemas/FileTextStatus"
2619
+ },
2620
+ "text": {
2621
+ "type": "string"
2622
+ },
2623
+ "truncated": {
2624
+ "type": "boolean"
2625
+ },
2626
+ "total_chars": {
2627
+ "type": "integer",
2628
+ "minimum": 0
2629
+ }
2630
+ },
2631
+ "required": [
2632
+ "status"
2633
+ ],
2634
+ "oneOf": [
2635
+ {
2636
+ "$ref": "#/components/schemas/FileTextReady"
2637
+ },
2638
+ {
2639
+ "$ref": "#/components/schemas/FileTextNotReady"
2640
+ },
2641
+ {
2642
+ "$ref": "#/components/schemas/FileTextUnsupported"
2643
+ }
2644
+ ]
2645
+ },
2646
+ "FileTextReady": {
2647
+ "type": "object",
2648
+ "additionalProperties": false,
2649
+ "properties": {
2650
+ "status": {
2651
+ "type": "string",
2652
+ "enum": [
2653
+ "ready"
2654
+ ]
2655
+ },
2656
+ "text": {
2657
+ "type": "string",
2658
+ "description": "Plain-text representation, trimmed and truncated to a server-side limit of 50000 characters."
2659
+ },
2660
+ "truncated": {
2661
+ "type": "boolean",
2662
+ "description": "True when the returned text was cut off by the character limit."
2663
+ },
2664
+ "total_chars": {
2665
+ "type": "integer",
2666
+ "minimum": 0,
2667
+ "description": "Length of the full text before truncation."
2668
+ }
2669
+ },
2670
+ "required": [
2671
+ "status",
2672
+ "text",
2673
+ "truncated",
2674
+ "total_chars"
2675
+ ]
2676
+ },
2677
+ "FileTextNotReady": {
2678
+ "type": "object",
2679
+ "additionalProperties": false,
2680
+ "properties": {
2681
+ "status": {
2682
+ "type": "string",
2683
+ "enum": [
2684
+ "not_ready"
2685
+ ]
2686
+ }
2687
+ },
2688
+ "required": [
2689
+ "status"
2690
+ ]
2691
+ },
2692
+ "FileTextUnsupported": {
2693
+ "type": "object",
2694
+ "additionalProperties": false,
2695
+ "properties": {
2696
+ "status": {
2697
+ "type": "string",
2698
+ "enum": [
2699
+ "unsupported"
2700
+ ]
2701
+ }
2702
+ },
2703
+ "required": [
2704
+ "status"
2705
+ ]
2706
+ },
2526
2707
  "CustomDownloadUrl": {
2527
2708
  "description": "Custom external download url used for the file",
2528
2709
  "type": "string",
@@ -3094,6 +3275,11 @@
3094
3275
  "mime_type": {
3095
3276
  "type": "string",
3096
3277
  "example": "image/jpeg"
3278
+ },
3279
+ "etag": {
3280
+ "type": "string",
3281
+ "description": "Content hash (S3 ETag) of this file version",
3282
+ "example": "9bb58f26192e4ba00f01e2e7b136bbd8"
3097
3283
  }
3098
3284
  }
3099
3285
  },
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "../chunk-HMUFGWB3.js";
4
+ } from "../chunk-UI4BIEZG.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.71",
14
+ version: "0.1.73",
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-L6M2AUJF.js").then((m) => m.default),
34
- upgrade: () => import("../upgrade-ZLQXCBG5.js").then((m) => m.default),
33
+ completion: () => import("../completion-JJWJGP6Q.js").then((m) => m.default),
34
+ upgrade: () => import("../upgrade-ZCU6UKYR.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.71" : (await null).default.version;
137
+ var VERSION = true ? "0.1.73" : (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-L6M2AUJF.js");
143
+ const { handleCompletions } = await import("../completion-JJWJGP6Q.js");
144
144
  handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
145
145
  process.exit(0);
146
146
  }
@@ -363,8 +363,8 @@ var API_LIST = [
363
363
  "getAllRequests",
364
364
  "getAllContracts",
365
365
  "getContract",
366
- "getContractWithTemplates",
367
366
  "updateContract",
367
+ "getContractWithTemplates",
368
368
  "addContractByIdentifiers",
369
369
  "getEntityIdentifiers",
370
370
  "getEntityActivityFeed",
@@ -732,7 +732,7 @@ var API_LIST = [
732
732
  kebabName: "file",
733
733
  title: "File API",
734
734
  serverUrl: "https://file.sls.epilot.io",
735
- operationCount: 34,
735
+ operationCount: 35,
736
736
  operationIds: [
737
737
  "uploadFileV2",
738
738
  "saveFileV2",
@@ -750,6 +750,7 @@ var API_LIST = [
750
750
  "getCurrentFileSummaryJob",
751
751
  "getFileSummaryJob",
752
752
  "generateFileSummary",
753
+ "getFileText",
753
754
  "previewFile",
754
755
  "previewS3FileGet",
755
756
  "previewS3File",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  API_LIST
4
- } from "./chunk-HMUFGWB3.js";
4
+ } from "./chunk-UI4BIEZG.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.71";
75
+ if (true) return "0.1.73";
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.71",
3
+ "version": "0.1.73",
4
4
  "description": "CLI for epilot APIs",
5
5
  "type": "module",
6
6
  "bin": {