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
@@ -2,85 +2,83 @@ import type { ErrorCode } from '../ErrorCode';
2
2
  import type { AdViewId } from './AdViewProps';
3
3
 
4
4
  /**
5
- * Represents an ad that has been served by AppLovin MAX.
5
+ * Represents a successfully loaded ad served by AppLovin MAX.
6
6
  */
7
7
  export type AdInfo = {
8
8
  /**
9
- * The ad unit ID for which this ad was loaded.
9
+ * The ad unit ID that was used to load this ad.
10
10
  */
11
11
  adUnitId: string;
12
12
 
13
13
  /**
14
- * The format of this ad.
14
+ * The format of the ad.
15
15
  */
16
16
  adFormat: string;
17
17
 
18
18
  /**
19
- * The unique ID of the native UI component AdView.
19
+ * The unique identifier of the associated native AdView component, if any.
20
20
  */
21
21
  adViewId?: AdViewId;
22
22
 
23
23
  /**
24
- * The creative ID tied to the ad, if any. You can report creative issues to the corresponding
25
- * ad network using this ID.
24
+ * The creative ID associated with the ad.
25
+ * This can be used to report issues with the creative.
26
26
  *
27
- * @see {@link https://support.applovin.com/hc/en-us/articles/13986039797389-Creative-Debugger#h_01HC10588YYDNZMS1GPCVRD2E7}
27
+ * @see https://support.applovin.com/hc/en-us/articles/13986039797389
28
28
  */
29
29
  creativeId?: string | null;
30
30
 
31
31
  /**
32
- * The ad network from which this ad was loaded.
33
- *
34
- * @see {@link https://support.applovin.com/hc/en-us/articles/13986039797389-Creative-Debugger#h_01HC10588YWTJHYE1E35HWQTX7}
32
+ * The name of the ad network that served the ad.
35
33
  */
36
34
  networkName: string;
37
35
 
38
36
  /**
39
- * The ad network placement for which this ad was loaded.
37
+ * The name of the placement as configured on the ad network side.
40
38
  */
41
39
  networkPlacement: string;
42
40
 
43
41
  /**
44
- * The placement name that you assign when you integrate each ad format, for granular reporting
45
- * in postbacks.
42
+ * The custom placement name defined in your integration.
43
+ * Used for postback reporting.
46
44
  */
47
45
  placement?: string | null;
48
46
 
49
47
  /**
50
- * The ad’s revenue amount. In the case where no revenue amount exists, or it is not available
51
- * yet, returns 0.
48
+ * The revenue generated from the ad impression, in USD.
49
+ * Defaults to 0 if not available.
52
50
  */
53
51
  revenue: number;
54
52
 
55
53
  /**
56
- * The precision of the revenue value for this ad.
54
+ * The precision level of the revenue value reported for this ad.
57
55
  *
58
- * Possible values are:
59
- * - "publisher_defined" - If the revenue is the price assigned to the line item by the publisher.
60
- * - "exact" - If the revenue is the resulting price of a real-time auction.
61
- * - "estimated" - If the revenue is the price obtained by auto-CPM.
62
- * - "undefined" - If we do not have permission from the ad network to share impression-level data.
63
- * - "" - An empty string, if revenue and precision are not valid (for example, in test mode).
56
+ * Possible values:
57
+ * - `"exact"` Revenue from a real-time auction.
58
+ * - `"estimated"` Revenue estimated via auto-CPM.
59
+ * - `"publisher_defined"` Revenue set manually by the publisher.
60
+ * - `"undefined"` The ad network does not permit impression-level revenue data.
61
+ * - `""` Empty when revenue and precision are unavailable (e.g., in test mode).
64
62
  */
65
63
  revenuePrecision: string;
66
64
 
67
65
  /**
68
- * The DSP network that provides the loaded ad when the ad is served through AppLovin Exchange.
66
+ * The name of the DSP (Demand-Side Platform), if served through AppLovin Exchange.
69
67
  */
70
68
  dspName?: string | null;
71
69
 
72
70
  /**
73
- * The latency of the mediation ad load request in milliseconds.
71
+ * Total mediation load time in milliseconds.
74
72
  */
75
73
  latencyMillis: number;
76
74
 
77
75
  /**
78
- * The underlying waterfall of ad responses.
76
+ * The full ad waterfall associated with this ad request.
79
77
  */
80
78
  waterfall?: AdWaterfallInfo;
81
79
 
82
80
  /**
83
- * The native ad info.
81
+ * The native ad, if available.
84
82
  */
85
83
  nativeAd?: AdNativeInfo | null;
86
84
 
@@ -94,264 +92,259 @@ export type AdInfo = {
94
92
  };
95
93
 
96
94
  /**
97
- * Encapsulates various data for MAX load errors.
95
+ * Represents a failure when attempting to load an ad.
98
96
  */
99
97
  export type AdLoadFailedInfo = {
100
98
  /**
101
- * The ad unit ID for which this ad was loaded.
99
+ * The ad unit ID for which the load failed.
102
100
  */
103
101
  adUnitId: string;
104
102
 
105
103
  /**
106
- * The unique ID of the native UI component AdView.
104
+ * The native AdView component ID, if available.
107
105
  */
108
106
  adViewId?: AdViewId;
109
107
 
110
108
  /**
111
- * The error code for the error.
109
+ * AppLovin MAX-defined error code.
112
110
  */
113
111
  code: ErrorCode;
114
112
 
115
113
  /**
116
- * The error message for the error.
114
+ * Descriptive message for the error.
117
115
  */
118
116
  message?: string | null;
119
117
 
120
118
  /**
121
- * The mediated network's error code for the error.
119
+ * Error code from the mediated network.
122
120
  */
123
121
  mediatedNetworkErrorCode: number;
124
122
 
125
123
  /**
126
- * The mediated network's error message for the error.
124
+ * Error message from the mediated network.
127
125
  */
128
126
  mediatedNetworkErrorMessage: string;
129
127
 
130
128
  /**
131
- * The message for the error.
129
+ * Additional debug information for ad load failure (legacy).
132
130
  */
133
131
  adLoadFailureInfo?: string | null;
134
132
 
135
133
  /**
136
- * The underlying waterfall of ad responses.
134
+ * Waterfall data associated with the failed request.
137
135
  */
138
136
  waterfall?: AdWaterfallInfo | null;
139
137
  };
140
138
 
141
139
  /**
142
- * Encapsulates various data for MAX display errors.
140
+ * Represents an error that occurred when displaying an ad.
143
141
  */
144
142
  export type AdDisplayFailedInfo = AdInfo & {
145
143
  /**
146
- * The error code for the error.
144
+ * AppLovin MAX-defined error code.
147
145
  */
148
146
  code: ErrorCode;
149
147
 
150
148
  /**
151
- * The error message for the error.
149
+ * Descriptive message for the error.
152
150
  */
153
151
  message?: string | null;
154
152
 
155
153
  /**
156
- * The mediated network's error code for the error.
154
+ * Error code from the mediated network.
157
155
  */
158
156
  mediatedNetworkErrorCode: number;
159
157
 
160
158
  /**
161
- * The mediated network's error message for the error.
159
+ * Error message from the mediated network.
162
160
  */
163
161
  mediatedNetworkErrorMessage: string;
164
162
  };
165
163
 
166
164
  /**
167
- * Represents a reward given to the user.
165
+ * Represents a successful reward event from a rewarded ad.
168
166
  */
169
167
  export type AdRewardInfo = AdInfo & {
170
168
  /**
171
- * The reward label.
169
+ * The label of the reward.
172
170
  */
173
171
  rewardLabel?: string | null;
174
172
 
175
173
  /**
176
- * The rewarded amount.
174
+ * The reward amount, as a string.
177
175
  */
178
176
  rewardAmount: string;
179
177
  };
180
178
 
181
179
  /**
182
- * Represents a native ad.
180
+ * Describes metadata for a native ad, including asset availability.
183
181
  */
184
182
  export type AdNativeInfo = {
185
183
  /**
186
- * The native ad title text for {@link TitleView}.
184
+ * Title text of the native ad for use in {@link TitleView}.
187
185
  */
188
186
  title?: string;
189
187
 
190
188
  /**
191
- * The native ad advertiser text for {@link AdvertiserView}.
189
+ * Advertiser name for {@link AdvertiserView}.
192
190
  */
193
191
  advertiser?: string;
194
192
 
195
193
  /**
196
- * The native ad body text for {@link BodyView}}.
194
+ * Body text for {@link BodyView}.
197
195
  */
198
196
  body?: string;
199
197
 
200
198
  /**
201
- * The native ad CTA (call to action) text for {@link CallToActionView}.
199
+ * Call-to-action label for {@link CallToActionView}.
202
200
  */
203
201
  callToAction?: string;
204
202
 
205
203
  /**
206
- * The star rating of the native ad in the [0.0, 5.0] range for {@link StarRatingView}, if provided by the network.
204
+ * Star rating (0.0 to 5.0) for {@link StarRatingView}.
207
205
  */
208
206
  starRating?: number;
209
207
 
210
208
  /**
211
- * The aspect ratio (width-to-height) for {@link MediaView} if provided by the network.
209
+ * Aspect ratio (width / height) for {@link MediaView}, if available.
212
210
  */
213
211
  mediaContentAspectRatio?: number;
214
212
 
215
213
  /**
216
- * Whether or not the content for {@link IconView} is available.
214
+ * Whether an icon image is available for {@link IconView}.
217
215
  */
218
216
  isIconImageAvailable: boolean;
219
217
 
220
218
  /**
221
- * Whether or not the content for {@link OptionsView} is available.
219
+ * Whether the options menu view is available for {@link OptionsView}.
222
220
  */
223
221
  isOptionsViewAvailable: boolean;
224
222
 
225
223
  /**
226
- * Whether or not the content for {@link MediaView} is available.
224
+ * Whether a media view is available for {@link MediaView}.
227
225
  */
228
226
  isMediaViewAvailable: boolean;
229
227
  };
230
228
 
231
229
  /**
232
- * Represents an ad waterfall, encapsulating various metadata such as total latency, underlying ad
233
- * responses, etc.
230
+ * Contains metadata about the ad waterfall evaluated during an ad request.
234
231
  */
235
232
  export type AdWaterfallInfo = {
236
233
  /**
237
- * The ad waterfall name.
234
+ * The waterfall name for this request.
238
235
  */
239
236
  name: string;
240
237
 
241
238
  /**
242
- * The ad waterfall test name.
239
+ * The test name, if the waterfall is part of an A/B test.
243
240
  */
244
241
  testName: string;
245
242
 
246
243
  /**
247
- * The list of {@link AdNetworkResponseInfo} info objects relating to each ad in the waterfall,
248
- * ordered by their position.
244
+ * Ordered list of network responses attempted during mediation.
249
245
  */
250
246
  networkResponses: AdNetworkResponseInfo[];
251
247
 
252
248
  /**
253
- * The total latency in milliseconds for this waterfall to finish processing.
249
+ * Total time taken to complete the waterfall, in milliseconds.
254
250
  */
255
251
  latencyMillis: number;
256
252
  };
257
253
 
258
254
  /**
259
- * This enum contains possible states of an ad in the waterfall.
260
- * Each adapter response {@link AdNetworkResponseInfo} corresponds to one of these states.
255
+ * Enumeration of possible ad load states for each network in the waterfall.
261
256
  */
262
257
  export enum AdLoadState {
263
258
  /**
264
- * The AppLovin MAX SDK did not attempt to load an ad from this network in the waterfall because
265
- * an ad higher in the waterfall loaded successfully.
259
+ * SDK did not attempt to load an ad from this network.
266
260
  */
267
261
  LoadStateAdLoadNotAttempted = 0,
268
262
 
269
263
  /**
270
- * An ad successfully loaded from this network.
264
+ * An ad was successfully loaded from this network.
271
265
  */
272
266
  LoadStateAdLoaded = 1,
273
267
 
274
268
  /**
275
- * An ad failed to load from this network.
269
+ * The network failed to load an ad.
276
270
  */
277
271
  LoadStateAdFailedToLoad = 2,
278
272
  }
279
273
 
280
274
  /**
281
- * Encapsulates load and display errors.
275
+ * General error info object used in waterfall response details.
282
276
  */
283
277
  export type AdErrorInfo = {
284
278
  /**
285
- * The error code for the error.
279
+ * AppLovin MAX-defined error code.
286
280
  */
287
281
  code: ErrorCode;
288
282
 
289
283
  /**
290
- * The error message for the error.
284
+ * Descriptive error message.
291
285
  */
292
286
  message?: string;
293
287
 
294
288
  /**
295
- * @deprecated
289
+ * @deprecated Use `message` instead.
296
290
  */
297
291
  adLoadFailureInfo?: string;
298
292
  };
299
293
 
300
294
  /**
301
- * This class represents an ad response in a waterfall.
295
+ * Contains information about a single mediated network response.
302
296
  */
303
297
  export type AdNetworkResponseInfo = {
304
298
  /**
305
- * The state of the ad that this object represents. For more info, see the {@link AdLoadState} enum.
299
+ * The result of the load attempt.
306
300
  */
307
301
  adLoadState: AdLoadState;
308
302
 
309
303
  /**
310
- * The mediated network that this adapter response info object represents.
304
+ * Metadata about the mediated network.
311
305
  */
312
306
  mediatedNetwork?: AdMediatedNetworkInfo;
313
307
 
314
308
  /**
315
- * The credentials used to load an ad from this adapter, as entered in the AppLovin MAX dashboard.
309
+ * A key-value map of adapter-specific credentials, as configured in the MAX dashboard.
316
310
  */
317
311
  credentials: { [key: string]: string | number | boolean | object | null };
318
312
 
319
313
  /**
320
- * The ad load error this network response resulted in. Will be unavailable if an attempt to
321
- * load an ad has not been made or an ad was loaded successfully (i.e. {@link adLoadState}
322
- * is NOT LoadStateAdFailedToLoad).
314
+ * The ad load error resulting from this network response. This will be unavailable if no ad load
315
+ * attempt was made or if the ad loaded successfully (i.e., [adLoadState] is NOT [LoadStateAdFailedToLoad]).
323
316
  */
324
317
  error?: AdErrorInfo;
325
318
 
326
319
  /**
327
- * The amount of time the network took to load (either successfully or not) an ad, in milliseconds.
328
- * If an attempt to load an ad has not been made (i.e. {@link adLoadState} is LoadStateAdLoadNotAttempted),
329
- * the value will be -1.
320
+ * The amount of time, in milliseconds, the network took to load an ad—regardless of success.
321
+ * If no ad load attempt was made (i.e., [adLoadState] is [LoadStateAdLoadNotAttempted]),
322
+ * this value will be -1.
330
323
  */
331
324
  latencyMillis: number;
332
325
  };
333
326
 
334
327
  /**
335
- * This class represents information for a mediated network.
328
+ * Metadata about a mediated ad network.
336
329
  */
337
330
  export type AdMediatedNetworkInfo = {
338
331
  /**
339
- * The name of the mediated network.
332
+ * Name of the mediated network.
340
333
  */
341
334
  name: string;
342
335
 
343
336
  /**
344
- * The class name of the adapter for the mediated network.
337
+ * Fully-qualified adapter class name.
345
338
  */
346
339
  adapterClassName: string;
347
340
 
348
341
  /**
349
- * The version of the adapter for the mediated network.
342
+ * Version of the adapter.
350
343
  */
351
344
  adapterVersion: string;
352
345
 
353
346
  /**
354
- * The version of the mediated network’s SDK.
347
+ * Version of the mediated network’s SDK.
355
348
  */
356
349
  sdkVersion: string;
357
350
  };
@@ -1,64 +1,63 @@
1
1
  import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo } from './AdInfo';
