@doorstepai/dropoff-sdk 2.0.5 → 2.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.
Files changed (19) hide show
  1. package/android/build.gradle +1 -1
  2. package/ios/DoorstepAI.mm +14 -14
  3. package/ios/DoorstepAI.swift +31 -28
  4. package/ios/DoorstepDropoffSDK.xcframework/Info.plist +5 -5
  5. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
  6. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.abi.json +164 -157
  7. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +4 -4
  8. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
  9. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +1947 -1944
  10. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
  11. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +164 -157
  12. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +164 -157
  13. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +8 -8
  14. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
  15. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +1947 -1944
  16. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +1938 -1935
  17. package/lib/module/DoorstepAI.js +1 -1
  18. package/package.json +1 -1
  19. package/src/DoorstepAI.tsx +1 -1
@@ -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:2.0.6")
89
+ implementation("ai.doorstep.com:doorstepai-dropoff-sdk:2.0.8")
90
90
  api "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
91
91
  }
92
92
 
package/ios/DoorstepAI.mm CHANGED
@@ -5,45 +5,45 @@
5
5
  RCT_EXTERN_METHOD(setApiKey:(nonnull NSString *)apiKey)
6
6
  RCT_EXTERN_METHOD(requestAllPermissions:(BOOL)requestAlwaysLocation)
7
7
  RCT_EXTERN_METHOD(configureRemoteLogging:(BOOL)enabled
8
- minLevel:(nullable NSNumber *)minLevel
9
- flushIntervalSeconds:(nullable NSNumber *)flushIntervalSeconds
10
- batchSize:(nullable NSNumber *)batchSize
11
- maxQueueSize:(nullable NSNumber *)maxQueueSize)
8
+ minLevel:(id)minLevel
9
+ flushIntervalSeconds:(id)flushIntervalSeconds
10
+ batchSize:(id)batchSize
11
+ maxQueueSize:(id)maxQueueSize)
12
12
  RCT_EXTERN_METHOD(enableDevMode:(nonnull NSString *)apiKey
13
13
  resolver:(RCTPromiseResolveBlock)resolve
14
14
  rejecter:(RCTPromiseRejectBlock)reject)
15
15
  RCT_EXTERN_METHOD(startDeliveryByPlaceID:(nonnull NSString *)placeID
16
16
  deliveryId:(nonnull NSString *)deliveryId
17
- timeoutSeconds:(nullable NSNumber *)timeoutSeconds
18
- autoStopAfterDropoffSeconds:(nullable NSNumber *)autoStopAfterDropoffSeconds
17
+ timeoutSeconds:(id)timeoutSeconds
18
+ autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
19
19
  resolver:(RCTPromiseResolveBlock)resolve
20
20
  rejecter:(RCTPromiseRejectBlock)reject)
21
21
  RCT_EXTERN_METHOD(startDeliveryByPlusCode:(nonnull NSString *)plusCode
22
22
  deliveryId:(nonnull NSString *)deliveryId
23
- timeoutSeconds:(nullable NSNumber *)timeoutSeconds
24
- autoStopAfterDropoffSeconds:(nullable NSNumber *)autoStopAfterDropoffSeconds
23
+ timeoutSeconds:(id)timeoutSeconds
24
+ autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
25
25
  resolver:(RCTPromiseResolveBlock)resolve
26
26
  rejecter:(RCTPromiseRejectBlock)reject)
27
27
  RCT_EXTERN_METHOD(startDeliveryByAddress:(nonnull NSDictionary *)address
28
28
  deliveryId:(nonnull NSString *)deliveryId
29
29
  coordinates:(nullable NSDictionary *)coordinates
30
- timeoutSeconds:(nullable NSNumber *)timeoutSeconds
31
- autoStopAfterDropoffSeconds:(nullable NSNumber *)autoStopAfterDropoffSeconds
30
+ timeoutSeconds:(id)timeoutSeconds
31
+ autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
32
32
  resolver:(RCTPromiseResolveBlock)resolve
33
33
  rejecter:(RCTPromiseRejectBlock)reject)
34
34
  RCT_EXTERN_METHOD(startDeliveryByAddressString:(nonnull NSString *)address
35
35
  deliveryId:(nonnull NSString *)deliveryId
36
36
  coordinates:(nullable NSDictionary *)coordinates
37
- timeoutSeconds:(nullable NSNumber *)timeoutSeconds
38
- autoStopAfterDropoffSeconds:(nullable NSNumber *)autoStopAfterDropoffSeconds
37
+ timeoutSeconds:(id)timeoutSeconds
38
+ autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
39
39
  resolver:(RCTPromiseResolveBlock)resolve
40
40
  rejecter:(RCTPromiseRejectBlock)reject)
