@celigo/api-specs 0.2.1 → 0.2.2-IO-168454-EPIC-fb

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.
Files changed (44) hide show
  1. package/README.md +71 -80
  2. package/dist/account.yml +201 -3
  3. package/dist/agent.yml +7 -0
  4. package/dist/ai-agent.yml +627 -135
  5. package/dist/api.yml +5953 -127
  6. package/dist/apim.yml +0 -4
  7. package/dist/asynchelper.yml +117 -22
  8. package/dist/audit.yml +41 -2
  9. package/dist/bartendertemplate.yml +508 -0
  10. package/dist/connection.yml +1166 -125
  11. package/dist/ediprofile.yml +7 -0
  12. package/dist/editransaction.yml +250 -14
  13. package/dist/enduser.yml +5778 -35
  14. package/dist/export.yml +1028 -983
  15. package/dist/filedefinition.yml +37 -0
  16. package/dist/filedefinitionrules.yml +722 -0
  17. package/dist/fileserver.yml +1316 -0
  18. package/dist/filestorage.yml +712 -330
  19. package/dist/flow.yml +169 -63
  20. package/dist/guardrail.yml +280 -489
  21. package/dist/httpconnectorendpoint.yml +602 -126
  22. package/dist/httpconnectorresource.yml +1160 -84
  23. package/dist/iclient.yml +131 -76
  24. package/dist/import.yml +1937 -236
  25. package/dist/integration.yml +1024 -42
  26. package/dist/job.yml +180 -92
  27. package/dist/lookupcache.yml +7 -0
  28. package/dist/marketplace.yml +285 -105
  29. package/dist/mcp-server.yml +6745 -68
  30. package/dist/notification.yml +33 -8
  31. package/dist/processor.yml +8 -3
  32. package/dist/recyclebin.yml +32 -2
  33. package/dist/script.yml +7 -0
  34. package/dist/stack.yml +642 -5
  35. package/dist/storagequery.yml +865 -0
  36. package/dist/subscription.yml +254 -58
  37. package/dist/sync.yml +383 -72
  38. package/dist/template.yml +39 -1
  39. package/dist/tool.yml +6099 -2242
  40. package/dist/topic.yml +1783 -0
  41. package/dist/tradingpartnerconnector.yml +10 -0
  42. package/dist/user.yml +238 -32
  43. package/package.json +13 -1
  44. package/schemas.json +2346 -1885
package/dist/import.yml CHANGED
@@ -113,6 +113,14 @@ paths:
113
113
  - POST
114
114
  requestMediaType: json
115
115
  successMediaType: json
116
+ topic_publisher:
117
+ summary: Event Streams publisher to a topic (no connection)
118
+ value:
119
+ name: Publish Order Events
120
+ adaptorType: TopicImport
121
+ topic:
122
+ _topicId: 6ab1f48d38d7733b4599875c
123
+ batchSize: 1000
116
124
  responses:
117
125
  '201':
118
126
  description: Import created successfully
@@ -139,6 +147,18 @@ paths:
139
147
  apiIdentifier: if0626b560
140
148
  createdAt: '2026-06-09T17:32:41.218Z'
141
149
  lastModified: '2026-06-09T17:32:41.296Z'
150
+ topic_publisher:
151
+ summary: Created Event Streams publisher — batchSize default filled in
152
+ value:
153
+ _id: 6ab1f58171fc8127d374d4a5
154
+ name: Publish Order Events
155
+ adaptorType: TopicImport
156
+ topic:
157
+ _topicId: 6ab1f48d38d7733b4599875c
158
+ batchSize: 1000
159
+ apiIdentifier: id6e6429c9
160
+ createdAt: '2026-09-22T03:26:57.989Z'
161
+ lastModified: '2026-09-22T03:26:58.155Z'
142
162
  '400':
143
163
  $ref: '#/components/responses/400-bad-request'
144
164
  '401':
@@ -1560,7 +1580,9 @@ components:
1560
1580
  type: object
1561
1581
  description: |-
1562
1582
  Configuration for HTTP imports.
1563
- Required whenever the connection referenced by _connectionId has type http.
1583
+ Required whenever the connection referenced by _connectionId has type http, and on
1584
+ `NetSuiteHTTPImport` (NetSuite's REST APIs on a `netsuite` connection, where `nsDomainType`
1585
+ supplies the host).
1564
1586
  x-celigo-ai-guidance:
1565
1587
  - |-
1566
1588
  IMPORTANT:
@@ -1568,6 +1590,11 @@ components:
1568
1590
  this object MUST be populated for the import to function properly.
1569
1591
  This is a required configuration for all HTTP based imports,
1570
1592
  as determined by the connection associated with the import.
1593
+ - |-
1594
+ A `NetSuiteHTTPImport` uses this same object on a netsuite connection: each `relativeURI`
1595
+ entry carries the full path from `/services/rest/record/v1/<type>` (SuiteTalk) or
1596
+ `/app/site/hosting/restlet.nl?script=<id>&deploy=<n>` (custom RESTlet); the host and the
1597
+ token signature come from the connection.
1571
1598
  properties:
1572
1599
  sendPostMappedData:
1573
1600
  type: boolean
@@ -1578,7 +1605,17 @@ components:
1578
1605
  description: Internal flag indicating the import was built with the legacy REST form rather than the unified HTTP framework. Set by the form; not configured directly.
1579
1606
  strictHandlebarEvaluation:
1580
1607
  type: boolean
1581
- description: When true, handlebars expressions that reference a missing field raise an error instead of rendering an empty string, surfacing mapping mistakes early rather than sending blank values.
1608
+ description: Intended to make handlebars expressions that reference a missing field raise an error instead of rendering an empty string. In live runs on an HTTP import it does not have that effect on `http.body` templates or mapping expressions — an undefined path still renders empty and the record succeeds with the flag true — and `relativeURI` / `headers[].value` templates already fail on an undefined path regardless of this flag. Not a safeguard against a wrong template root or a misspelled path.
1609
+ x-celigo-ai-guidance:
1610
+ - |-
1611
+ Do not rely on this flag to catch a mis-rooted or misspelled path. Live-verified
1612
+ 2026-09-24 on an HTTP import in real flow runs with the flag ``true``: an undefined
1613
+ ``{{record.<field>}}`` in ``http.body`` and an undefined ``{{<field>}}`` in a mapping
1614
+ expression both rendered empty and the record succeeded — the same outcome as with
1615
+ the flag ``false`` or unset. Relative URI and header templates fail on an undefined
1616
+ path regardless of this flag. To catch a wrong root, check the template against the
1617
+ record's shape (``record`` for an object, ``rows`` for a grouped record,
1618
+ ``batch_of_records`` when ``batchSize`` exceeds 1) before saving.
1582
1619
  formType:
1583
1620
  type: string
1584
1621
  enum:
@@ -1654,14 +1691,30 @@ components:
1654
1691
  - xml
1655
1692
  _httpConnectorEndpointIds:
1656
1693
  type: array
1657
- readOnly: true
1658
1694
  items:
1659
1695
  type: string
1660
1696
  format: objectId
1661
1697
  x-celigo-refModel: httpconnectorendpoints
1662
1698
  description: |-
1663
- HTTP connector endpoint IDs used by this import (multiple endpoints for different request
1664
- types or operations). Set by the connector framework; client-supplied values are ignored.
1699
+ The connector endpoints this import calls, one per entry of `relativeURI` / `method` (for
1700
+ example a CREATE and an UPDATE endpoint), shown in the UI as the selected endpoints. On save the
1701
+ platform derives them (with the version and resource ids) from each `relativeURI` / `method`
1702
+ pair that matches an endpoint of the connector the connection is bound to, and replaces ids
1703
+ that belong to another connector; ids for the connection's own connector are kept as sent, and
1704
+ when nothing matches, or the connection has no connector, whatever was sent is kept.
1705
+ x-celigo-ai-guidance:
1706
+ - |-
1707
+ To build an import on a prebuilt connector, bind the CONNECTION (`http._httpConnectorId`) and
1708
+ write each operation's `relativeURI` and `method` into the positional arrays; the platform links
1709
+ the import to those endpoints on save, so the pointer fields may be omitted. Read the saved
1710
+ import back: missing entries mean a URI matched no endpoint of the connection's connector. Set
1711
+ `_httpConnectorVersionId`, `_httpConnectorResourceId` and `_httpConnectorEndpointIds` together
1712
+ only to pin same-connector endpoints the URIs would not match. Imports use this plural field;
1713
+ the singular `_httpConnectorEndpointId` is dropped on write. Endpoint discovery through the
1714
+ published operations: `GET /v1/httpconnectors/{_id}`, `…/{_id}/httpconnectorresources`,
1715
+ `…/{_id}/{_httpConnectorResourceId}/httpconnectorendpoints`, and
1716
+ `…/{_id}/{_httpConnectorResourceId}/{_id}` for an endpoint's `method` and `relativeURI`.
1717
+ Verified against the live API 2026-09-21.
1665
1718
  blobFormat:
1666
1719
  type: string
1667
1720
  enum:
@@ -1691,8 +1744,17 @@ components:
1691
1744
  description: |-
1692
1745
  Maximum number of records submitted per HTTP request, which affects throughput and API rate limiting.
1693
1746
  REST services typically send one record per request; raise it only for batch endpoints or RPC/XML services that accept multiple records, consulting the target API documentation for the optimal value.
1747
+ Above 1, the body, relative URI, and header templates render once per request against `batch_of_records` — each entry carrying that record as `record` (or `rows` for a grouped record) — and a root-level `record` or `rows` is undefined.
1694
1748
 
1695
1749
  The default varies by API.
