@thealteroffice/react-native-adgeist 0.0.30-beta → 0.0.32-beta

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.
Files changed (63) hide show
  1. package/Adgeist.podspec +1 -1
  2. package/README.md +2 -41
  3. package/android/build.gradle +1 -1
  4. package/android/src/main/java/com/adgeist/components/HTML5AdViewManagerImpl.kt +4 -0
  5. package/android/src/main/java/com/adgeist/modules/AdgeistImpl.kt +11 -25
  6. package/android/src/main/java/com/adgeist/utils/CreativeExtensions.kt +0 -80
  7. package/android/src/newarch/java/com/Adgeist.kt +17 -63
  8. package/android/src/oldarch/java/com/Adgeist.kt +17 -64
  9. package/ios/Adgeist.mm +0 -4
  10. package/ios/AdgeistImpl.swift +17 -68
  11. package/lib/module/constants.js +3 -5
  12. package/lib/module/constants.js.map +1 -1
  13. package/lib/module/index.js +0 -2
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/module/providers/AdgeistProvider.js +3 -3
  16. package/lib/module/providers/AdgeistProvider.js.map +1 -1
  17. package/lib/module/specs/NativeAdgeist.js.map +1 -1
  18. package/lib/typescript/src/constants.d.ts +3 -3
  19. package/lib/typescript/src/constants.d.ts.map +1 -1
  20. package/lib/typescript/src/index.d.ts +0 -2
  21. package/lib/typescript/src/index.d.ts.map +1 -1
  22. package/lib/typescript/src/providers/AdgeistProvider.d.ts.map +1 -1
  23. package/lib/typescript/src/specs/NativeAdgeist.d.ts +0 -1
  24. package/lib/typescript/src/specs/NativeAdgeist.d.ts.map +1 -1
  25. package/package.json +6 -4
  26. package/src/constants.ts +4 -4
  27. package/src/index.tsx +0 -4
  28. package/src/providers/AdgeistProvider.tsx +8 -3
  29. package/src/specs/NativeAdgeist.ts +0 -2
  30. package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeAdgeistSpec.java +0 -88
  31. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/HTML5AdNativeComponentManagerDelegate.java +0 -55
  32. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/HTML5AdNativeComponentManagerInterface.java +0 -24
  33. package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
  34. package/android/app/build/generated/source/codegen/jni/RNAdgeistSpec-generated.cpp +0 -104
  35. package/android/app/build/generated/source/codegen/jni/RNAdgeistSpec.h +0 -31
  36. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.cpp +0 -22
  37. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.h +0 -24
  38. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/EventEmitters.cpp +0 -60
  39. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/EventEmitters.h +0 -49
  40. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/Props.cpp +0 -28
  41. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/Props.h +0 -69
  42. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI-generated.cpp +0 -150
  43. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI.h +0 -179
  44. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/ShadowNodes.cpp +0 -17
  45. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/ShadowNodes.h +0 -32
  46. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/States.cpp +0 -16
  47. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/States.h +0 -29
  48. package/android/libs/adgeistkit-beta-release.aar +0 -0
  49. package/lib/module/components/deprecated/BannerAdView.js +0 -375
  50. package/lib/module/components/deprecated/BannerAdView.js.map +0 -1
  51. package/lib/module/types/CPMAdResponse.js +0 -2
  52. package/lib/module/types/CPMAdResponse.js.map +0 -1
  53. package/lib/module/utmtracker/index.js +0 -25
  54. package/lib/module/utmtracker/index.js.map +0 -1
  55. package/lib/typescript/src/components/deprecated/BannerAdView.d.ts +0 -17
  56. package/lib/typescript/src/components/deprecated/BannerAdView.d.ts.map +0 -1
  57. package/lib/typescript/src/types/CPMAdResponse.d.ts +0 -29
  58. package/lib/typescript/src/types/CPMAdResponse.d.ts.map +0 -1
  59. package/lib/typescript/src/utmtracker/index.d.ts +0 -6
  60. package/lib/typescript/src/utmtracker/index.d.ts.map +0 -1
  61. package/src/components/deprecated/BannerAdView.tsx +0 -527
  62. package/src/types/CPMAdResponse.ts +0 -31
  63. package/src/utmtracker/index.ts +0 -26