41
41
  RCT_EXTERN_METHOD(startDeliveryByLatLng:(nonnull NSNumber *)latitude
42
42
  longitude:(nonnull NSNumber *)longitude
43
43
  subUnit:(nonnull NSString *)subUnit
44
44
  deliveryId:(nonnull NSString *)deliveryId
45
- timeoutSeconds:(nullable NSNumber *)timeoutSeconds
46
- autoStopAfterDropoffSeconds:(nullable NSNumber *)autoStopAfterDropoffSeconds
45
+ timeoutSeconds:(id)timeoutSeconds
46
+ autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
47
47
  resolver:(RCTPromiseResolveBlock)resolve
48
48
  rejecter:(RCTPromiseRejectBlock)reject)
49
49
  RCT_EXTERN_METHOD(newEvent:(nonnull NSString *)eventName
@@ -31,32 +31,35 @@ class DoorstepAIBridge: NSObject {
31
31
 
32
32
  @objc
33
33
  func configureRemoteLogging(_ enabled: Bool,
34
- minLevel: NSNumber?,
35
- flushIntervalSeconds: NSNumber?,
36
- batchSize: NSNumber?,
37
- maxQueueSize: NSNumber?) {
38
- let level = minLevel.flatMap { SDKLogLevel(rawValue: $0.intValue) } ?? .warning
34
+ minLevel: Any?,
35
+ flushIntervalSeconds: Any?,
36
+ batchSize: Any?,
37
+ maxQueueSize: Any?) {
38
+ // React Native's bridge forces all `NSNumber *` params to be non-nullable
39
+ // (see RCTModuleMethod.mm — it rejects NSNull for NSNumber). We accept `Any?`
40
+ // here so JS can pass `null` for optional numeric args without bridge errors.
41
+ let level = (minLevel as? NSNumber).flatMap { SDKLogLevel(rawValue: $0.intValue) } ?? .warning
39
42
  DoorstepAI.configureRemoteLogging(
40
43
  enabled: enabled,
41
44
  minLevel: level,
42
- flushInterval: flushIntervalSeconds?.doubleValue ?? 30,
43
- batchSize: batchSize?.intValue ?? 50,
44
- maxQueueSize: maxQueueSize?.intValue ?? 1000
45
+ flushInterval: (flushIntervalSeconds as? NSNumber)?.doubleValue ?? 30,
46
+ batchSize: (batchSize as? NSNumber)?.intValue ?? 50,
47
+ maxQueueSize: (maxQueueSize as? NSNumber)?.intValue ?? 1000
45
48
  )
46
49
  }
47
50
 
48
51
  @objc
49
52
  func startDeliveryByPlaceID(_ placeID: NSString,
50
53
  deliveryId: NSString,
51
- timeoutSeconds: NSNumber?,
52
- autoStopAfterDropoffSeconds: NSNumber?,
54
+ timeoutSeconds: Any?,
55
+ autoStopAfterDropoffSeconds: Any?,
53
56
  resolver resolve: @escaping RCTPromiseResolveBlock,
54
57
  rejecter reject: @escaping RCTPromiseRejectBlock) {
55
58
  // Use Swift's concurrency support to call the async method.
56
59
  Task {
57
60
  do {
58
- let timeout = timeoutSeconds?.doubleValue
59
- let autoStop = autoStopAfterDropoffSeconds?.doubleValue
61
+ let timeout = (timeoutSeconds as? NSNumber)?.doubleValue
62
+ let autoStop = (autoStopAfterDropoffSeconds as? NSNumber)?.doubleValue
60
63
  try await DoorstepAI.startDeliveryByPlaceID(
61
64
  placeID: placeID as String,
62
65
  deliveryId: deliveryId as String,
@@ -73,14 +76,14 @@ class DoorstepAIBridge: NSObject {
73
76
  @objc
74
77
  func startDeliveryByPlusCode(_ plusCode: NSString,
75
78
  deliveryId: NSString,
76
- timeoutSeconds: NSNumber?,
77
- autoStopAfterDropoffSeconds: NSNumber?,
79
+ timeoutSeconds: Any?,
80
+ autoStopAfterDropoffSeconds: Any?,
78
81
  resolver resolve: @escaping RCTPromiseResolveBlock,
79
82
  rejecter reject: @escaping RCTPromiseRejectBlock) {
80
83
  Task {
81
84
  do {
82
- let timeout = timeoutSeconds?.doubleValue
83
- let autoStop = autoStopAfterDropoffSeconds?.doubleValue
85
+ let timeout = (timeoutSeconds as? NSNumber)?.doubleValue
86
+ let autoStop = (autoStopAfterDropoffSeconds as? NSNumber)?.doubleValue
84
87
  try await DoorstepAI.startDeliveryByPlusCode(
85
88
  plusCode: plusCode as String,
86
89
  deliveryId: deliveryId as String,
@@ -98,14 +101,14 @@ class DoorstepAIBridge: NSObject {
98
101
  func startDeliveryByAddressString(_ address: NSString,
99
102
  deliveryId: NSString,
100
103
  coordinates: NSDictionary?,
101
- timeoutSeconds: NSNumber?,
102
- autoStopAfterDropoffSeconds: NSNumber?,
104
+ timeoutSeconds: Any?,
105
+ autoStopAfterDropoffSeconds: Any?,
103
106
  resolver resolve: @escaping RCTPromiseResolveBlock,
104
107
  rejecter reject: @escaping RCTPromiseRejectBlock) {
105
108
  Task {
106
109
  do {
107
- let timeout = timeoutSeconds?.doubleValue
108
- let autoStop = autoStopAfterDropoffSeconds?.doubleValue
110
+ let timeout = (timeoutSeconds as? NSNumber)?.doubleValue
111
+ let autoStop = (autoStopAfterDropoffSeconds as? NSNumber)?.doubleValue
109
112
  let coords = parseCoordinates(coordinates)
110
113
  try await DoorstepAI.startDeliveryByAddressString(
111
114
  address: address as String,
@@ -126,14 +129,14 @@ class DoorstepAIBridge: NSObject {
126
129
  longitude: NSNumber,
127
130
  subUnit: NSString,
128
131
  deliveryId: NSString,
129
- timeoutSeconds: NSNumber?,
130
- autoStopAfterDropoffSeconds: NSNumber?,
132
+ timeoutSeconds: Any?,
133
+ autoStopAfterDropoffSeconds: Any?,
131
134
  resolver resolve: @escaping RCTPromiseResolveBlock,
132
135
  rejecter reject: @escaping RCTPromiseRejectBlock) {
133
136
  Task {
134
137
  do {
135
- let timeout = timeoutSeconds?.doubleValue
136
- let autoStop = autoStopAfterDropoffSeconds?.doubleValue
138
+ let timeout = (timeoutSeconds as? NSNumber)?.doubleValue
139
+ let autoStop = (autoStopAfterDropoffSeconds as? NSNumber)?.doubleValue
137
140
  try await DoorstepAI.startDeliveryByLatLng(
138
141
  latitude: latitude.doubleValue,
139
142
  longitude: longitude.doubleValue,
@@ -153,8 +156,8 @@ class DoorstepAIBridge: NSObject {
153
156
  func startDeliveryByAddress(_ address: [String: Any],
154
157
  deliveryId: NSString,
155
158
  coordinates: NSDictionary?,
156
- timeoutSeconds: NSNumber?,
157
- autoStopAfterDropoffSeconds: NSNumber?,
159
+ timeoutSeconds: Any?,
160
+ autoStopAfterDropoffSeconds: Any?,
158
161
  resolver resolve: @escaping RCTPromiseResolveBlock,
159
162
  rejecter reject: @escaping RCTPromiseRejectBlock) {
160
163
  Task {
@@ -176,8 +179,8 @@ class DoorstepAIBridge: NSObject {
176
179
  administrativeAreaLevel1: administrativeAreaLevel1,
177
180
  postalCode: postalCode)
178
181
 
179
- let timeout = timeoutSeconds?.doubleValue
180
- let autoStop = autoStopAfterDropoffSeconds?.doubleValue
182
+ let timeout = (timeoutSeconds as? NSNumber)?.doubleValue
183
+ let autoStop = (autoStopAfterDropoffSeconds as? NSNumber)?.doubleValue
181
184
  let coords = parseCoordinates(coordinates)
182
185
  try await DoorstepAI.startDeliveryByAddressType(
183
186
  address: addressStruct,
@@ -10,18 +10,15 @@
10
10
  <key>DebugSymbolsPath</key>
11
11
  <string>dSYMs</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64_x86_64-simulator</string>
13
+ <string>ios-arm64</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>DoorstepDropoffSDK.framework</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
- <string>x86_64</string>
20
19
  </array>
21
20
  <key>SupportedPlatform</key>
22
21
  <string>ios</string>
23
- <key>SupportedPlatformVariant</key>
24
- <string>simulator</string>
25
22
  </dict>
26
23
  <dict>
27
24
  <key>BinaryPath</key>
@@ -29,15 +26,18 @@
29
26
  <key>DebugSymbolsPath</key>
30
27
  <string>dSYMs</string>
31
28
  <key>LibraryIdentifier</key>
32
- <string>ios-arm64</string>
29
+ <string>ios-arm64_x86_64-simulator</string>
33
30
  <key>LibraryPath</key>
34
31
  <string>DoorstepDropoffSDK.framework</string>
35
32
  <key>SupportedArchitectures</key>
36
33
  <array>
37
34
  <string>arm64</string>
35
+ <string>x86_64</string>
38
36
  </array>
39
37
  <key>SupportedPlatform</key>
40
38
  <string>ios</string>
39
+ <key>SupportedPlatformVariant</key>
40
+ <string>simulator</string>
41
41
  </dict>
42
42
  </array>
43
43
  <key>CFBundlePackageType</key>