@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.
package/dist/ai-agent.yml CHANGED
@@ -2351,14 +2351,15 @@ components:
2351
2351
  - `objectarray`: Array of objects (most common array type)
2352
2352
  - `arrayarray`: Array of arrays (for matrix/table structures)
2353
2353
 
2354
- Array dataTypes can be populated two ways: pass a source array through
2355
- unchanged via `extract` alone (when the source is already an array of
2356
- the right shape), or construct/iterate via `buildArrayHelper`.
2354
+ Array dataTypes can be populated three ways: pass a source array
2355
+ through unchanged via a JSONPath `extract` alone (when the source is
2356
+ already an array of the right shape), construct/iterate via
2357
+ `buildArrayHelper`, or set a constant with `hardCodedValue`.
2357
2358
 
2358
2359
  IMPORTANT: The dataType controls which additional fields are relevant:
2359
2360
  - For date-like string fields: extractDateFormat, generateDateFormat, etc. become relevant
2360
2361
  - For object types: 'mappings' array becomes relevant
2361
- - For array types: `buildArrayHelper` is one option (see above)
2362
+ - For array types: a JSONPath `extract` alone, `buildArrayHelper`, or `hardCodedValue` (see above)
2362
2363
 
2363
2364
  When analyzing existing mappings or generating new ones, always check dataType first
2364
2365
  to understand what additional fields should be present.
@@ -2421,9 +2422,12 @@ components:
2421
2422
  - Access input record fields with {{record.fieldName}} notation; a grouped
