@doorstepai/dropoff-sdk 2.0.7 → 2.0.8

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 (33) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/doorstepai/dropoffsdk/DoorstepAIModule.kt +21 -5
  3. package/ios/DoorstepAI.mm +10 -0
  4. package/ios/DoorstepAI.swift +20 -0
  5. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
  6. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Info.plist +0 -0
  7. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.abi.json +203 -53
  8. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +7 -7
  9. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  10. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftinterface +7 -7
  11. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +11 -11
  12. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
  13. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +2116 -2106
  14. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
  15. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Info.plist +0 -0
  16. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +203 -53
  17. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +7 -7
  18. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  19. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +7 -7
  20. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +203 -53
  21. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +7 -7
  22. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  23. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +7 -7
  24. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +21 -21
  25. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
  26. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +2116 -2106
  27. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +2105 -2096
  28. package/lib/module/DoorstepAI.js +21 -9
  29. package/lib/module/DoorstepAI.js.map +1 -1
  30. package/lib/typescript/src/DoorstepAI.d.ts +10 -0
  31. package/lib/typescript/src/DoorstepAI.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/src/DoorstepAI.tsx +56 -14
@@ -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.8")
89
+ implementation("ai.doorstep.com:doorstepai-dropoff-sdk:2.0.10")
90
90
  api "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
91
91
  }
92
92
 
@@ -45,6 +45,8 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
45
45
  timeoutSeconds: Double?,
46
46
  autoStopAfterDropoffSeconds: Double?,
47
47
  manualForeground: Boolean?,
48
+ customerId: String?,
49
+ driverId: String?,
48
50
  promise: Promise
