sinfactura-types 1.10.458 → 1.10.459

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/ai.d.ts CHANGED
@@ -75,17 +75,23 @@ declare global {
75
75
  * The supplier's own product code for this line, as printed, trimmed.
76
76
  * Absent when the line prints none — never `''`.
77
77
  *
78
- * A JOIN KEY that survives a misread `description`: match the line to a
79
- * purchase-order line on `barcode`, then `sku`, then name. Additive — a
80
- * line extracted before this field existed simply lacks it.
78
+ * A JOIN KEY that survives a misread `description`: it joins a
79
+ * purchase-order line's `PurchaseOrderItem.supplierSku` (the same
80
+ * supplier namespace), NEVER `PurchaseOrderItem.sku`, which copies the
81
+ * store's `Product.sku` — a coincidental match across the two namespaces
82
+ * pairs the wrong product. Additive — a line extracted before this field
83
+ * existed simply lacks it.
81
84
  */
82
85
  sku?: string;
83
86
  /**
84
87
  * The printed barcode (EAN/UPC), reduced to its DIGITS — spaces, dashes
85
88
  * and any other character are removed server-side. Absent when the line
86
89
  * prints none, or nothing numeric survives — never `''`. Its length is
87
- * NOT validated as an EAN/UPC here: it is a join key, and a misread value
88
- * simply fails to match, so fall back to `sku`, then name.
90
+ * NOT validated as an EAN/UPC here: it is a join key — matched against the
91
+ * PO line's PRODUCT barcodes through `productId`, since a
92
+ * `PurchaseOrderItem` carries none — and a misread value simply fails to
93
+ * match, so fall back to `sku` (against
94
+ * `PurchaseOrderItem.supplierSku`), then name.
89
95
  */
90
96
  barcode?: string;
91
97
  /**
@@ -109,7 +109,20 @@ declare global {
109
109
  productId: string;
110
110
  /** Name DENORMALIZED at write time; the order records what was ordered, under the name it had then. */
111
111
  name: string;
112
+ /** The STORE's code for this product — a copy of `Product.sku`, in the store's own namespace. */
112
113
  sku?: string;
114
+ /**
115
+ * The SUPPLIER's own article code for this line — the supplier's namespace,
116
+ * distinct from `sku`, which copies the store's `Product.sku`. It is the
117
+ * join key for a supplier document's line (`SupplierDocExtractItem.sku`);
118
+ * joining that to `sku` instead compares two namespaces, and a coincidental
119
+ * match pairs the wrong product.
120
+ *
121
+ * Client-supplied on create and draft edit. Trimmed; absent when blank —
122
+ * never `''`. Additive: an order written before this field existed simply
123
+ * lacks it.
124
+ */
125
+ supplierSku?: string;
113
126
  /** Units ordered. */
114
127
  quantity: number;
115
128
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.10.458",
3
+ "version": "1.10.459",
4
4
  "description": "Shared wire and entity contracts for the SINFACTURA platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",