@didomi/react-native 1.5.0 → 1.8.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/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativedidomi/DidomiModule.kt +205 -13
- package/android/src/main/java/com/reactnativedidomi/EventTypes.kt +5 -2
- package/ios/Didomi.m +98 -17
- package/ios/RNDidomi.swift +321 -131
- package/lib/commonjs/Constants.js +1 -1
- package/lib/commonjs/Constants.js.map +1 -1
- package/lib/commonjs/Didomi.js +102 -4
- package/lib/commonjs/Didomi.js.map +1 -1
- package/lib/commonjs/DidomiListener.js +2 -0
- package/lib/commonjs/DidomiListener.js.map +1 -1
- package/lib/commonjs/DidomiTypes.js +3 -0
- package/lib/commonjs/DidomiTypes.js.map +1 -1
- package/lib/module/Constants.js +1 -1
- package/lib/module/Constants.js.map +1 -1
- package/lib/module/Didomi.js +102 -4
- package/lib/module/Didomi.js.map +1 -1
- package/lib/module/DidomiListener.js +2 -0
- package/lib/module/DidomiListener.js.map +1 -1
- package/lib/module/DidomiTypes.js +3 -0
- package/lib/module/DidomiTypes.js.map +1 -1
- package/lib/typescript/Constants.d.ts +1 -1
- package/lib/typescript/Didomi.d.ts +72 -4
- package/lib/typescript/DidomiTypes.d.ts +6 -2
- package/package.json +1 -4
- package/react-native-didomi.podspec +1 -1
- package/src/Constants.ts +1 -1
- package/src/Didomi.ts +190 -18
- package/src/DidomiListener.ts +2 -0
- package/src/DidomiTypes.ts +5 -1
package/android/build.gradle
CHANGED
|
@@ -12,7 +12,8 @@ import io.didomi.sdk.Didomi
|
|
|
12
12
|
import io.didomi.sdk.DidomiInitializeParameters
|
|
13
13
|
import io.didomi.sdk.events.*
|
|
14
14
|
import io.didomi.sdk.exceptions.DidomiNotReadyException
|
|
15
|
-
|
|
15
|
+
import io.didomi.sdk.user.UserAuthWithEncryptionParams
|
|
16
|
+
import io.didomi.sdk.user.UserAuthWithHashParams
|
|
16
17
|
|
|
17
18
|
class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
18
19
|
|
|
@@ -170,6 +171,21 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
170
171
|
* Sync finished
|
|
171
172
|
*/
|
|
172
173
|
override fun syncDone(event: SyncDoneEvent) = prepareEvent(EventTypes.SYNC_DONE.event, event.organizationUserId)
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Sync error
|
|
177
|
+
*/
|
|
178
|
+
override fun syncError(event: SyncErrorEvent) = prepareEvent(EventTypes.SYNC_ERROR.event, event.error)
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Language updated
|
|
182
|
+
*/
|
|
183
|
+
override fun languageUpdated(event: LanguageUpdatedEvent) = prepareEvent(EventTypes.LANGUAGE_UPDATED.event, event.languageCode)
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Language update failed
|
|
187
|
+
*/
|
|
188
|
+
override fun languageUpdateFailed(event: LanguageUpdateFailedEvent) = prepareEvent(EventTypes.LANGUAGE_UPDATE_FAILED.event, event.reason)
|
|
173
189
|
}
|
|
174
190
|
|
|
175
191
|
override fun getName() = "Didomi"
|
|
@@ -227,7 +243,13 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
227
243
|
|
|
228
244
|
private fun objectToWritableMap(obj: Any?): WritableMap {
|
|
229
245
|
val map = WritableNativeMap()
|
|
230
|
-
obj?.serializeToMap()?.entries?.forEach { entry ->
|
|
246
|
+
obj?.serializeToMap()?.entries?.forEach { entry ->
|
|
247
|
+
when (val value = entry.value) {
|
|
248
|
+
is Map<*,*> -> map.putMap(entry.key, objectToWritableMap(value))
|
|
249
|
+
is List<*> -> map.putArray(entry.key, Arguments.fromList(value))
|
|
250
|
+
else -> map.putString(entry.key, value.toString())
|
|
251
|
+
}
|
|
252
|
+
}
|
|
231
253
|
return map
|
|
232
254
|
}
|
|
233
255
|
|
|
@@ -258,7 +280,8 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
258
280
|
noticeId
|
|
259
281
|
)
|
|
260
282
|
|
|
261
|
-
|
|
283
|
+
val application = currentActivity?.application ?: throw IllegalStateException("No activity present")
|
|
284
|
+
Didomi.getInstance().initialize(application, parameters)
|
|
262
285
|
|
|
263
286
|
Didomi.getInstance().onReady { prepareEvent(EventTypes.READY_CALLBACK.event, null) }
|
|
264
287
|
Didomi.getInstance().onError { prepareEvent(EventTypes.ERROR_CALLBACK.event, null) }
|
|
@@ -266,7 +289,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
266
289
|
promise.resolve(0)
|
|
267
290
|
|
|
268
291
|
} catch (e: Exception) {
|
|
269
|
-
Log.e("initialize", "Error while initializing the Didomi SDK", e)
|
|
292
|
+
Log.e("initialize", "Error while initializing the Didomi SDK", e)
|
|
270
293
|
promise.reject(e)
|
|
271
294
|
}
|
|
272
295
|
}
|
|
@@ -275,7 +298,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
275
298
|
fun setupUI(promise: Promise) {
|
|
276
299
|
try {
|
|
277
300
|
runOnUiThread {
|
|
278
|
-
Didomi.getInstance().setupUI(currentActivity as FragmentActivity)
|
|
301
|
+
Didomi.getInstance().setupUI(currentActivity as? FragmentActivity)
|
|
279
302
|
}
|
|
280
303
|
promise.resolve(0)
|
|
281
304
|
} catch (e: Exception) {
|
|
@@ -519,7 +542,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
519
542
|
@ReactMethod
|
|
520
543
|
fun getUserStatus(promise: Promise) {
|
|
521
544
|
try {
|
|
522
|
-
promise.resolve(objectToWritableMap(Didomi.getInstance().
|
|
545
|
+
promise.resolve(objectToWritableMap(Didomi.getInstance().userStatus))
|
|
523
546
|
} catch (e: DidomiNotReadyException) {
|
|
524
547
|
promise.reject(e)
|
|
525
548
|
}
|
|
@@ -584,7 +607,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
584
607
|
@ReactMethod
|
|
585
608
|
fun isNoticeVisible(promise: Promise) {
|
|
586
609
|
try {
|
|
587
|
-
promise.resolve(Didomi.getInstance().isNoticeVisible)
|
|
610
|
+
promise.resolve(Didomi.getInstance().isNoticeVisible())
|
|
588
611
|
} catch (e: DidomiNotReadyException) {
|
|
589
612
|
promise.reject(e)
|
|
590
613
|
}
|
|
@@ -593,7 +616,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
593
616
|
@ReactMethod
|
|
594
617
|
fun isPreferencesVisible(promise: Promise) {
|
|
595
618
|
try {
|
|
596
|
-
promise.resolve(Didomi.getInstance().isPreferencesVisible)
|
|
619
|
+
promise.resolve(Didomi.getInstance().isPreferencesVisible())
|
|
597
620
|
} catch (e: DidomiNotReadyException) {
|
|
598
621
|
promise.reject(e)
|
|
599
622
|
}
|
|
@@ -609,6 +632,12 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
609
632
|
promise.resolve(Didomi.getInstance().isReady)
|
|
610
633
|
}
|
|
611
634
|
|
|
635
|
+
@ReactMethod
|
|
636
|
+
fun clearUser(promise: Promise) {
|
|
637
|
+
Didomi.getInstance().clearUser()
|
|
638
|
+
promise.resolve(0)
|
|
639
|
+
}
|
|
640
|
+
|
|
612
641
|
@ReactMethod
|
|
613
642
|
fun setUser(organizationUserId: String,
|
|
614
643
|
organizationUserIdAuthAlgorithm: String?,
|
|
@@ -619,7 +648,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
619
648
|
if (organizationUserIdAuthAlgorithm != null
|
|
620
649
|
&& organizationUserIdAuthSid != null
|
|
621
650
|
&& organizationUserIdAuthSalt != null
|
|
622
|
-
&& organizationUserIdAuthDigest != null)
|
|
651
|
+
&& organizationUserIdAuthDigest != null) {
|
|
623
652
|
Didomi.getInstance().setUser(
|
|
624
653
|
organizationUserId,
|
|
625
654
|
organizationUserIdAuthAlgorithm,
|
|
@@ -627,9 +656,172 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
627
656
|
organizationUserIdAuthSalt,
|
|
628
657
|
organizationUserIdAuthDigest
|
|
629
658
|
)
|
|
630
|
-
else
|
|
659
|
+
} else {
|
|
631
660
|
Didomi.getInstance().setUser(organizationUserId)
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
promise.resolve(0)
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
@ReactMethod
|
|
667
|
+
fun setUserAndSetupUI(organizationUserId: String, promise: Promise) {
|
|
668
|
+
Didomi.getInstance().setUser(organizationUserId, currentActivity as? FragmentActivity)
|
|
669
|
+
promise.resolve(0)
|
|
670
|
+
}
|
|
632
671
|
|
|
672
|
+
@ReactMethod
|
|
673
|
+
fun setUserWithHashAuth(organizationUserId: String,
|
|
674
|
+
algorithm: String,
|
|
675
|
+
secretId: String,
|
|
676
|
+
digest: String,
|
|
677
|
+
salt: String?,
|
|
678
|
+
promise: Promise) {
|
|
679
|
+
Didomi.getInstance().setUser(
|
|
680
|
+
UserAuthWithHashParams(
|
|
681
|
+
organizationUserId,
|
|
682
|
+
algorithm,
|
|
683
|
+
secretId,
|
|
684
|
+
digest,
|
|
685
|
+
salt
|
|
686
|
+
)
|
|
687
|
+
)
|
|
688
|
+
promise.resolve(0)
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
@ReactMethod
|
|
692
|
+
fun setUserWithHashAuthAndSetupUI(organizationUserId: String,
|
|
693
|
+
algorithm: String,
|
|
694
|
+
secretId: String,
|
|
695
|
+
digest: String,
|
|
696
|
+
salt: String?,
|
|
697
|
+
promise: Promise) {
|
|
698
|
+
Didomi.getInstance().setUser(
|
|
699
|
+
UserAuthWithHashParams(
|
|
700
|
+
organizationUserId,
|
|
701
|
+
algorithm,
|
|
702
|
+
secretId,
|
|
703
|
+
digest,
|
|
704
|
+
salt
|
|
705
|
+
),
|
|
706
|
+
currentActivity as? FragmentActivity
|
|
707
|
+
)
|
|
708
|
+
promise.resolve(0)
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
@ReactMethod
|
|
712
|
+
fun setUserWithHashAuthWithExpiration(organizationUserId: String,
|
|
713
|
+
algorithm: String,
|
|
714
|
+
secretId: String,
|
|
715
|
+
digest: String,
|
|
716
|
+
salt: String?,
|
|
717
|
+
expiration: Int,
|
|
718
|
+
promise: Promise) {
|
|
719
|
+
Didomi.getInstance().setUser(
|
|
720
|
+
UserAuthWithHashParams(
|
|
721
|
+
organizationUserId,
|
|
722
|
+
algorithm,
|
|
723
|
+
secretId,
|
|
724
|
+
digest,
|
|
725
|
+
salt,
|
|
726
|
+
expiration.toLong()
|
|
727
|
+
)
|
|
728
|
+
)
|
|
729
|
+
promise.resolve(0)
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
@ReactMethod
|
|
733
|
+
fun setUserWithHashAuthWithExpirationAndSetupUI(organizationUserId: String,
|
|
734
|
+
algorithm: String,
|
|
735
|
+
secretId: String,
|
|
736
|
+
digest: String,
|
|
737
|
+
salt: String?,
|
|
738
|
+
expiration: Int,
|
|
739
|
+
promise: Promise) {
|
|
740
|
+
Didomi.getInstance().setUser(
|
|
741
|
+
UserAuthWithHashParams(
|
|
742
|
+
organizationUserId,
|
|
743
|
+
algorithm,
|
|
744
|
+
secretId,
|
|
745
|
+
digest,
|
|
746
|
+
salt,
|
|
747
|
+
expiration.toLong()
|
|
748
|
+
),
|
|
749
|
+
currentActivity as? FragmentActivity
|
|
750
|
+
)
|
|
751
|
+
promise.resolve(0)
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
@ReactMethod
|
|
755
|
+
fun setUserWithEncryptionAuth(organizationUserId: String,
|
|
756
|
+
algorithm: String,
|
|
757
|
+
secretId: String,
|
|
758
|
+
initializationVector: String,
|
|
759
|
+
promise: Promise) {
|
|
760
|
+
Didomi.getInstance().setUser(
|
|
761
|
+
UserAuthWithEncryptionParams(
|
|
762
|
+
organizationUserId,
|
|
763
|
+
algorithm,
|
|
764
|
+
secretId,
|
|
765
|
+
initializationVector
|
|
766
|
+
)
|
|
767
|
+
)
|
|
768
|
+
promise.resolve(0)
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
@ReactMethod
|
|
772
|
+
fun setUserWithEncryptionAuthAndSetupUI(organizationUserId: String,
|
|
773
|
+
algorithm: String,
|
|
774
|
+
secretId: String,
|
|
775
|
+
initializationVector: String,
|
|
776
|
+
promise: Promise) {
|
|
777
|
+
Didomi.getInstance().setUser(
|
|
778
|
+
UserAuthWithEncryptionParams(
|
|
779
|
+
organizationUserId,
|
|
780
|
+
algorithm,
|
|
781
|
+
secretId,
|
|
782
|
+
initializationVector
|
|
783
|
+
),
|
|
784
|
+
currentActivity as? FragmentActivity
|
|
785
|
+
)
|
|
786
|
+
promise.resolve(0)
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
@ReactMethod
|
|
790
|
+
fun setUserWithEncryptionAuthWithExpiration(organizationUserId: String,
|
|
791
|
+
algorithm: String,
|
|
792
|
+
secretId: String,
|
|
793
|
+
initializationVector: String,
|
|
794
|
+
expiration: Int,
|
|
795
|
+
promise: Promise) {
|
|
796
|
+
Didomi.getInstance().setUser(
|
|
797
|
+
UserAuthWithEncryptionParams(
|
|
798
|
+
organizationUserId,
|
|
799
|
+
algorithm,
|
|
800
|
+
secretId,
|
|
801
|
+
initializationVector,
|
|
802
|
+
expiration.toLong()
|
|
803
|
+
)
|
|
804
|
+
)
|
|
805
|
+
promise.resolve(0)
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
@ReactMethod
|
|
809
|
+
fun setUserWithEncryptionAuthWithExpirationAndSetupUI(organizationUserId: String,
|
|
810
|
+
algorithm: String,
|
|
811
|
+
secretId: String,
|
|
812
|
+
initializationVector: String,
|
|
813
|
+
expiration: Int,
|
|
814
|
+
promise: Promise) {
|
|
815
|
+
Didomi.getInstance().setUser(
|
|
816
|
+
UserAuthWithEncryptionParams(
|
|
817
|
+
organizationUserId,
|
|
818
|
+
algorithm,
|
|
819
|
+
secretId,
|
|
820
|
+
initializationVector,
|
|
821
|
+
expiration.toLong()
|
|
822
|
+
),
|
|
823
|
+
currentActivity as? FragmentActivity
|
|
824
|
+
)
|
|
633
825
|
promise.resolve(0)
|
|
634
826
|
}
|
|
635
827
|
|
|
@@ -637,7 +829,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
637
829
|
fun showNotice(promise: Promise) {
|
|
638
830
|
try {
|
|
639
831
|
runOnUiThread {
|
|
640
|
-
Didomi.getInstance().showNotice(currentActivity as FragmentActivity)
|
|
832
|
+
Didomi.getInstance().showNotice(currentActivity as? FragmentActivity)
|
|
641
833
|
}
|
|
642
834
|
promise.resolve(0)
|
|
643
835
|
} catch (e: Exception) {
|
|
@@ -651,8 +843,8 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
|
|
|
651
843
|
try {
|
|
652
844
|
runOnUiThread {
|
|
653
845
|
view?.also {
|
|
654
|
-
Didomi.getInstance().showPreferences(currentActivity as FragmentActivity, view)
|
|
655
|
-
} ?: Didomi.getInstance().showPreferences(currentActivity as FragmentActivity)
|
|
846
|
+
Didomi.getInstance().showPreferences(currentActivity as? FragmentActivity, view)
|
|
847
|
+
} ?: Didomi.getInstance().showPreferences(currentActivity as? FragmentActivity)
|
|
656
848
|
}
|
|
657
849
|
promise.resolve(0)
|
|
658
850
|
} catch (e: Exception) {
|
|
@@ -32,5 +32,8 @@ enum class EventTypes(val event: String) {
|
|
|
32
32
|
PREFERENCES_CLICK_AGREE_TO_ALL_PURPOSES("on_preferences_click_agree_to_all_purposes"),
|
|
33
33
|
PREFERENCES_CLICK_DISAGREE_TO_ALL_PURPOSES("on_preferences_click_disagree_to_all_purposes"),
|
|
34
34
|
PREFERENCES_CLICK_RESET_ALL_PURPOSES("on_preferences_click_reset_all_purposes"),
|
|
35
|
-
SYNC_DONE("on_sync_done")
|
|
36
|
-
|
|
35
|
+
SYNC_DONE("on_sync_done"),
|
|
36
|
+
SYNC_ERROR("on_sync_error"),
|
|
37
|
+
LANGUAGE_UPDATED("on_language_updated"),
|
|
38
|
+
LANGUAGE_UPDATE_FAILED("on_language_update_failed");
|
|
39
|
+
}
|
package/ios/Didomi.m
CHANGED
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
@interface RCT_EXTERN_MODULE(Didomi, RCTEventEmitter)
|
|
5
5
|
|
|
6
|
-
RCT_EXTERN_METHOD(multiply:(float)a withB:(float)b
|
|
7
|
-
withResolver:(RCTPromiseResolveBlock)resolve
|
|
8
|
-
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
9
|
-
|
|
10
6
|
RCT_EXTERN_METHOD(initialize:(NSString *)userAgentName
|
|
11
7
|
userAgentVersion:(NSString *)userAgentVersion
|
|
12
8
|
apiKey:(NSString *)apiKey
|
|
@@ -15,7 +11,9 @@ RCT_EXTERN_METHOD(initialize:(NSString *)userAgentName
|
|
|
15
11
|
providerId:(nullable NSString *)providerId
|
|
16
12
|
disableDidomiRemoteConfig:(BOOL)disableDidomiRemoteConfig
|
|
17
13
|
languageCode:(nullable NSString *)languageCode
|
|
18
|
-
noticeId:(nullable NSString *)noticeId
|
|
14
|
+
noticeId:(nullable NSString *)noticeId
|
|
15
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
16
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
19
17
|
|
|
20
18
|
RCT_EXTERN_METHOD(onReady)
|
|
21
19
|
|
|
@@ -102,7 +100,8 @@ RCT_EXTERN_METHOD(setUserDisagreeToAll:(RCTPromiseResolveBlock)resolve
|
|
|
102
100
|
// Didomi.shared.onError(callback: callback)
|
|
103
101
|
// }
|
|
104
102
|
|
|
105
|
-
RCT_EXTERN_METHOD(reset)
|
|
103
|
+
RCT_EXTERN_METHOD(reset:(RCTPromiseResolveBlock)resolve
|
|
104
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
106
105
|
|
|
107
106
|
RCT_EXTERN_METHOD(getRequiredPurposeIds:(RCTPromiseResolveBlock)resolve
|
|
108
107
|
reject:(RCTPromiseRejectBlock)reject)
|
|
@@ -157,7 +156,9 @@ RCT_EXTERN_METHOD(getJavaScriptForWebView:(NSString *)extra
|
|
|
157
156
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
158
157
|
reject:(RCTPromiseRejectBlock)reject)
|
|
159
158
|
|
|
160
|
-
RCT_EXTERN_METHOD(updateSelectedLanguage:(NSString *)languageCode
|
|
159
|
+
RCT_EXTERN_METHOD(updateSelectedLanguage:(NSString *)languageCode
|
|
160
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
161
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
161
162
|
|
|
162
163
|
|
|
163
164
|
// MARK: ViewProviderDelegate
|
|
@@ -172,13 +173,17 @@ RCT_EXTERN_METHOD(getPreferencesViewController:(RCTPromiseResolveBlock)resolve
|
|
|
172
173
|
|
|
173
174
|
// MARK: Didomi extension
|
|
174
175
|
|
|
175
|
-
RCT_EXTERN_METHOD(setupUI)
|
|
176
|
+
RCT_EXTERN_METHOD(setupUI:(RCTPromiseResolveBlock)resolve
|
|
177
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
176
178
|
|
|
177
|
-
RCT_EXTERN_METHOD(forceShowNotice)
|
|
179
|
+
RCT_EXTERN_METHOD(forceShowNotice:(RCTPromiseResolveBlock)resolve
|
|
180
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
178
181
|
|
|
179
|
-
RCT_EXTERN_METHOD(showNotice)
|
|
182
|
+
RCT_EXTERN_METHOD(showNotice:(RCTPromiseResolveBlock)resolve
|
|
183
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
180
184
|
|
|
181
|
-
RCT_EXTERN_METHOD(hideNotice)
|
|
185
|
+
RCT_EXTERN_METHOD(hideNotice:(RCTPromiseResolveBlock)resolve
|
|
186
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
182
187
|
|
|
183
188
|
RCT_EXTERN_METHOD(isNoticeVisible:(RCTPromiseResolveBlock)resolve
|
|
184
189
|
reject:(RCTPromiseRejectBlock)reject)
|
|
@@ -186,9 +191,12 @@ RCT_EXTERN_METHOD(isNoticeVisible:(RCTPromiseResolveBlock)resolve
|
|
|
186
191
|
RCT_EXTERN_METHOD(shouldConsentBeCollected:(RCTPromiseResolveBlock)resolve
|
|
187
192
|
reject:(RCTPromiseRejectBlock)reject)
|
|
188
193
|
|
|
189
|
-
RCT_EXTERN_METHOD(showPreferences:(nullable NSString *)view
|
|
194
|
+
RCT_EXTERN_METHOD(showPreferences:(nullable NSString *)view
|
|
195
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
196
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
190
197
|
|
|
191
|
-
RCT_EXTERN_METHOD(hidePreferences)
|
|
198
|
+
RCT_EXTERN_METHOD(hidePreferences:(RCTPromiseResolveBlock)resolve
|
|
199
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
192
200
|
|
|
193
201
|
RCT_EXTERN_METHOD(isPreferencesVisible:(RCTPromiseResolveBlock)resolve
|
|
194
202
|
reject:(RCTPromiseRejectBlock)reject)
|
|
@@ -201,15 +209,88 @@ RCT_EXTERN_METHOD(getText:(NSString *)key
|
|
|
201
209
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
202
210
|
reject:(RCTPromiseRejectBlock)reject)
|
|
203
211
|
|
|
204
|
-
RCT_EXTERN_METHOD(setLogLevel:(int)minLevel
|
|
212
|
+
RCT_EXTERN_METHOD(setLogLevel:(int)minLevel
|
|
213
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
214
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
215
|
+
|
|
216
|
+
RCT_EXTERN_METHOD(clearUser:(RCTPromiseResolveBlock)resolve
|
|
217
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
218
|
+
|
|
219
|
+
RCT_EXTERN_METHOD(setUser:(NSString *)id
|
|
220
|
+
algorithm:(nullable NSString *)algorithm
|
|
221
|
+
secretId:(nullable NSString *)secretId
|
|
222
|
+
salt:(nullable NSString *)salt
|
|
223
|
+
digest:(nullable NSString *)digest
|
|
224
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
225
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
226
|
+
|
|
227
|
+
RCT_EXTERN_METHOD(setUserAndSetupUI:(NSString *)id
|
|
228
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
229
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
205
230
|
|
|
206
|
-
RCT_EXTERN_METHOD(
|
|
231
|
+
RCT_EXTERN_METHOD(setUserWithHashAuth:(NSString *)id
|
|
232
|
+
algorithm:(NSString *)algorithm
|
|
233
|
+
secretId:(NSString *)secretId
|
|
234
|
+
digest:(NSString *)digest
|
|
235
|
+
salt:(nullable NSString *)salt
|
|
236
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
237
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
207
238
|
|
|
208
|
-
RCT_EXTERN_METHOD(
|
|
239
|
+
RCT_EXTERN_METHOD(setUserWithHashAuthAndSetupUI:(NSString *)id
|
|
209
240
|
algorithm:(NSString *)algorithm
|
|
210
241
|
secretId:(NSString *)secretId
|
|
242
|
+
digest:(NSString *)digest
|
|
211
243
|
salt:(nullable NSString *)salt
|
|
212
|
-
|
|
244
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
245
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
246
|
+
|
|
247
|
+
RCT_EXTERN_METHOD(setUserWithHashAuthWithExpiration:(NSString *)id
|
|
248
|
+
algorithm:(NSString *)algorithm
|
|
249
|
+
secretId:(NSString *)secretId
|
|
250
|
+
digest:(NSString *)digest
|
|
251
|
+
salt:(nullable NSString *)salt
|
|
252
|
+
expiration: (double)expiration
|
|
253
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
254
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
255
|
+
|
|
256
|
+
RCT_EXTERN_METHOD(setUserWithHashAuthWithExpirationAndSetupUI:(NSString *)id
|
|
257
|
+
algorithm:(NSString *)algorithm
|
|
258
|
+
secretId:(NSString *)secretId
|
|
259
|
+
digest:(NSString *)digest
|
|
260
|
+
salt:(nullable NSString *)salt
|
|
261
|
+
expiration: (double)expiration
|
|
262
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
263
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
264
|
+
|
|
265
|
+
RCT_EXTERN_METHOD(setUserWithEncryptionAuth:(NSString *)id
|
|
266
|
+
algorithm:(NSString *)algorithm
|
|
267
|
+
secretId:(NSString *)secretId
|
|
268
|
+
initializationVector:(NSString *)initializationVector
|
|
269
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
270
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
271
|
+
|
|
272
|
+
RCT_EXTERN_METHOD(setUserWithEncryptionAuthAndSetupUI:(NSString *)id
|
|
273
|
+
algorithm:(NSString *)algorithm
|
|
274
|
+
secretId:(NSString *)secretId
|
|
275
|
+
initializationVector:(NSString *)initializationVector
|
|
276
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
277
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
278
|
+
|
|
279
|
+
RCT_EXTERN_METHOD(setUserWithEncryptionAuthWithExpiration:(NSString *)id
|
|
280
|
+
algorithm:(NSString *)algorithm
|
|
281
|
+
secretId:(NSString *)secretId
|
|
282
|
+
initializationVector:(NSString *)initializationVector
|
|
283
|
+
expiration: (double)expiration
|
|
284
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
285
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
286
|
+
|
|
287
|
+
RCT_EXTERN_METHOD(setUserWithEncryptionAuthWithExpirationAndSetupUI:(NSString *)id
|
|
288
|
+
algorithm:(NSString *)algorithm
|
|
289
|
+
secretId:(NSString *)secretId
|
|
290
|
+
initializationVector:(NSString *)initializationVector
|
|
291
|
+
expiration: (double)expiration
|
|
292
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
293
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
213
294
|
|
|
214
295
|
RCT_EXTERN_METHOD(supportedEvents)
|
|
215
296
|
|