Skip to content

Commit ff4ba05

Browse files
committed
Add react codegen generated/ code
1 parent 01f3fc2 commit ff4ba05

File tree

12 files changed

+3557
-3
lines changed

12 files changed

+3557
-3
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ android/keystores/debug.keystore
7777

7878
# generated by bob
7979
# include generated types
80-
# lib/
80+
lib/
8181

8282
# React Native Codegen
83-
ios/generated
84-
android/generated
83+
# ios/generated
84+
# android/generated
8585

8686
# React Native Nitro Modules
8787
nitrogen/
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
/**
3+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4+
*
5+
* Do not edit this file as changes may cause incorrect behavior and will be lost
6+
* once the code is regenerated.
7+
*
8+
* @generated by codegen project: GenerateModuleJavaSpec.js
9+
*
10+
* @nolint
11+
*/
12+
13+
package com.reclaimprotocol.inapp_rn_sdk;
14+
15+
import com.facebook.proguard.annotations.DoNotStrip;
16+
import com.facebook.react.bridge.Promise;
17+
import com.facebook.react.bridge.ReactApplicationContext;
18+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
19+
import com.facebook.react.bridge.ReactMethod;
20+
import com.facebook.react.bridge.ReadableMap;
21+
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
22+
import javax.annotation.Nonnull;
23+
24+
public abstract class NativeInappRnSdkSpec extends ReactContextBaseJavaModule implements TurboModule {
25+
public static final String NAME = "InappRnSdk";
26+
27+
public NativeInappRnSdkSpec(ReactApplicationContext reactContext) {
28+
super(reactContext);
29+
}
30+
31+
@Override
32+
public @Nonnull String getName() {
33+
return NAME;
34+
}
35+
36+
protected final void emitOnLogs(String value) {
37+
mEventEmitterCallback.invoke("onLogs", value);
38+
}
39+
40+
protected final void emitOnSessionLogs(ReadableMap value) {
41+
mEventEmitterCallback.invoke("onSessionLogs", value);
42+
}
43+
44+
protected final void emitOnSessionCreateRequest(ReadableMap value) {
45+
mEventEmitterCallback.invoke("onSessionCreateRequest", value);
46+
}
47+
48+
protected final void emitOnSessionUpdateRequest(ReadableMap value) {
49+
mEventEmitterCallback.invoke("onSessionUpdateRequest", value);
50+
}
51+
52+
protected final void emitOnProviderInformationRequest(ReadableMap value) {
53+
mEventEmitterCallback.invoke("onProviderInformationRequest", value);
54+
}
55+
56+
protected final void emitOnReclaimAttestorAuthRequest(ReadableMap value) {
57+
mEventEmitterCallback.invoke("onReclaimAttestorAuthRequest", value);
58+
}
59+
60+
protected final void emitOnSessionIdentityUpdate(ReadableMap value) {
61+
mEventEmitterCallback.invoke("onSessionIdentityUpdate", value);
62+
}
63+
64+
@ReactMethod
65+
@DoNotStrip
66+
public abstract void startVerification(ReadableMap request, Promise promise);
67+
68+
@ReactMethod
69+
@DoNotStrip
70+
public abstract void startVerificationFromUrl(String requestUrl, Promise promise);
71+
72+
@ReactMethod
73+
@DoNotStrip
74+
public abstract void setOverrides(ReadableMap overrides, Promise promise);
75+
76+
@ReactMethod
77+
@DoNotStrip
78+
public abstract void clearAllOverrides(Promise promise);
79+
80+
@ReactMethod
81+
@DoNotStrip
82+
public abstract void setVerificationOptions(ReadableMap args, Promise promise);
83+
84+
@ReactMethod
85+
@DoNotStrip
86+
public abstract void reply(String replyId, boolean reply);
87+
88+
@ReactMethod
89+
@DoNotStrip
90+
public abstract void replyWithString(String replyId, String value);
91+
92+
@ReactMethod
93+
@DoNotStrip
94+
public abstract void ping(Promise promise);
95+
}

