@usercentrics/react-native-sdk 2.29.1 → 2.31.0
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/android/build.gradle.kts +1 -1
- package/android/src/androidTest/java/com/usercentrics/reactnative/RNUsercentricsModuleTest.kt +2 -0
- package/android/src/main/java/com/usercentrics/reactnative/extensions/BannerSettingsExtensions.kt +2 -1
- package/android/src/main/java/com/usercentrics/reactnative/extensions/UserOptionsExtensions.kt +4 -0
- package/ios/Extensions/UsercentricsOptions+Dict.swift +4 -0
- package/lib/models/BannerSettings.d.ts +6 -1
- package/lib/models/BannerSettings.js +2 -1
- package/lib/models/BannerSettings.js.map +1 -1
- package/lib/models/UsercentricsOptions.d.ts +16 -1
- package/lib/models/UsercentricsOptions.js +2 -1
- package/lib/models/UsercentricsOptions.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/index.test.ts +15 -0
- package/src/models/BannerSettings.tsx +8 -1
- package/src/models/UsercentricsOptions.tsx +17 -0
package/android/build.gradle.kts
CHANGED
package/android/src/androidTest/java/com/usercentrics/reactnative/RNUsercentricsModuleTest.kt
CHANGED
|
@@ -42,6 +42,7 @@ class RNUsercentricsModuleTest {
|
|
|
42
42
|
putString("version", "1.2.3")
|
|
43
43
|
putInt("networkMode", 1)
|
|
44
44
|
putInt("initTimeoutMillis", 10000)
|
|
45
|
+
putString("controllerId", "a".repeat(64))
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
private val bannerSettingsMap = mapOf(
|
|
@@ -128,6 +129,7 @@ class RNUsercentricsModuleTest {
|
|
|
128
129
|
assertEquals("1.2.3", usercentricsProxy.initializeOptionsArgument?.version)
|
|
129
130
|
assertEquals(NetworkMode.EU, usercentricsProxy.initializeOptionsArgument?.networkMode)
|
|
130
131
|
assertEquals(10000L, usercentricsProxy.initializeOptionsArgument?.initTimeoutMillis)
|
|
132
|
+
assertEquals("a".repeat(64), usercentricsProxy.initializeOptionsArgument?.controllerId)
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
@Test
|
package/android/src/main/java/com/usercentrics/reactnative/extensions/BannerSettingsExtensions.kt
CHANGED
|
@@ -176,7 +176,8 @@ internal fun ReadableMap.generalStyleSettingsFromMap(context: Context): GeneralS
|
|
|
176
176
|
font = getMap("font")?.bannerFontFromMap(context = context),
|
|
177
177
|
logo = getMap("logo")?.bannerLogoFromMap(context = context),
|
|
178
178
|
links = getString("links")?.legalLinksFromEnumString(),
|
|
179
|
-
disableSystemBackButton = getBooleanOrNull("disableSystemBackButton")
|
|
179
|
+
disableSystemBackButton = getBooleanOrNull("disableSystemBackButton"),
|
|
180
|
+
windowFullscreen = getBooleanOrNull("windowFullscreen")
|
|
180
181
|
)
|
|
181
182
|
}
|
|
182
183
|
|
package/android/src/main/java/com/usercentrics/reactnative/extensions/UserOptionsExtensions.kt
CHANGED
|
@@ -56,6 +56,10 @@ internal fun ReadableMap.usercentricsOptionsFromMap(): UsercentricsOptions {
|
|
|
56
56
|
options.initTimeoutMillis = it.toLong()
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
getString("controllerId")?.let {
|
|
60
|
+
options.controllerId = it
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
getMap("bannerCustomization")?.let {
|
|
60
64
|
options.bannerCustomization = it.bannerInitCustomizationFromMap()
|
|
61
65
|
}
|
|
@@ -41,6 +41,10 @@ public extension UsercentricsOptions {
|
|
|
41
41
|
options.initTimeoutMillis = Int64(initTimeoutMillis)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
if let controllerId = dictionary["controllerId"] as? String {
|
|
45
|
+
options.controllerId = controllerId
|
|
46
|
+
}
|
|
47
|
+
|
|
44
48
|
if let bannerCustomizationDict = dictionary["bannerCustomization"] as? NSDictionary {
|
|
45
49
|
options.bannerCustomization = BannerInitCustomization(from: bannerCustomizationDict)
|
|
46
50
|
}
|
|
@@ -39,7 +39,12 @@ export declare class GeneralStyleSettings {
|
|
|
39
39
|
bordersColorHex?: String;
|
|
40
40
|
toggleStyleSettings?: ToggleStyleSettings;
|
|
41
41
|
disableSystemBackButton?: Boolean;
|
|
42
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Android-only. Backward-compat workaround for publishers who relied on the legacy
|
|
44
|
+
* fullscreen dialog behavior prior to the edge-to-edge fix. Has no effect on iOS.
|
|
45
|
+
*/
|
|
46
|
+
windowFullscreen?: Boolean;
|
|
47
|
+
constructor(font?: BannerFont, logo?: BannerLogo, links?: LegalLinksSettings, textColorHex?: String, layerBackgroundColorHex?: String, layerBackgroundSecondaryColorHex?: String, linkColorHex?: String, tabColorHex?: String, bordersColorHex?: String, toggleStyleSettings?: ToggleStyleSettings, disableSystemBackButton?: Boolean, windowFullscreen?: Boolean);
|
|
43
48
|
}
|
|
44
49
|
export declare class BannerSettings {
|
|
45
50
|
firstLayerStyleSettings?: FirstLayerStyleSettings;
|
|
@@ -30,7 +30,7 @@ export class ToggleStyleSettings {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
export class GeneralStyleSettings {
|
|
33
|
-
constructor(font, logo, links, textColorHex, layerBackgroundColorHex, layerBackgroundSecondaryColorHex, linkColorHex, tabColorHex, bordersColorHex, toggleStyleSettings, disableSystemBackButton) {
|
|
33
|
+
constructor(font, logo, links, textColorHex, layerBackgroundColorHex, layerBackgroundSecondaryColorHex, linkColorHex, tabColorHex, bordersColorHex, toggleStyleSettings, disableSystemBackButton, windowFullscreen) {
|
|
34
34
|
this.font = font;
|
|
35
35
|
this.logo = logo;
|
|
36
36
|
this.links = links;
|
|
@@ -42,6 +42,7 @@ export class GeneralStyleSettings {
|
|
|
42
42
|
this.bordersColorHex = bordersColorHex;
|
|
43
43
|
this.toggleStyleSettings = toggleStyleSettings;
|
|
44
44
|
this.disableSystemBackButton = disableSystemBackButton;
|
|
45
|
+
this.windowFullscreen = windowFullscreen;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
export class BannerSettings {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerSettings.js","sourceRoot":"","sources":["../../src/models/BannerSettings.tsx"],"names":[],"mappings":"AAGA,MAAM,OAAO,UAAU;IAMnB,YAAY,QAAgB,EAAE,QAAkC,EAAE,OAAgB;QAC9E,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CACJ;AAED,MAAM,OAAO,UAAU;IAMnB,YAAY,WAAmB,EAAE,QAAgB,EAAE,QAAgB;QAC/D,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CACJ;AAED,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAE1B,yDAAmC,CAAA;IACnC,2DAAqC,CAAA;IACrC,mCAAa,CAAA;IACb,uCAAiB,CAAA;AACrB,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,MAAM,OAAO,mBAAmB;IAS5B,YACI,wBAAiC,EACjC,0BAAmC,EACnC,0BAAmC,EACnC,mBAA4B,EAC5B,qBAA8B,EAC9B,qBAA8B;QAE9B,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;QACzD,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;QAC7D,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;QAC7D,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACvD,CAAC;CACJ;AAED,MAAM,OAAO,oBAAoB;
|
|
1
|
+
{"version":3,"file":"BannerSettings.js","sourceRoot":"","sources":["../../src/models/BannerSettings.tsx"],"names":[],"mappings":"AAGA,MAAM,OAAO,UAAU;IAMnB,YAAY,QAAgB,EAAE,QAAkC,EAAE,OAAgB;QAC9E,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CACJ;AAED,MAAM,OAAO,UAAU;IAMnB,YAAY,WAAmB,EAAE,QAAgB,EAAE,QAAgB;QAC/D,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CACJ;AAED,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAE1B,yDAAmC,CAAA;IACnC,2DAAqC,CAAA;IACrC,mCAAa,CAAA;IACb,uCAAiB,CAAA;AACrB,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,MAAM,OAAO,mBAAmB;IAS5B,YACI,wBAAiC,EACjC,0BAAmC,EACnC,0BAAmC,EACnC,mBAA4B,EAC5B,qBAA8B,EAC9B,qBAA8B;QAE9B,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;QACzD,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;QAC7D,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;QAC7D,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACvD,CAAC;CACJ;AAED,MAAM,OAAO,oBAAoB;IAmB7B,YAAY,IAAiB,EACjB,IAAiB,EACjB,KAA0B,EAC1B,YAAqB,EACrB,uBAAgC,EAChC,gCAAyC,EACzC,YAAqB,EACrB,WAAoB,EACpB,eAAwB,EACxB,mBAAyC,EACzC,uBAAiC,EACjC,gBAA0B;QAElC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,gCAAgC,GAAG,gCAAgC,CAAC;QACzE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC7C,CAAC;CACJ;AAED,MAAM,OAAO,cAAc;IAYvB,YAAY,uBAAiD,EAAE,wBAAmD,EAAE,oBAA2C,EAAE,WAAoB,EAAE,iBAA2C;QAC9N,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;QACzD,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACjD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;CACJ"}
|
|
@@ -9,12 +9,26 @@ export declare class UsercentricsOptions {
|
|
|
9
9
|
networkMode?: NetworkMode;
|
|
10
10
|
consentMediation?: Boolean;
|
|
11
11
|
initTimeoutMillis?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Optional controllerId to inject at SDK initialisation.
|
|
14
|
+
*
|
|
15
|
+
* Use this to preserve user identity across login/logout flows that clear local consent
|
|
16
|
+
* storage. Store the controllerId (via `Usercentrics.getControllerId()`) server-side after
|
|
17
|
+
* the first successful init, then pass it here on every subsequent login. The SDK will skip
|
|
18
|
+
* generating a new ID and use this value instead. It is persisted to local storage, so
|
|
19
|
+
* subsequent re-initialisations without this option continue to use it.
|
|
20
|
+
*
|
|
21
|
+
* The value must be a 64-character lowercase hexadecimal string (the format produced
|
|
22
|
+
* internally by the SDK). Invalid values are ignored with a warning log and the SDK falls
|
|
23
|
+
* back to its normal ID resolution (stored → generated).
|
|
24
|
+
*/
|
|
25
|
+
controllerId?: string;
|
|
12
26
|
/**
|
|
13
27
|
* @deprecated bannerCustomization is deprecated and will be removed in a future release.
|
|
14
28
|
* Configure banner appearance via the Usercentrics dashboard instead.
|
|
15
29
|
*/
|
|
16
30
|
bannerCustomization?: BannerInitCustomization;
|
|
17
|
-
constructor({ settingsId, ruleSetId, defaultLanguage, loggerLevel, timeoutMillis, version, networkMode, consentMediation, initTimeoutMillis, bannerCustomization }: {
|
|
31
|
+
constructor({ settingsId, ruleSetId, defaultLanguage, loggerLevel, timeoutMillis, version, networkMode, consentMediation, initTimeoutMillis, controllerId, bannerCustomization }: {
|
|
18
32
|
settingsId?: string;
|
|
19
33
|
ruleSetId?: string;
|
|
20
34
|
defaultLanguage?: string;
|
|
@@ -24,6 +38,7 @@ export declare class UsercentricsOptions {
|
|
|
24
38
|
networkMode?: NetworkMode;
|
|
25
39
|
consentMediation?: Boolean;
|
|
26
40
|
initTimeoutMillis?: number;
|
|
41
|
+
controllerId?: string;
|
|
27
42
|
bannerCustomization?: BannerInitCustomization;
|
|
28
43
|
});
|
|
29
44
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class UsercentricsOptions {
|
|
2
|
-
constructor({ settingsId = "", ruleSetId = "", defaultLanguage = undefined, loggerLevel = undefined, timeoutMillis = undefined, version = undefined, networkMode = undefined, consentMediation = undefined, initTimeoutMillis = undefined, bannerCustomization = undefined }) {
|
|
2
|
+
constructor({ settingsId = "", ruleSetId = "", defaultLanguage = undefined, loggerLevel = undefined, timeoutMillis = undefined, version = undefined, networkMode = undefined, consentMediation = undefined, initTimeoutMillis = undefined, controllerId = undefined, bannerCustomization = undefined }) {
|
|
3
3
|
this.settingsId = settingsId;
|
|
4
4
|
this.ruleSetId = ruleSetId;
|
|
5
5
|
this.defaultLanguage = defaultLanguage;
|
|
@@ -9,6 +9,7 @@ export class UsercentricsOptions {
|
|
|
9
9
|
this.networkMode = networkMode;
|
|
10
10
|
this.consentMediation = consentMediation;
|
|
11
11
|
this.initTimeoutMillis = initTimeoutMillis;
|
|
12
|
+
this.controllerId = controllerId;
|
|
12
13
|
this.bannerCustomization = bannerCustomization;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsercentricsOptions.js","sourceRoot":"","sources":["../../src/models/UsercentricsOptions.tsx"],"names":[],"mappings":"AAEA,MAAM,OAAO,mBAAmB;
|
|
1
|
+
{"version":3,"file":"UsercentricsOptions.js","sourceRoot":"","sources":["../../src/models/UsercentricsOptions.tsx"],"names":[],"mappings":"AAEA,MAAM,OAAO,mBAAmB;IA8B5B,YAAY,EACI,UAAU,GAAG,EAAE,EACf,SAAS,GAAG,EAAE,EACd,eAAe,GAAG,SAAS,EAC3B,WAAW,GAAG,SAAS,EACvB,aAAa,GAAG,SAAS,EACzB,OAAO,GAAG,SAAS,EACnB,WAAW,GAAG,SAAS,EACvB,gBAAgB,GAAG,SAAS,EAC5B,iBAAiB,GAAG,SAAS,EAC7B,YAAY,GAAG,SAAS,EACxB,mBAAmB,GAAG,SAAS,EAa9C;QACG,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;QAC1C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAChC,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAA;IAClD,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usercentrics/react-native-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"description": "Usercentrics SDK",
|
|
5
5
|
"homepage": "https://usercentrics.com",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
8
|
"author": "Usercentrics <developer@usercentrics.com>",
|
|
9
9
|
"iosPackageName": "react-native-usercentrics",
|
|
10
|
-
"iosPackageVersion": "2.
|
|
10
|
+
"iosPackageVersion": "2.31.0",
|
|
11
11
|
"license": "SEE LICENSE IN LICENSE",
|
|
12
12
|
"files": [
|
|
13
13
|
"android",
|
|
@@ -89,6 +89,21 @@ describe('Test Usercentrics Module', () => {
|
|
|
89
89
|
expect(call).toBe(options)
|
|
90
90
|
})
|
|
91
91
|
|
|
92
|
+
test('testConfigureBridgeWithControllerId', () => {
|
|
93
|
+
const controllerId = "a".repeat(64);
|
|
94
|
+
const options = new UsercentricsOptions({
|
|
95
|
+
settingsId: "abc",
|
|
96
|
+
ruleSetId: "qwer",
|
|
97
|
+
controllerId
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
Usercentrics.configure(options);
|
|
101
|
+
const calls = RNUsercentricsModule.configure.mock.calls;
|
|
102
|
+
const call = calls[calls.length - 1][0];
|
|
103
|
+
expect(call).toBe(options);
|
|
104
|
+
expect(call.controllerId).toBe(controllerId);
|
|
105
|
+
})
|
|
106
|
+
|
|
92
107
|
test('testConfigureBridgeWithBannerCustomization', () => {
|
|
93
108
|
const bannerCustomization = new BannerInitCustomization({
|
|
94
109
|
paddingTop: 16,
|
|
@@ -74,6 +74,11 @@ export class GeneralStyleSettings {
|
|
|
74
74
|
bordersColorHex?: String;
|
|
75
75
|
toggleStyleSettings?: ToggleStyleSettings;
|
|
76
76
|
disableSystemBackButton?: Boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Android-only. Backward-compat workaround for publishers who relied on the legacy
|
|
79
|
+
* fullscreen dialog behavior prior to the edge-to-edge fix. Has no effect on iOS.
|
|
80
|
+
*/
|
|
81
|
+
windowFullscreen?: Boolean;
|
|
77
82
|
|
|
78
83
|
constructor(font?: BannerFont,
|
|
79
84
|
logo?: BannerLogo,
|
|
@@ -85,7 +90,8 @@ export class GeneralStyleSettings {
|
|
|
85
90
|
tabColorHex?: String,
|
|
86
91
|
bordersColorHex?: String,
|
|
87
92
|
toggleStyleSettings?: ToggleStyleSettings,
|
|
88
|
-
disableSystemBackButton?: Boolean
|
|
93
|
+
disableSystemBackButton?: Boolean,
|
|
94
|
+
windowFullscreen?: Boolean
|
|
89
95
|
) {
|
|
90
96
|
this.font = font;
|
|
91
97
|
this.logo = logo;
|
|
@@ -98,6 +104,7 @@ export class GeneralStyleSettings {
|
|
|
98
104
|
this.bordersColorHex = bordersColorHex;
|
|
99
105
|
this.toggleStyleSettings = toggleStyleSettings;
|
|
100
106
|
this.disableSystemBackButton = disableSystemBackButton;
|
|
107
|
+
this.windowFullscreen = windowFullscreen;
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
110
|
|
|
@@ -10,6 +10,20 @@ export class UsercentricsOptions {
|
|
|
10
10
|
networkMode?: NetworkMode;
|
|
11
11
|
consentMediation?: Boolean;
|
|
12
12
|
initTimeoutMillis?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Optional controllerId to inject at SDK initialisation.
|
|
15
|
+
*
|
|
16
|
+
* Use this to preserve user identity across login/logout flows that clear local consent
|
|
17
|
+
* storage. Store the controllerId (via `Usercentrics.getControllerId()`) server-side after
|
|
18
|
+
* the first successful init, then pass it here on every subsequent login. The SDK will skip
|
|
19
|
+
* generating a new ID and use this value instead. It is persisted to local storage, so
|
|
20
|
+
* subsequent re-initialisations without this option continue to use it.
|
|
21
|
+
*
|
|
22
|
+
* The value must be a 64-character lowercase hexadecimal string (the format produced
|
|
23
|
+
* internally by the SDK). Invalid values are ignored with a warning log and the SDK falls
|
|
24
|
+
* back to its normal ID resolution (stored → generated).
|
|
25
|
+
*/
|
|
26
|
+
controllerId?: string;
|
|
13
27
|
/**
|
|
14
28
|
* @deprecated bannerCustomization is deprecated and will be removed in a future release.
|
|
15
29
|
* Configure banner appearance via the Usercentrics dashboard instead.
|
|
@@ -26,6 +40,7 @@ export class UsercentricsOptions {
|
|
|
26
40
|
networkMode = undefined,
|
|
27
41
|
consentMediation = undefined,
|
|
28
42
|
initTimeoutMillis = undefined,
|
|
43
|
+
controllerId = undefined,
|
|
29
44
|
bannerCustomization = undefined
|
|
30
45
|
}: {
|
|
31
46
|
settingsId?: string,
|
|
@@ -37,6 +52,7 @@ export class UsercentricsOptions {
|
|
|
37
52
|
networkMode?: NetworkMode,
|
|
38
53
|
consentMediation?: Boolean,
|
|
39
54
|
initTimeoutMillis?: number,
|
|
55
|
+
controllerId?: string,
|
|
40
56
|
bannerCustomization?: BannerInitCustomization
|
|
41
57
|
}) {
|
|
42
58
|
this.settingsId = settingsId;
|
|
@@ -48,6 +64,7 @@ export class UsercentricsOptions {
|
|
|
48
64
|
this.networkMode = networkMode
|
|
49
65
|
this.consentMediation = consentMediation
|
|
50
66
|
this.initTimeoutMillis = initTimeoutMillis
|
|
67
|
+
this.controllerId = controllerId
|
|
51
68
|
this.bannerCustomization = bannerCustomization
|
|
52
69
|
}
|
|
53
70
|
}
|