expo-iap 3.3.2 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/modules/android.d.ts +5 -5
- package/build/modules/android.d.ts.map +1 -1
- package/build/modules/android.js +1 -1
- package/build/modules/android.js.map +1 -1
- package/build/modules/ios.d.ts +4 -1
- package/build/modules/ios.d.ts.map +1 -1
- package/build/modules/ios.js +5 -2
- package/build/modules/ios.js.map +1 -1
- package/build/types.d.ts +56 -2
- package/build/types.d.ts.map +1 -1
- package/build/types.js.map +1 -1
- package/build/useIAP.d.ts +4 -0
- package/build/useIAP.d.ts.map +1 -1
- package/build/useIAP.js.map +1 -1
- package/coverage/clover.xml +104 -101
- package/coverage/coverage-final.json +3 -3
- package/coverage/lcov-report/index.html +18 -18
- package/coverage/lcov-report/src/index.html +14 -14
- package/coverage/lcov-report/src/index.ts.html +35 -35
- package/coverage/lcov-report/src/modules/android.ts.html +17 -29
- package/coverage/lcov-report/src/modules/index.html +8 -8
- package/coverage/lcov-report/src/modules/ios.ts.html +18 -12
- package/coverage/lcov-report/src/utils/debug.ts.html +1 -1
- package/coverage/lcov-report/src/utils/errorMapping.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov.info +169 -164
- package/openiap-versions.json +3 -3
- package/package.json +1 -1
- package/src/modules/android.ts +10 -14
- package/src/modules/ios.ts +8 -6
- package/src/types.ts +59 -2
- package/src/useIAP.ts +4 -0
package/coverage/lcov.info
CHANGED
|
@@ -47,10 +47,10 @@ FN:855,(anonymous_54)
|
|
|
47
47
|
FNF:44
|
|
48
48
|
FNH:34
|
|
49
49
|
FNDA:2,(anonymous_11)
|
|
50
|
-
FNDA:
|
|
51
|
-
FNDA:
|
|
52
|
-
FNDA:
|
|
53
|
-
FNDA:
|
|
50
|
+
FNDA:24,(anonymous_12)
|
|
51
|
+
FNDA:10,(anonymous_13)
|
|
52
|
+
FNDA:8,(anonymous_14)
|
|
53
|
+
FNDA:5,(anonymous_15)
|
|
54
54
|
FNDA:1,(anonymous_16)
|
|
55
55
|
FNDA:1,(anonymous_17)
|
|
56
56
|
FNDA:1,(anonymous_18)
|
|
@@ -74,8 +74,8 @@ FNDA:1,(anonymous_35)
|
|
|
74
74
|
FNDA:6,(anonymous_36)
|
|
75
75
|
FNDA:8,(anonymous_37)
|
|
76
76
|
FNDA:2,(anonymous_38)
|
|
77
|
-
FNDA:
|
|
78
|
-
FNDA:
|
|
77
|
+
FNDA:13,normalizeRequestProps
|
|
78
|
+
FNDA:16,(anonymous_40)
|
|
79
79
|
FNDA:1,(anonymous_41)
|
|
80
80
|
FNDA:6,(anonymous_42)
|
|
81
81
|
FNDA:1,(anonymous_43)
|
|
@@ -108,25 +108,25 @@ DA:54,2
|
|
|
108
108
|
DA:55,2
|
|
109
109
|
DA:81,2
|
|
110
110
|
DA:89,2
|
|
111
|
-
DA:90,
|
|
111
|
+
DA:90,24
|
|
112
112
|
DA:91,1
|
|
113
|
-
DA:96,
|
|
114
|
-
DA:97,
|
|
115
|
-
DA:102,
|
|
116
|
-
DA:103,
|
|
113
|
+
DA:96,24
|
|
114
|
+
DA:97,12
|
|
115
|
+
DA:102,12
|
|
116
|
+
DA:103,7
|
|
117
117
|
DA:108,5
|
|
118
118
|
DA:109,4
|
|
119
119
|
DA:114,1
|
|
120
120
|
DA:117,2
|
|
121
|
-
DA:118,
|
|
122
|
-
DA:119,
|
|
123
|
-
DA:120,
|
|
124
|
-
DA:123,
|
|
125
|
-
DA:124,
|
|
126
|
-
DA:125,
|
|
121
|
+
DA:118,10
|
|
122
|
+
DA:119,10
|
|
123
|
+
DA:120,7
|
|
124
|
+
DA:123,3
|
|
125
|
+
DA:124,3
|
|
126
|
+
DA:125,1
|
|
127
127
|
DA:128,2
|
|
128
128
|
DA:131,2
|
|
129
|
-
DA:132,
|
|
129
|
+
DA:132,8
|
|
130
130
|
DA:134,2
|
|
131
131
|
DA:137,1
|
|
132
132
|
DA:138,1
|
|
@@ -204,25 +204,25 @@ DA:395,2
|
|
|
204
204
|
DA:396,2
|
|
205
205
|
DA:397,0
|
|
206
206
|
DA:399,2
|
|
207
|
-
DA:429,
|
|
208
|
-
DA:430,
|
|
207
|
+
DA:429,13
|
|
208
|
+
DA:430,9
|
|
209
209
|
DA:432,4
|
|
210
210
|
DA:475,2
|
|
211
|
-
DA:478,
|
|
212
|
-
DA:479,
|
|
213
|
-
DA:480,
|
|
214
|
-
DA:482,
|
|
215
|
-
DA:483,
|
|
216
|
-
DA:485,
|
|
211
|
+
DA:478,16
|
|
212
|
+
DA:479,16
|
|
213
|
+
DA:480,15
|
|
214
|
+
DA:482,15
|
|
215
|
+
DA:483,9
|
|
216
|
+
DA:485,9
|
|
217
217
|
DA:486,1
|
|
218
|
-
DA:500,
|
|
218
|
+
DA:500,8
|
|
219
219
|
DA:501,1
|
|
220
|
-
DA:504,
|
|
221
|
-
DA:510,
|
|
222
|
-
DA:515,
|
|
223
|
-
DA:516,
|
|
224
|
-
DA:519,
|
|
225
|
-
DA:520,
|
|
220
|
+
DA:504,7
|
|
221
|
+
DA:510,7
|
|
222
|
+
DA:515,7
|
|
223
|
+
DA:516,2
|
|
224
|
+
DA:519,5
|
|
225
|
+
DA:520,4
|
|
226
226
|
DA:523,1
|
|
227
227
|
DA:526,6
|
|
228
228
|
DA:527,5
|
|
@@ -307,21 +307,21 @@ DA:848,2
|
|
|
307
307
|
DA:849,2
|
|
308
308
|
DA:855,2
|
|
309
309
|
LF:216
|
|
310
|
-
LH:
|
|
310
|
+
LH:205
|
|
311
311
|
BRDA:51,0,0,2
|
|
312
312
|
BRDA:51,0,1,2
|
|
313
313
|
BRDA:81,1,0,2
|
|
314
314
|
BRDA:81,1,1,0
|
|
315
315
|
BRDA:90,2,0,1
|
|
316
|
-
BRDA:96,3,0,
|
|
317
|
-
BRDA:96,4,0,
|
|
318
|
-
BRDA:96,4,1,
|
|
319
|
-
BRDA:96,4,2,
|
|
320
|
-
BRDA:102,5,0,
|
|
316
|
+
BRDA:96,3,0,12
|
|
317
|
+
BRDA:96,4,0,24
|
|
318
|
+
BRDA:96,4,1,22
|
|
319
|
+
BRDA:96,4,2,21
|
|
320
|
+
BRDA:102,5,0,7
|
|
321
321
|
BRDA:108,6,0,4
|
|
322
|
-
BRDA:119,7,0,
|
|
323
|
-
BRDA:124,8,0,
|
|
324
|
-
BRDA:124,9,0,
|
|
322
|
+
BRDA:119,7,0,7
|
|
323
|
+
BRDA:124,8,0,1
|
|
324
|
+
BRDA:124,9,0,3
|
|
325
325
|
BRDA:124,9,1,2
|
|
326
326
|
BRDA:124,9,2,0
|
|
327
327
|
BRDA:184,10,0,1
|
|
@@ -358,20 +358,20 @@ BRDA:391,29,1,6
|
|
|
358
358
|
BRDA:396,30,0,0
|
|
359
359
|
BRDA:396,31,0,2
|
|
360
360
|
BRDA:396,31,1,2
|
|
361
|
-
BRDA:429,32,0,
|
|
362
|
-
BRDA:430,33,0,
|
|
361
|
+
BRDA:429,32,0,9
|
|
362
|
+
BRDA:430,33,0,9
|
|
363
363
|
BRDA:430,33,1,6
|
|
364
364
|
BRDA:432,34,0,4
|
|
365
365
|
BRDA:432,34,1,4
|
|
366
|
-
BRDA:482,35,0,
|
|
366
|
+
BRDA:482,35,0,9
|
|
367
367
|
BRDA:485,36,0,1
|
|
368
368
|
BRDA:500,37,0,1
|
|
369
|
-
BRDA:500,38,0,
|
|
370
|
-
BRDA:500,38,1,
|
|
371
|
-
BRDA:505,39,0,
|
|
372
|
-
BRDA:505,39,1,
|
|
373
|
-
BRDA:515,40,0,
|
|
374
|
-
BRDA:519,41,0,
|
|
369
|
+
BRDA:500,38,0,8
|
|
370
|
+
BRDA:500,38,1,4
|
|
371
|
+
BRDA:505,39,0,4
|
|
372
|
+
BRDA:505,39,1,3
|
|
373
|
+
BRDA:515,40,0,2
|
|
374
|
+
BRDA:519,41,0,4
|
|
375
375
|
BRDA:523,42,0,1
|
|
376
376
|
BRDA:523,42,1,0
|
|
377
377
|
BRDA:526,43,0,5
|
|
@@ -424,21 +424,21 @@ BRDA:813,74,1,12
|
|
|
424
424
|
BRDA:813,74,2,12
|
|
425
425
|
BRDA:821,75,0,0
|
|
426
426
|
BRF:115
|
|
427
|
-
BRH:
|
|
427
|
+
BRH:104
|
|
428
428
|
end_of_record
|
|
429
429
|
TN:
|
|
430
430
|
SF:src/modules/android.ts
|
|
431
|
-
FN:
|
|
432
|
-
FN:
|
|
433
|
-
FN:
|
|
434
|
-
FN:
|
|
435
|
-
FN:
|
|
436
|
-
FN:
|
|
437
|
-
FN:
|
|
438
|
-
FN:
|
|
439
|
-
FN:
|
|
440
|
-
FN:
|
|
441
|
-
FN:
|
|
431
|
+
FN:25,isProductAndroid
|
|
432
|
+
FN:52,(anonymous_2)
|
|
433
|
+
FN:93,(anonymous_3)
|
|
434
|
+
FN:138,(anonymous_4)
|
|
435
|
+
FN:165,(anonymous_5)
|
|
436
|
+
FN:188,(anonymous_6)
|
|
437
|
+
FN:218,(anonymous_7)
|
|
438
|
+
FN:248,(anonymous_8)
|
|
439
|
+
FN:273,(anonymous_9)
|
|
440
|
+
FN:296,(anonymous_10)
|
|
441
|
+
FN:319,(anonymous_11)
|
|
442
442
|
FNF:11
|
|
443
443
|
FNH:8
|
|
444
444
|
FNDA:8,isProductAndroid
|
|
@@ -454,79 +454,82 @@ FNDA:5,(anonymous_10)
|
|
|
454
454
|
FNDA:3,(anonymous_11)
|
|
455
455
|
DA:2,3
|
|
456
456
|
DA:5,3
|
|
457
|
-
DA:
|
|
458
|
-
DA:
|
|
459
|
-
DA:
|
|
460
|
-
DA:
|
|
457
|
+
DA:22,3
|
|
458
|
+
DA:25,3
|
|
459
|
+
DA:28,8
|
|
460
|
+
DA:52,3
|
|
461
|
+
DA:55,5
|
|
462
|
+
DA:56,5
|
|
461
463
|
DA:59,5
|
|
462
|
-
DA:60,
|
|
463
|
-
DA:
|
|
464
|
-
DA:
|
|
465
|
-
DA:
|
|
466
|
-
DA:
|
|
464
|
+
DA:60,1
|
|
465
|
+
DA:67,4
|
|
466
|
+
DA:68,3
|
|
467
|
+
DA:72,1
|
|
468
|
+
DA:75,1
|
|
467
469
|
DA:76,1
|
|
468
|
-
DA:
|
|
469
|
-
DA:
|
|
470
|
-
DA:
|
|
471
|
-
DA:110,2
|
|
470
|
+
DA:93,3
|
|
471
|
+
DA:106,2
|
|
472
|
+
DA:109,2
|
|
472
473
|
DA:113,2
|
|
473
|
-
DA:
|
|
474
|
-
DA:
|
|
475
|
-
DA:
|
|
476
|
-
DA:
|
|
477
|
-
DA:
|
|
478
|
-
DA:
|
|
479
|
-
DA:
|
|
480
|
-
DA:
|
|
481
|
-
DA:
|
|
482
|
-
DA:
|
|
483
|
-
DA:
|
|
484
|
-
DA:
|
|
485
|
-
DA:
|
|
486
|
-
DA:
|
|
487
|
-
DA:155,
|
|
488
|
-
DA:
|
|
489
|
-
DA:
|
|
490
|
-
DA:
|
|
491
|
-
DA:
|
|
492
|
-
DA:
|
|
493
|
-
DA:
|
|
494
|
-
DA:
|
|
495
|
-
DA:
|
|
496
|
-
DA:
|
|
497
|
-
DA:
|
|
498
|
-
DA:
|
|
499
|
-
DA:
|
|
500
|
-
DA:
|
|
501
|
-
DA:
|
|
502
|
-
DA:
|
|
503
|
-
DA:
|
|
504
|
-
DA:
|
|
505
|
-
DA:
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
BRDA:
|
|
511
|
-
BRDA:
|
|
512
|
-
BRDA:
|
|
513
|
-
BRDA:
|
|
514
|
-
BRDA:
|
|
515
|
-
BRDA:
|
|
516
|
-
BRDA:
|
|
517
|
-
BRDA:
|
|
518
|
-
BRDA:
|
|
519
|
-
BRDA:
|
|
520
|
-
BRDA:
|
|
521
|
-
BRDA:
|
|
522
|
-
BRDA:
|
|
523
|
-
BRDA:
|
|
524
|
-
BRDA:
|
|
525
|
-
BRDA:
|
|
526
|
-
BRDA:
|
|
527
|
-
BRDA:
|
|
528
|
-
BRDA:
|
|
529
|
-
BRDA:
|
|
474
|
+
DA:121,2
|
|
475
|
+
DA:122,1
|
|
476
|
+
DA:127,1
|
|
477
|
+
DA:136,3
|
|
478
|
+
DA:138,3
|
|
479
|
+
DA:139,5
|
|
480
|
+
DA:141,5
|
|
481
|
+
DA:142,1
|
|
482
|
+
DA:145,4
|
|
483
|
+
DA:146,3
|
|
484
|
+
DA:147,3
|
|
485
|
+
DA:148,1
|
|
486
|
+
DA:150,2
|
|
487
|
+
DA:151,2
|
|
488
|
+
DA:155,1
|
|
489
|
+
DA:165,3
|
|
490
|
+
DA:166,1
|
|
491
|
+
DA:186,3
|
|
492
|
+
DA:188,3
|
|
493
|
+
DA:189,0
|
|
494
|
+
DA:216,3
|
|
495
|
+
DA:218,3
|
|
496
|
+
DA:219,0
|
|
497
|
+
DA:246,3
|
|
498
|
+
DA:248,3
|
|
499
|
+
DA:249,0
|
|
500
|
+
DA:271,3
|
|
501
|
+
DA:273,3
|
|
502
|
+
DA:274,4
|
|
503
|
+
DA:294,3
|
|
504
|
+
DA:296,3
|
|
505
|
+
DA:297,5
|
|
506
|
+
DA:317,3
|
|
507
|
+
DA:319,3
|
|
508
|
+
DA:320,3
|
|
509
|
+
LF:54
|
|
510
|
+
LH:51
|
|
511
|
+
BRDA:29,0,0,8
|
|
512
|
+
BRDA:29,0,1,6
|
|
513
|
+
BRDA:29,0,2,6
|
|
514
|
+
BRDA:29,0,3,5
|
|
515
|
+
BRDA:29,0,4,5
|
|
516
|
+
BRDA:55,1,0,5
|
|
517
|
+
BRDA:55,1,1,1
|
|
518
|
+
BRDA:56,2,0,5
|
|
519
|
+
BRDA:56,2,1,2
|
|
520
|
+
BRDA:59,3,0,1
|
|
521
|
+
BRDA:67,4,0,3
|
|
522
|
+
BRDA:75,5,0,1
|
|
523
|
+
BRDA:75,5,1,0
|
|
524
|
+
BRDA:106,6,0,1
|
|
525
|
+
BRDA:106,6,1,1
|
|
526
|
+
BRDA:121,7,0,1
|
|
527
|
+
BRDA:141,8,0,1
|
|
528
|
+
BRDA:145,9,0,3
|
|
529
|
+
BRDA:145,10,0,4
|
|
530
|
+
BRDA:145,10,1,3
|
|
531
|
+
BRDA:147,11,0,1
|
|
532
|
+
BRDA:150,12,0,2
|
|
530
533
|
BRF:22
|
|
531
534
|
BRH:21
|
|
532
535
|
end_of_record
|
|
@@ -547,13 +550,13 @@ FN:238,(anonymous_12)
|
|
|
547
550
|
FN:269,(anonymous_13)
|
|
548
551
|
FN:289,(anonymous_14)
|
|
549
552
|
FN:305,(anonymous_15)
|
|
550
|
-
FN:
|
|
551
|
-
FN:
|
|
552
|
-
FN:
|
|
553
|
-
FN:
|
|
554
|
-
FN:
|
|
555
|
-
FN:
|
|
556
|
-
FN:
|
|
553
|
+
FN:323,(anonymous_16)
|
|
554
|
+
FN:336,(anonymous_17)
|
|
555
|
+
FN:349,(anonymous_18)
|
|
556
|
+
FN:359,(anonymous_19)
|
|
557
|
+
FN:370,(anonymous_20)
|
|
558
|
+
FN:383,(anonymous_21)
|
|
559
|
+
FN:397,(anonymous_22)
|
|
557
560
|
FNF:22
|
|
558
561
|
FNH:19
|
|
559
562
|
FNDA:15,isProductIOS
|
|
@@ -571,7 +574,7 @@ FNDA:5,(anonymous_12)
|
|
|
571
574
|
FNDA:1,(anonymous_13)
|
|
572
575
|
FNDA:2,(anonymous_14)
|
|
573
576
|
FNDA:2,(anonymous_15)
|
|
574
|
-
FNDA:
|
|
577
|
+
FNDA:3,(anonymous_16)
|
|
575
578
|
FNDA:2,(anonymous_17)
|
|
576
579
|
FNDA:2,(anonymous_18)
|
|
577
580
|
FNDA:1,(anonymous_19)
|
|
@@ -645,30 +648,30 @@ DA:303,3
|
|
|
645
648
|
DA:305,3
|
|
646
649
|
DA:306,2
|
|
647
650
|
DA:307,2
|
|
648
|
-
DA:
|
|
649
|
-
DA:
|
|
650
|
-
DA:
|
|
651
|
-
DA:
|
|
652
|
-
DA:332,3
|
|
651
|
+
DA:322,3
|
|
652
|
+
DA:323,3
|
|
653
|
+
DA:324,3
|
|
654
|
+
DA:325,2
|
|
653
655
|
DA:334,3
|
|
654
|
-
DA:
|
|
655
|
-
DA:
|
|
656
|
-
DA:
|
|
656
|
+
DA:336,3
|
|
657
|
+
DA:337,2
|
|
658
|
+
DA:338,2
|
|
657
659
|
DA:347,3
|
|
658
|
-
DA:
|
|
659
|
-
DA:
|
|
660
|
-
DA:
|
|
661
|
-
DA:
|
|
660
|
+
DA:349,3
|
|
661
|
+
DA:350,2
|
|
662
|
+
DA:359,3
|
|
663
|
+
DA:360,1
|
|
662
664
|
DA:368,3
|
|
663
|
-
DA:
|
|
664
|
-
DA:
|
|
665
|
+
DA:370,3
|
|
666
|
+
DA:371,0
|
|
665
667
|
DA:381,3
|
|
666
|
-
DA:
|
|
667
|
-
DA:
|
|
668
|
-
DA:
|
|
668
|
+
DA:383,3
|
|
669
|
+
DA:384,0
|
|
670
|
+
DA:385,0
|
|
669
671
|
DA:395,3
|
|
670
|
-
DA:
|
|
671
|
-
DA:
|
|
672
|
+
DA:397,3
|
|
673
|
+
DA:398,0
|
|
674
|
+
DA:399,0
|
|
672
675
|
LF:91
|
|
673
676
|
LH:86
|
|
674
677
|
BRDA:35,0,0,15
|
|
@@ -702,10 +705,12 @@ BRDA:290,16,0,2
|
|
|
702
705
|
BRDA:290,16,1,1
|
|
703
706
|
BRDA:307,17,0,2
|
|
704
707
|
BRDA:307,17,1,1
|
|
705
|
-
BRDA:
|
|
706
|
-
BRDA:
|
|
707
|
-
|
|
708
|
-
|
|
708
|
+
BRDA:325,18,0,2
|
|
709
|
+
BRDA:325,18,1,1
|
|
710
|
+
BRDA:338,19,0,2
|
|
711
|
+
BRDA:338,19,1,1
|
|
712
|
+
BRF:35
|
|
713
|
+
BRH:35
|
|
709
714
|
end_of_record
|
|
710
715
|
TN:
|
|
711
716
|
SF:src/utils/debug.ts
|
package/openiap-versions.json
CHANGED
package/package.json
CHANGED
package/src/modules/android.ts
CHANGED
|
@@ -6,11 +6,7 @@ import ExpoIapModule from '../ExpoIapModule';
|
|
|
6
6
|
|
|
7
7
|
// Types
|
|
8
8
|
import type {
|
|
9
|
-
BillingProgramAndroid,
|
|
10
|
-
BillingProgramAvailabilityResultAndroid,
|
|
11
|
-
BillingProgramReportingDetailsAndroid,
|
|
12
9
|
DeepLinkOptions,
|
|
13
|
-
LaunchExternalLinkParamsAndroid,
|
|
14
10
|
MutationField,
|
|
15
11
|
VerifyPurchaseResultAndroid,
|
|
16
12
|
} from '../types';
|
|
@@ -272,9 +268,9 @@ export const createAlternativeBillingTokenAndroid: MutationField<
|
|
|
272
268
|
* }
|
|
273
269
|
* ```
|
|
274
270
|
*/
|
|
275
|
-
export const isBillingProgramAvailableAndroid
|
|
276
|
-
|
|
277
|
-
)
|
|
271
|
+
export const isBillingProgramAvailableAndroid: MutationField<
|
|
272
|
+
'isBillingProgramAvailableAndroid'
|
|
273
|
+
> = async (program) => {
|
|
278
274
|
return ExpoIapModule.isBillingProgramAvailableAndroid(program);
|
|
279
275
|
};
|
|
280
276
|
|
|
@@ -283,7 +279,7 @@ export const isBillingProgramAvailableAndroid = async (
|
|
|
283
279
|
* Available in Google Play Billing Library 8.2.0+.
|
|
284
280
|
*
|
|
285
281
|
* @param params - The external link parameters
|
|
286
|
-
* @returns Promise resolving
|
|
282
|
+
* @returns Promise resolving to true if the link was launched successfully
|
|
287
283
|
*
|
|
288
284
|
* @example
|
|
289
285
|
* ```typescript
|
|
@@ -295,9 +291,9 @@ export const isBillingProgramAvailableAndroid = async (
|
|
|
295
291
|
* });
|
|
296
292
|
* ```
|
|
297
293
|
*/
|
|
298
|
-
export const launchExternalLinkAndroid
|
|
299
|
-
|
|
300
|
-
)
|
|
294
|
+
export const launchExternalLinkAndroid: MutationField<
|
|
295
|
+
'launchExternalLinkAndroid'
|
|
296
|
+
> = async (params) => {
|
|
301
297
|
return ExpoIapModule.launchExternalLinkAndroid(params);
|
|
302
298
|
};
|
|
303
299
|
|
|
@@ -318,8 +314,8 @@ export const launchExternalLinkAndroid = async (
|
|
|
318
314
|
* await reportToGooglePlay(details.externalTransactionToken);
|
|
319
315
|
* ```
|
|
320
316
|
*/
|
|
321
|
-
export const createBillingProgramReportingDetailsAndroid
|
|
322
|
-
|
|
323
|
-
)
|
|
317
|
+
export const createBillingProgramReportingDetailsAndroid: MutationField<
|
|
318
|
+
'createBillingProgramReportingDetailsAndroid'
|
|
319
|
+
> = async (program) => {
|
|
324
320
|
return ExpoIapModule.createBillingProgramReportingDetailsAndroid(program);
|
|
325
321
|
};
|
package/src/modules/ios.ts
CHANGED
|
@@ -311,17 +311,19 @@ export const getPromotedProductIOS: QueryField<
|
|
|
311
311
|
* Complete the purchase of a promoted product (iOS only).
|
|
312
312
|
* This should be called after showing your purchase UI for a promoted product.
|
|
313
313
|
*
|
|
314
|
+
* @deprecated Use promotedProductListenerIOS to receive the productId,
|
|
315
|
+
* then call requestPurchase with that SKU instead.
|
|
316
|
+
*
|
|
314
317
|
* @returns Promise resolving when the purchase is initiated
|
|
315
318
|
* @throws Error if called on non-iOS platform or no promoted product is available
|
|
316
319
|
*
|
|
317
320
|
* @platform iOS
|
|
318
321
|
*/
|
|
319
|
-
export const requestPurchaseOnPromotedProductIOS
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
};
|
|
322
|
+
export const requestPurchaseOnPromotedProductIOS =
|
|
323
|
+
async (): Promise<boolean> => {
|
|
324
|
+
const result = await ExpoIapModule.requestPurchaseOnPromotedProductIOS();
|
|
325
|
+
return result ?? true;
|
|
326
|
+
};
|
|
325
327
|
|
|
326
328
|
/**
|
|
327
329
|
* Get pending transactions that haven't been finished yet (iOS only).
|
package/src/types.ts
CHANGED
|
@@ -342,6 +342,15 @@ export interface Mutation {
|
|
|
342
342
|
* Throws OpenIapError.NotPrepared if billing client not ready
|
|
343
343
|
*/
|
|
344
344
|
createAlternativeBillingTokenAndroid?: Promise<(string | null)>;
|
|
345
|
+
/**
|
|
346
|
+
* Create reporting details for a billing program
|
|
347
|
+
* Replaces the deprecated createExternalOfferReportingDetailsAsync API
|
|
348
|
+
*
|
|
349
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
350
|
+
* Returns external transaction token needed for reporting external transactions
|
|
351
|
+
* Throws OpenIapError.NotPrepared if billing client not ready
|
|
352
|
+
*/
|
|
353
|
+
createBillingProgramReportingDetailsAndroid: Promise<BillingProgramReportingDetailsAndroid>;
|
|
345
354
|
/** Open the native subscription management surface */
|
|
346
355
|
deepLinkToSubscriptions: Promise<void>;
|
|
347
356
|
/** Close the platform billing connection */
|
|
@@ -350,6 +359,24 @@ export interface Mutation {
|
|
|
350
359
|
finishTransaction: Promise<void>;
|
|
351
360
|
/** Establish the platform billing connection */
|
|
352
361
|
initConnection: Promise<boolean>;
|
|
362
|
+
/**
|
|
363
|
+
* Check if a billing program is available for the current user
|
|
364
|
+
* Replaces the deprecated isExternalOfferAvailableAsync API
|
|
365
|
+
*
|
|
366
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
367
|
+
* Returns availability result with isAvailable flag
|
|
368
|
+
* Throws OpenIapError.NotPrepared if billing client not ready
|
|
369
|
+
*/
|
|
370
|
+
isBillingProgramAvailableAndroid: Promise<BillingProgramAvailabilityResultAndroid>;
|
|
371
|
+
/**
|
|
372
|
+
* Launch external link flow for external billing programs
|
|
373
|
+
* Replaces the deprecated showExternalOfferInformationDialog API
|
|
374
|
+
*
|
|
375
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
376
|
+
* Shows Play Store dialog and optionally launches external URL
|
|
377
|
+
* Throws OpenIapError.NotPrepared if billing client not ready
|
|
378
|
+
*/
|
|
379
|
+
launchExternalLinkAndroid: Promise<boolean>;
|
|
353
380
|
/** Present the App Store code redemption sheet */
|
|
354
381
|
presentCodeRedemptionSheetIOS: Promise<boolean>;
|
|
355
382
|
/** Present external purchase custom link with StoreKit UI (iOS 18.2+) */
|
|
@@ -358,8 +385,15 @@ export interface Mutation {
|
|
|
358
385
|
presentExternalPurchaseNoticeSheetIOS: Promise<ExternalPurchaseNoticeResultIOS>;
|
|
359
386
|
/** Initiate a purchase flow; rely on events for final state */
|
|
360
387
|
requestPurchase?: Promise<(Purchase | Purchase[] | null)>;
|
|
361
|
-
/**
|
|
362
|
-
|
|
388
|
+
/**
|
|
389
|
+
* Purchase the promoted product surfaced by the App Store.
|
|
390
|
+
*
|
|
391
|
+
* @deprecated Use promotedProductListenerIOS to receive the productId,
|
|
392
|
+
* then call requestPurchase with that SKU instead. In StoreKit 2,
|
|
393
|
+
* promoted products can be purchased directly via the standard purchase flow.
|
|
394
|
+
* @deprecated Use promotedProductListenerIOS + requestPurchase instead
|
|
395
|
+
*/
|
|
396
|
+
requestPurchaseOnPromotedProductIOS: boolean;
|
|
363
397
|
/** Restore completed purchases across platforms */
|
|
364
398
|
restorePurchases: Promise<void>;
|
|
365
399
|
/**
|
|
@@ -394,6 +428,8 @@ export type MutationBeginRefundRequestIosArgs = string;
|
|
|
394
428
|
|
|
395
429
|
export type MutationConsumePurchaseAndroidArgs = string;
|
|
396
430
|
|
|
431
|
+
export type MutationCreateBillingProgramReportingDetailsAndroidArgs = BillingProgramAndroid;
|
|
432
|
+
|
|
397
433
|
export type MutationDeepLinkToSubscriptionsArgs = (DeepLinkOptions | null) | undefined;
|
|
398
434
|
|
|
399
435
|
export interface MutationFinishTransactionArgs {
|
|
@@ -404,6 +440,10 @@ export interface MutationFinishTransactionArgs {
|
|
|
404
440
|
|
|
405
441
|
export type MutationInitConnectionArgs = (InitConnectionConfig | null) | undefined;
|
|
406
442
|
|
|
443
|
+
export type MutationIsBillingProgramAvailableAndroidArgs = BillingProgramAndroid;
|
|
444
|
+
|
|
445
|
+
export type MutationLaunchExternalLinkAndroidArgs = LaunchExternalLinkParamsAndroid;
|
|
446
|
+
|
|
407
447
|
export type MutationPresentExternalPurchaseLinkIosArgs = string;
|
|
408
448
|
|
|
409
449
|
export type MutationRequestPurchaseArgs =
|
|
@@ -889,6 +929,13 @@ export interface RequestPurchaseAndroidProps {
|
|
|
889
929
|
}
|
|
890
930
|
|
|
891
931
|
export interface RequestPurchaseIosProps {
|
|
932
|
+
/**
|
|
933
|
+
* Advanced commerce data token (iOS 15+).
|
|
934
|
+
* Used with StoreKit 2's Product.PurchaseOption.custom API for passing
|
|
935
|
+
* campaign tokens, affiliate IDs, or other attribution data.
|
|
936
|
+
* The data is formatted as JSON: {"signatureInfo": {"token": "<value>"}}
|
|
937
|
+
*/
|
|
938
|
+
advancedCommerceData?: (string | null);
|
|
892
939
|
/** Auto-finish transaction (dangerous) */
|
|
893
940
|
andDangerouslyFinishTransactionAutomatically?: (boolean | null);
|
|
894
941
|
/** App account token for user tracking */
|
|
@@ -964,6 +1011,13 @@ export interface RequestSubscriptionAndroidProps {
|
|
|
964
1011
|
}
|
|
965
1012
|
|
|
966
1013
|
export interface RequestSubscriptionIosProps {
|
|
1014
|
+
/**
|
|
1015
|
+
* Advanced commerce data token (iOS 15+).
|
|
1016
|
+
* Used with StoreKit 2's Product.PurchaseOption.custom API for passing
|
|
1017
|
+
* campaign tokens, affiliate IDs, or other attribution data.
|
|
1018
|
+
* The data is formatted as JSON: {"signatureInfo": {"token": "<value>"}}
|
|
1019
|
+
*/
|
|
1020
|
+
advancedCommerceData?: (string | null);
|
|
967
1021
|
andDangerouslyFinishTransactionAutomatically?: (boolean | null);
|
|
968
1022
|
appAccountToken?: (string | null);
|
|
969
1023
|
quantity?: (number | null);
|
|
@@ -1286,10 +1340,13 @@ export type MutationArgsMap = {
|
|
|
1286
1340
|
clearTransactionIOS: never;
|
|
1287
1341
|
consumePurchaseAndroid: MutationConsumePurchaseAndroidArgs;
|
|
1288
1342
|
createAlternativeBillingTokenAndroid: never;
|
|
1343
|
+
createBillingProgramReportingDetailsAndroid: MutationCreateBillingProgramReportingDetailsAndroidArgs;
|
|
1289
1344
|
deepLinkToSubscriptions: MutationDeepLinkToSubscriptionsArgs;
|
|
1290
1345
|
endConnection: never;
|
|
1291
1346
|
finishTransaction: MutationFinishTransactionArgs;
|
|
1292
1347
|
initConnection: MutationInitConnectionArgs;
|
|
1348
|
+
isBillingProgramAvailableAndroid: MutationIsBillingProgramAvailableAndroidArgs;
|
|
1349
|
+
launchExternalLinkAndroid: MutationLaunchExternalLinkAndroidArgs;
|
|
1293
1350
|
presentCodeRedemptionSheetIOS: never;
|
|
1294
1351
|
presentExternalPurchaseLinkIOS: MutationPresentExternalPurchaseLinkIosArgs;
|
|
1295
1352
|
presentExternalPurchaseNoticeSheetIOS: never;
|
package/src/useIAP.ts
CHANGED
|
@@ -91,6 +91,10 @@ type UseIap = {
|
|
|
91
91
|
) => Promise<VerifyPurchaseWithProviderResult>;
|
|
92
92
|
restorePurchases: () => Promise<void>;
|
|
93
93
|
getPromotedProductIOS: () => Promise<Product | null>;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use promotedProductListenerIOS to receive the productId,
|
|
96
|
+
* then call requestPurchase with that SKU instead.
|
|
97
|
+
*/
|
|
94
98
|
requestPurchaseOnPromotedProductIOS: () => Promise<boolean>;
|
|
95
99
|
getActiveSubscriptions: (subscriptionIds?: string[]) => Promise<void>;
|
|
96
100
|
hasActiveSubscriptions: (subscriptionIds?: string[]) => Promise<boolean>;
|