@celigo/api-specs 0.2.82 → 0.2.84

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.
@@ -769,7 +769,8 @@ components:
769
769
  Explicit JSON `null` is itself a valid fallback: the destination field is written as
770
770
  JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
771
771
  action). Omitting the key entirely means no fallback — the field is left out of the
772
- output when the extract is empty (the UI's "Do nothing" action).
772
+ output when the extract is empty (the UI's "Do nothing" action). Failing the record
773
+ instead is `conditional.when: fail_record_when_empty`, which excludes a default.
773
774
  x-celigo-ai-guidance:
774
775
  - |-
775
776
  `"default": null` and `"default": ""` are distinct saved values, not
@@ -778,6 +779,12 @@ components:
778
779
  Preserve them verbatim when editing or migrating a mapping — dropping
779
780
  the key changes runtime behavior from "use null/empty string as
780
781
  default value" to "do nothing" (field omitted from the output).
782
+ - |-
783
+ The four "Action to take if source field has no value" choices map to:
784
+ do nothing → no `default` key (optionally `conditional.when:
785
+ extract_not_empty`); use null → `"default": null`; use empty string or
786
+ a custom value → `"default": "<value>"`; cause the record to fail →
787
+ `conditional.when: fail_record_when_empty` with no `default` key.
781
788
  examples:
782
789
  - N/A
783
790
  - '0'
@@ -1110,6 +1117,22 @@ components:
1110
1117
  - $.order.lineItems[*]
1111
1118
  - $.parents[*].children[*]
1112
1119
  - $
1120
+ name:
1121
+ type: string
1122
+ maxLength: 200
1123
+ description: |
1124
+ Display label for this source object in the mapper, so the sources of
1125
+ an object array can be told apart instead of all showing as `$`.
1126
+ Has no effect at runtime; stored only when non-empty.
1127
+ x-celigo-ai-guidance:
1128
+ - |-
1129
+ Carry an existing `name` through every edit — it is the user's label
1130
+ for the tab, and an entry sent without it loses the label. Duplicate
1131
+ names across entries are allowed. Set one only when the user names
1132
+ the source object; never invent labels.
1133
+ examples:
1134
+ - Billing address
1135
+ - Shipping address
1113
1136
  sourceDataType:
1114
1137
  type: string
1115
1138
  description: |
@@ -1158,17 +1181,31 @@ components:
1158
1181
  type: object
1159
1182
  description: |
1160
1183
  Defines conditional rules for including each array element in the result.
1184
+ x-celigo-ai-guidance:
1185
+ - |-
1186
+ Judged against this entry's own `extract` (the array source). The
1187
+ design scopes the UI's tab-level "Action to take if source field has
1188
+ no value" to copy-as-is tabs (no child `mappings`); the API accepts
1189
+ `fail_record_when_empty` on a mapped entry as well, and the mapper
1190
+ processor honors it there — the record fails when that array is
1191
+ missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
1192
+ true`, message `<generate>: Source field has no value`; probed
1193
+ 2026-10-09). Say so when writing it on a mapped entry: the user may
1194
+ not find the setting in the mapper's tab. To fail on an empty field
1195
+ inside each element, set the action on that child mapping instead.
1161
1196
  properties:
1162
1197
  when:
1163
1198
  type: string
1164
1199
  description: |
1165
- Specifies the condition that must be met for an array element to be included.
1166
-
1167
- 'extract_not_empty' only includes elements where the extract field returns a value.
1200
+ Condition judged on the entry's extract — skip the elements the
1201
+ extract does not return, or fail the whole record when the source
1202
+ array is missing or empty.
1168
1203
  enum:
1169
1204
  - extract_not_empty
1205
+ - fail_record_when_empty
1170
1206
  x-enumDescriptions:
1171
- extract_not_empty: Include the array element only when the extract field returns a non-empty value.
1207
+ extract_not_empty: Include an array element only when the extract returns a non-empty value for it
1208
+ fail_record_when_empty: Fail the record when the entry's source array is missing or empty
1172
1209
  examples:
1173
1210
  - extract_not_empty
1174
1211
  mappings:
@@ -1268,6 +1305,20 @@ components:
1268
1305
  extract: $.price
1269
1306
  dataType: number
1270
1307
  status: Active
1308
+ if:
1309
+ properties:
1310
+ conditional:
1311
+ properties:
1312
+ when:
1313
+ const: fail_record_when_empty
1314
+ required:
1315
+ - when
1316
+ required:
1317
+ - conditional
1318
+ then:
1319
+ not:
1320
+ required:
1321
+ - default
1271
1322
  status:
1272
1323
  type: string
1273
1324
  description: |
@@ -1275,9 +1326,10 @@ components:
1275
1326
  Required on every mapping entry. Controls whether the mapping is applied.
1276
1327
 
1277
1328
  **Guidance**
1278
- Emit `"Active"` for mappings that should run; `"Draft"` saves an
1279
- in-progress mapping without the Active-only field validations. The
1280
- API rejects a mapping missing this field
1329
+ Only `Active` rows run. `Draft` and `Inactive` rows keep their
1330
+ configuration, are saved with minimal validation, and are skipped at
1331
+ runtime and in preview; a non-Active parent skips its whole subtree
1332
+ whatever its children say. The API rejects a mapping missing this field
1281
1333
  (validation error: "Mapping object must have status field present.").
1282
1334
  x-celigo-ai-guidance:
1283
1335
  - |-
@@ -1286,12 +1338,28 @@ components:
1286
1338
  field validations. The value is case-sensitive. The API rejects:
1287
1339
  - Missing field: `[status_field_absent] Mapping object must have status field present.`
1288
1340
  - Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
1341
+ - |-
1342
+ `"Inactive"` is the user's "Set inactive" on a row: use it only when
1343
+ asked to disable or park a row, never to mean incomplete (that is
1344
+ `"Draft"`). Setting a parent `Inactive` means no `Active` row may
1345
+ remain under it — the save rejects an `Active` row under an
1346
+ `Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
1347
+ no message text) and never cascades or promotes on its own; `Draft`
1348
+ descendants are kept as they are, and a `Draft` parent does not gate
1349
+ its children. The UI's Set inactive on a parent marks the parent and
1350
+ every child `Inactive` (IO-166197). Re-enabling a child
1351
+ means re-enabling its ancestors in the same payload. Edits that keep
1352
+ existing rows must carry their stored status forward — rewriting a
1353
+ `Draft` or `Inactive` row to `Active` turns a row the user parked
1354
+ back on.
1289
1355
  enum:
1290
1356
  - Active
1291
1357
  - Draft
1358
+ - Inactive
1292
1359
  x-enumDescriptions:
1293
- Active: The mapping is enabled and applied during processing.
1294
- Draft: In-progress mapping; saved without the Active-only field validations.
1360
+ Active: The mapping is enabled and applied during processing
1361
+ Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
1362
+ Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
1295
1363
  examples:
1296
1364
  - Active
1297
1365
  conditional:
@@ -1320,6 +1388,10 @@ components:
1320
1388
  - `extract_not_empty`: Apply only when the extract field returns a value
1321
1389
  Useful for conditional mapping based on input data availability
1322
1390
 
1391
+ - `fail_record_when_empty`: Fail the record when the extract field returns
1392
+ no value (the UI's "Cause record to fail" action when the source field
1393
+ has no value)
1394
+
1323
1395
  **Example**
1324
1396
  ```json
1325
1397
  {
@@ -1332,28 +1404,75 @@ components:
1332
1404
  }
1333
1405
  }
1334
1406
  ```
1407
+ x-celigo-ai-guidance:
1408
+ - |-
1409
+ `when` holds one value, and two different settings share it: the
1410
+ composite-import operation gate (`record_created` / `record_updated`,
1411
+ the UI's "Only perform mapping when") and the empty-source action
1412
+ (`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
1413
+ take if source field has no value"). A row cannot carry both — writing
1414
+ one replaces the other and the save succeeds, so a composite import
1415
+ row that needs both has to choose. Never author `fail_record_when_empty`
1416
+ on a row that already carries `record_created` or `record_updated`.
1335
1417
  properties:
1336
1418
  when:
1337
1419
  type: string
1338
1420
  description: |
1339
- Specifies the condition that triggers application of this mapping:
1340
- - record_created: Apply only when creating a new record
1341
- - record_updated: Apply only when updating an existing record
1342
- - extract_not_empty: Apply only when the extract field returns a value
1421
+ Condition that gates this mapping — either an operation gate on a
1422
+ composite (create-or-update) import or the action to take when the
1423
+ extract returns no value. Empty means null, undefined or an empty
1424
+ string; `0`, `false` and whitespace are values.
1425
+ x-celigo-ai-guidance:
1426
+ - |-
1427
+ `fail_record_when_empty` is the fourth "Action to take if source field
1428
+ has no value" and is mutually exclusive with the other three: send it
1429
+ with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
1430
+ on the same row — or a `default` on a `buildArrayHelper` entry — is
1431
+ rejected at save with `[unsupported_mapping] "<key>" and conditional.when
1432
+ "fail_record_when_empty" cannot be present in mapping simultaneously.`
1433
+ (the lookup variant adds `Use lookup "allowFailures" instead.`);
1434
+ lookups fail through `allowFailures: false`, and a hard-coded row
1435
+ always has a value. At runtime an empty extract fails the record with
1436
+ an `errors[]` entry `{code: "extract_empty", fatal: true, source:
1437
+ "mapping", message: "<generate>: Source field has no value"}`
1438
+ ("Input field has no value" in a Transformation 2.0); `0` and `false`
1439
+ are values and map through.
1343
1440
  enum:
1344
1441
  - record_created
1345
1442
  - record_updated
1346
1443
  - extract_not_empty
1444
+ - fail_record_when_empty
1347
1445
  x-enumDescriptions:
1348
- record_created: Apply this mapping only when creating a new record.
1349
- record_updated: Apply this mapping only when updating an existing record.
1350
- extract_not_empty: Apply this mapping only when the extract field returns a non-empty value.
1446
+ record_created: Apply this mapping only when creating a new record
1447
+ record_updated: Apply this mapping only when updating an existing record
1448
+ extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
1449
+ fail_record_when_empty: Fail the record when the extract field returns no value
1351
1450
  examples:
1352
1451
  - record_created
1353
1452
  - record_updated
1354
1453
  - extract_not_empty
1454
+ - fail_record_when_empty
1355
1455
  required:
1356
1456
  - dataType
1457
+ if:
1458
+ properties:
1459
+ conditional:
1460
+ properties:
1461
+ when:
1462
+ const: fail_record_when_empty
1463
+ required:
1464
+ - when
1465
+ required:
1466
+ - conditional
1467
+ then:
1468
+ not:
1469
+ anyOf:
1470
+ - required:
1471
+ - default
1472
+ - required:
1473
+ - lookupName
1474
+ - required:
1475
+ - hardCodedValue
1357
1476
  Mappings:
1358
1477
  type: array
1359
1478
  description: |
@@ -1377,6 +1496,20 @@ components:
1377
1496
 
1378
1497
  The system will process these nested structures recursively during runtime, ensuring proper construction
1379
1498
  of complex hierarchical data while maintaining excellent performance.
1499
+
1500
+ On save, a leaf row with neither a source (`extract`, `hardCodedValue`, `lookupName`) nor a
1501
+ destination (`generate`) is dropped silently, at every nesting level, and so is an object or
1502
+ object-array row left with no source, no destination and no remaining child `mappings` or
1503
+ `buildArrayHelper` entries; a row with only one of the two, and a source-less, destination-less
1504
+ wrapper that still has children, are kept.
1505
+ x-celigo-ai-guidance:
1506
+ - |-
1507
+ Rows that exist in the saved document — including `Draft` and `Inactive` rows and
1508
+ rows with only a source or only a destination — are the user's state: an edit that
1509
+ re-sends the tree must carry them through unchanged unless the user asked to change
1510
+ them. Only a row with neither source nor destination — and, for an object or
1511
+ object-array row, no remaining children — can be left out; the save would drop it
1512
+ anyway. A wrapper with children but no `generate` is kept by the save, so keep it.
1380
1513
  items:
1381
1514
  type: object
1382
1515
  properties:
@@ -1656,7 +1789,8 @@ components:
1656
1789
  Explicit JSON `null` is itself a valid fallback: the destination field is written as
1657
1790
  JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
1658
1791
  action). Omitting the key entirely means no fallback — the field is left out of the
1659
- output when the extract is empty (the UI's "Do nothing" action).
1792
+ output when the extract is empty (the UI's "Do nothing" action). Failing the record
1793
+ instead is `conditional.when: fail_record_when_empty`, which excludes a default.
1660
1794
  x-celigo-ai-guidance:
1661
1795
  - |-
1662
1796
  `"default": null` and `"default": ""` are distinct saved values, not
@@ -1665,6 +1799,12 @@ components:
1665
1799
  Preserve them verbatim when editing or migrating a mapping — dropping
1666
1800
  the key changes runtime behavior from "use null/empty string as
1667
1801
  default value" to "do nothing" (field omitted from the output).
1802
+ - |-
1803
+ The four "Action to take if source field has no value" choices map to:
1804
+ do nothing → no `default` key (optionally `conditional.when:
1805
+ extract_not_empty`); use null → `"default": null`; use empty string or
1806
+ a custom value → `"default": "<value>"`; cause the record to fail →
1807
+ `conditional.when: fail_record_when_empty` with no `default` key.
1668
1808
  examples:
1669
1809
  - N/A
1670
1810
  - '0'
@@ -1997,6 +2137,22 @@ components:
1997
2137
  - $.order.lineItems[*]
1998
2138
  - $.parents[*].children[*]
1999
2139
  - $
2140
+ name:
2141
+ type: string
2142
+ maxLength: 200
2143
+ description: |
2144
+ Display label for this source object in the mapper, so the sources of
2145
+ an object array can be told apart instead of all showing as `$`.
2146
+ Has no effect at runtime; stored only when non-empty.
2147
+ x-celigo-ai-guidance:
2148
+ - |-
2149
+ Carry an existing `name` through every edit — it is the user's label
2150
+ for the tab, and an entry sent without it loses the label. Duplicate
2151
+ names across entries are allowed. Set one only when the user names
2152
+ the source object; never invent labels.
2153
+ examples:
2154
+ - Billing address
2155
+ - Shipping address
2000
2156
  sourceDataType:
2001
2157
  type: string
2002
2158
  description: |
@@ -2045,17 +2201,31 @@ components:
2045
2201
  type: object
2046
2202
  description: |
2047
2203
  Defines conditional rules for including each array element in the result.
2204
+ x-celigo-ai-guidance:
2205
+ - |-
2206
+ Judged against this entry's own `extract` (the array source). The
2207
+ design scopes the UI's tab-level "Action to take if source field has
2208
+ no value" to copy-as-is tabs (no child `mappings`); the API accepts
2209
+ `fail_record_when_empty` on a mapped entry as well, and the mapper
2210
+ processor honors it there — the record fails when that array is
2211
+ missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
2212
+ true`, message `<generate>: Source field has no value`; probed
2213
+ 2026-10-09). Say so when writing it on a mapped entry: the user may
2214
+ not find the setting in the mapper's tab. To fail on an empty field
2215
+ inside each element, set the action on that child mapping instead.
2048
2216
  properties:
2049
2217
  when:
2050
2218
  type: string
2051
2219
  description: |
2052
- Specifies the condition that must be met for an array element to be included.
2053
-
2054
- 'extract_not_empty' only includes elements where the extract field returns a value.
2220
+ Condition judged on the entry's extract — skip the elements the
2221
+ extract does not return, or fail the whole record when the source
2222
+ array is missing or empty.
2055
2223
  enum:
2056
2224
  - extract_not_empty
2225
+ - fail_record_when_empty
2057
2226
  x-enumDescriptions:
2058
- extract_not_empty: Include the array element only when the extract field returns a non-empty value.
2227
+ extract_not_empty: Include an array element only when the extract returns a non-empty value for it
2228
+ fail_record_when_empty: Fail the record when the entry's source array is missing or empty
2059
2229
  examples:
2060
2230
  - extract_not_empty
2061
2231
  mappings:
@@ -2155,6 +2325,20 @@ components:
2155
2325
  extract: $.price
2156
2326
  dataType: number
2157
2327
  status: Active
2328
+ if:
2329
+ properties:
2330
+ conditional:
2331
+ properties:
2332
+ when:
2333
+ const: fail_record_when_empty
2334
+ required:
2335
+ - when
2336
+ required:
2337
+ - conditional
2338
+ then:
2339
+ not:
2340
+ required:
2341
+ - default
2158
2342
  status:
2159
2343
  type: string
2160
2344
  description: |
@@ -2162,9 +2346,10 @@ components:
2162
2346
  Required on every mapping entry. Controls whether the mapping is applied.
2163
2347
 
2164
2348
  **Guidance**
2165
- Emit `"Active"` for mappings that should run; `"Draft"` saves an
2166
- in-progress mapping without the Active-only field validations. The
2167
- API rejects a mapping missing this field
2349
+ Only `Active` rows run. `Draft` and `Inactive` rows keep their
2350
+ configuration, are saved with minimal validation, and are skipped at
2351
+ runtime and in preview; a non-Active parent skips its whole subtree
2352
+ whatever its children say. The API rejects a mapping missing this field
2168
2353
  (validation error: "Mapping object must have status field present.").
2169
2354
  x-celigo-ai-guidance:
2170
2355
  - |-
@@ -2173,12 +2358,28 @@ components:
2173
2358
  field validations. The value is case-sensitive. The API rejects:
2174
2359
  - Missing field: `[status_field_absent] Mapping object must have status field present.`
2175
2360
  - Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
2361
+ - |-
2362
+ `"Inactive"` is the user's "Set inactive" on a row: use it only when
2363
+ asked to disable or park a row, never to mean incomplete (that is
2364
+ `"Draft"`). Setting a parent `Inactive` means no `Active` row may
2365
+ remain under it — the save rejects an `Active` row under an
2366
+ `Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
2367
+ no message text) and never cascades or promotes on its own; `Draft`
2368
+ descendants are kept as they are, and a `Draft` parent does not gate
2369
+ its children. The UI's Set inactive on a parent marks the parent and
2370
+ every child `Inactive` (IO-166197). Re-enabling a child
2371
+ means re-enabling its ancestors in the same payload. Edits that keep
2372
+ existing rows must carry their stored status forward — rewriting a
2373
+ `Draft` or `Inactive` row to `Active` turns a row the user parked
2374
+ back on.
2176
2375
  enum:
2177
2376
  - Active
2178
2377
  - Draft
2378
+ - Inactive
2179
2379
  x-enumDescriptions:
2180
- Active: The mapping is enabled and applied during processing.
2181
- Draft: In-progress mapping; saved without the Active-only field validations.
2380
+ Active: The mapping is enabled and applied during processing
2381
+ Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
2382
+ Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
2182
2383
  examples:
2183
2384
  - Active
2184
2385
  conditional:
@@ -2207,6 +2408,10 @@ components:
2207
2408
  - `extract_not_empty`: Apply only when the extract field returns a value
2208
2409
  Useful for conditional mapping based on input data availability
2209
2410
 
2411
+ - `fail_record_when_empty`: Fail the record when the extract field returns
2412
+ no value (the UI's "Cause record to fail" action when the source field
2413
+ has no value)
2414
+
2210
2415
  **Example**
2211
2416
  ```json
2212
2417
  {
@@ -2219,28 +2424,75 @@ components:
2219
2424
  }
2220
2425
  }
2221
2426
  ```
2427
+ x-celigo-ai-guidance:
2428
+ - |-
2429
+ `when` holds one value, and two different settings share it: the
2430
+ composite-import operation gate (`record_created` / `record_updated`,
2431
+ the UI's "Only perform mapping when") and the empty-source action
2432
+ (`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
2433
+ take if source field has no value"). A row cannot carry both — writing
2434
+ one replaces the other and the save succeeds, so a composite import
2435
+ row that needs both has to choose. Never author `fail_record_when_empty`
2436
+ on a row that already carries `record_created` or `record_updated`.
2222
2437
  properties:
2223
2438
  when:
2224
2439
  type: string
2225
2440
  description: |
2226
- Specifies the condition that triggers application of this mapping:
2227
- - record_created: Apply only when creating a new record
2228
- - record_updated: Apply only when updating an existing record
2229
- - extract_not_empty: Apply only when the extract field returns a value
2441
+ Condition that gates this mapping — either an operation gate on a
2442
+ composite (create-or-update) import or the action to take when the
2443
+ extract returns no value. Empty means null, undefined or an empty
2444
+ string; `0`, `false` and whitespace are values.
2445
+ x-celigo-ai-guidance:
2446
+ - |-
2447
+ `fail_record_when_empty` is the fourth "Action to take if source field
2448
+ has no value" and is mutually exclusive with the other three: send it
2449
+ with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
2450
+ on the same row — or a `default` on a `buildArrayHelper` entry — is
2451
+ rejected at save with `[unsupported_mapping] "<key>" and conditional.when
2452
+ "fail_record_when_empty" cannot be present in mapping simultaneously.`
2453
+ (the lookup variant adds `Use lookup "allowFailures" instead.`);
2454
+ lookups fail through `allowFailures: false`, and a hard-coded row
2455
+ always has a value. At runtime an empty extract fails the record with
2456
+ an `errors[]` entry `{code: "extract_empty", fatal: true, source:
2457
+ "mapping", message: "<generate>: Source field has no value"}`
2458
+ ("Input field has no value" in a Transformation 2.0); `0` and `false`
2459
+ are values and map through.
2230
2460
  enum:
2231
2461
  - record_created
2232
2462
  - record_updated
2233
2463
  - extract_not_empty
2464
+ - fail_record_when_empty
2234
2465
  x-enumDescriptions:
2235
- record_created: Apply this mapping only when creating a new record.
2236
- record_updated: Apply this mapping only when updating an existing record.
2237
- extract_not_empty: Apply this mapping only when the extract field returns a non-empty value.
2466
+ record_created: Apply this mapping only when creating a new record
2467
+ record_updated: Apply this mapping only when updating an existing record
2468
+ extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
2469
+ fail_record_when_empty: Fail the record when the extract field returns no value
2238
2470
  examples:
2239
2471
  - record_created
2240
2472
  - record_updated
2241
2473
  - extract_not_empty
2474
+ - fail_record_when_empty
2242
2475
  required:
2243
2476
  - dataType
2477
+ if:
2478
+ properties:
2479
+ conditional:
2480
+ properties:
2481
+ when:
2482
+ const: fail_record_when_empty
2483
+ required:
2484
+ - when
2485
+ required:
2486
+ - conditional
2487
+ then:
2488
+ not:
2489
+ anyOf:
2490
+ - required:
2491
+ - default
2492
+ - required:
2493
+ - lookupName
2494
+ - required:
2495
+ - hardCodedValue
2244
2496
  Lookups:
2245
2497
  type: array
2246
2498
  description: |