@picked/analytics 0.0.1-dev.1756875690387 → 0.0.1-dev.1762750479117

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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/plugins/analytics/index.js +1 -1
  4. package/dist/esm/index.js +276 -178
  5. package/dist/esm/plugins/analytics/index.js +70 -71
  6. package/dist/types/events/cart_add.d.ts +1 -0
  7. package/dist/types/events/cart_add.d.ts.map +1 -1
  8. package/dist/types/events/cart_remove.d.ts +1 -0
  9. package/dist/types/events/cart_remove.d.ts.map +1 -1
  10. package/dist/types/events/checkout_complete.d.ts +1 -0
  11. package/dist/types/events/checkout_complete.d.ts.map +1 -1
  12. package/dist/types/events/checkout_start.d.ts +5 -0
  13. package/dist/types/events/checkout_start.d.ts.map +1 -0
  14. package/dist/types/events/feature_decide.d.ts +4 -0
  15. package/dist/types/events/feature_decide.d.ts.map +1 -0
  16. package/dist/types/events/identify.d.ts +5 -0
  17. package/dist/types/events/identify.d.ts.map +1 -0
  18. package/dist/types/events/index.d.ts +3 -0
  19. package/dist/types/events/index.d.ts.map +1 -1
  20. package/dist/types/events/page_view.d.ts +1 -0
  21. package/dist/types/events/page_view.d.ts.map +1 -1
  22. package/dist/types/events/product_list_view.d.ts +1 -0
  23. package/dist/types/events/product_list_view.d.ts.map +1 -1
  24. package/dist/types/events/product_view_details.d.ts +1 -0
  25. package/dist/types/events/product_view_details.d.ts.map +1 -1
  26. package/dist/types/fixtures/analytics-event.d.ts +0 -1
  27. package/dist/types/fixtures/analytics-event.d.ts.map +1 -1
  28. package/dist/types/plugins/analytics/plugin.d.ts +1 -2
  29. package/dist/types/plugins/analytics/plugin.d.ts.map +1 -1
  30. package/dist/types/schemas/experience/1-0-0.d.ts +1 -1
  31. package/dist/types/schemas/experience/index.d.ts +1 -1
  32. package/dist/types/schemas/product_list/2-0-1.d.ts +168 -0
  33. package/dist/types/schemas/product_list/2-0-1.d.ts.map +1 -0
  34. package/dist/types/schemas/product_list/index.d.ts +167 -3
  35. package/dist/types/schemas/product_list/index.d.ts.map +1 -1
  36. package/dist/types/schemas/session/1-0-2.d.ts +39 -0
  37. package/dist/types/schemas/session/1-0-2.d.ts.map +1 -0
  38. package/dist/types/schemas/session/index.d.ts +38 -3
  39. package/dist/types/schemas/session/index.d.ts.map +1 -1
  40. package/dist/types/types.d.ts +9 -2
  41. package/dist/types/types.d.ts.map +1 -1
  42. package/dist/types/utils.d.ts.map +1 -1
  43. package/dist/user-interaction-84o6QtPK.js +1153 -0
  44. package/dist/user-interaction-C-DKW3mB.cjs +1 -0
  45. package/package.json +4 -4
  46. package/dist/user-interaction-BTJxIHbv.cjs +0 -1
  47. package/dist/user-interaction-CZQT4H3Z.js +0 -1131
@@ -1,124 +1,123 @@
1
- import { supportsWindow as k } from "@picked/client";
2
- import { split as b, attach as _ } from "effector";
3
- import { m as y, o as F, n as C, v as I, w as L, u as h, z as A, y as w, x as z, r as R, s as B, t as G, q as T, p as j } from "../../../user-interaction-CZQT4H3Z.js";
1
+ import { supportsWindow as S } from "@picked/client";
2
+ import { split as k, attach as b } from "effector";
3
+ import { m as _, o as g, n as l, A as I, v as F, w as A, u as C, z as L, y as h, x as w, r as z, s as R, t as B, q as G, p as T } from "../../../user-interaction-84o6QtPK.js";
4
4
  import "@snowplow/browser-tracker";
