@thealteroffice/react-native-adgeist 0.0.20 → 0.0.22
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/Adgeist.podspec +1 -1
- package/README.md +70 -521
- package/android/build.gradle +6 -3
- package/android/generated/java/com/adgeist/NativeAdgeistSpec.java +11 -11
- package/android/generated/java/com/facebook/react/viewmanagers/HTML5AdNativeComponentManagerDelegate.java +55 -0
- package/android/generated/java/com/facebook/react/viewmanagers/HTML5AdNativeComponentManagerInterface.java +24 -0
- package/android/generated/jni/RNAdgeistSpec-generated.cpp +12 -12
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.h +24 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/EventEmitters.cpp +60 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/EventEmitters.h +49 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/Props.cpp +28 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/Props.h +52 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI-generated.cpp +14 -22
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI.h +36 -36
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ShadowNodes.cpp +17 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ShadowNodes.h +32 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/States.h +29 -0
- package/android/src/main/java/com/adgeist/AdgeistPackage.kt +8 -7
- package/android/src/main/java/com/adgeist/components/HTML5AdViewManagerImpl.kt +125 -0
- package/android/src/main/java/com/adgeist/modules/AdgeistImpl.kt +114 -0
- package/android/src/main/java/com/adgeist/utils/CreativeExtensions.kt +151 -0
- package/android/src/newarch/java/com/Adgeist.kt +119 -0
- package/android/src/newarch/java/com/HTML5AdViewManager.kt +77 -0
- package/android/src/oldarch/java/com/Adgeist.kt +132 -0
- package/android/src/oldarch/java/com/HTML5AdViewManager.kt +63 -0
- package/ios/Adgeist-Bridging-Header.h +3 -0
- package/ios/Adgeist.h +1 -1
- package/ios/Adgeist.mm +71 -65
- package/ios/AdgeistImpl.swift +127 -132
- package/ios/NativeHTML5AdManager.h +9 -0
- package/ios/NativeHTML5AdManager.mm +178 -0
- package/ios/NativeHTML5AdView.swift +136 -0
- package/ios/generated/RNAdgeistSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/RNAdgeistSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/RNAdgeistSpec/EventEmitters.cpp +60 -0
- package/ios/generated/RNAdgeistSpec/EventEmitters.h +49 -0
- package/ios/generated/RNAdgeistSpec/Props.cpp +28 -0
- package/ios/generated/RNAdgeistSpec/Props.h +52 -0
- package/ios/generated/RNAdgeistSpec/RCTComponentViewHelpers.h +65 -0
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec-generated.mm +17 -17
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec.h +17 -25
- package/ios/generated/RNAdgeistSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/RNAdgeistSpec/ShadowNodes.h +32 -0
- package/ios/generated/RNAdgeistSpec/States.cpp +16 -0
- package/ios/generated/RNAdgeistSpec/States.h +29 -0
- package/ios/generated/RNAdgeistSpecJSI-generated.cpp +14 -22
- package/ios/generated/RNAdgeistSpecJSI.h +36 -36
- package/lib/module/cdpclient/index.js +1 -25
- package/lib/module/cdpclient/index.js.map +1 -1
- package/lib/module/components/HTML5AdView.js +128 -0
- package/lib/module/components/HTML5AdView.js.map +1 -0
- package/lib/module/components/{BannerAd.js → deprecated/BannerAdView.js} +50 -79
- package/lib/module/components/deprecated/BannerAdView.js.map +1 -0
- package/lib/module/components/{ConsentModal.js → deprecated/ConsentModal.js} +2 -2
- package/lib/module/components/deprecated/ConsentModal.js.map +1 -0
- package/lib/module/constants.js +14 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/{components → providers}/AdgeistProvider.js +10 -35
- package/lib/module/providers/AdgeistProvider.js.map +1 -0
- package/lib/module/specs/HTML5AdNativeComponent.ts +46 -0
- package/lib/module/specs/NativeAdgeist.js.map +1 -0
- package/lib/module/types/AdSize.js +2 -0
- package/lib/module/types/AdSize.js.map +1 -0
- package/lib/module/types/CPMAdResponse.js +2 -0
- package/lib/module/types/CPMAdResponse.js.map +1 -0
- package/lib/module/types/FixedAdResponse.js +2 -0
- package/lib/module/types/FixedAdResponse.js.map +1 -0
- package/lib/module/types/HTML5AdNativeComponentProps.js +4 -0
- package/lib/module/types/HTML5AdNativeComponentProps.js.map +1 -0
- package/lib/module/types/Provider.js +2 -0
- package/lib/module/types/Provider.js.map +1 -0
- package/lib/typescript/src/cdpclient/index.d.ts +1 -21
- package/lib/typescript/src/cdpclient/index.d.ts.map +1 -1
- package/lib/typescript/src/components/HTML5AdView.d.ts +3 -0
- package/lib/typescript/src/components/HTML5AdView.d.ts.map +1 -0
- package/lib/typescript/src/components/deprecated/BannerAdView.d.ts +17 -0
- package/lib/typescript/src/components/deprecated/BannerAdView.d.ts.map +1 -0
- package/lib/typescript/src/components/deprecated/ConsentModal.d.ts.map +1 -0
- package/lib/typescript/src/constants.d.ts +10 -0
- package/lib/typescript/src/constants.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/AdgeistProvider.d.ts +9 -0
- package/lib/typescript/src/providers/AdgeistProvider.d.ts.map +1 -0
- package/lib/typescript/src/specs/HTML5AdNativeComponent.d.ts +29 -0
- package/lib/typescript/src/specs/HTML5AdNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeAdgeist.d.ts +28 -0
- package/lib/typescript/src/specs/NativeAdgeist.d.ts.map +1 -0
- package/lib/typescript/src/types/AdSize.d.ts +5 -0
- package/lib/typescript/src/types/AdSize.d.ts.map +1 -0
- package/lib/typescript/src/types/CPMAdResponse.d.ts +25 -0
- package/lib/typescript/src/types/CPMAdResponse.d.ts.map +1 -0
- package/lib/typescript/src/types/FixedAdResponse.d.ts +50 -0
- package/lib/typescript/src/types/FixedAdResponse.d.ts.map +1 -0
- package/lib/typescript/src/types/HTML5AdNativeComponentProps.d.ts +24 -0
- package/lib/typescript/src/types/HTML5AdNativeComponentProps.d.ts.map +1 -0
- package/lib/typescript/src/types/Provider.d.ts +16 -0
- package/lib/typescript/src/types/Provider.d.ts.map +1 -0
- package/package.json +8 -3
- package/react-native.config.js +1 -1
- package/src/cdpclient/index.ts +1 -21
- package/src/components/HTML5AdView.tsx +161 -0
- package/src/components/{BannerAd.tsx → deprecated/BannerAdView.tsx} +80 -115
- package/src/components/{ConsentModal.tsx → deprecated/ConsentModal.tsx} +2 -2
- package/src/constants.ts +8 -0
- package/src/index.tsx +4 -2
- package/src/{components → providers}/AdgeistProvider.tsx +26 -60
- package/src/specs/HTML5AdNativeComponent.ts +46 -0
- package/src/{NativeAdgeist.ts → specs/NativeAdgeist.ts} +26 -25
- package/src/types/AdSize.ts +4 -0
- package/src/types/CPMAdResponse.ts +26 -0
- package/src/types/FixedAdResponse.ts +51 -0
- package/src/types/HTML5AdNativeComponentProps.ts +28 -0
- package/src/types/Provider.ts +16 -0
- package/android/src/main/AndroidManifestNew.xml +0 -2
- package/android/src/main/java/com/adgeist/implementation/AdgeistModuleImpl.kt +0 -252
- package/android/src/newarch/java/com/AdgeistModule.kt +0 -135
- package/android/src/oldarch/java/com/AdgeistModule.kt +0 -148
- package/ios/adgeist-Bridging-Header.h +0 -1
- package/lib/module/NativeAdgeist.js.map +0 -1
- package/lib/module/components/AdgeistProvider.js.map +0 -1
- package/lib/module/components/BannerAd.js.map +0 -1
- package/lib/module/components/ConsentModal.js.map +0 -1
- package/lib/typescript/src/NativeAdgeist.d.ts +0 -28
- package/lib/typescript/src/NativeAdgeist.d.ts.map +0 -1
- package/lib/typescript/src/components/AdgeistProvider.d.ts +0 -50
- package/lib/typescript/src/components/AdgeistProvider.d.ts.map +0 -1
- package/lib/typescript/src/components/BannerAd.d.ts +0 -64
- package/lib/typescript/src/components/BannerAd.d.ts.map +0 -1
- package/lib/typescript/src/components/ConsentModal.d.ts.map +0 -1
- /package/lib/module/{NativeAdgeist.js → specs/NativeAdgeist.js} +0 -0
- /package/lib/typescript/src/components/{ConsentModal.d.ts → deprecated/ConsentModal.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
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: GenerateComponentDescriptorCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "ComponentDescriptors.h"
|
|
12
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
13
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
void RNAdgeistSpec_registerComponentDescriptorsFromCodegen(
|
|
18
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
|
|
19
|
+
registry->add(concreteComponentDescriptorProvider<HTML5AdNativeComponentComponentDescriptor>());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,24 @@
|
|
|
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: GenerateComponentDescriptorH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include "ShadowNodes.h"
|
|
14
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
16
|
+
|
|
17
|
+
namespace facebook::react {
|
|
18
|
+
|
|
19
|
+
using HTML5AdNativeComponentComponentDescriptor = ConcreteComponentDescriptor<HTML5AdNativeComponentShadowNode>;
|
|
20
|
+
|
|
21
|
+
void RNAdgeistSpec_registerComponentDescriptorsFromCodegen(
|
|
22
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
23
|
+
|
|
24
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,60 @@
|
|
|
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: GenerateEventEmitterCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "EventEmitters.h"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook::react {
|
|
15
|
+
|
|
16
|
+
void HTML5AdNativeComponentEventEmitter::onAdLoaded(OnAdLoaded $event) const {
|
|
17
|
+
dispatchEvent("adLoaded", [](jsi::Runtime &runtime) {
|
|
18
|
+
auto $payload = jsi::Object(runtime);
|
|
19
|
+
|
|
20
|
+
return $payload;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
void HTML5AdNativeComponentEventEmitter::onAdFailedToLoad(OnAdFailedToLoad $event) const {
|
|
26
|
+
dispatchEvent("adFailedToLoad", [$event=std::move($event)](jsi::Runtime &runtime) {
|
|
27
|
+
auto $payload = jsi::Object(runtime);
|
|
28
|
+
$payload.setProperty(runtime, "error", $event.error);
|
|
29
|
+
return $payload;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
void HTML5AdNativeComponentEventEmitter::onAdOpened(OnAdOpened $event) const {
|
|
35
|
+
dispatchEvent("adOpened", [](jsi::Runtime &runtime) {
|
|
36
|
+
auto $payload = jsi::Object(runtime);
|
|
37
|
+
|
|
38
|
+
return $payload;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
void HTML5AdNativeComponentEventEmitter::onAdClosed(OnAdClosed $event) const {
|
|
44
|
+
dispatchEvent("adClosed", [](jsi::Runtime &runtime) {
|
|
45
|
+
auto $payload = jsi::Object(runtime);
|
|
46
|
+
|
|
47
|
+
return $payload;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
void HTML5AdNativeComponentEventEmitter::onAdClicked(OnAdClicked $event) const {
|
|
53
|
+
dispatchEvent("adClicked", [](jsi::Runtime &runtime) {
|
|
54
|
+
auto $payload = jsi::Object(runtime);
|
|
55
|
+
|
|
56
|
+
return $payload;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,49 @@
|
|
|
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: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
class HTML5AdNativeComponentEventEmitter : public ViewEventEmitter {
|
|
17
|
+
public:
|
|
18
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
19
|
+
|
|
20
|
+
struct OnAdLoaded {
|
|
21
|
+
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
struct OnAdFailedToLoad {
|
|
25
|
+
std::string error;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
struct OnAdOpened {
|
|
29
|
+
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
struct OnAdClosed {
|
|
33
|
+
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
struct OnAdClicked {
|
|
37
|
+
|
|
38
|
+
};
|
|
39
|
+
void onAdLoaded(OnAdLoaded value) const;
|
|
40
|
+
|
|
41
|
+
void onAdFailedToLoad(OnAdFailedToLoad value) const;
|
|
42
|
+
|
|
43
|
+
void onAdOpened(OnAdOpened value) const;
|
|
44
|
+
|
|
45
|
+
void onAdClosed(OnAdClosed value) const;
|
|
46
|
+
|
|
47
|
+
void onAdClicked(OnAdClicked value) const;
|
|
48
|
+
};
|
|
49
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,28 @@
|
|
|
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: GeneratePropsCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "Props.h"
|
|
12
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
+
#include <react/renderer/core/propsConversions.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
HTML5AdNativeComponentProps::HTML5AdNativeComponentProps(
|
|
18
|
+
const PropsParserContext &context,
|
|
19
|
+
const HTML5AdNativeComponentProps &sourceProps,
|
|
20
|
+
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
|
21
|
+
|
|
22
|
+
adUnitID(convertRawProp(context, rawProps, "adUnitID", sourceProps.adUnitID, {})),
|
|
23
|
+
adIsResponsive(convertRawProp(context, rawProps, "adIsResponsive", sourceProps.adIsResponsive, {false})),
|
|
24
|
+
adSize(convertRawProp(context, rawProps, "adSize", sourceProps.adSize, {})),
|
|
25
|
+
adType(convertRawProp(context, rawProps, "adType", sourceProps.adType, {}))
|
|
26
|
+
{}
|
|
27
|
+
|
|
28
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,52 @@
|
|
|
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: GeneratePropsH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewProps.h>
|
|
13
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
14
|
+
#include <react/renderer/core/propsConversions.h>
|
|
15
|
+
|
|
16
|
+
namespace facebook::react {
|
|
17
|
+
|
|
18
|
+
struct HTML5AdNativeComponentAdSizeStruct {
|
|
19
|
+
double width{0.0};
|
|
20
|
+
double height{0.0};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, HTML5AdNativeComponentAdSizeStruct &result) {
|
|
24
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
25
|
+
|
|
26
|
+
auto tmp_width = map.find("width");
|
|
27
|
+
if (tmp_width != map.end()) {
|
|
28
|
+
fromRawValue(context, tmp_width->second, result.width);
|
|
29
|
+
}
|
|
30
|
+
auto tmp_height = map.find("height");
|
|
31
|
+
if (tmp_height != map.end()) {
|
|
32
|
+
fromRawValue(context, tmp_height->second, result.height);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static inline std::string toString(const HTML5AdNativeComponentAdSizeStruct &value) {
|
|
37
|
+
return "[Object HTML5AdNativeComponentAdSizeStruct]";
|
|
38
|
+
}
|
|
39
|
+
class HTML5AdNativeComponentProps final : public ViewProps {
|
|
40
|
+
public:
|
|
41
|
+
HTML5AdNativeComponentProps() = default;
|
|
42
|
+
HTML5AdNativeComponentProps(const PropsParserContext& context, const HTML5AdNativeComponentProps &sourceProps, const RawProps &rawProps);
|
|
43
|
+
|
|
44
|
+
#pragma mark - Props
|
|
45
|
+
|
|
46
|
+
std::string adUnitID{};
|
|
47
|
+
bool adIsResponsive{false};
|
|
48
|
+
HTML5AdNativeComponentAdSizeStruct adSize{};
|
|
49
|
+
std::string adType{};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,65 @@
|
|
|
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: GenerateComponentHObjCpp.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#import <Foundation/Foundation.h>
|
|
11
|
+
#import <React/RCTDefines.h>
|
|
12
|
+
#import <React/RCTLog.h>
|
|
13
|
+
|
|
14
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
+
|
|
16
|
+
@protocol RCTHTML5AdNativeComponentViewProtocol <NSObject>
|
|
17
|
+
- (void)loadAd:(BOOL)isTestMode;
|
|
18
|
+
- (void)destroy;
|
|
19
|
+
@end
|
|
20
|
+
|
|
21
|
+
RCT_EXTERN inline void RCTHTML5AdNativeComponentHandleCommand(
|
|
22
|
+
id<RCTHTML5AdNativeComponentViewProtocol> componentView,
|
|
23
|
+
NSString const *commandName,
|
|
24
|
+
NSArray const *args)
|
|
25
|
+
{
|
|
26
|
+
if ([commandName isEqualToString:@"loadAd"]) {
|
|
27
|
+
#if RCT_DEBUG
|
|
28
|
+
if ([args count] != 1) {
|
|
29
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"HTML5AdNativeComponent", commandName, (int)[args count], 1);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
NSObject *arg0 = args[0];
|
|
35
|
+
#if RCT_DEBUG
|
|
36
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"HTML5AdNativeComponent", commandName, @"1st")) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
#endif
|
|
40
|
+
BOOL isTestMode = [(NSNumber *)arg0 boolValue];
|
|
41
|
+
|
|
42
|
+
[componentView loadAd:isTestMode];
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if ([commandName isEqualToString:@"destroy"]) {
|
|
47
|
+
#if RCT_DEBUG
|
|
48
|
+
if ([args count] != 0) {
|
|
49
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"HTML5AdNativeComponent", commandName, (int)[args count], 0);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
[componentView destroy];
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#if RCT_DEBUG
|
|
61
|
+
RCTLogError(@"%@ received command %@, which is not a supported command.", @"HTML5AdNativeComponent", commandName);
|
|
62
|
+
#endif
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -27,11 +27,15 @@
|
|
|
27
27
|
namespace facebook::react {
|
|
28
28
|
|
|
29
29
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_initializeSdk(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
30
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "initializeSdk", @selector(initializeSdk:resolve:reject:), args, count);
|
|
30
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "initializeSdk", @selector(initializeSdk:customPackageOrBundleID:customAdgeistAppID:resolve:reject:), args, count);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_destroySdk(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
34
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "destroySdk", @selector(destroySdk:reject:), args, count);
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_fetchCreative(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
34
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "fetchCreative", @selector(fetchCreative:
|
|
38
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "fetchCreative", @selector(fetchCreative:buyType:isTestEnvironment:resolve:reject:), args, count);
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_setUserDetails(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
@@ -51,36 +55,35 @@ namespace facebook::react {
|
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackImpression(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
54
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackImpression", @selector(trackImpression:adSpaceId:
|
|
58
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackImpression", @selector(trackImpression:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:renderTime:resolve:reject:), args, count);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
58
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackView", @selector(trackView:adSpaceId:
|
|
62
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackView", @selector(trackView:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:viewTime:visibilityRatio:scrollDepth:timeToVisible:resolve:reject:), args, count);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackTotalView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
62
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackTotalView", @selector(trackTotalView:adSpaceId:
|
|
66
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackTotalView", @selector(trackTotalView:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:totalViewTime:resolve:reject:), args, count);
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackClick(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
66
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackClick", @selector(trackClick:adSpaceId:
|
|
70
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackClick", @selector(trackClick:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:resolve:reject:), args, count);
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackVideoPlayback(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
70
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackVideoPlayback", @selector(trackVideoPlayback:adSpaceId:
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackVideoQuartile(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
74
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackVideoQuartile", @selector(trackVideoQuartile:adSpaceId:publisherId:apiKey:bidId:isTestEnvironment:quartile:resolve:reject:), args, count);
|
|
74
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackVideoPlayback", @selector(trackVideoPlayback:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:totalPlaybackTime:resolve:reject:), args, count);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
NativeAdgeistSpecJSI::NativeAdgeistSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
78
78
|
: ObjCTurboModule(params) {
|
|
79
79
|
|
|
80
|
-
methodMap_["initializeSdk"] = MethodMetadata {
|
|
80
|
+
methodMap_["initializeSdk"] = MethodMetadata {3, __hostFunction_NativeAdgeistSpecJSI_initializeSdk};
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
methodMap_["
|
|
83
|
+
methodMap_["destroySdk"] = MethodMetadata {0, __hostFunction_NativeAdgeistSpecJSI_destroySdk};
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
methodMap_["fetchCreative"] = MethodMetadata {3, __hostFunction_NativeAdgeistSpecJSI_fetchCreative};
|
|
84
87
|
|
|
85
88
|
|
|
86
89
|
methodMap_["setUserDetails"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_setUserDetails};
|
|
@@ -101,7 +104,7 @@ namespace facebook::react {
|
|
|
101
104
|
methodMap_["trackView"] = MethodMetadata {10, __hostFunction_NativeAdgeistSpecJSI_trackView};
|
|
102
105
|
|
|
103
106
|
|
|
104
|
-
methodMap_["trackTotalView"] = MethodMetadata {
|
|
107
|
+
methodMap_["trackTotalView"] = MethodMetadata {7, __hostFunction_NativeAdgeistSpecJSI_trackTotalView};
|
|
105
108
|
|
|
106
109
|
|
|
107
110
|
methodMap_["trackClick"] = MethodMetadata {6, __hostFunction_NativeAdgeistSpecJSI_trackClick};
|
|
@@ -109,8 +112,5 @@ namespace facebook::react {
|
|
|
109
112
|
|
|
110
113
|
methodMap_["trackVideoPlayback"] = MethodMetadata {7, __hostFunction_NativeAdgeistSpecJSI_trackVideoPlayback};
|
|
111
114
|
|
|
112
|
-
|
|
113
|
-
methodMap_["trackVideoQuartile"] = MethodMetadata {7, __hostFunction_NativeAdgeistSpecJSI_trackVideoQuartile};
|
|
114
|
-
|
|
115
115
|
}
|
|
116
116
|
} // namespace facebook::react
|
|
@@ -35,13 +35,15 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
35
35
|
|
|
36
36
|
@protocol NativeAdgeistSpec <RCTBridgeModule, RCTTurboModule>
|
|
37
37
|
|
|
38
|
-
- (void)initializeSdk:(NSString *)
|
|
38
|
+
- (void)initializeSdk:(NSString *)customBidRequestBackendDomain
|
|
39
|
+
customPackageOrBundleID:(NSString *)customPackageOrBundleID
|
|
40
|
+
customAdgeistAppID:(NSString *)customAdgeistAppID
|
|
39
41
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
40
42
|
reject:(RCTPromiseRejectBlock)reject;
|
|
41
|
-
- (void)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
- (void)destroySdk:(RCTPromiseResolveBlock)resolve
|
|
44
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
45
|
+
- (void)fetchCreative:(NSString *)adSpaceId
|
|
46
|
+
buyType:(NSString *)buyType
|
|
45
47
|
isTestEnvironment:(BOOL)isTestEnvironment
|
|
46
48
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
47
49
|
reject:(RCTPromiseRejectBlock)reject;
|
|
@@ -52,18 +54,18 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
52
54
|
- (void)updateConsentStatus:(BOOL)consent;
|
|
53
55
|
- (void)trackImpression:(NSString *)campaignId
|
|
54
56
|
adSpaceId:(NSString *)adSpaceId
|
|
55
|
-
publisherId:(NSString *)publisherId
|
|
56
|
-
apiKey:(NSString *)apiKey
|
|
57
57
|
bidId:(NSString *)bidId
|
|
58
|
+
bidMeta:(NSString *)bidMeta
|
|
59
|
+
buyType:(NSString *)buyType
|
|
58
60
|
isTestEnvironment:(BOOL)isTestEnvironment
|
|
59
61
|
renderTime:(double)renderTime
|
|
60
62
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
61
63
|
reject:(RCTPromiseRejectBlock)reject;
|
|
62
64
|
- (void)trackView:(NSString *)campaignId
|
|
63
65
|
adSpaceId:(NSString *)adSpaceId
|
|
64
|
-
publisherId:(NSString *)publisherId
|
|
65
|
-
apiKey:(NSString *)apiKey
|
|
66
66
|
bidId:(NSString *)bidId
|
|
67
|
+
bidMeta:(NSString *)bidMeta
|
|
68
|
+
buyType:(NSString *)buyType
|
|
67
69
|
isTestEnvironment:(BOOL)isTestEnvironment
|
|
68
70
|
viewTime:(double)viewTime
|
|
69
71
|
visibilityRatio:(double)visibilityRatio
|
|
@@ -73,40 +75,30 @@ isTestEnvironment:(BOOL)isTestEnvironment
|
|
|
73
75
|
reject:(RCTPromiseRejectBlock)reject;
|
|
74
76
|
- (void)trackTotalView:(NSString *)campaignId
|
|
75
77
|
adSpaceId:(NSString *)adSpaceId
|
|
76
|
-
publisherId:(NSString *)publisherId
|
|
77
|
-
apiKey:(NSString *)apiKey
|
|
78
78
|
bidId:(NSString *)bidId
|
|
79
|
+
bidMeta:(NSString *)bidMeta
|
|
80
|
+
buyType:(NSString *)buyType
|
|
79
81
|
isTestEnvironment:(BOOL)isTestEnvironment
|
|
80
82
|
totalViewTime:(double)totalViewTime
|
|
81
|
-
visibilityRatio:(double)visibilityRatio
|
|
82
83
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
83
84
|
reject:(RCTPromiseRejectBlock)reject;
|
|
84
85
|
- (void)trackClick:(NSString *)campaignId
|
|
85
86
|
adSpaceId:(NSString *)adSpaceId
|
|
86
|
-
publisherId:(NSString *)publisherId
|
|
87
|
-
apiKey:(NSString *)apiKey
|
|
88
87
|
bidId:(NSString *)bidId
|
|
88
|
+
bidMeta:(NSString *)bidMeta
|
|
89
|
+
buyType:(NSString *)buyType
|
|
89
90
|
isTestEnvironment:(BOOL)isTestEnvironment
|
|
90
91
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
91
92
|
reject:(RCTPromiseRejectBlock)reject;
|
|
92
93
|
- (void)trackVideoPlayback:(NSString *)campaignId
|
|
93
94
|
adSpaceId:(NSString *)adSpaceId
|
|
94
|
-
publisherId:(NSString *)publisherId
|
|
95
|
-
apiKey:(NSString *)apiKey
|
|
96
95
|
bidId:(NSString *)bidId
|
|
96
|
+
bidMeta:(NSString *)bidMeta
|
|
97
|
+
buyType:(NSString *)buyType
|
|
97
98
|
isTestEnvironment:(BOOL)isTestEnvironment
|
|
98
99
|
totalPlaybackTime:(double)totalPlaybackTime
|
|
99
100
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
100
101
|
reject:(RCTPromiseRejectBlock)reject;
|
|
101
|
-
- (void)trackVideoQuartile:(NSString *)campaignId
|
|
102
|
-
adSpaceId:(NSString *)adSpaceId
|
|
103
|
-
publisherId:(NSString *)publisherId
|
|
104
|
-
apiKey:(NSString *)apiKey
|
|
105
|
-
bidId:(NSString *)bidId
|
|
106
|
-
isTestEnvironment:(BOOL)isTestEnvironment
|
|
107
|
-
quartile:(NSString *)quartile
|
|
108
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
109
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
110
102
|
|
|
111
103
|
@end
|
|
112
104
|
|
|
@@ -0,0 +1,17 @@
|
|
|
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: GenerateShadowNodeCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "ShadowNodes.h"
|
|
12
|
+
|
|
13
|
+
namespace facebook::react {
|
|
14
|
+
|
|
15
|
+
extern const char HTML5AdNativeComponentComponentName[] = "HTML5AdNativeComponent";
|
|
16
|
+
|
|
17
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,32 @@
|
|
|
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: GenerateShadowNodeH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include "EventEmitters.h"
|
|
14
|
+
#include "Props.h"
|
|
15
|
+
#include "States.h"
|
|
16
|
+
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
+
#include <jsi/jsi.h>
|
|
18
|
+
|
|
19
|
+
namespace facebook::react {
|
|
20
|
+
|
|
21
|
+
JSI_EXPORT extern const char HTML5AdNativeComponentComponentName[];
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* `ShadowNode` for <HTML5AdNativeComponent> component.
|
|
25
|
+
*/
|
|
26
|
+
using HTML5AdNativeComponentShadowNode = ConcreteViewShadowNode<
|
|
27
|
+
HTML5AdNativeComponentComponentName,
|
|
28
|
+
HTML5AdNativeComponentProps,
|
|
29
|
+
HTML5AdNativeComponentEventEmitter,
|
|
30
|
+
HTML5AdNativeComponentState>;
|
|
31
|
+
|
|
32
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,16 @@
|
|
|
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: GenerateStateCpp.js
|
|
9
|
+
*/
|
|
10
|
+
#include "States.h"
|
|
11
|
+
|
|
12
|
+
namespace facebook::react {
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,29 @@
|
|
|
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: GenerateStateH.js
|
|
8
|
+
*/
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#ifdef ANDROID
|
|
12
|
+
#include <folly/dynamic.h>
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
class HTML5AdNativeComponentState {
|
|
18
|
+
public:
|
|
19
|
+
HTML5AdNativeComponentState() = default;
|
|
20
|
+
|
|
21
|
+
#ifdef ANDROID
|
|
22
|
+
HTML5AdNativeComponentState(HTML5AdNativeComponentState const &previousState, folly::dynamic data){};
|
|
23
|
+
folly::dynamic getDynamic() const {
|
|
24
|
+
return {};
|
|
25
|
+
};
|
|
26
|
+
#endif
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
} // namespace facebook::react
|
|
@@ -14,7 +14,14 @@ namespace facebook::react {
|
|
|
14
14
|
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
15
|
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->initializeSdk(
|
|
16
16
|
rt,
|
|
17
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
17
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
18
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
19
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_destroySdk(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
23
|
+
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->destroySdk(
|
|
24
|
+
rt
|
|
18
25
|
);
|
|
19
26
|
}
|
|
20
27
|
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
@@ -22,9 +29,7 @@ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative(jsi::Runt
|
|
|
22
29
|
rt,
|
|
23
30
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
24
31
|
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
25
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].
|
|
26
|
-
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
27
|
-
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asBool()
|
|
32
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asBool()
|
|
28
33
|
);
|
|
29
34
|
}
|
|
30
35
|
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
@@ -89,8 +94,7 @@ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackTotalView(jsi::Run
|
|
|
89
94
|
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
90
95
|
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
|
|
91
96
|
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
|
|
92
|
-
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
|
|
93
|
-
count <= 7 ? throw jsi::JSError(rt, "Expected argument in position 7 to be passed") : args[7].asNumber()
|
|
97
|
+
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
|
|
94
98
|
);
|
|
95
99
|
}
|
|
96
100
|
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackClick(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
@@ -116,33 +120,21 @@ static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoPlayback(jsi:
|
|
|
116
120
|
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
|
|
117
121
|
);
|
|
118
122
|
}
|
|
119
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoQuartile(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
120
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackVideoQuartile(
|
|
121
|
-
rt,
|
|
122
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
123
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
124
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
125
|
-
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
126
|
-
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
|
|
127
|
-
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
|
|
128
|
-
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asString(rt)
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
123
|
|
|
132
124
|
NativeAdgeistCxxSpecJSI::NativeAdgeistCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
133
125
|
: TurboModule("Adgeist", jsInvoker) {
|
|
134
|
-
methodMap_["initializeSdk"] = MethodMetadata {
|
|
135
|
-
methodMap_["
|
|
126
|
+
methodMap_["initializeSdk"] = MethodMetadata {3, __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk};
|
|
127
|
+
methodMap_["destroySdk"] = MethodMetadata {0, __hostFunction_NativeAdgeistCxxSpecJSI_destroySdk};
|
|
128
|
+
methodMap_["fetchCreative"] = MethodMetadata {3, __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative};
|
|
136
129
|
methodMap_["setUserDetails"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails};
|
|
137
130
|
methodMap_["logEvent"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_logEvent};
|
|
138
131
|
methodMap_["getConsentStatus"] = MethodMetadata {0, __hostFunction_NativeAdgeistCxxSpecJSI_getConsentStatus};
|
|
139
132
|
methodMap_["updateConsentStatus"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_updateConsentStatus};
|
|
140
133
|
methodMap_["trackImpression"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackImpression};
|
|
141
134
|
methodMap_["trackView"] = MethodMetadata {10, __hostFunction_NativeAdgeistCxxSpecJSI_trackView};
|
|
142
|
-
methodMap_["trackTotalView"] = MethodMetadata {
|
|
135
|
+
methodMap_["trackTotalView"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackTotalView};
|
|
143
136
|
methodMap_["trackClick"] = MethodMetadata {6, __hostFunction_NativeAdgeistCxxSpecJSI_trackClick};
|
|
144
137
|
methodMap_["trackVideoPlayback"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoPlayback};
|
|
145
|
-
methodMap_["trackVideoQuartile"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoQuartile};
|
|
146
138
|
}
|
|
147
139
|
|
|
148
140
|
|