@repobit/dex-data-layer 2.1.11 → 2.2.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.2.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@2.2.0...@repobit/dex-data-layer@2.2.1) (2026-04-14)
7
+
8
+ **Note:** Version bump only for package @repobit/dex-data-layer
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.2.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@2.1.11...@repobit/dex-data-layer@2.2.0) (2026-04-08)
15
+
16
+ ### Features
17
+
18
+ * **DEX-26966:** added getUserVisitorId function in utils
19
+
20
+
6
21
  ## [2.1.11](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@2.1.10...@repobit/dex-data-layer@2.1.11) (2026-04-07)
7
22
 
8
23
  **Note:** Version bump only for package @repobit/dex-data-layer
package/README.md CHANGED
@@ -130,7 +130,7 @@ Important to note: all the product loaded events are stored in a class variable
130
130
  ### Return Type:
131
131
  Returns an instance of `UserDetectedEvent` with:
132
132
  - `event`: Constant string `user detected`.
133
- - `user`: An object that includes user detection details (e.g., login status, unique identifiers).
133
+ - `user`: An object that includes user detection details (e.g., login status, unique identifiers such as the visitorID which can be received from the getUserVisitorId function in the utils package).
134
134
 
135
135
  ## VisitorIdEvent
136
136
  ### Constructor: constructor(visitorId: string)
@@ -10,6 +10,9 @@ export class UserDetectedEvent {
10
10
  if (userData.ID) {
11
11
  this.user.ID = userData.ID;
12
12
  }
13
+ if (userData.visitorID) {
14
+ this.user.visitorID = userData.visitorID;
15
+ }
13
16
  if (emarsysID) {
14
17
  this.user.emarsysID = emarsysID;
15
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":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";\nimport { UserDataCompleteUserObject, UserDataObject } from \"./typeDefinitions\";\n\nexport class UserDetectedEvent {\n event = 'user detected' as const;\n user: UserDataCompleteUserObject;\n\n constructor();\n constructor(page: Page, userData: UserDataObject);\n constructor(page?: Page, userData?: UserDataObject) {\n if (page && userData) {\n const emarsysID = page.getParamValue('ems-uid') || page.getParamValue('sc_uid') || undefined;\n\n this.user = {\n loggedIN: userData.ID ? true : false\n }\n\n if (userData.ID) {\n this.user.ID = userData.ID;\n }\n\n if (emarsysID) {\n this.user.emarsysID = emarsysID;\n }\n\n if (userData.productFinding) {\n this.user.productFinding = userData.productFinding;\n }\n } else {\n // find the existing user detected entry\n const existingUserDetectedEvent = window.adobeDataLayer.find(adobeDataLayerEntry =>\n adobeDataLayerEntry.event === 'user detected'\n ) as UserDetectedEvent;\n\n if (existingUserDetectedEvent) {\n this.user = { ...existingUserDetectedEvent.user };\n } else {\n this.user = { loggedIN: false }\n }\n }\n }\n}"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/user-detected-event/index.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,iBAAiB;IAC5B,KAAK,GAAG,eAAwB,CAAC;IACjC,IAAI,CAA6B;IAIjC,YAAY,IAAW,EAAE,QAAyB;QAChD,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;YACrB,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC;YAE7F,IAAI,CAAC,IAAI,GAAG;gBACV,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;aACrC,CAAA;YAED,IAAI,QAAQ,CAAC,EAAE,EAAE,CAAC;gBAChB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;YAC7B,CAAC;YAED,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;gBACvB,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;YAC3C,CAAC;YAED,IAAI,SAAS,EAAE,CAAC;gBACd,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAClC,CAAC;YAED,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAC5B,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;YACrD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,wCAAwC;YACxC,MAAM,yBAAyB,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CACjF,mBAAmB,CAAC,KAAK,KAAK,eAAe,CACzB,CAAC;YAEvB,IAAI,yBAAyB,EAAE,CAAC;gBAC9B,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,yBAAyB,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,IAAI,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;YACjC,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import { Page } from \"@repobit/dex-utils\";\nimport { UserDataCompleteUserObject, UserDataObject } from \"./typeDefinitions\";\n\nexport class UserDetectedEvent {\n event = 'user detected' as const;\n user: UserDataCompleteUserObject;\n\n constructor();\n constructor(page: Page, userData: UserDataObject);\n constructor(page?: Page, userData?: UserDataObject) {\n if (page && userData) {\n const emarsysID = page.getParamValue('ems-uid') || page.getParamValue('sc_uid') || undefined;\n\n this.user = {\n loggedIN: userData.ID ? true : false\n }\n\n if (userData.ID) {\n this.user.ID = userData.ID;\n }\n\n if (userData.visitorID) {\n this.user.visitorID = userData.visitorID;\n }\n\n if (emarsysID) {\n this.user.emarsysID = emarsysID;\n }\n\n if (userData.productFinding) {\n this.user.productFinding = userData.productFinding;\n }\n } else {\n // find the existing user detected entry\n const existingUserDetectedEvent = window.adobeDataLayer.find(adobeDataLayerEntry =>\n adobeDataLayerEntry.event === 'user detected'\n ) as UserDetectedEvent;\n\n if (existingUserDetectedEvent) {\n this.user = { ...existingUserDetectedEvent.user };\n } else {\n this.user = { loggedIN: false }\n }\n }\n }\n}"]}
@@ -1,10 +1,12 @@
1
1
  export type UserDataObject = {
2
2
  ID?: string;
3
3
  productFinding?: string;
4
+ visitorID?: string;
4
5
  };
