react-native-iap 14.5.1-rc.1 → 14.6.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +198 -36
- package/ios/HybridRnIap.swift +32 -2
- package/lib/module/hooks/useIAP.js +1 -6
- package/lib/module/hooks/useIAP.js.map +1 -1
- package/lib/module/index.js +228 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +116 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/plugin/src/withIAP.d.ts +6 -0
- package/lib/typescript/plugin/src/withIAP.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useIAP.d.ts +5 -7
- package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +144 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +90 -8
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +194 -10
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JBillingProgramAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JExternalLinkLaunchModeAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JExternalLinkTypeAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +88 -4
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +4 -0
- package/nitrogen/generated/android/c++/JNitroBillingProgramAvailabilityResultAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroBillingProgramReportingDetailsAndroid.hpp +63 -0
- package/nitrogen/generated/android/c++/JNitroLaunchExternalLinkParamsAndroid.hpp +75 -0
- package/nitrogen/generated/android/c++/JNitroReceiptValidationAppleOptions.hpp +57 -0
- package/nitrogen/generated/android/c++/{JNitroReceiptValidationAndroidOptions.hpp → JNitroReceiptValidationGoogleOptions.hpp} +18 -14
- package/nitrogen/generated/android/c++/JNitroReceiptValidationHorizonOptions.hpp +65 -0
- package/nitrogen/generated/android/c++/JNitroReceiptValidationParams.hpp +19 -11
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/BillingProgramAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalLinkLaunchModeAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalLinkTypeAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +16 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroBillingProgramAvailabilityResultAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroBillingProgramReportingDetailsAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroLaunchExternalLinkParamsAndroid.kt +45 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationAppleOptions.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{NitroReceiptValidationAndroidOptions.kt → NitroReceiptValidationGoogleOptions.kt} +9 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationHorizonOptions.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationParams.kt +7 -4
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +16 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +141 -10
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +27 -3
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +57 -3
- package/nitrogen/generated/ios/swift/BillingProgramAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/ExternalLinkLaunchModeAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/ExternalLinkTypeAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramAvailabilityResultAndroid.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramReportingDetailsAndroid.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +68 -0
- package/nitrogen/generated/ios/swift/NitroBillingProgramAvailabilityResultAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroBillingProgramReportingDetailsAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroLaunchExternalLinkParamsAndroid.swift +68 -0
- package/nitrogen/generated/ios/swift/NitroReceiptValidationAppleOptions.swift +35 -0
- package/nitrogen/generated/ios/swift/{NitroReceiptValidationAndroidOptions.swift → NitroReceiptValidationGoogleOptions.swift} +21 -10
- package/nitrogen/generated/ios/swift/NitroReceiptValidationHorizonOptions.swift +57 -0
- package/nitrogen/generated/ios/swift/NitroReceiptValidationParams.swift +46 -11
- package/nitrogen/generated/shared/c++/BillingProgramAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/ExternalLinkLaunchModeAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/ExternalLinkTypeAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +16 -0
- package/nitrogen/generated/shared/c++/NitroBillingProgramAvailabilityResultAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroBillingProgramReportingDetailsAndroid.hpp +81 -0
- package/nitrogen/generated/shared/c++/NitroLaunchExternalLinkParamsAndroid.hpp +95 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationAppleOptions.hpp +75 -0
- package/nitrogen/generated/shared/c++/{NitroReceiptValidationAndroidOptions.hpp → NitroReceiptValidationGoogleOptions.hpp} +18 -14
- package/nitrogen/generated/shared/c++/NitroReceiptValidationHorizonOptions.hpp +83 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationParams.hpp +22 -13
- package/openiap-versions.json +3 -3
- package/package.json +1 -1
- package/plugin/build/withIAP.d.ts +6 -0
- package/plugin/build/withIAP.js +46 -2
- package/plugin/src/withIAP.ts +67 -2
- package/src/hooks/useIAP.ts +8 -23
- package/src/index.ts +297 -14
- package/src/specs/RnIap.nitro.ts +125 -10
- package/src/types.ts +207 -10
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
namespace margelo::nitro::iap { enum class AlternativeBillingModeAndroid; }
|
|
13
13
|
// Forward declaration of `AndroidSubscriptionOfferInput` to properly resolve imports.
|
|
14
14
|
namespace margelo::nitro::iap { struct AndroidSubscriptionOfferInput; }
|
|
15
|
+
// Forward declaration of `BillingProgramAndroid` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::iap { enum class BillingProgramAndroid; }
|
|
15
17
|
// Forward declaration of `ExternalPurchaseLinkResultIOS` to properly resolve imports.
|
|
16
18
|
namespace margelo::nitro::iap { struct ExternalPurchaseLinkResultIOS; }
|
|
17
19
|
// Forward declaration of `ExternalPurchaseNoticeAction` to properly resolve imports.
|
|
@@ -38,6 +40,10 @@ namespace margelo::nitro::iap { enum class NitroAvailablePurchasesAndroidType; }
|
|
|
38
40
|
namespace margelo::nitro::iap { struct NitroAvailablePurchasesIosOptions; }
|
|
39
41
|
// Forward declaration of `NitroAvailablePurchasesOptions` to properly resolve imports.
|
|
40
42
|
namespace margelo::nitro::iap { struct NitroAvailablePurchasesOptions; }
|
|
43
|
+
// Forward declaration of `NitroBillingProgramAvailabilityResultAndroid` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramAvailabilityResultAndroid; }
|
|
45
|
+
// Forward declaration of `NitroBillingProgramReportingDetailsAndroid` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramReportingDetailsAndroid; }
|
|
41
47
|
// Forward declaration of `NitroDiscountAmountAndroid` to properly resolve imports.
|
|
42
48
|
namespace margelo::nitro::iap { struct NitroDiscountAmountAndroid; }
|
|
43
49
|
// Forward declaration of `NitroDiscountDisplayInfoAndroid` to properly resolve imports.
|
|
@@ -58,8 +64,12 @@ namespace margelo::nitro::iap { struct NitroProduct; }
|
|
|
58
64
|
namespace margelo::nitro::iap { struct NitroPurchaseResult; }
|
|
59
65
|
// Forward declaration of `NitroPurchase` to properly resolve imports.
|
|
60
66
|
namespace margelo::nitro::iap { struct NitroPurchase; }
|
|
61
|
-
// Forward declaration of `
|
|
62
|
-
namespace margelo::nitro::iap { struct
|
|
67
|
+
// Forward declaration of `NitroReceiptValidationAppleOptions` to properly resolve imports.
|
|
68
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationAppleOptions; }
|
|
69
|
+
// Forward declaration of `NitroReceiptValidationGoogleOptions` to properly resolve imports.
|
|
70
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationGoogleOptions; }
|
|
71
|
+
// Forward declaration of `NitroReceiptValidationHorizonOptions` to properly resolve imports.
|
|
72
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationHorizonOptions; }
|
|
63
73
|
// Forward declaration of `NitroReceiptValidationResultAndroid` to properly resolve imports.
|
|
64
74
|
namespace margelo::nitro::iap { struct NitroReceiptValidationResultAndroid; }
|
|
65
75
|
// Forward declaration of `NitroReceiptValidationResultIOS` to properly resolve imports.
|
|
@@ -114,6 +124,7 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
114
124
|
// Include C++ defined types
|
|
115
125
|
#include "AlternativeBillingModeAndroid.hpp"
|
|
116
126
|
#include "AndroidSubscriptionOfferInput.hpp"
|
|
127
|
+
#include "BillingProgramAndroid.hpp"
|
|
117
128
|
#include "ExternalPurchaseLinkResultIOS.hpp"
|
|
118
129
|
#include "ExternalPurchaseNoticeAction.hpp"
|
|
119
130
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
@@ -127,6 +138,8 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
127
138
|
#include "NitroAvailablePurchasesAndroidType.hpp"
|
|
128
139
|
#include "NitroAvailablePurchasesIosOptions.hpp"
|
|
129
140
|
#include "NitroAvailablePurchasesOptions.hpp"
|
|
141
|
+
#include "NitroBillingProgramAvailabilityResultAndroid.hpp"
|
|
142
|
+
#include "NitroBillingProgramReportingDetailsAndroid.hpp"
|
|
130
143
|
#include "NitroDiscountAmountAndroid.hpp"
|
|
131
144
|
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
132
145
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
@@ -137,7 +150,9 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
137
150
|
#include "NitroProduct.hpp"
|
|
138
151
|
#include "NitroPurchase.hpp"
|
|
139
152
|
#include "NitroPurchaseResult.hpp"
|
|
140
|
-
#include "
|
|
153
|
+
#include "NitroReceiptValidationAppleOptions.hpp"
|
|
154
|
+
#include "NitroReceiptValidationGoogleOptions.hpp"
|
|
155
|
+
#include "NitroReceiptValidationHorizonOptions.hpp"
|
|
141
156
|
#include "NitroReceiptValidationResultAndroid.hpp"
|
|
142
157
|
#include "NitroReceiptValidationResultIOS.hpp"
|
|
143
158
|
#include "NitroRenewalInfoIOS.hpp"
|
|
@@ -1410,18 +1425,48 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
1410
1425
|
return Func_void_std__variant_NitroReceiptValidationResultIOS__NitroReceiptValidationResultAndroid__Wrapper(std::move(value));
|
|
1411
1426
|
}
|
|
1412
1427
|
|
|
1413
|
-
// pragma MARK: std::optional<
|
|
1428
|
+
// pragma MARK: std::optional<NitroReceiptValidationAppleOptions>
|
|
1414
1429
|
/**
|
|
1415
|
-
* Specialized version of `std::optional<
|
|
1430
|
+
* Specialized version of `std::optional<NitroReceiptValidationAppleOptions>`.
|
|
1416
1431
|
*/
|
|
1417
|
-
using
|
|
1418
|
-
inline std::optional<
|
|
1419
|
-
return std::optional<
|
|
1432
|
+
using std__optional_NitroReceiptValidationAppleOptions_ = std::optional<NitroReceiptValidationAppleOptions>;
|
|
1433
|
+
inline std::optional<NitroReceiptValidationAppleOptions> create_std__optional_NitroReceiptValidationAppleOptions_(const NitroReceiptValidationAppleOptions& value) noexcept {
|
|
1434
|
+
return std::optional<NitroReceiptValidationAppleOptions>(value);
|
|
1420
1435
|
}
|
|
1421
|
-
inline bool
|
|
1436
|
+
inline bool has_value_std__optional_NitroReceiptValidationAppleOptions_(const std::optional<NitroReceiptValidationAppleOptions>& optional) noexcept {
|
|
1422
1437
|
return optional.has_value();
|
|
1423
1438
|
}
|
|
1424
|
-
inline
|
|
1439
|
+
inline NitroReceiptValidationAppleOptions get_std__optional_NitroReceiptValidationAppleOptions_(const std::optional<NitroReceiptValidationAppleOptions>& optional) noexcept {
|
|
1440
|
+
return *optional;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
// pragma MARK: std::optional<NitroReceiptValidationGoogleOptions>
|
|
1444
|
+
/**
|
|
1445
|
+
* Specialized version of `std::optional<NitroReceiptValidationGoogleOptions>`.
|
|
1446
|
+
*/
|
|
1447
|
+
using std__optional_NitroReceiptValidationGoogleOptions_ = std::optional<NitroReceiptValidationGoogleOptions>;
|
|
1448
|
+
inline std::optional<NitroReceiptValidationGoogleOptions> create_std__optional_NitroReceiptValidationGoogleOptions_(const NitroReceiptValidationGoogleOptions& value) noexcept {
|
|
1449
|
+
return std::optional<NitroReceiptValidationGoogleOptions>(value);
|
|
1450
|
+
}
|
|
1451
|
+
inline bool has_value_std__optional_NitroReceiptValidationGoogleOptions_(const std::optional<NitroReceiptValidationGoogleOptions>& optional) noexcept {
|
|
1452
|
+
return optional.has_value();
|
|
1453
|
+
}
|
|
1454
|
+
inline NitroReceiptValidationGoogleOptions get_std__optional_NitroReceiptValidationGoogleOptions_(const std::optional<NitroReceiptValidationGoogleOptions>& optional) noexcept {
|
|
1455
|
+
return *optional;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
// pragma MARK: std::optional<NitroReceiptValidationHorizonOptions>
|
|
1459
|
+
/**
|
|
1460
|
+
* Specialized version of `std::optional<NitroReceiptValidationHorizonOptions>`.
|
|
1461
|
+
*/
|
|
1462
|
+
using std__optional_NitroReceiptValidationHorizonOptions_ = std::optional<NitroReceiptValidationHorizonOptions>;
|
|
1463
|
+
inline std::optional<NitroReceiptValidationHorizonOptions> create_std__optional_NitroReceiptValidationHorizonOptions_(const NitroReceiptValidationHorizonOptions& value) noexcept {
|
|
1464
|
+
return std::optional<NitroReceiptValidationHorizonOptions>(value);
|
|
1465
|
+
}
|
|
1466
|
+
inline bool has_value_std__optional_NitroReceiptValidationHorizonOptions_(const std::optional<NitroReceiptValidationHorizonOptions>& optional) noexcept {
|
|
1467
|
+
return optional.has_value();
|
|
1468
|
+
}
|
|
1469
|
+
inline NitroReceiptValidationHorizonOptions get_std__optional_NitroReceiptValidationHorizonOptions_(const std::optional<NitroReceiptValidationHorizonOptions>& optional) noexcept {
|
|
1425
1470
|
return *optional;
|
|
1426
1471
|
}
|
|
1427
1472
|
|
|
@@ -1567,6 +1612,74 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
1567
1612
|
return Func_void_UserChoiceBillingDetails_Wrapper(std::move(value));
|
|
1568
1613
|
}
|
|
1569
1614
|
|
|
1615
|
+
// pragma MARK: std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>
|
|
1616
|
+
/**
|
|
1617
|
+
* Specialized version of `std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>`.
|
|
1618
|
+
*/
|
|
1619
|
+
using std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__ = std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>;
|
|
1620
|
+
inline std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>> create_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__() noexcept {
|
|
1621
|
+
return Promise<NitroBillingProgramAvailabilityResultAndroid>::create();
|
|
1622
|
+
}
|
|
1623
|
+
inline PromiseHolder<NitroBillingProgramAvailabilityResultAndroid> wrap_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__(std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>> promise) noexcept {
|
|
1624
|
+
return PromiseHolder<NitroBillingProgramAvailabilityResultAndroid>(std::move(promise));
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
// pragma MARK: std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>
|
|
1628
|
+
/**
|
|
1629
|
+
* Specialized version of `std::function<void(const NitroBillingProgramAvailabilityResultAndroid&)>`.
|
|
1630
|
+
*/
|
|
1631
|
+
using Func_void_NitroBillingProgramAvailabilityResultAndroid = std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>;
|
|
1632
|
+
/**
|
|
1633
|
+
* Wrapper class for a `std::function<void(const NitroBillingProgramAvailabilityResultAndroid& / * result * /)>`, this can be used from Swift.
|
|
1634
|
+
*/
|
|
1635
|
+
class Func_void_NitroBillingProgramAvailabilityResultAndroid_Wrapper final {
|
|
1636
|
+
public:
|
|
1637
|
+
explicit Func_void_NitroBillingProgramAvailabilityResultAndroid_Wrapper(std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>&& func): _function(std::make_unique<std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>>(std::move(func))) {}
|
|
1638
|
+
inline void call(NitroBillingProgramAvailabilityResultAndroid result) const noexcept {
|
|
1639
|
+
_function->operator()(result);
|
|
1640
|
+
}
|
|
1641
|
+
private:
|
|
1642
|
+
std::unique_ptr<std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>> _function;
|
|
1643
|
+
} SWIFT_NONCOPYABLE;
|
|
1644
|
+
Func_void_NitroBillingProgramAvailabilityResultAndroid create_Func_void_NitroBillingProgramAvailabilityResultAndroid(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
1645
|
+
inline Func_void_NitroBillingProgramAvailabilityResultAndroid_Wrapper wrap_Func_void_NitroBillingProgramAvailabilityResultAndroid(Func_void_NitroBillingProgramAvailabilityResultAndroid value) noexcept {
|
|
1646
|
+
return Func_void_NitroBillingProgramAvailabilityResultAndroid_Wrapper(std::move(value));
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
// pragma MARK: std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>
|
|
1650
|
+
/**
|
|
1651
|
+
* Specialized version of `std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>`.
|
|
1652
|
+
*/
|
|
1653
|
+
using std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__ = std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>;
|
|
1654
|
+
inline std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>> create_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__() noexcept {
|
|
1655
|
+
return Promise<NitroBillingProgramReportingDetailsAndroid>::create();
|
|
1656
|
+
}
|
|
1657
|
+
inline PromiseHolder<NitroBillingProgramReportingDetailsAndroid> wrap_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__(std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>> promise) noexcept {
|
|
1658
|
+
return PromiseHolder<NitroBillingProgramReportingDetailsAndroid>(std::move(promise));
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
// pragma MARK: std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>
|
|
1662
|
+
/**
|
|
1663
|
+
* Specialized version of `std::function<void(const NitroBillingProgramReportingDetailsAndroid&)>`.
|
|
1664
|
+
*/
|
|
1665
|
+
using Func_void_NitroBillingProgramReportingDetailsAndroid = std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>;
|
|
1666
|
+
/**
|
|
1667
|
+
* Wrapper class for a `std::function<void(const NitroBillingProgramReportingDetailsAndroid& / * result * /)>`, this can be used from Swift.
|
|
1668
|
+
*/
|
|
1669
|
+
class Func_void_NitroBillingProgramReportingDetailsAndroid_Wrapper final {
|
|
1670
|
+
public:
|
|
1671
|
+
explicit Func_void_NitroBillingProgramReportingDetailsAndroid_Wrapper(std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>&& func): _function(std::make_unique<std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>>(std::move(func))) {}
|
|
1672
|
+
inline void call(NitroBillingProgramReportingDetailsAndroid result) const noexcept {
|
|
1673
|
+
_function->operator()(result);
|
|
1674
|
+
}
|
|
1675
|
+
private:
|
|
1676
|
+
std::unique_ptr<std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>> _function;
|
|
1677
|
+
} SWIFT_NONCOPYABLE;
|
|
1678
|
+
Func_void_NitroBillingProgramReportingDetailsAndroid create_Func_void_NitroBillingProgramReportingDetailsAndroid(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
1679
|
+
inline Func_void_NitroBillingProgramReportingDetailsAndroid_Wrapper wrap_Func_void_NitroBillingProgramReportingDetailsAndroid(Func_void_NitroBillingProgramReportingDetailsAndroid value) noexcept {
|
|
1680
|
+
return Func_void_NitroBillingProgramReportingDetailsAndroid_Wrapper(std::move(value));
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1570
1683
|
// pragma MARK: std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>
|
|
1571
1684
|
/**
|
|
1572
1685
|
* Specialized version of `std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>`.
|
|
@@ -1782,6 +1895,24 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
1782
1895
|
return Result<std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>>::withError(error);
|
|
1783
1896
|
}
|
|
1784
1897
|
|
|
1898
|
+
// pragma MARK: Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>
|
|
1899
|
+
using Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___ = Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>;
|
|
1900
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___(const std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>& value) noexcept {
|
|
1901
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>::withValue(value);
|
|
1902
|
+
}
|
|
1903
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___(const std::exception_ptr& error) noexcept {
|
|
1904
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>::withError(error);
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
// pragma MARK: Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>
|
|
1908
|
+
using Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___ = Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>;
|
|
1909
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___(const std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>& value) noexcept {
|
|
1910
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>::withValue(value);
|
|
1911
|
+
}
|
|
1912
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___(const std::exception_ptr& error) noexcept {
|
|
1913
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>::withError(error);
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1785
1916
|
// pragma MARK: Result<std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>>
|
|
1786
1917
|
using Result_std__shared_ptr_Promise_ExternalPurchaseNoticeResultIOS___ = Result<std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>>;
|
|
1787
1918
|
inline Result_std__shared_ptr_Promise_ExternalPurchaseNoticeResultIOS___ create_Result_std__shared_ptr_Promise_ExternalPurchaseNoticeResultIOS___(const std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>& value) noexcept {
|
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
namespace margelo::nitro::iap { enum class AlternativeBillingModeAndroid; }
|
|
13
13
|
// Forward declaration of `AndroidSubscriptionOfferInput` to properly resolve imports.
|
|
14
14
|
namespace margelo::nitro::iap { struct AndroidSubscriptionOfferInput; }
|
|
15
|
+
// Forward declaration of `BillingProgramAndroid` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::iap { enum class BillingProgramAndroid; }
|
|
17
|
+
// Forward declaration of `ExternalLinkLaunchModeAndroid` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::iap { enum class ExternalLinkLaunchModeAndroid; }
|
|
19
|
+
// Forward declaration of `ExternalLinkTypeAndroid` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::iap { enum class ExternalLinkTypeAndroid; }
|
|
15
21
|
// Forward declaration of `ExternalPurchaseLinkResultIOS` to properly resolve imports.
|
|
16
22
|
namespace margelo::nitro::iap { struct ExternalPurchaseLinkResultIOS; }
|
|
17
23
|
// Forward declaration of `ExternalPurchaseNoticeAction` to properly resolve imports.
|
|
@@ -38,6 +44,10 @@ namespace margelo::nitro::iap { enum class NitroAvailablePurchasesAndroidType; }
|
|
|
38
44
|
namespace margelo::nitro::iap { struct NitroAvailablePurchasesIosOptions; }
|
|
39
45
|
// Forward declaration of `NitroAvailablePurchasesOptions` to properly resolve imports.
|
|
40
46
|
namespace margelo::nitro::iap { struct NitroAvailablePurchasesOptions; }
|
|
47
|
+
// Forward declaration of `NitroBillingProgramAvailabilityResultAndroid` to properly resolve imports.
|
|
48
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramAvailabilityResultAndroid; }
|
|
49
|
+
// Forward declaration of `NitroBillingProgramReportingDetailsAndroid` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramReportingDetailsAndroid; }
|
|
41
51
|
// Forward declaration of `NitroDeepLinkOptionsAndroid` to properly resolve imports.
|
|
42
52
|
namespace margelo::nitro::iap { struct NitroDeepLinkOptionsAndroid; }
|
|
43
53
|
// Forward declaration of `NitroDiscountAmountAndroid` to properly resolve imports.
|
|
@@ -50,6 +60,8 @@ namespace margelo::nitro::iap { struct NitroFinishTransactionAndroidParams; }
|
|
|
50
60
|
namespace margelo::nitro::iap { struct NitroFinishTransactionIosParams; }
|
|
51
61
|
// Forward declaration of `NitroFinishTransactionParams` to properly resolve imports.
|
|
52
62
|
namespace margelo::nitro::iap { struct NitroFinishTransactionParams; }
|
|
63
|
+
// Forward declaration of `NitroLaunchExternalLinkParamsAndroid` to properly resolve imports.
|
|
64
|
+
namespace margelo::nitro::iap { struct NitroLaunchExternalLinkParamsAndroid; }
|
|
53
65
|
// Forward declaration of `NitroLimitedQuantityInfoAndroid` to properly resolve imports.
|
|
54
66
|
namespace margelo::nitro::iap { struct NitroLimitedQuantityInfoAndroid; }
|
|
55
67
|
// Forward declaration of `NitroOneTimePurchaseOfferDetail` to properly resolve imports.
|
|
@@ -64,8 +76,12 @@ namespace margelo::nitro::iap { struct NitroPurchaseRequest; }
|
|
|
64
76
|
namespace margelo::nitro::iap { struct NitroPurchaseResult; }
|
|
65
77
|
// Forward declaration of `NitroPurchase` to properly resolve imports.
|
|
66
78
|
namespace margelo::nitro::iap { struct NitroPurchase; }
|
|
67
|
-
// Forward declaration of `
|
|
68
|
-
namespace margelo::nitro::iap { struct
|
|
79
|
+
// Forward declaration of `NitroReceiptValidationAppleOptions` to properly resolve imports.
|
|
80
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationAppleOptions; }
|
|
81
|
+
// Forward declaration of `NitroReceiptValidationGoogleOptions` to properly resolve imports.
|
|
82
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationGoogleOptions; }
|
|
83
|
+
// Forward declaration of `NitroReceiptValidationHorizonOptions` to properly resolve imports.
|
|
84
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationHorizonOptions; }
|
|
69
85
|
// Forward declaration of `NitroReceiptValidationParams` to properly resolve imports.
|
|
70
86
|
namespace margelo::nitro::iap { struct NitroReceiptValidationParams; }
|
|
71
87
|
// Forward declaration of `NitroReceiptValidationResultAndroid` to properly resolve imports.
|
|
@@ -120,6 +136,9 @@ namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
|
120
136
|
// Include C++ defined types
|
|
121
137
|
#include "AlternativeBillingModeAndroid.hpp"
|
|
122
138
|
#include "AndroidSubscriptionOfferInput.hpp"
|
|
139
|
+
#include "BillingProgramAndroid.hpp"
|
|
140
|
+
#include "ExternalLinkLaunchModeAndroid.hpp"
|
|
141
|
+
#include "ExternalLinkTypeAndroid.hpp"
|
|
123
142
|
#include "ExternalPurchaseLinkResultIOS.hpp"
|
|
124
143
|
#include "ExternalPurchaseNoticeAction.hpp"
|
|
125
144
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
@@ -133,12 +152,15 @@ namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
|
133
152
|
#include "NitroAvailablePurchasesAndroidType.hpp"
|
|
134
153
|
#include "NitroAvailablePurchasesIosOptions.hpp"
|
|
135
154
|
#include "NitroAvailablePurchasesOptions.hpp"
|
|
155
|
+
#include "NitroBillingProgramAvailabilityResultAndroid.hpp"
|
|
156
|
+
#include "NitroBillingProgramReportingDetailsAndroid.hpp"
|
|
136
157
|
#include "NitroDeepLinkOptionsAndroid.hpp"
|
|
137
158
|
#include "NitroDiscountAmountAndroid.hpp"
|
|
138
159
|
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
139
160
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
140
161
|
#include "NitroFinishTransactionIosParams.hpp"
|
|
141
162
|
#include "NitroFinishTransactionParams.hpp"
|
|
163
|
+
#include "NitroLaunchExternalLinkParamsAndroid.hpp"
|
|
142
164
|
#include "NitroLimitedQuantityInfoAndroid.hpp"
|
|
143
165
|
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
144
166
|
#include "NitroPreorderDetailsAndroid.hpp"
|
|
@@ -146,7 +168,9 @@ namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
|
146
168
|
#include "NitroPurchase.hpp"
|
|
147
169
|
#include "NitroPurchaseRequest.hpp"
|
|
148
170
|
#include "NitroPurchaseResult.hpp"
|
|
149
|
-
#include "
|
|
171
|
+
#include "NitroReceiptValidationAppleOptions.hpp"
|
|
172
|
+
#include "NitroReceiptValidationGoogleOptions.hpp"
|
|
173
|
+
#include "NitroReceiptValidationHorizonOptions.hpp"
|
|
150
174
|
#include "NitroReceiptValidationParams.hpp"
|
|
151
175
|
#include "NitroReceiptValidationResultAndroid.hpp"
|
|
152
176
|
#include "NitroReceiptValidationResultIOS.hpp"
|
|
@@ -88,8 +88,12 @@ namespace margelo::nitro::iap { struct NitroReceiptValidationResultIOS; }
|
|
|
88
88
|
namespace margelo::nitro::iap { struct NitroReceiptValidationResultAndroid; }
|
|
89
89
|
// Forward declaration of `NitroReceiptValidationParams` to properly resolve imports.
|
|
90
90
|
namespace margelo::nitro::iap { struct NitroReceiptValidationParams; }
|
|
91
|
-
// Forward declaration of `
|
|
92
|
-
namespace margelo::nitro::iap { struct
|
|
91
|
+
// Forward declaration of `NitroReceiptValidationAppleOptions` to properly resolve imports.
|
|
92
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationAppleOptions; }
|
|
93
|
+
// Forward declaration of `NitroReceiptValidationGoogleOptions` to properly resolve imports.
|
|
94
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationGoogleOptions; }
|
|
95
|
+
// Forward declaration of `NitroReceiptValidationHorizonOptions` to properly resolve imports.
|
|
96
|
+
namespace margelo::nitro::iap { struct NitroReceiptValidationHorizonOptions; }
|
|
93
97
|
// Forward declaration of `NitroVerifyPurchaseWithProviderResult` to properly resolve imports.
|
|
94
98
|
namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithProviderResult; }
|
|
95
99
|
// Forward declaration of `NitroVerifyPurchaseWithIapkitResult` to properly resolve imports.
|
|
@@ -112,6 +116,18 @@ namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitGoogleProps;
|
|
|
112
116
|
namespace margelo::nitro::iap { struct NitroDeepLinkOptionsAndroid; }
|
|
113
117
|
// Forward declaration of `UserChoiceBillingDetails` to properly resolve imports.
|
|
114
118
|
namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
119
|
+
// Forward declaration of `BillingProgramAndroid` to properly resolve imports.
|
|
120
|
+
namespace margelo::nitro::iap { enum class BillingProgramAndroid; }
|
|
121
|
+
// Forward declaration of `NitroBillingProgramAvailabilityResultAndroid` to properly resolve imports.
|
|
122
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramAvailabilityResultAndroid; }
|
|
123
|
+
// Forward declaration of `NitroBillingProgramReportingDetailsAndroid` to properly resolve imports.
|
|
124
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramReportingDetailsAndroid; }
|
|
125
|
+
// Forward declaration of `NitroLaunchExternalLinkParamsAndroid` to properly resolve imports.
|
|
126
|
+
namespace margelo::nitro::iap { struct NitroLaunchExternalLinkParamsAndroid; }
|
|
127
|
+
// Forward declaration of `ExternalLinkLaunchModeAndroid` to properly resolve imports.
|
|
128
|
+
namespace margelo::nitro::iap { enum class ExternalLinkLaunchModeAndroid; }
|
|
129
|
+
// Forward declaration of `ExternalLinkTypeAndroid` to properly resolve imports.
|
|
130
|
+
namespace margelo::nitro::iap { enum class ExternalLinkTypeAndroid; }
|
|
115
131
|
// Forward declaration of `ExternalPurchaseNoticeResultIOS` to properly resolve imports.
|
|
116
132
|
namespace margelo::nitro::iap { struct ExternalPurchaseNoticeResultIOS; }
|
|
117
133
|
// Forward declaration of `ExternalPurchaseNoticeAction` to properly resolve imports.
|
|
@@ -164,7 +180,9 @@ namespace margelo::nitro::iap { struct ExternalPurchaseLinkResultIOS; }
|
|
|
164
180
|
#include "NitroReceiptValidationResultIOS.hpp"
|
|
165
181
|
#include "NitroReceiptValidationResultAndroid.hpp"
|
|
166
182
|
#include "NitroReceiptValidationParams.hpp"
|
|
167
|
-
#include "
|
|
183
|
+
#include "NitroReceiptValidationAppleOptions.hpp"
|
|
184
|
+
#include "NitroReceiptValidationGoogleOptions.hpp"
|
|
185
|
+
#include "NitroReceiptValidationHorizonOptions.hpp"
|
|
168
186
|
#include "NitroVerifyPurchaseWithProviderResult.hpp"
|
|
169
187
|
#include "NitroVerifyPurchaseWithIapkitResult.hpp"
|
|
170
188
|
#include "IapkitPurchaseState.hpp"
|
|
@@ -176,6 +194,12 @@ namespace margelo::nitro::iap { struct ExternalPurchaseLinkResultIOS; }
|
|
|
176
194
|
#include "NitroVerifyPurchaseWithIapkitGoogleProps.hpp"
|
|
177
195
|
#include "NitroDeepLinkOptionsAndroid.hpp"
|
|
178
196
|
#include "UserChoiceBillingDetails.hpp"
|
|
197
|
+
#include "BillingProgramAndroid.hpp"
|
|
198
|
+
#include "NitroBillingProgramAvailabilityResultAndroid.hpp"
|
|
199
|
+
#include "NitroBillingProgramReportingDetailsAndroid.hpp"
|
|
200
|
+
#include "NitroLaunchExternalLinkParamsAndroid.hpp"
|
|
201
|
+
#include "ExternalLinkLaunchModeAndroid.hpp"
|
|
202
|
+
#include "ExternalLinkTypeAndroid.hpp"
|
|
179
203
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
180
204
|
#include "ExternalPurchaseNoticeAction.hpp"
|
|
181
205
|
#include "ExternalPurchaseLinkResultIOS.hpp"
|
|
@@ -557,6 +581,36 @@ namespace margelo::nitro::iap {
|
|
|
557
581
|
std::rethrow_exception(__result.error());
|
|
558
582
|
}
|
|
559
583
|
}
|
|
584
|
+
inline void enableBillingProgramAndroid(BillingProgramAndroid program) override {
|
|
585
|
+
auto __result = _swiftPart.enableBillingProgramAndroid(static_cast<int>(program));
|
|
586
|
+
if (__result.hasError()) [[unlikely]] {
|
|
587
|
+
std::rethrow_exception(__result.error());
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
inline std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>> isBillingProgramAvailableAndroid(BillingProgramAndroid program) override {
|
|
591
|
+
auto __result = _swiftPart.isBillingProgramAvailableAndroid(static_cast<int>(program));
|
|
592
|
+
if (__result.hasError()) [[unlikely]] {
|
|
593
|
+
std::rethrow_exception(__result.error());
|
|
594
|
+
}
|
|
595
|
+
auto __value = std::move(__result.value());
|
|
596
|
+
return __value;
|
|
597
|
+
}
|
|
598
|
+
inline std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>> createBillingProgramReportingDetailsAndroid(BillingProgramAndroid program) override {
|
|
599
|
+
auto __result = _swiftPart.createBillingProgramReportingDetailsAndroid(static_cast<int>(program));
|
|
600
|
+
if (__result.hasError()) [[unlikely]] {
|
|
601
|
+
std::rethrow_exception(__result.error());
|
|
602
|
+
}
|
|
603
|
+
auto __value = std::move(__result.value());
|
|
604
|
+
return __value;
|
|
605
|
+
}
|
|
606
|
+
inline std::shared_ptr<Promise<bool>> launchExternalLinkAndroid(const NitroLaunchExternalLinkParamsAndroid& params) override {
|
|
607
|
+
auto __result = _swiftPart.launchExternalLinkAndroid(std::forward<decltype(params)>(params));
|
|
608
|
+
if (__result.hasError()) [[unlikely]] {
|
|
609
|
+
std::rethrow_exception(__result.error());
|
|
610
|
+
}
|
|
611
|
+
auto __value = std::move(__result.value());
|
|
612
|
+
return __value;
|
|
613
|
+
}
|
|
560
614
|
inline std::shared_ptr<Promise<bool>> canPresentExternalPurchaseNoticeIOS() override {
|
|
561
615
|
auto __result = _swiftPart.canPresentExternalPurchaseNoticeIOS();
|
|
562
616
|
if (__result.hasError()) [[unlikely]] {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BillingProgramAndroid.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
|
+
/**
|
|
9
|
+
* Represents the JS union `BillingProgramAndroid`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias BillingProgramAndroid = margelo.nitro.iap.BillingProgramAndroid
|
|
12
|
+
|
|
13
|
+
public extension BillingProgramAndroid {
|
|
14
|
+
/**
|
|
15
|
+
* Get a BillingProgramAndroid for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "unspecified":
|
|
21
|
+
self = .unspecified
|
|
22
|
+
case "external-content-link":
|
|
23
|
+
self = .externalContentLink
|
|
24
|
+
case "external-offer":
|
|
25
|
+
self = .externalOffer
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this BillingProgramAndroid represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .unspecified:
|
|
37
|
+
return "unspecified"
|
|
38
|
+
case .externalContentLink:
|
|
39
|
+
return "external-content-link"
|
|
40
|
+
case .externalOffer:
|
|
41
|
+
return "external-offer"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ExternalLinkLaunchModeAndroid.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
|
+
/**
|
|
9
|
+
* Represents the JS union `ExternalLinkLaunchModeAndroid`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias ExternalLinkLaunchModeAndroid = margelo.nitro.iap.ExternalLinkLaunchModeAndroid
|
|
12
|
+
|
|
13
|
+
public extension ExternalLinkLaunchModeAndroid {
|
|
14
|
+
/**
|
|
15
|
+
* Get a ExternalLinkLaunchModeAndroid for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "unspecified":
|
|
21
|
+
self = .unspecified
|
|
22
|
+
case "launch-in-external-browser-or-app":
|
|
23
|
+
self = .launchInExternalBrowserOrApp
|
|
24
|
+
case "caller-will-launch-link":
|
|
25
|
+
self = .callerWillLaunchLink
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this ExternalLinkLaunchModeAndroid represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .unspecified:
|
|
37
|
+
return "unspecified"
|
|
38
|
+
case .launchInExternalBrowserOrApp:
|
|
39
|
+
return "launch-in-external-browser-or-app"
|
|
40
|
+
case .callerWillLaunchLink:
|
|
41
|
+
return "caller-will-launch-link"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ExternalLinkTypeAndroid.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
|
+
/**
|
|
9
|
+
* Represents the JS union `ExternalLinkTypeAndroid`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias ExternalLinkTypeAndroid = margelo.nitro.iap.ExternalLinkTypeAndroid
|
|
12
|
+
|
|
13
|
+
public extension ExternalLinkTypeAndroid {
|
|
14
|
+
/**
|
|
15
|
+
* Get a ExternalLinkTypeAndroid for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "unspecified":
|
|
21
|
+
self = .unspecified
|
|
22
|
+
case "link-to-digital-content-offer":
|
|
23
|
+
self = .linkToDigitalContentOffer
|
|
24
|
+
case "link-to-app-download":
|
|
25
|
+
self = .linkToAppDownload
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this ExternalLinkTypeAndroid represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .unspecified:
|
|
37
|
+
return "unspecified"
|
|
38
|
+
case .linkToDigitalContentOffer:
|
|
39
|
+
return "link-to-digital-content-offer"
|
|
40
|
+
case .linkToAppDownload:
|
|
41
|
+
return "link-to-app-download"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramAvailabilityResultAndroid.swift
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_NitroBillingProgramAvailabilityResultAndroid.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
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ value: NitroBillingProgramAvailabilityResultAndroid) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_NitroBillingProgramAvailabilityResultAndroid {
|
|
16
|
+
public typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ value: NitroBillingProgramAvailabilityResultAndroid) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ value: NitroBillingProgramAvailabilityResultAndroid) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(value: NitroBillingProgramAvailabilityResultAndroid) -> Void {
|
|
26
|
+
self.closure(value)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_NitroBillingProgramAvailabilityResultAndroid`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_NitroBillingProgramAvailabilityResultAndroid>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_NitroBillingProgramAvailabilityResultAndroid {
|
|
45
|
+
return Unmanaged<Func_void_NitroBillingProgramAvailabilityResultAndroid>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramReportingDetailsAndroid.swift
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_NitroBillingProgramReportingDetailsAndroid.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
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ value: NitroBillingProgramReportingDetailsAndroid) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_NitroBillingProgramReportingDetailsAndroid {
|
|
16
|
+
public typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ value: NitroBillingProgramReportingDetailsAndroid) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ value: NitroBillingProgramReportingDetailsAndroid) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(value: NitroBillingProgramReportingDetailsAndroid) -> Void {
|
|
26
|
+
self.closure(value)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_NitroBillingProgramReportingDetailsAndroid`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_NitroBillingProgramReportingDetailsAndroid>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_NitroBillingProgramReportingDetailsAndroid {
|
|
45
|
+
return Unmanaged<Func_void_NitroBillingProgramReportingDetailsAndroid>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -59,6 +59,10 @@ public protocol HybridRnIapSpec_protocol: HybridObject {
|
|
|
59
59
|
func createAlternativeBillingTokenAndroid(sku: String?) throws -> Promise<String?>
|
|
60
60
|
func addUserChoiceBillingListenerAndroid(listener: @escaping (_ details: UserChoiceBillingDetails) -> Void) throws -> Void
|
|
61
61
|
func removeUserChoiceBillingListenerAndroid(listener: @escaping (_ details: UserChoiceBillingDetails) -> Void) throws -> Void
|
|
62
|
+
func enableBillingProgramAndroid(program: BillingProgramAndroid) throws -> Void
|
|
63
|
+
func isBillingProgramAvailableAndroid(program: BillingProgramAndroid) throws -> Promise<NitroBillingProgramAvailabilityResultAndroid>
|
|
64
|
+
func createBillingProgramReportingDetailsAndroid(program: BillingProgramAndroid) throws -> Promise<NitroBillingProgramReportingDetailsAndroid>
|
|
65
|
+
func launchExternalLinkAndroid(params: NitroLaunchExternalLinkParamsAndroid) throws -> Promise<Bool>
|
|
62
66
|
func canPresentExternalPurchaseNoticeIOS() throws -> Promise<Bool>
|
|
63
67
|
func presentExternalPurchaseNoticeSheetIOS() throws -> Promise<ExternalPurchaseNoticeResultIOS>
|
|
64
68
|
func presentExternalPurchaseLinkIOS(url: String) throws -> Promise<ExternalPurchaseLinkResultIOS>
|