react-native-applovin-max 8.1.0 → 8.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 (75) hide show
  1. package/android/build.gradle +4 -4
  2. package/android/gradle.properties +1 -3
  3. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +1 -1
  4. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewManager.java +1 -1
  5. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +3 -3
  6. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModule.java +10 -14
  7. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdView.java +2 -2
  8. package/ios/AppLovinMAX.h +0 -5
  9. package/ios/AppLovinMAX.m +9 -14
  10. package/ios/AppLovinMAXAdView.m +3 -1
  11. package/ios/AppLovinMAXNativeAdView.m +2 -2
  12. package/lib/commonjs/AdView.js +6 -0
  13. package/lib/commonjs/AdView.js.map +1 -1
  14. package/lib/commonjs/AppLovinMAX.js +51 -6
  15. package/lib/commonjs/AppLovinMAX.js.map +1 -1
  16. package/lib/commonjs/AppOpenAd.js.map +1 -1
  17. package/lib/commonjs/BannerAd.js.map +1 -1
  18. package/lib/commonjs/ErrorCode.js +54 -4
  19. package/lib/commonjs/ErrorCode.js.map +1 -1
  20. package/lib/commonjs/InterstitialAd.js.map +1 -1
  21. package/lib/commonjs/MRecAd.js.map +1 -1
  22. package/lib/commonjs/RewardedAd.js.map +1 -1
  23. package/lib/commonjs/nativeAd/NativeAdView.js +6 -4
  24. package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -1
  25. package/lib/commonjs/types/AdInfo.js +10 -3
  26. package/lib/commonjs/types/AdInfo.js.map +1 -1
  27. package/lib/module/AdView.js +6 -0
  28. package/lib/module/AdView.js.map +1 -1
  29. package/lib/module/AppLovinMAX.js +51 -6
  30. package/lib/module/AppLovinMAX.js.map +1 -1
  31. package/lib/module/AppOpenAd.js.map +1 -1
  32. package/lib/module/BannerAd.js.map +1 -1
  33. package/lib/module/ErrorCode.js +54 -4
  34. package/lib/module/ErrorCode.js.map +1 -1
  35. package/lib/module/InterstitialAd.js.map +1 -1
  36. package/lib/module/MRecAd.js.map +1 -1
  37. package/lib/module/RewardedAd.js.map +1 -1
  38. package/lib/module/nativeAd/NativeAdView.js +6 -4
  39. package/lib/module/nativeAd/NativeAdView.js.map +1 -1
  40. package/lib/module/types/AdInfo.js +10 -4
  41. package/lib/module/types/AdInfo.js.map +1 -1
  42. package/lib/typescript/src/AdView.d.ts +5 -5
  43. package/lib/typescript/src/AdView.d.ts.map +1 -1
  44. package/lib/typescript/src/AppLovinMAX.d.ts.map +1 -1
  45. package/lib/typescript/src/ErrorCode.d.ts +0 -10
  46. package/lib/typescript/src/ErrorCode.d.ts.map +1 -1
  47. package/lib/typescript/src/EventEmitter.d.ts.map +1 -1
  48. package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts +1 -1
  49. package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts.map +1 -1
  50. package/lib/typescript/src/types/AdEvent.d.ts +2 -2
  51. package/lib/typescript/src/types/AdEvent.d.ts.map +1 -1
  52. package/lib/typescript/src/types/AdInfo.d.ts +23 -24
  53. package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
  54. package/lib/typescript/src/types/AdProps.d.ts +2 -2
  55. package/lib/typescript/src/types/AdProps.d.ts.map +1 -1
  56. package/lib/typescript/src/types/FullscreenAd.d.ts +4 -4
  57. package/lib/typescript/src/types/FullscreenAd.d.ts.map +1 -1
  58. package/lib/typescript/src/types/ViewAd.d.ts +4 -4
  59. package/lib/typescript/src/types/ViewAd.d.ts.map +1 -1
  60. package/package.json +5 -4
  61. package/react-native-applovin-max.podspec +5 -4
  62. package/src/AdView.tsx +3 -3
  63. package/src/AppLovinMAX.ts +11 -6
  64. package/src/AppOpenAd.ts +2 -2
  65. package/src/BannerAd.ts +2 -2
  66. package/src/ErrorCode.ts +0 -14
  67. package/src/InterstitialAd.ts +2 -2
  68. package/src/MRecAd.ts +2 -2
  69. package/src/RewardedAd.ts +2 -2
  70. package/src/nativeAd/NativeAdView.tsx +9 -10
  71. package/src/types/AdEvent.ts +2 -2
  72. package/src/types/AdInfo.ts +27 -27
  73. package/src/types/AdProps.ts +2 -2
  74. package/src/types/FullscreenAd.ts +4 -4
  75. package/src/types/ViewAd.ts +4 -4
