react-native-applovin-max 6.0.0 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +3 -3
- package/ios/Podfile +1 -1
- package/ios/Podfile.lock +5 -5
- package/package.json +5 -1
- package/react-native-applovin-max.podspec +2 -2
- package/src/AdView.tsx +62 -50
- package/src/AppLovinMAX.ts +8 -10
- package/src/AppOpenAd.ts +28 -31
- package/src/BannerAd.ts +36 -35
- package/src/EventEmitter.ts +9 -9
- package/src/InterstitialAd.ts +31 -32
- package/src/MRecAd.ts +32 -31
- package/src/Privacy.ts +2 -2
- package/src/RewardedAd.ts +31 -34
- package/src/TargetingData.ts +95 -38
- package/src/index.ts +12 -12
- package/src/nativeAd/NativeAdView.tsx +68 -59
- package/src/nativeAd/NativeAdViewComponents.tsx +36 -28
- package/src/nativeAd/NativeAdViewProvider.tsx +15 -13
- package/src/types/AdEvent.ts +2 -13
- package/src/types/AdInfo.ts +27 -39
- package/src/types/AdProps.ts +13 -9
- package/src/types/AdViewProps.ts +6 -7
- package/src/types/AppLovinMAX.ts +19 -19
- package/src/types/AppOpenAd.ts +1 -1
- package/src/types/BannerAd.ts +12 -13
- package/src/types/Configuration.ts +2 -4
- package/src/types/FullscreenAd.ts +45 -39
- package/src/types/InterstitialAd.ts +1 -1
- package/src/types/MRecAd.ts +3 -4
- package/src/types/NativeAd.ts +1 -2
- package/src/types/NativeAdViewProps.ts +1 -2
- package/src/types/Privacy.ts +18 -23
- package/src/types/RewardedAd.ts +8 -7
- package/src/types/TargetingData.ts +50 -0
- package/src/types/ViewAd.ts +50 -46
- package/src/types/index.ts +4 -4
package/src/types/ViewAd.ts
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import type { AdEventListener } from
|
|
2
|
-
import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo } from
|
|
3
|
-
import type {
|
|
1
|
+
import type { AdEventListener } from './AdEvent';
|
|
2
|
+
import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo } from './AdInfo';
|
|
3
|
+
import type { LocalExtraParameterValue } from './AdProps';
|
|
4
|
+
import type { AdViewPosition } from '../AdView';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
* Define a view
|
|
7
|
+
* Define a view-based ad (i.e. Banner / MREC)
|
|
7
8
|
*/
|
|
8
9
|
export type ViewAdType = {
|
|
9
|
-
|
|
10
10
|
/**
|
|
11
|
-
* Destroys the banner/
|
|
12
|
-
*
|
|
13
|
-
* @param adUnitId The
|
|
11
|
+
* Destroys the banner/MREC.
|
|
12
|
+
*
|
|
13
|
+
* @param adUnitId The ad unit ID of the ad to destroy.
|
|
14
14
|
*/
|
|
15
15
|
destroyAd(adUnitId: string): void;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Shows the banner/
|
|
19
|
-
*
|
|
20
|
-
* @param adUnitId The
|
|
18
|
+
* Shows the banner/MREC.
|
|
19
|
+
*
|
|
20
|
+
* @param adUnitId The ad unit ID of the ad to show.
|
|
21
21
|
*/
|
|
22
22
|
showAd(adUnitId: string): void;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Hides the banner/
|
|
26
|
-
*
|
|
27
|
-
* @param adUnitId The
|
|
25
|
+
* Hides the banner/MREC.
|
|
26
|
+
*
|
|
27
|
+
* @param adUnitId The ad unit ID of the ad to hide.
|
|
28
28
|
*/
|
|
29
29
|
hideAd(adUnitId: string): void;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Sets a placement to tie the showing ad’s events to.
|
|
33
33
|
*
|
|
34
|
-
* @param adUnitId The
|
|
34
|
+
* @param adUnitId The ad unit ID of the ad to set a placement for.
|
|
35
35
|
* @param placement The placement to tie the showing ad's events to.
|
|
36
36
|
*/
|
|
37
37
|
setPlacement(adUnitId: string, placement: string | null): void;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Sets custom data to tie the showing ad’s events to.
|
|
41
|
-
*
|
|
42
|
-
* @param adUnitId The
|
|
41
|
+
*
|
|
42
|
+
* @param adUnitId The ad unit ID of the ad to set custom data for.
|
|
43
43
|
* @param customData The custom data to tie the showing ad's events to. Maximum size is 8KB.
|
|
44
44
|
*/
|
|
45
45
|
setCustomData(adUnitId: string, customData: string | null): void;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Updates the banner/mrec position.
|
|
49
|
-
*
|
|
50
|
-
* @param adUnitId The
|
|
49
|
+
*
|
|
50
|
+
* @param adUnitId The ad unit ID of the ad to update the position of.
|
|
51
51
|
* @param bannerPosition {@link AdViewPosition} position.
|
|
52
52
|
*/
|
|
53
53
|
updatePosition(adUnitId: string, bannerPosition: AdViewPosition): void;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Sets an extra key/value parameter for the ad.
|
|
57
|
-
*
|
|
58
|
-
* @param adUnitId The
|
|
57
|
+
*
|
|
58
|
+
* @param adUnitId The ad unit ID of the ad to set a parameter for.
|
|
59
59
|
* @param key Key parameter.
|
|
60
60
|
* @param value Value parameter.
|
|
61
61
|
*/
|
|
@@ -63,96 +63,100 @@ export type ViewAdType = {
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Set a local extra parameter to pass to the adapter instances.
|
|
66
|
-
*
|
|
67
|
-
* @param adUnitId The
|
|
66
|
+
*
|
|
67
|
+
* @param adUnitId The ad unit ID of the ad to set a local parameter for.
|
|
68
68
|
* @param key Key parameter.
|
|
69
69
|
* @param value Value parameter.
|
|
70
70
|
*/
|
|
71
|
-
setLocalExtraParameter(adUnitId: string, key: string, value:
|
|
71
|
+
setLocalExtraParameter(adUnitId: string, key: string, value: LocalExtraParameterValue): void;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Starts or resumes auto-refreshing of the banner/mrec.
|
|
75
|
-
*
|
|
76
|
-
* @param adUnitId The
|
|
75
|
+
*
|
|
76
|
+
* @param adUnitId The ad unit ID of the ad to start or resume auto-refreshing.
|
|
77
77
|
*/
|
|
78
78
|
startAutoRefresh(adUnitId: string): void;
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Pauses auto-refreshing of the banner/mrec.
|
|
82
|
-
*
|
|
83
|
-
* @param adUnitId The
|
|
82
|
+
*
|
|
83
|
+
* @param adUnitId The ad unit ID of the ad to stop auto-refreshing.
|
|
84
84
|
*/
|
|
85
85
|
stopAutoRefresh(adUnitId: string): void;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* Adds the specified event listener to receive {@link AdInfo} when a
|
|
89
|
-
*
|
|
88
|
+
* Adds the specified event listener to receive {@link AdInfo} when a view-base ad loads a new ad.
|
|
89
|
+
*
|
|
90
90
|
* @param listener Listener to be notified.
|
|
91
91
|
*/
|
|
92
92
|
addAdLoadedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* Removes the event listener to receive {@link AdInfo} when a
|
|
95
|
+
* Removes the event listener to receive {@link AdInfo} when a view-base ad loads a new ad.
|
|
96
96
|
*/
|
|
97
97
|
removeAdLoadedEventListener(): void;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* Adds the specified event listener to receive {@link AdLoadFailedInfo} when
|
|
101
|
-
*
|
|
100
|
+
* Adds the specified event listener to receive {@link AdLoadFailedInfo} when a view-base ad
|
|
101
|
+
* could not load a new ad.
|
|
102
|
+
*
|
|
102
103
|
* @param listener Listener to be notified.
|
|
103
104
|
*/
|
|
104
105
|
addAdLoadFailedEventListener(listener: AdEventListener<AdLoadFailedInfo>): void;
|
|
105
106
|
|
|
106
107
|
/**
|
|
107
|
-
* Removes the event listener to receive {@link AdLoadFailedInfo} when
|
|
108
|
+
* Removes the event listener to receive {@link AdLoadFailedInfo} when a view-base ad could not
|
|
109
|
+
* load a new ad.
|
|
108
110
|
*/
|
|
109
111
|
removeAdLoadFailedEventListener(): void;
|
|
110
112
|
|
|
111
113
|
/**
|
|
112
|
-
* Adds the specified event listener to receive {@link AdInfo} when the
|
|
113
|
-
*
|
|
114
|
+
* Adds the specified event listener to receive {@link AdInfo} when the user clicks the ad.
|
|
115
|
+
*
|
|
114
116
|
* @param listener Listener to be notified.
|
|
115
117
|
*/
|
|
116
118
|
addAdClickedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
117
119
|
|
|
118
120
|
/**
|
|
119
|
-
* Removes the event listener to receive {@link AdInfo} when the
|
|
121
|
+
* Removes the event listener to receive {@link AdInfo} when the user clicks the ad.
|
|
120
122
|
*/
|
|
121
123
|
removeAdClickedEventListener(): void;
|
|
122
124
|
|
|
123
125
|
/**
|
|
124
|
-
* Adds the specified event listener to receive {@link AdInfo} when
|
|
125
|
-
*
|
|
126
|
+
* Adds the specified event listener to receive {@link AdInfo} when a view-base ad collapses the ad.
|
|
127
|
+
*
|
|
126
128
|
* @param listener Listener to be notified.
|
|
127
129
|
*/
|
|
128
130
|
addAdCollapsedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
129
131
|
|
|
130
132
|
/**
|
|
131
|
-
* Removes the event listener to receive {@link AdInfo} when
|
|
133
|
+
* Removes the event listener to receive {@link AdInfo} when a view-base ad collapses the ad.
|
|
132
134
|
*/
|
|
133
135
|
removeAdCollapsedEventListener(): void;
|
|
134
136
|
|
|
135
137
|
/**
|
|
136
|
-
* Adds the specified event listener to receive {@link AdInfo} when
|
|
137
|
-
*
|
|
138
|
+
* Adds the specified event listener to receive {@link AdInfo} when a view-base ad expands the ad.
|
|
139
|
+
*
|
|
138
140
|
* @param listener Listener to be notified.
|
|
139
141
|
*/
|
|
140
142
|
addAdExpandedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
141
143
|
|
|
142
144
|
/**
|
|
143
|
-
* Removes the event listener to receive {@link AdInfo} when
|
|
145
|
+
* Removes the event listener to receive {@link AdInfo} when a view-base ad expands the ad.
|
|
144
146
|
*/
|
|
145
147
|
removeAdExpandedEventListener(): void;
|
|
146
148
|
|
|
147
149
|
/**
|
|
148
|
-
* Adds the specified event listener to receive {@link AdRevenueInfo} when
|
|
149
|
-
*
|
|
150
|
+
* Adds the specified event listener to receive {@link AdRevenueInfo} when a view-base ad pays
|
|
151
|
+
* ad revenue to the publisher.
|
|
152
|
+
*
|
|
150
153
|
* @param listener Listener to be notified.
|
|
151
154
|
*/
|
|
152
155
|
addAdRevenuePaidListener(listener: AdEventListener<AdRevenueInfo>): void;
|
|
153
156
|
|
|
154
157
|
/**
|
|
155
|
-
* Removes the event listener to receive {@link AdRevenueInfo} when
|
|
158
|
+
* Removes the event listener to receive {@link AdRevenueInfo} when when a view-base ad pays ad
|
|
159
|
+
* revenue to the publisher.
|
|
156
160
|
*/
|
|
157
161
|
removeAdRevenuePaidListener(): void;
|
|
158
162
|
};
|
package/src/types/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './Configuration';
|
|
2
|
+
export * from './AdInfo';
|
|
3
|
+
export * from './AdViewProps';
|
|
4
|
+
export * from './NativeAdViewProps';
|