Skip to content

Commit 709049f

Browse files
danielsogldpa99csrinidhiraoAishwaryaNannapwilkniss
authored
feat(adjust): update wrapper for Adjust Cordova SDK v4.35.1 (#4696)
* 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 <peter@clevertap.com> Co-authored-by: Daniel Sogl <mytechde@outlook.com> Co-authored-by: Darshan Pania <darshan@clevertap.com> Co-authored-by: Surya <suryanarayan@clevertap.com> Co-authored-by: SuryaClevertap <63039490+SuryaClevertap@users.noreply.github.com> Co-authored-by: Piyush Kukadiya <piyush.kukadiya@clevertap.com> Co-authored-by: piyush-kukadiya <61137760+piyush-kukadiya@users.noreply.github.com> * feat(save-dialog): add plugin (#4618) * smtp-client * fix plugin ref * cloud settings * + save-dialog --------- Co-authored-by: Daniel Sogl <daniel@sogls.de> * feat(adjust): update wrapper for Adjust Cordova SDK v4.35.1 * fix(adjust): rename duplicated AdjustAppStorePurchase class member --------- Co-authored-by: Dave Alden <dpa99c@gmail.com> Co-authored-by: Srinidhi <srinidhi.rao@unvired.com> Co-authored-by: AishwaryaNanna <97506871+AishwaryaNanna@users.noreply.github.com> Co-authored-by: Peter Wilkniss <peter@clevertap.com> Co-authored-by: Darshan Pania <darshan@clevertap.com> Co-authored-by: Surya <suryanarayan@clevertap.com> Co-authored-by: SuryaClevertap <63039490+SuryaClevertap@users.noreply.github.com> Co-authored-by: Piyush Kukadiya <piyush.kukadiya@clevertap.com> Co-authored-by: piyush-kukadiya <61137760+piyush-kukadiya@users.noreply.github.com> Co-authored-by: marysuon <marysuon@gmail.com> Co-authored-by: uerceg <ugi@adjust.com>
1 parent 02219c0 commit 709049f

File tree

1 file changed

+103
-9
lines changed
  • src/@awesome-cordova-plugins/plugins/adjust

1 file changed

+103
-9
lines changed

src/@awesome-cordova-plugins/plugins/adjust/index.ts

Lines changed: 103 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ export class AdjustEvent {
55
private eventToken: string;
66
private revenue: number;
77
private currency: string;
8+
private receipt: string;
9+
private productId: string;
810
private transactionId: string;
11+
private purchaseToken: string;
912
private callbackId: string;
1013
private callbackParameters: string[] = [];
1114
private partnerParameters: string[] = [];
@@ -36,6 +39,18 @@ export class AdjustEvent {
3639
setCallbackId(callbackId: string) {
3740
this.callbackId = callbackId;
3841
}
42+
43+
setReceipt(receipt: string) {
44+
this.receipt = receipt;
45+
}
46+
47+
setProductId(productId: string) {
48+
this.productId = productId;
49+
}
50+
51+
setPurchaseToken(purchaseToken: string) {
52+
this.purchaseToken = purchaseToken;
53+
}
3954
}
4055

4156
export class AdjustConfig {
@@ -65,9 +80,11 @@ export class AdjustConfig {
6580
private allowiAdInfoReading: boolean = null; // iOS only
6681
private allowIdfaReading: boolean = null; // iOS only
6782
private allowAdServicesInfoReading: boolean = null; // iOS only
68-
private coppaCompliantEnabled: boolean = null;
83+
private coppaCompliantEnabled: boolean = null;
6984
private playStoreKidsAppEnabled: boolean = null; // Android only
7085
private linkMeEnabled: boolean = null; // iOS only
86+
private finalAndroidAttributionEnabled: boolean = null; // Android only
87+
private attConsentWaitingInterval: number = null; // iOS only
7188

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

8098
constructor(appToken: string, environment: AdjustEnvironment) {
8199
this.appToken = appToken;
@@ -174,6 +192,14 @@ export class AdjustConfig {
174192
this.linkMeEnabled = linkMeEnabled;
175193
}
176194

195+
setFinalAndroidAttributionEnabled(finalAndroidAttributionEnabled: boolean) {
196+
this.finalAndroidAttributionEnabled = finalAndroidAttributionEnabled;
197+
}
198+
199+
setAttConsentWaitingInterval(attConsentWaitingInterval: number) {
200+
this.attConsentWaitingInterval = attConsentWaitingInterval;
201+
}
202+
177203
setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
178204
this.attributionCallback = attributionCallback;
179205
}
@@ -204,6 +230,12 @@ export class AdjustConfig {
204230
this.conversionValueUpdatedCallback = conversionValueUpdatedCallback;
205231
}
206232

233+
setSkad4ConversionValueUpdatedCallbackListener(
234+
skad4ConversionValueUpdatedCallback: (skad4Data: AdjustSkad4Data) => void
235+
) {
236+
this.skad4ConversionValueUpdatedCallback = skad4ConversionValueUpdatedCallback;
237+
}
238+
207239
private getAttributionCallback() {
208240
return this.attributionCallback;
209241
}
@@ -232,6 +264,10 @@ export class AdjustConfig {
232264
return this.conversionValueUpdatedCallback;
233265
}
234266

267+
private getSkad4ConversionValueUpdatedCallback() {
268+
return this.skad4ConversionValueUpdatedCallback;
269+
}
270+
235271
private hasAttributionListener() {
236272
return this.attributionCallback !== null;
237273
}
@@ -259,6 +295,10 @@ export class AdjustConfig {
259295
private hasConversionValueUpdatedCallbackListener() {
260296
return this.conversionValueUpdatedCallback !== null;
261297
}
298+
299+
private hasSkad4ConversionValueUpdatedCallbackListener() {
300+
return this.skad4ConversionValueUpdatedCallback !== null;
301+
}
262302
}
263303

264304
export class AdjustAppStoreSubscription {
@@ -401,6 +441,28 @@ export class AdjustAdRevenue {
401441
}
402442
}
403443

444+
export class AdjustAppStorePurchase {
445+
private receipt: string;
446+
private productId: string;
447+
private transactionId: string;
448+
449+
constructor(receipt: string, productId: string, transactionId: string) {
450+
this.receipt = receipt;
451+
this.productId = productId;
452+
this.transactionId = transactionId;
453+
}
454+
}
455+
456+
export class AdjustPlayStorePurchase {
457+
private productId: string;
458+
private purchaseToken: string;
459+
460+
constructor(productId: string, purchaseToken: string) {
461+
this.productId = productId;
462+
this.purchaseToken = purchaseToken;
463+
}
464+
}
465+
404466
export interface AdjustAttribution {
405467
trackerToken: string;
406468
trackerName: string;
@@ -450,6 +512,18 @@ export interface AdjustEventFailure {
450512
jsonResponse: string;
451513
}
452514

515+
export interface AdjustSkad4Data {
516+
fineValue: number;
517+
coarseValue: string;
518+
lockWindow: boolean;
519+
}
520+
521+
export interface AdjustPurchaseVerificationInfo {
522+
verificationStatus: string;
523+
code: number;
524+
message: string;
525+
}
526+
453527
export enum AdjustEnvironment {
454528
Sandbox = 'sandbox',
455529
Production = 'production',
@@ -468,6 +542,7 @@ export enum AdjustLogLevel {
468542
export enum AdjustUrlStrategy {
469543
India = 'india',
470544
China = 'china',
545+
Cn = 'cn',
471546
DataResidencyEU = 'data-residency-eu',
472547
DataResidencyTR = 'data-residency-tr',
473548
DataResidencyUS = 'data-residency-us',
@@ -478,10 +553,10 @@ export enum AdjustAdRevenueSource {
478553
AdRevenueSourceMopub = 'mopub',
479554
AdRevenueSourceAdMob = 'admob_sdk',
480555
AdRevenueSourceIronSource = 'ironsource_sdk',
481-
AdRevenueSourceAdMost = "admost_sdk",
482-
AdRevenueSourceUnity = "unity_sdk",
483-
AdRevenueSourceHeliumChartboost = "helium_chartboost_sdk",
484-
AdRevenueSourcePublisher = "publisher_sdk",
556+
AdRevenueSourceAdMost = 'admost_sdk',
557+
AdRevenueSourceUnity = 'unity_sdk',
558+
AdRevenueSourceHeliumChartboost = 'helium_chartboost_sdk',
559+
AdRevenueSourcePublisher = 'publisher_sdk',
485560
}
486561

487562
/**
@@ -511,13 +586,17 @@ export enum AdjustAdRevenueSource {
511586
* AdjustSessionFailure
512587
* AdjustEventSuccess
513588
* AdjustEventFailure
589+
* AdjustSkad4Data
590+
* AdjustPurchaseVerificationInfo
514591
* @classes
515592
* AdjustEvent
516593
* AdjustConfig
517594
* AdjustAppStoreSubscription
518595
* AdjustPlayStoreSubscription
519596
* AdjustThirdPartySharing
520-
* AdjustAdReenue
597+
* AdjustAdRevenue
598+
* AdjustAppStorePurchase
599+
* AdjustPlayStorePurchase
521600
* @enums
522601
* AdjustEnvironment
523602
* AdjustLogLevel
@@ -533,7 +612,6 @@ export enum AdjustAdRevenueSource {
533612
})
534613
@Injectable()
535614
export class Adjust extends AwesomeCordovaNativePlugin {
536-
537615
/**
538616
* This method initializes Adjust SDK
539617
*
@@ -652,7 +730,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
652730
gdprForgetMe(): void {}
653731

654732
/**
655-
* 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.
733+
* 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.
656734
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend
657735
*/
658736
@Cordova({ sync: true })
@@ -815,4 +893,20 @@ export class Adjust extends AwesomeCordovaNativePlugin {
815893
getLastDeeplink(): Promise<string> {
816894
return;
817895
}
818-
}
896+
897+
/**
898+
* This method is used to verify the App Store purchase
899+
*
900+
* @param {AdjustAppStorePurchase} purchase Adjust App Store purchase object to be verified
901+
*/
902+
@Cordova()
903+
verifyAppStorePurchase(purchase: AdjustAppStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
904+
905+
/**
906+
* This method is used to verify the Play Store purchase
907+
*
908+
* @param {AdjustPlayStorePurchase} purchase Adjust Play Store purchase object to be verified
909+
*/
910+
@Cordova()
911+
verifyPlayStorePurchase(purchase: AdjustPlayStorePurchase): Promise<AdjustPurchaseVerificationInfo> {}
912+
}

0 commit comments

Comments
 (0)