react-native-iap 15.6.1 → 16.0.0
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 +34 -182
- package/android/src/main/java/com/margelo/nitro/iap/ProductSerialization.kt +0 -69
- package/android/src/main/java/com/margelo/nitro/iap/RnIapLog.kt +0 -13
- package/ios/HybridRnIap.swift +30 -95
- package/ios/RnIapHelper.swift +37 -48
- package/ios/RnIapLog.swift +0 -11
- package/lib/module/hooks/useIAP.js +1 -11
- package/lib/module/hooks/useIAP.js.map +1 -1
- package/lib/module/index.js +45 -379
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.kepler.js +7 -82
- package/lib/module/index.kepler.js.map +1 -1
- package/lib/module/types.js +5 -57
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/errorMapping.js +13 -21
- package/lib/module/utils/errorMapping.js.map +1 -1
- package/lib/module/utils/type-bridge.js +39 -77
- package/lib/module/utils/type-bridge.js.map +1 -1
- package/lib/module/utils.js +5 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/module/vega-adapter.js +10 -48
- package/lib/module/vega-adapter.js.map +1 -1
- package/lib/typescript/src/hooks/useIAP.d.ts +1 -49
- package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -175
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.kepler.d.ts +2 -54
- package/lib/typescript/src/index.kepler.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +32 -173
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +76 -284
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/errorMapping.d.ts.map +1 -1
- package/lib/typescript/src/utils/type-bridge.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts.map +1 -1
- package/lib/typescript/src/vega-adapter.d.ts.map +1 -1
- package/nitrogen/generated/android/NitroIap+autolinking.cmake +5 -12
- package/nitrogen/generated/android/c++/JFunc_void_NitroProduct.hpp +0 -22
- package/nitrogen/generated/android/c++/JFunc_void_NitroPurchase.hpp +0 -2
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +38 -189
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +2 -9
- package/nitrogen/generated/android/c++/JInitConnectionConfig.hpp +1 -7
- package/nitrogen/generated/android/c++/JNitroActiveSubscription.hpp +1 -5
- package/nitrogen/generated/android/c++/JNitroAvailablePurchasesAndroidType.hpp +3 -3
- package/nitrogen/generated/android/c++/JNitroProduct.hpp +5 -39
- package/nitrogen/generated/android/c++/JNitroPurchase.hpp +25 -7
- package/nitrogen/generated/android/c++/JNitroPurchaseRequest.hpp +1 -9
- package/nitrogen/generated/android/c++/{JNitroReceiptValidationAppleOptions.hpp → JNitroPurchaseVerificationAppleOptions.hpp} +10 -10
- package/nitrogen/generated/android/c++/{JNitroReceiptValidationGoogleOptions.hpp → JNitroPurchaseVerificationGoogleOptions.hpp} +10 -10
- package/nitrogen/generated/android/c++/{JNitroReceiptValidationHorizonOptions.hpp → JNitroPurchaseVerificationHorizonOptions.hpp} +10 -10
- package/nitrogen/generated/android/c++/JNitroPurchaseVerificationParams.hpp +79 -0
- package/nitrogen/generated/android/c++/{JNitroReceiptValidationResultAndroid.hpp → JNitroPurchaseVerificationResultAndroid.hpp} +10 -10
- package/nitrogen/generated/android/c++/{JNitroReceiptValidationResultIOS.hpp → JNitroPurchaseVerificationResultIOS.hpp} +10 -12
- package/nitrogen/generated/android/c++/JNitroRenewalInfoIOS.hpp +19 -3
- package/nitrogen/generated/android/c++/JNitroRequestPurchaseAndroid.hpp +1 -6
- package/nitrogen/generated/android/c++/JProductType.hpp +3 -3
- package/nitrogen/generated/android/c++/JPurchase.hpp +0 -2
- package/nitrogen/generated/android/c++/JPurchaseAndroid.hpp +1 -7
- package/nitrogen/generated/android/c++/JPurchaseIOS.hpp +25 -7
- package/nitrogen/generated/android/c++/JPurchaseVerificationProvider.hpp +3 -3
- package/nitrogen/generated/android/c++/JRenewalInfoIOS.hpp +19 -3
- package/nitrogen/generated/android/c++/JRequestPurchaseResult.hpp +0 -2
- package/nitrogen/generated/android/c++/JVariant_NitroPurchaseVerificationResultIOS_NitroPurchaseVerificationResultAndroid.cpp +26 -0
- package/nitrogen/generated/android/c++/{JVariant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.hpp → JVariant_NitroPurchaseVerificationResultIOS_NitroPurchaseVerificationResultAndroid.hpp} +26 -28
- package/nitrogen/generated/android/c++/JVariant_NullType_InitConnectionConfig.hpp +1 -3
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroProduct.hpp +0 -22
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPurchase.hpp +0 -2
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPurchaseVerificationAppleOptions.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPurchaseVerificationAppleOptions.hpp +72 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPurchaseVerificationGoogleOptions.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPurchaseVerificationGoogleOptions.hpp +74 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPurchaseVerificationHorizonOptions.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPurchaseVerificationHorizonOptions.hpp +72 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroRequestPurchaseAndroid.hpp +0 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +2 -30
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/InitConnectionConfig.kt +3 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroActiveSubscription.kt +2 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAvailablePurchasesAndroidType.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroProduct.kt +5 -20
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchase.kt +32 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchaseRequest.kt +3 -13
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{NitroReceiptValidationAppleOptions.kt → NitroPurchaseVerificationAppleOptions.kt} +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{NitroReceiptValidationGoogleOptions.kt → NitroPurchaseVerificationGoogleOptions.kt} +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{NitroReceiptValidationHorizonOptions.kt → NitroPurchaseVerificationHorizonOptions.kt} +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{NitroReceiptValidationParams.kt → NitroPurchaseVerificationParams.kt} +9 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{NitroReceiptValidationResultAndroid.kt → NitroPurchaseVerificationResultAndroid.kt} +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{NitroReceiptValidationResultIOS.kt → NitroPurchaseVerificationResultIOS.kt} +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRenewalInfoIOS.kt +24 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRequestPurchaseAndroid.kt +2 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ProductType.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseAndroid.kt +2 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseIOS.kt +30 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseVerificationProvider.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/RenewalInfoIOS.kt +24 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NitroPurchaseVerificationResultIOS_NitroPurchaseVerificationResultAndroid.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{Variant_NullType_NitroReceiptValidationGoogleOptions.kt → Variant_NullType_NitroPurchaseVerificationAppleOptions.kt} +9 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{Variant_NullType_Array_NitroOneTimePurchaseOfferDetail_.kt → Variant_NullType_NitroPurchaseVerificationGoogleOptions.kt} +9 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{Variant_NullType_NitroReceiptValidationAppleOptions.kt → Variant_NullType_NitroPurchaseVerificationHorizonOptions.kt} +9 -9
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +16 -16
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +212 -570
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +18 -42
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +21 -101
- package/nitrogen/generated/ios/swift/Func_void_std__variant_NitroPurchaseVerificationResultIOS__NitroPurchaseVerificationResultAndroid_.swift +58 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +2 -9
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +22 -181
- package/nitrogen/generated/ios/swift/InitConnectionConfig.swift +2 -13
- package/nitrogen/generated/ios/swift/NitroActiveSubscription.swift +1 -38
- package/nitrogen/generated/ios/swift/NitroAvailablePurchasesAndroidType.swift +4 -4
- package/nitrogen/generated/ios/swift/NitroProduct.swift +5 -122
- package/nitrogen/generated/ios/swift/NitroPurchase.swift +224 -7
- package/nitrogen/generated/ios/swift/NitroPurchaseRequest.swift +1 -75
- package/nitrogen/generated/ios/swift/{NitroReceiptValidationAppleOptions.swift → NitroPurchaseVerificationAppleOptions.swift} +5 -5
- package/nitrogen/generated/ios/swift/{NitroReceiptValidationGoogleOptions.swift → NitroPurchaseVerificationGoogleOptions.swift} +5 -5
- package/nitrogen/generated/ios/swift/{NitroReceiptValidationHorizonOptions.swift → NitroPurchaseVerificationHorizonOptions.swift} +5 -5
- package/nitrogen/generated/ios/swift/{NitroReceiptValidationParams.swift → NitroPurchaseVerificationParams.swift} +36 -36
- package/nitrogen/generated/ios/swift/{NitroReceiptValidationResultAndroid.swift → NitroPurchaseVerificationResultAndroid.swift} +5 -5
- package/nitrogen/generated/ios/swift/{NitroReceiptValidationResultIOS.swift → NitroPurchaseVerificationResultIOS.swift} +5 -5
- package/nitrogen/generated/ios/swift/NitroRenewalInfoIOS.swift +149 -1
- package/nitrogen/generated/ios/swift/NitroRequestPurchaseAndroid.swift +1 -38
- package/nitrogen/generated/ios/swift/ProductType.swift +4 -4
- package/nitrogen/generated/ios/swift/PurchaseAndroid.swift +2 -7
- package/nitrogen/generated/ios/swift/PurchaseIOS.swift +221 -4
- package/nitrogen/generated/ios/swift/PurchaseVerificationProvider.swift +4 -4
- package/nitrogen/generated/ios/swift/RenewalInfoIOS.swift +150 -2
- package/nitrogen/generated/ios/swift/{Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.swift → Variant_NitroPurchaseVerificationResultIOS_NitroPurchaseVerificationResultAndroid.swift} +5 -5
- package/nitrogen/generated/ios/swift/{Variant_NullType_NitroLimitedQuantityInfoAndroid.swift → Variant_NullType_NitroPurchaseVerificationAppleOptions.swift} +4 -4
- package/nitrogen/generated/ios/swift/{Variant_NullType_NitroReceiptValidationAppleOptions.swift → Variant_NullType_NitroPurchaseVerificationGoogleOptions.swift} +4 -4
- package/nitrogen/generated/ios/swift/{Variant_NullType_NitroPreorderDetailsAndroid.swift → Variant_NullType_NitroPurchaseVerificationHorizonOptions.swift} +4 -4
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.cpp +1 -8
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +11 -18
- package/nitrogen/generated/shared/c++/InitConnectionConfig.hpp +2 -9
- package/nitrogen/generated/shared/c++/NitroActiveSubscription.hpp +1 -5
- package/nitrogen/generated/shared/c++/NitroAvailablePurchasesAndroidType.hpp +4 -4
- package/nitrogen/generated/shared/c++/NitroProduct.hpp +6 -22
- package/nitrogen/generated/shared/c++/NitroPurchase.hpp +25 -8
- package/nitrogen/generated/shared/c++/NitroPurchaseRequest.hpp +2 -10
- package/nitrogen/generated/shared/c++/{NitroReceiptValidationAppleOptions.hpp → NitroPurchaseVerificationAppleOptions.hpp} +11 -11
- package/nitrogen/generated/shared/c++/{NitroReceiptValidationGoogleOptions.hpp → NitroPurchaseVerificationGoogleOptions.hpp} +11 -11
- package/nitrogen/generated/shared/c++/{NitroReceiptValidationHorizonOptions.hpp → NitroPurchaseVerificationHorizonOptions.hpp} +11 -11
- package/nitrogen/generated/shared/c++/NitroPurchaseVerificationParams.hpp +101 -0
- package/nitrogen/generated/shared/c++/{NitroReceiptValidationResultAndroid.hpp → NitroPurchaseVerificationResultAndroid.hpp} +11 -11
- package/nitrogen/generated/shared/c++/{NitroReceiptValidationResultIOS.hpp → NitroPurchaseVerificationResultIOS.hpp} +11 -11
- package/nitrogen/generated/shared/c++/NitroRenewalInfoIOS.hpp +18 -2
- package/nitrogen/generated/shared/c++/NitroRequestPurchaseAndroid.hpp +1 -5
- package/nitrogen/generated/shared/c++/ProductType.hpp +5 -5
- package/nitrogen/generated/shared/c++/PurchaseAndroid.hpp +1 -8
- package/nitrogen/generated/shared/c++/PurchaseIOS.hpp +25 -8
- package/nitrogen/generated/shared/c++/PurchaseVerificationProvider.hpp +5 -5
- package/nitrogen/generated/shared/c++/RenewalInfoIOS.hpp +18 -2
- package/openiap-versions.json +3 -3
- package/package.json +1 -1
- package/src/hooks/useIAP.ts +0 -76
- package/src/index.kepler.ts +11 -96
- package/src/index.ts +60 -457
- package/src/specs/RnIap.nitro.ts +35 -196
- package/src/types.ts +77 -295
- package/src/utils/errorMapping.ts +21 -20
- package/src/utils/type-bridge.ts +53 -90
- package/src/utils.ts +8 -0
- package/src/vega-adapter.ts +11 -59
- package/lib/module/utils/deprecation.js +0 -15
- package/lib/module/utils/deprecation.js.map +0 -1
- package/lib/module/utils/platform-request.js +0 -28
- package/lib/module/utils/platform-request.js.map +0 -1
- package/lib/typescript/src/utils/deprecation.d.ts +0 -3
- package/lib/typescript/src/utils/deprecation.d.ts.map +0 -1
- package/lib/typescript/src/utils/platform-request.d.ts +0 -12
- package/lib/typescript/src/utils/platform-request.d.ts.map +0 -1
- package/nitrogen/generated/android/c++/JAlternativeBillingModeAndroid.hpp +0 -61
- package/nitrogen/generated/android/c++/JNitroDiscountAmountAndroid.hpp +0 -61
- package/nitrogen/generated/android/c++/JNitroDiscountDisplayInfoAndroid.hpp +0 -69
- package/nitrogen/generated/android/c++/JNitroLimitedQuantityInfoAndroid.hpp +0 -61
- package/nitrogen/generated/android/c++/JNitroOneTimePurchaseOfferDetail.hpp +0 -148
- package/nitrogen/generated/android/c++/JNitroPreorderDetailsAndroid.hpp +0 -61
- package/nitrogen/generated/android/c++/JNitroReceiptValidationParams.hpp +0 -79
- package/nitrogen/generated/android/c++/JNitroRentalDetailsAndroid.hpp +0 -66
- package/nitrogen/generated/android/c++/JNitroValidTimeWindowAndroid.hpp +0 -61
- package/nitrogen/generated/android/c++/JVariant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_Array_NitroOneTimePurchaseOfferDetail_.cpp +0 -35
- package/nitrogen/generated/android/c++/JVariant_NullType_Array_NitroOneTimePurchaseOfferDetail_.hpp +0 -103
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroDiscountAmountAndroid.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroDiscountAmountAndroid.hpp +0 -72
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroDiscountDisplayInfoAndroid.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroDiscountDisplayInfoAndroid.hpp +0 -77
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroLimitedQuantityInfoAndroid.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroLimitedQuantityInfoAndroid.hpp +0 -71
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPreorderDetailsAndroid.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroPreorderDetailsAndroid.hpp +0 -72
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroReceiptValidationAppleOptions.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroReceiptValidationAppleOptions.hpp +0 -72
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroReceiptValidationGoogleOptions.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroReceiptValidationGoogleOptions.hpp +0 -74
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroReceiptValidationHorizonOptions.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroReceiptValidationHorizonOptions.hpp +0 -72
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroRentalDetailsAndroid.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroRentalDetailsAndroid.hpp +0 -74
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroValidTimeWindowAndroid.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NitroValidTimeWindowAndroid.hpp +0 -72
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/AlternativeBillingModeAndroid.kt +0 -24
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroDiscountAmountAndroid.kt +0 -56
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroDiscountDisplayInfoAndroid.kt +0 -56
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroLimitedQuantityInfoAndroid.kt +0 -56
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroOneTimePurchaseOfferDetail.kt +0 -111
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPreorderDetailsAndroid.kt +0 -56
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRentalDetailsAndroid.kt +0 -56
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroValidTimeWindowAndroid.kt +0 -56
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.kt +0 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_NitroDiscountAmountAndroid.kt +0 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_NitroDiscountDisplayInfoAndroid.kt +0 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_NitroLimitedQuantityInfoAndroid.kt +0 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_NitroPreorderDetailsAndroid.kt +0 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_NitroReceiptValidationHorizonOptions.kt +0 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_NitroRentalDetailsAndroid.kt +0 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NullType_NitroValidTimeWindowAndroid.kt +0 -62
- package/nitrogen/generated/ios/swift/AlternativeBillingModeAndroid.swift +0 -44
- package/nitrogen/generated/ios/swift/Func_void_std__variant_NitroReceiptValidationResultIOS__NitroReceiptValidationResultAndroid_.swift +0 -58
- package/nitrogen/generated/ios/swift/NitroDiscountAmountAndroid.swift +0 -34
- package/nitrogen/generated/ios/swift/NitroDiscountDisplayInfoAndroid.swift +0 -98
- package/nitrogen/generated/ios/swift/NitroLimitedQuantityInfoAndroid.swift +0 -34
- package/nitrogen/generated/ios/swift/NitroOneTimePurchaseOfferDetail.swift +0 -351
- package/nitrogen/generated/ios/swift/NitroPreorderDetailsAndroid.swift +0 -34
- package/nitrogen/generated/ios/swift/NitroRentalDetailsAndroid.swift +0 -66
- package/nitrogen/generated/ios/swift/NitroValidTimeWindowAndroid.swift +0 -34
- package/nitrogen/generated/ios/swift/Variant_NullType_NitroDiscountAmountAndroid.swift +0 -30
- package/nitrogen/generated/ios/swift/Variant_NullType_NitroDiscountDisplayInfoAndroid.swift +0 -30
- package/nitrogen/generated/ios/swift/Variant_NullType_NitroReceiptValidationGoogleOptions.swift +0 -30
- package/nitrogen/generated/ios/swift/Variant_NullType_NitroReceiptValidationHorizonOptions.swift +0 -30
- package/nitrogen/generated/ios/swift/Variant_NullType_NitroRentalDetailsAndroid.swift +0 -30
- package/nitrogen/generated/ios/swift/Variant_NullType_NitroValidTimeWindowAndroid.swift +0 -30
- package/nitrogen/generated/ios/swift/Variant_NullType__NitroOneTimePurchaseOfferDetail_.swift +0 -30
- package/nitrogen/generated/shared/c++/AlternativeBillingModeAndroid.hpp +0 -80
- package/nitrogen/generated/shared/c++/NitroDiscountAmountAndroid.hpp +0 -87
- package/nitrogen/generated/shared/c++/NitroDiscountDisplayInfoAndroid.hpp +0 -91
- package/nitrogen/generated/shared/c++/NitroLimitedQuantityInfoAndroid.hpp +0 -87
- package/nitrogen/generated/shared/c++/NitroOneTimePurchaseOfferDetail.hpp +0 -149
- package/nitrogen/generated/shared/c++/NitroPreorderDetailsAndroid.hpp +0 -87
- package/nitrogen/generated/shared/c++/NitroReceiptValidationParams.hpp +0 -101
- package/nitrogen/generated/shared/c++/NitroRentalDetailsAndroid.hpp +0 -90
- package/nitrogen/generated/shared/c++/NitroValidTimeWindowAndroid.hpp +0 -87
- package/src/utils/deprecation.ts +0 -16
- package/src/utils/platform-request.ts +0 -37
package/nitrogen/generated/ios/swift/Variant_NullType__NitroOneTimePurchaseOfferDetail_.swift
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// Variant_NullType__NitroOneTimePurchaseOfferDetail_.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
-
* JS type: `null | array`
|
|
13
|
-
*/
|
|
14
|
-
@frozen
|
|
15
|
-
public indirect enum Variant_NullType__NitroOneTimePurchaseOfferDetail_ {
|
|
16
|
-
case first(NullType)
|
|
17
|
-
case second([NitroOneTimePurchaseOfferDetail])
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public extension Variant_NullType__NitroOneTimePurchaseOfferDetail_ {
|
|
21
|
-
func asType<T>(_ type: T.Type = T.self) -> T? {
|
|
22
|
-
switch self {
|
|
23
|
-
case .first(let value): return value as? T
|
|
24
|
-
case .second(let value): return value as? T
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
func isType<T>(_ type: T.Type = T.self) -> Bool {
|
|
28
|
-
return self.asType(type) != nil
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// AlternativeBillingModeAndroid.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
-
#include <NitroModules/NitroHash.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
namespace margelo::nitro::iap {
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* An enum which can be represented as a JavaScript union (AlternativeBillingModeAndroid).
|
|
30
|
-
*/
|
|
31
|
-
enum class AlternativeBillingModeAndroid {
|
|
32
|
-
NONE SWIFT_NAME(none) = 0,
|
|
33
|
-
USER_CHOICE SWIFT_NAME(userChoice) = 1,
|
|
34
|
-
ALTERNATIVE_ONLY SWIFT_NAME(alternativeOnly) = 2,
|
|
35
|
-
} CLOSED_ENUM;
|
|
36
|
-
|
|
37
|
-
} // namespace margelo::nitro::iap
|
|
38
|
-
|
|
39
|
-
namespace margelo::nitro {
|
|
40
|
-
|
|
41
|
-
// C++ AlternativeBillingModeAndroid <> JS AlternativeBillingModeAndroid (union)
|
|
42
|
-
template <>
|
|
43
|
-
struct JSIConverter<margelo::nitro::iap::AlternativeBillingModeAndroid> final {
|
|
44
|
-
static inline margelo::nitro::iap::AlternativeBillingModeAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
-
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
-
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
-
case hashString("none"): return margelo::nitro::iap::AlternativeBillingModeAndroid::NONE;
|
|
48
|
-
case hashString("user-choice"): return margelo::nitro::iap::AlternativeBillingModeAndroid::USER_CHOICE;
|
|
49
|
-
case hashString("alternative-only"): return margelo::nitro::iap::AlternativeBillingModeAndroid::ALTERNATIVE_ONLY;
|
|
50
|
-
default: [[unlikely]]
|
|
51
|
-
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum AlternativeBillingModeAndroid - invalid value!");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::iap::AlternativeBillingModeAndroid arg) {
|
|
55
|
-
switch (arg) {
|
|
56
|
-
case margelo::nitro::iap::AlternativeBillingModeAndroid::NONE: return JSIConverter<std::string>::toJSI(runtime, "none");
|
|
57
|
-
case margelo::nitro::iap::AlternativeBillingModeAndroid::USER_CHOICE: return JSIConverter<std::string>::toJSI(runtime, "user-choice");
|
|
58
|
-
case margelo::nitro::iap::AlternativeBillingModeAndroid::ALTERNATIVE_ONLY: return JSIConverter<std::string>::toJSI(runtime, "alternative-only");
|
|
59
|
-
default: [[unlikely]]
|
|
60
|
-
throw std::invalid_argument("Cannot convert AlternativeBillingModeAndroid to JS - invalid value: "
|
|
61
|
-
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
-
if (!value.isString()) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
-
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
-
case hashString("none"):
|
|
71
|
-
case hashString("user-choice"):
|
|
72
|
-
case hashString("alternative-only"):
|
|
73
|
-
return true;
|
|
74
|
-
default:
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
} // namespace margelo::nitro
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroDiscountAmountAndroid.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
-
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
-
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
-
#else
|
|
28
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
-
#endif
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#include <string>
|
|
34
|
-
|
|
35
|
-
namespace margelo::nitro::iap {
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* A struct which can be represented as a JavaScript object (NitroDiscountAmountAndroid).
|
|
39
|
-
*/
|
|
40
|
-
struct NitroDiscountAmountAndroid final {
|
|
41
|
-
public:
|
|
42
|
-
std::string discountAmountMicros SWIFT_PRIVATE;
|
|
43
|
-
std::string formattedDiscountAmount SWIFT_PRIVATE;
|
|
44
|
-
|
|
45
|
-
public:
|
|
46
|
-
NitroDiscountAmountAndroid() = default;
|
|
47
|
-
explicit NitroDiscountAmountAndroid(std::string discountAmountMicros, std::string formattedDiscountAmount): discountAmountMicros(discountAmountMicros), formattedDiscountAmount(formattedDiscountAmount) {}
|
|
48
|
-
|
|
49
|
-
public:
|
|
50
|
-
friend bool operator==(const NitroDiscountAmountAndroid& lhs, const NitroDiscountAmountAndroid& rhs) = default;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
} // namespace margelo::nitro::iap
|
|
54
|
-
|
|
55
|
-
namespace margelo::nitro {
|
|
56
|
-
|
|
57
|
-
// C++ NitroDiscountAmountAndroid <> JS NitroDiscountAmountAndroid (object)
|
|
58
|
-
template <>
|
|
59
|
-
struct JSIConverter<margelo::nitro::iap::NitroDiscountAmountAndroid> final {
|
|
60
|
-
static inline margelo::nitro::iap::NitroDiscountAmountAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
62
|
-
return margelo::nitro::iap::NitroDiscountAmountAndroid(
|
|
63
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "discountAmountMicros"))),
|
|
64
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "formattedDiscountAmount")))
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::iap::NitroDiscountAmountAndroid& arg) {
|
|
68
|
-
jsi::Object obj(runtime);
|
|
69
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "discountAmountMicros"), JSIConverter<std::string>::toJSI(runtime, arg.discountAmountMicros));
|
|
70
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "formattedDiscountAmount"), JSIConverter<std::string>::toJSI(runtime, arg.formattedDiscountAmount));
|
|
71
|
-
return obj;
|
|
72
|
-
}
|
|
73
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
74
|
-
if (!value.isObject()) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
jsi::Object obj = value.getObject(runtime);
|
|
78
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "discountAmountMicros")))) return false;
|
|
82
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "formattedDiscountAmount")))) return false;
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
} // namespace margelo::nitro
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroDiscountDisplayInfoAndroid.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
-
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
-
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
-
#else
|
|
28
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
-
#endif
|
|
30
|
-
|
|
31
|
-
// Forward declaration of `NitroDiscountAmountAndroid` to properly resolve imports.
|
|
32
|
-
namespace margelo::nitro::iap { struct NitroDiscountAmountAndroid; }
|
|
33
|
-
|
|
34
|
-
#include <NitroModules/Null.hpp>
|
|
35
|
-
#include "NitroDiscountAmountAndroid.hpp"
|
|
36
|
-
#include <variant>
|
|
37
|
-
#include <optional>
|
|
38
|
-
|
|
39
|
-
namespace margelo::nitro::iap {
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* A struct which can be represented as a JavaScript object (NitroDiscountDisplayInfoAndroid).
|
|
43
|
-
*/
|
|
44
|
-
struct NitroDiscountDisplayInfoAndroid final {
|
|
45
|
-
public:
|
|
46
|
-
std::optional<std::variant<nitro::NullType, NitroDiscountAmountAndroid>> discountAmount SWIFT_PRIVATE;
|
|
47
|
-
std::optional<std::variant<nitro::NullType, double>> percentageDiscount SWIFT_PRIVATE;
|
|
48
|
-
|
|
49
|
-
public:
|
|
50
|
-
NitroDiscountDisplayInfoAndroid() = default;
|
|
51
|
-
explicit NitroDiscountDisplayInfoAndroid(std::optional<std::variant<nitro::NullType, NitroDiscountAmountAndroid>> discountAmount, std::optional<std::variant<nitro::NullType, double>> percentageDiscount): discountAmount(discountAmount), percentageDiscount(percentageDiscount) {}
|
|
52
|
-
|
|
53
|
-
public:
|
|
54
|
-
friend bool operator==(const NitroDiscountDisplayInfoAndroid& lhs, const NitroDiscountDisplayInfoAndroid& rhs) = default;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
} // namespace margelo::nitro::iap
|
|
58
|
-
|
|
59
|
-
namespace margelo::nitro {
|
|
60
|
-
|
|
61
|
-
// C++ NitroDiscountDisplayInfoAndroid <> JS NitroDiscountDisplayInfoAndroid (object)
|
|
62
|
-
template <>
|
|
63
|
-
struct JSIConverter<margelo::nitro::iap::NitroDiscountDisplayInfoAndroid> final {
|
|
64
|
-
static inline margelo::nitro::iap::NitroDiscountDisplayInfoAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
65
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
66
|
-
return margelo::nitro::iap::NitroDiscountDisplayInfoAndroid(
|
|
67
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroDiscountAmountAndroid>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "discountAmount"))),
|
|
68
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "percentageDiscount")))
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::iap::NitroDiscountDisplayInfoAndroid& arg) {
|
|
72
|
-
jsi::Object obj(runtime);
|
|
73
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "discountAmount"), JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroDiscountAmountAndroid>>>::toJSI(runtime, arg.discountAmount));
|
|
74
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "percentageDiscount"), JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::toJSI(runtime, arg.percentageDiscount));
|
|
75
|
-
return obj;
|
|
76
|
-
}
|
|
77
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
78
|
-
if (!value.isObject()) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
jsi::Object obj = value.getObject(runtime);
|
|
82
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroDiscountAmountAndroid>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "discountAmount")))) return false;
|
|
86
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "percentageDiscount")))) return false;
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
} // namespace margelo::nitro
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroLimitedQuantityInfoAndroid.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
-
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
-
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
-
#else
|
|
28
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
-
#endif
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
namespace margelo::nitro::iap {
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* A struct which can be represented as a JavaScript object (NitroLimitedQuantityInfoAndroid).
|
|
39
|
-
*/
|
|
40
|
-
struct NitroLimitedQuantityInfoAndroid final {
|
|
41
|
-
public:
|
|
42
|
-
double maximumQuantity SWIFT_PRIVATE;
|
|
43
|
-
double remainingQuantity SWIFT_PRIVATE;
|
|
44
|
-
|
|
45
|
-
public:
|
|
46
|
-
NitroLimitedQuantityInfoAndroid() = default;
|
|
47
|
-
explicit NitroLimitedQuantityInfoAndroid(double maximumQuantity, double remainingQuantity): maximumQuantity(maximumQuantity), remainingQuantity(remainingQuantity) {}
|
|
48
|
-
|
|
49
|
-
public:
|
|
50
|
-
friend bool operator==(const NitroLimitedQuantityInfoAndroid& lhs, const NitroLimitedQuantityInfoAndroid& rhs) = default;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
} // namespace margelo::nitro::iap
|
|
54
|
-
|
|
55
|
-
namespace margelo::nitro {
|
|
56
|
-
|
|
57
|
-
// C++ NitroLimitedQuantityInfoAndroid <> JS NitroLimitedQuantityInfoAndroid (object)
|
|
58
|
-
template <>
|
|
59
|
-
struct JSIConverter<margelo::nitro::iap::NitroLimitedQuantityInfoAndroid> final {
|
|
60
|
-
static inline margelo::nitro::iap::NitroLimitedQuantityInfoAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
62
|
-
return margelo::nitro::iap::NitroLimitedQuantityInfoAndroid(
|
|
63
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maximumQuantity"))),
|
|
64
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "remainingQuantity")))
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::iap::NitroLimitedQuantityInfoAndroid& arg) {
|
|
68
|
-
jsi::Object obj(runtime);
|
|
69
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maximumQuantity"), JSIConverter<double>::toJSI(runtime, arg.maximumQuantity));
|
|
70
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "remainingQuantity"), JSIConverter<double>::toJSI(runtime, arg.remainingQuantity));
|
|
71
|
-
return obj;
|
|
72
|
-
}
|
|
73
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
74
|
-
if (!value.isObject()) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
jsi::Object obj = value.getObject(runtime);
|
|
78
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maximumQuantity")))) return false;
|
|
82
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "remainingQuantity")))) return false;
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
} // namespace margelo::nitro
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroOneTimePurchaseOfferDetail.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
-
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
-
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
-
#else
|
|
28
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
-
#endif
|
|
30
|
-
|
|
31
|
-
// Forward declaration of `NitroDiscountDisplayInfoAndroid` to properly resolve imports.
|
|
32
|
-
namespace margelo::nitro::iap { struct NitroDiscountDisplayInfoAndroid; }
|
|
33
|
-
// Forward declaration of `NitroLimitedQuantityInfoAndroid` to properly resolve imports.
|
|
34
|
-
namespace margelo::nitro::iap { struct NitroLimitedQuantityInfoAndroid; }
|
|
35
|
-
// Forward declaration of `NitroPreorderDetailsAndroid` to properly resolve imports.
|
|
36
|
-
namespace margelo::nitro::iap { struct NitroPreorderDetailsAndroid; }
|
|
37
|
-
// Forward declaration of `NitroRentalDetailsAndroid` to properly resolve imports.
|
|
38
|
-
namespace margelo::nitro::iap { struct NitroRentalDetailsAndroid; }
|
|
39
|
-
// Forward declaration of `NitroValidTimeWindowAndroid` to properly resolve imports.
|
|
40
|
-
namespace margelo::nitro::iap { struct NitroValidTimeWindowAndroid; }
|
|
41
|
-
|
|
42
|
-
#include <NitroModules/Null.hpp>
|
|
43
|
-
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
44
|
-
#include <variant>
|
|
45
|
-
#include <optional>
|
|
46
|
-
#include <string>
|
|
47
|
-
#include "NitroLimitedQuantityInfoAndroid.hpp"
|
|
48
|
-
#include <vector>
|
|
49
|
-
#include "NitroPreorderDetailsAndroid.hpp"
|
|
50
|
-
#include "NitroRentalDetailsAndroid.hpp"
|
|
51
|
-
#include "NitroValidTimeWindowAndroid.hpp"
|
|
52
|
-
|
|
53
|
-
namespace margelo::nitro::iap {
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* A struct which can be represented as a JavaScript object (NitroOneTimePurchaseOfferDetail).
|
|
57
|
-
*/
|
|
58
|
-
struct NitroOneTimePurchaseOfferDetail final {
|
|
59
|
-
public:
|
|
60
|
-
std::optional<std::variant<nitro::NullType, NitroDiscountDisplayInfoAndroid>> discountDisplayInfo SWIFT_PRIVATE;
|
|
61
|
-
std::string formattedPrice SWIFT_PRIVATE;
|
|
62
|
-
std::optional<std::variant<nitro::NullType, std::string>> fullPriceMicros SWIFT_PRIVATE;
|
|
63
|
-
std::optional<std::variant<nitro::NullType, NitroLimitedQuantityInfoAndroid>> limitedQuantityInfo SWIFT_PRIVATE;
|
|
64
|
-
std::optional<std::variant<nitro::NullType, std::string>> offerId SWIFT_PRIVATE;
|
|
65
|
-
std::vector<std::string> offerTags SWIFT_PRIVATE;
|
|
66
|
-
std::string offerToken SWIFT_PRIVATE;
|
|
67
|
-
std::optional<std::variant<nitro::NullType, NitroPreorderDetailsAndroid>> preorderDetailsAndroid SWIFT_PRIVATE;
|
|
68
|
-
std::string priceAmountMicros SWIFT_PRIVATE;
|
|
69
|
-
std::string priceCurrencyCode SWIFT_PRIVATE;
|
|
70
|
-
std::optional<std::variant<nitro::NullType, std::string>> purchaseOptionId SWIFT_PRIVATE;
|
|
71
|
-
std::optional<std::variant<nitro::NullType, NitroRentalDetailsAndroid>> rentalDetailsAndroid SWIFT_PRIVATE;
|
|
72
|
-
std::optional<std::variant<nitro::NullType, NitroValidTimeWindowAndroid>> validTimeWindow SWIFT_PRIVATE;
|
|
73
|
-
|
|
74
|
-
public:
|
|
75
|
-
NitroOneTimePurchaseOfferDetail() = default;
|
|
76
|
-
explicit NitroOneTimePurchaseOfferDetail(std::optional<std::variant<nitro::NullType, NitroDiscountDisplayInfoAndroid>> discountDisplayInfo, std::string formattedPrice, std::optional<std::variant<nitro::NullType, std::string>> fullPriceMicros, std::optional<std::variant<nitro::NullType, NitroLimitedQuantityInfoAndroid>> limitedQuantityInfo, std::optional<std::variant<nitro::NullType, std::string>> offerId, std::vector<std::string> offerTags, std::string offerToken, std::optional<std::variant<nitro::NullType, NitroPreorderDetailsAndroid>> preorderDetailsAndroid, std::string priceAmountMicros, std::string priceCurrencyCode, std::optional<std::variant<nitro::NullType, std::string>> purchaseOptionId, std::optional<std::variant<nitro::NullType, NitroRentalDetailsAndroid>> rentalDetailsAndroid, std::optional<std::variant<nitro::NullType, NitroValidTimeWindowAndroid>> validTimeWindow): discountDisplayInfo(discountDisplayInfo), formattedPrice(formattedPrice), fullPriceMicros(fullPriceMicros), limitedQuantityInfo(limitedQuantityInfo), offerId(offerId), offerTags(offerTags), offerToken(offerToken), preorderDetailsAndroid(preorderDetailsAndroid), priceAmountMicros(priceAmountMicros), priceCurrencyCode(priceCurrencyCode), purchaseOptionId(purchaseOptionId), rentalDetailsAndroid(rentalDetailsAndroid), validTimeWindow(validTimeWindow) {}
|
|
77
|
-
|
|
78
|
-
public:
|
|
79
|
-
// NitroOneTimePurchaseOfferDetail is not equatable because these properties are not equatable: offerTags
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
} // namespace margelo::nitro::iap
|
|
83
|
-
|
|
84
|
-
namespace margelo::nitro {
|
|
85
|
-
|
|
86
|
-
// C++ NitroOneTimePurchaseOfferDetail <> JS NitroOneTimePurchaseOfferDetail (object)
|
|
87
|
-
template <>
|
|
88
|
-
struct JSIConverter<margelo::nitro::iap::NitroOneTimePurchaseOfferDetail> final {
|
|
89
|
-
static inline margelo::nitro::iap::NitroOneTimePurchaseOfferDetail fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
90
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
91
|
-
return margelo::nitro::iap::NitroOneTimePurchaseOfferDetail(
|
|
92
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroDiscountDisplayInfoAndroid>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "discountDisplayInfo"))),
|
|
93
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "formattedPrice"))),
|
|
94
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fullPriceMicros"))),
|
|
95
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroLimitedQuantityInfoAndroid>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "limitedQuantityInfo"))),
|
|
96
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerId"))),
|
|
97
|
-
JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerTags"))),
|
|
98
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerToken"))),
|
|
99
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroPreorderDetailsAndroid>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "preorderDetailsAndroid"))),
|
|
100
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "priceAmountMicros"))),
|
|
101
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "priceCurrencyCode"))),
|
|
102
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseOptionId"))),
|
|
103
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroRentalDetailsAndroid>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "rentalDetailsAndroid"))),
|
|
104
|
-
JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroValidTimeWindowAndroid>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "validTimeWindow")))
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::iap::NitroOneTimePurchaseOfferDetail& arg) {
|
|
108
|
-
jsi::Object obj(runtime);
|
|
109
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "discountDisplayInfo"), JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroDiscountDisplayInfoAndroid>>>::toJSI(runtime, arg.discountDisplayInfo));
|
|
110
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "formattedPrice"), JSIConverter<std::string>::toJSI(runtime, arg.formattedPrice));
|
|
111
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "fullPriceMicros"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.fullPriceMicros));
|
|
112
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "limitedQuantityInfo"), JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroLimitedQuantityInfoAndroid>>>::toJSI(runtime, arg.limitedQuantityInfo));
|
|
113
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "offerId"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.offerId));
|
|
114
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "offerTags"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.offerTags));
|
|
115
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "offerToken"), JSIConverter<std::string>::toJSI(runtime, arg.offerToken));
|
|
116
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "preorderDetailsAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroPreorderDetailsAndroid>>>::toJSI(runtime, arg.preorderDetailsAndroid));
|
|
117
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "priceAmountMicros"), JSIConverter<std::string>::toJSI(runtime, arg.priceAmountMicros));
|
|
118
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "priceCurrencyCode"), JSIConverter<std::string>::toJSI(runtime, arg.priceCurrencyCode));
|
|
119
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "purchaseOptionId"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.purchaseOptionId));
|
|
120
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "rentalDetailsAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroRentalDetailsAndroid>>>::toJSI(runtime, arg.rentalDetailsAndroid));
|
|
121
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "validTimeWindow"), JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroValidTimeWindowAndroid>>>::toJSI(runtime, arg.validTimeWindow));
|
|
122
|
-
return obj;
|
|
123
|
-
}
|
|
124
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
125
|
-
if (!value.isObject()) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
jsi::Object obj = value.getObject(runtime);
|
|
129
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroDiscountDisplayInfoAndroid>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "discountDisplayInfo")))) return false;
|
|
133
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "formattedPrice")))) return false;
|
|
134
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fullPriceMicros")))) return false;
|
|
135
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroLimitedQuantityInfoAndroid>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "limitedQuantityInfo")))) return false;
|
|
136
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerId")))) return false;
|
|
137
|
-
if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerTags")))) return false;
|
|
138
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerToken")))) return false;
|
|
139
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroPreorderDetailsAndroid>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "preorderDetailsAndroid")))) return false;
|
|
140
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "priceAmountMicros")))) return false;
|
|
141
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "priceCurrencyCode")))) return false;
|
|
142
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseOptionId")))) return false;
|
|
143
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroRentalDetailsAndroid>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "rentalDetailsAndroid")))) return false;
|
|
144
|
-
if (!JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroValidTimeWindowAndroid>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "validTimeWindow")))) return false;
|
|
145
|
-
return true;
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
} // namespace margelo::nitro
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroPreorderDetailsAndroid.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
-
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
-
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
-
#else
|
|
28
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
-
#endif
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#include <string>
|
|
34
|
-
|
|
35
|
-
namespace margelo::nitro::iap {
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* A struct which can be represented as a JavaScript object (NitroPreorderDetailsAndroid).
|
|
39
|
-
*/
|
|
40
|
-
struct NitroPreorderDetailsAndroid final {
|
|
41
|
-
public:
|
|
42
|
-
std::string preorderPresaleEndTimeMillis SWIFT_PRIVATE;
|
|
43
|
-
std::string preorderReleaseTimeMillis SWIFT_PRIVATE;
|
|
44
|
-
|
|
45
|
-
public:
|
|
46
|
-
NitroPreorderDetailsAndroid() = default;
|
|
47
|
-
explicit NitroPreorderDetailsAndroid(std::string preorderPresaleEndTimeMillis, std::string preorderReleaseTimeMillis): preorderPresaleEndTimeMillis(preorderPresaleEndTimeMillis), preorderReleaseTimeMillis(preorderReleaseTimeMillis) {}
|
|
48
|
-
|
|
49
|
-
public:
|
|
50
|
-
friend bool operator==(const NitroPreorderDetailsAndroid& lhs, const NitroPreorderDetailsAndroid& rhs) = default;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
} // namespace margelo::nitro::iap
|
|
54
|
-
|
|
55
|
-
namespace margelo::nitro {
|
|
56
|
-
|
|
57
|
-
// C++ NitroPreorderDetailsAndroid <> JS NitroPreorderDetailsAndroid (object)
|
|
58
|
-
template <>
|
|
59
|
-
struct JSIConverter<margelo::nitro::iap::NitroPreorderDetailsAndroid> final {
|
|
60
|
-
static inline margelo::nitro::iap::NitroPreorderDetailsAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
62
|
-
return margelo::nitro::iap::NitroPreorderDetailsAndroid(
|
|
63
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "preorderPresaleEndTimeMillis"))),
|
|
64
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "preorderReleaseTimeMillis")))
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::iap::NitroPreorderDetailsAndroid& arg) {
|
|
68
|
-
jsi::Object obj(runtime);
|
|
69
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "preorderPresaleEndTimeMillis"), JSIConverter<std::string>::toJSI(runtime, arg.preorderPresaleEndTimeMillis));
|
|
70
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "preorderReleaseTimeMillis"), JSIConverter<std::string>::toJSI(runtime, arg.preorderReleaseTimeMillis));
|
|
71
|
-
return obj;
|
|
72
|
-
}
|
|
73
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
74
|
-
if (!value.isObject()) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
jsi::Object obj = value.getObject(runtime);
|
|
78
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "preorderPresaleEndTimeMillis")))) return false;
|
|
82
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "preorderReleaseTimeMillis")))) return false;
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
} // namespace margelo::nitro
|