@artisan-commerce/analytics-web 0.1.0-canary.2 → 0.1.0-canary.21

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 (135) hide show
  1. package/CHANGELOG.md +158 -0
  2. package/build/main.bundle.js +11 -11
  3. package/build/report.json +1 -1
  4. package/build/src/index.d.ts +1 -0
  5. package/build/src/lib/events/auth/changePasswordAttempt/changePasswordAttempt.d.ts +1 -1
  6. package/build/src/lib/events/auth/changePasswordFail/changePasswordFail.d.ts +1 -1
  7. package/build/src/lib/events/auth/changePasswordSuccess/changePasswordSuccess.d.ts +1 -1
  8. package/build/src/lib/events/auth/signIn/signIn.d.ts +1 -1
  9. package/build/src/lib/events/auth/signOut/signOut.d.ts +1 -1
  10. package/build/src/lib/events/auth/signUp/signUp.d.ts +1 -1
  11. package/build/src/lib/events/auth/signUpAttempt/signUpAttempt.d.ts +2 -1
  12. package/build/src/lib/events/banner/bannerImpression/bannerImpression.d.ts +1 -1
  13. package/build/src/lib/events/banner/bannerImpression/bannerImpression.types.d.ts +1 -1
  14. package/build/src/lib/events/banner/selectBanner/selectBanner.d.ts +1 -1
  15. package/build/src/lib/events/banner/selectBanner/selectBanner.types.d.ts +4 -4
  16. package/build/src/lib/events/billing/addBillingInfo/addBillingInfo.d.ts +1 -1
  17. package/build/src/lib/events/billing/addBillingInfo/addBillingInfo.types.d.ts +1 -1
  18. package/build/src/lib/events/billing/selectBillingInfo/selectBillingInfo.d.ts +1 -1
  19. package/build/src/lib/events/billing/selectBillingInfo/selectBillingInfo.types.d.ts +2 -2
  20. package/build/src/lib/events/billing/updateBillingInfo/updateBillingInfo.d.ts +1 -1
  21. package/build/src/lib/events/billing/updateBillingInfo/updateBillingInfo.types.d.ts +2 -2
  22. package/build/src/lib/events/booking/bookAppointment/bookAppointment.d.ts +1 -1
  23. package/build/src/lib/events/category/categoryImpression/categoryImpression.d.ts +1 -1
  24. package/build/src/lib/events/category/searchCategoryAttempt/searchCategoryAttempt.d.ts +1 -1
  25. package/build/src/lib/events/category/selectCategory/selectCategory.d.ts +2 -1
  26. package/build/src/lib/events/category/viewCategory/viewCategory.d.ts +2 -1
  27. package/build/src/lib/events/checkout/checkoutAction/checkoutAction.d.ts +1 -1
  28. package/build/src/lib/events/checkout/checkoutAction/checkoutAction.types.d.ts +1 -1
  29. package/build/src/lib/events/checkout/initiateCheckout/initiateCheckout.d.ts +1 -1
  30. package/build/src/lib/events/coupon/applyBenefit/applyBenefit.d.ts +1 -1
  31. package/build/src/lib/events/coupon/couponCodeError/couponCodeError.d.ts +1 -1
  32. package/build/src/lib/events/coupon/redeemCouponCode/redeemCouponCode.d.ts +1 -1
  33. package/build/src/lib/events/coupon/removeBenefit/removeBenefit.d.ts +1 -1
  34. package/build/src/lib/events/coupon/viewBenefitDetails/viewBenefitDetails.d.ts +1 -1
  35. package/build/src/lib/events/coupon/viewBenefitsWallet/viewBenefitsWallet.d.ts +1 -1
  36. package/build/src/lib/events/coupon/viewQRStoreCoupon/viewQRStoreCoupon.d.ts +2 -1
  37. package/build/src/lib/events/credit/addCredits/addCredits.d.ts +1 -1
  38. package/build/src/lib/events/credit/spendCredits/spendCredits.d.ts +1 -1
  39. package/build/src/lib/events/credit/viewCredits/viewCredits.d.ts +1 -1
  40. package/build/src/lib/events/customEvent/customEvent.d.ts +2 -2
  41. package/build/src/lib/events/events.d.ts +5 -5
  42. package/build/src/lib/events/events.types.d.ts +1 -1
  43. package/build/src/lib/events/fulfillment/viewFulfillmentStep/viewFulfillmentStep.d.ts +1 -1
  44. package/build/src/lib/events/fulfillment/viewTracking/viewTracking.d.ts +1 -1
  45. package/build/src/lib/events/fulfillment/viewTracking/viewTracking.types.d.ts +1 -1
  46. package/build/src/lib/events/geo/changeLocation/changeLocation.d.ts +2 -2
  47. package/build/src/lib/events/geo/changeLocation/changeLocation.types.d.ts +4 -4
  48. package/build/src/lib/events/geo/findLocation/findLocation.d.ts +2 -2
  49. package/build/src/lib/events/geo/findLocation/findLocation.types.d.ts +2 -2
  50. package/build/src/lib/events/geo/index.d.ts +4 -4
  51. package/build/src/lib/events/geo/outOfCoverage/outOfCoverage.d.ts +2 -2
  52. package/build/src/lib/events/geo/outOfCoverage/outOfCoverage.types.d.ts +2 -2
  53. package/build/src/lib/events/geo/setLocation/setLocation.d.ts +2 -2
  54. package/build/src/lib/events/geo/setLocation/setLocation.types.d.ts +2 -2
  55. package/build/src/lib/events/help/requestAssistance/requestAssistance.d.ts +2 -1
  56. package/build/src/lib/events/loyalty/earnPoints/earnPoints.d.ts +1 -1
  57. package/build/src/lib/events/loyalty/sharePoints/sharePoints.d.ts +1 -1
  58. package/build/src/lib/events/loyalty/spendPoints/spendPoints.d.ts +1 -1
  59. package/build/src/lib/events/loyalty/viewLoyaltyLevel/viewLoyaltyLevel.d.ts +1 -1
  60. package/build/src/lib/events/order/cancelOrder/cancelOrder.d.ts +1 -1
  61. package/build/src/lib/events/order/rateOrder/rateOrder.d.ts +1 -1
  62. package/build/src/lib/events/order/requestRefund/requestRefund.d.ts +1 -1
  63. package/build/src/lib/events/order/requestRefund/requestRefund.types.d.ts +1 -0
  64. package/build/src/lib/events/other/generateLead/generateLead.d.ts +1 -1
  65. package/build/src/lib/events/other/pageView/pageView.d.ts +2 -1
  66. package/build/src/lib/events/other/pageView/pageView.types.d.ts +2 -2
  67. package/build/src/lib/events/other/searchPageContent/searchPageContent.d.ts +1 -1
  68. package/build/src/lib/events/other/searchPageContent/searchPageContent.types.d.ts +1 -1
  69. package/build/src/lib/events/payment/changePaymentType/changePaymentType.d.ts +1 -1
  70. package/build/src/lib/events/payment/changePaymentType/changePaymentType.types.d.ts +6 -2
  71. package/build/src/lib/events/payment/selectPaymentType/selectPaymentType.d.ts +1 -1
  72. package/build/src/lib/events/payment/selectPaymentType/selectPaymentType.types.d.ts +2 -2
  73. package/build/src/lib/events/payment/setPaymentInfo/setPaymentInfo.d.ts +1 -1
  74. package/build/src/lib/events/payment/setPaymentInfo/setPaymentInfo.types.d.ts +3 -3
  75. package/build/src/lib/events/product/customizeProduct/customizeProduct.d.ts +1 -1
  76. package/build/src/lib/events/product/filterProducts/filterProducts.d.ts +1 -1
  77. package/build/src/lib/events/product/filterProducts/filterProducts.types.d.ts +1 -1
  78. package/build/src/lib/events/product/productImpression/productImpression.d.ts +1 -1
  79. package/build/src/lib/events/product/searchProductAttempt/searchProductAttempt.d.ts +1 -1
  80. package/build/src/lib/events/product/searchProductNotFound/searchProductNotFound.d.ts +1 -1
  81. package/build/src/lib/events/product/searchProductSuccess/searchProductSuccess.d.ts +1 -1
  82. package/build/src/lib/events/product/selectProduct/selectProduct.d.ts +2 -1
  83. package/build/src/lib/events/product/sortProducts/sortProducts.d.ts +1 -1
  84. package/build/src/lib/events/product/sortProducts/sortProducts.types.d.ts +2 -2
  85. package/build/src/lib/events/product/viewProductDetails/viewProductDetails.d.ts +2 -1
  86. package/build/src/lib/events/product/viewProductDetails/viewProductDetails.types.d.ts +1 -1
  87. package/build/src/lib/events/purchase/purchaseAttempt/purchaseAttempt.d.ts +1 -1
  88. package/build/src/lib/events/purchase/purchaseAttempt/purchaseAttempt.types.d.ts +1 -1
  89. package/build/src/lib/events/purchase/purchaseFail/purchaseFail.d.ts +1 -1
  90. package/build/src/lib/events/purchase/purchaseSuccess/purchaseSuccess.d.ts +1 -1
  91. package/build/src/lib/events/settings/viewSettings/viewSettings.d.ts +1 -1
  92. package/build/src/lib/events/shipping/addShippingAddress/addShippingAddress.d.ts +1 -1
  93. package/build/src/lib/events/shipping/addShippingAddress/addShippingAddress.types.d.ts +1 -1
  94. package/build/src/lib/events/shipping/selectShippingAddress/selectShippingAddress.d.ts +1 -1
  95. package/build/src/lib/events/shipping/selectShippingAddress/selectShippingAddress.types.d.ts +1 -1
  96. package/build/src/lib/events/shipping/updateShippingAddress/updateShippingAddress.d.ts +1 -1
  97. package/build/src/lib/events/shipping/updateShippingAddress/updateShippingAddress.types.d.ts +1 -1
  98. package/build/src/lib/events/shoppingCart/addProductToCart/addProductToCart.d.ts +1 -1
  99. package/build/src/lib/events/shoppingCart/addProductToWishlist/addProductToWishlist.d.ts +1 -1
  100. package/build/src/lib/events/shoppingCart/clearCart/clearCart.d.ts +1 -1
  101. package/build/src/lib/events/shoppingCart/removeProductFromCart/removeProductFromCart.d.ts +1 -1
  102. package/build/src/lib/events/shoppingCart/removeProductFromCart/removeProductFromCart.types.d.ts +1 -1
  103. package/build/src/lib/events/shoppingCart/removeProductFromWishlist/removeProductFromWishlist.d.ts +1 -1
  104. package/build/src/lib/events/shoppingCart/removeProductFromWishlist/removeProductFromWishlist.types.d.ts +1 -1
  105. package/build/src/lib/events/shoppingCart/updateProductInCart/updateProductInCart.d.ts +2 -1
  106. package/build/src/lib/events/shoppingCart/updateProductInCart/updateProductInCart.types.d.ts +1 -1
  107. package/build/src/lib/events/shoppingCart/updateProductInWishlist/updateProductInWishlist.d.ts +2 -1
  108. package/build/src/lib/events/shoppingCart/updateProductInWishlist/updateProductInWishlist.types.d.ts +1 -1
  109. package/build/src/lib/events/shoppingCart/viewCart/viewCart.d.ts +1 -1
  110. package/build/src/lib/events/social/share/share.d.ts +1 -1
  111. package/build/src/lib/events/social/share/share.types.d.ts +3 -3
  112. package/build/src/lib/events/store/changeStore/changeStore.d.ts +1 -1
  113. package/build/src/lib/events/store/setStore/setStore.d.ts +1 -1
  114. package/build/src/lib/events/user/setUserInfo/setUserInfo.d.ts +2 -1
  115. package/build/src/lib/events/user/updateUserInfo/updateUserInfo.d.ts +3 -2
  116. package/build/src/lib/events/vendor/changeVendor/changeVendor.d.ts +1 -1
  117. package/build/src/lib/events/vendor/setVendor/setVendor.d.ts +1 -1
  118. package/build/src/lib/events/workflow/selectWorkflow/selectWorkflow.d.ts +1 -1
  119. package/build/src/lib/events/workflow/updateWorkflow/updateWorkflow.d.ts +1 -1
  120. package/build/src/lib/initAnalytics/initAnalytics.helpers.d.ts +1 -1
  121. package/build/src/lib/initAnalytics/initAnalytics.types.d.ts +13 -1
  122. package/build/src/lib/providers/AnalyticsProvider/AnalyticsProvider.d.ts +1 -1
  123. package/build/src/lib/providers/AnalyticsProvider/AnalyticsProvider.types.d.ts +2 -2
  124. package/build/src/lib/providers/FacebookPixel/FacebookPixel.types.d.ts +1 -2
  125. package/build/src/lib/providers/FacebookPixel/events/category/searchCategoryAttempt/searchCategoryAttempt.types.d.ts +2 -0
  126. package/build/src/lib/providers/FacebookPixel/events/loyalty/spendPoints/spendPoints.types.d.ts +2 -0
  127. package/build/src/lib/providers/FacebookPixel/events/order/rateOrder/rateOrder.types.d.ts +1 -0
  128. package/build/src/lib/providers/FacebookPixel/events/other/searchPageContent/searchPageContent.types.d.ts +2 -0
  129. package/build/src/lib/providers/FacebookPixel/events/product/productImpression/productImpression.types.d.ts +1 -1
  130. package/build/src/lib/providers/GlobalProvider/GlobalProvider.d.ts +1 -1
  131. package/build/src/lib/providers/GoogleAnalytics/GoogleAnalytics.types.d.ts +8 -2
  132. package/build/src/types/event.types.d.ts +0 -1
  133. package/build/src/utils/logs.utils.d.ts +1 -1
  134. package/build/src/utils/state.utils.d.ts +8 -0
  135. package/package.json +6 -7
