@epilot/cli 0.1.58 → 0.1.60
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/file.json +291 -15
- package/definitions/integration-toolkit.json +213 -2
- package/dist/{auth-CN5EFFDE.js → auth-4HG7B2GC.js} +4 -1
- package/dist/{auth-login-NHWG3STD.js → auth-login-7EWYCAZ7.js} +11 -3
- package/dist/bin/epilot.js +7 -7
- package/dist/{chunk-XSH56QUG.js → chunk-B4RIWFEX.js} +7 -2
- package/dist/{completion-WEFTQNAT.js → completion-NBGAWAHF.js} +1 -1
- package/dist/{upgrade-TKHFV6J7.js → upgrade-YDRXPHHU.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/definitions/file.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "File API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.12.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": [
|
|
@@ -875,11 +875,213 @@
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
},
|
|
878
|
+
"/v1/files/{id}/summary": {
|
|
879
|
+
"get": {
|
|
880
|
+
"operationId": "getFileSummary",
|
|
881
|
+
"summary": "getFileSummary",
|
|
882
|
+
"description": "Get summary text for a file entity together with the current summary job status when available.",
|
|
883
|
+
"tags": [
|
|
884
|
+
"File"
|
|
885
|
+
],
|
|
886
|
+
"parameters": [
|
|
887
|
+
{
|
|
888
|
+
"name": "id",
|
|
889
|
+
"in": "path",
|
|
890
|
+
"required": true,
|
|
891
|
+
"description": "The UUID of the file entity",
|
|
892
|
+
"schema": {
|
|
893
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
],
|
|
897
|
+
"responses": {
|
|
898
|
+
"200": {
|
|
899
|
+
"description": "Current file summary state",
|
|
900
|
+
"content": {
|
|
901
|
+
"application/json": {
|
|
902
|
+
"schema": {
|
|
903
|
+
"$ref": "#/components/schemas/FileSummary"
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
"400": {
|
|
909
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
910
|
+
},
|
|
911
|
+
"401": {
|
|
912
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
913
|
+
},
|
|
914
|
+
"403": {
|
|
915
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
916
|
+
},
|
|
917
|
+
"404": {
|
|
918
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
919
|
+
},
|
|
920
|
+
"500": {
|
|
921
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
"/v1/files/{id}/summary-jobs": {
|
|
927
|
+
"post": {
|
|
928
|
+
"operationId": "createFileSummaryJob",
|
|
929
|
+
"summary": "createFileSummaryJob",
|
|
930
|
+
"description": "Create or return the current AI summary job for a file entity.",
|
|
931
|
+
"tags": [
|
|
932
|
+
"File"
|
|
933
|
+
],
|
|
934
|
+
"parameters": [
|
|
935
|
+
{
|
|
936
|
+
"name": "id",
|
|
937
|
+
"in": "path",
|
|
938
|
+
"required": true,
|
|
939
|
+
"description": "The UUID of the file entity",
|
|
940
|
+
"schema": {
|
|
941
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
],
|
|
945
|
+
"responses": {
|
|
946
|
+
"202": {
|
|
947
|
+
"description": "Summary job accepted",
|
|
948
|
+
"content": {
|
|
949
|
+
"application/json": {
|
|
950
|
+
"schema": {
|
|
951
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
"400": {
|
|
957
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
958
|
+
},
|
|
959
|
+
"401": {
|
|
960
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
961
|
+
},
|
|
962
|
+
"403": {
|
|
963
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
964
|
+
},
|
|
965
|
+
"404": {
|
|
966
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
967
|
+
},
|
|
968
|
+
"500": {
|
|
969
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
"/v1/files/{id}/summary-jobs/current": {
|
|
975
|
+
"get": {
|
|
976
|
+
"operationId": "getCurrentFileSummaryJob",
|
|
977
|
+
"summary": "getCurrentFileSummaryJob",
|
|
978
|
+
"description": "Get the latest AI summary job for the file entity's current source.",
|
|
979
|
+
"tags": [
|
|
980
|
+
"File"
|
|
981
|
+
],
|
|
982
|
+
"parameters": [
|
|
983
|
+
{
|
|
984
|
+
"name": "id",
|
|
985
|
+
"in": "path",
|
|
986
|
+
"required": true,
|
|
987
|
+
"description": "The UUID of the file entity",
|
|
988
|
+
"schema": {
|
|
989
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
],
|
|
993
|
+
"responses": {
|
|
994
|
+
"200": {
|
|
995
|
+
"description": "Current summary job",
|
|
996
|
+
"content": {
|
|
997
|
+
"application/json": {
|
|
998
|
+
"schema": {
|
|
999
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
"400": {
|
|
1005
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1006
|
+
},
|
|
1007
|
+
"401": {
|
|
1008
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1009
|
+
},
|
|
1010
|
+
"403": {
|
|
1011
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1012
|
+
},
|
|
1013
|
+
"404": {
|
|
1014
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1015
|
+
},
|
|
1016
|
+
"500": {
|
|
1017
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
"/v1/files/{id}/summary-jobs/{job_id}": {
|
|
1023
|
+
"get": {
|
|
1024
|
+
"operationId": "getFileSummaryJob",
|
|
1025
|
+
"summary": "getFileSummaryJob",
|
|
1026
|
+
"description": "Get an AI summary job by id.",
|
|
1027
|
+
"tags": [
|
|
1028
|
+
"File"
|
|
1029
|
+
],
|
|
1030
|
+
"parameters": [
|
|
1031
|
+
{
|
|
1032
|
+
"name": "id",
|
|
1033
|
+
"in": "path",
|
|
1034
|
+
"required": true,
|
|
1035
|
+
"description": "The UUID of the file entity",
|
|
1036
|
+
"schema": {
|
|
1037
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"name": "job_id",
|
|
1042
|
+
"in": "path",
|
|
1043
|
+
"required": true,
|
|
1044
|
+
"description": "The UUID of the summary job",
|
|
1045
|
+
"schema": {
|
|
1046
|
+
"type": "string",
|
|
1047
|
+
"format": "uuid"
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
],
|
|
1051
|
+
"responses": {
|
|
1052
|
+
"200": {
|
|
1053
|
+
"description": "Summary job",
|
|
1054
|
+
"content": {
|
|
1055
|
+
"application/json": {
|
|
1056
|
+
"schema": {
|
|
1057
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
"400": {
|
|
1063
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1064
|
+
},
|
|
1065
|
+
"401": {
|
|
1066
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1067
|
+
},
|
|
1068
|
+
"403": {
|
|
1069
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1070
|
+
},
|
|
1071
|
+
"404": {
|
|
1072
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1073
|
+
},
|
|
1074
|
+
"500": {
|
|
1075
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
878
1080
|
"/v1/files/{id}/summary:generate": {
|
|
879
1081
|
"post": {
|
|
880
1082
|
"operationId": "generateFileSummary",
|
|
881
1083
|
"summary": "generateFileSummary",
|
|
882
|
-
"description": "
|
|
1084
|
+
"description": "Compatibility alias for creating or returning the current AI summary job for a file entity.",
|
|
883
1085
|
"tags": [
|
|
884
1086
|
"File"
|
|
885
1087
|
],
|
|
@@ -900,7 +1102,7 @@
|
|
|
900
1102
|
"content": {
|
|
901
1103
|
"application/json": {
|
|
902
1104
|
"schema": {
|
|
903
|
-
"$ref": "#/components/schemas/
|
|
1105
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
904
1106
|
}
|
|
905
1107
|
}
|
|
906
1108
|
}
|
|
@@ -917,9 +1119,6 @@
|
|
|
917
1119
|
"404": {
|
|
918
1120
|
"$ref": "#/components/responses/NotFoundError"
|
|
919
1121
|
},
|
|
920
|
-
"409": {
|
|
921
|
-
"$ref": "#/components/responses/ConflictError"
|
|
922
|
-
},
|
|
923
1122
|
"500": {
|
|
924
1123
|
"$ref": "#/components/responses/InternalServerError"
|
|
925
1124
|
}
|
|
@@ -2196,6 +2395,9 @@
|
|
|
2196
2395
|
"custom_download_url": {
|
|
2197
2396
|
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
2198
2397
|
},
|
|
2398
|
+
"custom_download_url_auth": {
|
|
2399
|
+
"$ref": "#/components/schemas/CustomDownloadUrlAuth"
|
|
2400
|
+
},
|
|
2199
2401
|
"preview_summary_de": {
|
|
2200
2402
|
"type": "string",
|
|
2201
2403
|
"description": "Compact German summary for hover and list preview surfaces.",
|
|
@@ -2215,9 +2417,6 @@
|
|
|
2215
2417
|
"type": "string",
|
|
2216
2418
|
"description": "Short English paragraph summary for file preview surfaces.",
|
|
2217
2419
|
"readOnly": true
|
|
2218
|
-
},
|
|
2219
|
-
"summary_status": {
|
|
2220
|
-
"$ref": "#/components/schemas/FileSummaryStatus"
|
|
2221
2420
|
}
|
|
2222
2421
|
}
|
|
2223
2422
|
},
|
|
@@ -2238,34 +2437,108 @@
|
|
|
2238
2437
|
"unknown"
|
|
2239
2438
|
]
|
|
2240
2439
|
},
|
|
2241
|
-
"
|
|
2440
|
+
"FileSummaryJobStatus": {
|
|
2242
2441
|
"type": "string",
|
|
2243
|
-
"description": "Current
|
|
2442
|
+
"description": "Current state of a file summary job.",
|
|
2244
2443
|
"enum": [
|
|
2444
|
+
"queued",
|
|
2445
|
+
"waiting_for_extraction",
|
|
2245
2446
|
"processing",
|
|
2246
2447
|
"completed",
|
|
2247
2448
|
"failed",
|
|
2248
|
-
"unsupported"
|
|
2449
|
+
"unsupported",
|
|
2450
|
+
"stale"
|
|
2249
2451
|
],
|
|
2250
2452
|
"readOnly": true
|
|
2251
2453
|
},
|
|
2252
|
-
"
|
|
2454
|
+
"FileSummaryJob": {
|
|
2253
2455
|
"type": "object",
|
|
2254
2456
|
"properties": {
|
|
2457
|
+
"job_id": {
|
|
2458
|
+
"type": "string",
|
|
2459
|
+
"format": "uuid",
|
|
2460
|
+
"description": "File summary job ID."
|
|
2461
|
+
},
|
|
2462
|
+
"file_id": {
|
|
2463
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
2464
|
+
},
|
|
2255
2465
|
"status": {
|
|
2256
|
-
"$ref": "#/components/schemas/
|
|
2466
|
+
"$ref": "#/components/schemas/FileSummaryJobStatus"
|
|
2467
|
+
},
|
|
2468
|
+
"error": {
|
|
2469
|
+
"type": "string",
|
|
2470
|
+
"description": "Human-readable failure or unsupported reason when available."
|
|
2471
|
+
},
|
|
2472
|
+
"created_at": {
|
|
2473
|
+
"type": "string",
|
|
2474
|
+
"format": "date-time"
|
|
2475
|
+
},
|
|
2476
|
+
"updated_at": {
|
|
2477
|
+
"type": "string",
|
|
2478
|
+
"format": "date-time"
|
|
2479
|
+
},
|
|
2480
|
+
"completed_at": {
|
|
2481
|
+
"type": "string",
|
|
2482
|
+
"format": "date-time"
|
|
2257
2483
|
}
|
|
2258
2484
|
},
|
|
2259
2485
|
"required": [
|
|
2260
|
-
"
|
|
2486
|
+
"job_id",
|
|
2487
|
+
"file_id",
|
|
2488
|
+
"status",
|
|
2489
|
+
"created_at",
|
|
2490
|
+
"updated_at"
|
|
2261
2491
|
]
|
|
2262
2492
|
},
|
|
2493
|
+
"FileSummary": {
|
|
2494
|
+
"type": "object",
|
|
2495
|
+
"properties": {
|
|
2496
|
+
"status": {
|
|
2497
|
+
"$ref": "#/components/schemas/FileSummaryJobStatus"
|
|
2498
|
+
},
|
|
2499
|
+
"job_id": {
|
|
2500
|
+
"type": "string",
|
|
2501
|
+
"format": "uuid",
|
|
2502
|
+
"description": "Current summary job ID when available."
|
|
2503
|
+
},
|
|
2504
|
+
"preview_summary_de": {
|
|
2505
|
+
"type": "string",
|
|
2506
|
+
"nullable": true,
|
|
2507
|
+
"description": "Compact German summary for hover and list preview surfaces."
|
|
2508
|
+
},
|
|
2509
|
+
"short_summary_de": {
|
|
2510
|
+
"type": "string",
|
|
2511
|
+
"nullable": true,
|
|
2512
|
+
"description": "Short German paragraph summary for file preview surfaces."
|
|
2513
|
+
},
|
|
2514
|
+
"preview_summary_en": {
|
|
2515
|
+
"type": "string",
|
|
2516
|
+
"nullable": true,
|
|
2517
|
+
"description": "Compact English summary for hover and list preview surfaces."
|
|
2518
|
+
},
|
|
2519
|
+
"short_summary_en": {
|
|
2520
|
+
"type": "string",
|
|
2521
|
+
"nullable": true,
|
|
2522
|
+
"description": "Short English paragraph summary for file preview surfaces."
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2263
2526
|
"CustomDownloadUrl": {
|
|
2264
2527
|
"description": "Custom external download url used for the file",
|
|
2265
2528
|
"type": "string",
|
|
2266
2529
|
"format": "uri",
|
|
2267
2530
|
"example": "https://some-api-url.com/download?file_id=123"
|
|
2268
2531
|
},
|
|
2532
|
+
"CustomDownloadUrlAuth": {
|
|
2533
|
+
"description": "Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.",
|
|
2534
|
+
"type": "string",
|
|
2535
|
+
"enum": [
|
|
2536
|
+
"presigned",
|
|
2537
|
+
"token"
|
|
2538
|
+
],
|
|
2539
|
+
"default": "presigned",
|
|
2540
|
+
"example": "token"
|
|
2541
|
+
},
|
|
2269
2542
|
"FileEntity": {
|
|
2270
2543
|
"allOf": [
|
|
2271
2544
|
{
|
|
@@ -2437,6 +2710,9 @@
|
|
|
2437
2710
|
"properties": {
|
|
2438
2711
|
"custom_download_url": {
|
|
2439
2712
|
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
2713
|
+
},
|
|
2714
|
+
"custom_download_url_auth": {
|
|
2715
|
+
"$ref": "#/components/schemas/CustomDownloadUrlAuth"
|
|
2440
2716
|
}
|
|
2441
2717
|
}
|
|
2442
2718
|
}
|
|
@@ -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.3",
|
|
6
6
|
"description": "API for integrating with external systems in a standardised way."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -1997,6 +1997,72 @@
|
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
},
|
|
2000
|
+
"/v2/integrations/{integrationId}/notifications/status": {
|
|
2001
|
+
"get": {
|
|
2002
|
+
"operationId": "getNotificationStatus",
|
|
2003
|
+
"summary": "getNotificationStatus",
|
|
2004
|
+
"description": "Returns the live per-rule alert state and (for 'auto' rules) the current\nhour-of-week baseline band for an integration's notification monitoring.\nReflects the latest 5-minute sweep — near-real-time, not live.\nRequires the `integration:view` permission on the integration's organization.\n",
|
|
2005
|
+
"tags": [
|
|
2006
|
+
"integrations"
|
|
2007
|
+
],
|
|
2008
|
+
"security": [
|
|
2009
|
+
{
|
|
2010
|
+
"EpilotAuth": []
|
|
2011
|
+
}
|
|
2012
|
+
],
|
|
2013
|
+
"parameters": [
|
|
2014
|
+
{
|
|
2015
|
+
"name": "integrationId",
|
|
2016
|
+
"in": "path",
|
|
2017
|
+
"required": true,
|
|
2018
|
+
"description": "The integration ID",
|
|
2019
|
+
"schema": {
|
|
2020
|
+
"type": "string",
|
|
2021
|
+
"format": "uuid"
|
|
2022
|
+
}
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
"name": "include",
|
|
2026
|
+
"in": "query",
|
|
2027
|
+
"required": false,
|
|
2028
|
+
"description": "Add `baseline_series` to also return all 168 hour-of-week buckets per\n'auto' rule (heavier; omit for just the current-bucket markers).\n",
|
|
2029
|
+
"schema": {
|
|
2030
|
+
"type": "string",
|
|
2031
|
+
"enum": [
|
|
2032
|
+
"baseline_series"
|
|
2033
|
+
]
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
],
|
|
2037
|
+
"responses": {
|
|
2038
|
+
"200": {
|
|
2039
|
+
"description": "Live notification status",
|
|
2040
|
+
"content": {
|
|
2041
|
+
"application/json": {
|
|
2042
|
+
"schema": {
|
|
2043
|
+
"$ref": "#/components/schemas/NotificationStatusResponse"
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
},
|
|
2048
|
+
"400": {
|
|
2049
|
+
"$ref": "#/components/responses/BadRequest"
|
|
2050
|
+
},
|
|
2051
|
+
"401": {
|
|
2052
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2053
|
+
},
|
|
2054
|
+
"403": {
|
|
2055
|
+
"$ref": "#/components/responses/Forbidden"
|
|
2056
|
+
},
|
|
2057
|
+
"404": {
|
|
2058
|
+
"$ref": "#/components/responses/NotFound"
|
|
2059
|
+
},
|
|
2060
|
+
"500": {
|
|
2061
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2000
2066
|
"/v2/integrations/{integrationId}/use-cases/{useCaseId}/secure-proxy-whitelist": {
|
|
2001
2067
|
"get": {
|
|
2002
2068
|
"operationId": "getSecureProxyWhitelist",
|
|
@@ -3720,6 +3786,150 @@
|
|
|
3720
3786
|
}
|
|
3721
3787
|
}
|
|
3722
3788
|
},
|
|
3789
|
+
"NotificationStatusResponse": {
|
|
3790
|
+
"type": "object",
|
|
3791
|
+
"required": [
|
|
3792
|
+
"health",
|
|
3793
|
+
"rules"
|
|
3794
|
+
],
|
|
3795
|
+
"properties": {
|
|
3796
|
+
"health": {
|
|
3797
|
+
"type": "string",
|
|
3798
|
+
"enum": [
|
|
3799
|
+
"healthy",
|
|
3800
|
+
"alerting",
|
|
3801
|
+
"muted"
|
|
3802
|
+
],
|
|
3803
|
+
"description": "Rolled-up live status: `muted` when muteUntil is in the future; else `alerting` if any rule is currently ALERTING; else `healthy`.\n"
|
|
3804
|
+
},
|
|
3805
|
+
"evaluated_at": {
|
|
3806
|
+
"type": "string",
|
|
3807
|
+
"format": "date-time",
|
|
3808
|
+
"nullable": true,
|
|
3809
|
+
"description": "Most recent per-rule evaluation instant (max lastEvaluatedAt), or null when no rule has been evaluated. Updates on the 5-minute sweep tick.\n"
|
|
3810
|
+
},
|
|
3811
|
+
"rules": {
|
|
3812
|
+
"type": "array",
|
|
3813
|
+
"description": "Per-rule status, one entry per configured rule.",
|
|
3814
|
+
"items": {
|
|
3815
|
+
"$ref": "#/components/schemas/NotificationRuleStatus"
|
|
3816
|
+
}
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
},
|
|
3820
|
+
"NotificationRuleStatus": {
|
|
3821
|
+
"type": "object",
|
|
3822
|
+
"required": [
|
|
3823
|
+
"rule_id",
|
|
3824
|
+
"state"
|
|
3825
|
+
],
|
|
3826
|
+
"properties": {
|
|
3827
|
+
"rule_id": {
|
|
3828
|
+
"type": "string",
|
|
3829
|
+
"description": "The rule's stable id (matches the configured rule id)."
|
|
3830
|
+
},
|
|
3831
|
+
"state": {
|
|
3832
|
+
"type": "string",
|
|
3833
|
+
"enum": [
|
|
3834
|
+
"ok",
|
|
3835
|
+
"alerting",
|
|
3836
|
+
"recovered"
|
|
3837
|
+
],
|
|
3838
|
+
"description": "The rule's live AlertState (defaults to `ok` when never evaluated)."
|
|
3839
|
+
},
|
|
3840
|
+
"last_fired_at": {
|
|
3841
|
+
"type": "string",
|
|
3842
|
+
"format": "date-time",
|
|
3843
|
+
"nullable": true,
|
|
3844
|
+
"description": "ISO instant the rule last entered ALERTING."
|
|
3845
|
+
},
|
|
3846
|
+
"last_cleared_at": {
|
|
3847
|
+
"type": "string",
|
|
3848
|
+
"format": "date-time",
|
|
3849
|
+
"nullable": true,
|
|
3850
|
+
"description": "ISO instant the rule last cleared back to OK."
|
|
3851
|
+
},
|
|
3852
|
+
"baseline": {
|
|
3853
|
+
"nullable": true,
|
|
3854
|
+
"description": "Present only for enabled 'auto'-threshold rules; null otherwise.",
|
|
3855
|
+
"allOf": [
|
|
3856
|
+
{
|
|
3857
|
+
"$ref": "#/components/schemas/RuleBaselineStatus"
|
|
3858
|
+
}
|
|
3859
|
+
]
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
},
|
|
3863
|
+
"RuleBaselineStatus": {
|
|
3864
|
+
"type": "object",
|
|
3865
|
+
"required": [
|
|
3866
|
+
"is_mature"
|
|
3867
|
+
],
|
|
3868
|
+
"properties": {
|
|
3869
|
+
"is_mature": {
|
|
3870
|
+
"type": "boolean",
|
|
3871
|
+
"description": "False during cold start; the sweeper uses the static fallbackThreshold until the baseline's history span is mature.\n"
|
|
3872
|
+
},
|
|
3873
|
+
"computed_at": {
|
|
3874
|
+
"type": "string",
|
|
3875
|
+
"format": "date-time",
|
|
3876
|
+
"nullable": true,
|
|
3877
|
+
"description": "ISO instant the baseline was last computed."
|
|
3878
|
+
},
|
|
3879
|
+
"median": {
|
|
3880
|
+
"type": "number",
|
|
3881
|
+
"nullable": true,
|
|
3882
|
+
"description": "Typical in-scope event volume for the current hour-of-week bucket."
|
|
3883
|
+
},
|
|
3884
|
+
"mad": {
|
|
3885
|
+
"type": "number",
|
|
3886
|
+
"nullable": true,
|
|
3887
|
+
"description": "Median absolute deviation for the current hour-of-week bucket."
|
|
3888
|
+
},
|
|
3889
|
+
"upper": {
|
|
3890
|
+
"type": "number",
|
|
3891
|
+
"nullable": true,
|
|
3892
|
+
"description": "Dynamic alert threshold (median + k·MAD, k by sensitivity) for the current hour-of-week, or null when the bucket is uncovered.\n"
|
|
3893
|
+
},
|
|
3894
|
+
"buckets": {
|
|
3895
|
+
"type": "array",
|
|
3896
|
+
"nullable": true,
|
|
3897
|
+
"description": "Full 168-bucket series; only present when ?include=baseline_series.",
|
|
3898
|
+
"items": {
|
|
3899
|
+
"$ref": "#/components/schemas/RuleBaselineBucket"
|
|
3900
|
+
}
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
},
|
|
3904
|
+
"RuleBaselineBucket": {
|
|
3905
|
+
"type": "object",
|
|
3906
|
+
"required": [
|
|
3907
|
+
"dow",
|
|
3908
|
+
"hour",
|
|
3909
|
+
"median",
|
|
3910
|
+
"mad"
|
|
3911
|
+
],
|
|
3912
|
+
"properties": {
|
|
3913
|
+
"dow": {
|
|
3914
|
+
"type": "integer",
|
|
3915
|
+
"minimum": 1,
|
|
3916
|
+
"maximum": 7,
|
|
3917
|
+
"description": "Day of week, 1=Monday … 7=Sunday."
|
|
3918
|
+
},
|
|
3919
|
+
"hour": {
|
|
3920
|
+
"type": "integer",
|
|
3921
|
+
"minimum": 0,
|
|
3922
|
+
"maximum": 23,
|
|
3923
|
+
"description": "Hour of day, 0 … 23 (UTC)."
|
|
3924
|
+
},
|
|
3925
|
+
"median": {
|
|
3926
|
+
"type": "number"
|
|
3927
|
+
},
|
|
3928
|
+
"mad": {
|
|
3929
|
+
"type": "number"
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
},
|
|
3723
3933
|
"ErrorResponseBase": {
|
|
3724
3934
|
"type": "object",
|
|
3725
3935
|
"properties": {
|
|
@@ -4399,7 +4609,8 @@
|
|
|
4399
4609
|
"muteUntil": {
|
|
4400
4610
|
"type": "string",
|
|
4401
4611
|
"format": "date-time",
|
|
4402
|
-
"
|
|
4612
|
+
"nullable": true,
|
|
4613
|
+
"description": "ISO instant; snooze all non-digest alerts until this time. `null` means not muted."
|
|
4403
4614
|
}
|
|
4404
4615
|
}
|
|
4405
4616
|
},
|
|
@@ -21,7 +21,7 @@ var auth_default = defineCommand({
|
|
|
21
21
|
description: "Manage authentication"
|
|
22
22
|
},
|
|
23
23
|
subCommands: {
|
|
24
|
-
login: () => import("./auth-login-
|
|
24
|
+
login: () => import("./auth-login-7EWYCAZ7.js").then((m) => m.default),
|
|
25
25
|
token: () => import("./auth-token-APXLIQAO.js").then((m) => m.default),
|
|
26
26
|
logout: defineCommand({
|
|
27
27
|
meta: { name: "logout", description: "Remove stored credentials" },
|
|
@@ -60,6 +60,7 @@ var auth_default = defineCommand({
|
|
|
60
60
|
const adminEmail = claims?.admin_email;
|
|
61
61
|
const tokenUse = claims?.token_use;
|
|
62
62
|
const roles = claims?.assume_roles;
|
|
63
|
+
const readOnly = claims?.read_only === true;
|
|
63
64
|
if (name) process.stdout.write(` Name: ${name}
|
|
64
65
|
`);
|
|
65
66
|
if (adminEmail && adminEmail !== name) process.stdout.write(` Email: ${adminEmail}
|
|
@@ -73,6 +74,8 @@ var auth_default = defineCommand({
|
|
|
73
74
|
if (tokenUse) process.stdout.write(` Use: ${tokenUse}
|
|
74
75
|
`);
|
|
75
76
|
if (roles?.length) process.stdout.write(` Roles: ${roles.join(", ")}
|
|
77
|
+
`);
|
|
78
|
+
process.stdout.write(` Access: ${readOnly ? `${YELLOW}read-only${RESET}` : `${GREEN}read-write${RESET}`}
|
|
76
79
|
`);
|
|
77
80
|
if (creds.expires_at) {
|
|
78
81
|
const expiry = new Date(creds.expires_at);
|
|
@@ -39,12 +39,14 @@ var auth_login_default = defineCommand({
|
|
|
39
39
|
args: {
|
|
40
40
|
token: { type: "string", description: "Manually provide a token instead of browser login" },
|
|
41
41
|
profile: { type: "string", description: "Save credentials to this profile" },
|
|
42
|
+
readonly: { type: "boolean", description: "Generate a read-only token (cannot perform write actions)" },
|
|
42
43
|
"use-dev": { type: "boolean", description: "Use dev environment (portal.dev.epilot.cloud)" },
|
|
43
44
|
"use-staging": { type: "boolean", description: "Use staging environment (portal.staging.epilot.cloud)" }
|
|
44
45
|
},
|
|
45
46
|
run: async ({ args }) => {
|
|
46
47
|
const profileName = args.profile || process.env.EPILOT_PROFILE;
|
|
47
48
|
const env = resolveEnvironment(args["use-dev"], args["use-staging"]);
|
|
49
|
+
const readonly = Boolean(args.readonly);
|
|
48
50
|
if (args.token) {
|
|
49
51
|
saveCredentials({ token: args.token }, profileName);
|
|
50
52
|
const suffix = profileName ? ` to profile "${profileName}"` : "";
|
|
@@ -61,7 +63,7 @@ var auth_login_default = defineCommand({
|
|
|
61
63
|
);
|
|
62
64
|
process.exit(1);
|
|
63
65
|
}
|
|
64
|
-
const token = await browserLogin(profileName, env);
|
|
66
|
+
const token = await browserLogin(profileName, env, readonly);
|
|
65
67
|
if (token) {
|
|
66
68
|
process.stdout.write(`${GREEN}${BOLD}Login successful!${RESET}
|
|
67
69
|
`);
|
|
@@ -72,7 +74,7 @@ var auth_login_default = defineCommand({
|
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
|
-
var browserLogin = async (profileName, env = "production") => {
|
|
77
|
+
var browserLogin = async (profileName, env = "production", readonly = false) => {
|
|
76
78
|
const state = randomBytes(32).toString("hex");
|
|
77
79
|
const verificationCode = randomBytes(3).toString("hex").toUpperCase();
|
|
78
80
|
const suffix = profileName ? ` ${DIM}(profile: ${profileName})${RESET}` : "";
|
|
@@ -81,6 +83,12 @@ ${BOLD}epilot CLI Login${RESET}${suffix}
|
|
|
81
83
|
|
|
82
84
|
`);
|
|
83
85
|
process.stdout.write("This will open your browser to authenticate with epilot.\n");
|
|
86
|
+
if (readonly) {
|
|
87
|
+
process.stdout.write(
|
|
88
|
+
`${YELLOW}Read-only mode: the CLI session will not be able to perform write actions.${RESET}
|
|
89
|
+
`
|
|
90
|
+
);
|
|
91
|
+
}
|
|
84
92
|
process.stdout.write("\n");
|
|
85
93
|
process.stdout.write(` ${YELLOW}Verification code: ${BOLD}${verificationCode}${RESET}
|
|
86
94
|
`);
|
|
@@ -117,7 +125,7 @@ ${BOLD}epilot CLI Login${RESET}${suffix}
|
|
|
117
125
|
const port = address.port;
|
|
118
126
|
const callbackUrl = `http://localhost:${port}/callback`;
|
|
119
127
|
const portalUrl = getPortalUrl(env);
|
|
120
|
-
const loginUrl = `${portalUrl}/login?cli_callback=${encodeURIComponent(callbackUrl)}&state=${state}&code=${verificationCode}
|
|
128
|
+
const loginUrl = `${portalUrl}/login?cli_callback=${encodeURIComponent(callbackUrl)}&state=${state}&code=${verificationCode}` + (readonly ? `&readonly=true` : "");
|
|
121
129
|
process.stdout.write(`
|
|
122
130
|
${DIM}Login URL: ${loginUrl}${RESET}
|
|
123
131
|
|
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-B4RIWFEX.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.60",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -27,11 +27,11 @@ var main = defineCommand({
|
|
|
27
27
|
jsonata: { type: "string", description: "JSONata expression" }
|
|
28
28
|
},
|
|
29
29
|
subCommands: {
|
|
30
|
-
auth: () => import("../auth-
|
|
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-NBGAWAHF.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-YDRXPHHU.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.60" : (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-NBGAWAHF.js");
|
|
144
144
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
145
145
|
process.exit(0);
|
|
146
146
|
}
|
|
@@ -713,7 +713,7 @@ var API_LIST = [
|
|
|
713
713
|
kebabName: "file",
|
|
714
714
|
title: "File API",
|
|
715
715
|
serverUrl: "https://file.sls.epilot.io",
|
|
716
|
-
operationCount:
|
|
716
|
+
operationCount: 34,
|
|
717
717
|
operationIds: [
|
|
718
718
|
"uploadFileV2",
|
|
719
719
|
"saveFileV2",
|
|
@@ -726,6 +726,10 @@ var API_LIST = [
|
|
|
726
726
|
"downloadFiles",
|
|
727
727
|
"createZipJob",
|
|
728
728
|
"getZipJob",
|
|
729
|
+
"getFileSummary",
|
|
730
|
+
"createFileSummaryJob",
|
|
731
|
+
"getCurrentFileSummaryJob",
|
|
732
|
+
"getFileSummaryJob",
|
|
729
733
|
"generateFileSummary",
|
|
730
734
|
"previewFile",
|
|
731
735
|
"previewS3FileGet",
|
|
@@ -760,7 +764,7 @@ var API_LIST = [
|
|
|
760
764
|
kebabName: "integration-toolkit",
|
|
761
765
|
title: "Integration Toolkit API",
|
|
762
766
|
serverUrl: "https://integration-toolkit.sls.epilot.io",
|
|
763
|
-
operationCount:
|
|
767
|
+
operationCount: 54,
|
|
764
768
|
operationIds: [
|
|
765
769
|
"acknowledgeTracking",
|
|
766
770
|
"triggerErp",
|
|
@@ -789,6 +793,7 @@ var API_LIST = [
|
|
|
789
793
|
"deleteIntegrationV2",
|
|
790
794
|
"listNotificationHistory",
|
|
791
795
|
"testSendNotification",
|
|
796
|
+
"getNotificationStatus",
|
|
792
797
|
"getSecureProxyWhitelist",
|
|
793
798
|
"updateSecureProxyWhitelist",
|
|
794
799
|
"listSecureProxyWhitelistHistory",
|
|
@@ -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.60";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|