2
2
 
3
3
  /**
4
- * Local extra parameters can be of type: string, number, boolean, array, map, and null.
4
+ * Represents the allowed value types for local extra parameters passed to the ad adapter.
5
+ * Can be a primitive, object, or null.
5
6
  */
6
7
  export type LocalExtraParameterValue = string | number | boolean | object | null;
7
8
 
8
9
  /**
9
- * Defines the base properties for the UI component ads i.e {@link AdView} and {@link NativeAdView}.
10
+ * Defines the base props shared by ad UI components like {@link AdView} and {@link NativeAdView}.
10
11
  */
11
12
  export type AdProps = {
12
13
  /**
13
- * A string value representing the ad unit ID to load ads for.
14
+ * The ad unit ID used to load ads.
14
15
  */
15
16
  adUnitId: string;
16
17
 
17
18
  /**
18
- * A string value representing the placement name that you assign when you integrate each ad
19
- * format, for granular reporting in ad events.
19
+ * The placement name defined in your integration, used for granular reporting.
20
20
  */
21
21
  placement?: string | null;
22
22
 
23
23
  /**
24
- * The custom data to tie the showing ad to.
24
+ * Optional custom data to attach to the ad, used for analytics or targeting.
25
25
  */
26
26
  customData?: string | null;
27
27
 
28
28
  /**
29
- * A dictionary value representing the extra parameters to set a list of key-value string pairs
30
- * for the ad.
29
+ * Extra parameters to be sent as key-value string pairs.
31
30
  */
32
31
  extraParameters?: { [key: string]: string };
33
32
 
34
33
  /**
35
- * A dictionary value representing the local extra parameters to set a list of key-value pairs
36
- * to pass to the adapter instances.
34
+ * Local extra parameters sent to the adapter instance.
35
+ * Supports string and boolean values only.
37
36
  */
38
37
  localExtraParameters?: { [key: string]: string | boolean };
39
38
 
40
39
  /**
41
- * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it loads a new ad.
40
+ * Called when a new ad is successfully loaded.
42
41
  */
43
42
  onAdLoaded?: (adInfo: AdInfo) => void;
44
43
 
45
44
  /**
46
- * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it could not load a new ad.
45
+ * Called when the SDK fails to load a new ad.
47
46
  */
48
47
  onAdLoadFailed?: (error: AdLoadFailedInfo) => void;
49
48
 
50
49
  /**
51
- * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it fails to display the ad.
50
+ * Called when the ad fails to display after being loaded.
52
51
  */
53
52
  onAdDisplayFailed?: (error: AdDisplayFailedInfo) => void;
54
53
 
55
54
  /**
56
- * A callback fuction that {@link AdView} or {@link NativeAdView} fires when the user clicks the ad.
55
+ * Called when the ad is clicked by the user.
57
56
  */
58
57
  onAdClicked?: (adInfo: AdInfo) => void;
59
58
 
60
59
  /**
61
- * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
60
+ * Called when ad revenue is paid to the publisher.
62
61
  */
63
62
  onAdRevenuePaid?: (adInfo: AdInfo) => void;
64
63
  };
