mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-08-04 00:00:08 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8edd359b2 |
@@ -3,10 +3,27 @@ import { AwesomeCordovaNativePlugin, Cordova, Plugin } from '@awesome-cordova-pl
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface InitializeConfig {
|
||||
hasUserConsentValue: boolean;
|
||||
isAgeRestrictedUserValue: boolean;
|
||||
isDoNotSellValue: boolean;
|
||||
isTabletValue: boolean;
|
||||
/**
|
||||
* @deprecated Never populated by the native SDKs. Use `hasUserConsent` instead.
|
||||
*/
|
||||
hasUserConsentValue?: boolean;
|
||||
/**
|
||||
* @deprecated Never populated by the native SDKs, and the underlying `isAgeRestrictedUser`
|
||||
* field was removed upstream in cordova-plugin-applovin-max@2.0.0.
|
||||
*/
|
||||
isAgeRestrictedUserValue?: boolean;
|
||||
/**
|
||||
* @deprecated Never populated by the native SDKs. Use `isDoNotSell` instead.
|
||||
*/
|
||||
isDoNotSellValue?: boolean;
|
||||
/**
|
||||
* @deprecated Never populated by the native SDKs. Use `isTablet` instead.
|
||||
*/
|
||||
isTabletValue?: boolean;
|
||||
hasUserConsent: boolean;
|
||||
isDoNotSell: boolean;
|
||||
isTablet: boolean;
|
||||
countryCode: string;
|
||||
}
|
||||
|
||||
export interface AdInfo {
|
||||
@@ -17,6 +34,11 @@ export interface AdInfo {
|
||||
revenue: number;
|
||||
}
|
||||
|
||||
export interface AdRewardInfo extends AdInfo {
|
||||
rewardLabel: string;
|
||||
rewardAmount: number;
|
||||
}
|
||||
|
||||
export enum AdViewPosition {
|
||||
TOP_CENTER = 'top_center',
|
||||
TOP_RIGHT = 'top_right',
|
||||
@@ -28,6 +50,10 @@ export enum AdViewPosition {
|
||||
BOTTOM_RIGHT = 'bottom_right',
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Only produced by the now-removed `getConsentDialogState` method
|
||||
* (removed upstream in cordova-plugin-applovin-max@2.0.0).
|
||||
*/
|
||||
export enum ConsentDialogState {
|
||||
UNKNOWN = 0,
|
||||
APPLIES = 1,
|
||||
@@ -80,11 +106,22 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the SDK has been initialized.
|
||||
*/
|
||||
@Cordova()
|
||||
isInitialized(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showMediationDebugger(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Removed upstream in cordova-plugin-applovin-max@2.0.0.
|
||||
*/
|
||||
@Cordova()
|
||||
getConsentDialogState(): Promise<ConsentDialogState> {
|
||||
return;
|
||||
@@ -100,11 +137,17 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Removed upstream in cordova-plugin-applovin-max@2.0.0.
|
||||
*/
|
||||
@Cordova()
|
||||
setIsAgeRestrictedUser(isAgeRestrictedUser: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Removed upstream in cordova-plugin-applovin-max@2.0.0.
|
||||
*/
|
||||
@Cordova()
|
||||
isAgeRestrictedUser(): Promise<boolean> {
|
||||
return;
|
||||
@@ -130,8 +173,11 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} muted Whether ads should be muted.
|
||||
*/
|
||||
@Cordova()
|
||||
setMuted(): Promise<boolean> {
|
||||
setMuted(muted: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -145,6 +191,19 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/** SEGMENT TARGETING */
|
||||
|
||||
/**
|
||||
* Add a segment for segment targeting. Must be called before `initialize()`.
|
||||
*
|
||||
* @param {number} key The segment key.
|
||||
* @param {number[]} values The segment values.
|
||||
*/
|
||||
@Cordova()
|
||||
addSegment(key: number, values: number[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
trackEvent(event: string, parameters?: object): Promise<any> {
|
||||
return;
|
||||
@@ -167,6 +226,11 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
updateBannerPosition(adUnitId: string, position: AdViewPosition): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBannerExtraParameter(adUnitId: string, key: string, value: string): Promise<any> {
|
||||
return;
|
||||
@@ -187,6 +251,46 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnBannerAdLoadedEvent',
|
||||
})
|
||||
onBannerAdLoaded(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnBannerAdLoadFailedEvent',
|
||||
})
|
||||
onBannerAdLoadFailed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnBannerAdClickedEvent',
|
||||
})
|
||||
onBannerAdClicked(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnBannerAdExpandedEvent',
|
||||
})
|
||||
onBannerAdExpanded(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnBannerAdCollapsedEvent',
|
||||
})
|
||||
onBannerAdCollapsed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** MRECS */
|
||||
|
||||
@Cordova()
|
||||
@@ -204,6 +308,11 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
updateMRecPosition(adUnitId: string, position: AdViewPosition): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMRecExtraParameter(adUnitId: string, key: string, value: string): Promise<any> {
|
||||
return;
|
||||
@@ -224,6 +333,46 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnMRecAdLoadedEvent',
|
||||
})
|
||||
onMRecAdLoaded(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnMRecAdLoadFailedEvent',
|
||||
})
|
||||
onMRecAdLoadFailed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnMRecAdClickedEvent',
|
||||
})
|
||||
onMRecAdClicked(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnMRecAdExpandedEvent',
|
||||
})
|
||||
onMRecAdExpanded(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnMRecAdCollapsedEvent',
|
||||
})
|
||||
onMRecAdCollapsed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** INTERSTITIALS */
|
||||
|
||||
@Cordova()
|
||||
@@ -231,6 +380,14 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} adUnitId The ad unit id to check.
|
||||
*/
|
||||
@Cordova()
|
||||
isInterstitialReady(adUnitId: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showInterstitial(adUnitId: string, placement?: string): Promise<any> {
|
||||
return;
|
||||
@@ -249,6 +406,14 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnInterstitialClickedEvent',
|
||||
})
|
||||
onInterstitialClicked(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnInterstitialLoadFailedEvent',
|
||||
@@ -288,6 +453,14 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} adUnitId The ad unit id to check.
|
||||
*/
|
||||
@Cordova()
|
||||
isRewardedAdReady(adUnitId: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showRewardedAd(adUnitId: string, placement?: string): Promise<any> {
|
||||
return;
|
||||
@@ -306,6 +479,14 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdClickedEvent',
|
||||
})
|
||||
onRewardedAdClicked(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdLoadFailedEvent',
|
||||
@@ -332,9 +513,17 @@ export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdAdFailedToDisplayEvent',
|
||||
event: 'OnRewardedAdFailedToDisplayEvent',
|
||||
})
|
||||
onRewardedAdAdFailedToDisplay(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdReceivedRewardEvent',
|
||||
})
|
||||
onRewardedAdReceivedReward(): Observable<AdRewardInfo> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,10 +41,7 @@ export interface TealiumDispatch {
|
||||
|
||||
export class TealiumView implements TealiumDispatch {
|
||||
public type = 'view';
|
||||
constructor(
|
||||
public viewName: string,
|
||||
public dataLayer: Map<string, any>
|
||||
) {}
|
||||
constructor(public viewName: string, public dataLayer: Map<string, any>) {}
|
||||
toJson() {
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
@@ -60,10 +57,7 @@ export class TealiumView implements TealiumDispatch {
|
||||
|
||||
export class TealiumEvent implements TealiumDispatch {
|
||||
public type = 'event';
|
||||
constructor(
|
||||
public eventName: string,
|
||||
public dataLayer: Map<string, any>
|
||||
) {}
|
||||
constructor(public eventName: string, public dataLayer: Map<string, any>) {}
|
||||
toJson() {
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
@@ -78,21 +72,7 @@ export class TealiumEvent implements TealiumDispatch {
|
||||
}
|
||||
|
||||
export class ConsentExpiry {
|
||||
constructor(
|
||||
public time: number,
|
||||
public unit: TimeUnit
|
||||
) {}
|
||||
}
|
||||
|
||||
export interface RemoteCommand {
|
||||
/** The ID used to invoke the remote command */
|
||||
id: string;
|
||||
/** Path to a local JSON file mapping, relative to the app bundle */
|
||||
path?: string;
|
||||
/** URL to a remote JSON file mapping */
|
||||
url?: string;
|
||||
/** Callback invoked when the remote command is triggered */
|
||||
callback?: Function;
|
||||
constructor(public time: number, public unit: TimeUnit) {}
|
||||
}
|
||||
|
||||
export enum TimeUnit {
|
||||
@@ -150,7 +130,6 @@ export interface TealiumConfig {
|
||||
memoryReportingEnabled?: boolean;
|
||||
overrideCollectURL?: string;
|
||||
overrideCollectBatchURL?: string;
|
||||
overrideCollectProfile?: string;
|
||||
overrideCollectDomain?: string;
|
||||
overrideLibrarySettingsURL?: string;
|
||||
overrideTagManagementURL?: string;
|
||||
@@ -164,12 +143,6 @@ export interface TealiumConfig {
|
||||
useRemoteLibrarySettings?: boolean;
|
||||
visitorServiceEnabled?: boolean;
|
||||
visitorServiceRefreshInterval?: string;
|
||||
/** Remote commands to register automatically on initialize */
|
||||
remoteCommands?: RemoteCommand[];
|
||||
/** Whether session counting is enabled */
|
||||
sessionCountingEnabled?: boolean;
|
||||
/** Whether dispatch batching is enabled */
|
||||
batchingEnabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,16 +251,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers the current track data (data layer merged with library data) without dispatching a track call
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
gatherTrackData(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the user's consent status
|
||||
* @param callback
|
||||
@@ -347,16 +310,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes a deep link URI to the Tealium library for tracking
|
||||
* @param uri The deep link URI
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
handleDeepLink(uri: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the Tealium Visitor ID
|
||||
* @param callback
|
||||
@@ -367,24 +320,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the Tealium Visitor ID, generating a new one
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
resetVisitorId(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all previously-stored visitor IDs
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
clearStoredVisitorIds(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the AudienceStream visitor profile is updated
|
||||
* @param callback
|
||||
@@ -395,16 +330,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the Visitor ID changes
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setVisitorIdListener(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the consent has expired
|
||||
* @param callback
|
||||
@@ -419,12 +344,10 @@ export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
* Adds a remote command for later execution
|
||||
* @param id The ID used to invoke the remote command
|
||||
* @param callback
|
||||
* @param path Path to a local JSON file mapping, relative to the app bundle
|
||||
* @param url URL to a remote JSON file mapping
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addRemoteCommand(id: string, callback?: Function, path?: string, url?: string): Promise<any> {
|
||||
addRemoteCommand(id: string, callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user