@celigo/api-specs 0.2.104 → 0.2.105

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/dist/audit.yml CHANGED
@@ -79,6 +79,7 @@ paths:
79
79
  enum:
80
80
  - accesstoken
81
81
  - agent
82
+ - alert
82
83
  - api
83
84
  - ashare
84
85
  - asynchelper
@@ -116,6 +117,7 @@ paths:
116
117
  x-enumDescriptions:
117
118
  accesstoken: API access token resource.
118
119
  agent: On-premise agent resource.
120
+ alert: Proactive alert resource.
119
121
  api: Custom API endpoint resource.
120
122
  ashare: Workspace user access record (account share) resource.
121
123
  asynchelper: Async helper resource used for long-running operations.
@@ -513,6 +515,7 @@ paths:
513
515
  enum:
514
516
  - accesstoken
515
517
  - agent
518
+ - alert
516
519
  - api
517
520
  - ashare
518
521
  - asynchelper
@@ -547,6 +550,7 @@ paths:
547
550
  x-enumDescriptions:
548
551
  accesstoken: API access token resource.
549
552
  agent: On-premise agent resource.
553
+ alert: Proactive alert resource.
550
554
  api: Custom API endpoint resource.
551
555
  ashare: Workspace user access record (account share) resource.
552
556
  asynchelper: Async helper resource used for long-running operations.
@@ -787,6 +791,7 @@ paths:
787
791
  enum:
788
792
  - accesstokens
789
793
  - agents
794
+ - alerts
790
795
  - apis
791
796
  - asynchelpers
792
797
  - connections
@@ -816,6 +821,7 @@ paths:
816
821
  x-enumDescriptions:
817
822
  accesstokens: API access token resources.
818
823
  agents: On-premise agent resources.
824
+ alerts: Proactive alert resources.
819
825
  apis: Custom API endpoint resources.
820
826
  asynchelpers: Async helper resources.
821
827
  connections: Connection resources.
@@ -1023,6 +1029,7 @@ paths:
1023
1029
  enum:
1024
1030
  - accesstokens
1025
1031
  - agents
1032
+ - alerts
1026
1033
  - apis
1027
1034
  - asynchelpers
1028
1035
  - connections
@@ -1052,6 +1059,7 @@ paths:
1052
1059
  x-enumDescriptions:
1053
1060
  accesstokens: API access token resources.
1054
1061
  agents: On-premise agent resources.
1062
+ alerts: Proactive alert resources.
1055
1063
  apis: Custom API endpoint resources.
1056
1064
  asynchelpers: Async helper resources.
1057
1065
  connections: Connection resources.
@@ -1247,6 +1255,7 @@ paths:
1247
1255
  enum:
1248
1256
  - accesstokens
1249
1257
  - agents
1258
+ - alerts
1250
1259
  - apis
1251
1260
  - asynchelpers
1252
1261
  - connections
@@ -1274,6 +1283,7 @@ paths:
1274
1283
  x-enumDescriptions:
1275
1284
  accesstokens: API access token resources.
1276
1285
  agents: On-premise agent resources.
1286
+ alerts: Proactive alert resources.
1277
1287
  apis: Custom API endpoint resources.
1278
1288
  asynchelpers: Async helper resources.
1279
1289
  connections: Connection resources.
@@ -1437,6 +1447,7 @@ components:
1437
1447
  enum:
1438
1448
  - accesstoken
1439
1449
  - agent
1450
+ - alert
1440
1451
  - api
1441
1452
  - ashare
1442
1453
  - asynchelper
@@ -1473,6 +1484,7 @@ components:
1473
1484
  x-enumDescriptions:
1474
1485
  accesstoken: API access token resource.
1475
1486
  agent: On-premise agent resource.
1487
+ alert: Proactive alert resource.
1476
1488
  api: Custom API endpoint resource.
1477
1489
  ashare: Workspace user access record (account share) resource.
1478
1490
  asynchelper: Async helper resource used for long-running operations.
@@ -1644,6 +1656,7 @@ components:
1644
1656
  enum:
1645
1657
  - accesstoken
1646
1658
  - agent
1659
+ - alert
1647
1660
  - api
1648
1661
  - ashare
1649
1662
  - asynchelper
@@ -1679,6 +1692,7 @@ components:
1679
1692
  x-enumDescriptions:
1680
1693
  accesstoken: API access token resource.
1681
1694
  agent: On-premise agent resource.
1695
+ alert: Proactive alert resource.
1682
1696
  api: Custom API endpoint resource.
