@celigo/api-specs 0.2.138 → 0.2.140

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.
@@ -560,14 +560,15 @@ components:
560
560
  - `objectarray`: Array of objects (most common array type)
561
561
  - `arrayarray`: Array of arrays (for matrix/table structures)
562
562
 
563
- Array dataTypes can be populated two ways: pass a source array through
564
- unchanged via `extract` alone (when the source is already an array of
565
- the right shape), or construct/iterate via `buildArrayHelper`.
563
+ Array dataTypes can be populated three ways: pass a source array
564
+ through unchanged via a JSONPath `extract` alone (when the source is
565
+ already an array of the right shape), construct/iterate via
566
+ `buildArrayHelper`, or set a constant with `hardCodedValue`.
566
567
 
567
568
  IMPORTANT: The dataType controls which additional fields are relevant:
568
569
  - For date-like string fields: extractDateFormat, generateDateFormat, etc. become relevant
569
570
  - For object types: 'mappings' array becomes relevant
570
- - For array types: `buildArrayHelper` is one option (see above)
571
+ - For array types: a JSONPath `extract` alone, `buildArrayHelper`, or `hardCodedValue` (see above)
571
572
 
572
573
  When analyzing existing mappings or generating new ones, always check dataType first
573
574
  to understand what additional fields should be present.
@@ -630,9 +631,12 @@ components:
630
631
  - Access input record fields with {{record.fieldName}} notation; a grouped
