@repobit/dex-target 1.3.0 → 1.4.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 +90 -0
- package/dist/src/index.d.ts +5 -4
- package/dist/src/index.js +38 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/typeDefinitions.d.ts +26 -1
- package/package.json +10 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [1.4.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@1.4.0...@repobit/dex-target@1.4.1) (2025-03-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **DEX-21085:** add files to package json ([d1fa71f](https://github.com/bitdefender/dex-core/commit/d1fa71f4b89812fa306b7ec0104af52505e87491))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [1.4.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@1.3.0...@repobit/dex-target@1.4.0) (2025-03-26)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **DEX-21820:** added syntasa integration ([a2fb875](https://github.com/bitdefender/dex-core/commit/a2fb8756362b6affbf10b0c8affb390749c8a9df))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [1.3.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@1.2.0...@repobit/dex-target@1.3.0) (2025-03-25)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **DEX-22225:** created the data layer and updated target class ([390f327](https://github.com/bitdefender/dex-core/commit/390f327af376e8c70e37d14c5ffd699f60a17275))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.2.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@1.1.3...@repobit/dex-target@1.2.0) (2025-03-25)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* **DEX-21805:** change jest to vitest ([8219cf8](https://github.com/bitdefender/dex-core/commit/8219cf88cef6c4290783bb80a8142be0195de13e))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [1.1.3](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@1.1.2...@repobit/dex-target@1.1.3) (2025-03-24)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* **DEX-21805:** add jsdom to jest ([c2d1d0b](https://github.com/bitdefender/dex-core/commit/c2d1d0bb0350df4f09f88cf64d3fec59e6a2815d))
|
|
48
|
+
* **DEX-21805:** move build dependecies to root ([e75bb59](https://github.com/bitdefender/dex-core/commit/e75bb59c6c215b6be8167ca136423e577ef10656))
|
|
49
|
+
* **DEX-21805:** update tsconfig for all packages ([01abd44](https://github.com/bitdefender/dex-core/commit/01abd4449f7c950116c3b5b76c6989299ab99aea))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## [1.1.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@1.1.0...@repobit/dex-target@1.1.2) (2025-03-21)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* **DEX-21805:** fix package.json ([487e824](https://github.com/bitdefender/dex-core/commit/487e82449bd5a0e6cd959a509b4f9820952466b6))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# [1.1.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@0.1.1...@repobit/dex-target@1.1.0) (2025-02-28)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Features
|
|
66
|
+
|
|
67
|
+
* **DEX-21820:** bumped up version ([370a920](https://github.com/bitdefender/dex-core/commit/370a920f8e82bb75a71f324b73d841f09b8a942a))
|
|
68
|
+
* **DEX-21820:** changed license in package file ([07a93c4](https://github.com/bitdefender/dex-core/commit/07a93c457a9c2559bf1c3fe60c8ec0e823947370))
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## [0.1.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-target@0.1.0...@repobit/dex-target@0.1.1) (2025-02-28)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @repobit/dex-target
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# 0.1.0 (2025-02-28)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Features
|
|
86
|
+
|
|
87
|
+
* **DEX-21820:** added abort controller logic to target package ([44429ed](https://github.com/bitdefender/dex-core/commit/44429ede0c102b22a522488328b5cef5c856e878))
|
|
88
|
+
* **DEX-21820:** added correct npm package organisation ([9dd27bf](https://github.com/bitdefender/dex-core/commit/9dd27bfaee52f3396cdd5a8fdefd3c1adbb0aad0))
|
|
89
|
+
* **DEX-21820:** added license ([853e965](https://github.com/bitdefender/dex-core/commit/853e965455613e97ee920694521d88c01f9dcf57))
|
|
90
|
+
* **DEX-21820:** updated the package docs and package-lock ([c70c000](https://github.com/bitdefender/dex-core/commit/c70c000492903242f34a2b5a42fc2699ba6664f6))
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { AlloyFunction, ConfigMbox, MboxParameters, MboxProfileParameters } from "./typeDefinitions.js";
|
|
1
|
+
import { AlloyFunction, ConfigMbox, GetIdentityResponse, MboxParameters, MboxProfileParameters } from "./typeDefinitions.js";
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
alloyProxy: AlloyFunction;
|
|
5
|
-
BD: {
|
|
6
|
-
Target: Target;
|
|
7
|
-
};
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
7
|
export default abstract class Target {
|
|
@@ -12,6 +9,8 @@ export default abstract class Target {
|
|
|
12
9
|
private static cachedMboxes;
|
|
13
10
|
private static _configMbox;
|
|
14
11
|
private static controller;
|
|
12
|
+
private static _visitorInfo;
|
|
13
|
+
private static cdpData;
|
|
15
14
|
/** get an object containing all the url query parameters */
|
|
16
15
|
private static getUrlParameters;
|
|
17
16
|
static get configMbox(): Promise<Partial<{
|
|
@@ -31,10 +30,12 @@ export default abstract class Target {
|
|
|
31
30
|
};
|
|
32
31
|
useGeoIpPricing: boolean;
|
|
33
32
|
}> | undefined>;
|
|
33
|
+
static get visitorInfo(): Promise<GetIdentityResponse>;
|
|
34
34
|
/** add adobe_mc parameter at the end of the url */
|
|
35
35
|
static appendVisitorIDsTo(url: string): Promise<string>;
|
|
36
36
|
/** abort all the Target calls for casese where Target does not load */
|
|
37
37
|
static abort(): void;
|
|
38
|
+
private static getCdpData;
|
|
38
39
|
static getOffers(param: {
|
|
39
40
|
mboxNames: "config-mbox";
|
|
40
41
|
parameters?: MboxParameters;
|
package/dist/src/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { AdobeDataLayerService, CdpEvent } from "@repobit/dex-data-layer";
|
|
2
|
+
import { Constants } from "@repobit/dex-utils";
|
|
3
|
+
const w = window;
|
|
1
4
|
export default class Target {
|
|
2
5
|
static urlParameters = this.getUrlParameters();
|
|
3
6
|
static cachedMboxes = new Map();
|
|
4
7
|
static _configMbox;
|
|
5
8
|
static controller = new AbortController();
|
|
9
|
+
static _visitorInfo;
|
|
10
|
+
static cdpData = this.getCdpData();
|
|
6
11
|
// initialize the alloyProxy variable on the window
|
|
7
12
|
// this is a mirror of Adobe WebSDK's alloy
|
|
8
13
|
static {
|
|
@@ -16,6 +21,7 @@ export default class Target {
|
|
|
16
21
|
window.alloyProxy.q = [];
|
|
17
22
|
}
|
|
18
23
|
this._configMbox = this.getOffers({ mboxNames: 'config-mbox' });
|
|
24
|
+
this._visitorInfo = window.alloyProxy('getIdentity');
|
|
19
25
|
}
|
|
20
26
|
/** get an object containing all the url query parameters */
|
|
21
27
|
static getUrlParameters() {
|
|
@@ -29,6 +35,9 @@ export default class Target {
|
|
|
29
35
|
static get configMbox() {
|
|
30
36
|
return this._configMbox;
|
|
31
37
|
}
|
|
38
|
+
static get visitorInfo() {
|
|
39
|
+
return this._visitorInfo;
|
|
40
|
+
}
|
|
32
41
|
/** add adobe_mc parameter at the end of the url */
|
|
33
42
|
static async appendVisitorIDsTo(url) {
|
|
34
43
|
if (url.includes('adobe_mc')) {
|
|
@@ -46,10 +55,36 @@ export default class Target {
|
|
|
46
55
|
static abort() {
|
|
47
56
|
this.controller.abort();
|
|
48
57
|
}
|
|
58
|
+
static async getCdpData() {
|
|
59
|
+
try {
|
|
60
|
+
const cdpDataCall = await fetch(`${Constants.PUBLIC_URL_ORIGIN}/cdp/${(await this._visitorInfo).identity.ECID}`);
|
|
61
|
+
const receivedCdpData = await cdpDataCall.json();
|
|
62
|
+
let cdpData = {
|
|
63
|
+
auds: receivedCdpData?.auds[0] || ''
|
|
64
|
+
};
|
|
65
|
+
if (receivedCdpData.mdl) {
|
|
66
|
+
cdpData = receivedCdpData?.mdl.reduce((acc, mdlValue) => {
|
|
67
|
+
acc[mdlValue.key] = mdlValue.value;
|
|
68
|
+
return acc;
|
|
69
|
+
}, cdpData);
|
|
70
|
+
}
|
|
71
|
+
AdobeDataLayerService.push(new CdpEvent(cdpData));
|
|
72
|
+
return cdpData;
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
console.warn(e);
|
|
76
|
+
}
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
49
79
|
static async getOffers(param) {
|
|
50
80
|
if (this.controller.signal?.aborted) {
|
|
51
81
|
return {};
|
|
52
82
|
}
|
|
83
|
+
const cdpData = await this.cdpData;
|
|
84
|
+
const profileCdpData = Object.keys(cdpData).reduce((acc, key) => {
|
|
85
|
+
acc[`profile.${key}`] = cdpData[key];
|
|
86
|
+
return acc;
|
|
87
|
+
}, {});
|
|
53
88
|
let { mboxNames } = param;
|
|
54
89
|
const { parameters, profileParameters } = param;
|
|
55
90
|
if (!Array.isArray(mboxNames)) {
|
|
@@ -61,7 +96,7 @@ export default class Target {
|
|
|
61
96
|
decisionScopes: notRequestedMboxes,
|
|
62
97
|
data: {
|
|
63
98
|
"__adobe": {
|
|
64
|
-
"target": Object.assign({}, this.urlParameters, parameters ? parameters : {}, profileParameters ? profileParameters : {})
|
|
99
|
+
"target": Object.assign({}, this.urlParameters, parameters ? parameters : {}, profileParameters ? profileParameters : {}, cdpData, profileCdpData)
|
|
65
100
|
}
|
|
66
101
|
},
|
|
67
102
|
renderDecisions: true
|
|
@@ -94,6 +129,6 @@ export default class Target {
|
|
|
94
129
|
return mboxNames.length > 1 ? offersResult : offersResult[mboxNames[0]];
|
|
95
130
|
}
|
|
96
131
|
}
|
|
97
|
-
|
|
98
|
-
|
|
132
|
+
w.BD = w.BD || {};
|
|
133
|
+
w.BD.Target = Target;
|
|
99
134
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyB/C,MAAM,CAAC,GAAG,MAEP,CAAA;AAEH,MAAM,CAAC,OAAO,OAAgB,MAAM;IAC1B,MAAM,CAAC,aAAa,GAAkB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC9D,MAAM,CAAC,YAAY,GAA8C,I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= {
|
|
38
41
|
id: string;
|
|
39
42
|
scope: string;
|
|
@@ -84,14 +87,23 @@ export type AlloyAppendIdentityToUrlResponse = {
|
|
|
84
87
|
export type AlloyApplyPropositionsResponse = {
|
|
85
88
|
propositions: AlloyResponsePropositions[];
|
|
86
89
|
};
|
|
90
|
+
export type GetIdentityResponse = {
|
|
91
|
+
edge: {
|
|
92
|
+
regionId: number;
|
|
93
|
+
};
|
|
94
|
+
identity: {
|
|
95
|
+
ECID: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
87
98
|
export type AlloyFunction = {
|
|
88
99
|
(...args: SendEventCall): Promise<AlloySendEventResponse>;
|
|
89
100
|
(...args: AppendIdentityToUrlCall): Promise<AlloyAppendIdentityToUrlResponse>;
|
|
90
101
|
(...args: ApplyPropositionsCall): Promise<AlloyApplyPropositionsResponse>;
|
|
102
|
+
(...args: GetIdentityCall): Promise<GetIdentityResponse>;
|
|
91
103
|
q: Array<[
|
|
92
104
|
resolve: Function,
|
|
93
105
|
reject: Function,
|
|
94
|
-
args: SendEventCall | AppendIdentityToUrlCall | ApplyPropositionsCall
|
|
106
|
+
args: SendEventCall | AppendIdentityToUrlCall | ApplyPropositionsCall | GetIdentityCall
|
|
95
107
|
]>;
|
|
96
108
|
};
|
|
97
109
|
export type ConfigMbox = Partial<{
|
|
@@ -111,4 +123,17 @@ export type ConfigMbox = Partial<{
|
|
|
111
123
|
};
|
|
112
124
|
useGeoIpPricing: boolean;
|
|
113
125
|
}>;
|
|
126
|
+
export type CdpData = {
|
|
127
|
+
auds?: string;
|
|
128
|
+
[key: string]: string | undefined;
|
|
129
|
+
};
|
|
130
|
+
export type CdpDataJson = {
|
|
131
|
+
auds: string[];
|
|
132
|
+
mdl: {
|
|
133
|
+
key: string;
|
|
134
|
+
value: string;
|
|
135
|
+
}[];
|
|
136
|
+
ub: unknown[];
|
|
137
|
+
vid: string;
|
|
138
|
+
};
|
|
114
139
|
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-target",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Client for Adobe Target",
|
|
5
5
|
"author": "Constantin Ioan Mihai <iconstantin@bitdefender.com>",
|
|
6
6
|
"homepage": "https://github.com/bitdefender/dex-core#readme",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/index.js",
|
|
9
9
|
"files": [
|
|
10
|
-
"dist/src"
|
|
10
|
+
"dist/src",
|
|
11
|
+
"README.md",
|
|
12
|
+
"CHANGELOG.md",
|
|
13
|
+
"LICENSE"
|
|
11
14
|
],
|
|
12
15
|
"publishConfig": {
|
|
13
16
|
"access": "public"
|
|
@@ -23,8 +26,12 @@
|
|
|
23
26
|
"bugs": {
|
|
24
27
|
"url": "https://github.com/bitdefender/dex-core/issues"
|
|
25
28
|
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@repobit/dex-data-layer": "0.2.1",
|
|
31
|
+
"@repobit/dex-utils": "0.6.1"
|
|
32
|
+
},
|
|
26
33
|
"module": "dist/src/index.js",
|
|
27
34
|
"type": "module",
|
|
28
35
|
"types": "dist/src/index.d.ts",
|
|
29
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "64dd7dca1e451796a1fafe016b7a8d361523754f"
|
|
30
37
|
}
|