@@ -3,95 +3,99 @@ import type { AdInfo } from './AdInfo';
3
3
  import type { AdFormat } from '../AdView';
4
4
 
5
5
  /**
6
- * A handler of {@link AdView}.
6
+ * A reference to the {@link AdView} instance, allowing imperative control.
7
7
  */
8
8
  export type AdViewHandler = {
9
9
  /**
10
- * If the {@link loadOnMount} attribute is set to false, you can call this API to start loading ads in this AdView.
10
+ * Triggers a manual ad load starting.
11
+ * This is only needed if {@link loadOnMount} is set to `false`.
11
12
  */
12
13
  loadAd(): void;
13
14
  };
14
15
 
15
16
  /**
16
- * A unique identifier for referencing a specific AdView instance.
17
+ * A unique identifier for referencing a specific {@link AdView} instance.
17
18
  *
18
- * - If the value is a number, it represents the ID of a preloaded or assigned AdView.
19
- * - A value of `undefined` indicates that the AdView has not been preloaded or assigned an ID yet.
19
+ * - A number represents the ID of a preloaded or managed AdView.
20
+ * - `undefined` means the AdView is not preloaded or assigned an ID.
20
21
  */
21
22
  export type AdViewId = number | undefined;
22
23
 
23
24
  /**
24
- * Represents an {@link AdView} - Banner / MREC.
25
+ * Props used to configure and render an {@link AdView} (i.e. Banner or MREC).
25
26
  */
