@celigo/api-specs 0.2.80 → 0.2.82
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 +55 -20
- package/dist/export.yml +147 -743
- package/dist/flow.yml +55 -20
- package/dist/tool.yml +169 -750
- package/package.json +1 -1
- package/schemas.json +2 -2
package/dist/ai-agent.yml
CHANGED
|
@@ -3869,20 +3869,48 @@ components:
|
|
|
3869
3869
|
extracts evaluate against that envelope:
|
|
3870
3870
|
|
|
3871
3871
|
- **Lookup steps**: `{"statusCode": 200, "data": [<result records>],
|
|
3872
|
-
"errors": []}` — `data` holds the records the lookup
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3872
|
+
"errors": []}` — `data` holds the records the lookup step returns,
|
|
3873
|
+
AFTER the export's own `transform` and output `filter` have run, so
|
|
3874
|
+
extracts must start from it and name transformed fields by their
|
|
3875
|
+
transformed name: `data[0].name` copies a field of the first result,
|
|
3876
|
+
`data` copies the whole result array. A bare result-record field name
|
|
3877
|
+
(e.g. `name`) resolves to nothing and merges nothing, and so does the
|
|
3878
|
+
raw response path a transform consumed.
|
|
3877
3879
|
- **Import steps**: `{"id": "<destination record id>", "statusCode": 200,
|
|
3878
|
-
"ignored": false, "errors": [], "_json": <raw destination response
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3880
|
+
"ignored": false, "errors": [], "_json": <raw destination response>,
|
|
3881
|
+
...<response body fields flattened at the root>}` — use `id` for the
|
|
3882
|
+
destination-assigned id and `_json.<path>` (or the flattened
|
|
3883
|
+
`<path>`) for fields inside the destination's response body. The full
|
|
3884
|
+
envelope (including `id`) is present on real runs and in flow-builder
|
|
3885
|
+
previews; flow TEST runs never execute imports, and their mock-built
|
|
3886
|
+
envelope carries no `id` — an `extract: "id"` merges nothing in a test
|
|
3887
|
+
run even though it works on real runs.
|
|
3888
|
+
|
|
3889
|
+
An `extract` may also be a Handlebars expression. It evaluates against
|
|
3890
|
+
the same envelope as a plain path, so every path inside `{{ }}` starts
|
|
3891
|
+
where the plain paths start — `{{data.0.name}}`,
|
|
3892
|
+
`{{#compare data.0.count "==" 1}}yes{{else}}no{{/compare}}`,
|
|
3893
|
+
`{{#if data.length}}found{{/if}}` on a lookup; `{{_json.order.id}}` or
|
|
3894
|
+
`{{id}}` on an import. Index arrays with dots inside Handlebars
|
|
3895
|
+
(`data.0.name` or `data.[0].name`; `data[0].name` renders nothing), and
|
|
3896
|
+
expect a string result (`"1"`, `"false"`). There is no `record` object in
|
|
3897
|
+
this context: `{{record.<anything>}}` renders nothing. Prefer a plain
|
|
3898
|
+
path when the value is simply copied.
|
|
3885
3899
|
x-celigo-ai-guidance:
|
|
3900
|
+
- |-
|
|
3901
|
+
Handlebars is allowed in `extract` but only rooted at the envelope —
|
|
3902
|
+
`{{data.0.x}}` on a lookup, `{{_json.x}}` / `{{id}}` on an import. The
|
|
3903
|
+
`record.` root belongs to import-mapping templates; here every
|
|
3904
|
+
`{{record.…}}` form renders nothing, silently, and `{{data[0].x}}`
|
|
3905
|
+
(bracket index inside Handlebars) renders nothing too. Use Handlebars
|
|
3906
|
+
only for a derived value (a flag, a concatenation); copy values with a
|
|
3907
|
+
plain path.
|
|
3908
|
+
- |-
|
|
3909
|
+
A lookup's `data[]` is the step's output after its `transform` and
|
|
3910
|
+
`filter`, so author extracts against the transformed records — never
|
|
3911
|
+
against the raw response the transform consumed, and never against a
|
|
3912
|
+
saved `mockOutput` as stored (it is the raw response; the transform
|
|
3913
|
+
runs on top of it in a test run).
|
|
3886
3914
|
- |-
|
|
3887
3915
|
Send `fields` and `lists` as bare arrays, exactly as GET returns them.
|
|
3888
3916
|
Never wrap either in an object (e.g. `"fields": {"type": [...]}`): the
|
|
@@ -3924,22 +3952,29 @@ components:
|
|
|
3924
3952
|
properties:
|
|
3925
3953
|
extract:
|
|
3926
3954
|
type: string
|
|
3955
|
+
x-celigo-agent:
|
|
3956
|
+
- handlebars
|
|
3927
3957
|
description: |
|
|
3928
3958
|
Path within the canonical response envelope to copy the value
|
|
3929
|
-
from
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
`
|
|
3959
|
+
from, or a Handlebars expression over that same envelope. For
|
|
3960
|
+
lookup steps, paths start from the envelope's `data` array
|
|
3961
|
+
(`data[0].x` and `data.0.x` are equivalent; `data` alone
|
|
3962
|
+
copies every result) — a lookup result field written without
|
|
3963
|
+
the `data` prefix resolves to nothing. For import steps, use
|
|
3964
|
+
the envelope fields `id`, `statusCode`, `ignored`, `_json.<path>`
|
|
3965
|
+
for the raw response body, or the body field itself at the
|
|
3966
|
+
envelope root (`orderNumber` and `_json.orderNumber` read the
|
|
3967
|
+
same value). A `[*]` wildcard is not honored here — `data[*].x`
|
|
3968
|
+
merges nothing; iterate arrays with `lists` instead. Inside
|
|
3969
|
+
Handlebars, index with dots (`{{data.0.x}}`, never
|
|
3970
|
+
`{{data[0].x}}`) and never use a `record.` root.
|
|
3937
3971
|
examples:
|
|
3938
3972
|
- data[0].customer.name
|
|
3939
3973
|
- data.0.fields.Product Name
|
|
3940
3974
|
- data
|
|
3941
3975
|
- id
|
|
3942
3976
|
- _json.orderNumber
|
|
3977
|
+
- '{{#if data.length}}found{{else}}missing{{/if}}'
|
|
3943
3978
|
generate:
|
|
3944
3979
|
type: string
|
|
3945
3980
|
description: |
|