Skip to content

Commit

Permalink
feat(adjust): update wrapper for Adjust Cordova SDK v4.37.1 (#4724)
Browse files Browse the repository at this point in the history
  • Loading branch information
uerceg committed Apr 17, 2024
1 parent 23e6147 commit 551170b
Showing 1 changed file with 40 additions and 11 deletions.
51 changes: 40 additions & 11 deletions src/@awesome-cordova-plugins/plugins/adjust/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ export class AdjustConfig {
private processName: string = null; // Android only
private preinstallTrackingEnabled: boolean = null; // Android only
private preinstallFilePath: string = null; // Android only
private fbAppId: string = null; // Android only
private oaidReadingEnabled: boolean = null; // Android only
private allowiAdInfoReading: boolean = null; // iOS only
private allowIdfaReading: boolean = null; // iOS only
private allowAdServicesInfoReading: boolean = null; // iOS only
private coppaCompliantEnabled: boolean = null;
private readDeviceInfoOnceEnabled: boolean = null;
private playStoreKidsAppEnabled: boolean = null; // Android only
private linkMeEnabled: boolean = null; // iOS only
private finalAndroidAttributionEnabled: boolean = null; // Android only
Expand Down Expand Up @@ -144,6 +146,10 @@ export class AdjustConfig {
this.coppaCompliantEnabled = coppaCompliantEnabled;
}

setReadDeviceInfoOnceEnabled(readDeviceInfoOnceEnabled: boolean) {
this.readDeviceInfoOnceEnabled = readDeviceInfoOnceEnabled;
}

setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled: boolean) {
this.playStoreKidsAppEnabled = playStoreKidsAppEnabled;
}
Expand Down Expand Up @@ -172,6 +178,10 @@ export class AdjustConfig {
this.preinstallFilePath = preinstallFilePath;
}

setFbAppId(fbAppId: string) {
this.fbAppId = fbAppId;
}

setOaidReadingEnabled(enableOaidReading: boolean) {
this.oaidReadingEnabled = enableOaidReading;
}
Expand Down Expand Up @@ -230,9 +240,7 @@ export class AdjustConfig {
this.conversionValueUpdatedCallback = conversionValueUpdatedCallback;
}

setSkad4ConversionValueUpdatedCallbackListener(
skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void
) {
setSkad4ConversionValueUpdatedCallbackListener(skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void) {
this.skad4ConversionValueUpdatedCallback = skad4ConversionValueUpdatedCallback;
}

Expand Down Expand Up @@ -543,6 +551,7 @@ export enum AdjustUrlStrategy {
India = 'india',
China = 'china',
Cn = 'cn',
CnOnly = 'cn-only',
DataResidencyEU = 'data-residency-eu',
DataResidencyTR = 'data-residency-tr',
DataResidencyUS = 'data-residency-us',
Expand All @@ -553,10 +562,12 @@ export enum AdjustAdRevenueSource {
AdRevenueSourceMopub = 'mopub',
AdRevenueSourceAdMob = 'admob_sdk',
AdRevenueSourceIronSource = 'ironsource_sdk',
AdRevenueSourceAdMost = 'admost_sdk',
AdRevenueSourceUnity = 'unity_sdk',
AdRevenueSourceHeliumChartboost = 'helium_chartboost_sdk',
AdRevenueSourcePublisher = 'publisher_sdk',
AdRevenueSourceAdMost = "admost_sdk",
AdRevenueSourceUnity = "unity_sdk",
AdRevenueSourceHeliumChartboost = "helium_chartboost_sdk",
AdRevenueSourcePublisher = "publisher_sdk",
AdRevenueSourceTopOn = "topon_sdk",
AdRevenueSourceAdx = "adx_sdk",
}

/**
Expand Down Expand Up @@ -612,6 +623,7 @@ export enum AdjustAdRevenueSource {
})
@Injectable()
export class Adjust extends AwesomeCordovaNativePlugin {

/**
* This method initializes Adjust SDK
*
Expand Down Expand Up @@ -730,7 +742,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
gdprForgetMe(): void {}

/**
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend
*/
@Cordova({ sync: true })
Expand Down Expand Up @@ -898,15 +910,32 @@ export class Adjust extends AwesomeCordovaNativePlugin {
* This method is used to verify the App Store purchase
*
* @param {AdjustAppStorePurchase} purchase Adjust App Store purchase object to be verified
* @returns {Promise<AdjustPurchaseVerificationInfo>} Returns a promise with purchase verification outcome
*/
@Cordova()
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {
return;
}

/**
* This method is used to verify the Play Store purchase
*
* @param {AdjustPlayStorePurchase} purchase Adjust Play Store purchase object to be verified
* @returns {Promise<AdjustPurchaseVerificationInfo>} Returns a promise with purchase verification outcome
*/
@Cordova()
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
}
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {
return;
}

/**
* This method is used to send and potentially resolve shortened deep links
*
* @param {string} deeplink Potentially shortened deep link that has opened your app
* @returns {Promise<string>} Returns a promise with either resolved (if it was resolved) or echoed deep link
*/
@Cordova()
processDeeplink(deeplink: string): Promise<string> {
return;
}
}

0 comments on commit 551170b

Please sign in to comment.