26
27
  export type AdViewProps = AdProps & {
27
28
  /**
28
- * An enum value representing the ad format to load ads for. Must be either
29
- * {@link AdFormat.BANNER} or {@link AdFormat.MREC}.
29
+ * The ad format to load for this view.
30
+ * Must be {@link AdFormat.BANNER} or {@link AdFormat.MREC}.
30
31
  */
31
32
  adFormat: AdFormat;
32
33
 
33
34
  /**
34
- * A unique identifier representing the AdView instance.
35
- * Used to manage and track the specific AdView.
35
+ * A unique identifier for the AdView instance.
36
+ * Used for tracking and preloading specific ad views.
36
37
  */
37
38
  adViewId?: AdViewId;
38
39
 
39
40
  /**
40
- * A boolean indicating whether adaptive banners are enabled.
41
+ * Enables adaptive banner sizing if `true`.
42
+ * Ignored for MREC ads.
41
43
  */
42
44
  adaptiveBannerEnabled?: boolean;
43
45
 
44
46
  /**
45
- * A boolean indicating whether auto-refresh is enabled.
46
- * Auto-refresh is enabled by default.
47
+ * Enables or disables automatic ad refresh.
48
+ * Defaults to `true`.
47
49
  */
48
50
  autoRefresh?: boolean;
49
51
 
50
52
  /**
51
- * A boolean indicating whether an ad should load automatically
52
- * when the {@link AdView} is mounted. Defaults to `true`.
53
+ * If `true`, the ad will be loaded automatically when the component mounts.
54
+ * Set to `false` for ads to be loaded manually using the ref after the component mounts.
55
+ *
56
+ * @default true
53
57
  */
54
58
  loadOnMount?: boolean;
55
59
 
56
60
  /**
57
- * A callback function triggered when the {@link AdView} expands the ad.
58
- *
59
- * @param adInfo - Information about the ad that was expanded.
61
+ * Called when the ad is expanded.
60
62
  */
61
63
  onAdExpanded?: (adInfo: AdInfo) => void;
62
64
 
63
65
  /**
64
- * A callback function triggered when the {@link AdView} collapses the ad.
65
- *
66
- * @param adInfo - Information about the ad that was collapsed.
66
+ * Called when the ad collapses back to its original state.
67
67
  */
68
68
  onAdCollapsed?: (adInfo: AdInfo) => void;
69
69
  };
