@depict-ai/dpc 0.0.7 → 0.0.9

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.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.0.7";
1
+ export const version = "0.0.9";
2
2
  /**
3
3
  * The Depict Queue function used to register events to be sent to depict.
4
4
  */
@@ -63,6 +63,8 @@ export class DPC {
63
63
  latest_product_id?: string;
64
64
  /** The value of location.pathname when latest_product_id was set */
65
65
  latest_product_id_path?: string;
66
+ /** Latest session_id set on the client. Used for all events. */
67
+ latest_session_id?: string;
66
68
  /** Latest user_id found in the DOM. Used for all events. */
67
69
  latest_user_id?: string;
68
70
  constructor(merchant: string, options?: Options);
@@ -113,6 +115,12 @@ export class DPC {
113
115
  * https://docs.depict.ai/docs/performance-client#informing-depict-of-logged-in-users
114
116
  */
115
117
  setUserId(user_id: string): void;
118
+ /**
119
+ * Set the current session_id.
120
+ *
121
+ * https://docs.depict.ai/docs/performance-client#browser-sessions
122
+ */
123
+ setSessionId(session_id: string): void;
116
124
  /**
117
125
  * Observe the dom for recommendations to track
118
126
  */
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var e=require("@depict-ai/utilishared");function t(e,t,r,i){Object.defineProperty(e,t,{get:r,set:i,enumerable:!0,configurable:!0})}t(module.exports,"DPC",(()=>v)),t(module.exports,"version",(()=>r));
1
+ var e=require("@depict-ai/utilishared");function t(e,t,r,i){Object.defineProperty(e,t,{get:r,set:i,enumerable:!0,configurable:!0})}t(module.exports,"DPC",(()=>l)),t(module.exports,"version",(()=>r));
2
2
  /*! Depict PerformanceClient */
3
- const r="0.0.7",i=".depict-add-to-cart",n="[data-recommendation_id],[data-recommendation-id]";const o=(e,t)=>{if("string"!=typeof t)throw new Error(`${e} event requires a string as an argument`)},s=(e,t)=>{const r=window.depict.dpc;if("purchase"===e){if(!(e=>{if("object"!=typeof e||null===e)throw new Error("purchase event requires an object as an argument");if(!Array.isArray(e.items))throw new Error("purchase event requires an items array of purchased products");if(!e.currency||"string"!=typeof e.currency)throw new Error("purchase event requires a currency string");if(!e.transaction_id||"string"!=typeof e.transaction_id)throw new Error("purchase event requires a transaction_id string");for(const t of e.items){if(!t.item_id||"string"!=typeof t.item_id)throw new Error("purchased item requires an item_id of the purchased product");if(isNaN(t.price))throw new Error("purchase item requires a unit price for the product purchased");if(!t.quantity||isNaN(t.quantity))throw new Error("purchase item requires a quantity of products purchased")}return!0})(t))return;r.sendPurchaseEvent(t)}else"setMarket"===e?(o(e,t),r.setMarket(t)):"setProductId"===e?(o(e,t),r.setProductId(t)):"setUserId"===e&&(o(e,t),r.setUserId(t))},d=e=>{const t=window.dpq||=function(){const e=function(){const t=arguments;e.send_event?e.send_event.apply(this,t):e.queue.push(t)};return e.queue=[],e}(),r=window.depict||={};r.dpq=t,r.eventHistory=t.queue,r.dpc=e,t.send_event||(t.send_event=(e,r)=>{t.queue.push([e,r]),s(e,r)},t.queue.forEach((([e,t])=>{s(e,t)})))};function a(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var c=0;function u(e){return"__private_"+c+++"_"+e}var h=u("parseOptions"),p=u("getContextData"),m=u("sendTrackingEvent"),_=u("getProductId");class v{constructor(t,r){if(Object.defineProperty(this,_,{value:y}),Object.defineProperty(this,m,{value:k}),Object.defineProperty(this,p,{value:f}),Object.defineProperty(this,h,{value:l}),this.merchant=void 0,this.auto_observe=!0,this.market=void 0,this.latest_product_id=void 0,this.latest_product_id_path=void 0,this.latest_user_id=void 0,this.tracked_elements=new WeakSet,window.depict?.dpc instanceof v)return(0,e.dlog)("DPC already initialized. Returning existing instance."),window.depict.dpc;d(this),this.merchant=t,a(this,h)[h](r),this.auto_observe&&(this.observeRecommendations(),this.observePDPA2CButton())}trackRecommendationCard(t){const r=t.dataset.recommendation_id;if(!r)return void(0,e.derror)("No recommendation_id found on card. Can't add tracking.",t);if(this.checkIfTracked(t))return;t.addEventListener("click",(()=>this.sendRecommendationClickEvent({recommendation_id:r}))),(0,e.impression_track_element)({element:t,data:{recommendation_id:r,...a(this,p)[p]()}});const n=t.querySelector(i);n&&this.trackAddToCartButton(n)}checkIfTracked(t){return this.tracked_elements.has(t)?((0,e.dlog)("Already tracked",t),!0):(this.tracked_elements.add(t),!1)}trackAddToCartButton(e){this.checkIfTracked(e)||e.addEventListener("click",(()=>{const t=e.closest(n)?.dataset.recommendation_id,r=a(this,_)[_]();this.sendAddToCartEvent({product_id:r,recommendation_id:t})}))}sendAddToCartEvent(e){a(this,m)[m]({type:"add_to_cart",...e})}sendRecommendationImpressionEvent({recommendation_id:e}){a(this,m)[m]({type:"element_visible",recommendation_id:e})}sendRecommendationClickEvent({recommendation_id:t}){(0,e.depict_click)({recommendation_id:t,...a(this,p)[p]()})}sendPurchaseEvent(t){if(!this.market)throw Error("Market not set");const{dsid:r,user_id:i,session_id:n}=a(this,p)[p](),o=t.items.map((e=>({sku:e.item_id,price:e.price,quantity:e.quantity}))),s={events:[{event_type:"purchase",dsid:r,user_id:i,session_id:n,transaction_id:t.transaction_id,currency:t.currency,products:o}],tenant:this.merchant,market:this.market};(0,e.foolproof_send_beacon)("https://api.depict.ai/v2/create-events",s)}setMarket(e){this.market=e}setProductId(t){(0,e.dlog)("Setting product id",t),this.latest_product_id=t,this.latest_product_id_path=location.pathname}setUserId(t){(0,e.dlog)("Setting user id",t),this.latest_user_id=t}observeRecommendations(){(0,e.dlog)("Starting to observe recommendations with selector",n),e.observer.onexists(n,(({element:t})=>{(0,e.dlog)("found recommendation",t),this.trackRecommendationCard(t)}))}observePDPA2CButton(){e.observer.onexists(i,(({element:t})=>{(0,e.dlog)("Found pdp add-to-cart button",t),this.trackAddToCartButton(t)}))}}function l(e){void 0!==e&&(void 0!==e.auto_observe&&(this.auto_observe=e.auto_observe),void 0!==e.market&&(this.market=e.market))}function f(){const t={market:this.market,tenant:this.merchant,user_id:this.latest_user_id};return{...(0,e.get_tracking_event_context_data)(),...t}}function k(t){(0,e.send_depict_unfiltered)([{...t,...a(this,p)[p]()}],!0)}function y(){if(this.latest_product_id_path===location.pathname)return this.latest_product_id}(0,e.add_to_version_info)("dpc",r);
3
+ const r="0.0.9",i=".depict-add-to-cart",n="[data-recommendation_id],[data-recommendation-id]";const s=(e,t)=>{if("string"!=typeof t)throw new Error(`${e} event requires a string as an argument`)},o=(e,t)=>{const r=window.depict.dpc;if("purchase"===e){if(!(e=>{if("object"!=typeof e||null===e)throw new Error("purchase event requires an object as an argument");if(!Array.isArray(e.items))throw new Error("purchase event requires an items array of purchased products");if(!e.currency||"string"!=typeof e.currency)throw new Error("purchase event requires a currency string");if(!e.transaction_id||"string"!=typeof e.transaction_id)throw new Error("purchase event requires a transaction_id string");for(const t of e.items){if(!t.item_id||"string"!=typeof t.item_id)throw new Error("purchased item requires an item_id of the purchased product");if(isNaN(t.price))throw new Error("purchase item requires a unit price for the product purchased");if(!t.quantity||isNaN(t.quantity))throw new Error("purchase item requires a quantity of products purchased")}return!0})(t))return;r.sendPurchaseEvent(t)}else"setMarket"===e?(s(e,t),r.setMarket(t)):"setProductId"===e?(s(e,t),r.setProductId(t)):"setUserId"===e?(s(e,t),r.setUserId(t)):"setSessionId"===e&&(s(e,t),r.setSessionId(t))},d=e=>{const t=window.dpq||=function(){const e=function(){const t=arguments;e.send_event?e.send_event.apply(this,t):e.queue.push(t)};return e.queue=[],e}(),r=window.depict||={};r.dpq=t,r.eventHistory=t.queue,r.dpc=e,t.send_event||(t.send_event=(e,r)=>{t.queue.push([e,r]),o(e,r)},t.queue.forEach((([e,t])=>{o(e,t)})))};function a(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var c=0;function u(e){return"__private_"+c+++"_"+e}var h=u("parseOptions"),m=u("getContextData"),_=u("sendTrackingEvent"),p=u("getProductId");class l{constructor(t,r){if(Object.defineProperty(this,p,{value:y}),Object.defineProperty(this,_,{value:k}),Object.defineProperty(this,m,{value:f}),Object.defineProperty(this,h,{value:v}),this.merchant=void 0,this.auto_observe=!0,this.market=void 0,this.latest_product_id=void 0,this.latest_product_id_path=void 0,this.latest_session_id=void 0,this.latest_user_id=void 0,this.tracked_elements=new WeakSet,window.depict?.dpc instanceof l)return(0,e.dlog)("DPC already initialized. Returning existing instance."),window.depict.dpc;d(this),this.merchant=t,a(this,h)[h](r),this.auto_observe&&(this.observeRecommendations(),this.observePDPA2CButton())}trackRecommendationCard(t){const r=t.dataset.recommendation_id||t.dataset.recommendationId;if(!r)return void(0,e.derror)("No recommendation_id found on card. Can't add tracking.",t);if(this.checkIfTracked(t))return;t.addEventListener("click",(()=>this.sendRecommendationClickEvent({recommendation_id:r}))),(0,e.impression_track_element)({element:t,data:{recommendation_id:r,...a(this,m)[m]()}});const n=t.querySelector(i);n&&this.trackAddToCartButton(n)}checkIfTracked(t){return this.tracked_elements.has(t)?((0,e.dlog)("Already tracked",t),!0):(this.tracked_elements.add(t),!1)}trackAddToCartButton(e){this.checkIfTracked(e)||e.addEventListener("click",(()=>{const t=e.closest(n),r=t?.dataset.recommendation_id||t?.dataset.recommendationId,i=a(this,p)[p]();this.sendAddToCartEvent({product_id:i,recommendation_id:r})}))}sendAddToCartEvent(e){a(this,_)[_]({type:"add_to_cart",...e})}sendRecommendationImpressionEvent({recommendation_id:e}){a(this,_)[_]({type:"element_visible",recommendation_id:e})}sendRecommendationClickEvent({recommendation_id:t}){(0,e.depict_click)({recommendation_id:t,...a(this,m)[m]()})}sendPurchaseEvent(t){if(!this.market)throw Error("Market not set");const{dsid:r,user_id:i,session_id:n}=a(this,m)[m](),s=t.items.map((e=>({sku:e.item_id,price:e.price,quantity:e.quantity}))),o={events:[{event_type:"purchase",dsid:r,user_id:i,session_id:n,transaction_id:t.transaction_id,currency:t.currency,products:s}],tenant:this.merchant,market:this.market};(0,e.foolproof_send_beacon)("https://api.depict.ai/v2/create-events",o)}setMarket(e){this.market=e}setProductId(t){(0,e.dlog)("Setting product id",t),this.latest_product_id=t,this.latest_product_id_path=location.pathname}setUserId(t){(0,e.dlog)("Setting user id",t),this.latest_user_id=t}setSessionId(t){(0,e.dlog)("Setting session id",t),this.latest_session_id=t}observeRecommendations(){(0,e.dlog)("Starting to observe recommendations with selector",n),e.observer.onexists(n,(({element:t})=>{(0,e.dlog)("found recommendation",t),this.trackRecommendationCard(t)}))}observePDPA2CButton(){e.observer.onexists(i,(({element:t})=>{(0,e.dlog)("Found pdp add-to-cart button",t),this.trackAddToCartButton(t)}))}}function v(e){void 0!==e&&(void 0!==e.auto_observe&&(this.auto_observe=e.auto_observe),void 0!==e.market&&(this.market=e.market))}function f(){const t={market:this.market,tenant:this.merchant,user_id:this.latest_user_id,session_id:this.latest_session_id};return{...(0,e.get_tracking_event_context_data)(),...t}}function k(t){(0,e.send_depict_unfiltered)([{...t,...a(this,m)[m]()}],!0)}function y(){if(this.latest_product_id_path===location.pathname)return this.latest_product_id}(0,e.add_to_version_info)("dpc",r);
4
4
  //# sourceMappingURL=main.js.map
package/dist/module.js CHANGED
@@ -1,3 +1,3 @@
1
- import{add_to_version_info as t,dlog as e,derror as r,impression_track_element as i,depict_click as n,foolproof_send_beacon as s,observer as o,get_tracking_event_context_data as a,send_depict_unfiltered as d}from"@depict-ai/utilishared";
2
- /*! Depict PerformanceClient */const c="0.0.7",u=".depict-add-to-cart",h="[data-recommendation_id],[data-recommendation-id]";const p=(t,e)=>{if("string"!=typeof e)throw new Error(`${t} event requires a string as an argument`)},m=(t,e)=>{const r=window.depict.dpc;if("purchase"===t){if(!(t=>{if("object"!=typeof t||null===t)throw new Error("purchase event requires an object as an argument");if(!Array.isArray(t.items))throw new Error("purchase event requires an items array of purchased products");if(!t.currency||"string"!=typeof t.currency)throw new Error("purchase event requires a currency string");if(!t.transaction_id||"string"!=typeof t.transaction_id)throw new Error("purchase event requires a transaction_id string");for(const e of t.items){if(!e.item_id||"string"!=typeof e.item_id)throw new Error("purchased item requires an item_id of the purchased product");if(isNaN(e.price))throw new Error("purchase item requires a unit price for the product purchased");if(!e.quantity||isNaN(e.quantity))throw new Error("purchase item requires a quantity of products purchased")}return!0})(e))return;r.sendPurchaseEvent(e)}else"setMarket"===t?(p(t,e),r.setMarket(e)):"setProductId"===t?(p(t,e),r.setProductId(e)):"setUserId"===t&&(p(t,e),r.setUserId(e))},_=t=>{const e=window.dpq||=function(){const t=function(){const e=arguments;t.send_event?t.send_event.apply(this,e):t.queue.push(e)};return t.queue=[],t}(),r=window.depict||={};r.dpq=e,r.eventHistory=e.queue,r.dpc=t,e.send_event||(e.send_event=(t,r)=>{e.queue.push([t,r]),m(t,r)},e.queue.forEach((([t,e])=>{m(t,e)})))};function v(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var f=0;function l(t){return"__private_"+f+++"_"+t}var k=l("parseOptions"),y=l("getContextData"),w=l("sendTrackingEvent"),b=l("getProductId");class g{constructor(t,r){if(Object.defineProperty(this,b,{value:C}),Object.defineProperty(this,w,{value:P}),Object.defineProperty(this,y,{value:E}),Object.defineProperty(this,k,{value:q}),this.merchant=void 0,this.auto_observe=!0,this.market=void 0,this.latest_product_id=void 0,this.latest_product_id_path=void 0,this.latest_user_id=void 0,this.tracked_elements=new WeakSet,window.depict?.dpc instanceof g)return e("DPC already initialized. Returning existing instance."),window.depict.dpc;_(this),this.merchant=t,v(this,k)[k](r),this.auto_observe&&(this.observeRecommendations(),this.observePDPA2CButton())}trackRecommendationCard(t){const e=t.dataset.recommendation_id;if(!e)return void r("No recommendation_id found on card. Can't add tracking.",t);if(this.checkIfTracked(t))return;t.addEventListener("click",(()=>this.sendRecommendationClickEvent({recommendation_id:e}))),i({element:t,data:{recommendation_id:e,...v(this,y)[y]()}});const n=t.querySelector(u);n&&this.trackAddToCartButton(n)}checkIfTracked(t){return this.tracked_elements.has(t)?(e("Already tracked",t),!0):(this.tracked_elements.add(t),!1)}trackAddToCartButton(t){this.checkIfTracked(t)||t.addEventListener("click",(()=>{const e=t.closest(h)?.dataset.recommendation_id,r=v(this,b)[b]();this.sendAddToCartEvent({product_id:r,recommendation_id:e})}))}sendAddToCartEvent(t){v(this,w)[w]({type:"add_to_cart",...t})}sendRecommendationImpressionEvent({recommendation_id:t}){v(this,w)[w]({type:"element_visible",recommendation_id:t})}sendRecommendationClickEvent({recommendation_id:t}){n({recommendation_id:t,...v(this,y)[y]()})}sendPurchaseEvent(t){if(!this.market)throw Error("Market not set");const{dsid:e,user_id:r,session_id:i}=v(this,y)[y](),n=t.items.map((t=>({sku:t.item_id,price:t.price,quantity:t.quantity}))),o={events:[{event_type:"purchase",dsid:e,user_id:r,session_id:i,transaction_id:t.transaction_id,currency:t.currency,products:n}],tenant:this.merchant,market:this.market};s("https://api.depict.ai/v2/create-events",o)}setMarket(t){this.market=t}setProductId(t){e("Setting product id",t),this.latest_product_id=t,this.latest_product_id_path=location.pathname}setUserId(t){e("Setting user id",t),this.latest_user_id=t}observeRecommendations(){e("Starting to observe recommendations with selector",h),o.onexists(h,(({element:t})=>{e("found recommendation",t),this.trackRecommendationCard(t)}))}observePDPA2CButton(){o.onexists(u,(({element:t})=>{e("Found pdp add-to-cart button",t),this.trackAddToCartButton(t)}))}}function q(t){void 0!==t&&(void 0!==t.auto_observe&&(this.auto_observe=t.auto_observe),void 0!==t.market&&(this.market=t.market))}function E(){const t={market:this.market,tenant:this.merchant,user_id:this.latest_user_id};return{...a(),...t}}function P(t){d([{...t,...v(this,y)[y]()}],!0)}function C(){if(this.latest_product_id_path===location.pathname)return this.latest_product_id}t("dpc",c);export{g as DPC,c as version};
1
+ import{add_to_version_info as t,dlog as e,derror as i,impression_track_element as r,depict_click as s,foolproof_send_beacon as n,observer as o,get_tracking_event_context_data as a,send_depict_unfiltered as d}from"@depict-ai/utilishared";
2
+ /*! Depict PerformanceClient */const c="0.0.9",u=".depict-add-to-cart",h="[data-recommendation_id],[data-recommendation-id]";const m=(t,e)=>{if("string"!=typeof e)throw new Error(`${t} event requires a string as an argument`)},_=(t,e)=>{const i=window.depict.dpc;if("purchase"===t){if(!(t=>{if("object"!=typeof t||null===t)throw new Error("purchase event requires an object as an argument");if(!Array.isArray(t.items))throw new Error("purchase event requires an items array of purchased products");if(!t.currency||"string"!=typeof t.currency)throw new Error("purchase event requires a currency string");if(!t.transaction_id||"string"!=typeof t.transaction_id)throw new Error("purchase event requires a transaction_id string");for(const e of t.items){if(!e.item_id||"string"!=typeof e.item_id)throw new Error("purchased item requires an item_id of the purchased product");if(isNaN(e.price))throw new Error("purchase item requires a unit price for the product purchased");if(!e.quantity||isNaN(e.quantity))throw new Error("purchase item requires a quantity of products purchased")}return!0})(e))return;i.sendPurchaseEvent(e)}else"setMarket"===t?(m(t,e),i.setMarket(e)):"setProductId"===t?(m(t,e),i.setProductId(e)):"setUserId"===t?(m(t,e),i.setUserId(e)):"setSessionId"===t&&(m(t,e),i.setSessionId(e))},p=t=>{const e=window.dpq||=function(){const t=function(){const e=arguments;t.send_event?t.send_event.apply(this,e):t.queue.push(e)};return t.queue=[],t}(),i=window.depict||={};i.dpq=e,i.eventHistory=e.queue,i.dpc=t,e.send_event||(e.send_event=(t,i)=>{e.queue.push([t,i]),_(t,i)},e.queue.forEach((([t,e])=>{_(t,e)})))};function v(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var f=0;function l(t){return"__private_"+f+++"_"+t}var k=l("parseOptions"),y=l("getContextData"),w=l("sendTrackingEvent"),g=l("getProductId");class b{constructor(t,i){if(Object.defineProperty(this,g,{value:I}),Object.defineProperty(this,w,{value:P}),Object.defineProperty(this,y,{value:E}),Object.defineProperty(this,k,{value:q}),this.merchant=void 0,this.auto_observe=!0,this.market=void 0,this.latest_product_id=void 0,this.latest_product_id_path=void 0,this.latest_session_id=void 0,this.latest_user_id=void 0,this.tracked_elements=new WeakSet,window.depict?.dpc instanceof b)return e("DPC already initialized. Returning existing instance."),window.depict.dpc;p(this),this.merchant=t,v(this,k)[k](i),this.auto_observe&&(this.observeRecommendations(),this.observePDPA2CButton())}trackRecommendationCard(t){const e=t.dataset.recommendation_id||t.dataset.recommendationId;if(!e)return void i("No recommendation_id found on card. Can't add tracking.",t);if(this.checkIfTracked(t))return;t.addEventListener("click",(()=>this.sendRecommendationClickEvent({recommendation_id:e}))),r({element:t,data:{recommendation_id:e,...v(this,y)[y]()}});const s=t.querySelector(u);s&&this.trackAddToCartButton(s)}checkIfTracked(t){return this.tracked_elements.has(t)?(e("Already tracked",t),!0):(this.tracked_elements.add(t),!1)}trackAddToCartButton(t){this.checkIfTracked(t)||t.addEventListener("click",(()=>{const e=t.closest(h),i=e?.dataset.recommendation_id||e?.dataset.recommendationId,r=v(this,g)[g]();this.sendAddToCartEvent({product_id:r,recommendation_id:i})}))}sendAddToCartEvent(t){v(this,w)[w]({type:"add_to_cart",...t})}sendRecommendationImpressionEvent({recommendation_id:t}){v(this,w)[w]({type:"element_visible",recommendation_id:t})}sendRecommendationClickEvent({recommendation_id:t}){s({recommendation_id:t,...v(this,y)[y]()})}sendPurchaseEvent(t){if(!this.market)throw Error("Market not set");const{dsid:e,user_id:i,session_id:r}=v(this,y)[y](),s=t.items.map((t=>({sku:t.item_id,price:t.price,quantity:t.quantity}))),o={events:[{event_type:"purchase",dsid:e,user_id:i,session_id:r,transaction_id:t.transaction_id,currency:t.currency,products:s}],tenant:this.merchant,market:this.market};n("https://api.depict.ai/v2/create-events",o)}setMarket(t){this.market=t}setProductId(t){e("Setting product id",t),this.latest_product_id=t,this.latest_product_id_path=location.pathname}setUserId(t){e("Setting user id",t),this.latest_user_id=t}setSessionId(t){e("Setting session id",t),this.latest_session_id=t}observeRecommendations(){e("Starting to observe recommendations with selector",h),o.onexists(h,(({element:t})=>{e("found recommendation",t),this.trackRecommendationCard(t)}))}observePDPA2CButton(){o.onexists(u,(({element:t})=>{e("Found pdp add-to-cart button",t),this.trackAddToCartButton(t)}))}}function q(t){void 0!==t&&(void 0!==t.auto_observe&&(this.auto_observe=t.auto_observe),void 0!==t.market&&(this.market=t.market))}function E(){const t={market:this.market,tenant:this.merchant,user_id:this.latest_user_id,session_id:this.latest_session_id};return{...a(),...t}}function P(t){d([{...t,...v(this,y)[y]()}],!0)}function I(){if(this.latest_product_id_path===location.pathname)return this.latest_product_id}t("dpc",c);export{b as DPC,c as version};
3
3
  //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/dpc",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "index_npm.ts",
6
6
  "main": "dist/main.js",
@@ -36,8 +36,8 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@depict-ai/types": "^0.0.6",
40
- "@depict-ai/utilishared": "^0.0.51"
39
+ "@depict-ai/types": "^0.0.8",
40
+ "@depict-ai/utilishared": "^0.0.53"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@babel/core": "latest",