@celigo/api-specs 0.2.103 → 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/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/dist/iclient.yml CHANGED
@@ -321,7 +321,10 @@ paths:
321
321
  Replaces an iClient. All mutable fields must be provided — omitted
322
322
  fields are reset to defaults. Secrets returned as `"******"` can be
323
323
  sent back as-is to keep the existing value, except a Google service
324
- account: every update must include the full JSON key.
324
+ account: every update must include the full JSON key. An Azure
325
+ service principal keeps its stored `clientSecret` or `certificate`
326
+ when the field is omitted — only a new value replaces it, and
327
+ `certificate` is never returned.
325
328
  operationId: updateIClient
326
329
  tags:
327
330
  - iClients
@@ -639,7 +642,7 @@ components:
639
642
  netsuite: NetSuite token-based authentication.
640
643
  amazonmws: Amazon Marketplace Web Service (MWS) authentication.
641
644
  awsIam: AWS IAM cross-account role authentication (assume-role with an external ID).
642
- azureserviceprincipal: Azure AD service principal (client credentials) authentication.
645
+ azureserviceprincipal: Microsoft Entra service principal (client secret or certificate) for Azure Data Lake Storage Gen2, Microsoft SQL Server and Azure Synapse connections
643
646
  googleserviceaccount: Google Cloud service-account key authentication (JSON key file).
644
647
  integrator: Celigo integrator.io internal authentication.
645
648
  salesforce: Salesforce OAuth 2.0 authentication.
@@ -3933,8 +3936,12 @@ components:
3933
3936
  azureserviceprincipal:
3934
3937
  type: object
3935
3938
  description: |-
3936
- Azure AD service principal credentials. Required when `provider`
3937
- is `azureserviceprincipal`.
3939
+ Microsoft Entra (Azure AD) service principal credentials. Required
3940
+ when `provider` is `azureserviceprincipal`. One iClient of this
3941
+ provider can back Azure Data Lake Storage Gen2, Microsoft SQL Server
3942
+ (cloud) and Azure Synapse Analytics connections; the connection forms
3943
+ offer the certificate method from Microsoft SQL Server connections
3944
+ only.
3938
3945
  required:
3939
3946
  - clientId
3940
3947
  - tenantId
@@ -3951,7 +3958,15 @@ components:
3951
3958
  description: |-
3952
3959
  Which credential the service principal presents. Defaults to
3953
3960
  `client-secret` when omitted. Each method rejects the other
3954
- method's credential fields on save.
3961
+ method's credential fields on save. Changing the method on an
3962
+ update replaces the credential: send the new method's credential
3963
+ and drop the old one.
3964
+ x-celigo-ai-guidance:
3965
+ - |-
3966
+ Under authMethod "certificate", a clientSecret is rejected with 422 invalid_field_value
3967
+ on azureserviceprincipal.clientSecret "Client secret is not used when auth method is
3968
+ certificate."; a missing certificate with 422 missing_required_field on
3969
+ azureserviceprincipal.certificate "Expected field: certificate to be present."
3955
3970
  clientId:
3956
3971
  type: string
3957
3972
  description: Azure AD application (client) ID.
@@ -3962,24 +3977,35 @@ components:
3962
3977
  description: |-
3963
3978
  Azure AD client secret. Required when `authMethod` is
3964
3979
  `client-secret` (or omitted). Returned masked as `"******"`.
3965
- Re-send that value on update to keep it; it is not preserved if omitted.
3980
+ On update the stored secret is kept when the field is omitted or
3981
+ re-sent as the mask; only a new value replaces it.
3966
3982
  certificate:
3967
3983
  type: string
3984
+ writeOnly: true
3968
3985
  description: |-
3969
3986
  PEM bundle (certificate + private key) for certificate auth.
3970
3987
  Required when `authMethod` is `certificate`; rejected under
3971
- `client-secret`. Maximum 20 KiB of PEM text. Returned masked.
3988
+ `client-secret`. Maximum 20 KiB of PEM text. Never returned in
3989
+ responses, not even masked. On update the stored PEM is kept when
3990
+ the field is omitted; only a new value replaces it.
3972
3991
  x-celigo-ai-guidance:
3973
3992
  - |-
3974
3993
  If the PEM's private key is encrypted (BEGIN ENCRYPTED PRIVATE
3975
- KEY / Proc-Type 4,ENCRYPTED), certificatePassword is required;
3994
+ KEY / Proc-Type 4,ENCRYPTED), certificatePassword is required
3995
+ (422 invalid_field_value on azureserviceprincipal.certificatePassword "This
3996
+ certificate's private key is encrypted. Enter the client certificate password.");
3976
3997
  if it is unencrypted, sending certificatePassword is rejected.
3998
+ - |-
3999
+ The save does not check that the PEM is a usable credential — a placeholder PEM
4000
+ carrying the BEGIN CERTIFICATE and BEGIN PRIVATE KEY blocks saves (live-verified
4001
+ 201). Enter the real PEM in the iClient editor before testing a connection that
4002
+ uses the iClient.
3977
4003
  certificatePassword:
3978
4004
  type: string
3979
4005
  description: |-
3980
4006
  Passphrase for an encrypted private key inside `certificate`.
3981
4007
  Required exactly when the PEM's key is encrypted; rejected when
3982
- it is not. Maximum 256 bytes. Returned masked.
4008
+ it is not. Maximum 256 bytes. Returned masked when set.
3983
4009
  tenantId:
3984
4010
  type: string
3985
4011
  description: Azure AD tenant (directory) ID.
@@ -4332,10 +4358,13 @@ components:
4332
4358
  For `custom_oauth2`, credentials go in the `oauth2` sub-object.
4333
4359
  Secrets (`clientSecret`, `privateKey`, and so on) come back masked
4334
4360
  as `"******"`. Re-send that mask on update to keep the stored
4335
- secret; omitting it does not. A Google service account is the
4336
- exception: `serviceAccountJSON` is not returned, and every update
4337
- must send the full key — the mask or an omission fails with 422
4338
- `invalid_json_key`.
4361
+ secret; omitting it does not. Two providers differ. A Google
4362
+ service account: `serviceAccountJSON` is not returned, and every
4363
+ update must send the full key — the mask or an omission fails with
4364
+ 422 `invalid_json_key`. An Azure service principal: the stored
4365
+ `clientSecret` or `certificate` is kept when its field is omitted
4366
+ on update, and only a new value replaces it (`certificate` is never
4367
+ returned, not even masked).
4339
4368
  required:
4340
4369
  - provider
4341
4370
  allOf:
@@ -605,7 +605,7 @@ paths:
605
605
  value: New York
606
606
  - key: ZZ
607
607
  error:
608
- message: Key not found
608
+ message: The requested key does not match any entry in the lookup cache. Check the key.
609
609
  '400':
610
610
  $ref: '#/components/responses/400-bad-request'
611
611
  '401':
@@ -1169,7 +1169,7 @@ components:
1169
1169
  type: string
1170
1170
  description: Human-readable explanation of the miss.
1171
1171
  examples:
1172
- - Key not found
1172
+ - The requested key does not match any entry in the lookup cache. Check the key.
1173
1173
  LookupCacheDataReadResponse:
1174
1174
  type: object
1175
1175
  description: |-