2422
2423
  (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
2423
2424
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
2424
- - Valid on `object`, `objectarray`, and primitive-array dataTypes as
2425
- well as scalars — the rendered template output must parse into the
2426
- declared shape
2425
+ - Valid on scalars and on `object` rows, where the rendered output must
2426
+ parse into an object. On an array row the template goes in a
2427
+ `buildArrayHelper` entry instead: on an `objectarray` row's own
2428
+ `extract` it is refused with 422 ("buildArrayHelper" must be present
2429
+ for object array datatype), and on a primitive-array row's own
2430
+ `extract` it renders null without an error
2427
2431
 
2428
2432
  ```json
2429
2433
  "extract": "{{record.price}} {{record.currency}}" // Combines two fields
@@ -2622,6 +2626,19 @@ components:
2622
2626
  - countryCodeToName
2623
2627
  - statusMapping
2624
2628
  - departmentCodes
2629
+ hardCodedValue:
2630
+ type: string
2631
+ description: |
2632
+ Constant written to the destination instead of an extracted value. On a primitive
2633
+ array (`stringarray`, `numberarray`, `booleanarray`) the string is split on commas,
2634
+ verbatim and untrimmed, into elements of the array's type (`"A,B"` gives `["A", "B"]`).
2635
+ On an `object` it must be a JSON object string and on an `objectarray` a JSON array
2636
+ string (an object string becomes one element); the save parses it and refuses non-JSON
2637
+ or the wrong shape with 422, and an array row with a constant needs no `buildArrayHelper`.
2638
+ examples:
2639
+ - USD
2640
+ - A,B
2641
+ - '[{"code": "A"}, {"code": "B"}]'
2625
2642
  description:
2626
2643
  type: string
2627
2644
  description: |
@@ -2757,15 +2774,25 @@ components:
2757
2774
  processor renders the entire destination array as null with no
2758
2775
  validation error. To emit a fixed number of static elements, add
2759
2776
  that many sibling constructed entries — never index the extract.
2777
+ - |-
2778
+ An entry's `extract` can be a Handlebars template. On an
2779
+ `objectarray` it must render a JSON object (one element) or a JSON
2780
+ array (one element per item). On a primitive array each entry
2781
+ renders one element, so a serialized array becomes one string
2782
+ element. A bare literal entry extract is refused with 422 ("extract
2783
+ only supports json path or handlebars expression"); set a constant
2784
+ with the row's `hardCodedValue` instead.
2760
2785
  description: |
2761
2786
  **Purpose**
2762
2787
  Configures how to construct arrays in the output record, handling various array types and inputs.
2763
2788
 
2764
2789
  **Guidance**
2765
- This is the REQUIRED mechanism for ALL array data types:
2790
+ This is the mechanism for building array data types:
2766
2791
 
2767
2792
  **When to Use**
2768
- - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.)
2793
+ - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.), unless the
2794
+ row passes a source array through with a JSONPath `extract` alone or sets
2795
+ `hardCodedValue`
2769
2796
  - Each entry in this array contributes elements to the output array
2770
2797
  - Multiple entries allow combining data from different input arrays
2771
2798
 
@@ -3390,14 +3417,15 @@ components:
3390
3417
  - `objectarray`: Array of objects (most common array type)
3391
3418
  - `arrayarray`: Array of arrays (for matrix/table structures)
3392
3419
 
3393
- Array dataTypes can be populated two ways: pass a source array through
3394
- unchanged via `extract` alone (when the source is already an array of
3395
- the right shape), or construct/iterate via `buildArrayHelper`.
3420
+ Array dataTypes can be populated three ways: pass a source array
3421
+ through unchanged via a JSONPath `extract` alone (when the source is
3422
+ already an array of the right shape), construct/iterate via
3423
+ `buildArrayHelper`, or set a constant with `hardCodedValue`.
3396
3424
 
3397
3425
  IMPORTANT: The dataType controls which additional fields are relevant:
3398
3426
  - For date-like string fields: extractDateFormat, generateDateFormat, etc. become relevant
3399
3427
  - For object types: 'mappings' array becomes relevant
3400
- - For array types: `buildArrayHelper` is one option (see above)
3428
+ - For array types: a JSONPath `extract` alone, `buildArrayHelper`, or `hardCodedValue` (see above)
3401
3429
 
3402
3430
  When analyzing existing mappings or generating new ones, always check dataType first
3403
3431
  to understand what additional fields should be present.
@@ -3460,9 +3488,12 @@ components:
3460
3488
  - Access input record fields with {{record.fieldName}} notation; a grouped
3461
3489
  (array) record binds as `rows` instead — {{rows.0.fieldName}} / {{#each rows}}
3462
3490
  - Examples: "{{record.firstName}} {{record.lastName}}", "{{#if record.isActive}}Active{{else}}Inactive{{/if}}"
3463
- - Valid on `object`, `objectarray`, and primitive-array dataTypes as
3464
- well as scalars — the rendered template output must parse into the
3465
- declared shape
3491
+ - Valid on scalars and on `object` rows, where the rendered output must
3492
+ parse into an object. On an array row the template goes in a
3493
+ `buildArrayHelper` entry instead: on an `objectarray` row's own
3494
+ `extract` it is refused with 422 ("buildArrayHelper" must be present
3495
+ for object array datatype), and on a primitive-array row's own
3496
+ `extract` it renders null without an error
3466
3497
 
3467
3498
  ```json
3468
3499
  "extract": "{{record.price}} {{record.currency}}" // Combines two fields
@@ -3661,6 +3692,19 @@ components:
3661
3692
  - countryCodeToName
3662
3693
  - statusMapping
3663
3694
  - departmentCodes
3695
+ hardCodedValue:
3696
+ type: string
3697
+ description: |
3698
+ Constant written to the destination instead of an extracted value. On a primitive
3699
+ array (`stringarray`, `numberarray`, `booleanarray`) the string is split on commas,
3700
+ verbatim and untrimmed, into elements of the array's type (`"A,B"` gives `["A", "B"]`).
3701
+ On an `object` it must be a JSON object string and on an `objectarray` a JSON array
3702
+ string (an object string becomes one element); the save parses it and refuses non-JSON
3703
+ or the wrong shape with 422, and an array row with a constant needs no `buildArrayHelper`.
3704
+ examples:
3705
+ - USD
3706
+ - A,B
3707
+ - '[{"code": "A"}, {"code": "B"}]'
3664
3708
  description:
3665
3709
  type: string
3666
3710
  description: |
@@ -3796,15 +3840,25 @@ components:
3796
3840
  processor renders the entire destination array as null with no
3797
3841
  validation error. To emit a fixed number of static elements, add
3798
3842
  that many sibling constructed entries — never index the extract.
3843
+ - |-
3844
+ An entry's `extract` can be a Handlebars template. On an
3845
+ `objectarray` it must render a JSON object (one element) or a JSON
3846
+ array (one element per item). On a primitive array each entry
3847
+ renders one element, so a serialized array becomes one string
3848
+ element. A bare literal entry extract is refused with 422 ("extract
3849
+ only supports json path or handlebars expression"); set a constant
3850
+ with the row's `hardCodedValue` instead.
3799
3851
  description: |
3800
3852
  **Purpose**
3801
3853
  Configures how to construct arrays in the output record, handling various array types and inputs.
3802
3854
 
3803
3855
  **Guidance**
3804
- This is the REQUIRED mechanism for ALL array data types:
3856
+ This is the mechanism for building array data types:
3805
3857
 
3806
3858
  **When to Use**
3807
- - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.)
3859
+ - REQUIRED when dataType ends with "array" (stringarray, objectarray, etc.), unless the
3860
+ row passes a source array through with a JSONPath `extract` alone or sets
3861
+ `hardCodedValue`
3808
3862
  - Each entry in this array contributes elements to the output array
3809
3863
  - Multiple entries allow combining data from different input arrays
3810
3864
 
@@ -4579,7 +4633,7 @@ components:
4579
4633
 
4580
4634
  **Common filter patterns**
4581
4635
 
4582
- 1. **Pattern matching**: Using wildcards like `*` and `?`
4636
+ 1. **Pattern matching**: Regular expressions with `matches`
4583
4637
  2. **Value range filtering**: Numbers between min and max values
4584
4638
  3. **Date range filtering**: Items created/modified within specific time ranges
4585
4639
  4. **Status checking**: Items with specific status values or properties
@@ -4629,9 +4683,12 @@ components:
4629
4683
  - `"endswith"`: String ends with specified suffix (ends with)
4630
4684
  - `"contains"`: String contains specified substring (contains)
4631
4685
  - `"doesnotcontain"`: String does not contain specified substring (does not contain)
4632
- - `"isempty"`: Field is empty or null (is empty)
4633
- - `"isnotempty"`: Field contains a value (is not empty)
4634
- - `"matches"`: Matches specified pattern (matches)
4686
+ - `"empty"`: Field is missing or empty (is empty)
4687
+ - `"notempty"`: Field contains a value (is not empty)
4688
+ - `"matches"`: Matches a regular expression (matches)
4689
+
4690
+ `isempty`, `isnotempty` and `anyof` are not operators: they are refused with 422
4691
+ "Invalid operation: <name>".
4635
4692
 
4636
4693
  **Logical Operators**
4637
4694
  - `"and"`: All conditions must be true
@@ -4651,7 +4708,11 @@ components:
4651
4708
  **Using `extract` to access record fields:**
4652
4709
  - Retrieves values from the current record being processed
4653
4710
  - Can access nested properties using dot notation (e.g., `"customer.email"`)
4654
- - Returns the raw field value which may need type conversion
4711
+ - In a record filter, must be wrapped in a type conversion (`string`, `number`,
4712
+ `boolean` or `epochtime`): a bare `["extract", ...]` operand is refused with 422
4713
+ "Field operation extract must be called by a Type Conversion Operation but was called
4714
+ by <operator>", both when an import's filter is saved and by
4715
+ `POST /v1/processors/filter`
4655
4716
 
4656
4717
  **Using `settings` to access configuration values:**
4657
4718
  - Retrieves values from the integration's configuration settings
@@ -4669,7 +4730,20 @@ components:
4669
4730
  - `"floor"`: Round number down to the nearest integer
4670
4731
  - `"abs"`: Get absolute value of a number
4671
4732
 
4672
- 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:
4733
+ **Handlebars operands**
4734
+ - An operand can also be a string holding exactly one Handlebars expression, such as
4735
+ `"{{record.status}}"` or `"{{lowercase record.code}}"`, on either side of the
4736
+ operator. It renders against the record (`record.<field>`; an unprefixed
4737
+ `{{status}}` renders empty) before the comparison.
4738
+ - The rendered value is a string: wrap it in `["number", ...]` to compare it with a
4739
+ number, or the rule is refused with 422.
4740
+ - `epochtime` does not render Handlebars: `["epochtime", "{{timestamp}}"]` is refused
4741
+ with 422 "invalid datetime format".
4742
+ - A string with text around the expression, or with more than one expression, is
4743
+ compared as a literal.
4744
+
4745
+ Choose the type conversion that matches the comparison — `number` for numeric
4746
+ comparisons, `epochtime` for dates, `string` for text. For example:
4673
4747
 
4674
4748
  ```json
4675
4749
  [
@@ -4760,8 +4834,11 @@ components:
4760
4834
  [
4761
4835
  "notequals",
4762
4836
  [
4763
- "extract",
4764
- "status"
4837
+ "string",
4838
+ [
4839
+ "extract",
4840
+ "status"
4841
+ ]
4765
4842
  ],
4766
4843
  "cancelled"
4767
4844
  ]
@@ -4772,8 +4849,11 @@ components:
4772
4849
  [
4773
4850
  "startswith",
4774
4851
  [
4775
- "extract",
4776
- "filename"
4852
+ "string",
4853
+ [
4854
+ "extract",
4855
+ "filename"
4856
+ ]
4777
4857
  ],
4778
4858
  "HC"
4779
4859
  ]
@@ -4794,29 +4874,26 @@ components:
4794
4874
  ]
4795
4875
  ```
4796
4876
 
4797
- Example 4: Order date is after January 1, 2023
4877
+ Example 4: Order date is after January 1, 2023 (UTC). Compare dates as `epochtime`
4878
+ against epoch milliseconds: a `string` comparison of ISO timestamps orders values with
4879
+ different UTC offsets wrongly.
4798
4880
  ```json
4799
4881
  [
4800
4882
  "greaterthan",
4801
4883
  [
4802
- "extract",
4803
- "orderDate"
4804
- ],
4805
- "2023-01-01T00:00:00Z"
4806
- ]
4807
- ```
4808
-
4809
- Example 5: Category contains any of ["Urgent", "High Priority"]
4810
- ```json
4811
- [
4812
- "anyof",
4813
- [
4814
- "extract",
4815
- "category"
4884
+ "epochtime",
4885
+ [
4886
+ "extract",
4887
+ "orderDate"
4888
+ ]
4816
4889
  ],
4817
- ["Urgent", "High Priority"]
4890
+ 1672531200000
4818
4891
  ]
4819
4892
  ```
4893
+ x-celigo-ai-guidance:
4894
+ - |-
4895
+ To test whether a field has a value, use `notempty` on the wrapped extract, not a
4896
+ `matches` pattern: a record without the field matches `.*\S.*`.
4820
4897
  items:
4821
4898
  oneOf:
4822
4899
  - title: String
@@ -5435,7 +5512,7 @@ components:
5435
5512
  - envelope
5436
5513
  x-enumDescriptions:
5437
5514
  record: The transform processor evaluates `mappings[].extract` JSONPath against the flat record itself (`$.field`, no `record.` segment) — the default when absent.
5438
- 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`).
5515
+ 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`).
5439
5516
  description: |
