@celigo/api-specs 0.2.75 → 0.2.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai-agent.yml CHANGED
@@ -128,7 +128,8 @@ paths:
128
128
  Hugging Face, DeepSeek, Cohere, and Groq — a block that does not match the
129
129
  provider is rejected. For a built-in provider, omit `_connectionId` to
130
130
  use platform-managed credentials or include it for BYOK; a catalog
131
- provider saves without one but needs a BYOK connection to run.
131
+ provider needs a BYOK connection to save — without one the request
132
+ fails with 422 `connection_required` on `_connectionId`.
132
133
  operationId: createAiAgent
133
134
  tags:
134
135
  - AI Agents
@@ -679,8 +680,9 @@ components:
679
680
 
680
681
  A `_connectionId` on the parent import selects bring-your-own-key (BYOK)
681
682
  credentials. Without one, built-in providers run on platform-managed
682
- credentials; catalog providers have no platform-managed credentials, so they
683
- save without a connection but cannot run until one is attached.
683
+ credentials; catalog providers have no platform-managed credentials, so the
684
+ save requires one — without it the agent fails to save with 422
685
+ `connection_required` on `_connectionId`.
684
686
  required:
685
687
  - provider
686
688
  properties:
@@ -717,10 +719,11 @@ components:
717
719
  generic flat format — `model` and `modelOptions` directly on this object,
718
720
  never an `openai` or `litellm` block.
719
721
  - |-
