@usercentrics/react-native-sdk 2.28.2 → 2.30.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.
@@ -1,4 +1,4 @@
1
- val usercentricsVersion = "2.28.2"
1
+ val usercentricsVersion = "2.30.0"
2
2
  val reactNativeVersion = "+"
3
3
 
4
4
  fun BooleanProperty(name: String): Boolean {
@@ -23,6 +23,7 @@ internal class GetConsentsMock {
23
23
  ),
24
24
  isEssential = false,
25
25
  category = "marketing",
26
+ isExempt = false,
26
27
  )
27
28
  )
28
29
 
@@ -41,7 +42,8 @@ internal class GetConsentsMock {
41
42
  "status" to false
42
43
  )
43
44
  ),
44
- "category" to "marketing"
45
+ "category" to "marketing",
46
+ "isExempt" to false
45
47
  )
46
48
  )
47
49
  }
@@ -29,6 +29,7 @@ internal class SaveDecisionsForTCFMock {
29
29
  ),
30
30
  isEssential = false,
31
31
  category = "marketing",
32
+ isExempt = false,
32
33
  )
33
34
  )
34
35
 
@@ -86,7 +87,8 @@ internal class SaveDecisionsForTCFMock {
86
87
  "status" to false
87
88
  )
88
89
  ),
89
- "category" to "marketing"
90
+ "category" to "marketing",
91
+ "isExempt" to false
90
92
  )
91
93
  )
92
94
  }
@@ -33,6 +33,7 @@ internal fun UsercentricsServiceConsent.toWritableMap(): WritableMap {
33
33
  putBoolean("isEssential", isEssential)
34
34
  putArray("history", history.toWritableArray())
35
35
  putString("category", category)
36
+ putBoolean("isExempt", isExempt)
36
37
  }
37
38
  }
38
39
 
@@ -16,7 +16,8 @@ public extension UsercentricsServiceConsent {
16
16
  "dataProcessor": self.dataProcessor,
17
17
  "isEssential": self.isEssential,
18
18
  "history": self.history.toDictionary(),
19
- "category": self.category
19
+ "category": self.category,
20
+ "isExempt": self.isExempt
20
21
  ]
21
22
 
