@celigo/api-specs 0.2.305 → 0.2.306

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/api.yml CHANGED
@@ -1950,7 +1950,13 @@ paths:
1950
1950
 
1951
1951
  Each entry in `stages[]` carries the stage `name` (e.g. `request`, `parse`, `router`) plus its
1952
1952
  `input`, `output`, and `errors`. Stages that did not produce data for a given direction return
1953
- `null` for that field. Top-level `errors` aggregates step-level errors. A router's step id
1953
+ `null` for that field; otherwise most stages hold arrays, but a step's response-mapping stages
1954
+ hold objects: `responseMap` takes `{contexts}` (one per request, the step's parsed reply plus
1955
+ `statusCode`, `headers`, and `_json`) and returns `{data}`, the mapped records as
1956
+ `{record, traceKey}`; `postResponseMapHook` takes the hook's `options` (`postResponseMapData`,
1957
+ `responseData`, `configuration`) and returns `{data}`. The stage stores each
1958
+ `postResponseMapData` entry as `{record, traceKey}`, while the hook itself receives the bare
1959
+ records. Top-level `errors` aggregates step-level errors. A router's step id
1954
1960
  returns a top-level `output` instead of `stages` and `errors`: one entry per request, with the
1955
1961
  `branches` position the router chose and any routing `errors`.
1956
1962
  parameters:
@@ -2000,9 +2006,28 @@ paths:
2000
2006
  errors:
2001
2007
  description: Stage-level errors, or `null` when none.
2002
2008
  input:
2003
- description: Input records the stage received, or `null`.
2009
+ description: |-
2010
+ What the stage received: an array for most stages, an object for
2011
+ `responseMap` (`{contexts}`) and `postResponseMapHook` (the hook's
2012
+ `options`), or `null`.
2013
+ type:
2014
+ - array
2015
+ - object
2016
+ - 'null'
2017
+ items:
2018
+ type: object
2019
+ additionalProperties: true
2004
2020
  output:
2005
- description: Output records the stage produced, or `null`.
2021
+ description: |-
2022
+ What the stage produced: an array for most stages, `{data}` for
2023
+ `responseMap` and `postResponseMapHook`, or `null`.
2024
+ type:
2025
+ - array
2026
+ - object
2027
+ - 'null'
2028
+ items:
2029
+ type: object
2030
+ additionalProperties: true
2006
2031
  errors:
2007
2032
  type: array
2008
2033
  description: Aggregated step-level errors.
package/dist/flow.yml CHANGED
@@ -3900,7 +3900,7 @@ paths:
3900
3900
  `flowJob` and `childJobs` returned here are test artifacts, not records
3901
3901
  you'll find via `GET /v1/jobs`. The top-level `metadata` map is keyed by
3902
3902
  step id; each value is the ordered list of stage names that step produced
3903
- (e.g. `request`, `parse`, `router`, `input`). Use those step ids with
3903
+ (e.g. `inputFilter`, `request`, `response`, `parse`, `router`). Use those step ids with
3904
3904
  `GET /v1/flows/{_id}/test/run/{runId}/{_stepId}` to inspect per-stage
3905
3905
  input/output and errors, or with
3906
3906
  `GET /v1/flows/{_id}/test/run/{runId}/{_stepId}/logs/requestAndResponse`
@@ -3944,7 +3944,7 @@ paths:
3944
3944
  examples:
3945
3945
  default:
3946
3946
  value:
3947
- _exportId: 69d462d5b9c28ea0b7f82522
3947
+ _exportId: 69d462c2a3f9fae38d72b07b
3948
3948
  responses:
3949
3949
  '200':
3950
3950
  description: |-
@@ -3960,8 +3960,11 @@ paths:
3960
3960
  type: object
3961
3961
  description: |-
3962
3962
  Map of step id to the ordered list of stage names that step
3963
- produced during the run. Step ids ending in `_input` and the
3964
- synthetic `main` router key are also present.
3963
+ produced during the run. Export and import steps are keyed by
3964
+ their `_exportId` / `_importId` and each router by its `id`; a
3965
+ flow with no stored `routers` (one saved with `pageProcessors`)
3966
+ has its router keyed by an id generated at run time — none is
3967
+ stored on the flow — so read router step ids from this map.
3965
3968
  additionalProperties:
3966
3969
  type: array
3967
3970
  items:
@@ -3980,16 +3983,19 @@ paths:
3980
3983
  additionalProperties: true
3981
3984
  examples:
3982
3985
  default:
3983
- summary: Test run with two generator stages and a router
3986
+ summary: Export, an import with an input filter, and the run's generated router
3984
3987
  value:
3985
3988
  metadata:
3986
- 69d462d5b9c28ea0b7f82522:
3989
+ 69d462c2a3f9fae38d72b07b:
3987
3990
  - request
3991
+ - response
3988
3992
  - parse
