@shoppexio/storefront 1.0.91 → 1.0.92

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/index.d.cts CHANGED
@@ -930,7 +930,9 @@ interface CartItem {
930
930
  * to the line for the life of the cart, and every quote-driven heal that tried
931
931
  * to clear it was a silent no-op.
932
932
  */
933
- type CartItemUpdate = Partial<Omit<CartItem, 'line_id' | 'product_id' | 'variant_id' | 'min_quantity' | 'max_quantity'>> & {
933
+ type CartItemUpdate = Partial<Omit<CartItem, 'line_id' | 'product_id' | 'variant_id' | 'variant_title' | 'min_quantity' | 'max_quantity'>> & {
934
+ /** `null` clears the stored option name (the product has no options). */
935
+ variant_title?: string | null;
934
936
  /** `null` clears the stored minimum. */
935
937
  min_quantity?: number | null;
936
938
  /** `null` clears the stored ceiling. */
@@ -1023,6 +1025,10 @@ interface EligibleBundleDeal {
1023
1025
  * `product_id` the product identifier the cart sent, echoed exactly.
1024
1026
  * `variant_id` the resolved option id, `null` for a product with no variants.
1025
1027
  * `quantity` the quantity this line was quoted at.
1028
+ * `product_title` / `variant_title` the catalog's names for the product and the option
1029
+ * (`variant_title` null for a product with no variants), the names the invoice line
1030
+ * carries. `product_title` is the base-language title; a storefront that shows
1031
+ * translated titles keeps its own. Never compose or substitute them.
1026
1032
  * `min_quantity` ABSENT when it is 1. Present values are the stepper's floor.
1027
1033
  * `max_quantity` ABSENT when nothing bounds the line — absence is the unbounded sentinel, and
1028
1034
  * `-1` is never sent. Never coerce an absent key to 0.
@@ -1056,6 +1062,10 @@ interface EligibleBundleDeal {
1056
1062
  interface CartQuoteLine {
1057
1063
  product_id: string;
1058
1064
  variant_id: string | null;
1065
+ /** Absent on servers older than this field. */
1066
+ product_title?: string;
1067
+ /** Absent on servers older than this field. */
1068
+ variant_title?: string | null;
1059
1069
  quantity: number;
1060
1070
  /** Absent when 1. */
1061
1071
  min_quantity?: number;
package/dist/index.d.ts CHANGED
@@ -930,7 +930,9 @@ interface CartItem {
930
930
  * to the line for the life of the cart, and every quote-driven heal that tried
931
931
  * to clear it was a silent no-op.
932
932
  */
933
- type CartItemUpdate = Partial<Omit<CartItem, 'line_id' | 'product_id' | 'variant_id' | 'min_quantity' | 'max_quantity'>> & {
933
+ type CartItemUpdate = Partial<Omit<CartItem, 'line_id' | 'product_id' | 'variant_id' | 'variant_title' | 'min_quantity' | 'max_quantity'>> & {
934
+ /** `null` clears the stored option name (the product has no options). */
935
+ variant_title?: string | null;
934
936
  /** `null` clears the stored minimum. */
935
937
  min_quantity?: number | null;
936
938
  /** `null` clears the stored ceiling. */
@@ -1023,6 +1025,10 @@ interface EligibleBundleDeal {
1023
1025
  * `product_id` the product identifier the cart sent, echoed exactly.
1024
1026
  * `variant_id` the resolved option id, `null` for a product with no variants.
1025
1027
  * `quantity` the quantity this line was quoted at.
1028
+ * `product_title` / `variant_title` the catalog's names for the product and the option
1029
+ * (`variant_title` null for a product with no variants), the names the invoice line
1030
+ * carries. `product_title` is the base-language title; a storefront that shows
1031
+ * translated titles keeps its own. Never compose or substitute them.
1026
1032
  * `min_quantity` ABSENT when it is 1. Present values are the stepper's floor.
1027
1033
  * `max_quantity` ABSENT when nothing bounds the line — absence is the unbounded sentinel, and
1028
1034
  * `-1` is never sent. Never coerce an absent key to 0.
@@ -1056,6 +1062,10 @@ interface EligibleBundleDeal {
1056
1062
  interface CartQuoteLine {
1057
1063
  product_id: string;
1058
1064
  variant_id: string | null;
1065
+ /** Absent on servers older than this field. */
1066
+ product_title?: string;
1067
+ /** Absent on servers older than this field. */
1068
+ variant_title?: string | null;
1059
1069
  quantity: number;
1060
1070
  /** Absent when 1. */
1061
1071
  min_quantity?: number;
package/dist/index.js CHANGED
@@ -2468,6 +2468,10 @@ function updateCartItem(lineId, updates) {
2468
2468
  if (updates.pay_what_you_want_price !== void 0) {
2469
2469
  cart[index].pay_what_you_want_price = updates.pay_what_you_want_price;
2470
2470
  }
2471
+ if (updates.variant_title !== void 0) {
2472
+ if (updates.variant_title === null) delete cart[index].variant_title;
2473
+ else cart[index].variant_title = updates.variant_title;
2474
+ }
2471
2475
  if (updates.max_quantity !== void 0) {
2472
2476
  if (updates.max_quantity === null) delete cart[index].max_quantity;
2473
2477
  else cart[index].max_quantity = updates.max_quantity;