@doorstepai/dropoff-sdk 1.0.31 → 1.0.32
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 +2 -1
- package/android/src/main/java/com/doorstepai/dropoffsdk/DoorstepAIModule.kt +107 -3
- package/ios/DoorstepAI.mm +16 -1
- package/ios/DoorstepAI.swift +53 -2
- 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 +306 -12
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +12 -2
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftinterface +12 -2
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +8 -8
- 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 +816 -791
- 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 +306 -12
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +12 -2
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +12 -2
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +306 -12
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +12 -2
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +12 -2
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +16 -16
- 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 +816 -791
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +815 -793
- package/lib/module/DoorstepAI.js +64 -16
- package/lib/module/DoorstepAI.js.map +1 -1
- package/lib/typescript/src/DoorstepAI.d.ts +2 -1
- package/lib/typescript/src/DoorstepAI.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/DoorstepAI.tsx +71 -16
package/android/build.gradle
CHANGED
|
@@ -86,7 +86,8 @@ 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.
|
|
89
|
+
implementation("ai.doorstep.com:doorstepai-dropoff-sdk:1.0.21")
|
|
90
90
|
api "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
|
|
@@ -66,6 +66,36 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
@ReactMethod
|
|
70
|
+
fun startDeliveryByAddressString(address: String, deliveryId: String, promise: Promise) {
|
|
71
|
+
try {
|
|
72
|
+
DoorstepAI.startDeliveryByAddressString(address, deliveryId) { result ->
|
|
73
|
+
result.onSuccess { message ->
|
|
74
|
+
promise.resolve(message)
|
|
75
|
+
}.onFailure { error ->
|
|
76
|
+
promise.reject("DELIVERY_ERROR", error.message ?: "Promise Rejection: Failed to start delivery by address string")
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
} catch (e: Exception) {
|
|
80
|
+
promise.reject("DELIVERY_ERROR", e.message ?: "Failed to start delivery by address string")
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@ReactMethod
|
|
85
|
+
fun startDeliveryByLatLng(latitude: Double, longitude: Double, deliveryId: String, promise: Promise) {
|
|
86
|
+
try {
|
|
87
|
+
DoorstepAI.startDeliveryByLatLng(latitude, longitude, deliveryId) { result ->
|
|
88
|
+
result.onSuccess { message ->
|
|
89
|
+
promise.resolve(message)
|
|
90
|
+
}.onFailure { error ->
|
|
91
|
+
promise.reject("DELIVERY_ERROR", error.message ?: "Promise Rejection: Failed to start delivery by lat/lng")
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
} catch (e: Exception) {
|
|
95
|
+
promise.reject("DELIVERY_ERROR", e.message ?: "Failed to start delivery by lat/lng")
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
69
99
|
@ReactMethod
|
|
70
100
|
fun startDeliveryByAddress(
|
|
71
101
|
addressMap: ReadableMap,
|
|
@@ -130,16 +160,90 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
|
|
|
130
160
|
fun enableDevMode(promise: Promise) {
|
|
131
161
|
CoroutineScope(Dispatchers.IO).launch {
|
|
132
162
|
try {
|
|
133
|
-
/*android.util.Log.i("DoorstepAI", "Attempting to enable dev mode...")
|
|
134
163
|
val result = DoorstepAI.enableDevMode()
|
|
135
|
-
|
|
136
|
-
promise.resolve(result)*/
|
|
164
|
+
promise.resolve(result)
|
|
137
165
|
} catch (e: Exception) {
|
|
138
166
|
promise.reject("DEV_MODE_ERROR", e.message ?: "Failed to enable dev mode")
|
|
139
167
|
}
|
|
140
168
|
}
|
|
141
169
|
}
|
|
142
170
|
|
|
171
|
+
@ReactMethod
|
|
172
|
+
fun validateDevModeAccess(promise: Promise) {
|
|
173
|
+
CoroutineScope(Dispatchers.IO).launch {
|
|
174
|
+
try {
|
|
175
|
+
val result = DoorstepAI.validateDevModeAccess()
|
|
176
|
+
promise.resolve(result)
|
|
177
|
+
} catch (e: Exception) {
|
|
178
|
+
promise.reject("DEV_MODE_VALIDATE_ERROR", e.message ?: "Failed to validate dev mode access")
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@ReactMethod
|
|
184
|
+
fun hasCachedData(promise: Promise) {
|
|
185
|
+
CoroutineScope(Dispatchers.IO).launch {
|
|
186
|
+
try {
|
|
187
|
+
val result = DoorstepAI.hasCachedData()
|
|
188
|
+
promise.resolve(result)
|
|
189
|
+
} catch (e: Exception) {
|
|
190
|
+
promise.reject("HAS_CACHED_DATA_ERROR", e.message ?: "Failed to check cached data")
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@ReactMethod
|
|
196
|
+
fun waitForCachedDataCompletion(promise: Promise) {
|
|
197
|
+
CoroutineScope(Dispatchers.IO).launch {
|
|
198
|
+
try {
|
|
199
|
+
val result = DoorstepAI.waitForCachedDataCompletion()
|
|
200
|
+
promise.resolve(result)
|
|
201
|
+
} catch (e: Exception) {
|
|
202
|
+
promise.reject("WAIT_CACHED_DATA_ERROR", e.message ?: "Failed while waiting for cached data completion")
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@ReactMethod
|
|
208
|
+
fun isCacheProcessingInProgress(promise: Promise) {
|
|
209
|
+
try {
|
|
210
|
+
val result = DoorstepAI.isCacheProcessingInProgress()
|
|
211
|
+
promise.resolve(result)
|
|
212
|
+
} catch (e: Exception) {
|
|
213
|
+
promise.reject("CACHE_PROCESSING_STATUS_ERROR", e.message ?: "Failed to check cache processing status")
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@ReactMethod
|
|
218
|
+
fun hasPendingNetworkRequests(promise: Promise) {
|
|
219
|
+
try {
|
|
220
|
+
val result = DoorstepAI.hasPendingNetworkRequests()
|
|
221
|
+
promise.resolve(result)
|
|
222
|
+
} catch (e: Exception) {
|
|
223
|
+
promise.reject("PENDING_NETWORK_REQUESTS_ERROR", e.message ?: "Failed to check pending network requests")
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@ReactMethod
|
|
228
|
+
fun getPendingNetworkRequestsCount(promise: Promise) {
|
|
229
|
+
try {
|
|
230
|
+
val result = DoorstepAI.getPendingNetworkRequestsCount()
|
|
231
|
+
promise.resolve(result)
|
|
232
|
+
} catch (e: Exception) {
|
|
233
|
+
promise.reject("PENDING_NETWORK_REQUESTS_COUNT_ERROR", e.message ?: "Failed to get pending network requests count")
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@ReactMethod
|
|
238
|
+
fun disableDevMode(promise: Promise) {
|
|
239
|
+
try {
|
|
240
|
+
DoorstepAI.disableDevMode()
|
|
241
|
+
promise.resolve(true)
|
|
242
|
+
} catch (e: Exception) {
|
|
243
|
+
promise.reject("DEV_MODE_DISABLE_ERROR", e.message ?: "Failed to disable dev mode")
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
143
247
|
companion object {
|
|
144
248
|
const val NAME = "DoorstepAI"
|
|
145
249
|
}
|
package/ios/DoorstepAI.mm
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
@interface RCT_EXTERN_MODULE(DoorstepAI, NSObject)
|
|
4
4
|
|
|
5
5
|
RCT_EXTERN_METHOD(setApiKey:(NSString *)apiKey)
|
|
6
|
-
RCT_EXTERN_METHOD(
|
|
6
|
+
RCT_EXTERN_METHOD(enableDevMode:(NSString *)apiKey
|
|
7
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
8
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
7
9
|
RCT_EXTERN_METHOD(startDeliveryByPlaceID:(NSString *)placeID
|
|
8
10
|
deliveryId:(NSString *)deliveryId
|
|
9
11
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
@@ -16,6 +18,15 @@ RCT_EXTERN_METHOD(startDeliveryByAddress:(NSDictionary *)address
|
|
|
16
18
|
deliveryId:(NSString *)deliveryId
|
|
17
19
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
18
20
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
21
|
+
RCT_EXTERN_METHOD(startDeliveryByAddressString:(NSString *)address
|
|
22
|
+
deliveryId:(NSString *)deliveryId
|
|
23
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
24
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
25
|
+
RCT_EXTERN_METHOD(startDeliveryByLatLng:(nonnull NSNumber *)latitude
|
|
26
|
+
longitude:(nonnull NSNumber *)longitude
|
|
27
|
+
deliveryId:(NSString *)deliveryId
|
|
28
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
29
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
19
30
|
RCT_EXTERN_METHOD(newEvent:(NSString *)eventName
|
|
20
31
|
deliveryId:(NSString *)deliveryId
|
|
21
32
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
@@ -23,5 +34,9 @@ RCT_EXTERN_METHOD(newEvent:(NSString *)eventName
|
|
|
23
34
|
RCT_EXTERN_METHOD(stopDelivery:(NSString *)deliveryId
|
|
24
35
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
25
36
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
37
|
+
RCT_EXTERN_METHOD(hasCachedData:(RCTPromiseResolveBlock)resolve
|
|
38
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
39
|
+
RCT_EXTERN_METHOD(waitForCacheDataCompletion:(RCTPromiseResolveBlock)resolve
|
|
40
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
26
41
|
|
|
27
42
|
@end
|
package/ios/DoorstepAI.swift
CHANGED
|
@@ -24,8 +24,13 @@ class DoorstepAIBridge: NSObject {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
@objc
|
|
27
|
-
func
|
|
28
|
-
|
|
27
|
+
func enableDevMode(_ apiKey: NSString,
|
|
28
|
+
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
29
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
30
|
+
Task {
|
|
31
|
+
await DoorstepAI.enableDevMode(apiKey: apiKey as String)
|
|
32
|
+
resolve(nil)
|
|
33
|
+
}
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
@objc
|
|
@@ -64,6 +69,37 @@ class DoorstepAIBridge: NSObject {
|
|
|
64
69
|
}
|
|
65
70
|
}
|
|
66
71
|
|
|
72
|
+
@objc
|
|
73
|
+
func startDeliveryByAddressString(_ address: NSString,
|
|
74
|
+
deliveryId: NSString,
|
|
75
|
+
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
76
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
77
|
+
Task {
|
|
78
|
+
do {
|
|
79
|
+
try await DoorstepAI.startDeliveryByAddressString(address: address as String, deliveryId: deliveryId as String)
|
|
80
|
+
resolve(nil)
|
|
81
|
+
} catch {
|
|
82
|
+
reject("E_START_DELIVERY", "Failed to start delivery by Address String: \(error.localizedDescription)", error)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@objc
|
|
88
|
+
func startDeliveryByLatLng(_ latitude: NSNumber,
|
|
89
|
+
longitude: NSNumber,
|
|
90
|
+
deliveryId: NSString,
|
|
91
|
+
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
92
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
93
|
+
Task {
|
|
94
|
+
do {
|
|
95
|
+
try await DoorstepAI.startDeliveryByLatLng(latitude: latitude.doubleValue, longitude: longitude.doubleValue, deliveryId: deliveryId as String)
|
|
96
|
+
resolve(nil)
|
|
97
|
+
} catch {
|
|
98
|
+
reject("E_START_DELIVERY", "Failed to start delivery by LatLng: \(error.localizedDescription)", error)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
67
103
|
@objc
|
|
68
104
|
func startDeliveryByAddress(_ address: [String: Any],
|
|
69
105
|
deliveryId: NSString,
|
|
@@ -125,4 +161,19 @@ class DoorstepAIBridge: NSObject {
|
|
|
125
161
|
}
|
|
126
162
|
}
|
|
127
163
|
|
|
164
|
+
@objc
|
|
165
|
+
func hasCachedData(_ resolve: @escaping RCTPromiseResolveBlock,
|
|
166
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
167
|
+
resolve(DoorstepAI.hasCachedData())
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@objc
|
|
171
|
+
func waitForCacheDataCompletion(_ resolve: @escaping RCTPromiseResolveBlock,
|
|
172
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
173
|
+
Task {
|
|
174
|
+
let result = await DoorstepAI.waitForCacheDataCompletion()
|
|
175
|
+
resolve(result)
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
128
179
|
}
|
package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK
CHANGED
|
Binary file
|
|
@@ -510,6 +510,204 @@
|
|
|
510
510
|
}
|
|
511
511
|
]
|
|
512
512
|
},
|
|
513
|
+
{
|
|
514
|
+
"kind": "TypeDecl",
|
|
515
|
+
"name": "LatLngAddress",
|
|
516
|
+
"printedName": "LatLngAddress",
|
|
517
|
+
"children": [
|
|
518
|
+
{
|
|
519
|
+
"kind": "Var",
|
|
520
|
+
"name": "latitude",
|
|
521
|
+
"printedName": "latitude",
|
|
522
|
+
"children": [
|
|
523
|
+
{
|
|
524
|
+
"kind": "TypeNominal",
|
|
525
|
+
"name": "Double",
|
|
526
|
+
"printedName": "Swift.Double",
|
|
527
|
+
"usr": "s:Sd"
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
"declKind": "Var",
|
|
531
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV8latitudeSdvp",
|
|
532
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV8latitudeSdvp",
|
|
533
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
534
|
+
"declAttributes": [
|
|
535
|
+
"HasStorage",
|
|
536
|
+
"AccessControl"
|
|
537
|
+
],
|
|
538
|
+
"isLet": true,
|
|
539
|
+
"hasStorage": true,
|
|
540
|
+
"accessors": [
|
|
541
|
+
{
|
|
542
|
+
"kind": "Accessor",
|
|
543
|
+
"name": "Get",
|
|
544
|
+
"printedName": "Get()",
|
|
545
|
+
"children": [
|
|
546
|
+
{
|
|
547
|
+
"kind": "TypeNominal",
|
|
548
|
+
"name": "Double",
|
|
549
|
+
"printedName": "Swift.Double",
|
|
550
|
+
"usr": "s:Sd"
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
"declKind": "Accessor",
|
|
554
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV8latitudeSdvg",
|
|
555
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV8latitudeSdvg",
|
|
556
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
557
|
+
"implicit": true,
|
|
558
|
+
"accessorKind": "get"
|
|
559
|
+
}
|
|
560
|
+
]
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"kind": "Var",
|
|
564
|
+
"name": "longitude",
|
|
565
|
+
"printedName": "longitude",
|
|
566
|
+
"children": [
|
|
567
|
+
{
|
|
568
|
+
"kind": "TypeNominal",
|
|
569
|
+
"name": "Double",
|
|
570
|
+
"printedName": "Swift.Double",
|
|
571
|
+
"usr": "s:Sd"
|
|
572
|
+
}
|
|
573
|
+
],
|
|
574
|
+
"declKind": "Var",
|
|
575
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV9longitudeSdvp",
|
|
576
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV9longitudeSdvp",
|
|
577
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
578
|
+
"declAttributes": [
|
|
579
|
+
"HasStorage",
|
|
580
|
+
"AccessControl"
|
|
581
|
+
],
|
|
582
|
+
"isLet": true,
|
|
583
|
+
"hasStorage": true,
|
|
584
|
+
"accessors": [
|
|
585
|
+
{
|
|
586
|
+
"kind": "Accessor",
|
|
587
|
+
"name": "Get",
|
|
588
|
+
"printedName": "Get()",
|
|
589
|
+
"children": [
|
|
590
|
+
{
|
|
591
|
+
"kind": "TypeNominal",
|
|
592
|
+
"name": "Double",
|
|
593
|
+
"printedName": "Swift.Double",
|
|
594
|
+
"usr": "s:Sd"
|
|
595
|
+
}
|
|
596
|
+
],
|
|
597
|
+
"declKind": "Accessor",
|
|
598
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV9longitudeSdvg",
|
|
599
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV9longitudeSdvg",
|
|
600
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
601
|
+
"implicit": true,
|
|
602
|
+
"accessorKind": "get"
|
|
603
|
+
}
|
|
604
|
+
]
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"kind": "Constructor",
|
|
608
|
+
"name": "init",
|
|
609
|
+
"printedName": "init(latitude:longitude:)",
|
|
610
|
+
"children": [
|
|
611
|
+
{
|
|
612
|
+
"kind": "TypeNominal",
|
|
613
|
+
"name": "LatLngAddress",
|
|
614
|
+
"printedName": "DoorstepDropoffSDK.LatLngAddress",
|
|
615
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"kind": "TypeNominal",
|
|
619
|
+
"name": "Double",
|
|
620
|
+
"printedName": "Swift.Double",
|
|
621
|
+
"usr": "s:Sd"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"kind": "TypeNominal",
|
|
625
|
+
"name": "Double",
|
|
626
|
+
"printedName": "Swift.Double",
|
|
627
|
+
"usr": "s:Sd"
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
"declKind": "Constructor",
|
|
631
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV8latitude9longitudeACSd_Sdtcfc",
|
|
632
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV8latitude9longitudeACSd_Sdtcfc",
|
|
633
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
634
|
+
"declAttributes": [
|
|
635
|
+
"AccessControl"
|
|
636
|
+
],
|
|
637
|
+
"init_kind": "Designated"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"kind": "Var",
|
|
641
|
+
"name": "addressString",
|
|
642
|
+
"printedName": "addressString",
|
|
643
|
+
"children": [
|
|
644
|
+
{
|
|
645
|
+
"kind": "TypeNominal",
|
|
646
|
+
"name": "String",
|
|
647
|
+
"printedName": "Swift.String",
|
|
648
|
+
"usr": "s:SS"
|
|
649
|
+
}
|
|
650
|
+
],
|
|
651
|
+
"declKind": "Var",
|
|
652
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV13addressStringSSvp",
|
|
653
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV13addressStringSSvp",
|
|
654
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
655
|
+
"declAttributes": [
|
|
656
|
+
"AccessControl"
|
|
657
|
+
],
|
|
658
|
+
"accessors": [
|
|
659
|
+
{
|
|
660
|
+
"kind": "Accessor",
|
|
661
|
+
"name": "Get",
|
|
662
|
+
"printedName": "Get()",
|
|
663
|
+
"children": [
|
|
664
|
+
{
|
|
665
|
+
"kind": "TypeNominal",
|
|
666
|
+
"name": "String",
|
|
667
|
+
"printedName": "Swift.String",
|
|
668
|
+
"usr": "s:SS"
|
|
669
|
+
}
|
|
670
|
+
],
|
|
671
|
+
"declKind": "Accessor",
|
|
672
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV13addressStringSSvg",
|
|
673
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV13addressStringSSvg",
|
|
674
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
675
|
+
"accessorKind": "get"
|
|
676
|
+
}
|
|
677
|
+
]
|
|
678
|
+
}
|
|
679
|
+
],
|
|
680
|
+
"declKind": "Struct",
|
|
681
|
+
"usr": "s:18DoorstepDropoffSDK13LatLngAddressV",
|
|
682
|
+
"mangledName": "$s18DoorstepDropoffSDK13LatLngAddressV",
|
|
683
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
684
|
+
"declAttributes": [
|
|
685
|
+
"AccessControl"
|
|
686
|
+
],
|
|
687
|
+
"conformances": [
|
|
688
|
+
{
|
|
689
|
+
"kind": "Conformance",
|
|
690
|
+
"name": "Copyable",
|
|
691
|
+
"printedName": "Copyable",
|
|
692
|
+
"usr": "s:s8CopyableP",
|
|
693
|
+
"mangledName": "$ss8CopyableP"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"kind": "Conformance",
|
|
697
|
+
"name": "Escapable",
|
|
698
|
+
"printedName": "Escapable",
|
|
699
|
+
"usr": "s:s9EscapableP",
|
|
700
|
+
"mangledName": "$ss9EscapableP"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"kind": "Conformance",
|
|
704
|
+
"name": "AddressDesignation",
|
|
705
|
+
"printedName": "AddressDesignation",
|
|
706
|
+
"usr": "s:18DoorstepDropoffSDK18AddressDesignationP",
|
|
707
|
+
"mangledName": "$s18DoorstepDropoffSDK18AddressDesignationP"
|
|
708
|
+
}
|
|
709
|
+
]
|
|
710
|
+
},
|
|
513
711
|
{
|
|
514
712
|
"kind": "TypeDecl",
|
|
515
713
|
"name": "AddressDesignation",
|
|
@@ -728,7 +926,7 @@
|
|
|
728
926
|
{
|
|
729
927
|
"kind": "Function",
|
|
730
928
|
"name": "setApiKey",
|
|
731
|
-
"printedName": "setApiKey(key:)",
|
|
929
|
+
"printedName": "setApiKey(key:initCollectors:)",
|
|
732
930
|
"children": [
|
|
733
931
|
{
|
|
734
932
|
"kind": "TypeNominal",
|
|
@@ -740,11 +938,18 @@
|
|
|
740
938
|
"name": "String",
|
|
741
939
|
"printedName": "Swift.String",
|
|
742
940
|
"usr": "s:SS"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"kind": "TypeNominal",
|
|
944
|
+
"name": "Bool",
|
|
945
|
+
"printedName": "Swift.Bool",
|
|
946
|
+
"hasDefaultArg": true,
|
|
947
|
+
"usr": "s:Sb"
|
|
743
948
|
}
|
|
744
949
|
],
|
|
745
950
|
"declKind": "Func",
|
|
746
|
-
"usr": "s:
|
|
747
|
-
"mangledName": "$
|
|
951
|
+
"usr": "s:18DoorstepDropoffSDK0A2AIC9setApiKey3key14initCollectorsySS_SbtFZ",
|
|
952
|
+
"mangledName": "$s18DoorstepDropoffSDK0A2AIC9setApiKey3key14initCollectorsySS_SbtFZ",
|
|
748
953
|
"moduleName": "DoorstepDropoffSDK",
|
|
749
954
|
"static": true,
|
|
750
955
|
"declAttributes": [
|
|
@@ -756,17 +961,23 @@
|
|
|
756
961
|
{
|
|
757
962
|
"kind": "Function",
|
|
758
963
|
"name": "enableDevMode",
|
|
759
|
-
"printedName": "enableDevMode()",
|
|
964
|
+
"printedName": "enableDevMode(apiKey:)",
|
|
760
965
|
"children": [
|
|
761
966
|
{
|
|
762
967
|
"kind": "TypeNominal",
|
|
763
968
|
"name": "Void",
|
|
764
969
|
"printedName": "()"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"kind": "TypeNominal",
|
|
973
|
+
"name": "String",
|
|
974
|
+
"printedName": "Swift.String",
|
|
975
|
+
"usr": "s:SS"
|
|
765
976
|
}
|
|
766
977
|
],
|
|
767
978
|
"declKind": "Func",
|
|
768
|
-
"usr": "s:
|
|
769
|
-
"mangledName": "$
|
|
979
|
+
"usr": "s:18DoorstepDropoffSDK0A2AIC13enableDevMode6apiKeyySS_tYaFZ",
|
|
980
|
+
"mangledName": "$s18DoorstepDropoffSDK0A2AIC13enableDevMode6apiKeyySS_tYaFZ",
|
|
770
981
|
"moduleName": "DoorstepDropoffSDK",
|
|
771
982
|
"static": true,
|
|
772
983
|
"declAttributes": [
|
|
@@ -880,6 +1091,82 @@
|
|
|
880
1091
|
"throwing": true,
|
|
881
1092
|
"funcSelfKind": "NonMutating"
|
|
882
1093
|
},
|
|
1094
|
+
{
|
|
1095
|
+
"kind": "Function",
|
|
1096
|
+
"name": "startDeliveryByAddressString",
|
|
1097
|
+
"printedName": "startDeliveryByAddressString(address:deliveryId:)",
|
|
1098
|
+
"children": [
|
|
1099
|
+
{
|
|
1100
|
+
"kind": "TypeNominal",
|
|
1101
|
+
"name": "Void",
|
|
1102
|
+
"printedName": "()"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"kind": "TypeNominal",
|
|
1106
|
+
"name": "String",
|
|
1107
|
+
"printedName": "Swift.String",
|
|
1108
|
+
"usr": "s:SS"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"kind": "TypeNominal",
|
|
1112
|
+
"name": "String",
|
|
1113
|
+
"printedName": "Swift.String",
|
|
1114
|
+
"usr": "s:SS"
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
"declKind": "Func",
|
|
1118
|
+
"usr": "s:18DoorstepDropoffSDK0A2AIC28startDeliveryByAddressString7address10deliveryIdySS_SStYaKFZ",
|
|
1119
|
+
"mangledName": "$s18DoorstepDropoffSDK0A2AIC28startDeliveryByAddressString7address10deliveryIdySS_SStYaKFZ",
|
|
1120
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
1121
|
+
"static": true,
|
|
1122
|
+
"declAttributes": [
|
|
1123
|
+
"Final",
|
|
1124
|
+
"AccessControl"
|
|
1125
|
+
],
|
|
1126
|
+
"throwing": true,
|
|
1127
|
+
"funcSelfKind": "NonMutating"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"kind": "Function",
|
|
1131
|
+
"name": "startDeliveryByLatLng",
|
|
1132
|
+
"printedName": "startDeliveryByLatLng(latitude:longitude:deliveryId:)",
|
|
1133
|
+
"children": [
|
|
1134
|
+
{
|
|
1135
|
+
"kind": "TypeNominal",
|
|
1136
|
+
"name": "Void",
|
|
1137
|
+
"printedName": "()"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"kind": "TypeNominal",
|
|
1141
|
+
"name": "Double",
|
|
1142
|
+
"printedName": "Swift.Double",
|
|
1143
|
+
"usr": "s:Sd"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"kind": "TypeNominal",
|
|
1147
|
+
"name": "Double",
|
|
1148
|
+
"printedName": "Swift.Double",
|
|
1149
|
+
"usr": "s:Sd"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"kind": "TypeNominal",
|
|
1153
|
+
"name": "String",
|
|
1154
|
+
"printedName": "Swift.String",
|
|
1155
|
+
"usr": "s:SS"
|
|
1156
|
+
}
|
|
1157
|
+
],
|
|
1158
|
+
"declKind": "Func",
|
|
1159
|
+
"usr": "s:18DoorstepDropoffSDK0A2AIC21startDeliveryByLatLng8latitude9longitude10deliveryIdySd_SdSStYaKFZ",
|
|
1160
|
+
"mangledName": "$s18DoorstepDropoffSDK0A2AIC21startDeliveryByLatLng8latitude9longitude10deliveryIdySd_SdSStYaKFZ",
|
|
1161
|
+
"moduleName": "DoorstepDropoffSDK",
|
|
1162
|
+
"static": true,
|
|
1163
|
+
"declAttributes": [
|
|
1164
|
+
"Final",
|
|
1165
|
+
"AccessControl"
|
|
1166
|
+
],
|
|
1167
|
+
"throwing": true,
|
|
1168
|
+
"funcSelfKind": "NonMutating"
|
|
1169
|
+
},
|
|
883
1170
|
{
|
|
884
1171
|
"kind": "Function",
|
|
885
1172
|
"name": "newEvent",
|
|
@@ -2023,35 +2310,42 @@
|
|
|
2023
2310
|
{
|
|
2024
2311
|
"filePath": "\/Users\/sheelpatel\/Documents\/doorstepai\/doorstepai-track\/SDKs\/iOS\/DoorstepDropoffSDK\/DoorstepDropoffSDK\/DoorstepAI.swift",
|
|
2025
2312
|
"kind": "Array",
|
|
2026
|
-
"offset":
|
|
2313
|
+
"offset": 1779,
|
|
2027
2314
|
"length": 2,
|
|
2028
2315
|
"value": "[]"
|
|
2029
2316
|
},
|
|
2030
2317
|
{
|
|
2031
2318
|
"filePath": "\/Users\/sheelpatel\/Documents\/doorstepai\/doorstepai-track\/SDKs\/iOS\/DoorstepDropoffSDK\/DoorstepDropoffSDK\/DoorstepAI.swift",
|
|
2032
2319
|
"kind": "BooleanLiteral",
|
|
2033
|
-
"offset":
|
|
2320
|
+
"offset": 1813,
|
|
2321
|
+
"length": 5,
|
|
2322
|
+
"value": "false"
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
"filePath": "\/Users\/sheelpatel\/Documents\/doorstepai\/doorstepai-track\/SDKs\/iOS\/DoorstepDropoffSDK\/DoorstepDropoffSDK\/DoorstepAI.swift",
|
|
2326
|
+
"kind": "BooleanLiteral",
|
|
2327
|
+
"offset": 1893,
|
|
2034
2328
|
"length": 5,
|
|
2035
2329
|
"value": "false"
|
|
2036
2330
|
},
|
|
2037
2331
|
{
|
|
2038
2332
|
"filePath": "\/Users\/sheelpatel\/Documents\/doorstepai\/doorstepai-track\/SDKs\/iOS\/DoorstepDropoffSDK\/DoorstepDropoffSDK\/src\/DataHolder.swift",
|
|
2039
2333
|
"kind": "BooleanLiteral",
|
|
2040
|
-
"offset":
|
|
2334
|
+
"offset": 398,
|
|
2041
2335
|
"length": 5,
|
|
2042
2336
|
"value": "false"
|
|
2043
2337
|
},
|
|
2044
2338
|
{
|
|
2045
2339
|
"filePath": "\/Users\/sheelpatel\/Documents\/doorstepai\/doorstepai-track\/SDKs\/iOS\/DoorstepDropoffSDK\/DoorstepDropoffSDK\/src\/DataHolder.swift",
|
|
2046
2340
|
"kind": "StringLiteral",
|
|
2047
|
-
"offset":
|
|
2341
|
+
"offset": 444,
|
|
2048
2342
|
"length": 13,
|
|
2049
2343
|
"value": "\"dataCollect\""
|
|
2050
2344
|
},
|
|
2051
2345
|
{
|
|
2052
2346
|
"filePath": "\/Users\/sheelpatel\/Documents\/doorstepai\/doorstepai-track\/SDKs\/iOS\/DoorstepDropoffSDK\/DoorstepDropoffSDK\/src\/LocationManager.swift",
|
|
2053
2347
|
"kind": "BooleanLiteral",
|
|
2054
|
-
"offset":
|
|
2348
|
+
"offset": 931,
|
|
2055
2349
|
"length": 5,
|
|
2056
2350
|
"value": "false"
|
|
2057
2351
|
},
|
|
@@ -2065,7 +2359,7 @@
|
|
|
2065
2359
|
{
|
|
2066
2360
|
"filePath": "\/Users\/sheelpatel\/Documents\/doorstepai\/doorstepai-track\/SDKs\/iOS\/DoorstepDropoffSDK\/DoorstepDropoffSDK\/Environment.swift",
|
|
2067
2361
|
"kind": "StringLiteral",
|
|
2068
|
-
"offset":
|
|
2362
|
+
"offset": 163,
|
|
2069
2363
|
"length": 42,
|
|
2070
2364
|
"value": "\"https:\/\/collection.api.track.doorstep.ai\""
|
|
2071
2365
|
},
|
|
@@ -24,6 +24,14 @@ public struct AddressType {
|
|
|
24
24
|
public let postalCode: Swift.String
|
|
25
25
|
public init(streetNumber: Swift.String, route: Swift.String, subPremise: Swift.String, locality: Swift.String, administrativeAreaLevel1: Swift.String, postalCode: Swift.String)
|
|
26
26
|
}
|
|
27
|
+
public struct LatLngAddress : DoorstepDropoffSDK.AddressDesignation {
|
|
28
|
+
public let latitude: Swift.Double
|
|
29
|
+
public let longitude: Swift.Double
|
|
30
|
+
public init(latitude: Swift.Double, longitude: Swift.Double)
|
|
31
|
+
public var addressString: Swift.String {
|
|
32
|
+
get
|
|
33
|
+
}
|
|
34
|
+
}
|
|
27
35
|
public protocol AddressDesignation {
|
|
28
36
|
var addressString: Swift.String { get }
|
|
29
37
|
}
|
|
@@ -42,11 +50,13 @@ public enum DoorstepAIError : Swift.Error {
|
|
|
42
50
|
case invalidAddress
|
|
43
51
|
}
|
|
44
52
|
@_hasMissingDesignatedInitializers public class DoorstepAI {
|
|
45
|
-
public static func setApiKey(key: Swift.String)
|
|
46
|
-
public static func enableDevMode()
|
|
53
|
+
public static func setApiKey(key: Swift.String, initCollectors: Swift.Bool = false)
|
|
54
|
+
public static func enableDevMode(apiKey: Swift.String) async
|
|
47
55
|
public static func startDeliveryByPlaceID(placeID: Swift.String, deliveryId: Swift.String) async throws
|
|
48
56
|
public static func startDeliveryByPlusCode(plusCode: Swift.String, deliveryId: Swift.String) async throws
|
|
49
57
|
public static func startDeliveryByAddressType(address: DoorstepDropoffSDK.AddressType, deliveryId: Swift.String) async throws
|
|
58
|
+
public static func startDeliveryByAddressString(address: Swift.String, deliveryId: Swift.String) async throws
|
|
59
|
+
public static func startDeliveryByLatLng(latitude: Swift.Double, longitude: Swift.Double, deliveryId: Swift.String) async throws
|
|
50
60
|
public static func newEvent(eventName: Swift.String, deliveryId: Swift.String) async throws
|
|
51
61
|
public static func stopDelivery(deliveryId: Swift.String) async
|
|
52
62
|
public static func hasCachedData() -> Swift.Bool
|