1683
1697
  ashare: Workspace user access record (account share) resource.
1684
1698
  asynchelper: Async helper resource used for long-running operations.
@@ -1865,6 +1879,7 @@ components:
1865
1879
  enum:
1866
1880
  - accesstoken
1867
1881
  - agent
1882
+ - alert
1868
1883
  - api
1869
1884
  - ashare
1870
1885
  - asynchelper
@@ -1900,6 +1915,7 @@ components:
1900
1915
  x-enumDescriptions:
1901
1916
  accesstoken: API access token resource.
1902
1917
  agent: On-premise agent resource.
1918
+ alert: Proactive alert resource.
1903
1919
  api: Custom API endpoint resource.
1904
1920
  ashare: Workspace user access record (account share) resource.
1905
1921
  asynchelper: Async helper resource used for long-running operations.
package/dist/flow.yml CHANGED
@@ -892,6 +892,110 @@ paths:
892
892
  $ref: '#/components/responses/404-not-found'
893
893
  '422':
894
894
  $ref: '#/components/responses/422-unprocessable-entity'
895
+ /v1/flows/{_flowId}/runs/stats:
896
+ post:
897
+ x-internal: false
898
+ operationId: getFlowRuntimeChartStats
899
+ tags:
900
+ - Flows
901
+ summary: Get flow runtime chart stats
902
+ description: |-
903
+ Returns historical runtime statistics and chart buckets for a single flow.
904
+ Used by the proactive alerts UI to suggest and preview long-runtime
905
+ thresholds.
906
+
907
+ This is not the job-dashboard aggregate API. Dashboard totals live at
908
+ `POST /v1/flows/runs/stats` (job spec). This path is
909
+ `POST /v1/flows/{_flowId}/runs/stats`.
910
+
911
+ Requires the proactive alerts feature flag and ClickHouse to be enabled for
912
+ the user. When ClickHouse is unavailable, returns
913
+ `{ "clickhouseAvailable": false }`.
914
+
915
+ Time range constraints:
916
+ - `startTime` is required (ISO 8601 UTC)
917
+ - `endTime` defaults to now when omitted
918
+ - Minimum range: 1 hour
919
+ - Maximum range: 90 days
920
+ - Granularity: hourly buckets for ranges ≤ 24h; daily buckets for longer ranges
921
+
922
+ Chart `alertsTriggered` / `totalAlertsTriggered` count completed runs whose
923
+ runtime is **strictly greater than** the threshold used for the query.
924
+ That is a historical chart count, not the number of alert emails sent.
925
+ parameters:
926
+ - name: _flowId
927
+ in: path
928
+ required: true
929
+ description: Flow id.
930
+ schema:
931
+ type: string
932
+ format: objectId
933
+ x-celigo-refModel: flows
934
+ examples:
935
+ - 507f1f77bcf86cd799439011
936
+ requestBody:
937
+ required: true
938
+ content:
939
+ application/json:
940
+ schema:
941
+ $ref: '#/components/schemas/FlowRunsStatsRequest'
942
+ examples:
943
+ default:
944
+ value:
945
+ type: runtimeSummary
946
+ startTime: '2026-05-01T00:00:00.000Z'
947
+ endTime: '2026-06-01T00:00:00.000Z'
948
+ thresholdMinutes: 45
949
+ responses:
950
+ '200':
951
+ description: Runtime summary, empty-state payload, or ClickHouse-unavailable marker.
952
+ content:
953
+ application/json:
954
+ schema:
955
+ $ref: '#/components/schemas/FlowRunsStatsResponse'
956
+ examples:
957
+ summary:
958
+ summary: Runtime summary with chart buckets
959
+ value:
960
+ _flowId: 507f1f77bcf86cd799439011
961
+ startTime: '2026-05-01T00:00:00.000Z'
962
+ endTime: '2026-06-01T00:00:00.000Z'
963
+ granularity: day
964
+ thresholdMinutes: 45
965
+ totalRuns: 120
966
+ totalAlertsTriggered: 8
967
+ emptyState: false
968
+ truncated: false
969
+ statistics:
970
+ suggestedThreshold: 45
971
+ chartEntries:
972
+ - bucket: '2026-05-01'
973
+ totalRuns: 10
974
+ alertsTriggered: 1
975
+ avgRuntimeMinutes: 22.5
976
+ p5RuntimeMinutes: 5
977
+ p95RuntimeMinutes: 60
978
+ emptyState:
979
+ summary: Fewer than 3 completed runs
980
+ value:
981
+ _flowId: 507f1f77bcf86cd799439011
982
+ startTime: '2026-05-01T00:00:00.000Z'
983
+ endTime: '2026-06-01T00:00:00.000Z'
984
+ emptyState: true
985
+ clickhouseUnavailable:
986
+ summary: ClickHouse not available
987
+ value:
988
+ clickhouseAvailable: false
989
+ '400':
990
+ $ref: '#/components/responses/400-bad-request'
991
+ '401':
992
+ $ref: '#/components/responses/401-unauthorized'
993
+ '403':
994
+ $ref: '#/components/responses/403-forbidden'
995
+ '404':
996
+ $ref: '#/components/responses/404-not-found'
997
+ '422':
998
+ $ref: '#/components/responses/422-unprocessable-entity'
895
999
  /v1/flows/{_id}/traceKey:
