@blux.ai/web-sdk 0.0.4-rc0 → 0.0.6-tommy0

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 (115) hide show
  1. package/README.md +6 -6
  2. package/demo/craco.config.js +2 -0
  3. package/demo/package.json +4 -2
  4. package/demo/public/index.html +1 -1
  5. package/demo/tailwind.config.js +2 -0
  6. package/dist/BluxClient.d.ts +16 -15
  7. package/dist/BluxClient.js +180 -320
  8. package/dist/BluxClient.js.map +1 -1
  9. package/dist/apis/createEvent.d.ts +4 -0
  10. package/dist/apis/createEvent.js +7 -0
  11. package/dist/apis/createEvent.js.map +1 -0
  12. package/dist/apis/getItemRecommendation.d.ts +4 -0
  13. package/dist/apis/getItemRecommendation.js +7 -0
  14. package/dist/apis/getItemRecommendation.js.map +1 -0
  15. package/dist/apis/initialize.d.ts +4 -0
  16. package/dist/apis/initialize.js +7 -0
  17. package/dist/apis/initialize.js.map +1 -0
  18. package/dist/apis/signIn.d.ts +4 -0
  19. package/dist/apis/signIn.js +7 -0
  20. package/dist/apis/signIn.js.map +1 -0
  21. package/dist/apis/signOut.d.ts +4 -0
  22. package/dist/apis/signOut.js +7 -0
  23. package/dist/apis/signOut.js.map +1 -0
  24. package/dist/apis/updateCustomUserProperties.d.ts +4 -0
  25. package/dist/apis/updateCustomUserProperties.js +7 -0
  26. package/dist/apis/updateCustomUserProperties.js.map +1 -0
  27. package/dist/apis/updateUserProperties.d.ts +4 -0
  28. package/dist/apis/updateUserProperties.js +7 -0
  29. package/dist/apis/updateUserProperties.js.map +1 -0
  30. package/dist/constants/URLS.d.ts +2 -6
  31. package/dist/constants/URLS.js +4 -14
  32. package/dist/constants/URLS.js.map +1 -1
  33. package/dist/events/AddCartaddEvent.d.ts +2 -2
  34. package/dist/events/AddCartaddEvent.js +9 -40
  35. package/dist/events/AddCartaddEvent.js.map +1 -1
  36. package/dist/events/AddCustomEvent.d.ts +2 -2
  37. package/dist/events/AddCustomEvent.js +11 -42
  38. package/dist/events/AddCustomEvent.js.map +1 -1
  39. package/dist/events/AddLikeEvent.d.ts +2 -2
  40. package/dist/events/AddLikeEvent.js +9 -40
  41. package/dist/events/AddLikeEvent.js.map +1 -1
  42. package/dist/events/AddPageViewEvent.d.ts +2 -2
  43. package/dist/events/AddPageViewEvent.js +9 -38
  44. package/dist/events/AddPageViewEvent.js.map +1 -1
  45. package/dist/events/AddProductDetailViewEvent.d.ts +2 -2
  46. package/dist/events/AddProductDetailViewEvent.js +11 -41
  47. package/dist/events/AddProductDetailViewEvent.js.map +1 -1
  48. package/dist/events/AddPurchaseEvent.d.ts +2 -2
  49. package/dist/events/AddPurchaseEvent.js +11 -39
  50. package/dist/events/AddPurchaseEvent.js.map +1 -1
  51. package/dist/events/AddRateEvent.d.ts +2 -2
  52. package/dist/events/AddRateEvent.js +9 -40
  53. package/dist/events/AddRateEvent.js.map +1 -1
  54. package/dist/events/AddRecommendationViewEvent.d.ts +2 -2
  55. package/dist/events/AddRecommendationViewEvent.js +8 -39
  56. package/dist/events/AddRecommendationViewEvent.js.map +1 -1
  57. package/dist/events/Event.d.ts +2 -2
  58. package/dist/events/Event.js +11 -25
  59. package/dist/events/Event.js.map +1 -1
  60. package/dist/events/VisitEvent.d.ts +5 -0
  61. package/dist/events/VisitEvent.js +11 -0
  62. package/dist/events/VisitEvent.js.map +1 -0
  63. package/dist/events/index.js +9 -28
  64. package/dist/events/index.js.map +1 -1
  65. package/dist/events/types.d.ts +6 -10
  66. package/dist/events/types.js +2 -6
  67. package/dist/events/types.js.map +1 -1
  68. package/dist/index.d.ts +3 -1
  69. package/dist/index.js +6 -23
  70. package/dist/index.js.map +1 -1
  71. package/dist/recommendations/ItemRecommendation.d.ts +5 -0
  72. package/dist/recommendations/ItemRecommendation.js +12 -0
  73. package/dist/recommendations/ItemRecommendation.js.map +1 -0
  74. package/dist/recommendations/Recommendation.d.ts +5 -0
  75. package/dist/recommendations/Recommendation.js +9 -0
  76. package/dist/recommendations/Recommendation.js.map +1 -0
  77. package/dist/recommendations/index.d.ts +1 -0
  78. package/dist/recommendations/index.js +2 -0
  79. package/dist/recommendations/index.js.map +1 -0
  80. package/dist/recommendations/types.d.ts +11 -0
  81. package/dist/recommendations/types.js +2 -0
  82. package/dist/recommendations/types.js.map +1 -0
  83. package/dist/utils/LocalStorage.js +14 -0
  84. package/dist/utils/LocalStorage.js.map +1 -0
  85. package/dist/{core → utils}/Logger.d.ts +1 -1
  86. package/dist/utils/Logger.js +49 -0
  87. package/dist/utils/Logger.js.map +1 -0
  88. package/dist/utils/getPath.d.ts +1 -0
  89. package/dist/utils/getPath.js +4 -0
  90. package/dist/utils/getPath.js.map +1 -0
  91. package/dist/utils/helper.js +2 -9
  92. package/dist/utils/helper.js.map +1 -1
  93. package/dist/utils/operators.d.ts +1 -1
  94. package/dist/utils/operators.js +5 -11
  95. package/dist/utils/operators.js.map +1 -1
  96. package/package.json +7 -6
  97. package/.prettierrc +0 -4
  98. package/.sentryclirc +0 -3
  99. package/demo/README.md +0 -46
  100. package/demo/src/App.test.tsx +0 -9
  101. package/demo/src/App.tsx +0 -158
  102. package/demo/src/index.css +0 -16
  103. package/demo/src/index.tsx +0 -19
  104. package/demo/src/react-app-env.d.ts +0 -1
  105. package/demo/src/reportWebVitals.ts +0 -15
  106. package/demo/src/setupTests.ts +0 -5
  107. package/demo/yarn.lock +0 -10120
  108. package/dist/core/LocalStorage.js +0 -21
  109. package/dist/core/LocalStorage.js.map +0 -1
  110. package/dist/core/Logger.js +0 -88
  111. package/dist/core/Logger.js.map +0 -1
  112. package/dist/utils/sentry.d.ts +0 -2
  113. package/dist/utils/sentry.js +0 -49
  114. package/dist/utils/sentry.js.map +0 -1
  115. /package/dist/{core → utils}/LocalStorage.d.ts +0 -0
