react-native-iap 15.3.4 → 15.3.5

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 (55) hide show
  1. package/ios/HybridRnIap.swift +5 -2
  2. package/lib/module/index.js +5 -2
  3. package/lib/module/index.js.map +1 -1
  4. package/lib/module/types.js.map +1 -1
  5. package/lib/typescript/src/specs/RnIap.nitro.d.ts +10 -6
  6. package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
  7. package/lib/typescript/src/types.d.ts +59 -5
  8. package/lib/typescript/src/types.d.ts.map +1 -1
  9. package/nitrogen/generated/android/NitroIap+autolinking.cmake +2 -0
  10. package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +14 -0
  11. package/nitrogen/generated/android/c++/JNitroPurchaseRequest.hpp +2 -0
  12. package/nitrogen/generated/android/c++/JNitroRequestPurchaseIos.hpp +11 -5
  13. package/nitrogen/generated/android/c++/JPurchase.hpp +8 -0
  14. package/nitrogen/generated/android/c++/JPurchaseIOS.hpp +17 -1
  15. package/nitrogen/generated/android/c++/JRenewalCommitmentInfoIOS.hpp +75 -0
  16. package/nitrogen/generated/android/c++/JRenewalInfoIOS.hpp +14 -1
  17. package/nitrogen/generated/android/c++/JRequestPurchaseResult.hpp +8 -0
  18. package/nitrogen/generated/android/c++/JSubscriptionBillingPlanTypeIOS.hpp +61 -0
  19. package/nitrogen/generated/android/c++/JTransactionCommitmentInfoIOS.hpp +69 -0
  20. package/nitrogen/generated/android/c++/JVariant_NullType_NitroRequestPurchaseIos.hpp +2 -0
  21. package/nitrogen/generated/android/c++/JVariant_NullType_RenewalCommitmentInfoIOS.cpp +26 -0
  22. package/nitrogen/generated/android/c++/JVariant_NullType_RenewalCommitmentInfoIOS.hpp +74 -0
  23. package/nitrogen/generated/android/c++/JVariant_NullType_RenewalInfoIOS.hpp +5 -0
  24. package/nitrogen/generated/android/c++/JVariant_NullType_TransactionCommitmentInfoIOS.cpp +26 -0
  25. package/nitrogen/generated/android/c++/JVariant_NullType_TransactionCommitmentInfoIOS.hpp +71 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRequestPurchaseIos.kt +6 -3
  27. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseIOS.kt +8 -2
  28. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/RenewalCommitmentInfoIOS.kt +50 -0
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/RenewalInfoIOS.kt +8 -2
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/SubscriptionBillingPlanTypeIOS.kt +24 -0
  31. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/TransactionCommitmentInfoIOS.kt +47 -0
  32. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_RenewalCommitmentInfoIOS.kt +53 -0
  33. package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_TransactionCommitmentInfoIOS.kt +53 -0
  34. package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +112 -0
  35. package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +9 -0
  36. package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +9 -0
  37. package/nitrogen/generated/ios/swift/NitroRequestPurchaseIos.swift +24 -13
  38. package/nitrogen/generated/ios/swift/PurchaseIOS.swift +49 -1
  39. package/nitrogen/generated/ios/swift/RenewalCommitmentInfoIOS.swift +49 -0
  40. package/nitrogen/generated/ios/swift/RenewalInfoIOS.swift +49 -1
  41. package/nitrogen/generated/ios/swift/SubscriptionBillingPlanTypeIOS.swift +44 -0
  42. package/nitrogen/generated/ios/swift/TransactionCommitmentInfoIOS.swift +44 -0
  43. package/nitrogen/generated/ios/swift/Variant_NullType_RenewalCommitmentInfoIOS.swift +18 -0
  44. package/nitrogen/generated/ios/swift/Variant_NullType_TransactionCommitmentInfoIOS.swift +18 -0
  45. package/nitrogen/generated/shared/c++/NitroRequestPurchaseIos.hpp +12 -5
  46. package/nitrogen/generated/shared/c++/PurchaseIOS.hpp +15 -1
  47. package/nitrogen/generated/shared/c++/RenewalCommitmentInfoIOS.hpp +101 -0
  48. package/nitrogen/generated/shared/c++/RenewalInfoIOS.hpp +15 -2
  49. package/nitrogen/generated/shared/c++/SubscriptionBillingPlanTypeIOS.hpp +80 -0
  50. package/nitrogen/generated/shared/c++/TransactionCommitmentInfoIOS.hpp +95 -0
  51. package/openiap-versions.json +2 -2
  52. package/package.json +1 -1
  53. package/src/index.ts +5 -5
  54. package/src/specs/RnIap.nitro.ts +10 -5
  55. package/src/types.ts +64 -5