3989
- 6a2e23bbcf5b64ca6b93b73d: []
3990
- 69d462d5b9c28ea0b7f82522_input:
3991
- - input
3992
- main:
3993
+ 69d462c9b9c28ea0b7f8253a:
3994
+ - inputFilter
3995
+ - request
3996
+ - response
3997
+ - parse
3998
+ jVecDqBrfJ4:
3993
3999
  - router
3994
4000
  flowJob:
3995
4001
  _id: 6a2e23bbcf5b64ca6b93b757
@@ -4011,7 +4017,7 @@ paths:
4011
4017
  status: completed
4012
4018
  numSuccess: 1
4013
4019
  numPagesGenerated: 1
4014
- _expOrImpId: 69d462d5b9c28ea0b7f82522
4020
+ _expOrImpId: 69d462c2a3f9fae38d72b07b
4015
4021
  '400':
4016
4022
  description: |-
4017
4023
  Bad request — notably a body whose `_exportId` is missing or is not one of
@@ -4058,7 +4064,7 @@ paths:
4058
4064
  description: |-
4059
4065
  Returns the per-stage input, output, and errors captured for a single
4060
4066
  step of a flow test run. Each step runs through one or more named
4061
- **stages** (e.g. `request`, `parse`, `input`, `router`); this endpoint
4067
+ **stages** (e.g. `inputFilter`, `request`, `parse`, `router`); this endpoint
4062
4068
  returns the ordered `stages[]` for the requested step plus a top-level
4063
4069
  `errors` array aggregating any step-level errors.
4064
4070
 
@@ -4068,11 +4074,23 @@ paths:
4068
4074
  the stage names returned here match the stage list that map recorded for
4069
4075
  the step.
4070
4076
 
4071
- For each stage, `input` and `output` are arrays of record envelopes
4072
- (`{record, errors, traceKey}`) and may be `null` when the stage produced
4073
- no records on that side. A router's step id returns a top-level `output`
4074
- instead of `stages` and `errors`: one entry per record, with the
4075
- `branches` positions the router sent it to and any routing `errors`. Use
4077
+ A stage's `input` and `output` are `null` when the stage has nothing on
4078
+ that side, and arrays for most stages: the `request` and `response`
4079
+ stages' `output` lists the outbound HTTP request (`url`, `method`,
4080
+ `headers`, and `body` when one was sent) and its reply (`statusCode`,
4081
+ `headers`, `body`), and record stages such as `parse` hold envelopes
4082
+ carrying `record` and `errors`. The response-mapping stages hold objects
4083
+ instead. `responseMap` takes `{contexts}`, one context per record (the
4084
+ step's parsed reply plus `statusCode`, `headers`, and `_json`), and
4085
+ returns `{data}`, the mapped records as `{record, traceKey}` entries.
4086
+ `postResponseMapHook` takes the hook's `options` (`postResponseMapData`,
4087
+ `responseData`, `configuration`) and returns `{data}` in the same form;
4088
+ the stage stores each `postResponseMapData` entry as `{record, traceKey}`,
4089
+ while the hook itself receives the bare records.
4090
+
4091
+ A router's step id returns a top-level `output` instead of `stages` and
4092
+ `errors`: one entry per record, with the `branches` positions the router
4093
+ sent it to and any routing `errors`. Use
4076
4094
  `GET /v1/flows/{_id}/test/run/{runId}/{_stepId}/logs/requestAndResponse`
4077
4095
  when you need the raw outbound HTTP request/response captures instead of
4078
4096
  the staged record view.
@@ -4128,7 +4146,7 @@ paths:
4128
4146
  properties:
4129
4147
  name:
4130
4148
  type: string
4131
- description: Stage name (e.g. `request`, `parse`, `input`, `router`).
4149
+ description: Stage name (e.g. `inputFilter`, `request`, `parse`, `responseMap`, `router`).
4132
4150
  errors:
4133
4151
  description: Errors raised during this stage, or `null` if none.
4134
4152
  type:
@@ -4139,20 +4157,25 @@ paths:
4139
4157
  additionalProperties: true
4140
4158
  input:
4141
4159
  description: |-