631
632
  (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
632
633
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
633
- - Valid on `object`, `objectarray`, and primitive-array dataTypes as
634
- well as scalars — the rendered template output must parse into the
635
- declared shape
634
+ - Valid on scalars and on `object` rows, where the rendered output must
635
+ parse into an object. On an array row the template goes in a
636
+ `buildArrayHelper` entry instead: on an `objectarray` row's own
637
+ `extract` it is refused with 422 ("buildArrayHelper" must be present
638
+ for object array datatype), and on a primitive-array row's own
639
+ `extract` it renders null without an error
636
640
 
637
641
  ```json
638
642
  "extract": "{{record.price}} {{record.currency}}" // Combines two fields
@@ -831,6 +835,19 @@ components:
831
835
  - countryCodeToName
832
836
  - statusMapping
833
837
  - departmentCodes
838
+ hardCodedValue:
839
+ type: string
840
+ description: |
841
+ Constant written to the destination instead of an extracted value. On a primitive
842
+ array (`stringarray`, `numberarray`, `booleanarray`) the string is split on commas,
843
+ verbatim and untrimmed, into elements of the array's type (`"A,B"` gives `["A", "B"]`).
844
+ On an `object` it must be a JSON object string and on an `objectarray` a JSON array
845
+ string (an object string becomes one element); the save parses it and refuses non-JSON
846
+ or the wrong shape with 422, and an array row with a constant needs no `buildArrayHelper`.
847
+ examples:
848
+ - USD
849
+ - A,B
850
+ - '[{"code": "A"}, {"code": "B"}]'
834
851
  description:
835
852
  type: string
836
853
  description: |
@@ -966,15 +983,25 @@ components:
966
983
  processor renders the entire destination array as null with no
967
984
  validation error. To emit a fixed number of static elements, add
968
985
  that many sibling constructed entries — never index the extract.
986
+ - |-
987
+ An entry's `extract` can be a Handlebars template. On an
988
+ `objectarray` it must render a JSON object (one element) or a JSON
989
+ array (one element per item). On a primitive array each entry
990
+ renders one element, so a serialized array becomes one string
991
+ element. A bare literal entry extract is refused with 422 ("extract
992
+ only supports json path or handlebars expression"); set a constant
993
+ with the row's `hardCodedValue` instead.
969
994
  description: |
970
995
  **Purpose**
971
996
  Configures how to construct arrays in the output record, handling various array types and inputs.
972
997
 
973
998
  **Guidance**
974
- This is the REQUIRED mechanism for ALL array data types:
999
+ This is the mechanism for building array data types:
975
1000
 
976
1001
  **When to Use**
977
- - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.)
1002
+ - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.), unless the
1003
+ row passes a source array through with a JSONPath `extract` alone or sets
1004
+ `hardCodedValue`
978
1005
  - Each entry in this array contributes elements to the output array
979
1006
  - Multiple entries allow combining data from different input arrays
980
1007
 
@@ -1599,14 +1626,15 @@ components:
1599
1626
  - `objectarray`: Array of objects (most common array type)
1600
1627
  - `arrayarray`: Array of arrays (for matrix/table structures)
1601
1628
 
1602
- Array dataTypes can be populated two ways: pass a source array through
1603
- unchanged via `extract` alone (when the source is already an array of
1604
- the right shape), or construct/iterate via `buildArrayHelper`.
1629
+ Array dataTypes can be populated three ways: pass a source array
1630
+ through unchanged via a JSONPath `extract` alone (when the source is
1631
+ already an array of the right shape), construct/iterate via
1632
+ `buildArrayHelper`, or set a constant with `hardCodedValue`.
1605
1633
 
1606
1634
  IMPORTANT: The dataType controls which additional fields are relevant:
1607
1635
  - For date-like string fields: extractDateFormat, generateDateFormat, etc. become relevant
1608
1636
  - For object types: 'mappings' array becomes relevant
1609
- - For array types: `buildArrayHelper` is one option (see above)
1637
+ - For array types: a JSONPath `extract` alone, `buildArrayHelper`, or `hardCodedValue` (see above)
1610
1638
 
1611
1639
  When analyzing existing mappings or generating new ones, always check dataType first
1612
1640
  to understand what additional fields should be present.
@@ -1669,9 +1697,12 @@ components:
1669
1697
  - Access input record fields with {{record.fieldName}} notation; a grouped
1670
1698
  (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
1671
1699
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
1672
- - Valid on `object`, `objectarray`, and primitive-array dataTypes as
1673
- well as scalars — the rendered template output must parse into the
1674
- declared shape
1700
+ - Valid on scalars and on `object` rows, where the rendered output must
1701
+ parse into an object. On an array row the template goes in a
1702
+ `buildArrayHelper` entry instead: on an `objectarray` row's own
1703
+ `extract` it is refused with 422 ("buildArrayHelper" must be present
1704
+ for object array datatype), and on a primitive-array row's own
1705
+ `extract` it renders null without an error
1675
1706
 
1676
1707
  ```json
1677
1708
  "extract": "{{record.price}} {{record.currency}}" // Combines two fields
@@ -1870,6 +1901,19 @@ components:
1870
1901
  - countryCodeToName
1871
1902
  - statusMapping
1872
1903
  - departmentCodes
1904
+ hardCodedValue:
1905
+ type: string
1906
+ description: |
1907
+ Constant written to the destination instead of an extracted value. On a primitive
1908
+ array (`stringarray`, `numberarray`, `booleanarray`) the string is split on commas,
1909
+ verbatim and untrimmed, into elements of the array's type (`"A,B"` gives `["A", "B"]`).
1910
+ On an `object` it must be a JSON object string and on an `objectarray` a JSON array
1911
+ string (an object string becomes one element); the save parses it and refuses non-JSON
1912
+ or the wrong shape with 422, and an array row with a constant needs no `buildArrayHelper`.
1913
+ examples:
1914
+ - USD
1915
+ - A,B
1916
+ - '[{"code": "A"}, {"code": "B"}]'
1873
1917
  description:
1874
1918
  type: string
1875
1919
  description: |
@@ -2005,15 +2049,25 @@ components:
2005
2049
  processor renders the entire destination array as null with no
2006
2050
  validation error. To emit a fixed number of static elements, add
2007
2051
  that many sibling constructed entries — never index the extract.
2052
+ - |-
2053
+ An entry's `extract` can be a Handlebars template. On an
2054
+ `objectarray` it must render a JSON object (one element) or a JSON
2055
+ array (one element per item). On a primitive array each entry
2056
+ renders one element, so a serialized array becomes one string
2057
+ element. A bare literal entry extract is refused with 422 ("extract
2058
+ only supports json path or handlebars expression"); set a constant
2059
+ with the row's `hardCodedValue` instead.
2008
2060
  description: |
2009
2061
  **Purpose**
2010
2062
  Configures how to construct arrays in the output record, handling various array types and inputs.
2011
2063
 
2012
2064
  **Guidance**
2013
- This is the REQUIRED mechanism for ALL array data types:
2065
+ This is the mechanism for building array data types:
2014
2066
 
2015
2067
  **When to Use**
2016
- - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.)
2068
+ - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.), unless the
2069
+ row passes a source array through with a JSONPath `extract` alone or sets
2070
+ `hardCodedValue`
2017
2071
  - Each entry in this array contributes elements to the output array
