react-native-iap 13.0.4 → 14.0.0-rc.2
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/NitroIap.podspec +33 -0
- package/README.md +163 -51
- package/android/CMakeLists.txt +32 -0
- package/android/build.gradle +107 -138
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +5 -13
- package/android/src/main/AndroidManifest.xml +1 -4
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +843 -0
- package/android/src/main/java/com/margelo/nitro/iap/NitroIapPackage.java +33 -0
- package/android/src/main/java/com/margelo/nitro/iap/Types.kt +173 -0
- package/ios/Bridge.h +8 -0
- package/ios/ErrorUtils.swift +153 -0
- package/ios/HybridRnIap.swift +1326 -0
- package/ios/ProductStore.swift +33 -0
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/lib/module/helpers/subscription.js +56 -0
- package/lib/module/helpers/subscription.js.map +1 -0
- package/lib/module/hooks/useIAP.js +175 -123
- package/lib/module/hooks/useIAP.js.map +1 -1
- package/lib/module/index.js +1015 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/specs/RnIap.nitro.js +4 -0
- package/lib/{commonjs/modules/common.js.map → module/specs/RnIap.nitro.js.map} +1 -1
- package/lib/module/types.js +187 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/error.js +80 -0
- package/lib/module/utils/error.js.map +1 -0
- package/lib/module/utils/type-bridge.js +202 -0
- package/lib/module/utils/type-bridge.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/plugin/src/withIAP.d.ts +2 -7
- package/lib/typescript/plugin/src/withIAP.d.ts.map +1 -1
- package/lib/typescript/scripts/check-nitro-versions.d.ts +3 -0
- package/lib/typescript/scripts/check-nitro-versions.d.ts.map +1 -0
- package/lib/typescript/src/helpers/subscription.d.ts +14 -0
- package/lib/typescript/src/helpers/subscription.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useIAP.d.ts +42 -26
- package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +356 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +404 -0
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +544 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/error.d.ts +30 -0
- package/lib/typescript/src/utils/error.d.ts.map +1 -0
- package/lib/typescript/src/utils/type-bridge.d.ts +40 -0
- package/lib/typescript/src/utils/type-bridge.d.ts.map +1 -0
- package/nitro.json +17 -0
- package/nitrogen/generated/android/NitroIap+autolinking.cmake +80 -0
- package/nitrogen/generated/android/NitroIap+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroIapOnLoad.cpp +50 -0
- package/nitrogen/generated/android/NitroIapOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JFunc_void_NitroProduct.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_NitroPurchase.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_NitroPurchaseResult.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +577 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +93 -0
- package/nitrogen/generated/android/c++/JNitroAndroidReceiptValidationOptions.hpp +66 -0
- package/nitrogen/generated/android/c++/JNitroAvailablePurchasesAndroidOptions.hpp +54 -0
- package/nitrogen/generated/android/c++/JNitroAvailablePurchasesIosOptions.hpp +65 -0
- package/nitrogen/generated/android/c++/JNitroAvailablePurchasesOptions.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroFinishTransactionAndroidParams.hpp +58 -0
- package/nitrogen/generated/android/c++/JNitroFinishTransactionIosParams.hpp +53 -0
- package/nitrogen/generated/android/c++/JNitroFinishTransactionParams.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroProduct.hpp +154 -0
- package/nitrogen/generated/android/c++/JNitroPurchase.hpp +122 -0
- package/nitrogen/generated/android/c++/JNitroPurchaseRequest.hpp +66 -0
- package/nitrogen/generated/android/c++/JNitroPurchaseResult.hpp +70 -0
- package/nitrogen/generated/android/c++/JNitroReceiptValidationParams.hpp +60 -0
- package/nitrogen/generated/android/c++/JNitroReceiptValidationResultAndroid.hpp +122 -0
- package/nitrogen/generated/android/c++/JNitroReceiptValidationResultIOS.hpp +68 -0
- package/nitrogen/generated/android/c++/JNitroRequestPurchaseAndroid.hpp +115 -0
- package/nitrogen/generated/android/c++/JNitroRequestPurchaseIos.hpp +84 -0
- package/nitrogen/generated/android/c++/JNitroSubscriptionOffer.hpp +57 -0
- package/nitrogen/generated/android/c++/JNitroSubscriptionRenewalInfo.hpp +74 -0
- package/nitrogen/generated/android/c++/JNitroSubscriptionStatus.hpp +64 -0
- package/nitrogen/generated/android/c++/JVariant_Boolean_NitroPurchaseResult.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_Boolean_NitroPurchaseResult.hpp +71 -0
- package/nitrogen/generated/android/c++/JVariant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.hpp +75 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_NitroProduct.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_NitroPurchase.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_NitroPurchaseResult.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +198 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAndroidReceiptValidationOptions.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAvailablePurchasesAndroidOptions.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAvailablePurchasesIosOptions.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAvailablePurchasesOptions.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroFinishTransactionAndroidParams.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroFinishTransactionIosParams.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroFinishTransactionParams.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroIapOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroProduct.kt +104 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchase.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchaseRequest.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchaseResult.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationParams.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationResultAndroid.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationResultIOS.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRequestPurchaseAndroid.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRequestPurchaseIos.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroSubscriptionOffer.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroSubscriptionRenewalInfo.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroSubscriptionStatus.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_Boolean_NitroPurchaseResult.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.kt +42 -0
- package/nitrogen/generated/ios/NitroIap+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +152 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +1061 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +107 -0
- package/nitrogen/generated/ios/NitroIapAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroIapAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +355 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroProduct.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroPurchase.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroPurchaseResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_NitroProduct_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_NitroPurchase_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__vector_NitroSubscriptionStatus__.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__variant_NitroReceiptValidationResultIOS__NitroReceiptValidationResultAndroid_.swift +59 -0
- package/nitrogen/generated/ios/swift/Func_void_std__variant_bool__NitroPurchaseResult_.swift +59 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_NitroProduct_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_NitroPurchase_.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +78 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +750 -0
- package/nitrogen/generated/ios/swift/NitroAndroidReceiptValidationOptions.swift +80 -0
- package/nitrogen/generated/ios/swift/NitroAvailablePurchasesAndroidOptions.swift +54 -0
- package/nitrogen/generated/ios/swift/NitroAvailablePurchasesIosOptions.swift +116 -0
- package/nitrogen/generated/ios/swift/NitroAvailablePurchasesOptions.swift +84 -0
- package/nitrogen/generated/ios/swift/NitroFinishTransactionAndroidParams.swift +58 -0
- package/nitrogen/generated/ios/swift/NitroFinishTransactionIosParams.swift +35 -0
- package/nitrogen/generated/ios/swift/NitroFinishTransactionParams.swift +84 -0
- package/nitrogen/generated/ios/swift/NitroProduct.swift +653 -0
- package/nitrogen/generated/ios/swift/NitroPurchase.swift +453 -0
- package/nitrogen/generated/ios/swift/NitroPurchaseRequest.swift +84 -0
- package/nitrogen/generated/ios/swift/NitroPurchaseResult.swift +117 -0
- package/nitrogen/generated/ios/swift/NitroReceiptValidationParams.swift +65 -0
- package/nitrogen/generated/ios/swift/NitroReceiptValidationResultAndroid.swift +258 -0
- package/nitrogen/generated/ios/swift/NitroReceiptValidationResultIOS.swift +87 -0
- package/nitrogen/generated/ios/swift/NitroRequestPurchaseAndroid.swift +225 -0
- package/nitrogen/generated/ios/swift/NitroRequestPurchaseIos.swift +161 -0
- package/nitrogen/generated/ios/swift/NitroSubscriptionOffer.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroSubscriptionRenewalInfo.swift +152 -0
- package/nitrogen/generated/ios/swift/NitroSubscriptionStatus.swift +76 -0
- package/nitrogen/generated/ios/swift/Variant_Bool_NitroPurchaseResult.swift +18 -0
- package/nitrogen/generated/ios/swift/Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.swift +18 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.cpp +50 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +125 -0
- package/nitrogen/generated/shared/c++/NitroAndroidReceiptValidationOptions.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroAvailablePurchasesAndroidOptions.hpp +68 -0
- package/nitrogen/generated/shared/c++/NitroAvailablePurchasesIosOptions.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroAvailablePurchasesOptions.hpp +76 -0
- package/nitrogen/generated/shared/c++/NitroFinishTransactionAndroidParams.hpp +72 -0
- package/nitrogen/generated/shared/c++/NitroFinishTransactionIosParams.hpp +67 -0
- package/nitrogen/generated/shared/c++/NitroFinishTransactionParams.hpp +76 -0
- package/nitrogen/generated/shared/c++/NitroProduct.hpp +168 -0
- package/nitrogen/generated/shared/c++/NitroPurchase.hpp +136 -0
- package/nitrogen/generated/shared/c++/NitroPurchaseRequest.hpp +76 -0
- package/nitrogen/generated/shared/c++/NitroPurchaseResult.hpp +84 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationParams.hpp +74 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationResultAndroid.hpp +136 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationResultIOS.hpp +82 -0
- package/nitrogen/generated/shared/c++/NitroRequestPurchaseAndroid.hpp +95 -0
- package/nitrogen/generated/shared/c++/NitroRequestPurchaseIos.hpp +85 -0
- package/nitrogen/generated/shared/c++/NitroSubscriptionOffer.hpp +71 -0
- package/nitrogen/generated/shared/c++/NitroSubscriptionRenewalInfo.hpp +88 -0
- package/nitrogen/generated/shared/c++/NitroSubscriptionStatus.hpp +78 -0
- package/package.json +144 -104
- package/plugin/build/src/withIAP.d.ts +3 -0
- package/plugin/build/src/withIAP.js +81 -0
- package/plugin/build/tsconfig.tsbuildinfo +1 -0
- package/plugin/build/withIAP.d.ts +2 -7
- package/plugin/build/withIAP.js +62 -51
- package/plugin/src/withIAP.ts +119 -0
- package/plugin/tsconfig.json +18 -0
- package/plugin/tsconfig.tsbuildinfo +1 -0
- package/src/helpers/subscription.ts +65 -0
- package/src/hooks/useIAP.ts +361 -222
- package/src/index.ts +1194 -9
- package/src/specs/RnIap.nitro.ts +501 -0
- package/src/types.ts +680 -0
- package/src/utils/error.ts +97 -0
- package/src/utils/type-bridge.ts +209 -0
- package/LICENSE +0 -21
- package/RNIap.podspec +0 -36
- package/android/src/amazon/AndroidManifest.xml +0 -14
- package/android/src/amazon/java/com/dooboolab/rniap/EventSender.kt +0 -10
- package/android/src/amazon/java/com/dooboolab/rniap/PurchasingServiceProxy.kt +0 -29
- package/android/src/amazon/java/com/dooboolab/rniap/PurchasingServiceProxyAmazonImpl.kt +0 -31
- package/android/src/amazon/java/com/dooboolab/rniap/RNIapActivityListener.kt +0 -55
- package/android/src/amazon/java/com/dooboolab/rniap/RNIapAmazonListener.kt +0 -325
- package/android/src/amazon/java/com/dooboolab/rniap/RNIapAmazonModule.kt +0 -244
- package/android/src/amazon/java/com/dooboolab/rniap/RNIapPackage.kt +0 -17
- package/android/src/amazon/java/com/dooboolab/rniap/modifysubscription/RNIapAmazonModifySubscriptionListener.kt +0 -88
- package/android/src/amazon/java/com/dooboolab/rniap/utils/Extensions.kt +0 -22
- package/android/src/main/java/com/dooboolab/rniap/PromiseUtils.kt +0 -62
- package/android/src/main/java/com/dooboolab/rniap/PromiseUtlis.kt +0 -43
- package/android/src/play/java/com/dooboolab/rniap/PlayUtils.kt +0 -114
- package/android/src/play/java/com/dooboolab/rniap/RNIapActivityListener.kt +0 -15
- package/android/src/play/java/com/dooboolab/rniap/RNIapModule.kt +0 -911
- package/android/src/play/java/com/dooboolab/rniap/RNIapPackage.kt +0 -17
- package/android/src/testAmazon/java/com/dooboolab/rniap/RNIapAmazonModuleTest.kt +0 -170
- package/app.plugin.js +0 -1
- package/ios/IapSerializationUtils.swift +0 -290
- package/ios/IapTypes.swift +0 -56
- package/ios/IapUtils.swift +0 -40
- package/ios/LatestPromiseKeeper.swift +0 -52
- package/ios/RNIapIos-Bridging-Header.h +0 -2
- package/ios/RNIapIos.m +0 -69
- package/ios/RNIapIos.swift +0 -868
- package/ios/RNIapIos.xcodeproj/project.pbxproj +0 -289
- package/ios/RNIapIosSk2.m +0 -126
- package/ios/RNIapIosSk2.swift +0 -1413
- package/ios/ThreadSafe.swift +0 -18
- package/lib/commonjs/eventEmitter.js +0 -195
- package/lib/commonjs/eventEmitter.js.map +0 -1
- package/lib/commonjs/hooks/index.js +0 -17
- package/lib/commonjs/hooks/index.js.map +0 -1
- package/lib/commonjs/hooks/useIAP.js +0 -203
- package/lib/commonjs/hooks/useIAP.js.map +0 -1
- package/lib/commonjs/hooks/withIAPContext.js +0 -95
- package/lib/commonjs/hooks/withIAPContext.js.map +0 -1
- package/lib/commonjs/iap.js +0 -836
- package/lib/commonjs/iap.js.map +0 -1
- package/lib/commonjs/index.js +0 -105
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/internal/enhancedFetch.js +0 -26
- package/lib/commonjs/internal/enhancedFetch.js.map +0 -1
- package/lib/commonjs/internal/fillProductsWithAdditionalData.js +0 -50
- package/lib/commonjs/internal/fillProductsWithAdditionalData.js.map +0 -1
- package/lib/commonjs/internal/index.js +0 -39
- package/lib/commonjs/internal/index.js.map +0 -1
- package/lib/commonjs/internal/platform.js +0 -119
- package/lib/commonjs/internal/platform.js.map +0 -1
- package/lib/commonjs/modules/amazon.js +0 -50
- package/lib/commonjs/modules/amazon.js.map +0 -1
- package/lib/commonjs/modules/android.js +0 -92
- package/lib/commonjs/modules/android.js.map +0 -1
- package/lib/commonjs/modules/common.js +0 -2
- package/lib/commonjs/modules/index.js +0 -50
- package/lib/commonjs/modules/index.js.map +0 -1
- package/lib/commonjs/modules/ios.js +0 -160
- package/lib/commonjs/modules/ios.js.map +0 -1
- package/lib/commonjs/modules/iosSk2.js +0 -113
- package/lib/commonjs/modules/iosSk2.js.map +0 -1
- package/lib/commonjs/purchaseError.js +0 -170
- package/lib/commonjs/purchaseError.js.map +0 -1
- package/lib/commonjs/types/amazon.js +0 -2
- package/lib/commonjs/types/amazon.js.map +0 -1
- package/lib/commonjs/types/android.js +0 -67
- package/lib/commonjs/types/android.js.map +0 -1
- package/lib/commonjs/types/apple.js +0 -24
- package/lib/commonjs/types/apple.js.map +0 -1
- package/lib/commonjs/types/appleSk2.js +0 -137
- package/lib/commonjs/types/appleSk2.js.map +0 -1
- package/lib/commonjs/types/index.js +0 -67
- package/lib/commonjs/types/index.js.map +0 -1
- package/lib/commonjs/utils/errorMapping.js +0 -83
- package/lib/commonjs/utils/errorMapping.js.map +0 -1
- package/lib/commonjs/utils/typeGuards.js +0 -74
- package/lib/commonjs/utils/typeGuards.js.map +0 -1
- package/lib/module/eventEmitter.js +0 -185
- package/lib/module/eventEmitter.js.map +0 -1
- package/lib/module/hooks/index.js +0 -2
- package/lib/module/hooks/index.js.map +0 -1
- package/lib/module/hooks/withIAPContext.js +0 -86
- package/lib/module/hooks/withIAPContext.js.map +0 -1
- package/lib/module/iap.js +0 -805
- package/lib/module/iap.js.map +0 -1
- package/lib/module/internal/enhancedFetch.js +0 -19
- package/lib/module/internal/enhancedFetch.js.map +0 -1
- package/lib/module/internal/fillProductsWithAdditionalData.js +0 -43
- package/lib/module/internal/fillProductsWithAdditionalData.js.map +0 -1
- package/lib/module/internal/index.js +0 -4
- package/lib/module/internal/index.js.map +0 -1
- package/lib/module/internal/platform.js +0 -102
- package/lib/module/internal/platform.js.map +0 -1
- package/lib/module/modules/amazon.js +0 -42
- package/lib/module/modules/amazon.js.map +0 -1
- package/lib/module/modules/android.js +0 -81
- package/lib/module/modules/android.js.map +0 -1
- package/lib/module/modules/common.js +0 -2
- package/lib/module/modules/common.js.map +0 -1
- package/lib/module/modules/index.js +0 -5
- package/lib/module/modules/index.js.map +0 -1
- package/lib/module/modules/ios.js +0 -145
- package/lib/module/modules/ios.js.map +0 -1
- package/lib/module/modules/iosSk2.js +0 -96
- package/lib/module/modules/iosSk2.js.map +0 -1
- package/lib/module/purchaseError.js +0 -164
- package/lib/module/purchaseError.js.map +0 -1
- package/lib/module/types/amazon.js +0 -2
- package/lib/module/types/amazon.js.map +0 -1
- package/lib/module/types/android.js +0 -63
- package/lib/module/types/android.js.map +0 -1
- package/lib/module/types/apple.js +0 -17
- package/lib/module/types/apple.js.map +0 -1
- package/lib/module/types/appleSk2.js +0 -129
- package/lib/module/types/appleSk2.js.map +0 -1
- package/lib/module/types/index.js +0 -75
- package/lib/module/types/index.js.map +0 -1
- package/lib/module/utils/errorMapping.js +0 -75
- package/lib/module/utils/errorMapping.js.map +0 -1
- package/lib/module/utils/typeGuards.js +0 -61
- package/lib/module/utils/typeGuards.js.map +0 -1
- package/lib/typescript/src/eventEmitter.d.ts +0 -151
- package/lib/typescript/src/eventEmitter.d.ts.map +0 -1
- package/lib/typescript/src/hooks/index.d.ts +0 -2
- package/lib/typescript/src/hooks/index.d.ts.map +0 -1
- package/lib/typescript/src/hooks/withIAPContext.d.ts +0 -27
- package/lib/typescript/src/hooks/withIAPContext.d.ts.map +0 -1
- package/lib/typescript/src/iap.d.ts +0 -503
- package/lib/typescript/src/iap.d.ts.map +0 -1
- package/lib/typescript/src/internal/enhancedFetch.d.ts +0 -6
- package/lib/typescript/src/internal/enhancedFetch.d.ts.map +0 -1
- package/lib/typescript/src/internal/fillProductsWithAdditionalData.d.ts +0 -7
- package/lib/typescript/src/internal/fillProductsWithAdditionalData.d.ts.map +0 -1
- package/lib/typescript/src/internal/index.d.ts +0 -4
- package/lib/typescript/src/internal/index.d.ts.map +0 -1
- package/lib/typescript/src/internal/platform.d.ts +0 -27
- package/lib/typescript/src/internal/platform.d.ts.map +0 -1
- package/lib/typescript/src/modules/amazon.d.ts +0 -55
- package/lib/typescript/src/modules/amazon.d.ts.map +0 -1
- package/lib/typescript/src/modules/android.d.ts +0 -74
- package/lib/typescript/src/modules/android.d.ts.map +0 -1
- package/lib/typescript/src/modules/common.d.ts +0 -14
- package/lib/typescript/src/modules/common.d.ts.map +0 -1
- package/lib/typescript/src/modules/index.d.ts +0 -5
- package/lib/typescript/src/modules/index.d.ts.map +0 -1
- package/lib/typescript/src/modules/ios.d.ts +0 -117
- package/lib/typescript/src/modules/ios.d.ts.map +0 -1
- package/lib/typescript/src/modules/iosSk2.d.ts +0 -140
- package/lib/typescript/src/modules/iosSk2.d.ts.map +0 -1
- package/lib/typescript/src/purchaseError.d.ts +0 -133
- package/lib/typescript/src/purchaseError.d.ts.map +0 -1
- package/lib/typescript/src/types/amazon.d.ts +0 -33
- package/lib/typescript/src/types/amazon.d.ts.map +0 -1
- package/lib/typescript/src/types/android.d.ts +0 -66
- package/lib/typescript/src/types/android.d.ts.map +0 -1
- package/lib/typescript/src/types/apple.d.ts +0 -27
- package/lib/typescript/src/types/apple.d.ts.map +0 -1
- package/lib/typescript/src/types/appleSk2.d.ts +0 -129
- package/lib/typescript/src/types/appleSk2.d.ts.map +0 -1
- package/lib/typescript/src/types/index.d.ts +0 -302
- package/lib/typescript/src/types/index.d.ts.map +0 -1
- package/lib/typescript/src/utils/errorMapping.d.ts +0 -29
- package/lib/typescript/src/utils/errorMapping.d.ts.map +0 -1
- package/lib/typescript/src/utils/typeGuards.d.ts +0 -53
- package/lib/typescript/src/utils/typeGuards.d.ts.map +0 -1
- package/src/eventEmitter.ts +0 -212
- package/src/hooks/index.ts +0 -1
- package/src/hooks/withIAPContext.tsx +0 -179
- package/src/iap.ts +0 -1046
- package/src/internal/enhancedFetch.ts +0 -25
- package/src/internal/fillProductsWithAdditionalData.ts +0 -47
- package/src/internal/index.ts +0 -3
- package/src/internal/platform.ts +0 -135
- package/src/modules/amazon.ts +0 -94
- package/src/modules/android.ts +0 -179
- package/src/modules/common.ts +0 -16
- package/src/modules/index.ts +0 -4
- package/src/modules/ios.ts +0 -229
- package/src/modules/iosSk2.ts +0 -194
- package/src/purchaseError.ts +0 -196
- package/src/types/amazon.ts +0 -40
- package/src/types/android.ts +0 -89
- package/src/types/apple.ts +0 -44
- package/src/types/appleSk2.ts +0 -275
- package/src/types/index.ts +0 -379
- package/src/utils/errorMapping.ts +0 -88
- package/src/utils/typeGuards.ts +0 -90
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroProduct.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroProduct`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroProduct = margelo.nitro.iap.NitroProduct
|
|
14
|
+
|
|
15
|
+
public extension NitroProduct {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroProduct`.
|
|
20
|
+
*/
|
|
21
|
+
init(id: String, title: String, description: String, type: String, displayName: String?, displayPrice: String?, currency: String?, price: Double?, platform: String, isFamilyShareable: Bool?, jsonRepresentation: String?, subscriptionPeriodUnitIOS: String?, subscriptionPeriodNumberIOS: Double?, introductoryPriceIOS: String?, introductoryPriceAsAmountIOS: Double?, introductoryPricePaymentModeIOS: String?, introductoryPriceNumberOfPeriodsIOS: Double?, introductoryPriceSubscriptionPeriodIOS: String?, originalPrice: String?, originalPriceAmountMicros: Double?, introductoryPriceValue: Double?, introductoryPriceCycles: Double?, introductoryPricePeriod: String?, subscriptionPeriod: String?, freeTrialPeriod: String?, subscriptionOfferDetailsAndroid: String?) {
|
|
22
|
+
self.init(std.string(id), std.string(title), std.string(description), std.string(type), { () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = displayName {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = displayPrice {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
35
|
+
if let __unwrappedValue = currency {
|
|
36
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
41
|
+
if let __unwrappedValue = price {
|
|
42
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), std.string(platform), { () -> bridge.std__optional_bool_ in
|
|
47
|
+
if let __unwrappedValue = isFamilyShareable {
|
|
48
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
53
|
+
if let __unwrappedValue = jsonRepresentation {
|
|
54
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
59
|
+
if let __unwrappedValue = subscriptionPeriodUnitIOS {
|
|
60
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
65
|
+
if let __unwrappedValue = subscriptionPeriodNumberIOS {
|
|
66
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
67
|
+
} else {
|
|
68
|
+
return .init()
|
|
69
|
+
}
|
|
70
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
71
|
+
if let __unwrappedValue = introductoryPriceIOS {
|
|
72
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
73
|
+
} else {
|
|
74
|
+
return .init()
|
|
75
|
+
}
|
|
76
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
77
|
+
if let __unwrappedValue = introductoryPriceAsAmountIOS {
|
|
78
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
79
|
+
} else {
|
|
80
|
+
return .init()
|
|
81
|
+
}
|
|
82
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
83
|
+
if let __unwrappedValue = introductoryPricePaymentModeIOS {
|
|
84
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
85
|
+
} else {
|
|
86
|
+
return .init()
|
|
87
|
+
}
|
|
88
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
89
|
+
if let __unwrappedValue = introductoryPriceNumberOfPeriodsIOS {
|
|
90
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
91
|
+
} else {
|
|
92
|
+
return .init()
|
|
93
|
+
}
|
|
94
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
95
|
+
if let __unwrappedValue = introductoryPriceSubscriptionPeriodIOS {
|
|
96
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
97
|
+
} else {
|
|
98
|
+
return .init()
|
|
99
|
+
}
|
|
100
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
101
|
+
if let __unwrappedValue = originalPrice {
|
|
102
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
103
|
+
} else {
|
|
104
|
+
return .init()
|
|
105
|
+
}
|
|
106
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
107
|
+
if let __unwrappedValue = originalPriceAmountMicros {
|
|
108
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
109
|
+
} else {
|
|
110
|
+
return .init()
|
|
111
|
+
}
|
|
112
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
113
|
+
if let __unwrappedValue = introductoryPriceValue {
|
|
114
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
115
|
+
} else {
|
|
116
|
+
return .init()
|
|
117
|
+
}
|
|
118
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
119
|
+
if let __unwrappedValue = introductoryPriceCycles {
|
|
120
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
121
|
+
} else {
|
|
122
|
+
return .init()
|
|
123
|
+
}
|
|
124
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
125
|
+
if let __unwrappedValue = introductoryPricePeriod {
|
|
126
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
127
|
+
} else {
|
|
128
|
+
return .init()
|
|
129
|
+
}
|
|
130
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
131
|
+
if let __unwrappedValue = subscriptionPeriod {
|
|
132
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
133
|
+
} else {
|
|
134
|
+
return .init()
|
|
135
|
+
}
|
|
136
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
137
|
+
if let __unwrappedValue = freeTrialPeriod {
|
|
138
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
139
|
+
} else {
|
|
140
|
+
return .init()
|
|
141
|
+
}
|
|
142
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
143
|
+
if let __unwrappedValue = subscriptionOfferDetailsAndroid {
|
|
144
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
145
|
+
} else {
|
|
146
|
+
return .init()
|
|
147
|
+
}
|
|
148
|
+
}())
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
var id: String {
|
|
152
|
+
@inline(__always)
|
|
153
|
+
get {
|
|
154
|
+
return String(self.__id)
|
|
155
|
+
}
|
|
156
|
+
@inline(__always)
|
|
157
|
+
set {
|
|
158
|
+
self.__id = std.string(newValue)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
var title: String {
|
|
163
|
+
@inline(__always)
|
|
164
|
+
get {
|
|
165
|
+
return String(self.__title)
|
|
166
|
+
}
|
|
167
|
+
@inline(__always)
|
|
168
|
+
set {
|
|
169
|
+
self.__title = std.string(newValue)
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
var description: String {
|
|
174
|
+
@inline(__always)
|
|
175
|
+
get {
|
|
176
|
+
return String(self.__description)
|
|
177
|
+
}
|
|
178
|
+
@inline(__always)
|
|
179
|
+
set {
|
|
180
|
+
self.__description = std.string(newValue)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
var type: String {
|
|
185
|
+
@inline(__always)
|
|
186
|
+
get {
|
|
187
|
+
return String(self.__type)
|
|
188
|
+
}
|
|
189
|
+
@inline(__always)
|
|
190
|
+
set {
|
|
191
|
+
self.__type = std.string(newValue)
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
var displayName: String? {
|
|
196
|
+
@inline(__always)
|
|
197
|
+
get {
|
|
198
|
+
return { () -> String? in
|
|
199
|
+
if bridge.has_value_std__optional_std__string_(self.__displayName) {
|
|
200
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__displayName)
|
|
201
|
+
return String(__unwrapped)
|
|
202
|
+
} else {
|
|
203
|
+
return nil
|
|
204
|
+
}
|
|
205
|
+
}()
|
|
206
|
+
}
|
|
207
|
+
@inline(__always)
|
|
208
|
+
set {
|
|
209
|
+
self.__displayName = { () -> bridge.std__optional_std__string_ in
|
|
210
|
+
if let __unwrappedValue = newValue {
|
|
211
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
212
|
+
} else {
|
|
213
|
+
return .init()
|
|
214
|
+
}
|
|
215
|
+
}()
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
var displayPrice: String? {
|
|
220
|
+
@inline(__always)
|
|
221
|
+
get {
|
|
222
|
+
return { () -> String? in
|
|
223
|
+
if bridge.has_value_std__optional_std__string_(self.__displayPrice) {
|
|
224
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__displayPrice)
|
|
225
|
+
return String(__unwrapped)
|
|
226
|
+
} else {
|
|
227
|
+
return nil
|
|
228
|
+
}
|
|
229
|
+
}()
|
|
230
|
+
}
|
|
231
|
+
@inline(__always)
|
|
232
|
+
set {
|
|
233
|
+
self.__displayPrice = { () -> bridge.std__optional_std__string_ in
|
|
234
|
+
if let __unwrappedValue = newValue {
|
|
235
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
236
|
+
} else {
|
|
237
|
+
return .init()
|
|
238
|
+
}
|
|
239
|
+
}()
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
var currency: String? {
|
|
244
|
+
@inline(__always)
|
|
245
|
+
get {
|
|
246
|
+
return { () -> String? in
|
|
247
|
+
if bridge.has_value_std__optional_std__string_(self.__currency) {
|
|
248
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__currency)
|
|
249
|
+
return String(__unwrapped)
|
|
250
|
+
} else {
|
|
251
|
+
return nil
|
|
252
|
+
}
|
|
253
|
+
}()
|
|
254
|
+
}
|
|
255
|
+
@inline(__always)
|
|
256
|
+
set {
|
|
257
|
+
self.__currency = { () -> bridge.std__optional_std__string_ in
|
|
258
|
+
if let __unwrappedValue = newValue {
|
|
259
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
260
|
+
} else {
|
|
261
|
+
return .init()
|
|
262
|
+
}
|
|
263
|
+
}()
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
var price: Double? {
|
|
268
|
+
@inline(__always)
|
|
269
|
+
get {
|
|
270
|
+
return self.__price.value
|
|
271
|
+
}
|
|
272
|
+
@inline(__always)
|
|
273
|
+
set {
|
|
274
|
+
self.__price = { () -> bridge.std__optional_double_ in
|
|
275
|
+
if let __unwrappedValue = newValue {
|
|
276
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
277
|
+
} else {
|
|
278
|
+
return .init()
|
|
279
|
+
}
|
|
280
|
+
}()
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
var platform: String {
|
|
285
|
+
@inline(__always)
|
|
286
|
+
get {
|
|
287
|
+
return String(self.__platform)
|
|
288
|
+
}
|
|
289
|
+
@inline(__always)
|
|
290
|
+
set {
|
|
291
|
+
self.__platform = std.string(newValue)
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
var isFamilyShareable: Bool? {
|
|
296
|
+
@inline(__always)
|
|
297
|
+
get {
|
|
298
|
+
return self.__isFamilyShareable.value
|
|
299
|
+
}
|
|
300
|
+
@inline(__always)
|
|
301
|
+
set {
|
|
302
|
+
self.__isFamilyShareable = { () -> bridge.std__optional_bool_ in
|
|
303
|
+
if let __unwrappedValue = newValue {
|
|
304
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
305
|
+
} else {
|
|
306
|
+
return .init()
|
|
307
|
+
}
|
|
308
|
+
}()
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
var jsonRepresentation: String? {
|
|
313
|
+
@inline(__always)
|
|
314
|
+
get {
|
|
315
|
+
return { () -> String? in
|
|
316
|
+
if bridge.has_value_std__optional_std__string_(self.__jsonRepresentation) {
|
|
317
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__jsonRepresentation)
|
|
318
|
+
return String(__unwrapped)
|
|
319
|
+
} else {
|
|
320
|
+
return nil
|
|
321
|
+
}
|
|
322
|
+
}()
|
|
323
|
+
}
|
|
324
|
+
@inline(__always)
|
|
325
|
+
set {
|
|
326
|
+
self.__jsonRepresentation = { () -> bridge.std__optional_std__string_ in
|
|
327
|
+
if let __unwrappedValue = newValue {
|
|
328
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
329
|
+
} else {
|
|
330
|
+
return .init()
|
|
331
|
+
}
|
|
332
|
+
}()
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
var subscriptionPeriodUnitIOS: String? {
|
|
337
|
+
@inline(__always)
|
|
338
|
+
get {
|
|
339
|
+
return { () -> String? in
|
|
340
|
+
if bridge.has_value_std__optional_std__string_(self.__subscriptionPeriodUnitIOS) {
|
|
341
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__subscriptionPeriodUnitIOS)
|
|
342
|
+
return String(__unwrapped)
|
|
343
|
+
} else {
|
|
344
|
+
return nil
|
|
345
|
+
}
|
|
346
|
+
}()
|
|
347
|
+
}
|
|
348
|
+
@inline(__always)
|
|
349
|
+
set {
|
|
350
|
+
self.__subscriptionPeriodUnitIOS = { () -> bridge.std__optional_std__string_ in
|
|
351
|
+
if let __unwrappedValue = newValue {
|
|
352
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
353
|
+
} else {
|
|
354
|
+
return .init()
|
|
355
|
+
}
|
|
356
|
+
}()
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
var subscriptionPeriodNumberIOS: Double? {
|
|
361
|
+
@inline(__always)
|
|
362
|
+
get {
|
|
363
|
+
return self.__subscriptionPeriodNumberIOS.value
|
|
364
|
+
}
|
|
365
|
+
@inline(__always)
|
|
366
|
+
set {
|
|
367
|
+
self.__subscriptionPeriodNumberIOS = { () -> bridge.std__optional_double_ in
|
|
368
|
+
if let __unwrappedValue = newValue {
|
|
369
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
370
|
+
} else {
|
|
371
|
+
return .init()
|
|
372
|
+
}
|
|
373
|
+
}()
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
var introductoryPriceIOS: String? {
|
|
378
|
+
@inline(__always)
|
|
379
|
+
get {
|
|
380
|
+
return { () -> String? in
|
|
381
|
+
if bridge.has_value_std__optional_std__string_(self.__introductoryPriceIOS) {
|
|
382
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__introductoryPriceIOS)
|
|
383
|
+
return String(__unwrapped)
|
|
384
|
+
} else {
|
|
385
|
+
return nil
|
|
386
|
+
}
|
|
387
|
+
}()
|
|
388
|
+
}
|
|
389
|
+
@inline(__always)
|
|
390
|
+
set {
|
|
391
|
+
self.__introductoryPriceIOS = { () -> bridge.std__optional_std__string_ in
|
|
392
|
+
if let __unwrappedValue = newValue {
|
|
393
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
394
|
+
} else {
|
|
395
|
+
return .init()
|
|
396
|
+
}
|
|
397
|
+
}()
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
var introductoryPriceAsAmountIOS: Double? {
|
|
402
|
+
@inline(__always)
|
|
403
|
+
get {
|
|
404
|
+
return self.__introductoryPriceAsAmountIOS.value
|
|
405
|
+
}
|
|
406
|
+
@inline(__always)
|
|
407
|
+
set {
|
|
408
|
+
self.__introductoryPriceAsAmountIOS = { () -> bridge.std__optional_double_ in
|
|
409
|
+
if let __unwrappedValue = newValue {
|
|
410
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
411
|
+
} else {
|
|
412
|
+
return .init()
|
|
413
|
+
}
|
|
414
|
+
}()
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
var introductoryPricePaymentModeIOS: String? {
|
|
419
|
+
@inline(__always)
|
|
420
|
+
get {
|
|
421
|
+
return { () -> String? in
|
|
422
|
+
if bridge.has_value_std__optional_std__string_(self.__introductoryPricePaymentModeIOS) {
|
|
423
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__introductoryPricePaymentModeIOS)
|
|
424
|
+
return String(__unwrapped)
|
|
425
|
+
} else {
|
|
426
|
+
return nil
|
|
427
|
+
}
|
|
428
|
+
}()
|
|
429
|
+
}
|
|
430
|
+
@inline(__always)
|
|
431
|
+
set {
|
|
432
|
+
self.__introductoryPricePaymentModeIOS = { () -> bridge.std__optional_std__string_ in
|
|
433
|
+
if let __unwrappedValue = newValue {
|
|
434
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
435
|
+
} else {
|
|
436
|
+
return .init()
|
|
437
|
+
}
|
|
438
|
+
}()
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
var introductoryPriceNumberOfPeriodsIOS: Double? {
|
|
443
|
+
@inline(__always)
|
|
444
|
+
get {
|
|
445
|
+
return self.__introductoryPriceNumberOfPeriodsIOS.value
|
|
446
|
+
}
|
|
447
|
+
@inline(__always)
|
|
448
|
+
set {
|
|
449
|
+
self.__introductoryPriceNumberOfPeriodsIOS = { () -> bridge.std__optional_double_ in
|
|
450
|
+
if let __unwrappedValue = newValue {
|
|
451
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
452
|
+
} else {
|
|
453
|
+
return .init()
|
|
454
|
+
}
|
|
455
|
+
}()
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
var introductoryPriceSubscriptionPeriodIOS: String? {
|
|
460
|
+
@inline(__always)
|
|
461
|
+
get {
|
|
462
|
+
return { () -> String? in
|
|
463
|
+
if bridge.has_value_std__optional_std__string_(self.__introductoryPriceSubscriptionPeriodIOS) {
|
|
464
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__introductoryPriceSubscriptionPeriodIOS)
|
|
465
|
+
return String(__unwrapped)
|
|
466
|
+
} else {
|
|
467
|
+
return nil
|
|
468
|
+
}
|
|
469
|
+
}()
|
|
470
|
+
}
|
|
471
|
+
@inline(__always)
|
|
472
|
+
set {
|
|
473
|
+
self.__introductoryPriceSubscriptionPeriodIOS = { () -> bridge.std__optional_std__string_ in
|
|
474
|
+
if let __unwrappedValue = newValue {
|
|
475
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
476
|
+
} else {
|
|
477
|
+
return .init()
|
|
478
|
+
}
|
|
479
|
+
}()
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
var originalPrice: String? {
|
|
484
|
+
@inline(__always)
|
|
485
|
+
get {
|
|
486
|
+
return { () -> String? in
|
|
487
|
+
if bridge.has_value_std__optional_std__string_(self.__originalPrice) {
|
|
488
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__originalPrice)
|
|
489
|
+
return String(__unwrapped)
|
|
490
|
+
} else {
|
|
491
|
+
return nil
|
|
492
|
+
}
|
|
493
|
+
}()
|
|
494
|
+
}
|
|
495
|
+
@inline(__always)
|
|
496
|
+
set {
|
|
497
|
+
self.__originalPrice = { () -> bridge.std__optional_std__string_ in
|
|
498
|
+
if let __unwrappedValue = newValue {
|
|
499
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
500
|
+
} else {
|
|
501
|
+
return .init()
|
|
502
|
+
}
|
|
503
|
+
}()
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
var originalPriceAmountMicros: Double? {
|
|
508
|
+
@inline(__always)
|
|
509
|
+
get {
|
|
510
|
+
return self.__originalPriceAmountMicros.value
|
|
511
|
+
}
|
|
512
|
+
@inline(__always)
|
|
513
|
+
set {
|
|
514
|
+
self.__originalPriceAmountMicros = { () -> bridge.std__optional_double_ in
|
|
515
|
+
if let __unwrappedValue = newValue {
|
|
516
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
517
|
+
} else {
|
|
518
|
+
return .init()
|
|
519
|
+
}
|
|
520
|
+
}()
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
var introductoryPriceValue: Double? {
|
|
525
|
+
@inline(__always)
|
|
526
|
+
get {
|
|
527
|
+
return self.__introductoryPriceValue.value
|
|
528
|
+
}
|
|
529
|
+
@inline(__always)
|
|
530
|
+
set {
|
|
531
|
+
self.__introductoryPriceValue = { () -> bridge.std__optional_double_ in
|
|
532
|
+
if let __unwrappedValue = newValue {
|
|
533
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
534
|
+
} else {
|
|
535
|
+
return .init()
|
|
536
|
+
}
|
|
537
|
+
}()
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
var introductoryPriceCycles: Double? {
|
|
542
|
+
@inline(__always)
|
|
543
|
+
get {
|
|
544
|
+
return self.__introductoryPriceCycles.value
|
|
545
|
+
}
|
|
546
|
+
@inline(__always)
|
|
547
|
+
set {
|
|
548
|
+
self.__introductoryPriceCycles = { () -> bridge.std__optional_double_ in
|
|
549
|
+
if let __unwrappedValue = newValue {
|
|
550
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
551
|
+
} else {
|
|
552
|
+
return .init()
|
|
553
|
+
}
|
|
554
|
+
}()
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
var introductoryPricePeriod: String? {
|
|
559
|
+
@inline(__always)
|
|
560
|
+
get {
|
|
561
|
+
return { () -> String? in
|
|
562
|
+
if bridge.has_value_std__optional_std__string_(self.__introductoryPricePeriod) {
|
|
563
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__introductoryPricePeriod)
|
|
564
|
+
return String(__unwrapped)
|
|
565
|
+
} else {
|
|
566
|
+
return nil
|
|
567
|
+
}
|
|
568
|
+
}()
|
|
569
|
+
}
|
|
570
|
+
@inline(__always)
|
|
571
|
+
set {
|
|
572
|
+
self.__introductoryPricePeriod = { () -> bridge.std__optional_std__string_ in
|
|
573
|
+
if let __unwrappedValue = newValue {
|
|
574
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
575
|
+
} else {
|
|
576
|
+
return .init()
|
|
577
|
+
}
|
|
578
|
+
}()
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
var subscriptionPeriod: String? {
|
|
583
|
+
@inline(__always)
|
|
584
|
+
get {
|
|
585
|
+
return { () -> String? in
|
|
586
|
+
if bridge.has_value_std__optional_std__string_(self.__subscriptionPeriod) {
|
|
587
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__subscriptionPeriod)
|
|
588
|
+
return String(__unwrapped)
|
|
589
|
+
} else {
|
|
590
|
+
return nil
|
|
591
|
+
}
|
|
592
|
+
}()
|
|
593
|
+
}
|
|
594
|
+
@inline(__always)
|
|
595
|
+
set {
|
|
596
|
+
self.__subscriptionPeriod = { () -> bridge.std__optional_std__string_ in
|
|
597
|
+
if let __unwrappedValue = newValue {
|
|
598
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
599
|
+
} else {
|
|
600
|
+
return .init()
|
|
601
|
+
}
|
|
602
|
+
}()
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
var freeTrialPeriod: String? {
|
|
607
|
+
@inline(__always)
|
|
608
|
+
get {
|
|
609
|
+
return { () -> String? in
|
|
610
|
+
if bridge.has_value_std__optional_std__string_(self.__freeTrialPeriod) {
|
|
611
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__freeTrialPeriod)
|
|
612
|
+
return String(__unwrapped)
|
|
613
|
+
} else {
|
|
614
|
+
return nil
|
|
615
|
+
}
|
|
616
|
+
}()
|
|
617
|
+
}
|
|
618
|
+
@inline(__always)
|
|
619
|
+
set {
|
|
620
|
+
self.__freeTrialPeriod = { () -> bridge.std__optional_std__string_ in
|
|
621
|
+
if let __unwrappedValue = newValue {
|
|
622
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
623
|
+
} else {
|
|
624
|
+
return .init()
|
|
625
|
+
}
|
|
626
|
+
}()
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
var subscriptionOfferDetailsAndroid: String? {
|
|
631
|
+
@inline(__always)
|
|
632
|
+
get {
|
|
633
|
+
return { () -> String? in
|
|
634
|
+
if bridge.has_value_std__optional_std__string_(self.__subscriptionOfferDetailsAndroid) {
|
|
635
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__subscriptionOfferDetailsAndroid)
|
|
636
|
+
return String(__unwrapped)
|
|
637
|
+
} else {
|
|
638
|
+
return nil
|
|
639
|
+
}
|
|
640
|
+
}()
|
|
641
|
+
}
|
|
642
|
+
@inline(__always)
|
|
643
|
+
set {
|
|
644
|
+
self.__subscriptionOfferDetailsAndroid = { () -> bridge.std__optional_std__string_ in
|
|
645
|
+
if let __unwrappedValue = newValue {
|
|
646
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
647
|
+
} else {
|
|
648
|
+
return .init()
|
|
649
|
+
}
|
|
650
|
+
}()
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|