@celigo/api-specs 0.2.7 → 0.2.8

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
@@ -4681,36 +4681,39 @@ components:
4681
4681
  OneToMany:
4682
4682
  type: boolean
4683
4683
  description: |
4684
- Controls whether the resource treats child records within parent records as the primary data units.
4685
-
4686
- **Important: this is not for specifying where records are in an api response**
4687
-
4688
- If you need to tell an export where to find the array of records in the HTTP response
4689
- body (e.g. "the records are at data.items"), use `http.response.resourcePath` instead.
4690
- `oneToMany` serves a completely different purpose it operates on records that have
4691
- already been extracted from the response.
4692
-
4693
- **What oneToMany actually does**
4694
-
4695
- When set to true, this field fundamentally changes how record data is processed:
4696
- - The system will "unwrap" nested child records from their parent containers
4697
- - Each child record becomes a separate output record for downstream processing
4698
- - The pathToMany field must be set to indicate where these child records are located
4699
- - Parent record fields can still be accessed via a special "parent" context
4700
-
4701
- This is typically used on **lookup exports** (isLookup: true) or **imports** where
4702
- the incoming records contain nested arrays that need to be fanned out.
4703
-
4704
- Common scenarios for enabling this option:
4705
- - Processing order line items individually from an order export
4706
- - Handling invoice line items from an invoice export
4707
- - Processing individual transaction lines from journal entries
4708
- - Extracting address records from customer exports
4709
-
4710
- This setting applies for the duration of the current flow step only and does not affect
4711
- how data is stored or structured in other flow steps.
4712
-
4713
- If false (default), the resource processes each top-level record as a single unit.
4684
+ When true, the step runs once per child record instead of once per incoming record.
4685
+ `pathToMany` names the array field that holds the children inside an object record; when
4686
+ the incoming record is itself an array (grouped or row-based data), leave `pathToMany` blank
4687
+ and each element becomes a record. The fan-out is scoped to this step: afterwards the children
4688
+ are re-joined into the record's original shape the object with its array, or the array of rows
4689
+ carrying any response-mapping enrichment, and that re-joined record is what the next step
4690
+ receives. Not for locating records in an export's HTTP response; use
4691
+ `http.response.resourcePath` for that.
4692
+ x-celigo-ai-guidance:
4693
+ - |-
4694
+ Two modes, decided by the SHAPE of the record entering the step. Object record with a child
4695
+ array under a field → set ``pathToMany`` to that field. Array record (a ``groupByFields``
4696
+ export, a CSV/file group, a script that returns an array) leave ``pathToMany`` blank; each
4697
+ element becomes one record. Live-verified 2026-09-10 on flows, Tools, and APIs.
4698
+ - |-
4699
+ Blank ``pathToMany`` on an OBJECT record fails every record with code ``oneToMany_error``:
4700
+ "Failed to extract child records from oneToMany import data. Record at index 0 was not an
4701
+ array, and no PathToMany was provided". Builder previews return only the code, with no
4702
+ message. The fix is never "turn oneToMany off" by default first determine whether the
4703
+ record arriving at the step is an object (set a path) or an array (blank is correct; a
4704
+ preview error on an array-fed step is the preview panel re-applying one-to-many to the
4705
+ already-fanned-out record verify with a test run or a real run).
4706
+ - |-
4707
+ Child record shape differs by mode. Path mode: each child is the array element plus
4708
+ ``_PARENT`` (the parent record minus the array). Blank/row mode: each child is the element
4709
+ itself, with no ``_PARENT``. In both modes templates on the step reference the child as
4710
+ ``{{record.<field>}}``; a response mapping on a one-to-many lookup merges into each child and
4711
+ the downstream step receives the re-joined parent (path mode) or the re-joined array (row
4712
+ mode) with every element enriched.
4713
+ - |-
4714
+ One-to-many never batches by itself: ``batch_of_records`` appears as the HTTP body template
4715
+ root only when ``http.batchSize`` is greater than 1 (children are batched after fan-out).
4716
+ With the default batch size the template root is ``record``.
4714
4717
  default: false
4715
4718
  examples:
4716
4719
  - true
@@ -4718,27 +4721,25 @@ components:
4718
4721
  PathToMany:
4719
4722
  type: string
4720
4723
  description: |
