react-native-iap 14.5.1-rc.1 → 14.6.0-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 +126 -0
- package/ios/HybridRnIap.swift +24 -0
- package/lib/module/index.js +166 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +58 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/index.d.ts +124 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +71 -0
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +100 -1
- 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 +76 -0
- 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/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/ios/NitroIap-Swift-Cxx-Bridge.cpp +16 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +95 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +18 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +48 -0
- 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/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/openiap-versions.json +2 -2
- package/package.json +1 -1
- package/src/index.ts +218 -0
- package/src/specs/RnIap.nitro.ts +101 -0
- package/src/types.ts +110 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BillingProgramAndroid.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "BillingProgramAndroid".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class BillingProgramAndroid(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
UNSPECIFIED(0),
|
|
20
|
+
EXTERNAL_CONTENT_LINK(1),
|
|
21
|
+
EXTERNAL_OFFER(2);
|
|
22
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalLinkLaunchModeAndroid.kt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ExternalLinkLaunchModeAndroid.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "ExternalLinkLaunchModeAndroid".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class ExternalLinkLaunchModeAndroid(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
UNSPECIFIED(0),
|
|
20
|
+
LAUNCH_IN_EXTERNAL_BROWSER_OR_APP(1),
|
|
21
|
+
CALLER_WILL_LAUNCH_LINK(2);
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ExternalLinkTypeAndroid.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "ExternalLinkTypeAndroid".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class ExternalLinkTypeAndroid(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
UNSPECIFIED(0),
|
|
20
|
+
LINK_TO_DIGITAL_CONTENT_OFFER(1),
|
|
21
|
+
LINK_TO_APP_DOWNLOAD(2);
|
|
22
|
+
}
|
|
@@ -257,6 +257,22 @@ abstract class HybridRnIapSpec: HybridObject() {
|
|
|
257
257
|
return __result
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
@DoNotStrip
|
|
261
|
+
@Keep
|
|
262
|
+
abstract fun enableBillingProgramAndroid(program: BillingProgramAndroid): Unit
|
|
263
|
+
|
|
264
|
+
@DoNotStrip
|
|
265
|
+
@Keep
|
|
266
|
+
abstract fun isBillingProgramAvailableAndroid(program: BillingProgramAndroid): Promise<NitroBillingProgramAvailabilityResultAndroid>
|
|
267
|
+
|
|
268
|
+
@DoNotStrip
|
|
269
|
+
@Keep
|
|
270
|
+
abstract fun createBillingProgramReportingDetailsAndroid(program: BillingProgramAndroid): Promise<NitroBillingProgramReportingDetailsAndroid>
|
|
271
|
+
|
|
272
|
+
@DoNotStrip
|
|
273
|
+
@Keep
|
|
274
|
+
abstract fun launchExternalLinkAndroid(params: NitroLaunchExternalLinkParamsAndroid): Promise<Boolean>
|
|
275
|
+
|
|
260
276
|
@DoNotStrip
|
|
261
277
|
@Keep
|
|
262
278
|
abstract fun canPresentExternalPurchaseNoticeIOS(): Promise<Boolean>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroBillingProgramAvailabilityResultAndroid.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroBillingProgramAvailabilityResultAndroid".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroBillingProgramAvailabilityResultAndroid(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val billingProgram: BillingProgramAndroid,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val isAvailable: Boolean
|
|
26
|
+
) {
|
|
27
|
+
private companion object {
|
|
28
|
+
/**
|
|
29
|
+
* Constructor called from C++
|
|
30
|
+
*/
|
|
31
|
+
@DoNotStrip
|
|
32
|
+
@Keep
|
|
33
|
+
@Suppress("unused")
|
|
34
|
+
@JvmStatic
|
|
35
|
+
private fun fromCpp(billingProgram: BillingProgramAndroid, isAvailable: Boolean): NitroBillingProgramAvailabilityResultAndroid {
|
|
36
|
+
return NitroBillingProgramAvailabilityResultAndroid(billingProgram, isAvailable)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroBillingProgramReportingDetailsAndroid.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroBillingProgramReportingDetailsAndroid".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroBillingProgramReportingDetailsAndroid(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val billingProgram: BillingProgramAndroid,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val externalTransactionToken: String
|
|
26
|
+
) {
|
|
27
|
+
private companion object {
|
|
28
|
+
/**
|
|
29
|
+
* Constructor called from C++
|
|
30
|
+
*/
|
|
31
|
+
@DoNotStrip
|
|
32
|
+
@Keep
|
|
33
|
+
@Suppress("unused")
|
|
34
|
+
@JvmStatic
|
|
35
|
+
private fun fromCpp(billingProgram: BillingProgramAndroid, externalTransactionToken: String): NitroBillingProgramReportingDetailsAndroid {
|
|
36
|
+
return NitroBillingProgramReportingDetailsAndroid(billingProgram, externalTransactionToken)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroLaunchExternalLinkParamsAndroid.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.iap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroLaunchExternalLinkParamsAndroid".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroLaunchExternalLinkParamsAndroid(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val billingProgram: BillingProgramAndroid,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val launchMode: ExternalLinkLaunchModeAndroid,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val linkType: ExternalLinkTypeAndroid,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val linkUri: String
|
|
32
|
+
) {
|
|
33
|
+
private companion object {
|
|
34
|
+
/**
|
|
35
|
+
* Constructor called from C++
|
|
36
|
+
*/
|
|
37
|
+
@DoNotStrip
|
|
38
|
+
@Keep
|
|
39
|
+
@Suppress("unused")
|
|
40
|
+
@JvmStatic
|
|
41
|
+
private fun fromCpp(billingProgram: BillingProgramAndroid, launchMode: ExternalLinkLaunchModeAndroid, linkType: ExternalLinkTypeAndroid, linkUri: String): NitroLaunchExternalLinkParamsAndroid {
|
|
42
|
+
return NitroLaunchExternalLinkParamsAndroid(billingProgram, launchMode, linkType, linkUri)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -165,6 +165,22 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
// pragma MARK: std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>
|
|
169
|
+
Func_void_NitroBillingProgramAvailabilityResultAndroid create_Func_void_NitroBillingProgramAvailabilityResultAndroid(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
170
|
+
auto swiftClosure = NitroIap::Func_void_NitroBillingProgramAvailabilityResultAndroid::fromUnsafe(swiftClosureWrapper);
|
|
171
|
+
return [swiftClosure = std::move(swiftClosure)](const NitroBillingProgramAvailabilityResultAndroid& result) mutable -> void {
|
|
172
|
+
swiftClosure.call(result);
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// pragma MARK: std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>
|
|
177
|
+
Func_void_NitroBillingProgramReportingDetailsAndroid create_Func_void_NitroBillingProgramReportingDetailsAndroid(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
178
|
+
auto swiftClosure = NitroIap::Func_void_NitroBillingProgramReportingDetailsAndroid::fromUnsafe(swiftClosureWrapper);
|
|
179
|
+
return [swiftClosure = std::move(swiftClosure)](const NitroBillingProgramReportingDetailsAndroid& result) mutable -> void {
|
|
180
|
+
swiftClosure.call(result);
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
168
184
|
// pragma MARK: std::function<void(const ExternalPurchaseNoticeResultIOS& /* result */)>
|
|
169
185
|
Func_void_ExternalPurchaseNoticeResultIOS create_Func_void_ExternalPurchaseNoticeResultIOS(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
170
186
|
auto swiftClosure = NitroIap::Func_void_ExternalPurchaseNoticeResultIOS::fromUnsafe(swiftClosureWrapper);
|
|
@@ -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.
|
|
@@ -114,6 +120,7 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
114
120
|
// Include C++ defined types
|
|
115
121
|
#include "AlternativeBillingModeAndroid.hpp"
|
|
116
122
|
#include "AndroidSubscriptionOfferInput.hpp"
|
|
123
|
+
#include "BillingProgramAndroid.hpp"
|
|
117
124
|
#include "ExternalPurchaseLinkResultIOS.hpp"
|
|
118
125
|
#include "ExternalPurchaseNoticeAction.hpp"
|
|
119
126
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
@@ -127,6 +134,8 @@ namespace NitroIap { class HybridRnIapSpec_cxx; }
|
|
|
127
134
|
#include "NitroAvailablePurchasesAndroidType.hpp"
|
|
128
135
|
#include "NitroAvailablePurchasesIosOptions.hpp"
|
|
129
136
|
#include "NitroAvailablePurchasesOptions.hpp"
|
|
137
|
+
#include "NitroBillingProgramAvailabilityResultAndroid.hpp"
|
|
138
|
+
#include "NitroBillingProgramReportingDetailsAndroid.hpp"
|
|
130
139
|
#include "NitroDiscountAmountAndroid.hpp"
|
|
131
140
|
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
132
141
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
@@ -1567,6 +1576,74 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
1567
1576
|
return Func_void_UserChoiceBillingDetails_Wrapper(std::move(value));
|
|
1568
1577
|
}
|
|
1569
1578
|
|
|
1579
|
+
// pragma MARK: std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>
|
|
1580
|
+
/**
|
|
1581
|
+
* Specialized version of `std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>`.
|
|
1582
|
+
*/
|
|
1583
|
+
using std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__ = std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>;
|
|
1584
|
+
inline std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>> create_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__() noexcept {
|
|
1585
|
+
return Promise<NitroBillingProgramAvailabilityResultAndroid>::create();
|
|
1586
|
+
}
|
|
1587
|
+
inline PromiseHolder<NitroBillingProgramAvailabilityResultAndroid> wrap_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__(std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>> promise) noexcept {
|
|
1588
|
+
return PromiseHolder<NitroBillingProgramAvailabilityResultAndroid>(std::move(promise));
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
// pragma MARK: std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>
|
|
1592
|
+
/**
|
|
1593
|
+
* Specialized version of `std::function<void(const NitroBillingProgramAvailabilityResultAndroid&)>`.
|
|
1594
|
+
*/
|
|
1595
|
+
using Func_void_NitroBillingProgramAvailabilityResultAndroid = std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>;
|
|
1596
|
+
/**
|
|
1597
|
+
* Wrapper class for a `std::function<void(const NitroBillingProgramAvailabilityResultAndroid& / * result * /)>`, this can be used from Swift.
|
|
1598
|
+
*/
|
|
1599
|
+
class Func_void_NitroBillingProgramAvailabilityResultAndroid_Wrapper final {
|
|
1600
|
+
public:
|
|
1601
|
+
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))) {}
|
|
1602
|
+
inline void call(NitroBillingProgramAvailabilityResultAndroid result) const noexcept {
|
|
1603
|
+
_function->operator()(result);
|
|
1604
|
+
}
|
|
1605
|
+
private:
|
|
1606
|
+
std::unique_ptr<std::function<void(const NitroBillingProgramAvailabilityResultAndroid& /* result */)>> _function;
|
|
1607
|
+
} SWIFT_NONCOPYABLE;
|
|
1608
|
+
Func_void_NitroBillingProgramAvailabilityResultAndroid create_Func_void_NitroBillingProgramAvailabilityResultAndroid(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
1609
|
+
inline Func_void_NitroBillingProgramAvailabilityResultAndroid_Wrapper wrap_Func_void_NitroBillingProgramAvailabilityResultAndroid(Func_void_NitroBillingProgramAvailabilityResultAndroid value) noexcept {
|
|
1610
|
+
return Func_void_NitroBillingProgramAvailabilityResultAndroid_Wrapper(std::move(value));
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
// pragma MARK: std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>
|
|
1614
|
+
/**
|
|
1615
|
+
* Specialized version of `std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>`.
|
|
1616
|
+
*/
|
|
1617
|
+
using std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__ = std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>;
|
|
1618
|
+
inline std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>> create_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__() noexcept {
|
|
1619
|
+
return Promise<NitroBillingProgramReportingDetailsAndroid>::create();
|
|
1620
|
+
}
|
|
1621
|
+
inline PromiseHolder<NitroBillingProgramReportingDetailsAndroid> wrap_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__(std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>> promise) noexcept {
|
|
1622
|
+
return PromiseHolder<NitroBillingProgramReportingDetailsAndroid>(std::move(promise));
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
// pragma MARK: std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>
|
|
1626
|
+
/**
|
|
1627
|
+
* Specialized version of `std::function<void(const NitroBillingProgramReportingDetailsAndroid&)>`.
|
|
1628
|
+
*/
|
|
1629
|
+
using Func_void_NitroBillingProgramReportingDetailsAndroid = std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>;
|
|
1630
|
+
/**
|
|
1631
|
+
* Wrapper class for a `std::function<void(const NitroBillingProgramReportingDetailsAndroid& / * result * /)>`, this can be used from Swift.
|
|
1632
|
+
*/
|
|
1633
|
+
class Func_void_NitroBillingProgramReportingDetailsAndroid_Wrapper final {
|
|
1634
|
+
public:
|
|
1635
|
+
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))) {}
|
|
1636
|
+
inline void call(NitroBillingProgramReportingDetailsAndroid result) const noexcept {
|
|
1637
|
+
_function->operator()(result);
|
|
1638
|
+
}
|
|
1639
|
+
private:
|
|
1640
|
+
std::unique_ptr<std::function<void(const NitroBillingProgramReportingDetailsAndroid& /* result */)>> _function;
|
|
1641
|
+
} SWIFT_NONCOPYABLE;
|
|
1642
|
+
Func_void_NitroBillingProgramReportingDetailsAndroid create_Func_void_NitroBillingProgramReportingDetailsAndroid(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
1643
|
+
inline Func_void_NitroBillingProgramReportingDetailsAndroid_Wrapper wrap_Func_void_NitroBillingProgramReportingDetailsAndroid(Func_void_NitroBillingProgramReportingDetailsAndroid value) noexcept {
|
|
1644
|
+
return Func_void_NitroBillingProgramReportingDetailsAndroid_Wrapper(std::move(value));
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1570
1647
|
// pragma MARK: std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>
|
|
1571
1648
|
/**
|
|
1572
1649
|
* Specialized version of `std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>`.
|
|
@@ -1782,6 +1859,24 @@ namespace margelo::nitro::iap::bridge::swift {
|
|
|
1782
1859
|
return Result<std::shared_ptr<Promise<NitroVerifyPurchaseWithProviderResult>>>::withError(error);
|
|
1783
1860
|
}
|
|
1784
1861
|
|
|
1862
|
+
// pragma MARK: Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>
|
|
1863
|
+
using Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___ = Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>;
|
|
1864
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___(const std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>& value) noexcept {
|
|
1865
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>::withValue(value);
|
|
1866
|
+
}
|
|
1867
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___(const std::exception_ptr& error) noexcept {
|
|
1868
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>>>::withError(error);
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
// pragma MARK: Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>
|
|
1872
|
+
using Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___ = Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>;
|
|
1873
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___(const std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>& value) noexcept {
|
|
1874
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>::withValue(value);
|
|
1875
|
+
}
|
|
1876
|
+
inline Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___ create_Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___(const std::exception_ptr& error) noexcept {
|
|
1877
|
+
return Result<std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>>>::withError(error);
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1785
1880
|
// pragma MARK: Result<std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>>
|
|
1786
1881
|
using Result_std__shared_ptr_Promise_ExternalPurchaseNoticeResultIOS___ = Result<std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>>>;
|
|
1787
1882
|
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.
|
|
@@ -120,6 +132,9 @@ namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
|
120
132
|
// Include C++ defined types
|
|
121
133
|
#include "AlternativeBillingModeAndroid.hpp"
|
|
122
134
|
#include "AndroidSubscriptionOfferInput.hpp"
|
|
135
|
+
#include "BillingProgramAndroid.hpp"
|
|
136
|
+
#include "ExternalLinkLaunchModeAndroid.hpp"
|
|
137
|
+
#include "ExternalLinkTypeAndroid.hpp"
|
|
123
138
|
#include "ExternalPurchaseLinkResultIOS.hpp"
|
|
124
139
|
#include "ExternalPurchaseNoticeAction.hpp"
|
|
125
140
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
@@ -133,12 +148,15 @@ namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
|
133
148
|
#include "NitroAvailablePurchasesAndroidType.hpp"
|
|
134
149
|
#include "NitroAvailablePurchasesIosOptions.hpp"
|
|
135
150
|
#include "NitroAvailablePurchasesOptions.hpp"
|
|
151
|
+
#include "NitroBillingProgramAvailabilityResultAndroid.hpp"
|
|
152
|
+
#include "NitroBillingProgramReportingDetailsAndroid.hpp"
|
|
136
153
|
#include "NitroDeepLinkOptionsAndroid.hpp"
|
|
137
154
|
#include "NitroDiscountAmountAndroid.hpp"
|
|
138
155
|
#include "NitroDiscountDisplayInfoAndroid.hpp"
|
|
139
156
|
#include "NitroFinishTransactionAndroidParams.hpp"
|
|
140
157
|
#include "NitroFinishTransactionIosParams.hpp"
|
|
141
158
|
#include "NitroFinishTransactionParams.hpp"
|
|
159
|
+
#include "NitroLaunchExternalLinkParamsAndroid.hpp"
|
|
142
160
|
#include "NitroLimitedQuantityInfoAndroid.hpp"
|
|
143
161
|
#include "NitroOneTimePurchaseOfferDetail.hpp"
|
|
144
162
|
#include "NitroPreorderDetailsAndroid.hpp"
|
|
@@ -112,6 +112,18 @@ namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithIapkitGoogleProps;
|
|
|
112
112
|
namespace margelo::nitro::iap { struct NitroDeepLinkOptionsAndroid; }
|
|
113
113
|
// Forward declaration of `UserChoiceBillingDetails` to properly resolve imports.
|
|
114
114
|
namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
115
|
+
// Forward declaration of `BillingProgramAndroid` to properly resolve imports.
|
|
116
|
+
namespace margelo::nitro::iap { enum class BillingProgramAndroid; }
|
|
117
|
+
// Forward declaration of `NitroBillingProgramAvailabilityResultAndroid` to properly resolve imports.
|
|
118
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramAvailabilityResultAndroid; }
|
|
119
|
+
// Forward declaration of `NitroBillingProgramReportingDetailsAndroid` to properly resolve imports.
|
|
120
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramReportingDetailsAndroid; }
|
|
121
|
+
// Forward declaration of `NitroLaunchExternalLinkParamsAndroid` to properly resolve imports.
|
|
122
|
+
namespace margelo::nitro::iap { struct NitroLaunchExternalLinkParamsAndroid; }
|
|
123
|
+
// Forward declaration of `ExternalLinkLaunchModeAndroid` to properly resolve imports.
|
|
124
|
+
namespace margelo::nitro::iap { enum class ExternalLinkLaunchModeAndroid; }
|
|
125
|
+
// Forward declaration of `ExternalLinkTypeAndroid` to properly resolve imports.
|
|
126
|
+
namespace margelo::nitro::iap { enum class ExternalLinkTypeAndroid; }
|
|
115
127
|
// Forward declaration of `ExternalPurchaseNoticeResultIOS` to properly resolve imports.
|
|
116
128
|
namespace margelo::nitro::iap { struct ExternalPurchaseNoticeResultIOS; }
|
|
117
129
|
// Forward declaration of `ExternalPurchaseNoticeAction` to properly resolve imports.
|
|
@@ -176,6 +188,12 @@ namespace margelo::nitro::iap { struct ExternalPurchaseLinkResultIOS; }
|
|
|
176
188
|
#include "NitroVerifyPurchaseWithIapkitGoogleProps.hpp"
|
|
177
189
|
#include "NitroDeepLinkOptionsAndroid.hpp"
|
|
178
190
|
#include "UserChoiceBillingDetails.hpp"
|
|
191
|
+
#include "BillingProgramAndroid.hpp"
|
|
192
|
+
#include "NitroBillingProgramAvailabilityResultAndroid.hpp"
|
|
193
|
+
#include "NitroBillingProgramReportingDetailsAndroid.hpp"
|
|
194
|
+
#include "NitroLaunchExternalLinkParamsAndroid.hpp"
|
|
195
|
+
#include "ExternalLinkLaunchModeAndroid.hpp"
|
|
196
|
+
#include "ExternalLinkTypeAndroid.hpp"
|
|
179
197
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
180
198
|
#include "ExternalPurchaseNoticeAction.hpp"
|
|
181
199
|
#include "ExternalPurchaseLinkResultIOS.hpp"
|
|
@@ -557,6 +575,36 @@ namespace margelo::nitro::iap {
|
|
|
557
575
|
std::rethrow_exception(__result.error());
|
|
558
576
|
}
|
|
559
577
|
}
|
|
578
|
+
inline void enableBillingProgramAndroid(BillingProgramAndroid program) override {
|
|
579
|
+
auto __result = _swiftPart.enableBillingProgramAndroid(static_cast<int>(program));
|
|
580
|
+
if (__result.hasError()) [[unlikely]] {
|
|
581
|
+
std::rethrow_exception(__result.error());
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
inline std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>> isBillingProgramAvailableAndroid(BillingProgramAndroid program) override {
|
|
585
|
+
auto __result = _swiftPart.isBillingProgramAvailableAndroid(static_cast<int>(program));
|
|
586
|
+
if (__result.hasError()) [[unlikely]] {
|
|
587
|
+
std::rethrow_exception(__result.error());
|
|
588
|
+
}
|
|
589
|
+
auto __value = std::move(__result.value());
|
|
590
|
+
return __value;
|
|
591
|
+
}
|
|
592
|
+
inline std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>> createBillingProgramReportingDetailsAndroid(BillingProgramAndroid program) override {
|
|
593
|
+
auto __result = _swiftPart.createBillingProgramReportingDetailsAndroid(static_cast<int>(program));
|
|
594
|
+
if (__result.hasError()) [[unlikely]] {
|
|
595
|
+
std::rethrow_exception(__result.error());
|
|
596
|
+
}
|
|
597
|
+
auto __value = std::move(__result.value());
|
|
598
|
+
return __value;
|
|
599
|
+
}
|
|
600
|
+
inline std::shared_ptr<Promise<bool>> launchExternalLinkAndroid(const NitroLaunchExternalLinkParamsAndroid& params) override {
|
|
601
|
+
auto __result = _swiftPart.launchExternalLinkAndroid(std::forward<decltype(params)>(params));
|
|
602
|
+
if (__result.hasError()) [[unlikely]] {
|
|
603
|
+
std::rethrow_exception(__result.error());
|
|
604
|
+
}
|
|
605
|
+
auto __value = std::move(__result.value());
|
|
606
|
+
return __value;
|
|
607
|
+
}
|
|
560
608
|
inline std::shared_ptr<Promise<bool>> canPresentExternalPurchaseNoticeIOS() override {
|
|
561
609
|
auto __result = _swiftPart.canPresentExternalPurchaseNoticeIOS();
|
|
562
610
|
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
|
+
}
|