@artisan-commerce/analytics-web 0.2.0-canary.150 → 0.2.0-canary.151

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/bundle.d.ts CHANGED
@@ -449,7 +449,7 @@ interface EcommerceCommonParams {
449
449
  unique_items?: string;
450
450
  transaction_id?: string;
451
451
  payment_type?: string;
452
- coupon?: boolean;
452
+ coupon?: string;
453
453
  currency?: CurrencyCodes;
454
454
  }
455
455
  interface UserProperties {
@@ -1838,7 +1838,7 @@ interface AddProductToCartCommonParams {
1838
1838
  /** The product ID that was added to the cart */
1839
1839
  product: CartProduct;
1840
1840
  /** Shopping cart */
1841
- cart: ShoppingCart;
1841
+ cart?: ShoppingCart;
1842
1842
  /** The store ID where the user is buying the product */
1843
1843
  storeId: Store["storeId"];
1844
1844
  /** The store name where the user is buying the product */
package/dist/bundle.mjs CHANGED
@@ -48,7 +48,7 @@ const _State = class {
48
48
  let State$1 = _State;
49
49
  State$1._instance = null;
50
50
 
51
- var version = "0.2.0-canary.149";
51
+ var version = "0.2.0-canary.151";
52
52
  var packageJSON = {
53
53
  version: version};
54
54
 
@@ -11785,7 +11785,7 @@ const addProductToCart$2 = (provider, params) => {
11785
11785
  const { currency: providerCurrency } = provider;
11786
11786
  const _a = params, { callback, userId, currency, product, cart } = _a, params2 = __objRest$O(_a, ["callback", "userId", "currency", "product", "cart"]);
11787
11787
  const _b = params2, { priceCategory, items: paramsItems, list } = _b, rest = __objRest$O(_b, ["priceCategory", "items", "list"]);
11788
- const { id: cartId, name: cartName } = cart;
11788
+ const { id: cartId, name: cartName } = cart != null ? cart : {};
11789
11789
  const selectedUserId = userId != null ? userId : providerUserId;
11790
11790
  const selectedCurrency = currency != null ? currency : providerCurrency;
11791
11791
  const items = toItems("addProductToCart", params);
@@ -11853,6 +11853,7 @@ const addProductToCart$1 = (provider, params) => {
11853
11853
  const _b = params2, { productPoints, productName: name } = _b, params3 = __objRest$N(_b, ["productPoints", "productName"]);
11854
11854
  const _c = params3, { priceCategory, productAmount: amount } = _c, rest = __objRest$N(_c, ["priceCategory", "productAmount"]);
11855
11855
  delete rest.userId;
11856
+ delete rest.cart;
11856
11857
  const selectedCurrency = currency != null ? currency : providerCurrency;
11857
11858
  const enhancedParams = __spreadProps$y(__spreadValues$O({}, rest), {
11858
11859
  name,