720
- Catalog providers are BYOK-only at run time: the agent saves without a
721
- `_connectionId`, but its first run fails with 422 `invalid_request` ("No API
722
- key configured for provider …"). Always attach an HTTP connection to the
723
- vendor's API (token auth) when the provider is a catalog provider.
722
+ Catalog providers are BYOK-only, and the save enforces it: without a `_connectionId`
723
+ the agent fails to save with 422 `connection_required` on `_connectionId` ("No API
724
+ key is available for provider 'xai'. Add a connection for this provider with your
725
+ API key and select it on this agent."). Attach an HTTP connection to the vendor's
726
+ API (token auth) before saving a catalog-provider agent.
724
727
  model:
725
728
  type: string
726
729
  description: |-
@@ -732,11 +735,11 @@ components:
732
735
  Required for every catalog provider — omitting it or sending an empty string
733
736
  fails the save with 422 `missing_required_field`.
734
737
  - |-
735
- Without a `_connectionId` on the parent import the model must be one the
736
- catalog lists for the provider: an unknown id fails the save with 422
737
- `model_not_found`, a listed-but-disabled id with 422 `model_disabled`. With a
738
- `_connectionId` (BYOK) any model string saves — the server does not check it
739
- against the catalog or the vendor.
738
+ The connection is checked before the model: without a `_connectionId` on the
739
+ parent import a catalog-provider agent fails to save with 422
740
+ `connection_required` whatever the model string (an unknown id included).
741
+ With a `_connectionId` (BYOK) any model string saves — the server does not
742
+ check it against the catalog or the vendor.
740
743
  modelOptions:
741
744
  type: object
742
745
  description: |-
@@ -1060,12 +1063,22 @@ components:
1060
1063
  - manual
1061
1064
  - json
1062
1065
  x-enumDescriptions:
1063
- manual: The schema was built field-by-field in the visual editor.
1064
- json: The schema was pasted or edited as raw JSON.
1066
+ manual: The UI opens `jsonSchema` in the visual field-by-field editor
1067
+ json: The UI opens `jsonSchema` in the raw JSON editor
1065
1068
  description: |-
1066
- How the structured-output schema was authored in the UI.
1067
- Editor state only — it does not change how `jsonSchema` is
1068
- sent to the provider.
1069
+ Which editor the UI opens `jsonSchema` in; the schema sent to the provider
1070
+ is the same either way, and the field is only meaningful when `type` is
1071
+ "json_schema". Unset opens the visual editor, and an edit there rebuilds
1072
+ `jsonSchema` from the field list, keeping only `type`, `properties`,
1073
+ `required`, `items`, `description`, `enum`, `pattern`, length and numeric
1074
+ bounds, `multipleOf`, `minItems`/`maxItems` and a `"null"` type — other
1075
+ keywords are dropped without a prompt, and `integer` becomes `number`.
1076
+ x-celigo-ai-guidance:
1077
+ - |-
1078
+ Set `json` on a schema written as raw JSON; keep a user's `manual` and stay
1079
+ inside the keywords the visual editor keeps. A full PUT that omits the field
1080
+ clears it, and a value outside the enum fails the save with 422 `enum` on
1081
+ `aiAgent.openai.output.format.schemaMode`.
1069
1082
  name:
1070
1083
  type: string
1071
1084
  description: Name for the output format (used with json_schema)
@@ -1418,12 +1431,22 @@ components:
1418
1431
  - manual
1419
1432
  - json
1420
1433
  x-enumDescriptions:
1421
- manual: The schema was built field-by-field in the visual editor.
1422
- json: The schema was pasted or edited as raw JSON.
1434
+ manual: The UI opens `jsonSchema` in the visual field-by-field editor
1435
+ json: The UI opens `jsonSchema` in the raw JSON editor
1423
1436
  description: |-
1424
- How the structured-output schema was authored in the UI. Editor
1425
- state only — it does not change how `jsonSchema` is sent to the
1426
- provider.
1437
+ Which editor the UI opens `jsonSchema` in; the schema sent to the provider is
1438
+ the same either way, and the field is only meaningful when `type` is
1439
+ "json_schema". Unset opens the visual editor, and an edit there rebuilds
1440
+ `jsonSchema` from the field list, keeping only `type`, `properties`, `required`,
1441
+ `items`, `description`, `enum`, `pattern`, length and numeric bounds,
1442
+ `multipleOf`, `minItems`/`maxItems` and a `"null"` type — other keywords are
1443
+ dropped without a prompt, and `integer` becomes `number`.
1444
+ x-celigo-ai-guidance:
1445
+ - |-
1446
+ Set `json` on a schema written as raw JSON; keep a user's `manual` and stay inside
1447
+ the keywords the visual editor keeps. A full PUT that omits the field clears it,
1448
+ and a value outside the enum fails the save with 422 `enum` on
1449
+ `aiAgent.litellm.responseFormat.schemaMode`.
1427
1450
  name:
1428
1451
  type: string
1429
1452
  description: Name for the output format (used with json_schema).
@@ -5225,8 +5248,9 @@ components:
5225
5248
  Connection for BYOK (bring your own key) — an HTTP connection to the vendor's API.
5226
5249
  Optional for the built-in providers (`openai`, `gemini`, `anthropic`), which run on
5227
5250
  platform-managed credentials when it is omitted. Catalog providers (`mistral`, `xai`,
5228
- `huggingface`, `deepseek`, `cohere`, `groq`) have no platform-managed credentials: the agent
5229
- saves without one but cannot run until it is set.
5251
+ `huggingface`, `deepseek`, `cohere`, `groq`) have no platform-managed credentials: the save
5252
+ requires it — without one the agent fails to save with 422 `connection_required` on
5253
+ `_connectionId`.
5230
5254
  examples:
5231
5255
  - 662aaa6576bf4040548dbbe4
5232
5256
  _integrationId:
@@ -1536,6 +1536,345 @@ paths:
1536
1536
  - |-
1537
1537
  Read the status as the target's, not the proxy's: a 422 or 404 with a non-invalid_ref
1538
1538
  body is the downstream system's validation result for the forwarded request.
1539
+ /v1/connections/{_id}/import:
1540
+ post:
1541
+ x-internal: false
1542
+ operationId: invokeVirtualImport
1543
+ tags:
1544
+ - Connections
1545
+ summary: Run an import document through a connection
1546
+ description: |-
1547
+ Runs an import document sent in the request body — a virtual import —
1548
+ through this connection against the supplied records and returns one
1549
+ result per record, synchronously. Nothing is saved: the document can be
1550
+ an unsaved draft, a modified copy, or a saved import as fetched (`_id`
1551
+ and metadata accepted). Each record runs the document's own pipeline —
1552
+ input filter, preMap hook, mappings, postMap hook, request, postSubmit
1553
+ hook — and the request executes against the live destination: a real
1554
+ write, not a dry run; a saved `mockResponse` does not substitute. A
1555
+ record the input filter excludes comes back `ignored`, never sent.
1556
+ Adaptors `POST /v1/imports/preview` rejects with `invalid_adaptor` run
1557
+ here — NetSuite and RDBMS verified alongside HTTP.
1558
+
1559
+ The step runs with the document's own `settings` only: hooks receive
1560
+ `options.settings` with an `import` key but no `integration` or `flow`
1561
+ key and no `_flowId` / `_integrationId`; `{{settings.integration.*}}`
1562
+ and `{{settings.flow.*}}` templates render empty. A document that reads
1563
+ integration- or flow-level settings behaves differently here than in a
1564
+ flow run, and nothing in the request supplies that context. The
1565
+ connection in the path is the one used; a `_connectionId` on the
1566
+ document is ignored.
1567
+
1568
+ `POST /v1/imports/{_id}/invoke` runs a saved import the same way with
1569
+ the same per-record shape; the read-side sibling is the virtual export,
1570
+ `POST /v1/connections/{_id}/export`.
1571
+ parameters:
1572
+ - in: path
1573
+ name: _id
1574
+ required: true
1575
+ schema:
1576
+ type: string
1577
+ format: objectId
1578
+ x-celigo-refModel: connections
1579
+ examples:
1580
+ - 6a04b5309dc296c4efb1a6e0
1581
+ description: Connection the import document runs through.
1582
+ requestBody:
1583
+ required: true
1584
+ content:
1585
+ application/json:
1586
+ schema:
1587
+ type: object
1588
+ description: The import document to run and the records to run through it.
1589
+ x-celigo-ai-guidance:
1590
+ - |-
1591
+ This executes the request against the live destination — a real write, even when the
1592
+ document carries a saved `mockResponse`. Treat it like a flow run, never like a preview.
1593
+ - |-
1594
+ The step gets the document's own settings only: hooks see `options.settings = {import}`
1595
+ with no `integration` / `flow` key and no `_flowId` / `_integrationId`, and
1596
+ `{{settings.integration.*}}` / `{{settings.flow.*}}` render empty. A step whose hooks or
1597
+ templates read those settings builds a different record here than in a flow run — do
1598
+ not send it this way.
1599
+ - |-
1600
+ NetSuite and RDBMS documents run here, where `POST /v1/imports/preview` answers
1601
+ `invalid_adaptor`. A record the input filter excludes comes back
1602
+ `{ignored: true, stage: "inputFilter"}` and was never sent; omitting `data` is a
1603
+ `400 invalid_request`.
1604
+ required:
1605
+ - import
1606
+ - data
1607
+ properties:
1608
+ import:
1609
+ type: object
1610
+ description: |-
1611
+ The import document to run (mirror of the `POST /v1/imports`
1612
+ body shape); `name` and `_connectionId` are not needed, and a
1613
+ saved import's `_id` and metadata may ride along unchanged.
1614
+ Adaptor-specific blocks (`http`, `netsuite_da`, `rdbms`, …),
1615
+ `mapping`, `filter` and `hooks` apply exactly as on a saved
1616
+ import.
1617
+ additionalProperties: true
1618
+ data:
1619
+ type: array
1620
+ description: |-
1621
+ Records to run through the document, each becoming one result.
1622
+ An empty array returns an empty array; omitting `data` is
1623
+ rejected.
1624
+ items:
1625
+ type: object
1626
+ additionalProperties: true
1627
+ additionalProperties: true
1628
+ examples:
1629
+ unsaved_http_import:
1630
+ summary: Run an unsaved HTTP import against one record
1631
+ value:
1632
+ import:
1633
+ adaptorType: HTTPImport
1634
+ mapping:
1635
+ fields:
1636
+ - extract: email
1637
+ generate: Email
1638
+ lists: []
1639
+ http:
1640
+ relativeURI:
1641
+ - /post
1642
+ method:
1643
+ - POST
1644
+ requestType:
1645
+ - CREATE
1646
+ requestMediaType: json
1647
+ successMediaType: json
1648
+ sendPostMappedData: true
1649
+ formType: http
1650
+ data:
1651
+ - email: contact@acme.com
1652
+ responses:
1653
+ '200':
1654
+ description: |-
1655
+ One result per input record, in input order — accepted, failed at
1656
+ the destination, or ignored by the document's own input filter.
1657
+ content:
1658
+ application/json:
1659
+ schema:
1660
+ type: array
1661
+ items:
1662
+ $ref: '#/components/schemas/ImportRecordResult'
1663
+ examples:
1664
+ accepted:
1665
+ summary: Record accepted — the destination's response body in _json
1666
+ value:
1667
+ - statusCode: 200
1668
+ _json:
1669
+ Email: contact@acme.com
1670
+ _headers:
1671
+ content-type: application/json; charset=utf-8
1672
+ destination_rejected:
1673
+ summary: Destination rejected the record
1674
+ value:
1675
+ - statusCode: 422
1676
+ _json: {}
1677
+ errors:
1678
+ - message: 'Failed to create, update/transform record because com.netledger.common.exceptions.NLUserError: The record type [CUSTOMRECORD_ZZ] is invalid.'
1679
+ code: javaexception
1680
+ source: application
1681
+ resolved: false
1682
+ occurredAt: 1791309460117
1683
+ stage: apiCall
1684
+ classification: missing
1685
+ ignored_by_input_filter:
1686
+ summary: Record excluded by the input filter — nothing sent
1687
+ value:
1688
+ - statusCode: 200
1689
+ _json: {}
1690
+ ignored: true
1691
+ stage: inputFilter
1692
+ '400':
1693
+ description: |-
1694
+ Request body is malformed — the top-level `import` object or the
1695
+ `data` array is missing. Returned as a bare array of error objects,
1696
+ not the standard `errors` envelope.
1697
+ content:
1698
+ application/json:
1699
+ schema:
1700
+ type: array
1701
+ items:
1702
+ type: object
1703
+ properties:
1704
+ code:
1705
+ type: string
1706
+ message:
1707
+ type: string
1708
+ examples:
1709
+ missing_import:
1710
+ value:
1711
+ - code: invalid_request
1712
+ message: Request body should contain an import object details.
1713
+ missing_data:
1714
+ value:
1715
+ - code: invalid_request
1716
+ message: Request body should contain data which is to be imported.
1717
+ '401':
1718
+ $ref: '#/components/responses/401-unauthorized'
1719
+ '422':
1720
+ description: '`invalid_ref` — `_id` is not a connection in the account.'
1721
+ content:
1722
+ application/json:
1723
+ schema:
1724
+ $ref: '#/components/schemas/Error'
1725
+ examples:
1726
+ connection_not_found:
1727
+ value:
1728
+ errors:
1729
+ - field: connection
1730
+ code: invalid_ref
1731
+ message: connection not found.
1732
+ - field: _connectionId
1733
+ code: invalid_ref
1734
+ message: a9e11dc0de1ec0de00000009 is not a valid _connectionId
1735
+ /v1/connections/{_id}/export:
1736
+ post:
1737
+ x-internal: false
1738
+ operationId: invokeVirtualExport
1739
+ tags:
1740
+ - Connections
1741
+ summary: Run an export document through a connection
1742
+ description: |-
1743
+ Runs an export document sent in the request body — a virtual export —
1744
+ through this connection against the live source and returns the fetched
1745
+ records, synchronously. Nothing is saved and no job is created: the
1746
+ document can be an unsaved draft, a modified copy of a saved export, or
1747
+ a saved export as fetched. Use it to read from a system through an
1748
+ existing connection before an export exists, or to check what a changed
1749
+ export definition would return.
1750
+
1751
+ The connection in the path is the one used; a `_connectionId` on the
1752
+ document is not needed. The read executes against the live source
1753
+ (HTTP and NetSuite RESTlet searches verified) and `dataURIs` carries,
1754
+ per record, a link to the record in the source system when the adaptor
1755
+ provides one (`null` otherwise).
1756
+
1757
+ The export-side preview surfaces, `POST /v1/exports/preview` and the
1758
+ flow-scoped `POST /v1/integrations/{_integrationId}/flows/{_flowId}/exports/preview`,
1759
+ return the same records inside a stage-by-stage envelope; prefer them
1760
+ when the export's transform or filter output matters. The write-side
1761
+ sibling is the virtual import, `POST /v1/connections/{_id}/import`.
1762
+ parameters:
1763
+ - in: path
1764
+ name: _id
1765
+ required: true
1766
+ schema:
1767
+ type: string
1768
+ format: objectId
1769
+ x-celigo-refModel: connections
1770
+ examples:
1771
+ - 6a04b5309dc296c4efb1a6e0
1772
+ description: Connection the export document runs through.
1773
+ requestBody:
1774
+ required: true
1775
+ content:
1776
+ application/json:
1777
+ schema:
1778
+ type: object
1779
+ description: The export document to run.
1780
+ required:
1781
+ - export
1782
+ properties:
1783
+ export:
1784
+ type: object
1785
+ description: |-
1786
+ The export document to run (mirror of the `POST /v1/exports`
1787
+ body shape); `name` and `_connectionId` are not needed.
1788
+ Adaptor-specific blocks (`http`, `netsuite`, `rdbms`, …) apply
1789
+ exactly as on a saved export.
1790
+ additionalProperties: true
1791
+ additionalProperties: true
1792
+ examples:
1793
+ netsuite_search:
1794
+ summary: Run an ad-hoc NetSuite search by externalid
1795
+ value:
1796
+ export:
1797
+ adaptorType: NetSuiteExport
1798
+ netsuite:
1799
+ type: restlet
1800
+ skipGrouping: true
1801
+ restlet:
1802
+ recordType: customrecord_payout_variance
1803
+ restletVersion: suitebundle
1804
+ columns:
1805
+ - name: internalid
1806
+ label: internalid
1807
+ - name: externalid
1808
+ label: externalid
1809
+ criteria:
1810
+ - field: externalid
1811
+ operator: is
1812
+ searchValue: SEED-01
1813
+ responses:
1814
+ '200':
1815
+ description: The records the source returned, with a per-record link when the adaptor provides one.
1816
+ content:
1817
+ application/json:
1818
+ schema:
1819
+ type: object
1820
+ properties:
1821
+ data:
1822
+ type: array
1823
+ description: Records fetched from the source, in the order the source returned them.
1824
+ items:
1825
+ type: object
1826
+ additionalProperties: true
1827
+ dataURIs:
1828
+ type: array
1829
+ description: |-
1830
+ One entry per record in `data`: a link to the record in the
1831
+ source system when the adaptor provides one, otherwise `null`.
1832
+ items:
1833
+ type:
1834
+ - string
1835
+ - 'null'
1836
+ additionalProperties: true
1837
+ examples:
1838
+ netsuite_rows:
1839
+ summary: NetSuite search result with record links
1840
+ value:
1841
+ data:
1842
+ - id: '1'
1843
+ recordType: customrecord_payout_variance
1844
+ internalid: '1'
1845
+ externalid: SEED-01
1846
+ dataURIs:
1847
+ - https://1234567.app.netsuite.com/app/common/custom/custrecordentry.nl?rectype=923&id=1
1848
+ '400':
1849
+ description: The top-level `export` object is missing.
1850
+ content:
1851
+ application/json:
1852
+ schema:
1853
+ $ref: '#/components/schemas/Error'
1854
+ examples:
1855
+ missing_export:
1856
+ value:
1857
+ errors:
1858
+ - code: invalid_request
1859
+ message: Request body should contain an export object details.
1860
+ '401':
1861
+ $ref: '#/components/responses/401-unauthorized'
1862
+ '422':
1863
+ description: '`invalid_ref` — `_id` is not a connection in the account.'
1864
+ content:
1865
+ application/json:
1866
+ schema:
1867
+ $ref: '#/components/schemas/Error'
1868
+ examples:
1869
+ connection_not_found:
1870
+ value:
1871
+ errors:
1872
+ - field: _connectionId
1873
+ code: invalid_ref
1874
+ message: a9e11dc0de1ec0de00000009 is not a valid _connectionId
1875
+ - field: connection
1876
+ code: invalid_ref
1877
+ message: connection not found.
1539
1878
  /v1/connections/{_id}/debug:
1540
1879
  get:
1541
1880
  x-internal: false
@@ -8806,6 +9145,82 @@ components:
8806
9145
  minItems: 1
8807
9146
  items:
8808
9147
  $ref: '#/components/schemas/JsonPatchOperation'
9148
+ ImportRecordResult:
9149
+ type: object
9150
+ description: |-
9151
+ The outcome of running one input record through an import — one element
9152
+ per record, in input order — shared by `POST /v1/imports/{_id}/invoke`
9153
+ and the virtual import `POST /v1/connections/{_id}/import`. A record the
9154
+ import itself ignored before any request carries `ignored: true` and the
9155
+ `stage` that dropped it; a record the destination accepted carries its
9156
+ parsed response; a record the destination rejected — or that the
9157
+ import's `failPath` / `failValues` rules judged a failure even on a
9158
+ `2xx` — carries `errors[]`.
9159
+ properties:
9160
+ statusCode:
9161
+ type: integer
9162
+ description: |-
9163
+ HTTP status of the record's outcome. The destination's status for an
9164
+ accepted record; `422` when the import recorded a failure for the
9165
+ record — including when the destination itself answered `200` and
9166
+ the import's `failPath` rules declared it a failure.
9167
+ _json:
9168
+ type: object
9169
+ description: |-
9170
+ The destination's parsed response body for the record — the slice
9171
+ under the import's `response.resourcePath` when one is defined — not
9172
+ the record that was sent. `{}` when the record was ignored or the
9173
+ destination returned no usable body.
9174
+ additionalProperties: true
9175
+ _headers:
9176
+ type: object
9177
+ description: Response headers the destination returned for the record.
9178
+ additionalProperties: true
9179
+ ignored:
9180
+ type: boolean
9181
+ description: |-
9182
+ When true, the import dropped the record before sending anything and
9183
+ `stage` names the gate; the destination was not called for it.
9184
+ stage:
9185
+ type: string
9186
+ description: |-
9187
+ The import stage that ignored the record — `inputFilter` when the
9188
+ import's own input filter excluded it. Present only with `ignored`.
9189
+ examples:
9190
+ - inputFilter
9191
+ errors:
9192
+ type: array
9193
+ description: |-
9194
+ Errors recorded for the record. `source: application` with
9195
+ `stage: apiCall` means the request reached the destination and its
9196
+ answer was the failure; the destination's response body rides in
9197
+ `message`.
9198
+ items:
9199
+ type: object
9200
+ properties:
9201
+ source:
9202
+ type: string
9203
+ code:
9204
+ oneOf:
9205
+ - type: string
9206
+ - type: integer
9207
+ description: |-
9208
+ The adaptor's error code, or the destination's HTTP status as
9209
+ an integer when the import's `failPath` rules turned a
9210
+ successful-looking response into a failure.
9211
+ message:
9212
+ type: string
9213
+ resolved:
9214
+ type: boolean
9215
+ occurredAt:
9216
+ type: integer
9217
+ format: int64
9218
+ stage:
9219
+ type: string
9220
+ classification:
9221
+ type: string
9222
+ additionalProperties: true
9223
+ additionalProperties: true
8809
9224
  ConnectionMetadataRequest:
8810
9225
  type: object
8811
9226
  description: |-