@celigo/api-specs 0.2.149 → 0.2.151

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/ai-agent.yml CHANGED
@@ -5689,19 +5689,27 @@ components:
5689
5689
  properties:
5690
5690
  function:
5691
5691
  type: string
5692
- description: Function to invoke within the referenced script.
5692
+ description: |-
5693
+ Function to invoke: one in the script named by `_scriptId`, or one the code deployed on
5694
+ the stack named by `_stackId` exposes.
5693
5695
  examples:
5694
5696
  - transformRecords
5695
5697
  _scriptId:
5696
5698
  type: string
5697
5699
  format: objectId
5698
5700
  x-celigo-refModel: scripts
5699
- description: Script containing the hook function named in `function`.
5701
+ description: Script containing the hook function named in `function`. Send this or `_stackId`, not both.
5700
5702
  _stackId:
5701
5703
  type: string
5702
5704
  format: objectId
5703
5705
  x-celigo-refModel: stacks
5704
- description: Stack that hosts the hook logic, used instead of a script for stack-based deployments.
5706
+ description: |-
5707
+ Stack that hosts the hook logic, used instead of a script for stack-based deployments.
5708
+ The API doesn't enforce the either/or: a save carrying both `_scriptId` and `_stackId`
5709
+ answers 200 and stores both, and the script and the stack then each list the step as a
5710
+ dependent.
5711
+ x-celigo-ai-guidance:
5712
+ - When moving a hook onto a stack, remove `_scriptId` and set `function` to the stack's function in the same update.
5705
5713
  configuration:
5706
5714
  type:
5707
5715
  - object
package/dist/api.yml CHANGED
@@ -1683,12 +1683,19 @@ paths:
1683
1683
 
1684
1684
  The response carries a `metadata` map keyed by step id (each value is the ordered list of
1685
1685
  stage names that ran for that step), the parent `flowJob`, and the per-step `childJobs[]`.