896
1000
  get:
897
1001
  x-internal: false
@@ -6151,6 +6255,166 @@ components:
6151
6255
  error:
6152
6256
  type: string
6153
6257
  description: Human-readable reason the run was not started.
6258
+ FlowRunsStatsRequest:
6259
+ type: object
6260
+ required:
6261
+ - type
6262
+ - startTime
6263
+ properties:
6264
+ type:
6265
+ type: string
6266
+ description: Request type.
6267
+ enum:
6268
+ - runtimeSummary
6269
+ x-enumDescriptions:
6270
+ runtimeSummary: Historical runtime summary and chart buckets for alert threshold preview.
6271
+ examples:
6272
+ - runtimeSummary
6273
+ startTime:
6274
+ type: string
6275
+ format: date-time
6276
+ description: Start of query window (ISO 8601 UTC). Must not be in the future.
6277
+ examples:
6278
+ - '2026-05-01T00:00:00.000Z'
6279
+ endTime:
6280
+ type: string
6281
+ format: date-time
6282
+ description: End of query window (ISO 8601 UTC). Defaults to now. Must not be in the future.
6283
+ examples:
6284
+ - '2026-06-01T00:00:00.000Z'
6285
+ thresholdMinutes:
6286
+ type: integer
6287
+ minimum: 5
6288
+ maximum: 59940
6289
+ description: |-
6290
+ Optional threshold override in minutes. When omitted, the response uses
6291
+ `statistics.suggestedThreshold` (ceil of p99 runtime, floored at 5).
6292
+ Chart counts use this value with a strict greater-than comparison.
6293
+ examples:
6294
+ - 45
6295
+ FlowRunsStatsResponse:
6296
+ type: object
6297
+ description: |-
6298
+ Runtime statistics response for the proactive alert threshold chart.
6299
+
6300
+ Three shapes are possible:
6301
+ - **Summary** — `emptyState: false` with `statistics`, `chartEntries`, and
6302
+ run totals. Returned when the time range has 3 or more completed runs.
6303
+ - **Empty state** — `{ _flowId, startTime, endTime, emptyState: true }` with
6304
+ no chart data. Returned when the time range has fewer than 3 completed
6305
+ runs.
6306
+ - **ClickHouse unavailable** — only `clickhouseAvailable: false`. Returned
6307
+ when ClickHouse is not enabled for the caller.
6308
+ properties:
6309
+ _flowId:
6310
+ type: string
6311
+ format: objectId
6312
+ x-celigo-refModel: flows
6313
+ description: Echoed flow id.
6314
+ examples:
6315
+ - 507f1f77bcf86cd799439011
6316
+ startTime:
6317
+ type: string
6318
+ format: date-time
6319
+ description: Echoed query start time.
6320
+ examples:
6321
+ - '2026-05-01T00:00:00.000Z'
6322
+ endTime:
6323
+ type: string
6324
+ format: date-time
6325
+ description: Echoed query end time.
6326
+ examples:
6327
+ - '2026-06-01T00:00:00.000Z'
6328
+ granularity:
6329
+ type: string
6330
+ description: Bucket granularity for chart entries. Absent on empty-state and ClickHouse-unavailable responses.
6331
+ enum:
6332
+ - hour
6333
+ - day
6334
+ x-enumDescriptions:
6335
+ hour: Hourly buckets (ranges ≤ 24h).
6336
+ day: Daily buckets (ranges longer than 24h).
6337
+ thresholdMinutes:
6338
+ type: integer
6339
+ description: Threshold used for chart alert-count computation. Absent on empty-state and ClickHouse-unavailable responses.
6340
+ examples:
6341
+ - 45
6342
+ totalRuns:
6343
+ type: integer
6344
+ description: Total completed runs in the time range. Absent on empty-state and ClickHouse-unavailable responses.
6345
+ examples:
6346
+ - 120
6347
+ totalAlertsTriggered:
6348
+ type: integer
6349
+ description: |-
6350
+ Count of completed runs in the window whose runtime is strictly greater
6351
+ than `thresholdMinutes`. Historical chart metric only — not the number
6352
+ of alert emails sent. Absent on empty-state and ClickHouse-unavailable
6353
+ responses.
6354
+ examples:
6355
+ - 8
6356
+ emptyState:
6357
+ type: boolean
6358
+ description: |-
6359
+ `true` when the time range has fewer than 3 completed runs (no chart
6360
+ data). `false` on summary responses. Absent on ClickHouse-unavailable
6361
+ responses.
6362
+ examples:
6363
+ - false
6364
+ truncated:
6365
+ type: boolean
6366
+ description: |-
6367
+ True when totalRuns exceeds 5000. Indicates a high-volume warning; chart
6368
+ data is still complete for the requested time range. Absent on
6369
+ empty-state and ClickHouse-unavailable responses.
6370
+ examples:
6371
+ - false
6372
+ clickhouseAvailable:
6373
+ type: boolean
6374
+ description: |-
6375
+ Present only when ClickHouse is not available for the caller. Value is
6376
+ always `false` when present. Absent on successful summary and
6377
+ empty-state responses.
6378
+ examples:
6379
+ - false
6380
+ statistics:
6381
+ type: object
6382
+ description: |-
6383
+ Present on successful summary responses. Used by the UI for the
6384
+ suggested threshold hint. Absent on empty-state and
6385
+ ClickHouse-unavailable responses.
6386
+ properties:
6387
+ suggestedThreshold:
6388
+ type: integer
6389
+ description: |-
6390
+ Suggested threshold in minutes: ceil of the p99 completed-run
6391
+ runtime in the window, then floored at the platform minimum (5).
6392
+ examples:
6393
+ - 45
6394
+ chartEntries:
6395
+ type: array
6396
+ description: |-
6397
+ Chart data buckets. Present on successful summary responses. Absent on
6398
+ empty-state and ClickHouse-unavailable responses.
6399
+ items:
6400
+ type: object
6401
+ properties:
6402
+ bucket:
6403
+ type: string
6404
+ description: ISO hourly timestamp or YYYY-MM-DD date.
6405
+ examples:
6406
+ - '2026-05-01'
6407
+ totalRuns:
6408
+ type: integer
6409
+ alertsTriggered:
6410
+ type: integer
6411
+ description: Completed runs in this bucket with runtime strictly greater than the query threshold.
6412
+ avgRuntimeMinutes:
6413
+ type: number
6414
+ p5RuntimeMinutes:
6415
+ type: number
6416
+ p95RuntimeMinutes:
6417
+ type: number
6154
6418
  FlowTraceKeyResponse:
