react-native-nami-sdk 3.3.0-6 → 3.3.0-7
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/build.gradle
CHANGED
|
@@ -85,8 +85,8 @@ dependencies {
|
|
|
85
85
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
86
86
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
87
87
|
|
|
88
|
-
playImplementation "com.namiml:sdk-android:3.3.0.
|
|
89
|
-
amazonImplementation "com.namiml:sdk-amazon:3.3.0.
|
|
88
|
+
playImplementation "com.namiml:sdk-android:3.3.0.2"
|
|
89
|
+
amazonImplementation "com.namiml:sdk-amazon:3.3.0.2"
|
|
90
90
|
|
|
91
91
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
92
92
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.4"
|
|
@@ -158,8 +158,7 @@ class NamiCampaignManagerBridgeModule internal constructor(
|
|
|
158
158
|
paywallEvent: NamiPaywallEvent,
|
|
159
159
|
actionCallback: Callback,
|
|
160
160
|
) {
|
|
161
|
-
val actionString = paywallEvent.action.
|
|
162
|
-
|
|
161
|
+
val actionString = paywallEvent.action.toRNActionString()
|
|
163
162
|
val purchasesArray = createPurchaseArray(paywallEvent.purchases)
|
|
164
163
|
|
|
165
164
|
val resultMap =
|
|
@@ -15,6 +15,41 @@ import java.text.SimpleDateFormat
|
|
|
15
15
|
import java.util.Date
|
|
16
16
|
import java.util.Locale
|
|
17
17
|
import java.util.TimeZone
|
|
18
|
+
import com.namiml.paywall.model.NamiPaywallAction
|
|
19
|
+
|
|
20
|
+
fun NamiPaywallAction.toRNActionString(): String {
|
|
21
|
+
return when (this) {
|
|
22
|
+
NamiPaywallAction.NAMI_BUY_SKU -> "BUY_SKU"
|
|
23
|
+
NamiPaywallAction.NAMI_SELECT_SKU -> "SELECT_SKU"
|
|
24
|
+
NamiPaywallAction.NAMI_RESTORE_PURCHASES -> "RESTORE_PURCHASES"
|
|
25
|
+
NamiPaywallAction.NAMI_SHOW_PAYWALL -> "SHOW_PAYWALL"
|
|
26
|
+
NamiPaywallAction.NAMI_CLOSE_PAYWALL -> "CLOSE_PAYWALL"
|
|
27
|
+
NamiPaywallAction.NAMI_SIGN_IN -> "SIGN_IN"
|
|
28
|
+
NamiPaywallAction.NAMI_PURCHASE_SELECTED_SKU -> "PURCHASE_SELECTED_SKU"
|
|
29
|
+
NamiPaywallAction.NAMI_PURCHASE_SUCCESS -> "PURCHASE_SUCCESS"
|
|
30
|
+
NamiPaywallAction.NAMI_PURCHASE_FAILED -> "PURCHASE_FAILED"
|
|
31
|
+
NamiPaywallAction.NAMI_PURCHASE_CANCELLED -> "PURCHASE_CANCELLED"
|
|
32
|
+
NamiPaywallAction.NAMI_PURCHASE_PENDING -> "PURCHASE_PENDING"
|
|
33
|
+
NamiPaywallAction.NAMI_PURCHASE_UNKNOWN -> "PURCHASE_UNKNOWN"
|
|
34
|
+
NamiPaywallAction.NAMI_DEEP_LINK -> "DEEPLINK"
|
|
35
|
+
NamiPaywallAction.NAMI_TOGGLE_CHANGE -> "TOGGLE_CHANGE"
|
|
36
|
+
NamiPaywallAction.NAMI_PAGE_CHANGE -> "PAGE_CHANGE"
|
|
37
|
+
NamiPaywallAction.NAMI_SLIDE_CHANGE -> "SLIDE_CHANGE"
|
|
38
|
+
NamiPaywallAction.NAMI_COLLAPSIBLE_DRAWER_OPEN -> "COLLAPSIBLE_DRAWER_OPEN"
|
|
39
|
+
NamiPaywallAction.NAMI_COLLAPSIBLE_DRAWER_CLOSE -> "COLLAPSIBLE_DRAWER_CLOSE"
|
|
40
|
+
NamiPaywallAction.NAMI_VIDEO_STARTED -> "VIDEO_STARTED"
|
|
41
|
+
NamiPaywallAction.NAMI_VIDEO_PAUSED -> "VIDEO_PAUSED"
|
|
42
|
+
NamiPaywallAction.NAMI_VIDEO_RESUMED -> "VIDEO_RESUMED"
|
|
43
|
+
NamiPaywallAction.NAMI_VIDEO_ENDED -> "VIDEO_ENDED"
|
|
44
|
+
NamiPaywallAction.NAMI_VIDEO_CHANGED -> "VIDEO_CHANGED"
|
|
45
|
+
NamiPaywallAction.NAMI_VIDEO_MUTED -> "VIDEO_MUTED"
|
|
46
|
+
NamiPaywallAction.NAMI_VIDEO_UNMUTED -> "VIDEO_UNMUTED"
|
|
47
|
+
else -> {
|
|
48
|
+
Log.w("NamiUtil", "Unhandled NamiPaywallAction: $this. This might indicate a new enum value added in the SDK.")
|
|
49
|
+
"UNKNOWN"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
18
53
|
|
|
19
54
|
fun List<*>.toWritableArray(): WritableArray {
|
|
20
55
|
val convertedArray = Arguments.createArray()
|
package/dist/src/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nami-sdk",
|
|
3
|
-
"version": "3.3.0-
|
|
3
|
+
"version": "3.3.0-7",
|
|
4
4
|
"description": "React Native Module for Nami - Easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/src/version.ts
CHANGED