@walkeros/web-source-cmp-usercentrics 4.2.0 → 4.2.1-next-1781526381392
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 +14 -0
- package/README.md +36 -3
- package/dist/dev.d.mts +69 -50
- package/dist/dev.d.ts +69 -50
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.d.mts +65 -43
- package/dist/examples/index.d.ts +65 -43
- package/dist/examples/index.js +101 -180
- package/dist/examples/index.mjs +97 -172
- package/dist/index.browser.js +1 -1
- package/dist/index.d.mts +25 -16
- package/dist/index.d.ts +25 -16
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/walkerOS.json +439 -140
- package/package.json +3 -3
package/dist/examples/index.js
CHANGED
|
@@ -22,100 +22,77 @@ var examples_exports = {};
|
|
|
22
22
|
__export(examples_exports, {
|
|
23
23
|
createMockElbFn: () => createMockElbFn,
|
|
24
24
|
createTrigger: () => createTrigger,
|
|
25
|
-
fullConsent: () => fullConsent,
|
|
26
25
|
fullConsentCustomMapped: () => fullConsentCustomMapped,
|
|
27
26
|
fullConsentMapped: () => fullConsentMapped,
|
|
28
|
-
fullConsentUpperCase: () => fullConsentUpperCase,
|
|
29
|
-
implicitConsent: () => implicitConsent,
|
|
30
|
-
minimalConsent: () => minimalConsent,
|
|
31
27
|
minimalConsentMapped: () => minimalConsentMapped,
|
|
32
|
-
nonConsentEvent: () => nonConsentEvent,
|
|
33
28
|
noopLogger: () => noopLogger,
|
|
34
|
-
partialConsent: () => partialConsent,
|
|
35
29
|
partialConsentMapped: () => partialConsentMapped,
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
servicesFirstVisitImplicit: () => servicesFirstVisitImplicit,
|
|
31
|
+
servicesFullExplicit: () => servicesFullExplicit,
|
|
32
|
+
servicesMinimalExplicit: () => servicesMinimalExplicit,
|
|
33
|
+
servicesPartialExplicit: () => servicesPartialExplicit,
|
|
38
34
|
step: () => step_exports,
|
|
39
35
|
trigger: () => trigger
|
|
40
36
|
});
|
|
41
37
|
module.exports = __toCommonJS(examples_exports);
|
|
42
38
|
|
|
43
39
|
// src/examples/inputs.ts
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
ucCategory: {
|
|
49
|
-
essential: true,
|
|
50
|
-
functional: true,
|
|
51
|
-
marketing: true
|
|
40
|
+
var servicesFullExplicit = [
|
|
41
|
+
{
|
|
42
|
+
categorySlug: "essential",
|
|
43
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
52
44
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
var partialConsent = {
|
|
57
|
-
event: "consent_status",
|
|
58
|
-
type: "explicit",
|
|
59
|
-
action: "onUpdateServices",
|
|
60
|
-
ucCategory: {
|
|
61
|
-
essential: true,
|
|
62
|
-
functional: true,
|
|
63
|
-
marketing: false
|
|
45
|
+
{
|
|
46
|
+
categorySlug: "functional",
|
|
47
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
64
48
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
functional: false,
|
|
75
|
-
marketing: false
|
|
49
|
+
{
|
|
50
|
+
categorySlug: "marketing",
|
|
51
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
var servicesMinimalExplicit = [
|
|
55
|
+
{
|
|
56
|
+
categorySlug: "essential",
|
|
57
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
76
58
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
var implicitConsent = {
|
|
81
|
-
event: "consent_status",
|
|
82
|
-
type: "implicit",
|
|
83
|
-
ucCategory: {
|
|
84
|
-
essential: true,
|
|
85
|
-
functional: false,
|
|
86
|
-
marketing: false
|
|
59
|
+
{
|
|
60
|
+
categorySlug: "functional",
|
|
61
|
+
consent: { status: false, history: [{ type: "explicit", status: false }] }
|
|
87
62
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
var fullConsentUpperCase = {
|
|
92
|
-
event: "consent_status",
|
|
93
|
-
type: "EXPLICIT",
|
|
94
|
-
action: "onAcceptAllServices",
|
|
95
|
-
ucCategory: {
|
|
96
|
-
essential: true,
|
|
97
|
-
functional: true,
|
|
98
|
-
marketing: true
|
|
63
|
+
{
|
|
64
|
+
categorySlug: "marketing",
|
|
65
|
+
consent: { status: false, history: [{ type: "explicit", status: false }] }
|
|
99
66
|
}
|
|
100
|
-
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
ucCategory: {
|
|
106
|
-
essential: true,
|
|
107
|
-
functional: "partial",
|
|
108
|
-
// Non-boolean indicates mixed service choices
|
|
109
|
-
marketing: "partial"
|
|
67
|
+
];
|
|
68
|
+
var servicesPartialExplicit = [
|
|
69
|
+
{
|
|
70
|
+
categorySlug: "essential",
|
|
71
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
110
72
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
73
|
+
{
|
|
74
|
+
categorySlug: "functional",
|
|
75
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
categorySlug: "marketing",
|
|
79
|
+
consent: { status: false, history: [{ type: "explicit", status: false }] }
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
var servicesFirstVisitImplicit = [
|
|
83
|
+
{
|
|
84
|
+
categorySlug: "essential",
|
|
85
|
+
consent: { status: true, history: [{ type: "implicit", status: true }] }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
categorySlug: "functional",
|
|
89
|
+
consent: { status: false, history: [{ type: "implicit", status: false }] }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
categorySlug: "marketing",
|
|
93
|
+
consent: { status: false, history: [{ type: "implicit", status: false }] }
|
|
94
|
+
}
|
|
95
|
+
];
|
|
119
96
|
|
|
120
97
|
// src/examples/outputs.ts
|
|
121
98
|
var fullConsentMapped = {
|
|
@@ -135,14 +112,9 @@ var minimalConsentMapped = {
|
|
|
135
112
|
};
|
|
136
113
|
var fullConsentCustomMapped = {
|
|
137
114
|
functional: true,
|
|
115
|
+
analytics: true,
|
|
138
116
|
marketing: true
|
|
139
117
|
};
|
|
140
|
-
var serviceLevelMapped = {
|
|
141
|
-
essential: true,
|
|
142
|
-
google_analytics: true,
|
|
143
|
-
google_ads_remarketing: false,
|
|
144
|
-
hotjar: true
|
|
145
|
-
};
|
|
146
118
|
|
|
147
119
|
// src/examples/env.ts
|
|
148
120
|
var noop = () => {
|
|
@@ -169,115 +141,68 @@ var noopLogger = {
|
|
|
169
141
|
var step_exports = {};
|
|
170
142
|
__export(step_exports, {
|
|
171
143
|
categoryMapOverride: () => categoryMapOverride,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
144
|
+
consentChange: () => consentChange,
|
|
145
|
+
firstVisitImplicit: () => firstVisitImplicit,
|
|
146
|
+
fullConsent: () => fullConsent,
|
|
147
|
+
minimalConsent: () => minimalConsent,
|
|
148
|
+
returningVisitor: () => returningVisitor
|
|
175
149
|
});
|
|
176
|
-
var
|
|
150
|
+
var fullConsent = {
|
|
177
151
|
title: "Full consent",
|
|
178
|
-
description: "
|
|
179
|
-
trigger: { type: "consent" },
|
|
180
|
-
in:
|
|
181
|
-
|
|
182
|
-
type: "explicit",
|
|
183
|
-
action: "onAcceptAllServices",
|
|
184
|
-
ucCategory: {
|
|
185
|
-
essential: true,
|
|
186
|
-
functional: true,
|
|
187
|
-
marketing: true
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
out: [
|
|
191
|
-
[
|
|
192
|
-
"elb",
|
|
193
|
-
"walker consent",
|
|
194
|
-
{
|
|
195
|
-
essential: true,
|
|
196
|
-
functional: true,
|
|
197
|
-
marketing: true
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
]
|
|
152
|
+
description: "Usercentrics reports every category accepted via an explicit decision; the source emits a walker consent command granting essential, functional, and marketing.",
|
|
153
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
154
|
+
in: servicesFullExplicit,
|
|
155
|
+
out: [["elb", "walker consent", fullConsentMapped]]
|
|
201
156
|
};
|
|
202
|
-
var
|
|
157
|
+
var minimalConsent = {
|
|
203
158
|
title: "Minimal consent",
|
|
204
|
-
description:
|
|
205
|
-
trigger: { type: "consent" },
|
|
206
|
-
in:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
},
|
|
159
|
+
description: 'A "Deny all" explicit decision leaves only essential granted; functional and marketing are emitted as false.',
|
|
160
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
161
|
+
in: servicesMinimalExplicit,
|
|
162
|
+
out: [["elb", "walker consent", minimalConsentMapped]]
|
|
163
|
+
};
|
|
164
|
+
var returningVisitor = {
|
|
165
|
+
title: "Returning visitor static read",
|
|
166
|
+
description: "When the CMP is already initialized with a stored explicit decision, the static read at init re-publishes that choice without any further event.",
|
|
167
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
168
|
+
in: servicesPartialExplicit,
|
|
216
169
|
out: [
|
|
217
170
|
[
|
|
218
171
|
"elb",
|
|
219
172
|
"walker consent",
|
|
220
173
|
{
|
|
221
174
|
essential: true,
|
|
222
|
-
functional:
|
|
175
|
+
functional: true,
|
|
223
176
|
marketing: false
|
|
224
177
|
}
|
|
225
178
|
]
|
|
226
179
|
]
|
|
227
180
|
};
|
|
181
|
+
var firstVisitImplicit = {
|
|
182
|
+
title: "First visit implicit (suppressed)",
|
|
183
|
+
description: "A first-visit snapshot carrying only implicit history is suppressed by the default explicitOnly gate, so no consent command is emitted.",
|
|
184
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
185
|
+
in: servicesFirstVisitImplicit,
|
|
186
|
+
out: []
|
|
187
|
+
};
|
|
188
|
+
var consentChange = {
|
|
189
|
+
title: "Consent change via CMP event",
|
|
190
|
+
description: "An ACCEPT_ALL decision fires UC_UI_CMP_EVENT; the source re-reads the services and emits the updated consent.",
|
|
191
|
+
trigger: { type: "consent", options: { dispatch: "cmp" } },
|
|
192
|
+
in: servicesFullExplicit,
|
|
193
|
+
out: [["elb", "walker consent", fullConsentMapped]]
|
|
194
|
+
};
|
|
228
195
|
var categoryMapOverride = {
|
|
229
196
|
title: "Category map override",
|
|
230
|
-
description: "
|
|
231
|
-
trigger: { type: "consent" },
|
|
232
|
-
in:
|
|
233
|
-
event: "consent_status",
|
|
234
|
-
type: "explicit",
|
|
235
|
-
ucCategory: {
|
|
236
|
-
essential: true,
|
|
237
|
-
functional: true,
|
|
238
|
-
marketing: false
|
|
239
|
-
}
|
|
240
|
-
},
|
|
197
|
+
description: "A custom categoryMap remaps essential to functional and functional to analytics before emitting the walker consent command.",
|
|
198
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
199
|
+
in: servicesFullExplicit,
|
|
241
200
|
mapping: {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
out: [
|
|
245
|
-
[
|
|
246
|
-
"elb",
|
|
247
|
-
"walker consent",
|
|
248
|
-
{
|
|
249
|
-
functional: true,
|
|
250
|
-
analytics: true,
|
|
251
|
-
marketing: false
|
|
252
|
-
}
|
|
253
|
-
]
|
|
254
|
-
]
|
|
255
|
-
};
|
|
256
|
-
var customEventName = {
|
|
257
|
-
title: "Custom event name",
|
|
258
|
-
description: "Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",
|
|
259
|
-
trigger: { type: "consent", options: { eventName: "UC_SDK_EVENT" } },
|
|
260
|
-
in: {
|
|
261
|
-
event: "consent_status",
|
|
262
|
-
type: "explicit",
|
|
263
|
-
ucCategory: {
|
|
264
|
-
essential: true,
|
|
265
|
-
functional: true,
|
|
266
|
-
marketing: true
|
|
201
|
+
settings: {
|
|
202
|
+
categoryMap: { essential: "functional", functional: "analytics" }
|
|
267
203
|
}
|
|
268
204
|
},
|
|
269
|
-
|
|
270
|
-
out: [
|
|
271
|
-
[
|
|
272
|
-
"elb",
|
|
273
|
-
"walker consent",
|
|
274
|
-
{
|
|
275
|
-
essential: true,
|
|
276
|
-
functional: true,
|
|
277
|
-
marketing: true
|
|
278
|
-
}
|
|
279
|
-
]
|
|
280
|
-
]
|
|
205
|
+
out: [["elb", "walker consent", fullConsentCustomMapped]]
|
|
281
206
|
};
|
|
282
207
|
|
|
283
208
|
// src/examples/trigger.ts
|
|
@@ -312,19 +237,15 @@ var trigger = (input, env) => {
|
|
|
312
237
|
0 && (module.exports = {
|
|
313
238
|
createMockElbFn,
|
|
314
239
|
createTrigger,
|
|
315
|
-
fullConsent,
|
|
316
240
|
fullConsentCustomMapped,
|
|
317
241
|
fullConsentMapped,
|
|
318
|
-
fullConsentUpperCase,
|
|
319
|
-
implicitConsent,
|
|
320
|
-
minimalConsent,
|
|
321
242
|
minimalConsentMapped,
|
|
322
|
-
nonConsentEvent,
|
|
323
243
|
noopLogger,
|
|
324
|
-
partialConsent,
|
|
325
244
|
partialConsentMapped,
|
|
326
|
-
|
|
327
|
-
|
|
245
|
+
servicesFirstVisitImplicit,
|
|
246
|
+
servicesFullExplicit,
|
|
247
|
+
servicesMinimalExplicit,
|
|
248
|
+
servicesPartialExplicit,
|
|
328
249
|
step,
|
|
329
250
|
trigger
|
|
330
251
|
});
|
package/dist/examples/index.mjs
CHANGED
|
@@ -5,81 +5,62 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/examples/inputs.ts
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ucCategory: {
|
|
13
|
-
essential: true,
|
|
14
|
-
functional: true,
|
|
15
|
-
marketing: true
|
|
8
|
+
var servicesFullExplicit = [
|
|
9
|
+
{
|
|
10
|
+
categorySlug: "essential",
|
|
11
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
16
12
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
var partialConsent = {
|
|
21
|
-
event: "consent_status",
|
|
22
|
-
type: "explicit",
|
|
23
|
-
action: "onUpdateServices",
|
|
24
|
-
ucCategory: {
|
|
25
|
-
essential: true,
|
|
26
|
-
functional: true,
|
|
27
|
-
marketing: false
|
|
13
|
+
{
|
|
14
|
+
categorySlug: "functional",
|
|
15
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
28
16
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
functional: false,
|
|
39
|
-
marketing: false
|
|
17
|
+
{
|
|
18
|
+
categorySlug: "marketing",
|
|
19
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
20
|
+
}
|
|
21
|
+
];
|
|
22
|
+
var servicesMinimalExplicit = [
|
|
23
|
+
{
|
|
24
|
+
categorySlug: "essential",
|
|
25
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
40
26
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
var implicitConsent = {
|
|
45
|
-
event: "consent_status",
|
|
46
|
-
type: "implicit",
|
|
47
|
-
ucCategory: {
|
|
48
|
-
essential: true,
|
|
49
|
-
functional: false,
|
|
50
|
-
marketing: false
|
|
27
|
+
{
|
|
28
|
+
categorySlug: "functional",
|
|
29
|
+
consent: { status: false, history: [{ type: "explicit", status: false }] }
|
|
51
30
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
var fullConsentUpperCase = {
|
|
56
|
-
event: "consent_status",
|
|
57
|
-
type: "EXPLICIT",
|
|
58
|
-
action: "onAcceptAllServices",
|
|
59
|
-
ucCategory: {
|
|
60
|
-
essential: true,
|
|
61
|
-
functional: true,
|
|
62
|
-
marketing: true
|
|
31
|
+
{
|
|
32
|
+
categorySlug: "marketing",
|
|
33
|
+
consent: { status: false, history: [{ type: "explicit", status: false }] }
|
|
63
34
|
}
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
ucCategory: {
|
|
70
|
-
essential: true,
|
|
71
|
-
functional: "partial",
|
|
72
|
-
// Non-boolean indicates mixed service choices
|
|
73
|
-
marketing: "partial"
|
|
35
|
+
];
|
|
36
|
+
var servicesPartialExplicit = [
|
|
37
|
+
{
|
|
38
|
+
categorySlug: "essential",
|
|
39
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
74
40
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
41
|
+
{
|
|
42
|
+
categorySlug: "functional",
|
|
43
|
+
consent: { status: true, history: [{ type: "explicit", status: true }] }
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
categorySlug: "marketing",
|
|
47
|
+
consent: { status: false, history: [{ type: "explicit", status: false }] }
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
var servicesFirstVisitImplicit = [
|
|
51
|
+
{
|
|
52
|
+
categorySlug: "essential",
|
|
53
|
+
consent: { status: true, history: [{ type: "implicit", status: true }] }
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
categorySlug: "functional",
|
|
57
|
+
consent: { status: false, history: [{ type: "implicit", status: false }] }
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
categorySlug: "marketing",
|
|
61
|
+
consent: { status: false, history: [{ type: "implicit", status: false }] }
|
|
62
|
+
}
|
|
63
|
+
];
|
|
83
64
|
|
|
84
65
|
// src/examples/outputs.ts
|
|
85
66
|
var fullConsentMapped = {
|
|
@@ -99,14 +80,9 @@ var minimalConsentMapped = {
|
|
|
99
80
|
};
|
|
100
81
|
var fullConsentCustomMapped = {
|
|
101
82
|
functional: true,
|
|
83
|
+
analytics: true,
|
|
102
84
|
marketing: true
|
|
103
85
|
};
|
|
104
|
-
var serviceLevelMapped = {
|
|
105
|
-
essential: true,
|
|
106
|
-
google_analytics: true,
|
|
107
|
-
google_ads_remarketing: false,
|
|
108
|
-
hotjar: true
|
|
109
|
-
};
|
|
110
86
|
|
|
111
87
|
// src/examples/env.ts
|
|
112
88
|
var noop = () => {
|
|
@@ -133,115 +109,68 @@ var noopLogger = {
|
|
|
133
109
|
var step_exports = {};
|
|
134
110
|
__export(step_exports, {
|
|
135
111
|
categoryMapOverride: () => categoryMapOverride,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
112
|
+
consentChange: () => consentChange,
|
|
113
|
+
firstVisitImplicit: () => firstVisitImplicit,
|
|
114
|
+
fullConsent: () => fullConsent,
|
|
115
|
+
minimalConsent: () => minimalConsent,
|
|
116
|
+
returningVisitor: () => returningVisitor
|
|
139
117
|
});
|
|
140
|
-
var
|
|
118
|
+
var fullConsent = {
|
|
141
119
|
title: "Full consent",
|
|
142
|
-
description: "
|
|
143
|
-
trigger: { type: "consent" },
|
|
144
|
-
in:
|
|
145
|
-
|
|
146
|
-
type: "explicit",
|
|
147
|
-
action: "onAcceptAllServices",
|
|
148
|
-
ucCategory: {
|
|
149
|
-
essential: true,
|
|
150
|
-
functional: true,
|
|
151
|
-
marketing: true
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
out: [
|
|
155
|
-
[
|
|
156
|
-
"elb",
|
|
157
|
-
"walker consent",
|
|
158
|
-
{
|
|
159
|
-
essential: true,
|
|
160
|
-
functional: true,
|
|
161
|
-
marketing: true
|
|
162
|
-
}
|
|
163
|
-
]
|
|
164
|
-
]
|
|
120
|
+
description: "Usercentrics reports every category accepted via an explicit decision; the source emits a walker consent command granting essential, functional, and marketing.",
|
|
121
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
122
|
+
in: servicesFullExplicit,
|
|
123
|
+
out: [["elb", "walker consent", fullConsentMapped]]
|
|
165
124
|
};
|
|
166
|
-
var
|
|
125
|
+
var minimalConsent = {
|
|
167
126
|
title: "Minimal consent",
|
|
168
|
-
description:
|
|
169
|
-
trigger: { type: "consent" },
|
|
170
|
-
in:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
},
|
|
127
|
+
description: 'A "Deny all" explicit decision leaves only essential granted; functional and marketing are emitted as false.',
|
|
128
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
129
|
+
in: servicesMinimalExplicit,
|
|
130
|
+
out: [["elb", "walker consent", minimalConsentMapped]]
|
|
131
|
+
};
|
|
132
|
+
var returningVisitor = {
|
|
133
|
+
title: "Returning visitor static read",
|
|
134
|
+
description: "When the CMP is already initialized with a stored explicit decision, the static read at init re-publishes that choice without any further event.",
|
|
135
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
136
|
+
in: servicesPartialExplicit,
|
|
180
137
|
out: [
|
|
181
138
|
[
|
|
182
139
|
"elb",
|
|
183
140
|
"walker consent",
|
|
184
141
|
{
|
|
185
142
|
essential: true,
|
|
186
|
-
functional:
|
|
143
|
+
functional: true,
|
|
187
144
|
marketing: false
|
|
188
145
|
}
|
|
189
146
|
]
|
|
190
147
|
]
|
|
191
148
|
};
|
|
149
|
+
var firstVisitImplicit = {
|
|
150
|
+
title: "First visit implicit (suppressed)",
|
|
151
|
+
description: "A first-visit snapshot carrying only implicit history is suppressed by the default explicitOnly gate, so no consent command is emitted.",
|
|
152
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
153
|
+
in: servicesFirstVisitImplicit,
|
|
154
|
+
out: []
|
|
155
|
+
};
|
|
156
|
+
var consentChange = {
|
|
157
|
+
title: "Consent change via CMP event",
|
|
158
|
+
description: "An ACCEPT_ALL decision fires UC_UI_CMP_EVENT; the source re-reads the services and emits the updated consent.",
|
|
159
|
+
trigger: { type: "consent", options: { dispatch: "cmp" } },
|
|
160
|
+
in: servicesFullExplicit,
|
|
161
|
+
out: [["elb", "walker consent", fullConsentMapped]]
|
|
162
|
+
};
|
|
192
163
|
var categoryMapOverride = {
|
|
193
164
|
title: "Category map override",
|
|
194
|
-
description: "
|
|
195
|
-
trigger: { type: "consent" },
|
|
196
|
-
in:
|
|
197
|
-
event: "consent_status",
|
|
198
|
-
type: "explicit",
|
|
199
|
-
ucCategory: {
|
|
200
|
-
essential: true,
|
|
201
|
-
functional: true,
|
|
202
|
-
marketing: false
|
|
203
|
-
}
|
|
204
|
-
},
|
|
165
|
+
description: "A custom categoryMap remaps essential to functional and functional to analytics before emitting the walker consent command.",
|
|
166
|
+
trigger: { type: "consent", options: { dispatch: "init" } },
|
|
167
|
+
in: servicesFullExplicit,
|
|
205
168
|
mapping: {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
out: [
|
|
209
|
-
[
|
|
210
|
-
"elb",
|
|
211
|
-
"walker consent",
|
|
212
|
-
{
|
|
213
|
-
functional: true,
|
|
214
|
-
analytics: true,
|
|
215
|
-
marketing: false
|
|
216
|
-
}
|
|
217
|
-
]
|
|
218
|
-
]
|
|
219
|
-
};
|
|
220
|
-
var customEventName = {
|
|
221
|
-
title: "Custom event name",
|
|
222
|
-
description: "Using UC_SDK_EVENT instead of ucEvent for Usercentrics SDK v2",
|
|
223
|
-
trigger: { type: "consent", options: { eventName: "UC_SDK_EVENT" } },
|
|
224
|
-
in: {
|
|
225
|
-
event: "consent_status",
|
|
226
|
-
type: "explicit",
|
|
227
|
-
ucCategory: {
|
|
228
|
-
essential: true,
|
|
229
|
-
functional: true,
|
|
230
|
-
marketing: true
|
|
169
|
+
settings: {
|
|
170
|
+
categoryMap: { essential: "functional", functional: "analytics" }
|
|
231
171
|
}
|
|
232
172
|
},
|
|
233
|
-
|
|
234
|
-
out: [
|
|
235
|
-
[
|
|
236
|
-
"elb",
|
|
237
|
-
"walker consent",
|
|
238
|
-
{
|
|
239
|
-
essential: true,
|
|
240
|
-
functional: true,
|
|
241
|
-
marketing: true
|
|
242
|
-
}
|
|
243
|
-
]
|
|
244
|
-
]
|
|
173
|
+
out: [["elb", "walker consent", fullConsentCustomMapped]]
|
|
245
174
|
};
|
|
246
175
|
|
|
247
176
|
// src/examples/trigger.ts
|
|
@@ -275,19 +204,15 @@ var trigger = (input, env) => {
|
|
|
275
204
|
export {
|
|
276
205
|
createMockElbFn,
|
|
277
206
|
createTrigger,
|
|
278
|
-
fullConsent,
|
|
279
207
|
fullConsentCustomMapped,
|
|
280
208
|
fullConsentMapped,
|
|
281
|
-
fullConsentUpperCase,
|
|
282
|
-
implicitConsent,
|
|
283
|
-
minimalConsent,
|
|
284
209
|
minimalConsentMapped,
|
|
285
|
-
nonConsentEvent,
|
|
286
210
|
noopLogger,
|
|
287
|
-
partialConsent,
|
|
288
211
|
partialConsentMapped,
|
|
289
|
-
|
|
290
|
-
|
|
212
|
+
servicesFirstVisitImplicit,
|
|
213
|
+
servicesFullExplicit,
|
|
214
|
+
servicesMinimalExplicit,
|
|
215
|
+
servicesPartialExplicit,
|
|
291
216
|
step_exports as step,
|
|
292
217
|
trigger
|
|
293
218
|
};
|