@@ -2,7 +2,7 @@ import { ViewLoyaltyLevelParams } from "./viewLoyaltyLevel.types";
2
2
  /**
3
3
  * Emits a viewLoyaltyLevel event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users view a loyalty level.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ViewLoyaltyLevelParams} params ViewLoyaltyLevel event parameters
@@ -2,7 +2,7 @@ import { CancelOrderParams } from "./cancelOrder.types";
2
2
  /**
3
3
  * Emits a cancelOrder event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users cancel an order.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {CancelOrderParams} params CancelOrder event parameters
@@ -2,7 +2,7 @@ import { RateOrderParams } from "./rateOrder.types";
2
2
  /**
3
3
  * Emits a rateOrder event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users rate an order.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {RateOrderParams} params RateOrder event parameters
@@ -2,7 +2,7 @@ import { RequestRefundParams } from "./requestRefund.types";
2
2
  /**
3
3
  * Emits a requestRefund event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users request a refund of the order.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {RequestRefundParams} params RequestRefund event parameters
@@ -6,6 +6,7 @@ import { RequestRefundParams as FacebookRequestRefundParams } from "../../../pro
6
6
  * @interface RequestRefundCommonParams
7
7
  * @since 0.5.14
8
8
  * @property {string} orderId The orders unique identifier
9
+ * @property {number} orderTotal The total cost of the order
9
10
  * @property {string} reason The reason by which the user is requesting a refund of the order
10
11
  */