1750
+ x-celigo-ai-guidance:
1751
+ - |-
1752
+ A batched import's templates iterate ``{{#each batch_of_records}}`` and address
1753
+ ``this.record.<field>`` (``this.rows.0.<field>`` for grouped records), or iterate
1754
+ the bare records as ``{{#each data}}``; a ``{{record.<field>}}`` left at the root
1755
+ renders empty in the body and fails the request in a relative URI or header. With
1756
+ the default batch size the shape root is ``record`` / ``rows``, ``data`` holds that
1757
+ one record, and ``batch_of_records`` is undefined.
1696
1758
  examples:
1697
1759
  - 1
1698
1760
  - 10
@@ -1787,6 +1849,7 @@ components:
1787
1849
  For composite (upsert) imports, the array is positionally aligned with method and requestType, and existingExtract decides the index used at runtime: the UPDATE index when its field has a value, the CREATE index when it is empty or missing.
1788
1850
  Reference the existing record ID in the UPDATE URI with `{{{data.0.fieldName}}}` (triple braces with the data.0 prefix).
1789
1851
  Use separate array elements per operation rather than `{{#if}}` conditionals inside a single URI.
1852
+ URI templates render strictly: a path that is undefined on the record — such as `record.<field>` on a grouped record, whose root is `rows` — fails the request instead of rendering empty.
1790
1853
  x-celigo-ai-guidance:
1791
1854
  - '**CRITICAL: This MUST be an array of strings, NOT an object.**'
1792
1855
  - |-
@@ -1850,17 +1913,17 @@ components:
1850
1913
  // shape; do not emit it deliberately.
1851
1914
  "relativeURI": ["[\"/customers/{{{data.0.id}}}\",\"/customers\"]"]
1852
1915
  ```
1853
- ⚠️ The platform performs a URI-vs-pointer-metadata cross-check
1854
- on save: when the persisted ``relativeURI`` doesn't match the
1855
- endpoint blueprint the connector pointer fields
1856
- (``_httpConnectorId`` / ``_httpConnectorVersionId`` /
1857
- ``_httpConnectorResourceId`` / ``_httpConnectorEndpointId(s)``)
1858
- are SILENTLY UNSET so they stay in sync with future user edits.
1859
- Any malformed URI shape (stringified, wrong nesting, etc.)
1860
- therefore breaks the marketplace audit link, the UI's
1861
- assistant-view selector, and mid-build schema introspection —
1862
- the import will work at runtime but loses every "this is a
1863
- Pipedrive Persons resource" signal. Get the URI shape right.
1916
+ ⚠️ On save the platform derives the connector pointer fields
1917
+ (``_httpConnectorVersionId`` / ``_httpConnectorResourceId`` /
1918
+ ``_httpConnectorEndpointIds``) from each ``relativeURI`` /
1919
+ ``method`` pair that matches an endpoint of the connector the
1920
+ connection is bound to (path parameters and query strings still
1921
+ match); pointers you send for that connector are kept, pointers
1922
+ from another connector are replaced, and a URI that matches
1923
+ nothing leaves whatever you sent in place — nothing is unset
1924
+ (verified 2026-09-21 on create, on PUT, and after a re-save). Keep
1925
+ each entry equal to the endpoint you mean so the pointer and the
1926
+ request agree. Get the URI shape right.
1864
1927
  examples:
1865
1928
  - - /api/v1/customers
1866
1929
  - - /customers/{{{data.0.shopifyCustomerId}}}.json
@@ -1896,19 +1959,27 @@ components:
1896
1959
  _httpConnectorVersionId:
1897
1960
  type: string
1898
1961
  format: objectId
1899
- readOnly: true
1900
- description: HTTP connector version used by this import. Set by the connector framework; client-supplied values are ignored (write-tested).
1962
+ description: |-
1963
+ Pins the import to a version of the published HTTP connector its connection is bound to
1964
+ (`connection.http._httpConnectorId`), so the UI renders that connector's endpoint forms instead
1965
+ of hand-authored requests. Linked on save together with `_httpConnectorResourceId` and
1966
+ `_httpConnectorEndpointIds` — see that field for the rule.
1901
1967
  _httpConnectorResourceId:
1902
1968
  type: string
1903
1969
  format: objectId
1904
- readOnly: true
1905
- description: HTTP connector resource used by this import. Set by the connector framework; client-supplied values are ignored (write-tested).
1970
+ x-celigo-refModel: httpconnectorresources
1971
+ description: |-
1972
+ The connector resource (a group of related endpoints, such as Orders) that this import's
1973
+ endpoints belong to. Linked on save together with `_httpConnectorEndpointIds` — see that field
1974
+ for the rule.
1906
1975
  _httpConnectorEndpointId:
1907
1976
  type: string
1908
1977
  format: objectId
1909
1978
  readOnly: true
1910
1979
  x-celigo-refModel: httpconnectorendpoints
1911
- description: HTTP connector endpoint used by this import (single endpoint). Set by the connector framework; client-supplied values are ignored (write-tested).
1980
+ description: |-
1981
+ Not used by imports: values sent on create or update are dropped, and the platform does not
1982
+ populate it. Imports bind connector endpoints per operation through `_httpConnectorEndpointIds`.
1912
1983
  body:
1913
1984
  type: array
1914
1985
  items:
@@ -1918,7 +1989,9 @@ components:
1918
1989
  description: |-
1919
1990
  Request body template for the import — an array of Handlebars template strings
1920
1991
  positionally aligned with the `method` array (e.g. `["{{{record}}}"]`). A `null`
1921
- entry means no template for the method at that position.
1992
+ entry means no template for the method at that position. Each entry is a string:
1993
+ write a JSON body as a template string (`["{\"id\": \"{{record.id}}\"}"]`), not as
1994
+ a JSON object, because an object entry does not render as JSON at runtime.
1922
1995
  Leave undefined for standard imports — the Import's mapping step transforms the source record and the mapped data is sent as the request body automatically.
1923
1996
  Set it only when the target API requires XML, SOAP, or a custom structure that mappings cannot produce, or when the user explicitly specifies a request body.
1924
1997
  When set, the mapping step still runs first and the template renders against the post-mapped record — use `{{record.<mappedField>}}` to reference mapping outputs.
@@ -1946,6 +2019,23 @@ components:
1946
2019
  Avoid bare ``{{{jsonSerialize record}}}`` with no wrapper — leave the field undefined instead.
1947
2020
  Also avoid wrapping a single post-mapped scalar field in ``jsonSerialize`` (e.g.
1948
2021
  ``{{{jsonSerialize record.<scalar>}}}``) — that pattern is brittle.
2022
+ - |-
2023
+ Every request context carries two data roots: ``data`` — the list of records in
2024
+ the request, always present (Pattern B) — and ONE shape-specific root that follows
2025
+ the record entering the step. An object record is ``record``; a GROUPED record (an
2026
+ array of rows — a ``groupByFields`` export, file key columns, a NetSuite grouped
2027
+ saved search) is ``rows`` (``{{rows.0.<field>}}``, ``{{#each rows}}``,
2028
+ ``{{{jsonSerialize rows}}}``) and ``record.*`` is undefined on it; when
2029
+ ``batchSize`` exceeds 1 the shape root is ``batch_of_records`` and neither ``record``
2030
+ nor ``rows`` exists at the top level. Inside ``data`` a grouped record is itself an
2031
+ array element (``{{#each data}}{{#each this}}…{{/each}}{{/each}}``). An object record
2032
+ that carries its own ``rows`` field is still ``record`` — ``{{#each record.rows}}``.
2033
+ Here an undefined path renders empty — and ``strictHandlebarEvaluation: true`` does
2034
+ not change that (live-verified 2026-09-24 in real flow runs: an undefined
2035
+ ``{{record.<field>}}`` in the body rendered empty and the record succeeded); in
2036
+ ``relativeURI`` and ``headers[].value`` templates an undefined path always fails the
2037
+ request — a wrong root there is a runtime failure, not a blank. Verify the body's
2038
+ root against the record shape; no flag will catch it.
1949
2039
  - |-
1950
2040
  ## LEAVE UNDEFINED for the most common case
1951
2041
 
@@ -2016,14 +2106,23 @@ components:
2016
2106
  ### Pattern B — Batch / page wrapper around mapped records
2017
2107
 
2018
2108
  Wrap an envelope (header, version, marketplace, etc.) around
2019
- a serialized batch. ``{{#each data}}`` iterates the page;
2020
- ``{{#each batch_of_records}}`` iterates the page-level batch
2021
- for ``oneToMany`` imports.
2109
+ a serialized batch. The template root depends ONLY on
2110
+ ``batchSize`` (live-verified 2026-09-10): with ``batchSize`` 1
2111
+ (the default) the root carries ``record`` (an object record —
2112
+ or the fanned-out child on a ``oneToMany`` import) or ``rows``
2113
+ (a grouped/array record), and ``data`` is the one-element list
2114
+ of records in the request (a grouped record is that element,
2115
+ itself an array); with ``batchSize`` > 1 the root carries
2116
+ ``batch_of_records`` (one ``{record: …}`` item per object
2117
+ record, ``{rows: […]}`` for a grouped record) and ``data`` (the
2118
+ bare records), and ``record`` / ``rows`` are ABSENT. ``oneToMany`` does not make
2119
+ ``batch_of_records`` appear — children are batched after
2120
+ fan-out under the same rule.
2022
2121
 
2023
2122
  Example shape:
2024
2123
  ``{"values": {{#each data}} {{{jsonSerialize this}}} {{/each}} }``
2025
2124
 
2026
- Example with comma-separation:
2125
+ Example with comma-separation (``batchSize`` > 1):
2027
2126
  ``[{{#each batch_of_records}}{{{jsonSerialize this.record}}}{{#unless @last}},{{/unless}}{{/each}}]``
2028
2127
 
2029
2128
  ### Pattern C — Custom envelope with per-message fields
@@ -2298,7 +2397,7 @@ components:
2298
2397
  description: Name of the HTTP header to include with each import request.
2299
2398
  value:
2300
2399
  type: string
2301
- description: Value sent for the header. Supports handlebars expressions rendered against the pre-mapped record.
2400
+ description: Value sent for the header. Supports handlebars expressions rendered against the pre-mapped record, with the same data roots as the body (`record` / `rows` / `batch_of_records`, plus `data`); an undefined path fails the request rather than rendering empty.
2302
2401
  x-celigo-agent:
2303
2402
  - handlebars
2304
2403
  x-celigo-handlebars-context: pre-mapped
@@ -3020,11 +3119,13 @@ components:
3020
3119
  type: string
3021
3120
  x-celigo-agent:
3022
3121
  - handlebars
3122
+ x-celigo-ui-override: 'The FTP import form requires this once its "Use temp file" toggle is on (fieldDefinitions/resources/imports/ftp.js: ''ftp.inProgressFileName'' requiredWhen ftp.useTempFile is true; blob mode ''ftp.blobInProgressFileName'' requiredWhen ftp.blobUseTempFile is true). The toggles are form-only and are not saved — the form derives them from whether this field is set — so the API has no field to condition on and saves the import with or without the name.'
3023
3123
  description: |-
3024
3124
  Temporary name the file carries while its upload is in progress, preventing other systems
3025
3125
  from processing a partially transferred file; it is renamed to its final name once the
3026
- upload completes. Include a handlebars uniqueness token (e.g. {{timestamp}}) when one file
3027
- is written per flow run.
3126
+ upload completes. Its presence is what the UI shows as "Use temp file while upload in
3127
+ progress": set it to turn the temporary name on, omit it to turn it off. Include a
3128
+ handlebars uniqueness token (e.g. {{timestamp}}) when one file is written per flow run.
3028
3129
  x-celigo-ai-guidance:
3029
3130
  - |-
3030
3131
  inProgressFileName is the designated temporary filename assigned to a file
@@ -8226,6 +8327,48 @@ components:
8226
8327
  limits against the same downstream system but
8227
8328
  use different credentials. Mutually exclusive
8228
8329
  with `_id` on the same entry.
8330
+ Topic:
8331
+ type: object
8332
+ description: |-
8333
+ Publishing settings for an Event Streams publisher (`adaptorType: TopicImport`). Each
8334
+ incoming record is published as a message to the topic; the platform delivers it
8335
+ internally, so the import carries no `_connectionId`. Present when `adaptorType` is
8336
+ `TopicImport`; the server fills `batchSize` with its default when it is omitted.
8337
+ x-celigo-ai-guidance:
8338
+ - |-
8339
+ Sending this object without `adaptorType` is enough — the server infers `TopicImport`
8340
+ from it. Never add a `_connectionId`: the server then validates the document as that
8341
+ connection's adaptor instead (an http connection fails with 422 missing_required_field
8342
+ "http subschema not defined").
8343
+ properties:
8344
+ _topicId:
8345
+ type: string
8346
+ format: objectId
8347
+ x-celigo-refModel: topics
8348
+ x-celigo-ui-override: 'Required by the Event Streams publisher form (fieldDefinitions/resources/imports/import.js: ''topic._topicId'' is required:true, validWhen isNot ''''). The API saves a TopicImport without it, so the requirement is encoded on the request schema to mirror the form and keep publishers bound to a topic.'
8349
+ description: |-
8350
+ Topic the records are published to. Create or look it up with `GET /v1/topics`; the
8351
+ topic must belong to the same account.
8352
+ x-celigo-ai-guidance:
8353
+ - |-
8354
+ An id that is not a topic in the account fails the save with 422 `invalid_ref`
8355
+ ("<id> is not a valid topic._topicId").
8356
+ examples:
8357
+ - 6ab1f48d38d7733b4599875c
8358
+ batchSize:
8359
+ type: integer
8360
+ minimum: 1
8361
+ default: 1000
8362
+ description: |-
8363
+ Number of records published per request to the topic. Lower it when individual
8364
+ messages are large; the default keeps publishing efficient for typical record sizes.
8365
+ x-celigo-ai-guidance:
8366
+ - |-
8367
+ Zero and negative values fail the save with 422 `min` ("Path `topic.batchSize` (0) is
8368
+ less than minimum allowed value (1)").
8369
+ examples:
8370
+ - 1000
8371
+ - 100
8229
8372
  File:
8230
8373
  type: object
8231
8374
  description: |-
@@ -8237,11 +8380,15 @@ components:
8237
8380
  - `S3Import`
8238
8381
  - `FTPImport`
8239
8382
  - `AS2Import`
8383
+ - `HTTPImport` in file mode (`http.type: "file"` — the folder mode of the cloud file
8384
+ providers such as Google Drive, Box, Dropbox, Azure Blob, Google Cloud Storage and Celigo
8385
+ Storage); the same `file` object, including `type: filedefinition` with `_ediProfileId`
8386
+ for EDI, applies as on S3 / FTP
8240
8387
 
8241
8388
  ❌ **DO NOT SET** for non-file-based imports like:
8242
8389
  - `SalesforceImport`
8243
8390
  - `NetSuiteImport`
8244
- - `HTTPImport`
8391
+ - `HTTPImport` in records mode (`http.type` unset — a REST endpoint receiving records)
8245
8392
  - `MongodbImport`
8246
8393
  - `RDBMSImport`
8247
8394
 
@@ -8250,7 +8397,7 @@ components:
8250
8397
  For most file imports, you need at minimum:
8251
8398
  - `fileName`: The output file name (supports Handlebars like `{{timestamp}}`)
8252
8399
  - `type`: The file format (json, csv, xml, xlsx)
8253
- - `skipAggregation`: Usually `false` for standard imports
8400
+ - `aggregation.type`: How the run's records are batched into files (`all` for one file per run)
8254
8401
 
8255
8402
  **Example (S3 Import)**
8256
8403
 
@@ -8258,7 +8405,7 @@ components:
8258
8405
  {
8259
8406
  "file": {
8260
8407
  "fileName": "customers-{{timestamp}}.json",
8261
- "skipAggregation": false,
8408
+ "aggregation": { "type": "all" },
8262
8409
  "type": "json"
8263
8410
  },
8264
8411
  "s3": {
@@ -8300,18 +8447,22 @@ components:
8300
8447
  skipAggregation:
8301
8448
  type: boolean
8302
8449
  description: |-
8303
- Controls whether records are aggregated into a single file or processed individually.
8304
-
8305
- **Values**
8306
- - `false` (DEFAULT): Records are aggregated into a single output file
8307
- - `true`: Each record is written as a separate file
8308
-
8309
- **When to use**
8310
- - **`false`**: Standard batch imports where all records go into one file
8311
- - **`true`**: When each record needs its own file (e.g., individual documents)
8312
-
8313
- **Default:** `false`
8450
+ Legacy companion of `aggregation.type`: `true` when the run's records are written one
8451
+ file per page, `false` when they are combined across the run or grouped by key.
8452
+ Validation reads the value sent — an EDI file definition needs `true` unless
8453
+ `aggregation.type` is `key`, and `batchSize` needs `true` — then the save rewrites it
8454
+ from `aggregation.type`, so send the two as a consistent pair.
8314
8455
  default: false
8456
+ x-celigo-ai-guidance:
8457
+ - |-
8458
+ Send `skipAggregation` and `aggregation.type` as a consistent pair, exactly as the UI
8459
+ does: `page` with `true`; `all` or `key` with `false`. Validation reads the SENT flag —
8460
+ a `file.type: filedefinition` import saved with `page` and no `skipAggregation: true`
8461
+ fails with 422 `not_supported` ("Aggregation is not supported for EDI files, please set
8462
+ skipAggregation to true in Imports"), and `batchSize` fails with 422 `not_supported`
8463
+ ("File imports do not support batching with aggregation") unless the sent flag is
8464
+ `true`. The SAVED flag is then derived from `aggregation.type`, so this flag alone never
8465
+ says which mode is active — read `aggregation.type`. It does not mean one file per record.
8315
8466
  type:
8316
8467
  type: string
8317
8468
  enum:
@@ -8417,7 +8568,15 @@ components:
8417
8568
  - When target system has file size limitations
8418
8569
 
8419
8570
  **Note**
8420
- - Only applicable when `skipAggregation` is `true`
8571
+ - Offered when records are written one file per page (`aggregation.type: page` with
8572
+ `skipAggregation: true`)
8573
+ x-celigo-ai-guidance:
8574
+ - |-
8575
+ Probed for `all` and `page`: the save rejects `batchSize` with 422 `not_supported`
8576
+ ("File imports do not support batching with aggregation") when the sent
8577
+ `skipAggregation` is not `true`, and accepts it with `page` + `skipAggregation: true`.
8578
+ The `key` + `batchSize` combination has not been probed (it needs a B2B Manager
8579
+ account) — treat it as unverified, neither allowed nor forbidden.
8421
8580
  encrypt:
8422
8581
  type: boolean
8423
8582
  description: |-
@@ -8523,21 +8682,45 @@ components:
8523
8682
  aggregation:
8524
8683
  type: object
8525
8684
  description: |-
8526
- Controls how records are batched into output files. Newer imports use this object; the
8527
- legacy skipAggregation flag is the older equivalent.
8685
+ Controls how a flow run's records are batched into output files — the transfer form's
8686
+ "How many files would you like to generate?" setting. The legacy `skipAggregation` flag
8687
+ mirrors `type` and is maintained by the platform.
8528
8688
  properties:
8529
8689
  type:
8530
8690
  type: string
8531
8691
  enum:
8532
8692
  - all
8533
8693
  - page
8694
+ - key
8534
8695
  x-enumDescriptions:
8535
- all: Aggregate every record from the flow run into a single output file.
8536
- page: Write one output file per page of records.
8537
- description: Whether all records across the flow run go to one file, or one file is written per page.
8696
+ all: One file per flow run — every record from the run (per export, or per request on real-time flows) in a single file
8697
+ page: One file per page of records
8698
+ key: One file per aggregation key — EDI file definitions only; records sharing the key derived from the file definition's document type are combined into one document
8699
+ description: |-
8700
+ Which batches of a run's records become separate output files. EDI file definitions
8701
+ (`file.type: filedefinition`) are written per page or per key, never per run; `key`
8702
+ is accepted only for them and only when the account has B2B Manager. The grouping
8703
+ key and the line-item loop it merges come from the EDI file definition's document
8704
+ type, so there is no separate key field to configure.
8538
8705
  examples:
8539
8706
  - all
8540
8707
  - page
8708
+ - key
8709
+ x-celigo-ai-guidance:
8710
+ - |-
8711
+ Validated on save: an unknown value fails with 422 `enum`; `key` fails with 422
8712
+ `not_supported` unless `file.type` is `filedefinition` ("Aggregation type key is
8713
+ only supported for file type filedefinition") and the account has B2B Manager
8714
+ ("Aggregation type key is only supported for B2B Manager").
8715
+ - |-
8716
+ For `file.type: filedefinition` send `page` (with `skipAggregation: true`) or `key`
8717
+ (with `false`); `all` is not an EDI option — the validator enforces this through the
8718
+ `skipAggregation` rule (see that field). For every other file type the choices are
8719
+ `all` and `page`. The UI offers exactly these splits.
8720
+ - |-
8721
+ A user asking where the "aggregation key" is configured is asking about this
8722
+ field: the key itself is derived from the file definition's document type, never
8723
+ entered.
8541
8724
  lookups:
8542
8725
  type: array
8543
8726
  description: |-
@@ -8620,16 +8803,43 @@ components:
8620
8803
  examples:
8621
8804
  - true
8622
8805
  - false
8806
+ appendToExistingFile:
8807
+ type: boolean
8808
+ default: false
8809
+ x-celigo-ui-override: 'Defaulted by the Azure Data Lake Storage Gen2 import form (fieldDefinitions/resources/imports/azuredatalakestoragegen2.js: ''file.appendToExistingFile'' defaultValue r?.file?.appendToExistingFile === true, shown only for file.type csv in records mode). When it is on, preSave clears file.compressionFormat, file.encrypt, file.pgp and the Content-Type header — append mode and compress/encrypt are exclusive on the form. The API stores the flag on any file import.'
8810
+ description: |-
8811
+ When true, an Azure Data Lake Storage Gen2 import (`assistant: azuredatalakestoragegen2`)
8812
+ appends each run's CSV output to the file named by `file.fileName` instead of replacing
8813
+ it. Appended content cannot be compressed or encrypted, so leave `compressionFormat`,
8814
+ `encrypt` and `pgp` unset when this is on.
8815
+ examples:
8816
+ - true
8817
+ - false
8818
+ contentType:
8819
+ type: string
8820
+ x-celigo-agent:
8821
+ - handlebars
8822
+ description: |-
8823
+ MIME type recorded on the file written to a cloud file provider such as Azure Data Lake
8824
+ Storage Gen2. Accepts a Handlebars expression so the type can follow the record (e.g.
8825
+ `{{record.mimeType}}`). Omit to let the destination assign its default.
8826
+ examples:
8827
+ - text/csv
8828
+ - application/json
8829
+ - '{{record.mimeType}}'
8623
8830
  directory:
8624
8831
  type: object
8625
8832
  required:
8626
8833
  - pathMode
8627
8834
  description: |-
8628
8835
  Structured destination location for cloud file-provider imports (Google Drive shared
8629
- drives, Box, Dropbox), replacing the flat path used by classic FTP/S3 destinations. Select
8630
- the location by folder ID or by a path relative to a configured storage root via pathMode.
8631
- For these cloud providers, directoryId mode addresses the folder by id alone — the flat
8632
- destination-path field is not consulted at runtime.
8836
+ drives, Box, Dropbox, Google Cloud Storage, Azure Data Lake Storage Gen2), replacing the
8837
+ flat path used by classic FTP/S3 destinations. Select the location by folder ID or by a
8838
+ path relative to a configured storage root via pathMode. For the drive-style providers,
8839
+ directoryId mode addresses the folder by id alone — the flat destination-path field is
8840
+ not consulted at runtime. Google Cloud Storage puts the bucket in `storageRootId`;
8841
+ Azure Data Lake Storage Gen2 puts the container in `name` and the directory prefix of the
8842
+ file path in `http.relativeURI`.
8633
8843
  x-celigo-ai-guidance:
8634
8844
  - Save-time validation accepts any string for id without checking it against the provider — set it only from a folder ID the user supplied or the UI folder browser stored; never fabricate one. To address a folder by path instead, set pathMode to relativePath and put the path in the adaptor's flat path field.
8635
8845
  properties:
@@ -8656,16 +8866,21 @@ components:
8656
8866
  type: string
8657
8867
  description: |-
8658
8868
  Display name of the folder identified by id, kept for readability in the UI; the
8659
- folder browser fills it when the location is picked visually.
8869
+ folder browser fills it when the location is picked visually. For Azure Data Lake
8870
+ Storage Gen2 it is the authoritative container name instead — the form saves the
8871
+ container here and no id.
8660
8872
  examples:
8661
8873
  - Invoices - Outbound
8874
+ - invoices-outbound
8662
8875
  storageRootId:
8663
8876
  type: string
8664
8877
  description: |-
8665
8878
  Provider-native ID of the storage root the relative path resolves against; set when
8666
- pathMode is relativePath. The provider's own ID, not a Celigo resource ID.
8879
+ pathMode is relativePath. The provider's own ID, not a Celigo resource ID. For Google
8880
+ Cloud Storage it is the bucket name.
8667
8881
  examples:
8668
8882
  - 1qU1hvFarBFMb4-twqKm1rR5o_6j9vs9g
8883
+ - erp-exports
8669
8884
  storageRootName:
8670
8885
  type: string
8671
8886
  description: Display name of the storage root identified by storageRootId, retained for reference in the UI.
@@ -8788,14 +9003,22 @@ components:
8788
9003
  AI Agent configuration used by both AiAgentImport and GuardrailImport (ai_agent type).
8789
9004
 
8790
9005
  Configures which AI provider and model to use, along with instructions, parameter
8791
- tuning, output format, and available tools. Three providers are supported:
8792
-
8793
- - **openai**: OpenAI models (GPT-4, GPT-4o, GPT-4o-mini, GPT-5, etc.). Configure via the `openai` object.
8794
- - **gemini**: Google Gemini models via the LiteLLM proxy. Configure via `litellm` with overrides in `litellm._overrides.gemini`.
8795
- - **anthropic**: Anthropic Claude models via the LiteLLM proxy. Configure via `litellm` with overrides in `litellm._overrides.anthropic`.
8796
-
8797
- A `_connectionId` is optional (BYOK). If not provided on the parent import,
8798
- platform-managed credentials are used.
9006
+ tuning, output format, and available tools. Providers come in two families with
9007
+ two configuration formats:
9008
+
9009
+ - **Built-in providers** — each has its own configuration block.
9010
+ - **openai**: OpenAI models (GPT-4.1, GPT-5, etc.). Configure via the `openai` object.
9011
+ - **gemini**: Google Gemini models via the LiteLLM proxy. Configure via `litellm` with overrides in `litellm._overrides.gemini`.
9012
+ - **anthropic**: Anthropic Claude models via the LiteLLM proxy. Configure via `litellm` with overrides in `litellm._overrides.anthropic`.
9013
+ - **Catalog providers** — `mistral`, `xai`, `huggingface`, `deepseek`, `cohere`, `groq`. Added
9014
+ as catalog data rather than platform code, they share one generic flat format:
9015
+ `model`, `modelOptions`, `instructions`, `output`, and the `tools` / `prompts` /
9016
+ `resources` arrays directly on this object.
9017
+
9018
+ A `_connectionId` on the parent import selects bring-your-own-key (BYOK)
9019
+ credentials. Without one, built-in providers run on platform-managed
9020
+ credentials; catalog providers have no platform-managed credentials, so they
9021
+ save without a connection but cannot run until one is attached.
8799
9022
  required:
8800
9023
  - provider
8801
9024
  properties:
@@ -8805,18 +9028,224 @@ components:
8805
9028
  - openai
8806
9029
  - gemini
8807
9030
  - anthropic
9031
+ - mistral
9032
+ - xai
9033
+ - huggingface
9034
+ - deepseek
9035
+ - cohere
9036
+ - groq
8808
9037
  x-enumDescriptions:
8809
- openai: Use OpenAI models via the OpenAI Responses API.
8810
- gemini: Use Google Gemini models via the LiteLLM proxy.
8811
- anthropic: Use Anthropic Claude models via the LiteLLM proxy.
9038
+ openai: Use OpenAI models via the OpenAI Responses API (built-in; `openai` block).
9039
+ gemini: Use Google Gemini models via the LiteLLM proxy (built-in; `litellm` block).
9040
+ anthropic: Use Anthropic Claude models via the LiteLLM proxy (built-in; `litellm` block).
9041
+ mistral: Use Mistral models (catalog provider; generic flat format, BYOK).
9042
+ xai: Use xAI Grok models (catalog provider; generic flat format, BYOK).
9043
+ huggingface: Use Hugging Face inference endpoint models (catalog provider; generic flat format, BYOK).
9044
+ deepseek: Use DeepSeek models (catalog provider; generic flat format, BYOK).
9045
+ cohere: Use Cohere models (catalog provider; generic flat format, BYOK).
9046
+ groq: Use Groq-hosted models (catalog provider; generic flat format, BYOK).
8812
9047
  description: AI provider to use.
8813
9048
  x-celigo-ai-guidance:
8814
9049
  - |-
8815
- - **openai**: Uses OpenAI Responses API. Configure via the `openai` object.
8816
- - **gemini**: Uses Google Gemini via LiteLLM. Configure via `litellm` with
8817
- Gemini-specific overrides in `litellm._overrides.gemini`.
8818
- - **anthropic**: Uses Anthropic Claude via LiteLLM. Configure via `litellm` with
8819
- Claude-specific overrides in `litellm._overrides.anthropic`.
9050
+ The provider decides the configuration format, and the server rejects a
9051
+ mismatch with 422 `invalid_provider_config_format`: `openai` needs the
9052
+ `openai` block, `gemini` and `anthropic` need the `litellm` block (Gemini- or
9053
+ Claude-specific settings under `litellm._overrides`), and the catalog
9054
+ providers (`mistral`, `xai`, `huggingface`, `deepseek`, `cohere`, `groq`) need the
9055
+ generic flat format — `model` and `modelOptions` directly on this object,
9056
+ never an `openai` or `litellm` block.
9057
+ - |-
9058
+ Catalog providers are BYOK-only at run time: the agent saves without a
9059
+ `_connectionId`, but its first run fails with 422 `invalid_request` ("No API
9060
+ key configured for provider …"). Always attach an HTTP connection to the
9061
+ vendor's API (token auth) when the provider is a catalog provider.
9062
+ model:
9063
+ type: string
9064
+ description: |-
9065
+ Model identifier for a catalog provider (generic flat format) — for example
9066
+ `grok-4.6`. Built-in providers set the model inside their own block
9067
+ (`openai.model`, `litellm.model`) instead.
9068
+ x-celigo-ai-guidance:
9069
+ - |-
9070
+ Required for every catalog provider — omitting it or sending an empty string
9071
+ fails the save with 422 `missing_required_field`.
9072
+ - |-
9073
+ Without a `_connectionId` on the parent import the model must be one the
9074
+ catalog lists for the provider: an unknown id fails the save with 422
9075
+ `model_not_found`, a listed-but-disabled id with 422 `model_disabled`. With a
9076
+ `_connectionId` (BYOK) any model string saves — the server does not check it
9077
+ against the catalog or the vendor.
9078
+ modelOptions:
9079
+ type: object
9080
+ description: |-
9081
+ Model tuning for a catalog provider (generic flat format). Which keys, values, and
9082
+ ranges are accepted is defined per catalog model and validated on save when the
9083
+ model is a catalog entry.
9084
+ properties:
9085
+ maxOutputTokens:
9086
+ type: number
9087
+ description: Maximum number of tokens the model may generate.
9088
+ temperature:
9089
+ type: number
9090
+ description: Sampling temperature.
9091
+ topP:
9092
+ type: number
9093
+ description: Nucleus sampling threshold.
9094
+ reasoning_effort:
9095
+ type: string
9096
+ enum:
9097
+ - low
9098
+ - medium
9099
+ - high
9100
+ - xhigh
9101
+ x-enumDescriptions:
9102
+ low: Minimal reasoning before answering.
9103
+ medium: Moderate reasoning.
9104
+ high: Extensive reasoning.
9105
+ xhigh: Maximum reasoning.
9106
+ description: Reasoning depth for models that expose it.
9107
+ x-celigo-ai-guidance:
9108
+ - |-
9109
+ When the model is a catalog entry, the server validates this object against
9110
+ that model's schema and fails the save with 422 `invalid_model_options`
9111
+ naming the key: unknown keys are rejected, `reasoning_effort` must be one of
9112
+ the enum values where the model accepts it at all (xAI's `grok-4.6` does;
9113
+ DeepSeek's `deepseek-chat` rejects the key), and numeric bounds apply —
9114
+ on `grok-4.6`, `temperature` ≤ 2, `topP` ≤ 1, `maxOutputTokens` ≥ 100.
9115
+ - |-
9116
+ With a `_connectionId` and a model the catalog does not list, the object is
9117
+ passed through unvalidated — send only options the vendor's API accepts.
9118
+ instructions:
9119
+ type: string
9120
+ description: |-
9121
+ System prompt for a catalog provider (generic flat format). Built-in providers
9122
+ set it inside their own block (`openai.instructions`,
9123
+ `litellm._overrides.anthropic.systemInstruction`).
9124
+ output:
9125
+ type: object
9126
+ description: |-
9127
+ Output format for a catalog provider (generic flat format). Built-in providers
9128
+ configure it inside their own block (`openai.output`, `litellm.responseFormat`).
9129
+ properties:
9130
+ format:
9131
+ type: object
9132
+ description: Controls the structure of the model's output.
9133
+ properties:
9134
+ type:
9135
+ type: string
9136
+ enum:
9137
+ - text
9138
+ - json_schema
9139
+ x-enumDescriptions:
9140
+ text: Free-form text.
9141
+ json_schema: Structured JSON conforming to `jsonSchema`.
9142
+ description: Output type.
9143
+ x-celigo-ai-guidance:
9144
+ - |-
9145
+ `blob` is not accepted here — the save fails with 422
9146
+ `unsupported_output_format` naming the model (verified on `grok-4.6`).
9147
+ name:
9148
+ type: string
9149
+ description: Name of the JSON schema, for `json_schema` output.
9150
+ strict:
9151
+ type: boolean
9152
+ description: When true, the model must conform exactly to `jsonSchema`.
9153
+ jsonSchema:
9154
+ type: object
9155
+ additionalProperties: true
9156
+ description: JSON Schema the structured output must conform to, for `json_schema` output.
9157
+ verbose:
9158
+ type: string
9159
+ description: Level of detail in the model's response, for models that expose it.
9160
+ tools:
9161
+ type: array
9162
+ description: |-
9163
+ Tools available to a catalog-provider agent (generic flat format). Entries mirror
9164
+ the built-in providers' tool entries: a Celigo Tool by `_toolId`, an MCP server by
9165
+ `_mcpConnectionId`, or a vendor web-search tool.
9166
+ items:
9167
+ type: object
9168
+ properties:
9169
+ type:
9170
+ type: string
9171
+ enum:
9172
+ - tool
9173
+ - mcp
9174
+ - web_search
9175
+ x-enumDescriptions:
9176
+ tool: Reference a reusable Celigo Tool resource.
9177
+ mcp: Connect to an MCP server for additional external tools.
9178
+ web_search: Search the web for real-time information, where the vendor's model supports it.
9179
+ description: Type of tool entry.
9180
+ tool:
9181
+ type: object
9182
+ description: Reference to a Celigo Tool resource, used when type is "tool".
9183
+ properties:
9184
+ _toolId:
9185
+ type: string
9186
+ format: objectId
9187
+ x-celigo-refModel: tools
9188
+ description: The Celigo Tool to call.
9189
+ mcp:
9190
+ type: object
9191
+ description: MCP server connection, used when type is "mcp".
9192
+ properties:
9193
+ _mcpConnectionId:
9194
+ type: string
9195
+ format: objectId
9196
+ x-celigo-refModel: connections
9197
+ description: Connection to the MCP server.
9198
+ allowedTools:
9199
+ type: array
9200
+ description: |-
9201
+ Specific tools to allow from the MCP server (all if omitted). Each entry
9202
+ is either a plain tool name or an object carrying display metadata.
9203
+ items:
9204
+ type:
9205
+ - string
9206
+ - object
9207
+ config:
9208
+ type: object
9209
+ additionalProperties: true
9210
+ description: Tool-specific options for vendor-native tools (for example web-search settings).
9211
+ x-celigo-ai-guidance:
9212
+ - |-
9213
+ References are checked on save: an unknown `_toolId` or `_mcpConnectionId`
9214
+ fails with 422 `invalid_ref` naming the array index.
9215
+ prompts:
9216
+ type: array
9217
+ description: |-
9218
+ MCP prompt entries available to a catalog-provider agent (generic flat format).
9219
+ Each entry references one MCP connection and the prompt names allowed from it.
9220
+ items:
9221
+ type: object
9222
+ properties:
9223
+ type:
9224
+ type: string
9225
+ enum:
9226
+ - mcp
9227
+ x-enumDescriptions:
9228
+ mcp: Reference prompts exposed by an MCP server.
9229
+ description: Type of prompt entry. Always "mcp".
9230
+ mcp:
9231
+ type: object
9232
+ properties:
9233
+ _mcpConnectionId:
9234
+ type: string
9235
+ format: objectId
9236
+ x-celigo-refModel: connections
9237
+ description: Connection to the MCP server that exposes the prompts.
9238
+ allowedPrompts:
9239
+ type: array
9240
+ description: Prompt names the agent may fetch from the server.
9241
+ items:
9242
+ type: string
9243
+ x-celigo-ai-guidance:
9244
+ - |-
9245
+ An unknown `_mcpConnectionId` fails the save with 422 `invalid_ref` naming
9246
+ the array index.
9247
+ resources:
9248
+ $ref: '#/components/schemas/McpResources'
8820
9249
  openai:
8821
9250
  type: object
8822
9251
  description: |
@@ -8847,10 +9276,11 @@ components:
8847
9276
  x-celigo-ai-guidance:
8848
9277
  - |-
8849
9278
  With platform-managed credentials (no `_connectionId` on the parent
8850
- import), the model must be on the platform's allowlist — an
8851
- unlisted model fails the save with 422. A BYOK connection bypasses
8852
- the allowlist and the model string is passed through to the
8853
- provider as-is.
9279
+ import), the model must be one the platform hosts. The save does not
9280
+ check this — an unlisted model saves, and the agent's first run fails
9281
+ with 422 `invalid_model`, whose message lists the hosted models. A
9282
+ BYOK connection bypasses the hosted list and the model string is
9283
+ passed through to the provider as-is.
8854
9284
  reasoning:
8855
9285
  type: object
8856
9286
  description: Controls depth of reasoning for complex tasks.
@@ -8869,18 +9299,21 @@ components:
8869
9299
  - medium
8870
9300
  - high
8871
9301
  - xhigh
9302
+ - max
8872
9303
  x-enumDescriptions:
8873
9304
  none: No additional reasoning effort.
8874
9305
  minimal: Least reasoning effort for simple, straightforward tasks.
8875
9306
  low: Light reasoning for moderately simple tasks.
8876
9307
  medium: Balanced reasoning effort for typical tasks.
8877
- high: Maximum reasoning effort for complex, multi-step tasks.
8878
- xhigh: Highest reasoning effort for the most demanding, multi-step tasks.
9308
+ high: Heavy reasoning effort for complex, multi-step tasks.
9309
+ xhigh: Very high reasoning effort for the most demanding, multi-step tasks.
9310
+ max: Highest available reasoning effort, above xhigh.
8879
9311
  description: How much reasoning effort the model should invest
8880
9312
  x-celigo-ai-guidance:
8881
9313
  - |-
8882
9314
  How much reasoning effort the model should invest.
8883
9315
  Reasoning- capable models only — see `reasoning` for the gating rule.
9316
+ - Any other value fails the save with 422 `enum` on `aiAgent.openai.reasoning.effort`.
8884
9317
  summary:
8885
9318
  type: string
8886
9319
  enum:
@@ -9016,6 +9449,13 @@ components:
9016
9449
  additionalproperties:
9017
9450
  type: boolean
9018
9451
  description: When true, the structured output may include properties beyond those defined in `properties`.
9452
+ schema:
9453
+ type: object
9454
+ readOnly: true
9455
+ additionalProperties: true
9456
+ description: |-
9457
+ Server-written copy of `jsonSchema`, returned whenever `jsonSchema` is set — on
9458
+ AI agent imports and on guardrail agents alike. Send `jsonSchema`, not this field.
9019
9459
  if:
9020
9460
  properties:
9021
9461
  type:
@@ -9058,13 +9498,19 @@ components:
9058
9498
  - web_search
9059
9499
  - mcp
9060
9500
  - image_generation
9501
+ - code_execution
9061
9502
  - tool
9062
9503
  x-enumDescriptions:
9063
9504
  web_search: Search the web for real-time information.
9064
9505
  mcp: Connect to an MCP server for additional external tools.
9065
9506
  image_generation: Generate images using an AI image model.
9507
+ code_execution: 'Enable OpenAI''s built-in code-execution tool; carries no configuration block, send `{type: code_execution}` only'
9066
9508
  tool: Reference a reusable Celigo Tool resource.
9067
- description: Type of tool.
9509
+ description: |-
9510
+ Type of tool. Every type except `code_execution` is configured through the
9511
+ sibling object of the same name; OpenAI spells this one `code_execution`, while
9512
+ the Gemini and Anthropic overrides spell theirs `codeExecution` — the other spelling
9513
+ fails with 422 `enum`.
9068
9514
  webSearch:
9069
9515
  type: object
9070
9516
  description: Web search configuration (empty object to enable)
@@ -9253,6 +9699,13 @@ components:
9253
9699
  - claude-sonnet-4-6
9254
9700
  - claude-opus-4-7
9255
9701
  x-celigo-ui-override: Required by the AI agent configuration form. Encoded here to mirror the form so builders produce connectable configurations.
9702
+ x-celigo-ai-guidance:
9703
+ - |-
9704
+ With platform-managed credentials (no `_connectionId` on the parent
9705
+ import), the model must be one the platform hosts for the provider —
9706
+ Gemini and Anthropic Claude both have a hosted list. The save does not
9707
+ check this — an unlisted model saves, and the agent's first run fails
9708
+ with 422 `invalid_model`, whose message lists the hosted models.
9256
9709
  temperature:
9257
9710
  type: number
9258
9711
  minimum: 0
@@ -9391,15 +9844,19 @@ components:
9391
9844
  - googleSearch
9392
9845
  - urlContext
9393
9846
  - fileSearch
9847
+ - codeExecution
9394
9848
  - mcp
9395
9849
  - tool
9396
9850
  x-enumDescriptions:
9397
9851
  googleSearch: Use Google Search for real-time information grounding.
9398
9852
  urlContext: Retrieve and use content from specified URLs.
9399
9853
  fileSearch: Search through previously uploaded files.
9854
+ codeExecution: 'Enable Gemini''s built-in code-execution tool; carries no configuration block, send `{type: codeExecution}` only'
9400
9855
  mcp: Connect to an MCP server for additional external tools.
9401
9856
  tool: Reference a reusable Celigo Tool resource.
9402
- description: Type of Gemini tool.
9857
+ description: |-
9858
+ Type of Gemini tool. `codeExecution` is the Gemini spelling — `code_execution`
9859
+ fails with 422 `enum`.
9403
9860
  googleSearch:
9404
9861
  type: object
9405
9862
  description: Google Search configuration (empty object to enable)
@@ -9731,11 +10188,15 @@ components:
9731
10188
  - tool
9732
10189
  - mcp
9733
10190
  - webSearch
10191
+ - codeExecution
9734
10192
  x-enumDescriptions:
9735
10193
  tool: Reference a reusable Celigo Tool resource.
9736
10194
  mcp: Connect to an MCP server for additional external tools.
9737
10195
  webSearch: Search the web for real-time information.
9738
- description: Type of Claude tool.
10196
+ codeExecution: 'Enable Anthropic''s built-in code-execution tool; carries no configuration block, send `{type: codeExecution}` only'
10197
+ description: |-
10198
+ Type of Claude tool. `codeExecution` is the Anthropic spelling — `code_execution`
10199
+ fails with 422 `enum`.
9739
10200
  tool:
9740
10201
  type: object
9741
10202
  description: Reference to a Celigo Tool resource, used when type is "tool".
@@ -9783,9 +10244,43 @@ components:
9783
10244
  description: Connection to the MCP server.
9784
10245
  allowedTools:
9785
10246
  type: array
9786
- description: Specific tools to allow from the MCP server (all if omitted).
10247
+ description: |-
10248
+ Specific tools to allow from the MCP server (all if omitted). Each
10249
+ entry is either a plain tool name or an object carrying display
10250
+ metadata — same contract as the OpenAI and Gemini `allowedTools`.
9787
10251
  items:
9788
- type: string
10252
+ oneOf:
10253
+ - title: name
10254
+ type: string
10255
+ description: Tool name as exposed by the MCP server.
10256
+ - title: tool
10257
+ type: object
10258
+ required:
10259
+ - name
10260
+ properties:
10261
+ name:
10262
+ type: string
10263
+ maxLength: 256
10264
+ description: Tool name as exposed by the MCP server.
10265
+ title:
10266
+ type: string
10267
+ maxLength: 300
10268
+ description: Display title shown for the tool.
10269
+ description:
10270
+ type: string
10271
+ maxLength: 1000
10272
+ description: Display description shown for the tool.
10273
+ x-celigo-ai-guidance:
10274
+ - |-
10275
+ Object entries accept only name/title/description — any other key
10276
+ fails the save with 422 `invalid_field_value` ("unknown field(s): …"),
10277
+ and an object without `name` fails with 422 `missing_required_field`
10278
+ ("Expected field: name to be present.").
10279
+ examples:
10280
+ - - hub_repo_search
10281
+ - name: hub_repo_info
10282
+ title: Repository info
10283
+ description: Look up a repository by name
9789
10284
  webSearch:
9790
10285
  type: object
9791
10286
  description: Web search configuration, used when type is "webSearch".
@@ -9907,82 +10402,1020 @@ components:
9907
10402
  litellm:
9908
10403
  required:
9909
10404
  - model
9910
- GuardrailConfig:
10405
+ else:
10406
+ if:
10407
+ properties:
10408
+ provider:
10409
+ enum:
10410
+ - mistral
10411
+ - xai
10412
+ - huggingface
10413
+ - deepseek
10414
+ - cohere
10415
+ - groq
10416
+ required:
10417
+ - provider
10418
+ then:
10419
+ required:
10420
+ - model
10421
+ GuardrailAiAgentConfig:
9911
10422
  type: object
9912
- description: |-
9913
- Configuration for GuardrailImport adaptor type.
9914
-
9915
- Guardrails evaluate data flowing through integrations for safety and
9916
- compliance. The `type` field selects which check to apply, and the
9917
- corresponding sub-object (`aiAgent`, `pii`, or `moderation`) provides
9918
- the configuration.
9919
-
9920
- A `_connectionId` on the parent import is only needed for BYOK
9921
- `ai_agent` guardrails. In responses the server echoes the active type's
9922
- sub-object and applies the `confidenceThreshold` default; it also
9923
- returns inactive sibling sub-objects (e.g. `moderation: {categories: []}`
9924
- on a `pii` guardrail, or a populated `pii` left over from a type switch),
9925
- but only the active type's sub-object is meaningful. Legacy documents
9926
- may carry a server-written default `aiAgent` stub on `pii`/`moderation`
9927
- guardrails; current servers strip the inactive `aiAgent` on write.
10423
+ description: |
10424
+ LLM configuration for an `ai_agent` guardrail — which provider and model evaluate each
10425
+ record, with instructions, parameter tuning, and output format. Guardrails never invoke
10426
+ tools, so unlike an AI agent import no block here accepts a `tools` array; MCP `prompts`
10427
+ and `resources` remain available. Providers come in two families with two configuration
10428
+ formats:
10429
+
10430
+ - **Built-in providers** — each has its own configuration block.
10431
+ - **openai**: OpenAI models (GPT-4.1, GPT-5, etc.). Configure via the `openai` object.
10432
+ - **gemini**: Google Gemini models via the LiteLLM proxy. Configure via `litellm` with overrides in `litellm._overrides.gemini`.
10433
+ - **anthropic**: Anthropic Claude models via the LiteLLM proxy. Configure via `litellm` with overrides in `litellm._overrides.anthropic`.
10434
+ - **Catalog providers** — `mistral`, `xai`, `huggingface`, `deepseek`, `cohere`, `groq`. Added
10435
+ as catalog data rather than platform code, they share one generic flat format:
10436
+ `model`, `modelOptions`, `instructions`, `output`, and the `prompts` / `resources`
10437
+ arrays directly on this object.
10438
+
10439
+ A `_connectionId` on the parent import selects bring-your-own-key (BYOK)
10440
+ credentials. Without one, built-in providers run on platform-managed
10441
+ credentials; catalog providers have no platform-managed credentials, so they
10442
+ save without a connection but cannot run until one is attached.
9928
10443
  x-celigo-ai-guidance:
9929
10444
  - |-
9930
- Guardrails are safety and compliance checks that can be applied
9931
- to data flowing through integrations. Three mutually-exclusive
9932
- types are supported — see `type` below for the full decision
9933
- rule on which to pick:
9934
-
9935
- - **pii**: Detect (and optionally mask) personally identifiable
9936
- information. Local deterministic classifier; fixed enum of
9937
- entity types (`pii.entities`).
9938
- - **moderation**: Detect harmful / inappropriate / policy-
9939
- violating CONTENT. Local deterministic classifier; fixed enum
9940
- of categories (`moderation.categories` — `sexual`, `hate`,
9941
- `harassment`, `self_harm`, `violence`, `illicit`, etc.). Use
9942
- category names exactly as listed in the enum — e.g. `hate`
9943
- (not "hate speech"), `violence` (not "violent content"). Map
9944
- natural-language synonyms ("explicit" → `sexual`, "toxic" →
9945
- `harassment`, etc.) to the closest enum value rather than
9946
- falling back to `ai_agent`.
9947
- - **ai_agent**: LLM-evaluated judgement against custom
9948
- instructions. Catch-all for intents that don't fit `pii` or
9949
- `moderation` — domain-specific compliance, business-policy
9950
- checks, data-quality assertions, etc. Pick this LAST, not as
9951
- the default.
9952
- - |-
9953
- Prefer the cheaper / more deterministic types (`pii` > `moderation` >
9954
- `ai_agent`) whenever the brief's intent fits.
9955
- - Guardrail imports do not require a `_connectionId` (unless using BYOK for `ai_agent` type).
10445
+ Do not send `tools` on any block. A non-empty array at `tools`, `openai.tools`,
10446
+ `litellm._overrides.gemini.tools`, or `litellm._overrides.anthropic.tools` fails the
10447
+ save with 422 `guardrail_tools_not_allowed` naming that path. Responses still echo
10448
+ `openai.tools: []` on OpenAI guardrails; do not copy it back into a write.
10449
+ required:
10450
+ - provider
9956
10451
  properties:
9957
- type:
10452
+ provider:
9958
10453
  type: string
9959
10454
  enum:
9960
- - ai_agent
9961
- - pii
9962
- - moderation
10455
+ - openai
10456
+ - gemini
10457
+ - anthropic
10458
+ - mistral
10459
+ - xai
10460
+ - huggingface
10461
+ - deepseek
10462
+ - cohere
10463
+ - groq
9963
10464
  x-enumDescriptions:
9964
- ai_agent: Evaluate data using an AI model with custom instructions.
9965
- pii: Detect personally identifiable information in data fields.
9966
- moderation: Check content for harmful or inappropriate categories.
10465
+ openai: Use OpenAI models via the OpenAI Responses API (built-in; `openai` block).
10466
+ gemini: Use Google Gemini models via the LiteLLM proxy (built-in; `litellm` block).
10467
+ anthropic: Use Anthropic Claude models via the LiteLLM proxy (built-in; `litellm` block).
10468
+ mistral: Use Mistral models (catalog provider; generic flat format, BYOK).
10469
+ xai: Use xAI Grok models (catalog provider; generic flat format, BYOK).
10470
+ huggingface: Use Hugging Face inference endpoint models (catalog provider; generic flat format, BYOK).
10471
+ deepseek: Use DeepSeek models (catalog provider; generic flat format, BYOK).
10472
+ cohere: Use Cohere models (catalog provider; generic flat format, BYOK).
10473
+ groq: Use Groq-hosted models (catalog provider; generic flat format, BYOK).
10474
+ description: AI provider to use.
10475
+ x-celigo-ai-guidance:
10476
+ - |-
10477
+ The provider decides the configuration format, and the server rejects a
10478
+ mismatch with 422 `invalid_provider_config_format`: `openai` needs the
10479
+ `openai` block, `gemini` and `anthropic` need the `litellm` block (Gemini- or
10480
+ Claude-specific settings under `litellm._overrides`), and the catalog
10481
+ providers (`mistral`, `xai`, `huggingface`, `deepseek`, `cohere`, `groq`) need the
10482
+ generic flat format — `model` and `modelOptions` directly on this object,
10483
+ never an `openai` or `litellm` block.
10484
+ - |-
10485
+ Catalog providers are BYOK-only at run time: the guardrail saves without a
10486
+ `_connectionId`, but its first run fails with 422 `invalid_request` ("No API
10487
+ key configured for provider …"). Always attach an HTTP connection to the
10488
+ vendor's API (token auth) when the provider is a catalog provider.
10489
+ model:
10490
+ type: string
9967
10491
  description: |-
9968
- The type of guardrail to apply. Each type requires its corresponding
9969
- sub-configuration object (`aiAgent`, `pii`, or `moderation`).
10492
+ Model identifier for a catalog provider (generic flat format) — for example
10493
+ `grok-4.6`. Built-in providers set the model inside their own block
10494
+ (`openai.model`, `litellm.model`) instead.
9970
10495
  x-celigo-ai-guidance:
9971
10496
  - |-
9972
- The type of guardrail to apply.
9973
- Pick exactly one — `pii` / `moderation` / `ai_agent` are mutually exclusive at
9974
- the type level (a brief that wants both runs as two guardrails in sequence,
9975
- not one).
10497
+ Required for every catalog provider — omitting it or sending an empty string
10498
+ fails the save with 422 `missing_required_field`.
9976
10499
  - |-
9977
- ## How to choose
9978
-
9979
- Apply these rules **in order** and pick the first match. Do
9980
- NOT skip ahead to `ai_agent` just because the brief is in
9981
- natural language — `pii` and `moderation` are also expressed
9982
- as natural-language briefs. The decision is about WHAT the
9983
- brief asks the guardrail to detect, not how the brief is
9984
- worded.
9985
-
10500
+ Without a `_connectionId` on the parent import the model must be one the
10501
+ catalog lists for the provider: an unknown id fails the save with 422
10502
+ `model_not_found`, a listed-but-disabled id with 422 `model_disabled`. With a
10503
+ `_connectionId` (BYOK) any model string saves — the server does not check it
10504
+ against the catalog or the vendor.
10505
+ modelOptions:
10506
+ type: object
10507
+ description: |-
10508
+ Model tuning for a catalog provider (generic flat format). Which keys, values, and
10509
+ ranges are accepted is defined per catalog model and validated on save when the
10510
+ model is a catalog entry.
10511
+ properties:
10512
+ maxOutputTokens:
10513
+ type: number
10514
+ description: Maximum number of tokens the model may generate.
10515
+ temperature:
10516
+ type: number
10517
+ description: Sampling temperature.
10518
+ topP:
10519
+ type: number
10520
+ description: Nucleus sampling threshold.
10521
+ reasoning_effort:
10522
+ type: string
10523
+ enum:
10524
+ - low
10525
+ - medium
10526
+ - high
10527
+ - xhigh
10528
+ x-enumDescriptions:
10529
+ low: Minimal reasoning before answering.
10530
+ medium: Moderate reasoning.
10531
+ high: Extensive reasoning.
10532
+ xhigh: Maximum reasoning.
10533
+ description: Reasoning depth for models that expose it.
10534
+ x-celigo-ai-guidance:
10535
+ - |-
10536
+ When the model is a catalog entry, the server validates this object against
10537
+ that model's schema and fails the save with 422 `invalid_model_options`
10538
+ naming the key: unknown keys are rejected, `reasoning_effort` must be one of
10539
+ the enum values where the model accepts it at all (xAI's `grok-4.6` does;
10540
+ DeepSeek's `deepseek-chat` rejects the key), and numeric bounds apply —
10541
+ on `grok-4.6`, `temperature` ≤ 2, `topP` ≤ 1, `maxOutputTokens` ≥ 100.
10542
+ - |-
10543
+ With a `_connectionId` and a model the catalog does not list, the object is
10544
+ passed through unvalidated — send only options the vendor's API accepts.
10545
+ instructions:
10546
+ type: string
10547
+ description: |-
10548
+ System prompt for a catalog provider (generic flat format). Built-in providers
10549
+ set it inside their own block (`openai.instructions`,
10550
+ `litellm._overrides.anthropic.systemInstruction`).
10551
+ output:
10552
+ type: object
10553
+ description: |-
10554
+ Output format for a catalog provider (generic flat format). Built-in providers
10555
+ configure it inside their own block (`openai.output`, `litellm.responseFormat`).
10556
+ properties:
10557
+ format:
10558
+ type: object
10559
+ description: Controls the structure of the model's output.
10560
+ properties:
10561
+ type:
10562
+ type: string
10563
+ enum:
10564
+ - text
10565
+ - json_schema
10566
+ x-enumDescriptions:
10567
+ text: Free-form text.
10568
+ json_schema: Structured JSON conforming to `jsonSchema`.
10569
+ description: Output type.
10570
+ x-celigo-ai-guidance:
10571
+ - |-
10572
+ `blob` is not accepted here — the save fails with 422
10573
+ `unsupported_output_format` naming the model (verified on `grok-4.6`).
10574
+ name:
10575
+ type: string
10576
+ description: Name of the JSON schema, for `json_schema` output.
10577
+ strict:
10578
+ type: boolean
10579
+ description: When true, the model must conform exactly to `jsonSchema`.
10580
+ jsonSchema:
10581
+ type: object
10582
+ additionalProperties: true
10583
+ description: JSON Schema the structured output must conform to, for `json_schema` output.
10584
+ verbose:
10585
+ type: string
10586
+ description: Level of detail in the model's response, for models that expose it.
10587
+ prompts:
10588
+ type: array
10589
+ description: |-
10590
+ MCP prompt entries available to a catalog-provider guardrail (generic flat format).
10591
+ Each entry references one MCP connection and the prompt names allowed from it.
10592
+ items:
10593
+ type: object
10594
+ properties:
10595
+ type:
10596
+ type: string
10597
+ enum:
10598
+ - mcp
10599
+ x-enumDescriptions:
10600
+ mcp: Reference prompts exposed by an MCP server.
10601
+ description: Type of prompt entry. Always "mcp".
10602
+ mcp:
10603
+ type: object
10604
+ properties:
10605
+ _mcpConnectionId:
10606
+ type: string
10607
+ format: objectId
10608
+ x-celigo-refModel: connections
10609
+ description: Connection to the MCP server that exposes the prompts.
10610
+ allowedPrompts:
10611
+ type: array
10612
+ description: Prompt names the model may fetch from the server.
10613
+ items:
10614
+ type: string
10615
+ x-celigo-ai-guidance:
10616
+ - |-
10617
+ An unknown `_mcpConnectionId` fails the save with 422 `invalid_ref` naming
10618
+ the array index.
10619
+ resources:
10620
+ $ref: '#/components/schemas/McpResources'
10621
+ openai:
10622
+ type: object
10623
+ description: |
10624
+ OpenAI-specific configuration. Used when `provider` is "openai".
10625
+ required:
10626
+ - model
10627
+ - instructions
10628
+ properties:
10629
+ instructions:
10630
+ type: string
10631
+ maxLength: 1000000
10632
+ description: |
10633
+ System prompt that defines the check's behavior, goals, and constraints.
10634
+ examples:
10635
+ - You are a data validation agent. Check each record for completeness.
10636
+ x-celigo-ui-override: Required by the AI agent configuration form (the model's system prompt). Encoded here to mirror the form so builders produce connectable configurations.
10637
+ model:
10638
+ type: string
10639
+ description: OpenAI model identifier. Open string (not an enum) — model names change frequently.
10640
+ examples:
10641
+ - gpt-5.4
10642
+ - gpt-5.4-pro
10643
+ - gpt-5-mini
10644
+ - gpt-5-nano
10645
+ - gpt-4.1-mini
10646
+ - gpt-4o
10647
+ x-celigo-ui-override: Required by the AI agent configuration form. Encoded here to mirror the form so builders produce connectable configurations.
10648
+ x-celigo-ai-guidance:
10649
+ - |-
10650
+ With platform-managed credentials (no `_connectionId` on the parent
10651
+ import), the model must be one the platform hosts. The save does not
10652
+ check this — an unlisted model saves, and the guardrail's first run fails
10653
+ with 422 `invalid_model`, whose message lists the hosted models. A
10654
+ BYOK connection bypasses the hosted list and the model string is
10655
+ passed through to the provider as-is.
10656
+ reasoning:
10657
+ type: object
10658
+ description: Controls depth of reasoning for complex tasks.
10659
+ x-celigo-ai-guidance:
10660
+ - |-
10661
+ Supported on reasoning-capable OpenAI models only (currently the GPT-5 family and the o-series).
10662
+ Setting `reasoning` on a non-reasoning model (e.g.
10663
+ `gpt-4.1-mini`) is rejected by the provider at runtime — omit the field on those models.
10664
+ properties:
10665
+ effort:
10666
+ type: string
10667
+ enum:
10668
+ - none
10669
+ - minimal
10670
+ - low
10671
+ - medium
10672
+ - high
10673
+ - xhigh
10674
+ - max
10675
+ x-enumDescriptions:
10676
+ none: No additional reasoning effort.
10677
+ minimal: Least reasoning effort for simple, straightforward tasks.
10678
+ low: Light reasoning for moderately simple tasks.
10679
+ medium: Balanced reasoning effort for typical tasks.
10680
+ high: Extensive reasoning effort for complex, multi-step tasks.
10681
+ xhigh: Extended reasoning effort beyond high for demanding tasks.
10682
+ max: Highest available reasoning effort.
10683
+ description: How much reasoning effort the model should invest
10684
+ x-celigo-ai-guidance:
10685
+ - |-
10686
+ How much reasoning effort the model should invest.
10687
+ Reasoning- capable models only — see `reasoning` for the gating rule.
10688
+ summary:
10689
+ type: string
10690
+ enum:
10691
+ - concise
10692
+ - auto
10693
+ - detailed
10694
+ x-enumDescriptions:
10695
+ concise: Brief, high-level reasoning summary.
10696
+ auto: Let the model decide the appropriate level of detail.
10697
+ detailed: Comprehensive reasoning summary with full explanations.
10698
+ description: Level of detail in reasoning summaries
10699
+ x-celigo-ai-guidance:
10700
+ - |-
10701
+ Level of detail in reasoning summaries.
10702
+ Reasoning-capable models only — see `reasoning` for the gating rule.
10703
+ temperature:
10704
+ type: number
10705
+ minimum: 0
10706
+ maximum: 2
10707
+ description: |
10708
+ Sampling temperature. Higher values (e.g. 1.5) produce more creative output,
10709
+ lower values (e.g. 0.2) produce more focused and deterministic output.
10710
+ topP:
10711
+ type: number
10712
+ minimum: 0.1
10713
+ maximum: 1
10714
+ description: Nucleus sampling parameter
10715
+ topLogprobs:
10716
+ type: number
10717
+ minimum: 0
10718
+ maximum: 20
10719
+ description: Number of most likely tokens to return log probabilities for at each output position.
10720
+ maxOutputTokens:
10721
+ type: number
10722
+ minimum: 100
10723
+ maximum: 128000
10724
+ description: Maximum number of tokens in the model's response. Unlike an AI agent import, a guardrail does not receive a server-written value when this is omitted.
10725
+ serviceTier:
10726
+ type: string
10727
+ enum:
10728
+ - auto
10729
+ - default
10730
+ - priority
10731
+ x-enumDescriptions:
10732
+ auto: Let OpenAI automatically select the appropriate service tier.
10733
+ default: Standard service tier with normal rate limits and latency.
10734
+ priority: Premium tier with higher rate limits and lower latency at increased cost.
10735
+ description: |-
10736
+ OpenAI service tier. "priority" provides higher rate limits and
10737
+ lower latency at increased cost.
10738
+ x-celigo-ai-guidance:
10739
+ - |-
10740
+ BYOK only.
10741
+ Platform-managed credentials (no `_connectionId` on the parent import) always
10742
+ run at `default` regardless of what's set here.
10743
+ output:
10744
+ type: object
10745
+ description: Output format configuration
10746
+ properties:
10747
+ format:
10748
+ type: object
10749
+ description: |
10750
+ Controls the structure of the model's output.
10751
+ properties:
10752
+ type:
10753
+ type: string
10754
+ enum:
10755
+ - text
10756
+ - json_schema
10757
+ - blob
10758
+ x-enumDescriptions:
10759
+ text: Free-form text response from the model.
10760
+ json_schema: Structured JSON output conforming to a defined schema.
10761
+ blob: Binary data output for non-text content.
10762
+ description: Output format type.
10763
+ schemaMode:
10764
+ type: string
10765
+ enum:
10766
+ - manual
10767
+ - json
10768
+ x-enumDescriptions:
10769
+ manual: The schema was built field-by-field in the visual editor.
10770
+ json: The schema was pasted or edited as raw JSON.
10771
+ description: |-
10772
+ How the structured-output schema was authored in the UI.
10773
+ Editor state only — it does not change how `jsonSchema` is
10774
+ sent to the provider.
10775
+ name:
10776
+ type: string
10777
+ description: Name for the output format (used with json_schema)
10778
+ x-celigo-ui-override: Required by the AI agent form when output format type is json_schema. Encoded here to mirror the form so builders produce connectable configurations.
10779
+ strict:
10780
+ type: boolean
10781
+ description: When true, enforces strict schema validation on output.
10782
+ x-celigo-ai-guidance:
10783
+ - Whether to enforce strict schema validation on output
10784
+ jsonSchema:
10785
+ type: object
10786
+ description: |
10787
+ JSON Schema for structured output. Required when `format.type` is "json_schema".
10788
+ x-celigo-ui-override: Required by the AI agent form when output format type is json_schema. Encoded here to mirror the form so builders produce connectable configurations.
10789
+ properties:
10790
+ type:
10791
+ type: string
10792
+ description: Root JSON Schema type of the structured output; use "object" for record-shaped results.
10793
+ enum:
10794
+ - object
10795
+ - array
10796
+ - string
10797
+ - number
10798
+ - integer
10799
+ - boolean
10800
+ x-enumDescriptions:
10801
+ object: JSON object with named properties.
10802
+ array: Ordered list of values.
10803
+ string: Text string value.
10804
+ number: Numeric value including decimals.
10805
+ integer: Whole number value without decimals.
10806
+ boolean: True or false value.
10807
+ properties:
10808
+ type: object
10809
+ additionalProperties: true
10810
+ description: JSON Schema definitions for each field the structured output may contain.
10811
+ required:
10812
+ type: array
10813
+ description: Property names the model must include in the structured output.
10814
+ items:
10815
+ type: string
10816
+ additionalproperties:
10817
+ type: boolean
10818
+ description: When true, the structured output may include properties beyond those defined in `properties`.
10819
+ schema:
10820
+ type: object
10821
+ readOnly: true
10822
+ additionalProperties: true
10823
+ description: |-
10824
+ Server-written copy of `jsonSchema`, present in responses once `jsonSchema`
10825
+ is set. Send `jsonSchema`, not this field.
10826
+ if:
10827
+ properties:
10828
+ type:
10829
+ const: json_schema
10830
+ required:
10831
+ - type
10832
+ then:
10833
+ required:
10834
+ - name
10835
+ - jsonSchema
10836
+ verbose:
10837
+ type: string
10838
+ enum:
10839
+ - low
10840
+ - medium
10841
+ - high
10842
+ x-enumDescriptions:
10843
+ low: Minimal detail in the model's response.
10844
+ medium: Moderate detail in the model's response, the default level.
10845
+ high: Maximum detail and verbosity in the model's response.
10846
+ description: Level of detail in the model's response
10847
+ x-celigo-ai-guidance:
10848
+ - |-
10849
+ Supported on the GPT-5 family only. Other OpenAI models (e.g.
10850
+ `gpt-4.1`, `gpt-4.1-mini`,
10851
+ `gpt-4.1-nano`) accept only `medium` (the no-op default) — `low` and `high` are
10852
+ rejected by the provider at runtime.
10853
+ Omit the field entirely on non-GPT-5 models rather than relying on the default.
10854
+ prompts:
10855
+ type: array
10856
+ description: |-
10857
+ MCP prompt entries available to the guardrail's model. Each item references one
10858
+ MCP connection and the prompt names allowed from it.
10859
+ items:
10860
+ type: object
10861
+ properties:
10862
+ type:
10863
+ type: string
10864
+ enum:
10865
+ - mcp
10866
+ x-enumDescriptions:
10867
+ mcp: Connect to an MCP server to use its exposed prompts.
10868
+ description: Type of prompt entry. Always "mcp".
10869
+ mcp:
10870
+ type: object
10871
+ description: MCP server prompt configuration.
10872
+ properties:
10873
+ _mcpConnectionId:
10874
+ type: string
10875
+ format: objectId
10876
+ x-celigo-refModel: connections
10877
+ description: Connection to the MCP server.
10878
+ allowedPrompts:
10879
+ type: array
10880
+ description: Prompt names to allow from the MCP server.
10881
+ items:
10882
+ type: string
10883
+ resources:
10884
+ $ref: '#/components/schemas/McpResources'
10885
+ litellm:
10886
+ type: object
10887
+ description: |
10888
+ LiteLLM proxy configuration. Used when `provider` is "gemini" or "anthropic".
10889
+
10890
+ LiteLLM provides a unified interface to multiple AI providers. Gemini-specific
10891
+ settings are in `_overrides.gemini`; Claude-specific settings are in
10892
+ `_overrides.anthropic`.
10893
+
10894
+ `model` is required when litellm is the active provider path.
10895
+ properties:
10896
+ model:
10897
+ type: string
10898
+ description: |-
10899
+ LiteLLM model identifier. For Gemini, models are stored without the `gemini/`
10900
+ prefix; for Anthropic, use the Claude model id (e.g. `claude-sonnet-4-6`).
10901
+ examples:
10902
+ - gemini-2.5-flash
10903
+ - gemini-2.5-pro
10904
+ - gemini-2.5-flash-lite
10905
+ - claude-sonnet-4-6
10906
+ - claude-opus-4-7
10907
+ x-celigo-ui-override: Required by the AI agent configuration form. Encoded here to mirror the form so builders produce connectable configurations.
10908
+ x-celigo-ai-guidance:
10909
+ - |-
10910
+ With platform-managed credentials (no `_connectionId` on the parent
10911
+ import), the model must be one the platform hosts for the provider —
10912
+ Gemini and Anthropic Claude both have a hosted list. The save does not
10913
+ check this — an unlisted model saves, and the guardrail's first run fails
10914
+ with 422 `invalid_model`, whose message lists the hosted models.
10915
+ temperature:
10916
+ type: number
10917
+ minimum: 0
10918
+ maximum: 2
10919
+ description: Sampling temperature
10920
+ x-celigo-ai-guidance:
10921
+ - |-
10922
+ When `provider` is "anthropic", the value must be between 0 and 1 — a higher value
10923
+ fails the save with 422 `invalid_field_value`. Gemini accepts the full 0-2 range.
10924
+ maxCompletionTokens:
10925
+ type: number
10926
+ minimum: 100
10927
+ maximum: 128000
10928
+ description: Maximum number of tokens in the response
10929
+ topP:
10930
+ type: number
10931
+ minimum: 0.1
10932
+ maximum: 1
10933
+ description: Nucleus sampling parameter
10934
+ seed:
10935
+ type: number
10936
+ description: Random seed for reproducible outputs
10937
+ responseFormat:
10938
+ type: object
10939
+ description: Output format configuration
10940
+ x-celigo-ai-guidance:
10941
+ - |-
10942
+ When `provider` is "anthropic", `type` must be "text" or "json_schema" — "blob" is
10943
+ rejected with 422 `invalid_response_format`. As with the other providers, "json_schema"
10944
+ requires `name` and `jsonSchema`.
10945
+ properties:
10946
+ type:
10947
+ type: string
10948
+ description: Output format type.
10949
+ enum:
10950
+ - text
10951
+ - json_schema
10952
+ - blob
10953
+ x-enumDescriptions:
10954
+ text: Free-form text response from the model.
10955
+ json_schema: Structured JSON output conforming to a defined schema.
10956
+ blob: Binary data output for non-text content.
10957
+ schemaMode:
10958
+ type: string
10959
+ enum:
10960
+ - manual
10961
+ - json
10962
+ x-enumDescriptions:
10963
+ manual: The schema was built field-by-field in the visual editor.
10964
+ json: The schema was pasted or edited as raw JSON.
10965
+ description: |-
10966
+ How the structured-output schema was authored in the UI. Editor
10967
+ state only — it does not change how `jsonSchema` is sent to the
10968
+ provider.
10969
+ name:
10970
+ type: string
10971
+ description: Name for the output format (used with json_schema).
10972
+ x-celigo-ui-override: Required by the AI agent form when output format type is json_schema. Encoded here to mirror the form so builders produce connectable configurations.
10973
+ strict:
10974
+ type: boolean
10975
+ description: When true, enforces strict schema validation on output.
10976
+ jsonSchema:
10977
+ type: object
10978
+ description: JSON Schema for structured output. Required when `responseFormat.type` is "json_schema".
10979
+ x-celigo-ui-override: Required by the AI agent form when output format type is json_schema. Encoded here to mirror the form so builders produce connectable configurations.
10980
+ properties:
10981
+ type:
10982
+ type: string
10983
+ description: Root JSON Schema type of the structured output; use "object" for record-shaped results.
10984
+ enum:
10985
+ - object
10986
+ - array
10987
+ - string
10988
+ - number
10989
+ - integer
10990
+ - boolean
10991
+ x-enumDescriptions:
10992
+ object: JSON object with named properties.
10993
+ array: Ordered list of values.
10994
+ string: Text string value.
10995
+ number: Numeric value including decimals.
10996
+ integer: Whole number value without decimals.
10997
+ boolean: True or false value.
10998
+ properties:
10999
+ type: object
11000
+ additionalProperties: true
11001
+ description: JSON Schema definitions for each field the structured output may contain.
11002
+ required:
11003
+ type: array
11004
+ description: Property names the model must include in the structured output.
11005
+ items:
11006
+ type: string
11007
+ additionalProperties:
11008
+ type: boolean
11009
+ description: When true, the structured output may include properties beyond those defined in `properties`.
11010
+ if:
11011
+ properties:
11012
+ type:
11013
+ const: json_schema
11014
+ required:
11015
+ - type
11016
+ then:
11017
+ required:
11018
+ - name
11019
+ - jsonSchema
11020
+ _overrides:
11021
+ type: object
11022
+ description: Provider-specific overrides
11023
+ properties:
11024
+ gemini:
11025
+ type: object
11026
+ description: |
11027
+ Gemini-specific configuration overrides.
11028
+ required:
11029
+ - systemInstruction
11030
+ properties:
11031
+ systemInstruction:
11032
+ type: string
11033
+ maxLength: 1000000
11034
+ description: |
11035
+ System instruction for Gemini models. Equivalent to OpenAI's `instructions`.
11036
+ Maximum 1,000,000 characters.
11037
+ x-celigo-ui-override: Required by the AI agent configuration form (the model's system prompt, the Gemini equivalent of `instructions`). Encoded here to mirror the form so builders produce connectable configurations.
11038
+ prompts:
11039
+ type: array
11040
+ description: |-
11041
+ MCP prompt entries available to the Gemini model. Each item references one
11042
+ MCP connection and the prompt names allowed from it.
11043
+ items:
11044
+ type: object
11045
+ properties:
11046
+ type:
11047
+ type: string
11048
+ enum:
11049
+ - mcp
11050
+ x-enumDescriptions:
11051
+ mcp: Connect to an MCP server to use its exposed prompts.
11052
+ description: Type of prompt entry. Always "mcp".
11053
+ mcp:
11054
+ type: object
11055
+ description: MCP server prompt configuration.
11056
+ properties:
11057
+ _mcpConnectionId:
11058
+ type: string
11059
+ format: objectId
11060
+ x-celigo-refModel: connections
11061
+ description: Connection to the MCP server.
11062
+ allowedPrompts:
11063
+ type: array
11064
+ description: Prompt names to allow from the MCP server.
11065
+ items:
11066
+ type: string
11067
+ resources:
11068
+ $ref: '#/components/schemas/McpResources'
11069
+ responseModalities:
11070
+ type: array
11071
+ description: Response output modalities
11072
+ x-celigo-ai-guidance:
11073
+ - |-
11074
+ `["image"]` requires an image-capable Gemini model (currently `gemini-2.5-flash-image`).
11075
+ Selecting it on a text-only model is rejected by the provider — pair image
11076
+ output with the right model or omit.
11077
+ items:
11078
+ type: string
11079
+ enum:
11080
+ - text
11081
+ - image
11082
+ x-enumDescriptions:
11083
+ text: Generate text content in the response.
11084
+ image: Generate image content in the response.
11085
+ topK:
11086
+ type: number
11087
+ description: Top-K sampling parameter for Gemini
11088
+ thinkingConfig:
11089
+ type: object
11090
+ description: Controls Gemini's extended thinking capabilities
11091
+ x-celigo-ai-guidance:
11092
+ - |-
11093
+ Supported on reasoning-capable Gemini models only (currently `gemini-2.5-pro`
11094
+ and `gemini-2.5-flash`).
11095
+ Setting `thinkingConfig` on a non-thinking model (e.g.
11096
+ `gemini-2.5-flash-lite`,
11097
+ `gemini-2.5-flash-image`) is rejected by the provider at runtime — omit the
11098
+ field on those models.
11099
+ properties:
11100
+ includeThoughts:
11101
+ type: boolean
11102
+ description: When true, includes the model's thinking steps in the response.
11103
+ x-celigo-ai-guidance:
11104
+ - Whether to include thinking steps in the response
11105
+ thinkingBudget:
11106
+ type: number
11107
+ minimum: 100
11108
+ maximum: 4000
11109
+ description: Maximum tokens allocated for thinking
11110
+ thinkingLevel:
11111
+ type: string
11112
+ description: Controls how much thinking effort the model applies; use higher levels for complex, multi-step tasks at the cost of latency and tokens.
11113
+ enum:
11114
+ - minimal
11115
+ - low
11116
+ - medium
11117
+ - high
11118
+ x-enumDescriptions:
11119
+ minimal: Least thinking effort for simple tasks.
11120
+ low: Light thinking for moderately simple tasks.
11121
+ medium: Balanced thinking effort for typical tasks.
11122
+ high: Maximum thinking effort for complex, multi-step tasks.
11123
+ imageConfig:
11124
+ type: object
11125
+ description: Gemini image generation configuration
11126
+ properties:
11127
+ aspectRatio:
11128
+ type: string
11129
+ description: Aspect ratio of generated images; choose a ratio matching the intended display format.
11130
+ enum:
11131
+ - '1:1'
11132
+ - '2:3'
11133
+ - '3:2'
11134
+ - '3:4'
11135
+ - '4:3'
11136
+ - '4:5'
11137
+ - '5:4'
11138
+ - '9:16'
11139
+ - '16:9'
11140
+ - '21:9'
11141
+ x-enumDescriptions:
11142
+ '1:1': Square aspect ratio.
11143
+ '2:3': Portrait aspect ratio (2 wide by 3 tall).
11144
+ '3:2': Landscape aspect ratio (3 wide by 2 tall).
11145
+ '3:4': Portrait aspect ratio (3 wide by 4 tall).
11146
+ '4:3': Standard landscape aspect ratio (4 wide by 3 tall).
11147
+ '4:5': Portrait aspect ratio (4 wide by 5 tall).
11148
+ '5:4': Landscape aspect ratio (5 wide by 4 tall).
11149
+ '9:16': Tall portrait aspect ratio for mobile screens.
11150
+ '16:9': Widescreen landscape aspect ratio.
11151
+ '21:9': Ultra-widescreen cinematic aspect ratio.
11152
+ imageSize:
11153
+ type: string
11154
+ description: Output resolution of generated images; higher resolutions increase detail and file size.
11155
+ enum:
11156
+ - 1K
11157
+ - 2K
11158
+ - 4K
11159
+ x-enumDescriptions:
11160
+ 1K: Standard resolution output around 1024 pixels.
11161
+ 2K: High resolution output around 2048 pixels.
11162
+ 4K: Ultra-high resolution output around 4096 pixels.
11163
+ mediaResolution:
11164
+ type: string
11165
+ enum:
11166
+ - low
11167
+ - medium
11168
+ - high
11169
+ x-enumDescriptions:
11170
+ low: Low resolution for faster processing and reduced token usage.
11171
+ medium: Balanced resolution for typical media processing.
11172
+ high: High resolution for maximum detail in media inputs.
11173
+ description: Resolution for media inputs (images, video)
11174
+ anthropic:
11175
+ type: object
11176
+ description: |
11177
+ Claude-specific configuration overrides. Used when `provider` is "anthropic".
11178
+ required:
11179
+ - systemInstruction
11180
+ properties:
11181
+ systemInstruction:
11182
+ type: string
11183
+ maxLength: 1000000
11184
+ description: |
11185
+ System instruction for Claude models. Equivalent to OpenAI's `instructions`.
11186
+ Maximum 1,000,000 characters.
11187
+ x-celigo-ui-override: Required by the AI agent configuration form (the model's system prompt, the Claude equivalent of `instructions`). Encoded here to mirror the form so builders produce connectable configurations.
11188
+ topK:
11189
+ type: number
11190
+ minimum: 0
11191
+ description: |-
11192
+ Top-K sampling parameter. Deprecated on Claude models released after Claude Opus
11193
+ 4.6, which reject any value at runtime; set it only on older models.
11194
+ thinkingConfig:
11195
+ type: object
11196
+ description: Controls Claude's extended thinking capabilities.
11197
+ properties:
11198
+ type:
11199
+ type: string
11200
+ enum:
11201
+ - enabled
11202
+ - disabled
11203
+ - adaptive
11204
+ x-enumDescriptions:
11205
+ enabled: Turn on extended thinking with an explicit token budget.
11206
+ disabled: Turn off extended thinking.
11207
+ adaptive: Let the model decide how much to think based on task complexity.
11208
+ description: Extended thinking mode.
11209
+ budgetTokens:
11210
+ type: number
11211
+ minimum: 1024
11212
+ description: |-
11213
+ Maximum tokens allocated for thinking. Required when `type` is "enabled" —
11214
+ omitting it fails the save with 422 `invalid_thinking_config`.
11215
+ x-celigo-ui-override: Required by the AI agent form when thinkingConfig.type is "enabled". Encoded here to mirror the form so builders produce connectable configurations.
11216
+ display:
11217
+ type: string
11218
+ enum:
11219
+ - summarized
11220
+ - omitted
11221
+ x-enumDescriptions:
11222
+ summarized: Include a summarized view of the model's thinking in the response.
11223
+ omitted: Exclude the model's thinking from the response.
11224
+ description: How thinking output is surfaced in the response.
11225
+ effort:
11226
+ type: string
11227
+ enum:
11228
+ - low
11229
+ - medium
11230
+ - high
11231
+ - xhigh
11232
+ - max
11233
+ x-enumDescriptions:
11234
+ low: Light thinking effort for moderately simple tasks.
11235
+ medium: Balanced thinking effort for typical tasks.
11236
+ high: Maximum standard thinking effort for complex tasks.
11237
+ xhigh: Extended thinking effort beyond high for demanding tasks.
11238
+ max: Highest available thinking effort.
11239
+ description: |-
11240
+ How much thinking effort the model applies; use with `type` "adaptive". Higher
11241
+ values (`xhigh`, `max`) may be gated to specific Claude models by the provider.
11242
+ if:
11243
+ properties:
11244
+ type:
11245
+ const: enabled
11246
+ required:
11247
+ - type
11248
+ then:
11249
+ required:
11250
+ - budgetTokens
11251
+ serviceTier:
11252
+ type: string
11253
+ enum:
11254
+ - auto
11255
+ - standard_only
11256
+ x-enumDescriptions:
11257
+ auto: Let Anthropic select the appropriate service tier.
11258
+ standard_only: Restrict processing to the standard service tier.
11259
+ description: Anthropic service tier for the request.
11260
+ prompts:
11261
+ type: array
11262
+ description: |-
11263
+ MCP prompt entries available to the Claude model. Each item references one
11264
+ MCP connection and the prompt names allowed from it.
11265
+ items:
11266
+ type: object
11267
+ properties:
11268
+ type:
11269
+ type: string
11270
+ enum:
11271
+ - mcp
11272
+ x-enumDescriptions:
11273
+ mcp: Connect to an MCP server to use its exposed prompts.
11274
+ description: Type of prompt entry. Always "mcp".
11275
+ mcp:
11276
+ type: object
11277
+ description: MCP server prompt configuration.
11278
+ properties:
11279
+ _mcpConnectionId:
11280
+ type: string
11281
+ format: objectId
11282
+ x-celigo-refModel: connections
11283
+ description: Connection to the MCP server.
11284
+ allowedPrompts:
11285
+ type: array
11286
+ description: Prompt names to allow from the MCP server.
11287
+ items:
11288
+ type: string
11289
+ resources:
11290
+ $ref: '#/components/schemas/McpResources'
11291
+ if:
11292
+ properties:
11293
+ provider:
11294
+ const: openai
11295
+ required:
11296
+ - provider
11297
+ then:
11298
+ required:
11299
+ - openai
11300
+ properties:
11301
+ openai:
11302
+ required:
11303
+ - model
11304
+ - instructions
11305
+ else:
11306
+ if:
11307
+ properties:
11308
+ provider:
11309
+ enum:
11310
+ - gemini
11311
+ - anthropic
11312
+ required:
11313
+ - provider
11314
+ then:
11315
+ required:
11316
+ - litellm
11317
+ properties:
11318
+ litellm:
11319
+ required:
11320
+ - model
11321
+ else:
11322
+ if:
11323
+ properties:
11324
+ provider:
11325
+ enum:
11326
+ - mistral
11327
+ - xai
11328
+ - huggingface
11329
+ - deepseek
11330
+ - cohere
11331
+ - groq
11332
+ required:
11333
+ - provider
11334
+ then:
11335
+ required:
11336
+ - model
11337
+ GuardrailConfig:
11338
+ type: object
11339
+ description: |-
11340
+ Configuration for GuardrailImport adaptor type.
11341
+
11342
+ Guardrails evaluate data flowing through integrations for safety and
11343
+ compliance. The `type` field selects which check to apply, and the
11344
+ corresponding sub-object (`aiAgent`, `pii`, or `moderation`) provides
11345
+ the configuration.
11346
+
11347
+ A `_connectionId` on the parent import is only needed for BYOK
11348
+ `ai_agent` guardrails. In responses the server echoes the active type's
11349
+ sub-object and applies the `confidenceThreshold` default; it also
11350
+ returns inactive sibling sub-objects (e.g. `moderation: {categories: []}`
11351
+ on a `pii` guardrail, or a populated `pii` left over from a type switch),
11352
+ but only the active type's sub-object is meaningful. Legacy documents
11353
+ may carry a server-written default `aiAgent` stub on `pii`/`moderation`
11354
+ guardrails; current servers strip the inactive `aiAgent` on write.
11355
+ x-celigo-ai-guidance:
11356
+ - |-
11357
+ Guardrails are safety and compliance checks that can be applied
11358
+ to data flowing through integrations. Three mutually-exclusive
11359
+ types are supported — see `type` below for the full decision
11360
+ rule on which to pick:
11361
+
11362
+ - **pii**: Detect (and optionally mask) personally identifiable
11363
+ information. Local deterministic classifier; fixed enum of
11364
+ entity types (`pii.entities`).
11365
+ - **moderation**: Detect harmful / inappropriate / policy-
11366
+ violating CONTENT. Local deterministic classifier; fixed enum
11367
+ of categories (`moderation.categories` — `sexual`, `hate`,
11368
+ `harassment`, `self_harm`, `violence`, `illicit`, etc.). Use
11369
+ category names exactly as listed in the enum — e.g. `hate`
11370
+ (not "hate speech"), `violence` (not "violent content"). Map
11371
+ natural-language synonyms ("explicit" → `sexual`, "toxic" →
11372
+ `harassment`, etc.) to the closest enum value rather than
11373
+ falling back to `ai_agent`.
11374
+ - **ai_agent**: LLM-evaluated judgement against custom
11375
+ instructions. Catch-all for intents that don't fit `pii` or
11376
+ `moderation` — domain-specific compliance, business-policy
11377
+ checks, data-quality assertions, etc. Pick this LAST, not as
11378
+ the default.
11379
+ - |-
11380
+ Prefer the cheaper / more deterministic types (`pii` > `moderation` >
11381
+ `ai_agent`) whenever the brief's intent fits.
11382
+ - Guardrail imports do not require a `_connectionId` (unless using BYOK for `ai_agent` type).
11383
+ - |-
11384
+ Never send `tools` anywhere under `aiAgent` on an `ai_agent` guardrail (`aiAgent.tools`,
11385
+ `aiAgent.openai.tools`, `aiAgent.litellm._overrides.gemini.tools`, `….anthropic.tools`) —
11386
+ any non-empty array fails the save with 422 `guardrail_tools_not_allowed` ("Tools aren't
11387
+ supported on a guardrail AI agent configuration…"), on create and on update. `prompts` and
11388
+ `resources` are accepted; the server still echoes `openai.tools: []` on OpenAI guardrails.
11389
+ properties:
11390
+ type:
11391
+ type: string
11392
+ enum:
11393
+ - ai_agent
11394
+ - pii
11395
+ - moderation
11396
+ x-enumDescriptions:
11397
+ ai_agent: Evaluate data using an AI model with custom instructions.
11398
+ pii: Detect personally identifiable information in data fields.
11399
+ moderation: Check content for harmful or inappropriate categories.
11400
+ description: |-
11401
+ The type of guardrail to apply. Each type requires its corresponding
11402
+ sub-configuration object (`aiAgent`, `pii`, or `moderation`).
11403
+ x-celigo-ai-guidance:
11404
+ - |-
11405
+ The type of guardrail to apply.
11406
+ Pick exactly one — `pii` / `moderation` / `ai_agent` are mutually exclusive at
11407
+ the type level (a brief that wants both runs as two guardrails in sequence,
11408
+ not one).
11409
+ - |-
11410
+ ## How to choose
11411
+
11412
+ Apply these rules **in order** and pick the first match. Do
11413
+ NOT skip ahead to `ai_agent` just because the brief is in
11414
+ natural language — `pii` and `moderation` are also expressed
11415
+ as natural-language briefs. The decision is about WHAT the
11416
+ brief asks the guardrail to detect, not how the brief is
11417
+ worded.
11418
+
9986
11419
  1. **`pii`** — pick this when the brief names ANY personally
9987
11420
  identifiable information, OR when the brief names entity
9988
11421
  categories (SSN, email, phone, credit card, address, name,
@@ -10286,40 +11719,57 @@ components:
10286
11719
  - aiAgent
10287
11720
  properties:
10288
11721
  aiAgent:
10289
- $ref: '#/components/schemas/AiAgentConfig'
11722
+ $ref: '#/components/schemas/GuardrailAiAgentConfig'
10290
11723
  OneToMany:
10291
11724
  type: boolean
10292
11725
  description: |
10293
- Controls whether the resource treats child records within parent records as the primary data units.
10294
-
10295
- **Important: this is not for specifying where records are in an api response**
10296
-
10297
- If you need to tell an export where to find the array of records in the HTTP response
10298
- body (e.g. "the records are at data.items"), use `http.response.resourcePath` instead.
10299
- `oneToMany` serves a completely different purpose — it operates on records that have
10300
- already been extracted from the response.
10301
-
10302
- **What oneToMany actually does**
10303
-
10304
- When set to true, this field fundamentally changes how record data is processed:
10305
- - The system will "unwrap" nested child records from their parent containers
10306
- - Each child record becomes a separate output record for downstream processing
10307
- - The pathToMany field must be set to indicate where these child records are located
10308
- - Parent record fields can still be accessed via a special "parent" context
10309
-
10310
- This is typically used on **lookup exports** (isLookup: true) or **imports** where
10311
- the incoming records contain nested arrays that need to be fanned out.
10312
-
10313
- Common scenarios for enabling this option:
10314
- - Processing order line items individually from an order export
10315
- - Handling invoice line items from an invoice export
10316
- - Processing individual transaction lines from journal entries
10317
- - Extracting address records from customer exports
10318
-
10319
- This setting applies for the duration of the current flow step only and does not affect
10320
- how data is stored or structured in other flow steps.
10321
-
10322
- If false (default), the resource processes each top-level record as a single unit.
11726
+ When true, the step runs once per child record instead of once per incoming record.
11727
+ `pathToMany` names the array field that holds the children inside an object record; when
11728
+ the incoming record is itself an array (grouped or row-based data), leave `pathToMany` blank
11729
+ and each element becomes a record. The fan-out is scoped to this step: afterwards the children
11730
+ are re-joined into the record's original shape — the object with its array, or the array of rows —
11731
+ carrying any response-mapping enrichment, and that re-joined record is what the next step
11732
+ receives. Not for locating records in an export's HTTP response; use
11733
+ `http.response.resourcePath` for that. Applies to steps that receive a record — imports and
11734
+ lookups (an export referenced as a page processor of a flow, API, or Tool). A standalone export
11735
+ (a flow's page generator) has no incoming record, so the fields are saved but have no effect on
11736
+ the records it produces; to emit one record per array element from a standalone export, use a
11737
+ `hooks.preSavePage` script, or for a file-definition export make the repeating segment the
11738
+ record boundary in the definition's rules.
11739
+ x-celigo-ai-guidance:
11740
+ - |-
11741
+ Only imports and lookups (exports placed as page processors) fan out. On a standalone export
11742
+ (a flow's page generator) the API saves ``oneToMany`` / ``pathToMany`` and applies neither:
11743
+ the records reach the next step unchanged and no error is raised. Live-verified 2026-09-18 on
11744
+ a flow test run — an order record with three ``lines`` reached the import as ONE record with
11745
+ the setting on the export, and as THREE child records with the same setting on the import.
11746
+ Never propose these fields as the way to split a standalone export's records; that is
11747
+ ``hooks.preSavePage`` work (or, for a file definition, the definition's record boundary).
11748
+ The rules below apply only on a step that receives a record.
11749
+ - |-
11750
+ Two modes, decided by the SHAPE of the record entering the step. Object record with a child
11751
+ array under a field → set ``pathToMany`` to that field. Array record (a ``groupByFields``
11752
+ export, a CSV/file group, a script that returns an array) → leave ``pathToMany`` blank; each
11753
+ element becomes one record. Live-verified 2026-09-10 on flows, Tools, and APIs.
11754
+ - |-
11755
+ Blank ``pathToMany`` on an OBJECT record fails every record with code ``oneToMany_error``:
11756
+ "Failed to extract child records from oneToMany import data. Record at index 0 was not an
11757
+ array, and no PathToMany was provided". Builder previews return only the code, with no
11758
+ message. The fix is never "turn oneToMany off" by default — first determine whether the
11759
+ record arriving at the step is an object (set a path) or an array (blank is correct; a
11760
+ preview error on an array-fed step is the preview panel re-applying one-to-many to the
11761
+ already-fanned-out record — verify with a test run or a real run).
11762
+ - |-
11763
+ Child record shape differs by mode. Path mode: each child is the array element plus
11764
+ ``_PARENT`` (the parent record minus the array). Blank/row mode: each child is the element
11765
+ itself, with no ``_PARENT``. In both modes templates on the step reference the child as
11766
+ ``{{record.<field>}}``; a response mapping on a one-to-many lookup merges into each child and
11767
+ the downstream step receives the re-joined parent (path mode) or the re-joined array (row
11768
+ mode) with every element enriched.
11769
+ - |-
11770
+ One-to-many never batches by itself: ``batch_of_records`` appears as the HTTP body template
11771
+ root only when ``http.batchSize`` is greater than 1 (children are batched after fan-out).
11772
+ With the default batch size the template root is ``record``.
10323
11773
  default: false
10324
11774
  examples:
10325
11775
  - true
@@ -10327,27 +11777,31 @@ components:
10327
11777
  PathToMany:
10328
11778
  type: string
10329
11779
  description: |
10330
- Specifies the JSON path to child records when oneToMany mode is enabled.
10331
-
10332
- This field is only used when oneToMany is set to true. It defines the exact location
10333
- of child records within the parent record structure using dot notation:
10334
-
10335
- - Simple path: "items" for a direct child array field
10336
- - Nested path: "lines.lineItems" for a more deeply nested array
10337
- - Multi-level: "details.items.subitems" for deeply nested structures
10338
-
10339
- The system uses this path to:
10340
- - Locate the array of child records within each parent record
10341
- - Extract each array element as a separate record for processing
10342
- - Make both the child record data and parent context available to downstream steps
10343
-
10344
- Important considerations:
10345
- - The path must point to an array field
10346
- - For row-based data (i.e. where Celigo models this via an array or arrays of objects), this field is not required
10347
- - If the path is invalid or doesn't exist, the resource will report success but process zero records
10348
- - Maximum path depth: 10 levels
10349
-
10350
- This field must contain a valid JSON path expression using dot notation.
11780
+ Path to the array of child records inside an object record when `oneToMany` is true, in dot
11781
+ notation (`items`, `lines.lineItems`). Leave blank when the incoming record is itself an array
11782
+ (grouped or row-based data) — each element is then a child record. A path that does not resolve
11783
+ to an array processes zero records and reports success. Read only on steps that receive a
11784
+ record (imports, lookup exports); on a standalone export it is saved and ignored — see `oneToMany`.
11785
+ x-celigo-ai-guidance:
11786
+ - |-
11787
+ Inert on a standalone export (a flow's page generator) exactly like ``oneToMany`` — the value
11788
+ is saved, the export's records reach the next step unchanged, and nothing errors
11789
+ (live-verified 2026-09-18). Splitting a standalone export's records into one per element is
11790
+ ``hooks.preSavePage`` work, or the file definition's record boundary; never this field.
11791
+ - |-
11792
+ Set this ONLY when the record entering the step is an object whose children sit under a field.
11793
+ On an array record (a ``groupByFields`` export, a CSV/file group, a script returning an array)
11794
+ any path resolves to nothing: the step processes ZERO children, builds no request, and reports
11795
+ success with no error. Live-verified 2026-09-10 — the failure is silent, so confirm the arriving
11796
+ record's shape (test run stage data, or the flow builder's input panel: ``rows`` means array).
11797
+ - |-
11798
+ Blank with an object record is the ``oneToMany_error`` failure ("Record at index 0 was not an
11799
+ array, and no PathToMany was provided"); blank with an array record is the correct row-based
11800
+ configuration. An empty string behaves exactly like an absent field.
11801
+ - |-
11802
+ Use the bare field name or dotted path (``lineItems``, ``details.items``), not a JSONPath
11803
+ expression. Each child in path mode carries ``_PARENT`` (the parent minus the array), so
11804
+ parent-level fields are read as ``{{record._PARENT.<field>}}``.
10351
11805
  examples:
10352
11806
  - items
10353
11807
  - line_items
@@ -10916,9 +12370,11 @@ components:
10916
12370
  This field supports THREE DISTINCT PATTERNS that are easily distinguished:
10917
12371
 
10918
12372
  **1. json Path Syntax**
10919
- - MUST start with '$.' prefix
12373
+ - MUST start with '$' — the record root. An object record is addressed as
12374
+ '$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
10920
12375
  - Used for precisely targeting data in structured JSON objects
10921
- - Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
12376
+ - Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
12377
+ '$[*].Tax' (every row of a grouped record)
10922
12378
  - Wildcards like [*] extract multiple values/objects
10923
12379
 
10924
12380
  ```json
@@ -10929,7 +12385,8 @@ components:
10929
12385
  - Contains '{{' and '}}' pattern
10930
12386
  - Evaluated by the AFE 2.0 handlebars template engine
10931
12387
  - Can include logic, formatting, and computation
10932
- - Access input record fields with {{record.fieldName}} notation
12388
+ - Access input record fields with {{record.fieldName}} notation; a grouped
12389
+ (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
10933
12390
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
10934
12391
  - Valid on `object`, `objectarray`, and primitive-array dataTypes as
10935
12392
  well as scalars — the rendered template output must parse into the
@@ -10940,7 +12397,7 @@ components:
10940
12397
  ```
10941
12398
 
10942
12399
  **3. Hard-Coded Value (literal string)**
10943
- - Does NOT start with '$.'
12400
+ - Does NOT start with '$'
10944
12401
  - Does NOT contain handlebars '{{' syntax
10945
12402
  - System treats it as a literal string value
10946
12403
  - VERY COMMON for setting static/constant values
@@ -10962,10 +12419,38 @@ components:
10962
12419
  - The system maintains this context even in deeply nested mappings
10963
12420
  - For object mappings without child mappings, extract should return a complete object
10964
12421
  - When both extract and mappings are defined for objects, extract is applied first
12422
+ - The root is the record as it arrives: an object record roots at `$.field`; a
12423
+ grouped record (an array of rows — grouped exports, file key columns, NetSuite
12424
+ grouped saved searches) roots at the array, so its rows are addressed as
12425
+ `$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
12426
+ record's shape resolves to nothing without an error.
10965
12427
 
10966
12428
  For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
10967
12429
  For hard-coded values, simply use the literal string as the extract value.
10968
12430
  x-celigo-ai-guidance:
12431
+ - |-
12432
+ ## GROUPED (ARRAY) RECORDS
12433
+ Decide the JSONPath root from the record's shape before writing
12434
+ any extract. When the record is an array of rows, `$.field`,
12435
+ `$.properties.field` and `$.rows[*].field` all resolve to
12436
+ nothing — the processor still reports success and the request
12437
+ body ships as `{}`. Address rows as `$[0].field` (that row's
12438
+ value, typed) or `$[*].field` (every row: joined with commas
12439
+ into a `string` destination; rejected with
12440
+ `incompatible_destination_conversion` into a `number`
12441
+ destination). Column labels with spaces work as
12442
+ `$[*][Order Number]`, `$[*].[Order Number]`, or
12443
+ `$[*]['Order Number']`. For one destination element per row
12444
+ the two array kinds take different helper forms: a primitive
12445
+ array (`stringarray` / `numberarray`) uses `buildArrayHelper:
12446
+ [{"extract": "$[*].field"}]`; an `objectarray` uses
12447
+ `buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
12448
+ with the children addressing the row relatively (`$.field`,
12449
+ `{{rows.field}}`). An `extract` placed directly on the
12450
+ array-typed field yields nothing. Handlebars
12451
+ extracts bind the array record as `rows` (`{{rows.0.field}}`),
12452
+ an object record as `record`. The reverse holds too: `$[*]` on
12453
+ an object record iterates the object's values, not rows.
10969
12454
  - |-
10970
12455
  ## SIZE LIMIT
10971
12456
  The platform's import save validator caps this field at **1024
@@ -11223,7 +12708,11 @@ components:
11223
12708
  (`$.items[*]`), `"$"` (the record root), or omission — a
11224
12709
  constructed entry (child `mappings` with the extract omitted or
11225
12710
  `"$"`; the two spellings are equivalent) contributes exactly one
11226
- element, and entries append in order. Indexed or comma-joined
12711
+ element, and entries append in order. On a grouped (array)
12712
+ record the record itself is the array to iterate: `"$[*]"`
12713
+ yields one `objectarray` element per row (children address the
12714
+ row as `$.field`), and `"$[*].field"` yields one primitive-array
12715
+ value per row. Indexed or comma-joined
11227
12716
  entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
11228
12717
  processor renders the entire destination array as null with no
11229
12718
  validation error. To emit a fixed number of static elements, add
@@ -11244,7 +12733,9 @@ components:
11244
12733
 
11245
12734
  **For Simple Arrays (stringarray, numberarray, booleanarray)**
11246
12735
  - Only the 'extract' field is used to pull values
11247
- - JSON path with wildcards (e.g., $.items[*].name) returns multiple values
12736
+ - JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
12737
+ on a grouped (array) record the record itself is the array, so the
12738
+ path roots at it ($[*].name — one value per row)
11248
12739
  - Each result is converted to the appropriate primitive type
11249
12740
  ```json
11250
12741
  {
@@ -11346,11 +12837,13 @@ components:
11346
12837
  - When both extract and mappings are provided, the system creates special composite objects
11347
12838
  that maintain hierarchical context during processing
11348
12839
  - This enables accessing both the current array element AND its parent context
11349
- - An ITERATING entry's extract MUST use JSON path syntax starting with '$.'
11350
- (e.g. '$.items[*]'). A CONSTRUCTED entry (child mappings building one element)
11351
- instead omits extract or sets it to exactly "$" — never rewrite "$" into a
11352
- '$.'-prefixed, indexed, or comma-joined form ('$[0]', '$[0],$[0]'): those render
11353
- the entire destination array as null without raising a validation error
12840
+ - An ITERATING entry's extract MUST be a JSON path that iterates an array:
12841
+ '$.items[*]' when the array is a field of an object record, or '$[*]'
12842
+ (objectarray) / '$[*].field' (primitive arrays) when the record itself is a
12843
+ grouped array of rows. A CONSTRUCTED entry (child mappings building one
12844
+ element) instead omits extract or sets it to exactly "$" — never rewrite "$"
12845
+ into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
12846
+ entire destination array as null without raising a validation error
11354
12847
  - Each array helper entry acts independently, potentially adding multiple elements
11355
12848
 
11356
12849
  The buildArrayHelper is the most complex part of the mappings system - always analyze the
@@ -11764,9 +13257,11 @@ components:
11764
13257
  This field supports THREE DISTINCT PATTERNS that are easily distinguished:
11765
13258
 
11766
13259
  **1. json Path Syntax**
11767
- - MUST start with '$.' prefix
13260
+ - MUST start with '$' — the record root. An object record is addressed as
13261
+ '$.field'; a grouped (array) record as '$[0].field' / '$[*].field'
11768
13262
  - Used for precisely targeting data in structured JSON objects
11769
- - Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street'
13263
+ - Examples: '$.customer.firstName', '$.items[0].price', '$.addresses[*].street',
13264
+ '$[*].Tax' (every row of a grouped record)
11770
13265
  - Wildcards like [*] extract multiple values/objects
11771
13266
 
11772
13267
  ```json
@@ -11777,7 +13272,8 @@ components:
11777
13272
  - Contains '{{' and '}}' pattern
11778
13273
  - Evaluated by the AFE 2.0 handlebars template engine
11779
13274
  - Can include logic, formatting, and computation
11780
- - Access input record fields with {{record.fieldName}} notation
13275
+ - Access input record fields with {{record.fieldName}} notation; a grouped
13276
+ (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
11781
13277
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
11782
13278
  - Valid on `object`, `objectarray`, and primitive-array dataTypes as
11783
13279
  well as scalars — the rendered template output must parse into the
@@ -11788,7 +13284,7 @@ components:
11788
13284
  ```
11789
13285
 
11790
13286
  **3. Hard-Coded Value (literal string)**
11791
- - Does NOT start with '$.'
13287
+ - Does NOT start with '$'
11792
13288
  - Does NOT contain handlebars '{{' syntax
11793
13289
  - System treats it as a literal string value
11794
13290
  - VERY COMMON for setting static/constant values
@@ -11810,10 +13306,38 @@ components:
11810
13306
  - The system maintains this context even in deeply nested mappings
11811
13307
  - For object mappings without child mappings, extract should return a complete object
11812
13308
  - When both extract and mappings are defined for objects, extract is applied first
13309
+ - The root is the record as it arrives: an object record roots at `$.field`; a
13310
+ grouped record (an array of rows — grouped exports, file key columns, NetSuite
13311
+ grouped saved searches) roots at the array, so its rows are addressed as
13312
+ `$[0].field` (one row) or `$[*].field` (every row). A root that contradicts the
13313
+ record's shape resolves to nothing without an error.
11813
13314
 
11814
13315
  For most simple field-to-field mappings, prefer JSON path syntax for its clarity and performance.
11815
13316
  For hard-coded values, simply use the literal string as the extract value.
11816
13317
  x-celigo-ai-guidance:
13318
+ - |-
13319
+ ## GROUPED (ARRAY) RECORDS
13320
+ Decide the JSONPath root from the record's shape before writing
13321
+ any extract. When the record is an array of rows, `$.field`,
13322
+ `$.properties.field` and `$.rows[*].field` all resolve to
13323
+ nothing — the processor still reports success and the request
13324
+ body ships as `{}`. Address rows as `$[0].field` (that row's
13325
+ value, typed) or `$[*].field` (every row: joined with commas
13326
+ into a `string` destination; rejected with
13327
+ `incompatible_destination_conversion` into a `number`
13328
+ destination). Column labels with spaces work as
13329
+ `$[*][Order Number]`, `$[*].[Order Number]`, or
13330
+ `$[*]['Order Number']`. For one destination element per row
13331
+ the two array kinds take different helper forms: a primitive
13332
+ array (`stringarray` / `numberarray`) uses `buildArrayHelper:
13333
+ [{"extract": "$[*].field"}]`; an `objectarray` uses
13334
+ `buildArrayHelper: [{"extract": "$[*]", "mappings": [...]}]`
13335
+ with the children addressing the row relatively (`$.field`,
13336
+ `{{rows.field}}`). An `extract` placed directly on the
13337
+ array-typed field yields nothing. Handlebars
13338
+ extracts bind the array record as `rows` (`{{rows.0.field}}`),
13339
+ an object record as `record`. The reverse holds too: `$[*]` on
13340
+ an object record iterates the object's values, not rows.
11817
13341
  - |-
11818
13342
  ## SIZE LIMIT
11819
13343
  The platform's import save validator caps this field at **1024
@@ -12071,7 +13595,11 @@ components:
12071
13595
  (`$.items[*]`), `"$"` (the record root), or omission — a
12072
13596
  constructed entry (child `mappings` with the extract omitted or
12073
13597
  `"$"`; the two spellings are equivalent) contributes exactly one
12074
- element, and entries append in order. Indexed or comma-joined
13598
+ element, and entries append in order. On a grouped (array)
13599
+ record the record itself is the array to iterate: `"$[*]"`
13600
+ yields one `objectarray` element per row (children address the
13601
+ row as `$.field`), and `"$[*].field"` yields one primitive-array
13602
+ value per row. Indexed or comma-joined
12075
13603
  entry extracts (`"$[0]"`, `"$[0],$[0]"`) are not valid: the
12076
13604
  processor renders the entire destination array as null with no
12077
13605
  validation error. To emit a fixed number of static elements, add
@@ -12092,7 +13620,9 @@ components:
12092
13620
 
12093
13621
  **For Simple Arrays (stringarray, numberarray, booleanarray)**
12094
13622
  - Only the 'extract' field is used to pull values
12095
- - JSON path with wildcards (e.g., $.items[*].name) returns multiple values
13623
+ - JSON path with wildcards (e.g., $.items[*].name) returns multiple values;
13624
+ on a grouped (array) record the record itself is the array, so the
13625
+ path roots at it ($[*].name — one value per row)
12096
13626
  - Each result is converted to the appropriate primitive type
12097
13627
  ```json
12098
13628
  {
@@ -12194,11 +13724,13 @@ components:
12194
13724
  - When both extract and mappings are provided, the system creates special composite objects
12195
13725
  that maintain hierarchical context during processing
12196
13726
  - This enables accessing both the current array element AND its parent context
12197
- - An ITERATING entry's extract MUST use JSON path syntax starting with '$.'
12198
- (e.g. '$.items[*]'). A CONSTRUCTED entry (child mappings building one element)
12199
- instead omits extract or sets it to exactly "$" — never rewrite "$" into a
12200
- '$.'-prefixed, indexed, or comma-joined form ('$[0]', '$[0],$[0]'): those render
12201
- the entire destination array as null without raising a validation error
13727
+ - An ITERATING entry's extract MUST be a JSON path that iterates an array:
13728
+ '$.items[*]' when the array is a field of an object record, or '$[*]'
13729
+ (objectarray) / '$[*].field' (primitive arrays) when the record itself is a
13730
+ grouped array of rows. A CONSTRUCTED entry (child mappings building one
13731
+ element) instead omits extract or sets it to exactly "$" — never rewrite "$"
13732
+ into an indexed or comma-joined form ('$[0]', '$[0],$[0]'): those render the
13733
+ entire destination array as null without raising a validation error
12202
13734
  - Each array helper entry acts independently, potentially adding multiple elements
12203
13735
 
12204
13736
  The buildArrayHelper is the most complex part of the mappings system - always analyze the
@@ -12655,6 +14187,16 @@ components:
12655
14187
  x-enumDescriptions:
12656
14188
  create: Builds entirely new output records from inputs, ignoring unmapped fields.
12657
14189
  modify: Makes targeted edits to existing records, preserving unmapped fields.
14190
+ x-celigo-ai-guidance:
14191
+ - |-
14192
+ On a grouped record (the export groups rows, so the record is an
14193
+ array) only `create` can author output — build it from the rows with
14194
+ `$[0].field`, `$[*].field`, or a `buildArrayHelper` over `$[*]`.
14195
+ `modify` has no object to overlay onto an array: the record passes
14196
+ through untouched and the processor reports success. Either mode
14197
+ reshapes the inside of one record; neither changes how many records
14198
+ the page carries (that is the export's `preSavePage` hook) or whether
14199
+ the export groups at all (that is its grouping setting).
12658
14200
  examples:
12659
14201
  - create
12660
14202
  - modify
@@ -13548,6 +15090,8 @@ components:
13548
15090
  - prepareFormData
13549
15091
  _scriptId:
13550
15092
  type: string
15093
+ format: objectId
15094
+ x-celigo-refModel: scripts
13551
15095
  description: |
13552
15096
  Reference to a predefined script resource containing the initialization function.
13553
15097
 
@@ -13616,6 +15160,8 @@ components:
13616
15160
  - prepareResourceForSave
13617
15161
  _scriptId:
13618
15162
  type: string
15163
+ format: objectId
15164
+ x-celigo-refModel: scripts
13619
15165
  description: |
13620
15166
  Reference to a predefined script resource containing the preSave function.
13621
15167
 
@@ -13684,9 +15230,12 @@ components:
13684
15230
  description: |-
13685
15231
  Connection this import uses to reach the destination system. The connection's type must
13686
15232
  be compatible with the import's `adaptorType` (e.g. an `HTTPImport` needs an `http`
15233
+ connection; `NetSuiteDistributedImport` and `NetSuiteHTTPImport` both need a `netsuite`
13687
15234
  connection). Server-required — POST without it fails with 422 "Expected field:
13688
15235
  _connectionId to be present" — except for the connection-less flavors (`ToolImport`,
13689
- `AiAgentImport`, `GuardrailImport`), which the server creates without one.
15236
+ `AiAgentImport`, `GuardrailImport`, `TopicImport`), which the server creates without
15237
+ one. An Event Streams publisher (`TopicImport`) must omit it: with a connection set the
15238
+ server validates the document as that connection's adaptor instead.
13690
15239
  examples:
13691
15240
  - 60a2c4e6f321d800129a1a3c
13692
15241
  _integrationId:
@@ -13716,9 +15265,15 @@ components:
13716
15265
  Use HTTPImport for all REST/SOAP APIs unless a specialized adaptor exists for the
13717
15266
  target system; always pair the adaptorType with its matching configuration object.
13718
15267
  - |-
13719
- For NetSuite, always use NetSuiteDistributedImport (with the netsuite_da object).
13720
- NetSuiteImport is a legacy adaptor for accounts without the Celigo SuiteApp 2.0 — do
13721
- not use it unless explicitly requested.
15268
+ For NetSuite, use NetSuiteDistributedImport (with the netsuite_da object) when the
15269
+ Celigo SuiteApp or bundle is installed in the account — check with
15270
+ `GET /v1/connections/{_id}/distributedApps` (`suiteapp.success` / `bundle.success`).
15271
+ Use NetSuiteHTTPImport (with `nsDomainType` and the http object) when neither is
15272
+ installed or the user asks for NetSuite's REST APIs; the platform's SuiteTalk connector
15273
+ catalogs `POST /services/rest/record/v1/<type>` for inserts and
15274
+ `PATCH /services/rest/record/v1/<type>/{id}` for updates, and saving links the step to
15275
+ them. NetSuiteImport is a legacy adaptor for accounts without the Celigo SuiteApp 2.0 —
15276
+ do not use it unless explicitly requested.
13722
15277
  - |-
13723
15278
  Use RDBMSImport (with the rdbms object) for built-in database types such as SQL Server,
13724
15279
  MySQL, PostgreSQL, Snowflake, Oracle, and MariaDB. Use JDBCImport (with the jdbc
@@ -13730,6 +15285,7 @@ components:
13730
15285
  - S3Import
13731
15286
  - NetSuiteImport
13732
15287
  - NetSuiteDistributedImport
15288
+ - NetSuiteHTTPImport
13733
15289
  - SalesforceImport
13734
15290
  - JDBCImport
13735
15291
  - RDBMSImport
@@ -13740,6 +15296,7 @@ components:
13740
15296
  - GuardrailImport
13741
15297
  - FileSystemImport
13742
15298
  - ToolImport
15299
+ - TopicImport
13743
15300
  - RESTImport
13744
15301
  x-enumDescriptions:
13745
15302
  HTTPImport: Generic REST or SOAP API import via HTTP connections.
@@ -13747,25 +15304,56 @@ components:
13747
15304
  AS2Import: File import via AS2 (Applicability Statement 2) protocol.
13748
15305
  S3Import: File import to Amazon S3 storage.
13749
15306
  NetSuiteImport: Legacy NetSuite import for accounts without the Celigo SuiteApp 2.0.
13750
- NetSuiteDistributedImport: NetSuite import using the distributed SuiteApp 2.0 adaptor (default for NetSuite).
15307
+ NetSuiteDistributedImport: NetSuite import using the distributed SuiteApp 2.0 adaptor (default for NetSuite when the SuiteApp or bundle is installed).
15308
+ NetSuiteHTTPImport: NetSuite import over its REST APIs — SuiteTalk REST record endpoints or a custom RESTlet — on a netsuite connection, without the Celigo SuiteApp or bundle.
13751
15309
  SalesforceImport: Salesforce-specific import using SOAP, REST, Metadata, or Composite APIs.
13752
15310
  JDBCImport: Database import via a generic JDBC connection (not for built-in RDBMS types).
13753
15311
  RDBMSImport: Database import for built-in RDBMS types such as SQL Server, MySQL, PostgreSQL, Snowflake, and Oracle.
13754
15312
  MongodbImport: MongoDB database import for document-based operations.
13755
15313
  DynamodbImport: Amazon DynamoDB import for NoSQL table operations.
13756
15314
  WrapperImport: Custom adaptor import built outside of Celigo (rarely used).
13757
- AiAgentImport: AI agent import using OpenAI, Gemini, or Anthropic Claude models for data processing.
15315
+ AiAgentImport: AI agent import using OpenAI, Gemini, Anthropic Claude, or a BYOK catalog provider (Mistral, xAI, Hugging Face, DeepSeek, Cohere, Groq) for data processing.
13758
15316
  GuardrailImport: Safety and compliance check import for PII detection, moderation, or AI evaluation.
13759
15317
  FileSystemImport: Local or network file system import.
13760
15318
  ToolImport: Import that executes a reusable Celigo Tool resource.
15319
+ TopicImport: Publishes each record as a message to an Event Streams topic, configured through `topic`; needs no connection.
13761
15320
  RESTImport: Legacy REST adaptor, superseded by HTTPImport — still accepted and present on older imports.
13762
15321
  examples:
13763
15322
  - HTTPImport
13764
15323
  - NetSuiteDistributedImport
15324
+ - NetSuiteHTTPImport
13765
15325
  - SalesforceImport
13766
15326
  - FTPImport
13767
15327
  - AiAgentImport
13768
15328
  - GuardrailImport
15329
+ - TopicImport
15330
+ nsDomainType:
15331
+ type: string
15332
+ enum:
15333
+ - suitetalk
15334
+ - restlet
15335
+ x-lowercase: true
15336
+ x-enumDescriptions:
15337
+ suitetalk: NetSuite SuiteTalk REST web services — record endpoints under /services/rest/record/v1
15338
+ restlet: A custom RESTlet script deployed in the NetSuite account, called at /app/site/hosting/restlet.nl?script=<id>&deploy=<n>
15339
+ description: |-
15340
+ Selects which NetSuite REST host a `NetSuiteHTTPImport` calls. The server derives the
15341
+ full base URL from the connection's NetSuite account
15342
+ (`https://<account>.suitetalk.api.netsuite.com` or `https://<account>.restlets.api.netsuite.com`)
15343
+ and signs each request with the connection's token-based credentials, so each
15344
+ `http.relativeURI` entry carries the complete path starting at `/services/rest/...` or
15345
+ `/app/site/hosting/restlet.nl`. Ignored on other adaptor types.
15346
+ x-celigo-ai-guidance:
15347
+ - |-
15348
+ Required on `NetSuiteHTTPImport`: omitting it fails the save with 422 "Path `nsDomainType`
15349
+ is required." The import's `_connectionId` must be a netsuite connection — an http
15350
+ connection fails with 422 invalid_connection_type.
15351
+ - |-
15352
+ With `suitetalk`, saving links `http._httpConnectorVersionId`, `_httpConnectorResourceId`
15353
+ and `_httpConnectorEndpointIds` to the platform's SuiteTalk connector from each
15354
+ `http.method` + `http.relativeURI` pair (for example `POST /services/rest/record/v1/customer`
15355
+ links to that record type's insert endpoint), so the UI's Simple view renders an
15356
+ API-authored step; `restlet` steps are not linked.
13769
15357
  externalId:
13770
15358
  type:
13771
15359
  - string
@@ -13799,6 +15387,8 @@ components:
13799
15387
  $ref: '#/components/schemas/Salesforce'
13800
15388
  tool:
13801
15389
  $ref: '#/components/schemas/Tool'
15390
+ topic:
15391
+ $ref: '#/components/schemas/Topic'
13802
15392
  file:
13803
15393
  $ref: '#/components/schemas/File'
13804
15394
  filesystem:
@@ -13974,11 +15564,21 @@ components:
13974
15564
  $ref: '#/components/schemas/PathToMany'
13975
15565
  blobKeyPath:
13976
15566
  type: string
15567
+ x-celigo-excludeAdaptorTypes:
15568
+ - AiAgentImport
15569
+ - GuardrailImport
15570
+ - ToolImport
13977
15571
  description: |-
13978
15572
  Path in the input record that holds the blob key identifying the file content to import.
13979
15573
  At send time the platform follows this path, retrieves the referenced file from integrator.io
13980
- storage, and streams its bytes into the outgoing request.
15574
+ storage, and streams its bytes into the outgoing request. Not accepted on `AiAgentImport`,
15575
+ `GuardrailImport`, or `ToolImport` — those adaptors process records only and reject the
15576
+ field with 422 `not_supported`.
13981
15577
  x-celigo-ai-guidance:
15578
+ - |-
15579
+ On AiAgentImport, GuardrailImport and ToolImport the save fails with 422 `not_supported`
15580
+ ("Field "blobKeyPath" is not supported for this import type."); route file content
15581
+ through a blob-capable import (HTTP, FTP, S3) instead.
13982
15582
  - |-
13983
15583
  The value at this path must be a blobKey produced by an upstream blob
13984
15584
  export or blob lookup and carried onto the record via that step's
@@ -14001,10 +15601,34 @@ components:
14001
15601
  - attachment.blobKey
14002
15602
  blob:
14003
15603
  type: boolean
14004
- description: When true, this import transfers raw file content (blobs) to the destination rather than structured records.
15604
+ x-celigo-excludeAdaptorTypes:
15605
+ - AiAgentImport
15606
+ - GuardrailImport
15607
+ - ToolImport
15608
+ description: |-
15609
+ When true, this import transfers raw file content (blobs) to the destination rather than
15610
+ structured records, reading each file through `blobKeyPath`. Not accepted on
15611
+ `AiAgentImport`, `GuardrailImport`, or `ToolImport` — those adaptors process records only
15612
+ and reject the flag with 422 `not_supported`.
15613
+ x-celigo-ai-guidance:
15614
+ - |-
15615
+ On AiAgentImport, GuardrailImport and ToolImport the save fails with 422 `not_supported`
15616
+ ("Field "blob" is not supported for this import type."); never set it on those adaptors.
15617
+ examples:
15618
+ - true
15619
+ - false
14005
15620
  assistant:
14006
15621
  type: string
14007
- description: Identifier for the connector assistant used to configure this import.
15622
+ description: |-
15623
+ Identifier for the connector assistant used to configure this import. For the cloud
15624
+ file providers it also selects the provider-specific location rules —
15625
+ `azuredatalakestoragegen2` (container in `file.directory.name`, file path split into
15626
+ `http.relativeURI` and `file.fileName`) and `googlecloudstorage` (bucket in
15627
+ `file.directory.storageRootId`).
15628
+ examples:
15629
+ - shopify
15630
+ - azuredatalakestoragegen2
15631
+ - googlecloudstorage
14008
15632
  deleteAfterImport:
14009
15633
  type: boolean
14010
15634
  description: When true, the source file is deleted after it is successfully imported.
@@ -14108,9 +15732,12 @@ components:
14108
15732
  format: objectId
14109
15733
  x-celigo-refModel: ediprofiles
14110
15734
  description: |-
14111
- EDI profile this import uses to generate outbound X12 EDI documents — it supplies the
14112
- envelope qualifiers, delimiters, version, and validation rules. Set it when the import
14113
- produces EDI output; omit it otherwise.
15735
+ EDI profile this import uses to generate outbound X12 or EDIFACT documents — it supplies
15736
+ the envelope qualifiers, delimiters, version, and validation rules. Set it when the
15737
+ import produces EDI output; omit it otherwise. Accepted on the file-writing imports —
15738
+ FTP, AS2, S3 and HTTP file mode (`http.type: "file"`).
15739
+ x-celigo-ai-guidance:
15740
+ - 'On an HTTP import set `http.type: "file"` (the folder mode of file-provider connectors) and pair this field with `file.type: "filedefinition"` and `file.skipAggregation: true` or `file.aggregation.type: "key"` — the platform saves EDI files per page or per key, never aggregated per run.'
14114
15741
  parsers:
14115
15742
  type: array
14116
15743
  description: |-
@@ -14769,9 +16396,9 @@ components:
14769
16396
  Fields that can be sent when creating or updating an import. Set the adaptor-specific
14770
16397
  configuration object matching `adaptorType` (e.g. `netsuite_da` for `NetSuiteDistributedImport`).
14771
16398
  `_connectionId` is required except for the connection-less flavors (`ToolImport`,
14772
- `AiAgentImport`, `GuardrailImport`): a `ToolImport` binds connections through the
14773
- referenced tool's `overrides`, and AI agent / guardrail imports only use a connection
14774
- for BYOK.
16399
+ `AiAgentImport`, `GuardrailImport`, `TopicImport`): a `ToolImport` binds connections through
16400
+ the referenced tool's `overrides`, AI agent / guardrail imports only use a connection for
16401
+ BYOK, and an Event Streams publisher (`TopicImport`) is delivered by the platform itself.
14775
16402
  required:
14776
16403
  - name
14777
16404
  allOf:
@@ -14786,15 +16413,82 @@ components:
14786
16413
  - ToolImport
14787
16414
  - AiAgentImport
14788
16415
  - GuardrailImport
16416
+ - TopicImport
14789
16417
  - required:
14790
16418
  - tool
14791
16419
  - required:
14792
16420
  - aiAgent
14793
16421
  - required:
14794
16422
  - guardrail
16423
+ - required:
16424
+ - topic
16425
+ then:
16426
+ if:
16427
+ properties:
16428
+ adaptorType:
16429
+ const: TopicImport
16430
+ required:
16431
+ - adaptorType
16432
+ then:
16433
+ x-celigo-ui-override: 'Required by the Event Streams publisher form (fieldDefinitions/resources/imports/import.js: ''topic._topicId'' is required:true). Encoded to mirror the form so builders produce publishers that are bound to a topic.'
16434
+ required:
16435
+ - topic
16436
+ properties:
16437
+ topic:
16438
+ required:
16439
+ - _topicId
14795
16440
  else:
14796
16441
  required:
14797
16442
  - _connectionId
16443
+ if:
16444
+ properties:
16445
+ adaptorType:
16446
+ const: NetSuiteHTTPImport
16447
+ required:
16448
+ - adaptorType
16449
+ then:
16450
+ required:
16451
+ - http
16452
+ - nsDomainType
16453
+ else:
16454
+ if:
16455
+ properties:
16456
+ assistant:
16457
+ const: azuredatalakestoragegen2
16458
+ required:
16459
+ - assistant
16460
+ then:
16461
+ x-celigo-ui-override: 'Required by the Azure Data Lake Storage Gen2 import form (fieldDefinitions/resources/imports/azuredatalakestoragegen2.js: container ''file.directory.storageRootId_adls'' is required:true and preSave persists it as file.directory.name; the full file path is required:true and preSave splits it into http.relativeURI (directory prefix) and file.fileName (basename)). Encoded to mirror the form so builders produce connectable configurations.'
16462
+ required:
16463
+ - file
16464
+ properties:
16465
+ file:
16466
+ required:
16467
+ - directory
16468
+ - fileName
16469
+ properties:
16470
+ directory:
16471
+ required:
16472
+ - name
16473
+ else:
16474
+ if:
16475
+ properties:
16476
+ assistant:
16477
+ const: googlecloudstorage
16478
+ required:
16479
+ - assistant
16480
+ then:
16481
+ x-celigo-ui-override: 'Required by the Google Cloud Storage import form (fieldDefinitions/resources/imports/googlecloudstorage.js: bucket ''file.directory.storageRootId_gcs'' is required:true). Encoded to mirror the form so builders produce connectable configurations.'
16482
+ required:
16483
+ - file
16484
+ properties:
16485
+ file:
16486
+ required:
16487
+ - directory
16488
+ properties:
16489
+ directory:
16490
+ required:
16491
+ - storageRootId
14798
16492
  Error:
14799
16493
  type: object
14800
16494
  description: Standard error response envelope returned by integrator.io APIs.
@@ -15227,6 +16921,13 @@ components:
15227
16921
  description: Display name of the dependent resource.
15228
16922
  examples:
15229
16923
  - Import Orders to NetSuite
16924
+ type:
16925
+ type: string
16926
+ description: |-
16927
+ Sub-type of the dependent resource when its collection distinguishes one, such as
16928
+ `stream` for a listener export. Only present for resource types that carry a `type`.
16929
+ examples:
16930
+ - stream
15230
16931
  paths:
15231
16932
  type: array
15232
16933
  description: |-