@celigo/api-specs 0.2.83 → 0.2.85

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
@@ -2382,7 +2382,8 @@ components:
2382
2382
  Explicit JSON `null` is itself a valid fallback: the destination field is written as
2383
2383
  JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
2384
2384
  action). Omitting the key entirely means no fallback — the field is left out of the
2385
- output when the extract is empty (the UI's "Do nothing" action).
2385
+ output when the extract is empty (the UI's "Do nothing" action). Failing the record
2386
+ instead is `conditional.when: fail_record_when_empty`, which excludes a default.
2386
2387
  x-celigo-ai-guidance:
2387
2388
  - |-
2388
2389
  `"default": null` and `"default": ""` are distinct saved values, not
@@ -2391,6 +2392,12 @@ components:
2391
2392
  Preserve them verbatim when editing or migrating a mapping — dropping
2392
2393
  the key changes runtime behavior from "use null/empty string as
2393
2394
  default value" to "do nothing" (field omitted from the output).
2395
+ - |-
2396
+ The four "Action to take if source field has no value" choices map to:
2397
+ do nothing → no `default` key (optionally `conditional.when:
2398
+ extract_not_empty`); use null → `"default": null`; use empty string or
2399
+ a custom value → `"default": "<value>"`; cause the record to fail →
2400
+ `conditional.when: fail_record_when_empty` with no `default` key.
2394
2401
  examples:
2395
2402
  - N/A
2396
2403
  - '0'
@@ -2723,6 +2730,22 @@ components:
2723
2730
  - $.order.lineItems[*]
2724
2731
  - $.parents[*].children[*]
2725
2732
  - $
2733
+ name:
2734
+ type: string
2735
+ maxLength: 200
2736
+ description: |
2737
+ Display label for this source object in the mapper, so the sources of
2738
+ an object array can be told apart instead of all showing as `$`.
2739
+ Has no effect at runtime; stored only when non-empty.
2740
+ x-celigo-ai-guidance:
2741
+ - |-
2742
+ Carry an existing `name` through every edit — it is the user's label
2743
+ for the tab, and an entry sent without it loses the label. Duplicate
2744
+ names across entries are allowed. Set one only when the user names
2745
+ the source object; never invent labels.
2746
+ examples:
2747
+ - Billing address
2748
+ - Shipping address
2726
2749
  sourceDataType:
2727
2750
  type: string
2728
2751
  description: |
@@ -2771,17 +2794,31 @@ components:
2771
2794
  type: object
2772
2795
  description: |
2773
2796
  Defines conditional rules for including each array element in the result.
2797
+ x-celigo-ai-guidance:
2798
+ - |-
2799
+ Judged against this entry's own `extract` (the array source). The
2800
+ design scopes the UI's tab-level "Action to take if source field has
2801
+ no value" to copy-as-is tabs (no child `mappings`); the API accepts
2802
+ `fail_record_when_empty` on a mapped entry as well, and the mapper
2803
+ processor honors it there — the record fails when that array is
2804
+ missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
2805
+ true`, message `<generate>: Source field has no value`; probed
2806
+ 2026-10-09). Say so when writing it on a mapped entry: the user may
2807
+ not find the setting in the mapper's tab. To fail on an empty field
2808
+ inside each element, set the action on that child mapping instead.
2774
2809
  properties:
2775
2810
  when:
2776
2811
  type: string
2777
2812
  description: |
2778
- Specifies the condition that must be met for an array element to be included.
2779
-
2780
- 'extract_not_empty' only includes elements where the extract field returns a value.
2813
+ Condition judged on the entry's extract — skip the elements the
2814
+ extract does not return, or fail the whole record when the source
2815
+ array is missing or empty.
2781
2816
  enum:
2782
2817
  - extract_not_empty
2818
+ - fail_record_when_empty
2783
2819
  x-enumDescriptions:
2784
- extract_not_empty: Include the array element only when the extract field returns a non-empty value.
2820
+ extract_not_empty: Include an array element only when the extract returns a non-empty value for it
2821
+ fail_record_when_empty: Fail the record when the entry's source array is missing or empty
2785
2822
  examples:
2786
2823
  - extract_not_empty
2787
2824
  mappings:
@@ -2881,6 +2918,20 @@ components:
2881
2918
  extract: $.price
2882
2919
  dataType: number
2883
2920
  status: Active
2921
+ if:
2922
+ properties:
2923
+ conditional:
2924
+ properties:
2925
+ when:
2926
+ const: fail_record_when_empty
2927
+ required:
2928
+ - when
2929
+ required:
2930
+ - conditional
2931
+ then:
2932
+ not:
2933
+ required:
2934
+ - default
2884
2935
  status:
2885
2936
  type: string
2886
2937
  description: |
@@ -2888,9 +2939,10 @@ components:
2888
2939
  Required on every mapping entry. Controls whether the mapping is applied.
2889
2940
 
2890
2941
  **Guidance**
2891
- Emit `"Active"` for mappings that should run; `"Draft"` saves an
2892
- in-progress mapping without the Active-only field validations. The
2893
- API rejects a mapping missing this field
2942
+ Only `Active` rows run. `Draft` and `Inactive` rows keep their
2943
+ configuration, are saved with minimal validation, and are skipped at
2944
+ runtime and in preview; a non-Active parent skips its whole subtree
2945
+ whatever its children say. The API rejects a mapping missing this field
2894
2946
  (validation error: "Mapping object must have status field present.").
2895
2947
  x-celigo-ai-guidance:
2896
2948
  - |-
@@ -2899,12 +2951,28 @@ components:
2899
2951
  field validations. The value is case-sensitive. The API rejects:
2900
2952
  - Missing field: `[status_field_absent] Mapping object must have status field present.`
2901
2953
  - Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
2954
+ - |-
2955
+ `"Inactive"` is the user's "Set inactive" on a row: use it only when
2956
+ asked to disable or park a row, never to mean incomplete (that is
2957
+ `"Draft"`). Setting a parent `Inactive` means no `Active` row may
2958
+ remain under it — the save rejects an `Active` row under an
2959
+ `Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
2960
+ no message text) and never cascades or promotes on its own; `Draft`
2961
+ descendants are kept as they are, and a `Draft` parent does not gate
2962
+ its children. The UI's Set inactive on a parent marks the parent and
2963
+ every child `Inactive` (IO-166197). Re-enabling a child
2964
+ means re-enabling its ancestors in the same payload. Edits that keep
2965
+ existing rows must carry their stored status forward — rewriting a
2966
+ `Draft` or `Inactive` row to `Active` turns a row the user parked
2967
+ back on.
2902
2968
  enum:
2903
2969
  - Active
2904
2970
  - Draft
2971
+ - Inactive
2905
2972
  x-enumDescriptions:
2906
- Active: The mapping is enabled and applied during processing.
2907
- Draft: In-progress mapping; saved without the Active-only field validations.
2973
+ Active: The mapping is enabled and applied during processing
2974
+ Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
2975
+ Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
2908
2976
  examples:
2909
2977
  - Active
2910
2978
  conditional:
@@ -2933,6 +3001,10 @@ components:
2933
3001
  - `extract_not_empty`: Apply only when the extract field returns a value
2934
3002
  Useful for conditional mapping based on input data availability
2935
3003
 
3004
+ - `fail_record_when_empty`: Fail the record when the extract field returns
3005
+ no value (the UI's "Cause record to fail" action when the source field
3006
+ has no value)
3007
+
2936
3008
  **Example**
2937
3009
  ```json
2938
3010
  {
@@ -2945,28 +3017,75 @@ components:
2945
3017
  }
2946
3018
  }
2947
3019
  ```
3020
+ x-celigo-ai-guidance:
3021
+ - |-
3022
+ `when` holds one value, and two different settings share it: the
3023
+ composite-import operation gate (`record_created` / `record_updated`,
3024
+ the UI's "Only perform mapping when") and the empty-source action
3025
+ (`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
3026
+ take if source field has no value"). A row cannot carry both — writing
3027
+ one replaces the other and the save succeeds, so a composite import
3028
+ row that needs both has to choose. Never author `fail_record_when_empty`
3029
+ on a row that already carries `record_created` or `record_updated`.
2948
3030
  properties:
2949
3031
  when:
2950
3032
  type: string
2951
3033
  description: |
2952
- Specifies the condition that triggers application of this mapping:
2953
- - record_created: Apply only when creating a new record
2954
- - record_updated: Apply only when updating an existing record
2955
- - extract_not_empty: Apply only when the extract field returns a value
3034
+ Condition that gates this mapping — either an operation gate on a
3035
+ composite (create-or-update) import or the action to take when the
3036
+ extract returns no value. Empty means null, undefined or an empty
3037
+ string; `0`, `false` and whitespace are values.
3038
+ x-celigo-ai-guidance:
3039
+ - |-
3040
+ `fail_record_when_empty` is the fourth "Action to take if source field
3041
+ has no value" and is mutually exclusive with the other three: send it
3042
+ with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
3043
+ on the same row — or a `default` on a `buildArrayHelper` entry — is
3044
+ rejected at save with `[unsupported_mapping] "<key>" and conditional.when
3045
+ "fail_record_when_empty" cannot be present in mapping simultaneously.`
3046
+ (the lookup variant adds `Use lookup "allowFailures" instead.`);
3047
+ lookups fail through `allowFailures: false`, and a hard-coded row
3048
+ always has a value. At runtime an empty extract fails the record with
3049
+ an `errors[]` entry `{code: "extract_empty", fatal: true, source:
3050
+ "mapping", message: "<generate>: Source field has no value"}`
3051
+ ("Input field has no value" in a Transformation 2.0); `0` and `false`
3052
+ are values and map through.
2956
3053
  enum:
2957
3054
  - record_created
2958
3055
  - record_updated
2959
3056
  - extract_not_empty
3057
+ - fail_record_when_empty
2960
3058
  x-enumDescriptions:
2961
- record_created: Apply this mapping only when creating a new record.
2962
- record_updated: Apply this mapping only when updating an existing record.
2963
- extract_not_empty: Apply this mapping only when the extract field returns a non-empty value.
3059
+ record_created: Apply this mapping only when creating a new record
3060
+ record_updated: Apply this mapping only when updating an existing record
3061
+ extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
3062
+ fail_record_when_empty: Fail the record when the extract field returns no value
2964
3063
  examples:
2965
3064
  - record_created
2966
3065
  - record_updated
2967
3066
  - extract_not_empty
3067
+ - fail_record_when_empty
2968
3068
  required:
2969
3069
  - dataType
3070
+ if:
3071
+ properties:
3072
+ conditional:
3073
+ properties:
3074
+ when:
3075
+ const: fail_record_when_empty
3076
+ required:
3077
+ - when
3078
+ required:
3079
+ - conditional
3080
+ then:
3081
+ not:
3082
+ anyOf:
3083
+ - required:
3084
+ - default
3085
+ - required:
3086
+ - lookupName
3087
+ - required:
3088
+ - hardCodedValue
2970
3089
  Mappings:
2971
3090
  type: array
2972
3091
  description: |
@@ -2990,6 +3109,20 @@ components:
2990
3109
 
2991
3110
  The system will process these nested structures recursively during runtime, ensuring proper construction
2992
3111
  of complex hierarchical data while maintaining excellent performance.
3112
+
3113
+ On save, a leaf row with neither a source (`extract`, `hardCodedValue`, `lookupName`) nor a
3114
+ destination (`generate`) is dropped silently, at every nesting level, and so is an object or
3115
+ object-array row left with no source, no destination and no remaining child `mappings` or
3116
+ `buildArrayHelper` entries; a row with only one of the two, and a source-less, destination-less
3117
+ wrapper that still has children, are kept.
3118
+ x-celigo-ai-guidance:
3119
+ - |-
3120
+ Rows that exist in the saved document — including `Draft` and `Inactive` rows and
3121
+ rows with only a source or only a destination — are the user's state: an edit that
3122
+ re-sends the tree must carry them through unchanged unless the user asked to change
3123
+ them. Only a row with neither source nor destination — and, for an object or
3124
+ object-array row, no remaining children — can be left out; the save would drop it
3125
+ anyway. A wrapper with children but no `generate` is kept by the save, so keep it.
2993
3126
  items:
2994
3127
  type: object
2995
3128
  properties:
@@ -3269,7 +3402,8 @@ components:
3269
3402
  Explicit JSON `null` is itself a valid fallback: the destination field is written as
3270
3403
  JSON null when the extract yields nothing (the Mapper UI's "Use null as default value"
3271
3404
  action). Omitting the key entirely means no fallback — the field is left out of the
3272
- output when the extract is empty (the UI's "Do nothing" action).
3405
+ output when the extract is empty (the UI's "Do nothing" action). Failing the record
3406
+ instead is `conditional.when: fail_record_when_empty`, which excludes a default.
3273
3407
  x-celigo-ai-guidance:
3274
3408
  - |-
3275
3409
  `"default": null` and `"default": ""` are distinct saved values, not
@@ -3278,6 +3412,12 @@ components:
3278
3412
  Preserve them verbatim when editing or migrating a mapping — dropping
3279
3413
  the key changes runtime behavior from "use null/empty string as
3280
3414
  default value" to "do nothing" (field omitted from the output).
3415
+ - |-
3416
+ The four "Action to take if source field has no value" choices map to:
3417
+ do nothing → no `default` key (optionally `conditional.when:
3418
+ extract_not_empty`); use null → `"default": null`; use empty string or
3419
+ a custom value → `"default": "<value>"`; cause the record to fail →
3420
+ `conditional.when: fail_record_when_empty` with no `default` key.
3281
3421
  examples:
3282
3422
  - N/A
3283
3423
  - '0'
@@ -3610,6 +3750,22 @@ components:
3610
3750
  - $.order.lineItems[*]
3611
3751
  - $.parents[*].children[*]
3612
3752
  - $
3753
+ name:
3754
+ type: string
3755
+ maxLength: 200
3756
+ description: |
3757
+ Display label for this source object in the mapper, so the sources of
3758
+ an object array can be told apart instead of all showing as `$`.
3759
+ Has no effect at runtime; stored only when non-empty.
3760
+ x-celigo-ai-guidance:
3761
+ - |-
3762
+ Carry an existing `name` through every edit — it is the user's label
3763
+ for the tab, and an entry sent without it loses the label. Duplicate
3764
+ names across entries are allowed. Set one only when the user names
3765
+ the source object; never invent labels.
3766
+ examples:
3767
+ - Billing address
3768
+ - Shipping address
3613
3769
  sourceDataType:
3614
3770
  type: string
3615
3771
  description: |
@@ -3658,17 +3814,31 @@ components:
3658
3814
  type: object
3659
3815
  description: |
3660
3816
  Defines conditional rules for including each array element in the result.
3817
+ x-celigo-ai-guidance:
3818
+ - |-
3819
+ Judged against this entry's own `extract` (the array source). The
3820
+ design scopes the UI's tab-level "Action to take if source field has
3821
+ no value" to copy-as-is tabs (no child `mappings`); the API accepts
3822
+ `fail_record_when_empty` on a mapped entry as well, and the mapper
3823
+ processor honors it there — the record fails when that array is
3824
+ missing or empty (`errors[]` entry `code: extract_empty`, `fatal:
3825
+ true`, message `<generate>: Source field has no value`; probed
3826
+ 2026-10-09). Say so when writing it on a mapped entry: the user may
3827
+ not find the setting in the mapper's tab. To fail on an empty field
3828
+ inside each element, set the action on that child mapping instead.
3661
3829
  properties:
3662
3830
  when:
3663
3831
  type: string
3664
3832
  description: |
3665
- Specifies the condition that must be met for an array element to be included.
3666
-
3667
- 'extract_not_empty' only includes elements where the extract field returns a value.
3833
+ Condition judged on the entry's extract — skip the elements the
3834
+ extract does not return, or fail the whole record when the source
3835
+ array is missing or empty.
3668
3836
  enum:
3669
3837
  - extract_not_empty
3838
+ - fail_record_when_empty
3670
3839
  x-enumDescriptions:
3671
- extract_not_empty: Include the array element only when the extract field returns a non-empty value.
3840
+ extract_not_empty: Include an array element only when the extract returns a non-empty value for it
3841
+ fail_record_when_empty: Fail the record when the entry's source array is missing or empty
3672
3842
  examples:
3673
3843
  - extract_not_empty
3674
3844
  mappings:
@@ -3768,6 +3938,20 @@ components:
3768
3938
  extract: $.price
3769
3939
  dataType: number
3770
3940
  status: Active
3941
+ if:
3942
+ properties:
3943
+ conditional:
3944
+ properties:
3945
+ when:
3946
+ const: fail_record_when_empty
3947
+ required:
3948
+ - when
3949
+ required:
3950
+ - conditional
3951
+ then:
3952
+ not:
3953
+ required:
3954
+ - default
3771
3955
  status:
3772
3956
  type: string
3773
3957
  description: |
@@ -3775,9 +3959,10 @@ components:
3775
3959
  Required on every mapping entry. Controls whether the mapping is applied.
3776
3960
 
3777
3961
  **Guidance**
3778
- Emit `"Active"` for mappings that should run; `"Draft"` saves an
3779
- in-progress mapping without the Active-only field validations. The
3780
- API rejects a mapping missing this field
3962
+ Only `Active` rows run. `Draft` and `Inactive` rows keep their
3963
+ configuration, are saved with minimal validation, and are skipped at
3964
+ runtime and in preview; a non-Active parent skips its whole subtree
3965
+ whatever its children say. The API rejects a mapping missing this field
3781
3966
  (validation error: "Mapping object must have status field present.").
3782
3967
  x-celigo-ai-guidance:
3783
3968
  - |-
@@ -3786,12 +3971,28 @@ components:
3786
3971
  field validations. The value is case-sensitive. The API rejects:
3787
3972
  - Missing field: `[status_field_absent] Mapping object must have status field present.`
3788
3973
  - Wrong case (e.g. `"active"`): `[invalid_status_enums] active is not a valid enum for status field.`
3974
+ - |-
3975
+ `"Inactive"` is the user's "Set inactive" on a row: use it only when
3976
+ asked to disable or park a row, never to mean incomplete (that is
3977
+ `"Draft"`). Setting a parent `Inactive` means no `Active` row may
3978
+ remain under it — the save rejects an `Active` row under an
3979
+ `Inactive` parent (`[inactive_parent_active_child]` on `mappings`,
3980
+ no message text) and never cascades or promotes on its own; `Draft`
3981
+ descendants are kept as they are, and a `Draft` parent does not gate
3982
+ its children. The UI's Set inactive on a parent marks the parent and
3983
+ every child `Inactive` (IO-166197). Re-enabling a child
3984
+ means re-enabling its ancestors in the same payload. Edits that keep
3985
+ existing rows must carry their stored status forward — rewriting a
3986
+ `Draft` or `Inactive` row to `Active` turns a row the user parked
3987
+ back on.
3789
3988
  enum:
3790
3989
  - Active
3791
3990
  - Draft
3991
+ - Inactive
3792
3992
  x-enumDescriptions:
3793
- Active: The mapping is enabled and applied during processing.
3794
- Draft: In-progress mapping; saved without the Active-only field validations.
3993
+ Active: The mapping is enabled and applied during processing
3994
+ Draft: In-progress mapping; saved without the Active-only field validations and skipped at runtime
3995
+ Inactive: Disabled by the user; configuration kept, skipped at runtime and in preview
3795
3996
  examples:
3796
3997
  - Active
3797
3998
  conditional:
@@ -3820,6 +4021,10 @@ components:
3820
4021
  - `extract_not_empty`: Apply only when the extract field returns a value
3821
4022
  Useful for conditional mapping based on input data availability
3822
4023
 
4024
+ - `fail_record_when_empty`: Fail the record when the extract field returns
4025
+ no value (the UI's "Cause record to fail" action when the source field
4026
+ has no value)
4027
+
3823
4028
  **Example**
3824
4029
  ```json
3825
4030
  {
@@ -3832,28 +4037,75 @@ components:
3832
4037
  }
3833
4038
  }
3834
4039
  ```
4040
+ x-celigo-ai-guidance:
4041
+ - |-
4042
+ `when` holds one value, and two different settings share it: the
4043
+ composite-import operation gate (`record_created` / `record_updated`,
4044
+ the UI's "Only perform mapping when") and the empty-source action
4045
+ (`extract_not_empty` / `fail_record_when_empty`, the UI's "Action to
4046
+ take if source field has no value"). A row cannot carry both — writing
4047
+ one replaces the other and the save succeeds, so a composite import
4048
+ row that needs both has to choose. Never author `fail_record_when_empty`
4049
+ on a row that already carries `record_created` or `record_updated`.
3835
4050
  properties:
3836
4051
  when:
3837
4052
  type: string
3838
4053
  description: |
3839
- Specifies the condition that triggers application of this mapping:
3840
- - record_created: Apply only when creating a new record
3841
- - record_updated: Apply only when updating an existing record
3842
- - extract_not_empty: Apply only when the extract field returns a value
4054
+ Condition that gates this mapping — either an operation gate on a
4055
+ composite (create-or-update) import or the action to take when the
4056
+ extract returns no value. Empty means null, undefined or an empty
4057
+ string; `0`, `false` and whitespace are values.
4058
+ x-celigo-ai-guidance:
4059
+ - |-
4060
+ `fail_record_when_empty` is the fourth "Action to take if source field
4061
+ has no value" and is mutually exclusive with the other three: send it
4062
+ with no `default` key. A `default`, a `lookupName` or a `hardCodedValue`
4063
+ on the same row — or a `default` on a `buildArrayHelper` entry — is
4064
+ rejected at save with `[unsupported_mapping] "<key>" and conditional.when
4065
+ "fail_record_when_empty" cannot be present in mapping simultaneously.`
4066
+ (the lookup variant adds `Use lookup "allowFailures" instead.`);
4067
+ lookups fail through `allowFailures: false`, and a hard-coded row
4068
+ always has a value. At runtime an empty extract fails the record with
4069
+ an `errors[]` entry `{code: "extract_empty", fatal: true, source:
4070
+ "mapping", message: "<generate>: Source field has no value"}`
4071
+ ("Input field has no value" in a Transformation 2.0); `0` and `false`
4072
+ are values and map through.
3843
4073
  enum:
3844
4074
  - record_created
3845
4075
  - record_updated
3846
4076
  - extract_not_empty
4077
+ - fail_record_when_empty
3847
4078
  x-enumDescriptions:
3848
- record_created: Apply this mapping only when creating a new record.
3849
- record_updated: Apply this mapping only when updating an existing record.
3850
- extract_not_empty: Apply this mapping only when the extract field returns a non-empty value.
4079
+ record_created: Apply this mapping only when creating a new record
4080
+ record_updated: Apply this mapping only when updating an existing record
4081
+ extract_not_empty: Apply this mapping only when the extract field returns a non-empty value
4082
+ fail_record_when_empty: Fail the record when the extract field returns no value
3851
4083
  examples:
3852
4084
  - record_created
3853
4085
  - record_updated
3854
4086
  - extract_not_empty
4087
+ - fail_record_when_empty
3855
4088
  required:
3856
4089
  - dataType
4090
+ if:
4091
+ properties:
4092
+ conditional:
4093
+ properties:
4094
+ when:
4095
+ const: fail_record_when_empty
4096
+ required:
4097
+ - when
4098
+ required:
4099
+ - conditional
4100
+ then:
4101
+ not:
4102
+ anyOf:
4103
+ - required:
4104
+ - default
4105
+ - required:
4106
+ - lookupName
4107
+ - required:
4108
+ - hardCodedValue
3857
4109
  ResponseMapping:
3858
4110
  type: object
3859
4111
  description: |