@artisan-commerce/analytics-web 0.2.0-canary.150 → 0.2.0-canary.152
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.cjs +5 -4
- package/dist/bundle.cjs.map +1 -1
- package/dist/bundle.d.ts +3 -5
- package/dist/bundle.mjs +5 -4
- package/dist/bundle.mjs.map +1 -1
- package/dist/bundle.umd.js +5 -4
- package/dist/bundle.umd.js.map +1 -1
- package/package.json +6 -6
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?:
|
|
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
|
|
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 */
|
|
@@ -2144,7 +2144,7 @@ interface PurchaseSuccessCommonParams {
|
|
|
2144
2144
|
/** The order shopping cart */
|
|
2145
2145
|
shoppingCart?: ShoppingCart;
|
|
2146
2146
|
/** The selected payment type (e.g. Cash, Card) */
|
|
2147
|
-
|
|
2147
|
+
paymentType: PaymentType;
|
|
2148
2148
|
/** The workflow name (e.g. Delivery) */
|
|
2149
2149
|
fulfillmentType: Workflow;
|
|
2150
2150
|
/** If paying with card the card provider (e.g. visa) */
|
|
@@ -2345,8 +2345,6 @@ interface ViewProductDetailsParams$1 extends SegmentCommonEventParams, SegmentCu
|
|
|
2345
2345
|
interface ViewProductDetailsCommonParams {
|
|
2346
2346
|
/** The details of the product that the user is viewing */
|
|
2347
2347
|
product: Product;
|
|
2348
|
-
/** The shopping cart that the product belongs to */
|
|
2349
|
-
cart: ShoppingCart;
|
|
2350
2348
|
/** The list that the product belongs to, this is used to add `item_list_name` to the items array */
|
|
2351
2349
|
list?: string;
|
|
2352
2350
|
}
|
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.
|
|
51
|
+
var version = "0.2.0-canary.152";
|
|
52
52
|
var packageJSON = {
|
|
53
53
|
version: version};
|
|
54
54
|
|
|
@@ -957,8 +957,8 @@ const toItems = (type, params) => {
|
|
|
957
957
|
];
|
|
958
958
|
}
|
|
959
959
|
case "viewProductDetails": {
|
|
960
|
-
const { product
|
|
961
|
-
return toItemProduct(product
|
|
960
|
+
const { product } = params;
|
|
961
|
+
return toItemProduct(product);
|
|
962
962
|
}
|
|
963
963
|
case "purchaseSuccess": {
|
|
964
964
|
const { shoppingCart } = params;
|
|
@@ -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,
|