5440
5517
  Controls the JSON shape the transformTwoDotZero processor
5441
5518
  evaluates `mappings[].extract` JSONPath values against at
@@ -5455,10 +5532,12 @@ components:
5455
5532
  `"$.PLACEHOLDER_<field>"`.
5456
5533
  This is the dominant Celigo idiom and the right choice for new transforms.
5457
5534
  - `envelope`: the processor sees a wrapped object
5458
- `{record: {...}, settings: ..., job: ...}` (plus
5459
- `fileMeta` on file-provider steps).
5535
+ `{record: {...}, job, testMode, settings, headers,
5536
+ queryParams}` (plus `fileMeta` on file-provider steps).
5460
5537
  `mappings[].extract` JSONPath MUST include the
5461
- `record.` segment — e.g. `"$.record.orderId"`;
5538
+ `record.` segment for record fields — e.g.
5539
+ `"$.record.orderId"` — and reads `headers` and
5540
+ `queryParams` beside it (`$.headers['X-Id']`);
5462
5541
  PLACEHOLDER extracts use `"$.record.PLACEHOLDER_<field>"`.
5463
5542
  Pick this only when the transform was authored against
5464
5543
  the envelope shape on purpose.
@@ -5467,6 +5546,11 @@ components:
5467
5546
  (`{{record.field}}`, `{{dateFormat ... record.field}}`)