11
12
  export interface RequestRefundCommonParams {
@@ -2,7 +2,7 @@ import { GenerateLeadParams } from "./generateLead.types";
2
2
  /**
3
3
  * Emits a generateLead event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users take an action that tells you they can be a lead.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {GenerateLeadParams} params GenerateLead event parameters
@@ -2,7 +2,8 @@ import { PageViewParams } from "./pageView.types";
2
2
  /**
3
3
  * Emits a pageView event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when you need to add custom page view that the default page
6
+ * view event does not log.
6
7
  *
7
8
  * @since 0.5.14
8
9
  * @param {PageViewParams} params PageView event parameters
@@ -5,8 +5,8 @@ import { PageViewParams as FacebookPageViewParams } from "../../../providers/Fac
5
5
  *
6
6
  * @interface PageViewCommonParams
7
7
  * @since 0.5.14
8
- * @property {string} pathname The visited url path
9
- * @property {string} name The name of the visited path
8
+ * @property {string} pathname The name of the visited path, this value must start with a / character
9
+ * @property {string} name The title of the page
10
10
  */
11
11
  export interface PageViewCommonParams {
12
12
  pathname?: string;
@@ -2,7 +2,7 @@ import { SearchPageContentParams } from "./searchPageContent.types";
2
2
  /**
3
3
  * Emits a searchPageContent event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users search for any content in the application.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SearchPageContentParams} params SearchPageContent event parameters
@@ -5,7 +5,7 @@ import { SearchPageContentParams as FacebookSearchPageContentParams } from "../.
5
5
  *
6
6
  * @interface SearchPageContentCommonParams
7
7
  * @since 0.5.14
8
- * @property {string} query The searched query
8
+ * @property {string} query The searched text
9
9
  */
10
10
  export interface SearchPageContentCommonParams {
11
11
  query: string;
@@ -2,7 +2,7 @@ import { ChangePaymentTypeParams } from "./changePaymentType.types";
2
2
  /**
3
3
  * Emits a changePaymentType event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users change the payment type.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ChangePaymentTypeParams} params ChangePaymentType event parameters
@@ -7,12 +7,16 @@ import { PaymentType } from "../../events.types";
7
7
  * @interface ChangePaymentTypeCommonParams
8
8
  * @since 0.5.14
9
9
  * @property {PaymentType} previousPaymentType The previously set payment type
10
- * @property {PaymentType} nextPayamentType The new set payment type
10
+ * @property {string} previousCardType If was paying with card, the previously set card provider (e.g. visa)
11
+ * @property {PaymentType} nextPaymentType The new set payment type
12
+ * @property {string} nextCardType If paying with card, the new card provider
11
13
  * @property {number} orderTotal The total cost of the order
12
14
  */
13
15
  export interface ChangePaymentTypeCommonParams {
14
16
  previousPaymentType: PaymentType;
15
- nextPayamentType: PaymentType;
17
+ previousCardType?: string;
18
+ nextPaymentType: PaymentType;
19
+ nextCardType?: string;
16
20
  orderTotal: number;
17
21
  }
18
22
  /**
@@ -2,7 +2,7 @@ import { SelectPaymentTypeParams } from "./selectPaymentType.types";
2
2
  /**
3
3
  * Emits a selectPaymentType event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users select the payment type.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SelectPaymentTypeParams} params SelectPaymentType event parameters
@@ -6,11 +6,11 @@ import { PaymentType } from "../../events.types";
6
6
  *
7
7
  * @interface SelectPaymentTypeCommonParams
8
8
  * @since 0.5.14
9
- * @property {PaymentType} payamentType The new set payment type (e.g. Cash)
9
+ * @property {PaymentType} paymentType The new set payment type (e.g. Cash)
10
10
  * @property {number} orderTotal The total cost of the order
11
11
  */
12
12
  export interface SelectPaymentTypeCommonParams {
13
- payamentType: PaymentType;
13
+ paymentType: PaymentType;
14
14
  orderTotal: number;
15
15
  }
16
16
  /**
@@ -2,7 +2,7 @@ import { SetPaymentInfoParams } from "./setPaymentInfo.types";
2
2
  /**
3
3
  * Emits a setPaymentInfo event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users set the payment type for the first time.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SetPaymentInfoParams} params SetPaymentInfo event parameters
@@ -7,12 +7,12 @@ import { PaymentType } from "../../events.types";
7
7
  * @interface SetPaymentInfoCommonParams
8
8
  * @since 0.5.14
9
9
  * @property {number} orderTotal The total cost of the order
10
- * @property {PaymentType} payamentType The new set payment type (e.g. Cash)
11
- * @property {string} cardType If paying with card the card provider (e.g. visa)
10
+ * @property {PaymentType} paymentType The new set payment type (e.g. Cash)
11
+ * @property {string} cardType If paying with card, the card provider (e.g. visa)
12
12
  */
13
13
  export interface SetPaymentInfoCommonParams {
14
14
  orderTotal: number;
15
- payamentType: PaymentType;
15
+ paymentType: PaymentType;
16
16
  cardType?: string;
17
17
  }
18
18
  /**
@@ -2,7 +2,7 @@ import { CustomizeProductParams } from "./customizeProduct.types";
2
2
  /**
3
3
  * Emits a customizeProduct event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users add extras to the base offered product.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {CustomizeProductParams} params CustomizeProduct event parameters
@@ -2,7 +2,7 @@ import { FilterProductsParams } from "./filterProducts.types";
2
2
  /**
3
3
  * Emits a filterProducts event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users try to filter a list of products.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {FilterProductsParams} params FilterProducts event parameters
@@ -6,7 +6,7 @@ import { FilterProductsParams as FacebookFilterProductsParams } from "../../../p
6
6
  * @interface FilterProductsCommonParams
7
7
  * @since 0.5.14
8
8
  * @property {string} list the name of the list of products to filter
9
- * @property {string} filterBy key:value list of filtera e.g. ["brand:Artisan"]
9
+ * @property {string} filterBy key:value list of filters e.g. ["brand:Artisan"]
10
10
  * @property {string} categoryId if the list is an artisan category, the category id
11
11
  */
12
12
  export interface FilterProductsCommonParams {
@@ -2,7 +2,7 @@ import { ProductImpressionParams } from "./productImpression.types";
2
2
  /**
3
3
  * Emits a productImpression event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when a product is visible on the screen.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ProductImpressionParams} params ProductImpression event parameters
@@ -2,7 +2,7 @@ import { SearchProductAttemptParams } from "./searchProductAttempt.types";
2
2
  /**
3
3
  * Emits a searchProductAttempt event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users try to search an specific product.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SearchProductAttemptParams} params SearchProductAttempt event parameters
@@ -2,7 +2,7 @@ import { SearchProductNotFoundParams } from "./searchProductNotFound.types";
2
2
  /**
3
3
  * Emits a searchProductNotFound event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when your search request has failed.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SearchProductNotFoundParams} params SearchProductNotFound event parameters
@@ -2,7 +2,7 @@ import { SearchProductSuccessParams } from "./searchProductSuccess.types";
2
2
  /**
3
3
  * Emits a searchProductSuccess event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when your search request has resolved successfully.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SearchProductSuccessParams} params SearchProductSuccess event parameters
@@ -2,7 +2,8 @@ import { SelectProductParams } from "./selectProduct.types";
2
2
  /**
3
3
  * Emits a selectProduct event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users select a product. This product may or may not
6
+ * be on a list.
6
7
  *
7
8
  * @since 0.5.14
8
9
  * @property {SelectProductParams} params SelectProduct event parameters
@@ -2,7 +2,7 @@ import { SortProductsParams } from "./sortProducts.types";
2
2
  /**
3
3
  * Emits a sortProducts event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users try to sort a list of products.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SortProductsParams} params SortProducts event parameters
@@ -6,8 +6,8 @@ import { SortProductsParams as FacebookSortProductsParams } from "../../../provi
6
6
  * @interface SortProductsCommonParams
7
7
  * @since 0.5.14
8
8
  * @property {string} list the name of the list of products to sort
9
- * @property {string} sortBy sort attribute by e.g. "alphabetical"
10
- * @property {string} sortMethod method used to sort e.g. "asc"
9
+ * @property {string} sortBy sort attribute by (e.g. alphabetical)
10
+ * @property {string} sortMethod method used to sort (e.g. asc)
11
11
  * @property {string} categoryId if the list is an artisan category, the category id
12
12
  */
13
13
  export interface SortProductsCommonParams {
@@ -2,7 +2,8 @@ import { ViewProductDetailsParams } from "./viewProductDetails.types";
2
2
  /**
3
3
  * Emits a viewProductDetails event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when the details of a product load successfully and are shown
6
+ * to the user.
6
7
  *
7
8
  * @since 0.5.14
8
9
  * @property {ViewProductDetailsParams} params ViewProductDetails event parameters
@@ -7,7 +7,7 @@ import { ViewProductDetailsParams as FacebookViewProductDetailsParams } from "..
7
7
  * @interface ViewProductDetailsCommonParams
8
8
  * @since 0.5.14
9
9
  * @property {Product} product the product that the details are being viewed
10
- * @property {string} categoryId if user came from a category list, the category id
10
+ * @property {string} categoryId if the user came from a category list, the category id
11
11
  */
12
12
  export interface ViewProductDetailsCommonParams {
13
13
  product: Product;
@@ -2,7 +2,7 @@ import { PurchaseAttemptParams } from "./purchaseAttempt.types";
2
2
  /**
3
3
  * Emits a purchaseAttempt event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users show an intention to purchase.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {PurchaseAttemptParams} params PurchaseAttempt event parameters
@@ -11,7 +11,7 @@ import { PaymentType, Workflow } from "../../events.types";
11
11
  * @property {ShoppingCart} shoppingCart The order shopping cart
12
12
  * @property {PaymentType} selectedPaymentType The selected payment type (e.g. Cash, Credit, Debit)
13
13
  * @property {Workflow} fulfillmentType The workflow name (e.g. Delivery)
14
- * @property {string} cardType If paying with card the card provider (e.g. visa)
14
+ * @property {string} cardType If paying with card, the card provider (e.g. visa)
15
15
  * @property {number} shippingAddressId The selected shipping address identifier
16
16
  * @property {number} billingInfoId The selected billing info identifier
17
17
  */
@@ -2,7 +2,7 @@ import { PurchaseFailParams } from "./purchaseFail.types";
2
2
  /**
3
3
  * Emits a purchaseFail event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when your purchase request has failed.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {PurchaseFailParams} params PurchaseFail event parameters
@@ -2,7 +2,7 @@ import { PurchaseSuccessParams } from "./purchaseSuccess.types";
2
2
  /**
3
3
  * Emits a purchaseSuccess event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when your purchase request has resolved successfully.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {PurchaseSuccessParams} params PurchaseSuccess event parameters
@@ -2,7 +2,7 @@ import { ViewSettingsParams } from "./viewSettings.types";
2
2
  /**
3
3
  * Emits a viewSettings event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users view the settings.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ViewSettingsParams} params ViewSettings event parameters
@@ -2,7 +2,7 @@ import { AddShippingAddressParams } from "./addShippingAddress.types";
2
2
  /**
3
3
  * Emits a addShippingAddress event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users add their shipping address.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {AddShippingAddressParams} params AddShippingAddress event parameters
@@ -8,7 +8,7 @@ import { AddShippingAddressParams as FacebookAddShippingAddressParams } from "..
8
8
  * @property {number} lat The address latitude
9
9
  * @property {number} lng The address longitude
10
10
  * @property {string} alias The address alias or name
11
- * @property {address} address Full address
11
+ * @property {string} address Full address
12
12
  */
13
13
  export interface AddShippingAddressCommonParams {
14
14
  lat: number;
@@ -2,7 +2,7 @@ import { SelectShippingAddressParams } from "./selectShippingAddress.types";
2
2
  /**
3
3
  * Emits a selectShippingAddress event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users select a shipping address.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SelectShippingAddressParams} params SelectShippingAddress event parameters
@@ -11,7 +11,7 @@ import { SelectShippingAddressParams as FacebookSelectShippingAddressParams } fr
11
11
  * @property {number} lat The address latitude
12
12
  * @property {number} lng The address longitude
13
13
  * @property {string} alias The address alias or name
14
- * @property {address} address Full address
14
+ * @property {string} address Full address
15
15
  */
16
16
  export interface SelectShippingAddressCommonParams {
17
17
  addressId: ShippingAddress["id"];
@@ -2,7 +2,7 @@ import { UpdateShippingAddressParams } from "./updateShippingAddress.types";
2
2
  /**
3
3
  * Emits a updateShippingAddress event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users update their shipping address.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {UpdateShippingAddressParams} params UpdateShippingAddress event parameters
@@ -7,7 +7,7 @@ import { UpdateShippingAddressParams as FacebookUpdateShippingAddressParams } fr
7
7
  * @interface UpdateShippingAddressCommonParams
8
8
  * @since 0.5.14
9
9
  * @property {number} addressId The address identifier
10
- * @property {address} address The new full address
10
+ * @property {string} address The new full address
11
11
  * @property {string[]} fields The updated fields names
12
12
  */
13
13
  export interface UpdateShippingAddressCommonParams {
@@ -2,7 +2,7 @@ import { AddProductToCartParams } from "./addProductToCart.types";
2
2
  /**
3
3
  * Emits a addProductToCart event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users add a product to the cart.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {AddProductToCartParams} params AddProductToCart event parameters
@@ -2,7 +2,7 @@ import { AddProductToWishlistParams } from "./addProductToWishlist.types";
2
2
  /**
3
3
  * Emits a addProductToWishlist event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users add a product to the wishlist.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {AddProductToWishlistParams} params AddProductToWishlist event parameters
@@ -2,7 +2,7 @@ import { ClearCartParams } from "./clearCart.types";
2
2
  /**
3
3
  * Emits a clearCart event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users empty the cart.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ClearCartParams} params ClearCart event parameters
@@ -2,7 +2,7 @@ import { RemoveProductFromCartParams } from "./removeProductFromCart.types";
2
2
  /**
3
3
  * Emits a removeProductFromCart event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users remove a product from the cart.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {RemoveProductFromCartParams} params RemoveProductFromCart event parameters
@@ -6,7 +6,7 @@ import { RemoveProductFromCartParams as FacebookRemoveProductFromCartParams } fr
6
6
  *
7
7
  * @interface RemoveProductFromCartCommonParams
8
8
  * @since 0.5.14
9
- * @property {CartProduct} product The product that was added to the cart
9
+ * @property {CartProduct} product The product that was removed to the cart
10
10
  * @property {string} cartId Shopping cart identifier
11
11
  * @property {string} cartName Shopping cart name
12
12
  * @property {Store} store Store where the user is buying the product
@@ -2,7 +2,7 @@ import { RemoveProductFromWishlistParams } from "./removeProductFromWishlist.typ
2
2
  /**
3
3
  * Emits a removeProductFromWishlist event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users remove a product from the wishlist.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {RemoveProductFromWishlistParams} params RemoveProductFromWishlist event parameters
@@ -6,7 +6,7 @@ import { RemoveProductFromWishlistParams as FacebookRemoveProductFromWishlistPar
6
6
  *
7
7
  * @interface RemoveProductFromWishlistCommonParams
8
8
  * @since 0.5.14
9
- * @property {CartProduct} product The product that was added to the cart
9
+ * @property {CartProduct} product The product that was removed from the wishlist
10
10
  * @property {string} cartId Shopping cart identifier
11
11
  */
12
12
  export interface RemoveProductFromWishlistCommonParams {
@@ -2,7 +2,8 @@ import { UpdateProductInCartParams } from "./updateProductInCart.types";
2
2
  /**
3
3
  * Emits a updateProductInCart event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users update a product that was added earlier to the
6
+ * cart.
6
7
  *
7
8
  * @since 0.5.14
8
9
  * @property {UpdateProductInCartParams} params UpdateProductInCart event parameters
@@ -6,7 +6,7 @@ import { CartProduct, ShoppingCart, Store } from "@artisan-commerce/types";
6
6
  *
7
7
  * @interface UpdateProductInCartCommonParams
8
8
  * @since 0.5.14
9
- * @property {CartProduct} product The product that was added to the cart
9
+ * @property {CartProduct} product The product in the cart that was updated
10
10
  * @property {string} cartId Shopping cart identifier
11
11
  * @property {string} cartName Shopping cart name
12
12
  * @property {Store} store Store where the user is buying the product
@@ -2,7 +2,8 @@ import { UpdateProductInWishlistParams } from "./updateProductInWishlist.types";
2
2
  /**
3
3
  * Emits a updateProductInWishlist event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users update a product that was added earlier to the
6
+ * wishlist.
6
7
  *
7
8
  * @since 0.5.14
8
9
  * @property {UpdateProductInWishlistParams} params UpdateProductInWishlist event parameters
@@ -6,7 +6,7 @@ import { UpdateProductInWishlistParams as FacebookUpdateProductInWishlistParams
6
6
  *
7
7
  * @interface UpdateProductInWishlistCommonParams
8
8
  * @since 0.5.14
9
- * @property {CartProduct} product The product that was added to the cart
9
+ * @property {CartProduct} product The product in the wishlist that was updated
10
10
  * @property {string} cartId Shopping cart identifier
11
11
  * @property {string[]} fields The updated fields names
12
12
  */
@@ -2,7 +2,7 @@ import { ViewCartParams } from "./viewCart.types";
2
2
  /**
3
3
  * Emits a viewCart event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users view the cart.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ViewCartParams} params ViewCart event parameters
@@ -2,7 +2,7 @@ import { ShareParams } from "./share.types";
2
2
  /**
3
3
  * Emits a share event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users share any content of the application.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ShareParams} params Share event parameters
@@ -5,9 +5,9 @@ import { ShareParams as FacebookShareParams } from "../../../providers/FacebookP
5
5
  *
6
6
  * @interface ShareCommonParams
7
7
  * @since 0.5.14
8
- * @property {string} shareTarget The mean or plarform by which the user will share some content (e.g. link, Facebook)
9
- * @property {string|number} itemId The content identifier that will be shared
10
- * @property {string} itemName The content name that will be shared
8
+ * @property {string} shareTarget The mean or platform by which the user will share some content (e.g. link, Facebook)
9
+ * @property {string|number} itemId The identifier of the content to be shared
10
+ * @property {string} itemName The name of the content to be shared
11
11
  */
12
12
  export interface ShareCommonParams {
13
13
  shareTarget: string;
@@ -2,7 +2,7 @@ import { ChangeStoreParams } from "./changeStore.types";
2
2
  /**
3
3
  * Emits a changeStore event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when the selected store has changed.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {ChangeStoreParams} params ChangeStore event parameters
@@ -2,7 +2,7 @@ import { SetStoreParams } from "./setStore.types";
2
2
  /**
3
3
  * Emits a setStore event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users set a store for the first time.
6
6
  *
7
7
  * @since 0.5.14
8
8
  * @property {SetStoreParams} params SetStore event parameters
@@ -2,7 +2,8 @@ import { SetUserInfoParams } from "./setUserInfo.types";
2
2
  /**
3
3
  * Emits a setUserInfo event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users set data like their birthdate, phone number,
6
+ * etc.
6
7
  *
7
8
  * @since 0.5.14
8
9
  * @property {SetUserInfoParams} params SetUserInfo event parameters
@@ -1,8 +1,9 @@
1
1
  import { UpdateUserInfoParams } from "./updateUserInfo.types";
2
2
  /**
3
- * Emits a updateUserInfo event to every configured provider.
3
+ * Emits an updateUserInfo event to every configured provider.
4
4
  *
5
- * Record this event when
5
+ * Log this event when users update data like their birthdate, phone number,
6
+ * etc.
6
7
  *
7
8
  * @since 0.5.14
8
9
  * @property {UpdateUserInfoParams} params UpdateUserInfo event parameters