6155
6419
  type: array
6156
6420
  description: |-
@@ -8179,5 +8443,18 @@ components:
8179
8443
  errors:
8180
8444
  - code: dependencies_not_deleted
8181
8445
  message: export 6902d88c10b42b2eaac9b2a1 must be deleted before you can delete connection 6398ddf316be761fb16a6523
8446
+ 403-forbidden:
8447
+ description: |
8448
+ Forbidden. The authenticated caller does not have permission to perform this operation.
8449
+ content:
8450
+ application/json:
8451
+ schema:
8452
+ $ref: '#/components/schemas/Error'
8453
+ examples:
8454
+ default:
8455
+ value:
8456
+ errors:
8457
+ - code: forbidden
8458
+ message: You do not have permission to access this resource.
8182
8459
  x-enable-proxy: true
8183
8460
  x-internal: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celigo/api-specs",
3
- "version": "0.2.104",
3
+ "version": "0.2.105",
4
4
  "private": false,
5
5
  "description": "Public OpenAPI bundles (dist/) and the celigo-cli lint schema pack (schemas.json).",
6
6
  "keywords": [
package/schemas.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "provenance": {
3
3
  "repo": "celigo/integrator-api-specs",
4
- "iasCommit": "34353c5a",
5
- "generatedAt": "2026-10-12"
4
+ "iasCommit": "935a10f1",
5
+ "generatedAt": "2026-10-13"
6
6
  },
7
7
  "roots": {
8
8
  "aiagent": 133,