@doorstepai/dropoff-sdk 1.0.16 → 1.0.18

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.
@@ -86,7 +86,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
86
86
  dependencies {
87
87
  implementation "com.facebook.react:react-android"
88
88
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
89
- implementation("ai.doorstep.com:doorstepai-dropoff-sdk:1.0.7")
89
+ implementation("ai.doorstep.com:doorstepai-dropoff-sdk:1.0.8")
90
90
  api "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
91
91
  }
92
92
 
@@ -123,8 +123,17 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
123
123
  }
124
124
 
125
125
  @ReactMethod
126
- fun setDevMode(enabled: Boolean) {
127
- DoorstepAI.devMode = enabled
126
+ fun enableDevMode(promise: Promise) {
127
+ CoroutineScope(Dispatchers.IO).launch {
128
+ try {
129
+ android.util.Log.i("DoorstepAI", "Attempting to enable dev mode...")
130
+ val result = DoorstepAI.enableDevMode()
131
+ android.util.Log.i("DoorstepAI", "Dev mode enabled: $result")
132
+ promise.resolve(result)
133
+ } catch (e: Exception) {
134
+ promise.reject("DEV_MODE_ERROR", e.message ?: "Failed to enable dev mode")
135
+ }
136
+ }
128
137
  }
129
138
 
130
139
  companion object {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doorstepai/dropoff-sdk",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "doorstep.ai dropoff sdk for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",