@@ -10,6 +10,11 @@ export type AdInfo = {
10
10
  */
11
11
  adUnitId: string;
12
12
 
13
+ /**
14
+ * The format of this ad.
15
+ */
16
+ adFormat: string;
17
+
13
18
  /**
14
19
  * The unique ID of the native UI component AdView.
15
20
  */
@@ -30,6 +35,11 @@ export type AdInfo = {
30
35
  */
31
36
  networkName: string;
32
37
 
38
+ /**
39
+ * The ad network placement for which this ad was loaded.
40
+ */
41
+ networkPlacement: string;
42
+
33
43
  /**
34
44
  * The placement name that you assign when you integrate each ad format, for granular reporting
35
45
  * in postbacks.
@@ -42,11 +52,28 @@ export type AdInfo = {
42
52
  */
43
53
  revenue: number;
44
54
 
55
+ /**
56
+ * The precision of the revenue value for this ad.
57
+ *
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).
64
+ */
65
+ revenuePrecision: string;
66
+
45
67
  /**
46
68
  * The DSP network that provides the loaded ad when the ad is served through AppLovin Exchange.
47
69
  */
48
70
  dspName?: string | null;
49
71
 
72
+ /**
73
+ * The latency of the mediation ad load request in milliseconds.
74
+ */
75
+ latencyMillis: number;
76
+
50
77
  /**
51
78
  * The underlying waterfall of ad responses.
52
79
  */
@@ -151,33 +178,6 @@ export type AdRewardInfo = AdInfo & {
151
178
  rewardAmount: string;
152
179
  };
153
180
 
154
- /**
155
- * Represents revenue given to the publisher.
156
- */
157
- export type AdRevenueInfo = AdInfo & {
158
- /**
159
- * The ad network placement for which this ad was loaded.
160
- */
161
- networkPlacement: string;
162
-
163
- /**
164
- * The precision of the revenue value for this ad.
165
- *
166
- * Possible values are:
167
- * - "publisher_defined" - If the revenue is the price assigned to the line item by the publisher.
168
- * - "exact" - If the revenue is the resulting price of a real-time auction.
169
- * - "estimated" - If the revenue is the price obtained by auto-CPM.
170
- * - "undefined" - If we do not have permission from the ad network to share impression-level data.
171
- * - "" - An empty string, if revenue and precision are not valid (for example, in test mode).
172
- */
173
- revenuePrecision: string;
174
-
175
- /**
176
- * The current country code where the ad was shown.
177
- */
178
- countryCode: string;
179
- };
180
-
181
181
  /**
182
182
  * Represents a native ad.
183
183
  */
@@ -1,4 +1,4 @@
1
- import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo, AdRevenueInfo } from './AdInfo';
1
+ import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo } from './AdInfo';
2
2
 
3
3
  /**
4
4
  * Local extra parameters can be of type: string, number, boolean, array, map, and null.
@@ -60,5 +60,5 @@ export type AdProps = {
60
60
  /**
61
61
  * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
62
62
  */
63
- onAdRevenuePaid?: (adInfo: AdRevenueInfo) => void;
63
+ onAdRevenuePaid?: (adInfo: AdInfo) => void;
64
64
  };
@@ -1,5 +1,5 @@
1
1
  import type { AdEventListener } from './AdEvent';
2
- import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo, AdDisplayFailedInfo } from './AdInfo';
2
+ import type { AdInfo, AdLoadFailedInfo, AdDisplayFailedInfo } from './AdInfo';
3
3
  import type { LocalExtraParameterValue } from './AdProps';
4
4
 
5
5
  /**
@@ -126,15 +126,15 @@ export type FullscreenAdType = {
126
126
  removeAdHiddenEventListener(): void;
127
127
 
128
128
  /**
129
- * Adds the specified event listener to receive {@link AdRevenueInfo} when a full-screen ad
129
+ * Adds the specified event listener to receive {@link AdInfo} when a full-screen ad
130
130
  * pays ad revenue to the publisher.
131
131
  *
132
132
  * @param listener Listener to be notified.
133
133
  */
134
- addAdRevenuePaidListener(listener: AdEventListener<AdRevenueInfo>): void;
134
+ addAdRevenuePaidListener(listener: AdEventListener<AdInfo>): void;
135
135
 
136
136
  /**
137
- * Removes the event listener to receive {@link AdRevenueInfo} when a full-screen ad pays
137
+ * Removes the event listener to receive {@link AdInfo} when a full-screen ad pays
138
138
  * ad revenue to the publisher.
139
139
  */
140
140
  removeAdRevenuePaidListener(): void;
@@ -1,5 +1,5 @@
1
1
  import type { AdEventListener } from './AdEvent';
2
- import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo } from './AdInfo';
2
+ import type { AdInfo, AdLoadFailedInfo } from './AdInfo';
3
3
  import type { LocalExtraParameterValue } from './AdProps';
4
4
  import type { AdViewPosition } from '../AdView';
5
5
 
@@ -147,15 +147,15 @@ export type ViewAdType = {
147
147
  removeAdExpandedEventListener(): void;
148
148
 
149
149
  /**
150
- * Adds the specified event listener to receive {@link AdRevenueInfo} when a view-base ad pays
150
+ * Adds the specified event listener to receive {@link AdInfo} when a view-base ad pays
151
151
  * ad revenue to the publisher.
152
152
  *
153
153
  * @param listener Listener to be notified.
154
154
  */
155
- addAdRevenuePaidListener(listener: AdEventListener<AdRevenueInfo>): void;
155
+ addAdRevenuePaidListener(listener: AdEventListener<AdInfo>): void;
156
156
 
157
157
  /**
158
- * Removes the event listener to receive {@link AdRevenueInfo} when when a view-base ad pays ad
158
+ * Removes the event listener to receive {@link AdInfo} when when a view-base ad pays ad
159
159
  * revenue to the publisher.
160
160
  */
161
161
  removeAdRevenuePaidListener(): void;