react-native-iap 14.5.1-rc.1 → 14.6.0-rc.1
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/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +126 -0
- package/ios/HybridRnIap.swift +24 -0
- package/lib/module/index.js +166 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +58 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/index.d.ts +124 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +71 -0
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +100 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JBillingProgramAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JExternalLinkLaunchModeAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JExternalLinkTypeAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +76 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +4 -0
- package/nitrogen/generated/android/c++/JNitroBillingProgramAvailabilityResultAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroBillingProgramReportingDetailsAndroid.hpp +63 -0
- package/nitrogen/generated/android/c++/JNitroLaunchExternalLinkParamsAndroid.hpp +75 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/BillingProgramAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalLinkLaunchModeAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalLinkTypeAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +16 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroBillingProgramAvailabilityResultAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroBillingProgramReportingDetailsAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroLaunchExternalLinkParamsAndroid.kt +45 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +16 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +95 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +18 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +48 -0
- package/nitrogen/generated/ios/swift/BillingProgramAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/ExternalLinkLaunchModeAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/ExternalLinkTypeAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramAvailabilityResultAndroid.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramReportingDetailsAndroid.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +68 -0
- package/nitrogen/generated/ios/swift/NitroBillingProgramAvailabilityResultAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroBillingProgramReportingDetailsAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroLaunchExternalLinkParamsAndroid.swift +68 -0
- package/nitrogen/generated/shared/c++/BillingProgramAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/ExternalLinkLaunchModeAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/ExternalLinkTypeAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +16 -0
- package/nitrogen/generated/shared/c++/NitroBillingProgramAvailabilityResultAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroBillingProgramReportingDetailsAndroid.hpp +81 -0
- package/nitrogen/generated/shared/c++/NitroLaunchExternalLinkParamsAndroid.hpp +95 -0
- package/openiap-versions.json +2 -2
- package/package.json +1 -1
- package/src/index.ts +218 -0
- package/src/specs/RnIap.nitro.ts +101 -0
- package/src/types.ts +110 -1
package/src/types.ts
CHANGED
|
@@ -65,6 +65,38 @@ export interface AppTransaction {
|
|
|
65
65
|
signedDate: number;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Billing program types for external content links and external offers (Android)
|
|
70
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
71
|
+
*/
|
|
72
|
+
export type BillingProgramAndroid = 'unspecified' | 'external-content-link' | 'external-offer';
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Result of checking billing program availability (Android)
|
|
76
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
77
|
+
*/
|
|
78
|
+
export interface BillingProgramAvailabilityResultAndroid {
|
|
79
|
+
/** The billing program that was checked */
|
|
80
|
+
billingProgram: BillingProgramAndroid;
|
|
81
|
+
/** Whether the billing program is available for the user */
|
|
82
|
+
isAvailable: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Reporting details for transactions made outside of Google Play Billing (Android)
|
|
87
|
+
* Contains the external transaction token needed for reporting
|
|
88
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
89
|
+
*/
|
|
90
|
+
export interface BillingProgramReportingDetailsAndroid {
|
|
91
|
+
/** The billing program that the reporting details are associated with */
|
|
92
|
+
billingProgram: BillingProgramAndroid;
|
|
93
|
+
/**
|
|
94
|
+
* External transaction token used to report transactions made outside of Google Play Billing.
|
|
95
|
+
* This token must be used when reporting the external transaction to Google.
|
|
96
|
+
*/
|
|
97
|
+
externalTransactionToken: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
68
100
|
export interface DeepLinkOptions {
|
|
69
101
|
/** Android package name to target (required on Android) */
|
|
70
102
|
packageNameAndroid?: (string | null);
|
|
@@ -183,6 +215,40 @@ export enum ErrorCode {
|
|
|
183
215
|
UserError = 'user-error'
|
|
184
216
|
}
|
|
185
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Launch mode for external link flow (Android)
|
|
220
|
+
* Determines how the external URL is launched
|
|
221
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
222
|
+
*/
|
|
223
|
+
export type ExternalLinkLaunchModeAndroid = 'unspecified' | 'launch-in-external-browser-or-app' | 'caller-will-launch-link';
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Link type for external link flow (Android)
|
|
227
|
+
* Specifies the type of external link destination
|
|
228
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
229
|
+
*/
|
|
230
|
+
export type ExternalLinkTypeAndroid = 'unspecified' | 'link-to-digital-content-offer' | 'link-to-app-download';
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* External offer availability result (Android)
|
|
234
|
+
* @deprecated Use BillingProgramAvailabilityResultAndroid with isBillingProgramAvailableAsync instead
|
|
235
|
+
* Available in Google Play Billing Library 6.2.0+, deprecated in 8.2.0
|
|
236
|
+
*/
|
|
237
|
+
export interface ExternalOfferAvailabilityResultAndroid {
|
|
238
|
+
/** Whether external offers are available for the user */
|
|
239
|
+
isAvailable: boolean;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* External offer reporting details (Android)
|
|
244
|
+
* @deprecated Use BillingProgramReportingDetailsAndroid with createBillingProgramReportingDetailsAsync instead
|
|
245
|
+
* Available in Google Play Billing Library 6.2.0+, deprecated in 8.2.0
|
|
246
|
+
*/
|
|
247
|
+
export interface ExternalOfferReportingDetailsAndroid {
|
|
248
|
+
/** External transaction token for reporting external offer transactions */
|
|
249
|
+
externalTransactionToken: string;
|
|
250
|
+
}
|
|
251
|
+
|
|
186
252
|
/** Result of presenting an external purchase link (iOS 18.2+) */
|
|
187
253
|
export interface ExternalPurchaseLinkResultIOS {
|
|
188
254
|
/** Optional error message if the presentation failed */
|
|
@@ -222,6 +288,22 @@ export interface InitConnectionConfig {
|
|
|
222
288
|
alternativeBillingModeAndroid?: (AlternativeBillingModeAndroid | null);
|
|
223
289
|
}
|
|
224
290
|
|
|
291
|
+
/**
|
|
292
|
+
* Parameters for launching an external link (Android)
|
|
293
|
+
* Used with launchExternalLink to initiate external offer or app install flows
|
|
294
|
+
* Available in Google Play Billing Library 8.2.0+
|
|
295
|
+
*/
|
|
296
|
+
export interface LaunchExternalLinkParamsAndroid {
|
|
297
|
+
/** The billing program (EXTERNAL_CONTENT_LINK or EXTERNAL_OFFER) */
|
|
298
|
+
billingProgram: BillingProgramAndroid;
|
|
299
|
+
/** The external link launch mode */
|
|
300
|
+
launchMode: ExternalLinkLaunchModeAndroid;
|
|
301
|
+
/** The type of the external link */
|
|
302
|
+
linkType: ExternalLinkTypeAndroid;
|
|
303
|
+
/** The URI where the content will be accessed from */
|
|
304
|
+
linkUri: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
225
307
|
/**
|
|
226
308
|
* Limited quantity information for one-time purchase offers (Android)
|
|
227
309
|
* Available in Google Play Billing Library 7.0+
|
|
@@ -857,12 +939,20 @@ export interface RequestSubscriptionAndroidProps {
|
|
|
857
939
|
obfuscatedProfileIdAndroid?: (string | null);
|
|
858
940
|
/** Purchase token for upgrades/downgrades */
|
|
859
941
|
purchaseTokenAndroid?: (string | null);
|
|
860
|
-
/**
|
|
942
|
+
/**
|
|
943
|
+
* Replacement mode for subscription changes
|
|
944
|
+
* @deprecated Use subscriptionProductReplacementParams instead for item-level replacement (8.1.0+)
|
|
945
|
+
*/
|
|
861
946
|
replacementModeAndroid?: (number | null);
|
|
862
947
|
/** List of subscription SKUs */
|
|
863
948
|
skus: string[];
|
|
864
949
|
/** Subscription offers */
|
|
865
950
|
subscriptionOffers?: (AndroidSubscriptionOfferInput[] | null);
|
|
951
|
+
/**
|
|
952
|
+
* Product-level replacement parameters (8.1.0+)
|
|
953
|
+
* Use this instead of replacementModeAndroid for item-level replacement
|
|
954
|
+
*/
|
|
955
|
+
subscriptionProductReplacementParams?: (SubscriptionProductReplacementParamsAndroid | null);
|
|
866
956
|
}
|
|
867
957
|
|
|
868
958
|
export interface RequestSubscriptionIosProps {
|
|
@@ -952,6 +1042,25 @@ export interface SubscriptionPeriodValueIOS {
|
|
|
952
1042
|
value: number;
|
|
953
1043
|
}
|
|
954
1044
|
|
|
1045
|
+
/**
|
|
1046
|
+
* Product-level subscription replacement parameters (Android)
|
|
1047
|
+
* Used with setSubscriptionProductReplacementParams in BillingFlowParams.ProductDetailsParams
|
|
1048
|
+
* Available in Google Play Billing Library 8.1.0+
|
|
1049
|
+
*/
|
|
1050
|
+
export interface SubscriptionProductReplacementParamsAndroid {
|
|
1051
|
+
/** The old product ID that needs to be replaced */
|
|
1052
|
+
oldProductId: string;
|
|
1053
|
+
/** The replacement mode for this product change */
|
|
1054
|
+
replacementMode: SubscriptionReplacementModeAndroid;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Replacement mode for subscription changes (Android)
|
|
1059
|
+
* These modes determine how the subscription replacement affects billing.
|
|
1060
|
+
* Available in Google Play Billing Library 8.1.0+
|
|
1061
|
+
*/
|
|
1062
|
+
export type SubscriptionReplacementModeAndroid = 'unknown-replacement-mode' | 'with-time-proration' | 'charge-prorated-price' | 'charge-full-price' | 'without-proration' | 'deferred' | 'keep-existing';
|
|
1063
|
+
|
|
955
1064
|
export interface SubscriptionStatusIOS {
|
|
956
1065
|
renewalInfo?: (RenewalInfoIOS | null);
|
|
957
1066
|
state: string;
|