@@ -1,60 +0,0 @@
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 <react/renderer/components/RNAdgeistSpec/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
@@ -1,49 +0,0 @@
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
@@ -1,28 +0,0 @@
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 <react/renderer/components/RNAdgeistSpec/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, {HTML5AdNativeComponentAdType::BANNER}))
26
- {}
27
-
28
- } // namespace facebook::react
@@ -1,69 +0,0 @@
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
- enum class HTML5AdNativeComponentAdType { BANNER, DISPLAY, COMPANION };
19
-
20
- static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, HTML5AdNativeComponentAdType &result) {
21
- auto string = (std::string)value;
22
- if (string == "BANNER") { result = HTML5AdNativeComponentAdType::BANNER; return; }
23
- if (string == "DISPLAY") { result = HTML5AdNativeComponentAdType::DISPLAY; return; }
24
- if (string == "COMPANION") { result = HTML5AdNativeComponentAdType::COMPANION; return; }
25
- abort();
26
- }
27
-
28
- static inline std::string toString(const HTML5AdNativeComponentAdType &value) {
29
- switch (value) {
30
- case HTML5AdNativeComponentAdType::BANNER: return "BANNER";
31
- case HTML5AdNativeComponentAdType::DISPLAY: return "DISPLAY";
32
- case HTML5AdNativeComponentAdType::COMPANION: return "COMPANION";
33
- }
34
- }
35
- struct HTML5AdNativeComponentAdSizeStruct {
36
- double width{0.0};
37
- double height{0.0};
38
- };
39
-
40
- static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, HTML5AdNativeComponentAdSizeStruct &result) {
41
- auto map = (std::unordered_map<std::string, RawValue>)value;
42
-
43
- auto tmp_width = map.find("width");
44
- if (tmp_width != map.end()) {
45
- fromRawValue(context, tmp_width->second, result.width);
46
- }
47
- auto tmp_height = map.find("height");
48
- if (tmp_height != map.end()) {
49
- fromRawValue(context, tmp_height->second, result.height);
50
- }
51
- }
52
-
53
- static inline std::string toString(const HTML5AdNativeComponentAdSizeStruct &value) {
54
- return "[Object HTML5AdNativeComponentAdSizeStruct]";
55
- }
56
- class HTML5AdNativeComponentProps final : public ViewProps {
57
- public:
58
- HTML5AdNativeComponentProps() = default;
59
- HTML5AdNativeComponentProps(const PropsParserContext& context, const HTML5AdNativeComponentProps &sourceProps, const RawProps &rawProps);
60
-
61
- #pragma mark - Props
62
-
63
- std::string adUnitID{};
64
- bool adIsResponsive{false};
65
- HTML5AdNativeComponentAdSizeStruct adSize{};
66
- HTML5AdNativeComponentAdType adType{HTML5AdNativeComponentAdType::BANNER};
67
- };
68
-
69
- } // namespace facebook::react
@@ -1,150 +0,0 @@
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 "RNAdgeistSpecJSI.h"
11
-
12
- namespace facebook::react {
13
-
14
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->initializeSdk(
16
- rt,
17
- count <= 0 || args[0].isNull() || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asString(rt)),
18
- count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt)),
19
- count <= 2 || args[2].isNull() || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asString(rt)),
20
- count <= 3 || args[3].isNull() || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asString(rt))
21
- );
22
- }
23
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_destroySdk(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
24
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->destroySdk(
25
- rt
26
- );
27
- }
28
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
29
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->fetchCreative(
30
- rt,
31
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
32
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
33
- count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asBool()
34
- );
35
- }
36
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
37
- static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->setUserDetails(
38
- rt,
39
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
40
- );
41
- return jsi::Value::undefined();
42
- }
43
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_logEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
44
- static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->logEvent(
45
- rt,
46
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
47
- );
48
- return jsi::Value::undefined();
49
- }
50
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_getConsentStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
51
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->getConsentStatus(
52
- rt
53
- );
54
- }
55
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_updateConsentStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
56
- static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->updateConsentStatus(
57
- rt,
58
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
59
- );
60
- return jsi::Value::undefined();
61
- }
62
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackImpression(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
63
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackImpression(
64
- rt,
65
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
66
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
67
- count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
68
- count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
69
- count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
70
- count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
71
- count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
72
- );
73
- }
74
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
75
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackView(
76
- rt,
77
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
78
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
79
- count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
80
- count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
81
- count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
82
- count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
83
- count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber(),
84
- count <= 7 ? throw jsi::JSError(rt, "Expected argument in position 7 to be passed") : args[7].asNumber(),
85
- count <= 8 ? throw jsi::JSError(rt, "Expected argument in position 8 to be passed") : args[8].asNumber(),
86
- count <= 9 ? throw jsi::JSError(rt, "Expected argument in position 9 to be passed") : args[9].asNumber()
87
- );
88
- }
89
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackTotalView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
90
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackTotalView(
91
- rt,
92
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
93
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
94
- count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
95
- count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
96
- count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
97
- count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
98
- count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
99
- );
100
- }
101
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackClick(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
102
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackClick(
103
- rt,
104
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
105
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
106
- count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
107
- count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
108
- count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
109
- count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool()
110
- );
111
- }
112
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoPlayback(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
113
- return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackVideoPlayback(
114
- rt,
115
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
116
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
117
- count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
118
- count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
119
- count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
120
- count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
121
- count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
122
- );
123
- }
124
- static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackDeeplinkUtm(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
125
- static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackDeeplinkUtm(
126
- rt,
127
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
128
- );
129
- return jsi::Value::undefined();
130
- }
131
-
132
- NativeAdgeistCxxSpecJSI::NativeAdgeistCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
133
- : TurboModule("Adgeist", jsInvoker) {
134
- methodMap_["initializeSdk"] = MethodMetadata {4, __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk};
135
- methodMap_["destroySdk"] = MethodMetadata {0, __hostFunction_NativeAdgeistCxxSpecJSI_destroySdk};
136
- methodMap_["fetchCreative"] = MethodMetadata {3, __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative};
137
- methodMap_["setUserDetails"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails};
138
- methodMap_["logEvent"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_logEvent};
139
- methodMap_["getConsentStatus"] = MethodMetadata {0, __hostFunction_NativeAdgeistCxxSpecJSI_getConsentStatus};
140
- methodMap_["updateConsentStatus"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_updateConsentStatus};
141
- methodMap_["trackImpression"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackImpression};
142
- methodMap_["trackView"] = MethodMetadata {10, __hostFunction_NativeAdgeistCxxSpecJSI_trackView};
143
- methodMap_["trackTotalView"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackTotalView};
144
- methodMap_["trackClick"] = MethodMetadata {6, __hostFunction_NativeAdgeistCxxSpecJSI_trackClick};
145
- methodMap_["trackVideoPlayback"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoPlayback};
146
- methodMap_["trackDeeplinkUtm"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_trackDeeplinkUtm};
147
- }
148
-
149
-
150
- } // namespace facebook::react
@@ -1,179 +0,0 @@
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: GenerateModuleH.js
8
- */
9
-
10
- #pragma once
11
-
12
- #include <ReactCommon/TurboModule.h>
13
- #include <react/bridging/Bridging.h>
14
-
15
- namespace facebook::react {
16
-
17
-
18
- class JSI_EXPORT NativeAdgeistCxxSpecJSI : public TurboModule {
19
- protected:
20
- NativeAdgeistCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
-
22
- public:
23
- virtual jsi::Value initializeSdk(jsi::Runtime &rt, std::optional<jsi::String> customBidRequestBackendDomain, std::optional<jsi::String> customPackageOrBundleID, std::optional<jsi::String> customAdgeistAppID, std::optional<jsi::String> customVersioning) = 0;
24
- virtual jsi::Value destroySdk(jsi::Runtime &rt) = 0;
25
- virtual jsi::Value fetchCreative(jsi::Runtime &rt, jsi::String adSpaceId, jsi::String buyType, bool isTestEnvironment) = 0;
26
- virtual void setUserDetails(jsi::Runtime &rt, jsi::Object user) = 0;
27
- virtual void logEvent(jsi::Runtime &rt, jsi::Object event) = 0;
28
- virtual jsi::Value getConsentStatus(jsi::Runtime &rt) = 0;
29
- virtual void updateConsentStatus(jsi::Runtime &rt, bool consent) = 0;
30
- virtual jsi::Value trackImpression(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double renderTime) = 0;
31
- virtual jsi::Value trackView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double viewTime, double visibilityRatio, double scrollDepth, double timeToVisible) = 0;
32
- virtual jsi::Value trackTotalView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalViewTime) = 0;
33
- virtual jsi::Value trackClick(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment) = 0;
34
- virtual jsi::Value trackVideoPlayback(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalPlaybackTime) = 0;
35
- virtual void trackDeeplinkUtm(jsi::Runtime &rt, jsi::String url) = 0;
36
-
37
- };
38
-
39
- template <typename T>
40
- class JSI_EXPORT NativeAdgeistCxxSpec : public TurboModule {
41
- public:
42
- jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
43
- return delegate_.create(rt, propName);
44
- }
45
-
46
- std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
47
- return delegate_.getPropertyNames(runtime);
48
- }
49
-
50
- static constexpr std::string_view kModuleName = "Adgeist";
51
-
52
- protected:
53
- NativeAdgeistCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
54
- : TurboModule(std::string{NativeAdgeistCxxSpec::kModuleName}, jsInvoker),
55
- delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
56
-
57
-
58
- private:
59
- class Delegate : public NativeAdgeistCxxSpecJSI {
60
- public:
61
- Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
62
- NativeAdgeistCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
63
-
64
- }
65
-
66
- jsi::Value initializeSdk(jsi::Runtime &rt, std::optional<jsi::String> customBidRequestBackendDomain, std::optional<jsi::String> customPackageOrBundleID, std::optional<jsi::String> customAdgeistAppID, std::optional<jsi::String> customVersioning) override {
67
- static_assert(
68
- bridging::getParameterCount(&T::initializeSdk) == 5,
69
- "Expected initializeSdk(...) to have 5 parameters");
70
-
71
- return bridging::callFromJs<jsi::Value>(
72
- rt, &T::initializeSdk, jsInvoker_, instance_, std::move(customBidRequestBackendDomain), std::move(customPackageOrBundleID), std::move(customAdgeistAppID), std::move(customVersioning));
73
- }
74
- jsi::Value destroySdk(jsi::Runtime &rt) override {
75
- static_assert(
76
- bridging::getParameterCount(&T::destroySdk) == 1,
77
- "Expected destroySdk(...) to have 1 parameters");
78
-
79
- return bridging::callFromJs<jsi::Value>(
80
- rt, &T::destroySdk, jsInvoker_, instance_);
81
- }
82
- jsi::Value fetchCreative(jsi::Runtime &rt, jsi::String adSpaceId, jsi::String buyType, bool isTestEnvironment) override {
83
- static_assert(
84
- bridging::getParameterCount(&T::fetchCreative) == 4,
85
- "Expected fetchCreative(...) to have 4 parameters");
86
-
87
- return bridging::callFromJs<jsi::Value>(
88
- rt, &T::fetchCreative, jsInvoker_, instance_, std::move(adSpaceId), std::move(buyType), std::move(isTestEnvironment));
89
- }
90
- void setUserDetails(jsi::Runtime &rt, jsi::Object user) override {
91
- static_assert(
92
- bridging::getParameterCount(&T::setUserDetails) == 2,
93
- "Expected setUserDetails(...) to have 2 parameters");
94
-
95
- return bridging::callFromJs<void>(
96
- rt, &T::setUserDetails, jsInvoker_, instance_, std::move(user));
97
- }
98
- void logEvent(jsi::Runtime &rt, jsi::Object event) override {
99
- static_assert(
100
- bridging::getParameterCount(&T::logEvent) == 2,
101
- "Expected logEvent(...) to have 2 parameters");
102
-
103
- return bridging::callFromJs<void>(
104
- rt, &T::logEvent, jsInvoker_, instance_, std::move(event));
105
- }
106
- jsi::Value getConsentStatus(jsi::Runtime &rt) override {
107
- static_assert(
108
- bridging::getParameterCount(&T::getConsentStatus) == 1,
109
- "Expected getConsentStatus(...) to have 1 parameters");
110
-
111
- return bridging::callFromJs<jsi::Value>(
112
- rt, &T::getConsentStatus, jsInvoker_, instance_);
113
- }
114
- void updateConsentStatus(jsi::Runtime &rt, bool consent) override {
115
- static_assert(
116
- bridging::getParameterCount(&T::updateConsentStatus) == 2,
117
- "Expected updateConsentStatus(...) to have 2 parameters");
118
-
119
- return bridging::callFromJs<void>(
120
- rt, &T::updateConsentStatus, jsInvoker_, instance_, std::move(consent));
121
- }
122
- jsi::Value trackImpression(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double renderTime) override {
123
- static_assert(
124
- bridging::getParameterCount(&T::trackImpression) == 8,
125
- "Expected trackImpression(...) to have 8 parameters");
126
-
127
- return bridging::callFromJs<jsi::Value>(
128
- rt, &T::trackImpression, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(renderTime));
129
- }
130
- jsi::Value trackView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double viewTime, double visibilityRatio, double scrollDepth, double timeToVisible) override {
131
- static_assert(
132
- bridging::getParameterCount(&T::trackView) == 11,
133
- "Expected trackView(...) to have 11 parameters");
134
-
135
- return bridging::callFromJs<jsi::Value>(
136
- rt, &T::trackView, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(viewTime), std::move(visibilityRatio), std::move(scrollDepth), std::move(timeToVisible));
137
- }
138
- jsi::Value trackTotalView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalViewTime) override {
139
- static_assert(
140
- bridging::getParameterCount(&T::trackTotalView) == 8,
141
- "Expected trackTotalView(...) to have 8 parameters");
142
-
143
- return bridging::callFromJs<jsi::Value>(
144
- rt, &T::trackTotalView, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(totalViewTime));
145
- }
146
- jsi::Value trackClick(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment) override {
147
- static_assert(
148
- bridging::getParameterCount(&T::trackClick) == 7,
149
- "Expected trackClick(...) to have 7 parameters");
150
-
151
- return bridging::callFromJs<jsi::Value>(
152
- rt, &T::trackClick, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment));
153
- }
154
- jsi::Value trackVideoPlayback(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalPlaybackTime) override {
155
- static_assert(
156
- bridging::getParameterCount(&T::trackVideoPlayback) == 8,
157
- "Expected trackVideoPlayback(...) to have 8 parameters");
158
-
159
- return bridging::callFromJs<jsi::Value>(
160
- rt, &T::trackVideoPlayback, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(totalPlaybackTime));
161
- }
162
- void trackDeeplinkUtm(jsi::Runtime &rt, jsi::String url) override {
163
- static_assert(
164
- bridging::getParameterCount(&T::trackDeeplinkUtm) == 2,
165
- "Expected trackDeeplinkUtm(...) to have 2 parameters");
166
-
167
- return bridging::callFromJs<void>(
168
- rt, &T::trackDeeplinkUtm, jsInvoker_, instance_, std::move(url));
169
- }
170
-
171
- private:
172
- friend class NativeAdgeistCxxSpec;
173
- T *instance_;
174
- };
175
-
176
- Delegate delegate_;
177
- };
178
-
179
- } // namespace facebook::react
@@ -1,17 +0,0 @@
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 <react/renderer/components/RNAdgeistSpec/ShadowNodes.h>
12
-
13
- namespace facebook::react {
14
-
15
- extern const char HTML5AdNativeComponentComponentName[] = "HTML5AdNativeComponent";
16
-
17
- } // namespace facebook::react
@@ -1,32 +0,0 @@
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 <react/renderer/components/RNAdgeistSpec/EventEmitters.h>
14
- #include <react/renderer/components/RNAdgeistSpec/Props.h>
15
- #include <react/renderer/components/RNAdgeistSpec/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
@@ -1,16 +0,0 @@
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 <react/renderer/components/RNAdgeistSpec/States.h>
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
- } // namespace facebook::react
@@ -1,29 +0,0 @@
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