android/generated/jni/CMakeLists.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
#
3+
# This source code is licensed under the MIT license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
cmake_minimum_required(VERSION 3.13)
7+
set(CMAKE_VERBOSE_MAKEFILE on)
8+
9+
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNInappRnSdkSpec/*.cpp)
10+
11+
add_library(
12+
react_codegen_RNInappRnSdkSpec
13+
OBJECT
14+
${react_codegen_SRCS}
15+
)
16+
17+
target_include_directories(react_codegen_RNInappRnSdkSpec PUBLIC . react/renderer/components/RNInappRnSdkSpec)
18+
19+
target_link_libraries(
20+
react_codegen_RNInappRnSdkSpec
21+
fbjni
22+
jsi
23+
# We need to link different libraries based on whether we are building rncore or not, that's necessary
24+
# because we want to break a circular dependency between react_codegen_rncore and reactnative
25+
reactnative
26+
)
27+
28+
target_compile_options(
29+
react_codegen_RNInappRnSdkSpec
30+
PRIVATE
31+
-DLOG_TAG=\"ReactNative\"
32+
-fexceptions
33+
-frtti
34+
-std=c++20
35+
-Wall
36+
)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
/**
3+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4+
*
5+
* Do not edit this file as changes may cause incorrect behavior and will be lost
6+
* once the code is regenerated.
7+
*
8+
* @generated by codegen project: GenerateModuleJniCpp.js
9+
*/
10+
11+
#include "RNInappRnSdkSpec.h"
12+
13+
namespace facebook::react {
14+
15+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_startVerification(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16+
static jmethodID cachedMethodId = nullptr;
17+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "startVerification", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
18+
}
19+
20+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_startVerificationFromUrl(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
21+
static jmethodID cachedMethodId = nullptr;
22+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "startVerificationFromUrl", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
23+
}
24+
25+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_setOverrides(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
26+
static jmethodID cachedMethodId = nullptr;
27+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setOverrides", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
28+
}
29+
30+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_clearAllOverrides(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
31+
static jmethodID cachedMethodId = nullptr;
32+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "clearAllOverrides", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
33+
}
34+
35+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_setVerificationOptions(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
36+
static jmethodID cachedMethodId = nullptr;
37+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setVerificationOptions", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
38+
}
39+
40+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_reply(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
41+
static jmethodID cachedMethodId = nullptr;
42+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "reply", "(Ljava/lang/String;Z)V", args, count, cachedMethodId);
43+
}
44+
45+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_replyWithString(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
46+
static jmethodID cachedMethodId = nullptr;
47+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "replyWithString", "(Ljava/lang/String;Ljava/lang/String;)V", args, count, cachedMethodId);
48+
}
49+
50+
static facebook::jsi::Value __hostFunction_NativeInappRnSdkSpecJSI_ping(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
51+
static jmethodID cachedMethodId = nullptr;
52+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "ping", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
53+
}
54+
55+
NativeInappRnSdkSpecJSI::NativeInappRnSdkSpecJSI(const JavaTurboModule::InitParams &params)
56+
: JavaTurboModule(params) {
57+
methodMap_["startVerification"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_startVerification};
58+
methodMap_["startVerificationFromUrl"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_startVerificationFromUrl};
59+
methodMap_["setOverrides"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_setOverrides};
60+
methodMap_["clearAllOverrides"] = MethodMetadata {0, __hostFunction_NativeInappRnSdkSpecJSI_clearAllOverrides};
61+
methodMap_["setVerificationOptions"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkSpecJSI_setVerificationOptions};
62+
methodMap_["reply"] = MethodMetadata {2, __hostFunction_NativeInappRnSdkSpecJSI_reply};
63+
methodMap_["replyWithString"] = MethodMetadata {2, __hostFunction_NativeInappRnSdkSpecJSI_replyWithString};
64+
methodMap_["ping"] = MethodMetadata {0, __hostFunction_NativeInappRnSdkSpecJSI_ping};
65+
eventEmitterMap_["onLogs"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
66+
eventEmitterMap_["onSessionLogs"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
67+
eventEmitterMap_["onSessionCreateRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
68+
eventEmitterMap_["onSessionUpdateRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
69+
eventEmitterMap_["onProviderInformationRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
70+
eventEmitterMap_["onReclaimAttestorAuthRequest"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
71+
eventEmitterMap_["onSessionIdentityUpdate"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
72+
setEventEmitterCallback(params.instance);
73+
}
74+
75+
std::shared_ptr<TurboModule> RNInappRnSdkSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
76+
if (moduleName == "InappRnSdk") {
77+
return std::make_shared<NativeInappRnSdkSpecJSI>(params);
78+
}
79+
return nullptr;
80+
}
81+
82+
} // namespace facebook::react
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
/**
3+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4+
*
5+
* Do not edit this file as changes may cause incorrect behavior and will be lost
6+
* once the code is regenerated.
7+
*
8+
* @generated by codegen project: GenerateModuleJniH.js
9+
*/
10+
11+
#pragma once
12+
13+
#include <ReactCommon/JavaTurboModule.h>
14+
#include <ReactCommon/TurboModule.h>
15+
#include <jsi/jsi.h>
16+
17+
namespace facebook::react {
18+
19+
/**
20+
* JNI C++ class for module 'NativeInappRnSdk'
21+
*/
22+
class JSI_EXPORT NativeInappRnSdkSpecJSI : public JavaTurboModule {
23+
public:
24+
NativeInappRnSdkSpecJSI(const JavaTurboModule::InitParams &params);
25+
};
26+
27+
28+
JSI_EXPORT
29+
std::shared_ptr<TurboModule> RNInappRnSdkSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30+
31+
} // namespace facebook::react
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/**
2+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3+
*
4+
* Do not edit this file as changes may cause incorrect behavior and will be lost
5+
* once the code is regenerated.
6+
*
7+
* @generated by codegen project: GenerateModuleCpp.js
8+
*/
9+
10+
#include "RNInappRnSdkSpecJSI.h"
11+
12+
namespace facebook::react {
13+
14+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15+
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->startVerification(
16+
rt,
17+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
18+
);
19+
}
20+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerificationFromUrl(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
21+
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->startVerificationFromUrl(
22+
rt,
23+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
24+
);
25+
}
26+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_setOverrides(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
27+
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->setOverrides(
28+
rt,
29+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
30+
);
31+
}
32+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_clearAllOverrides(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
33+
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->clearAllOverrides(
34+
rt
35+
);
36+
}
37+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_setVerificationOptions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
38+
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->setVerificationOptions(
39+
rt,
40+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
41+
);
42+
}
43+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_reply(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
44+
static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->reply(
45+
rt,
46+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
47+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool()
48+
);
49+
return jsi::Value::undefined();
50+
}
51+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_replyWithString(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
52+
static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->replyWithString(
53+
rt,
54+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
55+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
56+
);
57+
return jsi::Value::undefined();
58+
}
59+
static jsi::Value __hostFunction_NativeInappRnSdkCxxSpecJSI_ping(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
60+
return static_cast<NativeInappRnSdkCxxSpecJSI *>(&turboModule)->ping(
61+
rt
62+
);
63+
}
64+
65+
NativeInappRnSdkCxxSpecJSI::NativeInappRnSdkCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
66+
: TurboModule("InappRnSdk", jsInvoker) {
67+
methodMap_["startVerification"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerification};
68+
methodMap_["startVerificationFromUrl"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_startVerificationFromUrl};
69+
methodMap_["setOverrides"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_setOverrides};
70+
methodMap_["clearAllOverrides"] = MethodMetadata {0, __hostFunction_NativeInappRnSdkCxxSpecJSI_clearAllOverrides};
71+
methodMap_["setVerificationOptions"] = MethodMetadata {1, __hostFunction_NativeInappRnSdkCxxSpecJSI_setVerificationOptions};
72+
methodMap_["reply"] = MethodMetadata {2, __hostFunction_NativeInappRnSdkCxxSpecJSI_reply};
73+
methodMap_["replyWithString"] = MethodMetadata {2, __hostFunction_NativeInappRnSdkCxxSpecJSI_replyWithString};
74+
methodMap_["ping"] = MethodMetadata {0, __hostFunction_NativeInappRnSdkCxxSpecJSI_ping};
75+
}
76+
77+
78+
} // namespace facebook::react

0 commit comments

Comments
 (0)