@@ -0,0 +1,7 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersInitialize;
4
+ export const initialize = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=initialize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialize.js","sourceRoot":"/","sources":["apis/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,mBAAmB,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"@blux.ai/common\";\nimport type { AxiosInstance } from \"axios\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersInitialize;\n\nexport const initialize = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import type { AxiosInstance } from "axios";
3
+ import API = APIs.bluxUsersSignIn;
4
+ export declare const signIn: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersSignIn;
4
+ export const signIn = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=signIn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signIn.js","sourceRoot":"/","sources":["apis/signIn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"@blux.ai/common\";\nimport type { AxiosInstance } from \"axios\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersSignIn;\n\nexport const signIn = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import type { AxiosInstance } from "axios";
3
+ import API = APIs.bluxUsersSignOut;
4
+ export declare const signOut: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersSignOut;
4
+ export const signOut = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=signOut.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signOut.js","sourceRoot":"/","sources":["apis/signOut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC;AAEnC,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"@blux.ai/common\";\nimport type { AxiosInstance } from \"axios\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersSignOut;\n\nexport const signOut = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import type { AxiosInstance } from "axios";
3
+ import API = APIs.bluxUsersUpdateCustomUserProperties;
4
+ export declare const updateCustomUserProperties: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersUpdateCustomUserProperties;
4
+ export const updateCustomUserProperties = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=updateCustomUserProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateCustomUserProperties.js","sourceRoot":"/","sources":["apis/updateCustomUserProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,mCAAmC,CAAC;AAEtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"@blux.ai/common\";\nimport type { AxiosInstance } from \"axios\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersUpdateCustomUserProperties;\n\nexport const updateCustomUserProperties = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import type { AxiosInstance } from "axios";
3
+ import API = APIs.bluxUsersUpdateUserProperties;
4
+ export declare const updateUserProperties: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "@blux.ai/common";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersUpdateUserProperties;
4
+ export const updateUserProperties = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=updateUserProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateUserProperties.js","sourceRoot":"/","sources":["apis/updateUserProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,6BAA6B,CAAC;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"@blux.ai/common\";\nimport type { AxiosInstance } from \"axios\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersUpdateUserProperties;\n\nexport const updateUserProperties = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -1,10 +1,6 @@
1
- export declare const IDENTIFIER_API_URL_BY_STAGE: {
1
+ export declare const API_URL_BY_STAGE: {
2
2
  readonly local: "http://localhost:9000/local";
3
3
  readonly dev: "https://api.blux.ai/dev";
4
+ readonly stg: "https://api.blux.ai/stg";
4
5
  readonly prod: "https://api.blux.ai/prod";
5
6
  };
6
- export declare const COLLECTOR_API_URL_BY_STAGE: {
7
- readonly local: "https://collector-api-web.blux.ai";
8
- readonly dev: "https://collector-api-web.blux.ai";
9
- readonly prod: "https://collector-api-web.blux.ai";
10
- };
@@ -1,17 +1,7 @@
1
- "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aa0ab5c9-0125-5caf-ad60-d94ff3e57c21")}catch(e){}}();
3
-
4
- exports.__esModule = true;
5
- exports.COLLECTOR_API_URL_BY_STAGE = exports.IDENTIFIER_API_URL_BY_STAGE = void 0;
6
- exports.IDENTIFIER_API_URL_BY_STAGE = {
1
+ export const API_URL_BY_STAGE = {
7
2
  local: "http://localhost:9000/local",
8
3
  dev: "https://api.blux.ai/dev",
9
- prod: "https://api.blux.ai/prod"
4
+ stg: "https://api.blux.ai/stg",
5
+ prod: "https://api.blux.ai/prod",
10
6
  };
11
- exports.COLLECTOR_API_URL_BY_STAGE = {
12
- local: "https://collector-api-web.blux.ai",
13
- dev: "https://collector-api-web.blux.ai",
14
- prod: "https://collector-api-web.blux.ai"
15
- };
16
- //# sourceMappingURL=URLS.js.map
17
- //# debugId=aa0ab5c9-0125-5caf-ad60-d94ff3e57c21
7
+ //# sourceMappingURL=URLS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"URLS.js","sources":["constants/URLS.ts"],"sourceRoot":"/","sourcesContent":["export const IDENTIFIER_API_URL_BY_STAGE = {\n local: \"http://localhost:9000/local\",\n dev: \"https://api.blux.ai/dev\",\n prod: \"https://api.blux.ai/prod\",\n} as const;\n\nexport const COLLECTOR_API_URL_BY_STAGE = {\n local: \"https://collector-api-web.blux.ai\", // todo\n dev: \"https://collector-api-web.blux.ai\", // todo\n prod: \"https://collector-api-web.blux.ai\", // todo\n} as const;\n"],"names":[],"mappings":";;;;;AAAa,QAAA,2BAA2B,GAAG;IACzC,KAAK,EAAE,6BAA6B;IACpC,GAAG,EAAE,yBAAyB;IAC9B,IAAI,EAAE,0BAA0B;CACxB,CAAC;AAEE,QAAA,0BAA0B,GAAG;IACxC,KAAK,EAAE,mCAAmC;IAC1C,GAAG,EAAE,mCAAmC;IACxC,IAAI,EAAE,mCAAmC;CACjC,CAAC","debug_id":"aa0ab5c9-0125-5caf-ad60-d94ff3e57c21"}
1
+ {"version":3,"file":"URLS.js","sourceRoot":"/","sources":["constants/URLS.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,6BAA6B;IACpC,GAAG,EAAE,yBAAyB;IAC9B,GAAG,EAAE,yBAAyB;IAC9B,IAAI,EAAE,0BAA0B;CACxB,CAAC","sourcesContent":["export const API_URL_BY_STAGE = {\n local: \"http://localhost:9000/local\",\n dev: \"https://api.blux.ai/dev\",\n stg: \"https://api.blux.ai/stg\",\n prod: \"https://api.blux.ai/prod\",\n} as const;\n"]}
@@ -1,5 +1,5 @@
1
- import { IAddCartaddEvent } from "./types";
1
+ import type { IAddCartaddEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddCartaddEvent extends Event {
4
- constructor({ item_id, url, ref, recommendation_id, from, event_properties, timestamp, }: IAddCartaddEvent);
4
+ constructor({ item_id, event_properties }: IAddCartaddEvent);
5
5
  }
@@ -1,42 +1,11 @@
1
- "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="afbe7efa-9177-5df2-b1df-3dd28b07b550")}catch(e){}}();
3
-
4
- var __extends = (this && this.__extends) || (function () {
5
- var extendStatics = function (d, b) {
6
- extendStatics = Object.setPrototypeOf ||
7
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9
- return extendStatics(d, b);
10
- };
11
- return function (d, b) {
12
- if (typeof b !== "function" && b !== null)
13
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- exports.__esModule = true;
20
- exports.AddCartaddEvent = void 0;
21
- var helper_1 = require("../utils/helper");
22
- var Event_1 = require("./Event");
23
- var AddCartaddEvent = /** @class */ (function (_super) {
24
- __extends(AddCartaddEvent, _super);
25
- function AddCartaddEvent(_a) {
26
- var item_id = _a.item_id, url = _a.url, ref = _a.ref, recommendation_id = _a.recommendation_id, from = _a.from, event_properties = _a.event_properties, _b = _a.timestamp, timestamp = _b === void 0 ? (0, helper_1.getCurrentUnixTimestamp)() : _b;
27
- return _super.call(this, {
1
+ import { Event } from "./Event";
2
+ export class AddCartaddEvent extends Event {
3
+ constructor({ item_id, event_properties }) {
4
+ super({
28
5
  event_type: "cartadd",
29
- item_id: item_id,
30
- url: url,
31
- ref: ref,
32
- recommendation_id: recommendation_id,
33
- from: from,
34
- event_properties: event_properties,
35
- timestamp: timestamp
36
- }) || this;
6
+ item_id,
7
+ event_properties,
8
+ });
37
9
  }
38
- return AddCartaddEvent;
39
- }(Event_1.Event));
40
- exports.AddCartaddEvent = AddCartaddEvent;
41
- //# sourceMappingURL=AddCartaddEvent.js.map
42
- //# debugId=afbe7efa-9177-5df2-b1df-3dd28b07b550
10
+ }
11
+ //# sourceMappingURL=AddCartaddEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddCartaddEvent.js","sources":["events/AddCartaddEvent.ts"],"sourceRoot":"/","sourcesContent":["import { IAddCartaddEvent } from \"./types\";\nimport { getCurrentUnixTimestamp } from \"../utils/helper\";\nimport { Event } from \"./Event\";\n\nexport class AddCartaddEvent extends Event {\n constructor({\n item_id,\n url,\n ref,\n recommendation_id,\n from,\n event_properties,\n timestamp = getCurrentUnixTimestamp(),\n }: IAddCartaddEvent) {\n super({\n event_type: \"cartadd\",\n item_id,\n url,\n ref,\n recommendation_id,\n from,\n event_properties,\n timestamp,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,0CAA0D;AAC1D,iCAAgC;AAEhC;IAAqC,mCAAK;IACxC,yBAAY,EAQO;YAPjB,OAAO,aAAA,EACP,GAAG,SAAA,EACH,GAAG,SAAA,EACH,iBAAiB,uBAAA,EACjB,IAAI,UAAA,EACJ,gBAAgB,sBAAA,EAChB,iBAAqC,EAArC,SAAS,mBAAG,IAAA,gCAAuB,GAAE,KAAA;eAErC,kBAAM;YACJ,UAAU,EAAE,SAAS;YACrB,OAAO,SAAA;YACP,GAAG,KAAA;YACH,GAAG,KAAA;YACH,iBAAiB,mBAAA;YACjB,IAAI,MAAA;YACJ,gBAAgB,kBAAA;YAChB,SAAS,WAAA;SACV,CAAC;IACJ,CAAC;IACH,sBAAC;AAAD,CAAC,AArBD,CAAqC,aAAK,GAqBzC;AArBY,0CAAe","debug_id":"afbe7efa-9177-5df2-b1df-3dd28b07b550"}
1
+ {"version":3,"file":"AddCartaddEvent.js","sourceRoot":"/","sources":["events/AddCartaddEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAoB;QACzD,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS;YACrB,OAAO;YACP,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddCartaddEvent } from \"./types\";\nimport { Event } from \"./Event\";\n\nexport class AddCartaddEvent extends Event {\n constructor({ item_id, event_properties }: IAddCartaddEvent) {\n super({\n event_type: \"cartadd\",\n item_id,\n event_properties,\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { IAddCustomEvent } from "./types";
1
+ import type { IAddCustomEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddCustomEvent extends Event {
4
- constructor({ event_type, event_value, item_id, url, ref, recommendation_id, from, event_properties, timestamp, }: IAddCustomEvent);
4
+ constructor({ event_type, event_value, item_id, event_properties, }: IAddCustomEvent);
5
5
  }
@@ -1,43 +1,12 @@
1
- "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c4e6e4f0-7af4-5444-a5fc-429a18e381cd")}catch(e){}}();
3
-
4
- var __extends = (this && this.__extends) || (function () {
5
- var extendStatics = function (d, b) {
6
- extendStatics = Object.setPrototypeOf ||
7
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9
- return extendStatics(d, b);
10
- };
11
- return function (d, b) {
12
- if (typeof b !== "function" && b !== null)
13
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- exports.__esModule = true;
20
- exports.AddCustomEvent = void 0;
21
- var helper_1 = require("../utils/helper");
22
- var Event_1 = require("./Event");
23
- var AddCustomEvent = /** @class */ (function (_super) {
24
- __extends(AddCustomEvent, _super);
25
- function AddCustomEvent(_a) {
26
- var event_type = _a.event_type, event_value = _a.event_value, item_id = _a.item_id, url = _a.url, ref = _a.ref, recommendation_id = _a.recommendation_id, from = _a.from, event_properties = _a.event_properties, _b = _a.timestamp, timestamp = _b === void 0 ? (0, helper_1.getCurrentUnixTimestamp)() : _b;
27
- return _super.call(this, {
28
- event_type: event_type,
29
- event_value: event_value,
30
- item_id: item_id,
31
- recommendation_id: recommendation_id,
32
- from: from,
33
- url: url,
34
- ref: ref,
35
- event_properties: event_properties,
36
- timestamp: timestamp
37
- }) || this;
1
+ import { Event } from "./Event";
2
+ export class AddCustomEvent extends Event {
3
+ constructor({ event_type, event_value, item_id, event_properties, }) {
4
+ super({
5
+ event_type,
6
+ event_value,
7
+ item_id,
8
+ event_properties,
9
+ });
38
10
  }
39
- return AddCustomEvent;
40
- }(Event_1.Event));
41
- exports.AddCustomEvent = AddCustomEvent;
42
- //# sourceMappingURL=AddCustomEvent.js.map
43
- //# debugId=c4e6e4f0-7af4-5444-a5fc-429a18e381cd
11
+ }
12
+ //# sourceMappingURL=AddCustomEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddCustomEvent.js","sources":["events/AddCustomEvent.ts"],"sourceRoot":"/","sourcesContent":["import { IAddCustomEvent } from \"./types\";\nimport { getCurrentUnixTimestamp } from \"../utils/helper\";\nimport { Event } from \"./Event\";\n\nexport class AddCustomEvent extends Event {\n constructor({\n event_type,\n event_value,\n item_id,\n url,\n ref,\n recommendation_id,\n from,\n event_properties,\n timestamp = getCurrentUnixTimestamp(),\n }: IAddCustomEvent) {\n super({\n event_type,\n event_value,\n item_id,\n recommendation_id,\n from,\n url,\n ref,\n event_properties,\n timestamp,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,0CAA0D;AAC1D,iCAAgC;AAEhC;IAAoC,kCAAK;IACvC,wBAAY,EAUM;YAThB,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,GAAG,SAAA,EACH,GAAG,SAAA,EACH,iBAAiB,uBAAA,EACjB,IAAI,UAAA,EACJ,gBAAgB,sBAAA,EAChB,iBAAqC,EAArC,SAAS,mBAAG,IAAA,gCAAuB,GAAE,KAAA;eAErC,kBAAM;YACJ,UAAU,YAAA;YACV,WAAW,aAAA;YACX,OAAO,SAAA;YACP,iBAAiB,mBAAA;YACjB,IAAI,MAAA;YACJ,GAAG,KAAA;YACH,GAAG,KAAA;YACH,gBAAgB,kBAAA;YAChB,SAAS,WAAA;SACV,CAAC;IACJ,CAAC;IACH,qBAAC;AAAD,CAAC,AAxBD,CAAoC,aAAK,GAwBxC;AAxBY,wCAAc","debug_id":"c4e6e4f0-7af4-5444-a5fc-429a18e381cd"}
1
+ {"version":3,"file":"AddCustomEvent.js","sourceRoot":"/","sources":["events/AddCustomEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,EACV,UAAU,EACV,WAAW,EACX,OAAO,EACP,gBAAgB,GACA;QAChB,KAAK,CAAC;YACJ,UAAU;YACV,WAAW;YACX,OAAO;YACP,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddCustomEvent } from \"./types\";\nimport { Event } from \"./Event\";\n\nexport class AddCustomEvent extends Event {\n constructor({\n event_type,\n event_value,\n item_id,\n event_properties,\n }: IAddCustomEvent) {\n super({\n event_type,\n event_value,\n item_id,\n event_properties,\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { IAddLikeEvent } from "./types";
1
+ import type { IAddLikeEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddLikeEvent extends Event {
4
- constructor({ item_id, url, ref, recommendation_id, from, event_properties, timestamp, }: IAddLikeEvent);
4
+ constructor({ item_id, event_properties }: IAddLikeEvent);
5
5
  }
@@ -1,42 +1,11 @@
1
- "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="226f6692-4dd7-529f-a54c-5313b1a3e0f9")}catch(e){}}();
3
-
4
- var __extends = (this && this.__extends) || (function () {
5
- var extendStatics = function (d, b) {
6
- extendStatics = Object.setPrototypeOf ||
7
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9
- return extendStatics(d, b);
10
- };
11
- return function (d, b) {
12
- if (typeof b !== "function" && b !== null)
13
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- exports.__esModule = true;
20
- exports.AddLikeEvent = void 0;
21
- var helper_1 = require("../utils/helper");
22
- var Event_1 = require("./Event");
23
- var AddLikeEvent = /** @class */ (function (_super) {
24
- __extends(AddLikeEvent, _super);
25
- function AddLikeEvent(_a) {
26
- var item_id = _a.item_id, url = _a.url, ref = _a.ref, recommendation_id = _a.recommendation_id, from = _a.from, event_properties = _a.event_properties, _b = _a.timestamp, timestamp = _b === void 0 ? (0, helper_1.getCurrentUnixTimestamp)() : _b;
27
- return _super.call(this, {
1
+ import { Event } from "./Event";
2
+ export class AddLikeEvent extends Event {
3
+ constructor({ item_id, event_properties }) {
4
+ super({
28
5
  event_type: "like",
29
- item_id: item_id,
30
- url: url,
31
- ref: ref,
32
- recommendation_id: recommendation_id,
33
- from: from,
34
- event_properties: event_properties,
35
- timestamp: timestamp
36
- }) || this;
6
+ item_id,
7
+ event_properties,
8
+ });
37
9
  }
38
- return AddLikeEvent;
39
- }(Event_1.Event));
40
- exports.AddLikeEvent = AddLikeEvent;
41
- //# sourceMappingURL=AddLikeEvent.js.map
42
- //# debugId=226f6692-4dd7-529f-a54c-5313b1a3e0f9
10
+ }
11
+ //# sourceMappingURL=AddLikeEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddLikeEvent.js","sources":["events/AddLikeEvent.ts"],"sourceRoot":"/","sourcesContent":["import { IAddLikeEvent } from \"./types\";\nimport { getCurrentUnixTimestamp } from \"../utils/helper\";\nimport { Event } from \"./Event\";\n\nexport class AddLikeEvent extends Event {\n constructor({\n item_id,\n url,\n ref,\n recommendation_id,\n from,\n event_properties,\n timestamp = getCurrentUnixTimestamp(),\n }: IAddLikeEvent) {\n super({\n event_type: \"like\",\n item_id,\n url,\n ref,\n recommendation_id,\n from,\n event_properties,\n timestamp,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,0CAA0D;AAC1D,iCAAgC;AAEhC;IAAkC,gCAAK;IACrC,sBAAY,EAQI;YAPd,OAAO,aAAA,EACP,GAAG,SAAA,EACH,GAAG,SAAA,EACH,iBAAiB,uBAAA,EACjB,IAAI,UAAA,EACJ,gBAAgB,sBAAA,EAChB,iBAAqC,EAArC,SAAS,mBAAG,IAAA,gCAAuB,GAAE,KAAA;eAErC,kBAAM;YACJ,UAAU,EAAE,MAAM;YAClB,OAAO,SAAA;YACP,GAAG,KAAA;YACH,GAAG,KAAA;YACH,iBAAiB,mBAAA;YACjB,IAAI,MAAA;YACJ,gBAAgB,kBAAA;YAChB,SAAS,WAAA;SACV,CAAC;IACJ,CAAC;IACH,mBAAC;AAAD,CAAC,AArBD,CAAkC,aAAK,GAqBtC;AArBY,oCAAY","debug_id":"226f6692-4dd7-529f-a54c-5313b1a3e0f9"}
1
+ {"version":3,"file":"AddLikeEvent.js","sourceRoot":"/","sources":["events/AddLikeEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAiB;QACtD,KAAK,CAAC;YACJ,UAAU,EAAE,MAAM;YAClB,OAAO;YACP,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddLikeEvent } from \"./types\";\nimport { Event } from \"./Event\";\n\nexport class AddLikeEvent extends Event {\n constructor({ item_id, event_properties }: IAddLikeEvent) {\n super({\n event_type: \"like\",\n item_id,\n event_properties,\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { IAddPageViewEvent } from "./types";
1
+ import type { IAddPageViewEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddPageViewEvent extends Event {
4
- constructor({ url, ref, pageType, event_properties, timestamp, }: IAddPageViewEvent);
4
+ constructor({ pageType, event_properties }: IAddPageViewEvent);
5
5
  }
@@ -1,40 +1,11 @@
1
- "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="20faf371-64c6-5c1e-bf74-06278aeac8c3")}catch(e){}}();
3
-
4
- var __extends = (this && this.__extends) || (function () {
5
- var extendStatics = function (d, b) {
6
- extendStatics = Object.setPrototypeOf ||
7
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9
- return extendStatics(d, b);
10
- };
11
- return function (d, b) {
12
- if (typeof b !== "function" && b !== null)
13
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- exports.__esModule = true;
20
- exports.AddPageViewEvent = void 0;
21
- var helper_1 = require("../utils/helper");
22
- var Event_1 = require("./Event");
23
- var AddPageViewEvent = /** @class */ (function (_super) {
24
- __extends(AddPageViewEvent, _super);
25
- function AddPageViewEvent(_a) {
26
- var url = _a.url, ref = _a.ref, pageType = _a.pageType, event_properties = _a.event_properties, _b = _a.timestamp, timestamp = _b === void 0 ? (0, helper_1.getCurrentUnixTimestamp)() : _b;
27
- return _super.call(this, {
1
+ import { Event } from "./Event";
2
+ export class AddPageViewEvent extends Event {
3
+ constructor({ pageType, event_properties }) {
4
+ super({
28
5
  event_type: "page_view",
29
- url: url,
30
- ref: ref,
31
- from: pageType,
32
- event_properties: event_properties,
33
- timestamp: timestamp
34
- }) || this;
6
+ event_value: pageType,
7
+ event_properties,
8
+ });
35
9
  }
36
- return AddPageViewEvent;
37
- }(Event_1.Event));
38
- exports.AddPageViewEvent = AddPageViewEvent;
39
- //# sourceMappingURL=AddPageViewEvent.js.map
40
- //# debugId=20faf371-64c6-5c1e-bf74-06278aeac8c3
10
+ }
11
+ //# sourceMappingURL=AddPageViewEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddPageViewEvent.js","sources":["events/AddPageViewEvent.ts"],"sourceRoot":"/","sourcesContent":["import { IAddPageViewEvent } from \"./types\";\nimport { getCurrentUnixTimestamp } from \"../utils/helper\";\nimport { Event } from \"./Event\";\n\nexport class AddPageViewEvent extends Event {\n constructor({\n url,\n ref,\n pageType,\n event_properties,\n timestamp = getCurrentUnixTimestamp(),\n }: IAddPageViewEvent) {\n super({\n event_type: \"page_view\",\n url,\n ref,\n from: pageType,\n event_properties,\n timestamp,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,0CAA0D;AAC1D,iCAAgC;AAEhC;IAAsC,oCAAK;IACzC,0BAAY,EAMQ;YALlB,GAAG,SAAA,EACH,GAAG,SAAA,EACH,QAAQ,cAAA,EACR,gBAAgB,sBAAA,EAChB,iBAAqC,EAArC,SAAS,mBAAG,IAAA,gCAAuB,GAAE,KAAA;eAErC,kBAAM;YACJ,UAAU,EAAE,WAAW;YACvB,GAAG,KAAA;YACH,GAAG,KAAA;YACH,IAAI,EAAE,QAAQ;YACd,gBAAgB,kBAAA;YAChB,SAAS,WAAA;SACV,CAAC;IACJ,CAAC;IACH,uBAAC;AAAD,CAAC,AAjBD,CAAsC,aAAK,GAiB1C;AAjBY,4CAAgB","debug_id":"20faf371-64c6-5c1e-bf74-06278aeac8c3"}
1
+ {"version":3,"file":"AddPageViewEvent.js","sourceRoot":"/","sources":["events/AddPageViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,EAAE,QAAQ,EAAE,gBAAgB,EAAqB;QAC3D,KAAK,CAAC;YACJ,UAAU,EAAE,WAAW;YACvB,WAAW,EAAE,QAAQ;YACrB,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddPageViewEvent } from \"./types\";\nimport { Event } from \"./Event\";\n\nexport class AddPageViewEvent extends Event {\n constructor({ pageType, event_properties }: IAddPageViewEvent) {\n super({\n event_type: \"page_view\",\n event_value: pageType,\n event_properties,\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { IAddProductDetailViewEvent } from "./types";
1
+ import type { IAddProductDetailViewEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddProductDetailViewEvent extends Event {
4
- constructor({ item_id, url, ref, recommendation_id, from, event_properties, timestamp, }: IAddProductDetailViewEvent);
4
+ constructor({ item_id, event_properties }: IAddProductDetailViewEvent);
5
5
  }
@@ -1,42 +1,12 @@
1
- "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c9bf6757-5e86-5733-a4c4-3be4ac06377d")}catch(e){}}();
3
-
4
- var __extends = (this && this.__extends) || (function () {
5
- var extendStatics = function (d, b) {
6
- extendStatics = Object.setPrototypeOf ||
7
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9
- return extendStatics(d, b);
10
- };
11
- return function (d, b) {
12
- if (typeof b !== "function" && b !== null)
13
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- exports.__esModule = true;
20
- exports.AddProductDetailViewEvent = void 0;
21
- var helper_1 = require("../utils/helper");
22
- var Event_1 = require("./Event");
23
- var AddProductDetailViewEvent = /** @class */ (function (_super) {
24
- __extends(AddProductDetailViewEvent, _super);
25
- function AddProductDetailViewEvent(_a) {
26
- var item_id = _a.item_id, url = _a.url, ref = _a.ref, recommendation_id = _a.recommendation_id, from = _a.from, event_properties = _a.event_properties, _b = _a.timestamp, timestamp = _b === void 0 ? (0, helper_1.getCurrentUnixTimestamp)() : _b;
27
- return _super.call(this, {
28
- event_type: "product_detail_view",
29
- item_id: item_id,
30
- url: url,
31
- ref: ref,
32
- recommendation_id: recommendation_id,
33
- from: from,
34
- event_properties: event_properties,
35
- timestamp: timestamp
36
- }) || this;
1
+ import { Event } from "./Event";
2
+ import { EventType } from "@blux.ai/common";
3
+ export class AddProductDetailViewEvent extends Event {
4
+ constructor({ item_id, event_properties }) {
5
+ super({
6
+ event_type: EventType.product_detail_view,
7
+ item_id,
8
+ event_properties,
9
+ });
37
10
  }
38
- return AddProductDetailViewEvent;
39
- }(Event_1.Event));
40
- exports.AddProductDetailViewEvent = AddProductDetailViewEvent;
41
- //# sourceMappingURL=AddProductDetailViewEvent.js.map
42
- //# debugId=c9bf6757-5e86-5733-a4c4-3be4ac06377d
11
+ }
12
+ //# sourceMappingURL=AddProductDetailViewEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddProductDetailViewEvent.js","sources":["events/AddProductDetailViewEvent.ts"],"sourceRoot":"/","sourcesContent":["import { IAddProductDetailViewEvent } from \"./types\";\nimport { getCurrentUnixTimestamp } from \"../utils/helper\";\nimport { Event } from \"./Event\";\n\nexport class AddProductDetailViewEvent extends Event {\n constructor({\n item_id,\n url,\n ref,\n recommendation_id,\n from,\n event_properties,\n timestamp = getCurrentUnixTimestamp(),\n }: IAddProductDetailViewEvent) {\n super({\n event_type: \"product_detail_view\",\n item_id,\n url,\n ref,\n recommendation_id,\n from,\n event_properties,\n timestamp,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,0CAA0D;AAC1D,iCAAgC;AAEhC;IAA+C,6CAAK;IAClD,mCAAY,EAQiB;YAP3B,OAAO,aAAA,EACP,GAAG,SAAA,EACH,GAAG,SAAA,EACH,iBAAiB,uBAAA,EACjB,IAAI,UAAA,EACJ,gBAAgB,sBAAA,EAChB,iBAAqC,EAArC,SAAS,mBAAG,IAAA,gCAAuB,GAAE,KAAA;eAErC,kBAAM;YACJ,UAAU,EAAE,qBAAqB;YACjC,OAAO,SAAA;YACP,GAAG,KAAA;YACH,GAAG,KAAA;YACH,iBAAiB,mBAAA;YACjB,IAAI,MAAA;YACJ,gBAAgB,kBAAA;YAChB,SAAS,WAAA;SACV,CAAC;IACJ,CAAC;IACH,gCAAC;AAAD,CAAC,AArBD,CAA+C,aAAK,GAqBnD;AArBY,8DAAyB","debug_id":"c9bf6757-5e86-5733-a4c4-3be4ac06377d"}
1
+ {"version":3,"file":"AddProductDetailViewEvent.js","sourceRoot":"/","sources":["events/AddProductDetailViewEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAA8B;QACnE,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,mBAAmB;YACzC,OAAO;YACP,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddProductDetailViewEvent } from \"./types\";\nimport { Event } from \"./Event\";\nimport { EventType } from \"@blux.ai/common\";\n\nexport class AddProductDetailViewEvent extends Event {\n constructor({ item_id, event_properties }: IAddProductDetailViewEvent) {\n super({\n event_type: EventType.product_detail_view,\n item_id,\n event_properties,\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { IAddPurchaseEvent } from "./types";
1
+ import type { IAddPurchaseEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddPurchaseEvent extends Event {
4
- constructor({ item_id, price, url, ref, event_properties, timestamp, }: IAddPurchaseEvent);
4
+ constructor({ item_id, price, event_properties }: IAddPurchaseEvent);
5
5
  }
@@ -1,41 +1,13 @@
1
- "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="05f7be17-19c7-541d-ab08-08ad0e90289f")}catch(e){}}();
3
-
4
- var __extends = (this && this.__extends) || (function () {
5
- var extendStatics = function (d, b) {
6
- extendStatics = Object.setPrototypeOf ||
7
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9
- return extendStatics(d, b);
10
- };
11
- return function (d, b) {
12
- if (typeof b !== "function" && b !== null)
13
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- exports.__esModule = true;
20
- exports.AddPurchaseEvent = void 0;
21
- var helper_1 = require("../utils/helper");
22
- var Event_1 = require("./Event");
23
- var AddPurchaseEvent = /** @class */ (function (_super) {
24
- __extends(AddPurchaseEvent, _super);
25
- function AddPurchaseEvent(_a) {
26
- var item_id = _a.item_id, price = _a.price, url = _a.url, ref = _a.ref, event_properties = _a.event_properties, _b = _a.timestamp, timestamp = _b === void 0 ? (0, helper_1.getCurrentUnixTimestamp)() : _b;
27
- return _super.call(this, {
28
- event_type: "purchase",
29
- item_id: item_id,
1
+ import { Event } from "./Event";
2
+ import { EventType } from "@blux.ai/common";
3
+ export class AddPurchaseEvent extends Event {
4
+ constructor({ item_id, price, event_properties }) {
5
+ super({
6
+ event_type: EventType.purchase,
7
+ item_id,
30
8
  event_value: price.toString(),
31
- url: url,
32
- ref: ref,
33
- event_properties: event_properties,
34
- timestamp: timestamp
35
- }) || this;
9
+ event_properties,
10
+ });
36
11
  }
37
- return AddPurchaseEvent;
38
- }(Event_1.Event));
39
- exports.AddPurchaseEvent = AddPurchaseEvent;
40
- //# sourceMappingURL=AddPurchaseEvent.js.map
41
- //# debugId=05f7be17-19c7-541d-ab08-08ad0e90289f
12
+ }
13
+ //# sourceMappingURL=AddPurchaseEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddPurchaseEvent.js","sources":["events/AddPurchaseEvent.ts"],"sourceRoot":"/","sourcesContent":["import { IAddPurchaseEvent } from \"./types\";\nimport { getCurrentUnixTimestamp } from \"../utils/helper\";\nimport { Event } from \"./Event\";\n\nexport class AddPurchaseEvent extends Event {\n constructor({\n item_id,\n price,\n url,\n ref,\n event_properties,\n timestamp = getCurrentUnixTimestamp(),\n }: IAddPurchaseEvent) {\n super({\n event_type: \"purchase\",\n item_id,\n event_value: price.toString(),\n url,\n ref,\n event_properties,\n timestamp,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,0CAA0D;AAC1D,iCAAgC;AAEhC;IAAsC,oCAAK;IACzC,0BAAY,EAOQ;YANlB,OAAO,aAAA,EACP,KAAK,WAAA,EACL,GAAG,SAAA,EACH,GAAG,SAAA,EACH,gBAAgB,sBAAA,EAChB,iBAAqC,EAArC,SAAS,mBAAG,IAAA,gCAAuB,GAAE,KAAA;eAErC,kBAAM;YACJ,UAAU,EAAE,UAAU;YACtB,OAAO,SAAA;YACP,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE;YAC7B,GAAG,KAAA;YACH,GAAG,KAAA;YACH,gBAAgB,kBAAA;YAChB,SAAS,WAAA;SACV,CAAC;IACJ,CAAC;IACH,uBAAC;AAAD,CAAC,AAnBD,CAAsC,aAAK,GAmB1C;AAnBY,4CAAgB","debug_id":"05f7be17-19c7-541d-ab08-08ad0e90289f"}
1
+ {"version":3,"file":"AddPurchaseEvent.js","sourceRoot":"/","sources":["events/AddPurchaseEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAqB;QACjE,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,QAAQ;YAC9B,OAAO;YACP,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE;YAC7B,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddPurchaseEvent } from \"./types\";\nimport { Event } from \"./Event\";\nimport { EventType } from \"@blux.ai/common\";\n\nexport class AddPurchaseEvent extends Event {\n constructor({ item_id, price, event_properties }: IAddPurchaseEvent) {\n super({\n event_type: EventType.purchase,\n item_id,\n event_value: price.toString(),\n event_properties,\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { IAddRateEvent } from "./types";
1
+ import type { IAddRateEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddRateEvent extends Event {
4
- constructor({ item_id, rating, url, ref, recommendation_id, from, event_properties, timestamp, }: IAddRateEvent);
4
+ constructor({ item_id, rating, event_properties }: IAddRateEvent);
5
5
  }