react-native-iap 14.4.46 → 14.5.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/NitroIap.podspec +2 -2
- package/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +134 -4
- package/ios/HybridRnIap.swift +73 -2
- package/ios/RnIapHelper.swift +8 -0
- package/lib/module/hooks/useIAP.js +9 -1
- package/lib/module/hooks/useIAP.js.map +1 -1
- package/lib/module/index.js +69 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +5 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/errorMapping.js +32 -6
- package/lib/module/utils/errorMapping.js.map +1 -1
- package/lib/module/utils/type-bridge.js +19 -0
- package/lib/module/utils/type-bridge.js.map +1 -1
- package/lib/typescript/src/hooks/useIAP.d.ts +5 -1
- package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +34 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +86 -26
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +145 -55
- 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/nitrogen/generated/android/c++/JFunc_void_NitroPurchase.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +80 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JIapStore.hpp +65 -0
- package/nitrogen/generated/android/c++/JIapkitPurchaseState.hpp +80 -0
- package/nitrogen/generated/android/c++/JNitroPurchase.hpp +7 -1
- package/nitrogen/generated/android/c++/JNitroPurchaseRequest.hpp +11 -3
- package/nitrogen/generated/android/c++/JNitroReceiptValidationResultIOS.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithIapkitAppleProps.hpp +57 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithIapkitGoogleProps.hpp +57 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithIapkitProps.hpp +70 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithIapkitResult.hpp +68 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithProviderError.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithProviderProps.hpp +70 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithProviderResult.hpp +94 -0
- package/nitrogen/generated/android/c++/JPurchase.hpp +2 -0
- package/nitrogen/generated/android/c++/JPurchaseAndroid.hpp +7 -1
- package/nitrogen/generated/android/c++/JPurchaseIOS.hpp +7 -1
- package/nitrogen/generated/android/c++/JPurchaseVerificationProvider.hpp +59 -0
- package/nitrogen/generated/android/c++/JRequestPurchaseResult.hpp +2 -0
- package/nitrogen/generated/android/c++/JVariant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.hpp +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +8 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/IapStore.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/IapkitPurchaseState.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchase.kt +5 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchaseRequest.kt +9 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithIapkitAppleProps.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithIapkitGoogleProps.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithIapkitProps.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithIapkitResult.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithProviderError.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithProviderProps.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithProviderResult.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseAndroid.kt +5 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseIOS.kt +5 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseVerificationProvider.kt +21 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +156 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +30 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +46 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroVerifyPurchaseWithProviderResult.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +2 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +45 -0
- package/nitrogen/generated/ios/swift/IapStore.swift +48 -0
- package/nitrogen/generated/ios/swift/IapkitPurchaseState.swift +68 -0
- package/nitrogen/generated/ios/swift/NitroPurchase.swift +13 -2
- package/nitrogen/generated/ios/swift/NitroPurchaseRequest.swift +47 -1
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithIapkitAppleProps.swift +35 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithIapkitGoogleProps.swift +35 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithIapkitProps.swift +100 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithIapkitResult.swift +57 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithProviderError.swift +65 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithProviderProps.swift +58 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithProviderResult.swift +100 -0
- package/nitrogen/generated/ios/swift/PurchaseAndroid.swift +13 -2
- package/nitrogen/generated/ios/swift/PurchaseIOS.swift +13 -2
- package/nitrogen/generated/ios/swift/PurchaseVerificationProvider.swift +40 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +8 -0
- package/nitrogen/generated/shared/c++/IapStore.hpp +84 -0
- package/nitrogen/generated/shared/c++/IapkitPurchaseState.hpp +104 -0
- package/nitrogen/generated/shared/c++/NitroPurchase.hpp +8 -1
- package/nitrogen/generated/shared/c++/NitroPurchaseRequest.hpp +10 -2
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithIapkitAppleProps.hpp +75 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithIapkitGoogleProps.hpp +75 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithIapkitProps.hpp +89 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithIapkitResult.hpp +87 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithProviderError.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithProviderProps.hpp +84 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithProviderResult.hpp +92 -0
- package/nitrogen/generated/shared/c++/PurchaseAndroid.hpp +8 -1
- package/nitrogen/generated/shared/c++/PurchaseIOS.hpp +8 -1
- package/nitrogen/generated/shared/c++/PurchaseVerificationProvider.hpp +76 -0
- package/openiap-versions.json +3 -3
- package/package.json +1 -1
- package/src/hooks/useIAP.ts +32 -0
- package/src/index.ts +77 -5
- package/src/specs/RnIap.nitro.ts +117 -28
- package/src/types.ts +163 -61
- package/src/utils/errorMapping.ts +32 -4
- package/src/utils/type-bridge.ts +22 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// IapkitPurchaseState.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "IapkitPurchaseState".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class IapkitPurchaseState(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
PENDING(0),
|
|
20
|
+
UNKNOWN(1),
|
|
21
|
+
ENTITLED(2),
|
|
22
|
+
PENDING_ACKNOWLEDGMENT(3),
|
|
23
|
+
CANCELED(4),
|
|
24
|
+
EXPIRED(5),
|
|
25
|
+
READY_TO_CONSUME(6),
|
|
26
|
+
CONSUMED(7),
|
|
27
|
+
INAUTHENTIC(8);
|
|
28
|
+
}
|
|
@@ -34,6 +34,9 @@ data class NitroPurchase(
|
|
|
34
34
|
val platform: IapPlatform,
|
|
35
35
|
@DoNotStrip
|
|
36
36
|
@Keep
|
|
37
|
+
val store: IapStore,
|
|
38
|
+
@DoNotStrip
|
|
39
|
+
@Keep
|
|
37
40
|
val quantity: Double,
|
|
38
41
|
@DoNotStrip
|
|
39
42
|
@Keep
|
|
@@ -146,8 +149,8 @@ data class NitroPurchase(
|
|
|
146
149
|
@Keep
|
|
147
150
|
@Suppress("unused")
|
|
148
151
|
@JvmStatic
|
|
149
|
-
private fun fromCpp(id: String, productId: String, transactionDate: Double, purchaseToken: String?, platform: IapPlatform, quantity: Double, purchaseState: PurchaseState, isAutoRenewing: Boolean, quantityIOS: Double?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, environmentIOS: String?, expirationDateIOS: Double?, isUpgradedIOS: Boolean?, offerIOS: String?, ownershipTypeIOS: String?, reasonIOS: String?, reasonStringRepresentationIOS: String?, revocationDateIOS: Double?, revocationReasonIOS: String?, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?, renewalInfoIOS: NitroRenewalInfoIOS?, purchaseTokenAndroid: String?, dataAndroid: String?, signatureAndroid: String?, autoRenewingAndroid: Boolean?, purchaseStateAndroid: Double?, isAcknowledgedAndroid: Boolean?, packageNameAndroid: String?, obfuscatedAccountIdAndroid: String?, obfuscatedProfileIdAndroid: String?, developerPayloadAndroid: String?): NitroPurchase {
|
|
150
|
-
return NitroPurchase(id, productId, transactionDate, purchaseToken, platform, quantity, purchaseState, isAutoRenewing, quantityIOS, originalTransactionDateIOS, originalTransactionIdentifierIOS, appAccountToken, appBundleIdIOS, countryCodeIOS, currencyCodeIOS, currencySymbolIOS, environmentIOS, expirationDateIOS, isUpgradedIOS, offerIOS, ownershipTypeIOS, reasonIOS, reasonStringRepresentationIOS, revocationDateIOS, revocationReasonIOS, storefrontCountryCodeIOS, subscriptionGroupIdIOS, transactionReasonIOS, webOrderLineItemIdIOS, renewalInfoIOS, purchaseTokenAndroid, dataAndroid, signatureAndroid, autoRenewingAndroid, purchaseStateAndroid, isAcknowledgedAndroid, packageNameAndroid, obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid, developerPayloadAndroid)
|
|
152
|
+
private fun fromCpp(id: String, productId: String, transactionDate: Double, purchaseToken: String?, platform: IapPlatform, store: IapStore, quantity: Double, purchaseState: PurchaseState, isAutoRenewing: Boolean, quantityIOS: Double?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, environmentIOS: String?, expirationDateIOS: Double?, isUpgradedIOS: Boolean?, offerIOS: String?, ownershipTypeIOS: String?, reasonIOS: String?, reasonStringRepresentationIOS: String?, revocationDateIOS: Double?, revocationReasonIOS: String?, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?, renewalInfoIOS: NitroRenewalInfoIOS?, purchaseTokenAndroid: String?, dataAndroid: String?, signatureAndroid: String?, autoRenewingAndroid: Boolean?, purchaseStateAndroid: Double?, isAcknowledgedAndroid: Boolean?, packageNameAndroid: String?, obfuscatedAccountIdAndroid: String?, obfuscatedProfileIdAndroid: String?, developerPayloadAndroid: String?): NitroPurchase {
|
|
153
|
+
return NitroPurchase(id, productId, transactionDate, purchaseToken, platform, store, quantity, purchaseState, isAutoRenewing, quantityIOS, originalTransactionDateIOS, originalTransactionIdentifierIOS, appAccountToken, appBundleIdIOS, countryCodeIOS, currencyCodeIOS, currencySymbolIOS, environmentIOS, expirationDateIOS, isUpgradedIOS, offerIOS, ownershipTypeIOS, reasonIOS, reasonStringRepresentationIOS, revocationDateIOS, revocationReasonIOS, storefrontCountryCodeIOS, subscriptionGroupIdIOS, transactionReasonIOS, webOrderLineItemIdIOS, renewalInfoIOS, purchaseTokenAndroid, dataAndroid, signatureAndroid, autoRenewingAndroid, purchaseStateAndroid, isAcknowledgedAndroid, packageNameAndroid, obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid, developerPayloadAndroid)
|
|
151
154
|
}
|
|
152
155
|
}
|
|
153
156
|
}
|
|
@@ -22,7 +22,13 @@ data class NitroPurchaseRequest(
|
|
|
22
22
|
val ios: NitroRequestPurchaseIos?,
|
|
23
23
|
@DoNotStrip
|
|
24
24
|
@Keep
|
|
25
|
-
val android: NitroRequestPurchaseAndroid
|
|
25
|
+
val android: NitroRequestPurchaseAndroid?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val apple: NitroRequestPurchaseIos?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val google: NitroRequestPurchaseAndroid?
|
|
26
32
|
) {
|
|
27
33
|
private companion object {
|
|
28
34
|
/**
|
|
@@ -32,8 +38,8 @@ data class NitroPurchaseRequest(
|
|
|
32
38
|
@Keep
|
|
33
39
|
@Suppress("unused")
|
|
34
40
|
@JvmStatic
|
|
35
|
-
private fun fromCpp(ios: NitroRequestPurchaseIos?, android: NitroRequestPurchaseAndroid?): NitroPurchaseRequest {
|
|
36
|
-
return NitroPurchaseRequest(ios, android)
|
|
41
|
+
private fun fromCpp(ios: NitroRequestPurchaseIos?, android: NitroRequestPurchaseAndroid?, apple: NitroRequestPurchaseIos?, google: NitroRequestPurchaseAndroid?): NitroPurchaseRequest {
|
|
42
|
+
return NitroPurchaseRequest(ios, android, apple, google)
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
45
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroVerifyPurchaseWithIapkitAppleProps.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroVerifyPurchaseWithIapkitAppleProps".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroVerifyPurchaseWithIapkitAppleProps(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val jws: String
|
|
23
|
+
) {
|
|
24
|
+
private companion object {
|
|
25
|
+
/**
|
|
26
|
+
* Constructor called from C++
|
|
27
|
+
*/
|
|
28
|
+
@DoNotStrip
|
|
29
|
+
@Keep
|
|
30
|
+
@Suppress("unused")
|
|
31
|
+
@JvmStatic
|
|
32
|
+
private fun fromCpp(jws: String): NitroVerifyPurchaseWithIapkitAppleProps {
|
|
33
|
+
return NitroVerifyPurchaseWithIapkitAppleProps(jws)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroVerifyPurchaseWithIapkitGoogleProps.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroVerifyPurchaseWithIapkitGoogleProps".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroVerifyPurchaseWithIapkitGoogleProps(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val purchaseToken: String
|
|
23
|
+
) {
|
|
24
|
+
private companion object {
|
|
25
|
+
/**
|
|
26
|
+
* Constructor called from C++
|
|
27
|
+
*/
|
|
28
|
+
@DoNotStrip
|
|
29
|
+
@Keep
|
|
30
|
+
@Suppress("unused")
|
|
31
|
+
@JvmStatic
|
|
32
|
+
private fun fromCpp(purchaseToken: String): NitroVerifyPurchaseWithIapkitGoogleProps {
|
|
33
|
+
return NitroVerifyPurchaseWithIapkitGoogleProps(purchaseToken)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroVerifyPurchaseWithIapkitProps.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroVerifyPurchaseWithIapkitProps".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroVerifyPurchaseWithIapkitProps(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val apiKey: String?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val apple: NitroVerifyPurchaseWithIapkitAppleProps?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val google: NitroVerifyPurchaseWithIapkitGoogleProps?
|
|
29
|
+
) {
|
|
30
|
+
private companion object {
|
|
31
|
+
/**
|
|
32
|
+
* Constructor called from C++
|
|
33
|
+
*/
|
|
34
|
+
@DoNotStrip
|
|
35
|
+
@Keep
|
|
36
|
+
@Suppress("unused")
|
|
37
|
+
@JvmStatic
|
|
38
|
+
private fun fromCpp(apiKey: String?, apple: NitroVerifyPurchaseWithIapkitAppleProps?, google: NitroVerifyPurchaseWithIapkitGoogleProps?): NitroVerifyPurchaseWithIapkitProps {
|
|
39
|
+
return NitroVerifyPurchaseWithIapkitProps(apiKey, apple, google)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroVerifyPurchaseWithIapkitResult.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroVerifyPurchaseWithIapkitResult".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroVerifyPurchaseWithIapkitResult(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val isValid: Boolean,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val state: IapkitPurchaseState,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val store: IapStore
|
|
29
|
+
) {
|
|
30
|
+
private companion object {
|
|
31
|
+
/**
|
|
32
|
+
* Constructor called from C++
|
|
33
|
+
*/
|
|
34
|
+
@DoNotStrip
|
|
35
|
+
@Keep
|
|
36
|
+
@Suppress("unused")
|
|
37
|
+
@JvmStatic
|
|
38
|
+
private fun fromCpp(isValid: Boolean, state: IapkitPurchaseState, store: IapStore): NitroVerifyPurchaseWithIapkitResult {
|
|
39
|
+
return NitroVerifyPurchaseWithIapkitResult(isValid, state, store)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroVerifyPurchaseWithProviderError.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroVerifyPurchaseWithProviderError".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroVerifyPurchaseWithProviderError(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val code: String?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val message: String
|
|
26
|
+
) {
|
|
27
|
+
private companion object {
|
|
28
|
+
/**
|
|
29
|
+
* Constructor called from C++
|
|
30
|
+
*/
|
|
31
|
+
@DoNotStrip
|
|
32
|
+
@Keep
|
|
33
|
+
@Suppress("unused")
|
|
34
|
+
@JvmStatic
|
|
35
|
+
private fun fromCpp(code: String?, message: String): NitroVerifyPurchaseWithProviderError {
|
|
36
|
+
return NitroVerifyPurchaseWithProviderError(code, message)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroVerifyPurchaseWithProviderProps.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroVerifyPurchaseWithProviderProps".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroVerifyPurchaseWithProviderProps(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val iapkit: NitroVerifyPurchaseWithIapkitProps?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val provider: PurchaseVerificationProvider
|
|
26
|
+
) {
|
|
27
|
+
private companion object {
|
|
28
|
+
/**
|
|
29
|
+
* Constructor called from C++
|
|
30
|
+
*/
|
|
31
|
+
@DoNotStrip
|
|
32
|
+
@Keep
|
|
33
|
+
@Suppress("unused")
|
|
34
|
+
@JvmStatic
|
|
35
|
+
private fun fromCpp(iapkit: NitroVerifyPurchaseWithIapkitProps?, provider: PurchaseVerificationProvider): NitroVerifyPurchaseWithProviderProps {
|
|
36
|
+
return NitroVerifyPurchaseWithProviderProps(iapkit, provider)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroVerifyPurchaseWithProviderResult.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroVerifyPurchaseWithProviderResult".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroVerifyPurchaseWithProviderResult(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val iapkit: NitroVerifyPurchaseWithIapkitResult?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val errors: Array<NitroVerifyPurchaseWithProviderError>?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val provider: PurchaseVerificationProvider
|
|
29
|
+
) {
|
|
30
|
+
private companion object {
|
|
31
|
+
/**
|
|
32
|
+
* Constructor called from C++
|
|
33
|
+
*/
|
|
34
|
+
@DoNotStrip
|
|
35
|
+
@Keep
|
|
36
|
+
@Suppress("unused")
|
|
37
|
+
@JvmStatic
|
|
38
|
+
private fun fromCpp(iapkit: NitroVerifyPurchaseWithIapkitResult?, errors: Array<NitroVerifyPurchaseWithProviderError>?, provider: PurchaseVerificationProvider): NitroVerifyPurchaseWithProviderResult {
|
|
39
|
+
return NitroVerifyPurchaseWithProviderResult(iapkit, errors, provider)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -70,6 +70,9 @@ data class PurchaseAndroid(
|
|
|
70
70
|
val signatureAndroid: String?,
|
|
71
71
|
@DoNotStrip
|
|
72
72
|
@Keep
|
|
73
|
+
val store: IapStore,
|
|
74
|
+
@DoNotStrip
|
|
75
|
+
@Keep
|
|
73
76
|
val transactionDate: Double,
|
|
74
77
|
@DoNotStrip
|
|
75
78
|
@Keep
|
|
@@ -83,8 +86,8 @@ data class PurchaseAndroid(
|
|
|
83
86
|
@Keep
|
|
84
87
|
@Suppress("unused")
|
|
85
88
|
@JvmStatic
|
|
86
|
-
private fun fromCpp(autoRenewingAndroid: Boolean?, currentPlanId: String?, dataAndroid: String?, developerPayloadAndroid: String?, id: String, ids: Array<String>?, isAcknowledgedAndroid: Boolean?, isAutoRenewing: Boolean, obfuscatedAccountIdAndroid: String?, obfuscatedProfileIdAndroid: String?, packageNameAndroid: String?, platform: IapPlatform, productId: String, purchaseState: PurchaseState, purchaseToken: String?, quantity: Double, signatureAndroid: String?, transactionDate: Double, transactionId: String?): PurchaseAndroid {
|
|
87
|
-
return PurchaseAndroid(autoRenewingAndroid, currentPlanId, dataAndroid, developerPayloadAndroid, id, ids, isAcknowledgedAndroid, isAutoRenewing, obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid, packageNameAndroid, platform, productId, purchaseState, purchaseToken, quantity, signatureAndroid, transactionDate, transactionId)
|
|
89
|
+
private fun fromCpp(autoRenewingAndroid: Boolean?, currentPlanId: String?, dataAndroid: String?, developerPayloadAndroid: String?, id: String, ids: Array<String>?, isAcknowledgedAndroid: Boolean?, isAutoRenewing: Boolean, obfuscatedAccountIdAndroid: String?, obfuscatedProfileIdAndroid: String?, packageNameAndroid: String?, platform: IapPlatform, productId: String, purchaseState: PurchaseState, purchaseToken: String?, quantity: Double, signatureAndroid: String?, store: IapStore, transactionDate: Double, transactionId: String?): PurchaseAndroid {
|
|
90
|
+
return PurchaseAndroid(autoRenewingAndroid, currentPlanId, dataAndroid, developerPayloadAndroid, id, ids, isAcknowledgedAndroid, isAutoRenewing, obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid, packageNameAndroid, platform, productId, purchaseState, purchaseToken, quantity, signatureAndroid, store, transactionDate, transactionId)
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
}
|
|
@@ -100,6 +100,9 @@ data class PurchaseIOS(
|
|
|
100
100
|
val revocationReasonIOS: String?,
|
|
101
101
|
@DoNotStrip
|
|
102
102
|
@Keep
|
|
103
|
+
val store: IapStore,
|
|
104
|
+
@DoNotStrip
|
|
105
|
+
@Keep
|
|
103
106
|
val storefrontCountryCodeIOS: String?,
|
|
104
107
|
@DoNotStrip
|
|
105
108
|
@Keep
|
|
@@ -125,8 +128,8 @@ data class PurchaseIOS(
|
|
|
125
128
|
@Keep
|
|
126
129
|
@Suppress("unused")
|
|
127
130
|
@JvmStatic
|
|
128
|
-
private fun fromCpp(appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, currentPlanId: String?, environmentIOS: String?, expirationDateIOS: Double?, id: String, ids: Array<String>?, isAutoRenewing: Boolean, isUpgradedIOS: Boolean?, offerIOS: PurchaseOfferIOS?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, ownershipTypeIOS: String?, platform: IapPlatform, productId: String, purchaseState: PurchaseState, purchaseToken: String?, quantity: Double, quantityIOS: Double?, reasonIOS: String?, reasonStringRepresentationIOS: String?, renewalInfoIOS: RenewalInfoIOS?, revocationDateIOS: Double?, revocationReasonIOS: String?, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionDate: Double, transactionId: String, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?): PurchaseIOS {
|
|
129
|
-
return PurchaseIOS(appAccountToken, appBundleIdIOS, countryCodeIOS, currencyCodeIOS, currencySymbolIOS, currentPlanId, environmentIOS, expirationDateIOS, id, ids, isAutoRenewing, isUpgradedIOS, offerIOS, originalTransactionDateIOS, originalTransactionIdentifierIOS, ownershipTypeIOS, platform, productId, purchaseState, purchaseToken, quantity, quantityIOS, reasonIOS, reasonStringRepresentationIOS, renewalInfoIOS, revocationDateIOS, revocationReasonIOS, storefrontCountryCodeIOS, subscriptionGroupIdIOS, transactionDate, transactionId, transactionReasonIOS, webOrderLineItemIdIOS)
|
|
131
|
+
private fun fromCpp(appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, currentPlanId: String?, environmentIOS: String?, expirationDateIOS: Double?, id: String, ids: Array<String>?, isAutoRenewing: Boolean, isUpgradedIOS: Boolean?, offerIOS: PurchaseOfferIOS?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, ownershipTypeIOS: String?, platform: IapPlatform, productId: String, purchaseState: PurchaseState, purchaseToken: String?, quantity: Double, quantityIOS: Double?, reasonIOS: String?, reasonStringRepresentationIOS: String?, renewalInfoIOS: RenewalInfoIOS?, revocationDateIOS: Double?, revocationReasonIOS: String?, store: IapStore, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionDate: Double, transactionId: String, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?): PurchaseIOS {
|
|
132
|
+
return PurchaseIOS(appAccountToken, appBundleIdIOS, countryCodeIOS, currencyCodeIOS, currencySymbolIOS, currentPlanId, environmentIOS, expirationDateIOS, id, ids, isAutoRenewing, isUpgradedIOS, offerIOS, originalTransactionDateIOS, originalTransactionIdentifierIOS, ownershipTypeIOS, platform, productId, purchaseState, purchaseToken, quantity, quantityIOS, reasonIOS, reasonStringRepresentationIOS, renewalInfoIOS, revocationDateIOS, revocationReasonIOS, store, storefrontCountryCodeIOS, subscriptionGroupIdIOS, transactionDate, transactionId, transactionReasonIOS, webOrderLineItemIdIOS)
|
|
130
133
|
}
|
|
131
134
|
}
|
|
132
135
|
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseVerificationProvider.kt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PurchaseVerificationProvider.kt
|
|
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
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "PurchaseVerificationProvider".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class PurchaseVerificationProvider(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
NONE(0),
|
|
20
|
+
IAPKIT(1);
|
|
21
|
+
}
|
|
@@ -149,6 +149,14 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
// pragma MARK: std::function<void(const NitroVerifyPurchaseWithProviderResult& /* result */)>
|
|
153
|
+
Func_void_NitroVerifyPurchaseWithProviderResult create_Func_void_NitroVerifyPurchaseWithProviderResult(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
154
|
+
auto swiftClosure = NitroIap::Func_void_NitroVerifyPurchaseWithProviderResult::fromUnsafe(swiftClosureWrapper);
|
|
155
|
+
return [swiftClosure = std::move(swiftClosure)](const NitroVerifyPurchaseWithProviderResult& result) mutable -> void {
|
|
156
|
+
swiftClosure.call(result);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
152
160
|
// pragma MARK: std::function<void(const UserChoiceBillingDetails& /* details */)>
|
|
153
161
|
Func_void_UserChoiceBillingDetails create_Func_void_UserChoiceBillingDetails(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
154
162
|
auto swiftClosure = NitroIap::Func_void_UserChoiceBillingDetails::fromUnsafe(swiftClosureWrapper);
|
|
@@ -22,6 +22,10 @@ namespace margelo::nitro::iap { struct ExternalPurchaseNoticeResultIOS; }
|
|
|
22
22
|
namespace margelo::nitro::iap { class HybridRnIapSpec; }
|
|
23
23
|
// Forward declaration of `IapPlatform` to properly resolve imports.
|
|
24
24
|
namespace margelo::nitro::iap { enum class IapPlatform; }
|
|
25
|
+
// Forward declaration of `IapStore` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::iap { enum class IapStore; }
|
|
27
|
+
// Forward declaration of `IapkitPurchaseState` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::iap { enum class IapkitPurchaseState; }
|
|
25
29
|
// Forward declaration of `InitConnectionConfig` to properly resolve imports.
|
|
26
30
|
namespace margelo::nitro::iap { struct InitConnectionConfig; }
|
|
27
31
|
// Forward declaration of `NitroActiveSubscription` to properly resolve imports.
|
|
@@ -62,6 +66,18 @@ namespace margelo::nitro::iap { struct NitroRequestPurchaseIos; }
|
|
|
62
66
|
namespace margelo::nitro::iap { struct NitroSubscriptionRenewalInfo; }
|
|
63
67
|
// Forward declaration of `NitroSubscriptionStatus` to properly resolve imports.
|
|
64
68
|
namespace margelo::nitro::iap { struct NitroSubscriptionStatus; }
|
|
69
|
+
// Forward declaration of `NitroVerifyPurchaseWithIapkitAppleProps` to properly resolve imports.
|
|
70
|
+
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitAppleProps; }
|
|
71
|
+
// Forward declaration of `NitroVerifyPurchaseWithIapkitGoogleProps` to properly resolve imports.
|
|
72
|
+
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitGoogleProps; }
|
|
73
|
+
// Forward declaration of `NitroVerifyPurchaseWithIapkitProps` to properly resolve imports.
|
|
74
|
+
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitProps; }
|
|
75
|
+
// Forward declaration of `NitroVerifyPurchaseWithIapkitResult` to properly resolve imports.
|
|
76
|
+
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitResult; }
|
|
77
|
+
// Forward declaration of `NitroVerifyPurchaseWithProviderError` to properly resolve imports.
|
|
78
|
+
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithProviderError; }
|
|
79
|
+
// Forward declaration of `NitroVerifyPurchaseWithProviderResult` to properly resolve imports.
|
|
80
|
+
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithProviderResult; }
|
|
65
81
|
// Forward declaration of `PaymentModeIOS` to properly resolve imports.
|
|
66
82
|
namespace margelo::nitro::iap { enum class PaymentModeIOS; }
|
|
67
83
|
// Forward declaration of `PurchaseAndroid` to properly resolve imports.
|
|
@@ -72,6 +88,8 @@ namespace margelo::nitro::iap { struct PurchaseIOS; }
|
|
|
72
88
|
namespace margelo::nitro::iap { struct PurchaseOfferIOS; }
|
|
73
89
|
// Forward declaration of `PurchaseState` to properly resolve imports.
|
|
74
90
|
namespace margelo::nitro::iap { enum class PurchaseState; }
|
|
91
|
+
// Forward declaration of `PurchaseVerificationProvider` to properly resolve imports.
|
|
92
|
+
namespace margelo::nitro::iap { enum class PurchaseVerificationProvider; }
|
|
75
93
|
// Forward declaration of `RenewalInfoIOS` to properly resolve imports.
|
|
76
94
|
namespace margelo::nitro::iap { struct RenewalInfoIOS; }
|
|
77
95
|
// Forward declaration of `UserChoiceBillingDetails` to properly resolve imports.
|
|
@@ -89,6 +107,8 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
89
107
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
90
108
|
#include "HybridRnIapSpec.hpp"
|
|
91
109
|
#include "IapPlatform.hpp"
|
|
110
|
+
#include "IapStore.hpp"
|
|
111
|
+
#include "IapkitPurchaseState.hpp"
|
|
92
112
|
#include "InitConnectionConfig.hpp"
|
|
93
113
|
#include "NitroActiveSubscription.hpp"
|
|
94
114
|
#include "NitroAvailablePurchasesAndroidOptions.hpp"
|
|
@@ -109,11 +129,18 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
109
129
|
#include "NitroRequestPurchaseIos.hpp"
|
|
110
130
|
#include "NitroSubscriptionRenewalInfo.hpp"
|
|
111
131
|
#include "NitroSubscriptionStatus.hpp"
|
|
132
|
+
#include "NitroVerifyPurchaseWithIapkitAppleProps.hpp"
|
|
133
|
+
#include "NitroVerifyPurchaseWithIapkitGoogleProps.hpp"
|
|
134
|
+
#include "NitroVerifyPurchaseWithIapkitProps.hpp"
|
|
135
|
+
#include "NitroVerifyPurchaseWithIapkitResult.hpp"
|
|
136
|
+
#include "NitroVerifyPurchaseWithProviderError.hpp"
|
|
137
|
+
#include "NitroVerifyPurchaseWithProviderResult.hpp"
|
|
112
138
|
#include "PaymentModeIOS.hpp"
|
|
113
139
|
#include "PurchaseAndroid.hpp"
|
|
114
140
|
#include "PurchaseIOS.hpp"
|
|
115
141
|
#include "PurchaseOfferIOS.hpp"
|
|
116
142
|
#include "PurchaseState.hpp"
|
|
143
|
+
#include "PurchaseVerificationProvider.hpp"
|
|
117
144
|
#include "RenewalInfoIOS.hpp"
|
|
118
145
|
#include "UserChoiceBillingDetails.hpp"
|
|
119
146
|
#include <NitroModules/FastVectorCopy.hpp>
|
|
@@ -1279,6 +1306,126 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
1279
1306
|
return *optional;
|
|
1280
1307
|
}
|
|
1281
1308
|
|
|
1309
|
+
// pragma MARK: std::optional<NitroVerifyPurchaseWithIapkitResult>
|
|
1310
|
+
/**
|
|
1311
|
+
* Specialized version of `std::optional<NitroVerifyPurchaseWithIapkitResult>`.
|
|
1312
|
+
*/
|
|
1313
|
+
using std__optional_NitroVerifyPurchaseWithIapkitResult_ = std::optional<NitroVerifyPurchaseWithIapkitResult>;
|
|
1314
|
+
inline std::optional<NitroVerifyPurchaseWithIapkitResult> create_std__optional_NitroVerifyPurchaseWithIapkitResult_(const NitroVerifyPurchaseWithIapkitResult& value) noexcept {
|
|
1315
|
+
return std::optional<NitroVerifyPurchaseWithIapkitResult>(value);
|
|
1316
|
+
}
|
|
1317
|
+
inline bool has_value_std__optional_NitroVerifyPurchaseWithIapkitResult_(const std::optional<NitroVerifyPurchaseWithIapkitResult>& optional) noexcept {
|
|
1318
|
+
return optional.has_value();
|
|
1319
|
+
}
|
|
1320
|
+
inline NitroVerifyPurchaseWithIapkitResult get_std__optional_NitroVerifyPurchaseWithIapkitResult_(const std::optional<NitroVerifyPurchaseWithIapkitResult>& optional) noexcept {
|
|
1321
|
+
return *optional;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
// pragma MARK: std::vector<NitroVerifyPurchaseWithProviderError>
|
|
1325
|
+
/**
|
|
1326
|
+
* Specialized version of `std::vector<NitroVerifyPurchaseWithProviderError>`.
|
|
1327
|
+
*/
|
|
1328
|
+
using std__vector_NitroVerifyPurchaseWithProviderError_ = std::vector<NitroVerifyPurchaseWithProviderError>;
|
|
1329
|
+
inline std::vector<NitroVerifyPurchaseWithProviderError> create_std__vector_NitroVerifyPurchaseWithProviderError_(size_t size) noexcept {
|
|
1330
|
+
std::vector<NitroVerifyPurchaseWithProviderError> vector;
|
|
1331
|
+
vector.reserve(size);
|
|
1332
|
+
return vector;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// pragma MARK: std::optional<std::vector<NitroVerifyPurchaseWithProviderError>>
|
|
1336
|
+
/**
|
|
1337
|
+
* Specialized version of `std::optional<std::vector<NitroVerifyPurchaseWithProviderError>>`.
|
|
1338
|
+
*/
|
|
1339
|
+
using std__optional_std__vector_NitroVerifyPurchaseWithProviderError__ = std::optional<std::vector<NitroVerifyPurchaseWithProviderError>>;
|
|
1340
|
+
inline std::optional<std::vector<NitroVerifyPurchaseWithProviderError>> create_std__optional_std__vector_NitroVerifyPurchaseWithProviderError__(const std::vector<NitroVerifyPurchaseWithProviderError>& value) noexcept {
|
|
1341
|
+
return std::optional<std::vector<NitroVerifyPurchaseWithProviderError>>(value);
|
|
1342
|
+
}
|
|
1343
|
+
inline bool has_value_std__optional_std__vector_NitroVerifyPurchaseWithProviderError__(const std::optional<std::vector<NitroVerifyPurchaseWithProviderError>>& optional) noexcept {
|
|
1344
|
+
return optional.has_value();
|
|
1345
|
+
}
|
|
1346
|
+
inline std::vector<NitroVerifyPurchaseWithProviderError> get_std__optional_std__vector_NitroVerifyPurchaseWithProviderError__(const std::optional<std::vector<NitroVerifyPurchaseWithProviderError>>& optional) noexcept {
|
|
1347
|
+
return *optional;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
// pragma MARK: std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>
|
|
1351
|
+
/**
|
|
1352
|
+
* Specialized version of `std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>`.
|
|
1353
|
+
*/
|
|
1354
|
+
using std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult__ = std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>;
|
|
1355
|
+
inline std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>> create_std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult__() noexcept {
|
|
1356
|
+
return Promise<NitroVerifyPurchaseWithProviderResult>::create();
|
|
1357
|
+
}
|
|
1358
|
+
inline PromiseHolder<NitroVerifyPurchaseWithProviderResult> wrap_std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult__(std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>> promise) noexcept {
|
|
1359
|
+
return PromiseHolder<NitroVerifyPurchaseWithProviderResult>(std::move(promise));
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
// pragma MARK: std::function<void(const NitroVerifyPurchaseWithProviderResult& /* result */)>
|
|
1363
|
+
/**
|
|
1364
|
+
* Specialized version of `std::function<void(const NitroVerifyPurchaseWithProviderResult&)>`.
|
|
1365
|
+
*/
|
|
1366
|
+
using Func_void_NitroVerifyPurchaseWithProviderResult = std::function<void(const NitroVerifyPurchaseWithProviderResult& /* result */)>;
|
|
1367
|
+
/**
|
|
1368
|
+
* Wrapper class for a `std::function<void(const NitroVerifyPurchaseWithProviderResult& / * result * /)>`, this can be used from Swift.
|
|
1369
|
+
*/
|
|
1370
|
+
class Func_void_NitroVerifyPurchaseWithProviderResult_Wrapper final {
|
|
1371
|
+
public:
|
|
1372
|
+
explicit Func_void_NitroVerifyPurchaseWithProviderResult_Wrapper(std::function<void(const NitroVerifyPurchaseWithProviderResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const NitroVerifyPurchaseWithProviderResult& /* result */)>>(std::move(func))) {}
|
|
1373
|
+
inline void call(NitroVerifyPurchaseWithProviderResult result) const noexcept {
|
|
1374
|
+
_function->operator()(result);
|
|
1375
|
+
}
|
|
1376
|
+
private:
|
|
1377
|
+
std::unique_ptr<std::function<void(const NitroVerifyPurchaseWithProviderResult& /* result */)>> _function;
|
|
1378
|
+
} SWIFT_NONCOPYABLE;
|
|
1379
|
+
Func_void_NitroVerifyPurchaseWithProviderResult create_Func_void_NitroVerifyPurchaseWithProviderResult(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
1380
|
+
inline Func_void_NitroVerifyPurchaseWithProviderResult_Wrapper wrap_Func_void_NitroVerifyPurchaseWithProviderResult(Func_void_NitroVerifyPurchaseWithProviderResult value) noexcept {
|
|
1381
|
+
return Func_void_NitroVerifyPurchaseWithProviderResult_Wrapper(std::move(value));
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
// pragma MARK: std::optional<NitroVerifyPurchaseWithIapkitAppleProps>
|
|
1385
|
+
/**
|
|
1386
|
+
* Specialized version of `std::optional<NitroVerifyPurchaseWithIapkitAppleProps>`.
|
|
1387
|
+
*/
|
|
1388
|
+
using std__optional_NitroVerifyPurchaseWithIapkitAppleProps_ = std::optional<NitroVerifyPurchaseWithIapkitAppleProps>;
|
|
1389
|
+
inline std::optional<NitroVerifyPurchaseWithIapkitAppleProps> create_std__optional_NitroVerifyPurchaseWithIapkitAppleProps_(const NitroVerifyPurchaseWithIapkitAppleProps& value) noexcept {
|
|
1390
|
+
return std::optional<NitroVerifyPurchaseWithIapkitAppleProps>(value);
|
|
1391
|
+
}
|
|
1392
|
+
inline bool has_value_std__optional_NitroVerifyPurchaseWithIapkitAppleProps_(const std::optional<NitroVerifyPurchaseWithIapkitAppleProps>& optional) noexcept {
|
|
1393
|
+
return optional.has_value();
|
|
1394
|
+
}
|
|
1395
|
+
inline NitroVerifyPurchaseWithIapkitAppleProps get_std__optional_NitroVerifyPurchaseWithIapkitAppleProps_(const std::optional<NitroVerifyPurchaseWithIapkitAppleProps>& optional) noexcept {
|
|
1396
|
+
return *optional;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
// pragma MARK: std::optional<NitroVerifyPurchaseWithIapkitGoogleProps>
|
|
1400
|
+
/**
|
|
1401
|
+
* Specialized version of `std::optional<NitroVerifyPurchaseWithIapkitGoogleProps>`.
|
|
1402
|
+
*/
|
|
1403
|
+
using std__optional_NitroVerifyPurchaseWithIapkitGoogleProps_ = std::optional<NitroVerifyPurchaseWithIapkitGoogleProps>;
|
|
1404
|
+
inline std::optional<NitroVerifyPurchaseWithIapkitGoogleProps> create_std__optional_NitroVerifyPurchaseWithIapkitGoogleProps_(const NitroVerifyPurchaseWithIapkitGoogleProps& value) noexcept {
|
|
1405
|
+
return std::optional<NitroVerifyPurchaseWithIapkitGoogleProps>(value);
|
|
1406
|
+
}
|
|
1407
|
+
inline bool has_value_std__optional_NitroVerifyPurchaseWithIapkitGoogleProps_(const std::optional<NitroVerifyPurchaseWithIapkitGoogleProps>& optional) noexcept {
|
|
1408
|
+
return optional.has_value();
|
|
1409
|
+
}
|
|
1410
|
+
inline NitroVerifyPurchaseWithIapkitGoogleProps get_std__optional_NitroVerifyPurchaseWithIapkitGoogleProps_(const std::optional<NitroVerifyPurchaseWithIapkitGoogleProps>& optional) noexcept {
|
|
1411
|
+
return *optional;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
// pragma MARK: std::optional<NitroVerifyPurchaseWithIapkitProps>
|
|
1415
|
+
/**
|
|
1416
|
+
* Specialized version of `std::optional<NitroVerifyPurchaseWithIapkitProps>`.
|
|
1417
|
+
*/
|
|
1418
|
+
using std__optional_NitroVerifyPurchaseWithIapkitProps_ = std::optional<NitroVerifyPurchaseWithIapkitProps>;
|
|
1419
|
+
inline std::optional<NitroVerifyPurchaseWithIapkitProps> create_std__optional_NitroVerifyPurchaseWithIapkitProps_(const NitroVerifyPurchaseWithIapkitProps& value) noexcept {
|
|
1420
|
+
return std::optional<NitroVerifyPurchaseWithIapkitProps>(value);
|
|
1421
|
+
}
|
|
1422
|
+
inline bool has_value_std__optional_NitroVerifyPurchaseWithIapkitProps_(const std::optional<NitroVerifyPurchaseWithIapkitProps>& optional) noexcept {
|
|
1423
|
+
return optional.has_value();
|
|
1424
|
+
}
|
|
1425
|
+
inline NitroVerifyPurchaseWithIapkitProps get_std__optional_NitroVerifyPurchaseWithIapkitProps_(const std::optional<NitroVerifyPurchaseWithIapkitProps>& optional) noexcept {
|
|
1426
|
+
return *optional;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1282
1429
|
// pragma MARK: std::function<void(const UserChoiceBillingDetails& /* details */)>
|
|
1283
1430
|
/**
|
|
1284
1431
|
* Specialized version of `std::function<void(const UserChoiceBillingDetails&)>`.
|
|
@@ -1507,6 +1654,15 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
1507
1654
|
return Result<std::shared_ptr<Promise<std::variant<NitroReceiptValidationResultIOS, NitroReceiptValidationResultAndroid>>>>::withError(error);
|
|
1508
1655
|
}
|
|
1509
1656
|
|
|
1657
|
+
// pragma MARK: Result<std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>>
|
|
1658
|
+
using Result_std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult___ = Result<std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>>;
|
|
1659
|
+
inline Result_std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult___ create_Result_std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult___(const std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>& value) noexcept {
|
|
1660
|
+
return Result<std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>>::withValue(value);
|
|
1661
|
+
}
|
|
1662
|
+
inline Result_std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult___ create_Result_std__shared_ptr_Promise_NitroVerifyPurchaseWithProviderResult___(const std::exception_ptr& error) noexcept {
|
|
1663
|
+
return Result<std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>>::withError(error);
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1510
1666
|
// pragma MARK: Result<std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>>
|
|
1511
1667
|
using Result_std__shared_ptr_Promise_ExternalPurchaseNoticeResultIOS___ = Result<std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>>;
|
|
1512
1668
|
inline Result_std__shared_ptr_Promise_ExternalPurchaseNoticeResultIOS___ create_Result_std__shared_ptr_Promise_ExternalPurchaseNoticeResultIOS___(const std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>& value) noexcept {
|