package/src/types.ts CHANGED
@@ -985,6 +985,11 @@ export interface ProductIOS extends ProductCommon {
985
985
  jsonRepresentationIOS: string;
986
986
  platform: 'ios';
987
987
  price?: (number | null);
988
+ /**
989
+ * iOS 26.4+ subscription pricing terms, including billing plan metadata for
990
+ * monthly subscriptions with a 12-month commitment.
991
+ */
992
+ pricingTermsIOS?: (SubscriptionPricingTermsIOS[] | null);
988
993
  /**
989
994
  * @deprecated Use subscriptionOffers instead for cross-platform compatibility.
990
995
  * @deprecated Use subscriptionOffers instead
@@ -1108,6 +1113,11 @@ export interface ProductSubscriptionIOS extends ProductCommon {
1108
1113
  jsonRepresentationIOS: string;
1109
1114
  platform: 'ios';
1110
1115
  price?: (number | null);
1116
+ /**
1117
+ * iOS 26.4+ subscription pricing terms, including billing plan metadata for
1118
+ * monthly subscriptions with a 12-month commitment.
1119
+ */
1120
+ pricingTermsIOS?: (SubscriptionPricingTermsIOS[] | null);
1111
1121
  /** App Store subscription group identifier for intro-offer eligibility checks. */
1112
1122
  subscriptionGroupIdIOS?: (string | null);
1113
1123
  /**
@@ -1234,6 +1244,10 @@ export interface PurchaseIOS extends PurchaseCommon {
1234
1244
  advancedCommerceInfoIOS?: (AdvancedCommerceInfoIOS | null);
1235
1245
  appAccountToken?: (string | null);
1236
1246
  appBundleIdIOS?: (string | null);
1247
+ /** iOS 26.4+ billing plan selected for this transaction. */
1248
+ billingPlanTypeIOS?: (SubscriptionBillingPlanTypeIOS | null);
1249
+ /** iOS 26.4+ progress information for monthly subscriptions with a 12-month commitment. */
1250
+ commitmentInfoIOS?: (TransactionCommitmentInfoIOS | null);
1237
1251
  countryCodeIOS?: (string | null);
1238
1252
  currencyCodeIOS?: (string | null);
1239
1253
  currencySymbolIOS?: (string | null);
@@ -1454,12 +1468,25 @@ export interface RefundResultIOS {
1454
1468
  status: string;
1455
1469
  }
1456
1470
 
1471
+ export interface RenewalCommitmentInfoIOS {
1472
+ commitmentAutoRenewProductId: string;
1473
+ commitmentAutoRenewStatus: boolean;
1474
+ commitmentRenewalBillingPlanType: SubscriptionBillingPlanTypeIOS;
1475
+ commitmentRenewalDate: number;
1476
+ commitmentRenewalPrice: number;
1477
+ }
1478
+
1457
1479
  /**
1458
1480
  * Subscription renewal information from Product.SubscriptionInfo.RenewalInfo
1459
1481
  * https://developer.apple.com/documentation/storekit/product/subscriptioninfo/renewalinfo
1460
1482
  */
1461
1483
  export interface RenewalInfoIOS {
1462
1484
  autoRenewPreference?: (string | null);
1485
+ /**
1486
+ * iOS 26.4+ renewal commitment metadata for monthly subscriptions with a
1487
+ * 12-month commitment.
1488
+ */
1489
+ commitmentInfo?: (RenewalCommitmentInfoIOS | null);
1463
1490
  /**
1464
1491
  * When subscription expires due to cancellation/billing issue
1465
1492
  * Possible values: "VOLUNTARY", "BILLING_ERROR", "DID_NOT_AGREE_TO_PRICE_INCREASE", "PRODUCT_NOT_AVAILABLE", "UNKNOWN"
@@ -1486,6 +1513,8 @@ export interface RenewalInfoIOS {
1486
1513
  * Possible values: "AGREED", "PENDING", null (no price increase)
1487
1514
  */
1488
1515
  priceIncreaseStatus?: (string | null);
1516
+ /** iOS 26.4+ billing plan that will renew after the current period. */
1517
+ renewalBillingPlanType?: (SubscriptionBillingPlanTypeIOS | null);
1489
1518
  /**
1490
1519
  * Expected renewal date (milliseconds since epoch)
1491
1520
  * For active subscriptions, when the next renewal/charge will occur
@@ -1646,12 +1675,17 @@ export interface RequestSubscriptionIosProps {
1646
1675
  andDangerouslyFinishTransactionAutomatically?: (boolean | null);
1647
1676
  appAccountToken?: (string | null);
1648
1677
  /**
1649
- * Override introductory offer eligibility (iOS 15+, WWDC 2025).
1650
- * Set to true to indicate the user is eligible for introductory offer,
1651
- * or false to indicate they are not. When nil, the system determines eligibility.
1652
- * Back-deployed to iOS 15.
1678
+ * Billing plan to use when purchasing an annual subscription that offers
1679
+ * monthly billing with a 12-month commitment (iOS 26.4+).
1680
+ */
1681
+ billingPlanType?: (SubscriptionBillingPlanTypeIOS | null);
1682
+ /**
1683
+ * Compact JWS string for overriding introductory offer eligibility
1684
+ * (iOS 15+, WWDC 2025). When nil, the system determines eligibility.
1685
+ * Generate the JWS on your server and pass it to StoreKit's
1686
+ * introductoryOfferEligibility(compactJWS:) purchase option.
1653
1687
  */
1654
- introductoryOfferEligibility?: (boolean | null);
1688
+ compactJWS?: (string | null);
1655
1689
  /**
1656
1690
  * JWS promotional offer (iOS 15+, WWDC 2025).
1657
1691
  * New signature format using compact JWS string for promotional offers.
@@ -1777,8 +1811,17 @@ export interface Subscription {
1777
1811
 
1778
1812
  export type SubscriptionPurchaseUpdatedArgs = (PurchaseUpdatedListenerOptions | null) | undefined;
1779
1813
 
1814
+ export type SubscriptionBillingPlanTypeIOS = 'unknown' | 'monthly' | 'up-front';
1815
+
1816
+ export interface SubscriptionCommitmentInfoIOS {
1817
+ displayPrice: string;
1818
+ period: SubscriptionPeriodValueIOS;
1819
+ price: number;
1820
+ }
1821
+
1780
1822
  export interface SubscriptionInfoIOS {
1781
1823
  introductoryOffer?: (SubscriptionOfferIOS | null);
1824
+ pricingTerms?: (SubscriptionPricingTermsIOS[] | null);
1782
1825
  promotionalOffers?: (SubscriptionOfferIOS[] | null);
1783
1826
  subscriptionGroupId: string;
1784
1827
  subscriptionPeriod: SubscriptionPeriodValueIOS;
@@ -1900,6 +1943,15 @@ export interface SubscriptionPeriodValueIOS {
1900
1943
  value: number;
1901
1944
  }
1902
1945
 
1946
+ export interface SubscriptionPricingTermsIOS {
1947
+ billingDisplayPrice: string;
1948
+ billingPeriod: SubscriptionPeriodValueIOS;
1949
+ billingPlanType: SubscriptionBillingPlanTypeIOS;
1950
+ billingPrice: number;
1951
+ commitmentInfo: SubscriptionCommitmentInfoIOS;
1952
+ subscriptionOffers?: (SubscriptionOffer[] | null);
1953
+ }
1954
+
1903
1955
  /**
1904
1956
  * Product-level subscription replacement parameters (Android)
1905
1957
  * Used with setSubscriptionProductReplacementParams in BillingFlowParams.ProductDetailsParams
@@ -1926,6 +1978,13 @@ export interface SubscriptionStatusIOS {
1926
1978
  state: string;
1927
1979
  }
1928
1980
 
1981
+ export interface TransactionCommitmentInfoIOS {
1982
+ billingPeriodNumber: number;
1983
+ commitmentExpiresDate: number;
1984
+ commitmentPrice: number;
1985
+ totalBillingPeriods: number;
1986
+ }
1987
+
1929
1988
  /**
1930
1989
  * User Choice Billing event details (Android)
1931
1990
  * Fired when a user selects alternative billing in the User Choice Billing dialog