5
- function q(c) {
6
- return c.isResolved;
5
+ function j(o) {
6
+ return o.isResolved;
7
7
  }
8
- const V = ({
9
- trackerOptions: c,
10
- sessionId: f,
11
- enableDocumentListeners: l = !1
8
+ const P = ({
9
+ trackerOptions: o,
10
+ enableDocumentListeners: v = !1
12
11
  }) => ({
13
12
  name: "analytics",
14
- setup: (i) => {
15
- if (!k())
13
+ setup: (s) => {
14
+ if (!S())
16
15
  return;
17
- const { organizationId: o, projectId: a } = i, m = () => i.features.listStore.getState().flatMap((e) => {
18
- if (!q(e)) return [];
19
- const { id: n, key: s, name: p } = e, { bucket: u } = e.getBucket();
16
+ const { organizationId: a, projectId: u } = s, f = () => s.features.listStore.getState().flatMap((e) => {
17
+ if (!j(e)) return [];
18
+ const { id: i, key: n, name: c } = e, { bucket: p } = e.getBucket();
20
19
  return [
21
20
  {
22
- name: p,
23
- key: s,
24
- feature: n,
25
- bucket: u
21
+ name: c,
22
+ key: n,
23
+ feature: i,
24
+ bucket: p
26
25
  }
27
26
  ];
28
- }), x = (t) => {
29
- if (t.experience) {
27
+ }), E = (t) => {
28
+ if ("experience" in t && t.experience) {
30
29
  const { experience: e } = t;
31
30
  return {
32
31
  id: e.id,
33
- type: e.configStore.getState().type,
34
32
  title: e.configStore.getState().name
35
33
  };
36
34
  }
37
- if (t.experienceInstance) {
35
+ if ("experienceInstance" in t && t.experienceInstance) {
38
36
  const { experienceInstance: e } = t;
39
37
  return {
40
38
  id: e.experienceId,
41
- type: e.configStore.getState().type,
42
39
  title: e.configStore.getState().name
43
40
  };
44
41
  }
45
42
  };
46
- y({
47
- organizationId: o,
48
- projectId: a,
49
- ...c
43
+ _({
44
+ organizationId: a,
45
+ projectId: u,
46
+ ...o
50
47
  });
51
- const S = (t) => {
52
- const { experience: e } = t || {}, n = m();
48
+ const m = (t) => {
49
+ const { experience: e } = t || {}, i = f();
53
50
  return function() {
51
+ var c;
54
52
  return {
55
- organizationId: o,
56
- projectId: a,
57
- sessionId: f,
58
- features: n,
53
+ organizationId: a,
54
+ projectId: u,
55
+ sessionId: (c = s.session) == null ? void 0 : c.id,
56
+ features: i,
59
57
  ...e && {
60
58
  experience: {
61
59
  id: e.experienceId,
62
- type: e.configStore.getState().type,
63
60
  title: e.configStore.getState().name
64
61
  }
65
62
  }
66
63
  };
67
64
  };
68
65
  };
69
- if (l) {
70
- const t = S();
71
- F(t);
66
+ if (v) {
67
+ const t = m();
68
+ g(t);
72
69
  }
73
- i.experienceInstances.listStore.watch((t) => {
70
+ s.experienceInstances.listStore.watch((t) => {
74
71
  t.forEach((e) => {
75
- const n = e.target;
76
- if (n) {
77
- const s = S({ experience: e });
78
- C(s, n.shadowRoot);
72
+ const i = e.target;
73
+ if (i) {
74
+ const n = m({ experience: e });
75
+ l(n, i.shadowRoot);
79
76
  }
80
77
  });
81
78
  });
82
79
  function r(t) {
83
- return _({
84
- source: { fields: i.fields.listStore, responses: i.responses.listStore },
85
- effect: async ({ fields: e, responses: n }, s) => {
86
- const { step: p, form: u, exception: d, version: g } = s, v = m(), E = {
87
- organizationId: o,
88
- projectId: a,
89
- sessionId: f,
90
- experience: x(s),
91
- step: p,
92
- form: u,
93
- exception: d,
94
- version: g,
80
+ return b({
81
+ source: { fields: s.fields.listStore, responses: s.responses.listStore },
82
+ effect: async ({ fields: e, responses: i }, n) => {
83
+ var x, d;
84
+ const c = f(), p = {
85
+ organizationId: a,
86
+ projectId: u,
87
+ sessionId: (x = s.session) == null ? void 0 : x.id,
88
+ experience: E(n),
89
+ step: "step" in n ? n.step : void 0,
90
+ form: "form" in n ? n.form : void 0,
91
+ exception: "exception" in n ? (d = n.exception.reason) == null ? void 0 : d[0] : void 0,
92
+ // todo: support multiple exceptions
95
93
  fields: e,
96
- responses: n,
97
- features: v
94
+ responses: i,
95
+ features: c
98
96
  };
99
- return t(E);
97
+ return t(p);
100
98
  }
101
99
  });
102
100
  }
103
- b({
104
- source: i.eventBus,
101
+ k({
102
+ source: s.eventBus,
105
103
  match: (t) => t.type,
106
104
  cases: {
107
- initialized: r(j),
108
- experience_open: r(T),
109
- experience_close: r(G),
110
- field_validation_error: r(B),
111
- experience_initialized: r(R),
112
- step_enter: r(z),
113
- step_submit: r(w),
114
- step_submit_success: r(A),
115
- form_submit: r(h),
116
- form_submit_success: r(L),
117
- form_submit_error: r(I)
105
+ initialized: r(T),
106
+ experience_open: r(G),
107
+ experience_close: r(B),
108
+ field_validation_error: r(R),
109
+ experience_initialized: r(z),
110
+ step_enter: r(w),
111
+ step_submit: r(h),
112
+ step_submit_success: r(L),
113
+ form_submit: r(C),
114
+ form_submit_success: r(A),
115
+ form_submit_error: r(F),
116
+ feature_decide: r(I)
118
117
  }
119
118
  });
120
119
  }
121
120
  });
122
121
  export {
123
- V as analyticsPlugin
122
+ P as analyticsPlugin
124
123
  };
@@ -1,4 +1,5 @@
1
1
  import { AnalyticsContext } from '../types';
2
2
  import { EventSchema } from '../schemas';
3
+ export declare function createCartAddTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
3
4
  export declare const trackCartAddEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
4
5
  //# sourceMappingURL=cart_add.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cart_add.d.ts","sourceRoot":"","sources":["../../../src/events/cart_add.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAOjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA8B7C,eAAO,MAAM,iBAAiB,2EAA4C,CAAA"}
1
+ {"version":3,"file":"cart_add.d.ts","sourceRoot":"","sources":["../../../src/events/cart_add.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAQjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkC7C,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAGhC;AAED,eAAO,MAAM,iBAAiB,2EAA4C,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { AnalyticsContext } from '../types';
2
2
  import { EventSchema } from '../schemas';
3
+ export declare function createCartRemoveTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
3
4
  export declare const trackCartRemoveEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
4
5
  //# sourceMappingURL=cart_remove.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cart_remove.d.ts","sourceRoot":"","sources":["../../../src/events/cart_remove.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAOjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA8B7C,eAAO,MAAM,oBAAoB,2EAA4C,CAAA"}
1
+ {"version":3,"file":"cart_remove.d.ts","sourceRoot":"","sources":["../../../src/events/cart_remove.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAQjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkC7C,wBAAgB,4BAA4B,CAC1C,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAGhC;AAED,eAAO,MAAM,oBAAoB,2EAA4C,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { AnalyticsContext } from '../types';
2
2
  import { EventSchema } from '../schemas';
3
+ export declare function createCheckoutCompleteTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
3
4
  export declare const trackCheckoutCompleteEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
4
5
  //# sourceMappingURL=checkout_complete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout_complete.d.ts","sourceRoot":"","sources":["../../../src/events/checkout_complete.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAOjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA8B7C,eAAO,MAAM,0BAA0B,2EAA4C,CAAA"}
1
+ {"version":3,"file":"checkout_complete.d.ts","sourceRoot":"","sources":["../../../src/events/checkout_complete.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAQjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkC7C,wBAAgB,kCAAkC,CAChD,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAGhC;AAED,eAAO,MAAM,0BAA0B,2EAA4C,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { AnalyticsContext } from '../types';
2
+ import { EventSchema } from '../schemas';
3
+ export declare function createCheckoutStartTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
4
+ export declare const trackCheckoutStartEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
5
+ //# sourceMappingURL=checkout_start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkout_start.d.ts","sourceRoot":"","sources":["../../../src/events/checkout_start.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAQjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkC7C,wBAAgB,+BAA+B,CAC7C,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAGhC;AAED,eAAO,MAAM,uBAAuB,2EAA4C,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { AnalyticsContext } from '../types';
2
+ import { EventSchema } from '../schemas';
3
+ export declare const trackFeatureDecideEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
4
+ //# sourceMappingURL=feature_decide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature_decide.d.ts","sourceRoot":"","sources":["../../../src/events/feature_decide.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAMjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA8B7C,eAAO,MAAM,uBAAuB,2EAA4C,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { AnalyticsContext } from '../types';
2
+ import { EventSchema } from '../schemas';
3
+ export declare function createIdentifyTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
4
+ export declare const trackIdentifyEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
5
+ //# sourceMappingURL=identify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identify.d.ts","sourceRoot":"","sources":["../../../src/events/identify.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAOjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkC7C,wBAAgB,0BAA0B,CACxC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAGhC;AAED,eAAO,MAAM,kBAAkB,2EAA4C,CAAA"}
@@ -4,6 +4,7 @@ export * from './app_open';
4
4
  export * from './cart_add';
5
5
  export * from './cart_remove';
6
6
  export * from './wishlist_add';
7
+ export * from './checkout_start';
7
8
  export * from './checkout_complete';
8
9
  export * from './experience_load';
9
10
  export * from './field_validation_error';
@@ -24,4 +25,6 @@ export * from './step_submit_success';
24
25
  export * from './search_results_list_view';
25
26
  export * from './product_select';
26
27
  export * from './product_list_view';
28
+ export * from './identify';
29
+ export * from './feature_decide';
27
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { AnalyticsContext } from '../types';
2
2
  import { EventSchema } from '../schemas';
3
+ export declare function createPageViewTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
3
4
  export declare const trackPageViewEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
4
5
  //# sourceMappingURL=page_view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"page_view.d.ts","sourceRoot":"","sources":["../../../src/events/page_view.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAOjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkC7C,eAAO,MAAM,kBAAkB,2EAA4C,CAAA"}
1
+ {"version":3,"file":"page_view.d.ts","sourceRoot":"","sources":["../../../src/events/page_view.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAQjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAwC7C,wBAAgB,0BAA0B,CACxC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAGhC;AAED,eAAO,MAAM,kBAAkB,2EAA4C,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { AnalyticsContext } from '../types';
2
2
  import { EventSchema } from '../schemas';
3
+ export declare function createProductListViewTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
3
4
  export declare const trackProductListViewEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
4
5
  //# sourceMappingURL=product_list_view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product_list_view.d.ts","sourceRoot":"","sources":["../../../src/events/product_list_view.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAOjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAgC7C,eAAO,MAAM,yBAAyB,2EAA4C,CAAA"}
1
+ {"version":3,"file":"product_list_view.d.ts","sourceRoot":"","sources":["../../../src/events/product_list_view.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAQjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAoC7C,wBAAgB,iCAAiC,CAC/C,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAKhC;AAED,eAAO,MAAM,yBAAyB,2EAA4C,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { AnalyticsContext } from '../types';
2
2
  import { EventSchema } from '../schemas';
3
+ export declare function createProductViewTrackerEvent(analyticsContext: AnalyticsContext, eventMeta?: EventSchema['meta']): import('..').SnowplowSelfDescribingEvent;
3
4
  export declare const trackProductViewDetailsEvent: (eventPayload: AnalyticsContext, eventMeta?: EventSchema["meta"]) => void;
4
5
  //# sourceMappingURL=product_view_details.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product_view_details.d.ts","sourceRoot":"","sources":["../../../src/events/product_view_details.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAOjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA8B7C,eAAO,MAAM,4BAA4B,2EAA4C,CAAA"}
1
+ {"version":3,"file":"product_view_details.d.ts","sourceRoot":"","sources":["../../../src/events/product_view_details.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAQjB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkC7C,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,4CAKhC;AAED,eAAO,MAAM,4BAA4B,2EAA4C,CAAA"}
@@ -3,7 +3,6 @@ export declare const mockAnalyticsContext: {
3
3
  experience: {
4
4
  id: string;
5
5
  title: string;
6
- type: string;
7
6
  };
8
7
  step: {
9
8
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-event.d.ts","sourceRoot":"","sources":["../../../src/fixtures/analytics-event.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;CAchC,CAAA"}
1
+ {"version":3,"file":"analytics-event.d.ts","sourceRoot":"","sources":["../../../src/fixtures/analytics-event.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;CAahC,CAAA"}
@@ -2,10 +2,9 @@ import { Picked } from '@picked/client';
2
2
  import { CreateTrackerOptions } from '../../types';
3
3
  interface AnalyticsPluginOptions {
4
4
  trackerOptions?: CreateTrackerOptions;
5
- sessionId?: string;
6
5
  enableDocumentListeners?: boolean;
7
6
  }
8
- export declare const analyticsPlugin: ({ trackerOptions, sessionId, enableDocumentListeners, }: AnalyticsPluginOptions) => {
7
+ export declare const analyticsPlugin: ({ trackerOptions, enableDocumentListeners, }: AnalyticsPluginOptions) => {
9
8
  name: string;
10
9
  setup: (client: Picked) => void;
11
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/analytics/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,MAAM,EAEP,MAAM,gBAAgB,CAAA;AAoBvB,OAAO,KAAK,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAEzE,UAAU,sBAAsB;IAC9B,cAAc,CAAC,EAAE,oBAAoB,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAClC;AAMD,eAAO,MAAM,eAAe,GAAI,yDAI7B,sBAAsB,KAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAoJ1E,CAAA"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/analytics/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,MAAM,EAEP,MAAM,gBAAgB,CAAA;AAqBvB,OAAO,KAAK,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAEzE,UAAU,sBAAsB;IAC9B,cAAc,CAAC,EAAE,oBAAoB,CAAA;IACrC,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAClC;AAMD,eAAO,MAAM,eAAe,GAAI,8CAG7B,sBAAsB,KAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CA+I1E,CAAA"}
@@ -26,7 +26,7 @@ export declare const schema: {
26
26
  readonly type: readonly ["object", "null"];
27
27
  };
28
28
  };
29
- readonly required: readonly ["id", "type", "title"];
29
+ readonly required: readonly ["id", "title"];
30
30
  readonly self: {
31
31
  readonly vendor: "dev.pckd";
32
32
  readonly name: "experience";
@@ -29,7 +29,7 @@ export declare const schemas: {
29
29
  readonly type: readonly ["object", "null"];
30
30
  };
31
31
  };
32
- readonly required: readonly ["id", "type", "title"];
32
+ readonly required: readonly ["id", "title"];
33
33
  readonly self: {
34
34
  readonly vendor: "dev.pckd";
35
35
  readonly name: "experience";
@@ -0,0 +1,168 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const schema: {
3
+ readonly $schema: "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#";
4
+ readonly additionalProperties: true;
5
+ readonly description: "Schema for a product list";
6
+ readonly minProperties: 1;
7
+ readonly properties: {
8
+ readonly title: {
9
+ readonly description: "The title of the product list";
10
+ readonly type: readonly ["string", "null"];
11
+ readonly maxLength: 255;
12
+ };
13
+ readonly items: {
14
+ readonly description: "A list of products";
15
+ readonly type: "array";
16
+ readonly items: {
17
+ readonly type: "object";
18
+ readonly description: "Products in the list";
19
+ readonly properties: {
20
+ readonly item_id: {
21
+ readonly type: readonly ["string", "null"];
22
+ readonly description: "The product ID";
23
+ readonly maxLength: 255;
24
+ };
25
+ readonly item_name: {
26
+ readonly type: readonly ["string", "null"];
27
+ readonly description: "The product name";
28
+ readonly maxLength: 255;
29
+ };
30
+ readonly affiliation: {
31
+ readonly type: readonly ["string", "null"];
32
+ readonly description: "The affiliation";
33
+ readonly maxLength: 255;
34
+ };
35
+ readonly coupon: {
36
+ readonly type: readonly ["string", "null"];
37
+ readonly description: "The coupon code";
38
+ readonly maxLength: 255;
39
+ };
40
+ readonly currency: {
41
+ readonly type: readonly ["string", "null"];
42
+ readonly description: "The currency";
43
+ readonly maxLength: 255;
44
+ };
45
+ readonly creative_name: {
46
+ readonly type: readonly ["string", "null"];
47
+ readonly description: "The creative name";
48
+ readonly maxLength: 255;
49
+ };
50
+ readonly creative_slot: {
51
+ readonly type: readonly ["string", "null"];
52
+ readonly description: "The creative slot";
53
+ readonly maxLength: 255;
54
+ };
55
+ readonly discount: {
56
+ readonly type: readonly ["number", "null"];
57
+ readonly description: "The discount";
58
+ readonly minimum: -9999999999;
59
+ readonly maximum: 9999999999;
60
+ };
61
+ readonly index: {
62
+ readonly type: readonly ["number", "null"];
63
+ readonly description: "The index";
64
+ readonly minimum: -9999999999;
65
+ readonly maximum: 9999999999;
66
+ };
67
+ readonly item_brand: {
68
+ readonly type: readonly ["string", "null"];
69
+ readonly description: "The item brand";
70
+ readonly maxLength: 255;
71
+ };
72
+ readonly item_category: {
73
+ readonly type: readonly ["string", "null"];
74
+ readonly description: "The item category";
75
+ readonly maxLength: 255;
76
+ };
77
+ readonly item_category2: {
78
+ readonly type: readonly ["string", "null"];
79
+ readonly description: "The item category 2";
80
+ readonly maxLength: 255;
81
+ };
82
+ readonly item_category3: {
83
+ readonly type: readonly ["string", "null"];
84
+ readonly description: "The item category 3";
85
+ readonly maxLength: 255;
86
+ };
87
+ readonly item_category4: {
88
+ readonly type: readonly ["string", "null"];
89
+ readonly description: "The item category 4";
90
+ readonly maxLength: 255;
91
+ };
92
+ readonly item_category5: {
93
+ readonly type: readonly ["string", "null"];
94
+ readonly description: "The item category 5";
95
+ readonly maxLength: 255;
96
+ };
97
+ readonly item_list_id: {
98
+ readonly type: readonly ["string", "null"];
99
+ readonly description: "The item list ID";
100
+ readonly maxLength: 255;
101
+ };
102
+ readonly item_list_name: {
103
+ readonly type: readonly ["string", "null"];
104
+ readonly description: "The item list";
105
+ readonly maxLength: 255;
106
+ };
107
+ readonly item_variant: {
108
+ readonly type: readonly ["string", "null"];
109
+ readonly description: "The item variant";
110
+ readonly maxLength: 255;
111
+ };
112
+ readonly location_id: {
113
+ readonly type: readonly ["string", "null"];
114
+ readonly description: "The location ID";
115
+ readonly maxLength: 255;
116
+ };
117
+ readonly price: {
118
+ readonly type: readonly ["number", "null"];
119
+ readonly description: "The price";
120
+ readonly minimum: -9999999999;
121
+ readonly maximum: 9999999999;
122
+ };
123
+ readonly promotion_id: {
124
+ readonly type: readonly ["string", "null"];
125
+ readonly description: "The promotion ID";
126
+ readonly maxLength: 255;
127
+ };
128
+ readonly promotion_name: {
129
+ readonly type: readonly ["string", "null"];
130
+ readonly description: "The promotion name";
131
+ readonly maxLength: 255;
132
+ };
133
+ readonly quantity: {
134
+ readonly type: readonly ["number", "null"];
135
+ readonly description: "The quantity";
136
+ readonly minimum: -9999999999;
137
+ readonly maximum: 9999999999;
138
+ };
139
+ readonly meta: {
140
+ readonly description: "Additional metadata";
141
+ readonly additionalProperties: true;
142
+ readonly type: readonly ["object", "null"];
143
+ };
144
+ readonly in_stock: {
145
+ readonly description: "The stock availability of the product";
146
+ readonly type: readonly ["boolean", "null"];
147
+ };
148
+ };
149
+ };
150
+ };
151
+ readonly meta: {
152
+ readonly description: "Additional metadata";
153
+ readonly additionalProperties: true;
154
+ readonly type: readonly ["object", "null"];
155
+ };
156
+ };
157
+ readonly required: readonly ["items"];
158
+ readonly self: {
159
+ readonly vendor: "dev.pckd";
160
+ readonly name: "product_list";
161
+ readonly format: "jsonschema";
162
+ readonly version: "2-0-1";
163
+ };
164
+ readonly type: "object";
165
+ };
166
+ export type Schema = FromSchema<typeof schema>;
167
+ export type Version = typeof schema.self.version;
168
+ //# sourceMappingURL=2-0-1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2-0-1.d.ts","sourceRoot":"","sources":["../../../../src/schemas/product_list/2-0-1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoKT,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAA;AAC9C,MAAM,MAAM,OAAO,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAA"}