4142
- Input record envelopes for this stage, or `null` when
4143
- the stage produced no input side.
4160
+ What the stage received: an array for most stages, an
4161
+ object for `responseMap` (`{contexts}`) and
4162
+ `postResponseMapHook` (the hook's `options`), or `null`
4163
+ when the stage has no input side.
4144
4164
  type:
4145
4165
  - array
4166
+ - object
4146
4167
  - 'null'
4147
4168
  items:
4148
4169
  type: object
4149
4170
  additionalProperties: true
4150
4171
  output:
4151
4172
  description: |-
4152
- Output record envelopes for this stage, or `null` when
4153
- the stage produced no output side.
4173
+ What the stage produced: an array for most stages,
4174
+ `{data}` for `responseMap` and `postResponseMapHook`,
4175
+ or `null` when the stage has no output side.
4154
4176
  type:
4155
4177
  - array
4178
+ - object
4156
4179
  - 'null'
4157
4180
  items:
4158
4181
  type: object
@@ -4224,6 +4247,55 @@ paths:
4224
4247
  errors: []
4225
4248
  traceKey: null
4226
4249
  errors: []
4250
+ response_mapping_stages:
4251
+ summary: Import step with a response mapping and a postResponseMap hook (its request, response and parse stages omitted)
4252
+ value:
4253
+ stages:
4254
+ - name: responseMap
4255
+ errors: []
4256
+ input:
4257
+ contexts:
4258
+ - id: '1234567890'
4259
+ mockResponse: replace me
4260
+ statusCode: 200
4261
+ headers:
4262
+ content-type: application/json; charset=utf-8
4263
+ _json:
4264
+ id: '1234567890'
4265
+ mockResponse: replace me
4266
+ output:
4267
+ data:
4268
+ - record:
4269
+ orderId: '1001'
4270
+ echoId: '1234567890'
4271
+ echoStatus: 200
4272
+ traceKey: null
4273
+ - name: postResponseMapHook
4274
+ errors: []
4275
+ input:
4276
+ postResponseMapData:
4277
+ - record:
4278
+ orderId: '1001'
4279
+ echoId: '1234567890'
4280
+ echoStatus: 200
4281
+ traceKey: null
4282
+ responseData:
4283
+ - statusCode: 200
4284
+ _json:
4285
+ id: '1234567890'
4286
+ mockResponse: replace me
4287
+ _headers:
4288
+ content-type: application/json; charset=utf-8
4289
+ traceKey: null
4290
+ configuration: {}
4291
+ output:
4292
+ data:
4293
+ - record:
4294
+ orderId: '1001'
4295
+ echoId: '1234567890'
4296
+ echoStatus: 200
4297
+ traceKey: null
4298
+ errors: []
4227
4299
  router_step:
4228
4300
  summary: Router step — one record routed, one rejected by the routing script
4229
4301
  value:
@@ -5285,10 +5357,10 @@ components:
5285
5357
  `proceedOnFailure` is true. Then it is included. On an import step it carries the
5286
5358
  fields its response mapping extracted from the failure envelope (`statusCode` 422 and
5287
5359
  `errors`; `id` only when the id path resolves on the destination's reply), and its
5288
- `responseData` entry has `statusCode` 422 and `errors` as an object keyed by index
5289
- (`"0"`, `"1"`, ...) rather than an array. On a lookup step it carries none of the
5290
- step's response-mapped fields, and its entry holds only `errors` (an array of
5291
- `{code, message, source}`) and `recordId`. An error this hook raises is stored at
5360
+ `responseData` entry has `statusCode` 422 and `errors`, an array of
5361
+ `{code, message, source}`. On a lookup step it carries none of the step's
5362
+ response-mapped fields, and its entry holds only `errors` (the same array) and
5363
+ `recordId`. An error this hook raises is stored at
5292
5364
  retry stage `post_response_mapping`: a retry runs the hook again on the saved record
5293
5365
  (as response mapping left it) and the step's stored reply, without repeating the
5294
5366
  lookup or the destination request.
@@ -5314,11 +5386,19 @@ components:
5314
5386
  instead: `errors` not empty is a failed lookup, `ignored` true a skipped one, an
5315
5387
  empty `data` no match.
5316
5388
  - |-
5317
- Verified live 2026-10-22 in flow runs of an HTTP import, three records with one
5389
+ Verified live 2026-11-14 in flow runs of an HTTP import, three records with one
5318
5390
  answered 404: with `proceedOnFailure` unset, both arrays held the two written
5319
- records; with `proceedOnFailure: true` they held all three, and a hook that called
5320
- `.map` on each entry's `errors` threw on the failed one, failing the page. Read
5321
- errors with `Object.values(entry.errors || {})`.
5391
+ records; with `proceedOnFailure: true` they held all three. The written records'
5392
+ entries held `statusCode` (200), `id`, `_json`, `_headers` and `recordId`, and no
5393
+ `errors`; the failed record's entry held `statusCode` (422), `_json`, `recordId`
5394
+ and `errors` — an array (`Array.isArray` true) of one `{code: 404, message: "Not
5395
+ Found", source: "application"}` with exactly those three keys. A run whose request
5396
+ body template failed to render gave each record's entry the same shape (`code:
5397
+ "handlebars_template_parse_error"`, `source: "resource"`). The record's own
5398
+ response-mapped `errors` field is fuller: the same error with the platform's
5399
+ bookkeeping fields as well (`stage`, `traceKey`, `retryDataKey` and others). So a
5400
+ hook reads an entry's errors as an array: `.map` on the failed entry's `errors`
5401
+ ran, and `Object.values(entry.errors || {})` reads the same items.
5322
5402
  - |-
5323
5403
  A retry of this hook's error never re-queries the looked-up system or re-sends to
5324
5404
  the destination, so a fix made there (an item created, a search corrected) does not