expo-iap 3.3.3 → 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.
@@ -44,9 +44,9 @@
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
- <span class="strong">94.11% </span>
47
+ <span class="strong">94.44% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>48/51</span>
49
+ <span class='fraction'>51/54</span>
50
50
  </div>
51
51
 
52
52
 
@@ -384,11 +384,7 @@
384
384
  <a name='L319'></a><a href='#L319'>319</a>
385
385
  <a name='L320'></a><a href='#L320'>320</a>
386
386
  <a name='L321'></a><a href='#L321'>321</a>
387
- <a name='L322'></a><a href='#L322'>322</a>
388
- <a name='L323'></a><a href='#L323'>323</a>
389
- <a name='L324'></a><a href='#L324'>324</a>
390
- <a name='L325'></a><a href='#L325'>325</a>
391
- <a name='L326'></a><a href='#L326'>326</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
387
+ <a name='L322'></a><a href='#L322'>322</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
392
388
  <span class="cline-any cline-yes">3x</span>
393
389
  <span class="cline-any cline-neutral">&nbsp;</span>
394
390
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -409,10 +405,6 @@
409
405
  <span class="cline-any cline-neutral">&nbsp;</span>
410
406
  <span class="cline-any cline-neutral">&nbsp;</span>
411
407
  <span class="cline-any cline-neutral">&nbsp;</span>
412
- <span class="cline-any cline-neutral">&nbsp;</span>
413
- <span class="cline-any cline-neutral">&nbsp;</span>
414
- <span class="cline-any cline-neutral">&nbsp;</span>
415
- <span class="cline-any cline-neutral">&nbsp;</span>
416
408
  <span class="cline-any cline-yes">3x</span>
417
409
  <span class="cline-any cline-neutral">&nbsp;</span>
418
410
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -664,7 +656,7 @@
664
656
  <span class="cline-any cline-neutral">&nbsp;</span>
665
657
  <span class="cline-any cline-yes">3x</span>
666
658
  <span class="cline-any cline-neutral">&nbsp;</span>
667
- <span class="cline-any cline-neutral">&nbsp;</span>
659
+ <span class="cline-any cline-yes">3x</span>
668
660
  <span class="cline-any cline-yes">4x</span>
669
661
  <span class="cline-any cline-neutral">&nbsp;</span>
670
662
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -687,7 +679,7 @@
687
679
  <span class="cline-any cline-neutral">&nbsp;</span>
688
680
  <span class="cline-any cline-yes">3x</span>
689
681
  <span class="cline-any cline-neutral">&nbsp;</span>
690
- <span class="cline-any cline-neutral">&nbsp;</span>
682
+ <span class="cline-any cline-yes">3x</span>
691
683
  <span class="cline-any cline-yes">5x</span>
692
684
  <span class="cline-any cline-neutral">&nbsp;</span>
693
685
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -710,7 +702,7 @@
710
702
  <span class="cline-any cline-neutral">&nbsp;</span>
711
703
  <span class="cline-any cline-yes">3x</span>
712
704
  <span class="cline-any cline-neutral">&nbsp;</span>
713
- <span class="cline-any cline-neutral">&nbsp;</span>
705
+ <span class="cline-any cline-yes">3x</span>
714
706
  <span class="cline-any cline-yes">3x</span>
715
707
  <span class="cline-any cline-neutral">&nbsp;</span>
716
708
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// External dependencies
@@ -721,11 +713,7 @@ import ExpoIapModule from '../ExpoIapModule';
721
713
  &nbsp;
722
714
  // Types
723
715
  import type {
724
- BillingProgramAndroid,
725
- BillingProgramAvailabilityResultAndroid,
726
- BillingProgramReportingDetailsAndroid,
727
716
  DeepLinkOptions,
728
- LaunchExternalLinkParamsAndroid,
729
717
  MutationField,
730
718
  VerifyPurchaseResultAndroid,
731
719
  } from '../types';
@@ -987,9 +975,9 @@ export const createAlternativeBillingTokenAndroid: MutationField&lt;
987
975
  * }
988
976
  * ```
989
977
  */
990
- export const isBillingProgramAvailableAndroid = async (
991
- program: BillingProgramAndroid,
992
- ): Promise&lt;BillingProgramAvailabilityResultAndroid&gt; =&gt; {
978
+ export const isBillingProgramAvailableAndroid: MutationField&lt;
979
+ 'isBillingProgramAvailableAndroid'
980
+ &gt; = async (program) =&gt; {
993
981
  return ExpoIapModule.isBillingProgramAvailableAndroid(program);
994
982
  };
995
983
  &nbsp;
@@ -998,7 +986,7 @@ export const isBillingProgramAvailableAndroid = async (
998
986
  * Available in Google Play Billing Library 8.2.0+.
999
987
  *
1000
988
  * @param params - The external link parameters
1001
- * @returns Promise resolving when the link is launched
989
+ * @returns Promise resolving to true if the link was launched successfully
1002
990
  *
1003
991
  * @example
1004
992
  * ```typescript
@@ -1010,9 +998,9 @@ export const isBillingProgramAvailableAndroid = async (
1010
998
  * });
