react-native-iap 14.4.10 → 14.4.11
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 +36 -2
- package/ios/RnIapHelper.swift +32 -1
- package/lib/module/utils/type-bridge.js +39 -1
- package/lib/module/utils/type-bridge.js.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +29 -0
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/utils/type-bridge.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_NitroProduct.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +4 -0
- package/nitrogen/generated/android/c++/JNitroOneTimePurchaseOfferDetail.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroProduct.hpp +16 -2
- package/nitrogen/generated/android/c++/JNitroPurchase.hpp +74 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroOneTimePurchaseOfferDetail.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroProduct.kt +10 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchase.kt +55 -1
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +18 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/swift/NitroOneTimePurchaseOfferDetail.swift +57 -0
- package/nitrogen/generated/ios/swift/NitroProduct.swift +91 -1
- package/nitrogen/generated/ios/swift/NitroPurchase.swift +520 -1
- package/nitrogen/generated/shared/c++/NitroOneTimePurchaseOfferDetail.hpp +75 -0
- package/nitrogen/generated/shared/c++/NitroProduct.hpp +17 -2
- package/nitrogen/generated/shared/c++/NitroPurchase.hpp +74 -2
- package/package.json +3 -3
- package/src/specs/RnIap.nitro.ts +32 -0
- package/src/utils/type-bridge.ts +76 -16
|
@@ -60,6 +60,40 @@ namespace margelo::nitro::iap {
|
|
|
60
60
|
jni::local_ref<jni::JString> originalTransactionIdentifierIOS = this->getFieldValue(fieldOriginalTransactionIdentifierIOS);
|
|
61
61
|
static const auto fieldAppAccountToken = clazz->getField<jni::JString>("appAccountToken");
|
|
62
62
|
jni::local_ref<jni::JString> appAccountToken = this->getFieldValue(fieldAppAccountToken);
|
|
63
|
+
static const auto fieldAppBundleIdIOS = clazz->getField<jni::JString>("appBundleIdIOS");
|
|
64
|
+
jni::local_ref<jni::JString> appBundleIdIOS = this->getFieldValue(fieldAppBundleIdIOS);
|
|
65
|
+
static const auto fieldCountryCodeIOS = clazz->getField<jni::JString>("countryCodeIOS");
|
|
66
|
+
jni::local_ref<jni::JString> countryCodeIOS = this->getFieldValue(fieldCountryCodeIOS);
|
|
67
|
+
static const auto fieldCurrencyCodeIOS = clazz->getField<jni::JString>("currencyCodeIOS");
|
|
68
|
+
jni::local_ref<jni::JString> currencyCodeIOS = this->getFieldValue(fieldCurrencyCodeIOS);
|
|
69
|
+
static const auto fieldCurrencySymbolIOS = clazz->getField<jni::JString>("currencySymbolIOS");
|
|
70
|
+
jni::local_ref<jni::JString> currencySymbolIOS = this->getFieldValue(fieldCurrencySymbolIOS);
|
|
71
|
+
static const auto fieldEnvironmentIOS = clazz->getField<jni::JString>("environmentIOS");
|
|
72
|
+
jni::local_ref<jni::JString> environmentIOS = this->getFieldValue(fieldEnvironmentIOS);
|
|
73
|
+
static const auto fieldExpirationDateIOS = clazz->getField<jni::JDouble>("expirationDateIOS");
|
|
74
|
+
jni::local_ref<jni::JDouble> expirationDateIOS = this->getFieldValue(fieldExpirationDateIOS);
|
|
75
|
+
static const auto fieldIsUpgradedIOS = clazz->getField<jni::JBoolean>("isUpgradedIOS");
|
|
76
|
+
jni::local_ref<jni::JBoolean> isUpgradedIOS = this->getFieldValue(fieldIsUpgradedIOS);
|
|
77
|
+
static const auto fieldOfferIOS = clazz->getField<jni::JString>("offerIOS");
|
|
78
|
+
jni::local_ref<jni::JString> offerIOS = this->getFieldValue(fieldOfferIOS);
|
|
79
|
+
static const auto fieldOwnershipTypeIOS = clazz->getField<jni::JString>("ownershipTypeIOS");
|
|
80
|
+
jni::local_ref<jni::JString> ownershipTypeIOS = this->getFieldValue(fieldOwnershipTypeIOS);
|
|
81
|
+
static const auto fieldReasonIOS = clazz->getField<jni::JString>("reasonIOS");
|
|
82
|
+
jni::local_ref<jni::JString> reasonIOS = this->getFieldValue(fieldReasonIOS);
|
|
83
|
+
static const auto fieldReasonStringRepresentationIOS = clazz->getField<jni::JString>("reasonStringRepresentationIOS");
|
|
84
|
+
jni::local_ref<jni::JString> reasonStringRepresentationIOS = this->getFieldValue(fieldReasonStringRepresentationIOS);
|
|
85
|
+
static const auto fieldRevocationDateIOS = clazz->getField<jni::JDouble>("revocationDateIOS");
|
|
86
|
+
jni::local_ref<jni::JDouble> revocationDateIOS = this->getFieldValue(fieldRevocationDateIOS);
|
|
87
|
+
static const auto fieldRevocationReasonIOS = clazz->getField<jni::JString>("revocationReasonIOS");
|
|
88
|
+
jni::local_ref<jni::JString> revocationReasonIOS = this->getFieldValue(fieldRevocationReasonIOS);
|
|
89
|
+
static const auto fieldStorefrontCountryCodeIOS = clazz->getField<jni::JString>("storefrontCountryCodeIOS");
|
|
90
|
+
jni::local_ref<jni::JString> storefrontCountryCodeIOS = this->getFieldValue(fieldStorefrontCountryCodeIOS);
|
|
91
|
+
static const auto fieldSubscriptionGroupIdIOS = clazz->getField<jni::JString>("subscriptionGroupIdIOS");
|
|
92
|
+
jni::local_ref<jni::JString> subscriptionGroupIdIOS = this->getFieldValue(fieldSubscriptionGroupIdIOS);
|
|
93
|
+
static const auto fieldTransactionReasonIOS = clazz->getField<jni::JString>("transactionReasonIOS");
|
|
94
|
+
jni::local_ref<jni::JString> transactionReasonIOS = this->getFieldValue(fieldTransactionReasonIOS);
|
|
95
|
+
static const auto fieldWebOrderLineItemIdIOS = clazz->getField<jni::JString>("webOrderLineItemIdIOS");
|
|
96
|
+
jni::local_ref<jni::JString> webOrderLineItemIdIOS = this->getFieldValue(fieldWebOrderLineItemIdIOS);
|
|
63
97
|
static const auto fieldPurchaseTokenAndroid = clazz->getField<jni::JString>("purchaseTokenAndroid");
|
|
64
98
|
jni::local_ref<jni::JString> purchaseTokenAndroid = this->getFieldValue(fieldPurchaseTokenAndroid);
|
|
65
99
|
static const auto fieldDataAndroid = clazz->getField<jni::JString>("dataAndroid");
|
|
@@ -78,6 +112,8 @@ namespace margelo::nitro::iap {
|
|
|
78
112
|
jni::local_ref<jni::JString> obfuscatedAccountIdAndroid = this->getFieldValue(fieldObfuscatedAccountIdAndroid);
|
|
79
113
|
static const auto fieldObfuscatedProfileIdAndroid = clazz->getField<jni::JString>("obfuscatedProfileIdAndroid");
|
|
80
114
|
jni::local_ref<jni::JString> obfuscatedProfileIdAndroid = this->getFieldValue(fieldObfuscatedProfileIdAndroid);
|
|
115
|
+
static const auto fieldDeveloperPayloadAndroid = clazz->getField<jni::JString>("developerPayloadAndroid");
|
|
116
|
+
jni::local_ref<jni::JString> developerPayloadAndroid = this->getFieldValue(fieldDeveloperPayloadAndroid);
|
|
81
117
|
return NitroPurchase(
|
|
82
118
|
id->toStdString(),
|
|
83
119
|
productId->toStdString(),
|
|
@@ -91,6 +127,23 @@ namespace margelo::nitro::iap {
|
|
|
91
127
|
originalTransactionDateIOS != nullptr ? std::make_optional(originalTransactionDateIOS->value()) : std::nullopt,
|
|
92
128
|
originalTransactionIdentifierIOS != nullptr ? std::make_optional(originalTransactionIdentifierIOS->toStdString()) : std::nullopt,
|
|
93
129
|
appAccountToken != nullptr ? std::make_optional(appAccountToken->toStdString()) : std::nullopt,
|
|
130
|
+
appBundleIdIOS != nullptr ? std::make_optional(appBundleIdIOS->toStdString()) : std::nullopt,
|
|
131
|
+
countryCodeIOS != nullptr ? std::make_optional(countryCodeIOS->toStdString()) : std::nullopt,
|
|
132
|
+
currencyCodeIOS != nullptr ? std::make_optional(currencyCodeIOS->toStdString()) : std::nullopt,
|
|
133
|
+
currencySymbolIOS != nullptr ? std::make_optional(currencySymbolIOS->toStdString()) : std::nullopt,
|
|
134
|
+
environmentIOS != nullptr ? std::make_optional(environmentIOS->toStdString()) : std::nullopt,
|
|
135
|
+
expirationDateIOS != nullptr ? std::make_optional(expirationDateIOS->value()) : std::nullopt,
|
|
136
|
+
isUpgradedIOS != nullptr ? std::make_optional(static_cast<bool>(isUpgradedIOS->value())) : std::nullopt,
|
|
137
|
+
offerIOS != nullptr ? std::make_optional(offerIOS->toStdString()) : std::nullopt,
|
|
138
|
+
ownershipTypeIOS != nullptr ? std::make_optional(ownershipTypeIOS->toStdString()) : std::nullopt,
|
|
139
|
+
reasonIOS != nullptr ? std::make_optional(reasonIOS->toStdString()) : std::nullopt,
|
|
140
|
+
reasonStringRepresentationIOS != nullptr ? std::make_optional(reasonStringRepresentationIOS->toStdString()) : std::nullopt,
|
|
141
|
+
revocationDateIOS != nullptr ? std::make_optional(revocationDateIOS->value()) : std::nullopt,
|
|
142
|
+
revocationReasonIOS != nullptr ? std::make_optional(revocationReasonIOS->toStdString()) : std::nullopt,
|
|
143
|
+
storefrontCountryCodeIOS != nullptr ? std::make_optional(storefrontCountryCodeIOS->toStdString()) : std::nullopt,
|
|
144
|
+
subscriptionGroupIdIOS != nullptr ? std::make_optional(subscriptionGroupIdIOS->toStdString()) : std::nullopt,
|
|
145
|
+
transactionReasonIOS != nullptr ? std::make_optional(transactionReasonIOS->toStdString()) : std::nullopt,
|
|
146
|
+
webOrderLineItemIdIOS != nullptr ? std::make_optional(webOrderLineItemIdIOS->toStdString()) : std::nullopt,
|
|
94
147
|
purchaseTokenAndroid != nullptr ? std::make_optional(purchaseTokenAndroid->toStdString()) : std::nullopt,
|
|
95
148
|
dataAndroid != nullptr ? std::make_optional(dataAndroid->toStdString()) : std::nullopt,
|
|
96
149
|
signatureAndroid != nullptr ? std::make_optional(signatureAndroid->toStdString()) : std::nullopt,
|
|
@@ -99,7 +152,8 @@ namespace margelo::nitro::iap {
|
|
|
99
152
|
isAcknowledgedAndroid != nullptr ? std::make_optional(static_cast<bool>(isAcknowledgedAndroid->value())) : std::nullopt,
|
|
100
153
|
packageNameAndroid != nullptr ? std::make_optional(packageNameAndroid->toStdString()) : std::nullopt,
|
|
101
154
|
obfuscatedAccountIdAndroid != nullptr ? std::make_optional(obfuscatedAccountIdAndroid->toStdString()) : std::nullopt,
|
|
102
|
-
obfuscatedProfileIdAndroid != nullptr ? std::make_optional(obfuscatedProfileIdAndroid->toStdString()) : std::nullopt
|
|
155
|
+
obfuscatedProfileIdAndroid != nullptr ? std::make_optional(obfuscatedProfileIdAndroid->toStdString()) : std::nullopt,
|
|
156
|
+
developerPayloadAndroid != nullptr ? std::make_optional(developerPayloadAndroid->toStdString()) : std::nullopt
|
|
103
157
|
);
|
|
104
158
|
}
|
|
105
159
|
|
|
@@ -122,6 +176,23 @@ namespace margelo::nitro::iap {
|
|
|
122
176
|
value.originalTransactionDateIOS.has_value() ? jni::JDouble::valueOf(value.originalTransactionDateIOS.value()) : nullptr,
|
|
123
177
|
value.originalTransactionIdentifierIOS.has_value() ? jni::make_jstring(value.originalTransactionIdentifierIOS.value()) : nullptr,
|
|
124
178
|
value.appAccountToken.has_value() ? jni::make_jstring(value.appAccountToken.value()) : nullptr,
|
|
179
|
+
value.appBundleIdIOS.has_value() ? jni::make_jstring(value.appBundleIdIOS.value()) : nullptr,
|
|
180
|
+
value.countryCodeIOS.has_value() ? jni::make_jstring(value.countryCodeIOS.value()) : nullptr,
|
|
181
|
+
value.currencyCodeIOS.has_value() ? jni::make_jstring(value.currencyCodeIOS.value()) : nullptr,
|
|
182
|
+
value.currencySymbolIOS.has_value() ? jni::make_jstring(value.currencySymbolIOS.value()) : nullptr,
|
|
183
|
+
value.environmentIOS.has_value() ? jni::make_jstring(value.environmentIOS.value()) : nullptr,
|
|
184
|
+
value.expirationDateIOS.has_value() ? jni::JDouble::valueOf(value.expirationDateIOS.value()) : nullptr,
|
|
185
|
+
value.isUpgradedIOS.has_value() ? jni::JBoolean::valueOf(value.isUpgradedIOS.value()) : nullptr,
|
|
186
|
+
value.offerIOS.has_value() ? jni::make_jstring(value.offerIOS.value()) : nullptr,
|
|
187
|
+
value.ownershipTypeIOS.has_value() ? jni::make_jstring(value.ownershipTypeIOS.value()) : nullptr,
|
|
188
|
+
value.reasonIOS.has_value() ? jni::make_jstring(value.reasonIOS.value()) : nullptr,
|
|
189
|
+
value.reasonStringRepresentationIOS.has_value() ? jni::make_jstring(value.reasonStringRepresentationIOS.value()) : nullptr,
|
|
190
|
+
value.revocationDateIOS.has_value() ? jni::JDouble::valueOf(value.revocationDateIOS.value()) : nullptr,
|
|
191
|
+
value.revocationReasonIOS.has_value() ? jni::make_jstring(value.revocationReasonIOS.value()) : nullptr,
|
|
192
|
+
value.storefrontCountryCodeIOS.has_value() ? jni::make_jstring(value.storefrontCountryCodeIOS.value()) : nullptr,
|
|
193
|
+
value.subscriptionGroupIdIOS.has_value() ? jni::make_jstring(value.subscriptionGroupIdIOS.value()) : nullptr,
|
|
194
|
+
value.transactionReasonIOS.has_value() ? jni::make_jstring(value.transactionReasonIOS.value()) : nullptr,
|
|
195
|
+
value.webOrderLineItemIdIOS.has_value() ? jni::make_jstring(value.webOrderLineItemIdIOS.value()) : nullptr,
|
|
125
196
|
value.purchaseTokenAndroid.has_value() ? jni::make_jstring(value.purchaseTokenAndroid.value()) : nullptr,
|
|
126
197
|
value.dataAndroid.has_value() ? jni::make_jstring(value.dataAndroid.value()) : nullptr,
|
|
127
198
|
value.signatureAndroid.has_value() ? jni::make_jstring(value.signatureAndroid.value()) : nullptr,
|
|
@@ -130,7 +201,8 @@ namespace margelo::nitro::iap {
|
|
|
130
201
|
value.isAcknowledgedAndroid.has_value() ? jni::JBoolean::valueOf(value.isAcknowledgedAndroid.value()) : nullptr,
|
|
131
202
|
value.packageNameAndroid.has_value() ? jni::make_jstring(value.packageNameAndroid.value()) : nullptr,
|
|
132
203
|
value.obfuscatedAccountIdAndroid.has_value() ? jni::make_jstring(value.obfuscatedAccountIdAndroid.value()) : nullptr,
|
|
133
|
-
value.obfuscatedProfileIdAndroid.has_value() ? jni::make_jstring(value.obfuscatedProfileIdAndroid.value()) : nullptr
|
|
204
|
+
value.obfuscatedProfileIdAndroid.has_value() ? jni::make_jstring(value.obfuscatedProfileIdAndroid.value()) : nullptr,
|
|
205
|
+
value.developerPayloadAndroid.has_value() ? jni::make_jstring(value.developerPayloadAndroid.value()) : nullptr
|
|
134
206
|
);
|
|
135
207
|
}
|
|
136
208
|
};
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroOneTimePurchaseOfferDetail.kt
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroOneTimePurchaseOfferDetail.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
|
+
import com.margelo.nitro.core.*
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "NitroOneTimePurchaseOfferDetail".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class NitroOneTimePurchaseOfferDetail
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val formattedPrice: String,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val priceAmountMicros: String,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val priceCurrencyCode: String
|
|
33
|
+
) {
|
|
34
|
+
/* main constructor */
|
|
35
|
+
}
|
|
@@ -59,6 +59,9 @@ data class NitroProduct
|
|
|
59
59
|
val jsonRepresentationIOS: String?,
|
|
60
60
|
@DoNotStrip
|
|
61
61
|
@Keep
|
|
62
|
+
val discountsIOS: String?,
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
62
65
|
val introductoryPriceIOS: String?,
|
|
63
66
|
@DoNotStrip
|
|
64
67
|
@Keep
|
|
@@ -80,6 +83,9 @@ data class NitroProduct
|
|
|
80
83
|
val subscriptionPeriodUnitIOS: String?,
|
|
81
84
|
@DoNotStrip
|
|
82
85
|
@Keep
|
|
86
|
+
val nameAndroid: String?,
|
|
87
|
+
@DoNotStrip
|
|
88
|
+
@Keep
|
|
83
89
|
val originalPriceAndroid: String?,
|
|
84
90
|
@DoNotStrip
|
|
85
91
|
@Keep
|
|
@@ -101,7 +107,10 @@ data class NitroProduct
|
|
|
101
107
|
val freeTrialPeriodAndroid: String?,
|
|
102
108
|
@DoNotStrip
|
|
103
109
|
@Keep
|
|
104
|
-
val subscriptionOfferDetailsAndroid: String
|
|
110
|
+
val subscriptionOfferDetailsAndroid: String?,
|
|
111
|
+
@DoNotStrip
|
|
112
|
+
@Keep
|
|
113
|
+
val oneTimePurchaseOfferDetailsAndroid: NitroOneTimePurchaseOfferDetail?
|
|
105
114
|
) {
|
|
106
115
|
/* main constructor */
|
|
107
116
|
}
|
|
@@ -59,6 +59,57 @@ data class NitroPurchase
|
|
|
59
59
|
val appAccountToken: String?,
|
|
60
60
|
@DoNotStrip
|
|
61
61
|
@Keep
|
|
62
|
+
val appBundleIdIOS: String?,
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
65
|
+
val countryCodeIOS: String?,
|
|
66
|
+
@DoNotStrip
|
|
67
|
+
@Keep
|
|
68
|
+
val currencyCodeIOS: String?,
|
|
69
|
+
@DoNotStrip
|
|
70
|
+
@Keep
|
|
71
|
+
val currencySymbolIOS: String?,
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
@Keep
|
|
74
|
+
val environmentIOS: String?,
|
|
75
|
+
@DoNotStrip
|
|
76
|
+
@Keep
|
|
77
|
+
val expirationDateIOS: Double?,
|
|
78
|
+
@DoNotStrip
|
|
79
|
+
@Keep
|
|
80
|
+
val isUpgradedIOS: Boolean?,
|
|
81
|
+
@DoNotStrip
|
|
82
|
+
@Keep
|
|
83
|
+
val offerIOS: String?,
|
|
84
|
+
@DoNotStrip
|
|
85
|
+
@Keep
|
|
86
|
+
val ownershipTypeIOS: String?,
|
|
87
|
+
@DoNotStrip
|
|
88
|
+
@Keep
|
|
89
|
+
val reasonIOS: String?,
|
|
90
|
+
@DoNotStrip
|
|
91
|
+
@Keep
|
|
92
|
+
val reasonStringRepresentationIOS: String?,
|
|
93
|
+
@DoNotStrip
|
|
94
|
+
@Keep
|
|
95
|
+
val revocationDateIOS: Double?,
|
|
96
|
+
@DoNotStrip
|
|
97
|
+
@Keep
|
|
98
|
+
val revocationReasonIOS: String?,
|
|
99
|
+
@DoNotStrip
|
|
100
|
+
@Keep
|
|
101
|
+
val storefrontCountryCodeIOS: String?,
|
|
102
|
+
@DoNotStrip
|
|
103
|
+
@Keep
|
|
104
|
+
val subscriptionGroupIdIOS: String?,
|
|
105
|
+
@DoNotStrip
|
|
106
|
+
@Keep
|
|
107
|
+
val transactionReasonIOS: String?,
|
|
108
|
+
@DoNotStrip
|
|
109
|
+
@Keep
|
|
110
|
+
val webOrderLineItemIdIOS: String?,
|
|
111
|
+
@DoNotStrip
|
|
112
|
+
@Keep
|
|
62
113
|
val purchaseTokenAndroid: String?,
|
|
63
114
|
@DoNotStrip
|
|
64
115
|
@Keep
|
|
@@ -83,7 +134,10 @@ data class NitroPurchase
|
|
|
83
134
|
val obfuscatedAccountIdAndroid: String?,
|
|
84
135
|
@DoNotStrip
|
|
85
136
|
@Keep
|
|
86
|
-
val obfuscatedProfileIdAndroid: String
|
|
137
|
+
val obfuscatedProfileIdAndroid: String?,
|
|
138
|
+
@DoNotStrip
|
|
139
|
+
@Keep
|
|
140
|
+
val developerPayloadAndroid: String?
|
|
87
141
|
) {
|
|
88
142
|
/* main constructor */
|
|
89
143
|
}
|
|
@@ -26,6 +26,8 @@ namespace margelo::nitro::iap { struct NitroAvailablePurchasesOptions; }
|
|
|
26
26
|
namespace margelo::nitro::iap { struct NitroFinishTransactionAndroidParams; }
|
|
27
27
|
// Forward declaration of `NitroFinishTransactionIosParams` to properly resolve imports.
|
|
28
28
|
namespace margelo::nitro::iap { struct NitroFinishTransactionIosParams; }
|
|
29
|
+
// Forward declaration of `NitroOneTimePurchaseOfferDetail` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::iap { struct NitroOneTimePurchaseOfferDetail; }
|
|
29
31
|
// Forward declaration of `NitroProduct` to properly resolve imports.
|
|
30
32
|
namespace margelo::nitro::iap { struct NitroProduct; }
|
|
31
33
|
// Forward declaration of `NitroPurchaseResult` to properly resolve imports.
|
|
@@ -69,6 +71,7 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
69
71
|
#include "NitroAvailablePurchasesOptions.hpp"
|
|
70
72
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
71
73
|
#include "NitroFinishTransactionIosParams.hpp"
|
|
74
|
+
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
72
75
|
#include "NitroProduct.hpp"
|
|
73
76
|
#include "NitroPurchase.hpp"
|
|
74
77
|
#include "NitroPurchaseResult.hpp"
|
|
@@ -202,6 +205,21 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
202
205
|
return *optional;
|
|
203
206
|
}
|
|
204
207
|
|
|
208
|
+
// pragma MARK: std::optional<NitroOneTimePurchaseOfferDetail>
|
|
209
|
+
/**
|
|
210
|
+
* Specialized version of `std::optional<NitroOneTimePurchaseOfferDetail>`.
|
|
211
|
+
*/
|
|
212
|
+
using std__optional_NitroOneTimePurchaseOfferDetail_ = std::optional<NitroOneTimePurchaseOfferDetail>;
|
|
213
|
+
inline std::optional<NitroOneTimePurchaseOfferDetail> create_std__optional_NitroOneTimePurchaseOfferDetail_(const NitroOneTimePurchaseOfferDetail& value) noexcept {
|
|
214
|
+
return std::optional<NitroOneTimePurchaseOfferDetail>(value);
|
|
215
|
+
}
|
|
216
|
+
inline bool has_value_std__optional_NitroOneTimePurchaseOfferDetail_(const std::optional<NitroOneTimePurchaseOfferDetail>& optional) noexcept {
|
|
217
|
+
return optional.has_value();
|
|
218
|
+
}
|
|
219
|
+
inline NitroOneTimePurchaseOfferDetail get_std__optional_NitroOneTimePurchaseOfferDetail_(const std::optional<NitroOneTimePurchaseOfferDetail>& optional) noexcept {
|
|
220
|
+
return *optional;
|
|
221
|
+
}
|
|
222
|
+
|
|
205
223
|
// pragma MARK: std::vector<NitroProduct>
|
|
206
224
|
/**
|
|
207
225
|
* Specialized version of `std::vector<NitroProduct>`.
|
|
@@ -30,6 +30,8 @@ namespace margelo::nitro::iap { struct NitroFinishTransactionAndroidParams; }
|
|
|
30
30
|
namespace margelo::nitro::iap { struct NitroFinishTransactionIosParams; }
|
|
31
31
|
// Forward declaration of `NitroFinishTransactionParams` to properly resolve imports.
|
|
32
32
|
namespace margelo::nitro::iap { struct NitroFinishTransactionParams; }
|
|
33
|
+
// Forward declaration of `NitroOneTimePurchaseOfferDetail` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::iap { struct NitroOneTimePurchaseOfferDetail; }
|
|
33
35
|
// Forward declaration of `NitroProduct` to properly resolve imports.
|
|
34
36
|
namespace margelo::nitro::iap { struct NitroProduct; }
|
|
35
37
|
// Forward declaration of `NitroPurchaseRequest` to properly resolve imports.
|
|
@@ -75,6 +77,7 @@ namespace margelo::nitro::iap { enum class PurchaseState; }
|
|
|
75
77
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
76
78
|
#include "NitroFinishTransactionIosParams.hpp"
|
|
77
79
|
#include "NitroFinishTransactionParams.hpp"
|
|
80
|
+
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
78
81
|
#include "NitroProduct.hpp"
|
|
79
82
|
#include "NitroPurchase.hpp"
|
|
80
83
|
#include "NitroPurchaseRequest.hpp"
|
|
@@ -16,6 +16,8 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
16
16
|
namespace margelo::nitro::iap { struct NitroProduct; }
|
|
17
17
|
// Forward declaration of `IapPlatform` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::iap { enum class IapPlatform; }
|
|
19
|
+
// Forward declaration of `NitroOneTimePurchaseOfferDetail` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::iap { struct NitroOneTimePurchaseOfferDetail; }
|
|
19
21
|
// Forward declaration of `PurchaseAndroid` to properly resolve imports.
|
|
20
22
|
namespace margelo::nitro::iap { struct PurchaseAndroid; }
|
|
21
23
|
// Forward declaration of `PurchaseIOS` to properly resolve imports.
|
|
@@ -71,6 +73,7 @@ namespace margelo::nitro::iap { struct NitroDeepLinkOptionsAndroid; }
|
|
|
71
73
|
#include <string>
|
|
72
74
|
#include <optional>
|
|
73
75
|
#include "IapPlatform.hpp"
|
|
76
|
+
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
74
77
|
#include "PurchaseAndroid.hpp"
|
|
75
78
|
#include "PurchaseIOS.hpp"
|
|
76
79
|
#include <variant>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroOneTimePurchaseOfferDetail.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroOneTimePurchaseOfferDetail`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroOneTimePurchaseOfferDetail = margelo.nitro.iap.NitroOneTimePurchaseOfferDetail
|
|
14
|
+
|
|
15
|
+
public extension NitroOneTimePurchaseOfferDetail {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroOneTimePurchaseOfferDetail`.
|
|
20
|
+
*/
|
|
21
|
+
init(formattedPrice: String, priceAmountMicros: String, priceCurrencyCode: String) {
|
|
22
|
+
self.init(std.string(formattedPrice), std.string(priceAmountMicros), std.string(priceCurrencyCode))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var formattedPrice: String {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return String(self.__formattedPrice)
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__formattedPrice = std.string(newValue)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var priceAmountMicros: String {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return String(self.__priceAmountMicros)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__priceAmountMicros = std.string(newValue)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var priceCurrencyCode: String {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return String(self.__priceCurrencyCode)
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__priceCurrencyCode = std.string(newValue)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -18,7 +18,7 @@ public extension NitroProduct {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `NitroProduct`.
|
|
20
20
|
*/
|
|
21
|
-
init(id: String, title: String, description: String, type: String, displayName: String?, displayPrice: String?, currency: String?, price: Double?, platform: IapPlatform, typeIOS: String?, isFamilyShareableIOS: Bool?, jsonRepresentationIOS: String?, introductoryPriceIOS: String?, introductoryPriceAsAmountIOS: Double?, introductoryPriceNumberOfPeriodsIOS: Double?, introductoryPricePaymentModeIOS: String?, introductoryPriceSubscriptionPeriodIOS: String?, subscriptionPeriodNumberIOS: Double?, subscriptionPeriodUnitIOS: String?, originalPriceAndroid: String?, originalPriceAmountMicrosAndroid: Double?, introductoryPriceCyclesAndroid: Double?, introductoryPricePeriodAndroid: String?, introductoryPriceValueAndroid: Double?, subscriptionPeriodAndroid: String?, freeTrialPeriodAndroid: String?, subscriptionOfferDetailsAndroid: String?) {
|
|
21
|
+
init(id: String, title: String, description: String, type: String, displayName: String?, displayPrice: String?, currency: String?, price: Double?, platform: IapPlatform, typeIOS: String?, isFamilyShareableIOS: Bool?, jsonRepresentationIOS: String?, discountsIOS: String?, introductoryPriceIOS: String?, introductoryPriceAsAmountIOS: Double?, introductoryPriceNumberOfPeriodsIOS: Double?, introductoryPricePaymentModeIOS: String?, introductoryPriceSubscriptionPeriodIOS: String?, subscriptionPeriodNumberIOS: Double?, subscriptionPeriodUnitIOS: String?, nameAndroid: String?, originalPriceAndroid: String?, originalPriceAmountMicrosAndroid: Double?, introductoryPriceCyclesAndroid: Double?, introductoryPricePeriodAndroid: String?, introductoryPriceValueAndroid: Double?, subscriptionPeriodAndroid: String?, freeTrialPeriodAndroid: String?, subscriptionOfferDetailsAndroid: String?, oneTimePurchaseOfferDetailsAndroid: NitroOneTimePurchaseOfferDetail?) {
|
|
22
22
|
self.init(std.string(id), std.string(title), std.string(description), std.string(type), { () -> bridge.std__optional_std__string_ in
|
|
23
23
|
if let __unwrappedValue = displayName {
|
|
24
24
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
@@ -61,6 +61,12 @@ public extension NitroProduct {
|
|
|
61
61
|
} else {
|
|
62
62
|
return .init()
|
|
63
63
|
}
|
|
64
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
65
|
+
if let __unwrappedValue = discountsIOS {
|
|
66
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
67
|
+
} else {
|
|
68
|
+
return .init()
|
|
69
|
+
}
|
|
64
70
|
}(), { () -> bridge.std__optional_std__string_ in
|
|
65
71
|
if let __unwrappedValue = introductoryPriceIOS {
|
|
66
72
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
@@ -103,6 +109,12 @@ public extension NitroProduct {
|
|
|
103
109
|
} else {
|
|
104
110
|
return .init()
|
|
105
111
|
}
|
|
112
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
113
|
+
if let __unwrappedValue = nameAndroid {
|
|
114
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
115
|
+
} else {
|
|
116
|
+
return .init()
|
|
117
|
+
}
|
|
106
118
|
}(), { () -> bridge.std__optional_std__string_ in
|
|
107
119
|
if let __unwrappedValue = originalPriceAndroid {
|
|
108
120
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
@@ -151,6 +163,12 @@ public extension NitroProduct {
|
|
|
151
163
|
} else {
|
|
152
164
|
return .init()
|
|
153
165
|
}
|
|
166
|
+
}(), { () -> bridge.std__optional_NitroOneTimePurchaseOfferDetail_ in
|
|
167
|
+
if let __unwrappedValue = oneTimePurchaseOfferDetailsAndroid {
|
|
168
|
+
return bridge.create_std__optional_NitroOneTimePurchaseOfferDetail_(__unwrappedValue)
|
|
169
|
+
} else {
|
|
170
|
+
return .init()
|
|
171
|
+
}
|
|
154
172
|
}())
|
|
155
173
|
}
|
|
156
174
|
|
|
@@ -363,6 +381,30 @@ public extension NitroProduct {
|
|
|
363
381
|
}
|
|
364
382
|
}
|
|
365
383
|
|
|
384
|
+
var discountsIOS: String? {
|
|
385
|
+
@inline(__always)
|
|
386
|
+
get {
|
|
387
|
+
return { () -> String? in
|
|
388
|
+
if bridge.has_value_std__optional_std__string_(self.__discountsIOS) {
|
|
389
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__discountsIOS)
|
|
390
|
+
return String(__unwrapped)
|
|
391
|
+
} else {
|
|
392
|
+
return nil
|
|
393
|
+
}
|
|
394
|
+
}()
|
|
395
|
+
}
|
|
396
|
+
@inline(__always)
|
|
397
|
+
set {
|
|
398
|
+
self.__discountsIOS = { () -> bridge.std__optional_std__string_ in
|
|
399
|
+
if let __unwrappedValue = newValue {
|
|
400
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
401
|
+
} else {
|
|
402
|
+
return .init()
|
|
403
|
+
}
|
|
404
|
+
}()
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
366
408
|
var introductoryPriceIOS: String? {
|
|
367
409
|
@inline(__always)
|
|
368
410
|
get {
|
|
@@ -510,6 +552,30 @@ public extension NitroProduct {
|
|
|
510
552
|
}
|
|
511
553
|
}
|
|
512
554
|
|
|
555
|
+
var nameAndroid: String? {
|
|
556
|
+
@inline(__always)
|
|
557
|
+
get {
|
|
558
|
+
return { () -> String? in
|
|
559
|
+
if bridge.has_value_std__optional_std__string_(self.__nameAndroid) {
|
|
560
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__nameAndroid)
|
|
561
|
+
return String(__unwrapped)
|
|
562
|
+
} else {
|
|
563
|
+
return nil
|
|
564
|
+
}
|
|
565
|
+
}()
|
|
566
|
+
}
|
|
567
|
+
@inline(__always)
|
|
568
|
+
set {
|
|
569
|
+
self.__nameAndroid = { () -> bridge.std__optional_std__string_ in
|
|
570
|
+
if let __unwrappedValue = newValue {
|
|
571
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
572
|
+
} else {
|
|
573
|
+
return .init()
|
|
574
|
+
}
|
|
575
|
+
}()
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
513
579
|
var originalPriceAndroid: String? {
|
|
514
580
|
@inline(__always)
|
|
515
581
|
get {
|
|
@@ -680,4 +746,28 @@ public extension NitroProduct {
|
|
|
680
746
|
}()
|
|
681
747
|
}
|
|
682
748
|
}
|
|
749
|
+
|
|
750
|
+
var oneTimePurchaseOfferDetailsAndroid: NitroOneTimePurchaseOfferDetail? {
|
|
751
|
+
@inline(__always)
|
|
752
|
+
get {
|
|
753
|
+
return { () -> NitroOneTimePurchaseOfferDetail? in
|
|
754
|
+
if bridge.has_value_std__optional_NitroOneTimePurchaseOfferDetail_(self.__oneTimePurchaseOfferDetailsAndroid) {
|
|
755
|
+
let __unwrapped = bridge.get_std__optional_NitroOneTimePurchaseOfferDetail_(self.__oneTimePurchaseOfferDetailsAndroid)
|
|
756
|
+
return __unwrapped
|
|
757
|
+
} else {
|
|
758
|
+
return nil
|
|
759
|
+
}
|
|
760
|
+
}()
|
|
761
|
+
}
|
|
762
|
+
@inline(__always)
|
|
763
|
+
set {
|
|
764
|
+
self.__oneTimePurchaseOfferDetailsAndroid = { () -> bridge.std__optional_NitroOneTimePurchaseOfferDetail_ in
|
|
765
|
+
if let __unwrappedValue = newValue {
|
|
766
|
+
return bridge.create_std__optional_NitroOneTimePurchaseOfferDetail_(__unwrappedValue)
|
|
767
|
+
} else {
|
|
768
|
+
return .init()
|
|
769
|
+
}
|
|
770
|
+
}()
|
|
771
|
+
}
|
|
772
|
+
}
|
|
683
773
|
}
|