Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aniltallam authored Sep 14, 2020
1 parent adc649a commit 8fa080a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ the hook preSavePage function.
* 'bearerToken' - a one-time bearer token which can be used to invoke selected integrator.io API routes.
* 'data' - an array of records representing one page of data. A record can be an object {} or array [] depending on the data source.
* 'errors' - an array of errors where each error has the structure {code: '', message: '', source: ''}.
* 'retryData' - an object with structure {<traceKey of record>: record} containing errored out records and and their traceKeys.
* '_exportId' - the _exportId currently running.
* '_connectionId' - the _connectionId currently running.
* '_flowId' - the _flowId currently running.
Expand All @@ -80,14 +81,17 @@ the hook preSavePage function.
* 'data' - your modified data.
* 'errors' - your modified errors.
* 'abort' - instruct the batch export currently running to stop generating new pages of data.
* 'newErrorsAndRetryData' - can send new errors and corresponding data in the following format - [{retryData: <>, errors: []}].
*
* Throwing an exception will signal a fatal error and stop the flow.
*/
exports.preSavePageFunction = function (options, callback) {
// sample code that simply passes on what has been exported
return callback(error, {
data: options.data,
errors: options.errors,
abort: false
abort: false,
newErrorsAndRetryData: []
})
}
```
Expand Down Expand Up @@ -481,4 +485,4 @@ implementation of an integrator.io import.
exports.importFunction = function (options, callback) {
return callback(error, response)
}
```
```

0 comments on commit 8fa080a

Please sign in to comment.