@reclaimprotocol/inapp-rn-sdk 0.7.3 → 0.9.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 +1 -1
- package/README.md +8 -6
- package/android/build.gradle +1 -1
- package/android/generated/java/com/reclaimprotocol/inapp_rn_sdk/NativeInappRnSdkSpec.java +4 -0
- package/android/generated/jni/RNInappRnSdkSpec-generated.cpp +6 -0
- package/android/generated/jni/react/renderer/components/RNInappRnSdkSpec/RNInappRnSdkSpecJSI-generated.cpp +7 -0
- package/android/generated/jni/react/renderer/components/RNInappRnSdkSpec/RNInappRnSdkSpecJSI.h +105 -25
- package/android/src/main/java/com/reclaimprotocol/inapp_rn_sdk/InappRnSdkModule.kt +46 -9
- package/android/src/main/java/com/reclaimprotocol/inapp_rn_sdk/JsonExtension.kt +18 -0
- package/ios/InappRnSdk.mm +267 -138
- package/ios/generated/RNInappRnSdkSpec/RNInappRnSdkSpec-generated.mm +13 -0
- package/ios/generated/RNInappRnSdkSpec/RNInappRnSdkSpec.h +45 -10
- package/ios/generated/RNInappRnSdkSpecJSI-generated.cpp +7 -0
- package/ios/generated/RNInappRnSdkSpecJSI.h +105 -25
- package/ios/inapp_rn_sdk/Api.swift +322 -154
- package/lib/commonjs/index.js +36 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeInappRnSdk.js.map +1 -1
- package/lib/module/index.js +36 -1
- 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 +18 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts +23 -2
- package/lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts.map +1 -1
- package/lib/typescript/commonjs/user-workspace/src/App.d.ts +2 -0
- package/lib/typescript/commonjs/user-workspace/src/App.d.ts.map +1 -0
- package/lib/typescript/commonjs/user-workspace/src/App.overrides.d.ts +2 -0
- package/lib/typescript/commonjs/user-workspace/src/App.overrides.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +18 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts +23 -2
- package/lib/typescript/module/src/specs/NativeInappRnSdk.d.ts.map +1 -1
- package/lib/typescript/module/user-workspace/src/App.d.ts +2 -0
- package/lib/typescript/module/user-workspace/src/App.d.ts.map +1 -0
- package/lib/typescript/module/user-workspace/src/App.overrides.d.ts +2 -0
- package/lib/typescript/module/user-workspace/src/App.overrides.d.ts.map +1 -0
- package/package.json +8 -7
- package/src/index.ts +59 -3
- package/src/specs/NativeInappRnSdk.ts +25 -2
|
@@ -23,6 +23,12 @@ static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerificationFro
|
|
|
23
23
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
|
+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerificationFromJson(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
27
|
+
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->startVerificationFromJson(
|
|
28
|
+
rt,
|
|
29
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
30
|
+
);
|
|
31
|
+
}
|
|
26
32
|
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_setOverrides(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
27
33
|
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->setOverrides(
|
|
28
34
|
rt,
|
|
@@ -66,6 +72,7 @@ NativeInappRnSdkCxxSpecJSI::NativeInappRnSdkCxxSpecJSI(std::shared_ptr<CallInvok
|
|
|
66
72
|
: TurboModule("InappRnSdk", jsInvoker) {
|
|
67
73
|
methodMap_["startVerification"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerification};
|
|
68
74
|
methodMap_["startVerificationFromUrl"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerificationFromUrl};
|
|
75
|
+
methodMap_["startVerificationFromJson"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerificationFromJson};
|
|
69
76
|
methodMap_["setOverrides"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_setOverrides};
|
|
70
77
|
methodMap_["clearAllOverrides"] = MethodMetadata {0, __hostFunction_NativeInappRnSdkCxxSpecJSI_clearAllOverrides};
|
|
71
78
|
methodMap_["setVerificationOptions"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_setVerificationOptions};
|
|
@@ -18,7 +18,7 @@ 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, typename P6, typename P7>
|
|
22
22
|
struct NativeInappRnSdkFeatureOptions {
|
|
23
23
|
P0 cookiePersist;
|
|
24
24
|
P1 singleReclaimRequest;
|
|
@@ -26,8 +26,10 @@ struct NativeInappRnSdkFeatureOptions {
|
|
|
26
26
|
P3 sessionTimeoutForManualVerificationTrigger;
|
|
27
27
|
P4 attestorBrowserRpcUrl;
|
|
28
28
|
P5 isAIFlowEnabled;
|
|
29
|
+
P6 manualReviewMessage;
|
|
30
|
+
P7 loginPromptMessage;
|
|
29
31
|
bool operator==(const NativeInappRnSdkFeatureOptions &other) const {
|
|
30
|
-
return cookiePersist == other.cookiePersist && singleReclaimRequest == other.singleReclaimRequest && idleTimeThresholdForManualVerificationTrigger == other.idleTimeThresholdForManualVerificationTrigger && sessionTimeoutForManualVerificationTrigger == other.sessionTimeoutForManualVerificationTrigger && attestorBrowserRpcUrl == other.attestorBrowserRpcUrl && isAIFlowEnabled == other.isAIFlowEnabled;
|
|
32
|
+
return cookiePersist == other.cookiePersist && singleReclaimRequest == other.singleReclaimRequest && idleTimeThresholdForManualVerificationTrigger == other.idleTimeThresholdForManualVerificationTrigger && sessionTimeoutForManualVerificationTrigger == other.sessionTimeoutForManualVerificationTrigger && attestorBrowserRpcUrl == other.attestorBrowserRpcUrl && isAIFlowEnabled == other.isAIFlowEnabled && manualReviewMessage == other.manualReviewMessage && loginPromptMessage == other.loginPromptMessage;
|
|
31
33
|
}
|
|
32
34
|
};
|
|
33
35
|
|
|
@@ -45,7 +47,9 @@ struct NativeInappRnSdkFeatureOptionsBridging {
|
|
|
45
47
|
bridging::fromJs<decltype(types.idleTimeThresholdForManualVerificationTrigger)>(rt, value.getProperty(rt, "idleTimeThresholdForManualVerificationTrigger"), jsInvoker),
|
|
46
48
|
bridging::fromJs<decltype(types.sessionTimeoutForManualVerificationTrigger)>(rt, value.getProperty(rt, "sessionTimeoutForManualVerificationTrigger"), jsInvoker),
|
|
47
49
|
bridging::fromJs<decltype(types.attestorBrowserRpcUrl)>(rt, value.getProperty(rt, "attestorBrowserRpcUrl"), jsInvoker),
|
|
48
|
-
bridging::fromJs<decltype(types.isAIFlowEnabled)>(rt, value.getProperty(rt, "isAIFlowEnabled"), jsInvoker)
|
|
50
|
+
bridging::fromJs<decltype(types.isAIFlowEnabled)>(rt, value.getProperty(rt, "isAIFlowEnabled"), jsInvoker),
|
|
51
|
+
bridging::fromJs<decltype(types.manualReviewMessage)>(rt, value.getProperty(rt, "manualReviewMessage"), jsInvoker),
|
|
52
|
+
bridging::fromJs<decltype(types.loginPromptMessage)>(rt, value.getProperty(rt, "loginPromptMessage"), jsInvoker)};
|
|
49
53
|
return result;
|
|
50
54
|
}
|
|
51
55
|
|
|
@@ -73,6 +77,14 @@ struct NativeInappRnSdkFeatureOptionsBridging {
|
|
|
73
77
|
static std::optional<bool> isAIFlowEnabledToJs(jsi::Runtime &rt, decltype(types.isAIFlowEnabled) value) {
|
|
74
78
|
return bridging::toJs(rt, value);
|
|
75
79
|
}
|
|
80
|
+
|
|
81
|
+
static std::optional<jsi::String> manualReviewMessageToJs(jsi::Runtime &rt, decltype(types.manualReviewMessage) value) {
|
|
82
|
+
return bridging::toJs(rt, value);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
static std::optional<jsi::String> loginPromptMessageToJs(jsi::Runtime &rt, decltype(types.loginPromptMessage) value) {
|
|
86
|
+
return bridging::toJs(rt, value);
|
|
87
|
+
}
|
|
76
88
|
#endif
|
|
77
89
|
|
|
78
90
|
static jsi::Object toJs(
|
|
@@ -98,6 +110,12 @@ struct NativeInappRnSdkFeatureOptionsBridging {
|
|
|
98
110
|
if (value.isAIFlowEnabled) {
|
|
99
111
|
result.setProperty(rt, "isAIFlowEnabled", bridging::toJs(rt, value.isAIFlowEnabled.value(), jsInvoker));
|
|
100
112
|
}
|
|
113
|
+
if (value.manualReviewMessage) {
|
|
114
|
+
result.setProperty(rt, "manualReviewMessage", bridging::toJs(rt, value.manualReviewMessage.value(), jsInvoker));
|
|
115
|
+
}
|
|
116
|
+
if (value.loginPromptMessage) {
|
|
117
|
+
result.setProperty(rt, "loginPromptMessage", bridging::toJs(rt, value.loginPromptMessage.value(), jsInvoker));
|
|
118
|
+
}
|
|
101
119
|
return result;
|
|
102
120
|
}
|
|
103
121
|
};
|
|
@@ -312,16 +330,17 @@ struct NativeInappRnSdkProviderInformationBridging {
|
|
|
312
330
|
|
|
313
331
|
#pragma mark - NativeInappRnSdkProviderInformationRequest
|
|
314
332
|
|
|
315
|
-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5>
|
|
333
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
316
334
|
struct NativeInappRnSdkProviderInformationRequest {
|
|
317
335
|
P0 appId;
|
|
318
336
|
P1 providerId;
|
|
319
337
|
P2 sessionId;
|
|
320
338
|
P3 signature;
|
|
321
339
|
P4 timestamp;
|
|
322
|
-
P5
|
|
340
|
+
P5 resolvedVersion;
|
|
341
|
+
P6 replyId;
|
|
323
342
|
bool operator==(const NativeInappRnSdkProviderInformationRequest &other) const {
|
|
324
|
-
return appId == other.appId && providerId == other.providerId && sessionId == other.sessionId && signature == other.signature && timestamp == other.timestamp && replyId == other.replyId;
|
|
343
|
+
return appId == other.appId && providerId == other.providerId && sessionId == other.sessionId && signature == other.signature && timestamp == other.timestamp && resolvedVersion == other.resolvedVersion && replyId == other.replyId;
|
|
325
344
|
}
|
|
326
345
|
};
|
|
327
346
|
|
|
@@ -339,6 +358,7 @@ struct NativeInappRnSdkProviderInformationRequestBridging {
|
|
|
339
358
|
bridging::fromJs<decltype(types.sessionId)>(rt, value.getProperty(rt, "sessionId"), jsInvoker),
|
|
340
359
|
bridging::fromJs<decltype(types.signature)>(rt, value.getProperty(rt, "signature"), jsInvoker),
|
|
341
360
|
bridging::fromJs<decltype(types.timestamp)>(rt, value.getProperty(rt, "timestamp"), jsInvoker),
|
|
361
|
+
bridging::fromJs<decltype(types.resolvedVersion)>(rt, value.getProperty(rt, "resolvedVersion"), jsInvoker),
|
|
342
362
|
bridging::fromJs<decltype(types.replyId)>(rt, value.getProperty(rt, "replyId"), jsInvoker)};
|
|
343
363
|
return result;
|
|
344
364
|
}
|
|
@@ -364,6 +384,10 @@ struct NativeInappRnSdkProviderInformationRequestBridging {
|
|
|
364
384
|
return bridging::toJs(rt, value);
|
|
365
385
|
}
|
|
366
386
|
|
|
387
|
+
static jsi::String resolvedVersionToJs(jsi::Runtime &rt, decltype(types.resolvedVersion) value) {
|
|
388
|
+
return bridging::toJs(rt, value);
|
|
389
|
+
}
|
|
390
|
+
|
|
367
391
|
static jsi::String replyIdToJs(jsi::Runtime &rt, decltype(types.replyId) value) {
|
|
368
392
|
return bridging::toJs(rt, value);
|
|
369
393
|
}
|
|
@@ -379,6 +403,7 @@ struct NativeInappRnSdkProviderInformationRequestBridging {
|
|
|
379
403
|
result.setProperty(rt, "sessionId", bridging::toJs(rt, value.sessionId, jsInvoker));
|
|
380
404
|
result.setProperty(rt, "signature", bridging::toJs(rt, value.signature, jsInvoker));
|
|
381
405
|
result.setProperty(rt, "timestamp", bridging::toJs(rt, value.timestamp, jsInvoker));
|
|
406
|
+
result.setProperty(rt, "resolvedVersion", bridging::toJs(rt, value.resolvedVersion, jsInvoker));
|
|
382
407
|
result.setProperty(rt, "replyId", bridging::toJs(rt, value.replyId, jsInvoker));
|
|
383
408
|
return result;
|
|
384
409
|
}
|
|
@@ -386,6 +411,54 @@ struct NativeInappRnSdkProviderInformationRequestBridging {
|
|
|
386
411
|
|
|
387
412
|
|
|
388
413
|
|
|
414
|
+
#pragma mark - NativeInappRnSdkProviderVersion
|
|
415
|
+
|
|
416
|
+
template <typename P0, typename P1>
|
|
417
|
+
struct NativeInappRnSdkProviderVersion {
|
|
418
|
+
P0 resolvedVersion;
|
|
419
|
+
P1 versionExpression;
|
|
420
|
+
bool operator==(const NativeInappRnSdkProviderVersion &other) const {
|
|
421
|
+
return resolvedVersion == other.resolvedVersion && versionExpression == other.versionExpression;
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
template <typename T>
|
|
426
|
+
struct NativeInappRnSdkProviderVersionBridging {
|
|
427
|
+
static T types;
|
|
428
|
+
|
|
429
|
+
static T fromJs(
|
|
430
|
+
jsi::Runtime &rt,
|
|
431
|
+
const jsi::Object &value,
|
|
432
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
433
|
+
T result{
|
|
434
|
+
bridging::fromJs<decltype(types.resolvedVersion)>(rt, value.getProperty(rt, "resolvedVersion"), jsInvoker),
|
|
435
|
+
bridging::fromJs<decltype(types.versionExpression)>(rt, value.getProperty(rt, "versionExpression"), jsInvoker)};
|
|
436
|
+
return result;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
#ifdef DEBUG
|
|
440
|
+
static jsi::String resolvedVersionToJs(jsi::Runtime &rt, decltype(types.resolvedVersion) value) {
|
|
441
|
+
return bridging::toJs(rt, value);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
static jsi::String versionExpressionToJs(jsi::Runtime &rt, decltype(types.versionExpression) value) {
|
|
445
|
+
return bridging::toJs(rt, value);
|
|
446
|
+
}
|
|
447
|
+
#endif
|
|
448
|
+
|
|
449
|
+
static jsi::Object toJs(
|
|
450
|
+
jsi::Runtime &rt,
|
|
451
|
+
const T &value,
|
|
452
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
453
|
+
auto result = facebook::jsi::Object(rt);
|
|
454
|
+
result.setProperty(rt, "resolvedVersion", bridging::toJs(rt, value.resolvedVersion, jsInvoker));
|
|
455
|
+
result.setProperty(rt, "versionExpression", bridging::toJs(rt, value.versionExpression, jsInvoker));
|
|
456
|
+
return result;
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
389
462
|
#pragma mark - NativeInappRnSdkReclaimAppInfo
|
|
390
463
|
|
|
391
464
|
template <typename P0, typename P1, typename P2>
|
|
@@ -548,7 +621,7 @@ struct NativeInappRnSdkReclaimSessionIdentityUpdateBridging {
|
|
|
548
621
|
|
|
549
622
|
#pragma mark - NativeInappRnSdkRequest
|
|
550
623
|
|
|
551
|
-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6
|
|
624
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
552
625
|
struct NativeInappRnSdkRequest {
|
|
553
626
|
P0 appId;
|
|
554
627
|
P1 secret;
|
|
@@ -556,10 +629,9 @@ struct NativeInappRnSdkRequest {
|
|
|
556
629
|
P3 session;
|
|
557
630
|
P4 contextString;
|
|
558
631
|
P5 parameters;
|
|
559
|
-
P6
|
|
560
|
-
P7 webhookUrl;
|
|
632
|
+
P6 providerVersion;
|
|
561
633
|
bool operator==(const NativeInappRnSdkRequest &other) const {
|
|
562
|
-
return appId == other.appId && secret == other.secret && providerId == other.providerId && session == other.session && contextString == other.contextString && parameters == other.parameters &&
|
|
634
|
+
return appId == other.appId && secret == other.secret && providerId == other.providerId && session == other.session && contextString == other.contextString && parameters == other.parameters && providerVersion == other.providerVersion;
|
|
563
635
|
}
|
|
564
636
|
};
|
|
565
637
|
|
|
@@ -578,8 +650,7 @@ struct NativeInappRnSdkRequestBridging {
|
|
|
578
650
|
bridging::fromJs<decltype(types.session)>(rt, value.getProperty(rt, "session"), jsInvoker),
|
|
579
651
|
bridging::fromJs<decltype(types.contextString)>(rt, value.getProperty(rt, "contextString"), jsInvoker),
|
|
580
652
|
bridging::fromJs<decltype(types.parameters)>(rt, value.getProperty(rt, "parameters"), jsInvoker),
|
|
581
|
-
bridging::fromJs<decltype(types.
|
|
582
|
-
bridging::fromJs<decltype(types.webhookUrl)>(rt, value.getProperty(rt, "webhookUrl"), jsInvoker)};
|
|
653
|
+
bridging::fromJs<decltype(types.providerVersion)>(rt, value.getProperty(rt, "providerVersion"), jsInvoker)};
|
|
583
654
|
return result;
|
|
584
655
|
}
|
|
585
656
|
|
|
@@ -608,11 +679,7 @@ struct NativeInappRnSdkRequestBridging {
|
|
|
608
679
|
return bridging::toJs(rt, value);
|
|
609
680
|
}
|
|
610
681
|
|
|
611
|
-
static
|
|
612
|
-
return bridging::toJs(rt, value);
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
static std::optional<jsi::String> webhookUrlToJs(jsi::Runtime &rt, decltype(types.webhookUrl) value) {
|
|
682
|
+
static std::optional<jsi::Object> providerVersionToJs(jsi::Runtime &rt, decltype(types.providerVersion) value) {
|
|
616
683
|
return bridging::toJs(rt, value);
|
|
617
684
|
}
|
|
618
685
|
#endif
|
|
@@ -634,11 +701,8 @@ struct NativeInappRnSdkRequestBridging {
|
|
|
634
701
|
if (value.parameters) {
|
|
635
702
|
result.setProperty(rt, "parameters", bridging::toJs(rt, value.parameters.value(), jsInvoker));
|
|
636
703
|
}
|
|
637
|
-
if (value.
|
|
638
|
-
result.setProperty(rt, "
|
|
639
|
-
}
|
|
640
|
-
if (value.webhookUrl) {
|
|
641
|
-
result.setProperty(rt, "webhookUrl", bridging::toJs(rt, value.webhookUrl.value(), jsInvoker));
|
|
704
|
+
if (value.providerVersion) {
|
|
705
|
+
result.setProperty(rt, "providerVersion", bridging::toJs(rt, value.providerVersion.value(), jsInvoker));
|
|
642
706
|
}
|
|
643
707
|
return result;
|
|
644
708
|
}
|
|
@@ -703,15 +767,16 @@ struct NativeInappRnSdkResponseBridging {
|
|
|
703
767
|
|
|
704
768
|
#pragma mark - NativeInappRnSdkSessionCreateRequestEvent
|
|
705
769
|
|
|
706
|
-
template <typename P0, typename P1, typename P2, typename P3, typename P4>
|
|
770
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5>
|
|
707
771
|
struct NativeInappRnSdkSessionCreateRequestEvent {
|
|
708
772
|
P0 appId;
|
|
709
773
|
P1 providerId;
|
|
710
774
|
P2 timestamp;
|
|
711
775
|
P3 signature;
|
|
712
|
-
P4
|
|
776
|
+
P4 providerVersion;
|
|
777
|
+
P5 replyId;
|
|
713
778
|
bool operator==(const NativeInappRnSdkSessionCreateRequestEvent &other) const {
|
|
714
|
-
return appId == other.appId && providerId == other.providerId && timestamp == other.timestamp && signature == other.signature && replyId == other.replyId;
|
|
779
|
+
return appId == other.appId && providerId == other.providerId && timestamp == other.timestamp && signature == other.signature && providerVersion == other.providerVersion && replyId == other.replyId;
|
|
715
780
|
}
|
|
716
781
|
};
|
|
717
782
|
|
|
@@ -728,6 +793,7 @@ struct NativeInappRnSdkSessionCreateRequestEventBridging {
|
|
|
728
793
|
bridging::fromJs<decltype(types.providerId)>(rt, value.getProperty(rt, "providerId"), jsInvoker),
|
|
729
794
|
bridging::fromJs<decltype(types.timestamp)>(rt, value.getProperty(rt, "timestamp"), jsInvoker),
|
|
730
795
|
bridging::fromJs<decltype(types.signature)>(rt, value.getProperty(rt, "signature"), jsInvoker),
|
|
796
|
+
bridging::fromJs<decltype(types.providerVersion)>(rt, value.getProperty(rt, "providerVersion"), jsInvoker),
|
|
731
797
|
bridging::fromJs<decltype(types.replyId)>(rt, value.getProperty(rt, "replyId"), jsInvoker)};
|
|
732
798
|
return result;
|
|
733
799
|
}
|
|
@@ -749,6 +815,10 @@ struct NativeInappRnSdkSessionCreateRequestEventBridging {
|
|
|
749
815
|
return bridging::toJs(rt, value);
|
|
750
816
|
}
|
|
751
817
|
|
|
818
|
+
static jsi::String providerVersionToJs(jsi::Runtime &rt, decltype(types.providerVersion) value) {
|
|
819
|
+
return bridging::toJs(rt, value);
|
|
820
|
+
}
|
|
821
|
+
|
|
752
822
|
static jsi::String replyIdToJs(jsi::Runtime &rt, decltype(types.replyId) value) {
|
|
753
823
|
return bridging::toJs(rt, value);
|
|
754
824
|
}
|
|
@@ -763,6 +833,7 @@ struct NativeInappRnSdkSessionCreateRequestEventBridging {
|
|
|
763
833
|
result.setProperty(rt, "providerId", bridging::toJs(rt, value.providerId, jsInvoker));
|
|
764
834
|
result.setProperty(rt, "timestamp", bridging::toJs(rt, value.timestamp, jsInvoker));
|
|
765
835
|
result.setProperty(rt, "signature", bridging::toJs(rt, value.signature, jsInvoker));
|
|
836
|
+
result.setProperty(rt, "providerVersion", bridging::toJs(rt, value.providerVersion, jsInvoker));
|
|
766
837
|
result.setProperty(rt, "replyId", bridging::toJs(rt, value.replyId, jsInvoker));
|
|
767
838
|
return result;
|
|
768
839
|
}
|
|
@@ -1102,6 +1173,7 @@ protected:
|
|
|
1102
1173
|
public:
|
|
1103
1174
|
virtual jsi::Value startVerification(jsi::Runtime &rt, jsi::Object request) = 0;
|
|
1104
1175
|
virtual jsi::Value startVerificationFromUrl(jsi::Runtime &rt, jsi::String requestUrl) = 0;
|
|
1176
|
+
virtual jsi::Value startVerificationFromJson(jsi::Runtime &rt, jsi::String templateJsonString) = 0;
|
|
1105
1177
|
virtual jsi::Value setOverrides(jsi::Runtime &rt, jsi::Object overrides) = 0;
|
|
1106
1178
|
virtual jsi::Value clearAllOverrides(jsi::Runtime &rt) = 0;
|
|
1107
1179
|
virtual jsi::Value setVerificationOptions(jsi::Runtime &rt, jsi::Object args) = 0;
|
|
@@ -1208,6 +1280,14 @@ private:
|
|
|
1208
1280
|
return bridging::callFromJs<jsi::Value>(
|
|
1209
1281
|
rt, &T::startVerificationFromUrl, jsInvoker_, instance_, std::move(requestUrl));
|
|
1210
1282
|
}
|
|
1283
|
+
jsi::Value startVerificationFromJson(jsi::Runtime &rt, jsi::String templateJsonString) override {
|
|
1284
|
+
static_assert(
|
|
1285
|
+
bridging::getParameterCount(&T::startVerificationFromJson) == 2,
|
|
1286
|
+
"Expected startVerificationFromJson(...) to have 2 parameters");
|
|
1287
|
+
|
|
1288
|
+
return bridging::callFromJs<jsi::Value>(
|
|
1289
|
+
rt, &T::startVerificationFromJson, jsInvoker_, instance_, std::move(templateJsonString));
|
|
1290
|
+
}
|
|
1211
1291
|
jsi::Value setOverrides(jsi::Runtime &rt, jsi::Object overrides) override {
|
|
1212
1292
|
static_assert(
|
|
1213
1293
|
bridging::getParameterCount(&T::setOverrides) == 2,
|