5
6
  export type UserDataCompleteUserObject = {
6
7
  loggedIN: boolean;
7
8
  emarsysID?: string;
8
9
  ID?: string;
9
10
  productFinding?: string;
11
+ visitorID?: string;
10
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"typeDefinitions.js","sourceRoot":"","sources":["../../../../src/events/user-detected-event/typeDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["export type UserDataObject = {\n ID ?: string,\n productFinding?: string\n};\n\nexport type UserDataCompleteUserObject = {\n loggedIN : boolean,\n emarsysID ?: string,\n ID ?: string,\n productFinding?: string\n}"]}
1
+ {"version":3,"file":"typeDefinitions.js","sourceRoot":"","sources":["../../../../src/events/user-detected-event/typeDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["export type UserDataObject = {\n ID ?: string,\n productFinding?: string,\n visitorID ?: string,\n};\n\nexport type UserDataCompleteUserObject = {\n loggedIN : boolean,\n emarsysID ?: string,\n ID ?: string,\n productFinding?: string,\n visitorID ?: string,\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-data-layer",
3
- "version": "2.1.11",
3
+ "version": "2.2.1",
4
4
  "description": "Client for Adobe Data Layer",
5
5
  "author": "Constantin Ioan Mihai <iconstantin@bitdefender.com>",
6
6
  "homepage": "https://github.com/bitdefender/dex-core#readme",
@@ -30,9 +30,9 @@
30
30
  "type": "module",
31
31
  "types": "dist/src/index.d.ts",
32
32
  "dependencies": {
33
- "@repobit/dex-constants": "^2.0.1",
33
+ "@repobit/dex-constants": "^2.1.1",
34
34
  "@repobit/dex-store": "^0.3.0",
35
- "@repobit/dex-utils": "^2.1.12"
35
+ "@repobit/dex-utils": "^2.2.1"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "deepmerge": "^4.3.1"
@@ -40,5 +40,5 @@
40
40
  "volta": {
41
41
  "node": "24.14.0"
42
42
  },
43
- "gitHead": "77c8ab28da3c9d43bbc05c832d847eeb3561760c"
43
+ "gitHead": "b5e5567f6d68800a73154c9da2e4a3023eb18945"
44
44
  }