2018
2072
  - Multiple entries allow combining data from different input arrays
2019
2073
 
@@ -3044,7 +3098,7 @@ components:
3044
3098
  - envelope
3045
3099
  x-enumDescriptions:
3046
3100
  record: The transform processor evaluates `mappings[].extract` JSONPath against the flat record itself (`$.field`, no `record.` segment) — the default when absent.
3047
- envelope: The transform processor evaluates JSONPath against the wrapped runtime envelope `{record, settings, job, …}` (file-provider steps also carry `fileMeta`) — extracts must include the `record.` segment (`$.record.field`).
3101
+ envelope: The transform processor evaluates JSONPath against the wrapped runtime envelope `{record, job, testMode, settings, headers, queryParams}` (file-provider steps also carry `fileMeta`) — record fields need the `record.` segment (`$.record.field`), while `headers` and `queryParams` sit beside `record` (`$.headers['X-Id']`, `$.queryParams.src`).
3048
3102
  description: |
3049
3103
  Controls the JSON shape the transformTwoDotZero processor
3050
3104
  evaluates `mappings[].extract` JSONPath values against at
@@ -3064,10 +3118,12 @@ components:
3064
3118
  `"$.PLACEHOLDER_<field>"`.
3065
3119
  This is the dominant Celigo idiom and the right choice for new transforms.
3066
3120
  - `envelope`: the processor sees a wrapped object
3067
- `{record: {...}, settings: ..., job: ...}` (plus
3068
- `fileMeta` on file-provider steps).
3121
+ `{record: {...}, job, testMode, settings, headers,
3122
+ queryParams}` (plus `fileMeta` on file-provider steps).
3069
3123
  `mappings[].extract` JSONPath MUST include the
3070
- `record.` segment — e.g. `"$.record.orderId"`;
3124
+ `record.` segment for record fields — e.g.
3125
+ `"$.record.orderId"` — and reads `headers` and
3126
+ `queryParams` beside it (`$.headers['X-Id']`);
3071
3127
  PLACEHOLDER extracts use `"$.record.PLACEHOLDER_<field>"`.
3072
3128
  Pick this only when the transform was authored against
3073
3129
  the envelope shape on purpose.
@@ -3076,6 +3132,11 @@ components:
3076
3132
  (`{{record.field}}`, `{{dateFormat ... record.field}}`)
3077
3133
  ALWAYS reference the `record` root regardless of
3078
3134
  `inputContext` — only JSONPath anchoring flips.
3135
+ - |-
3136
+ In `envelope` mode a `modify` transform merges its mapped
3137
+ fields into `record` and keeps the rest of the envelope
3138
+ around it; a `create` transform returns only the mapped
3139
+ fields, as a bare record.
3079
3140
  - |-
3080
3141
  Emit `inputContext` explicitly on new v2 transforms:
3081
3142
  unset is read as `record`, but stating it makes the
@@ -3096,13 +3157,17 @@ components:
3096
3157
 
3097
3158
  - ``envelope``: the transform processor sees a wrapped
3098
3159
  object of the shape
3099
- ``{record: {...}, settings: ..., job: ...}`` (plus
3100
- ``fileMeta`` on file-provider steps) — the
3160
+ ``{record: {...}, job, testMode, settings, headers,
3161
+ queryParams}`` (plus ``fileMeta`` on file-provider
3162
+ steps; ``headers`` and ``queryParams`` sit beside
3163
+ ``record``) — the
3101
3164
  same runtime-context envelope Handlebars / SQL /
3102
3165
  GraphQL templates render against. ``mappings[].extract``
3103
- JSONPath values MUST include the ``record.`` segment
3104
- — for example ``"$.record.orderId"`` or
3105
- ``"$.record.customer.email"``. PLACEHOLDER extracts
3166
+ JSONPath values for record fields MUST include the
3167
+ ``record.`` segment — for example ``"$.record.orderId"``
3168
+ or ``"$.record.customer.email"`` — while ``headers`` and
3169
+ ``queryParams`` are read beside it
3170
+ (``"$.headers['X-Id']"``). PLACEHOLDER extracts
3106
3171
  use ``"$.record.PLACEHOLDER_<field>"``. Pick this
