@didomi/react-native 2.8.0 → 2.10.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 +1 -1
- package/android/src/main/java/io/didomi/reactnative/DidomiModule.kt +125 -10
- package/ios/Didomi.m +17 -0
- package/ios/Extensions/StringExtension.swift +24 -0
- package/ios/RNDidomi.swift +148 -27
- package/lib/commonjs/Constants.js +1 -1
- package/lib/commonjs/Constants.js.map +1 -1
- package/lib/commonjs/Didomi.js +37 -5
- package/lib/commonjs/Didomi.js.map +1 -1
- package/lib/commonjs/DidomiTypes.js +46 -0
- package/lib/commonjs/DidomiTypes.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/Constants.js +1 -1
- package/lib/module/Constants.js.map +1 -1
- package/lib/module/Didomi.js +37 -5
- package/lib/module/Didomi.js.map +1 -1
- package/lib/module/DidomiTypes.js +49 -0
- package/lib/module/DidomiTypes.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/Constants.d.ts +1 -1
- package/lib/typescript/Constants.d.ts.map +1 -1
- package/lib/typescript/Didomi.d.ts +32 -6
- package/lib/typescript/Didomi.d.ts.map +1 -1
- package/lib/typescript/DidomiTypes.d.ts +141 -1
- package/lib/typescript/DidomiTypes.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-didomi.podspec +1 -1
- package/src/Constants.ts +1 -1
- package/src/Didomi.ts +46 -6
- package/src/DidomiTypes.ts +146 -3
- package/src/index.tsx +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus, VendorStatus, UserAuthParams } from './DidomiTypes';
|
|
1
|
+
import { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus, VendorStatus, UserAuthParams, DidomiInitializeParameters, DidomiUserParameters } from './DidomiTypes';
|
|
2
2
|
import { CurrentUserStatusTransaction } from './CurrentUserStatusTransaction';
|
|
3
3
|
export declare const Didomi: {
|
|
4
4
|
/**
|
|
@@ -15,8 +15,15 @@ export declare const Didomi: {
|
|
|
15
15
|
* @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to "false".
|
|
16
16
|
* @param countryCode: Override user country code when determining the privacy regulation to apply. Keep undefined to let the Didomi SDK determine the user country.
|
|
17
17
|
* @param regionCode: Override user region code when determining the privacy regulation to apply. Keep undefined to let the Didomi SDK determine the user region. Ignored if countryCode is not set.
|
|
18
|
+
* @deprecated Use {@link #initializeWithParameters} instead
|
|
18
19
|
*/
|
|
19
20
|
initialize: (apiKey: string, localConfigurationPath?: string, remoteConfigurationUrl?: string, providerId?: string, disableDidomiRemoteConfig?: boolean, languageCode?: string, noticeId?: string, androidTvNoticeId?: string, androidTvEnabled?: boolean, countryCode?: string, regionCode?: string) => Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Initialize the Didomi SDK with parameters
|
|
23
|
+
* @param parameters: Parameters to initialize the Didomi SDK
|
|
24
|
+
* @returns: Promise that resolves we have called the native initialize method
|
|
25
|
+
*/
|
|
26
|
+
initializeWithParameters: (parameters: DidomiInitializeParameters) => Promise<void>;
|
|
20
27
|
/**
|
|
21
28
|
* Listen to SDK ready state
|
|
22
29
|
*/
|
|
@@ -256,6 +263,11 @@ export declare const Didomi: {
|
|
|
256
263
|
* getUserStatus().vendors.global.disabled.
|
|
257
264
|
*/
|
|
258
265
|
getUserStatusForVendor: (vendorId: string) => Promise<boolean>;
|
|
266
|
+
/**
|
|
267
|
+
* Determine the regulation applicable for the user.
|
|
268
|
+
* @returns: the regulation applicable for the current user. If no regulation is applicable, will return "none".
|
|
269
|
+
*/
|
|
270
|
+
getApplicableRegulation: () => Promise<string>;
|
|
259
271
|
/**
|
|
260
272
|
* Method used to get a Vendor based on its ID.
|
|
261
273
|
* @param vendorId: vendor ID used in the search.
|
|
@@ -353,7 +365,7 @@ export declare const Didomi: {
|
|
|
353
365
|
* @param digest Digest of the organization user ID and secret
|
|
354
366
|
* @param salt Salt used for computing the digest (optional)
|
|
355
367
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
356
|
-
* @deprecated
|
|
368
|
+
* @deprecated Use {@link setUserWithParameters} instead
|
|
357
369
|
*/
|
|
358
370
|
setUserWithHashAuth: (id: string, algorithm: string, secretId: string, digest: string, salt?: string, expiration?: BigInt) => void;
|
|
359
371
|
/**
|
|
@@ -365,7 +377,7 @@ export declare const Didomi: {
|
|
|
365
377
|
* @param digest Digest of the organization user ID and secret
|
|
366
378
|
* @param salt Salt used for computing the digest (optional)
|
|
367
379
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
368
|
-
* @deprecated
|
|
380
|
+
* @deprecated Use {@link setUserWithParametersAndSetupUI} instead
|
|
369
381
|
*/
|
|
370
382
|
setUserWithHashAuthAndSetupUI: (id: string, algorithm: string, secretId: string, digest: string, salt?: string, expiration?: BigInt) => void;
|
|
371
383
|
/**
|
|
@@ -376,7 +388,7 @@ export declare const Didomi: {
|
|
|
376
388
|
* @param secretId ID of the secret used for computing the digest
|
|
377
389
|
* @param initializationVector Initialization Vector used for computing the user ID
|
|
378
390
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
379
|
-
* @deprecated
|
|
391
|
+
* @deprecated Use {@link setUserWithParameters} instead
|
|
380
392
|
*/
|
|
381
393
|
setUserWithEncryptionAuth: (id: string, algorithm: string, secretId: string, initializationVector: string, expiration?: BigInt) => void;
|
|
382
394
|
/**
|
|
@@ -387,7 +399,7 @@ export declare const Didomi: {
|
|
|
387
399
|
* @param secretId ID of the secret used for computing the digest
|
|
388
400
|
* @param initializationVector Initialization Vector used for computing the user ID
|
|
389
401
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
390
|
-
* @deprecated
|
|
402
|
+
* @deprecated Use {@link setUserWithParametersAndSetupUI} instead
|
|
391
403
|
*/
|
|
392
404
|
setUserWithEncryptionAuthAndSetupUI: (id: string, algorithm: string, secretId: string, initializationVector: string, expiration?: BigInt) => void;
|
|
393
405
|
/**
|
|
@@ -395,6 +407,7 @@ export declare const Didomi: {
|
|
|
395
407
|
*
|
|
396
408
|
* @param userAuthParams as UserAuthParams (use UserAuthWithEncryptionParams or UserAuthWithHashParams)
|
|
397
409
|
* @param synchronizedUsers as UserAuthParams[] (optional)
|
|
410
|
+
* @deprecated Use {@link setUserWithParameters} instead
|
|
398
411
|
*/
|
|
399
412
|
setUserWithAuthParams: (userAuthParams: UserAuthParams, synchronizedUsers?: UserAuthParams[] | undefined) => void;
|
|
400
413
|
/**
|
|
@@ -402,15 +415,28 @@ export declare const Didomi: {
|
|
|
402
415
|
*
|
|
403
416
|
* @param userAuthParams as UserAuthParams (use UserAuthWithEncryptionParams or UserAuthWithHashParams)
|
|
404
417
|
* @param synchronizedUsers as UserAuthParams[] (optional)
|
|
418
|
+
* @deprecated Use {@link setUserWithParametersAndSetupUI} instead
|
|
405
419
|
*/
|
|
406
420
|
setUserWithAuthParamsAndSetupUI: (userAuthParams: UserAuthParams, synchronizedUsers?: UserAuthParams[] | undefined) => void;
|
|
421
|
+
/**
|
|
422
|
+
* Set user information with parameters
|
|
423
|
+
*
|
|
424
|
+
* @param parameters as DidomiUserParameters
|
|
425
|
+
*/
|
|
426
|
+
setUserWithParameters: (parameters: DidomiUserParameters) => void;
|
|
427
|
+
/**
|
|
428
|
+
* Set user information with parameters and check for missing consent
|
|
429
|
+
*
|
|
430
|
+
* @param parameters as DidomiUserParameters
|
|
431
|
+
*/
|
|
432
|
+
setUserWithParametersAndSetupUI: (parameters: DidomiUserParameters) => void;
|
|
407
433
|
/**
|
|
408
434
|
* Show the consent notice (if required, not disabled in the config and not already displayed)
|
|
409
435
|
*/
|
|
410
436
|
showNotice: () => Promise<void>;
|
|
411
437
|
/**
|
|
412
438
|
* Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.
|
|
413
|
-
* @param view: It can be `purposes
|
|
439
|
+
* @param view: It can be `purposes` or `vendors`. Note: `sensitive-personal-information` is deprecated and should not be used, as SPI purposes are now displayed in the `purposes` screen.
|
|
414
440
|
*/
|
|
415
441
|
showPreferences: (view?: string) => Promise<void>;
|
|
416
442
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Didomi.d.ts","sourceRoot":"","sources":["../../src/Didomi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Didomi.d.ts","sourceRoot":"","sources":["../../src/Didomi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,cAAc,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEhL,OAAO,EAAE,4BAA4B,EAAsC,MAAM,gCAAgC,CAAC;AAIlH,eAAO,MAAM,MAAM;IACjB;;;;;;;;;;;;;;;OAeG;yBAEO,MAAM,2BACW,MAAM,2BACN,MAAM,eAClB,MAAM,8BACQ,OAAO,iBACnB,MAAM,aACV,MAAM,sBACG,MAAM,qBACR,OAAO,gBACX,MAAM,eACP,MAAM,KAClB,OAAO,CAAC,IAAI,CAAC;IAsBhB;;;;OAIG;2CACoC,0BAA0B,KAAG,OAAO,CAAC,IAAI,CAAC;IAYjF;;OAEG;mBACU,OAAO,CAAC,IAAI,CAAC;IAM1B;;OAEG;mBACU,OAAO,CAAC,IAAI,CAAC;IAM1B;;OAEG;mBACU,OAAO,CAAC,IAAI,CAAC;IAE1B;;;;;;;;;;;;;;;;;;;;;;OAsBG;yBACkB,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;IAE3C;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OAAO,wBACH,OAAO,mBACZ,OAAO,KACvB,OAAO,CAAC,OAAO,CAAC;IAQnB;;;;;;;;;;;OAWG;kDAEyB,MAAM,EAAE,6BACP,MAAM,EAAE,uBACd,MAAM,EAAE,wBACP,MAAM,EAAE,2BACL,MAAM,EAAE,4BACP,MAAM,EAAE,sBACd,MAAM,EAAE,uBACP,MAAM,EAAE,KAC5B,OAAO,CAAC,OAAO,CAAC;IAYnB;;;;OAIG;oCAC2B,OAAO,CAAC,OAAO,CAAC;IAG9C;;;;;OAKG;2CACoC,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;IAG7D;;;;;OAKG;4CACmC,4BAA4B;CACnE,CAAC"}
|
|
@@ -7,6 +7,9 @@ export declare enum DidomiEventType {
|
|
|
7
7
|
NOTICE_CLICK_AGREE = "on_notice_click_agree",
|
|
8
8
|
NOTICE_CLICK_DISAGREE = "on_notice_click_disagree",
|
|
9
9
|
NOTICE_CLICK_VIEW_VENDORS = "on_notice_click_view_vendors",
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated SPI purposes are now displayed in preferences screen, use {@link #NOTICE_CLICK_MORE_INFO} instead.
|
|
12
|
+
*/
|
|
10
13
|
NOTICE_CLICK_VIEW_SPI_PURPOSES = "on_notice_click_view_spi_purposes",
|
|
11
14
|
NOTICE_CLICK_MORE_INFO = "on_notice_click_more_info",
|
|
12
15
|
NOTICE_CLICK_PRIVACY_POLICY = "on_notice_click_privacy_policy",
|
|
@@ -14,6 +17,9 @@ export declare enum DidomiEventType {
|
|
|
14
17
|
SHOW_PREFERENCES = "on_show_preferences",
|
|
15
18
|
PREFERENCES_CLICK_VIEW_PURPOSES = "on_preferences_click_view_purposes",
|
|
16
19
|
PREFERENCES_CLICK_VIEW_VENDORS = "on_preferences_click_view_vendors",
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated SPI purposes are now displayed in preferences screen.
|
|
22
|
+
*/
|
|
17
23
|
PREFERENCES_CLICK_VIEW_SPI_PURPOSES = "on_preferences_click_view_spi_purposes",
|
|
18
24
|
PREFERENCES_CLICK_AGREE_TO_ALL = "on_preferences_click_agree_to_all",
|
|
19
25
|
PREFERENCES_CLICK_DISAGREE_TO_ALL = "on_preferences_click_disagree_to_all",
|
|
@@ -30,13 +36,31 @@ export declare enum DidomiEventType {
|
|
|
30
36
|
PREFERENCES_CLICK_VENDOR_AGREE = "on_preferences_click_vendor_agree",
|
|
31
37
|
PREFERENCES_CLICK_VENDOR_DISAGREE = "on_preferences_click_vendor_disagree",
|
|
32
38
|
PREFERENCES_CLICK_VENDOR_SAVE_CHOICES = "on_preferences_click_vendor_save_choices",
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated SPI purposes are now treated as other purposes, use {@link #PREFERENCES_CLICK_PURPOSE_AGREE} instead.
|
|
41
|
+
*/
|
|
33
42
|
PREFERENCES_CLICK_SPI_PURPOSE_AGREE = "on_preferences_click_spi_purpose_agree",
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated SPI purposes are now treated as other purposes, use {@link #PREFERENCES_CLICK_PURPOSE_DISAGREE} instead.
|
|
45
|
+
*/
|
|
34
46
|
PREFERENCES_CLICK_SPI_PURPOSE_DISAGREE = "on_preferences_click_spi_purpose_disagree",
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated SPI purposes are now treated as other purposes, use {@link #PREFERENCES_CLICK_CATEGORY_AGREE} instead.
|
|
49
|
+
*/
|
|
35
50
|
PREFERENCES_CLICK_SPI_CATEGORY_AGREE = "on_preferences_click_spi_category_agree",
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated SPI purposes are now treated as other purposes, use {@link #PREFERENCES_CLICK_CATEGORY_DISAGREE} instead.
|
|
53
|
+
*/
|
|
36
54
|
PREFERENCES_CLICK_SPI_CATEGORY_DISAGREE = "on_preferences_click_spi_category_disagree",
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated SPI purposes are now displayed in preferences screen, use {@link #PREFERENCES_CLICK_SAVE_CHOICES} instead.
|
|
57
|
+
*/
|
|
37
58
|
PREFERENCES_CLICK_SPI_PURPOSE_SAVE_CHOICES = "on_preferences_click_spi_purpose_save_choices",
|
|
38
59
|
SYNC_READY = "on_sync_ready",
|
|
39
60
|
SYNC_ERROR = "on_sync_error",
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated use {@link #SYNC_READY} instead.
|
|
63
|
+
*/
|
|
40
64
|
SYNC_DONE = "on_sync_done",
|
|
41
65
|
LANGUAGE_UPDATED = "on_language_updated",
|
|
42
66
|
LANGUAGE_UPDATE_FAILED = "on_language_update_failed"
|
|
@@ -128,8 +152,10 @@ export interface SyncReadyEvent {
|
|
|
128
152
|
statusApplied: boolean;
|
|
129
153
|
syncAcknowledged: () => Promise<boolean>;
|
|
130
154
|
}
|
|
131
|
-
export interface
|
|
155
|
+
export interface UserAuth {
|
|
132
156
|
id: string;
|
|
157
|
+
}
|
|
158
|
+
export interface UserAuthParams extends UserAuth {
|
|
133
159
|
algorithm: string;
|
|
134
160
|
secretId: string;
|
|
135
161
|
expiration?: number;
|
|
@@ -141,4 +167,118 @@ export interface UserAuthWithHashParams extends UserAuthParams {
|
|
|
141
167
|
digest: string;
|
|
142
168
|
salt?: string;
|
|
143
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Initialization parameters for Didomi SDK
|
|
172
|
+
* @interface
|
|
173
|
+
*/
|
|
174
|
+
export interface DidomiInitializeParameters {
|
|
175
|
+
/**
|
|
176
|
+
* Public API key of the organization from the Didomi Console.
|
|
177
|
+
* @property
|
|
178
|
+
*/
|
|
179
|
+
apiKey: string;
|
|
180
|
+
/**
|
|
181
|
+
* Path to your local config file. Defaults to didomi_config.json if nil.
|
|
182
|
+
* @property
|
|
183
|
+
*/
|
|
184
|
+
localConfigurationPath?: string;
|
|
185
|
+
/**
|
|
186
|
+
* URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to nil for now.
|
|
187
|
+
* @property
|
|
188
|
+
*/
|
|
189
|
+
remoteConfigurationUrl?: string;
|
|
190
|
+
/**
|
|
191
|
+
* The provider ID (if any).
|
|
192
|
+
* @property
|
|
193
|
+
*/
|
|
194
|
+
providerId?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Whether to disable loading the remove configuration from the Didomi config. Keep this to `false` for loading configuration from the Didomi Console.
|
|
197
|
+
* @property
|
|
198
|
+
* @deprecated In the future, it will be mandatory to create your notice from the console (see https://developers.didomi.io/cmp/mobile-sdk/android/setup#from-the-console-recommended for more information).
|
|
199
|
+
*/
|
|
200
|
+
disableDidomiRemoteConfig?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Language in which the consent UI should be displayed. By default, the consent UI is displayed in the language configured in the device settings.
|
|
203
|
+
* This property allows you to override the default setting and specify a language to display the UI in. String containing the language code e.g.: "es", "fr", etc.
|
|
204
|
+
* @property
|
|
205
|
+
*/
|
|
206
|
+
languageCode?: string;
|
|
207
|
+
/**
|
|
208
|
+
* ID of the notice configuration to load from the Didomi Console.
|
|
209
|
+
* @property
|
|
210
|
+
*/
|
|
211
|
+
noticeId?: string;
|
|
212
|
+
/**
|
|
213
|
+
* ID of the notice to display on Android TV
|
|
214
|
+
* @property
|
|
215
|
+
*/
|
|
216
|
+
androidTvNoticeId?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Enable/disable Android TV specific features
|
|
219
|
+
* @property
|
|
220
|
+
*/
|
|
221
|
+
androidTvEnabled?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Override user country code when determining the privacy regulation to apply.
|
|
224
|
+
* Keep `undefined` to let the Didomi SDK determine the user country.
|
|
225
|
+
* @property
|
|
226
|
+
*/
|
|
227
|
+
countryCode?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Override user region code when determining the privacy regulation to apply.
|
|
230
|
+
* Keep `undefined` to let the Didomi SDK determine the user region.
|
|
231
|
+
* Ignored if `countryCode` is not set.
|
|
232
|
+
* @property
|
|
233
|
+
*/
|
|
234
|
+
regionCode?: string;
|
|
235
|
+
/**
|
|
236
|
+
* If set to `true`, the SDK will only display the underage notice (`false` by default).
|
|
237
|
+
* @property
|
|
238
|
+
*/
|
|
239
|
+
isUnderage?: boolean;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Object that contains the parameters for the setUser method.
|
|
243
|
+
* @interface
|
|
244
|
+
*/
|
|
245
|
+
export interface DidomiUserParameters {
|
|
246
|
+
/**
|
|
247
|
+
* @property
|
|
248
|
+
*/
|
|
249
|
+
userId?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Main user authentication
|
|
252
|
+
* - [UserAuthWithEncryptionParams] (encryption)
|
|
253
|
+
* - [UserAuthWithHashParams] (hash)
|
|
254
|
+
* - [UserAuthWithoutParams] (ID only)
|
|
255
|
+
* @property
|
|
256
|
+
*/
|
|
257
|
+
userAuth?: UserAuth;
|
|
258
|
+
/**
|
|
259
|
+
* User authentication for Didomi Consent String
|
|
260
|
+
* - [UserAuthWithEncryptionParams] (encryption)
|
|
261
|
+
* - [UserAuthWithHashParams] (hash)
|
|
262
|
+
* @property
|
|
263
|
+
*/
|
|
264
|
+
dcsUserAuth?: UserAuthParams;
|
|
265
|
+
/**
|
|
266
|
+
* If the user is underage (undefined will keep the previous setting)
|
|
267
|
+
* @property
|
|
268
|
+
*/
|
|
269
|
+
isUnderage?: boolean;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Object that contains the parameters for the setUser method including synchronized users.
|
|
273
|
+
* @interface
|
|
274
|
+
*/
|
|
275
|
+
export interface DidomiMultiUserParameters extends DidomiUserParameters {
|
|
276
|
+
/**
|
|
277
|
+
* Synchronized user list
|
|
278
|
+
* - [UserAuthWithEncryptionParams] (encryption)
|
|
279
|
+
* - [UserAuthWithHashParams] (hash)
|
|
280
|
+
* @property
|
|
281
|
+
*/
|
|
282
|
+
synchronizedUsers?: UserAuthParams[];
|
|
283
|
+
}
|
|
144
284
|
//# sourceMappingURL=DidomiTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidomiTypes.d.ts","sourceRoot":"","sources":["../../src/DidomiTypes.ts"],"names":[],"mappings":"AACA,oBAAY,eAAe;IAEvB,eAAe,uBAAuB;IAEtC,KAAK,aAAa;IAClB,KAAK,aAAa;IAElB,WAAW,mBAAmB;IAC9B,WAAW,mBAAmB;IAC9B,kBAAkB,0BAA0B;IAC5C,qBAAqB,6BAA6B;IAClD,yBAAyB,iCAAiC;IAC1D,8BAA8B,sCAAsC;IACpE,sBAAsB,8BAA8B;IACpD,2BAA2B,mCAAmC;IAE9D,gBAAgB,wBAAwB;IACxC,gBAAgB,wBAAwB;IAExC,+BAA+B,uCAAuC;IACtE,8BAA8B,sCAAsC;IACpE,mCAAmC,2CAA2C;IAE9E,8BAA8B,sCAAsC;IACpE,iCAAiC,yCAAyC;IAC1E,uCAAuC,+CAA+C;IACtF,0CAA0C,kDAAkD;IAC5F,oCAAoC,4CAA4C;IAChF,+BAA+B,uCAAuC;IACtE,kCAAkC,0CAA0C;IAC5E,gCAAgC,wCAAwC;IACxE,mCAAmC,2CAA2C;IAC9E,8BAA8B,sCAAsC;IAEpE,sCAAsC,8CAA8C;IACpF,yCAAyC,iDAAiD;IAC1F,8BAA8B,sCAAsC;IACpE,iCAAiC,yCAAyC;IAC1E,qCAAqC,6CAA6C;IAElF,mCAAmC,2CAA2C;IAC9E,sCAAsC,8CAA8C;IACpF,oCAAoC,4CAA4C;IAChF,uCAAuC,+CAA+C;IACtF,0CAA0C,kDAAkD;IAE5F,UAAU,kBAAkB;IAC5B,UAAU,kBAAkB;
|
|
1
|
+
{"version":3,"file":"DidomiTypes.d.ts","sourceRoot":"","sources":["../../src/DidomiTypes.ts"],"names":[],"mappings":"AACA,oBAAY,eAAe;IAEvB,eAAe,uBAAuB;IAEtC,KAAK,aAAa;IAClB,KAAK,aAAa;IAElB,WAAW,mBAAmB;IAC9B,WAAW,mBAAmB;IAC9B,kBAAkB,0BAA0B;IAC5C,qBAAqB,6BAA6B;IAClD,yBAAyB,iCAAiC;IAC1D;;OAE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AGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,cAAc,EAAE,CAAC;CACtC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Didomi } from './Didomi';
|
|
2
|
-
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds, CurrentUserStatus, PurposeStatus, VendorStatus, UserAuthWithEncryptionParams, UserAuthWithHashParams } from './DidomiTypes';
|
|
2
|
+
export { DidomiEventType, Vendor, VendorNamespaces, Purpose, UserStatus, UserStatusPurposes, UserStatusVendors, UserStatusIds, CurrentUserStatus, PurposeStatus, VendorStatus, UserAuthWithEncryptionParams, UserAuthWithHashParams, DidomiInitializeParameters } from './DidomiTypes';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACH,eAAe,EACf,MAAM,EACN,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACH,eAAe,EACf,MAAM,EACN,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,sBAAsB,EACtB,0BAA0B,EAC7B,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
package/src/Constants.ts
CHANGED
package/src/Didomi.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NativeModules } from 'react-native';
|
|
2
2
|
import { DidomiListener } from './DidomiListener';
|
|
3
|
-
import { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus, VendorStatus, UserAuthParams } from './DidomiTypes';
|
|
3
|
+
import { DidomiEventType, Purpose, Vendor, UserStatus, CurrentUserStatus, VendorStatus, UserAuthParams, DidomiInitializeParameters, DidomiUserParameters } from './DidomiTypes';
|
|
4
4
|
import { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';
|
|
5
5
|
import { CurrentUserStatusTransaction, createCurrentUserStatusTransaction } from './CurrentUserStatusTransaction';
|
|
6
6
|
|
|
@@ -21,6 +21,7 @@ export const Didomi = {
|
|
|
21
21
|
* @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to "false".
|
|
22
22
|
* @param countryCode: Override user country code when determining the privacy regulation to apply. Keep undefined to let the Didomi SDK determine the user country.
|
|
23
23
|
* @param regionCode: Override user region code when determining the privacy regulation to apply. Keep undefined to let the Didomi SDK determine the user region. Ignored if countryCode is not set.
|
|
24
|
+
* @deprecated Use {@link #initializeWithParameters} instead
|
|
24
25
|
*/
|
|
25
26
|
initialize: (
|
|
26
27
|
apiKey: string,
|
|
@@ -56,6 +57,23 @@ export const Didomi = {
|
|
|
56
57
|
);
|
|
57
58
|
},
|
|
58
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Initialize the Didomi SDK with parameters
|
|
62
|
+
* @param parameters: Parameters to initialize the Didomi SDK
|
|
63
|
+
* @returns: Promise that resolves we have called the native initialize method
|
|
64
|
+
*/
|
|
65
|
+
initializeWithParameters: (parameters: DidomiInitializeParameters): Promise<void> => {
|
|
66
|
+
// Init listener
|
|
67
|
+
DidomiListener.init();
|
|
68
|
+
|
|
69
|
+
// Trigger native SDK init
|
|
70
|
+
return RNDidomi.initializeWithParameters(
|
|
71
|
+
DIDOMI_USER_AGENT_NAME,
|
|
72
|
+
DIDOMI_VERSION,
|
|
73
|
+
JSON.stringify(parameters)
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
|
|
59
77
|
/**
|
|
60
78
|
* Listen to SDK ready state
|
|
61
79
|
*/
|
|
@@ -353,6 +371,12 @@ export const Didomi = {
|
|
|
353
371
|
*/
|
|
354
372
|
getUserStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserStatusForVendor(vendorId),
|
|
355
373
|
|
|
374
|
+
/**
|
|
375
|
+
* Determine the regulation applicable for the user.
|
|
376
|
+
* @returns: the regulation applicable for the current user. If no regulation is applicable, will return "none".
|
|
377
|
+
*/
|
|
378
|
+
getApplicableRegulation: (): Promise<string> => RNDidomi.getApplicableRegulation(),
|
|
379
|
+
|
|
356
380
|
/**
|
|
357
381
|
* Method used to get a Vendor based on its ID.
|
|
358
382
|
* @param vendorId: vendor ID used in the search.
|
|
@@ -467,7 +491,7 @@ export const Didomi = {
|
|
|
467
491
|
* @param digest Digest of the organization user ID and secret
|
|
468
492
|
* @param salt Salt used for computing the digest (optional)
|
|
469
493
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
470
|
-
* @deprecated
|
|
494
|
+
* @deprecated Use {@link setUserWithParameters} instead
|
|
471
495
|
*/
|
|
472
496
|
setUserWithHashAuth: (
|
|
473
497
|
id: string,
|
|
@@ -506,7 +530,7 @@ export const Didomi = {
|
|
|
506
530
|
* @param digest Digest of the organization user ID and secret
|
|
507
531
|
* @param salt Salt used for computing the digest (optional)
|
|
508
532
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
509
|
-
* @deprecated
|
|
533
|
+
* @deprecated Use {@link setUserWithParametersAndSetupUI} instead
|
|
510
534
|
*/
|
|
511
535
|
setUserWithHashAuthAndSetupUI: (
|
|
512
536
|
id: string,
|
|
@@ -544,7 +568,7 @@ export const Didomi = {
|
|
|
544
568
|
* @param secretId ID of the secret used for computing the digest
|
|
545
569
|
* @param initializationVector Initialization Vector used for computing the user ID
|
|
546
570
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
547
|
-
* @deprecated
|
|
571
|
+
* @deprecated Use {@link setUserWithParameters} instead
|
|
548
572
|
*/
|
|
549
573
|
setUserWithEncryptionAuth: (
|
|
550
574
|
id: string,
|
|
@@ -579,7 +603,7 @@ export const Didomi = {
|
|
|
579
603
|
* @param secretId ID of the secret used for computing the digest
|
|
580
604
|
* @param initializationVector Initialization Vector used for computing the user ID
|
|
581
605
|
* @param expiration Expiration date as timestamp (to prevent replay attacks)
|
|
582
|
-
* @deprecated
|
|
606
|
+
* @deprecated Use {@link setUserWithParametersAndSetupUI} instead
|
|
583
607
|
*/
|
|
584
608
|
setUserWithEncryptionAuthAndSetupUI: (
|
|
585
609
|
id: string,
|
|
@@ -611,6 +635,7 @@ export const Didomi = {
|
|
|
611
635
|
*
|
|
612
636
|
* @param userAuthParams as UserAuthParams (use UserAuthWithEncryptionParams or UserAuthWithHashParams)
|
|
613
637
|
* @param synchronizedUsers as UserAuthParams[] (optional)
|
|
638
|
+
* @deprecated Use {@link setUserWithParameters} instead
|
|
614
639
|
*/
|
|
615
640
|
setUserWithAuthParams: (
|
|
616
641
|
userAuthParams: UserAuthParams,
|
|
@@ -622,12 +647,27 @@ export const Didomi = {
|
|
|
622
647
|
*
|
|
623
648
|
* @param userAuthParams as UserAuthParams (use UserAuthWithEncryptionParams or UserAuthWithHashParams)
|
|
624
649
|
* @param synchronizedUsers as UserAuthParams[] (optional)
|
|
650
|
+
* @deprecated Use {@link setUserWithParametersAndSetupUI} instead
|
|
625
651
|
*/
|
|
626
652
|
setUserWithAuthParamsAndSetupUI: (
|
|
627
653
|
userAuthParams: UserAuthParams,
|
|
628
654
|
synchronizedUsers?: UserAuthParams[] | undefined
|
|
629
655
|
): void => RNDidomi.setUserWithAuthParamsAndSetupUI(JSON.stringify(userAuthParams), JSON.stringify(synchronizedUsers)),
|
|
630
656
|
|
|
657
|
+
/**
|
|
658
|
+
* Set user information with parameters
|
|
659
|
+
*
|
|
660
|
+
* @param parameters as DidomiUserParameters
|
|
661
|
+
*/
|
|
662
|
+
setUserWithParameters: (parameters: DidomiUserParameters): void => RNDidomi.setUserWithParameters(JSON.stringify(parameters)),
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Set user information with parameters and check for missing consent
|
|
666
|
+
*
|
|
667
|
+
* @param parameters as DidomiUserParameters
|
|
668
|
+
*/
|
|
669
|
+
setUserWithParametersAndSetupUI: (parameters: DidomiUserParameters): void => RNDidomi.setUserWithParametersAndSetupUI(JSON.stringify(parameters)),
|
|
670
|
+
|
|
631
671
|
/**
|
|
632
672
|
* Show the consent notice (if required, not disabled in the config and not already displayed)
|
|
633
673
|
*/
|
|
@@ -635,7 +675,7 @@ export const Didomi = {
|
|
|
635
675
|
|
|
636
676
|
/**
|
|
637
677
|
* Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.
|
|
638
|
-
* @param view: It can be `purposes
|
|
678
|
+
* @param view: It can be `purposes` or `vendors`. Note: `sensitive-personal-information` is deprecated and should not be used, as SPI purposes are now displayed in the `purposes` screen.
|
|
639
679
|
*/
|
|
640
680
|
showPreferences: (view?: string): Promise<void> => RNDidomi.showPreferences(view),
|
|
641
681
|
|