@celigo/api-specs 0.2.162 → 0.2.164
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 +20 -11
- package/dist/asynchelper.yml +19 -10
- package/dist/audit.yml +5 -5
- package/dist/export.yml +63 -26
- package/dist/guardrail.yml +8 -7
- package/dist/iclient.yml +3 -2
- package/dist/import.yml +79 -37
- package/dist/script.yml +15 -2
- package/dist/tool.yml +121 -47
- package/dist/tradingpartnerconnector.yml +3 -1
- package/package.json +1 -1
- package/schemas.json +1305 -1316
package/dist/import.yml
CHANGED
|
@@ -1978,6 +1978,12 @@ components:
|
|
|
1978
1978
|
Avoid bare ``{{{jsonSerialize record}}}`` with no wrapper — leave the field undefined instead.
|
|
1979
1979
|
Also avoid wrapping a single post-mapped scalar field in ``jsonSerialize`` (e.g.
|
|
1980
1980
|
``{{{jsonSerialize record.<scalar>}}}``) — that pattern is brittle.
|
|
1981
|
+
- |-
|
|
1982
|
+
In a JSON body, write a string value with double braces inside the quotes
|
|
1983
|
+
(``"{{record.name}}"``): double braces JSON-escape the value at run time, with no HTML
|
|
1984
|
+
escaping. Triple braces insert the raw text, so a value holding a double quote,
|
|
1985
|
+
backslash, newline or tab fails that record with 422 ``invalid_json`` before anything
|
|
1986
|
+
is sent.
|
|
1981
1987
|
- |-
|
|
1982
1988
|
Every request context carries two data roots: ``data`` — the list of records in
|
|
1983
1989
|
the request, always present (Pattern B) — and ONE shape-specific root that follows
|
|
@@ -2107,10 +2113,12 @@ components:
|
|
|
2107
2113
|
is almost certainly the "leave body undefined" case (the
|
|
2108
2114
|
destination just wants the mapped record as JSON) or Pattern C
|
|
2109
2115
|
(use ``{{sku}}`` / ``{{quantity}}`` directly without
|
|
2110
|
-
``jsonSerialize`` inside a per-message envelope).
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2116
|
+
``jsonSerialize`` inside a per-message envelope). To embed a
|
|
2117
|
+
scalar in a JSON string literal, use double braces inside the
|
|
2118
|
+
quotes (``"{{record.<field>}}"``) WITHOUT ``jsonSerialize``;
|
|
2119
|
+
triple braces there fail on a quote, backslash, newline or tab
|
|
2120
|
+
in the value. The anti-pattern is specifically the
|
|
2121
|
+
``jsonSerialize`` wrap.
|
|
2114
2122
|
- |-
|
|
2115
2123
|
## Multipart/form-data uploads are a different body contract
|
|
2116
2124
|
|
|
@@ -5188,8 +5196,10 @@ components:
|
|
|
5188
5196
|
`extract` to pick the column when the query returns multiple.
|
|
5189
5197
|
Inject values from the incoming record with Handlebars and the
|
|
5190
5198
|
`record.` prefix — double braces for strings, which the platform
|
|
5191
|
-
quotes
|
|
5192
|
-
`SELECT id FROM users WHERE email = {{record.email}}`.
|
|
5199
|
+
quotes, escaping their apostrophes, and triple braces for numbers:
|
|
5200
|
+
`SELECT id FROM users WHERE email = {{record.email}}`. On Snowflake
|
|
5201
|
+
the quoting leaves backslashes, which Snowflake reads as escape
|
|
5202
|
+
sequences (see `query`).
|
|
5193
5203
|
extract:
|
|
5194
5204
|
type: string
|
|
5195
5205
|
description: |
|
|
@@ -5237,10 +5247,11 @@ components:
|
|
|
5237
5247
|
description: |-
|
|
5238
5248
|
SQL statements to execute; required when queryType is `["per_record"]`, `["per_page"]`, or `["first_page"]`, and typically contains a single statement.
|
|
5239
5249
|
Each element is a complete SQL statement as a plain string — never a single bare string and never an array of objects (objects cause a Cast error).
|
|
5240
|
-
Inject values from the incoming record with Handlebars using the `record.` prefix: double braces for strings and dates (`{{record.name}}`; the platform quotes and escapes
|
|
5250
|
+
Inject values from the incoming record with Handlebars using the `record.` prefix: double braces for strings and dates (`{{record.name}}`; the platform quotes the value and escapes its apostrophes) and triple braces for numbers (`{{{record.quantity}}}`).
|
|
5241
5251
|
Rendering is strict: a reference the render model cannot resolve (a bare `{{name}}` without prefix, or `record.*` when the arriving record is a grouped array) fails the step with `cannot_evaluate_handlebars` — it does not render an empty value.
|
|
5242
5252
|
`record` and `rows` are aliases chosen by the arriving data's shape: an object record binds `record` (`rows` undefined); a grouped array-record (e.g. upstream `groupByFields`) binds `rows` (`record` undefined) — address grouped rows as `{{rows.0.field}}` or iterate `{{#each rows}}`.
|
|
5243
|
-
Double braces (`{{record.field}}`) output
|
|
5253
|
+
Double braces (`{{record.field}}`) output a string value wrapped in single quotes with embedded quotes doubled, while triple braces output it raw; block helpers such as `{{#each}}` and `{{#if}}` use double braces as normal. In Snowflake queries a JSON number or boolean renders bare under double braces too (observed in export queries).
|
|
5254
|
+
On Snowflake, the quoting leaves backslashes, which Snowflake reads as escape sequences: a double-brace value holding a backslash arrives changed, and `PARSE_JSON({{jsonSerialize …}})` fails on a double quote or line break in the data (observed in export queries). Pass such values in a dollar-quoted constant with triple braces (`$${{{record.field}}}$$`), which Snowflake reads as is, but only when the value can't contain `$$`: a `$$` in it ends the constant, and the rest is read as SQL.
|
|
5244
5255
|
x-celigo-ai-guidance:
|
|
5245
5256
|
- |-
|
|
5246
5257
|
Use Handlebars to inject values from incoming records.
|
|
@@ -5268,14 +5279,18 @@ components:
|
|
|
5268
5279
|
- **Double-brace `{{record.field}}` vs. triple-brace `{{{record.field}}}`
|
|
5269
5280
|
is a QUOTING CHOICE, not a syntax rule.** In RDBMS context the
|
|
5270
5281
|
platform's Handlebars renderer treats double-brace specially: it
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5282
|
+
wraps a string value as a SQL string literal (single-quoted, with
|
|
5283
|
+
its apostrophes escaped), and in Snowflake export queries a number
|
|
5284
|
+
or boolean rendered bare, whether a JSON value or a numeric
|
|
5285
|
+
helper's result (`{{add 2 3}}`). Triple-brace emits the raw value
|
|
5286
|
+
with no quoting. In the same queries the wrapping was also seen on
|
|
5287
|
+
string helper output (`dateFormat`, `jsonSerialize`) and on
|
|
5288
|
+
`{{this}}` inside `{{#each}}`.
|
|
5274
5289
|
|
|
5275
5290
|
- `{{record.name}}` → `'Alice'` (auto-single-quoted, embedded `'` doubled to `''`)
|
|
5276
|
-
- `{{{record.name}}}` → `Alice` (raw
|
|
5277
|
-
- `{{record.qty}}` → `'5'`
|
|
5278
|
-
- `{{{record.qty}}}` → `5` (numeric literal — what you usually want for INT columns)
|
|
5291
|
+
- `{{{record.name}}}` → `Alice` (raw — never wrap it in single quotes of your own: the first apostrophe in the data ends the literal)
|
|
5292
|
+
- `{{record.qty}}` → `'5'` when `qty` arrives as the string `"5"`; a JSON number rendered bare in Snowflake export queries
|
|
5293
|
+
- `{{{record.qty}}}` → `5` (numeric literal either way — what you usually want for INT columns)
|
|
5279
5294
|
|
|
5280
5295
|
Pick by what the SQL needs at that slot:
|
|
5281
5296
|
|
|
@@ -5285,8 +5300,21 @@ components:
|
|
|
5285
5300
|
| Numeric column value (INT, DECIMAL, ...) | `{{{record.field}}}` |
|
|
5286
5301
|
| Stored procedure raw arg (already typed) | `{{{record.field}}}` |
|
|
5287
5302
|
| Identifier (table/column name) | `{{{record.field}}}` |
|
|
5288
|
-
| JSON literal (`PARSE_JSON
|
|
5289
|
-
|
|
5303
|
+
| JSON literal, Snowflake (`PARSE_JSON`) | `PARSE_JSON($${{{jsonSerialize record.subobject}}}$$)` (a dollar-quoted constant, read as is; only for data that can't contain `$$`, which ends it) |
|
|
5304
|
+
| JSON literal, PostgreSQL (`JSONB`) | `{{jsonSerialize record.subobject}}` (renders the JSON as a quoted string; not yet verified on PostgreSQL) |
|
|
5305
|
+
|
|
5306
|
+
- **Snowflake reads backslashes as escapes.** The double-brace
|
|
5307
|
+
quoting doubles embedded apostrophes but leaves backslashes, and
|
|
5308
|
+
Snowflake interprets backslash sequences inside a single-quoted
|
|
5309
|
+
literal: a value holding `C:\temp` arrives with a tab in it, with
|
|
5310
|
+
no error, and `PARSE_JSON({{jsonSerialize …}})` fails with
|
|
5311
|
+
`Error parsing JSON` whenever a string in the object holds a double
|
|
5312
|
+
quote or a line break, because `jsonSerialize` escapes those with
|
|
5313
|
+
backslashes (observed in export queries). For values that can hold
|
|
5314
|
+
these characters, use a dollar-quoted constant with triple braces
|
|
5315
|
+
(`$${{{record.field}}}$$`), which Snowflake reads as is, but only
|
|
5316
|
+
when the value can't contain `$$`: a `$$` in it ends the constant,
|
|
5317
|
+
and the rest is read as SQL.
|
|
5290
5318
|
- **Block helpers** (`{{#each}}`, `{{#if}}`, `{{/each}}`,
|
|
5291
5319
|
`{{#unless}}`) use double braces as normal — they emit no value.
|
|
5292
5320
|
- **Nested fields**: `{{record.properties.email}}` (auto-quoted)
|
|
@@ -5300,7 +5328,7 @@ components:
|
|
|
5300
5328
|
- UPSERT (MySQL): `["INSERT INTO users (id, name) VALUES ({{{record.id}}}, {{record.name}}) ON DUPLICATE KEY UPDATE name = {{record.name}}"]`
|
|
5301
5329
|
- MERGE (Snowflake): `["MERGE INTO target USING (SELECT {{record.email}} AS email) AS src ON target.email = src.email WHEN MATCHED THEN UPDATE SET name = {{record.name}}"]`
|
|
5302
5330
|
- Stored procedure (raw args): `["call netsuite.transformation_data_import({{record.record_type}}, 20)"]`
|
|
5303
|
-
- JSON literal column (Snowflake VARIANT): `["INSERT INTO events (payload) SELECT PARSE_JSON({{jsonSerialize record.financialEvents}})"]`
|
|
5331
|
+
- JSON literal column (Snowflake VARIANT; the data must not contain `$$`): `["INSERT INTO events (payload) SELECT PARSE_JSON($${{{jsonSerialize record.financialEvents}}}$$)"]`
|
|
5304
5332
|
- Per-page batch (different Handlebars context — see `queryType: per_page` below): `["{{#each batch_of_records}}UPDATE staging SET done=1 WHERE id={{{this.record.id}}};{{/each}}"]`
|
|
5305
5333
|
examples:
|
|
5306
5334
|
- - INSERT INTO orders (id, total) VALUES ({{{record.id}}}, {{{record.total}}})
|
|
@@ -9681,7 +9709,7 @@ components:
|
|
|
9681
9709
|
description: Property names the model must include in the structured output.
|
|
9682
9710
|
items:
|
|
9683
9711
|
type: string
|
|
9684
|
-
|
|
9712
|
+
additionalProperties:
|
|
9685
9713
|
type: boolean
|
|
9686
9714
|
description: When true, the structured output may include properties beyond those defined in `properties`.
|
|
9687
9715
|
schema:
|
|
@@ -11072,7 +11100,7 @@ components:
|
|
|
11072
11100
|
description: Property names the stored JSON Schema marks as required.
|
|
11073
11101
|
items:
|
|
11074
11102
|
type: string
|
|
11075
|
-
|
|
11103
|
+
additionalProperties:
|
|
11076
11104
|
type: boolean
|
|
11077
11105
|
description: Whether the stored JSON Schema allows properties beyond those in `properties`.
|
|
11078
11106
|
schema:
|
|
@@ -12655,7 +12683,8 @@ components:
|
|
|
12655
12683
|
fields. There is no separate `date` enum value.
|
|
12656
12684
|
|
|
12657
12685
|
**Complex Types (require additional configuration)**
|
|
12658
|
-
- `object`: Creates a nested object
|
|
12686
|
+
- `object`: Creates a nested object from child mappings in the 'mappings' array, or
|
|
12687
|
+
copies a whole object with `extract` (one or the other, not both)
|
|
12659
12688
|
|
|
12660
12689
|
**Array Types**
|
|
12661
12690
|
- `stringarray`: Array of strings
|
|
@@ -12703,7 +12732,7 @@ components:
|
|
|
12703
12732
|
string: Text values; converts other types to their string representation.
|
|
12704
12733
|
number: Numeric values; attempts conversion from strings.
|
|
12705
12734
|
boolean: True/false values; converts truthy/falsy values.
|
|
12706
|
-
object: Nested object
|
|
12735
|
+
object: Nested object built from child `mappings`, or copied whole with `extract` (not both).
|
|
12707
12736
|
stringarray: Array of string values.
|
|
12708
12737
|
numberarray: Array of numeric values.
|
|
12709
12738
|
booleanarray: Array of boolean values.
|
|
@@ -12781,7 +12810,10 @@ components:
|
|
|
12781
12810
|
- JSON path patterns ALWAYS execute from the TOP-LEVEL root of the input record
|
|
12782
12811
|
- The system maintains this context even in deeply nested mappings
|
|
12783
12812
|
- For object mappings without child mappings, extract should return a complete object
|
|
12784
|
-
-
|
|
12813
|
+
- An `object` row takes `extract` (to copy a whole object) or child `mappings`, not
|
|
12814
|
+
both: a row with both fails with 422 (`"extract" should not be present if
|
|
12815
|
+
"mappings" field is present`). A `buildArrayHelper` entry is different: there
|
|
12816
|
+
`extract` and `mappings` work together.
|
|
12785
12817
|
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
12786
12818
|
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
12787
12819
|
grouped saved searches) roots at the array, so its rows are addressed as
|
|
@@ -13735,7 +13767,8 @@ components:
|
|
|
13735
13767
|
fields. There is no separate `date` enum value.
|
|
13736
13768
|
|
|
13737
13769
|
**Complex Types (require additional configuration)**
|
|
13738
|
-
- `object`: Creates a nested object
|
|
13770
|
+
- `object`: Creates a nested object from child mappings in the 'mappings' array, or
|
|
13771
|
+
copies a whole object with `extract` (one or the other, not both)
|
|
13739
13772
|
|
|
13740
13773
|
**Array Types**
|
|
13741
13774
|
- `stringarray`: Array of strings
|
|
@@ -13783,7 +13816,7 @@ components:
|
|
|
13783
13816
|
string: Text values; converts other types to their string representation.
|
|
13784
13817
|
number: Numeric values; attempts conversion from strings.
|
|
13785
13818
|
boolean: True/false values; converts truthy/falsy values.
|
|
13786
|
-
object: Nested object
|
|
13819
|
+
object: Nested object built from child `mappings`, or copied whole with `extract` (not both).
|
|
13787
13820
|
stringarray: Array of string values.
|
|
13788
13821
|
numberarray: Array of numeric values.
|
|
13789
13822
|
booleanarray: Array of boolean values.
|
|
@@ -13861,7 +13894,10 @@ components:
|
|
|
13861
13894
|
- JSON path patterns ALWAYS execute from the TOP-LEVEL root of the input record
|
|
13862
13895
|
- The system maintains this context even in deeply nested mappings
|
|
13863
13896
|
- For object mappings without child mappings, extract should return a complete object
|
|
13864
|
-
-
|
|
13897
|
+
- An `object` row takes `extract` (to copy a whole object) or child `mappings`, not
|
|
13898
|
+
both: a row with both fails with 422 (`"extract" should not be present if
|
|
13899
|
+
"mappings" field is present`). A `buildArrayHelper` entry is different: there
|
|
13900
|
+
`extract` and `mappings` work together.
|
|
13865
13901
|
- The root is the record as it arrives: an object record roots at `$.field`; a
|
|
13866
13902
|
grouped record (an array of rows — grouped exports, file key columns, NetSuite
|
|
13867
13903
|
grouped saved searches) roots at the array, so its rows are addressed as
|
|
@@ -15000,10 +15036,11 @@ components:
|
|
|
15000
15036
|
ALWAYS reference the `record` root regardless of
|
|
15001
15037
|
`inputContext` — only JSONPath anchoring flips.
|
|
15002
15038
|
- |-
|
|
15003
|
-
In `envelope` mode
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15039
|
+
In `envelope` mode the output is still a bare record: a
|
|
15040
|
+
`modify` transform returns the record with its mapped
|
|
15041
|
+
fields merged in (no `record` wrapper, no `job` or
|
|
15042
|
+
`settings` keys), and a `create` transform returns only
|
|
15043
|
+
the mapped fields.
|
|
15007
15044
|
- |-
|
|
15008
15045
|
Emit `inputContext` explicitly on new v2 transforms:
|
|
15009
15046
|
unset is read as `record`, but stating it makes the
|
|
@@ -15183,13 +15220,14 @@ components:
|
|
|
15183
15220
|
type: string
|
|
15184
15221
|
description: |
|
|
15185
15222
|
Source expression. Accepts:
|
|
15186
|
-
-
|
|
15223
|
+
- A dot path from the record root (e.g. `email`, `address.city`), read from the
|
|
15224
|
+
incoming record. A path that matches no field writes nothing.
|
|
15187
15225
|
- Handlebars template (contains `{{`) for concatenation /
|
|
15188
15226
|
formatting / conditional logic (e.g.
|
|
15189
15227
|
`{{record.firstName}} {{record.lastName}}`).
|
|
15190
|
-
- A literal string (any value not starting with `$.` and not
|
|
15191
|
-
containing `{{`) — treated as a hardcoded value.
|
|
15192
15228
|
|
|
15229
|
+
A `$.` JSONPath (the Mapper 2.0 `mappings` syntax) reads nothing here, and a bare
|
|
15230
|
+
string is read as a field path, not a constant: set constants in `hardCodedValue`.
|
|
15193
15231
|
Omit when using `hardCodedValue`.
|
|
15194
15232
|
examples:
|
|
15195
15233
|
- address.city
|
|
@@ -15200,9 +15238,9 @@ components:
|
|
|
15200
15238
|
description: Static value written to `generate` instead of extracting from the source record.
|
|
15201
15239
|
x-celigo-ai-guidance:
|
|
15202
15240
|
- |-
|
|
15203
|
-
Static value written verbatim.
|
|
15204
|
-
|
|
15205
|
-
|
|
15241
|
+
Static value written verbatim. Use it for every constant: a bare
|
|
15242
|
+
string in ``extract`` is read as a field path. Mutually exclusive
|
|
15243
|
+
with ``extract``.
|
|
15206
15244
|
dataType:
|
|
15207
15245
|
type: string
|
|
15208
15246
|
enum:
|
|
@@ -15965,7 +16003,10 @@ components:
|
|
|
15965
16003
|
type: string
|
|
15966
16004
|
format: objectId
|
|
15967
16005
|
x-celigo-refModel: connectors
|
|
15968
|
-
description:
|
|
16006
|
+
description: |-
|
|
16007
|
+
Connector this import was created from, set when the import is part of an installed
|
|
16008
|
+
integration app. The app's install sets it: a create that sends it is refused with 403
|
|
16009
|
+
("Cannot create an Integration App resource").
|
|
15969
16010
|
examples:
|
|
15970
16011
|
- 60a2c4e6f321d800129a1a3c
|
|
15971
16012
|
adaptorType:
|
|
@@ -16507,7 +16548,8 @@ components:
|
|
|
16507
16548
|
description: |-
|
|
16508
16549
|
Custom JavaScript hooks that run at fixed points in the import lifecycle for
|
|
16509
16550
|
transformations, validation, and custom result handling beyond what configuration alone
|
|
16510
|
-
can express.
|
|
16551
|
+
can express. A hook name not listed here (an export's `preSavePage`, for example) is
|
|
16552
|
+
dropped on save without an error, so read `hooks` back after saving.
|
|
16511
16553
|
x-celigo-ai-guidance:
|
|
16512
16554
|
- |-
|
|
16513
16555
|
JavaScript hook references attached to lifecycle stages of the import.
|
package/dist/script.yml
CHANGED
|
@@ -376,7 +376,8 @@ paths:
|
|
|
376
376
|
`nextPageURL` means that slice held nothing while the rest of the window is still
|
|
377
377
|
unread — follow the cursor until a response arrives without one. Only an empty
|
|
378
378
|
`logs` array with no `nextPageURL` means the window holds no entries. To read a
|
|
379
|
-
known run in one call, set `time_lte` a few seconds after the run ended
|
|
379
|
+
known run in one call, set `time_lte` a few seconds after the run ended and
|
|
380
|
+
`time_gt` just before it started (`time_lte` needs `time_gt`).
|
|
380
381
|
tags:
|
|
381
382
|
- Scripts
|
|
382
383
|
operationId: getScriptLogs
|
|
@@ -394,7 +395,8 @@ paths:
|
|
|
394
395
|
required: false
|
|
395
396
|
description: |-
|
|
396
397
|
Upper bound of the time window (inclusive), as epoch milliseconds. Defaults to now if
|
|
397
|
-
omitted. Reading starts here and proceeds backward.
|
|
398
|
+
omitted. Reading starts here and proceeds backward. Send it with `time_gt`: `time_lte`
|
|
399
|
+
alone fails with 422 ("Invalid or Missing Field: time_gt").
|
|
398
400
|
schema:
|
|
399
401
|
type: integer
|
|
400
402
|
format: int64
|
|
@@ -513,6 +515,17 @@ paths:
|
|
|
513
515
|
$ref: '#/components/responses/401-unauthorized'
|
|
514
516
|
'404':
|
|
515
517
|
$ref: '#/components/responses/404-not-found'
|
|
518
|
+
'422':
|
|
519
|
+
description: Invalid time window — `time_lte` without `time_gt`.
|
|
520
|
+
content:
|
|
521
|
+
application/json:
|
|
522
|
+
schema:
|
|
523
|
+
$ref: '#/components/schemas/Error'
|
|
524
|
+
examples:
|
|
525
|
+
missing_time_gt:
|
|
526
|
+
value:
|
|
527
|
+
errors:
|
|
528
|
+
- message: 'Invalid or Missing Field: time_gt'
|
|
516
529
|
delete:
|
|
517
530
|
x-internal: false
|
|
518
531
|
operationId: deleteScriptLogs
|