70
70
 
71
71
  /**
72
- * A list of options to create a native UI component for preloading {@link AdView}.
72
+ * Options used when preloading a native UI {@link AdView} component.
73
73
  */
74
74
  export type NativeUIComponentAdViewOptions = {
75
75
  /**
76
- * A string value representing the placement name that you assign when you integrate each ad
77
- * format, for granular reporting in ad events.
76
+ * Whether adaptive banner sizing is enabled. Defaults to `true`.
77
+ */
78
+ isAdaptive?: boolean;
79
+
80
+ /**
81
+ * The placement name used for analytics and reporting.
78
82
  */
79
83
  placement?: string | null;
80
84
 
81
85
  /**
82
- * The custom data to tie the showing ad to.
86
+ * Custom data to associate with the ad for postbacks or targeting.
83
87
  */
84
88
  customData?: string | null;
85
89
 
86
90
  /**
87
- * A dictionary value representing the extra parameters to set a list of key-value string pairs
88
- * for the ad.
91
+ * A dictionary of key-value pairs used to pass extra parameters
92
+ * to the SDK (string-only values).
89
93
  */
90
94
  extraParameters?: { [key: string]: string | null };
91
95
 
92
96
  /**
93
- * A dictionary value representing the local extra parameters to set a list of key-value pairs
94
- * to pass to the adapter instances.
97
+ * A dictionary of key-value pairs used to pass local extra parameters
98
+ * to the mediation adapter (string, boolean, number, etc.).
95
99
  */
96
100
  localExtraParameters?: { [key: string]: LocalExtraParameterValue };
97
101
  };