@doorstepai/dropoff-sdk 2.0.6 → 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.
- package/android/build.gradle +1 -1
- package/ios/DoorstepAI.mm +14 -14
- package/ios/DoorstepAI.swift +31 -28
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.abi.json +127 -120
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +4 -4
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +1947 -1946
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +127 -120
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +127 -120
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +8 -8
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +1947 -1946
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +1917 -1916
- package/lib/module/DoorstepAI.js +1 -1
- package/package.json +1 -1
- package/src/DoorstepAI.tsx +1 -1
package/android/build.gradle
CHANGED
|
@@ -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.
|
|
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:(
|
|
9
|
-
flushIntervalSeconds:(
|
|
10
|
-
batchSize:(
|
|
11
|
-
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:(
|
|
18
|
-
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:(
|
|
24
|
-
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:(
|
|
31
|
-
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:(
|
|
38
|
-
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:(
|
|
46
|
-
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
|
package/ios/DoorstepAI.swift
CHANGED
|
@@ -31,32 +31,35 @@ class DoorstepAIBridge: NSObject {
|
|
|
31
31
|
|
|
32
32
|
@objc
|
|
33
33
|
func configureRemoteLogging(_ enabled: Bool,
|
|
34
|
-
minLevel:
|
|
35
|
-
flushIntervalSeconds:
|
|
36
|
-
batchSize:
|
|
37
|
-
maxQueueSize:
|
|
38
|
-
|
|
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:
|
|
52
|
-
autoStopAfterDropoffSeconds:
|
|
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:
|
|
77
|
-
autoStopAfterDropoffSeconds:
|
|
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:
|
|
102
|
-
autoStopAfterDropoffSeconds:
|
|
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:
|
|
130
|
-
autoStopAfterDropoffSeconds:
|
|
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:
|
|
157
|
-
autoStopAfterDropoffSeconds:
|
|
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,
|