react-native-iap 14.5.0 → 14.5.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +47 -7
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/lib/module/types.js +35 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/type-bridge.js +2 -1
- package/lib/module/utils/type-bridge.js.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +54 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +127 -14
- package/lib/typescript/src/types.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 +13 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +24 -0
- package/nitrogen/generated/android/c++/JNitroDiscountAmountAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroDiscountDisplayInfoAndroid.hpp +64 -0
- package/nitrogen/generated/android/c++/JNitroLimitedQuantityInfoAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroOneTimePurchaseOfferDetail.hpp +70 -3
- package/nitrogen/generated/android/c++/JNitroPreorderDetailsAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroProduct.hpp +35 -5
- package/nitrogen/generated/android/c++/JNitroPurchase.hpp +7 -3
- package/nitrogen/generated/android/c++/JNitroRentalDetailsAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroValidTimeWindowAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JPurchaseAndroid.hpp +5 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroDiscountAmountAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroDiscountDisplayInfoAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroLimitedQuantityInfoAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroOneTimePurchaseOfferDetail.kt +30 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPreorderDetailsAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroProduct.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchase.kt +6 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRentalDetailsAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroValidTimeWindowAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseAndroid.kt +5 -2
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +137 -18
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +18 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +18 -0
- package/nitrogen/generated/ios/swift/NitroDiscountAmountAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroDiscountDisplayInfoAndroid.swift +70 -0
- package/nitrogen/generated/ios/swift/NitroLimitedQuantityInfoAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroOneTimePurchaseOfferDetail.swift +211 -2
- package/nitrogen/generated/ios/swift/NitroPreorderDetailsAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroProduct.swift +26 -7
- package/nitrogen/generated/ios/swift/NitroPurchase.swift +31 -1
- package/nitrogen/generated/ios/swift/NitroRentalDetailsAndroid.swift +65 -0
- package/nitrogen/generated/ios/swift/NitroValidTimeWindowAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/PurchaseAndroid.swift +32 -2
- package/nitrogen/generated/shared/c++/NitroDiscountAmountAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroDiscountDisplayInfoAndroid.hpp +81 -0
- package/nitrogen/generated/shared/c++/NitroLimitedQuantityInfoAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroOneTimePurchaseOfferDetail.hpp +55 -3
- package/nitrogen/generated/shared/c++/NitroPreorderDetailsAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroProduct.hpp +6 -5
- package/nitrogen/generated/shared/c++/NitroPurchase.hpp +6 -2
- package/nitrogen/generated/shared/c++/NitroRentalDetailsAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroValidTimeWindowAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/PurchaseAndroid.hpp +5 -1
- package/openiap-versions.json +2 -2
- package/package.json +1 -1
- package/plugin/build/src/withIAP.d.ts +3 -0
- package/plugin/build/src/withIAP.js +81 -0
- package/plugin/build/tsconfig.tsbuildinfo +1 -0
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/src/specs/RnIap.nitro.ts +60 -1
- package/src/types.ts +133 -14
- package/src/utils/type-bridge.ts +1 -0
|
@@ -38,12 +38,20 @@ namespace margelo::nitro::iap { enum class NitroAvailablePurchasesAndroidType; }
|
|
|
38
38
|
namespace margelo::nitro::iap { struct NitroAvailablePurchasesIosOptions; }
|
|
39
39
|
// Forward declaration of `NitroAvailablePurchasesOptions` to properly resolve imports.
|
|
40
40
|
namespace margelo::nitro::iap { struct NitroAvailablePurchasesOptions; }
|
|
41
|
+
// Forward declaration of `NitroDiscountAmountAndroid` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::iap { struct NitroDiscountAmountAndroid; }
|
|
43
|
+
// Forward declaration of `NitroDiscountDisplayInfoAndroid` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::iap { struct NitroDiscountDisplayInfoAndroid; }
|
|
41
45
|
// Forward declaration of `NitroFinishTransactionAndroidParams` to properly resolve imports.
|
|
42
46
|
namespace margelo::nitro::iap { struct NitroFinishTransactionAndroidParams; }
|
|
43
47
|
// Forward declaration of `NitroFinishTransactionIosParams` to properly resolve imports.
|
|
44
48
|
namespace margelo::nitro::iap { struct NitroFinishTransactionIosParams; }
|
|
49
|
+
// Forward declaration of `NitroLimitedQuantityInfoAndroid` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::iap { struct NitroLimitedQuantityInfoAndroid; }
|
|
45
51
|
// Forward declaration of `NitroOneTimePurchaseOfferDetail` to properly resolve imports.
|
|
46
52
|
namespace margelo::nitro::iap { struct NitroOneTimePurchaseOfferDetail; }
|
|
53
|
+
// Forward declaration of `NitroPreorderDetailsAndroid` to properly resolve imports.
|
|
54
|
+
namespace margelo::nitro::iap { struct NitroPreorderDetailsAndroid; }
|
|
47
55
|
// Forward declaration of `NitroProduct` to properly resolve imports.
|
|
48
56
|
namespace margelo::nitro::iap { struct NitroProduct; }
|
|
49
57
|
// Forward declaration of `NitroPurchaseResult` to properly resolve imports.
|
|
@@ -58,6 +66,8 @@ namespace margelo::nitro::iap { struct NitroReceiptValidationResultAndroid; }
|
|
|
58
66
|
namespace margelo::nitro::iap { struct NitroReceiptValidationResultIOS; }
|
|
59
67
|
// Forward declaration of `NitroRenewalInfoIOS` to properly resolve imports.
|
|
60
68
|
namespace margelo::nitro::iap { struct NitroRenewalInfoIOS; }
|
|
69
|
+
// Forward declaration of `NitroRentalDetailsAndroid` to properly resolve imports.
|
|
70
|
+
namespace margelo::nitro::iap { struct NitroRentalDetailsAndroid; }
|
|
61
71
|
// Forward declaration of `NitroRequestPurchaseAndroid` to properly resolve imports.
|
|
62
72
|
namespace margelo::nitro::iap { struct NitroRequestPurchaseAndroid; }
|
|
63
73
|
// Forward declaration of `NitroRequestPurchaseIos` to properly resolve imports.
|
|
@@ -66,6 +76,8 @@ namespace margelo::nitro::iap { struct NitroRequestPurchaseIos; }
|
|
|
66
76
|
namespace margelo::nitro::iap { struct NitroSubscriptionRenewalInfo; }
|
|
67
77
|
// Forward declaration of `NitroSubscriptionStatus` to properly resolve imports.
|
|
68
78
|
namespace margelo::nitro::iap { struct NitroSubscriptionStatus; }
|
|
79
|
+
// Forward declaration of `NitroValidTimeWindowAndroid` to properly resolve imports.
|
|
80
|
+
namespace margelo::nitro::iap { struct NitroValidTimeWindowAndroid; }
|
|
69
81
|
// Forward declaration of `NitroVerifyPurchaseWithIapkitAppleProps` to properly resolve imports.
|
|
70
82
|
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitAppleProps; }
|
|
71
83
|
// Forward declaration of `NitroVerifyPurchaseWithIapkitGoogleProps` to properly resolve imports.
|
|
@@ -115,9 +127,13 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
115
127
|
#include "NitroAvailablePurchasesAndroidType.hpp"
|
|
116
128
|
#include "NitroAvailablePurchasesIosOptions.hpp"
|
|
117
129
|
#include "NitroAvailablePurchasesOptions.hpp"
|
|
130
|
+
#include "NitroDiscountAmountAndroid.hpp"
|
|
131
|
+
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
118
132
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
119
133
|
#include "NitroFinishTransactionIosParams.hpp"
|
|
134
|
+
#include "NitroLimitedQuantityInfoAndroid.hpp"
|
|
120
135
|
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
136
|
+
#include "NitroPreorderDetailsAndroid.hpp"
|
|
121
137
|
#include "NitroProduct.hpp"
|
|
122
138
|
#include "NitroPurchase.hpp"
|
|
123
139
|
#include "NitroPurchaseResult.hpp"
|
|
@@ -125,10 +141,12 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
125
141
|
#include "NitroReceiptValidationResultAndroid.hpp"
|
|
126
142
|
#include "NitroReceiptValidationResultIOS.hpp"
|
|
127
143
|
#include "NitroRenewalInfoIOS.hpp"
|
|
144
|
+
#include "NitroRentalDetailsAndroid.hpp"
|
|
128
145
|
#include "NitroRequestPurchaseAndroid.hpp"
|
|
129
146
|
#include "NitroRequestPurchaseIos.hpp"
|
|
130
147
|
#include "NitroSubscriptionRenewalInfo.hpp"
|
|
131
148
|
#include "NitroSubscriptionStatus.hpp"
|
|
149
|
+
#include "NitroValidTimeWindowAndroid.hpp"
|
|
132
150
|
#include "NitroVerifyPurchaseWithIapkitAppleProps.hpp"
|
|
133
151
|
#include "NitroVerifyPurchaseWithIapkitGoogleProps.hpp"
|
|
134
152
|
#include "NitroVerifyPurchaseWithIapkitProps.hpp"
|
|
@@ -293,18 +311,130 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
293
311
|
return *optional;
|
|
294
312
|
}
|
|
295
313
|
|
|
296
|
-
// pragma MARK: std::optional<
|
|
314
|
+
// pragma MARK: std::optional<NitroDiscountAmountAndroid>
|
|
297
315
|
/**
|
|
298
|
-
* Specialized version of `std::optional<
|
|
316
|
+
* Specialized version of `std::optional<NitroDiscountAmountAndroid>`.
|
|
299
317
|
*/
|
|
300
|
-
using
|
|
301
|
-
inline std::optional<
|
|
302
|
-
return std::optional<
|
|
318
|
+
using std__optional_NitroDiscountAmountAndroid_ = std::optional<NitroDiscountAmountAndroid>;
|
|
319
|
+
inline std::optional<NitroDiscountAmountAndroid> create_std__optional_NitroDiscountAmountAndroid_(const NitroDiscountAmountAndroid& value) noexcept {
|
|
320
|
+
return std::optional<NitroDiscountAmountAndroid>(value);
|
|
303
321
|
}
|
|
304
|
-
inline bool
|
|
322
|
+
inline bool has_value_std__optional_NitroDiscountAmountAndroid_(const std::optional<NitroDiscountAmountAndroid>& optional) noexcept {
|
|
305
323
|
return optional.has_value();
|
|
306
324
|
}
|
|
307
|
-
inline
|
|
325
|
+
inline NitroDiscountAmountAndroid get_std__optional_NitroDiscountAmountAndroid_(const std::optional<NitroDiscountAmountAndroid>& optional) noexcept {
|
|
326
|
+
return *optional;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// pragma MARK: std::optional<NitroDiscountDisplayInfoAndroid>
|
|
330
|
+
/**
|
|
331
|
+
* Specialized version of `std::optional<NitroDiscountDisplayInfoAndroid>`.
|
|
332
|
+
*/
|
|
333
|
+
using std__optional_NitroDiscountDisplayInfoAndroid_ = std::optional<NitroDiscountDisplayInfoAndroid>;
|
|
334
|
+
inline std::optional<NitroDiscountDisplayInfoAndroid> create_std__optional_NitroDiscountDisplayInfoAndroid_(const NitroDiscountDisplayInfoAndroid& value) noexcept {
|
|
335
|
+
return std::optional<NitroDiscountDisplayInfoAndroid>(value);
|
|
336
|
+
}
|
|
337
|
+
inline bool has_value_std__optional_NitroDiscountDisplayInfoAndroid_(const std::optional<NitroDiscountDisplayInfoAndroid>& optional) noexcept {
|
|
338
|
+
return optional.has_value();
|
|
339
|
+
}
|
|
340
|
+
inline NitroDiscountDisplayInfoAndroid get_std__optional_NitroDiscountDisplayInfoAndroid_(const std::optional<NitroDiscountDisplayInfoAndroid>& optional) noexcept {
|
|
341
|
+
return *optional;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// pragma MARK: std::optional<NitroLimitedQuantityInfoAndroid>
|
|
345
|
+
/**
|
|
346
|
+
* Specialized version of `std::optional<NitroLimitedQuantityInfoAndroid>`.
|
|
347
|
+
*/
|
|
348
|
+
using std__optional_NitroLimitedQuantityInfoAndroid_ = std::optional<NitroLimitedQuantityInfoAndroid>;
|
|
349
|
+
inline std::optional<NitroLimitedQuantityInfoAndroid> create_std__optional_NitroLimitedQuantityInfoAndroid_(const NitroLimitedQuantityInfoAndroid& value) noexcept {
|
|
350
|
+
return std::optional<NitroLimitedQuantityInfoAndroid>(value);
|
|
351
|
+
}
|
|
352
|
+
inline bool has_value_std__optional_NitroLimitedQuantityInfoAndroid_(const std::optional<NitroLimitedQuantityInfoAndroid>& optional) noexcept {
|
|
353
|
+
return optional.has_value();
|
|
354
|
+
}
|
|
355
|
+
inline NitroLimitedQuantityInfoAndroid get_std__optional_NitroLimitedQuantityInfoAndroid_(const std::optional<NitroLimitedQuantityInfoAndroid>& optional) noexcept {
|
|
356
|
+
return *optional;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// pragma MARK: std::vector<std::string>
|
|
360
|
+
/**
|
|
361
|
+
* Specialized version of `std::vector<std::string>`.
|
|
362
|
+
*/
|
|
363
|
+
using std__vector_std__string_ = std::vector<std::string>;
|
|
364
|
+
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
365
|
+
std::vector<std::string> vector;
|
|
366
|
+
vector.reserve(size);
|
|
367
|
+
return vector;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// pragma MARK: std::optional<NitroPreorderDetailsAndroid>
|
|
371
|
+
/**
|
|
372
|
+
* Specialized version of `std::optional<NitroPreorderDetailsAndroid>`.
|
|
373
|
+
*/
|
|
374
|
+
using std__optional_NitroPreorderDetailsAndroid_ = std::optional<NitroPreorderDetailsAndroid>;
|
|
375
|
+
inline std::optional<NitroPreorderDetailsAndroid> create_std__optional_NitroPreorderDetailsAndroid_(const NitroPreorderDetailsAndroid& value) noexcept {
|
|
376
|
+
return std::optional<NitroPreorderDetailsAndroid>(value);
|
|
377
|
+
}
|
|
378
|
+
inline bool has_value_std__optional_NitroPreorderDetailsAndroid_(const std::optional<NitroPreorderDetailsAndroid>& optional) noexcept {
|
|
379
|
+
return optional.has_value();
|
|
380
|
+
}
|
|
381
|
+
inline NitroPreorderDetailsAndroid get_std__optional_NitroPreorderDetailsAndroid_(const std::optional<NitroPreorderDetailsAndroid>& optional) noexcept {
|
|
382
|
+
return *optional;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// pragma MARK: std::optional<NitroRentalDetailsAndroid>
|
|
386
|
+
/**
|
|
387
|
+
* Specialized version of `std::optional<NitroRentalDetailsAndroid>`.
|
|
388
|
+
*/
|
|
389
|
+
using std__optional_NitroRentalDetailsAndroid_ = std::optional<NitroRentalDetailsAndroid>;
|
|
390
|
+
inline std::optional<NitroRentalDetailsAndroid> create_std__optional_NitroRentalDetailsAndroid_(const NitroRentalDetailsAndroid& value) noexcept {
|
|
391
|
+
return std::optional<NitroRentalDetailsAndroid>(value);
|
|
392
|
+
}
|
|
393
|
+
inline bool has_value_std__optional_NitroRentalDetailsAndroid_(const std::optional<NitroRentalDetailsAndroid>& optional) noexcept {
|
|
394
|
+
return optional.has_value();
|
|
395
|
+
}
|
|
396
|
+
inline NitroRentalDetailsAndroid get_std__optional_NitroRentalDetailsAndroid_(const std::optional<NitroRentalDetailsAndroid>& optional) noexcept {
|
|
397
|
+
return *optional;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// pragma MARK: std::optional<NitroValidTimeWindowAndroid>
|
|
401
|
+
/**
|
|
402
|
+
* Specialized version of `std::optional<NitroValidTimeWindowAndroid>`.
|
|
403
|
+
*/
|
|
404
|
+
using std__optional_NitroValidTimeWindowAndroid_ = std::optional<NitroValidTimeWindowAndroid>;
|
|
405
|
+
inline std::optional<NitroValidTimeWindowAndroid> create_std__optional_NitroValidTimeWindowAndroid_(const NitroValidTimeWindowAndroid& value) noexcept {
|
|
406
|
+
return std::optional<NitroValidTimeWindowAndroid>(value);
|
|
407
|
+
}
|
|
408
|
+
inline bool has_value_std__optional_NitroValidTimeWindowAndroid_(const std::optional<NitroValidTimeWindowAndroid>& optional) noexcept {
|
|
409
|
+
return optional.has_value();
|
|
410
|
+
}
|
|
411
|
+
inline NitroValidTimeWindowAndroid get_std__optional_NitroValidTimeWindowAndroid_(const std::optional<NitroValidTimeWindowAndroid>& optional) noexcept {
|
|
412
|
+
return *optional;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// pragma MARK: std::vector<NitroOneTimePurchaseOfferDetail>
|
|
416
|
+
/**
|
|
417
|
+
* Specialized version of `std::vector<NitroOneTimePurchaseOfferDetail>`.
|
|
418
|
+
*/
|
|
419
|
+
using std__vector_NitroOneTimePurchaseOfferDetail_ = std::vector<NitroOneTimePurchaseOfferDetail>;
|
|
420
|
+
inline std::vector<NitroOneTimePurchaseOfferDetail> create_std__vector_NitroOneTimePurchaseOfferDetail_(size_t size) noexcept {
|
|
421
|
+
std::vector<NitroOneTimePurchaseOfferDetail> vector;
|
|
422
|
+
vector.reserve(size);
|
|
423
|
+
return vector;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// pragma MARK: std::optional<std::vector<NitroOneTimePurchaseOfferDetail>>
|
|
427
|
+
/**
|
|
428
|
+
* Specialized version of `std::optional<std::vector<NitroOneTimePurchaseOfferDetail>>`.
|
|
429
|
+
*/
|
|
430
|
+
using std__optional_std__vector_NitroOneTimePurchaseOfferDetail__ = std::optional<std::vector<NitroOneTimePurchaseOfferDetail>>;
|
|
431
|
+
inline std::optional<std::vector<NitroOneTimePurchaseOfferDetail>> create_std__optional_std__vector_NitroOneTimePurchaseOfferDetail__(const std::vector<NitroOneTimePurchaseOfferDetail>& value) noexcept {
|
|
432
|
+
return std::optional<std::vector<NitroOneTimePurchaseOfferDetail>>(value);
|
|
433
|
+
}
|
|
434
|
+
inline bool has_value_std__optional_std__vector_NitroOneTimePurchaseOfferDetail__(const std::optional<std::vector<NitroOneTimePurchaseOfferDetail>>& optional) noexcept {
|
|
435
|
+
return optional.has_value();
|
|
436
|
+
}
|
|
437
|
+
inline std::vector<NitroOneTimePurchaseOfferDetail> get_std__optional_std__vector_NitroOneTimePurchaseOfferDetail__(const std::optional<std::vector<NitroOneTimePurchaseOfferDetail>>& optional) noexcept {
|
|
308
438
|
return *optional;
|
|
309
439
|
}
|
|
310
440
|
|
|
@@ -353,17 +483,6 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
353
483
|
return Func_void_std__vector_NitroProduct__Wrapper(std::move(value));
|
|
354
484
|
}
|
|
355
485
|
|
|
356
|
-
// pragma MARK: std::vector<std::string>
|
|
357
|
-
/**
|
|
358
|
-
* Specialized version of `std::vector<std::string>`.
|
|
359
|
-
*/
|
|
360
|
-
using std__vector_std__string_ = std::vector<std::string>;
|
|
361
|
-
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
362
|
-
std::vector<std::string> vector;
|
|
363
|
-
vector.reserve(size);
|
|
364
|
-
return vector;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
486
|
// pragma MARK: std::optional<std::vector<std::string>>
|
|
368
487
|
/**
|
|
369
488
|
* Specialized version of `std::optional<std::vector<std::string>>`.
|
|
@@ -40,14 +40,22 @@ namespace margelo::nitro::iap { struct NitroAvailablePurchasesIosOptions; }
|
|
|
40
40
|
namespace margelo::nitro::iap { struct NitroAvailablePurchasesOptions; }
|
|
41
41
|
// Forward declaration of `NitroDeepLinkOptionsAndroid` to properly resolve imports.
|
|
42
42
|
namespace margelo::nitro::iap { struct NitroDeepLinkOptionsAndroid; }
|
|
43
|
+
// Forward declaration of `NitroDiscountAmountAndroid` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::iap { struct NitroDiscountAmountAndroid; }
|
|
45
|
+
// Forward declaration of `NitroDiscountDisplayInfoAndroid` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::iap { struct NitroDiscountDisplayInfoAndroid; }
|
|
43
47
|
// Forward declaration of `NitroFinishTransactionAndroidParams` to properly resolve imports.
|
|
44
48
|
namespace margelo::nitro::iap { struct NitroFinishTransactionAndroidParams; }
|
|
45
49
|
// Forward declaration of `NitroFinishTransactionIosParams` to properly resolve imports.
|
|
46
50
|
namespace margelo::nitro::iap { struct NitroFinishTransactionIosParams; }
|
|
47
51
|
// Forward declaration of `NitroFinishTransactionParams` to properly resolve imports.
|
|
48
52
|
namespace margelo::nitro::iap { struct NitroFinishTransactionParams; }
|
|
53
|
+
// Forward declaration of `NitroLimitedQuantityInfoAndroid` to properly resolve imports.
|
|
54
|
+
namespace margelo::nitro::iap { struct NitroLimitedQuantityInfoAndroid; }
|
|
49
55
|
// Forward declaration of `NitroOneTimePurchaseOfferDetail` to properly resolve imports.
|
|
50
56
|
namespace margelo::nitro::iap { struct NitroOneTimePurchaseOfferDetail; }
|
|
57
|
+
// Forward declaration of `NitroPreorderDetailsAndroid` to properly resolve imports.
|
|
58
|
+
namespace margelo::nitro::iap { struct NitroPreorderDetailsAndroid; }
|
|
51
59
|
// Forward declaration of `NitroProduct` to properly resolve imports.
|
|
52
60
|
namespace margelo::nitro::iap { struct NitroProduct; }
|
|
53
61
|
// Forward declaration of `NitroPurchaseRequest` to properly resolve imports.
|
|
@@ -66,6 +74,8 @@ namespace margelo::nitro::iap { struct NitroReceiptValidationResultAndroid; }
|
|
|
66
74
|
namespace margelo::nitro::iap { struct NitroReceiptValidationResultIOS; }
|
|
67
75
|
// Forward declaration of `NitroRenewalInfoIOS` to properly resolve imports.
|
|
68
76
|
namespace margelo::nitro::iap { struct NitroRenewalInfoIOS; }
|
|
77
|
+
// Forward declaration of `NitroRentalDetailsAndroid` to properly resolve imports.
|
|
78
|
+
namespace margelo::nitro::iap { struct NitroRentalDetailsAndroid; }
|
|
69
79
|
// Forward declaration of `NitroRequestPurchaseAndroid` to properly resolve imports.
|
|
70
80
|
namespace margelo::nitro::iap { struct NitroRequestPurchaseAndroid; }
|
|
71
81
|
// Forward declaration of `NitroRequestPurchaseIos` to properly resolve imports.
|
|
@@ -74,6 +84,8 @@ namespace margelo::nitro::iap { struct NitroRequestPurchaseIos; }
|
|
|
74
84
|
namespace margelo::nitro::iap { struct NitroSubscriptionRenewalInfo; }
|
|
75
85
|
// Forward declaration of `NitroSubscriptionStatus` to properly resolve imports.
|
|
76
86
|
namespace margelo::nitro::iap { struct NitroSubscriptionStatus; }
|
|
87
|
+
// Forward declaration of `NitroValidTimeWindowAndroid` to properly resolve imports.
|
|
88
|
+
namespace margelo::nitro::iap { struct NitroValidTimeWindowAndroid; }
|
|
77
89
|
// Forward declaration of `NitroVerifyPurchaseWithIapkitAppleProps` to properly resolve imports.
|
|
78
90
|
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitAppleProps; }
|
|
79
91
|
// Forward declaration of `NitroVerifyPurchaseWithIapkitGoogleProps` to properly resolve imports.
|
|
@@ -122,10 +134,14 @@ namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
|
122
134
|
#include "NitroAvailablePurchasesIosOptions.hpp"
|
|
123
135
|
#include "NitroAvailablePurchasesOptions.hpp"
|
|
124
136
|
#include "NitroDeepLinkOptionsAndroid.hpp"
|
|
137
|
+
#include "NitroDiscountAmountAndroid.hpp"
|
|
138
|
+
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
125
139
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
126
140
|
#include "NitroFinishTransactionIosParams.hpp"
|
|
127
141
|
#include "NitroFinishTransactionParams.hpp"
|
|
142
|
+
#include "NitroLimitedQuantityInfoAndroid.hpp"
|
|
128
143
|
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
144
|
+
#include "NitroPreorderDetailsAndroid.hpp"
|
|
129
145
|
#include "NitroProduct.hpp"
|
|
130
146
|
#include "NitroPurchase.hpp"
|
|
131
147
|
#include "NitroPurchaseRequest.hpp"
|
|
@@ -135,10 +151,12 @@ namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
|
135
151
|
#include "NitroReceiptValidationResultAndroid.hpp"
|
|
136
152
|
#include "NitroReceiptValidationResultIOS.hpp"
|
|
137
153
|
#include "NitroRenewalInfoIOS.hpp"
|
|
154
|
+
#include "NitroRentalDetailsAndroid.hpp"
|
|
138
155
|
#include "NitroRequestPurchaseAndroid.hpp"
|
|
139
156
|
#include "NitroRequestPurchaseIos.hpp"
|
|
140
157
|
#include "NitroSubscriptionRenewalInfo.hpp"
|
|
141
158
|
#include "NitroSubscriptionStatus.hpp"
|
|
159
|
+
#include "NitroValidTimeWindowAndroid.hpp"
|
|
142
160
|
#include "NitroVerifyPurchaseWithIapkitAppleProps.hpp"
|
|
143
161
|
#include "NitroVerifyPurchaseWithIapkitGoogleProps.hpp"
|
|
144
162
|
#include "NitroVerifyPurchaseWithIapkitProps.hpp"
|
|
@@ -24,6 +24,18 @@ namespace margelo::nitro::iap { enum class IapPlatform; }
|
|
|
24
24
|
namespace margelo::nitro::iap { enum class PaymentModeIOS; }
|
|
25
25
|
// Forward declaration of `NitroOneTimePurchaseOfferDetail` to properly resolve imports.
|
|
26
26
|
namespace margelo::nitro::iap { struct NitroOneTimePurchaseOfferDetail; }
|
|
27
|
+
// Forward declaration of `NitroDiscountDisplayInfoAndroid` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::iap { struct NitroDiscountDisplayInfoAndroid; }
|
|
29
|
+
// Forward declaration of `NitroDiscountAmountAndroid` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::iap { struct NitroDiscountAmountAndroid; }
|
|
31
|
+
// Forward declaration of `NitroLimitedQuantityInfoAndroid` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::iap { struct NitroLimitedQuantityInfoAndroid; }
|
|
33
|
+
// Forward declaration of `NitroPreorderDetailsAndroid` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::iap { struct NitroPreorderDetailsAndroid; }
|
|
35
|
+
// Forward declaration of `NitroRentalDetailsAndroid` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::iap { struct NitroRentalDetailsAndroid; }
|
|
37
|
+
// Forward declaration of `NitroValidTimeWindowAndroid` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::iap { struct NitroValidTimeWindowAndroid; }
|
|
27
39
|
// Forward declaration of `PurchaseAndroid` to properly resolve imports.
|
|
28
40
|
namespace margelo::nitro::iap { struct PurchaseAndroid; }
|
|
29
41
|
// Forward declaration of `PurchaseIOS` to properly resolve imports.
|
|
@@ -117,6 +129,12 @@ namespace margelo::nitro::iap { struct ExternalPurchaseLinkResultIOS; }
|
|
|
117
129
|
#include "IapPlatform.hpp"
|
|
118
130
|
#include "PaymentModeIOS.hpp"
|
|
119
131
|
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
132
|
+
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
133
|
+
#include "NitroDiscountAmountAndroid.hpp"
|
|
134
|
+
#include "NitroLimitedQuantityInfoAndroid.hpp"
|
|
135
|
+
#include "NitroPreorderDetailsAndroid.hpp"
|
|
136
|
+
#include "NitroRentalDetailsAndroid.hpp"
|
|
137
|
+
#include "NitroValidTimeWindowAndroid.hpp"
|
|
120
138
|
#include "PurchaseAndroid.hpp"
|
|
121
139
|
#include "PurchaseIOS.hpp"
|
|
122
140
|
#include <variant>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroDiscountAmountAndroid.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 `NitroDiscountAmountAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroDiscountAmountAndroid = margelo.nitro.iap.NitroDiscountAmountAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroDiscountAmountAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroDiscountAmountAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(discountAmountMicros: String, formattedDiscountAmount: String) {
|
|
22
|
+
self.init(std.string(discountAmountMicros), std.string(formattedDiscountAmount))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var discountAmountMicros: String {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return String(self.__discountAmountMicros)
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__discountAmountMicros = std.string(newValue)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var formattedDiscountAmount: String {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return String(self.__formattedDiscountAmount)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__formattedDiscountAmount = std.string(newValue)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroDiscountDisplayInfoAndroid.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 `NitroDiscountDisplayInfoAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroDiscountDisplayInfoAndroid = margelo.nitro.iap.NitroDiscountDisplayInfoAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroDiscountDisplayInfoAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroDiscountDisplayInfoAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(discountAmount: NitroDiscountAmountAndroid?, percentageDiscount: Double?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_NitroDiscountAmountAndroid_ in
|
|
23
|
+
if let __unwrappedValue = discountAmount {
|
|
24
|
+
return bridge.create_std__optional_NitroDiscountAmountAndroid_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
29
|
+
if let __unwrappedValue = percentageDiscount {
|
|
30
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}())
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var discountAmount: NitroDiscountAmountAndroid? {
|
|
38
|
+
@inline(__always)
|
|
39
|
+
get {
|
|
40
|
+
return self.__discountAmount.value
|
|
41
|
+
}
|
|
42
|
+
@inline(__always)
|
|
43
|
+
set {
|
|
44
|
+
self.__discountAmount = { () -> bridge.std__optional_NitroDiscountAmountAndroid_ in
|
|
45
|
+
if let __unwrappedValue = newValue {
|
|
46
|
+
return bridge.create_std__optional_NitroDiscountAmountAndroid_(__unwrappedValue)
|
|
47
|
+
} else {
|
|
48
|
+
return .init()
|
|
49
|
+
}
|
|
50
|
+
}()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var percentageDiscount: Double? {
|
|
55
|
+
@inline(__always)
|
|
56
|
+
get {
|
|
57
|
+
return self.__percentageDiscount.value
|
|
58
|
+
}
|
|
59
|
+
@inline(__always)
|
|
60
|
+
set {
|
|
61
|
+
self.__percentageDiscount = { () -> bridge.std__optional_double_ in
|
|
62
|
+
if let __unwrappedValue = newValue {
|
|
63
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
64
|
+
} else {
|
|
65
|
+
return .init()
|
|
66
|
+
}
|
|
67
|
+
}()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroLimitedQuantityInfoAndroid.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 `NitroLimitedQuantityInfoAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroLimitedQuantityInfoAndroid = margelo.nitro.iap.NitroLimitedQuantityInfoAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroLimitedQuantityInfoAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroLimitedQuantityInfoAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(maximumQuantity: Double, remainingQuantity: Double) {
|
|
22
|
+
self.init(maximumQuantity, remainingQuantity)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var maximumQuantity: Double {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__maximumQuantity
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__maximumQuantity = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var remainingQuantity: Double {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return self.__remainingQuantity
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__remainingQuantity = newValue
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|