@chordcommerce/analytics 1.24.3 → 1.24.5

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 (35) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/client/cdp.js +2 -2
  3. package/dist/cjs/client/consent/index.js +2 -2
  4. package/dist/cjs/client/consent/onetrust-api.d.ts +1 -1
  5. package/dist/cjs/client/consent/onetrust.d.ts +2 -2
  6. package/dist/cjs/client/consent/segment.js +19 -6
  7. package/dist/cjs/client/consent/shopify.d.ts +5 -1
  8. package/dist/cjs/client/consent/shopify.js +70 -21
  9. package/dist/cjs/client/index.js +16 -8
  10. package/dist/cjs/client/utils.js +1 -2
  11. package/dist/cjs/utils.d.ts +1 -1
  12. package/dist/cjs/utils.js +2 -2
  13. package/dist/cjs/validators/custom.d.ts +4 -38
  14. package/dist/cjs/validators/custom.js +5 -5
  15. package/dist/cjs/validators/objects.d.ts +73 -584
  16. package/dist/cjs/validators/objects.js +110 -111
  17. package/dist/cjs/validators/tracking-plan-map.d.ts +172 -5126
  18. package/dist/cjs/validators/tracking-plan.d.ts +272 -7008
  19. package/dist/cjs/validators/tracking-plan.js +1722 -1649
  20. package/dist/client/consent/onetrust-api.d.ts +1 -1
  21. package/dist/client/consent/onetrust.d.ts +2 -2
  22. package/dist/client/consent/segment.js +1 -1
  23. package/dist/client/consent/shopify.d.ts +5 -1
  24. package/dist/client/consent/shopify.js +70 -21
  25. package/dist/client/index.js +84 -84
  26. package/dist/tsconfig-build-cjs.tsbuildinfo +1 -0
  27. package/dist/utils.d.ts +1 -1
  28. package/dist/validators/custom.d.ts +4 -38
  29. package/dist/validators/custom.js +1 -1
  30. package/dist/validators/objects.d.ts +73 -584
  31. package/dist/validators/objects.js +27 -28
  32. package/dist/validators/tracking-plan-map.d.ts +172 -5126
  33. package/dist/validators/tracking-plan.d.ts +272 -7008
  34. package/dist/validators/tracking-plan.js +219 -146
  35. package/package.json +4 -4