5468
5547
  ALWAYS reference the `record` root regardless of
5469
5548
  `inputContext` — only JSONPath anchoring flips.
5549
+ - |-
5550
+ In `envelope` mode a `modify` transform merges its mapped
5551
+ fields into `record` and keeps the rest of the envelope
5552
+ around it; a `create` transform returns only the mapped
5553
+ fields, as a bare record.
5470
5554
  - |-
5471
5555
  Emit `inputContext` explicitly on new v2 transforms:
5472
5556
  unset is read as `record`, but stating it makes the
@@ -5487,13 +5571,17 @@ components:
5487
5571
 
5488
5572
  - ``envelope``: the transform processor sees a wrapped
5489
5573
  object of the shape
5490
- ``{record: {...}, settings: ..., job: ...}`` (plus
5491
- ``fileMeta`` on file-provider steps) — the
5574
+ ``{record: {...}, job, testMode, settings, headers,
5575
+ queryParams}`` (plus ``fileMeta`` on file-provider
5576
+ steps; ``headers`` and ``queryParams`` sit beside
5577
+ ``record``) — the
5492
5578
  same runtime-context envelope Handlebars / SQL /
5493
5579
  GraphQL templates render against. ``mappings[].extract``
5494
- JSONPath values MUST include the ``record.`` segment
5495
- — for example ``"$.record.orderId"`` or
5496
- ``"$.record.customer.email"``. PLACEHOLDER extracts
5580
+ JSONPath values for record fields MUST include the
5581
+ ``record.`` segment — for example ``"$.record.orderId"``
5582
+ or ``"$.record.customer.email"`` — while ``headers`` and
5583
+ ``queryParams`` are read beside it
5584
+ (``"$.headers['X-Id']"``). PLACEHOLDER extracts
5497
5585
  use ``"$.record.PLACEHOLDER_<field>"``. Pick this
5498
5586
  mode only when the export was authored against the
5499
5587
  envelope shape on purpose (typically because an