@celigo/api-specs 0.2.83 → 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.
package/dist/import.yml CHANGED
@@ -12628,7 +12628,8 @@ components:
12628
12628
  Explicit JSON `null` is itself a valid fallback: the destination field is written as
12629
12629
  JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
12630
12630
  action). Omitting the key entirely means no fallback — the field is left out of the
12631
- output when the extract is empty (the UI's "Do nothing" action).
12631
+ output when the extract is empty (the UI's "Do nothing" action). Failing the record
12632
+ instead is `conditional.when: fail_record_when_empty`, which excludes a default.
12632
12633
  x-celigo-ai-guidance:
12633
12634
  - |-
12634
12635
  `"default": null` and `"default": ""` are distinct saved values, not
@@ -12637,6 +12638,12 @@ components:
12637
12638
  Preserve them verbatim when editing or migrating a mapping — dropping
12638
12639
  the key changes runtime behavior from "use null/empty string as
12639
12640
  default value" to "do nothing" (field omitted from the output).
12641
+ - |-
12642
+ The four "Action to take if source field has no value" choices map to:
12643
+ do nothing → no `default` key (optionally `conditional.when:
12644
+ extract_not_empty`); use null → `"default": null`; use empty string or
12645
+ a custom value → `"default": "<value>"`; cause the record to fail →
12646
+ `conditional.when: fail_record_when_empty` with no `default` key.
12640
12647
  examples:
12641
12648
  - N/A
12642
12649
  - '0'
@@ -12969,6 +12976,22 @@ components:
12969
12976
  - $.order.lineItems[*]
12970
12977
  - $.parents[*].children[*]
12971
12978
  - $
12979
+ name:
12980
+ type: string
12981
+ maxLength: 200
12982
+ description: |
12983
+ Display label for this source object in the mapper, so the sources of
12984
+ an object array can be told apart instead of all showing as `$`.
12985
+ Has no effect at runtime; stored only when non-empty.
12986
+ x-celigo-ai-guidance:
12987
+ - |-
12988
+ Carry an existing `name` through every edit — it is the user's label
12989
+ for the tab, and an entry sent without it loses the label. Duplicate
12990
+ names across entries are allowed. Set one only when the user names
12991
+ the source object; never invent labels.
12992
+ examples:
12993
+ - Billing address
12994
+ - Shipping address
12972
12995
  sourceDataType:
12973
12996
  type: string
12974
12997
  description: |
@@ -13017,17 +13040,31 @@ components:
13017
13040
  type: object
13018
13041
  description: |
13019
13042
  Defines conditional rules for including each array element in the result.
13043
+ x-celigo-ai-guidance:
13044
+ - |-
13045
+ Judged against this entry's own `extract` (the array source). The
13046
+ design scopes the UI's tab-level "Action to take if source field has
13047
+ no value" to copy-as-is tabs (no child `mappings`); the API accepts
13048
+ `fail_record_when_empty` on a mapped entry as well, and the mapper
13049
+ processor honors it there — the record fails when that array is
13050
+ missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
13051
+ true`, message `<generate>: Source field has no value`; probed
13052
+ 2026-10-09). Say so when writing it on a mapped entry: the user may
13053
+ not find the setting in the mapper's tab. To fail on an empty field
13054
+ inside each element, set the action on that child mapping instead.
13020
13055
  properties:
13021
13056
  when:
13022
13057
  type: string
13023
13058
  description: |
13024
- Specifies the condition that must be met for an array element to be included.
13025
-
13026
- 'extract_not_empty' only includes elements where the extract field returns a value.
13059
+ Condition judged on the entry's extract — skip the elements the
13060
+ extract does not return, or fail the whole record when the source
13061
+ array is missing or empty.
13027
13062
  enum:
13028
13063
  - extract_not_empty
13064
+ - fail_record_when_empty
13029
13065
  x-enumDescriptions:
13030
- extract_not_empty: Include the array element only when the extract field returns a non-empty value.
13066
+ extract_not_empty: Include an array element only when the extract returns a non-empty value for it
13067
+ fail_record_when_empty: Fail the record when the entry's source array is missing or empty
13031
13068
  examples:
13032
13069
  - extract_not_empty
13033
13070
  mappings:
@@ -13127,6 +13164,20 @@ components:
13127
13164
  extract: $.price
13128
13165
  dataType: number
13129
13166
  status: Active
13167
+ if:
13168
+ properties:
13169
+ conditional:
13170
+ properties:
13171
+ when:
13172
+ const: fail_record_when_empty
13173
+ required:
13174
+ - when
13175
+ required:
13176
+ - conditional
13177
+ then:
13178
+ not:
13179
+ required:
13180
+ - default
13130
13181
  status:
13131
13182
  type: string
13132
13183
  description: |
@@ -13134,9 +13185,10 @@ components:
13134
13185
  Required on every mapping entry. Controls whether the mapping is applied.
13135
13186
 
13136
13187
  **Guidance**
13137
- Emit `"Active"` for mappings that should run; `"Draft"` saves an
13138
- in-progress mapping without the Active-only field validations. The
13139
- API rejects a mapping missing this field
13188
+ Only `Active` rows run. `Draft` and `Inactive` rows keep their
13189
+ configuration, are saved with minimal validation, and are skipped at
13190
+ runtime and in preview; a non-Active parent skips its whole subtree
13191
+ whatever its children say. The API rejects a mapping missing this field
13140
13192
  (validation error: "Mapping object must have status field present.").
13141
13193
  x-celigo-ai-guidance:
13142
13194
  - |-
@@ -13145,12 +13197,28 @@ components:
13145
13197
  field validations. The value is case-sensitive. The API rejects:
13146
13198
  - Missing field: `[status_field_absent] Mapping object must have status field present.`
13147
13199
  - Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
13200
+ - |-
13201
+ `"Inactive"` is the user's "Set inactive" on a row: use it only when
13202
+ asked to disable or park a row, never to mean incomplete (that is
13203
+ `"Draft"`). Setting a parent `Inactive` means no `Active` row may
13204
+ remain under it — the save rejects an `Active` row under an
13205
+ `Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
13206
+ no message text) and never cascades or promotes on its own; `Draft`
13207
+ descendants are kept as they are, and a `Draft` parent does not gate
13208
+ its children. The UI's Set inactive on a parent marks the parent and
13209
+ every child `Inactive` (IO-166197). Re-enabling a child
13210
+ means re-enabling its ancestors in the same payload. Edits that keep
13211
+ existing rows must carry their stored status forward — rewriting a
13212
+ `Draft` or `Inactive` row to `Active` turns a row the user parked
13213
+ back on.
13148
13214
  enum:
13149
13215
  - Active
13150
13216
  - Draft
13217
+ - Inactive
13151
13218
  x-enumDescriptions:
13152
- Active: The mapping is enabled and applied during processing.
13153
- Draft: In-progress mapping; saved without the Active-only field validations.
13219
+ Active: The mapping is enabled and applied during processing
13220
+ Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
13221
+ Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
13154
13222
  examples:
13155
13223
  - Active
13156
13224
  conditional:
@@ -13179,6 +13247,10 @@ components:
13179
13247
  - `extract_not_empty`: Apply only when the extract field returns a value
13180
13248
  Useful for conditional mapping based on input data availability
13181
13249
 
13250
+ - `fail_record_when_empty`: Fail the record when the extract field returns
13251
+ no value (the UI's "Cause record to fail" action when the source field
13252
+ has no value)
13253
+
13182
13254
  **Example**
13183
13255
  ```json
13184
13256
  {
@@ -13191,28 +13263,75 @@ components:
13191
13263
  }
13192
13264
  }
13193
13265
  ```
13266
+ x-celigo-ai-guidance:
13267
+ - |-
13268
+ `when` holds one value, and two different settings share it: the
13269
+ composite-import operation gate (`record_created` / `record_updated`,
13270
+ the UI's "Only perform mapping when") and the empty-source action
13271
+ (`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
13272
+ take if source field has no value"). A row cannot carry both — writing
13273
+ one replaces the other and the save succeeds, so a composite import
13274
+ row that needs both has to choose. Never author `fail_record_when_empty`
13275
+ on a row that already carries `record_created` or `record_updated`.
13194
13276
  properties:
13195
13277
  when:
13196
13278
  type: string
13197
13279
  description: |
13198
- Specifies the condition that triggers application of this mapping:
13199
- - record_created: Apply only when creating a new record
13200
- - record_updated: Apply only when updating an existing record
13201
- - extract_not_empty: Apply only when the extract field returns a value
13280
+ Condition that gates this mapping — either an operation gate on a
13281
+ composite (create-or-update) import or the action to take when the
13282
+ extract returns no value. Empty means null, undefined or an empty
13283
+ string; `0`, `false` and whitespace are values.
13284
+ x-celigo-ai-guidance:
13285
+ - |-
13286
+ `fail_record_when_empty` is the fourth "Action to take if source field
13287
+ has no value" and is mutually exclusive with the other three: send it
13288
+ with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
13289
+ on the same row — or a `default` on a `buildArrayHelper` entry — is
13290
+ rejected at save with `[unsupported_mapping] "<key>" and conditional.when
13291
+ "fail_record_when_empty" cannot be present in mapping simultaneously.`
13292
+ (the lookup variant adds `Use lookup "allowFailures" instead.`);
13293
+ lookups fail through `allowFailures: false`, and a hard-coded row
13294
+ always has a value. At runtime an empty extract fails the record with
13295
+ an `errors[]` entry `{code: "extract_empty", fatal: true, source:
13296
+ "mapping", message: "<generate>: Source field has no value"}`
13297
+ ("Input field has no value" in a Transformation 2.0); `0` and `false`
13298
+ are values and map through.
13202
13299
  enum:
13203
13300
  - record_created
13204
13301
  - record_updated
13205
13302
  - extract_not_empty
13303
+ - fail_record_when_empty
13206
13304
  x-enumDescriptions:
13207
- record_created: Apply this mapping only when creating a new record.
13208
- record_updated: Apply this mapping only when updating an existing record.
13209
- extract_not_empty: Apply this mapping only when the extract field returns a non-empty value.
13305
+ record_created: Apply this mapping only when creating a new record
13306
+ record_updated: Apply this mapping only when updating an existing record
13307
+ extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
13308
+ fail_record_when_empty: Fail the record when the extract field returns no value
13210
13309
  examples:
13211
13310
  - record_created
13212
13311
  - record_updated
13213
13312
  - extract_not_empty
13313
+ - fail_record_when_empty
13214
13314
  required:
13215
13315
  - dataType
13316
+ if:
13317
+ properties:
13318
+ conditional:
13319
+ properties:
13320
+ when:
13321
+ const: fail_record_when_empty
13322
+ required:
13323
+ - when
13324
+ required:
13325
+ - conditional
13326
+ then:
13327
+ not:
13328
+ anyOf:
13329
+ - required:
13330
+ - default
13331
+ - required:
13332
+ - lookupName
13333
+ - required:
13334
+ - hardCodedValue
13216
13335
  Mappings:
13217
13336
  type: array
13218
13337
  description: |
@@ -13236,6 +13355,20 @@ components:
13236
13355
 
13237
13356
  The system will process these nested structures recursively during runtime, ensuring proper construction
13238
13357
  of complex hierarchical data while maintaining excellent performance.
13358
+
13359
+ On save, a leaf row with neither a source (`extract`, `hardCodedValue`, `lookupName`) nor a
13360
+ destination (`generate`) is dropped silently, at every nesting level, and so is an object or
13361
+ object-array row left with no source, no destination and no remaining child `mappings` or
13362
+ `buildArrayHelper` entries; a row with only one of the two, and a source-less, destination-less
13363
+ wrapper that still has children, are kept.
13364
+ x-celigo-ai-guidance:
13365
+ - |-
13366
+ Rows that exist in the saved document — including `Draft` and `Inactive` rows and
13367
+ rows with only a source or only a destination — are the user's state: an edit that
13368
+ re-sends the tree must carry them through unchanged unless the user asked to change
13369
+ them. Only a row with neither source nor destination — and, for an object or
13370
+ object-array row, no remaining children — can be left out; the save would drop it
13371
+ anyway. A wrapper with children but no `generate` is kept by the save, so keep it.
13239
13372
  items:
13240
13373
  type: object
13241
13374
  properties:
@@ -13515,7 +13648,8 @@ components:
13515
13648
  Explicit JSON `null` is itself a valid fallback: the destination field is written as
13516
13649
  JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
13517
13650
  action). Omitting the key entirely means no fallback — the field is left out of the
13518
- output when the extract is empty (the UI's "Do nothing" action).
13651
+ output when the extract is empty (the UI's "Do nothing" action). Failing the record
13652
+ instead is `conditional.when: fail_record_when_empty`, which excludes a default.
13519
13653
  x-celigo-ai-guidance:
13520
13654
  - |-
13521
13655
  `"default": null` and `"default": ""` are distinct saved values, not
@@ -13524,6 +13658,12 @@ components:
13524
13658
  Preserve them verbatim when editing or migrating a mapping — dropping
13525
13659
  the key changes runtime behavior from "use null/empty string as
13526
13660
  default value" to "do nothing" (field omitted from the output).
13661
+ - |-
13662
+ The four "Action to take if source field has no value" choices map to:
13663
+ do nothing → no `default` key (optionally `conditional.when:
13664
+ extract_not_empty`); use null → `"default": null`; use empty string or
13665
+ a custom value → `"default": "<value>"`; cause the record to fail →
13666
+ `conditional.when: fail_record_when_empty` with no `default` key.
13527
13667
  examples:
13528
13668
  - N/A
13529
13669
  - '0'
@@ -13856,6 +13996,22 @@ components:
13856
13996
  - $.order.lineItems[*]
13857
13997
  - $.parents[*].children[*]
13858
13998
  - $
13999
+ name:
14000
+ type: string
14001
+ maxLength: 200
14002
+ description: |
14003
+ Display label for this source object in the mapper, so the sources of
14004
+ an object array can be told apart instead of all showing as `$`.
14005
+ Has no effect at runtime; stored only when non-empty.
14006
+ x-celigo-ai-guidance:
14007
+ - |-
14008
+ Carry an existing `name` through every edit — it is the user's label
14009
+ for the tab, and an entry sent without it loses the label. Duplicate
14010
+ names across entries are allowed. Set one only when the user names
14011
+ the source object; never invent labels.
14012
+ examples:
14013
+ - Billing address
14014
+ - Shipping address
13859
14015
  sourceDataType:
13860
14016
  type: string
13861
14017
  description: |
@@ -13904,17 +14060,31 @@ components:
13904
14060
  type: object
13905
14061
  description: |
13906
14062
  Defines conditional rules for including each array element in the result.
14063
+ x-celigo-ai-guidance:
14064
+ - |-
14065
+ Judged against this entry's own `extract` (the array source). The
14066
+ design scopes the UI's tab-level "Action to take if source field has
14067
+ no value" to copy-as-is tabs (no child `mappings`); the API accepts
14068
+ `fail_record_when_empty` on a mapped entry as well, and the mapper
14069
+ processor honors it there — the record fails when that array is
14070
+ missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
14071
+ true`, message `<generate>: Source field has no value`; probed
14072
+ 2026-10-09). Say so when writing it on a mapped entry: the user may
14073
+ not find the setting in the mapper's tab. To fail on an empty field
14074
+ inside each element, set the action on that child mapping instead.
13907
14075
  properties:
13908
14076
  when:
13909
14077
  type: string
13910
14078
  description: |
13911
- Specifies the condition that must be met for an array element to be included.
13912
-
13913
- 'extract_not_empty' only includes elements where the extract field returns a value.
14079
+ Condition judged on the entry's extract — skip the elements the
14080
+ extract does not return, or fail the whole record when the source
14081
+ array is missing or empty.
13914
14082
  enum:
13915
14083
  - extract_not_empty
14084
+ - fail_record_when_empty
13916
14085
  x-enumDescriptions:
13917
- extract_not_empty: Include the array element only when the extract field returns a non-empty value.
14086
+ extract_not_empty: Include an array element only when the extract returns a non-empty value for it
14087
+ fail_record_when_empty: Fail the record when the entry's source array is missing or empty
13918
14088
  examples:
13919
14089
  - extract_not_empty
13920
14090
  mappings:
@@ -14014,6 +14184,20 @@ components:
14014
14184
  extract: $.price
14015
14185
  dataType: number
14016
14186
  status: Active
14187
+ if:
14188
+ properties:
14189
+ conditional:
14190
+ properties:
14191
+ when:
14192
+ const: fail_record_when_empty
14193
+ required:
14194
+ - when
14195
+ required:
14196
+ - conditional
14197
+ then:
14198
+ not:
14199
+ required:
14200
+ - default
14017
14201
  status:
14018
14202
  type: string
14019
14203
  description: |
@@ -14021,9 +14205,10 @@ components:
14021
14205
  Required on every mapping entry. Controls whether the mapping is applied.
14022
14206
 
14023
14207
  **Guidance**
14024
- Emit `"Active"` for mappings that should run; `"Draft"` saves an
14025
- in-progress mapping without the Active-only field validations. The
14026
- API rejects a mapping missing this field
14208
+ Only `Active` rows run. `Draft` and `Inactive` rows keep their
14209
+ configuration, are saved with minimal validation, and are skipped at
14210
+ runtime and in preview; a non-Active parent skips its whole subtree
14211
+ whatever its children say. The API rejects a mapping missing this field
14027
14212
  (validation error: "Mapping object must have status field present.").
14028
14213
  x-celigo-ai-guidance:
14029
14214
  - |-
@@ -14032,12 +14217,28 @@ components:
14032
14217
  field validations. The value is case-sensitive. The API rejects:
14033
14218
  - Missing field: `[status_field_absent] Mapping object must have status field present.`
14034
14219
  - Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
14220
+ - |-
14221
+ `"Inactive"` is the user's "Set inactive" on a row: use it only when
14222
+ asked to disable or park a row, never to mean incomplete (that is
14223
+ `"Draft"`). Setting a parent `Inactive` means no `Active` row may
14224
+ remain under it — the save rejects an `Active` row under an
14225
+ `Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
14226
+ no message text) and never cascades or promotes on its own; `Draft`
14227
+ descendants are kept as they are, and a `Draft` parent does not gate
14228
+ its children. The UI's Set inactive on a parent marks the parent and
14229
+ every child `Inactive` (IO-166197). Re-enabling a child
14230
+ means re-enabling its ancestors in the same payload. Edits that keep
14231
+ existing rows must carry their stored status forward — rewriting a
14232
+ `Draft` or `Inactive` row to `Active` turns a row the user parked
14233
+ back on.
14035
14234
  enum:
14036
14235
  - Active
14037
14236
  - Draft
14237
+ - Inactive
14038
14238
  x-enumDescriptions:
14039
- Active: The mapping is enabled and applied during processing.
14040
- Draft: In-progress mapping; saved without the Active-only field validations.
14239
+ Active: The mapping is enabled and applied during processing
14240
+ Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
14241
+ Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
14041
14242
  examples:
14042
14243
  - Active
14043
14244
  conditional:
@@ -14066,6 +14267,10 @@ components:
14066
14267
  - `extract_not_empty`: Apply only when the extract field returns a value
14067
14268
  Useful for conditional mapping based on input data availability
14068
14269
 
14270
+ - `fail_record_when_empty`: Fail the record when the extract field returns
14271
+ no value (the UI's "Cause record to fail" action when the source field
14272
+ has no value)
14273
+
14069
14274
  **Example**
14070
14275
  ```json
14071
14276
  {
@@ -14078,28 +14283,75 @@ components:
14078
14283
  }
14079
14284
  }
14080
14285
  ```
14286
+ x-celigo-ai-guidance:
14287
+ - |-
14288
+ `when` holds one value, and two different settings share it: the
14289
+ composite-import operation gate (`record_created` / `record_updated`,
14290
+ the UI's "Only perform mapping when") and the empty-source action
14291
+ (`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
14292
+ take if source field has no value"). A row cannot carry both — writing
14293
+ one replaces the other and the save succeeds, so a composite import
14294
+ row that needs both has to choose. Never author `fail_record_when_empty`
14295
+ on a row that already carries `record_created` or `record_updated`.
14081
14296
  properties:
14082
14297
  when:
14083
14298
  type: string
14084
14299
  description: |
14085
- Specifies the condition that triggers application of this mapping:
14086
- - record_created: Apply only when creating a new record
14087
- - record_updated: Apply only when updating an existing record
14088
- - extract_not_empty: Apply only when the extract field returns a value
14300
+ Condition that gates this mapping — either an operation gate on a
14301
+ composite (create-or-update) import or the action to take when the
14302
+ extract returns no value. Empty means null, undefined or an empty
14303
+ string; `0`, `false` and whitespace are values.
14304
+ x-celigo-ai-guidance:
14305
+ - |-
14306
+ `fail_record_when_empty` is the fourth "Action to take if source field
14307
+ has no value" and is mutually exclusive with the other three: send it
14308
+ with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
14309
+ on the same row — or a `default` on a `buildArrayHelper` entry — is
14310
+ rejected at save with `[unsupported_mapping] "<key>" and conditional.when
14311
+ "fail_record_when_empty" cannot be present in mapping simultaneously.`
14312
+ (the lookup variant adds `Use lookup "allowFailures" instead.`);
14313
+ lookups fail through `allowFailures: false`, and a hard-coded row
14314
+ always has a value. At runtime an empty extract fails the record with
14315
+ an `errors[]` entry `{code: "extract_empty", fatal: true, source:
14316
+ "mapping", message: "<generate>: Source field has no value"}`
14317
+ ("Input field has no value" in a Transformation 2.0); `0` and `false`
14318
+ are values and map through.
14089
14319
  enum:
14090
14320
  - record_created
14091
14321
  - record_updated
14092
14322
  - extract_not_empty
14323
+ - fail_record_when_empty
14093
14324
  x-enumDescriptions:
14094
- record_created: Apply this mapping only when creating a new record.
14095
- record_updated: Apply this mapping only when updating an existing record.
14096
- extract_not_empty: Apply this mapping only when the extract field returns a non-empty value.
14325
+ record_created: Apply this mapping only when creating a new record
14326
+ record_updated: Apply this mapping only when updating an existing record
14327
+ extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
14328
+ fail_record_when_empty: Fail the record when the extract field returns no value
14097
14329
  examples:
14098
14330
  - record_created
14099
14331
  - record_updated
14100
14332
  - extract_not_empty
14333
+ - fail_record_when_empty
14101
14334
  required:
14102
14335
  - dataType
14336
+ if:
14337
+ properties:
14338
+ conditional:
14339
+ properties:
14340
+ when:
14341
+ const: fail_record_when_empty
14342
+ required:
14343
+ - when
14344
+ required:
14345
+ - conditional
14346
+ then:
14347
+ not:
14348
+ anyOf:
14349
+ - required:
14350
+ - default
14351
+ - required:
14352
+ - lookupName
14353
+ - required:
14354
+ - hardCodedValue
14103
14355
  Transform:
14104
14356
  type: object
14105
14357
  description: |