react-native-google-mobile-ads 8.1.0 → 8.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsAdHelper.kt +17 -42
- package/ios_config.sh +3 -3
- package/lib/commonjs/AdEventType.js +1 -4
- package/lib/commonjs/AdEventType.js.map +1 -1
- package/lib/commonjs/AdsConsent.js +2 -25
- package/lib/commonjs/AdsConsent.js.map +1 -1
- package/lib/commonjs/AdsConsentDebugGeography.js +0 -3
- package/lib/commonjs/AdsConsentDebugGeography.js.map +1 -1
- package/lib/commonjs/AdsConsentPurposes.js +1 -4
- package/lib/commonjs/AdsConsentPurposes.js.map +1 -1
- package/lib/commonjs/AdsConsentSpecialFeatures.js +1 -4
- package/lib/commonjs/AdsConsentSpecialFeatures.js.map +1 -1
- package/lib/commonjs/AdsConsentStatus.js +0 -3
- package/lib/commonjs/AdsConsentStatus.js.map +1 -1
- package/lib/commonjs/BannerAdSize.js +1 -4
- package/lib/commonjs/BannerAdSize.js.map +1 -1
- package/lib/commonjs/GAMAdEventType.js +1 -4
- package/lib/commonjs/GAMAdEventType.js.map +1 -1
- package/lib/commonjs/MaxAdContentRating.js +1 -4
- package/lib/commonjs/MaxAdContentRating.js.map +1 -1
- package/lib/commonjs/MobileAds.js +0 -14
- package/lib/commonjs/MobileAds.js.map +1 -1
- package/lib/commonjs/RewardedAdEventType.js +1 -4
- package/lib/commonjs/RewardedAdEventType.js.map +1 -1
- package/lib/commonjs/TestIds.js +1 -2
- package/lib/commonjs/TestIds.js.map +1 -1
- package/lib/commonjs/ads/AppOpenAd.js +0 -14
- package/lib/commonjs/ads/AppOpenAd.js.map +1 -1
- package/lib/commonjs/ads/BannerAd.js +1 -6
- package/lib/commonjs/ads/BannerAd.js.map +1 -1
- package/lib/commonjs/ads/BaseAd.js +1 -20
- package/lib/commonjs/ads/BaseAd.js.map +1 -1
- package/lib/commonjs/ads/GAMBannerAd.js +1 -14
- package/lib/commonjs/ads/GAMBannerAd.js.map +1 -1
- package/lib/commonjs/ads/GAMInterstitialAd.js +0 -6
- package/lib/commonjs/ads/GAMInterstitialAd.js.map +1 -1
- package/lib/commonjs/ads/InterstitialAd.js +0 -14
- package/lib/commonjs/ads/InterstitialAd.js.map +1 -1
- package/lib/commonjs/ads/MobileAd.js +2 -55
- package/lib/commonjs/ads/MobileAd.js.map +1 -1
- package/lib/commonjs/ads/RewardedAd.js +0 -16
- package/lib/commonjs/ads/RewardedAd.js.map +1 -1
- package/lib/commonjs/ads/RewardedInterstitialAd.js +0 -16
- package/lib/commonjs/ads/RewardedInterstitialAd.js.map +1 -1
- package/lib/commonjs/common/Base64.js +4 -23
- package/lib/commonjs/common/Base64.js.map +1 -1
- package/lib/commonjs/common/MutatableParams.js +2 -12
- package/lib/commonjs/common/MutatableParams.js.map +1 -1
- package/lib/commonjs/common/ReferenceBase.js +2 -10
- package/lib/commonjs/common/ReferenceBase.js.map +1 -1
- package/lib/commonjs/common/deeps.js +1 -17
- package/lib/commonjs/common/deeps.js.map +1 -1
- package/lib/commonjs/common/id.js +7 -17
- package/lib/commonjs/common/id.js.map +1 -1
- package/lib/commonjs/common/index.js +2 -34
- package/lib/commonjs/common/index.js.map +1 -1
- package/lib/commonjs/common/path.js +9 -28
- package/lib/commonjs/common/path.js.map +1 -1
- package/lib/commonjs/common/promise.js +1 -7
- package/lib/commonjs/common/promise.js.map +1 -1
- package/lib/commonjs/common/serialize.js +4 -8
- package/lib/commonjs/common/serialize.js.map +1 -1
- package/lib/commonjs/common/validate.js +17 -44
- package/lib/commonjs/common/validate.js.map +1 -1
- package/lib/commonjs/declarations.d.js.map +1 -1
- package/lib/commonjs/hooks/useAppOpenAd.js +0 -6
- package/lib/commonjs/hooks/useAppOpenAd.js.map +1 -1
- package/lib/commonjs/hooks/useFullScreenAd.js +5 -16
- package/lib/commonjs/hooks/useFullScreenAd.js.map +1 -1
- package/lib/commonjs/hooks/useInterstitialAd.js +0 -6
- package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -1
- package/lib/commonjs/hooks/useRewardedAd.js +0 -6
- package/lib/commonjs/hooks/useRewardedAd.js.map +1 -1
- package/lib/commonjs/hooks/useRewardedInterstitialAd.js +0 -6
- package/lib/commonjs/hooks/useRewardedInterstitialAd.js.map +1 -1
- package/lib/commonjs/index.js +1 -29
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js +8 -20
- package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/internal/Module.js +2 -18
- package/lib/commonjs/internal/Module.js.map +1 -1
- package/lib/commonjs/internal/NativeError.js +2 -13
- package/lib/commonjs/internal/NativeError.js.map +1 -1
- package/lib/commonjs/internal/SharedEventEmitter.js +2 -3
- package/lib/commonjs/internal/SharedEventEmitter.js.map +1 -1
- package/lib/commonjs/internal/constants.js +1 -1
- package/lib/commonjs/internal/constants.js.map +1 -1
- package/lib/commonjs/internal/index.js +0 -5
- package/lib/commonjs/internal/index.js.map +1 -1
- package/lib/commonjs/internal/registry/nativeModule.js +13 -44
- package/lib/commonjs/internal/registry/nativeModule.js.map +1 -1
- package/lib/commonjs/types/AdEventListener.js.map +1 -1
- package/lib/commonjs/types/AdEventsListener.js.map +1 -1
- package/lib/commonjs/types/AdShowOptions.js.map +1 -1
- package/lib/commonjs/types/AdStates.js.map +1 -1
- package/lib/commonjs/types/AdapterStatus.js +3 -6
- package/lib/commonjs/types/AdapterStatus.js.map +1 -1
- package/lib/commonjs/types/AdsConsent.interface.js.map +1 -1
- package/lib/commonjs/types/AppEvent.js.map +1 -1
- package/lib/commonjs/types/BannerAdProps.js.map +1 -1
- package/lib/commonjs/types/GoogleMobileAdsNativeModule.js.map +1 -1
- package/lib/commonjs/types/MobileAd.interface.js.map +1 -1
- package/lib/commonjs/types/MobileAdsModule.interface.js.map +1 -1
- package/lib/commonjs/types/Module.interface.js.map +1 -1
- package/lib/commonjs/types/RequestConfiguration.js.map +1 -1
- package/lib/commonjs/types/RequestOptions.js.map +1 -1
- package/lib/commonjs/types/RewardedAdReward.js.map +1 -1
- package/lib/commonjs/types/index.js +0 -22
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/validateAdRequestConfiguration.js +1 -13
- package/lib/commonjs/validateAdRequestConfiguration.js.map +1 -1
- package/lib/commonjs/validateAdRequestOptions.js +1 -29
- package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
- package/lib/commonjs/validateAdShowOptions.js +1 -7
- package/lib/commonjs/validateAdShowOptions.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/AdEventType.js +1 -1
- package/lib/module/AdEventType.js.map +1 -1
- package/lib/module/AdsConsent.js +2 -18
- package/lib/module/AdsConsent.js.map +1 -1
- package/lib/module/AdsConsentDebugGeography.js +0 -1
- package/lib/module/AdsConsentDebugGeography.js.map +1 -1
- package/lib/module/AdsConsentPurposes.js +1 -1
- package/lib/module/AdsConsentPurposes.js.map +1 -1
- package/lib/module/AdsConsentSpecialFeatures.js +1 -1
- package/lib/module/AdsConsentSpecialFeatures.js.map +1 -1
- package/lib/module/AdsConsentStatus.js +0 -1
- package/lib/module/AdsConsentStatus.js.map +1 -1
- package/lib/module/BannerAdSize.js +1 -1
- package/lib/module/BannerAdSize.js.map +1 -1
- package/lib/module/GAMAdEventType.js +1 -1
- package/lib/module/GAMAdEventType.js.map +1 -1
- package/lib/module/MaxAdContentRating.js +1 -1
- package/lib/module/MaxAdContentRating.js.map +1 -1
- package/lib/module/MobileAds.js +0 -8
- package/lib/module/MobileAds.js.map +1 -1
- package/lib/module/RewardedAdEventType.js +1 -1
- package/lib/module/RewardedAdEventType.js.map +1 -1
- package/lib/module/TestIds.js +1 -0
- package/lib/module/TestIds.js.map +1 -1
- package/lib/module/ads/AppOpenAd.js +1 -8
- package/lib/module/ads/AppOpenAd.js.map +1 -1
- package/lib/module/ads/BannerAd.js +2 -2
- package/lib/module/ads/BannerAd.js.map +1 -1
- package/lib/module/ads/BaseAd.js +1 -9
- package/lib/module/ads/BaseAd.js.map +1 -1
- package/lib/module/ads/GAMBannerAd.js +2 -7
- package/lib/module/ads/GAMBannerAd.js.map +1 -1
- package/lib/module/ads/GAMInterstitialAd.js +0 -3
- package/lib/module/ads/GAMInterstitialAd.js.map +1 -1
- package/lib/module/ads/InterstitialAd.js +1 -9
- package/lib/module/ads/InterstitialAd.js.map +1 -1
- package/lib/module/ads/MobileAd.js +3 -47
- package/lib/module/ads/MobileAd.js.map +1 -1
- package/lib/module/ads/RewardedAd.js +1 -10
- package/lib/module/ads/RewardedAd.js.map +1 -1
- package/lib/module/ads/RewardedInterstitialAd.js +1 -10
- package/lib/module/ads/RewardedInterstitialAd.js.map +1 -1
- package/lib/module/common/Base64.js +4 -17
- package/lib/module/common/Base64.js.map +1 -1
- package/lib/module/common/MutatableParams.js +3 -9
- package/lib/module/common/MutatableParams.js.map +1 -1
- package/lib/module/common/ReferenceBase.js +2 -8
- package/lib/module/common/ReferenceBase.js.map +1 -1
- package/lib/module/common/deeps.js +3 -15
- package/lib/module/common/deeps.js.map +1 -1
- package/lib/module/common/id.js +7 -16
- package/lib/module/common/id.js.map +1 -1
- package/lib/module/common/index.js +2 -11
- package/lib/module/common/index.js.map +1 -1
- package/lib/module/common/path.js +9 -19
- package/lib/module/common/path.js.map +1 -1
- package/lib/module/common/promise.js +3 -5
- package/lib/module/common/promise.js.map +1 -1
- package/lib/module/common/serialize.js +4 -4
- package/lib/module/common/serialize.js.map +1 -1
- package/lib/module/common/validate.js +17 -24
- package/lib/module/common/validate.js.map +1 -1
- package/lib/module/declarations.d.js.map +1 -1
- package/lib/module/hooks/useAppOpenAd.js +2 -1
- package/lib/module/hooks/useAppOpenAd.js.map +1 -1
- package/lib/module/hooks/useFullScreenAd.js +5 -11
- package/lib/module/hooks/useFullScreenAd.js.map +1 -1
- package/lib/module/hooks/useInterstitialAd.js +2 -1
- package/lib/module/hooks/useInterstitialAd.js.map +1 -1
- package/lib/module/hooks/useRewardedAd.js +2 -1
- package/lib/module/hooks/useRewardedAd.js.map +1 -1
- package/lib/module/hooks/useRewardedInterstitialAd.js +2 -1
- package/lib/module/hooks/useRewardedInterstitialAd.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js +9 -18
- package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
- package/lib/module/internal/Module.js +3 -13
- package/lib/module/internal/Module.js.map +1 -1
- package/lib/module/internal/NativeError.js +2 -11
- package/lib/module/internal/NativeError.js.map +1 -1
- package/lib/module/internal/SharedEventEmitter.js +1 -0
- package/lib/module/internal/SharedEventEmitter.js.map +1 -1
- package/lib/module/internal/constants.js +1 -0
- package/lib/module/internal/constants.js.map +1 -1
- package/lib/module/internal/index.js +1 -0
- package/lib/module/internal/index.js.map +1 -1
- package/lib/module/internal/registry/nativeModule.js +13 -35
- package/lib/module/internal/registry/nativeModule.js.map +1 -1
- package/lib/module/types/AdEventListener.js.map +1 -1
- package/lib/module/types/AdEventsListener.js.map +1 -1
- package/lib/module/types/AdShowOptions.js.map +1 -1
- package/lib/module/types/AdStates.js.map +1 -1
- package/lib/module/types/AdapterStatus.js +1 -1
- package/lib/module/types/AdapterStatus.js.map +1 -1
- package/lib/module/types/AdsConsent.interface.js.map +1 -1
- package/lib/module/types/AppEvent.js.map +1 -1
- package/lib/module/types/BannerAdProps.js.map +1 -1
- package/lib/module/types/GoogleMobileAdsNativeModule.js.map +1 -1
- package/lib/module/types/MobileAd.interface.js.map +1 -1
- package/lib/module/types/MobileAdsModule.interface.js.map +1 -1
- package/lib/module/types/Module.interface.js.map +1 -1
- package/lib/module/types/RequestConfiguration.js.map +1 -1
- package/lib/module/types/RequestOptions.js.map +1 -1
- package/lib/module/types/RewardedAdReward.js.map +1 -1
- package/lib/module/types/index.js +1 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/validateAdRequestConfiguration.js +1 -10
- package/lib/module/validateAdRequestConfiguration.js.map +1 -1
- package/lib/module/validateAdRequestOptions.js +1 -27
- package/lib/module/validateAdRequestOptions.js.map +1 -1
- package/lib/module/validateAdShowOptions.js +1 -5
- package/lib/module/validateAdShowOptions.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/common/Base64.d.ts +0 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +35 -29
- package/src/internal/registry/nativeModule.ts +2 -0
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["MobileAdsModule.interface.ts"],"sourcesContent":["import { EventEmitter } from 'react-native';\n\nimport { AdapterStatus } from './AdapterStatus';\nimport { GoogleMobileAdsNativeModule } from './GoogleMobileAdsNativeModule';\nimport { RequestConfiguration } from './RequestConfiguration';\n\n/**\n * The Google Mobile Ads service interface.\n */\nexport interface MobileAdsModuleInterface {\n /**\n * Initialize the SDK.\n */\n initialize(): Promise<AdapterStatus[]>;\n\n /**\n * Sets request options for all future ad requests.\n *\n * #### Example\n *\n * ```js\n * import mobileAds, { MaxAdContentRating } from 'react-native-google-mobile-ads';\n *\n * await mobileAds().setRequestConfiguration({\n * // Update all future requests suitable for parental guidance\n * maxAdContentRating: MaxAdContentRating.PG,\n * });\n * ```\n *\n * @param requestConfiguration An RequestConfiguration interface used on all future Google Mobile Ads ad requests.\n */\n setRequestConfiguration(requestConfiguration: RequestConfiguration): Promise<void>;\n\n /**\n * Opens the Ad Inspector. Ad inspector is an in-app overlay that enables authorized devices to perform real-time analysis of test ad requests directly within a mobile app.\n *\n * The promise will resolve when the inspector is closed.\n * Also, the promise will reject if ad inspector is closed due to an error.\n *\n * @see https://developers.google.com/ad-manager/mobile-ads-sdk/android/ad-inspector\n */\n openAdInspector(): Promise<void>;\n\n /**\n * The native module instance for the Google Mobile Ads service.\n */\n native: GoogleMobileAdsNativeModule;\n\n /**\n * Returns the shared event emitter instance used for all JS event routing.\n */\n emitter: EventEmitter;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["Module.interface.ts"],"sourcesContent":["export interface App {\n name: string;\n}\n\nexport interface Config {\n version: string;\n namespace: string;\n nativeModuleName: string[];\n nativeEvents: string[];\n}\n\nexport interface ModuleInterface {\n app: App;\n _config: Config;\n _customUrlOrRegion?: string;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["RequestConfiguration.ts"],"sourcesContent":["import { MaxAdContentRating } from '../MaxAdContentRating';\n\n/**\n * The `RequestConfiguration` used when setting global ad settings via `setRequestConfiguration`.\n */\nexport interface RequestConfiguration {\n /**\n * The maximum ad content rating for all ads. Google Mobile Ads returns ads at or below the specified level.\n *\n * Ratings are based on the [digital content label classifications](https://support.google.com/admob/answer/7562142).\n */\n maxAdContentRating?: MaxAdContentRating;\n\n /**\n * If `true`, indicates that you want your content treated as child-directed for purposes of COPPA.\n *\n * For purposes of the [Children's Online Privacy Protection Act (COPPA)](http://business.ftc.gov/privacy-and-security/children%27s-privacy),\n * there is a setting called \"tag for child-directed treatment\". By setting this tag, you certify that this notification\n * is accurate and you are authorized to act on behalf of the owner of the app. You understand that abuse of this\n * setting may result in termination of your Google account.\n */\n tagForChildDirectedTreatment?: boolean;\n\n /**\n * If `true`, indicates that you want the ad request to be handled in a manner suitable for users under the age of consent.\n *\n * You can mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent.\n * This feature is designed to help facilitate compliance with the [General Data Protection Regulation (GDPR)](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32016R0679).\n *\n * See the [Google Mobile SDK docs](https://developers.google.com/admob/android/targeting#ad_content_filtering) for more information.\n */\n tagForUnderAgeOfConsent?: boolean;\n\n /**\n * An array of test device IDs to add to the allowlist.\n *\n * If using an emulator, set the device ID to `EMULATOR`.\n */\n testDeviceIdentifiers?: string[];\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["RequestOptions.ts"],"sourcesContent":["export interface ServerSideVerificationOptions {\n /**\n * User identifier.\n * If no user identifier is provided by the app, this query parameter will not be present in the SSV callback.\n */\n userId?: string;\n\n /**\n * Custom data string.\n * If no custom data string is provided by the app, this query parameter value will not be present in the SSV callback.\n */\n customData?: string;\n}\n\n/**\n * The `RequestOptions` interface. Used when passing additional request options before an advert is loaded.\n */\nexport interface RequestOptions {\n /**\n * If `true` only non-personalized ads will be loaded.\n *\n * Google serves personalized ads by default. This option must be `true` if users who are within the EEA have only\n * given consent to non-personalized ads.\n */\n requestNonPersonalizedAdsOnly?: boolean;\n\n /**\n * Attaches additional properties to an ad request for direct campaign delivery.\n *\n * Takes an array of string key/value pairs.\n *\n * #### Example\n *\n * Attaches `?campaign=abc&user=123` to the ad request:\n *\n * ```js\n * await Interstitial.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {\n * networkExtras: {\n * campaign: 'abc',\n * user: '123',\n * },\n * });\n */\n networkExtras?: { [key: string]: string };\n\n /**\n * An array of keywords to be sent when loading the ad.\n *\n * Setting keywords helps deliver more specific ads to a user based on the keywords.\n *\n * #### Example\n *\n * ```js\n * await Interstitial.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {\n * keywords: ['fashion', 'clothing'],\n * });\n * ```\n */\n keywords?: string[];\n\n /**\n * Sets a content URL for targeting purposes.\n *\n * Max length of 512.\n */\n contentUrl?: string;\n\n /**\n * key-value pairs used for custom targeting\n *\n * Takes an array of string key/value pairs.\n */\n customTargeting?: { [key: string]: string };\n\n /**\n * Sets the request agent string to identify the ad request's origin. Third party libraries that reference the Mobile\n * Ads SDK should call this method to denote the platform from which the ad request originated. For example, if a\n * third party ad network called \"CoolAds network\" mediates requests to the Mobile Ads SDK, it should call this\n * method with \"CoolAds\".\n *\n * #### Example\n *\n * ```js\n * await Interstitial.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {\n * requestAgent: 'CoolAds',\n * });\n * ```\n */\n requestAgent?: string;\n\n /**\n * Server Side Verification(SSV) Options\n * See [Google Mobile SDK Docs](https://developers.google.com/admob/android/ssv) for more information.\n */\n serverSideVerificationOptions?: ServerSideVerificationOptions;\n\n /**\n * Publisher provided identifier (PPID) for use in frequency capping, audience segmentation and targeting,\n * sequential ad rotation, and other audience-based ad delivery controls across devices.\n * See [this article](https://support.google.com/admanager/answer/2880055) for more information.\n */\n publisherProvidedId?: string;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["RewardedAdReward.ts"],"sourcesContent":["/**\n * A `RewardedAdReward` returned from rewarded ads.\n */\nexport interface RewardedAdReward {\n /**\n * The reward name, e.g. 'coins', 'diamonds'.\n */\n type: string;\n\n /**\n * The number value of the reward, e.g. 10\n */\n amount: number;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport * from './AdapterStatus';\nexport * from './AdEventListener';\nexport * from './AdEventsListener';\nexport * from './AdsConsent.interface';\nexport * from './AdShowOptions';\nexport * from './AdStates';\nexport * from './BannerAdProps';\nexport * from './RequestConfiguration';\nexport * from './RequestOptions';\nexport * from './RewardedAdReward';\nexport * from './AppEvent';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,iBAAiB;AAC/B,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,wBAAwB;AACtC,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,YAAY"}
|
|
@@ -14,47 +14,38 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
|
+
|
|
17
18
|
import { isPropertySet, isArray, isBoolean, isObject } from './common';
|
|
18
19
|
import { MaxAdContentRating } from './MaxAdContentRating';
|
|
19
20
|
export function validateAdRequestConfiguration(requestConfiguration) {
|
|
20
21
|
const out = {};
|
|
21
|
-
|
|
22
22
|
if (!isObject(requestConfiguration)) {
|
|
23
23
|
throw new Error("'requestConfiguration' expected an object value");
|
|
24
24
|
}
|
|
25
|
-
|
|
26
25
|
if (requestConfiguration.maxAdContentRating) {
|
|
27
26
|
if (requestConfiguration.maxAdContentRating !== MaxAdContentRating.G && requestConfiguration.maxAdContentRating !== MaxAdContentRating.PG && requestConfiguration.maxAdContentRating !== MaxAdContentRating.T && requestConfiguration.maxAdContentRating !== MaxAdContentRating.MA) {
|
|
28
27
|
throw new Error("'requestConfiguration.maxAdContentRating' expected on of MaxAdContentRating.G, MaxAdContentRating.PG, MaxAdContentRating.T or MaxAdContentRating.MA");
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
out.maxAdContentRating = requestConfiguration.maxAdContentRating;
|
|
32
30
|
}
|
|
33
|
-
|
|
34
31
|
if (isPropertySet(requestConfiguration, 'tagForChildDirectedTreatment')) {
|
|
35
32
|
if (!isBoolean(requestConfiguration.tagForChildDirectedTreatment)) {
|
|
36
33
|
throw new Error("'requestConfiguration.tagForChildDirectedTreatment' expected a boolean value");
|
|
37
34
|
}
|
|
38
|
-
|
|
39
35
|
out.tagForChildDirectedTreatment = requestConfiguration.tagForChildDirectedTreatment;
|
|
40
36
|
}
|
|
41
|
-
|
|
42
37
|
if (isPropertySet(requestConfiguration, 'tagForUnderAgeOfConsent')) {
|
|
43
38
|
if (!isBoolean(requestConfiguration.tagForUnderAgeOfConsent)) {
|
|
44
39
|
throw new Error("'requestConfiguration.tagForUnderAgeOfConsent' expected a boolean value");
|
|
45
40
|
}
|
|
46
|
-
|
|
47
41
|
out.tagForUnderAgeOfConsent = requestConfiguration.tagForUnderAgeOfConsent;
|
|
48
42
|
}
|
|
49
|
-
|
|
50
43
|
if (isPropertySet(requestConfiguration, 'testDeviceIdentifiers')) {
|
|
51
44
|
if (!isArray(requestConfiguration.testDeviceIdentifiers)) {
|
|
52
45
|
throw new Error("'requestConfiguration.testDeviceIdentifiers' expected an array value");
|
|
53
46
|
}
|
|
54
|
-
|
|
55
47
|
out.testDeviceIdentifiers = requestConfiguration.testDeviceIdentifiers;
|
|
56
48
|
}
|
|
57
|
-
|
|
58
49
|
return out;
|
|
59
50
|
}
|
|
60
51
|
//# sourceMappingURL=validateAdRequestConfiguration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["isPropertySet","isArray","isBoolean","isObject","MaxAdContentRating","validateAdRequestConfiguration","requestConfiguration","out","Error","maxAdContentRating","G","PG","T","MA","tagForChildDirectedTreatment","tagForUnderAgeOfConsent","testDeviceIdentifiers"],"sources":["validateAdRequestConfiguration.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isPropertySet, isArray, isBoolean, isObject } from './common';\nimport { MaxAdContentRating } from './MaxAdContentRating';\nimport { RequestConfiguration } from './types/RequestConfiguration';\n\nexport function validateAdRequestConfiguration(requestConfiguration: RequestConfiguration) {\n const out: RequestConfiguration = {};\n\n if (!isObject(requestConfiguration)) {\n throw new Error(\"'requestConfiguration' expected an object value\");\n }\n\n if (requestConfiguration.maxAdContentRating) {\n if (\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.G &&\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.PG &&\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.T &&\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.MA\n ) {\n throw new Error(\n \"'requestConfiguration.maxAdContentRating' expected on of MaxAdContentRating.G, MaxAdContentRating.PG, MaxAdContentRating.T or MaxAdContentRating.MA\",\n );\n }\n\n out.maxAdContentRating = requestConfiguration.maxAdContentRating;\n }\n\n if (isPropertySet(requestConfiguration, 'tagForChildDirectedTreatment')) {\n if (!isBoolean(requestConfiguration.tagForChildDirectedTreatment)) {\n throw new Error(\n \"'requestConfiguration.tagForChildDirectedTreatment' expected a boolean value\",\n );\n }\n\n out.tagForChildDirectedTreatment = requestConfiguration.tagForChildDirectedTreatment;\n }\n\n if (isPropertySet(requestConfiguration, 'tagForUnderAgeOfConsent')) {\n if (!isBoolean(requestConfiguration.tagForUnderAgeOfConsent)) {\n throw new Error(\"'requestConfiguration.tagForUnderAgeOfConsent' expected a boolean value\");\n }\n\n out.tagForUnderAgeOfConsent = requestConfiguration.tagForUnderAgeOfConsent;\n }\n\n if (isPropertySet(requestConfiguration, 'testDeviceIdentifiers')) {\n if (!isArray(requestConfiguration.testDeviceIdentifiers)) {\n throw new Error(\"'requestConfiguration.testDeviceIdentifiers' expected an array value\");\n }\n\n out.testDeviceIdentifiers = requestConfiguration.testDeviceIdentifiers;\n }\n\n return out;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,UAAU;AACtE,SAASC,kBAAkB,QAAQ,sBAAsB;AAGzD,OAAO,SAASC,8BAA8B,CAACC,oBAA0C,EAAE;EACzF,MAAMC,GAAyB,GAAG,CAAC,CAAC;EAEpC,IAAI,CAACJ,QAAQ,CAACG,oBAAoB,CAAC,EAAE;IACnC,MAAM,IAAIE,KAAK,CAAC,iDAAiD,CAAC;EACpE;EAEA,IAAIF,oBAAoB,CAACG,kBAAkB,EAAE;IAC3C,IACEH,oBAAoB,CAACG,kBAAkB,KAAKL,kBAAkB,CAACM,CAAC,IAChEJ,oBAAoB,CAACG,kBAAkB,KAAKL,kBAAkB,CAACO,EAAE,IACjEL,oBAAoB,CAACG,kBAAkB,KAAKL,kBAAkB,CAACQ,CAAC,IAChEN,oBAAoB,CAACG,kBAAkB,KAAKL,kBAAkB,CAACS,EAAE,EACjE;MACA,MAAM,IAAIL,KAAK,CACb,qJAAqJ,CACtJ;IACH;IAEAD,GAAG,CAACE,kBAAkB,GAAGH,oBAAoB,CAACG,kBAAkB;EAClE;EAEA,IAAIT,aAAa,CAACM,oBAAoB,EAAE,8BAA8B,CAAC,EAAE;IACvE,IAAI,CAACJ,SAAS,CAACI,oBAAoB,CAACQ,4BAA4B,CAAC,EAAE;MACjE,MAAM,IAAIN,KAAK,CACb,8EAA8E,CAC/E;IACH;IAEAD,GAAG,CAACO,4BAA4B,GAAGR,oBAAoB,CAACQ,4BAA4B;EACtF;EAEA,IAAId,aAAa,CAACM,oBAAoB,EAAE,yBAAyB,CAAC,EAAE;IAClE,IAAI,CAACJ,SAAS,CAACI,oBAAoB,CAACS,uBAAuB,CAAC,EAAE;MAC5D,MAAM,IAAIP,KAAK,CAAC,yEAAyE,CAAC;IAC5F;IAEAD,GAAG,CAACQ,uBAAuB,GAAGT,oBAAoB,CAACS,uBAAuB;EAC5E;EAEA,IAAIf,aAAa,CAACM,oBAAoB,EAAE,uBAAuB,CAAC,EAAE;IAChE,IAAI,CAACL,OAAO,CAACK,oBAAoB,CAACU,qBAAqB,CAAC,EAAE;MACxD,MAAM,IAAIR,KAAK,CAAC,sEAAsE,CAAC;IACzF;IAEAD,GAAG,CAACS,qBAAqB,GAAGV,oBAAoB,CAACU,qBAAqB;EACxE;EAEA,OAAOT,GAAG;AACZ"}
|
|
@@ -14,115 +14,89 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
|
+
|
|
17
18
|
import { isPropertySet, isArray, isBoolean, isObject, isString, isUndefined, isValidUrl } from './common';
|
|
18
19
|
export function validateAdRequestOptions(options) {
|
|
19
20
|
const out = {};
|
|
20
|
-
|
|
21
21
|
if (isUndefined(options)) {
|
|
22
22
|
return out;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
24
|
if (!isObject(options)) {
|
|
26
25
|
throw new Error("'options' expected an object value");
|
|
27
26
|
}
|
|
28
|
-
|
|
29
27
|
if (isPropertySet(options, 'requestNonPersonalizedAdsOnly')) {
|
|
30
28
|
if (!isBoolean(options.requestNonPersonalizedAdsOnly)) {
|
|
31
29
|
throw new Error("'options.requestNonPersonalizedAdsOnly' expected a boolean value");
|
|
32
30
|
}
|
|
33
|
-
|
|
34
31
|
out.requestNonPersonalizedAdsOnly = options.requestNonPersonalizedAdsOnly;
|
|
35
32
|
}
|
|
36
|
-
|
|
37
33
|
if (options.networkExtras) {
|
|
38
34
|
if (!isObject(options.networkExtras)) {
|
|
39
35
|
throw new Error("'options.networkExtras' expected an object of key/value pairs");
|
|
40
36
|
}
|
|
41
|
-
|
|
42
37
|
Object.entries(options.networkExtras).forEach(_ref => {
|
|
43
38
|
let [key, value] = _ref;
|
|
44
|
-
|
|
45
39
|
if (!isString(value)) {
|
|
46
40
|
throw new Error(`'options.networkExtras' expected a string value for object key "${key}"`);
|
|
47
41
|
}
|
|
48
42
|
});
|
|
49
43
|
out.networkExtras = options.networkExtras;
|
|
50
44
|
}
|
|
51
|
-
|
|
52
45
|
if (options.keywords) {
|
|
53
46
|
if (!isArray(options.keywords)) {
|
|
54
47
|
throw new Error("'options.keywords' expected an array containing string values");
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
for (let i = 0; i < options.keywords.length; i++) {
|
|
58
50
|
const keyword = options.keywords[i];
|
|
59
|
-
|
|
60
51
|
if (!isString(keyword)) {
|
|
61
52
|
throw new Error("'options.keywords' expected an array containing string values");
|
|
62
53
|
}
|
|
63
54
|
}
|
|
64
|
-
|
|
65
55
|
out.keywords = options.keywords;
|
|
66
56
|
}
|
|
67
|
-
|
|
68
57
|
if (options.contentUrl) {
|
|
69
58
|
if (!isString(options.contentUrl)) {
|
|
70
59
|
throw new Error("'options.contentUrl' expected a string value");
|
|
71
60
|
}
|
|
72
|
-
|
|
73
61
|
if (!isValidUrl(options.contentUrl)) {
|
|
74
62
|
throw new Error("'options.contentUrl' expected a valid HTTP or HTTPS url.");
|
|
75
63
|
}
|
|
76
|
-
|
|
77
64
|
if (options.contentUrl.length > 512) {
|
|
78
65
|
throw new Error("'options.contentUrl' maximum length of a content URL is 512 characters.");
|
|
79
66
|
}
|
|
80
|
-
|
|
81
67
|
out.contentUrl = options.contentUrl;
|
|
82
68
|
}
|
|
83
|
-
|
|
84
69
|
if (options.requestAgent) {
|
|
85
70
|
if (!isString(options.requestAgent)) {
|
|
86
71
|
throw new Error("'options.requestAgent' expected a string value");
|
|
87
72
|
}
|
|
88
|
-
|
|
89
73
|
out.requestAgent = options.requestAgent;
|
|
90
74
|
}
|
|
91
|
-
|
|
92
75
|
if (options.serverSideVerificationOptions) {
|
|
93
76
|
if (!isObject(options.serverSideVerificationOptions)) {
|
|
94
77
|
throw new Error("'options.serverSideVerificationOptions' expected an object of key/value pairs");
|
|
95
78
|
}
|
|
96
|
-
|
|
97
79
|
const ssvOptions = options.serverSideVerificationOptions;
|
|
98
|
-
|
|
99
80
|
if (ssvOptions.userId && !isString(ssvOptions.userId)) {
|
|
100
81
|
throw new Error("'options.serverSideVerificationOptions.userId' expected a string value");
|
|
101
82
|
}
|
|
102
|
-
|
|
103
83
|
if (ssvOptions.customData && !isString(ssvOptions.customData)) {
|
|
104
84
|
throw new Error("'options.serverSideVerificationOptions.customData' expected a string value");
|
|
105
85
|
}
|
|
106
|
-
|
|
107
86
|
out.serverSideVerificationOptions = options.serverSideVerificationOptions;
|
|
108
87
|
}
|
|
109
|
-
|
|
110
88
|
if (options.customTargeting) {
|
|
111
89
|
if (!isObject(options.customTargeting)) {
|
|
112
90
|
throw new Error("'options.customTargeting' expected an object of key/value pairs");
|
|
113
91
|
}
|
|
114
|
-
|
|
115
92
|
out.customTargeting = options.customTargeting;
|
|
116
93
|
}
|
|
117
|
-
|
|
118
94
|
if (options.publisherProvidedId) {
|
|
119
95
|
if (!isString(options.publisherProvidedId)) {
|
|
120
96
|
throw new Error("'options.publisherProvidedId' expected a string value");
|
|
121
97
|
}
|
|
122
|
-
|
|
123
98
|
out.publisherProvidedId = options.publisherProvidedId;
|
|
124
99
|
}
|
|
125
|
-
|
|
126
100
|
return out;
|
|
127
101
|
}
|
|
128
102
|
//# sourceMappingURL=validateAdRequestOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["isPropertySet","isArray","isBoolean","isObject","isString","isUndefined","isValidUrl","validateAdRequestOptions","options","out","Error","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","keywords","i","length","keyword","contentUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sources":["validateAdRequestOptions.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {\n isPropertySet,\n isArray,\n isBoolean,\n isObject,\n isString,\n isUndefined,\n isValidUrl,\n} from './common';\nimport { RequestOptions } from './types/RequestOptions';\n\nexport function validateAdRequestOptions(options?: RequestOptions) {\n const out: RequestOptions = {};\n\n if (isUndefined(options)) {\n return out;\n }\n\n if (!isObject(options)) {\n throw new Error(\"'options' expected an object value\");\n }\n\n if (isPropertySet(options, 'requestNonPersonalizedAdsOnly')) {\n if (!isBoolean(options.requestNonPersonalizedAdsOnly)) {\n throw new Error(\"'options.requestNonPersonalizedAdsOnly' expected a boolean value\");\n }\n\n out.requestNonPersonalizedAdsOnly = options.requestNonPersonalizedAdsOnly;\n }\n\n if (options.networkExtras) {\n if (!isObject(options.networkExtras)) {\n throw new Error(\"'options.networkExtras' expected an object of key/value pairs\");\n }\n\n Object.entries(options.networkExtras).forEach(([key, value]) => {\n if (!isString(value)) {\n throw new Error(`'options.networkExtras' expected a string value for object key \"${key}\"`);\n }\n });\n\n out.networkExtras = options.networkExtras;\n }\n\n if (options.keywords) {\n if (!isArray(options.keywords)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n\n for (let i = 0; i < options.keywords.length; i++) {\n const keyword = options.keywords[i];\n\n if (!isString(keyword)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n }\n\n out.keywords = options.keywords;\n }\n\n if (options.contentUrl) {\n if (!isString(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a string value\");\n }\n\n if (!isValidUrl(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a valid HTTP or HTTPS url.\");\n }\n\n if (options.contentUrl.length > 512) {\n throw new Error(\"'options.contentUrl' maximum length of a content URL is 512 characters.\");\n }\n\n out.contentUrl = options.contentUrl;\n }\n\n if (options.requestAgent) {\n if (!isString(options.requestAgent)) {\n throw new Error(\"'options.requestAgent' expected a string value\");\n }\n\n out.requestAgent = options.requestAgent;\n }\n\n if (options.serverSideVerificationOptions) {\n if (!isObject(options.serverSideVerificationOptions)) {\n throw new Error(\n \"'options.serverSideVerificationOptions' expected an object of key/value pairs\",\n );\n }\n\n const ssvOptions = options.serverSideVerificationOptions;\n\n if (ssvOptions.userId && !isString(ssvOptions.userId)) {\n throw new Error(\"'options.serverSideVerificationOptions.userId' expected a string value\");\n }\n\n if (ssvOptions.customData && !isString(ssvOptions.customData)) {\n throw new Error(\"'options.serverSideVerificationOptions.customData' expected a string value\");\n }\n\n out.serverSideVerificationOptions = options.serverSideVerificationOptions;\n }\n\n if (options.customTargeting) {\n if (!isObject(options.customTargeting)) {\n throw new Error(\"'options.customTargeting' expected an object of key/value pairs\");\n }\n out.customTargeting = options.customTargeting;\n }\n\n if (options.publisherProvidedId) {\n if (!isString(options.publisherProvidedId)) {\n throw new Error(\"'options.publisherProvidedId' expected a string value\");\n }\n out.publisherProvidedId = options.publisherProvidedId;\n }\n\n return out;\n}\n"],"mappings":"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"}
|
|
@@ -14,26 +14,22 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
|
+
|
|
17
18
|
import { isPropertySet, isBoolean, isObject, isUndefined } from './common';
|
|
18
19
|
export function validateAdShowOptions(options) {
|
|
19
20
|
const out = {};
|
|
20
|
-
|
|
21
21
|
if (isUndefined(options)) {
|
|
22
22
|
return out;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
24
|
if (!isObject(options)) {
|
|
26
25
|
throw new Error("'options' expected an object value");
|
|
27
26
|
}
|
|
28
|
-
|
|
29
27
|
if (isPropertySet(options, 'immersiveModeEnabled')) {
|
|
30
28
|
if (!isBoolean(options.immersiveModeEnabled)) {
|
|
31
29
|
throw new Error("'options.immersiveModeEnabled' expected a boolean value");
|
|
32
30
|
}
|
|
33
|
-
|
|
34
31
|
out.immersiveModeEnabled = options.immersiveModeEnabled;
|
|
35
32
|
}
|
|
36
|
-
|
|
37
33
|
return out;
|
|
38
34
|
}
|
|
39
35
|
//# sourceMappingURL=validateAdShowOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["isPropertySet","isBoolean","isObject","isUndefined","validateAdShowOptions","options","out","Error","immersiveModeEnabled"],"sources":["validateAdShowOptions.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isPropertySet, isBoolean, isObject, isUndefined } from './common';\nimport { AdShowOptions } from './types/AdShowOptions';\n\nexport function validateAdShowOptions(options?: AdShowOptions) {\n const out: AdShowOptions = {};\n\n if (isUndefined(options)) {\n return out;\n }\n\n if (!isObject(options)) {\n throw new Error(\"'options' expected an object value\");\n }\n\n if (isPropertySet(options, 'immersiveModeEnabled')) {\n if (!isBoolean(options.immersiveModeEnabled)) {\n throw new Error(\"'options.immersiveModeEnabled' expected a boolean value\");\n }\n\n out.immersiveModeEnabled = options.immersiveModeEnabled;\n }\n\n return out;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,UAAU;AAG1E,OAAO,SAASC,qBAAqB,CAACC,OAAuB,EAAE;EAC7D,MAAMC,GAAkB,GAAG,CAAC,CAAC;EAE7B,IAAIH,WAAW,CAACE,OAAO,CAAC,EAAE;IACxB,OAAOC,GAAG;EACZ;EAEA,IAAI,CAACJ,QAAQ,CAACG,OAAO,CAAC,EAAE;IACtB,MAAM,IAAIE,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,IAAIP,aAAa,CAACK,OAAO,EAAE,sBAAsB,CAAC,EAAE;IAClD,IAAI,CAACJ,SAAS,CAACI,OAAO,CAACG,oBAAoB,CAAC,EAAE;MAC5C,MAAM,IAAID,KAAK,CAAC,yDAAyD,CAAC;IAC5E;IAEAD,GAAG,CAACE,oBAAoB,GAAGH,OAAO,CAACG,oBAAoB;EACzD;EAEA,OAAOF,GAAG;AACZ"}
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["version"],"sources":["version.ts"],"sourcesContent":["// Generated by genversion.\nexport const version = '8.1.2';\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,OAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "8.1.
|
|
1
|
+
export declare const SDK_VERSION = "8.1.2";
|
|
2
2
|
export { default, MobileAds } from './MobileAds';
|
|
3
3
|
export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
|
|
4
4
|
export { AdsConsentPurposes } from './AdsConsentPurposes';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.1.
|
|
1
|
+
export declare const version = "8.1.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-mobile-ads",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.2",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -80,11 +80,17 @@
|
|
|
80
80
|
"tests:jest": "jest",
|
|
81
81
|
"tests:jest-watch": "jest --watch",
|
|
82
82
|
"tests:jest-coverage": "jest --coverage",
|
|
83
|
+
"tests:install": "cd RNGoogleMobileAdsExample && yarn",
|
|
83
84
|
"tests:packager": "cd RNGoogleMobileAdsExample && yarn react-native start",
|
|
84
85
|
"tests:packager:reset-cache": "cd RNGoogleMobileAdsExample && yarn react-native start --reset-cache",
|
|
85
86
|
"tests:android:build": "cd RNGoogleMobileAdsExample && yarn detox build --configuration android.emu.debug",
|
|
87
|
+
"tests:android:build:windows": "cd RNGoogleMobileAdsExample && yarn detox build --configuration android.emu.debug.windows",
|
|
86
88
|
"tests:android:build-release": "cd RNGoogleMobileAdsExample && yarn detox build --configuration android.emu.release",
|
|
89
|
+
"tests:android:build-release:windows": "cd RNGoogleMobileAdsExample && yarn detox build --configuration android.emu.release.windows",
|
|
87
90
|
"tests:android:test": "cd RNGoogleMobileAdsExample && yarn detox test --configuration android.emu.debug --loglevel trace",
|
|
91
|
+
"tests:android:test:windows": "cd RNGoogleMobileAdsExample && yarn detox test --configuration android.emu.debug.windows --loglevel trace",
|
|
92
|
+
"tests:android:test-release": "cd RNGoogleMobileAdsExample && yarn detox test --configuration android.emu.release --loglevel trace",
|
|
93
|
+
"tests:android:test-release:windows": "cd RNGoogleMobileAdsExample && yarn detox test --configuration android.emu.release.windows --loglevel trace",
|
|
88
94
|
"tests:android:test:debug": "cd RNGoogleMobileAdsExample && yarn detox test --configuration android.emu.debug --inspect",
|
|
89
95
|
"tests:android:test-reuse": "cd RNGoogleMobileAdsExample && yarn detox test --configuration android.emu.debug --reuse",
|
|
90
96
|
"tests:android:test-cover": "cd RNGoogleMobileAdsExample && ./node_modules/.bin/nyc yarn detox test --loglevel trace --configuration android.emu.debug",
|
|
@@ -100,49 +106,49 @@
|
|
|
100
106
|
"package:update": "yarn upgrade --latest"
|
|
101
107
|
},
|
|
102
108
|
"dependencies": {
|
|
103
|
-
"@iabtcf/core": "^1.
|
|
109
|
+
"@iabtcf/core": "^1.5.3",
|
|
104
110
|
"use-deep-compare-effect": "^1.8.1"
|
|
105
111
|
},
|
|
106
112
|
"devDependencies": {
|
|
107
|
-
"@babel/core": "^7.
|
|
108
|
-
"@babel/preset-env": "^7.
|
|
113
|
+
"@babel/core": "^7.19.3",
|
|
114
|
+
"@babel/preset-env": "^7.19.4",
|
|
109
115
|
"@semantic-release/changelog": "^6.0.1",
|
|
110
116
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
111
117
|
"@semantic-release/git": "^10.0.1",
|
|
112
|
-
"@semantic-release/github": "^8.0.
|
|
118
|
+
"@semantic-release/github": "^8.0.6",
|
|
113
119
|
"@semantic-release/npm": "^9.0.1",
|
|
114
120
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
115
|
-
"@types/jest": "^
|
|
116
|
-
"@types/node": "^
|
|
117
|
-
"@types/react": "^18.0.
|
|
118
|
-
"@types/react-native": "^0.
|
|
119
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
120
|
-
"@typescript-eslint/parser": "^5.
|
|
121
|
-
"babel-jest": "^
|
|
121
|
+
"@types/jest": "^29.1.2",
|
|
122
|
+
"@types/node": "^18.8.4",
|
|
123
|
+
"@types/react": "^18.0.21",
|
|
124
|
+
"@types/react-native": "^0.70.4",
|
|
125
|
+
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
|
126
|
+
"@typescript-eslint/parser": "^5.40.0",
|
|
127
|
+
"babel-jest": "^29.1.2",
|
|
122
128
|
"clang-format": "1.8.0",
|
|
123
129
|
"codecov": "^3.8.3",
|
|
124
130
|
"conventional-changelog-cli": "^2.2.2",
|
|
125
|
-
"eslint": "^8.
|
|
131
|
+
"eslint": "^8.25.0",
|
|
126
132
|
"eslint-config-prettier": "^8.5.0",
|
|
127
|
-
"eslint-plugin-jest": "^
|
|
128
|
-
"eslint-plugin-mocha": "^10.0
|
|
129
|
-
"eslint-plugin-prettier": "^4.
|
|
130
|
-
"eslint-plugin-react": "^7.
|
|
133
|
+
"eslint-plugin-jest": "^27.1.1",
|
|
134
|
+
"eslint-plugin-mocha": "^10.1.0",
|
|
135
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
136
|
+
"eslint-plugin-react": "^7.31.10",
|
|
131
137
|
"genversion": "^3.1.1",
|
|
132
|
-
"google-java-format": "^1.0
|
|
133
|
-
"inquirer": "^
|
|
134
|
-
"jest": "^
|
|
135
|
-
"lerna": "
|
|
136
|
-
"prettier": "^2.
|
|
137
|
-
"react": "^18.
|
|
138
|
-
"react-native": "0.
|
|
139
|
-
"react-native-builder-bob": "^0.18.
|
|
138
|
+
"google-java-format": "^1.1.0",
|
|
139
|
+
"inquirer": "^9.1.3",
|
|
140
|
+
"jest": "^29.1.2",
|
|
141
|
+
"lerna": "5.6.2",
|
|
142
|
+
"prettier": "^2.7.1",
|
|
143
|
+
"react": "^18.2.0",
|
|
144
|
+
"react-native": "0.70.2",
|
|
145
|
+
"react-native-builder-bob": "^0.18.3",
|
|
140
146
|
"rimraf": "^3.0.2",
|
|
141
|
-
"semantic-release": "^19.0.
|
|
147
|
+
"semantic-release": "^19.0.5",
|
|
142
148
|
"shelljs": "^0.8.5",
|
|
143
|
-
"ts-jest": "^
|
|
144
|
-
"ts-node": "^10.
|
|
145
|
-
"typescript": "^4.
|
|
149
|
+
"ts-jest": "^29.0.3",
|
|
150
|
+
"ts-node": "^10.9.1",
|
|
151
|
+
"typescript": "^4.8.4"
|
|
146
152
|
},
|
|
147
153
|
"publishConfig": {
|
|
148
154
|
"access": "public"
|
|
@@ -47,6 +47,8 @@ function nativeModuleMethodWrapped(
|
|
|
47
47
|
return (...args: []) => {
|
|
48
48
|
const possiblePromise = method(...[...argToPrepend, ...args]);
|
|
49
49
|
|
|
50
|
+
// @ts-ignore -- return type is Promise, so tsc infers we *know* it is a promise and .then always exists, but
|
|
51
|
+
// but the typing is actually speculative, we do need to test it
|
|
50
52
|
if (possiblePromise && possiblePromise.then) {
|
|
51
53
|
const jsStack = new Error().stack || '';
|
|
52
54
|
return possiblePromise.catch(nativeError =>
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '8.1.
|
|
2
|
+
export const version = '8.1.2';
|