react-native-applovin-max 9.0.0 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/android/build.gradle +3 -3
  2. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +4 -10
  3. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +17 -8
  4. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModuleImpl.java +36 -14
  5. package/android/src/newarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
  6. package/android/src/oldarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
  7. package/ios/AppLovinMAX.mm +36 -13
  8. package/ios/AppLovinMAXAdView.h +1 -0
  9. package/ios/AppLovinMAXAdView.mm +3 -9
  10. package/ios/AppLovinMAXAdViewUIComponent.h +1 -2
  11. package/ios/AppLovinMAXAdViewUIComponent.mm +18 -10
  12. package/lib/commonjs/AdView.js +63 -79
  13. package/lib/commonjs/AdView.js.map +1 -1
  14. package/lib/commonjs/AppLovinMAX.js +43 -29
  15. package/lib/commonjs/AppLovinMAX.js.map +1 -1
  16. package/lib/commonjs/BannerAd.js +2 -3
  17. package/lib/commonjs/BannerAd.js.map +1 -1
  18. package/lib/commonjs/ErrorCode.js +24 -31
  19. package/lib/commonjs/ErrorCode.js.map +1 -1
  20. package/lib/commonjs/EventEmitter.js +22 -1
  21. package/lib/commonjs/EventEmitter.js.map +1 -1
  22. package/lib/commonjs/Utils.js +22 -4
  23. package/lib/commonjs/Utils.js.map +1 -1
  24. package/lib/commonjs/index.js +1 -2
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/nativeAd/NativeAdView.js +34 -24
  27. package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -1
  28. package/lib/commonjs/nativeAd/NativeAdViewComponents.js +85 -43
  29. package/lib/commonjs/nativeAd/NativeAdViewComponents.js.map +1 -1
  30. package/lib/commonjs/nativeAd/NativeAdViewProvider.js +30 -2
  31. package/lib/commonjs/nativeAd/NativeAdViewProvider.js.map +1 -1
  32. package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js +27 -0
  33. package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -1
  34. package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js +23 -0
  35. package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -1
  36. package/lib/commonjs/specs/NativeAppLovinMAXModule.js +7 -0
  37. package/lib/commonjs/specs/NativeAppLovinMAXModule.js.map +1 -1
  38. package/lib/commonjs/types/AdInfo.js +13 -16
  39. package/lib/commonjs/types/AdInfo.js.map +1 -1
  40. package/lib/module/AdView.js +62 -77
  41. package/lib/module/AdView.js.map +1 -1
  42. package/lib/module/AppLovinMAX.js +44 -29
  43. package/lib/module/AppLovinMAX.js.map +1 -1
  44. package/lib/module/BannerAd.js +2 -3
  45. package/lib/module/BannerAd.js.map +1 -1
  46. package/lib/module/ErrorCode.js +24 -31
  47. package/lib/module/ErrorCode.js.map +1 -1
  48. package/lib/module/EventEmitter.js +22 -1
  49. package/lib/module/EventEmitter.js.map +1 -1
  50. package/lib/module/Utils.js +22 -4
  51. package/lib/module/Utils.js.map +1 -1
  52. package/lib/module/nativeAd/NativeAdView.js +34 -21
  53. package/lib/module/nativeAd/NativeAdView.js.map +1 -1
  54. package/lib/module/nativeAd/NativeAdViewComponents.js +87 -40
  55. package/lib/module/nativeAd/NativeAdViewComponents.js.map +1 -1
  56. package/lib/module/nativeAd/NativeAdViewProvider.js +30 -0
  57. package/lib/module/nativeAd/NativeAdViewProvider.js.map +1 -1
  58. package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js +28 -0
  59. package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -1
  60. package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js +24 -0
  61. package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -1
  62. package/lib/module/specs/NativeAppLovinMAXModule.js +9 -0
  63. package/lib/module/specs/NativeAppLovinMAXModule.js.map +1 -1
  64. package/lib/module/types/AdInfo.js +13 -16
  65. package/lib/module/types/AdInfo.js.map +1 -1
  66. package/lib/typescript/src/AdView.d.ts +27 -21
  67. package/lib/typescript/src/AdView.d.ts.map +1 -1
  68. package/lib/typescript/src/AppLovinMAX.d.ts +22 -21
  69. package/lib/typescript/src/AppLovinMAX.d.ts.map +1 -1
  70. package/lib/typescript/src/BannerAd.d.ts.map +1 -1
  71. package/lib/typescript/src/ErrorCode.d.ts +24 -31
  72. package/lib/typescript/src/ErrorCode.d.ts.map +1 -1
  73. package/lib/typescript/src/EventEmitter.d.ts +16 -0
  74. package/lib/typescript/src/EventEmitter.d.ts.map +1 -1
  75. package/lib/typescript/src/Utils.d.ts +15 -0
  76. package/lib/typescript/src/Utils.d.ts.map +1 -1
  77. package/lib/typescript/src/nativeAd/NativeAdView.d.ts +15 -7
  78. package/lib/typescript/src/nativeAd/NativeAdView.d.ts.map +1 -1
  79. package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts +65 -1
  80. package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts.map +1 -1
  81. package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts +17 -0
  82. package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts.map +1 -1
  83. package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts +45 -1
  84. package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts.map +1 -1
  85. package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts +57 -6
  86. package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts.map +1 -1
  87. package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts +13 -3
  88. package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts.map +1 -1
  89. package/lib/typescript/src/types/AdEvent.d.ts +10 -4
  90. package/lib/typescript/src/types/AdEvent.d.ts.map +1 -1
  91. package/lib/typescript/src/types/AdInfo.d.ts +78 -85
  92. package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
  93. package/lib/typescript/src/types/AdProps.d.ts +14 -15
  94. package/lib/typescript/src/types/AdProps.d.ts.map +1 -1
  95. package/lib/typescript/src/types/AdViewProps.d.ts +32 -29
  96. package/lib/typescript/src/types/AdViewProps.d.ts.map +1 -1
  97. package/lib/typescript/src/types/AppLovinMAX.d.ts +50 -53
  98. package/lib/typescript/src/types/AppLovinMAX.d.ts.map +1 -1
  99. package/lib/typescript/src/types/BannerAd.d.ts +24 -18
  100. package/lib/typescript/src/types/BannerAd.d.ts.map +1 -1
  101. package/lib/typescript/src/types/CMPError.d.ts +7 -4
  102. package/lib/typescript/src/types/CMPError.d.ts.map +1 -1
  103. package/lib/typescript/src/types/Configuration.d.ts +12 -14
  104. package/lib/typescript/src/types/Configuration.d.ts.map +1 -1
  105. package/lib/typescript/src/types/FullscreenAd.d.ts +39 -46
  106. package/lib/typescript/src/types/FullscreenAd.d.ts.map +1 -1
  107. package/lib/typescript/src/types/MRecAd.d.ts +7 -3
  108. package/lib/typescript/src/types/MRecAd.d.ts.map +1 -1
  109. package/lib/typescript/src/types/NativeAd.d.ts +12 -11
  110. package/lib/typescript/src/types/NativeAd.d.ts.map +1 -1
  111. package/lib/typescript/src/types/NativeAdViewProps.d.ts +4 -3
  112. package/lib/typescript/src/types/NativeAdViewProps.d.ts.map +1 -1
  113. package/lib/typescript/src/types/Privacy.d.ts +13 -6
  114. package/lib/typescript/src/types/Privacy.d.ts.map +1 -1
  115. package/lib/typescript/src/types/RewardedAd.d.ts +7 -5
  116. package/lib/typescript/src/types/RewardedAd.d.ts.map +1 -1
  117. package/lib/typescript/src/types/ViewAd.d.ts +46 -50
  118. package/lib/typescript/src/types/ViewAd.d.ts.map +1 -1
  119. package/package.json +1 -1
  120. package/react-native-applovin-max.podspec +2 -2
  121. package/src/AdView.tsx +64 -82
  122. package/src/AppLovinMAX.ts +39 -29
  123. package/src/BannerAd.ts +2 -3
  124. package/src/ErrorCode.ts +24 -31
  125. package/src/EventEmitter.ts +20 -2
  126. package/src/Utils.ts +20 -1
  127. package/src/nativeAd/NativeAdView.tsx +31 -21
  128. package/src/nativeAd/NativeAdViewComponents.tsx +97 -38
  129. package/src/nativeAd/NativeAdViewProvider.tsx +23 -0
  130. package/src/specs/AppLovinMAXAdViewNativeComponent.ts +62 -1
  131. package/src/specs/AppLovinMAXNativeAdViewNativeComponent.ts +70 -6
  132. package/src/specs/NativeAppLovinMAXModule.ts +77 -56
  133. package/src/types/AdEvent.ts +10 -4
  134. package/src/types/AdInfo.ts +78 -85
  135. package/src/types/AdProps.ts +14 -15
  136. package/src/types/AdViewProps.ts +33 -29
  137. package/src/types/AppLovinMAX.ts +50 -53
  138. package/src/types/BannerAd.ts +24 -18
  139. package/src/types/CMPError.ts +7 -4
  140. package/src/types/Configuration.ts +12 -14
  141. package/src/types/FullscreenAd.ts +39 -46
  142. package/src/types/MRecAd.ts +7 -3
  143. package/src/types/NativeAd.ts +12 -11
  144. package/src/types/NativeAdViewProps.ts +4 -3
  145. package/src/types/Privacy.ts +13 -6
  146. package/src/types/RewardedAd.ts +7 -5
  147. package/src/types/ViewAd.ts +46 -50