1686
- Inspect a specific step's stages with `GET /v1/apis/{_id}/test/run/{runId}/{_stepId}`, where
1687
- `runId` is the parent `flowJob._id`.
1686
+ The response the run selected appears in `metadata` too, keyed by its `id` (`success`,
1687
+ `fail`, or a custom response's `id`). Inspect a specific step's stages with
1688
+ `GET /v1/apis/{_id}/test/run/{runId}/{_stepId}`, where `runId` is the parent `flowJob._id`.
1688
1689
 
1689
1690
  Test-run invocations do **not** surface in `GET /v1/apis/{_id}/logs`.
1690
1691
 
1691
- A test run is not free of outside calls: lookups call their sources live. Imports never
1692
+ A test run is not free of outside calls: a lookup export with no saved `mockOutput` calls
1693
+ its source live, and the run then saves that response on the export as its `mockOutput`
1694
+ (the export's `lastModified` changes). Every later test run that uses the export, from any
1695
+ API or Tool and whatever its request, answers that lookup from the saved `mockOutput`
1696
+ instead of calling the source: the lookup's `request` stage shows the request rendered
1697
+ from the new record, and its `response` stage holds the saved records. Remove `mockOutput`
1698
+ from the export to call the source again. Real calls to the API don't read it. Imports never
1692
1699
  send; each returns its saved `mockResponse`, or a placeholder response when none is saved
1693
1700
  (see `mockResponse` on imports).
1694
1701
 
@@ -1748,10 +1755,10 @@ paths:
1748
1755
  summary: Run without test input (the first step gets an empty record)
1749
1756
  value: {}
1750
1757
  withMockRequest:
1751
- summary: Run with an explicit test request
1758
+ summary: Run with an explicit test request (only the body reaches the first step)
1752
1759
  value:
1753
1760
  mockRequest:
1754
- queryParams:
1761
+ body:
1755
1762
  sku: SKU-001
1756
1763
  responses:
1757
1764
  '200':
@@ -1765,7 +1772,8 @@ paths:
1765
1772
  type: object
1766
1773
  description: |-
1767
1774
  Map keyed by step id; each value is the ordered list of stage names that ran for
1768
- that step.
1775
+ that step. The selected response is one of the keys (`success`, `fail`, or a
1776
+ custom response's `id`), so it names the response the run returned.
1769
1777
  additionalProperties:
1770
1778
  type: array
1771
1779
  items:
@@ -1787,6 +1795,11 @@ paths:
1787
1795
  - parse
1788
1796
  main:
1789
1797
  - router
1798
+ apiRouter:
1799
+ - router
1800
+ success:
1801
+ - mapping
1802
+ - response
1790
1803
  flowJob:
1791
1804
  _id: 6a2e23bbcf5b64ca6b93b757
1792
1805
  type: flow
@@ -2793,8 +2806,9 @@ components:
2793
2806
  type: object
2794
2807
  description: |-
2795
2808
  Sample request saved with the API for testing. `POST /v1/apis/{_id}/test/run` doesn't
2796
- read it; send it as that call's `mockRequest`. A test run still makes outside calls:
2797
- its lookups call their sources live.
2809
+ read it; send it as that call's `mockRequest`. A test run still makes outside calls: a
2810
+ lookup with no saved `mockOutput` calls its source live, and the run saves that response
2811
+ as the lookup's `mockOutput`, which later test runs answer from.
2798
2812
  properties:
2799
2813
  body:
2800
2814
  type: object
@@ -2813,9 +2827,10 @@ components:
2813
2827
  - |-
2814
2828
  Saving a mockRequest doesn't make test runs use it: a test run without its own
2815
2829
  mockRequest starts from an empty record. A test run isn't free of outside calls
2816
- either: lookups run live, and only imports are kept from sending (each returns its
2817
- mockResponse or a placeholder). Can include body, headers, pathParams, and
2818
- queryParams.
2830
+ either: a lookup without a saved mockOutput runs live (and the run then saves its
2831
+ response as that mockOutput), and only imports are kept from sending (each returns
2832
+ its mockResponse or a placeholder). Can include body, headers, pathParams, and
2833
+ queryParams; only the body reaches the record the steps see.
2819
2834
  transform:
2820
2835
  type: object
2821
2836
  description: |-
@@ -3269,17 +3284,19 @@ components:
3269
3284
  - fail
3270
3285
  - custom
3271
3286
  x-enumDescriptions:
3272
- success: Default response returned when the API operation completes successfully.
3273
- fail: Default response returned when the API operation encounters an error.
3274
- custom: Additional response for specific scenarios, routed via the response router.
3275
- description: Response type.
3287
+ success: The happy-path response; returned when it's the first response, in list order, whose `inputFilter` matches.
3288
+ fail: The error response; returned when a step fails and that step's `proceedOnFailure` is off.
3289
+ custom: Additional response for specific scenarios, selected by its own `inputFilter`.
3290
+ description: |-
3291
+ Response type. `success` isn't a fallback checked after the `custom` responses: list
3292
+ `custom` responses before it (see `inputFilter`).
3276
3293
  examples:
3277
3294
  - success
3278
3295
  x-celigo-ai-guidance:
3279
3296
  - |-
3280
- - **success**: Default response for successful operations (required, exactly one)
3281
- - **fail**: Default response for errors (required, exactly one)
3282
- - **custom**: Additional responses for specific scenarios (optional, multiple allowed)
3297
+ - **success**: Response for successful operations (required, exactly one)
3298
+ - **fail**: Response for errors (required, exactly one)
3299
+ - **custom**: Additional responses for specific scenarios (optional, multiple allowed), listed before `success`
3283
3300
  statusCode:
3284
3301
  type: integer
3285
3302
  minimum: 100
@@ -3320,7 +3337,13 @@ components:
3320
3337
  - Content type of the response body
3321
3338
  inputFilter:
3322
3339
  type: object
3323
- description: Filter criteria for response selection by the response router.
3340
+ description: |-
3341
+ Filter criteria for response selection by the response router, which returns the first
3342
+ response in `responses` whose filter matches. A response without an `inputFilter` matches
3343
+ every request, so a `success` listed first answers requests a later `custom` filter
3344
+ matches; the typed `context.success` filter doesn't prevent that, because
3345
+ `context.success` is true whenever no step failed, including when a lookup found nothing.
3346
+ A step that fails with `proceedOnFailure` off selects the `fail` response.
3324
3347
  properties:
3325
3348
  version:
3326
3349
  type: string
@@ -3334,19 +3357,20 @@ components:
3334
3357
  description: Celigo expression-based filter rules.
3335
3358
  items: {}
3336
3359
  examples:
3337
- - - equals
3338
- - - boolean
3339
- - - context
3340
- - success
3341
- - true
3360
+ - - empty
3361
+ - - string
3362
+ - - extract
3363
+ - customerId
3342
3364
  - - and
3343
- - - equals
3344
- - - get
3345
- - statusCode
3346
- - 200
3347
- - - exists
3348
- - - get
3349
- - data
3365
+ - - notempty
3366
+ - - string
3367
+ - - extract
3368
+ - orderId
3369
+ - - greaterthan
3370
+ - - number
3371
+ - - extract
3372
+ - amount
3373
+ - 1000
3350
3374
  x-celigo-ai-guidance:
3351
3375
  - |-
3352
3376
  Array-based DSL where the first element is an operator (e.g., "equals", "and", "or"),
@@ -3552,6 +3576,9 @@ components:
3552
3576
  - Exactly one 'success' response (for successful operations)
3553
3577
  - Exactly one 'fail' response (for errors)
3554
3578
  - Zero or more 'custom' responses (for specific scenarios)
3579
+ The response router returns the first response whose `inputFilter` matches, and a
3580
+ response without one matches every request, so list the 'custom' responses ahead of
3581
+ 'success'.
3555
3582
  Builder:
3556
3583
  type: object
3557
3584
  description: Builder-mode configuration defining request structure, routing, and response mapping.
@@ -3573,13 +3600,16 @@ components:
3573
3600
  type: array
3574
3601
  description: |-
3575
3602
  Response configurations. Must include exactly one `success` and one `fail`
3576
- response; additional `custom` responses are optional.
3603
+ response; additional `custom` responses are optional. Order matters: the response
3604
+ router returns the first response whose `inputFilter` matches, and a response without
3605
+ one matches every request.
3577
3606
  items:
3578
3607
  $ref: '#/components/schemas/ApiResponse'
3579
3608
  x-celigo-ai-guidance:
3580
3609
  - |-
3581
3610
  Must include exactly one 'success' response and one 'fail' response.
3582
- Additional custom responses can be added for specific scenarios.
3611
+ Additional custom responses can be added for specific scenarios; list them before
3612
+ 'success', which otherwise answers the requests their filters match.
3583
3613
  x-celigo-ai-guidance:
3584
3614
  - |-
3585
3615
  The builder mode allows you to define your API using visual configuration:
@@ -6336,7 +6366,12 @@ components:
6336
6366
  type: boolean
6337
6367
  description: |
6338
6368
  When true, uses iClient-managed OAuth credentials (clientId/clientSecret)
6339
- instead of the values in this configuration.
6369
+ instead of the values in this configuration. The iClient is the connection's
6370
+ `_iClientId` — on an HTTP connection `http._iClientId`, beside `auth`, not inside it —
6371
+ and it also supplies the grant type and the authorization and token endpoints, so a
6372
+ create needs only `auth.type: "oauth"`, `auth.oauth.useIClientFields: true` and the
6373
+ iClient id. The connection holds no tokens until a person completes the authorization
6374
+ in a browser.
6340
6375
  oauth1:
6341
6376
  type: object
6342
6377
  description: |-
@@ -6465,7 +6500,7 @@ components:
6465
6500
  x-celigo-ai-guidance:
6466
6501
  - |-
6467
6502
  ## OAUTH 2.0 GRANT TYPES
6468
- - "authorizationcode" — Authorization Code flow (browser-based user consent).
6503
+ - "authorizecode" — Authorization Code flow (browser-based user consent).
6469
6504
  Requires authURI, tokenURI, and user authorization via browser.
6470
6505
  - "clientcredentials" — Client Credentials flow (server-to-server, no user).
6471
6506
  Requires tokenURI, clientId, clientSecret.
@@ -7056,7 +7091,11 @@ components:
7056
7091
  description: |
7057
7092
  The API key or bearer token value (encrypted at rest); returned masked as `"******"`.
7058
7093
  On update, the mask sent back keeps the stored token; a new value replaces it.
7059
- Required unless automatic token refresh is configured.
7094
+ Required unless automatic token refresh is configured: a token block without a
7095
+ token must carry a `refreshMethod`, so a create or update that sends neither fails
7096
+ with 422 `Expected field: refreshMethod to be present.` To create a static-token
7097
+ connection before the real token is available, send a placeholder value and
7098
+ replace it later.
7060
7099
  examples:
7061
7100
  - my-api-token-EXAMPLE
7062
7101
  location:
@@ -9262,7 +9301,11 @@ components:
9262
9301
  description: |
9263
9302
  The API key or bearer token value (encrypted at rest); returned masked as `"******"`.
9264
9303
  On update, the mask sent back keeps the stored token; a new value replaces it.
9265
- Required unless automatic token refresh is configured.
9304
+ Required unless automatic token refresh is configured: a token block without a
9305
+ token must carry a `refreshMethod`, so a create or update that sends neither fails
9306
+ with 422 `Expected field: refreshMethod to be present.` To create a static-token
9307
+ connection before the real token is available, send a placeholder value and
9308
+ replace it later.
9266
9309
  examples:
9267
9310
  - my-api-token-EXAMPLE
9268
9311
  location:
@@ -5196,7 +5196,12 @@ components:
5196
5196
  type: boolean
5197
5197
  description: |
5198
5198
  When true, uses iClient-managed OAuth credentials (clientId/clientSecret)
5199
- instead of the values in this configuration.
5199
+ instead of the values in this configuration. The iClient is the connection's
5200
+ `_iClientId` — on an HTTP connection `http._iClientId`, beside `auth`, not inside it —
5201
+ and it also supplies the grant type and the authorization and token endpoints, so a
5202
+ create needs only `auth.type: "oauth"`, `auth.oauth.useIClientFields: true` and the
5203
+ iClient id. The connection holds no tokens until a person completes the authorization
5204
+ in a browser.
5200
5205
  oauth1:
5201
5206
  type: object
5202
5207
  description: |-
@@ -5325,7 +5330,7 @@ components:
5325
5330
  x-celigo-ai-guidance:
5326
5331
  - |-
5327
5332
  ## OAUTH 2.0 GRANT TYPES
5328
- - "authorizationcode" — Authorization Code flow (browser-based user consent).
5333
+ - "authorizecode" — Authorization Code flow (browser-based user consent).
5329
5334
  Requires authURI, tokenURI, and user authorization via browser.
5330
5335
  - "clientcredentials" — Client Credentials flow (server-to-server, no user).
5331
5336
  Requires tokenURI, clientId, clientSecret.
@@ -5916,7 +5921,11 @@ components:
5916
5921
  description: |
5917
5922
  The API key or bearer token value (encrypted at rest); returned masked as `"******"`.
5918
5923
  On update, the mask sent back keeps the stored token; a new value replaces it.
5919
- Required unless automatic token refresh is configured.
5924
+ Required unless automatic token refresh is configured: a token block without a
5925
+ token must carry a `refreshMethod`, so a create or update that sends neither fails
5926
+ with 422 `Expected field: refreshMethod to be present.` To create a static-token
5927
+ connection before the real token is available, send a placeholder value and
5928
+ replace it later.
5920
5929
  examples:
5921
5930
  - my-api-token-EXAMPLE
5922
5931
  location:
@@ -8122,7 +8131,11 @@ components:
8122
8131
  description: |
8123
8132
  The API key or bearer token value (encrypted at rest); returned masked as `"******"`.
8124
8133
  On update, the mask sent back keeps the stored token; a new value replaces it.
8125
- Required unless automatic token refresh is configured.
8134
+ Required unless automatic token refresh is configured: a token block without a
8135
+ token must carry a `refreshMethod`, so a create or update that sends neither fails
8136
+ with 422 `Expected field: refreshMethod to be present.` To create a static-token
8137
+ connection before the real token is available, send a placeholder value and
8138
+ replace it later.
8126
8139
  examples:
8127
8140
  - my-api-token-EXAMPLE
8128
8141
  location:
package/dist/enduser.yml CHANGED
@@ -3308,7 +3308,12 @@ components:
3308
3308
  type: boolean
3309
3309
  description: |
3310
3310
  When true, uses iClient-managed OAuth credentials (clientId/clientSecret)
3311
- instead of the values in this configuration.
3311
+ instead of the values in this configuration. The iClient is the connection's
3312
+ `_iClientId` — on an HTTP connection `http._iClientId`, beside `auth`, not inside it —
3313
+ and it also supplies the grant type and the authorization and token endpoints, so a
3314
+ create needs only `auth.type: "oauth"`, `auth.oauth.useIClientFields: true` and the
3315
+ iClient id. The connection holds no tokens until a person completes the authorization
3316
+ in a browser.
3312
3317
  oauth1:
3313
3318
  type: object
3314
3319
  description: |-
@@ -3437,7 +3442,7 @@ components:
3437
3442
  x-celigo-ai-guidance:
3438
3443
  - |-
3439
3444
  ## OAUTH 2.0 GRANT TYPES
3440
- - "authorizationcode" — Authorization Code flow (browser-based user consent).
3445
+ - "authorizecode" — Authorization Code flow (browser-based user consent).
3441
3446
  Requires authURI, tokenURI, and user authorization via browser.
3442
3447
  - "clientcredentials" — Client Credentials flow (server-to-server, no user).
3443
3448
  Requires tokenURI, clientId, clientSecret.
@@ -4028,7 +4033,11 @@ components:
4028
4033
  description: |
4029
4034
  The API key or bearer token value (encrypted at rest); returned masked as `"******"`.
4030
4035
  On update, the mask sent back keeps the stored token; a new value replaces it.
4031
- Required unless automatic token refresh is configured.
4036
+ Required unless automatic token refresh is configured: a token block without a
4037
+ token must carry a `refreshMethod`, so a create or update that sends neither fails
4038
+ with 422 `Expected field: refreshMethod to be present.` To create a static-token
4039
+ connection before the real token is available, send a placeholder value and
4040
+ replace it later.
4032
4041
  examples:
4033
4042
  - my-api-token-EXAMPLE
4034
4043
  location:
@@ -6234,7 +6243,11 @@ components:
6234
6243
  description: |
6235
6244
  The API key or bearer token value (encrypted at rest); returned masked as `"******"`.
6236
6245
  On update, the mask sent back keeps the stored token; a new value replaces it.
6237
- Required unless automatic token refresh is configured.
6246
+ Required unless automatic token refresh is configured: a token block without a
6247
+ token must carry a `refreshMethod`, so a create or update that sends neither fails
6248
+ with 422 `Expected field: refreshMethod to be present.` To create a static-token
6249
+ connection before the real token is available, send a placeholder value and
6250
+ replace it later.
6238
6251
  examples:
6239
6252
  - my-api-token-EXAMPLE
6240
6253
  location: