react-native-iap 14.4.11 → 14.4.12

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.
Files changed (76) hide show
  1. package/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +159 -10
  2. package/ios/HybridRnIap.swift +115 -2
  3. package/lib/module/hooks/useIAP.js +24 -3
  4. package/lib/module/hooks/useIAP.js.map +1 -1
  5. package/lib/module/index.js +275 -2
  6. package/lib/module/index.js.map +1 -1
  7. package/lib/module/types.js +18 -0
  8. package/lib/module/types.js.map +1 -1
  9. package/lib/typescript/plugin/src/withIAP.d.ts +27 -0
  10. package/lib/typescript/plugin/src/withIAP.d.ts.map +1 -1
  11. package/lib/typescript/src/hooks/useIAP.d.ts +6 -1
  12. package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
  13. package/lib/typescript/src/index.d.ts +133 -0
  14. package/lib/typescript/src/index.d.ts.map +1 -1
  15. package/lib/typescript/src/specs/RnIap.nitro.d.ts +72 -2
  16. package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
  17. package/lib/typescript/src/types.d.ts +116 -13
  18. package/lib/typescript/src/types.d.ts.map +1 -1
  19. package/nitrogen/generated/android/NitroIapOnLoad.cpp +2 -0
  20. package/nitrogen/generated/android/c++/JAlternativeBillingModeAndroid.hpp +62 -0
  21. package/nitrogen/generated/android/c++/JExternalPurchaseLinkResultIOS.hpp +58 -0
  22. package/nitrogen/generated/android/c++/JExternalPurchaseNoticeAction.hpp +59 -0
  23. package/nitrogen/generated/android/c++/JExternalPurchaseNoticeResultIOS.hpp +60 -0
  24. package/nitrogen/generated/android/c++/JFunc_void_UserChoiceBillingDetails.hpp +78 -0
  25. package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +132 -3
  26. package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +9 -1
  27. package/nitrogen/generated/android/c++/JInitConnectionConfig.hpp +55 -0
  28. package/nitrogen/generated/android/c++/JPurchaseAndroid.hpp +4 -0
  29. package/nitrogen/generated/android/c++/JPurchaseIOS.hpp +4 -0
  30. package/nitrogen/generated/android/c++/JUserChoiceBillingDetails.hpp +75 -0
  31. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/AlternativeBillingModeAndroid.kt +22 -0
  32. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalPurchaseLinkResultIOS.kt +32 -0
  33. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalPurchaseNoticeAction.kt +21 -0
  34. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalPurchaseNoticeResultIOS.kt +32 -0
  35. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_UserChoiceBillingDetails.kt +81 -0
  36. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +43 -1
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/InitConnectionConfig.kt +29 -0
  38. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseAndroid.kt +3 -0
  39. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseIOS.kt +3 -0
  40. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/UserChoiceBillingDetails.kt +32 -0
  41. package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +24 -0
  42. package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +156 -0
  43. package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +18 -0
  44. package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +81 -3
  45. package/nitrogen/generated/ios/swift/AlternativeBillingModeAndroid.swift +44 -0
  46. package/nitrogen/generated/ios/swift/ExternalPurchaseLinkResultIOS.swift +65 -0
  47. package/nitrogen/generated/ios/swift/ExternalPurchaseNoticeAction.swift +40 -0
  48. package/nitrogen/generated/ios/swift/ExternalPurchaseNoticeResultIOS.swift +65 -0
  49. package/nitrogen/generated/ios/swift/Func_void_ExternalPurchaseLinkResultIOS.swift +47 -0
  50. package/nitrogen/generated/ios/swift/Func_void_ExternalPurchaseNoticeResultIOS.swift +47 -0
  51. package/nitrogen/generated/ios/swift/Func_void_UserChoiceBillingDetails.swift +47 -0
  52. package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +9 -1
  53. package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +168 -2
  54. package/nitrogen/generated/ios/swift/InitConnectionConfig.swift +47 -0
  55. package/nitrogen/generated/ios/swift/PurchaseAndroid.swift +31 -1
  56. package/nitrogen/generated/ios/swift/PurchaseIOS.swift +31 -1
  57. package/nitrogen/generated/ios/swift/UserChoiceBillingDetails.swift +58 -0
  58. package/nitrogen/generated/shared/c++/AlternativeBillingModeAndroid.hpp +80 -0
  59. package/nitrogen/generated/shared/c++/ExternalPurchaseLinkResultIOS.hpp +72 -0
  60. package/nitrogen/generated/shared/c++/ExternalPurchaseNoticeAction.hpp +76 -0
  61. package/nitrogen/generated/shared/c++/ExternalPurchaseNoticeResultIOS.hpp +74 -0
  62. package/nitrogen/generated/shared/c++/HybridRnIapSpec.cpp +8 -0
  63. package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +22 -2
  64. package/nitrogen/generated/shared/c++/InitConnectionConfig.hpp +69 -0
  65. package/nitrogen/generated/shared/c++/PurchaseAndroid.hpp +5 -1
  66. package/nitrogen/generated/shared/c++/PurchaseIOS.hpp +5 -1
  67. package/nitrogen/generated/shared/c++/UserChoiceBillingDetails.hpp +72 -0
  68. package/openiap-versions.json +3 -3
  69. package/package.json +1 -1
  70. package/plugin/build/withIAP.d.ts +27 -0
  71. package/plugin/build/withIAP.js +91 -1
  72. package/plugin/src/withIAP.ts +162 -0
  73. package/src/hooks/useIAP.ts +47 -1
  74. package/src/index.ts +313 -2
  75. package/src/specs/RnIap.nitro.ts +99 -1
  76. package/src/types.ts +124 -13
