@reclaimprotocol/inapp-rn-sdk 0.3.0 → 0.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/InappRnSdk.podspec +2 -1
- package/README.md +19 -17
- package/android/build.gradle +3 -3
- package/android/generated/jni/react/renderer/components/RNInappRnSdkSpec/RNInappRnSdkSpecJSI.h +45 -35
- package/android/src/main/java/com/reclaimprotocol/inapp_rn_sdk/InappRnSdkModule.kt +18 -12
- package/ios/InappRnSdk.mm +8 -13
- package/ios/generated/RNInappRnSdkSpec/RNInappRnSdkSpec.h +18 -12
- package/ios/generated/RNInappRnSdkSpecJSI.h +45 -35
- package/ios/inapp_rn_sdk/Api.swift +32 -21
- package/lib/commonjs/index.js +327 -32
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeInappRnSdk.js.map +1 -1
- package/lib/module/index.js +324 -14
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeInappRnSdk.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +170 -9
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts +18 -11
- package/lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +170 -9
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts +18 -11
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/index.ts +566 -21
- package/src/specs/NativeInappRnSdk.ts +22 -13
- package/lib/commonjs/ReclaimVerificationPlatformChannel.js +0 -306
- package/lib/commonjs/ReclaimVerificationPlatformChannel.js.map +0 -1
- package/lib/commonjs/types/proof.js +0 -16
- package/lib/commonjs/types/proof.js.map +0 -1
- package/lib/module/ReclaimVerificationPlatformChannel.js +0 -299
- package/lib/module/ReclaimVerificationPlatformChannel.js.map +0 -1
- package/lib/module/types/proof.js +0 -12
- package/lib/module/types/proof.js.map +0 -1
- package/lib/typescript/commonjs/src/ReclaimVerificationPlatformChannel.d.ts +0 -115
- package/lib/typescript/commonjs/src/ReclaimVerificationPlatformChannel.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/proof.d.ts +0 -33
- package/lib/typescript/commonjs/src/types/proof.d.ts.map +0 -1
- package/lib/typescript/module/src/ReclaimVerificationPlatformChannel.d.ts +0 -115
- package/lib/typescript/module/src/ReclaimVerificationPlatformChannel.d.ts.map +0 -1
- package/lib/typescript/module/src/types/proof.d.ts +0 -33
- package/lib/typescript/module/src/types/proof.d.ts.map +0 -1
- package/src/ReclaimVerificationPlatformChannel.ts +0 -408
- package/src/types/proof.ts +0 -44
package/InappRnSdk.podspec
CHANGED
|
@@ -11,12 +11,13 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.license = package["license"]
|
|
12
12
|
s.authors = package["author"]
|
|
13
13
|
|
|
14
|
+
# Try documentation/migration.md before updating this file. SDK supports iOS 13.0 and above.
|
|
14
15
|
s.platforms = { :ios => min_ios_version_supported }
|
|
15
16
|
s.source = { :git => "https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk.git", :tag => "#{s.version}" }
|
|
16
17
|
|
|
17
18
|
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
|
|
18
19
|
s.private_header_files = "ios/generated/**/*.h"
|
|
19
|
-
s.dependency "ReclaimInAppSdk", "~> 0.
|
|
20
|
+
s.dependency "ReclaimInAppSdk", "~> 0.6.0"
|
|
20
21
|
|
|
21
22
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
22
23
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## @reclaimprotocol/inapp-rn-sdk
|
|
4
4
|
|
|
5
|
-
](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk)
|
|
6
|
+
[](https://docs.reclaimprotocol.org/inapp-sdks/react-native)
|
|
7
|
+
[](https://www.npmjs.com/package/@reclaimprotocol/inapp-rn-sdk)
|
|
6
8
|
|
|
7
9
|
This SDK allows you to integrate Reclaim's in-app verification process into your React Native application.
|
|
8
10
|
|
|
@@ -59,7 +61,7 @@ add the following to the end of settings.gradle:
|
|
|
59
61
|
dependencyResolutionManagement {
|
|
60
62
|
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
|
61
63
|
String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
|
|
62
|
-
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/
|
|
64
|
+
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo"
|
|
63
65
|
repositories {
|
|
64
66
|
google()
|
|
65
67
|
mavenCentral()
|
|
@@ -78,7 +80,7 @@ or alternatively add the following repositories to the relevant repositories blo
|
|
|
78
80
|
|
|
79
81
|
```groovy
|
|
80
82
|
String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
|
|
81
|
-
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/
|
|
83
|
+
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo"
|
|
82
84
|
maven {
|
|
83
85
|
url "$reclaimStorageUrl"
|
|
84
86
|
}
|
|
@@ -108,13 +110,13 @@ Ignore if you already have this declaration in your `Podfile`.
|
|
|
108
110
|
|
|
109
111
|
```ruby
|
|
110
112
|
# Cocoapods is the recommended way to install the SDK.
|
|
111
|
-
pod 'ReclaimInAppSdk', '~> 0.
|
|
113
|
+
pod 'ReclaimInAppSdk', '~> 0.6.0'
|
|
112
114
|
```
|
|
113
115
|
|
|
114
116
|
##### From a specific tag
|
|
115
117
|
|
|
116
118
|
```ruby
|
|
117
|
-
pod 'ReclaimInAppSdk', :git => 'https://github.com/reclaimprotocol/reclaim-inapp-ios-sdk.git', :tag => '0.
|
|
119
|
+
pod 'ReclaimInAppSdk', :git => 'https://github.com/reclaimprotocol/reclaim-inapp-ios-sdk.git', :tag => '0.6.0'
|
|
118
120
|
```
|
|
119
121
|
|
|
120
122
|
##### From git HEAD
|
|
@@ -151,7 +153,7 @@ target 'InappRnSdkExample' do
|
|
|
151
153
|
)
|
|
152
154
|
|
|
153
155
|
# This is the line that you may need to add in your podfile.
|
|
154
|
-
pod 'ReclaimInAppSdk', '~> 0.
|
|
156
|
+
pod 'ReclaimInAppSdk', '~> 0.6.0'
|
|
155
157
|
|
|
156
158
|
pre_install do |installer|
|
|
157
159
|
system("cd ../../ && npx bob build --target codegen")
|
|
@@ -171,7 +173,7 @@ pod install
|
|
|
171
173
|
|
|
172
174
|
Your app performance will be severely impacted when you run debug executable on a physical device. Fixing this requires a simple change in your Xcode project xcscheme.
|
|
173
175
|
|
|
174
|
-
|
|
176
|
+
##### Method 1: Update Environment Variables for XCScheme (Recommended)
|
|
175
177
|
1. Open your iOS project (*.xcworkspace) in Xcode.
|
|
176
178
|
2. Click on the project target.
|
|
177
179
|
3. Click on the **Scheme** dropdown.
|
|
@@ -190,7 +192,7 @@ Your app performance will be severely impacted when you run debug executable on
|
|
|
190
192
|
8. Click on the **Close** button in the dialog and build the project.
|
|
191
193
|
9. Run the app on a physical device.
|
|
192
194
|
|
|
193
|
-
|
|
195
|
+
##### Method 2: Disable "Debug executable"
|
|
194
196
|
|
|
195
197
|
This method is **not recommended** but could be useful if you don't want to add environment variables to the xcscheme.
|
|
196
198
|
|
|
@@ -232,11 +234,11 @@ const verificationResult = await reclaimVerification.startVerification({
|
|
|
232
234
|
});
|
|
233
235
|
```
|
|
234
236
|
|
|
235
|
-
The returned result is a [
|
|
237
|
+
The returned result is a [ReclaimVerification.Response] object. This object contains a response that has proofs, exception, and the sessionId if the verification is successful.
|
|
236
238
|
|
|
237
239
|
### Exception Handling
|
|
238
240
|
|
|
239
|
-
If the verification ends with an exception, the exception is thrown as a [
|
|
241
|
+
If the verification ends with an exception, the exception is thrown as a [ReclaimVerification.ReclaimVerificationException] object.
|
|
240
242
|
|
|
241
243
|
Following is an example of how to handle the exception using [error.type]:
|
|
242
244
|
|
|
@@ -244,27 +246,27 @@ Following is an example of how to handle the exception using [error.type]:
|
|
|
244
246
|
try {
|
|
245
247
|
// ... start verification
|
|
246
248
|
} catch (error) {
|
|
247
|
-
if (error instanceof
|
|
249
|
+
if (error instanceof ReclaimVerification.ReclaimVerificationException) {
|
|
248
250
|
switch (error.type) {
|
|
249
|
-
case
|
|
251
|
+
case ReclaimVerification.ExceptionType.Cancelled:
|
|
250
252
|
Snackbar.show({
|
|
251
253
|
text: 'Verification cancelled',
|
|
252
254
|
duration: Snackbar.LENGTH_LONG,
|
|
253
255
|
});
|
|
254
256
|
break;
|
|
255
|
-
case
|
|
257
|
+
case ReclaimVerification.ExceptionType.Dismissed:
|
|
256
258
|
Snackbar.show({
|
|
257
259
|
text: 'Verification dismissed',
|
|
258
260
|
duration: Snackbar.LENGTH_LONG,
|
|
259
261
|
});
|
|
260
262
|
break;
|
|
261
|
-
case
|
|
263
|
+
case ReclaimVerification.ExceptionType.SessionExpired:
|
|
262
264
|
Snackbar.show({
|
|
263
265
|
text: 'Verification session expired',
|
|
264
266
|
duration: Snackbar.LENGTH_LONG,
|
|
265
267
|
});
|
|
266
268
|
break;
|
|
267
|
-
case
|
|
269
|
+
case ReclaimVerification.ExceptionType.Failed:
|
|
268
270
|
default:
|
|
269
271
|
Snackbar.show({
|
|
270
272
|
text: 'Verification failed',
|
|
@@ -290,6 +292,8 @@ error.innerError
|
|
|
290
292
|
|
|
291
293
|
## Migration
|
|
292
294
|
|
|
295
|
+
- Migration steps for [0.6.0](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/documentation/migration.md#060)
|
|
296
|
+
- Migration steps for [0.3.1](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/documentation/migration.md#031)
|
|
293
297
|
- Migration steps for [0.3.0](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/documentation/migration.md#030)
|
|
294
298
|
- Migration steps for [0.2.1](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/documentation/migration.md#021)
|
|
295
299
|
|
|
@@ -308,8 +312,6 @@ reclaimVerification.setOverrides({
|
|
|
308
312
|
})
|
|
309
313
|
```
|
|
310
314
|
|
|
311
|
-
Note: Overriding again will clear previous overrides
|
|
312
|
-
|
|
313
315
|
## Contributing
|
|
314
316
|
|
|
315
317
|
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ buildscript {
|
|
|
3
3
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['InappRnSdk_' + name]
|
|
4
4
|
}
|
|
5
5
|
String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
|
|
6
|
-
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/
|
|
6
|
+
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo"
|
|
7
7
|
repositories {
|
|
8
8
|
google()
|
|
9
9
|
mavenCentral()
|
|
@@ -98,7 +98,7 @@ android {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
|
|
101
|
-
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/
|
|
101
|
+
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo"
|
|
102
102
|
|
|
103
103
|
repositories {
|
|
104
104
|
mavenCentral()
|
|
@@ -118,7 +118,7 @@ dependencies {
|
|
|
118
118
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
119
119
|
|
|
120
120
|
//noinspection UseTomlInstead
|
|
121
|
-
implementation "org.reclaimprotocol:inapp_sdk:0.
|
|
121
|
+
implementation "org.reclaimprotocol:inapp_sdk:0.6.0"
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
if (isNewArchitectureEnabled()) {
|
package/android/generated/jni/react/renderer/components/RNInappRnSdkSpec/RNInappRnSdkSpecJSI.h
CHANGED
|
@@ -18,17 +18,16 @@ namespace facebook::react {
|
|
|
18
18
|
|
|
19
19
|
#pragma mark - NativeInappRnSdkFeatureOptions
|
|
20
20
|
|
|
21
|
-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5
|
|
21
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5>
|
|
22
22
|
struct NativeInappRnSdkFeatureOptions {
|
|
23
23
|
P0 cookiePersist;
|
|
24
24
|
P1 singleReclaimRequest;
|
|
25
25
|
P2 idleTimeThresholdForManualVerificationTrigger;
|
|
26
26
|
P3 sessionTimeoutForManualVerificationTrigger;
|
|
27
27
|
P4 attestorBrowserRpcUrl;
|
|
28
|
-
P5
|
|
29
|
-
P6 isAIFlowEnabled;
|
|
28
|
+
P5 isAIFlowEnabled;
|
|
30
29
|
bool operator==(const NativeInappRnSdkFeatureOptions &other) const {
|
|
31
|
-
return cookiePersist == other.cookiePersist && singleReclaimRequest == other.singleReclaimRequest && idleTimeThresholdForManualVerificationTrigger == other.idleTimeThresholdForManualVerificationTrigger && sessionTimeoutForManualVerificationTrigger == other.sessionTimeoutForManualVerificationTrigger && attestorBrowserRpcUrl == other.attestorBrowserRpcUrl &&
|
|
30
|
+
return cookiePersist == other.cookiePersist && singleReclaimRequest == other.singleReclaimRequest && idleTimeThresholdForManualVerificationTrigger == other.idleTimeThresholdForManualVerificationTrigger && sessionTimeoutForManualVerificationTrigger == other.sessionTimeoutForManualVerificationTrigger && attestorBrowserRpcUrl == other.attestorBrowserRpcUrl && isAIFlowEnabled == other.isAIFlowEnabled;
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
|
|
@@ -46,7 +45,6 @@ struct NativeInappRnSdkFeatureOptionsBridging {
|
|
|
46
45
|
bridging::fromJs<decltype(types.idleTimeThresholdForManualVerificationTrigger)>(rt, value.getProperty(rt, "idleTimeThresholdForManualVerificationTrigger"), jsInvoker),
|
|
47
46
|
bridging::fromJs<decltype(types.sessionTimeoutForManualVerificationTrigger)>(rt, value.getProperty(rt, "sessionTimeoutForManualVerificationTrigger"), jsInvoker),
|
|
48
47
|
bridging::fromJs<decltype(types.attestorBrowserRpcUrl)>(rt, value.getProperty(rt, "attestorBrowserRpcUrl"), jsInvoker),
|
|
49
|
-
bridging::fromJs<decltype(types.isResponseRedactionRegexEscapingEnabled)>(rt, value.getProperty(rt, "isResponseRedactionRegexEscapingEnabled"), jsInvoker),
|
|
50
48
|
bridging::fromJs<decltype(types.isAIFlowEnabled)>(rt, value.getProperty(rt, "isAIFlowEnabled"), jsInvoker)};
|
|
51
49
|
return result;
|
|
52
50
|
}
|
|
@@ -72,10 +70,6 @@ struct NativeInappRnSdkFeatureOptionsBridging {
|
|
|
72
70
|
return bridging::toJs(rt, value);
|
|
73
71
|
}
|
|
74
72
|
|
|
75
|
-
static std::optional<bool> isResponseRedactionRegexEscapingEnabledToJs(jsi::Runtime &rt, decltype(types.isResponseRedactionRegexEscapingEnabled) value) {
|
|
76
|
-
return bridging::toJs(rt, value);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
73
|
static std::optional<bool> isAIFlowEnabledToJs(jsi::Runtime &rt, decltype(types.isAIFlowEnabled) value) {
|
|
80
74
|
return bridging::toJs(rt, value);
|
|
81
75
|
}
|
|
@@ -101,9 +95,6 @@ struct NativeInappRnSdkFeatureOptionsBridging {
|
|
|
101
95
|
if (value.attestorBrowserRpcUrl) {
|
|
102
96
|
result.setProperty(rt, "attestorBrowserRpcUrl", bridging::toJs(rt, value.attestorBrowserRpcUrl.value(), jsInvoker));
|
|
103
97
|
}
|
|
104
|
-
if (value.isResponseRedactionRegexEscapingEnabled) {
|
|
105
|
-
result.setProperty(rt, "isResponseRedactionRegexEscapingEnabled", bridging::toJs(rt, value.isResponseRedactionRegexEscapingEnabled.value(), jsInvoker));
|
|
106
|
-
}
|
|
107
98
|
if (value.isAIFlowEnabled) {
|
|
108
99
|
result.setProperty(rt, "isAIFlowEnabled", bridging::toJs(rt, value.isAIFlowEnabled.value(), jsInvoker));
|
|
109
100
|
}
|
|
@@ -557,7 +548,7 @@ struct NativeInappRnSdkReclaimSessionIdentityUpdateBridging {
|
|
|
557
548
|
|
|
558
549
|
#pragma mark - NativeInappRnSdkRequest
|
|
559
550
|
|
|
560
|
-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7
|
|
551
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
|
|
561
552
|
struct NativeInappRnSdkRequest {
|
|
562
553
|
P0 appId;
|
|
563
554
|
P1 secret;
|
|
@@ -565,11 +556,10 @@ struct NativeInappRnSdkRequest {
|
|
|
565
556
|
P3 session;
|
|
566
557
|
P4 contextString;
|
|
567
558
|
P5 parameters;
|
|
568
|
-
P6
|
|
569
|
-
P7
|
|
570
|
-
P8 webhookUrl;
|
|
559
|
+
P6 acceptAiProviders;
|
|
560
|
+
P7 webhookUrl;
|
|
571
561
|
bool operator==(const NativeInappRnSdkRequest &other) const {
|
|
572
|
-
return appId == other.appId && secret == other.secret && providerId == other.providerId && session == other.session && contextString == other.contextString && parameters == other.parameters &&
|
|
562
|
+
return appId == other.appId && secret == other.secret && providerId == other.providerId && session == other.session && contextString == other.contextString && parameters == other.parameters && acceptAiProviders == other.acceptAiProviders && webhookUrl == other.webhookUrl;
|
|
573
563
|
}
|
|
574
564
|
};
|
|
575
565
|
|
|
@@ -588,7 +578,6 @@ struct NativeInappRnSdkRequestBridging {
|
|
|
588
578
|
bridging::fromJs<decltype(types.session)>(rt, value.getProperty(rt, "session"), jsInvoker),
|
|
589
579
|
bridging::fromJs<decltype(types.contextString)>(rt, value.getProperty(rt, "contextString"), jsInvoker),
|
|
590
580
|
bridging::fromJs<decltype(types.parameters)>(rt, value.getProperty(rt, "parameters"), jsInvoker),
|
|
591
|
-
bridging::fromJs<decltype(types.autoSubmit)>(rt, value.getProperty(rt, "autoSubmit"), jsInvoker),
|
|
592
581
|
bridging::fromJs<decltype(types.acceptAiProviders)>(rt, value.getProperty(rt, "acceptAiProviders"), jsInvoker),
|
|
593
582
|
bridging::fromJs<decltype(types.webhookUrl)>(rt, value.getProperty(rt, "webhookUrl"), jsInvoker)};
|
|
594
583
|
return result;
|
|
@@ -619,10 +608,6 @@ struct NativeInappRnSdkRequestBridging {
|
|
|
619
608
|
return bridging::toJs(rt, value);
|
|
620
609
|
}
|
|
621
610
|
|
|
622
|
-
static bool autoSubmitToJs(jsi::Runtime &rt, decltype(types.autoSubmit) value) {
|
|
623
|
-
return bridging::toJs(rt, value);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
611
|
static bool acceptAiProvidersToJs(jsi::Runtime &rt, decltype(types.acceptAiProviders) value) {
|
|
627
612
|
return bridging::toJs(rt, value);
|
|
628
613
|
}
|
|
@@ -649,9 +634,6 @@ struct NativeInappRnSdkRequestBridging {
|
|
|
649
634
|
if (value.parameters) {
|
|
650
635
|
result.setProperty(rt, "parameters", bridging::toJs(rt, value.parameters.value(), jsInvoker));
|
|
651
636
|
}
|
|
652
|
-
if (value.autoSubmit) {
|
|
653
|
-
result.setProperty(rt, "autoSubmit", bridging::toJs(rt, value.autoSubmit.value(), jsInvoker));
|
|
654
|
-
}
|
|
655
637
|
if (value.acceptAiProviders) {
|
|
656
638
|
result.setProperty(rt, "acceptAiProviders", bridging::toJs(rt, value.acceptAiProviders.value(), jsInvoker));
|
|
657
639
|
}
|
|
@@ -721,14 +703,15 @@ struct NativeInappRnSdkResponseBridging {
|
|
|
721
703
|
|
|
722
704
|
#pragma mark - NativeInappRnSdkSessionCreateRequestEvent
|
|
723
705
|
|
|
724
|
-
template <typename P0, typename P1, typename P2, typename P3>
|
|
706
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4>
|
|
725
707
|
struct NativeInappRnSdkSessionCreateRequestEvent {
|
|
726
708
|
P0 appId;
|
|
727
709
|
P1 providerId;
|
|
728
|
-
P2
|
|
729
|
-
P3
|
|
710
|
+
P2 timestamp;
|
|
711
|
+
P3 signature;
|
|
712
|
+
P4 replyId;
|
|
730
713
|
bool operator==(const NativeInappRnSdkSessionCreateRequestEvent &other) const {
|
|
731
|
-
return appId == other.appId && providerId == other.providerId &&
|
|
714
|
+
return appId == other.appId && providerId == other.providerId && timestamp == other.timestamp && signature == other.signature && replyId == other.replyId;
|
|
732
715
|
}
|
|
733
716
|
};
|
|
734
717
|
|
|
@@ -743,7 +726,8 @@ struct NativeInappRnSdkSessionCreateRequestEventBridging {
|
|
|
743
726
|
T result{
|
|
744
727
|
bridging::fromJs<decltype(types.appId)>(rt, value.getProperty(rt, "appId"), jsInvoker),
|
|
745
728
|
bridging::fromJs<decltype(types.providerId)>(rt, value.getProperty(rt, "providerId"), jsInvoker),
|
|
746
|
-
bridging::fromJs<decltype(types.
|
|
729
|
+
bridging::fromJs<decltype(types.timestamp)>(rt, value.getProperty(rt, "timestamp"), jsInvoker),
|
|
730
|
+
bridging::fromJs<decltype(types.signature)>(rt, value.getProperty(rt, "signature"), jsInvoker),
|
|
747
731
|
bridging::fromJs<decltype(types.replyId)>(rt, value.getProperty(rt, "replyId"), jsInvoker)};
|
|
748
732
|
return result;
|
|
749
733
|
}
|
|
@@ -757,7 +741,11 @@ struct NativeInappRnSdkSessionCreateRequestEventBridging {
|
|
|
757
741
|
return bridging::toJs(rt, value);
|
|
758
742
|
}
|
|
759
743
|
|
|
760
|
-
static jsi::String
|
|
744
|
+
static jsi::String timestampToJs(jsi::Runtime &rt, decltype(types.timestamp) value) {
|
|
745
|
+
return bridging::toJs(rt, value);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
static jsi::String signatureToJs(jsi::Runtime &rt, decltype(types.signature) value) {
|
|
761
749
|
return bridging::toJs(rt, value);
|
|
762
750
|
}
|
|
763
751
|
|
|
@@ -773,7 +761,8 @@ struct NativeInappRnSdkSessionCreateRequestEventBridging {
|
|
|
773
761
|
auto result = facebook::jsi::Object(rt);
|
|
774
762
|
result.setProperty(rt, "appId", bridging::toJs(rt, value.appId, jsInvoker));
|
|
775
763
|
result.setProperty(rt, "providerId", bridging::toJs(rt, value.providerId, jsInvoker));
|
|
776
|
-
result.setProperty(rt, "
|
|
764
|
+
result.setProperty(rt, "timestamp", bridging::toJs(rt, value.timestamp, jsInvoker));
|
|
765
|
+
result.setProperty(rt, "signature", bridging::toJs(rt, value.signature, jsInvoker));
|
|
777
766
|
result.setProperty(rt, "replyId", bridging::toJs(rt, value.replyId, jsInvoker));
|
|
778
767
|
return result;
|
|
779
768
|
}
|
|
@@ -998,12 +987,15 @@ struct NativeInappRnSdkSessionUpdateRequestEventBridging {
|
|
|
998
987
|
|
|
999
988
|
#pragma mark - NativeInappRnSdkVerificationOptions
|
|
1000
989
|
|
|
1001
|
-
template <typename P0, typename P1>
|
|
990
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4>
|
|
1002
991
|
struct NativeInappRnSdkVerificationOptions {
|
|
1003
992
|
P0 canDeleteCookiesBeforeVerificationStarts;
|
|
1004
993
|
P1 canUseAttestorAuthenticationRequest;
|
|
994
|
+
P2 claimCreationType;
|
|
995
|
+
P3 canAutoSubmit;
|
|
996
|
+
P4 isCloseButtonVisible;
|
|
1005
997
|
bool operator==(const NativeInappRnSdkVerificationOptions &other) const {
|
|
1006
|
-
return canDeleteCookiesBeforeVerificationStarts == other.canDeleteCookiesBeforeVerificationStarts && canUseAttestorAuthenticationRequest == other.canUseAttestorAuthenticationRequest;
|
|
998
|
+
return canDeleteCookiesBeforeVerificationStarts == other.canDeleteCookiesBeforeVerificationStarts && canUseAttestorAuthenticationRequest == other.canUseAttestorAuthenticationRequest && claimCreationType == other.claimCreationType && canAutoSubmit == other.canAutoSubmit && isCloseButtonVisible == other.isCloseButtonVisible;
|
|
1007
999
|
}
|
|
1008
1000
|
};
|
|
1009
1001
|
|
|
@@ -1017,7 +1009,10 @@ struct NativeInappRnSdkVerificationOptionsBridging {
|
|
|
1017
1009
|
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1018
1010
|
T result{
|
|
1019
1011
|
bridging::fromJs<decltype(types.canDeleteCookiesBeforeVerificationStarts)>(rt, value.getProperty(rt, "canDeleteCookiesBeforeVerificationStarts"), jsInvoker),
|
|
1020
|
-
bridging::fromJs<decltype(types.canUseAttestorAuthenticationRequest)>(rt, value.getProperty(rt, "canUseAttestorAuthenticationRequest"), jsInvoker)
|
|
1012
|
+
bridging::fromJs<decltype(types.canUseAttestorAuthenticationRequest)>(rt, value.getProperty(rt, "canUseAttestorAuthenticationRequest"), jsInvoker),
|
|
1013
|
+
bridging::fromJs<decltype(types.claimCreationType)>(rt, value.getProperty(rt, "claimCreationType"), jsInvoker),
|
|
1014
|
+
bridging::fromJs<decltype(types.canAutoSubmit)>(rt, value.getProperty(rt, "canAutoSubmit"), jsInvoker),
|
|
1015
|
+
bridging::fromJs<decltype(types.isCloseButtonVisible)>(rt, value.getProperty(rt, "isCloseButtonVisible"), jsInvoker)};
|
|
1021
1016
|
return result;
|
|
1022
1017
|
}
|
|
1023
1018
|
|
|
@@ -1029,6 +1024,18 @@ struct NativeInappRnSdkVerificationOptionsBridging {
|
|
|
1029
1024
|
static bool canUseAttestorAuthenticationRequestToJs(jsi::Runtime &rt, decltype(types.canUseAttestorAuthenticationRequest) value) {
|
|
1030
1025
|
return bridging::toJs(rt, value);
|
|
1031
1026
|
}
|
|
1027
|
+
|
|
1028
|
+
static jsi::String claimCreationTypeToJs(jsi::Runtime &rt, decltype(types.claimCreationType) value) {
|
|
1029
|
+
return bridging::toJs(rt, value);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
static bool canAutoSubmitToJs(jsi::Runtime &rt, decltype(types.canAutoSubmit) value) {
|
|
1033
|
+
return bridging::toJs(rt, value);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
static bool isCloseButtonVisibleToJs(jsi::Runtime &rt, decltype(types.isCloseButtonVisible) value) {
|
|
1037
|
+
return bridging::toJs(rt, value);
|
|
1038
|
+
}
|
|
1032
1039
|
#endif
|
|
1033
1040
|
|
|
1034
1041
|
static jsi::Object toJs(
|
|
@@ -1038,6 +1045,9 @@ struct NativeInappRnSdkVerificationOptionsBridging {
|
|
|
1038
1045
|
auto result = facebook::jsi::Object(rt);
|
|
1039
1046
|
result.setProperty(rt, "canDeleteCookiesBeforeVerificationStarts", bridging::toJs(rt, value.canDeleteCookiesBeforeVerificationStarts, jsInvoker));
|
|
1040
1047
|
result.setProperty(rt, "canUseAttestorAuthenticationRequest", bridging::toJs(rt, value.canUseAttestorAuthenticationRequest, jsInvoker));
|
|
1048
|
+
result.setProperty(rt, "claimCreationType", bridging::toJs(rt, value.claimCreationType, jsInvoker));
|
|
1049
|
+
result.setProperty(rt, "canAutoSubmit", bridging::toJs(rt, value.canAutoSubmit, jsInvoker));
|
|
1050
|
+
result.setProperty(rt, "isCloseButtonVisible", bridging::toJs(rt, value.isCloseButtonVisible, jsInvoker));
|
|
1041
1051
|
return result;
|
|
1042
1052
|
}
|
|
1043
1053
|
};
|
|
@@ -86,7 +86,6 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
val autoSubmit = getBoolean(request, "autoSubmit")
|
|
90
89
|
val acceptAiProviders = getBoolean(request, "acceptAiProviders")
|
|
91
90
|
val webhookUrl = getString(request, "webhookUrl")
|
|
92
91
|
if (appId.isNullOrBlank() && secret.isNullOrBlank()) {
|
|
@@ -100,7 +99,6 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
100
99
|
signature = getString(session, "signature") ?: "",
|
|
101
100
|
),
|
|
102
101
|
parameters = parameters,
|
|
103
|
-
autoSubmit = autoSubmit ?: false,
|
|
104
102
|
acceptAiProviders = acceptAiProviders ?: false,
|
|
105
103
|
webhookUrl = webhookUrl,
|
|
106
104
|
)
|
|
@@ -116,7 +114,6 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
116
114
|
signature = getString(session, "signature") ?: "",
|
|
117
115
|
),
|
|
118
116
|
parameters = parameters,
|
|
119
|
-
autoSubmit = autoSubmit ?: false,
|
|
120
117
|
acceptAiProviders = acceptAiProviders ?: false,
|
|
121
118
|
webhookUrl = webhookUrl,
|
|
122
119
|
)
|
|
@@ -174,6 +171,13 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
174
171
|
var options: ReclaimVerification.VerificationOptions? = null
|
|
175
172
|
if (inputOptions != null) {
|
|
176
173
|
val canUseAttestorAuthRequestProvider = getBoolean(inputOptions, "canUseAttestorAuthenticationRequest") == true;
|
|
174
|
+
val claimCreationType: ReclaimVerification.VerificationOptions.ClaimCreationType = when (getString(inputOptions, "claimCreationType")) {
|
|
175
|
+
"meChain" -> ReclaimVerification.VerificationOptions.ClaimCreationType.ME_CHAIN
|
|
176
|
+
else -> ReclaimVerification.VerificationOptions.ClaimCreationType.STANDALONE
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
val canAutoSubmit = getBoolean(inputOptions, "canAutoSubmit") ?: true
|
|
180
|
+
val isCloseButtonVisible = getBoolean(inputOptions, "isCloseButtonVisible") ?: true
|
|
177
181
|
options = ReclaimVerification.VerificationOptions(
|
|
178
182
|
canDeleteCookiesBeforeVerificationStarts = getBoolean(inputOptions, "canDeleteCookiesBeforeVerificationStarts") ?: true,
|
|
179
183
|
attestorAuthRequestProvider = if (canUseAttestorAuthRequestProvider) {
|
|
@@ -192,7 +196,10 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
192
196
|
}
|
|
193
197
|
} else {
|
|
194
198
|
null
|
|
195
|
-
}
|
|
199
|
+
},
|
|
200
|
+
claimCreationType = claimCreationType,
|
|
201
|
+
canAutoSubmit = canAutoSubmit,
|
|
202
|
+
isCloseButtonVisible = isCloseButtonVisible
|
|
196
203
|
)
|
|
197
204
|
}
|
|
198
205
|
reactContext.runOnUiQueueThread {
|
|
@@ -269,9 +276,6 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
269
276
|
featureOptions, "sessionTimeoutForManualVerificationTrigger"
|
|
270
277
|
)?.toLong(),
|
|
271
278
|
attestorBrowserRpcUrl = getString(featureOptions, "attestorBrowserRpcUrl"),
|
|
272
|
-
isResponseRedactionRegexEscapingEnabled = getBoolean(
|
|
273
|
-
featureOptions, "isResponseRedactionRegexEscapingEnabled"
|
|
274
|
-
),
|
|
275
279
|
isAIFlowEnabled = getBoolean(featureOptions, "isAIFlowEnabled")
|
|
276
280
|
),
|
|
277
281
|
logConsumer = if (logConsumer == null) null else ReclaimOverrides.LogConsumer(
|
|
@@ -292,21 +296,23 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
292
296
|
override fun createSession(
|
|
293
297
|
appId: String,
|
|
294
298
|
providerId: String,
|
|
295
|
-
|
|
296
|
-
|
|
299
|
+
timestamp: String,
|
|
300
|
+
signature: String,
|
|
301
|
+
callback: (Result<String>) -> Unit
|
|
297
302
|
) {
|
|
298
303
|
val args = Arguments.createMap()
|
|
299
304
|
args.putString("appId", appId)
|
|
300
305
|
args.putString("providerId", providerId)
|
|
301
|
-
args.putString("
|
|
306
|
+
args.putString("timestamp", timestamp)
|
|
307
|
+
args.putString("signature", signature)
|
|
302
308
|
val replyId = UUID.randomUUID().toString()
|
|
303
309
|
args.putString("replyId", replyId)
|
|
304
|
-
|
|
310
|
+
replyWithString[replyId] = callback
|
|
305
311
|
emitOnSessionCreateRequest(args)
|
|
306
312
|
}
|
|
307
313
|
|
|
308
314
|
override fun logSession(
|
|
309
|
-
appId: String, providerId: String, sessionId: String, logType: String
|
|
315
|
+
appId: String, providerId: String, sessionId: String, logType: String, metadata: Map<String, Any?>?
|
|
310
316
|
) {
|
|
311
317
|
val args = Arguments.createMap()
|
|
312
318
|
args.putString("appId", appId)
|
package/ios/InappRnSdk.mm
CHANGED
|
@@ -42,10 +42,6 @@ Api *api = [[Api alloc] init];
|
|
|
42
42
|
- (void)startVerification:(JS::NativeInappRnSdk::Request &)request resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
43
43
|
NSLog(@"[InappRnSdk] starting verification");
|
|
44
44
|
|
|
45
|
-
bool autoSubmit = false;
|
|
46
|
-
if (request.autoSubmit().has_value()) {
|
|
47
|
-
autoSubmit = request.autoSubmit().value();
|
|
48
|
-
}
|
|
49
45
|
bool acceptAiProviders = false;
|
|
50
46
|
if (request.acceptAiProviders().has_value()) {
|
|
51
47
|
acceptAiProviders = request.acceptAiProviders().value();
|
|
@@ -85,7 +81,7 @@ Api *api = [[Api alloc] init];
|
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
NSLog(@"[InappRnSdk] starting verification now");
|
|
88
|
-
[api startVerificationWithAppId:request.appId() secret:request.secret() providerId:request.providerId() sessionTimestamp:timestamp sessionSessionId:sessionId sessionSignature:signature context:request.contextString() parameters:parameters
|
|
84
|
+
[api startVerificationWithAppId:request.appId() secret:request.secret() providerId:request.providerId() sessionTimestamp:timestamp sessionSessionId:sessionId sessionSignature:signature context:request.contextString() parameters:parameters acceptAiProviders:acceptAiProviders webhookUrl:request.webhookUrl() completionHandler:^(NSDictionary<NSString *,id> * _Nullable result, NSError * _Nullable error) {
|
|
89
85
|
if (error != nil) {
|
|
90
86
|
NSLog(@"[InappRnSdk] Api Error: %@", error);
|
|
91
87
|
reject(@"VERIFICATION_ERROR", @"Verification Error", error);
|
|
@@ -136,7 +132,7 @@ Api *api = [[Api alloc] init];
|
|
|
136
132
|
OverridenFeatureOptions * _Nullable overridenFeatureOptions = nil;
|
|
137
133
|
if (overrides.featureOptions().has_value()) {
|
|
138
134
|
JS::NativeInappRnSdk::FeatureOptions featureOptions = overrides.featureOptions().value();
|
|
139
|
-
overridenFeatureOptions = [[OverridenFeatureOptions alloc] initWithCookiePersist:nil singleReclaimRequest:nil idleTimeThresholdForManualVerificationTrigger:nil sessionTimeoutForManualVerificationTrigger:nil attestorBrowserRpcUrl:nil
|
|
135
|
+
overridenFeatureOptions = [[OverridenFeatureOptions alloc] initWithCookiePersist:nil singleReclaimRequest:nil idleTimeThresholdForManualVerificationTrigger:nil sessionTimeoutForManualVerificationTrigger:nil attestorBrowserRpcUrl:nil isAIFlowEnabled:nil];
|
|
140
136
|
|
|
141
137
|
if (featureOptions.cookiePersist().has_value()) {
|
|
142
138
|
overridenFeatureOptions.cookiePersist = [NSNumber numberWithBool:featureOptions.cookiePersist().value()];
|
|
@@ -153,9 +149,6 @@ Api *api = [[Api alloc] init];
|
|
|
153
149
|
if (featureOptions.attestorBrowserRpcUrl() != nil && featureOptions.attestorBrowserRpcUrl().length > 0) {
|
|
154
150
|
overridenFeatureOptions.attestorBrowserRpcUrl = featureOptions.attestorBrowserRpcUrl();
|
|
155
151
|
}
|
|
156
|
-
if (featureOptions.isResponseRedactionRegexEscapingEnabled().has_value()) {
|
|
157
|
-
overridenFeatureOptions.isResponseRedactionRegexEscapingEnabled = [NSNumber numberWithBool:featureOptions.isResponseRedactionRegexEscapingEnabled().value()];
|
|
158
|
-
}
|
|
159
152
|
if (featureOptions.isAIFlowEnabled().has_value()) {
|
|
160
153
|
overridenFeatureOptions.isAIFlowEnabled = [NSNumber numberWithBool:featureOptions.isAIFlowEnabled().value()];
|
|
161
154
|
}
|
|
@@ -182,11 +175,12 @@ Api *api = [[Api alloc] init];
|
|
|
182
175
|
|
|
183
176
|
OverridenSessionManagement * _Nullable sessionManagement;
|
|
184
177
|
if (overrides.sessionManagement().has_value()) {
|
|
185
|
-
sessionManagement = [[OverridenSessionManagement alloc] initWithHandler:[[OverridenSessionHandler alloc] initWith_createSession:^(NSString * _Nonnull appId, NSString * _Nonnull providerId, NSString * _Nonnull
|
|
178
|
+
sessionManagement = [[OverridenSessionManagement alloc] initWithHandler:[[OverridenSessionHandler alloc] initWith_createSession:^(NSString * _Nonnull appId, NSString * _Nonnull providerId, NSString * _Nonnull timestamp, NSString * _Nonnull signature, NSString * _Nonnull replyId) {
|
|
186
179
|
[self emitOnSessionCreateRequest:@{
|
|
187
180
|
@"appId": appId,
|
|
188
181
|
@"providerId": providerId,
|
|
189
|
-
@"
|
|
182
|
+
@"timestamp": timestamp,
|
|
183
|
+
@"signature": signature,
|
|
190
184
|
@"replyId": replyId
|
|
191
185
|
}];
|
|
192
186
|
} _updateSession:^(NSString * _Nonnull sessionId, NSString * _Nonnull status, NSString * _Nonnull replyId) {
|
|
@@ -243,16 +237,17 @@ Api *api = [[Api alloc] init];
|
|
|
243
237
|
ReclaimApiVerificationOptions * _Nullable options = nil;
|
|
244
238
|
if (args.options().has_value()) {
|
|
245
239
|
JS::NativeInappRnSdk::VerificationOptions inputOptions = args.options().value();
|
|
240
|
+
|
|
246
241
|
if (inputOptions.canUseAttestorAuthenticationRequest()) {
|
|
247
242
|
options = [[ReclaimApiVerificationOptions alloc] initWithCanDeleteCookiesBeforeVerificationStarts:inputOptions.canDeleteCookiesBeforeVerificationStarts() fetchAttestorAuthenticationRequest:^(NSString * _Nonnull reclaimHttpProviderJsonString, NSString * _Nonnull replyId) {
|
|
248
243
|
[self emitOnReclaimAttestorAuthRequest:@{
|
|
249
244
|
@"reclaimHttpProviderJsonString": reclaimHttpProviderJsonString,
|
|
250
245
|
@"replyId": replyId
|
|
251
246
|
}];
|
|
252
|
-
}
|
|
247
|
+
} claimCreationType:inputOptions.claimCreationType() canAutoSubmit:inputOptions.canAutoSubmit() isCloseButtonVisible:inputOptions.isCloseButtonVisible()
|
|
253
248
|
];
|
|
254
249
|
} else {
|
|
255
|
-
options = [[ReclaimApiVerificationOptions alloc] initWithCanDeleteCookiesBeforeVerificationStarts:inputOptions.canDeleteCookiesBeforeVerificationStarts() fetchAttestorAuthenticationRequest:nil];
|
|
250
|
+
options = [[ReclaimApiVerificationOptions alloc] initWithCanDeleteCookiesBeforeVerificationStarts:inputOptions.canDeleteCookiesBeforeVerificationStarts() fetchAttestorAuthenticationRequest:nil claimCreationType:inputOptions.claimCreationType() canAutoSubmit:inputOptions.canAutoSubmit() isCloseButtonVisible:inputOptions.isCloseButtonVisible()];
|
|
256
251
|
}
|
|
257
252
|
|
|
258
253
|
}
|
|
@@ -58,7 +58,6 @@ namespace JS {
|
|
|
58
58
|
std::optional<JS::NativeInappRnSdk::SessionInformation> session() const;
|
|
59
59
|
NSString *contextString() const;
|
|
60
60
|
id<NSObject> _Nullable parameters() const;
|
|
61
|
-
std::optional<bool> autoSubmit() const;
|
|
62
61
|
std::optional<bool> acceptAiProviders() const;
|
|
63
62
|
NSString *webhookUrl() const;
|
|
64
63
|
|
|
@@ -97,7 +96,6 @@ namespace JS {
|
|
|
97
96
|
std::optional<double> idleTimeThresholdForManualVerificationTrigger() const;
|
|
98
97
|
std::optional<double> sessionTimeoutForManualVerificationTrigger() const;
|
|
99
98
|
NSString *attestorBrowserRpcUrl() const;
|
|
100
|
-
std::optional<bool> isResponseRedactionRegexEscapingEnabled() const;
|
|
101
99
|
std::optional<bool> isAIFlowEnabled() const;
|
|
102
100
|
|
|
103
101
|
FeatureOptions(NSDictionary *const v) : _v(v) {}
|
|
@@ -184,6 +182,9 @@ namespace JS {
|
|
|
184
182
|
struct VerificationOptions {
|
|
185
183
|
bool canDeleteCookiesBeforeVerificationStarts() const;
|
|
186
184
|
bool canUseAttestorAuthenticationRequest() const;
|
|
185
|
+
NSString *claimCreationType() const;
|
|
186
|
+
bool canAutoSubmit() const;
|
|
187
|
+
bool isCloseButtonVisible() const;
|
|
187
188
|
|
|
188
189
|
VerificationOptions(NSDictionary *const v) : _v(v) {}
|
|
189
190
|
private:
|
|
@@ -304,11 +305,6 @@ inline id<NSObject> _Nullable JS::NativeInappRnSdk::Request::parameters() const
|
|
|
304
305
|
id const p = _v[@"parameters"];
|
|
305
306
|
return p;
|
|
306
307
|
}
|
|
307
|
-
inline std::optional<bool> JS::NativeInappRnSdk::Request::autoSubmit() const
|
|
308
|
-
{
|
|
309
|
-
id const p = _v[@"autoSubmit"];
|
|
310
|
-
return RCTBridgingToOptionalBool(p);
|
|
311
|
-
}
|
|
312
308
|
inline std::optional<bool> JS::NativeInappRnSdk::Request::acceptAiProviders() const
|
|
313
309
|
{
|
|
314
310
|
id const p = _v[@"acceptAiProviders"];
|
|
@@ -359,11 +355,6 @@ inline NSString *JS::NativeInappRnSdk::FeatureOptions::attestorBrowserRpcUrl() c
|
|
|
359
355
|
id const p = _v[@"attestorBrowserRpcUrl"];
|
|
360
356
|
return RCTBridgingToOptionalString(p);
|
|
361
357
|
}
|
|
362
|
-
inline std::optional<bool> JS::NativeInappRnSdk::FeatureOptions::isResponseRedactionRegexEscapingEnabled() const
|
|
363
|
-
{
|
|
364
|
-
id const p = _v[@"isResponseRedactionRegexEscapingEnabled"];
|
|
365
|
-
return RCTBridgingToOptionalBool(p);
|
|
366
|
-
}
|
|
367
358
|
inline std::optional<bool> JS::NativeInappRnSdk::FeatureOptions::isAIFlowEnabled() const
|
|
368
359
|
{
|
|
369
360
|
id const p = _v[@"isAIFlowEnabled"];
|
|
@@ -444,6 +435,21 @@ inline bool JS::NativeInappRnSdk::VerificationOptions::canUseAttestorAuthenticat
|
|
|
444
435
|
id const p = _v[@"canUseAttestorAuthenticationRequest"];
|
|
445
436
|
return RCTBridgingToBool(p);
|
|
446
437
|
}
|
|
438
|
+
inline NSString *JS::NativeInappRnSdk::VerificationOptions::claimCreationType() const
|
|
439
|
+
{
|
|
440
|
+
id const p = _v[@"claimCreationType"];
|
|
441
|
+
return RCTBridgingToString(p);
|
|
442
|
+
}
|
|
443
|
+
inline bool JS::NativeInappRnSdk::VerificationOptions::canAutoSubmit() const
|
|
444
|
+
{
|
|
445
|
+
id const p = _v[@"canAutoSubmit"];
|
|
446
|
+
return RCTBridgingToBool(p);
|
|
447
|
+
}
|
|
448
|
+
inline bool JS::NativeInappRnSdk::VerificationOptions::isCloseButtonVisible() const
|
|
449
|
+
{
|
|
450
|
+
id const p = _v[@"isCloseButtonVisible"];
|
|
451
|
+
return RCTBridgingToBool(p);
|
|
452
|
+
}
|
|
447
453
|
inline std::optional<JS::NativeInappRnSdk::VerificationOptions> JS::NativeInappRnSdk::VerificationOptionsOptional::options() const
|
|
448
454
|
{
|
|
449
455
|
id const p = _v[@"options"];
|