22
23
  if let type = self.type?.ordinal {
@@ -33,8 +33,8 @@ public protocol UsercentricsManager {
33
33
  func acceptAllForTCF(fromLayer: TCFDecisionUILayer, consentType: UsercentricsConsentType) -> [UsercentricsServiceConsent]
34
34
  func acceptAll(consentType: UsercentricsConsentType) -> [UsercentricsServiceConsent]
35
35
 
36
- func denyAllForTCF(fromLayer: TCFDecisionUILayer, consentType: UsercentricsConsentType, unsavedPurposeLIDecisions: [KotlinInt: KotlinBoolean]?, unsavedVendorLIDecisions: [KotlinInt: KotlinBoolean]?) -> [UsercentricsServiceConsent]
37
- func denyAll(consentType: UsercentricsConsentType) -> [UsercentricsServiceConsent]
36
+ func denyAllForTCF(fromLayer: TCFDecisionUILayer, consentType: UsercentricsConsentType, unsavedPurposeLIDecisions: [KotlinInt: KotlinBoolean]?, unsavedVendorLIDecisions: [KotlinInt: KotlinBoolean]?, unsavedServiceDecisions: [String: KotlinBoolean]?) -> [UsercentricsServiceConsent]
37
+ func denyAll(consentType: UsercentricsConsentType, unsavedServiceDecisions: [String: KotlinBoolean]?) -> [UsercentricsServiceConsent]
38
38
 
39
39
  func saveDecisionsForTCF(tcfDecisions: TCFUserDecisions,
40
40
  fromLayer: TCFDecisionUILayer,
@@ -137,12 +137,12 @@ final class UsercentricsManagerImplementation: UsercentricsManager {
137
137
  return UsercentricsCore.shared.acceptAll(consentType: consentType)
138
138
  }
139
139
 
140
- func denyAllForTCF(fromLayer: TCFDecisionUILayer, consentType: UsercentricsConsentType, unsavedPurposeLIDecisions: [KotlinInt: KotlinBoolean]?, unsavedVendorLIDecisions: [KotlinInt: KotlinBoolean]?) -> [UsercentricsServiceConsent] {
141
- return UsercentricsCore.shared.denyAllForTCF(fromLayer: fromLayer, consentType: consentType, unsavedPurposeLIDecisions: unsavedPurposeLIDecisions, unsavedVendorLIDecisions: unsavedVendorLIDecisions)
140
+ func denyAllForTCF(fromLayer: TCFDecisionUILayer, consentType: UsercentricsConsentType, unsavedPurposeLIDecisions: [KotlinInt: KotlinBoolean]?, unsavedVendorLIDecisions: [KotlinInt: KotlinBoolean]?, unsavedServiceDecisions: [String: KotlinBoolean]?) -> [UsercentricsServiceConsent] {
141
+ return UsercentricsCore.shared.denyAllForTCF(fromLayer: fromLayer, consentType: consentType, unsavedPurposeLIDecisions: unsavedPurposeLIDecisions, unsavedVendorLIDecisions: unsavedVendorLIDecisions, unsavedServiceDecisions: unsavedServiceDecisions)
142
142
  }
143
143
 
144
- func denyAll(consentType: UsercentricsConsentType) -> [UsercentricsServiceConsent] {
145
- return UsercentricsCore.shared.denyAll(consentType: consentType)
144
+ func denyAll(consentType: UsercentricsConsentType, unsavedServiceDecisions: [String: KotlinBoolean]?) -> [UsercentricsServiceConsent] {
145
+ return UsercentricsCore.shared.denyAll(consentType: consentType, unsavedServiceDecisions: unsavedServiceDecisions)
146
146
  }
147
147
 
148
148
  func saveDecisionsForTCF(tcfDecisions: TCFUserDecisions, fromLayer: TCFDecisionUILayer, serviceDecisions: [UserDecision], consentType: UsercentricsConsentType) -> [UsercentricsServiceConsent] {
@@ -202,7 +202,8 @@ class RNUsercentricsModule: RCTEventEmitter {
202
202
  fromLayer: .initialize(from: Int(fromLayer)),
203
203
  consentType: .initialize(from: Int(consentType)),
204
204
  unsavedPurposeLIDecisions: extractLIDecisionsMap(unsavedPurposeLIDecisions),
205
- unsavedVendorLIDecisions: extractLIDecisionsMap(unsavedVendorLIDecisions)
205
+ unsavedVendorLIDecisions: extractLIDecisionsMap(unsavedVendorLIDecisions),
206
+ unsavedServiceDecisions: nil
206
207
  )
207
208
  resolve(services.toListOfDictionary())
208
209
  }
@@ -220,7 +221,7 @@ class RNUsercentricsModule: RCTEventEmitter {
220
221
  @objc func denyAll(_ consentType: Double,
221
222
  resolve: @escaping RCTPromiseResolveBlock,
222
223
  reject: @escaping RCTPromiseRejectBlock) -> Void {
223
- let services = usercentricsManager.denyAll(consentType: .initialize(from: Int(consentType)))
224
+ let services = usercentricsManager.denyAll(consentType: .initialize(from: Int(consentType)), unsavedServiceDecisions: nil)
224
225
  resolve(services.toListOfDictionary())
225
226
  }
226
227
 
@@ -8,7 +8,8 @@ export declare class UsercentricsServiceConsent {
8
8
  isEssential: boolean;
9
9
  history: UsercentricsConsentHistoryEntry[];
10
10
  category: string;
11
- constructor(templateId: string, status: boolean, dataProcessor: string, version: string, type: UsercentricsConsentType, isEssential: boolean, history: UsercentricsConsentHistoryEntry[], category: string);
11
+ isExempt: boolean;
12
+ constructor(templateId: string, status: boolean, dataProcessor: string, version: string, type: UsercentricsConsentType, isEssential: boolean, history: UsercentricsConsentHistoryEntry[], category: string, isExempt?: boolean);
12
13
  }
13
14
  export declare class UsercentricsConsentHistoryEntry {
14
15
  status: boolean;
@@ -1,5 +1,5 @@
1
1
  export class UsercentricsServiceConsent {
2
- constructor(templateId, status, dataProcessor, version, type, isEssential, history, category) {
2
+ constructor(templateId, status, dataProcessor, version, type, isEssential, history, category, isExempt = false) {
3
3
  this.templateId = templateId;
4
4
  this.status = status;
5
5
  this.dataProcessor = dataProcessor;
@@ -8,6 +8,7 @@ export class UsercentricsServiceConsent {
8
8
  this.isEssential = isEssential;
9
9
  this.history = history;
10
10
  this.category = category;
11
+ this.isExempt = isExempt;
11
12
  }
12
13
  }
13
14
  export class UsercentricsConsentHistoryEntry {
@@ -1 +1 @@
1
- {"version":3,"file":"UsercentricsServiceConsent.js","sourceRoot":"","sources":["../../src/models/UsercentricsServiceConsent.tsx"],"names":[],"mappings":"AAEA,MAAM,OAAO,0BAA0B;IAWnC,YAAY,UAAkB,EAAE,MAAe,EAAE,aAAqB,EAAE,OAAe,EAAE,IAA6B,EAAE,WAAoB,EAAE,OAA0C,EAAE,QAAgB;QACtM,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CACJ;AAED,MAAM,OAAO,+BAA+B;IAMxC,YAAY,MAAe,EAAE,IAA6B,EAAE,iBAAyB;QACjF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;CACJ"}
1
+ {"version":3,"file":"UsercentricsServiceConsent.js","sourceRoot":"","sources":["../../src/models/UsercentricsServiceConsent.tsx"],"names":[],"mappings":"AAEA,MAAM,OAAO,0BAA0B;IAYnC,YAAY,UAAkB,EAAE,MAAe,EAAE,aAAqB,EAAE,OAAe,EAAE,IAA6B,EAAE,WAAoB,EAAE,OAA0C,EAAE,QAAgB,EAAE,WAAoB,KAAK;QACjO,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CACJ;AAED,MAAM,OAAO,+BAA+B;IAMxC,YAAY,MAAe,EAAE,IAA6B,EAAE,iBAAyB;QACjF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@usercentrics/react-native-sdk",
3
- "version": "2.28.2",
3
+ "version": "2.30.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.28.2",
10
+ "iosPackageVersion": "2.30.0",
11
11
  "license": "SEE LICENSE IN LICENSE",
12
12
  "files": [
13
13
  "android",
@@ -149,7 +149,8 @@ describe('Test Usercentrics Module', () => {
149
149
  timestampInMillis: 123.0,
150
150
  type: 0
151
151
  }],
152
- category: "essemtial"
152
+ category: "essemtial",
153
+ isExempt: false,
153
154
  }
154
155
  ],
155
156
  {
@@ -202,7 +203,8 @@ describe('Test Usercentrics Module', () => {
202
203
  timestampInMillis: 123.0,
203
204
  type: 0
204
205
  }],
205
- category: "essemtial"
206
+ category: "essemtial",
207
+ isExempt: false,
206
208
  }
207
209
  ]
208
210
  )
@@ -270,7 +272,8 @@ describe('Test Usercentrics Module', () => {
270
272
  timestampInMillis: 123.0,
271
273
  type: 0
272
274
  }],
273
- category: "essemtial"
275
+ category: "essemtial",
276
+ isExempt: false,
274
277
  }
275
278
  ],
276
279
  {
@@ -579,7 +582,8 @@ describe('Test Usercentrics Module', () => {
579
582
  timestampInMillis: 123.0,
580
583
  type: 0
581
584
  }],
582
- category: "essemtial"
585
+ category: "essemtial",
586
+ isExempt: false,
583
587
  }
584
588
  ],
585
589
  {
@@ -10,8 +10,9 @@ export class UsercentricsServiceConsent {
10
10
  isEssential: boolean
11
11
  history: UsercentricsConsentHistoryEntry[]
12
12
  category: string
13
+ isExempt: boolean
13
14
 
14
- constructor(templateId: string, status: boolean, dataProcessor: string, version: string, type: UsercentricsConsentType, isEssential: boolean, history: UsercentricsConsentHistoryEntry[], category: string) {
15
+ constructor(templateId: string, status: boolean, dataProcessor: string, version: string, type: UsercentricsConsentType, isEssential: boolean, history: UsercentricsConsentHistoryEntry[], category: string, isExempt: boolean = false) {
15
16
  this.templateId = templateId
16
17
  this.status = status
17
18
  this.dataProcessor = dataProcessor
@@ -20,6 +21,7 @@ export class UsercentricsServiceConsent {
20
21
  this.isEssential = isEssential
21
22
  this.history = history
22
23
  this.category = category;
24
+ this.isExempt = isExempt;
23
25
  }
24
26
  }
25
27