4721
- Specifies the JSON path to child records when oneToMany mode is enabled.
4722
-
4723
- This field is only used when oneToMany is set to true. It defines the exact location
4724
- of child records within the parent record structure using dot notation:
4725
-
4726
- - Simple path: "items" for a direct child array field
4727
- - Nested path: "lines.lineItems" for a more deeply nested array
4728
- - Multi-level: "details.items.subitems" for deeply nested structures
4729
-
4730
- The system uses this path to:
4731
- - Locate the array of child records within each parent record
4732
- - Extract each array element as a separate record for processing
4733
- - Make both the child record data and parent context available to downstream steps
4734
-
4735
- Important considerations:
4736
- - The path must point to an array field
4737
- - For row-based data (i.e. where Celigo models this via an array or arrays of objects), this field is not required
4738
- - If the path is invalid or doesn't exist, the resource will report success but process zero records
4739
- - Maximum path depth: 10 levels
4740
-
4741
- This field must contain a valid JSON path expression using dot notation.
4724
+ Path to the array of child records inside an object record when `oneToMany` is true, in dot
4725
+ notation (`items`, `lines.lineItems`). Leave blank when the incoming record is itself an array
4726
+ (grouped or row-based data) each element is then a child record. A path that does not resolve
4727
+ to an array processes zero records and reports success.
4728
+ x-celigo-ai-guidance:
4729
+ - |-
4730
+ Set this ONLY when the record entering the step is an object whose children sit under a field.
4731
+ On an array record (a ``groupByFields`` export, a CSV/file group, a script returning an array)
4732
+ any path resolves to nothing: the step processes ZERO children, builds no request, and reports
4733
+ success with no error. Live-verified 2026-09-10 — the failure is silent, so confirm the arriving
4734
+ record's shape (test run stage data, or the flow builder's input panel: ``rows`` means array).
4735
+ - |-
4736
+ Blank with an object record is the ``oneToMany_error`` failure ("Record at index 0 was not an
4737
+ array, and no PathToMany was provided"); blank with an array record is the correct row-based
4738
+ configuration. An empty string behaves exactly like an absent field.
4739
+ - |-
4740
+ Use the bare field name or dotted path (``lineItems``, ``details.items``), not a JSONPath
4741
+ expression. Each child in path mode carries ``_PARENT`` (the parent minus the array), so
4742
+ parent-level fields are read as ``{{record._PARENT.<field>}}``.
4742
4743
  examples:
4743
4744
  - items
4744
4745
  - line_items
package/dist/export.yml CHANGED
@@ -796,36 +796,39 @@ components:
796
796
  OneToMany:
797
797
  type: boolean
798
798
  description: |
799
- Controls whether the resource treats child records within parent records as the primary data units.
800
-
801
- **Important: this is not for specifying where records are in an api response**
802
-
803
- If you need to tell an export where to find the array of records in the HTTP response
804
- body (e.g. "the records are at data.items"), use `http.response.resourcePath` instead.
805
- `oneToMany` serves a completely different purpose it operates on records that have
806
- already been extracted from the response.
807
-
808
- **What oneToMany actually does**
809
-
810
- When set to true, this field fundamentally changes how record data is processed:
811
- - The system will "unwrap" nested child records from their parent containers
812
- - Each child record becomes a separate output record for downstream processing
813
- - The pathToMany field must be set to indicate where these child records are located
814
- - Parent record fields can still be accessed via a special "parent" context
815
-
816
- This is typically used on **lookup exports** (isLookup: true) or **imports** where
817
- the incoming records contain nested arrays that need to be fanned out.
818
-
819
- Common scenarios for enabling this option:
820
- - Processing order line items individually from an order export
821
- - Handling invoice line items from an invoice export
822
- - Processing individual transaction lines from journal entries
823
- - Extracting address records from customer exports
824
-
825
- This setting applies for the duration of the current flow step only and does not affect
826
- how data is stored or structured in other flow steps.
827
-
828
- If false (default), the resource processes each top-level record as a single unit.
799
+ When true, the step runs once per child record instead of once per incoming record.
800
+ `pathToMany` names the array field that holds the children inside an object record; when
801
+ the incoming record is itself an array (grouped or row-based data), leave `pathToMany` blank
802
+ and each element becomes a record. The fan-out is scoped to this step: afterwards the children
803
+ are re-joined into the record's original shape the object with its array, or the array of rows
804
+ carrying any response-mapping enrichment, and that re-joined record is what the next step
805
+ receives. Not for locating records in an export's HTTP response; use
806
+ `http.response.resourcePath` for that.
807
+ x-celigo-ai-guidance:
808
+ - |-
809
+ Two modes, decided by the SHAPE of the record entering the step. Object record with a child
810
+ array under a field → set ``pathToMany`` to that field. Array record (a ``groupByFields``
811
+ export, a CSV/file group, a script that returns an array) leave ``pathToMany`` blank; each
812
+ element becomes one record. Live-verified 2026-09-10 on flows, Tools, and APIs.
813
+ - |-
814
+ Blank ``pathToMany`` on an OBJECT record fails every record with code ``oneToMany_error``:
815
+ "Failed to extract child records from oneToMany import data. Record at index 0 was not an
816
+ array, and no PathToMany was provided". Builder previews return only the code, with no
817
+ message. The fix is never "turn oneToMany off" by default first determine whether the
818
+ record arriving at the step is an object (set a path) or an array (blank is correct; a
819
+ preview error on an array-fed step is the preview panel re-applying one-to-many to the
820
+ already-fanned-out record verify with a test run or a real run).
821
+ - |-
822
+ Child record shape differs by mode. Path mode: each child is the array element plus
823
+ ``_PARENT`` (the parent record minus the array). Blank/row mode: each child is the element
824
+ itself, with no ``_PARENT``. In both modes templates on the step reference the child as
825
+ ``{{record.<field>}}``; a response mapping on a one-to-many lookup merges into each child and
826
+ the downstream step receives the re-joined parent (path mode) or the re-joined array (row
827
+ mode) with every element enriched.
828
+ - |-
829
+ One-to-many never batches by itself: ``batch_of_records`` appears as the HTTP body template
830
+ root only when ``http.batchSize`` is greater than 1 (children are batched after fan-out).
831
+ With the default batch size the template root is ``record``.
829
832
  default: false
830
833
  examples:
831
834
  - true
@@ -833,27 +836,25 @@ components:
833
836
  PathToMany:
834
837
  type: string
835
838
  description: |
836
- Specifies the JSON path to child records when oneToMany mode is enabled.
837
-
838
- This field is only used when oneToMany is set to true. It defines the exact location
839
- of child records within the parent record structure using dot notation:
840
-
841
- - Simple path: "items" for a direct child array field
842
- - Nested path: "lines.lineItems" for a more deeply nested array
843
- - Multi-level: "details.items.subitems" for deeply nested structures
844
-
845
- The system uses this path to:
846
- - Locate the array of child records within each parent record
847
- - Extract each array element as a separate record for processing
848
- - Make both the child record data and parent context available to downstream steps
849
-
850
- Important considerations:
851
- - The path must point to an array field
852
- - For row-based data (i.e. where Celigo models this via an array or arrays of objects), this field is not required
853
- - If the path is invalid or doesn't exist, the resource will report success but process zero records
854
- - Maximum path depth: 10 levels
855
-
856
- This field must contain a valid JSON path expression using dot notation.
839
+ Path to the array of child records inside an object record when `oneToMany` is true, in dot
840
+ notation (`items`, `lines.lineItems`). Leave blank when the incoming record is itself an array
841
+ (grouped or row-based data) each element is then a child record. A path that does not resolve
842
+ to an array processes zero records and reports success.
843
+ x-celigo-ai-guidance:
844
+ - |-
845
+ Set this ONLY when the record entering the step is an object whose children sit under a field.
846
+ On an array record (a ``groupByFields`` export, a CSV/file group, a script returning an array)
847
+ any path resolves to nothing: the step processes ZERO children, builds no request, and reports
848
+ success with no error. Live-verified 2026-09-10 — the failure is silent, so confirm the arriving
849
+ record's shape (test run stage data, or the flow builder's input panel: ``rows`` means array).
850
+ - |-
851
+ Blank with an object record is the ``oneToMany_error`` failure ("Record at index 0 was not an
852
+ array, and no PathToMany was provided"); blank with an array record is the correct row-based
853
+ configuration. An empty string behaves exactly like an absent field.
854
+ - |-
855
+ Use the bare field name or dotted path (``lineItems``, ``details.items``), not a JSONPath
856
+ expression. Each child in path mode carries ``_PARENT`` (the parent minus the array), so
857
+ parent-level fields are read as ``{{record._PARENT.<field>}}``.
857
858
  examples:
858
859
  - items
859
860
  - line_items
package/dist/import.yml CHANGED
@@ -2016,14 +2016,22 @@ components:
2016
2016
  ### Pattern B — Batch / page wrapper around mapped records
2017
2017
 
2018
2018
  Wrap an envelope (header, version, marketplace, etc.) around
2019
- a serialized batch. ``{{#each data}}`` iterates the page;
2020
- ``{{#each batch_of_records}}`` iterates the page-level batch
2021
- for ``oneToMany`` imports.
2019
+ a serialized batch. The template root depends ONLY on
2020
+ ``batchSize`` (live-verified 2026-09-10): with ``batchSize`` 1
2021
+ (the default) the root carries ``record`` (an object record —
2022
+ or the fanned-out child on a ``oneToMany`` import) or ``rows``
2023
+ (a grouped/array record), and ``data`` is the one-element list
2024
+ of records in the request; with ``batchSize`` > 1 the root
2025
+ carries ``batch_of_records`` (one ``{record: …}`` item per
2026
+ record in the request) and ``data`` (the bare records), and
2027
+ ``record`` / ``rows`` are ABSENT. ``oneToMany`` does not make
2028
+ ``batch_of_records`` appear — children are batched after
2029
+ fan-out under the same rule.
2022
2030
 
2023
2031
  Example shape:
2024
2032
  ``{"values": {{#each data}} {{{jsonSerialize this}}} {{/each}} }``
2025
2033
 
2026
- Example with comma-separation:
2034
+ Example with comma-separation (``batchSize`` > 1):
2027
2035
  ``[{{#each batch_of_records}}{{{jsonSerialize this.record}}}{{#unless @last}},{{/unless}}{{/each}}]``
2028
2036
 
2029
2037
  ### Pattern C — Custom envelope with per-message fields
@@ -10290,36 +10298,39 @@ components:
10290
10298
  OneToMany:
10291
10299
  type: boolean
10292
10300
  description: |
10293
- Controls whether the resource treats child records within parent records as the primary data units.
10294
-
10295
- **Important: this is not for specifying where records are in an api response**
10296
-
10297
- If you need to tell an export where to find the array of records in the HTTP response
10298
- body (e.g. "the records are at data.items"), use `http.response.resourcePath` instead.
10299
- `oneToMany` serves a completely different purpose it operates on records that have
10300
- already been extracted from the response.
10301
-
10302
- **What oneToMany actually does**
10303
-
10304
- When set to true, this field fundamentally changes how record data is processed:
10305
- - The system will "unwrap" nested child records from their parent containers
10306
- - Each child record becomes a separate output record for downstream processing
10307
- - The pathToMany field must be set to indicate where these child records are located
10308
- - Parent record fields can still be accessed via a special "parent" context
10309
-
10310
- This is typically used on **lookup exports** (isLookup: true) or **imports** where
10311
- the incoming records contain nested arrays that need to be fanned out.
10312
-
10313
- Common scenarios for enabling this option:
10314
- - Processing order line items individually from an order export
10315
- - Handling invoice line items from an invoice export
10316
- - Processing individual transaction lines from journal entries
10317
- - Extracting address records from customer exports
10318
-
10319
- This setting applies for the duration of the current flow step only and does not affect
10320
- how data is stored or structured in other flow steps.
10321
-
10322
- If false (default), the resource processes each top-level record as a single unit.
10301
+ When true, the step runs once per child record instead of once per incoming record.
10302
+ `pathToMany` names the array field that holds the children inside an object record; when
10303
+ the incoming record is itself an array (grouped or row-based data), leave `pathToMany` blank
10304
+ and each element becomes a record. The fan-out is scoped to this step: afterwards the children
10305
+ are re-joined into the record's original shape the object with its array, or the array of rows
10306
+ carrying any response-mapping enrichment, and that re-joined record is what the next step
10307
+ receives. Not for locating records in an export's HTTP response; use
10308
+ `http.response.resourcePath` for that.
10309
+ x-celigo-ai-guidance:
10310
+ - |-
10311
+ Two modes, decided by the SHAPE of the record entering the step. Object record with a child
10312
+ array under a field → set ``pathToMany`` to that field. Array record (a ``groupByFields``
10313
+ export, a CSV/file group, a script that returns an array) leave ``pathToMany`` blank; each
10314
+ element becomes one record. Live-verified 2026-09-10 on flows, Tools, and APIs.
10315
+ - |-
10316
+ Blank ``pathToMany`` on an OBJECT record fails every record with code ``oneToMany_error``:
10317
+ "Failed to extract child records from oneToMany import data. Record at index 0 was not an
10318
+ array, and no PathToMany was provided". Builder previews return only the code, with no
10319
+ message. The fix is never "turn oneToMany off" by default first determine whether the
10320
+ record arriving at the step is an object (set a path) or an array (blank is correct; a
10321
+ preview error on an array-fed step is the preview panel re-applying one-to-many to the
10322
+ already-fanned-out record verify with a test run or a real run).
10323
+ - |-
10324
+ Child record shape differs by mode. Path mode: each child is the array element plus
10325
+ ``_PARENT`` (the parent record minus the array). Blank/row mode: each child is the element
10326
+ itself, with no ``_PARENT``. In both modes templates on the step reference the child as
10327
+ ``{{record.<field>}}``; a response mapping on a one-to-many lookup merges into each child and
10328
+ the downstream step receives the re-joined parent (path mode) or the re-joined array (row
10329
+ mode) with every element enriched.
10330
+ - |-
10331
+ One-to-many never batches by itself: ``batch_of_records`` appears as the HTTP body template
10332
+ root only when ``http.batchSize`` is greater than 1 (children are batched after fan-out).
10333
+ With the default batch size the template root is ``record``.
10323
10334
  default: false
10324
10335
  examples:
10325
10336
  - true
@@ -10327,27 +10338,25 @@ components:
10327
10338
  PathToMany:
10328
10339
  type: string
10329
10340
  description: |
10330
- Specifies the JSON path to child records when oneToMany mode is enabled.
10331
-
10332
- This field is only used when oneToMany is set to true. It defines the exact location
10333
- of child records within the parent record structure using dot notation:
10334
-
10335
- - Simple path: "items" for a direct child array field
10336
- - Nested path: "lines.lineItems" for a more deeply nested array
10337
- - Multi-level: "details.items.subitems" for deeply nested structures
10338
-
10339
- The system uses this path to:
10340
- - Locate the array of child records within each parent record
10341
- - Extract each array element as a separate record for processing
10342
- - Make both the child record data and parent context available to downstream steps
10343
-
10344
- Important considerations:
10345
- - The path must point to an array field
10346
- - For row-based data (i.e. where Celigo models this via an array or arrays of objects), this field is not required
10347
- - If the path is invalid or doesn't exist, the resource will report success but process zero records
10348
- - Maximum path depth: 10 levels
10349
-
10350
- This field must contain a valid JSON path expression using dot notation.
10341
+ Path to the array of child records inside an object record when `oneToMany` is true, in dot
10342
+ notation (`items`, `lines.lineItems`). Leave blank when the incoming record is itself an array
10343
+ (grouped or row-based data) each element is then a child record. A path that does not resolve
10344
+ to an array processes zero records and reports success.
10345
+ x-celigo-ai-guidance:
10346
+ - |-
10347
+ Set this ONLY when the record entering the step is an object whose children sit under a field.
10348
+ On an array record (a ``groupByFields`` export, a CSV/file group, a script returning an array)
10349
+ any path resolves to nothing: the step processes ZERO children, builds no request, and reports
10350
+ success with no error. Live-verified 2026-09-10 — the failure is silent, so confirm the arriving
10351
+ record's shape (test run stage data, or the flow builder's input panel: ``rows`` means array).
10352
+ - |-
10353
+ Blank with an object record is the ``oneToMany_error`` failure ("Record at index 0 was not an
10354
+ array, and no PathToMany was provided"); blank with an array record is the correct row-based
10355
+ configuration. An empty string behaves exactly like an absent field.
10356
+ - |-
10357
+ Use the bare field name or dotted path (``lineItems``, ``details.items``), not a JSONPath
10358
+ expression. Each child in path mode carries ``_PARENT`` (the parent minus the array), so
10359
+ parent-level fields are read as ``{{record._PARENT.<field>}}``.
10351
10360
  examples:
10352
10361
  - items
10353
10362
  - line_items
package/dist/tool.yml CHANGED
@@ -10627,14 +10627,22 @@ components:
10627
10627
  ### Pattern B — Batch / page wrapper around mapped records
10628
10628
 
10629
10629
  Wrap an envelope (header, version, marketplace, etc.) around
10630
- a serialized batch. ``{{#each data}}`` iterates the page;
10631
- ``{{#each batch_of_records}}`` iterates the page-level batch
10632
- for ``oneToMany`` imports.
10630
+ a serialized batch. The template root depends ONLY on
10631
+ ``batchSize`` (live-verified 2026-09-10): with ``batchSize`` 1
10632
+ (the default) the root carries ``record`` (an object record —
10633
+ or the fanned-out child on a ``oneToMany`` import) or ``rows``
10634
+ (a grouped/array record), and ``data`` is the one-element list
10635
+ of records in the request; with ``batchSize`` > 1 the root
10636
+ carries ``batch_of_records`` (one ``{record: …}`` item per
10637
+ record in the request) and ``data`` (the bare records), and
10638
+ ``record`` / ``rows`` are ABSENT. ``oneToMany`` does not make
10639
+ ``batch_of_records`` appear — children are batched after
10640
+ fan-out under the same rule.
10633
10641
 
10634
10642
  Example shape:
10635
10643
  ``{"values": {{#each data}} {{{jsonSerialize this}}} {{/each}} }``
10636
10644
 
10637
- Example with comma-separation:
10645
+ Example with comma-separation (``batchSize`` > 1):
10638
10646
  ``[{{#each batch_of_records}}{{{jsonSerialize this.record}}}{{#unless @last}},{{/unless}}{{/each}}]``
10639
10647
 
10640
10648
  ### Pattern C — Custom envelope with per-message fields
@@ -18632,36 +18640,39 @@ components:
18632
18640
  OneToMany:
18633
18641
  type: boolean
18634
18642
  description: |
18635
- Controls whether the resource treats child records within parent records as the primary data units.
18636
-
18637
- **Important: this is not for specifying where records are in an api response**
18638
-
18639
- If you need to tell an export where to find the array of records in the HTTP response
18640
- body (e.g. "the records are at data.items"), use `http.response.resourcePath` instead.
18641
- `oneToMany` serves a completely different purpose it operates on records that have
18642
- already been extracted from the response.
18643
-
18644
- **What oneToMany actually does**
18645
-
18646
- When set to true, this field fundamentally changes how record data is processed:
18647
- - The system will "unwrap" nested child records from their parent containers
18648
- - Each child record becomes a separate output record for downstream processing
18649
- - The pathToMany field must be set to indicate where these child records are located
18650
- - Parent record fields can still be accessed via a special "parent" context
18651
-
18652
- This is typically used on **lookup exports** (isLookup: true) or **imports** where
18653
- the incoming records contain nested arrays that need to be fanned out.
18654
-
18655
- Common scenarios for enabling this option:
18656
- - Processing order line items individually from an order export
18657
- - Handling invoice line items from an invoice export
18658
- - Processing individual transaction lines from journal entries
18659
- - Extracting address records from customer exports
18660
-
18661
- This setting applies for the duration of the current flow step only and does not affect
18662
- how data is stored or structured in other flow steps.
18663
-
18664
- If false (default), the resource processes each top-level record as a single unit.
18643
+ When true, the step runs once per child record instead of once per incoming record.
18644
+ `pathToMany` names the array field that holds the children inside an object record; when
18645
+ the incoming record is itself an array (grouped or row-based data), leave `pathToMany` blank
18646
+ and each element becomes a record. The fan-out is scoped to this step: afterwards the children
18647
+ are re-joined into the record's original shape the object with its array, or the array of rows
18648
+ carrying any response-mapping enrichment, and that re-joined record is what the next step
18649
+ receives. Not for locating records in an export's HTTP response; use
18650
+ `http.response.resourcePath` for that.
18651
+ x-celigo-ai-guidance:
18652
+ - |-
18653
+ Two modes, decided by the SHAPE of the record entering the step. Object record with a child
18654
+ array under a field → set ``pathToMany`` to that field. Array record (a ``groupByFields``
18655
+ export, a CSV/file group, a script that returns an array) leave ``pathToMany`` blank; each
18656
+ element becomes one record. Live-verified 2026-09-10 on flows, Tools, and APIs.
18657
+ - |-
18658
+ Blank ``pathToMany`` on an OBJECT record fails every record with code ``oneToMany_error``:
18659
+ "Failed to extract child records from oneToMany import data. Record at index 0 was not an
18660
+ array, and no PathToMany was provided". Builder previews return only the code, with no
18661
+ message. The fix is never "turn oneToMany off" by default first determine whether the
18662
+ record arriving at the step is an object (set a path) or an array (blank is correct; a
18663
+ preview error on an array-fed step is the preview panel re-applying one-to-many to the
18664
+ already-fanned-out record verify with a test run or a real run).
18665
+ - |-
18666
+ Child record shape differs by mode. Path mode: each child is the array element plus
18667
+ ``_PARENT`` (the parent record minus the array). Blank/row mode: each child is the element
18668
+ itself, with no ``_PARENT``. In both modes templates on the step reference the child as
18669
+ ``{{record.<field>}}``; a response mapping on a one-to-many lookup merges into each child and
18670
+ the downstream step receives the re-joined parent (path mode) or the re-joined array (row
18671
+ mode) with every element enriched.
18672
+ - |-
18673
+ One-to-many never batches by itself: ``batch_of_records`` appears as the HTTP body template
18674
+ root only when ``http.batchSize`` is greater than 1 (children are batched after fan-out).
18675
+ With the default batch size the template root is ``record``.
18665
18676
  default: false
18666
18677
  examples:
18667
18678
  - true
@@ -18669,27 +18680,25 @@ components:
18669
18680
  PathToMany:
18670
18681
  type: string
18671
18682
  description: |
18672
- Specifies the JSON path to child records when oneToMany mode is enabled.
18673
-
18674
- This field is only used when oneToMany is set to true. It defines the exact location
18675
- of child records within the parent record structure using dot notation:
18676
-
18677
- - Simple path: "items" for a direct child array field
18678
- - Nested path: "lines.lineItems" for a more deeply nested array
18679
- - Multi-level: "details.items.subitems" for deeply nested structures
18680
-
18681
- The system uses this path to:
18682
- - Locate the array of child records within each parent record
18683
- - Extract each array element as a separate record for processing
18684
- - Make both the child record data and parent context available to downstream steps
18685
-
18686
- Important considerations:
18687
- - The path must point to an array field
18688
- - For row-based data (i.e. where Celigo models this via an array or arrays of objects), this field is not required
18689
- - If the path is invalid or doesn't exist, the resource will report success but process zero records
18690
- - Maximum path depth: 10 levels
18691
-
18692
- This field must contain a valid JSON path expression using dot notation.
18683
+ Path to the array of child records inside an object record when `oneToMany` is true, in dot
18684
+ notation (`items`, `lines.lineItems`). Leave blank when the incoming record is itself an array
18685
+ (grouped or row-based data) each element is then a child record. A path that does not resolve
18686
+ to an array processes zero records and reports success.
18687
+ x-celigo-ai-guidance:
18688
+ - |-
18689
+ Set this ONLY when the record entering the step is an object whose children sit under a field.
18690
+ On an array record (a ``groupByFields`` export, a CSV/file group, a script returning an array)
18691
+ any path resolves to nothing: the step processes ZERO children, builds no request, and reports
18692
+ success with no error. Live-verified 2026-09-10 — the failure is silent, so confirm the arriving
18693
+ record's shape (test run stage data, or the flow builder's input panel: ``rows`` means array).
18694
+ - |-
18695
+ Blank with an object record is the ``oneToMany_error`` failure ("Record at index 0 was not an
18696
+ array, and no PathToMany was provided"); blank with an array record is the correct row-based
18697
+ configuration. An empty string behaves exactly like an absent field.
18698
+ - |-
18699
+ Use the bare field name or dotted path (``lineItems``, ``details.items``), not a JSONPath
18700
+ expression. Each child in path mode carries ``_PARENT`` (the parent minus the array), so
18701
+ parent-level fields are read as ``{{record._PARENT.<field>}}``.
18693
18702
  examples:
18694
18703
  - items
18695
18704
  - line_items
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celigo/api-specs",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "private": false,
5
5
  "description": "Public OpenAPI bundles (dist/) and the celigo-cli lint schema pack (schemas.json).",
6
6
  "files": [
package/schemas.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "provenance": {
3
3
  "repo": "celigo/integrator-api-specs",
4
- "iasCommit": "ffdb923",
4
+ "iasCommit": "3f92987",
5
5
  "generatedAt": "2026-09-10"
6
6
  },
7
7
  "roots": {