@@ -6,6 +6,9 @@ import type {HybridObject} from 'react-native-nitro-modules';
6
6
  import type {
7
7
  AndroidSubscriptionOfferInput,
8
8
  DeepLinkOptions,
9
+ InitConnectionConfig,
10
+ ExternalPurchaseLinkResultIOS,
11
+ ExternalPurchaseNoticeResultIOS,
9
12
  MutationFinishTransactionArgs,
10
13
  ProductCommon,
11
14
  PurchaseCommon,
@@ -16,6 +19,7 @@ import type {
16
19
  RequestPurchaseIosProps,
17
20
  RequestPurchaseResult,
18
21
  RequestSubscriptionAndroidProps,
22
+ UserChoiceBillingDetails,
19
23
  } from '../types';
20
24
 
21
25
  // ╔══════════════════════════════════════════════════════════════════════════╗
@@ -279,9 +283,10 @@ export interface RnIap extends HybridObject<{ios: 'swift'; android: 'kotlin'}> {
279
283
 
280
284
  /**
281
285
  * Initialize connection to the store
286
+ * @param config - Optional configuration including alternative billing mode for Android
282
287
  * @returns Promise<boolean> - true if connection successful
283
288
  */
284
- initConnection(): Promise<boolean>;
289
+ initConnection(config?: InitConnectionConfig | null): Promise<boolean>;
285
290
 
286
291
  /**
287
292
  * End connection to the store
@@ -559,4 +564,97 @@ export interface RnIap extends HybridObject<{ios: 'swift'; android: 'kotlin'}> {
559
564
  deepLinkToSubscriptionsAndroid?(
560
565
  options: NitroDeepLinkOptionsAndroid,
561
566
  ): Promise<void>;
567
+
568
+ // ╔════════════════════════════════════════════════════════════════════════╗
569
+ // ║ ALTERNATIVE BILLING (Android) ║
570
+ // ╚════════════════════════════════════════════════════════════════════════╝
571
+
572
+ /**
573
+ * Check if alternative billing is available for this user/device (Android only).
574
+ * Step 1 of alternative billing flow.
575
+ *
576
+ * @returns Promise<boolean> - true if available, false otherwise
577
+ * @throws Error if billing client not ready
578
+ * @platform Android
579
+ */
580
+ checkAlternativeBillingAvailabilityAndroid(): Promise<boolean>;
581
+
582
+ /**
583
+ * Show alternative billing information dialog to user (Android only).
584
+ * Step 2 of alternative billing flow.
585
+ * Must be called BEFORE processing payment in your payment system.
586
+ *
587
+ * @returns Promise<boolean> - true if user accepted, false if user canceled
588
+ * @throws Error if billing client not ready
589
+ * @platform Android
590
+ */
591
+ showAlternativeBillingDialogAndroid(): Promise<boolean>;
592
+
593
+ /**
594
+ * Create external transaction token for Google Play reporting (Android only).
595
+ * Step 3 of alternative billing flow.
596
+ * Must be called AFTER successful payment in your payment system.
597
+ * Token must be reported to Google Play backend within 24 hours.
598
+ *
599
+ * @param sku - Optional product SKU that was purchased
600
+ * @returns Promise<string | null> - Token string or null if creation failed
601
+ * @throws Error if billing client not ready
602
+ * @platform Android
603
+ */
604
+ createAlternativeBillingTokenAndroid(
605
+ sku?: string | null,
606
+ ): Promise<string | null>;
607
+
608
+ /**
609
+ * Add a listener for user choice billing events (Android only).
610
+ * Fires when a user selects alternative billing in the User Choice Billing dialog.
611
+ *
612
+ * @param listener - Function to call when user chooses alternative billing
613
+ * @platform Android
614
+ */
615
+ addUserChoiceBillingListenerAndroid(
616
+ listener: (details: UserChoiceBillingDetails) => void,
617
+ ): void;
618
+
619
+ /**
620
+ * Remove a user choice billing listener (Android only).
621
+ *
622
+ * @param listener - Function to remove from listeners
623
+ * @platform Android
624
+ */
625
+ removeUserChoiceBillingListenerAndroid(
626
+ listener: (details: UserChoiceBillingDetails) => void,
627
+ ): void;
628
+
629
+ // ╔════════════════════════════════════════════════════════════════════════╗
630
+ // ║ EXTERNAL PURCHASE LINKS (iOS 16.0+) ║
631
+ // ╚════════════════════════════════════════════════════════════════════════╝
632
+
633
+ /**
634
+ * Check if the device can present an external purchase notice sheet (iOS 18.2+).
635
+ *
636
+ * @returns Promise<boolean> - true if notice sheet can be presented
637
+ * @platform iOS
638
+ */
639
+ canPresentExternalPurchaseNoticeIOS(): Promise<boolean>;
640
+
641
+ /**
642
+ * Present an external purchase notice sheet to inform users about external purchases (iOS 18.2+).
643
+ * This must be called before opening an external purchase link.
644
+ *
645
+ * @returns Promise<ExternalPurchaseNoticeResultIOS> - Result with action and error if any
646
+ * @platform iOS
647
+ */
648
+ presentExternalPurchaseNoticeSheetIOS(): Promise<ExternalPurchaseNoticeResultIOS>;
649
+
650
+ /**
651
+ * Present an external purchase link to redirect users to your website (iOS 16.0+).
652
+ *
653
+ * @param url - The external purchase URL to open
654
+ * @returns Promise<ExternalPurchaseLinkResultIOS> - Result with success status and error if any
655
+ * @platform iOS
656
+ */
657
+ presentExternalPurchaseLinkIOS(
658
+ url: string,
659
+ ): Promise<ExternalPurchaseLinkResultIOS>;
562
660
  }
package/src/types.ts CHANGED
@@ -5,17 +5,33 @@
5
5
 
6
6
  export interface ActiveSubscription {
7
7
  autoRenewingAndroid?: (boolean | null);
8
+ basePlanIdAndroid?: (string | null);
9
+ /**
10
+ * The current plan identifier. This is:
11
+ * - On Android: the basePlanId (e.g., "premium", "premium-year")
12
+ * - On iOS: the productId (e.g., "com.example.premium_monthly", "com.example.premium_yearly")
13
+ * This provides a unified way to identify which specific plan/tier the user is subscribed to.
14
+ */
15
+ currentPlanId?: (string | null);
8
16
  daysUntilExpirationIOS?: (number | null);
9
17
  environmentIOS?: (string | null);
10
18
  expirationDateIOS?: (number | null);
11
19
  isActive: boolean;
12
20
  productId: string;
13
21
  purchaseToken?: (string | null);
22
+ /** Required for subscription upgrade/downgrade on Android */
23
+ purchaseTokenAndroid?: (string | null);
14
24
  transactionDate: number;
15
25
  transactionId: string;
16
26
  willExpireSoon?: (boolean | null);
17
27
  }
18
28
 
29
+ /**
30
+ * Alternative billing mode for Android
31
+ * Controls which billing system is used
32
+ */
33
+ export type AlternativeBillingModeAndroid = 'none' | 'user-choice' | 'alternative-only';
34
+
19
35
  export interface AndroidSubscriptionOfferInput {
20
36
  /** Offer token */
21
37
  offerToken: string;
@@ -126,21 +142,67 @@ export enum ErrorCode {
126
142
  UserError = 'user-error'
127
143
  }
128
144
 
145
+ /** Result of presenting an external purchase link (iOS 18.2+) */
146
+ export interface ExternalPurchaseLinkResultIOS {
147
+ /** Optional error message if the presentation failed */
148
+ error?: (string | null);
149
+ /** Whether the user completed the external purchase flow */
150
+ success: boolean;
151
+ }
152
+
153
+ /** User actions on external purchase notice sheet (iOS 18.2+) */
154
+ export type ExternalPurchaseNoticeAction = 'continue' | 'dismissed';
155
+
156
+ /** Result of presenting external purchase notice sheet (iOS 18.2+) */
157
+ export interface ExternalPurchaseNoticeResultIOS {
158
+ /** Optional error message if the presentation failed */
159
+ error?: (string | null);
160
+ /** Notice result indicating user action */
161
+ result: ExternalPurchaseNoticeAction;
162
+ }
163
+
129
164
  export type FetchProductsResult = Product[] | ProductSubscription[] | null;
130
165
 
131
- export type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios';
166
+ export type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios' | 'user-choice-billing-android';
132
167
 
133
168
  export type IapPlatform = 'ios' | 'android';
134
169
 
170
+ /** Connection initialization configuration */
171
+ export interface InitConnectionConfig {
172
+ /**
173
+ * Alternative billing mode for Android
174
+ * If not specified, defaults to NONE (standard Google Play billing)
175
+ */
176
+ alternativeBillingModeAndroid?: (AlternativeBillingModeAndroid | null);
177
+ }
178
+
135
179
  export interface Mutation {
136
180
  /** Acknowledge a non-consumable purchase or subscription */
137
181
  acknowledgePurchaseAndroid: Promise<boolean>;
138
182
  /** Initiate a refund request for a product (iOS 15+) */
139
183
  beginRefundRequestIOS?: Promise<(string | null)>;
184
+ /**
185
+ * Check if alternative billing is available for this user/device
186
+ * Step 1 of alternative billing flow
187
+ *
188
+ * Returns true if available, false otherwise
189
+ * Throws OpenIapError.NotPrepared if billing client not ready
190
+ */
191
+ checkAlternativeBillingAvailabilityAndroid: Promise<boolean>;
140
192
  /** Clear pending transactions from the StoreKit payment queue */
141
193
  clearTransactionIOS: Promise<boolean>;
142
194
  /** Consume a purchase token so it can be repurchased */
143
195
  consumePurchaseAndroid: Promise<boolean>;
196
+ /**
197
+ * Create external transaction token for Google Play reporting
198
+ * Step 3 of alternative billing flow
199
+ * Must be called AFTER successful payment in your payment system
200
+ * Token must be reported to Google Play backend within 24 hours
201
+ *
202
+ * Returns token string, or null if creation failed
203
+ * Throws OpenIapError.NotPrepared if billing client not ready
204
+ */
205
+ createAlternativeBillingTokenAndroid?: Promise<(string | null)>;
144
206
  /** Open the native subscription management surface */
145
207
  deepLinkToSubscriptions: Promise<void>;
146
208
  /** Close the platform billing connection */
@@ -151,12 +213,25 @@ export interface Mutation {
151
213
  initConnection: Promise<boolean>;
152
214
  /** Present the App Store code redemption sheet */
153
215
  presentCodeRedemptionSheetIOS: Promise<boolean>;
216
+ /** Present external purchase custom link with StoreKit UI (iOS 18.2+) */
217
+ presentExternalPurchaseLinkIOS: Promise<ExternalPurchaseLinkResultIOS>;
218
+ /** Present external purchase notice sheet (iOS 18.2+) */
219
+ presentExternalPurchaseNoticeSheetIOS: Promise<ExternalPurchaseNoticeResultIOS>;
154
220
  /** Initiate a purchase flow; rely on events for final state */
155
221
  requestPurchase?: Promise<(Purchase | Purchase[] | null)>;
156
222
  /** Purchase the promoted product surfaced by the App Store */
157
223
  requestPurchaseOnPromotedProductIOS: Promise<boolean>;
158
224
  /** Restore completed purchases across platforms */
159
225
  restorePurchases: Promise<void>;
226
+ /**
227
+ * Show alternative billing information dialog to user
228
+ * Step 2 of alternative billing flow
229
+ * Must be called BEFORE processing payment in your payment system
230
+ *
231
+ * Returns true if user accepted, false if user canceled
232
+ * Throws OpenIapError.NotPrepared if billing client not ready
233
+ */
234
+ showAlternativeBillingDialogAndroid: Promise<boolean>;
160
235
  /** Open subscription management UI and return changed purchases (iOS 15+) */
161
236
  showManageSubscriptionsIOS: Promise<PurchaseIOS[]>;
162
237
  /** Force a StoreKit sync for transactions (iOS 15+) */
@@ -181,16 +256,24 @@ export interface MutationFinishTransactionArgs {
181
256
  }
182
257
 
183
258
 
259
+ export type MutationInitConnectionArgs = (InitConnectionConfig | null) | undefined;
260
+
261
+ export type MutationPresentExternalPurchaseLinkIosArgs = string;
262
+
184
263
  export type MutationRequestPurchaseArgs =
185
264
  | {
186
265
  /** Per-platform purchase request props */
187
266
  request: RequestPurchasePropsByPlatforms;
188
267
  type: 'in-app';
268
+ /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */
269
+ useAlternativeBilling?: boolean | null;
189
270
  }
190
271
  | {
191
272
  /** Per-platform subscription request props */
192
273
  request: RequestSubscriptionPropsByPlatforms;
193
274
  type: 'subs';
275
+ /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */
276
+ useAlternativeBilling?: boolean | null;
194
277
  };
195
278
 
196
279
 
@@ -333,6 +416,7 @@ export type Purchase = PurchaseAndroid | PurchaseIOS;
333
416
 
334
417
  export interface PurchaseAndroid extends PurchaseCommon {
335
418
  autoRenewingAndroid?: (boolean | null);
419
+ currentPlanId?: (string | null);
336
420
  dataAndroid?: (string | null);
337
421
  developerPayloadAndroid?: (string | null);
338
422
  id: string;
@@ -353,6 +437,13 @@ export interface PurchaseAndroid extends PurchaseCommon {
353
437
  }
354
438
 
355
439
  export interface PurchaseCommon {
440
+ /**
441
+ * The current plan identifier. This is:
442
+ * - On Android: the basePlanId (e.g., "premium", "premium-year")
443
+ * - On iOS: the productId (e.g., "com.example.premium_monthly", "com.example.premium_yearly")
444
+ * This provides a unified way to identify which specific plan/tier the user is subscribed to.
445
+ */
446
+ currentPlanId?: (string | null);
356
447
  id: string;
357
448
  ids?: (string[] | null);
358
449
  isAutoRenewing: boolean;
@@ -377,6 +468,7 @@ export interface PurchaseIOS extends PurchaseCommon {
377
468
  countryCodeIOS?: (string | null);
378
469
  currencyCodeIOS?: (string | null);
379
470
  currencySymbolIOS?: (string | null);
471
+ currentPlanId?: (string | null);
380
472
  environmentIOS?: (string | null);
381
473
  expirationDateIOS?: (number | null);
382
474
  id: string;
@@ -405,17 +497,7 @@ export interface PurchaseIOS extends PurchaseCommon {
405
497
  webOrderLineItemIdIOS?: (string | null);
406
498
  }
407
499
 
408
- export interface PurchaseInput {
409
- id: string;
410
- ids?: (string[] | null);
411
- isAutoRenewing: boolean;
412
- platform: IapPlatform;
413
- productId: string;
414
- purchaseState: PurchaseState;
415
- purchaseToken?: (string | null);
416
- quantity: number;
417
- transactionDate: number;
418
- }
500
+ export type PurchaseInput = Purchase;
419
501
 
420
502
  export interface PurchaseOfferIOS {
421
503
  id: string;
@@ -433,6 +515,8 @@ export interface PurchaseOptions {
433
515
  export type PurchaseState = 'pending' | 'purchased' | 'failed' | 'restored' | 'deferred' | 'unknown';
434
516
 
435
517
  export interface Query {
518
+ /** Check if external purchase notice sheet can be presented (iOS 18.2+) */
519
+ canPresentExternalPurchaseNoticeIOS: Promise<boolean>;
436
520
  /** Get current StoreKit 2 entitlements (iOS 15+) */
437
521
  currentEntitlementIOS?: Promise<(PurchaseIOS | null)>;
438
522
  /** Retrieve products or subscriptions from the store */
@@ -584,11 +668,15 @@ export type RequestPurchaseProps =
584
668
  /** Per-platform purchase request props */
585
669
  request: RequestPurchasePropsByPlatforms;
586
670
  type: 'in-app';
671
+ /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */
672
+ useAlternativeBilling?: boolean | null;
587
673
  }
588
674
  | {
589
675
  /** Per-platform subscription request props */
590
676
  request: RequestSubscriptionPropsByPlatforms;
591
677
  type: 'subs';
678
+ /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */
679
+ useAlternativeBilling?: boolean | null;
592
680
  };
593
681
 
594
682
  export interface RequestPurchasePropsByPlatforms {
@@ -639,6 +727,11 @@ export interface Subscription {
639
727
  purchaseError: PurchaseError;
640
728
  /** Fires when a purchase completes successfully or a pending purchase resolves */
641
729
  purchaseUpdated: Purchase;
730
+ /**
731
+ * Fires when a user selects alternative billing in the User Choice Billing dialog (Android only)
732
+ * Only triggered when the user selects alternative billing instead of Google Play billing
733
+ */
734
+ userChoiceBillingAndroid: UserChoiceBillingDetails;
642
735
  }
643
736
 
644
737
 
@@ -673,10 +766,22 @@ export interface SubscriptionStatusIOS {
673
766
  state: string;
674
767
  }
675
768
 
769
+ /**
770
+ * User Choice Billing event details (Android)
771
+ * Fired when a user selects alternative billing in the User Choice Billing dialog
772
+ */
773
+ export interface UserChoiceBillingDetails {
774
+ /** Token that must be reported to Google Play within 24 hours */
775
+ externalTransactionToken: string;
776
+ /** List of product IDs selected by the user */
777
+ products: string[];
778
+ }
779
+
676
780
  export type VoidResult = void;
677
781
 
678
782
  // -- Query helper types (auto-generated)
679
783
  export type QueryArgsMap = {
784
+ canPresentExternalPurchaseNoticeIOS: never;
680
785
  currentEntitlementIOS: QueryCurrentEntitlementIosArgs;
681
786
  fetchProducts: QueryFetchProductsArgs;
682
787
  getActiveSubscriptions: QueryGetActiveSubscriptionsArgs;
@@ -712,16 +817,21 @@ export type QueryFieldMap = {
712
817
  export type MutationArgsMap = {
713
818
  acknowledgePurchaseAndroid: MutationAcknowledgePurchaseAndroidArgs;
714
819
  beginRefundRequestIOS: MutationBeginRefundRequestIosArgs;
820
+ checkAlternativeBillingAvailabilityAndroid: never;
715
821
  clearTransactionIOS: never;
716
822
  consumePurchaseAndroid: MutationConsumePurchaseAndroidArgs;
823
+ createAlternativeBillingTokenAndroid: never;
717
824
  deepLinkToSubscriptions: MutationDeepLinkToSubscriptionsArgs;
718
825
  endConnection: never;
719
826
  finishTransaction: MutationFinishTransactionArgs;
720
- initConnection: never;
827
+ initConnection: MutationInitConnectionArgs;
721
828
  presentCodeRedemptionSheetIOS: never;
829
+ presentExternalPurchaseLinkIOS: MutationPresentExternalPurchaseLinkIosArgs;
830
+ presentExternalPurchaseNoticeSheetIOS: never;
722
831
  requestPurchase: MutationRequestPurchaseArgs;
723
832
  requestPurchaseOnPromotedProductIOS: never;
724
833
  restorePurchases: never;
834
+ showAlternativeBillingDialogAndroid: never;
725
835
  showManageSubscriptionsIOS: never;
726
836
  syncIOS: never;
727
837
  validateReceipt: MutationValidateReceiptArgs;
@@ -744,6 +854,7 @@ export type SubscriptionArgsMap = {
744
854
  promotedProductIOS: never;
745
855
  purchaseError: never;
746
856
  purchaseUpdated: never;
857
+ userChoiceBillingAndroid: never;
747
858
  };
748
859
 
749
860
  export type SubscriptionField<K extends keyof Subscription> =