@doorstepai/dropoff-sdk-capacitor 1.0.0 → 1.0.2
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/README.md +29 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/ai/doorstep/dropoffsdk/capacitor/DoorstepAIDropoffSDKPlugin.kt +57 -7
- package/dist/docs.json +35 -0
- package/dist/esm/definitions.d.ts +51 -5
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Info.plist +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.abi.json +260 -178
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +7 -7
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftinterface +7 -7
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +11 -11
- 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 +2113 -2103
- 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/Info.plist +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +260 -178
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +7 -7
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +7 -7
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +260 -178
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +7 -7
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +7 -7
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +21 -21
- 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 +2113 -2103
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +2102 -2093
- package/ios/Plugin/DoorstepAIDropoffSDKPlugin.swift +19 -5
- package/package.json +2 -2
|
@@ -66,9 +66,11 @@ public class DoorstepAIDropoffSDKPlugin: CAPPlugin, CLLocationManagerDelegate {
|
|
|
66
66
|
return call.reject("INVALID_ARGUMENTS: placeID or deliveryId missing")
|
|
67
67
|
}
|
|
68
68
|
let timeout = call.getDouble("timeoutSeconds")
|
|
69
|
+
let customerId = call.getString("customerId")
|
|
70
|
+
let autoStop = call.getDouble("autoStopAfterDropoffSeconds")
|
|
69
71
|
Task {
|
|
70
72
|
do {
|
|
71
|
-
try await DoorstepAI.startDeliveryByPlaceID(placeID: placeID, deliveryId: deliveryId, timeoutSeconds: timeout)
|
|
73
|
+
try await DoorstepAI.startDeliveryByPlaceID(placeID: placeID, deliveryId: deliveryId, customerId: customerId, timeoutSeconds: timeout, autoStopAfterDropoffSeconds: autoStop)
|
|
72
74
|
call.resolve()
|
|
73
75
|
} catch {
|
|
74
76
|
call.reject("Failed to start delivery by Place ID: \(error.localizedDescription)", "E_START_DELIVERY")
|
|
@@ -82,9 +84,11 @@ public class DoorstepAIDropoffSDKPlugin: CAPPlugin, CLLocationManagerDelegate {
|
|
|
82
84
|
return call.reject("INVALID_ARGUMENTS: plusCode or deliveryId missing")
|
|
83
85
|
}
|
|
84
86
|
let timeout = call.getDouble("timeoutSeconds")
|
|
87
|
+
let customerId = call.getString("customerId")
|
|
88
|
+
let autoStop = call.getDouble("autoStopAfterDropoffSeconds")
|
|
85
89
|
Task {
|
|
86
90
|
do {
|
|
87
|
-
try await DoorstepAI.startDeliveryByPlusCode(plusCode: plusCode, deliveryId: deliveryId, timeoutSeconds: timeout)
|
|
91
|
+
try await DoorstepAI.startDeliveryByPlusCode(plusCode: plusCode, deliveryId: deliveryId, customerId: customerId, timeoutSeconds: timeout, autoStopAfterDropoffSeconds: autoStop)
|
|
88
92
|
call.resolve()
|
|
89
93
|
} catch {
|
|
90
94
|
call.reject("Failed to start delivery by Plus Code: \(error.localizedDescription)", "E_START_DELIVERY")
|
|
@@ -111,6 +115,8 @@ public class DoorstepAIDropoffSDKPlugin: CAPPlugin, CLLocationManagerDelegate {
|
|
|
111
115
|
return call.reject("Missing or invalid fields in address dictionary or deliveryId missing", "E_INVALID_ADDRESS")
|
|
112
116
|
}
|
|
113
117
|
let timeout = call.getDouble("timeoutSeconds")
|
|
118
|
+
let customerId = call.getString("customerId")
|
|
119
|
+
let autoStop = call.getDouble("autoStopAfterDropoffSeconds")
|
|
114
120
|
let coordinates = parseCoordinates(call.getObject("coordinates"))
|
|
115
121
|
Task {
|
|
116
122
|
do {
|
|
@@ -125,8 +131,10 @@ public class DoorstepAIDropoffSDKPlugin: CAPPlugin, CLLocationManagerDelegate {
|
|
|
125
131
|
try await DoorstepAI.startDeliveryByAddressType(
|
|
126
132
|
address: address,
|
|
127
133
|
deliveryId: deliveryId,
|
|
134
|
+
customerId: customerId,
|
|
128
135
|
coordinates: coordinates,
|
|
129
|
-
timeoutSeconds: timeout
|
|
136
|
+
timeoutSeconds: timeout,
|
|
137
|
+
autoStopAfterDropoffSeconds: autoStop
|
|
130
138
|
)
|
|
131
139
|
call.resolve()
|
|
132
140
|
} catch let error as DoorstepAIError {
|
|
@@ -143,14 +151,18 @@ public class DoorstepAIDropoffSDKPlugin: CAPPlugin, CLLocationManagerDelegate {
|
|
|
143
151
|
return call.reject("INVALID_ARGUMENTS: address or deliveryId missing")
|
|
144
152
|
}
|
|
145
153
|
let timeout = call.getDouble("timeoutSeconds")
|
|
154
|
+
let customerId = call.getString("customerId")
|
|
155
|
+
let autoStop = call.getDouble("autoStopAfterDropoffSeconds")
|
|
146
156
|
let coordinates = parseCoordinates(call.getObject("coordinates"))
|
|
147
157
|
Task {
|
|
148
158
|
do {
|
|
149
159
|
try await DoorstepAI.startDeliveryByAddressString(
|
|
150
160
|
address: address,
|
|
151
161
|
deliveryId: deliveryId,
|
|
162
|
+
customerId: customerId,
|
|
152
163
|
coordinates: coordinates,
|
|
153
|
-
timeoutSeconds: timeout
|
|
164
|
+
timeoutSeconds: timeout,
|
|
165
|
+
autoStopAfterDropoffSeconds: autoStop
|
|
154
166
|
)
|
|
155
167
|
call.resolve()
|
|
156
168
|
} catch {
|
|
@@ -167,9 +179,11 @@ public class DoorstepAIDropoffSDKPlugin: CAPPlugin, CLLocationManagerDelegate {
|
|
|
167
179
|
}
|
|
168
180
|
let subUnit = call.getString("subUnit") ?? ""
|
|
169
181
|
let timeout = call.getDouble("timeoutSeconds")
|
|
182
|
+
let customerId = call.getString("customerId")
|
|
183
|
+
let autoStop = call.getDouble("autoStopAfterDropoffSeconds")
|
|
170
184
|
Task {
|
|
171
185
|
do {
|
|
172
|
-
try await DoorstepAI.startDeliveryByLatLng(latitude: latitude, longitude: longitude, subUnit: subUnit, deliveryId: deliveryId, timeoutSeconds: timeout)
|
|
186
|
+
try await DoorstepAI.startDeliveryByLatLng(latitude: latitude, longitude: longitude, subUnit: subUnit, deliveryId: deliveryId, customerId: customerId, timeoutSeconds: timeout, autoStopAfterDropoffSeconds: autoStop)
|
|
173
187
|
call.resolve()
|
|
174
188
|
} catch {
|
|
175
189
|
call.reject("Failed to start delivery by LatLng: \(error.localizedDescription)", "E_START_DELIVERY")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doorstepai/dropoff-sdk-capacitor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Capacitor plugin for DoorstepAI's Dropoff SDK",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"eslint": "eslint . --ext ts",
|
|
39
39
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
40
40
|
"docgen": "docgen --api DoorstepAIDropoffSDKPlugin --output-readme README.md --output-json dist/docs.json",
|
|
41
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.
|
|
41
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
42
42
|
"clean": "rimraf ./dist",
|
|
43
43
|
"watch": "tsc --watch",
|
|
44
44
|
"prepublishOnly": "npm run build"
|