@didomi/react-native 2.4.0 → 2.6.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/src/Didomi.ts CHANGED
@@ -153,64 +153,56 @@ export const Didomi = {
153
153
  /**
154
154
  * Method used to get an array of disabled purposes.
155
155
  * @returns: array of disabled purposes.
156
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
157
- * has been replaced by getUserStatus().purposes.consent.disabled.
156
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
158
157
  */
159
158
  getDisabledPurposes: (): Promise<Purpose[]> => RNDidomi.getDisabledPurposes(),
160
159
 
161
160
  /**
162
161
  * Method used to get a set of disabled purpose IDs.
163
162
  * @returns: set that contains the IDs of disabled purposes.
164
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
165
- * has been replaced by getUserStatus().purposes.consent.enabled.
163
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
166
164
  */
167
165
  getDisabledPurposeIds: (): Promise<string[]> => RNDidomi.getDisabledPurposeIds(),
168
166
 
169
167
  /**
170
168
  * Method used to get an array of disabled vendors.
171
169
  * @returns: array of disabled vendors.
172
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
173
- * has been replaced by getUserStatus().vendors.consent.disabled.
170
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
174
171
  */
175
172
  getDisabledVendors: (): Promise<Vendor[]> => RNDidomi.getDisabledVendors(),
176
173
 
177
174
  /**
178
175
  * Method used to get a set of disabled vendor IDs.
179
176
  * @returns: set that contains the IDs of disabled vendors.
180
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
181
- * has been replaced by getUserStatus().vendors.consent.disabled.
177
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
182
178
  */
183
179
  getDisabledVendorIds: (): Promise<string[]> => RNDidomi.getDisabledVendorIds(),
184
180
 
185
181
  /**
186
182
  * Method used to get an array of enabled purposes.
187
183
  * @returns: array of enabled purposes.
188
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
189
- * has been replaced by getUserStatus().purposes.consent.enabled.
184
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
190
185
  */
191
186
  getEnabledPurposes: (): Promise<Purpose[]> => RNDidomi.getEnabledPurposes(),
192
187
 
193
188
  /**
194
189
  * Method used to get a set of enabled purpose IDs.
195
190
  * @returns: set that contains the IDs of enabled purposes.
196
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
197
- * has been replaced by getUserStatus().purposes.consent.enabled.
191
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
198
192
  */
199
193
  getEnabledPurposeIds: (): Promise<string[]> => RNDidomi.getEnabledPurposeIds(),
200
194
 
201
195
  /**
202
196
  * Method used to get an array of enabled vendors.
203
197
  * @returns: array of enabled vendors.
204
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
205
- * has been replaced by getUserStatus().vendors.consent.enabled.
198
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
206
199
  */
207
200
  getEnabledVendors: (): Promise<Vendor[]> => RNDidomi.getEnabledVendors(),
208
201
 
209
202
  /**
210
203
  * Method used to get a set of enabled vendor IDs.
211
204
  * @returns: set that contains the IDs of enabled vendors.
212
- * @deprecated use {@link #getUserStatus()} instead. The result of this method
213
- * has been replaced by getUserStatus().vendors.consent.enabled.
205
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
214
206
  */
215
207
  getEnabledVendorIds: (): Promise<string[]> => RNDidomi.getEnabledVendorIds(),
216
208
 
@@ -242,6 +234,7 @@ export const Didomi = {
242
234
  /**
243
235
  * Get the configured purpose IDs
244
236
  * @returns: set of purpose IDs.
237
+ * @deprecated use {@link #getRequiredPurposes()} instead.
245
238
  */
246
239
  getRequiredPurposeIds: (): Promise<string[]> => RNDidomi.getRequiredPurposeIds(),
247
240
 
@@ -254,6 +247,7 @@ export const Didomi = {
254
247
  /**
255
248
  * Get the configured vendor IDs
256
249
  * @returns: set of vendor IDs.
250
+ * @deprecated use {@link #getRequiredVendors()} instead.
257
251
  */
258
252
  getRequiredVendorIds: (): Promise<string[]> => RNDidomi.getRequiredVendorIds(),
259
253
 
@@ -292,9 +286,7 @@ export const Didomi = {
292
286
  * Get the user consent status for a specific purpose
293
287
  * @param purposeId: The purpose ID to check consent for
294
288
  * @returns: The user consent status for the specified purpose
295
- * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in
296
- * getUserStatus().purposes.consent.enabled or
297
- * getUserStatus().purposes.consent.enabled.
289
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
298
290
  */
299
291
  getUserConsentStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForPurpose(purposeId),
300
292
 
@@ -302,9 +294,7 @@ export const Didomi = {
302
294
  * Get the user consent status for a specific vendor
303
295
  * @param vendorId: The vendor ID to check consent for
304
296
  * @returns: The user consent status for the specified vendor
305
- * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in
306
- * getUserStatus().vendors.consent.enabled or
307
- * getUserStatus().vendors.consent.disabled.
297
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
308
298
  */
309
299
  getUserConsentStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendor(vendorId),
310
300
 
@@ -312,9 +302,7 @@ export const Didomi = {
312
302
  * Get the user consent status for a specific vendor and all its purposes
313
303
  * @param vendorId: The ID of the vendor
314
304
  * @returns: The user consent status corresponding to the specified vendor and all its required purposes.
315
- * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced
316
- * by getUserStatus().vendors.global_consent.enabled or
317
- * getUserStatus().vendors.global_consent.disabled.
305
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
318
306
  */
319
307
  getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendorAndRequiredPurposes(vendorId),
320
308
 
@@ -322,9 +310,7 @@ export const Didomi = {
322
310
  * Get the user legitimate interest status for a specific purpose.
323
311
  * @param purposeId: purpose ID.
324
312
  * @returns: LI status of a purpose.
325
- * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in
326
- * getUserStatus().purposes.consent.enabled or
327
- * getUserStatus().purposes.consent.enabled.
313
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
328
314
  */
329
315
  getUserLegitimateInterestStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForPurpose(purposeId),
330
316
 
@@ -332,9 +318,7 @@ export const Didomi = {
332
318
  * Get the user legitimate interest status for a specific vendor.
333
319
  * @param vendorId: vendor ID.
334
320
  * @returns: LI status of a vendor.
335
- * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in
336
- * getUserStatus().vendors.legitimate_interest.enabled or
337
- * getUserStatus().vendors.legitimate_interest.disabled.
321
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
338
322
  */
339
323
  getUserLegitimateInterestForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForVendor(vendorId),
340
324
 
@@ -342,9 +326,7 @@ export const Didomi = {
342
326
  * Get the user LI status for a specific vendor and all its purposes.
343
327
  * @param vendorId: vendor ID.
344
328
  * @returns: The user LI status corresponding to the specified vendor and all its required purposes.
345
- * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in
346
- * getUserStatus().vendors.global_legitimate_interest.enabled or
347
- * getUserStatus().vendors.global_legitimate_interest.disabled.
329
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
348
330
  */
349
331
  getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),
350
332
 
@@ -357,6 +339,7 @@ export const Didomi = {
357
339
  /**
358
340
  * Get the user consent status.
359
341
  * @returns: status that represents user consent.
342
+ * @deprecated use {@link #getCurrentUserStatus()} instead.
360
343
  */
361
344
  getUserStatus: (): Promise<UserStatus> => RNDidomi.getUserStatus(),
362
345
 
@@ -393,6 +376,7 @@ export const Didomi = {
393
376
  * - The company is from the EU.
394
377
  * - The user country is unknown and the app has chosen to collect consent when unknown.
395
378
  * @returns: **true** if consent is required, **false** if it is not required.
379
+ * @deprecated use {@link #shouldUserStatusBeCollected()} instead.
396
380
  */
397
381
  isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),
398
382
 
@@ -408,6 +392,7 @@ export const Didomi = {
408
392
  /**
409
393
  * Determine if consent information is available for all purposes and vendors that are required
410
394
  * @returns: **true** if consent is required and consent information is available, **false** otherwise.
395
+ * @deprecated use {@link #isUserStatusPartial()} instead.
411
396
  */
412
397
  isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),
413
398
 
@@ -654,6 +639,7 @@ export const Didomi = {
654
639
  * @param enabledVendorIds: set containing **enabled vendor ids**
655
640
  * @param disabledVendorIds: set containing **disabled purpose ids**
656
641
  * @returns: **true** if consent status has been updated, **false** otherwise.
642
+ * @deprecated use {@link #setCurrentUserStatus()} instead.
657
643
  */
658
644
  setUserConsentStatus: (
659
645
  enabledPurposeIds: string[],
@@ -717,6 +703,7 @@ export const Didomi = {
717
703
  * @param disabledConsentVendorIds: List of vendor IDs to disable for consent.
718
704
  * @param enabledLIVendorIds: List of vendor IDs to enable for LI.
719
705
  * @param disabledLIVendorIds: List of vendor IDs to disable for LI.
706
+ * @deprecated use {@link #setCurrentUserStatus()} instead.
720
707
  */
721
708
  setUserStatusSets: (
722
709
  enabledConsentPurposeIds: string[],