@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.
Files changed (2) hide show
  1. package/handler-sdk.d.ts +9 -5
  2. 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. The
573
- * column must be unique (alone or per org) and mapped from the file. Two file rows with the same
574
- * value are refused (`CSV_DUPLICATE_MATCH`, 422) with their lines. A dry run reports
575
- * `match: { inserts, updates, skipped }`.
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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authoric/handler-sdk",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "description": "TypeScript types for Authoric handlers: the sdk and ctx a handler is given.",
5
5
  "license": "MIT",
6
6
  "types": "handler-sdk.d.ts",