Skip to content

Commit

Permalink
feat(adjust): update wrapper for Adjust Cordova SDK v4.35.1 (#4696)
Browse files Browse the repository at this point in the history
* feat(diagnostics): add missing constants and methods for latest plugin version (#4600)

* feat(cordova-plugin-firebase-model): Add new plugin to download and process ML model hosted in firebase. (#4608)

* feat(unvired-cordova-sdk): Add new function to regenrate the JWT Token

* feat(unvired-cordova-sdk): Add couple of properties to login parameters.

* feat(cordova-plugin-firebase-model): Add new plugin for downloading and processing ML model hosted in Firebase.

* fix(cordova-plugin-unvired-sdk): revert last set of changes.

* fix(cordova-plugin-unvired-sdk): Add two new login properties.

* fix(cordova-plugin-firebase-model): Delete the previously added plugin.

* Revert "fix(cordova-plugin-firebase-model): Delete the previously added plugin."

This reverts commit 86f39dc.

* Revert "fix(cordova-plugin-unvired-sdk): Add two new login properties."

This reverts commit a79f31e.

* feat(clevertap): support clevertap-cordova 2.7.0 (#4617) [skip ci]

* feat(clevertap): add CleverTap plugin

* style(clevertap): cleanup stray lint error

* refactor

* feat(clevertap): update for latest CleverTap Cordova plugin

* chore: Update Repo from Ionic Native Repo

* fix: Code Changes for parity SDK-155

* fix: Indentation fixes for SDK-155

* fix: Code Repo fix while updating fork branch

* fix: Remove unnecessary adder .scripts Folder

* fix: Remove unwanted added folder .circleci

* fix: Remove unwanted added File .npmrc

* fix: Revert .Github Folder Changes to as per Ionic-Native master

* fix: Update changes as per ionic-native master

* fix: Code Repo fix while updating fork branch

fix: Remove unnecessary adder .scripts Folder

fix: Remove unwanted added folder .circleci

fix: Remove unwanted added File .npmrc

fix: Revert .Github Folder Changes to as per Ionic-Native master

fix: Update changes as per ionic-native master

* fix(CleverTap): Fix for missing methods issue #3491

* refactor(profile): remove setProfile methods for fb and google

* refactor(dynamic variables): remove Product A/B Testing (Dynamic Variables) code

* fix(product config): add key param to product config getters

* feat(identity): add a new public method getCleverTapID and deprecate existing CleverTapID methods

* feat(profile): add public methods to increment/decrement values set via User properties

* feat(profile): add public methods to increment/decrement values set via User properties

* feat(inapp): add public methods for suspending/discarding & resuming InApp Notifications

* feat(inbox): add new api for iOS to delete bulk inbox messages for given message ids

* refactor(xiaomi-push): add region as an extra mandatory parameter to setPushXiaomiToken

* Update index.ts to support cordova 2.7.0

* Update index.ts

---------

Co-authored-by: Peter Wilkniss <[email protected]>
Co-authored-by: Daniel Sogl <[email protected]>
Co-authored-by: Darshan Pania <[email protected]>
Co-authored-by: Surya <[email protected]>
Co-authored-by: SuryaClevertap <[email protected]>
Co-authored-by: Piyush Kukadiya <[email protected]>
Co-authored-by: piyush-kukadiya <[email protected]>

* feat(save-dialog): add plugin (#4618)

* smtp-client

* fix plugin ref

* cloud settings

* + save-dialog

---------

Co-authored-by: Daniel Sogl <[email protected]>

* feat(adjust): update wrapper for Adjust Cordova SDK v4.35.1

* fix(adjust): rename duplicated AdjustAppStorePurchase class member

---------

Co-authored-by: Dave Alden <[email protected]>
Co-authored-by: Srinidhi <[email protected]>
Co-authored-by: AishwaryaNanna <[email protected]>
Co-authored-by: Peter Wilkniss <[email protected]>
Co-authored-by: Darshan Pania <[email protected]>
Co-authored-by: Surya <[email protected]>
Co-authored-by: SuryaClevertap <[email protected]>
Co-authored-by: Piyush Kukadiya <[email protected]>
Co-authored-by: piyush-kukadiya <[email protected]>
Co-authored-by: marysuon <[email protected]>
Co-authored-by: uerceg <[email protected]>
  • Loading branch information
12 people authored Dec 19, 2023
1 parent 02219c0 commit 709049f
Showing 1 changed file with 103 additions and 9 deletions.
112 changes: 103 additions & 9 deletions src/@awesome-cordova-plugins/plugins/adjust/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export class AdjustEvent {
private eventToken: string;
private revenue: number;
private currency: string;
private receipt: string;
private productId: string;
private transactionId: string;
private purchaseToken: string;
private callbackId: string;
private callbackParameters: string[] = [];
private partnerParameters: string[] = [];
Expand Down Expand Up @@ -36,6 +39,18 @@ export class AdjustEvent {
setCallbackId(callbackId: string) {
this.callbackId = callbackId;
}

setReceipt(receipt: string) {
this.receipt = receipt;
}

setProductId(productId: string) {
this.productId = productId;
}

setPurchaseToken(purchaseToken: string) {
this.purchaseToken = purchaseToken;
}
}

export class AdjustConfig {
Expand Down Expand Up @@ -65,9 +80,11 @@ export class AdjustConfig {
private allowiAdInfoReading: boolean = null; // iOS only
private allowIdfaReading: boolean = null; // iOS only
private allowAdServicesInfoReading: boolean = null; // iOS only
private coppaCompliantEnabled: boolean = null;
private coppaCompliantEnabled: boolean = null;
private playStoreKidsAppEnabled: boolean = null; // Android only
private linkMeEnabled: boolean = null; // iOS only
private finalAndroidAttributionEnabled: boolean = null; // Android only
private attConsentWaitingInterval: number = null; // iOS only

private attributionCallback: (attribution: AdjustAttribution) => void = null;
private eventTrackingSucceededCallback: (event: AdjustEventSuccess) => void = null;
Expand All @@ -76,6 +93,7 @@ export class AdjustConfig {
private sessionTrackingFailedCallback: (session: AdjustSessionFailure) => void = null;
private deferredDeeplinkCallback: (uri: string) => void = null;
private conversionValueUpdatedCallback: (conversionValue: number) => void = null;
private skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void = null;

constructor(appToken: string, environment: AdjustEnvironment) {
this.appToken = appToken;
Expand Down Expand Up @@ -174,6 +192,14 @@ export class AdjustConfig {
this.linkMeEnabled = linkMeEnabled;
}

setFinalAndroidAttributionEnabled(finalAndroidAttributionEnabled: boolean) {
this.finalAndroidAttributionEnabled = finalAndroidAttributionEnabled;
}

setAttConsentWaitingInterval(attConsentWaitingInterval: number) {
this.attConsentWaitingInterval = attConsentWaitingInterval;
}

setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
this.attributionCallback = attributionCallback;
}
Expand Down Expand Up @@ -204,6 +230,12 @@ export class AdjustConfig {
this.conversionValueUpdatedCallback = conversionValueUpdatedCallback;
}

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

private getAttributionCallback() {
return this.attributionCallback;
}
Expand Down Expand Up @@ -232,6 +264,10 @@ export class AdjustConfig {
return this.conversionValueUpdatedCallback;
}

private getSkad4ConversionValueUpdatedCallback() {
return this.skad4ConversionValueUpdatedCallback;
}

private hasAttributionListener() {
return this.attributionCallback !== null;
}
Expand Down Expand Up @@ -259,6 +295,10 @@ export class AdjustConfig {
private hasConversionValueUpdatedCallbackListener() {
return this.conversionValueUpdatedCallback !== null;
}

private hasSkad4ConversionValueUpdatedCallbackListener() {
return this.skad4ConversionValueUpdatedCallback !== null;
}
}

export class AdjustAppStoreSubscription {
Expand Down Expand Up @@ -401,6 +441,28 @@ export class AdjustAdRevenue {
}
}

export class AdjustAppStorePurchase {
private receipt: string;
private productId: string;
private transactionId: string;

constructor(receipt: string, productId: string, transactionId: string) {
this.receipt = receipt;
this.productId = productId;
this.transactionId = transactionId;
}
}

export class AdjustPlayStorePurchase {
private productId: string;
private purchaseToken: string;

constructor(productId: string, purchaseToken: string) {
this.productId = productId;
this.purchaseToken = purchaseToken;
}
}

export interface AdjustAttribution {
trackerToken: string;
trackerName: string;
Expand Down Expand Up @@ -450,6 +512,18 @@ export interface AdjustEventFailure {
jsonResponse: string;
}

export interface AdjustSkad4Data {
fineValue: number;
coarseValue: string;
lockWindow: boolean;
}

export interface AdjustPurchaseVerificationInfo {
verificationStatus: string;
code: number;
message: string;
}

export enum AdjustEnvironment {
Sandbox = 'sandbox',
Production = 'production',
Expand All @@ -468,6 +542,7 @@ export enum AdjustLogLevel {
export enum AdjustUrlStrategy {
India = 'india',
China = 'china',
Cn = 'cn',
DataResidencyEU = 'data-residency-eu',
DataResidencyTR = 'data-residency-tr',
DataResidencyUS = 'data-residency-us',
Expand All @@ -478,10 +553,10 @@ 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',
}

/**
Expand Down Expand Up @@ -511,13 +586,17 @@ export enum AdjustAdRevenueSource {
* AdjustSessionFailure
* AdjustEventSuccess
* AdjustEventFailure
* AdjustSkad4Data
* AdjustPurchaseVerificationInfo
* @classes
* AdjustEvent
* AdjustConfig
* AdjustAppStoreSubscription
* AdjustPlayStoreSubscription
* AdjustThirdPartySharing
* AdjustAdReenue
* AdjustAdRevenue
* AdjustAppStorePurchase
* AdjustPlayStorePurchase
* @enums
* AdjustEnvironment
* AdjustLogLevel
Expand All @@ -533,7 +612,6 @@ export enum AdjustAdRevenueSource {
})
@Injectable()
export class Adjust extends AwesomeCordovaNativePlugin {

/**
* This method initializes Adjust SDK
*
Expand Down Expand Up @@ -652,7 +730,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 @@ -815,4 +893,20 @@ export class Adjust extends AwesomeCordovaNativePlugin {
getLastDeeplink(): Promise<string> {
return;
}
}

/**
* This method is used to verify the App Store purchase
*
* @param {AdjustAppStorePurchase} purchase Adjust App Store purchase object to be verified
*/
@Cordova()
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}

/**
* This method is used to verify the Play Store purchase
*
* @param {AdjustPlayStorePurchase} purchase Adjust Play Store purchase object to be verified
*/
@Cordova()
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
}

0 comments on commit 709049f

Please sign in to comment.