@@ -5,8 +5,16 @@ import type { Configuration } from '../types';
5
5
  import type { CMPError } from '../types';
6
6
  import type { AdViewId } from '../types';
7
7
 
8
+ /**
9
+ * Native TurboModule interface for AppLovin MAX.
10
+ * Defines all methods and constants exposed to JavaScript.
11
+ */
8
12
  export interface Spec extends TurboModule {
13
+ /**
14
+ * Returns all supported event constants and SDK error codes.
15
+ */
9
16
  readonly getConstants: () => {
17
+ // Interstitial ad events
10
18
  ON_INTERSTITIAL_LOADED_EVENT: string;
11
19
  ON_INTERSTITIAL_LOAD_FAILED_EVENT: string;
12
20
  ON_INTERSTITIAL_CLICKED_EVENT: string;
@@ -14,6 +22,8 @@ export interface Spec extends TurboModule {
14
22
  ON_INTERSTITIAL_AD_FAILED_TO_DISPLAY_EVENT: string;
15
23
  ON_INTERSTITIAL_HIDDEN_EVENT: string;
16
24
  ON_INTERSTITIAL_AD_REVENUE_PAID: string;
25
+
26
+ // Rewarded ad events
17
27
  ON_REWARDED_AD_LOADED_EVENT: string;
18
28
  ON_REWARDED_AD_LOAD_FAILED_EVENT: string;
19
29
  ON_REWARDED_AD_CLICKED_EVENT: string;
@@ -22,18 +32,24 @@ export interface Spec extends TurboModule {
22
32
  ON_REWARDED_AD_HIDDEN_EVENT: string;
23
33
  ON_REWARDED_AD_RECEIVED_REWARD_EVENT: string;
24
34
  ON_REWARDED_AD_REVENUE_PAID: string;
35
+
36
+ // Banner ad events
25
37
  ON_BANNER_AD_LOADED_EVENT: string;
26
38
  ON_BANNER_AD_LOAD_FAILED_EVENT: string;
27
39
  ON_BANNER_AD_CLICKED_EVENT: string;
28
40
  ON_BANNER_AD_COLLAPSED_EVENT: string;
29
41
  ON_BANNER_AD_EXPANDED_EVENT: string;
30
42
  ON_BANNER_AD_REVENUE_PAID: string;
43
+
44
+ // MREC ad events
31
45
  ON_MREC_AD_LOADED_EVENT: string;
32
46
  ON_MREC_AD_LOAD_FAILED_EVENT: string;
33
47
  ON_MREC_AD_CLICKED_EVENT: string;
34
48
  ON_MREC_AD_COLLAPSED_EVENT: string;
35
49
  ON_MREC_AD_EXPANDED_EVENT: string;
36
50
  ON_MREC_AD_REVENUE_PAID: string;
51
+
52
+ // App Open ad events
37
53
  ON_APPOPEN_AD_LOADED_EVENT: string;
38
54
  ON_APPOPEN_AD_LOAD_FAILED_EVENT: string;
39
55
  ON_APPOPEN_AD_CLICKED_EVENT: string;
@@ -41,8 +57,12 @@ export interface Spec extends TurboModule {
41
57
  ON_APPOPEN_AD_FAILED_TO_DISPLAY_EVENT: string;
42
58
  ON_APPOPEN_AD_HIDDEN_EVENT: string;
43
59
  ON_APPOPEN_AD_REVENUE_PAID: string;
60
+
61
+ // Native UI component ad events
44
62
  ON_NATIVE_UI_COMPONENT_ADVIEW_AD_LOADED_EVENT: string;
45
63
  ON_NATIVE_UI_COMPONENT_ADVIEW_AD_LOAD_FAILED_EVENT: string;
64
+
65
+ // Error codes
46
66
  MAX_ERROR_CODE_UNSPECIFIED: number;
47
67
  MAX_ERROR_CODE_NO_FILL: number;
48
68
  MAX_ERROR_CODE_AD_LOAD_FAILED: number;
@@ -57,141 +77,136 @@ export interface Spec extends TurboModule {
57
77
  MAX_ERROR_CODE_INVALID_AD_UNIT_ID: number;
58
78
  };
59
79
 
60
- isInitialized(): Promise<boolean>;
80
+ // ─────────────────────────────────────────────────────────
81
+ // SDK Initialization & Configuration
82
+ // ─────────────────────────────────────────────────────────
61
83
 
84
+ isInitialized(): Promise<boolean>;
62
85
  initialize(pluginVersion: string, sdkKey: string): Promise<Configuration>;
63
-
64
86
  isTablet(): Promise<boolean>;
65
-
66
87
  showMediationDebugger(): void;
67
88
 
68
- setHasUserConsent(hasUserConsent: boolean): void;
89
+ // ─────────────────────────────────────────────────────────
90
+ // Privacy & Consent APIs
91
+ // ─────────────────────────────────────────────────────────
69
92
 
93
+ setHasUserConsent(hasUserConsent: boolean): void;
70
94
  hasUserConsent(): Promise<boolean>;
71
95
 
72
96
  setDoNotSell(doNotSell: boolean): void;
73
-
74
97
  isDoNotSell(): Promise<boolean>;
75
98
 
76
- setUserId(userId: string): void;
99
+ // ─────────────────────────────────────────────────────────
100
+ // User & Debug Settings
101
+ // ─────────────────────────────────────────────────────────
77
102
 
103
+ setUserId(userId: string): void;
78
104
  setMuted(muted: boolean): void;
79
-
80
105
  isMuted(): Promise<boolean>;
81
-
82
106
  setVerboseLogging(enabled: boolean): void;
83
-
84
107
  setCreativeDebuggerEnabled(enabled: boolean): void;
85
-
86
108
  setTestDeviceAdvertisingIds(ids: string[]): void;
87
109
 
88
- setExtraParameter(key: string, value: string | null): void;
110
+ // ─────────────────────────────────────────────────────────
111
+ // Extra Parameters
112
+ // ─────────────────────────────────────────────────────────
89
113
 
114
+ setExtraParameter(key: string, value: string | null): void;
90
115
  setInitializationAdUnitIds(adUnitIds: string[]): void;
91
116
 
92
- setTermsAndPrivacyPolicyFlowEnabled(enabled: boolean): void;
117
+ // ─────────────────────────────────────────────────────────
118
+ // CMP (Consent Flow)
119
+ // ─────────────────────────────────────────────────────────
93
120
 
121
+ setTermsAndPrivacyPolicyFlowEnabled(enabled: boolean): void;
94
122
  setPrivacyPolicyUrl(url: string): void;
95
-
96
123
  setTermsOfServiceUrl(url: string): void;
97
-
98
124
  setConsentFlowDebugUserGeography(userGeography: string): void;
99
-
100
125
  showCmpForExistingUser(): Promise<CMPError | null>;
101
-
102
126
  hasSupportedCmp(): Promise<boolean>;
103
127
 
104
- addSegment(key: number, values: number[]): Promise<void>;
128
+ // ─────────────────────────────────────────────────────────
129
+ // Segments
130
+ // ─────────────────────────────────────────────────────────
105
131
 
132
+ addSegment(key: number, values: number[]): Promise<void>;
106
133
  getSegments(): Promise<{ [key: string]: number[] } | null>;
107
134
 
108
- createBanner(adUnitId: string, position: string): void;
109
-
110
- createBannerWithOffsets(adUnitId: string, position: string, xOffset: number, yOffset: number): void;
135
+ // ─────────────────────────────────────────────────────────
136
+ // Banner Ads
137
+ // ─────────────────────────────────────────────────────────
111
138
 
139
+ createBanner(adUnitId: string, position: string, isAdaptive: boolean): void;
140
+ createBannerWithOffsets(adUnitId: string, position: string, xOffset: number, yOffset: number, isAdaptive: boolean): void;
112
141
  setBannerBackgroundColor(adUnitId: string, hexColorCode: string): void;
113
-
114
142
  setBannerPlacement(adUnitId: string, placement: string | null): void;
115
-
116
143
  setBannerCustomData(adUnitId: string, customData: string | null): void;
117
-
118
144
  setBannerWidth(adUnitId: string, width: number): void;
119
-
120
145
  updateBannerPosition(adUnitId: string, position: string): void;
121
-
122
146
  updateBannerOffsets(adUnitId: string, xOffset: number, yOffset: number): void;
123
-
124
147
  setBannerExtraParameter(adUnitId: string, key: string, value: string | null): void;
125
-
126
148
  setBannerLocalExtraParameter(adUnitId: string, parameters: UnsafeObject): void;
127
-
128
149
  startBannerAutoRefresh(adUnitId: string): void;
129
-
130
150
  stopBannerAutoRefresh(adUnitId: string): void;
131
-
132
151
  showBanner(adUnitId: string): void;
133
-
134
152
  hideBanner(adUnitId: string): void;
135
-
136
153
  destroyBanner(adUnitId: string): void;
137
-
138
154
  getAdaptiveBannerHeightForWidth(width: number): Promise<number>;
139
155
 
140
- createMRec(adUnitId: string, position: string): void;
156
+ // ─────────────────────────────────────────────────────────
157
+ // MREC Ads
158
+ // ─────────────────────────────────────────────────────────
141
159
 
160
+ createMRec(adUnitId: string, position: string): void;
142
161
  setMRecPlacement(adUnitId: string, placement: string | null): void;
143
-
144
162
  setMRecCustomData(adUnitId: string, customData: string | null): void;
145
-
146
163
  updateMRecPosition(adUnitId: string, position: string): void;
147
-
148
164
  setMRecExtraParameter(adUnitId: string, key: string, value: string | null): void;
149
-
150
165
  setMRecLocalExtraParameter(adUnitId: string, parameters: UnsafeObject): void;
151
-
152
166
  startMRecAutoRefresh(adUnitId: string): void;
153
-
154
167
  stopMRecAutoRefresh(adUnitId: string): void;
155
-
156
168
  showMRec(adUnitId: string): void;
157
-
158
169
  hideMRec(adUnitId: string): void;
159
-
160
170
  destroyMRec(adUnitId: string): void;
161
171
 
162
- loadInterstitial(adUnitId: string): void;
172
+ // ─────────────────────────────────────────────────────────
173
+ // Interstitial Ads
174
+ // ─────────────────────────────────────────────────────────
163
175
 
176
+ loadInterstitial(adUnitId: string): void;
164
177
  isInterstitialReady(adUnitId: string): Promise<boolean>;
165
-
166
178
  showInterstitial(adUnitId: string, placement?: string | null, customData?: string | null): void;
167
-
168
179
  setInterstitialExtraParameter(adUnitId: string, key: string, value: string | null): void;
169
-
170
180
  setInterstitialLocalExtraParameter(adUnitId: string, parameters: UnsafeObject): void;
171
181
 
172
- loadRewardedAd(adUnitId: string): void;
182
+ // ─────────────────────────────────────────────────────────
183
+ // Rewarded Ads
184
+ // ─────────────────────────────────────────────────────────
173
185
 
186
+ loadRewardedAd(adUnitId: string): void;
174
187
  isRewardedAdReady(adUnitId: string): Promise<boolean>;
175
-
176
188
  showRewardedAd(adUnitId: string, placement?: string | null, customData?: string | null): void;
177
-
178
189
  setRewardedAdExtraParameter(adUnitId: string, key: string, value: string | null): void;
179
-
180
190
  setRewardedAdLocalExtraParameter(adUnitId: string, parameters: UnsafeObject): void;
181
191
 
182
- loadAppOpenAd(adUnitId: string): void;
192
+ // ─────────────────────────────────────────────────────────
193
+ // App Open Ads
194
+ // ─────────────────────────────────────────────────────────
183
195
 
196
+ loadAppOpenAd(adUnitId: string): void;
184
197
  isAppOpenAdReady(adUnitId: string): Promise<boolean>;
185
-
186
198
  showAppOpenAd(adUnitId: string, placement?: string | null, customData?: string | null): void;
187
-
188
199
  setAppOpenAdExtraParameter(adUnitId: string, key: string, value: string | null): void;
189
-
190
200
  setAppOpenAdLocalExtraParameter(adUnitId: string, parameters: UnsafeObject): void;
191
201
 
202
+ // ─────────────────────────────────────────────────────────
203
+ // Native UI Component AdView (Preload/Destroy)
204
+ // ─────────────────────────────────────────────────────────
205
+
192
206
  preloadNativeUIComponentAdView(
193
207
  adUnitId: string,
194
208
  adFormat: string,
209
+ isAdaptive: boolean,
195
210
  placement?: string | null,
196
211
  customData?: string | null,
197
212
  extraParameters?: UnsafeObject | null,
@@ -200,9 +215,15 @@ export interface Spec extends TurboModule {
200
215
 
201
216
  destroyNativeUIComponentAdView(adViewId: number): Promise<void>;
202
217
 
203
- addListener(eventType: string): void;
218
+ // ─────────────────────────────────────────────────────────
219
+ // TurboModule Listener Management
220
+ // ─────────────────────────────────────────────────────────
204
221
 
222
+ addListener(eventType: string): void;
205
223
  removeListeners(count: number): void;
206
224
  }
207
225
 
226
+ /**
227
+ * Enforces use of the native AppLovinMAX TurboModule.
228
+ */
208
229
  export default TurboModuleRegistry.getEnforcing<Spec>('AppLovinMAX');
@@ -1,15 +1,21 @@
1
1
  import type { AdInfo, AdLoadFailedInfo, AdDisplayFailedInfo, AdRewardInfo } from './AdInfo';
2
2
 
3
+ /**
4
+ * Represents any ad event object that can be emitted by the native AppLovin MAX module.
5
+ */
3
6
  export type AdEventObject = AdInfo | AdLoadFailedInfo | AdDisplayFailedInfo | AdRewardInfo;
4
7
 
5
8
  /**
6
- * Defines a generic event listener for the pragrammatic methods to receive an event from the native
7
- * module.
9
+ * A generic event listener for handling ad events in programmatic APIs.
10
+ *
11
+ * @template T - A specific ad event type.
8
12
  */
9
13
  export type AdEventListener<T extends AdEventObject> = (event: T) => void;
10
14
 
11
15
  /**
12
- * Defines a generic event object for the UI components i.e. AdView and NativeAdView to receive an
13
- * event from the native module.
16
+ * Wraps an ad event in a `nativeEvent` field, following the React Native synthetic event pattern.
17
+ * Used for UI component props such as {@link AdView} and {@link NativeAdView}.
18
+ *
19
+ * @template T - A specific ad event type.
14
20
  */
15
21
  export type AdNativeEvent<T extends AdEventObject> = { nativeEvent: T };