react-native-applovin-max 7.0.0 → 7.0.1
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 +2 -2
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +6 -3
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModule.java +2 -2
- package/lib/commonjs/AdView.js +348 -0
- package/lib/commonjs/AdView.js.map +1 -0
- package/lib/commonjs/AppLovinMAX.js +52 -0
- package/lib/commonjs/AppLovinMAX.js.map +1 -0
- package/lib/commonjs/AppOpenAd.js +102 -0
- package/lib/commonjs/AppOpenAd.js.map +1 -0
- package/lib/commonjs/BannerAd.js +139 -0
- package/lib/commonjs/BannerAd.js.map +1 -0
- package/lib/commonjs/EventEmitter.js +32 -0
- package/lib/commonjs/EventEmitter.js.map +1 -0
- package/lib/commonjs/InterstitialAd.js +102 -0
- package/lib/commonjs/InterstitialAd.js.map +1 -0
- package/lib/commonjs/MRecAd.js +117 -0
- package/lib/commonjs/MRecAd.js.map +1 -0
- package/lib/commonjs/Privacy.js +12 -0
- package/lib/commonjs/Privacy.js.map +1 -0
- package/lib/commonjs/RewardedAd.js +116 -0
- package/lib/commonjs/RewardedAd.js.map +1 -0
- package/lib/commonjs/TargetingData.js +179 -0
- package/lib/commonjs/TargetingData.js.map +1 -0
- package/lib/commonjs/index.js +256 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/nativeAd/NativeAdView.js +147 -0
- package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -0
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js +197 -0
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js.map +1 -0
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js +37 -0
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js.map +1 -0
- package/lib/commonjs/types/AdEvent.js +6 -0
- package/lib/commonjs/types/AdEvent.js.map +1 -0
- package/lib/commonjs/types/AdInfo.js +48 -0
- package/lib/commonjs/types/AdInfo.js.map +1 -0
- package/lib/commonjs/types/AdProps.js +6 -0
- package/lib/commonjs/types/AdProps.js.map +1 -0
- package/lib/commonjs/types/AdViewProps.js +6 -0
- package/lib/commonjs/types/AdViewProps.js.map +1 -0
- package/lib/commonjs/types/AppLovinMAX.js +6 -0
- package/lib/commonjs/types/AppLovinMAX.js.map +1 -0
- package/lib/commonjs/types/AppOpenAd.js +6 -0
- package/lib/commonjs/types/AppOpenAd.js.map +1 -0
- package/lib/commonjs/types/BannerAd.js +6 -0
- package/lib/commonjs/types/BannerAd.js.map +1 -0
- package/lib/commonjs/types/CMPError.js +6 -0
- package/lib/commonjs/types/CMPError.js.map +1 -0
- package/lib/commonjs/types/Configuration.js +6 -0
- package/lib/commonjs/types/Configuration.js.map +1 -0
- package/lib/commonjs/types/FullscreenAd.js +6 -0
- package/lib/commonjs/types/FullscreenAd.js.map +1 -0
- package/lib/commonjs/types/InterstitialAd.js +6 -0
- package/lib/commonjs/types/InterstitialAd.js.map +1 -0
- package/lib/commonjs/types/MRecAd.js +6 -0
- package/lib/commonjs/types/MRecAd.js.map +1 -0
- package/lib/commonjs/types/NativeAd.js +2 -0
- package/lib/commonjs/types/NativeAd.js.map +1 -0
- package/lib/commonjs/types/NativeAdViewProps.js +6 -0
- package/lib/commonjs/types/NativeAdViewProps.js.map +1 -0
- package/lib/commonjs/types/Privacy.js +2 -0
- package/lib/commonjs/types/Privacy.js.map +1 -0
- package/lib/commonjs/types/RewardedAd.js +6 -0
- package/lib/commonjs/types/RewardedAd.js.map +1 -0
- package/lib/commonjs/types/TargetingData.js +6 -0
- package/lib/commonjs/types/TargetingData.js.map +1 -0
- package/lib/commonjs/types/ViewAd.js +6 -0
- package/lib/commonjs/types/ViewAd.js.map +1 -0
- package/lib/commonjs/types/index.js +61 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/module/AdView.js +335 -0
- package/lib/module/AdView.js.map +1 -0
- package/lib/module/AppLovinMAX.js +48 -0
- package/lib/module/AppLovinMAX.js.map +1 -0
- package/lib/module/AppOpenAd.js +96 -0
- package/lib/module/AppOpenAd.js.map +1 -0
- package/lib/module/BannerAd.js +133 -0
- package/lib/module/BannerAd.js.map +1 -0
- package/lib/module/EventEmitter.js +24 -0
- package/lib/module/EventEmitter.js.map +1 -0
- package/lib/module/InterstitialAd.js +96 -0
- package/lib/module/InterstitialAd.js.map +1 -0
- package/lib/module/MRecAd.js +111 -0
- package/lib/module/MRecAd.js.map +1 -0
- package/lib/module/Privacy.js +6 -0
- package/lib/module/Privacy.js.map +1 -0
- package/lib/module/RewardedAd.js +110 -0
- package/lib/module/RewardedAd.js.map +1 -0
- package/lib/module/TargetingData.js +175 -0
- package/lib/module/TargetingData.js.map +1 -0
- package/lib/module/index.js +14 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/nativeAd/NativeAdView.js +139 -0
- package/lib/module/nativeAd/NativeAdView.js.map +1 -0
- package/lib/module/nativeAd/NativeAdViewComponents.js +181 -0
- package/lib/module/nativeAd/NativeAdViewComponents.js.map +1 -0
- package/lib/module/nativeAd/NativeAdViewProvider.js +28 -0
- package/lib/module/nativeAd/NativeAdViewProvider.js.map +1 -0
- package/lib/module/types/AdEvent.js +2 -0
- package/lib/module/types/AdEvent.js.map +1 -0
- package/lib/module/types/AdInfo.js +52 -0
- package/lib/module/types/AdInfo.js.map +1 -0
- package/lib/module/types/AdProps.js +2 -0
- package/lib/module/types/AdProps.js.map +1 -0
- package/lib/module/types/AdViewProps.js +2 -0
- package/lib/module/types/AdViewProps.js.map +1 -0
- package/lib/module/types/AppLovinMAX.js +2 -0
- package/lib/module/types/AppLovinMAX.js.map +1 -0
- package/lib/module/types/AppOpenAd.js +2 -0
- package/lib/module/types/AppOpenAd.js.map +1 -0
- package/lib/module/types/BannerAd.js +2 -0
- package/lib/module/types/BannerAd.js.map +1 -0
- package/lib/module/types/CMPError.js +2 -0
- package/lib/module/types/CMPError.js.map +1 -0
- package/lib/module/types/Configuration.js +2 -0
- package/lib/module/types/Configuration.js.map +1 -0
- package/lib/module/types/FullscreenAd.js +2 -0
- package/lib/module/types/FullscreenAd.js.map +1 -0
- package/lib/module/types/InterstitialAd.js +2 -0
- package/lib/module/types/InterstitialAd.js.map +1 -0
- package/lib/module/types/MRecAd.js +2 -0
- package/lib/module/types/MRecAd.js.map +1 -0
- package/lib/module/types/NativeAd.js +2 -0
- package/lib/module/types/NativeAd.js.map +1 -0
- package/lib/module/types/NativeAdViewProps.js +2 -0
- package/lib/module/types/NativeAdViewProps.js.map +1 -0
- package/lib/module/types/Privacy.js +2 -0
- package/lib/module/types/Privacy.js.map +1 -0
- package/lib/module/types/RewardedAd.js +2 -0
- package/lib/module/types/RewardedAd.js.map +1 -0
- package/lib/module/types/TargetingData.js +2 -0
- package/lib/module/types/TargetingData.js.map +1 -0
- package/lib/module/types/ViewAd.js +2 -0
- package/lib/module/types/ViewAd.js.map +1 -0
- package/lib/module/types/index.js +6 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/typescript/src/AdView.d.ts +115 -0
- package/lib/typescript/src/AdView.d.ts.map +1 -0
- package/lib/typescript/src/AppLovinMAX.d.ts +73 -0
- package/lib/typescript/src/AppLovinMAX.d.ts.map +1 -0
- package/lib/typescript/src/AppOpenAd.d.ts +4 -0
- package/lib/typescript/src/AppOpenAd.d.ts.map +1 -0
- package/lib/typescript/src/BannerAd.d.ts +4 -0
- package/lib/typescript/src/BannerAd.d.ts.map +1 -0
- package/lib/typescript/src/EventEmitter.d.ts +4 -0
- package/lib/typescript/src/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/src/InterstitialAd.d.ts +4 -0
- package/lib/typescript/src/InterstitialAd.d.ts.map +1 -0
- package/lib/typescript/src/MRecAd.d.ts +4 -0
- package/lib/typescript/src/MRecAd.d.ts.map +1 -0
- package/lib/typescript/src/Privacy.d.ts +3 -0
- package/lib/typescript/src/Privacy.d.ts.map +1 -0
- package/lib/typescript/src/RewardedAd.d.ts +4 -0
- package/lib/typescript/src/RewardedAd.d.ts.map +1 -0
- package/lib/typescript/src/TargetingData.d.ts +26 -0
- package/lib/typescript/src/TargetingData.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +14 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/nativeAd/NativeAdView.d.ts +42 -0
- package/lib/typescript/src/nativeAd/NativeAdView.d.ts.map +1 -0
- package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts +11 -0
- package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts.map +1 -0
- package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts +16 -0
- package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts.map +1 -0
- package/lib/typescript/src/types/AdEvent.d.ts +15 -0
- package/lib/typescript/src/types/AdEvent.d.ts.map +1 -0
- package/lib/typescript/src/types/AdInfo.d.ts +295 -0
- package/lib/typescript/src/types/AdInfo.d.ts.map +1 -0
- package/lib/typescript/src/types/AdProps.d.ts +58 -0
- package/lib/typescript/src/types/AdProps.d.ts.map +1 -0
- package/lib/typescript/src/types/AdViewProps.d.ts +73 -0
- package/lib/typescript/src/types/AdViewProps.d.ts.map +1 -0
- package/lib/typescript/src/types/AppLovinMAX.d.ts +133 -0
- package/lib/typescript/src/types/AppLovinMAX.d.ts.map +1 -0
- package/lib/typescript/src/types/AppOpenAd.d.ts +3 -0
- package/lib/typescript/src/types/AppOpenAd.d.ts.map +1 -0
- package/lib/typescript/src/types/BannerAd.d.ts +42 -0
- package/lib/typescript/src/types/BannerAd.d.ts.map +1 -0
- package/lib/typescript/src/types/CMPError.d.ts +20 -0
- package/lib/typescript/src/types/CMPError.d.ts.map +1 -0
- package/lib/typescript/src/types/Configuration.d.ts +33 -0
- package/lib/typescript/src/types/Configuration.d.ts.map +1 -0
- package/lib/typescript/src/types/FullscreenAd.d.ts +123 -0
- package/lib/typescript/src/types/FullscreenAd.d.ts.map +1 -0
- package/lib/typescript/src/types/InterstitialAd.d.ts +3 -0
- package/lib/typescript/src/types/InterstitialAd.d.ts.map +1 -0
- package/lib/typescript/src/types/MRecAd.d.ts +12 -0
- package/lib/typescript/src/types/MRecAd.d.ts.map +1 -0
- package/lib/typescript/src/types/NativeAd.d.ts +42 -0
- package/lib/typescript/src/types/NativeAd.d.ts.map +1 -0
- package/lib/typescript/src/types/NativeAdViewProps.d.ts +15 -0
- package/lib/typescript/src/types/NativeAdViewProps.d.ts.map +1 -0
- package/lib/typescript/src/types/Privacy.d.ts +35 -0
- package/lib/typescript/src/types/Privacy.d.ts.map +1 -0
- package/lib/typescript/src/types/RewardedAd.d.ts +18 -0
- package/lib/typescript/src/types/RewardedAd.d.ts.map +1 -0
- package/lib/typescript/src/types/TargetingData.d.ts +43 -0
- package/lib/typescript/src/types/TargetingData.d.ts.map +1 -0
- package/lib/typescript/src/types/ViewAd.d.ts +141 -0
- package/lib/typescript/src/types/ViewAd.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +6 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/package.json +19 -11
- package/react-native-applovin-max.podspec +1 -1
- package/src/AppLovinMAX.ts +1 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an ad that has been served by AppLovin MAX.
|
|
3
|
+
*/
|
|
4
|
+
export type AdInfo = {
|
|
5
|
+
/**
|
|
6
|
+
* The ad unit ID for which this ad was loaded.
|
|
7
|
+
*/
|
|
8
|
+
adUnitId: string;
|
|
9
|
+
/**
|
|
10
|
+
* The creative ID tied to the ad, if any. You can report creative issues to the corresponding
|
|
11
|
+
* ad network using this ID.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://support.applovin.com/hc/en-us/articles/13986039797389-Creative-Debugger#h_01HC10588YYDNZMS1GPCVRD2E7}
|
|
14
|
+
*/
|
|
15
|
+
creativeId?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The ad network from which this ad was loaded.
|
|
18
|
+
*
|
|
19
|
+
* @see {@link https://support.applovin.com/hc/en-us/articles/13986039797389-Creative-Debugger#h_01HC10588YWTJHYE1E35HWQTX7}
|
|
20
|
+
*/
|
|
21
|
+
networkName: string;
|
|
22
|
+
/**
|
|
23
|
+
* The placement name that you assign when you integrate each ad format, for granular reporting
|
|
24
|
+
* in postbacks.
|
|
25
|
+
*/
|
|
26
|
+
placement?: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* The ad’s revenue amount. In the case where no revenue amount exists, or it is not available
|
|
29
|
+
* yet, return 0.
|
|
30
|
+
*/
|
|
31
|
+
revenue: number;
|
|
32
|
+
/**
|
|
33
|
+
* The DSP network that provides the loaded ad when the ad is served through AppLovin Exchange.
|
|
34
|
+
*/
|
|
35
|
+
dspName?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* The underlying waterfall of ad responses.
|
|
38
|
+
*/
|
|
39
|
+
waterfall: AdWaterfallInfo;
|
|
40
|
+
/**
|
|
41
|
+
* The native ad info.
|
|
42
|
+
*/
|
|
43
|
+
nativeAd?: AdNativeInfo | null;
|
|
44
|
+
/**
|
|
45
|
+
* The size of the AdView format ad, or size with (width: 0, height: 0) otherwise.
|
|
46
|
+
*/
|
|
47
|
+
size: {
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Encapsulates various data for MAX load errors.
|
|
54
|
+
*/
|
|
55
|
+
export type AdLoadFailedInfo = {
|
|
56
|
+
/**
|
|
57
|
+
* The ad unit ID for which this ad was loaded.
|
|
58
|
+
*/
|
|
59
|
+
adUnitId: string;
|
|
60
|
+
/**
|
|
61
|
+
* The error code for the error.
|
|
62
|
+
*/
|
|
63
|
+
code: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* The error message for the error.
|
|
66
|
+
*/
|
|
67
|
+
message?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* The mediated network's error code for the error.
|
|
70
|
+
*/
|
|
71
|
+
mediatedNetworkErrorCode: number;
|
|
72
|
+
/**
|
|
73
|
+
* The mediated network's error message for the error.
|
|
74
|
+
*/
|
|
75
|
+
mediatedNetworkErrorMessage: string;
|
|
76
|
+
/**
|
|
77
|
+
* The message for the error.
|
|
78
|
+
*/
|
|
79
|
+
adLoadFailureInfo?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* The underlying waterfall of ad responses.
|
|
82
|
+
*/
|
|
83
|
+
waterfall?: AdWaterfallInfo | null;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Encapsulates various data for MAX display errors.
|
|
87
|
+
*/
|
|
88
|
+
export type AdDisplayFailedInfo = AdInfo & {
|
|
89
|
+
/**
|
|
90
|
+
* The error code for the error.
|
|
91
|
+
*/
|
|
92
|
+
code: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* The error message for the error.
|
|
95
|
+
*/
|
|
96
|
+
message?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* The mediated network's error code for the error.
|
|
99
|
+
*/
|
|
100
|
+
mediatedNetworkErrorCode: number;
|
|
101
|
+
/**
|
|
102
|
+
* The mediated network's error message for the error.
|
|
103
|
+
*/
|
|
104
|
+
mediatedNetworkErrorMessage: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Represents a reward given to the user.
|
|
108
|
+
*/
|
|
109
|
+
export type AdRewardInfo = AdInfo & {
|
|
110
|
+
/**
|
|
111
|
+
* The reward label.
|
|
112
|
+
*/
|
|
113
|
+
rewardLabel?: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* The rewarded amount.
|
|
116
|
+
*/
|
|
117
|
+
rewardAmount: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Represents revenue given to the publisher.
|
|
121
|
+
*/
|
|
122
|
+
export type AdRevenueInfo = AdInfo & {
|
|
123
|
+
/**
|
|
124
|
+
* The ad network placement for which this ad was loaded.
|
|
125
|
+
*/
|
|
126
|
+
networkPlacement: string;
|
|
127
|
+
/**
|
|
128
|
+
* The precision of the revenue value for this ad.
|
|
129
|
+
*
|
|
130
|
+
* Possible values are:
|
|
131
|
+
* - "publisher_defined" - If the revenue is the price assigned to the line item by the publisher.
|
|
132
|
+
* - "exact" - If the revenue is the resulting price of a real-time auction.
|
|
133
|
+
* - "estimated" - If the revenue is the price obtained by auto-CPM.
|
|
134
|
+
* - "undefined" - If we do not have permission from the ad network to share impression-level data.
|
|
135
|
+
* - "" - An empty string, if revenue and precision are not valid (for example, in test mode).
|
|
136
|
+
*/
|
|
137
|
+
revenuePrecision: string;
|
|
138
|
+
/**
|
|
139
|
+
* The current country code where the ad was shown.
|
|
140
|
+
*/
|
|
141
|
+
countryCode: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Represents a native ad.
|
|
145
|
+
*/
|
|
146
|
+
export type AdNativeInfo = {
|
|
147
|
+
/**
|
|
148
|
+
* The native ad title text for {@link TitleView}.
|
|
149
|
+
*/
|
|
150
|
+
title?: string;
|
|
151
|
+
/**
|
|
152
|
+
* The native ad advertiser text for {@link AdvertiserView}.
|
|
153
|
+
*/
|
|
154
|
+
advertiser?: string;
|
|
155
|
+
/**
|
|
156
|
+
* The native ad body text for {@link BodyView}}.
|
|
157
|
+
*/
|
|
158
|
+
body?: string;
|
|
159
|
+
/**
|
|
160
|
+
* The native ad CTA (call to action) text for {@link CallToActionView}.
|
|
161
|
+
*/
|
|
162
|
+
callToAction?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The star rating of the native ad in the [0.0, 5.0] range for {@link StarRatingView}, if provided by the network.
|
|
165
|
+
*/
|
|
166
|
+
starRating?: number;
|
|
167
|
+
/**
|
|
168
|
+
* The aspect ratio (width-to-height) for {@link MediaView} if provided by the network.
|
|
169
|
+
*/
|
|
170
|
+
mediaContentAspectRatio?: number;
|
|
171
|
+
/**
|
|
172
|
+
* Whether or not the content for {@link IconView} is available.
|
|
173
|
+
*/
|
|
174
|
+
isIconImageAvailable: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Whether or not the content for {@link OptionsView} is available.
|
|
177
|
+
*/
|
|
178
|
+
isOptionsViewAvailable: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Whether or not the content for {@link MediaView} is available.
|
|
181
|
+
*/
|
|
182
|
+
isMediaViewAvailable: boolean;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Represents an ad waterfall, encapsulating various metadata such as total latency, underlying ad
|
|
186
|
+
* responses, etc.
|
|
187
|
+
*/
|
|
188
|
+
export type AdWaterfallInfo = {
|
|
189
|
+
/**
|
|
190
|
+
* The ad waterfall name.
|
|
191
|
+
*/
|
|
192
|
+
name: string;
|
|
193
|
+
/**
|
|
194
|
+
* The ad waterfall test name.
|
|
195
|
+
*/
|
|
196
|
+
testName: string;
|
|
197
|
+
/**
|
|
198
|
+
* The list of {@link AdNetworkResponseInfo} info objects relating to each ad in the waterfall,
|
|
199
|
+
* ordered by their position.
|
|
200
|
+
*/
|
|
201
|
+
networkResponses: AdNetworkResponseInfo[];
|
|
202
|
+
/**
|
|
203
|
+
* The total latency in seconds for this waterfall to finish processing.
|
|
204
|
+
*/
|
|
205
|
+
latencyMillis: number;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* This enum contains possible states of an ad in the waterfall.
|
|
209
|
+
* Each adapter response {@link AdNetworkResponseInfo} corresponds to one of these states.
|
|
210
|
+
*/
|
|
211
|
+
export declare enum AdLoadState {
|
|
212
|
+
/**
|
|
213
|
+
* The AppLovin MAX SDK did not attempt to load an ad from this network in the waterfall because
|
|
214
|
+
* an ad higher in the waterfall loaded successfully.
|
|
215
|
+
*/
|
|
216
|
+
LoadStateAdLoadNotAttempted = 0,
|
|
217
|
+
/**
|
|
218
|
+
* An ad successfully loaded from this network.
|
|
219
|
+
*/
|
|
220
|
+
LoadStateAdLoaded = 1,
|
|
221
|
+
/**
|
|
222
|
+
* An ad failed to load from this network.
|
|
223
|
+
*/
|
|
224
|
+
LoadStateAdFailedToLoad = 2
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Encapsulates load and display errors.
|
|
228
|
+
*/
|
|
229
|
+
export type AdErrorInfo = {
|
|
230
|
+
/**
|
|
231
|
+
* The error code for the error.
|
|
232
|
+
*/
|
|
233
|
+
code: number;
|
|
234
|
+
/**
|
|
235
|
+
* The error message for the error.
|
|
236
|
+
*/
|
|
237
|
+
message?: string;
|
|
238
|
+
/**
|
|
239
|
+
* @deprecated
|
|
240
|
+
*/
|
|
241
|
+
adLoadFailureInfo?: string;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* This class represents an ad response in a waterfall.
|
|
245
|
+
*/
|
|
246
|
+
export type AdNetworkResponseInfo = {
|
|
247
|
+
/**
|
|
248
|
+
* The state of the ad that this object represents. For more info, see the {@link AdLoadState} enum.
|
|
249
|
+
*/
|
|
250
|
+
adLoadState: AdLoadState;
|
|
251
|
+
/**
|
|
252
|
+
* The mediated network that this adapter response info object represents.
|
|
253
|
+
*/
|
|
254
|
+
mediatedNetwork?: AdMediatedNetworkInfo;
|
|
255
|
+
/**
|
|
256
|
+
* The credentials used to load an ad from this adapter, as entered in the AppLovin MAX dashboard.
|
|
257
|
+
*/
|
|
258
|
+
credentials: {
|
|
259
|
+
[key: string]: string | number | boolean | object | null;
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* The ad load error this network response resulted in. Will be unavailable if an attempt to
|
|
263
|
+
* load an ad has not been made or an ad was loaded successfully (i.e. {@link adLoadState}
|
|
264
|
+
* is NOT LoadStateAdFailedToLoad).
|
|
265
|
+
*/
|
|
266
|
+
error?: AdErrorInfo;
|
|
267
|
+
/**
|
|
268
|
+
* The amount of time the network took to load (either successfully or not) an ad, in milliseconds.
|
|
269
|
+
* If an attempt to load an ad has not been made (i.e. {@link adLoadState} is LoadStateAdLoadNotAttempted),
|
|
270
|
+
* the value will be -1.
|
|
271
|
+
*/
|
|
272
|
+
latencyMillis: number;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* This class represents information for a mediated network.
|
|
276
|
+
*/
|
|
277
|
+
export type AdMediatedNetworkInfo = {
|
|
278
|
+
/**
|
|
279
|
+
* The name of the mediated network.
|
|
280
|
+
*/
|
|
281
|
+
name: string;
|
|
282
|
+
/**
|
|
283
|
+
* The class name of the adapter for the mediated network.
|
|
284
|
+
*/
|
|
285
|
+
adapterClassName: string;
|
|
286
|
+
/**
|
|
287
|
+
* The version of the adapter for the mediated network.
|
|
288
|
+
*/
|
|
289
|
+
adapterVersion: string;
|
|
290
|
+
/**
|
|
291
|
+
* The version of the mediated network’s SDK.
|
|
292
|
+
*/
|
|
293
|
+
sdkVersion: string;
|
|
294
|
+
};
|
|
295
|
+
//# sourceMappingURL=AdInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdInfo.d.ts","sourceRoot":"","sources":["../../../../src/types/AdInfo.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo, AdRevenueInfo } from './AdInfo';
|
|
2
|
+
/**
|
|
3
|
+
* Local extra parameters can be of type: string, number, boolean, array, map, and null.
|
|
4
|
+
*/
|
|
5
|
+
export type LocalExtraParameterValue = string | number | boolean | object | null;
|
|
6
|
+
/**
|
|
7
|
+
* Defines the base properties for the UI component ads i.e {@link Adview} and {@link NativeAdView}.
|
|
8
|
+
*/
|
|
9
|
+
export type AdProps = {
|
|
10
|
+
/**
|
|
11
|
+
* A string value representing the ad unit ID to load ads for.
|
|
12
|
+
*/
|
|
13
|
+
adUnitId: string;
|
|
14
|
+
/**
|
|
15
|
+
* A string value representing the placement name that you assign when you integrate each ad
|
|
16
|
+
* format, for granular reporting in ad events.
|
|
17
|
+
*/
|
|
18
|
+
placement?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The custom data to tie the showing ad to.
|
|
21
|
+
*/
|
|
22
|
+
customData?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* A dictionary value representing the extra parameters to set a list of key-value string pairs
|
|
25
|
+
* for the ad.
|
|
26
|
+
*/
|
|
27
|
+
extraParameters?: {
|
|
28
|
+
[key: string]: string | null;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* A dictionary value representing the local extra parameters to set a list of key-value pairs
|
|
32
|
+
* to pass to the adapter instances.
|
|
33
|
+
*/
|
|
34
|
+
localExtraParameters?: {
|
|
35
|
+
[key: string]: LocalExtraParameterValue;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* A callback fuction that {@link Adview} or {@link NativeAdView} fires when it loads a new ad.
|
|
39
|
+
*/
|
|
40
|
+
onAdLoaded?: (adInfo: AdInfo) => void;
|
|
41
|
+
/**
|
|
42
|
+
* A callback fuction that {@link Adview} or {@link NativeAdView} fires when it could not load a new ad.
|
|
43
|
+
*/
|
|
44
|
+
onAdLoadFailed?: (error: AdLoadFailedInfo) => void;
|
|
45
|
+
/**
|
|
46
|
+
* A callback fuction that {@link Adview} or {@link NativeAdView} fires when it fails to display the ad.
|
|
47
|
+
*/
|
|
48
|
+
onAdDisplayFailed?: (error: AdDisplayFailedInfo) => void;
|
|
49
|
+
/**
|
|
50
|
+
* A callback fuction that {@link Adview} or {@link NativeAdView} fires when the user clicks the ad.
|
|
51
|
+
*/
|
|
52
|
+
onAdClicked?: (adInfo: AdInfo) => void;
|
|
53
|
+
/**
|
|
54
|
+
* A callback fuction that {@link Adview} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
|
|
55
|
+
*/
|
|
56
|
+
onAdRevenuePaid?: (adInfo: AdRevenueInfo) => void;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=AdProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdProps.d.ts","sourceRoot":"","sources":["../../../../src/types/AdProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IAClB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAEnD;;;OAGG;IACH,oBAAoB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,CAAA;KAAE,CAAC;IAEnE;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAEnD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CACrD,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { AdProps, LocalExtraParameterValue } from './AdProps';
|
|
2
|
+
import type { AdInfo } from './AdInfo';
|
|
3
|
+
import type { AdFormat } from '../AdView';
|
|
4
|
+
/**
|
|
5
|
+
* A handler of {@link AdView}.
|
|
6
|
+
*/
|
|
7
|
+
export type AdViewHandler = {
|
|
8
|
+
/**
|
|
9
|
+
* If the {@link loadOnMount} attribute is set to false, you can call this API to start loading ads in this AdView.
|
|
10
|
+
*/
|
|
11
|
+
loadAd(): void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Represents an {@link AdView} - Banner / MREC.
|
|
15
|
+
*/
|
|
16
|
+
export type AdViewProps = AdProps & {
|
|
17
|
+
/**
|
|
18
|
+
* An enum value representing the ad format to load ads for. Should be either
|
|
19
|
+
* {@link AdFormat.BANNER} or {@link AdFormat.MREC}.
|
|
20
|
+
*/
|
|
21
|
+
adFormat: AdFormat;
|
|
22
|
+
/**
|
|
23
|
+
* A boolean value representing whether or not to enable adaptive banners.
|
|
24
|
+
*/
|
|
25
|
+
adaptiveBannerEnabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* A boolean value representing whether or not to enable auto-refresh. Note that auto-refresh is
|
|
28
|
+
* enabled by default.
|
|
29
|
+
*/
|
|
30
|
+
autoRefresh?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* A boolean value representing whether or not to load an ad as soon as {@link AdView} is
|
|
33
|
+
* mounted. Note that the default value is true.
|
|
34
|
+
*/
|
|
35
|
+
loadOnMount?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* A callback fuction that {@link AdView} fires when it expands the ad.
|
|
38
|
+
*/
|
|
39
|
+
onAdExpanded?: (adInfo: AdInfo) => void;
|
|
40
|
+
/**
|
|
41
|
+
* A callback fuction that {@link AdView} fires when it collapses the ad.
|
|
42
|
+
*/
|
|
43
|
+
onAdCollapsed?: (adInfo: AdInfo) => void;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* A list of options to create a native UI component for preloading {@link AdView}.
|
|
47
|
+
*/
|
|
48
|
+
export type NativeUIComponentAdViewOptions = {
|
|
49
|
+
/**
|
|
50
|
+
* A string value representing the placement name that you assign when you integrate each ad
|
|
51
|
+
* format, for granular reporting in ad events.
|
|
52
|
+
*/
|
|
53
|
+
placement?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* The custom data to tie the showing ad to.
|
|
56
|
+
*/
|
|
57
|
+
customData?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* A dictionary value representing the extra parameters to set a list of key-value string pairs
|
|
60
|
+
* for the ad.
|
|
61
|
+
*/
|
|
62
|
+
extraParameters?: {
|
|
63
|
+
[key: string]: string | null;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* A dictionary value representing the local extra parameters to set a list of key-value pairs
|
|
67
|
+
* to pass to the adapter instances.
|
|
68
|
+
*/
|
|
69
|
+
localExtraParameters?: {
|
|
70
|
+
[key: string]: LocalExtraParameterValue;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=AdViewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdViewProps.d.ts","sourceRoot":"","sources":["../../../../src/types/AdViewProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB;;OAEG;IACH,MAAM,IAAI,IAAI,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG;IAChC;;;OAGG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG;IACzC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAEnD;;;OAGG;IACH,oBAAoB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,CAAA;KAAE,CAAC;CACtE,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { Configuration } from './Configuration';
|
|
2
|
+
import type { CMPError } from './CMPError';
|
|
3
|
+
import type { ConsentFlowUserGeography } from '../AppLovinMAX';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the AppLovinMAX module.
|
|
6
|
+
*/
|
|
7
|
+
export type AppLovinMAXType = {
|
|
8
|
+
/**
|
|
9
|
+
* Indicates whether or not the AppLovinMAX SDK has fully initialized without errors and
|
|
10
|
+
* {@link AppLovinMAX.initialize()} has called the completion callback.
|
|
11
|
+
*/
|
|
12
|
+
isInitialized(): Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Initializes the AppLovinMAX SDK, and returns {@link Configuration} when it finishes initializing.
|
|
15
|
+
*
|
|
16
|
+
* @param sdkKey SDK key to use for the instance of the AppLovinMAX SDK.
|
|
17
|
+
*/
|
|
18
|
+
initialize(sdkKey: string): Promise<Configuration>;
|
|
19
|
+
/**
|
|
20
|
+
* Sets a list of the ad units for the SDK to initialize only those networks.
|
|
21
|
+
*
|
|
22
|
+
* @param adUnitIds Ad units to be initialized with the SDK.
|
|
23
|
+
*/
|
|
24
|
+
setInitializationAdUnitIds(adUnitIds: string[]): void;
|
|
25
|
+
/**
|
|
26
|
+
* Presents the mediation debugger UI.
|
|
27
|
+
*/
|
|
28
|
+
showMediationDebugger(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Whether this device is a tablet.
|
|
31
|
+
*/
|
|
32
|
+
isTablet(): Promise<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Sets an ID for the current user. AppLovin ties this identifier to SDK events and AppLovin’s
|
|
35
|
+
* optional S2S postbacks.
|
|
36
|
+
*
|
|
37
|
+
* @param userId User id.
|
|
38
|
+
*/
|
|
39
|
+
setUserId(userId: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Sets a muted state (or not) as the initial state for video ads.
|
|
42
|
+
*
|
|
43
|
+
* @param muted If ads should begin in a muted state.
|
|
44
|
+
*/
|
|
45
|
+
setMuted(muted: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to begin video ads in a muted state or not.
|
|
48
|
+
*/
|
|
49
|
+
isMuted(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* A toggle for verbose logging for the AppLovinMAX SDK.
|
|
52
|
+
*
|
|
53
|
+
* @param verboseLoggingEnabled true if the AppLovinMAX SDK should output log messages.
|
|
54
|
+
*/
|
|
55
|
+
setVerboseLogging(verboseLoggingEnabled: boolean): void;
|
|
56
|
+
/**
|
|
57
|
+
* Enables devices to receive test ads by passing in the advertising identifier (IDFA or IDFV) of
|
|
58
|
+
* each test device. Refer to AppLovin logs for the IDFA or IDFV of your current device.
|
|
59
|
+
*
|
|
60
|
+
* @param advertisingIds A list of the advertising ids.
|
|
61
|
+
*/
|
|
62
|
+
setTestDeviceAdvertisingIds(advertisingIds: string[]): void;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the Creative Debugger displays after you flip the device screen down twice.
|
|
65
|
+
*
|
|
66
|
+
* @param enabled Default to true.
|
|
67
|
+
*/
|
|
68
|
+
setCreativeDebuggerEnabled(enabled: boolean): void;
|
|
69
|
+
/**
|
|
70
|
+
* Sets an extra parameter to pass to the AppLovin server.
|
|
71
|
+
*
|
|
72
|
+
* @param key Parameter key.
|
|
73
|
+
* @param value Parameter value.
|
|
74
|
+
*/
|
|
75
|
+
setExtraParameter(key: string, value: string | null): void;
|
|
76
|
+
/**
|
|
77
|
+
* Whether or not the AppLovinMAX SDK collects the device location.
|
|
78
|
+
*
|
|
79
|
+
* @param enabled Defaults to true.
|
|
80
|
+
*/
|
|
81
|
+
setLocationCollectionEnabled(enabled: boolean): void;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use {@link setTermsAndPrivacyPolicyFlowEnabled()} instead.
|
|
84
|
+
*
|
|
85
|
+
* Enables the MAX Terms Flow.
|
|
86
|
+
*
|
|
87
|
+
* @param enabled true to enable the MAX Terms Flow.
|
|
88
|
+
*/
|
|
89
|
+
setConsentFlowEnabled(enabled: boolean): void;
|
|
90
|
+
/**
|
|
91
|
+
* Enables the MAX Terms and Privacy Policy Flow.
|
|
92
|
+
*
|
|
93
|
+
* @param enabled true to enable the MAX Terms and Privacy Policy Flow.
|
|
94
|
+
*/
|
|
95
|
+
setTermsAndPrivacyPolicyFlowEnabled(enabled: boolean): void;
|
|
96
|
+
/**
|
|
97
|
+
* The URL of your company’s privacy policy, as a string. This is required in order to enable
|
|
98
|
+
* the Terms Flow.
|
|
99
|
+
*
|
|
100
|
+
* @param urlString The URL string to point your company’s privacy policy.
|
|
101
|
+
*/
|
|
102
|
+
setPrivacyPolicyUrl(urlString: string): void;
|
|
103
|
+
/**
|
|
104
|
+
* The URL of your company’s terms of service, as a string. This is optional; you can enable
|
|
105
|
+
* the Terms Flow with or without it.
|
|
106
|
+
*
|
|
107
|
+
* @param urlString The URL string to point your company’s terms of service.
|
|
108
|
+
*/
|
|
109
|
+
setTermsOfServiceUrl(urlString: string): void;
|
|
110
|
+
/**
|
|
111
|
+
* Set debug user geography. You may use this to test CMP flow by setting this to {@link ConsentFlowUserGeography.GDPR}.
|
|
112
|
+
*
|
|
113
|
+
* @note The debug geography is used only when the app is in debug mode.
|
|
114
|
+
*/
|
|
115
|
+
setConsentFlowDebugUserGeography(userGeography: ConsentFlowUserGeography): void;
|
|
116
|
+
/**
|
|
117
|
+
* Shows the CMP flow to an existing user.
|
|
118
|
+
* Note that this resets the user’s existing consent information.
|
|
119
|
+
*
|
|
120
|
+
* The function returns when the flow finishes showing. On success, returns null. On failure,
|
|
121
|
+
* returns one of the {@link CMPError} codes.
|
|
122
|
+
*
|
|
123
|
+
* @return {Promise<CMPError|null>}
|
|
124
|
+
*/
|
|
125
|
+
showCmpForExistingUser(): Promise<CMPError | null>;
|
|
126
|
+
/**
|
|
127
|
+
* Returns true if a supported CMP SDK is detected.
|
|
128
|
+
*
|
|
129
|
+
* @return {boolean}
|
|
130
|
+
*/
|
|
131
|
+
hasSupportedCmp(): Promise<boolean>;
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=AppLovinMAX.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppLovinMAX.d.ts","sourceRoot":"","sources":["../../../../src/types/AppLovinMAX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B;;;OAGG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAElC;;;;OAIG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEnD;;;;OAIG;IACH,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEtD;;OAEG;IACH,qBAAqB,IAAI,IAAI,CAAC;IAE9B;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7B;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5B;;;;OAIG;IACH,iBAAiB,CAAC,qBAAqB,EAAE,OAAO,GAAG,IAAI,CAAC;IAExD;;;;;OAKG;IACH,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE5D;;;;OAIG;IACH,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAEnD;;;;;OAKG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAE3D;;;;OAIG;IACH,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAErD;;;;;;OAMG;IACH,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAE9C;;;;OAIG;IACH,mCAAmC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAE5D;;;;;OAKG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7C;;;;;OAKG;IACH,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9C;;;;OAIG;IACH,gCAAgC,CAAC,aAAa,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAEhF;;;;;;;;OAQG;IACH,sBAAsB,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAEnD;;;;OAIG;IACH,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppOpenAd.d.ts","sourceRoot":"","sources":["../../../../src/types/AppOpenAd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ViewAdType } from './ViewAd';
|
|
2
|
+
import type { AdViewPosition } from '../AdView';
|
|
3
|
+
export type BannerAdType = ViewAdType & {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a banner at the specified position and offsets.
|
|
6
|
+
*
|
|
7
|
+
* @param adUnitId The Ad Unit ID to load ads for.
|
|
8
|
+
* @param position {@ AdViewPosition} position.
|
|
9
|
+
* @param xOffset Horizontal offset from the left position.
|
|
10
|
+
* @param yOffset Vertical offset from the top position.
|
|
11
|
+
*/
|
|
12
|
+
createAd(adUnitId: string, position: AdViewPosition, xOffset?: number, yOffset?: number): void;
|
|
13
|
+
/**
|
|
14
|
+
* Sets a background color for the banner.
|
|
15
|
+
*
|
|
16
|
+
* @param adUnitId The Ad Unit ID to load ads for.
|
|
17
|
+
* @param hexColorCode Hexadecimal color (#rrggbb).
|
|
18
|
+
*/
|
|
19
|
+
setBackgroundColor(adUnitId: string, hexColorCode: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the banner width.
|
|
22
|
+
*
|
|
23
|
+
* @param adUnitId The Ad Unit ID to load ads for.
|
|
24
|
+
* @param width The desired banner width.
|
|
25
|
+
*/
|
|
26
|
+
setWidth(adUnitId: string, width: number): void;
|
|
27
|
+
/**
|
|
28
|
+
* Updates the banner position offsets.
|
|
29
|
+
*
|
|
30
|
+
* @param adUnitId The Ad Unit ID to load ads for.
|
|
31
|
+
* @param xOffset Horizontal offset from the left position.
|
|
32
|
+
* @param yOffset Vertical offset from the top position.
|
|
33
|
+
*/
|
|
34
|
+
updateOffsets(adUnitId: string, xOffset: number, yOffset: number): void;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the adaptive banner size for the provided width at the current orientation.
|
|
37
|
+
*
|
|
38
|
+
* @param width The banner width.
|
|
39
|
+
*/
|
|
40
|
+
getAdaptiveHeightForWidth(width: number): Promise<number>;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=BannerAd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../../src/types/BannerAd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/F;;;;;OAKG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjE;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhD;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAExE;;;;OAIG;IACH,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CMPErrorCode } from '../AppLovinMAX';
|
|
2
|
+
export type CMPError = {
|
|
3
|
+
/**
|
|
4
|
+
* The error code for this error.
|
|
5
|
+
*/
|
|
6
|
+
code: CMPErrorCode;
|
|
7
|
+
/**
|
|
8
|
+
* The error message for this error.
|
|
9
|
+
*/
|
|
10
|
+
message: string;
|
|
11
|
+
/**
|
|
12
|
+
* The error code returned by the CMP.
|
|
13
|
+
*/
|
|
14
|
+
cmpCode: number;
|
|
15
|
+
/**
|
|
16
|
+
* The error message returned by the CMP.
|
|
17
|
+
*/
|
|
18
|
+
cmpMessage: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=CMPError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMPError.d.ts","sourceRoot":"","sources":["../../../../src/types/CMPError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG;IACnB;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC"}
|