1011
999
  * ```
1012
1000
  */
1013
- export const launchExternalLinkAndroid = async (
1014
- params: LaunchExternalLinkParamsAndroid,
1015
- ): Promise&lt;void&gt; =&gt; {
1001
+ export const launchExternalLinkAndroid: MutationField&lt;
1002
+ 'launchExternalLinkAndroid'
1003
+ &gt; = async (params) =&gt; {
1016
1004
  return ExpoIapModule.launchExternalLinkAndroid(params);
1017
1005
  };
1018
1006
  &nbsp;
@@ -1033,9 +1021,9 @@ export const launchExternalLinkAndroid = async (
1033
1021
  * await reportToGooglePlay(details.externalTransactionToken);
1034
1022
  * ```
1035
1023
  */
1036
- export const createBillingProgramReportingDetailsAndroid = async (
1037
- program: BillingProgramAndroid,
1038
- ): Promise&lt;BillingProgramReportingDetailsAndroid&gt; =&gt; {
1024
+ export const createBillingProgramReportingDetailsAndroid: MutationField&lt;
1025
+ 'createBillingProgramReportingDetailsAndroid'
1026
+ &gt; = async (program) =&gt; {
1039
1027
  return ExpoIapModule.createBillingProgramReportingDetailsAndroid(program);
1040
1028
  };
1041
1029
  &nbsp;</pre></td></tr></table></pre>
@@ -1045,7 +1033,7 @@ export const createBillingProgramReportingDetailsAndroid = async (
1045
1033
  <div class='footer quiet pad2 space-top1 center small'>
1046
1034
  Code coverage generated by
1047
1035
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1048
- at 2025-12-23T17:45:11.394Z
1036
+ at 2025-12-23T21:16:54.057Z
1049
1037
  </div>
1050
1038
  <script src="../../prettify.js"></script>
1051
1039
  <script>
@@ -44,9 +44,9 @@
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
- <span class="strong">94.36% </span>
47
+ <span class="strong">94.48% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>134/142</span>
49
+ <span class='fraction'>137/145</span>
50
50
  </div>
51
51
 
52
52
 
@@ -89,8 +89,8 @@
89
89
  <td data-value="22" class="abs high">21/22</td>
90
90
  <td data-value="72.72" class="pct medium">72.72%</td>
91
91
  <td data-value="11" class="abs medium">8/11</td>
92
- <td data-value="94.11" class="pct high">94.11%</td>
93
- <td data-value="51" class="abs high">48/51</td>
92
+ <td data-value="94.44" class="pct high">94.44%</td>
93
+ <td data-value="54" class="abs high">51/54</td>
94
94
  </tr>
95
95
 
96
96
  <tr>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2025-12-23T17:45:11.394Z
119
+ at 2025-12-23T21:16:54.057Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -1276,7 +1276,7 @@ export const presentExternalPurchaseLinkIOS: MutationField&lt;
1276
1276
  <div class='footer quiet pad2 space-top1 center small'>
1277
1277
  Code coverage generated by
1278
1278
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1279
- at 2025-12-23T17:45:11.394Z
1279
+ at 2025-12-23T21:16:54.057Z
1280
1280
  </div>
1281
1281
  <script src="../../prettify.js"></script>
1282
1282
  <script>
@@ -268,7 +268,7 @@ export const ExpoIapConsole = createConsole();
268
268
  <div class='footer quiet pad2 space-top1 center small'>
269
269
  Code coverage generated by
270
270
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
271
- at 2025-12-23T17:45:11.394Z
271
+ at 2025-12-23T21:16:54.057Z
272
272
  </div>
273
273
  <script src="../../prettify.js"></script>
274
274
  <script>
@@ -1126,7 +1126,7 @@ export function getUserFriendlyErrorMessage(error: ErrorLike): string {
1126
1126
  <div class='footer quiet pad2 space-top1 center small'>
1127
1127
  Code coverage generated by
1128
1128
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1129
- at 2025-12-23T17:45:11.394Z
1129
+ at 2025-12-23T21:16:54.057Z
1130
1130
  </div>
1131
1131
  <script src="../../prettify.js"></script>
1132
1132
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2025-12-23T17:45:11.394Z
119
+ at 2025-12-23T21:16:54.057Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -428,17 +428,17 @@ BRH:104
428
428
  end_of_record
429
429
  TN:
430
430
  SF:src/modules/android.ts
431
- FN:29,isProductAndroid
432
- FN:56,(anonymous_2)
433
- FN:97,(anonymous_3)
434
- FN:142,(anonymous_4)
435
- FN:169,(anonymous_5)
436
- FN:192,(anonymous_6)
437
- FN:222,(anonymous_7)
438
- FN:252,(anonymous_8)
439
- FN:275,(anonymous_9)
440
- FN:298,(anonymous_10)
441
- FN:321,(anonymous_11)
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:26,3
458
- DA:29,3
459
- DA:32,8
460
- DA:56,3
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,5
463
- DA:63,5
464
- DA:64,1
465
- DA:71,4
466
- DA:72,3
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:79,1
469
- DA:80,1
470
- DA:97,3
471
- DA:110,2
470
+ DA:93,3
471
+ DA:106,2
472
+ DA:109,2
472
473
  DA:113,2
473
- DA:117,2
474
- DA:125,2
475
- DA:126,1
476
- DA:131,1
477
- DA:140,3
478
- DA:142,3
479
- DA:143,5
480
- DA:145,5
481
- DA:146,1
482
- DA:149,4
483
- DA:150,3
484
- DA:151,3
485
- DA:152,1
486
- DA:154,2
487
- DA:155,2
488
- DA:159,1
489
- DA:169,3
490
- DA:170,1
491
- DA:190,3
492
- DA:192,3
493
- DA:193,0
494
- DA:220,3
495
- DA:222,3
496
- DA:223,0
497
- DA:250,3
498
- DA:252,3
499
- DA:253,0
500
- DA:275,3
501
- DA:278,4
502
- DA:298,3
503
- DA:301,5
504
- DA:321,3
505
- DA:324,3
506
- LF:51
507
- LH:48
508
- BRDA:33,0,0,8
509
- BRDA:33,0,1,6
510
- BRDA:33,0,2,6
511
- BRDA:33,0,3,5
512
- BRDA:33,0,4,5
513
- BRDA:59,1,0,5
514
- BRDA:59,1,1,1
515
- BRDA:60,2,0,5
516
- BRDA:60,2,1,2
517
- BRDA:63,3,0,1
518
- BRDA:71,4,0,3
519
- BRDA:79,5,0,1
520
- BRDA:79,5,1,0
521
- BRDA:110,6,0,1
522
- BRDA:110,6,1,1
523
- BRDA:125,7,0,1
524
- BRDA:145,8,0,1
525
- BRDA:149,9,0,3
526
- BRDA:149,10,0,4
527
- BRDA:149,10,1,3
528
- BRDA:151,11,0,1
529
- BRDA:154,12,0,2
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
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "apple": "1.3.7",
3
- "google": "1.3.15",
4
- "gql": "1.3.7"
3
+ "google": "1.3.16",
4
+ "gql": "1.3.8"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-iap",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "description": "In App Purchase module in Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -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 = async (
276
- program: BillingProgramAndroid,
277
- ): Promise<BillingProgramAvailabilityResultAndroid> => {
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 when the link is launched
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 = async (
299
- params: LaunchExternalLinkParamsAndroid,
300
- ): Promise<void> => {
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 = async (
322
- program: BillingProgramAndroid,
323
- ): Promise<BillingProgramReportingDetailsAndroid> => {
317
+ export const createBillingProgramReportingDetailsAndroid: MutationField<
318
+ 'createBillingProgramReportingDetailsAndroid'
319
+ > = async (program) => {
324
320
  return ExpoIapModule.createBillingProgramReportingDetailsAndroid(program);
325
321
  };
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+) */
@@ -401,6 +428,8 @@ export type MutationBeginRefundRequestIosArgs = string;
401
428
 
402
429
  export type MutationConsumePurchaseAndroidArgs = string;
403
430
 
431
+ export type MutationCreateBillingProgramReportingDetailsAndroidArgs = BillingProgramAndroid;
432
+
404
433
  export type MutationDeepLinkToSubscriptionsArgs = (DeepLinkOptions | null) | undefined;
405
434
 
406
435
  export interface MutationFinishTransactionArgs {
@@ -411,6 +440,10 @@ export interface MutationFinishTransactionArgs {
411
440
 
412
441
  export type MutationInitConnectionArgs = (InitConnectionConfig | null) | undefined;
413
442
 
443
+ export type MutationIsBillingProgramAvailableAndroidArgs = BillingProgramAndroid;
444
+
445
+ export type MutationLaunchExternalLinkAndroidArgs = LaunchExternalLinkParamsAndroid;
446
+
414
447
  export type MutationPresentExternalPurchaseLinkIosArgs = string;
415
448
 
416
449
  export type MutationRequestPurchaseArgs =
@@ -1307,10 +1340,13 @@ export type MutationArgsMap = {
1307
1340
  clearTransactionIOS: never;
1308
1341
  consumePurchaseAndroid: MutationConsumePurchaseAndroidArgs;
1309
1342
  createAlternativeBillingTokenAndroid: never;
1343
+ createBillingProgramReportingDetailsAndroid: MutationCreateBillingProgramReportingDetailsAndroidArgs;
1310
1344
  deepLinkToSubscriptions: MutationDeepLinkToSubscriptionsArgs;
1311
1345
  endConnection: never;
1312
1346
  finishTransaction: MutationFinishTransactionArgs;
1313
1347
  initConnection: MutationInitConnectionArgs;
1348
+ isBillingProgramAvailableAndroid: MutationIsBillingProgramAvailableAndroidArgs;
1349
+ launchExternalLinkAndroid: MutationLaunchExternalLinkAndroidArgs;
1314
1350
  presentCodeRedemptionSheetIOS: never;
1315
1351
  presentExternalPurchaseLinkIOS: MutationPresentExternalPurchaseLinkIosArgs;
1316
1352
  presentExternalPurchaseNoticeSheetIOS: never;