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.
@@ -1,12 +1,16 @@
1
- import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo, AdRevenueInfo } from "./AdInfo";
1
+ import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo, AdRevenueInfo } from './AdInfo';
2
+
3
+ /**
4
+ * Local extra parameters can be of type: string, number, boolean, array, map, and null.
5
+ */
6
+ export type LocalExtraParameterValue = string | number | boolean | object | null;
2
7
 
3
8
  /**
4
9
  * Defines the base properties for the UI component ads i.e {@link Adview} and {@link NativeAdView}.
5
10
  */
6
11
  export type AdProps = {
7
-
8
12
  /**
9
- * A string value representing the ad unit id to load ads for.
13
+ * A string value representing the ad unit ID to load ads for.
10
14
  */
11
15
  adUnitId: string;
12
16
 
@@ -31,30 +35,30 @@ export type AdProps = {
31
35
  * A dictionary value representing the local extra parameters to set a list of key-value pairs
32
36
  * to pass to the adapter instances.
33
37
  */
34
- localExtraParameters?: { [key: string]: any };
38
+ localExtraParameters?: { [key: string]: LocalExtraParameterValue };
35
39
 
36
40
  /**
37
- * A callback fuction to be fired when a new ad has been loaded.
41
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it loads a new ad.
38
42
  */
39
43
  onAdLoaded?: (adInfo: AdInfo) => void;
40
44
 
41
45
  /**
42
- * A callback fuction to be fired when an ad could not be retrieved.
46
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it could not load a new ad.
43
47
  */
44
48
  onAdLoadFailed?: (error: AdLoadFailedInfo) => void;
45
49
 
46
50
  /**
47
- * A callback fuction to be fired when the ad failed to display.
51
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it fails to display the ad.
48
52
  */
49
53
  onAdDisplayFailed?: (error: AdDisplayFailedInfo) => void;
50
54
 
51
55
  /**
52
- * A callback fuction to be fired when ad is clicked.
56
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when the user clicks the ad.
53
57
  */
54
58
  onAdClicked?: (adInfo: AdInfo) => void;
55
59
 
56
60
  /**
57
- * A callback fuction to be fired when the revenue event is detected.
61
+ * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
58
62
  */
59
63
  onAdRevenuePaid?: (adInfo: AdRevenueInfo) => void;
60
64
  };
@@ -1,14 +1,13 @@
1
- import type { AdProps } from "./AdProps";
2
- import type { AdInfo } from "./AdInfo";
3
- import type { AdFormat } from "../AdView";
1
+ import type { AdProps } from './AdProps';
2
+ import type { AdInfo } from './AdInfo';
3
+ import type { AdFormat } from '../AdView';
4
4
 
5
5
  /**
6
6
  * Represents an {@link AdView} - Banner / MREC.
7
7
  */
8
8
  export type AdViewProps = AdProps & {
9
-
10
9
  /**
11
- * A string value representing the ad format to load ads for. Should be either
10
+ * An enum value representing the ad format to load ads for. Should be either
12
11
  * {@link AdFormat.BANNER} or {@link AdFormat.MREC}.
13
12
  */
14
13
  adFormat: AdFormat;
@@ -25,12 +24,12 @@ export type AdViewProps = AdProps & {
25
24
  autoRefresh?: boolean;
26
25
 
27
26
  /**
28
- * A callback fuction to be fired when the ad view is expanded.
27
+ * A callback fuction that {@link AdView} fires when it expands the ad.
29
28
  */
30
29
  onAdExpanded?: (adInfo: AdInfo) => void;
31
30
 
32
31
  /**
33
- * A callback fuction to be fired when the ad view is collapsed.
32
+ * A callback fuction that {@link AdView} fires when it collapses the ad.
34
33
  */
35
34
  onAdCollapsed?: (adInfo: AdInfo) => void;
36
35
  };
@@ -1,19 +1,19 @@
1
- import type { Configuration } from "./Configuration";
1
+ import type { Configuration } from './Configuration';
2
2
 
3
3
  /**
4
4
  * Represents the AppLovinMAX module.
5
5
  */
6
6
  export type AppLovinMAXType = {
7
-
8
7
  /**
9
- * Whether the SDK has fully been initialized without errors and the completion callback called.
8
+ * Indicates whether or not the AppLovinMAX SDK has fully initialized without errors and
9
+ * {@link AppLovinMAX.initialize()} has called the completion callback.
10
10
  */
11
11
  isInitialized(): Promise<boolean>;
12
12
 
13
13
  /**
14
- * Initializes the SDK, and returns Configuration when it finishes initializing.
15
- *
16
- * @param sdkKey SDK key to use for the instance of the AppLovin SDK.
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
17
  */
18
18
  initialize(sdkKey: string): Promise<Configuration>;
19
19
 
@@ -28,15 +28,15 @@ export type AppLovinMAXType = {
28
28
  isTablet(): Promise<boolean>;
29
29
 
30
30
  /**
31
- * Sets an id for the current user. This identifier will be tied to SDK events and AppLovin’s
31
+ * Sets an ID for the current user. AppLovin ties this identifier to SDK events and AppLovin’s
32
32
  * optional S2S postbacks.
33
- *
33
+ *
34
34
  * @param userId User id.
35
35
  */
36
36
  setUserId(userId: string): void;
37
37
 
38
38
  /**
39
- * Sets a muted state or not for beginning video ads.
39
+ * Sets a muted state (or not) as the initial state for video ads.
40
40
  *
41
41
  * @param muted If ads should begin in a muted state.
42
42
  */
@@ -48,39 +48,39 @@ export type AppLovinMAXType = {
48
48
  isMuted(): Promise<boolean>;
49
49
 
50
50
  /**
51
- * A toggle for verbose logging for the SDK.
51
+ * A toggle for verbose logging for the AppLovinMAX SDK.
52
52
  *
53
- * @param verboseLoggingEnabled True if log messages should be output.
53
+ * @param verboseLoggingEnabled true if the AppLovinMAX SDK should output log messages.
54
54
  */
55
55
  setVerboseLogging(verboseLoggingEnabled: boolean): void;
56
56
 
57
57
  /**
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.
60
- *
58
+ * Enables 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.
60
+ *
61
61
  * @param advertisingIds A list of the advertising ids.
62
62
  */
63
63
  setTestDeviceAdvertisingIds(advertisingIds: string[]): void;
64
64
 
65
65
  /**
66
- * Whether the Creative Debugger will be displayed after flipping the device screen down twice.
66
+ * Whether the Creative Debugger displays after you flip the device screen down twice.
67
67
  *
68
68
  * @param enabled Default to true.
69
69
  */
70
70
  setCreativeDebuggerEnabled(enabled: boolean): void;
71
71
 
72
72
  /**
73
- * Set an extra parameter to pass to the AppLovin server.
74
- *
73
+ * Sets an extra parameter to pass to the AppLovin server.
74
+ *
75
75
  * @param key Parameter key.
76
76
  * @param value Parameter value.
77
77
  */
78
78
  setExtraParameter(key: string, value: string | null): void;
79
79
 
80
80
  /**
81
- * Whether or not the SDK will collect the device location.
81
+ * Whether or not the AppLovinMAX SDK collects the device location.
82
82
  *
83
83
  * @param enabled Defaults to true.
84
84
  */
85
- setLocationCollectionEnabled(enabled: boolean): Promise<void>;
85
+ setLocationCollectionEnabled(enabled: boolean): void;
86
86
  };
@@ -1,3 +1,3 @@
1
- import type { FullscreenAdType } from "./FullscreenAd";
1
+ import type { FullscreenAdType } from './FullscreenAd';
2
2
 
3
3
  export type AppOpenAdType = FullscreenAdType;
@@ -1,21 +1,20 @@
1
- import type { ViewAdType } from "./ViewAd";
2
- import type { AdViewPosition } from "../AdView";
1
+ import type { ViewAdType } from './ViewAd';
2
+ import type { AdViewPosition } from '../AdView';
3
3
 
4
4
  export type BannerAdType = ViewAdType & {
5
-
6
5
  /**
7
6
  * Creates a banner at the specified position and offsets.
8
- *
7
+ *
9
8
  * @param adUnitId The Ad Unit ID to load ads for.
10
9
  * @param position {@ AdViewPosition} position.
11
- * @param xOffset Offset from the left corner.
12
- * @param yOffset Offset from the top corner.
10
+ * @param xOffset Horizontal offset from the left position.
11
+ * @param yOffset Vertical offset from the top position.
13
12
  */
14
13
  createAd(adUnitId: string, position: AdViewPosition, xOffset?: number, yOffset?: number): void;
15
14
 
16
15
  /**
17
- * Sets a background color for the banner.
18
- *
16
+ * Sets a background color for the banner.
17
+ *
19
18
  * @param adUnitId The Ad Unit ID to load ads for.
20
19
  * @param hexColorCode Hexadecimal color (#rrggbb).
21
20
  */
@@ -23,7 +22,7 @@ export type BannerAdType = ViewAdType & {
23
22
 
24
23
  /**
25
24
  * Sets the banner width.
26
- *
25
+ *
27
26
  * @param adUnitId The Ad Unit ID to load ads for.
28
27
  * @param width The desired banner width.
29
28
  */
@@ -31,16 +30,16 @@ export type BannerAdType = ViewAdType & {
31
30
 
32
31
  /**
33
32
  * Updates the banner position offsets.
34
- *
33
+ *
35
34
  * @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.
35
+ * @param xOffset Horizontal offset from the left position.
36
+ * @param yOffset Vertical offset from the top position.
38
37
  */
39
38
  updateOffsets(adUnitId: string, xOffset: number, yOffset: number): void;
40
39
 
41
40
  /**
42
41
  * Gets the adaptive banner size for the provided width at the current orientation.
43
- *
42
+ *
44
43
  * @param width The banner width.
45
44
  */
46
45
  getAdaptiveHeightForWidth(width: number): Promise<number>;
@@ -1,11 +1,9 @@
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
-
6
5
  /**
7
- * The country code of this user.
6
+ * The country code of this user.
8
7
  */
9
8
  countryCode: string;
10
9
  };
11
-
@@ -1,30 +1,30 @@
1
- import type { AdEventListener } from "./AdEvent";
2
- import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo, AdDisplayFailedInfo } from "./AdInfo";
1
+ import type { AdEventListener } from './AdEvent';
2
+ import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo, AdDisplayFailedInfo } from './AdInfo';
3
+ import type { LocalExtraParameterValue } from './AdProps';
3
4
 
4
5
  /**
5
- * Define a fullscreen ad (i.e Intestitial / Rewarded / AppOpen)
6
+ * Defines a full-screen ad (i.e Intestitial / Rewarded / AppOpen)
6
7
  */
7
8
  export type FullscreenAdType = {
8
-
9
9
  /**
10
10
  * Whether or not this ad is ready to be shown.
11
- *
12
- * @param adUnitId The Ad Unit ID to load ads for.
11
+ *
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
- *
19
- * @param adUnitId The Ad Unit ID to load ads for.
18
+ *
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
- *
27
- * @param adUnitId The Ad Unit ID to load ads for.
26
+ *
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
  */
@@ -32,104 +32,110 @@ export type FullscreenAdType = {
32
32
 
33
33
  /**
34
34
  * Sets an extra key/value parameter for the ad.
35
- *
36
- * @param adUnitId The Ad Unit ID to load ads for.
35
+ *
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
- setLocalExtraParameter(adUnitId: string, key: string, value: any): void;
49
+ setLocalExtraParameter(adUnitId: string, key: string, value: LocalExtraParameterValue): void;
50
50
 
51
51
  /**
52
- * Adds the specified event listener to receive {@link AdInfo} when a new ad has been loaded.
53
- *
52
+ * Adds the specified event listener to receive {@link AdInfo} when a full-screen ad loads a new ad.
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.
65
- *
64
+ * Adds the specified event listener to receive {@link AdLoadFailedInfo} when a full-screen ad
65
+ * could not load a new ad.
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
- */
72
+ * Removes the event listener to receive {@ link adLoadFailedInfo} when a full-screen ad could
73
+ * not load a new ad.
74
+ */
73
75
  removeAdLoadFailedEventListener(): void;
74
76
 
75
77
  /**
76
- * Adds the specified event listener to receive {@link AdInfo} when the ad is clicked.
77
- *
78
+ * Adds the specified event listener to receive {@link AdInfo} when the user clicks the ad.
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.
89
- *
90
+ * Adds the specified event listener to receive {@link AdInfo} when a full-screen ad displays the ad.
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
- *
102
+ * Adds the specified event listener to receive {@link AdDisplayFailedInfo} when a full-screen
103
+ * ad fails to display the ad.
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.
114
- *
116
+ * Adds the specified event listener to receive {@link AdInfo} when a full-screen ad hides the
117
+ * ad.
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
128
  /**
125
- * Adds the specified event listener to receive {@link AdRevenueInfo} when the ad revenue is paid.
126
- *
129
+ * Adds the specified event listener to receive {@link AdRevenueInfo} when a full-screen ad
130
+ * pays ad revenue to the publisher.
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
  };
@@ -1,3 +1,3 @@
1
- import type { FullscreenAdType } from "./FullscreenAd";
1
+ import type { FullscreenAdType } from './FullscreenAd';
2
2
 
3
3
  export type InterstitialAdType = FullscreenAdType;
@@ -1,11 +1,10 @@
1
- import type { ViewAdType } from "./ViewAd";
2
- import type { AdViewPosition } from "../AdView";
1
+ import type { ViewAdType } from './ViewAd';
2
+ import type { AdViewPosition } from '../AdView';
3
3
 
4
4
  export type MRecAdType = ViewAdType & {
5
-
6
5
  /**
7
6
  * Creates a MREC at the specified position.
8
- *
7
+ *
9
8
  * @param adUnitId The Ad Unit ID to to load ads for.
10
9
  * @param position {@link AdViewPosition} position.
11
10
  */
@@ -1,8 +1,7 @@
1
1
  /**
2
- * Represents a native ad for rendering `NativeAdView`. Internal use only.
2
+ * Represents a native ad for rendering `NativeAdView`. Internal use only.
3
3
  */
4
4
  export type NativeAd = {
5
-
6
5
  /**
7
6
  * The native ad title text.
8
7
  */
@@ -1,10 +1,9 @@
1
- import type { AdProps } from "./AdProps";
1
+ import type { AdProps } from './AdProps';
2
2
 
3
3
  /**
4
4
  * A handler of {@link NativeAdView}.
5
5
  */
6
6
  export type NativeAdViewHandler = {
7
-
8
7
  /**
9
8
  * Loads a native ad.
10
9
  */
@@ -1,29 +1,23 @@
1
1
  export type PrivacyType = {
2
-
3
2
  /**********************************************************************************/
4
3
  /* Privacy */
5
4
  /**********************************************************************************/
6
5
 
7
6
  /**
8
- * Show the user consent dialog to the user using one from AppLovin's SDK.
9
- */
10
- showConsentDialog(): Promise<void>;
11
-
12
- /**
13
- * Sets whether or not the user has provided consent for information-sharing with AppLovin.
14
- *
15
- * @param hasUserConsent true if the user has provided consent for information sharing.
7
+ * Sets whether or not the user provided consent for information-sharing with AppLovin.
8
+ *
9
+ * @param hasUserConsent true if the user provided consent for information sharing.
16
10
  */
17
11
  setHasUserConsent(hasUserConsent: boolean): void;
18
12
 
19
13
  /**
20
- * Checks if user has set consent for information sharing.
14
+ * Checks if user set consent for information sharing.
21
15
  */
22
16
  hasUserConsent(): Promise<boolean>;
23
17
 
24
18
  /**
25
19
  * Marks the user as age-restricted (i.e. under 16).
26
- *
20
+ *
27
21
  * @param isAgeRestrictedUser true if the user is age restricted (i.e. under 16).
28
22
  */
29
23
  setIsAgeRestrictedUser(isAgeRestrictedUser: boolean): void;
@@ -34,14 +28,14 @@ export type PrivacyType = {
34
28
  isAgeRestrictedUser(): Promise<boolean>;
35
29
 
36
30
  /**
37
- * Sets whether or not the user has opted out of the sale of their personal information.
38
- *
39
- * @param doNotSell true if the user has opted out of the sale of their personal information.
31
+ * Sets whether or not the user opted out of the sale of their personal information.
32
+ *
33
+ * @param doNotSell true if the user opted out of the sale of their personal information.
40
34
  */
41
35
  setDoNotSell(doNotSell: boolean): void;
42
36
 
43
37
  /**
44
- * Checks if the user has opted out of the sale of their personal information.
38
+ * Checks if the user opted out of the sale of their personal information.
45
39
  */
46
40
  isDoNotSell(): Promise<boolean>;
47
41
 
@@ -50,24 +44,25 @@ export type PrivacyType = {
50
44
  /**********************************************************************************/
51
45
 
52
46
  /**
53
- * Enable the MAX Terms Flow.
47
+ * Enables the MAX Terms Flow.
54
48
  *
55
- * @param enabled Enable the MAX Terms Flow.
49
+ * @param enabled true to enable the MAX Terms Flow.
56
50
  */
57
51
  setConsentFlowEnabled(enabled: boolean): Promise<void>;
58
52
 
59
53
  /**
60
- * URL for your company’s privacy policy. This is required in order to enable the Terms Flow.
61
- *
54
+ * The URL of your company’s privacy policy, as a string. This is required in order to enable
55
+ * the Terms Flow.
56
+ *
62
57
  * @param urlString The URL string to point your company’s privacy policy.
63
58
  */
64
59
  setPrivacyPolicyUrl(urlString: string): Promise<void>;
65
60
 
66
61
  /**
67
- * URL for your company’s terms of service. This is optional; you can enable the Terms Flow with
68
- * or without it.
69
- *
70
- * @param urlString The URL string to point your company’s terms of service.
62
+ * The URL of your company’s terms of service, as a string. This is optional; you can enable
63
+ * the Terms Flow with or without it.
64
+ *
65
+ * @param urlString The URL string to point your company’s terms of service.
71
66
  */
72
67
  setTermsOfServiceUrl(urlString: string): Promise<void>;
73
68
  };
@@ -1,18 +1,19 @@
1
- import type { AdEventListener } from "./AdEvent";
2
- import type { AdRewardInfo } from "./AdInfo";
3
- import type { FullscreenAdType } from "./FullscreenAd";
1
+ import type { AdEventListener } from './AdEvent';
2
+ import type { AdRewardInfo } from './AdInfo';
3
+ import type { FullscreenAdType } from './FullscreenAd';
4
4
 
5
5
  export type RewardedAdType = FullscreenAdType & {
6
-
7
6
  /**
8
- * Adds the specified event listener to receive {@link AdRewardInfo} when the ad is rewarded.
9
- *
7
+ * Adds the specified event listener to receive {@link AdRewardInfo} when {@link RewardedAd}
8
+ * rewards the user.
9
+ *
10
10
  * @param listener Listener to be notified.
11
11
  */
12
12
  addAdReceivedRewardEventListener(listener: AdEventListener<AdRewardInfo>): void;
13
13
 
14
14
  /**
15
- * Removes the event listener to receive {@link AdRewardInfo} when the ad is rewarded.
15
+ * Removes the event listener to receive {@link AdRewardInfo} when {@link RewardedAd} rewards
16
+ * the user.
16
17
  */
17
18
  removeAdReceivedRewardEventListener(): void;
18
19
  };
@@ -0,0 +1,50 @@
1
+ import type { AdContentRating, UserGender } from '../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
+ * Sets the year of birth of the user. Set this to 0 to clear this value.
11
+ */
12
+ yearOfBirth: number | Promise<number>;
13
+
14
+ /**
15
+ * Sets the gender of the user. Set this to {@link UserGender.Unknown} to clear this value.
16
+ */
17
+ gender: UserGender | Promise<UserGender>;
18
+
19
+ /**
20
+ * Sets the maximum ad content rating shown to the user. The levels are based on IQG Media
21
+ * Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
22
+ * Set this to {@link AdContentRating.None} to clear this value.
23
+ */
24
+ maximumAdContentRating: AdContentRating | Promise<AdContentRating>;
25
+
26
+ /**
27
+ * Sets the email of the user. Set this to null to clear this value.
28
+ */
29
+ email: string | null | Promise<string | null>;
30
+
31
+ /**
32
+ * Sets the phone number of the user. Set this to null to clear this value.
33
+ */
34
+ phoneNumber: string | null | Promise<string | null>;
35
+
36
+ /**
37
+ * Sets the keywords describing the application. Set this to null to clear this value.
38
+ */
39
+ keywords: string[] | null | Promise<string[] | null>;
40
+
41
+ /**
42
+ * Sets the interests of the user. Set this to null to clear this value.
43
+ */
44
+ interests: string[] | null | Promise<string[] | null>;
45
+
46
+ /**
47
+ * Clears all saved data from this class.
48
+ */
49
+ clearAll(): void;
50
+ };