@@ -5,7 +5,10 @@ export class AdjustEvent {
5
5
private eventToken : string ;
6
6
private revenue : number ;
7
7
private currency : string ;
8
+ private receipt : string ;
9
+ private productId : string ;
8
10
private transactionId : string ;
11
+ private purchaseToken : string ;
9
12
private callbackId : string ;
10
13
private callbackParameters : string [ ] = [ ] ;
11
14
private partnerParameters : string [ ] = [ ] ;
@@ -36,6 +39,18 @@ export class AdjustEvent {
36
39
setCallbackId ( callbackId : string ) {
37
40
this . callbackId = callbackId ;
38
41
}
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
+ }
39
54
}
40
55
41
56
export class AdjustConfig {
@@ -65,9 +80,11 @@ export class AdjustConfig {
65
80
private allowiAdInfoReading : boolean = null ; // iOS only
66
81
private allowIdfaReading : boolean = null ; // iOS only
67
82
private allowAdServicesInfoReading : boolean = null ; // iOS only
68
- private coppaCompliantEnabled : boolean = null ;
83
+ private coppaCompliantEnabled : boolean = null ;
69
84
private playStoreKidsAppEnabled : boolean = null ; // Android only
70
85
private linkMeEnabled : boolean = null ; // iOS only
86
+ private finalAndroidAttributionEnabled : boolean = null ; // Android only
87
+ private attConsentWaitingInterval : number = null ; // iOS only
71
88
72
89
private attributionCallback : ( attribution : AdjustAttribution ) => void = null ;
73
90
private eventTrackingSucceededCallback : ( event : AdjustEventSuccess ) => void = null ;
@@ -76,6 +93,7 @@ export class AdjustConfig {
76
93
private sessionTrackingFailedCallback : ( session : AdjustSessionFailure ) => void = null ;
77
94
private deferredDeeplinkCallback : ( uri : string ) => void = null ;
78
95
private conversionValueUpdatedCallback : ( conversionValue : number ) => void = null ;
96
+ private skad4ConversionValueUpdatedCallback : ( skad4Data : AdjustSkad4Data ) => void = null ;
79
97
80
98
constructor ( appToken : string , environment : AdjustEnvironment ) {
81
99
this . appToken = appToken ;
@@ -174,6 +192,14 @@ export class AdjustConfig {
174
192
this . linkMeEnabled = linkMeEnabled ;
175
193
}
176
194
195
+ setFinalAndroidAttributionEnabled ( finalAndroidAttributionEnabled : boolean ) {
196
+ this . finalAndroidAttributionEnabled = finalAndroidAttributionEnabled ;
197
+ }
198
+
199
+ setAttConsentWaitingInterval ( attConsentWaitingInterval : number ) {
200
+ this . attConsentWaitingInterval = attConsentWaitingInterval ;
201
+ }
202
+
177
203
setAttributionCallbackListener ( attributionCallback : ( attribution : AdjustAttribution ) => void ) {
178
204
this . attributionCallback = attributionCallback ;
179
205
}
@@ -204,6 +230,12 @@ export class AdjustConfig {
204
230
this . conversionValueUpdatedCallback = conversionValueUpdatedCallback ;
205
231
}
206
232
233
+ setSkad4ConversionValueUpdatedCallbackListener (
234
+ skad4ConversionValueUpdatedCallback : ( skad4Data : AdjustSkad4Data ) => void
235
+ ) {
236
+ this . skad4ConversionValueUpdatedCallback = skad4ConversionValueUpdatedCallback ;
237
+ }
238
+
207
239
private getAttributionCallback ( ) {
208
240
return this . attributionCallback ;
209
241
}
@@ -232,6 +264,10 @@ export class AdjustConfig {
232
264
return this . conversionValueUpdatedCallback ;
233
265
}
234
266
267
+ private getSkad4ConversionValueUpdatedCallback ( ) {
268
+ return this . skad4ConversionValueUpdatedCallback ;
269
+ }
270
+
235
271
private hasAttributionListener ( ) {
236
272
return this . attributionCallback !== null ;
237
273
}
@@ -259,6 +295,10 @@ export class AdjustConfig {
259
295
private hasConversionValueUpdatedCallbackListener ( ) {
260
296
return this . conversionValueUpdatedCallback !== null ;
261
297
}
298
+
299
+ private hasSkad4ConversionValueUpdatedCallbackListener ( ) {
300
+ return this . skad4ConversionValueUpdatedCallback !== null ;
301
+ }
262
302
}
263
303
264
304
export class AdjustAppStoreSubscription {
@@ -401,6 +441,28 @@ export class AdjustAdRevenue {
401
441
}
402
442
}
403
443
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
+
404
466
export interface AdjustAttribution {
405
467
trackerToken : string ;
406
468
trackerName : string ;
@@ -450,6 +512,18 @@ export interface AdjustEventFailure {
450
512
jsonResponse : string ;
451
513
}
452
514
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
+
453
527
export enum AdjustEnvironment {
454
528
Sandbox = 'sandbox' ,
455
529
Production = 'production' ,
@@ -468,6 +542,7 @@ export enum AdjustLogLevel {
468
542
export enum AdjustUrlStrategy {
469
543
India = 'india' ,
470
544
China = 'china' ,
545
+ Cn = 'cn' ,
471
546
DataResidencyEU = 'data-residency-eu' ,
472
547
DataResidencyTR = 'data-residency-tr' ,
473
548
DataResidencyUS = 'data-residency-us' ,
@@ -478,10 +553,10 @@ export enum AdjustAdRevenueSource {
478
553
AdRevenueSourceMopub = 'mopub' ,
479
554
AdRevenueSourceAdMob = 'admob_sdk' ,
480
555
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' ,
485
560
}
486
561
487
562
/**
@@ -511,13 +586,17 @@ export enum AdjustAdRevenueSource {
511
586
* AdjustSessionFailure
512
587
* AdjustEventSuccess
513
588
* AdjustEventFailure
589
+ * AdjustSkad4Data
590
+ * AdjustPurchaseVerificationInfo
514
591
* @classes
515
592
* AdjustEvent
516
593
* AdjustConfig
517
594
* AdjustAppStoreSubscription
518
595
* AdjustPlayStoreSubscription
519
596
* AdjustThirdPartySharing
520
- * AdjustAdReenue
597
+ * AdjustAdRevenue
598
+ * AdjustAppStorePurchase
599
+ * AdjustPlayStorePurchase
521
600
* @enums
522
601
* AdjustEnvironment
523
602
* AdjustLogLevel
@@ -533,7 +612,6 @@ export enum AdjustAdRevenueSource {
533
612
} )
534
613
@Injectable ( )
535
614
export class Adjust extends AwesomeCordovaNativePlugin {
536
-
537
615
/**
538
616
* This method initializes Adjust SDK
539
617
*
@@ -652,7 +730,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
652
730
gdprForgetMe ( ) : void { }
653
731
654
732
/**
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.
656
734
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend
657
735
*/
658
736
@Cordova ( { sync : true } )
@@ -815,4 +893,20 @@ export class Adjust extends AwesomeCordovaNativePlugin {
815
893
getLastDeeplink ( ) : Promise < string > {
816
894
return ;
817
895
}
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