react-native-applovin-max 6.0.0 → 6.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.
@@ -35,8 +35,8 @@ android {
35
35
  defaultConfig {
36
36
  minSdkVersion 16
37
37
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
38
- versionCode 6000000
39
- versionName "6.0.0"
38
+ versionCode 6000100
39
+ versionName "6.0.1"
40
40
  }
41
41
 
42
42
  flavorDimensions("default")
package/ios/Podfile CHANGED
@@ -35,6 +35,6 @@ target 'AppLovinMAX' do
35
35
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
36
36
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
37
37
 
38
- pod 'AppLovinSDK', '11.11.3'
38
+ pod 'AppLovinSDK', '11.11.4'
39
39
 
40
40
  end
package/ios/Podfile.lock CHANGED
@@ -1,5 +1,5 @@
1
1
  PODS:
2
- - AppLovinSDK (11.11.3)
2
+ - AppLovinSDK (11.11.4)
3
3
  - boost-for-react-native (1.63.0)
4
4
  - DoubleConversion (1.1.6)
5
5
  - FBLazyVector (0.63.5)
@@ -249,7 +249,7 @@ PODS:
249
249
  - Yoga (1.14.0)
250
250
 
251
251
  DEPENDENCIES:
252
- - AppLovinSDK (= 11.11.3)
252
+ - AppLovinSDK (= 11.11.4)
253
253
  - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
254
254
  - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
255
255
  - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
@@ -339,7 +339,7 @@ EXTERNAL SOURCES:
339
339
  :path: "../node_modules/react-native/ReactCommon/yoga"
340
340
 
341
341
  SPEC CHECKSUMS:
342
- AppLovinSDK: 623ef78363c0dd2c3ff5446cde37e4920a96b7e0
342
+ AppLovinSDK: 5c667a790725d9529c01c3f3acf12ab195865fbb
343
343
  boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
344
344
  DoubleConversion: cde416483dac037923206447da6e1454df403714
345
345
  FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469
@@ -368,6 +368,6 @@ SPEC CHECKSUMS:
368
368
  ReactCommon: b9ff54b6dd22ba4a776eda22d7f83ec27544ca35
369
369
  Yoga: 0276e9f20976c8568e107cfc1163a8629051adc0
370
370
 
371
- PODFILE CHECKSUM: 0e638fe64c425ebeff3ccbfd5c809f3b35246730
371
+ PODFILE CHECKSUM: 76a08f1862fba288a559d37757b6d80d45c19d6e
372
372
 
373
- COCOAPODS: 1.12.1
373
+ COCOAPODS: 1.11.3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-applovin-max",
3
3
  "author": "AppLovin Corporation",
4
- "version": "6.0.0",
4
+ "version": "6.0.1",
5
5
  "description": "AppLovin MAX React Native Plugin for Android and iOS",
6
6
  "homepage": "https://github.com/AppLovin/AppLovin-MAX-React-Native",
7
7
  "license": "MIT",
@@ -11,10 +11,10 @@ Pod::Spec.new do |s|
11
11
  s.authors = package["author"]
12
12
 
13
13
  s.platforms = { :ios => "10.0" }
14
- s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_6_0_0" }
14
+ s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_6_0_1" }
15
15
 
16
16
  s.source_files = "ios/AppLovinMAX*.{h,m}"
17
17
 
18
18
  s.dependency "React"
19
- s.dependency "AppLovinSDK", "11.11.3"
19
+ s.dependency "AppLovinSDK", "11.11.4"
20
20
  end
package/src/AdView.tsx CHANGED
@@ -39,7 +39,7 @@ export enum AdFormat {
39
39
  }
40
40
 
41
41
  /**
42
- * Defines a position of a banner and MREC ad.
42
+ * Defines a position of a banner or MREC ad.
43
43
  */
44
44
  export enum AdViewPosition {
45
45
  TOP_CENTER = TOP_CENTER_POSITION,
@@ -126,11 +126,11 @@ const sizeAdViewDimensions = (adFormat: AdFormat, adaptiveBannerEnabled?: boolea
126
126
  }
127
127
 
128
128
  /**
129
- * The {@link AdView} component for building a banner or a MREC. Banners are sized to 320x50 on phones
130
- * and 728x90 on tablets. MRECs are sized to 300x250 on phones and tablets. You may use the
131
- * utility method `AppLovinMAX.isTablet()` to help with view sizing adjustments. For adaptive
132
- * banners, call `BannerAd.getAdaptiveHeightForWidth(width)` to get the banner height, and then adjust
133
- * your content accordingly.
129
+ * The {@link AdView} component that you use building a banner or an MREC. Phones
130
+ * sizes banners to 320x50 and MRECs to 300x250. Tablets sizes banners to 728x90 and MRECs to
131
+ * 300x250. You may use the utility method {@link AppLovinMAX.isTablet()} to help with view sizing
132
+ * adjustments. For adaptive banners, call {@link BannerAd.getAdaptiveHeightForWidth()} to get
133
+ * the banner height, and then adjust your content accordingly.
134
134
  *
135
135
  * ### Example:
136
136
  * ```js
@@ -244,7 +244,7 @@ export const AdView = ({
244
244
  onAdExpandedEvent={onAdExpandedEvent}
245
245
  onAdCollapsedEvent={onAdCollapsedEvent}
246
246
  onAdRevenuePaidEvent={onAdRevenuePaidEvent}
247
- style={{ ...(style as ViewProps), ...dimensions }}
247
+ style={Object.assign({}, style, dimensions)}
248
248
  {...otherProps}
249
249
  />
250
250
  );
@@ -4,7 +4,7 @@ import type { Configuration } from "./types/Configuration";
4
4
 
5
5
  const NativeAppLovinMAX = NativeModules.AppLovinMAX;
6
6
 
7
- const VERSION = "6.0.0";
7
+ const VERSION = "6.0.1";
8
8
 
9
9
  const initialize = async (
10
10
  sdkKey: string
@@ -1,4 +1,5 @@
1
1
  import { NativeModules } from "react-native";
2
+ import type { TargetingDataType } from "./types/TargetingData";
2
3
 
3
4
  const { AppLovinMAX } = NativeModules;
4
5
 
@@ -43,126 +44,171 @@ export enum UserGender {
43
44
  }
44
45
 
45
46
  /**
46
- * This class allows you to provide user or app data that will improve how we target ads.
47
+ * Defines additional data for the publisher to send to AppLovin.
48
+ *
49
+ * @see {@link https://support.applovin.com/hc/en-us/articles/13964925614733-Data-and-Keyword-Passing}
47
50
  */
48
- export const TargetingData = {
51
+ export const TargetingData: TargetingDataType = {
49
52
 
50
53
  /**
51
- * Sets the year of birth of the user. Sets 0 to clear this value.
54
+ * Sets the year of birth of the user. Set this to 0 to clear this value.
52
55
  */
53
- set yearOfBirth(value: number) {
54
- nativeMethods.setTargetingDataYearOfBirth(value);
56
+ set yearOfBirth(value: number | Promise<number>) {
57
+ if (typeof value === 'number') {
58
+ nativeMethods.setTargetingDataYearOfBirth(value);
59
+ } else {
60
+ printError("TargetingData.yearOfBirth", "number", typeof value);
61
+ }
55
62
  },
56
63
 
57
64
  /**
58
- * Gets the year of birth of the user.
65
+ * Gets the year of birth of the user.
59
66
  */
60
- get yearOfBirth(): Promise<number> {
67
+ get yearOfBirth(): number | Promise<number> {
61
68
  return nativeMethods.getTargetingDataYearOfBirth();
62
69
  },
63
70
 
64
71
  /**
65
- * Sets the gender of the user. Sets {UserGender.Unknown} to clear this value.
72
+ * Sets the gender of the user. Set this to {@link UserGender.Unknown} to clear this value.
66
73
  */
67
- set gender(value: UserGender) {
74
+ set gender(value: UserGender | Promise<UserGender>) {
68
75
  if (value === UserGender.Unknown ||
69
76
  value === UserGender.Female ||
70
77
  value === UserGender.Male ||
71
78
  value === UserGender.Other) {
72
79
  nativeMethods.setTargetingDataGender(value);
80
+ } else {
81
+ printError("TargetingData.gender", "UserGender", typeof value);
73
82
  }
74
83
  },
75
84
 
76
85
  /**
77
86
  * Gets the gender of the user.
78
87
  */
79
- get gender(): Promise<UserGender> {
88
+ get gender(): UserGender | Promise<UserGender> {
80
89
  return nativeMethods.getTargetingDataGender().then((value: string) => {
81
90
  return value as UserGender;
82
91
  });
83
92
  },
84
93
 
85
94
  /**
86
- * Sets the maximum ad content rating shown to the user. Sets {AdContentRating.None} to clear this value.
95
+ * Sets the maximum ad content rating shown to the user. The levels are based on IQG Media
96
+ * Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
97
+ * Set this to {@link AdContentRating.None} to clear this value.
87
98
  */
88
- set maximumAdContentRating(value: AdContentRating) {
99
+ set maximumAdContentRating(value: AdContentRating | Promise<AdContentRating>) {
89
100
  if (value === AdContentRating.None ||
90
101
  value === AdContentRating.AllAudiences ||
91
102
  value === AdContentRating.EveryoneOverTwelve ||
92
103
  value === AdContentRating.MatureAudiences) {
93
104
  nativeMethods.setTargetingDataMaximumAdContentRating(value);
105
+ } else {
106
+ printError("TargetingData.maximumAdContentRating", "AdContentRating", typeof value);
94
107
  }
95
108
  },
96
109
 
97
110
  /**
98
- * Gets the maximum ad content rating shown to the user.
111
+ * Gets the maximum ad content rating shown to the user. The levels are based on IQG Media
112
+ * Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
99
113
  */
100
- get maximumAdContentRating(): Promise<AdContentRating> {
114
+ get maximumAdContentRating(): AdContentRating | Promise<AdContentRating> {
101
115
  return nativeMethods.getTargetingDataMaximumAdContentRating().then((value: number) => {
102
116
  return value as AdContentRating;
103
117
  });
104
118
  },
105
119
 
106
120
  /**
107
- * Sets the email of the user. Sets null to clear this value.
121
+ * Sets the email of the user. Set this to null to clear this value.
108
122
  */
109
- set email(value: string | null) {
110
- nativeMethods.setTargetingDataEmail(value);
123
+ set email(value: string | null | Promise<string | null>) {
124
+ if (value === null) {
125
+ nativeMethods.setTargetingDataEmail(null);
126
+ } else if (typeof value === 'string') {
127
+ nativeMethods.setTargetingDataEmail(value as string);
128
+ } else {
129
+ printError("TargetingData.email", "string or null", typeof value);
130
+ }
111
131
  },
112
132
 
113
133
  /**
114
134
  * Gets the email of the user.
115
135
  */
116
- get email(): Promise<string | null> {
136
+ get email(): string | null | Promise<string | null> {
117
137
  return nativeMethods.getTargetingDataEmail();
118
138
  },
119
139
 
120
140
  /**
121
- * Sets the phone number of the user. Sets null to clear this value.
141
+ * Sets the phone number of the user. Set this to null to clear this value.
122
142
  */
123
- set phoneNumber(value: string | null) {
124
- nativeMethods.setTargetingDataPhoneNumber(value);
143
+ set phoneNumber(value: string | null | Promise<string | null>) {
144
+ if (value === null) {
145
+ nativeMethods.setTargetingDataPhoneNumber(null);
146
+ } else if ( typeof value === 'string') {
147
+ nativeMethods.setTargetingDataPhoneNumber(value as string);
148
+ } else {
149
+ printError("TargetingData.phoneNumber", "string or null", typeof value);
150
+ }
125
151
  },
126
152
 
127
153
  /**
128
154
  * Gets the phone number of the user.
129
155
  */
130
- get phoneNumber(): Promise<string | null> {
156
+ get phoneNumber(): string | null | Promise<string | null> {
131
157
  return nativeMethods.getTargetingDataPhoneNumber();
132
158
  },
133
159
 
134
160
  /**
135
- * Sets the keywords describing the application. Sets null to clear this value.
161
+ * Sets the keywords describing the application. Set this to null to clear this value.
136
162
  */
137
- set keywords(value: string[] | null) {
138
- nativeMethods.setTargetingDataKeywords(value);
163
+ set keywords(value: string[] | null | Promise<string[]> | null) {
164
+ if (value === null) {
165
+ nativeMethods.setTargetingDataKeywords(null);
166
+ } else if (isStringArray(value)) {
167
+ nativeMethods.setTargetingDataKeywords(value as string[]);
168
+ } else {
169
+ printError("TargetingData.keywords", "string[] or null", typeof value);
170
+ }
139
171
  },
140
172
 
141
173
  /**
142
174
  * Gets the keywords describing the application.
143
175
  */
144
- get keywords(): Promise<string[] | null> {
176
+ get keywords(): string[] | null | Promise<string[] | null> {
145
177
  return nativeMethods.getTargetingDataKeywords();
146
178
  },
147
179
 
148
180
  /**
149
- * Sets the interests of the user. Sets null to clear this value.
181
+ * Sets the interests of the user. Set this to null to clear this value.
150
182
  */
151
- set interests(value: string[] | null) {
152
- nativeMethods.setTargetingDataInterests(value);
183
+ set interests(value: string[] | null | Promise<string[] | null>) {
184
+ if (value === null) {
185
+ nativeMethods.setTargetingDataInterests(null);
186
+ } else if (isStringArray(value)) {
187
+ nativeMethods.setTargetingDataInterests(value as string[]);
188
+ } else {
189
+ printError("TargetingData.interests", "string[] or null", typeof value);
190
+ }
153
191
  },
154
192
 
155
193
  /**
156
194
  * Gets the interests of the user.
157
195
  */
158
- get interests(): Promise<string[] | null> {
196
+ get interests(): string[] | null | Promise<string[] | null> {
159
197
  return nativeMethods.getTargetingDataInterests();
160
198
  },
161
199
 
162
200
  /**
163
- * Clear all saved data from this class.
201
+ * Clears all saved data from this class.
164
202
  */
165
203
  clearAll(): void {
166
204
  nativeMethods.clearAllTargetingData();
167
205
  },
168
206
  }
207
+
208
+ const isStringArray = (strs: any): boolean => {
209
+ return Array.isArray(strs) && strs.every((value) => typeof value === 'string')
210
+ }
211
+
212
+ const printError = (fieldName: string, correctType: string, wrongType: string) => {
213
+ console.error("Cannot set value to " + fieldName + " with unsupported type: " + wrongType + ". Value has to be of type " + correctType + ".");
214
+ }
@@ -20,8 +20,8 @@ type NativeAdViewNativeEvents = {
20
20
  const NativeAdViewComponent = requireNativeComponent<NativeAdViewProps & ViewProps & NativeAdViewNativeEvents>('AppLovinMAXNativeAdView');
21
21
 
22
22
  /**
23
- * The {@link NativeAdView} component for building a native ad. This loads a native ad and renders it with
24
- * the asset views:
23
+ * The {@link NativeAdView} component that you use building a native ad. This loads a native ad and
24
+ * renders it with the asset views:
25
25
  *
26
26
  * - {@link IconView}
27
27
  * - {@link TitleView}
@@ -31,8 +31,9 @@ const NativeAdViewComponent = requireNativeComponent<NativeAdViewProps & ViewPro
31
31
  * - {@link MediaView}
32
32
  * - {@link CallToActionView}
33
33
  *
34
- * Each asset view will be filled with the data of a native ad when loaded, but you need to provide
35
- * the layout and style of the asset views. A new native ad can be re-loaded via the ref handler.
34
+ * {@link NativeAdView} fills each asset view with the data of a native ad as soon as it loads the native
35
+ * ad, but you need to provide the layout and style of the asset views.
36
+ * {@link NativeAdView} can reload a new native ad by using the ref handler.
36
37
  *
37
38
  * ### Example:
38
39
  * ```js
@@ -1,4 +1,4 @@
1
- import React, { useContext, useRef, useEffect } from "react";
1
+ import React, { useContext, useRef, useEffect, type ReactNode } from "react";
2
2
  import { findNodeHandle, Text, Image, View, TouchableOpacity, StyleSheet } from "react-native";
3
3
  import type { ViewProps, ImageProps, TextStyle, StyleProp } from "react-native";
4
4
  import { NativeAdViewContext } from "./NativeAdViewProvider";
@@ -159,7 +159,7 @@ export const StarRatingView = (props: ViewProps) => {
159
159
  return (
160
160
  <View {...restProps} style={[style, { flexDirection: 'row', alignItems: 'center' }]}>
161
161
  {(() => {
162
- let stars = [];
162
+ let stars: ReactNode[] = [];
163
163
  for (let index = 0; index < maxStarCount; index++) {
164
164
  if (nativeAd.starRating) {
165
165
  const width = (nativeAd.starRating - index) * starSize;
@@ -9,17 +9,17 @@ export type AdInfo = {
9
9
  adUnitId: string;
10
10
 
11
11
  /**
12
- * The creative id tied to the ad, if any. You can report creative issues to the corresponding
13
- * ad network using this id.
12
+ * The creative ID tied to the ad, if any. You can report creative issues to the corresponding
13
+ * ad network using this ID.
14
14
  *
15
- * @see {@link https://dash.applovin.com/documentation/mediation/react-native/testing-networks/creative-debugger#creative-id}
15
+ * @see {@link https://support.applovin.com/hc/en-us/articles/13986039797389-Creative-Debugger#h_01HC10588YYDNZMS1GPCVRD2E7}
16
16
  */
17
17
  creativeId?: string | null;
18
18
 
19
19
  /**
20
20
  * The ad network from which this ad was loaded.
21
21
  *
22
- * @see {@link https://dash.applovin.com/documentation/mediation/react-native/testing-networks/creative-debugger#network-name}
22
+ * @see {@link https://support.applovin.com/hc/en-us/articles/13986039797389-Creative-Debugger#h_01HC10588YWTJHYE1E35HWQTX7}
23
23
  */
24
24
  networkName: string;
25
25
 
@@ -31,12 +31,12 @@ export type AdInfo = {
31
31
 
32
32
  /**
33
33
  * The ad’s revenue amount. In the case where no revenue amount exists, or it is not available
34
- * yet, will return a value of 0.
34
+ * yet, return 0.
35
35
  */
36
36
  revenue: number;
37
37
 
38
38
  /**
39
- * The DSP network that provided the loaded ad when the ad is served through AppLovin Exchange.
39
+ * The DSP network that provides the loaded ad when the ad is served through AppLovin Exchange.
40
40
  */
41
41
  dspName?: string | null;
42
42
 
@@ -136,7 +136,7 @@ export type AdRewardInfo = AdInfo & {
136
136
  };
137
137
 
138
138
  /**
139
- * Represents a revenue given to the user.
139
+ * Represents revenue given to the publisher.
140
140
  */
141
141
  export type AdRevenueInfo = AdInfo & {
142
142
 
@@ -158,7 +158,7 @@ export type AdRevenueInfo = AdInfo & {
158
158
  revenuePrecision: string;
159
159
 
160
160
  /**
161
- * The current country code.
161
+ * The current country code where the ad was shown.
162
162
  */
163
163
  countryCode: string;
164
164
  };
@@ -169,47 +169,47 @@ export type AdRevenueInfo = AdInfo & {
169
169
  export type AdNativeInfo = {
170
170
 
171
171
  /**
172
- * The native ad title text.
172
+ * The native ad title text for {@link TitleView}.
173
173
  */
174
174
  title?: string;
175
175
 
176
176
  /**
177
- * The native ad advertiser text.
177
+ * The native ad advertiser text for {@link AdvertiserView}.
178
178
  */
179
179
  advertiser?: string;
180
180
 
181
181
  /**
182
- * The native ad body text.
182
+ * The native ad body text for {@link BodyView}}.
183
183
  */
184
184
  body?: string;
185
185
 
186
186
  /**
187
- * The native ad CTA button text.
187
+ * The native ad CTA (call to action) text for {@link CallToActionView}.
188
188
  */
189
189
  callToAction?: string;
190
190
 
191
191
  /**
192
- * The star rating of the native ad.
192
+ * The star rating of the native ad in the [0.0, 5.0] range for {@link StarRatingView}, if provided by the network.
193
193
  */
194
194
  starRating?: number;
195
195
 
196
196
  /**
197
- * The aspect ratio for the media view if provided by the network.
197
+ * The aspect ratio (width-to-height) for {@link MediaView} if provided by the network.
198
198
  */
199
199
  mediaContentAspectRatio?: number;
200
200
 
201
201
  /**
202
- * Whether or not the icon is available.
202
+ * Whether or not the content for {@link IconView} is available.
203
203
  */
204
204
  isIconImageAvailable: boolean;
205
205
 
206
206
  /**
207
- * Whether or not the Options view is available.
207
+ * Whether or not the content for {@link OptionsView} is available.
208
208
  */
209
209
  isOptionsViewAvailable: boolean;
210
210
 
211
211
  /**
212
- * Whether or not the Media view is available.
212
+ * Whether or not the content for {@link MediaView} is available.
213
213
  */
214
214
  isMediaViewAvailable: boolean;
215
215
  };
@@ -243,8 +243,8 @@ export type AdWaterfallInfo = {
243
243
  };
244
244
 
245
245
  /**
246
- * This enum contains possible states of an ad in the waterfall the adapter response info could
247
- * represent.
246
+ * This enum contains possible states of an ad in the waterfall.
247
+ * Each adapter response {@link AdNetworkResponseInfo} corresponds to one of these states.
248
248
  */
249
249
  export enum AdLoadState {
250
250
 
@@ -292,7 +292,7 @@ export type AdErrorInfo = {
292
292
  export type AdNetworkResponseInfo = {
293
293
 
294
294
  /**
295
- * The state of the ad that this object represents. For more info, see the {@link AdLoadState} enum.
295
+ * The state of the ad that this object represents. For more info, see the {@link AdLoadState} enum.
296
296
  */
297
297
  adLoadState: AdLoadState;
298
298
 
@@ -308,15 +308,15 @@ export type AdNetworkResponseInfo = {
308
308
 
309
309
  /**
310
310
  * The ad load error this network response resulted in. Will be unavailable if an attempt to
311
- * load an ad has not been made or an ad was loaded successfully (i.e. the loadState is NOT
312
- * LoadStateAdFailedToLoad).
311
+ * load an ad has not been made or an ad was loaded successfully (i.e. {@link adLoadState}
312
+ * is NOT LoadStateAdFailedToLoad).
313
313
  */
314
314
  error?: AdErrorInfo;
315
315
 
316
316
  /**
317
- * The amount of time the network took to load (either successfully or not) an ad, in
318
- * milliseconds. If an attempt to load an ad has not been made (i.e. the loadState is
319
- * LoadStateAdLoadNotAttempted), the value will be -1.
317
+ * The amount of time the network took to load (either successfully or not) an ad, in milliseconds.
318
+ * If an attempt to load an ad has not been made (i.e. {@link adLoadState} is LoadStateAdLoadNotAttempted),
319
+ * the value will be -1.
320
320
  */
321
321
  latencyMillis: number;
322
322
  };
@@ -6,7 +6,7 @@ import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo, AdRevenueInfo } fro
6
6
  export type AdProps = {
7
7
 
8
8
  /**
9
- * A string value representing the ad unit id to load ads for.
9
+ * A string value representing the ad unit ID to load ads for.
10
10
  */
11
11
  adUnitId: string;
12
12
 
@@ -34,27 +34,27 @@ export type AdProps = {
34
34
  localExtraParameters?: { [key: string]: any };
35
35
 
36
36
  /**
37
- * A callback fuction to be fired when a new ad has been loaded.
37
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it loads a new ad.
38
38
  */
39
39
  onAdLoaded?: (adInfo: AdInfo) => void;
40
40
 
41
41
  /**
42
- * A callback fuction to be fired when an ad could not be retrieved.
42
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it could not load a new ad.
43
43
  */
44
44
  onAdLoadFailed?: (error: AdLoadFailedInfo) => void;
45
45
 
46
46
  /**
47
- * A callback fuction to be fired when the ad failed to display.
47
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it fails to display the ad.
48
48
  */
49
49
  onAdDisplayFailed?: (error: AdDisplayFailedInfo) => void;
50
50
 
51
51
  /**
52
- * A callback fuction to be fired when ad is clicked.
52
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when the user clicks the ad.
53
53
  */
54
54
  onAdClicked?: (adInfo: AdInfo) => void;
55
55
 
56
56
  /**
57
- * A callback fuction to be fired when the revenue event is detected.
57
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
58
58
  */
59
59
  onAdRevenuePaid?: (adInfo: AdRevenueInfo) => void;
60
60
  };
@@ -8,7 +8,7 @@ import type { AdFormat } from "../AdView";
8
8
  export type AdViewProps = AdProps & {
9
9
 
10
10
  /**
11
- * A string value representing the ad format to load ads for. Should be either
11
+ * An enum value representing the ad format to load ads for. Should be either
12
12
  * {@link AdFormat.BANNER} or {@link AdFormat.MREC}.
13
13
  */
14
14
  adFormat: AdFormat;
@@ -25,12 +25,12 @@ export type AdViewProps = AdProps & {
25
25
  autoRefresh?: boolean;
26
26
 
27
27
  /**
28
- * A callback fuction to be fired when the ad view is expanded.
28
+ * A callback fuction that {@link AdView} fires when it expands the ad.
29
29
  */
30
30
  onAdExpanded?: (adInfo: AdInfo) => void;
31
31
 
32
32
  /**
33
- * A callback fuction to be fired when the ad view is collapsed.
33
+ * A callback fuction that {@link AdView} fires when it collapses the ad.
34
34
  */
35
35
  onAdCollapsed?: (adInfo: AdInfo) => void;
36
36
  };
@@ -6,14 +6,15 @@ import type { Configuration } from "./Configuration";
6
6
  export type AppLovinMAXType = {
7
7
 
8
8
  /**
9
- * Whether the SDK has fully been initialized without errors and the completion callback called.
9
+ * Indicates whether or not the AppLovinMAX SDK has fully initialized without errors and
10
+ * {@link AppLovinMAX.initialize()} has called the completion callback.
10
11
  */
11
12
  isInitialized(): Promise<boolean>;
12
13
 
13
14
  /**
14
- * Initializes the SDK, and returns Configuration when it finishes initializing.
15
+ * Initializes the AppLovinMAX SDK, and returns {@link Configuration} when it finishes initializing.
15
16
  *
16
- * @param sdkKey SDK key to use for the instance of the AppLovin SDK.
17
+ * @param sdkKey SDK key to use for the instance of the AppLovinMAX SDK.
17
18
  */
18
19
  initialize(sdkKey: string): Promise<Configuration>;
19
20
 
@@ -28,7 +29,7 @@ export type AppLovinMAXType = {
28
29
  isTablet(): Promise<boolean>;
29
30
 
30
31
  /**
31
- * Sets an id for the current user. This identifier will be tied to SDK events and AppLovin’s
32
+ * Sets an ID for the current user. AppLovin ties this identifier to SDK events and AppLovin’s
32
33
  * optional S2S postbacks.
33
34
  *
34
35
  * @param userId User id.
@@ -36,7 +37,7 @@ export type AppLovinMAXType = {
36
37
  setUserId(userId: string): void;
37
38
 
38
39
  /**
39
- * Sets a muted state or not for beginning video ads.
40
+ * Sets a muted state (or not) as the initial state for video ads.
40
41
  *
41
42
  * @param muted If ads should begin in a muted state.
42
43
  */
@@ -48,29 +49,29 @@ export type AppLovinMAXType = {
48
49
  isMuted(): Promise<boolean>;
49
50
 
50
51
  /**
51
- * A toggle for verbose logging for the SDK.
52
+ * A toggle for verbose logging for the AppLovinMAX SDK.
52
53
  *
53
- * @param verboseLoggingEnabled True if log messages should be output.
54
+ * @param verboseLoggingEnabled true if the AppLovinMAX SDK should output log messages.
54
55
  */
55
56
  setVerboseLogging(verboseLoggingEnabled: boolean): void;
56
57
 
57
58
  /**
58
- * Enable devices to receive test ads by passing in the advertising identifier (IDFA) of each
59
- * test device. Refer to AppLovin logs for the IDFA of your current device.
59
+ * Enables devices to receive test ads by passing in the advertising identifier (IDFA) of each
60
+ * test device. Refer to AppLovin logs for the IDFA of your current device.
60
61
  *
61
62
  * @param advertisingIds A list of the advertising ids.
62
63
  */
63
64
  setTestDeviceAdvertisingIds(advertisingIds: string[]): void;
64
65
 
65
66
  /**
66
- * Whether the Creative Debugger will be displayed after flipping the device screen down twice.
67
+ * Whether the Creative Debugger displays after you flip the device screen down twice.
67
68
  *
68
69
  * @param enabled Default to true.
69
70
  */
70
71
  setCreativeDebuggerEnabled(enabled: boolean): void;
71
72
 
72
73
  /**
73
- * Set an extra parameter to pass to the AppLovin server.
74
+ * Sets an extra parameter to pass to the AppLovin server.
74
75
  *
75
76
  * @param key Parameter key.
76
77
  * @param value Parameter value.
@@ -78,7 +79,7 @@ export type AppLovinMAXType = {
78
79
  setExtraParameter(key: string, value: string | null): void;
79
80
 
80
81
  /**
81
- * Whether or not the SDK will collect the device location.
82
+ * Whether or not the AppLovinMAX SDK collects the device location.
82
83
  *
83
84
  * @param enabled Defaults to true.
84
85
  */
@@ -8,8 +8,8 @@ export type BannerAdType = ViewAdType & {
8
8
  *
9
9
  * @param adUnitId The Ad Unit ID to load ads for.
10
10
  * @param position {@ AdViewPosition} position.
11
- * @param xOffset Offset from the left corner.
12
- * @param yOffset Offset from the top corner.
11
+ * @param xOffset Horizontal offset from the left position.
12
+ * @param yOffset Vertical offset from the top position.
13
13
  */
14
14
  createAd(adUnitId: string, position: AdViewPosition, xOffset?: number, yOffset?: number): void;
15
15
 
@@ -33,8 +33,8 @@ export type BannerAdType = ViewAdType & {
33
33
  * Updates the banner position offsets.
34
34
  *
35
35
  * @param adUnitId The Ad Unit ID to load ads for.
36
- * @param xOffset Offset from the left corner.
37
- * @param yOffset Offset from the top corner.
36
+ * @param xOffset Horizontal offset from the left position.
37
+ * @param yOffset Vertical offset from the top position.
38
38
  */
39
39
  updateOffsets(adUnitId: string, xOffset: number, yOffset: number): void;
40
40
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Encapsulates various data for the SDK configuration.
2
+ * Encapsulates data for the AppLovinMAX SDK configuration.
3
3
  */
4
4
  export type Configuration = {
5
5
 
@@ -2,29 +2,29 @@ import type { AdEventListener } from "./AdEvent";
2
2
  import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo, AdDisplayFailedInfo } from "./AdInfo";
3
3
 
4
4
  /**
5
- * Define a fullscreen ad (i.e Intestitial / Rewarded / AppOpen)
5
+ * Defines a full-screen ad (i.e Intestitial / Rewarded / AppOpen)
6
6
  */
7
7
  export type FullscreenAdType = {
8
8
 
9
9
  /**
10
10
  * Whether or not this ad is ready to be shown.
11
11
  *
12
- * @param adUnitId The Ad Unit ID to load ads for.
12
+ * @param adUnitId The ad unit ID of the ad to check whether it is ready to be shown.
13
13
  */
14
14
  isAdReady(adUnitId: string): Promise<boolean>;
15
15
 
16
16
  /**
17
17
  * Loads an interstitial ad.
18
18
  *
19
- * @param adUnitId The Ad Unit ID to load ads for.
19
+ * @param adUnitId The ad unit ID to load an ad for.
20
20
  */
21
21
  loadAd(adUnitId: string): void;
22
22
 
23
23
  /**
24
- * Show the loaded interstitial ad, optionallly for a given placement and custom data to tie ad
24
+ * Shows the loaded interstitial ad, optionallly for a given placement and custom data to tie ad
25
25
  * events to.
26
26
  *
27
- * @param adUnitId The Ad Unit ID to load ads for.
27
+ * @param adUnitId The ad unit ID of the ad to show.
28
28
  * @param placement The placement to tie the showing ad's events to.
29
29
  * @param customData The custom data to tie the showing ad's events to. Maximum size is 8KB.
30
30
  */
@@ -33,103 +33,109 @@ export type FullscreenAdType = {
33
33
  /**
34
34
  * Sets an extra key/value parameter for the ad.
35
35
  *
36
- * @param adUnitId The Ad Unit ID to load ads for.
36
+ * @param adUnitId The ad unit ID of the ad to set a parameter for.
37
37
  * @param key Parameter key.
38
38
  * @param value Parameter value.
39
39
  */
40
40
  setExtraParameter(adUnitId: string, key: string, value: string | null): void;
41
41
 
42
42
  /**
43
- * Set a local extra parameter to pass to the adapter instances.
43
+ * Sets a local extra parameter to pass to the adapter instances.
44
44
  *
45
- * @param adUnitId The Ad Unit ID to load ads for.
45
+ * @param adUnitId The ad unit ID of the ad to set a local parameter for.
46
46
  * @param key Parameter key.
47
47
  * @param value Parameter value.
48
48
  */
49
49
  setLocalExtraParameter(adUnitId: string, key: string, value: any): void;
50
50
 
51
51
  /**
52
- * Adds the specified event listener to receive {@link AdInfo} when a new ad has been loaded.
52
+ * Adds the specified event listener to receive {@link AdInfo} when a full-screen ad loads a new ad.
53
53
  *
54
54
  * @param listener Listener to be notified.
55
55
  */
56
56
  addAdLoadedEventListener(listener: AdEventListener<AdInfo>): void;
57
57
 
58
58
  /**
59
- * Removes the event listener to receive {@link AdInfo} when a new ad has been loaded.
59
+ * Removes the event listener to receive {@link AdInfo} when a full-screen ad loads a new ad.
60
60
  */
61
61
  removeAdLoadedEventListener(): void;
62
62
 
63
63
  /**
64
- * Adds the specified event listener to receive {@link AdLoadFailedInfo} when an ad could not be loaded.
64
+ * Adds the specified event listener to receive {@link AdLoadFailedInfo} when a full-screen ad
65
+ * could not load a new ad.
65
66
  *
66
67
  * @param listener Listener to be notified.
67
68
  */
68
69
  addAdLoadFailedEventListener(listener: AdEventListener<AdLoadFailedInfo>): void;
69
70
 
70
71
  /**
71
- * Removes the event listener to receive {@ link adLoadFailedInfo} when an ad could not be loaded.
72
+ * Removes the event listener to receive {@ link adLoadFailedInfo} when a full-screen ad could
73
+ * not load a new ad.
72
74
  */
73
75
  removeAdLoadFailedEventListener(): void;
74
76
 
75
77
  /**
76
- * Adds the specified event listener to receive {@link AdInfo} when the ad is clicked.
78
+ * Adds the specified event listener to receive {@link AdInfo} when the user clicks the ad.
77
79
  *
78
80
  * @param listener Listener to be notified.
79
81
  */
80
82
  addAdClickedEventListener(listener: AdEventListener<AdInfo>): void;
81
83
 
82
84
  /**
83
- * Removes the event listener to receive {@link AdInfo} when the ad is clicked.
85
+ * Removes the event listener to receive {@link AdInfo} when the user clicks the ad.
84
86
  */
85
87
  removeAdClickedEventListener(): void;
86
88
 
87
89
  /**
88
- * Adds the specified event listener to receive {@link AdInfo} when the ad is displayed.
90
+ * Adds the specified event listener to receive {@link AdInfo} when a full-screen ad displays the ad.
89
91
  *
90
92
  * @param listener Listener to be notified.
91
93
  */
92
94
  addAdDisplayedEventListener(listener: AdEventListener<AdInfo>): void;
93
95
 
94
96
  /**
95
- * Removes the event listener to receive {@link AdInfo} when the ad is displayed.
97
+ * Removes the event listener to receive {@link AdInfo} when a full-screen ad displays the ad.
96
98
  */
97
99
  removeAdDisplayedEventListener(): void;
98
100
 
99
101
  /**
100
- * Adds the specified event listener to receive {@link AdDisplayFailedInfo} when the ad is failed to
101
- * display.
102
+ * Adds the specified event listener to receive {@link AdDisplayFailedInfo} when a full-screen
103
+ * ad fails to display the ad.
102
104
  *
103
105
  * @param listener Listener to be notified.
104
106
  */
105
107
  addAdFailedToDisplayEventListener(listener: AdEventListener<AdDisplayFailedInfo>): void;
106
108
 
107
109
  /**
108
- * Removes the event listener to receive {@link AdDisplayFailedInfo} when the ad is failed to display.
110
+ * Removes the event listener to receive {@link AdDisplayFailedInfo} when a full-screen ad
111
+ * fails to display the ad.
109
112
  */
110
113
  removeAdFailedToDisplayEventListener(): void;
111
114
 
112
115
  /**
113
- * Adds the specified event listener to receive {@link AdInfo} when the ad is hidden.
116
+ * Adds the specified event listener to receive {@link AdInfo} when a full-screen ad hides the
117
+ * ad.
114
118
  *
115
119
  * @param listener Listener to be notified.
116
120
  */
117
121
  addAdHiddenEventListener(listener: AdEventListener<AdInfo>): void;
118
122
 
119
123
  /**
120
- * Removes the event listener to receive {@link AdInfo} when the ad is hidden.
124
+ * Removes the event listener to receive {@link AdInfo} when a full-screen ad hides the ad.
121
125
  */
122
126
  removeAdHiddenEventListener(): void;
123
127
 
124
- /**
125
- * Adds the specified event listener to receive {@link AdRevenueInfo} when the ad revenue is paid.
128
+ /**
129
+ * Adds the specified event listener to receive {@link AdRevenueInfo} when a full-screen ad
130
+ * pays ad revenue to the publisher.
126
131
  *
127
132
  * @param listener Listener to be notified.
128
133
  */
129
134
  addAdRevenuePaidListener(listener: AdEventListener<AdRevenueInfo>): void;
130
135
 
131
136
  /**
132
- * Removes the event listener to receive {@link AdRevenueInfo} when the ad revenue is paid.
137
+ * Removes the event listener to receive {@link AdRevenueInfo} when a full-screen ad pays
138
+ * ad revenue to the publisher.
133
139
  */
134
140
  removeAdRevenuePaidListener(): void;
135
141
  };
@@ -5,19 +5,19 @@ export type PrivacyType = {
5
5
  /**********************************************************************************/
6
6
 
7
7
  /**
8
- * Show the user consent dialog to the user using one from AppLovin's SDK.
8
+ * Shows the user consent dialog to the user by using a dialog in the AppLovinMAX SDK.
9
9
  */
10
10
  showConsentDialog(): Promise<void>;
11
11
 
12
12
  /**
13
- * Sets whether or not the user has provided consent for information-sharing with AppLovin.
13
+ * Sets whether or not the user provided consent for information-sharing with AppLovin.
14
14
  *
15
- * @param hasUserConsent true if the user has provided consent for information sharing.
15
+ * @param hasUserConsent true if the user provided consent for information sharing.
16
16
  */
17
17
  setHasUserConsent(hasUserConsent: boolean): void;
18
18
 
19
19
  /**
20
- * Checks if user has set consent for information sharing.
20
+ * Checks if user set consent for information sharing.
21
21
  */
22
22
  hasUserConsent(): Promise<boolean>;
23
23
 
@@ -34,14 +34,14 @@ export type PrivacyType = {
34
34
  isAgeRestrictedUser(): Promise<boolean>;
35
35
 
36
36
  /**
37
- * Sets whether or not the user has opted out of the sale of their personal information.
37
+ * Sets whether or not the user opted out of the sale of their personal information.
38
38
  *
39
- * @param doNotSell true if the user has opted out of the sale of their personal information.
39
+ * @param doNotSell true if the user opted out of the sale of their personal information.
40
40
  */
41
41
  setDoNotSell(doNotSell: boolean): void;
42
42
 
43
43
  /**
44
- * Checks if the user has opted out of the sale of their personal information.
44
+ * Checks if the user opted out of the sale of their personal information.
45
45
  */
46
46
  isDoNotSell(): Promise<boolean>;
47
47
 
@@ -50,22 +50,23 @@ export type PrivacyType = {
50
50
  /**********************************************************************************/
51
51
 
52
52
  /**
53
- * Enable the MAX Terms Flow.
53
+ * Enables the MAX Terms Flow.
54
54
  *
55
- * @param enabled Enable the MAX Terms Flow.
55
+ * @param enabled true to enable the MAX Terms Flow.
56
56
  */
57
57
  setConsentFlowEnabled(enabled: boolean): Promise<void>;
58
58
 
59
59
  /**
60
- * URL for your company’s privacy policy. This is required in order to enable the Terms Flow.
60
+ * The URL of your company’s privacy policy, as a string. This is required in order to enable
61
+ * the Terms Flow.
61
62
  *
62
63
  * @param urlString The URL string to point your company’s privacy policy.
63
64
  */
64
65
  setPrivacyPolicyUrl(urlString: string): Promise<void>;
65
66
 
66
67
  /**
67
- * URL for your company’s terms of service. This is optional; you can enable the Terms Flow with
68
- * or without it.
68
+ * The URL of your company’s terms of service, as a string. This is optional; you can enable
69
+ * the Terms Flow with or without it.
69
70
  *
70
71
  * @param urlString The URL string to point your company’s terms of service.
71
72
  */
@@ -5,14 +5,16 @@ import type { FullscreenAdType } from "./FullscreenAd";
5
5
  export type RewardedAdType = FullscreenAdType & {
6
6
 
7
7
  /**
8
- * Adds the specified event listener to receive {@link AdRewardInfo} when the ad is rewarded.
8
+ * Adds the specified event listener to receive {@link AdRewardInfo} when {@link RewardedAd}
9
+ * rewards the user.
9
10
  *
10
11
  * @param listener Listener to be notified.
11
12
  */
12
13
  addAdReceivedRewardEventListener(listener: AdEventListener<AdRewardInfo>): void;
13
14
 
14
15
  /**
15
- * Removes the event listener to receive {@link AdRewardInfo} when the ad is rewarded.
16
+ * Removes the event listener to receive {@link AdRewardInfo} when {@link RewardedAd} rewards
17
+ * the user.
16
18
  */
17
19
  removeAdReceivedRewardEventListener(): void;
18
20
  };
@@ -0,0 +1,51 @@
1
+ import type { AdContentRating, UserGender } from "src/TargetingData";
2
+
3
+ /**
4
+ * Defines additional data for the publisher to send to AppLovin.
5
+ *
6
+ * @see {@link https://support.applovin.com/hc/en-us/articles/13964925614733-Data-and-Keyword-Passing}
7
+ */
8
+ export type TargetingDataType = {
9
+
10
+ /**
11
+ * Sets the year of birth of the user. Set this to 0 to clear this value.
12
+ */
13
+ yearOfBirth: number | Promise<number>;
14
+
15
+ /**
16
+ * Sets the gender of the user. Set this to {@link UserGender.Unknown} to clear this value.
17
+ */
18
+ gender: UserGender | Promise<UserGender>;
19
+
20
+ /**
21
+ * Sets the maximum ad content rating shown to the user. The levels are based on IQG Media
22
+ * Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
23
+ * Set this to {@link AdContentRating.None} to clear this value.
24
+ */
25
+ maximumAdContentRating: AdContentRating | Promise<AdContentRating>;
26
+
27
+ /**
28
+ * Sets the email of the user. Set this to null to clear this value.
29
+ */
30
+ email: string | null | Promise<string | null>;
31
+
32
+ /**
33
+ * Sets the phone number of the user. Set this to null to clear this value.
34
+ */
35
+ phoneNumber: string | null | Promise<string | null>;
36
+
37
+ /**
38
+ * Sets the keywords describing the application. Set this to null to clear this value.
39
+ */
40
+ keywords: string[] | null | Promise<string[] | null>;
41
+
42
+ /**
43
+ * Sets the interests of the user. Set this to null to clear this value.
44
+ */
45
+ interests: string[] | null | Promise<string[] | null>;
46
+
47
+ /**
48
+ * Clears all saved data from this class.
49
+ */
50
+ clearAll(): void;
51
+ };
@@ -3,35 +3,35 @@ import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo } from "./AdInfo";
3
3
  import type { AdViewPosition } from "../AdView";
4
4
 
5
5
  /**
6
- * Define a view based ad (i.e. Banner / MREC)
6
+ * Define a view-based ad (i.e. Banner / MREC)
7
7
  */
8
8
  export type ViewAdType = {
9
9
 
10
10
  /**
11
- * Destroys the banner/mrec.
11
+ * Destroys the banner/MREC.
12
12
  *
13
- * @param adUnitId The Ad Unit ID to to load ads for.
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/mrec.
18
+ * Shows the banner/MREC.
19
19
  *
20
- * @param adUnitId The Ad Unit ID to to load ads for.
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/mrec.
25
+ * Hides the banner/MREC.
26
26
  *
27
- * @param adUnitId The Ad Unit ID to to load ads for.
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 Ad Unit ID to to load ads for.
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;
@@ -39,7 +39,7 @@ export type ViewAdType = {
39
39
  /**
40
40
  * Sets custom data to tie the showing ad’s events to.
41
41
  *
42
- * @param adUnitId The Ad Unit ID to to load ads for.
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;
@@ -47,7 +47,7 @@ export type ViewAdType = {
47
47
  /**
48
48
  * Updates the banner/mrec position.
49
49
  *
50
- * @param adUnitId The Ad Unit ID to to load ads for.
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;
@@ -55,7 +55,7 @@ export type ViewAdType = {
55
55
  /**
56
56
  * Sets an extra key/value parameter for the ad.
57
57
  *
58
- * @param adUnitId The Ad Unit ID to to load ads for.
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
  */
@@ -64,7 +64,7 @@ export type ViewAdType = {
64
64
  /**
65
65
  * Set a local extra parameter to pass to the adapter instances.
66
66
  *
67
- * @param adUnitId The Ad Unit ID to to load ads for.
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
  */
@@ -73,86 +73,90 @@ export type ViewAdType = {
73
73
  /**
74
74
  * Starts or resumes auto-refreshing of the banner/mrec.
75
75
  *
76
- * @param adUnitId The Ad Unit ID to to load ads for.
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
82
  *
83
- * @param adUnitId The Ad Unit ID to to load ads for.
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 new ad has been loaded.
88
+ * Adds the specified event listener to receive {@link AdInfo} when a view-base ad loads a new ad.
89
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 new ad has been loaded.
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 an ad could not be loaded.
100
+ * Adds the specified event listener to receive {@link AdLoadFailedInfo} when a view-base ad
101
+ * could not load a new ad.
101
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 an ad could not be loaded.
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 ad is clicked.
114
+ * Adds the specified event listener to receive {@link AdInfo} when the user clicks the ad.
113
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 ad is clicked.
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 the ad is collapsed.
126
+ * Adds the specified event listener to receive {@link AdInfo} when a view-base ad collapses the ad.
125
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 the ad is collapsed.
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 the ad is expanded.
138
+ * Adds the specified event listener to receive {@link AdInfo} when a view-base ad expands the ad.
137
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 the ad is expanded.
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 the ad revenue is paid.
150
+ * Adds the specified event listener to receive {@link AdRevenueInfo} when a view-base ad pays
151
+ * ad revenue to the publisher.
149
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 the ad revenue is paid.
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
  };