@@ -602,7 +602,7 @@ export class ChordAnalytics {
602
602
  * Send a `page` event to the CDP.
603
603
  * If consent is not ready, the event is queued until consent is available.
604
604
  */
605
- this.page = (options, props = {}) => __awaiter(this, void 0, void 0, function* () {
605
+ this.page = (options_1, ...args_1) => __awaiter(this, [options_1, ...args_1], void 0, function* (options, props = {}) {
606
606
  const gate = this.waitForReadyState();
607
607
  if (gate)
608
608
  yield gate;
@@ -616,7 +616,7 @@ export class ChordAnalytics {
616
616
  /**
617
617
  * Internal method to actually send a page event to CDP.
618
618
  */
619
- this.sendPageEvent = (options, props = {}) => __awaiter(this, void 0, void 0, function* () {
619
+ this.sendPageEvent = (options_1, ...args_1) => __awaiter(this, [options_1, ...args_1], void 0, function* (options, props = {}) {
620
620
  // Configure CDP with fresh consent before sending
621
621
  this.configureConsentOnCdp();
622
622
  yield new Promise((resolve) => {
@@ -659,7 +659,7 @@ export class ChordAnalytics {
659
659
  return this.resetCompletePromise;
660
660
  };
661
661
  this.performReset = () => __awaiter(this, void 0, void 0, function* () {
662
- var _e;
662
+ var _a;
663
663
  try {
664
664
  // The new identity has no consent event of its own yet, so drop the
665
665
  // stored signature and let the next init emit a fresh baseline.
@@ -678,12 +678,12 @@ export class ChordAnalytics {
678
678
  // eslint-disable-next-line
679
679
  yield new Promise((resolve) => setTimeout(resolve, 10));
680
680
  try {
681
- const userState = ((_e = a === null || a === void 0 ? void 0 : a.user) === null || _e === void 0 ? void 0 : _e.call(a)) || {};
681
+ const userState = ((_a = a === null || a === void 0 ? void 0 : a.user) === null || _a === void 0 ? void 0 : _a.call(a)) || {};
682
682
  if (userState.userId === null || userState.userId === undefined) {
683
683
  break;
684
684
  }
685
685
  }
686
- catch (_f) {
686
+ catch (_b) {
687
687
  break;
688
688
  }
689
689
  attempts++;
@@ -786,8 +786,8 @@ export class ChordAnalytics {
786
786
  };
787
787
  // TODO: Add support for props.products
788
788
  this.trackCartViewed = (props, options) => __awaiter(this, void 0, void 0, function* () {
789
- var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
790
- const cart = (_k = (_j = (_h = (_g = this.options) === null || _g === void 0 ? void 0 : _g.formatters) === null || _h === void 0 ? void 0 : _h.objects) === null || _j === void 0 ? void 0 : _j.cart) === null || _k === void 0 ? void 0 : _k.call(_j, {
789
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
790
+ const cart = (_d = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.cart) === null || _d === void 0 ? void 0 : _d.call(_c, {
791
791
  cart: props === null || props === void 0 ? void 0 : props.cart,
792
792
  });
793
793
  const payload = {
@@ -796,17 +796,17 @@ export class ChordAnalytics {
796
796
  products: cart === null || cart === void 0 ? void 0 : cart.products,
797
797
  value: cart === null || cart === void 0 ? void 0 : cart.value,
798
798
  };
799
- if ((_o = (_m = (_l = this.options) === null || _l === void 0 ? void 0 : _l.formatters) === null || _m === void 0 ? void 0 : _m.events) === null || _o === void 0 ? void 0 : _o.cartViewed) {
800
- const formattedPayload = (_r = (_q = (_p = this.options) === null || _p === void 0 ? void 0 : _p.formatters) === null || _q === void 0 ? void 0 : _q.events) === null || _r === void 0 ? void 0 : _r.cartViewed(props, payload);
799
+ if ((_g = (_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.formatters) === null || _f === void 0 ? void 0 : _f.events) === null || _g === void 0 ? void 0 : _g.cartViewed) {
800
+ const formattedPayload = (_k = (_j = (_h = this.options) === null || _h === void 0 ? void 0 : _h.formatters) === null || _j === void 0 ? void 0 : _j.events) === null || _k === void 0 ? void 0 : _k.cartViewed(props, payload);
801
801
  return this.track('Cart Viewed', formattedPayload, options);
802
802
  }
803
803
  return this.track('Cart Viewed', payload, options);
804
804
  });
805
805
  // TODO: Add support for props.products
806
806
  this.trackCheckoutStarted = (props, options) => __awaiter(this, void 0, void 0, function* () {
807
- var _s, _t, _u, _v, _w, _x, _y;
808
- const formatter = (_u = (_t = (_s = this.options) === null || _s === void 0 ? void 0 : _s.formatters) === null || _t === void 0 ? void 0 : _t.events) === null || _u === void 0 ? void 0 : _u.checkoutStarted;
809
- const checkout = (_y = (_x = (_w = (_v = this.options) === null || _v === void 0 ? void 0 : _v.formatters) === null || _w === void 0 ? void 0 : _w.objects) === null || _x === void 0 ? void 0 : _x.checkout) === null || _y === void 0 ? void 0 : _y.call(_x, {
807
+ var _a, _b, _c, _d, _e, _f, _g;
808
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.checkoutStarted;
809
+ const checkout = (_g = (_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.formatters) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.checkout) === null || _g === void 0 ? void 0 : _g.call(_f, {
810
810
  checkout: props === null || props === void 0 ? void 0 : props.checkout,
811
811
  });
812
812
  const payload = checkout;
@@ -817,8 +817,8 @@ export class ChordAnalytics {
817
817
  return this.track('Checkout Started', payload, options);
818
818
  });
819
819
  this.trackCheckoutStepCompleted = (props, options) => __awaiter(this, void 0, void 0, function* () {
820
- var _z, _0, _1;
821
- const formatter = (_1 = (_0 = (_z = this.options) === null || _z === void 0 ? void 0 : _z.formatters) === null || _0 === void 0 ? void 0 : _0.events) === null || _1 === void 0 ? void 0 : _1.checkoutStepCompleted;
820
+ var _a, _b, _c;
821
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.checkoutStepCompleted;
822
822
  const payload = {
823
823
  checkout_id: props === null || props === void 0 ? void 0 : props.checkoutId,
824
824
  payment_method: props === null || props === void 0 ? void 0 : props.paymentMethod,
@@ -832,8 +832,8 @@ export class ChordAnalytics {
832
832
  return this.track('Checkout Step Completed', payload, options);
833
833
  });
834
834
  this.trackCheckoutStepViewed = (props, options) => __awaiter(this, void 0, void 0, function* () {
835
- var _2, _3, _4;
836
- const formatter = (_4 = (_3 = (_2 = this.options) === null || _2 === void 0 ? void 0 : _2.formatters) === null || _3 === void 0 ? void 0 : _3.events) === null || _4 === void 0 ? void 0 : _4.checkoutStepViewed;
835
+ var _a, _b, _c;
836
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.checkoutStepViewed;
837
837
  const payload = {
838
838
  checkout_id: props === null || props === void 0 ? void 0 : props.checkoutId,
839
839
  payment_method: props === null || props === void 0 ? void 0 : props.paymentMethod,
@@ -847,8 +847,8 @@ export class ChordAnalytics {
847
847
  return this.track('Checkout Step Viewed', payload, options);
848
848
  });
849
849
  this.trackCouponApplied = (props, options) => __awaiter(this, void 0, void 0, function* () {
850
- var _5, _6, _7;
851
- const formatter = (_7 = (_6 = (_5 = this.options) === null || _5 === void 0 ? void 0 : _5.formatters) === null || _6 === void 0 ? void 0 : _6.events) === null || _7 === void 0 ? void 0 : _7.couponApplied;
850
+ var _a, _b, _c;
851
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.couponApplied;
852
852
  const payload = {
853
853
  cart_id: props === null || props === void 0 ? void 0 : props.cartId,
854
854
  coupon_id: props === null || props === void 0 ? void 0 : props.couponId,
@@ -863,8 +863,8 @@ export class ChordAnalytics {
863
863
  return this.track('Coupon Applied', payload, options);
864
864
  });
865
865
  this.trackCouponDenied = (props, options) => __awaiter(this, void 0, void 0, function* () {
866
- var _8, _9, _10;
867
- const formatter = (_10 = (_9 = (_8 = this.options) === null || _8 === void 0 ? void 0 : _8.formatters) === null || _9 === void 0 ? void 0 : _9.events) === null || _10 === void 0 ? void 0 : _10.couponDenied;
866
+ var _a, _b, _c;
867
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.couponDenied;
868
868
  const payload = {
869
869
  cart_id: props === null || props === void 0 ? void 0 : props.cartId,
870
870
  coupon_id: props === null || props === void 0 ? void 0 : props.couponId,
@@ -879,8 +879,8 @@ export class ChordAnalytics {
879
879
  return this.track('Coupon Denied', payload, options);
880
880
  });
881
881
  this.trackCouponEntered = (props, options) => __awaiter(this, void 0, void 0, function* () {
882
- var _11, _12, _13;
883
- const formatter = (_13 = (_12 = (_11 = this.options) === null || _11 === void 0 ? void 0 : _11.formatters) === null || _12 === void 0 ? void 0 : _12.events) === null || _13 === void 0 ? void 0 : _13.couponEntered;
882
+ var _a, _b, _c;
883
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.couponEntered;
884
884
  const payload = {
885
885
  cart_id: props === null || props === void 0 ? void 0 : props.cartId,
886
886
  coupon_id: props === null || props === void 0 ? void 0 : props.couponId,
@@ -894,8 +894,8 @@ export class ChordAnalytics {
894
894
  return this.track('Coupon Entered', payload, options);
895
895
  });
896
896
  this.trackCouponRemoved = (props, options) => __awaiter(this, void 0, void 0, function* () {
897
- var _14, _15, _16;
898
- const formatter = (_16 = (_15 = (_14 = this.options) === null || _14 === void 0 ? void 0 : _14.formatters) === null || _15 === void 0 ? void 0 : _15.events) === null || _16 === void 0 ? void 0 : _16.couponRemoved;
897
+ var _a, _b, _c;
898
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.couponRemoved;
899
899
  const payload = {
900
900
  cart_id: props === null || props === void 0 ? void 0 : props.cartId,
901
901
  coupon_id: props === null || props === void 0 ? void 0 : props.couponId,
@@ -910,8 +910,8 @@ export class ChordAnalytics {
910
910
  return this.track('Coupon Removed', payload, options);
911
911
  });
912
912
  this.trackEmailCaptured = (props, options) => __awaiter(this, void 0, void 0, function* () {
913
- var _17, _18, _19;
914
- const formatter = (_19 = (_18 = (_17 = this.options) === null || _17 === void 0 ? void 0 : _17.formatters) === null || _18 === void 0 ? void 0 : _18.events) === null || _19 === void 0 ? void 0 : _19.emailCaptured;
913
+ var _a, _b, _c;
914
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.emailCaptured;
915
915
  const payload = {
916
916
  email: props === null || props === void 0 ? void 0 : props.email,
917
917
  placement_component: props === null || props === void 0 ? void 0 : props.placementComponent,
@@ -924,13 +924,13 @@ export class ChordAnalytics {
924
924
  return this.track('Email Captured', payload, options);
925
925
  });
926
926
  this.trackProductAdded = (props, options) => __awaiter(this, void 0, void 0, function* () {
927
- var _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31;
928
- const formatter = (_22 = (_21 = (_20 = this.options) === null || _20 === void 0 ? void 0 : _20.formatters) === null || _21 === void 0 ? void 0 : _21.events) === null || _22 === void 0 ? void 0 : _22.productAdded;
929
- const product = (_26 = (_25 = (_24 = (_23 = this.options) === null || _23 === void 0 ? void 0 : _23.formatters) === null || _24 === void 0 ? void 0 : _24.objects) === null || _25 === void 0 ? void 0 : _25.product) === null || _26 === void 0 ? void 0 : _26.call(_25, props === null || props === void 0 ? void 0 : props.product);
930
- const cart = (_30 = (_29 = (_28 = (_27 = this.options) === null || _27 === void 0 ? void 0 : _27.formatters) === null || _28 === void 0 ? void 0 : _28.objects) === null || _29 === void 0 ? void 0 : _29.cart) === null || _30 === void 0 ? void 0 : _30.call(_29, {
927
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
928
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.productAdded;
929
+ const product = (_g = (_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.formatters) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.product) === null || _g === void 0 ? void 0 : _g.call(_f, props === null || props === void 0 ? void 0 : props.product);
930
+ const cart = (_l = (_k = (_j = (_h = this.options) === null || _h === void 0 ? void 0 : _h.formatters) === null || _j === void 0 ? void 0 : _j.objects) === null || _k === void 0 ? void 0 : _k.cart) === null || _l === void 0 ? void 0 : _l.call(_k, {
931
931
  cart: props === null || props === void 0 ? void 0 : props.cart,
932
932
  });
933
- const quantity = ((_31 = props === null || props === void 0 ? void 0 : props.product) === null || _31 === void 0 ? void 0 : _31.quantity) || 1;
933
+ const quantity = ((_m = props === null || props === void 0 ? void 0 : props.product) === null || _m === void 0 ? void 0 : _m.quantity) || 1;
934
934
  const payload = Object.assign(Object.assign({}, product), { cart_id: cart.cart_id, currency: cart.currency, products: [Object.assign(Object.assign({}, product), { quantity })], total: product.price * (quantity || 1), value: product.price * (quantity || 1) });
935
935
  if (typeof formatter === 'function') {
936
936
  const formattedPayload = formatter(props, payload);
@@ -939,14 +939,14 @@ export class ChordAnalytics {
939
939
  return this.track('Product Added', payload, options);
940
940
  });
941
941
  this.trackProductClicked = (props, options) => __awaiter(this, void 0, void 0, function* () {
942
- var _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44;
943
- const formatter = (_34 = (_33 = (_32 = this.options) === null || _32 === void 0 ? void 0 : _32.formatters) === null || _33 === void 0 ? void 0 : _33.events) === null || _34 === void 0 ? void 0 : _34.productClicked;
944
- const product = (_38 = (_37 = (_36 = (_35 = this.options) === null || _35 === void 0 ? void 0 : _35.formatters) === null || _36 === void 0 ? void 0 : _36.objects) === null || _37 === void 0 ? void 0 : _37.product) === null || _38 === void 0 ? void 0 : _38.call(_37, props === null || props === void 0 ? void 0 : props.product);
945
- const cart = (_42 = (_41 = (_40 = (_39 = this.options) === null || _39 === void 0 ? void 0 : _39.formatters) === null || _40 === void 0 ? void 0 : _40.objects) === null || _41 === void 0 ? void 0 : _41.cart) === null || _42 === void 0 ? void 0 : _42.call(_41, {
942
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
943
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.productClicked;
944
+ const product = (_g = (_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.formatters) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.product) === null || _g === void 0 ? void 0 : _g.call(_f, props === null || props === void 0 ? void 0 : props.product);
945
+ const cart = (_l = (_k = (_j = (_h = this.options) === null || _h === void 0 ? void 0 : _h.formatters) === null || _j === void 0 ? void 0 : _j.objects) === null || _k === void 0 ? void 0 : _k.cart) === null || _l === void 0 ? void 0 : _l.call(_k, {
946
946
  cart: props === null || props === void 0 ? void 0 : props.cart,
947
947
  });
948
- const quantity = ((_43 = props === null || props === void 0 ? void 0 : props.product) === null || _43 === void 0 ? void 0 : _43.quantity) || 1;
949
- const payload = Object.assign(Object.assign({}, product), { cart_id: cart.cart_id, currency: cart.currency, item_list_id: (_44 = props === null || props === void 0 ? void 0 : props.listId) === null || _44 === void 0 ? void 0 : _44.toString(), item_list_name: props === null || props === void 0 ? void 0 : props.listName, products: [Object.assign(Object.assign({}, product), { quantity })] });
948
+ const quantity = ((_m = props === null || props === void 0 ? void 0 : props.product) === null || _m === void 0 ? void 0 : _m.quantity) || 1;
949
+ const payload = Object.assign(Object.assign({}, product), { cart_id: cart.cart_id, currency: cart.currency, item_list_id: (_o = props === null || props === void 0 ? void 0 : props.listId) === null || _o === void 0 ? void 0 : _o.toString(), item_list_name: props === null || props === void 0 ? void 0 : props.listName, products: [Object.assign(Object.assign({}, product), { quantity })] });
950
950
  if (typeof formatter === 'function') {
951
951
  const formattedPayload = formatter(props, payload);
952
952
  return this.track('Product Clicked', formattedPayload, options);
@@ -954,13 +954,13 @@ export class ChordAnalytics {
954
954
  return this.track('Product Clicked', payload, options);
955
955
  });
956
956
  this.trackVariantClicked = (props, options) => __awaiter(this, void 0, void 0, function* () {
957
- var _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56;
958
- const formatter = (_47 = (_46 = (_45 = this.options) === null || _45 === void 0 ? void 0 : _45.formatters) === null || _46 === void 0 ? void 0 : _46.events) === null || _47 === void 0 ? void 0 : _47.variantClicked;
959
- const product = (_51 = (_50 = (_49 = (_48 = this.options) === null || _48 === void 0 ? void 0 : _48.formatters) === null || _49 === void 0 ? void 0 : _49.objects) === null || _50 === void 0 ? void 0 : _50.product) === null || _51 === void 0 ? void 0 : _51.call(_50, props === null || props === void 0 ? void 0 : props.product);
960
- const cart = (_55 = (_54 = (_53 = (_52 = this.options) === null || _52 === void 0 ? void 0 : _52.formatters) === null || _53 === void 0 ? void 0 : _53.objects) === null || _54 === void 0 ? void 0 : _54.cart) === null || _55 === void 0 ? void 0 : _55.call(_54, {
957
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
958
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.variantClicked;
959
+ const product = (_g = (_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.formatters) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.product) === null || _g === void 0 ? void 0 : _g.call(_f, props === null || props === void 0 ? void 0 : props.product);
960
+ const cart = (_l = (_k = (_j = (_h = this.options) === null || _h === void 0 ? void 0 : _h.formatters) === null || _j === void 0 ? void 0 : _j.objects) === null || _k === void 0 ? void 0 : _k.cart) === null || _l === void 0 ? void 0 : _l.call(_k, {
961
961
  cart: props === null || props === void 0 ? void 0 : props.cart,
962
962
  });
963
- const quantity = ((_56 = props === null || props === void 0 ? void 0 : props.product) === null || _56 === void 0 ? void 0 : _56.quantity) || 1;
963
+ const quantity = ((_m = props === null || props === void 0 ? void 0 : props.product) === null || _m === void 0 ? void 0 : _m.quantity) || 1;
964
964
  const payload = Object.assign(Object.assign({}, product), { cart_id: cart.cart_id, currency: cart.currency, quantity: quantity, line_item_id: props === null || props === void 0 ? void 0 : props.lineItemId, coupon: props === null || props === void 0 ? void 0 : props.coupon });
965
965
  if (typeof formatter === 'function') {
966
966
  const formattedPayload = formatter(props, payload);
@@ -969,13 +969,13 @@ export class ChordAnalytics {
969
969
  return this.track('Variant Clicked', payload, options);
970
970
  });
971
971
  this.trackProductListFiltered = (props, options) => __awaiter(this, void 0, void 0, function* () {
972
- var _57, _58, _59, _60, _61;
973
- const formatter = (_59 = (_58 = (_57 = this.options) === null || _57 === void 0 ? void 0 : _57.formatters) === null || _58 === void 0 ? void 0 : _58.events) === null || _59 === void 0 ? void 0 : _59.productListFiltered;
972
+ var _a, _b, _c, _d, _e;
973
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.productListFiltered;
974
974
  const payload = {
975
975
  category: props === null || props === void 0 ? void 0 : props.category,
976
976
  filters: props === null || props === void 0 ? void 0 : props.filters,
977
- list_id: (_60 = props === null || props === void 0 ? void 0 : props.listId) === null || _60 === void 0 ? void 0 : _60.toString(),
978
- item_list_id: (_61 = props === null || props === void 0 ? void 0 : props.listId) === null || _61 === void 0 ? void 0 : _61.toString(),
977
+ list_id: (_d = props === null || props === void 0 ? void 0 : props.listId) === null || _d === void 0 ? void 0 : _d.toString(),
978
+ item_list_id: (_e = props === null || props === void 0 ? void 0 : props.listId) === null || _e === void 0 ? void 0 : _e.toString(),
979
979
  item_list_name: props === null || props === void 0 ? void 0 : props.listName,
980
980
  sorts: props === null || props === void 0 ? void 0 : props.sorts,
981
981
  };
@@ -986,14 +986,14 @@ export class ChordAnalytics {
986
986
  return this.track('Product List Filtered', payload, options);
987
987
  });
988
988
  this.trackProductListViewed = (props, options) => __awaiter(this, void 0, void 0, function* () {
989
- var _62, _63, _64, _65, _66, _67;
990
- const formatter = (_64 = (_63 = (_62 = this.options) === null || _62 === void 0 ? void 0 : _62.formatters) === null || _63 === void 0 ? void 0 : _63.events) === null || _64 === void 0 ? void 0 : _64.productListViewed;
989
+ var _a, _b, _c, _d, _e, _f;
990
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.productListViewed;
991
991
  const payload = {
992
992
  category: props === null || props === void 0 ? void 0 : props.category,
993
- list_id: (_65 = props === null || props === void 0 ? void 0 : props.listId) === null || _65 === void 0 ? void 0 : _65.toString(),
994
- item_list_id: (_66 = props === null || props === void 0 ? void 0 : props.listId) === null || _66 === void 0 ? void 0 : _66.toString(),
993
+ list_id: (_d = props === null || props === void 0 ? void 0 : props.listId) === null || _d === void 0 ? void 0 : _d.toString(),
994
+ item_list_id: (_e = props === null || props === void 0 ? void 0 : props.listId) === null || _e === void 0 ? void 0 : _e.toString(),
995
995
  item_list_name: props === null || props === void 0 ? void 0 : props.listName,
996
- products: (_67 = props === null || props === void 0 ? void 0 : props.products) === null || _67 === void 0 ? void 0 : _67.map((p, i) => {
996
+ products: (_f = props === null || props === void 0 ? void 0 : props.products) === null || _f === void 0 ? void 0 : _f.map((p, i) => {
997
997
  var _a, _b, _c, _d;
998
998
  return (_d = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.call(_c, Object.assign(Object.assign({}, p), { position: i + 1 }));
999
999
  }),
@@ -1006,8 +1006,8 @@ export class ChordAnalytics {
1006
1006
  return this.track('Product List Viewed', payload, options);
1007
1007
  });
1008
1008
  this.trackProductRemoved = (props, options) => __awaiter(this, void 0, void 0, function* () {
1009
- var _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82;
1010
- const formatter = (_70 = (_69 = (_68 = this.options) === null || _68 === void 0 ? void 0 : _68.formatters) === null || _69 === void 0 ? void 0 : _69.events) === null || _70 === void 0 ? void 0 : _70.productRemoved;
1009
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1010
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.productRemoved;
1011
1011
  /*
1012
1012
  const product = this.options?.formatters?.objects?.product?.({
1013
1013
  position: props?.position,
@@ -1016,13 +1016,13 @@ export class ChordAnalytics {
1016
1016
  variantId: props?.variantId,
1017
1017
  })
1018
1018
  */
1019
- const lineItem = (_74 = (_73 = (_72 = (_71 = this.options) === null || _71 === void 0 ? void 0 : _71.formatters) === null || _72 === void 0 ? void 0 : _72.objects) === null || _73 === void 0 ? void 0 : _73.lineItem) === null || _74 === void 0 ? void 0 : _74.call(_73, {
1019
+ const lineItem = (_g = (_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.formatters) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.lineItem) === null || _g === void 0 ? void 0 : _g.call(_f, {
1020
1020
  lineItem: props === null || props === void 0 ? void 0 : props.lineItem,
1021
1021
  });
1022
- const cart = (_78 = (_77 = (_76 = (_75 = this.options) === null || _75 === void 0 ? void 0 : _75.formatters) === null || _76 === void 0 ? void 0 : _76.objects) === null || _77 === void 0 ? void 0 : _77.cart) === null || _78 === void 0 ? void 0 : _78.call(_77, {
1022
+ const cart = (_l = (_k = (_j = (_h = this.options) === null || _h === void 0 ? void 0 : _h.formatters) === null || _j === void 0 ? void 0 : _j.objects) === null || _k === void 0 ? void 0 : _k.cart) === null || _l === void 0 ? void 0 : _l.call(_k, {
1023
1023
  cart: props === null || props === void 0 ? void 0 : props.cart,
1024
1024
  });
1025
- const payload = Object.assign(Object.assign({}, lineItem), { cart_id: cart.cart_id, currency: cart.currency, products: [lineItem], total: ((_79 = lineItem === null || lineItem === void 0 ? void 0 : lineItem.price) !== null && _79 !== void 0 ? _79 : 0) * ((_80 = lineItem === null || lineItem === void 0 ? void 0 : lineItem.quantity) !== null && _80 !== void 0 ? _80 : 1), value: ((_81 = lineItem === null || lineItem === void 0 ? void 0 : lineItem.price) !== null && _81 !== void 0 ? _81 : 0) * ((_82 = lineItem === null || lineItem === void 0 ? void 0 : lineItem.quantity) !== null && _82 !== void 0 ? _82 : 1) });
1025
+ const payload = Object.assign(Object.assign({}, lineItem), { cart_id: cart.cart_id, currency: cart.currency, products: [lineItem], total: ((_m = lineItem === null || lineItem === void 0 ? void 0 : lineItem.price) !== null && _m !== void 0 ? _m : 0) * ((_o = lineItem === null || lineItem === void 0 ? void 0 : lineItem.quantity) !== null && _o !== void 0 ? _o : 1), value: ((_p = lineItem === null || lineItem === void 0 ? void 0 : lineItem.price) !== null && _p !== void 0 ? _p : 0) * ((_q = lineItem === null || lineItem === void 0 ? void 0 : lineItem.quantity) !== null && _q !== void 0 ? _q : 1) });
1026
1026
  if (typeof formatter === 'function') {
1027
1027
  const formattedPayload = formatter(props, payload);
1028
1028
  return this.track('Product Removed', formattedPayload, options);
@@ -1030,14 +1030,14 @@ export class ChordAnalytics {
1030
1030
  return this.track('Product Removed', payload, options);
1031
1031
  });
1032
1032
  this.trackProductViewed = (props, options) => __awaiter(this, void 0, void 0, function* () {
1033
- var _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95;
1034
- const formatter = (_85 = (_84 = (_83 = this.options) === null || _83 === void 0 ? void 0 : _83.formatters) === null || _84 === void 0 ? void 0 : _84.events) === null || _85 === void 0 ? void 0 : _85.productViewed;
1035
- const product = (_89 = (_88 = (_87 = (_86 = this.options) === null || _86 === void 0 ? void 0 : _86.formatters) === null || _87 === void 0 ? void 0 : _87.objects) === null || _88 === void 0 ? void 0 : _88.product) === null || _89 === void 0 ? void 0 : _89.call(_88, props === null || props === void 0 ? void 0 : props.product);
1036
- const cart = (_93 = (_92 = (_91 = (_90 = this.options) === null || _90 === void 0 ? void 0 : _90.formatters) === null || _91 === void 0 ? void 0 : _91.objects) === null || _92 === void 0 ? void 0 : _92.cart) === null || _93 === void 0 ? void 0 : _93.call(_92, {
1033
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1034
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.productViewed;
1035
+ const product = (_g = (_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.formatters) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.product) === null || _g === void 0 ? void 0 : _g.call(_f, props === null || props === void 0 ? void 0 : props.product);
1036
+ const cart = (_l = (_k = (_j = (_h = this.options) === null || _h === void 0 ? void 0 : _h.formatters) === null || _j === void 0 ? void 0 : _j.objects) === null || _k === void 0 ? void 0 : _k.cart) === null || _l === void 0 ? void 0 : _l.call(_k, {
1037
1037
  cart: props === null || props === void 0 ? void 0 : props.cart,
1038
1038
  });
1039
- const quantity = ((_94 = props === null || props === void 0 ? void 0 : props.product) === null || _94 === void 0 ? void 0 : _94.quantity) || 1;
1040
- const payload = Object.assign(Object.assign({}, product), { cart_id: cart.cart_id, currency: cart.currency, products: [Object.assign(Object.assign({}, product), { quantity })], value: product.price * (((_95 = props === null || props === void 0 ? void 0 : props.product) === null || _95 === void 0 ? void 0 : _95.quantity) || 1) });
1039
+ const quantity = ((_m = props === null || props === void 0 ? void 0 : props.product) === null || _m === void 0 ? void 0 : _m.quantity) || 1;
1040
+ const payload = Object.assign(Object.assign({}, product), { cart_id: cart.cart_id, currency: cart.currency, products: [Object.assign(Object.assign({}, product), { quantity })], value: product.price * (((_o = props === null || props === void 0 ? void 0 : props.product) === null || _o === void 0 ? void 0 : _o.quantity) || 1) });
1041
1041
  if (typeof formatter === 'function') {
1042
1042
  const formattedPayload = formatter(props, payload);
1043
1043
  return this.track('Product Viewed', formattedPayload, options);
@@ -1045,12 +1045,12 @@ export class ChordAnalytics {
1045
1045
  return this.track('Product Viewed', payload, options);
1046
1046
  });
1047
1047
  this.trackProductsSearched = (props, options) => __awaiter(this, void 0, void 0, function* () {
1048
- var _96, _97, _98, _99;
1049
- const formatter = (_98 = (_97 = (_96 = this.options) === null || _96 === void 0 ? void 0 : _96.formatters) === null || _97 === void 0 ? void 0 : _97.events) === null || _98 === void 0 ? void 0 : _98.productsSearched;
1048
+ var _a, _b, _c, _d;
1049
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.productsSearched;
1050
1050
  const payload = {
1051
1051
  currency: props === null || props === void 0 ? void 0 : props.currency,
1052
1052
  price: typeof (props === null || props === void 0 ? void 0 : props.price) !== 'undefined' ? Number(props === null || props === void 0 ? void 0 : props.price) : undefined,
1053
- product_id: (_99 = props === null || props === void 0 ? void 0 : props.productId) === null || _99 === void 0 ? void 0 : _99.toString(),
1053
+ product_id: (_d = props === null || props === void 0 ? void 0 : props.productId) === null || _d === void 0 ? void 0 : _d.toString(),
1054
1054
  quantity: props === null || props === void 0 ? void 0 : props.quantity,
1055
1055
  query: props === null || props === void 0 ? void 0 : props.query,
1056
1056
  };
@@ -1061,8 +1061,8 @@ export class ChordAnalytics {
1061
1061
  return this.track('Products Searched', payload, options);
1062
1062
  });
1063
1063
  this.trackSignedIn = (props, options) => __awaiter(this, void 0, void 0, function* () {
1064
- var _100, _101, _102;
1065
- const formatter = (_102 = (_101 = (_100 = this.options) === null || _100 === void 0 ? void 0 : _100.formatters) === null || _101 === void 0 ? void 0 : _101.events) === null || _102 === void 0 ? void 0 : _102.signedIn;
1064
+ var _a, _b, _c;
1065
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.signedIn;
1066
1066
  const payload = {
1067
1067
  email: props === null || props === void 0 ? void 0 : props.email,
1068
1068
  method: props === null || props === void 0 ? void 0 : props.method,
@@ -1074,8 +1074,8 @@ export class ChordAnalytics {
1074
1074
  return this.track('Signed In', payload, options);
1075
1075
  });
1076
1076
  this.trackSignedOut = (props, options) => __awaiter(this, void 0, void 0, function* () {
1077
- var _103, _104, _105;
1078
- const formatter = (_105 = (_104 = (_103 = this.options) === null || _103 === void 0 ? void 0 : _103.formatters) === null || _104 === void 0 ? void 0 : _104.events) === null || _105 === void 0 ? void 0 : _105.signedOut;
1077
+ var _a, _b, _c;
1078
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.signedOut;
1079
1079
  const payload = {
1080
1080
  email: props === null || props === void 0 ? void 0 : props.email,
1081
1081
  };
@@ -1086,8 +1086,8 @@ export class ChordAnalytics {
1086
1086
  return this.track('Signed Out', payload, options);
1087
1087
  });
1088
1088
  this.trackSignedUp = (props, options) => __awaiter(this, void 0, void 0, function* () {
1089
- var _106, _107, _108;
1090
- const formatter = (_108 = (_107 = (_106 = this.options) === null || _106 === void 0 ? void 0 : _106.formatters) === null || _107 === void 0 ? void 0 : _107.events) === null || _108 === void 0 ? void 0 : _108.signedUp;
1089
+ var _a, _b, _c;
1090
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.signedUp;
1091
1091
  const payload = {
1092
1092
  email: props === null || props === void 0 ? void 0 : props.email,
1093
1093
  method: props === null || props === void 0 ? void 0 : props.method,
@@ -1099,8 +1099,8 @@ export class ChordAnalytics {
1099
1099
  return this.track('Signed Up', payload, options);
1100
1100
  });
1101
1101
  this.trackLoginStarted = (props, options) => __awaiter(this, void 0, void 0, function* () {
1102
- var _109, _110, _111;
1103
- const formatter = (_111 = (_110 = (_109 = this.options) === null || _109 === void 0 ? void 0 : _109.formatters) === null || _110 === void 0 ? void 0 : _110.events) === null || _111 === void 0 ? void 0 : _111.loginStarted;
1102
+ var _a, _b, _c;
1103
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.loginStarted;
1104
1104
  const payload = {
1105
1105
  email: props === null || props === void 0 ? void 0 : props.email,
1106
1106
  };
@@ -1111,8 +1111,8 @@ export class ChordAnalytics {
1111
1111
  return this.track('Login Started', payload, options);
1112
1112
  });
1113
1113
  this.trackSubscriptionCancelled = (props, options) => __awaiter(this, void 0, void 0, function* () {
1114
- var _112, _113, _114, _115;
1115
- const formatter = (_114 = (_113 = (_112 = this.options) === null || _112 === void 0 ? void 0 : _112.formatters) === null || _113 === void 0 ? void 0 : _113.events) === null || _114 === void 0 ? void 0 : _114.subscriptionCancelled;
1114
+ var _a, _b, _c, _d;
1115
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.subscriptionCancelled;
1116
1116
  const payload = {
1117
1117
  actionable_date: props === null || props === void 0 ? void 0 : props.actionableDate,
1118
1118
  address: props === null || props === void 0 ? void 0 : props.address,
@@ -1121,7 +1121,7 @@ export class ChordAnalytics {
1121
1121
  end_date: props === null || props === void 0 ? void 0 : props.endDate,
1122
1122
  interval_length: props === null || props === void 0 ? void 0 : props.intervalLength,
1123
1123
  interval_units: props === null || props === void 0 ? void 0 : props.intervalUnits,
1124
- products: (_115 = props === null || props === void 0 ? void 0 : props.products) === null || _115 === void 0 ? void 0 : _115.map((p, i) => {
1124
+ products: (_d = props === null || props === void 0 ? void 0 : props.products) === null || _d === void 0 ? void 0 : _d.map((p, i) => {
1125
1125
  var _a, _b, _c, _d;
1126
1126
  return (_d = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.call(_c, Object.assign(Object.assign({}, p), { position: i + 1 }));
1127
1127
  }),
@@ -1136,8 +1136,8 @@ export class ChordAnalytics {
1136
1136
  return this.track('Subscription Cancelled', payload, options);
1137
1137
  });
1138
1138
  this.trackNavigationClicked = (props, options) => __awaiter(this, void 0, void 0, function* () {
1139
- var _116, _117, _118;
1140
- const formatter = (_118 = (_117 = (_116 = this.options) === null || _116 === void 0 ? void 0 : _116.formatters) === null || _117 === void 0 ? void 0 : _117.events) === null || _118 === void 0 ? void 0 : _118.navigationClicked;
1139
+ var _a, _b, _c;
1140
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.navigationClicked;
1141
1141
  const payload = {
1142
1142
  category: props === null || props === void 0 ? void 0 : props.category,
1143
1143
  label: props === null || props === void 0 ? void 0 : props.label,
@@ -1152,15 +1152,15 @@ export class ChordAnalytics {
1152
1152
  return this.track('Navigation Clicked', payload, options);
1153
1153
  });
1154
1154
  this.trackPaymentInfoEntered = (props, options) => __awaiter(this, void 0, void 0, function* () {
1155
- var _119, _120, _121, _122;
1156
- const formatter = (_121 = (_120 = (_119 = this.options) === null || _119 === void 0 ? void 0 : _119.formatters) === null || _120 === void 0 ? void 0 : _120.events) === null || _121 === void 0 ? void 0 : _121.paymentInfoEntered;
1155
+ var _a, _b, _c, _d;
1156
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.paymentInfoEntered;
1157
1157
  const payload = {
1158
1158
  checkout_id: props === null || props === void 0 ? void 0 : props.checkoutId,
1159
1159
  coupon: props === null || props === void 0 ? void 0 : props.coupon,
1160
1160
  currency: props === null || props === void 0 ? void 0 : props.currency,
1161
1161
  order_id: props === null || props === void 0 ? void 0 : props.orderId,
1162
1162
  payment_method: props === null || props === void 0 ? void 0 : props.paymentMethod,
1163
- products: (_122 = props === null || props === void 0 ? void 0 : props.products) === null || _122 === void 0 ? void 0 : _122.map((p, i) => {
1163
+ products: (_d = props === null || props === void 0 ? void 0 : props.products) === null || _d === void 0 ? void 0 : _d.map((p, i) => {
1164
1164
  var _a, _b, _c, _d;
1165
1165
  return (_d = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.call(_c, Object.assign(Object.assign({}, p), { position: i + 1 }));
1166
1166
  }),
@@ -1175,8 +1175,8 @@ export class ChordAnalytics {
1175
1175
  return this.track('Payment Info Entered', payload, options);
1176
1176
  });
1177
1177
  this.trackOrderCompleted = (props, options) => __awaiter(this, void 0, void 0, function* () {
1178
- var _123, _124, _125, _126;
1179
- const formatter = (_125 = (_124 = (_123 = this.options) === null || _123 === void 0 ? void 0 : _123.formatters) === null || _124 === void 0 ? void 0 : _124.events) === null || _125 === void 0 ? void 0 : _125.orderCompleted;
1178
+ var _a, _b, _c, _d;
1179
+ const formatter = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.formatters) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.orderCompleted;
1180
1180
  const payload = {
1181
1181
  affiliation: props === null || props === void 0 ? void 0 : props.affiliation,
1182
1182
  campaign_id: props === null || props === void 0 ? void 0 : props.campaignId,
@@ -1196,7 +1196,7 @@ export class ChordAnalytics {
1196
1196
  order_date: props === null || props === void 0 ? void 0 : props.orderDate,
1197
1197
  order_id: props === null || props === void 0 ? void 0 : props.orderId,
1198
1198
  phone: props === null || props === void 0 ? void 0 : props.phone,
1199
- products: (_126 = props === null || props === void 0 ? void 0 : props.products) === null || _126 === void 0 ? void 0 : _126.map((p, i) => {
1199
+ products: (_d = props === null || props === void 0 ? void 0 : props.products) === null || _d === void 0 ? void 0 : _d.map((p, i) => {
1200
1200
  var _a;
1201
1201
  return ({
1202
1202
  affiliation: p === null || p === void 0 ? void 0 : p.affiliation,
@@ -0,0 +1 @@
1
+ {"root":["../src/index.ts","../src/setupTests.ts","../src/utils.ts","../src/client/cdp.ts","../src/client/index.ts","../src/client/utils.ts","../src/client/consent/cookiebot.ts","../src/client/consent/index.ts","../src/client/consent/ketch.ts","../src/client/consent/onetrust-api.ts","../src/client/consent/onetrust.ts","../src/client/consent/persistence.ts","../src/client/consent/segment.ts","../src/client/consent/shopify.ts","../src/types/client.ts","../src/types/consent.ts","../src/types/formatters.ts","../src/types/index.ts","../src/types/input.ts","../src/types/objects.ts","../src/types/typewriter.ts","../src/validators/custom.ts","../src/validators/index.ts","../src/validators/objects.ts","../src/validators/tracking-plan-map.ts","../src/validators/tracking-plan.ts"],"version":"5.9.3"}
package/dist/utils.d.ts CHANGED
@@ -27,4 +27,4 @@ export declare const isPromise: (value: unknown) => value is Promise<unknown>;
27
27
  * The timer is cleared either way, so a promise that settles quickly does not
28
28
  * leave a pending timeout behind.
29
29
  */
30
- export declare const withTimeout: <T>(promise: Promise<T>, ms: number) => Promise<typeof TIMED_OUT | T>;
30
+ export declare const withTimeout: <T>(promise: Promise<T>, ms: number) => Promise<T | typeof TIMED_OUT>;
@@ -1,43 +1,9 @@
1
- import { z } from 'zod';
2
- export declare const productInProductsSchema: z.ZodEffects<z.ZodObject<{
1
+ import * as z from 'zod';
2
+ export declare const productInProductsSchema: z.ZodObject<{
3
3
  product_id: z.ZodString;
4
4
  sku: z.ZodString;
5
5
  products: z.ZodArray<z.ZodObject<{
6
6
  product_id: z.ZodString;
7
7
  sku: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- product_id?: string;
10
- sku?: string;
11
- }, {
12
- product_id?: string;
13
- sku?: string;
14
- }>, "many">;
15
- }, "strip", z.ZodTypeAny, {
16
- product_id?: string;
17
- sku?: string;
18
- products?: {
19
- product_id?: string;
20
- sku?: string;
21
- }[];
22
- }, {
23
- product_id?: string;
24
- sku?: string;
25
- products?: {
26
- product_id?: string;
27
- sku?: string;
28
- }[];
29
- }>, {
30
- product_id?: string;
31
- sku?: string;
32
- products?: {
33
- product_id?: string;
34
- sku?: string;
35
- }[];
36
- }, {
37
- product_id?: string;
38
- sku?: string;
39
- products?: {
40
- product_id?: string;
41
- sku?: string;
42
- }[];
43
- }>;
8
+ }, z.core.$strip>>;
9
+ }, z.core.$strip>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  export const productInProductsSchema = z
3
3
  .object({
4
4
  product_id: z.string(),