49
51
  ) {
50
52
  try {
@@ -53,7 +55,9 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
53
55
  deliveryId = deliveryId,
54
56
  timeoutSeconds = timeoutSeconds,
55
57
  manualForeground = manualForeground ?: false,
56
- autoStopAfterDropoffSeconds = autoStopAfterDropoffSeconds
58
+ autoStopAfterDropoffSeconds = autoStopAfterDropoffSeconds,
59
+ customerId = customerId,
60
+ driverId = driverId
57
61
  ) { result ->
58
62
  result.onSuccess { sessionId ->
59
63
  promise.resolve(sessionId)
@@ -71,10 +75,12 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
71
75
  plusCode: String,
72
76
  deliveryId: String,
73
77
  timeoutSeconds: Double?,
78
+ customerId: String?,
79
+ driverId: String?,
74
80
  promise: Promise
75
81
  ) {
76
82
  try {
77
- DoorstepAI.startDeliveryByPlusCode(plusCode, deliveryId, timeoutSeconds) { result ->
83
+ DoorstepAI.startDeliveryByPlusCode(plusCode, deliveryId, timeoutSeconds, customerId, driverId) { result ->
78
84
  result.onSuccess { sessionId ->
79
85
  promise.resolve(sessionId)
80
86
  }.onFailure { error ->
@@ -94,6 +100,8 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
94
100
  timeoutSeconds: Double?,
95
101
  autoStopAfterDropoffSeconds: Double?,
96
102
  manualForeground: Boolean?,
103
+ customerId: String?,
104
+ driverId: String?,
97
105
  promise: Promise
98
106
  ) {
99
107
  try {
@@ -104,7 +112,9 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
104
112
  coordinates = coords,
105
113
  timeoutSeconds = timeoutSeconds,
106
114
  manualForeground = manualForeground ?: false,
107
- autoStopAfterDropoffSeconds = autoStopAfterDropoffSeconds
115
+ autoStopAfterDropoffSeconds = autoStopAfterDropoffSeconds,
116
+ customerId = customerId,
117
+ driverId = driverId
108
118
  ) { result ->
109
119
  result.onSuccess { message ->
110
120
  promise.resolve(message)
@@ -124,10 +134,12 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
124
134
  subUnit: String,
125
135
  deliveryId: String,
126
136
  timeoutSeconds: Double?,
137
+ customerId: String?,
138
+ driverId: String?,
127
139
  promise: Promise
128
140
  ) {
129
141
  try {
130
- DoorstepAI.startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeoutSeconds) { result ->
142
+ DoorstepAI.startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeoutSeconds, customerId, driverId) { result ->
131
143
  result.onSuccess { message ->
132
144
  promise.resolve(message)
133
145
  }.onFailure { error ->
@@ -147,6 +159,8 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
147
159
  timeoutSeconds: Double?,
148
160
  autoStopAfterDropoffSeconds: Double?,
149
161
  manualForeground: Boolean?,
162
+ customerId: String?,
163
+ driverId: String?,
150
164
  promise: Promise
151
165
  ) {
152
166
  try {
@@ -173,7 +187,9 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
173
187
  coordinates = coords,
174
188
  timeoutSeconds = timeoutSeconds,
175
189
  manualForeground = manualForeground ?: false,
176
- autoStopAfterDropoffSeconds = autoStopAfterDropoffSeconds
190
+ autoStopAfterDropoffSeconds = autoStopAfterDropoffSeconds,
191
+ customerId = customerId,
192
+ driverId = driverId
177
193
  ) { result ->
178
194
  result.onSuccess { sessionId ->
179
195
  promise.resolve(sessionId)
package/ios/DoorstepAI.mm CHANGED
@@ -16,12 +16,16 @@ RCT_EXTERN_METHOD(startDeliveryByPlaceID:(nonnull NSString *)placeID
16
16
  deliveryId:(nonnull NSString *)deliveryId
17
17
  timeoutSeconds:(id)timeoutSeconds
18
18
  autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
19
+ customerId:(nullable NSString *)customerId
20
+ driverId:(nullable NSString *)driverId
19
21
  resolver:(RCTPromiseResolveBlock)resolve
20
22
  rejecter:(RCTPromiseRejectBlock)reject)
21
23
  RCT_EXTERN_METHOD(startDeliveryByPlusCode:(nonnull NSString *)plusCode
22
24
  deliveryId:(nonnull NSString *)deliveryId
23
25
  timeoutSeconds:(id)timeoutSeconds
24
26
  autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
27
+ customerId:(nullable NSString *)customerId
28
+ driverId:(nullable NSString *)driverId
25
29
  resolver:(RCTPromiseResolveBlock)resolve
26
30
  rejecter:(RCTPromiseRejectBlock)reject)
27
31
  RCT_EXTERN_METHOD(startDeliveryByAddress:(nonnull NSDictionary *)address
@@ -29,6 +33,8 @@ RCT_EXTERN_METHOD(startDeliveryByAddress:(nonnull NSDictionary *)address
29
33
  coordinates:(nullable NSDictionary *)coordinates
30
34
  timeoutSeconds:(id)timeoutSeconds
31
35
  autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
36
+ customerId:(nullable NSString *)customerId
37
+ driverId:(nullable NSString *)driverId
32
38
  resolver:(RCTPromiseResolveBlock)resolve
33
39
  rejecter:(RCTPromiseRejectBlock)reject)
34
40
  RCT_EXTERN_METHOD(startDeliveryByAddressString:(nonnull NSString *)address
@@ -36,6 +42,8 @@ RCT_EXTERN_METHOD(startDeliveryByAddressString:(nonnull NSString *)address
36
42
  coordinates:(nullable NSDictionary *)coordinates
37
43
  timeoutSeconds:(id)timeoutSeconds
38
44
  autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
45
+ customerId:(nullable NSString *)customerId
46
+ driverId:(nullable NSString *)driverId
39
47
  resolver:(RCTPromiseResolveBlock)resolve
40
48
  rejecter:(RCTPromiseRejectBlock)reject)
41
49
  RCT_EXTERN_METHOD(startDeliveryByLatLng:(nonnull NSNumber *)latitude
@@ -44,6 +52,8 @@ RCT_EXTERN_METHOD(startDeliveryByLatLng:(nonnull NSNumber *)latitude
44
52
  deliveryId:(nonnull NSString *)deliveryId
45
53
  timeoutSeconds:(id)timeoutSeconds
46
54
  autoStopAfterDropoffSeconds:(id)autoStopAfterDropoffSeconds
55
+ customerId:(nullable NSString *)customerId
56
+ driverId:(nullable NSString *)driverId
47
57
  resolver:(RCTPromiseResolveBlock)resolve
48
58
  rejecter:(RCTPromiseRejectBlock)reject)
49
59
  RCT_EXTERN_METHOD(newEvent:(nonnull NSString *)eventName
@@ -53,6 +53,8 @@ class DoorstepAIBridge: NSObject {
53
53
  deliveryId: NSString,
54
54
  timeoutSeconds: Any?,
55
55
  autoStopAfterDropoffSeconds: Any?,
56
+ customerId: NSString?,
57
+ driverId: NSString?,
56
58
  resolver resolve: @escaping RCTPromiseResolveBlock,
57
59
  rejecter reject: @escaping RCTPromiseRejectBlock) {
58
60
  // Use Swift's concurrency support to call the async method.
@@ -63,6 +65,8 @@ class DoorstepAIBridge: NSObject {
63
65
  try await DoorstepAI.startDeliveryByPlaceID(
64
66
  placeID: placeID as String,
65
67
  deliveryId: deliveryId as String,
68
+ customerId: customerId as String?,
69
+ driverId: driverId as String?,
66
70
  timeoutSeconds: timeout,
67
71
  autoStopAfterDropoffSeconds: autoStop
68
72
  )
@@ -78,6 +82,8 @@ class DoorstepAIBridge: NSObject {
78
82
  deliveryId: NSString,
79
83
  timeoutSeconds: Any?,
80
84
  autoStopAfterDropoffSeconds: Any?,
85
+ customerId: NSString?,
86
+ driverId: NSString?,
81
87
  resolver resolve: @escaping RCTPromiseResolveBlock,
82
88
  rejecter reject: @escaping RCTPromiseRejectBlock) {
83
89
  Task {
@@ -87,6 +93,8 @@ class DoorstepAIBridge: NSObject {
87
93
  try await DoorstepAI.startDeliveryByPlusCode(
88
94
  plusCode: plusCode as String,
89
95
  deliveryId: deliveryId as String,
96
+ customerId: customerId as String?,
97
+ driverId: driverId as String?,
90
98
  timeoutSeconds: timeout,
91
99
  autoStopAfterDropoffSeconds: autoStop
92
100
  )
@@ -103,6 +111,8 @@ class DoorstepAIBridge: NSObject {
103
111
  coordinates: NSDictionary?,
104
112
  timeoutSeconds: Any?,
105
113
  autoStopAfterDropoffSeconds: Any?,
114
+ customerId: NSString?,
115
+ driverId: NSString?,
106
116
  resolver resolve: @escaping RCTPromiseResolveBlock,
107
117
  rejecter reject: @escaping RCTPromiseRejectBlock) {
108
118
  Task {
@@ -113,6 +123,8 @@ class DoorstepAIBridge: NSObject {
113
123
  try await DoorstepAI.startDeliveryByAddressString(
114
124
  address: address as String,
115
125
  deliveryId: deliveryId as String,
126
+ customerId: customerId as String?,
127
+ driverId: driverId as String?,
116
128
  coordinates: coords,
117
129
  timeoutSeconds: timeout,
118
130
  autoStopAfterDropoffSeconds: autoStop
@@ -131,6 +143,8 @@ class DoorstepAIBridge: NSObject {
131
143
  deliveryId: NSString,
132
144
  timeoutSeconds: Any?,
133
145
  autoStopAfterDropoffSeconds: Any?,
146
+ customerId: NSString?,
147
+ driverId: NSString?,
134
148
  resolver resolve: @escaping RCTPromiseResolveBlock,
135
149
  rejecter reject: @escaping RCTPromiseRejectBlock) {
136
150
  Task {
@@ -142,6 +156,8 @@ class DoorstepAIBridge: NSObject {
142
156
  longitude: longitude.doubleValue,
143
157
  subUnit: subUnit as String,
144
158
  deliveryId: deliveryId as String,
159
+ customerId: customerId as String?,
160
+ driverId: driverId as String?,
145
161
  timeoutSeconds: timeout,
146
162
  autoStopAfterDropoffSeconds: autoStop
147
163
  )
@@ -158,6 +174,8 @@ class DoorstepAIBridge: NSObject {
158
174
  coordinates: NSDictionary?,
159
175
  timeoutSeconds: Any?,
160
176
  autoStopAfterDropoffSeconds: Any?,
177
+ customerId: NSString?,
178
+ driverId: NSString?,
161
179
  resolver resolve: @escaping RCTPromiseResolveBlock,
162
180
  rejecter reject: @escaping RCTPromiseRejectBlock) {
163
181
  Task {
@@ -185,6 +203,8 @@ class DoorstepAIBridge: NSObject {
185
203
  try await DoorstepAI.startDeliveryByAddressType(
186
204
  address: addressStruct,
187
205
  deliveryId: deliveryId as String,
206
+ customerId: customerId as String?,
207
+ driverId: driverId as String?,
188
208
  coordinates: coords,
189
209
  timeoutSeconds: timeout,
190
210
  autoStopAfterDropoffSeconds: autoStop