3107
3172
  mode only when the export was authored against the
3108
3173
  envelope shape on purpose (typically because an
@@ -2081,7 +2081,7 @@ paths:
2081
2081
  description: |-
2082
2082
  Runs an import document sent in the request body — a virtual import —
2083
2083
  through the connection, with the tool and the integration in the
2084
- path supplying the execution context a real run gives the step — hooks receive `options.settings` with the integration's settings (none when it carries none) plus `_integrationId`, and no flow.
2084
+ path supplying the execution context — hooks receive `options.settings` with the integration's settings (none when it carries none) plus `_integrationId`, and no flow. That is more than a step gets in a real run of the tool, which sees no integration settings and no `_integrationId`.
2085
2085
  Nothing is saved — the document can be an unsaved draft, a modified
2086
2086
  copy, or a saved import as fetched — and the request executes against
2087
2087
  the live destination: a real write, not a dry run; a saved
@@ -2259,7 +2259,7 @@ paths:
2259
2259
  description: |-
2260
2260
  Runs an import document sent in the request body — a virtual import —
2261
2261
  through the connection, with the API and the integration in the
2262
- path supplying the execution context a real run gives the step — hooks receive `options.settings` with the integration's settings (none when it carries none) plus `_integrationId`, and no flow.
2262
+ path supplying the execution context — hooks receive `options.settings` with the integration's settings (none when it carries none) plus `_integrationId`, and no flow. A step in a real call of the API gets less: no integration settings and no `_integrationId`.
2263
2263
  Nothing is saved — the document can be an unsaved draft, a modified
2264
2264
  copy, or a saved import as fetched — and the request executes against
2265
2265
  the live destination: a real write, not a dry run; a saved
package/dist/export.yml CHANGED
@@ -2825,7 +2825,7 @@ components:
2825
2825
 
2826
2826
  **Common filter patterns**
2827
2827
 
2828
- 1. **Pattern matching**: Using wildcards like `*` and `?`
2828
+ 1. **Pattern matching**: Regular expressions with `matches`
2829
2829
  2. **Value range filtering**: Numbers between min and max values
2830
2830
  3. **Date range filtering**: Items created/modified within specific time ranges
2831
2831
  4. **Status checking**: Items with specific status values or properties
@@ -2875,9 +2875,12 @@ components:
2875
2875
  - `"endswith"`: String ends with specified suffix (ends with)
2876
2876
  - `"contains"`: String contains specified substring (contains)
2877
2877
  - `"doesnotcontain"`: String does not contain specified substring (does not contain)
2878
- - `"isempty"`: Field is empty or null (is empty)
2879
- - `"isnotempty"`: Field contains a value (is not empty)
2880
- - `"matches"`: Matches specified pattern (matches)
2878
+ - `"empty"`: Field is missing or empty (is empty)
2879
+ - `"notempty"`: Field contains a value (is not empty)
2880
+ - `"matches"`: Matches a regular expression (matches)
2881
+
2882
+ `isempty`, `isnotempty` and `anyof` are not operators: they are refused with 422
2883
+ "Invalid operation: <name>".
2881
2884
 
2882
2885
  **Logical Operators**
2883
2886
  - `"and"`: All conditions must be true
@@ -2897,7 +2900,11 @@ components:
2897
2900
  **Using `extract` to access record fields:**
2898
2901
  - Retrieves values from the current record being processed
2899
2902
  - Can access nested properties using dot notation (e.g., `"customer.email"`)
2900
- - Returns the raw field value which may need type conversion
2903
+ - In a record filter, must be wrapped in a type conversion (`string`, `number`,
2904
+ `boolean` or `epochtime`): a bare `["extract", ...]` operand is refused with 422
2905
+ "Field operation extract must be called by a Type Conversion Operation but was called
2906
+ by <operator>", both when an import's filter is saved and by
2907
+ `POST /v1/processors/filter`
2901
2908
 
2902
2909
  **Using `settings` to access configuration values:**
2903
2910
  - Retrieves values from the integration's configuration settings
@@ -2915,7 +2922,20 @@ components:
2915
2922
  - `"floor"`: Round number down to the nearest integer
2916
2923
  - `"abs"`: Get absolute value of a number
2917
2924
 
2918
- Type conversion operators are often necessary when comparing extracted field values against literals or when the field type doesn't match the comparison operator's expected type. For example:
2925
+ **Handlebars operands**
2926
+ - An operand can also be a string holding exactly one Handlebars expression, such as
2927
+ `"{{record.status}}"` or `"{{lowercase record.code}}"`, on either side of the
2928
+ operator. It renders against the record (`record.<field>`; an unprefixed
2929
+ `{{status}}` renders empty) before the comparison.
2930
+ - The rendered value is a string: wrap it in `["number", ...]` to compare it with a
2931
+ number, or the rule is refused with 422.
2932
+ - `epochtime` does not render Handlebars: `["epochtime", "{{timestamp}}"]` is refused
2933
+ with 422 "invalid datetime format".
2934
+ - A string with text around the expression, or with more than one expression, is
2935
+ compared as a literal.
2936
+
2937
+ Choose the type conversion that matches the comparison — `number` for numeric
2938
+ comparisons, `epochtime` for dates, `string` for text. For example:
2919
2939
 
2920
2940
  ```json
2921
2941
  [
@@ -3006,8 +3026,11 @@ components:
3006
3026
  [
3007
3027
  "notequals",
3008
3028
  [
3009
- "extract",
3010
- "status"
3029
+ "string",
3030
+ [
3031
+ "extract",
3032
+ "status"
3033
+ ]
3011
3034
  ],
3012
3035
  "cancelled"
3013
3036
  ]
@@ -3018,8 +3041,11 @@ components:
3018
3041
  [
3019
3042
  "startswith",
3020
3043
  [
3021
- "extract",
3022
- "filename"
3044
+ "string",
3045
+ [
3046
+ "extract",
3047
+ "filename"
3048
+ ]
3023
3049
  ],
3024
3050
  "HC"
3025
3051
  ]
@@ -3040,29 +3066,26 @@ components:
3040
3066
  ]
3041
3067
  ```
3042
3068
 
3043
- Example 4: Order date is after January 1, 2023
3069
+ Example 4: Order date is after January 1, 2023 (UTC). Compare dates as `epochtime`
3070
+ against epoch milliseconds: a `string` comparison of ISO timestamps orders values with
3071
+ different UTC offsets wrongly.
3044
3072
  ```json
3045
3073
  [
3046
3074
  "greaterthan",
3047
3075
  [
3048
- "extract",
3049
- "orderDate"
3050
- ],
3051
- "2023-01-01T00:00:00Z"
3052
- ]
3053
- ```
3054
-
3055
- Example 5: Category contains any of ["Urgent", "High Priority"]
3056
- ```json
3057
- [
3058
- "anyof",
3059
- [
3060
- "extract",
3061
- "category"
3076
+ "epochtime",
3077
+ [
3078
+ "extract",
3079
+ "orderDate"
3080
+ ]
3062
3081
  ],
3063
- ["Urgent", "High Priority"]
3082
+ 1672531200000
3064
3083
  ]
3065
3084
  ```
3085
+ x-celigo-ai-guidance:
3086
+ - |-
3087
+ To test whether a field has a value, use `notempty` on the wrapped extract, not a
3088
+ `matches` pattern: a record without the field matches `.*\S.*`.
3066
3089
  items:
3067
3090
  oneOf:
3068
3091
  - title: String
@@ -12381,14 +12404,15 @@ components:
12381
12404
  - `objectarray`: Array of objects (most common array type)
12382
12405
  - `arrayarray`: Array of arrays (for matrix/table structures)
12383
12406
 
12384
- Array dataTypes can be populated two ways: pass a source array through
12385
- unchanged via `extract` alone (when the source is already an array of
12386
- the right shape), or construct/iterate via `buildArrayHelper`.
12407
+ Array dataTypes can be populated three ways: pass a source array
12408
+ through unchanged via a JSONPath `extract` alone (when the source is
12409
+ already an array of the right shape), construct/iterate via
12410
+ `buildArrayHelper`, or set a constant with `hardCodedValue`.
12387
12411
 
12388
12412
  IMPORTANT: The dataType controls which additional fields are relevant:
12389
12413
  - For date-like string fields: extractDateFormat, generateDateFormat, etc. become relevant
12390
12414
  - For object types: 'mappings' array becomes relevant
12391
- - For array types: `buildArrayHelper` is one option (see above)
12415
+ - For array types: a JSONPath `extract` alone, `buildArrayHelper`, or `hardCodedValue` (see above)
12392
12416
 
12393
12417
  When analyzing existing mappings or generating new ones, always check dataType first
12394
12418
  to understand what additional fields should be present.
@@ -12451,9 +12475,12 @@ components:
12451
12475
  - Access input record fields with {{record.fieldName}} notation; a grouped
12452
12476
  (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
12453
12477
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
12454
- - Valid on `object`, `objectarray`, and primitive-array dataTypes as
12455
- well as scalars — the rendered template output must parse into the
12456
- declared shape
12478
+ - Valid on scalars and on `object` rows, where the rendered output must
12479
+ parse into an object. On an array row the template goes in a
12480
+ `buildArrayHelper` entry instead: on an `objectarray` row's own
12481
+ `extract` it is refused with 422 ("buildArrayHelper" must be present
12482
+ for object array datatype), and on a primitive-array row's own
12483
+ `extract` it renders null without an error
12457
12484
 
12458
12485
  ```json
12459
12486
  "extract": "{{record.price}} {{record.currency}}" // Combines two fields
@@ -12652,6 +12679,19 @@ components:
12652
12679
  - countryCodeToName
12653
12680
  - statusMapping
12654
12681
  - departmentCodes
12682
+ hardCodedValue:
12683
+ type: string
12684
+ description: |
12685
+ Constant written to the destination instead of an extracted value. On a primitive
12686
+ array (`stringarray`, `numberarray`, `booleanarray`) the string is split on commas,
12687
+ verbatim and untrimmed, into elements of the array's type (`"A,B"` gives `["A", "B"]`).
12688
+ On an `object` it must be a JSON object string and on an `objectarray` a JSON array
12689
+ string (an object string becomes one element); the save parses it and refuses non-JSON
12690
+ or the wrong shape with 422, and an array row with a constant needs no `buildArrayHelper`.
12691
+ examples:
12692
+ - USD
12693
+ - A,B
12694
+ - '[{"code": "A"}, {"code": "B"}]'
12655
12695
  description:
12656
12696
  type: string
12657
12697
  description: |
@@ -12787,15 +12827,25 @@ components:
12787
12827
  processor renders the entire destination array as null with no
12788
12828
  validation error. To emit a fixed number of static elements, add
12789
12829
  that many sibling constructed entries — never index the extract.
12830
+ - |-
12831
+ An entry's `extract` can be a Handlebars template. On an
12832
+ `objectarray` it must render a JSON object (one element) or a JSON
12833
+ array (one element per item). On a primitive array each entry
12834
+ renders one element, so a serialized array becomes one string
12835
+ element. A bare literal entry extract is refused with 422 ("extract
12836
+ only supports json path or handlebars expression"); set a constant
12837
+ with the row's `hardCodedValue` instead.
12790
12838
  description: |
12791
12839
  **Purpose**
12792
12840
  Configures how to construct arrays in the output record, handling various array types and inputs.
12793
12841
 
12794
12842
  **Guidance**
12795
- This is the REQUIRED mechanism for ALL array data types:
12843
+ This is the mechanism for building array data types:
12796
12844
 
12797
12845
  **When to Use**
12798
- - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.)
12846
+ - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.), unless the
12847
+ row passes a source array through with a JSONPath `extract` alone or sets
12848
+ `hardCodedValue`
12799
12849
  - Each entry in this array contributes elements to the output array
12800
12850
  - Multiple entries allow combining data from different input arrays
12801
12851
 
@@ -13420,14 +13470,15 @@ components:
13420
13470
  - `objectarray`: Array of objects (most common array type)
13421
13471
  - `arrayarray`: Array of arrays (for matrix/table structures)
13422
13472
 
13423
- Array dataTypes can be populated two ways: pass a source array through
13424
- unchanged via `extract` alone (when the source is already an array of
13425
- the right shape), or construct/iterate via `buildArrayHelper`.
13473
+ Array dataTypes can be populated three ways: pass a source array
13474
+ through unchanged via a JSONPath `extract` alone (when the source is
13475
+ already an array of the right shape), construct/iterate via
13476
+ `buildArrayHelper`, or set a constant with `hardCodedValue`.
13426
13477
 
13427
13478
  IMPORTANT: The dataType controls which additional fields are relevant:
13428
13479
  - For date-like string fields: extractDateFormat, generateDateFormat, etc. become relevant
13429
13480
  - For object types: 'mappings' array becomes relevant
13430
- - For array types: `buildArrayHelper` is one option (see above)
13481
+ - For array types: a JSONPath `extract` alone, `buildArrayHelper`, or `hardCodedValue` (see above)
13431
13482
 
13432
13483
  When analyzing existing mappings or generating new ones, always check dataType first
13433
13484
  to understand what additional fields should be present.
@@ -13490,9 +13541,12 @@ components:
13490
13541
  - Access input record fields with {{record.fieldName}} notation; a grouped
13491
13542
  (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
13492
13543
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
13493
- - Valid on `object`, `objectarray`, and primitive-array dataTypes as
13494
- well as scalars — the rendered template output must parse into the
13495
- declared shape
13544
+ - Valid on scalars and on `object` rows, where the rendered output must
13545
+ parse into an object. On an array row the template goes in a
13546
+ `buildArrayHelper` entry instead: on an `objectarray` row's own
13547
+ `extract` it is refused with 422 ("buildArrayHelper" must be present
13548
+ for object array datatype), and on a primitive-array row's own
13549
+ `extract` it renders null without an error
13496
13550
 
13497
13551
  ```json
13498
13552
  "extract": "{{record.price}} {{record.currency}}" // Combines two fields
@@ -13691,6 +13745,19 @@ components:
13691
13745
  - countryCodeToName
13692
13746
  - statusMapping
13693
13747
  - departmentCodes
13748
+ hardCodedValue:
13749
+ type: string
13750
+ description: |
13751
+ Constant written to the destination instead of an extracted value. On a primitive
13752
+ array (`stringarray`, `numberarray`, `booleanarray`) the string is split on commas,
13753
+ verbatim and untrimmed, into elements of the array's type (`"A,B"` gives `["A", "B"]`).
13754
+ On an `object` it must be a JSON object string and on an `objectarray` a JSON array
13755
+ string (an object string becomes one element); the save parses it and refuses non-JSON
13756
+ or the wrong shape with 422, and an array row with a constant needs no `buildArrayHelper`.
13757
+ examples:
13758
+ - USD
13759
+ - A,B
13760
+ - '[{"code": "A"}, {"code": "B"}]'
13694
13761
  description:
13695
13762
  type: string
13696
13763
  description: |
@@ -13826,15 +13893,25 @@ components:
13826
13893
  processor renders the entire destination array as null with no
13827
13894
  validation error. To emit a fixed number of static elements, add
13828
13895
  that many sibling constructed entries — never index the extract.
13896
+ - |-
13897
+ An entry's `extract` can be a Handlebars template. On an
13898
+ `objectarray` it must render a JSON object (one element) or a JSON
13899
+ array (one element per item). On a primitive array each entry
13900
+ renders one element, so a serialized array becomes one string
13901
+ element. A bare literal entry extract is refused with 422 ("extract
13902
+ only supports json path or handlebars expression"); set a constant
13903
+ with the row's `hardCodedValue` instead.
13829
13904
  description: |
13830
13905
  **Purpose**
13831
13906
  Configures how to construct arrays in the output record, handling various array types and inputs.
13832
13907
 
13833
13908
  **Guidance**
13834
- This is the REQUIRED mechanism for ALL array data types:
13909
+ This is the mechanism for building array data types:
13835
13910
 
13836
13911
  **When to Use**
13837
- - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.)
13912
+ - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.), unless the
13913
+ row passes a source array through with a JSONPath `extract` alone or sets
13914
+ `hardCodedValue`
13838
13915
  - Each entry in this array contributes elements to the output array
13839
13916
  - Multiple entries allow combining data from different input arrays
13840
13917
 
@@ -14865,7 +14942,7 @@ components:
14865
14942
  - envelope
14866
14943
  x-enumDescriptions:
14867
14944
  record: The transform processor evaluates `mappings[].extract` JSONPath against the flat record itself (`$.field`, no `record.` segment) — the default when absent.
14868
- envelope: The transform processor evaluates JSONPath against the wrapped runtime envelope `{record, settings, job, …}` (file-provider steps also carry `fileMeta`) — extracts must include the `record.` segment (`$.record.field`).
14945
+ envelope: The transform processor evaluates JSONPath against the wrapped runtime envelope `{record, job, testMode, settings, headers, queryParams}` (file-provider steps also carry `fileMeta`) — record fields need the `record.` segment (`$.record.field`), while `headers` and `queryParams` sit beside `record` (`$.headers['X-Id']`, `$.queryParams.src`).
14869
14946
  description: |
14870
14947
  Controls the JSON shape the transformTwoDotZero processor
14871
14948
  evaluates `mappings[].extract` JSONPath values against at
@@ -14885,10 +14962,12 @@ components:
14885
14962
  `"$.PLACEHOLDER_<field>"`.
14886
14963
  This is the dominant Celigo idiom and the right choice for new transforms.
14887
14964
  - `envelope`: the processor sees a wrapped object
14888
- `{record: {...}, settings: ..., job: ...}` (plus
14889
- `fileMeta` on file-provider steps).
14965
+ `{record: {...}, job, testMode, settings, headers,
14966
+ queryParams}` (plus `fileMeta` on file-provider steps).
14890
14967
  `mappings[].extract` JSONPath MUST include the
14891
- `record.` segment — e.g. `"$.record.orderId"`;
14968
+ `record.` segment for record fields — e.g.
14969
+ `"$.record.orderId"` — and reads `headers` and
14970
+ `queryParams` beside it (`$.headers['X-Id']`);
14892
14971
  PLACEHOLDER extracts use `"$.record.PLACEHOLDER_<field>"`.
14893
14972
  Pick this only when the transform was authored against
14894
14973
  the envelope shape on purpose.
@@ -14897,6 +14976,11 @@ components:
14897
14976
  (`{{record.field}}`, `{{dateFormat ... record.field}}`)
14898
14977
  ALWAYS reference the `record` root regardless of
14899
14978
  `inputContext` — only JSONPath anchoring flips.
14979
+ - |-
14980
+ In `envelope` mode a `modify` transform merges its mapped
14981
+ fields into `record` and keeps the rest of the envelope
14982
+ around it; a `create` transform returns only the mapped
14983
+ fields, as a bare record.
14900
14984
  - |-
14901
14985
  Emit `inputContext` explicitly on new v2 transforms:
14902
14986
  unset is read as `record`, but stating it makes the
@@ -14917,13 +15001,17 @@ components:
14917
15001
 
14918
15002
  - ``envelope``: the transform processor sees a wrapped
14919
15003
  object of the shape
14920
- ``{record: {...}, settings: ..., job: ...}`` (plus
14921
- ``fileMeta`` on file-provider steps) — the
15004
+ ``{record: {...}, job, testMode, settings, headers,
15005
+ queryParams}`` (plus ``fileMeta`` on file-provider
15006
+ steps; ``headers`` and ``queryParams`` sit beside
15007
+ ``record``) — the
14922
15008
  same runtime-context envelope Handlebars / SQL /
14923
15009
  GraphQL templates render against. ``mappings[].extract``
14924
- JSONPath values MUST include the ``record.`` segment
14925
- — for example ``"$.record.orderId"`` or
14926
- ``"$.record.customer.email"``. PLACEHOLDER extracts
15010
+ JSONPath values for record fields MUST include the
15011
+ ``record.`` segment — for example ``"$.record.orderId"``
15012
+ or ``"$.record.customer.email"`` — while ``headers`` and
15013
+ ``queryParams`` are read beside it
15014
+ (``"$.headers['X-Id']"``). PLACEHOLDER extracts
14927
15015
  use ``"$.record.PLACEHOLDER_<field>"``. Pick this
14928
15016
  mode only when the export was authored against the
14929
15017
  envelope shape on purpose (typically because an
package/dist/flow.yml CHANGED
@@ -4662,7 +4662,7 @@ components:
4662
4662
 
4663
4663
  Uses the same expression language as export/import filters
4664
4664
  (`Filter.expression.rules`): comparison operators (`equals`, `notequals`,
4665
- `greaterthan`, `lessthan`, `startswith`, `contains`, `isempty`, `matches`, ...),
4665
+ `greaterthan`, `lessthan`, `startswith`, `contains`, `empty`, `matches`, ...),
4666
4666
  logical operators (`and`, `or`, `not`), field access (`extract`, `settings`)
4667
4667
  and type conversions (`string`, `number`, `boolean`, `epochtime`).
4668
4668