@authoric/handler-sdk 6.3.0 → 6.3.1
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/handler-sdk.d.ts +9 -5
- package/package.json +1 -1
package/handler-sdk.d.ts
CHANGED
|
@@ -554,7 +554,9 @@ interface ImportCsvOptions {
|
|
|
554
554
|
ignoreUnknownColumns?: boolean;
|
|
555
555
|
/**
|
|
556
556
|
* What to do with a row holding a value the table cannot store (bad enum member, over-long
|
|
557
|
-
* string, non-numeric number, out-of-range integer)
|
|
557
|
+
* string, non-numeric number, out-of-range integer), or a reference that names no row: every
|
|
558
|
+
* row's references are looked up before anything is written, and each miss is an error with its
|
|
559
|
+
* line and column, on a dry run too.
|
|
558
560
|
* - `"abort"` (default): import nothing and throw with the offending rows listed.
|
|
559
561
|
* - `"skip"`: import the clean rows and report the rest in `skippedRows` / `errors`.
|
|
560
562
|
* A bad value is never silently repaired or replaced under either setting. Neither setting
|
|
@@ -569,10 +571,12 @@ interface ImportCsvOptions {
|
|
|
569
571
|
/**
|
|
570
572
|
* Upsert: a UNIQUE column each file row is matched on, typically the id the rows had in the
|
|
571
573
|
* system they come from (`"shopify_id"`). A row whose value matches an existing row updates it;
|
|
572
|
-
* the rest are created; so running the same file twice changes nothing the second time.
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
574
|
+
* the rest are created; so running the same file twice changes nothing the second time. A matched
|
|
575
|
+
* row the file leaves as it is gets no write and no change event: the result counts it as
|
|
576
|
+
* `unchanged`, apart from `updated`. The column must be unique (alone or per org) and mapped from
|
|
577
|
+
* the file. Two file rows with the same value are refused (`CSV_DUPLICATE_MATCH`, 422) with their
|
|
578
|
+
* lines. A dry run reports `match: { inserts, updates, unchanged, skipped }`. A handler that imports
|
|
579
|
+
* with matchOn needs `<table>:update` in its route's allowed actions as well as `<table>:create`.
|
|
576
580
|
*/
|
|
577
581
|
matchOn?: string;
|
|
578
582
|
/** With `matchOn`: `"update"` (default) updates a matched row, `"skip"` leaves it as it is. */
|