@celigo/api-specs 0.2.104 → 0.2.106

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/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.106",
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": "2ab2e845",
5
+ "generatedAt": "2026-10-13"
6
6
  },
7
7
  "roots": {
8
8
  "aiagent": 133,