@celigo/api-specs 0.2.147 → 0.2.149
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/export.yml +16 -10
- package/dist/flow.yml +53 -14
- package/dist/import.yml +12 -3
- package/dist/tool.yml +28 -13
- package/package.json +1 -1
- package/schemas.json +1 -1
package/dist/export.yml
CHANGED
|
@@ -984,10 +984,13 @@ components:
|
|
|
984
984
|
description: |-
|
|
985
985
|
Configures incremental exports that retrieve only records created or modified since the last
|
|
986
986
|
successful run. Required when the export's type is "delta"; omit for other export types.
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
987
|
+
The platform-managed last-successful-run timestamp (exposed as {{lastExportDateTime}}) is the
|
|
988
|
+
lower bound, and after a failed run the next run reuses the last successful timestamp so
|
|
989
|
+
changed records are not missed. A first run is not a full export: with no `startDate`, its
|
|
990
|
+
{{lastExportDateTime}} is the run's own timestamp (the value {{currentExportDateTime}} also
|
|
991
|
+
holds), so it picks up no earlier changes. Set `startDate` to reach back further. On success,
|
|
992
|
+
when `POST /v1/flows/{_id}/run` sends `export.endDate`, the flow's checkpoint is left at that
|
|
993
|
+
value, so an end date in the past moves the next run's lower bound back.
|
|
991
994
|
x-celigo-ai-guidance:
|
|
992
995
|
- |-
|
|
993
996
|
This object is REQUIRED when the export's type field is set to "delta" and
|
|
@@ -1023,7 +1026,7 @@ components:
|
|
|
1023
1026
|
|
|
1024
1027
|
2. The system automatically maintains the last successful run timestamp
|
|
1025
1028
|
- No need to store or manage timestamps in your own code
|
|
1026
|
-
-
|
|
1029
|
+
- A first run without ``startDate`` fetches nothing older than the run itself
|
|
1027
1030
|
- Subsequent runs use this timestamp as the starting point
|
|
1028
1031
|
|
|
1029
1032
|
3. Error handling and recovery:
|
|
@@ -1245,9 +1248,9 @@ components:
|
|
|
1245
1248
|
- 'null'
|
|
1246
1249
|
format: date-time
|
|
1247
1250
|
description: |-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
+
Lower-bound cutoff for the first run. Omitting it doesn't export history: the first run
|
|
1252
|
+
then starts at its own timestamp. Set it to the earliest change the first run should pick
|
|
1253
|
+
up. Subsequent runs use the platform-managed last-successful-run timestamp.
|
|
1251
1254
|
x-celigo-ai-guidance:
|
|
1252
1255
|
- |-
|
|
1253
1256
|
Initial cutoff timestamp for the first export run, in ISO-8601 UTC format (e.g.
|
|
@@ -16402,8 +16405,11 @@ components:
|
|
|
16402
16405
|
filter, before the page is sent to downstream steps; commonly used to flatten
|
|
16403
16406
|
structures, drop unwanted records, or add computed fields. It receives the page as
|
|
16404
16407
|
`options.data` (with `errors`, `pageIndex`, `configuration` and `settings`) and returns
|
|
16405
|
-
`{data, errors, abort, newErrorsAndRetryData}`.
|
|
16406
|
-
|
|
16408
|
+
`{data, errors, abort, newErrorsAndRetryData}`. Return that object, not the array: a
|
|
16409
|
+
hook that returns `options.data` itself, or a filtered copy, drops the page without an
|
|
16410
|
+
error, and the run completes with 0 records, 0 errors and 0 pages. An exception thrown
|
|
16411
|
+
here fails every record on that page, each with its own retry data, and later pages
|
|
16412
|
+
still run.
|
|
16407
16413
|
properties:
|
|
16408
16414
|
function:
|
|
16409
16415
|
type: string
|
package/dist/flow.yml
CHANGED
|
@@ -824,8 +824,9 @@ paths:
|
|
|
824
824
|
|
|
825
825
|
The request body is optional. When omitted, the flow runs with its configured schedule behavior —
|
|
826
826
|
for delta flows this means using the current `lastExportDateTime` as the lower bound. Pass
|
|
827
|
-
`export.startDate` / `export.endDate` to
|
|
828
|
-
|
|
827
|
+
`export.startDate` / `export.endDate` to set this run's delta window. On success, when
|
|
828
|
+
`export.endDate` is sent, the flow's checkpoint is left at that value, so an end date in the past
|
|
829
|
+
moves the next run's lower bound back. Pass `_exportIds` to limit execution to a subset of the flow's
|
|
829
830
|
generators (useful for flows with many independent sources).
|
|
830
831
|
|
|
831
832
|
Flow-level preconditions enforced by the platform:
|
|
@@ -835,8 +836,9 @@ paths:
|
|
|
835
836
|
|
|
836
837
|
To trace a run end-to-end, arm debug logging before calling this, then use the returned
|
|
837
838
|
`_jobId` with the execution-log endpoints. For delta backfills, prefer passing explicit
|
|
838
|
-
`startDate`/`endDate` over editing the export's `lastExportDateTime
|
|
839
|
-
|
|
839
|
+
`startDate`/`endDate` over editing the export's `lastExportDateTime`, and read the checkpoint
|
|
840
|
+
first (`GET /v1/flows/{_id}/lastExportDateTime`): the override doesn't stay with one run, since
|
|
841
|
+
a successful run that sends `endDate` leaves the checkpoint there. A flow runs one instance at a time: a run requested while another
|
|
840
842
|
instance is queued or running is refused with `409 job_already_queued` ("Another instance
|
|
841
843
|
for this flow is already queued or running"), and a run-next-flow trigger that arrives in
|
|
842
844
|
that state is dropped rather than queued.
|
|
@@ -1080,11 +1082,14 @@ paths:
|
|
|
1080
1082
|
generators (exports) in the flow. This value is what gets substituted into the `{{lastExportDateTime}}`
|
|
1081
1083
|
Handlebars variable on the next delta run of any export in the flow.
|
|
1082
1084
|
|
|
1083
|
-
The checkpoint advances automatically at the end of a successful delta run.
|
|
1084
|
-
|
|
1085
|
+
The checkpoint advances automatically at the end of a successful delta run. On success, when
|
|
1086
|
+
`POST /v1/flows/{_id}/run` sends `export.endDate`, the checkpoint is left at that value, so an end
|
|
1087
|
+
date in the past moves the next run's lower bound back.
|
|
1085
1088
|
|
|
1086
|
-
A missing
|
|
1087
|
-
|
|
1089
|
+
A missing value (`null`, a flow that has never run) is not a full re-scan: the next delta run's
|
|
1090
|
+
`{{lastExportDateTime}}` is the export's `delta.startDate` when set, and otherwise the run's own
|
|
1091
|
+
timestamp, which picks up no earlier changes. A very old value re-reads everything changed since
|
|
1092
|
+
then. This is the flow-scoped checkpoint; per-export checkpoints (for flows with multiple
|
|
1088
1093
|
generators that advance independently) are exposed on the export record's `delta` block.
|
|
1089
1094
|
parameters:
|
|
1090
1095
|
- name: _id
|
|
@@ -4221,7 +4226,10 @@ components:
|
|
|
4221
4226
|
type: string
|
|
4222
4227
|
description: |-
|
|
4223
4228
|
Cron expression for this specific generator, overriding the flow's main schedule.
|
|
4224
|
-
When omitted, the generator inherits the flow's schedule.
|
|
4229
|
+
When omitted, the generator inherits the flow's schedule. It is read in the flow's
|
|
4230
|
+
`timezone`, and a flow with no flow-level `schedule` still runs on it. PATCH reaches
|
|
4231
|
+
the flow-level `/schedule` and `/timezone` but not this field, so changing it is a full
|
|
4232
|
+
update of the flow.
|
|
4225
4233
|
examples:
|
|
4226
4234
|
- '? 5 0,6,12,18 ? * *'
|
|
4227
4235
|
- '? 30 2 ? * *'
|
|
@@ -4231,6 +4239,10 @@ components:
|
|
|
4231
4239
|
- Overrides the flow's main schedule for this generator
|
|
4232
4240
|
- Allows different data sources to refresh at different intervals
|
|
4233
4241
|
- Useful for sources with varying update frequencies
|
|
4242
|
+
- |-
|
|
4243
|
+
Check for one before rescheduling a flow: a flow-level `schedule` change succeeds
|
|
4244
|
+
but leaves a generator that has its own `schedule` running at its old times. Change
|
|
4245
|
+
the generator's `schedule` instead, with a PUT of the whole flow.
|
|
4234
4246
|
skipRetries:
|
|
4235
4247
|
type: boolean
|
|
4236
4248
|
default: false
|
|
@@ -4645,7 +4657,16 @@ components:
|
|
|
4645
4657
|
Filter criteria that determines which records match this branch.
|
|
4646
4658
|
|
|
4647
4659
|
Only used when the router's `routeRecordsUsing` is `input_filters`.
|
|
4648
|
-
Records matching these criteria will be routed to this branch.
|
|
4660
|
+
Records matching these criteria will be routed to this branch. A branch
|
|
4661
|
+
without an `inputFilter` matches every record, so under
|
|
4662
|
+
`first_matching_branch` the catch-all branch goes last.
|
|
4663
|
+
|
|
4664
|
+
Send `version` and `rules` directly on `inputFilter` — not inside the
|
|
4665
|
+
`{type: "expression", expression: {...}}` wrapper that export and import
|
|
4666
|
+
filters use. A wrapped filter is saved without an error, but the branch is
|
|
4667
|
+
stored with no `inputFilter` and takes every record.
|
|
4668
|
+
x-celigo-ai-guidance:
|
|
4669
|
+
- Read the flow back after saving a branching router and check that each filtered branch still has its `inputFilter`; a filter sent in the export-filter wrapper is dropped on save without an error.
|
|
4649
4670
|
properties:
|
|
4650
4671
|
version:
|
|
4651
4672
|
type: string
|
|
@@ -4674,6 +4695,11 @@ components:
|
|
|
4674
4695
|
logical operators (`and`, `or`, `not`), field access (`extract`, `settings`)
|
|
4675
4696
|
and type conversions (`string`, `number`, `boolean`, `epochtime`).
|
|
4676
4697
|
|
|
4698
|
+
Every `extract` must be wrapped in a type conversion. A bare
|
|
4699
|
+
`["extract", "<field>"]` is refused when the flow is saved, with 422 "Field
|
|
4700
|
+
operation extract must be called by a Type Conversion Operation but was called
|
|
4701
|
+
by equals." (the message names the operator that held it).
|
|
4702
|
+
|
|
4677
4703
|
Example — route records whose `isDeleted` field is the string "false":
|
|
4678
4704
|
```json
|
|
4679
4705
|
["equals", ["string", ["extract", "isDeleted"]], "false"]
|
|
@@ -4777,7 +4803,7 @@ components:
|
|
|
4777
4803
|
examples:
|
|
4778
4804
|
- first_matching_branch
|
|
4779
4805
|
x-celigo-ai-guidance:
|
|
4780
|
-
- Set this and `routeRecordsUsing` together on every router that decides between branches; setting only one of the two is rejected with 422 `invalid_flow_router_config
|
|
4806
|
+
- Set this and `routeRecordsUsing` together on every router that decides between branches; setting only one of the two is rejected with 422 `invalid_flow_router_config` ("Either both the routeRecordsTo and routeRecordsUsing fields or none of them should be defined on the router.").
|
|
4781
4807
|
- Leave both unset on a one-branch pass-through router (the steps before the first branching router, or a merge point). Setting them there still runs, but Flow Builder shows a router node with one branch and no rules. A router with neither field and more than one branch is rejected with 422 `invalid_flow_router_branch`.
|
|
4782
4808
|
routeRecordsUsing:
|
|
4783
4809
|
type: string
|
|
@@ -5427,7 +5453,9 @@ components:
|
|
|
5427
5453
|
Writable flow fields shared by the request and response schemas.
|
|
5428
5454
|
|
|
5429
5455
|
Use `pageProcessors` for simple linear flows or `routers` for conditional branching — never
|
|
5430
|
-
include both: a flow with both arrays non-empty is rejected with 422 `invalid_branched_flow_config
|
|
5456
|
+
include both: a flow with both arrays non-empty is rejected with 422 `invalid_branched_flow_config`
|
|
5457
|
+
("Either routers or pageProcessors should be present in the flow configuration and not both.").
|
|
5458
|
+
Turning a linear flow into a branching one moves its top-level steps into the branches.
|
|
5431
5459
|
The same import can be a step only once per flow: a second `pageProcessors` entry with its
|
|
5432
5460
|
`_importId`, in the same array or another branch, fails with 422 `invalid_flow` ("… already
|
|
5433
5461
|
included as a pageProcessor"). The `schedule` field uses Celigo's 6-field cron format (not
|
|
@@ -5486,7 +5514,15 @@ components:
|
|
|
5486
5514
|
Build `schedule` as a Celigo 6-field cron:
|
|
5487
5515
|
`? minute hour day-of-month month day-of-week`.
|
|
5488
5516
|
The seconds field is always `?`; day-of-month is usually `?`, month `*`,
|
|
5489
|
-
and day-of-week `*` (or specific days, 0=Sun..6=Sat
|
|
5517
|
+
and day-of-week `*` (or specific days, 0=Sun..6=Sat — weekdays are `1-5`,
|
|
5518
|
+
`1,2,3,4,5` or `MON-FRI`; `2-6` is Tuesday to Saturday).
|
|
5519
|
+
- |-
|
|
5520
|
+
The hours are read in the flow's `timezone`. Keep a user's local times as
|
|
5521
|
+
they are and set their IANA zone; never convert them to UTC, which is an hour
|
|
5522
|
+
off for half the year in a zone with daylight saving and shifts them twice
|
|
5523
|
+
when paired with the local `timezone`. Before changing when a flow runs, read
|
|
5524
|
+
`pageGenerators[]`: a generator with its own `schedule` keeps it after a
|
|
5525
|
+
flow-level change.
|
|
5490
5526
|
- |-
|
|
5491
5527
|
Disabling a flow does not bypass schedule validation: POST, PUT, and PATCH
|
|
5492
5528
|
all reject free text or a sub-minute expression (`not a cron`, `* * * * * *`)
|
|
@@ -5521,7 +5557,10 @@ components:
|
|
|
5521
5557
|
type:
|
|
5522
5558
|
- string
|
|
5523
5559
|
- 'null'
|
|
5524
|
-
description:
|
|
5560
|
+
description: |-
|
|
5561
|
+
IANA timezone for the schedule (e.g. `America/New_York`). Defaults to UTC. The flow's
|
|
5562
|
+
`schedule` and each page generator's own `schedule` are read in this timezone; a page
|
|
5563
|
+
generator has no timezone of its own.
|
|
5525
5564
|
examples:
|
|
5526
5565
|
- America/New_York
|
|
5527
5566
|
- Europe/London
|
package/dist/import.yml
CHANGED
|
@@ -16408,7 +16408,11 @@ components:
|
|
|
16408
16408
|
- script
|
|
16409
16409
|
description: |-
|
|
16410
16410
|
Hook that runs on each page of records before the import's mappings are applied.
|
|
16411
|
-
Commonly used to reshape or filter records ahead of mapping.
|
|
16411
|
+
Commonly used to reshape or filter records ahead of mapping. Its changes shape only
|
|
16412
|
+
the request this import sends: the next step receives the record as it arrived here,
|
|
16413
|
+
plus whatever this step's response mapping merges back. A value later steps need
|
|
16414
|
+
belongs in the source export's `preSavePage`, in this step's `postResponseMap` hook on
|
|
16415
|
+
the flow, or in the later import's own `preMap`.
|
|
16412
16416
|
x-celigo-ai-guidance:
|
|
16413
16417
|
- |-
|
|
16414
16418
|
Pre-map JavaScript hook — runs once per page BEFORE the
|
|
@@ -16430,7 +16434,8 @@ components:
|
|
|
16430
16434
|
description: |-
|
|
16431
16435
|
Hook that runs after the import's mappings are applied but before records are sent
|
|
16432
16436
|
to the destination system. Commonly used for adjustments that need the mapped
|
|
16433
|
-
(destination-shaped) record.
|
|
16437
|
+
(destination-shaped) record. Like `preMap`, its changes shape only the request this
|
|
16438
|
+
import sends; the next step never sees them.
|
|
16434
16439
|
x-celigo-ai-guidance:
|
|
16435
16440
|
- |-
|
|
16436
16441
|
Post-map JavaScript hook — runs once per page AFTER the
|
|
@@ -16453,7 +16458,11 @@ components:
|
|
|
16453
16458
|
description: |-
|
|
16454
16459
|
Hook that runs after the destination system responds, with access to both the
|
|
16455
16460
|
submitted records and the destination's responses. Commonly used to inspect results
|
|
16456
|
-
or adjust the response data passed downstream.
|
|
16461
|
+
or adjust the response data passed downstream. Each `options.responseData` entry is
|
|
16462
|
+
one submitted record's result, in order: `statusCode`, `errors` (`{code, message,
|
|
16463
|
+
source}`, empty on success), `ignored`, `id`, and `_json` — the destination's parsed
|
|
16464
|
+
response body, where its own error detail sits (`_headers` holds the response
|
|
16465
|
+
headers).
|
|
16457
16466
|
x-celigo-ai-guidance:
|
|
16458
16467
|
- |-
|
|
16459
16468
|
Post-submit JavaScript hook — runs AFTER each batch of
|
package/dist/tool.yml
CHANGED
|
@@ -25289,7 +25289,11 @@ components:
|
|
|
25289
25289
|
- script
|
|
25290
25290
|
description: |-
|
|
25291
25291
|
Hook that runs on each page of records before the import's mappings are applied.
|
|
25292
|
-
Commonly used to reshape or filter records ahead of mapping.
|
|
25292
|
+
Commonly used to reshape or filter records ahead of mapping. Its changes shape only
|
|
25293
|
+
the request this import sends: the next step receives the record as it arrived here,
|
|
25294
|
+
plus whatever this step's response mapping merges back. A value later steps need
|
|
25295
|
+
belongs in the source export's `preSavePage`, in this step's `postResponseMap` hook on
|
|
25296
|
+
the flow, or in the later import's own `preMap`.
|
|
25293
25297
|
x-celigo-ai-guidance:
|
|
25294
25298
|
- |-
|
|
25295
25299
|
Pre-map JavaScript hook — runs once per page BEFORE the
|
|
@@ -25311,7 +25315,8 @@ components:
|
|
|
25311
25315
|
description: |-
|
|
25312
25316
|
Hook that runs after the import's mappings are applied but before records are sent
|
|
25313
25317
|
to the destination system. Commonly used for adjustments that need the mapped
|
|
25314
|
-
(destination-shaped) record.
|
|
25318
|
+
(destination-shaped) record. Like `preMap`, its changes shape only the request this
|
|
25319
|
+
import sends; the next step never sees them.
|
|
25315
25320
|
x-celigo-ai-guidance:
|
|
25316
25321
|
- |-
|
|
25317
25322
|
Post-map JavaScript hook — runs once per page AFTER the
|
|
@@ -25334,7 +25339,11 @@ components:
|
|
|
25334
25339
|
description: |-
|
|
25335
25340
|
Hook that runs after the destination system responds, with access to both the
|
|
25336
25341
|
submitted records and the destination's responses. Commonly used to inspect results
|
|
25337
|
-
or adjust the response data passed downstream.
|
|
25342
|
+
or adjust the response data passed downstream. Each `options.responseData` entry is
|
|
25343
|
+
one submitted record's result, in order: `statusCode`, `errors` (`{code, message,
|
|
25344
|
+
source}`, empty on success), `ignored`, `id`, and `_json` — the destination's parsed
|
|
25345
|
+
response body, where its own error detail sits (`_headers` holds the response
|
|
25346
|
+
headers).
|
|
25338
25347
|
x-celigo-ai-guidance:
|
|
25339
25348
|
- |-
|
|
25340
25349
|
Post-submit JavaScript hook — runs AFTER each batch of
|
|
@@ -25833,10 +25842,13 @@ components:
|
|
|
25833
25842
|
description: |-
|
|
25834
25843
|
Configures incremental exports that retrieve only records created or modified since the last
|
|
25835
25844
|
successful run. Required when the export's type is "delta"; omit for other export types.
|
|
25836
|
-
|
|
25837
|
-
|
|
25838
|
-
|
|
25839
|
-
|
|
25845
|
+
The platform-managed last-successful-run timestamp (exposed as {{lastExportDateTime}}) is the
|
|
25846
|
+
lower bound, and after a failed run the next run reuses the last successful timestamp so
|
|
25847
|
+
changed records are not missed. A first run is not a full export: with no `startDate`, its
|
|
25848
|
+
{{lastExportDateTime}} is the run's own timestamp (the value {{currentExportDateTime}} also
|
|
25849
|
+
holds), so it picks up no earlier changes. Set `startDate` to reach back further. On success,
|
|
25850
|
+
when `POST /v1/flows/{_id}/run` sends `export.endDate`, the flow's checkpoint is left at that
|
|
25851
|
+
value, so an end date in the past moves the next run's lower bound back.
|
|
25840
25852
|
x-celigo-ai-guidance:
|
|
25841
25853
|
- |-
|
|
25842
25854
|
This object is REQUIRED when the export's type field is set to "delta" and
|
|
@@ -25872,7 +25884,7 @@ components:
|
|
|
25872
25884
|
|
|
25873
25885
|
2. The system automatically maintains the last successful run timestamp
|
|
25874
25886
|
- No need to store or manage timestamps in your own code
|
|
25875
|
-
-
|
|
25887
|
+
- A first run without ``startDate`` fetches nothing older than the run itself
|
|
25876
25888
|
- Subsequent runs use this timestamp as the starting point
|
|
25877
25889
|
|
|
25878
25890
|
3. Error handling and recovery:
|
|
@@ -26094,9 +26106,9 @@ components:
|
|
|
26094
26106
|
- 'null'
|
|
26095
26107
|
format: date-time
|
|
26096
26108
|
description: |-
|
|
26097
|
-
|
|
26098
|
-
|
|
26099
|
-
|
|
26109
|
+
Lower-bound cutoff for the first run. Omitting it doesn't export history: the first run
|
|
26110
|
+
then starts at its own timestamp. Set it to the earliest change the first run should pick
|
|
26111
|
+
up. Subsequent runs use the platform-managed last-successful-run timestamp.
|
|
26100
26112
|
x-celigo-ai-guidance:
|
|
26101
26113
|
- |-
|
|
26102
26114
|
Initial cutoff timestamp for the first export run, in ISO-8601 UTC format (e.g.
|
|
@@ -37409,8 +37421,11 @@ components:
|
|
|
37409
37421
|
filter, before the page is sent to downstream steps; commonly used to flatten
|
|
37410
37422
|
structures, drop unwanted records, or add computed fields. It receives the page as
|
|
37411
37423
|
`options.data` (with `errors`, `pageIndex`, `configuration` and `settings`) and returns
|
|
37412
|
-
`{data, errors, abort, newErrorsAndRetryData}`.
|
|
37413
|
-
|
|
37424
|
+
`{data, errors, abort, newErrorsAndRetryData}`. Return that object, not the array: a
|
|
37425
|
+
hook that returns `options.data` itself, or a filtered copy, drops the page without an
|
|
37426
|
+
error, and the run completes with 0 records, 0 errors and 0 pages. An exception thrown
|
|
37427
|
+
here fails every record on that page, each with its own retry data, and later pages
|
|
37428
|
+
still run.
|
|
37414
37429
|
properties:
|
|
37415
37430
|
function:
|
|
37416
37431
|
type: string
|
package/package.json
CHANGED