@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
@@ -69,7 +69,9 @@ class DoorstepAIModule {
69
69
  try {
70
70
  const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
71
71
  const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
72
- const result = Platform.OS === 'android' ? await DoorstepAI.startDeliveryByPlaceID(placeID, deliveryId, timeout, autoStop, options?.manualForeground ?? false) : await DoorstepAI.startDeliveryByPlaceID(placeID, deliveryId, timeout, autoStop);
72
+ const customerId = options?.customerId ?? null;
73
+ const driverId = options?.driverId ?? null;
74
+ const result = Platform.OS === 'android' ? await DoorstepAI.startDeliveryByPlaceID(placeID, deliveryId, timeout, autoStop, options?.manualForeground ?? false, customerId, driverId) : await DoorstepAI.startDeliveryByPlaceID(placeID, deliveryId, timeout, autoStop, customerId, driverId);
73
75
  console.log('DOORSTEPAI - Delivery started successfully by Place ID:', placeID, deliveryId);
74
76
  return result;
75
77
  } catch (error) {
@@ -82,9 +84,12 @@ class DoorstepAIModule {
82
84
  static async startDeliveryByPlusCode(plusCode, deliveryId, timeoutSeconds, options) {
83
85
  try {
84
86
  const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
85
- // Android's deprecated startDeliveryByPlusCode does not accept the new
86
- // options, so we forward only the supported parameters there.
87
- const result = Platform.OS === 'ios' ? await DoorstepAI.startDeliveryByPlusCode(plusCode, deliveryId, timeout, options?.autoStopAfterDropoffSeconds ?? null) : await DoorstepAI.startDeliveryByPlusCode(plusCode, deliveryId, timeout);
87
+ const customerId = options?.customerId ?? null;
88
+ const driverId = options?.driverId ?? null;
89
+ // Android's deprecated startDeliveryByPlusCode does not accept
90
+ // autoStopAfterDropoffSeconds, so we forward only the supported
91
+ // parameters there.
92
+ const result = Platform.OS === 'ios' ? await DoorstepAI.startDeliveryByPlusCode(plusCode, deliveryId, timeout, options?.autoStopAfterDropoffSeconds ?? null, customerId, driverId) : await DoorstepAI.startDeliveryByPlusCode(plusCode, deliveryId, timeout, customerId, driverId);
88
93
  console.log('DOORSTEPAI - Delivery started successfully by Plus Code:', plusCode, deliveryId);
89
94
  return result;
90
95
  } catch (error) {
@@ -96,7 +101,9 @@ class DoorstepAIModule {
96
101
  try {
97
102
  const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
98
103
  const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
99
- const result = Platform.OS === 'android' ? await DoorstepAI.startDeliveryByAddress(address, deliveryId, coordinates ?? null, timeout, autoStop, options?.manualForeground ?? false) : await DoorstepAI.startDeliveryByAddress(address, deliveryId, coordinates ?? null, timeout, autoStop);
104
+ const customerId = options?.customerId ?? null;
105
+ const driverId = options?.driverId ?? null;
106
+ const result = Platform.OS === 'android' ? await DoorstepAI.startDeliveryByAddress(address, deliveryId, coordinates ?? null, timeout, autoStop, options?.manualForeground ?? false, customerId, driverId) : await DoorstepAI.startDeliveryByAddress(address, deliveryId, coordinates ?? null, timeout, autoStop, customerId, driverId);
100
107
  console.log('DOORSTEPAI - Delivery started successfully by Address:', address, deliveryId);
101
108
  return result;
102
109
  } catch (error) {
@@ -108,7 +115,9 @@ class DoorstepAIModule {
108
115
  try {
109
116
  const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
110
117
  const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
111
- const result = Platform.OS === 'android' ? await DoorstepAI.startDeliveryByAddressString(address, deliveryId, coordinates ?? null, timeout, autoStop, options?.manualForeground ?? false) : await DoorstepAI.startDeliveryByAddressString(address, deliveryId, coordinates ?? null, timeout, autoStop);
118
+ const customerId = options?.customerId ?? null;
119
+ const driverId = options?.driverId ?? null;
120
+ const result = Platform.OS === 'android' ? await DoorstepAI.startDeliveryByAddressString(address, deliveryId, coordinates ?? null, timeout, autoStop, options?.manualForeground ?? false, customerId, driverId) : await DoorstepAI.startDeliveryByAddressString(address, deliveryId, coordinates ?? null, timeout, autoStop, customerId, driverId);
112
121
  console.log('DOORSTEPAI - Delivery started successfully by Address String:', address, deliveryId);
113
122
  return result;
114
123
  } catch (error) {
@@ -121,9 +130,12 @@ class DoorstepAIModule {
121
130
  static async startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeoutSeconds, options) {
122
131
  try {
123
132
  const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
124
- // Android's deprecated startDeliveryByLatLng does not accept the new
125
- // options, so we forward only the supported parameters there.
126
- const result = Platform.OS === 'ios' ? await DoorstepAI.startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeout, options?.autoStopAfterDropoffSeconds ?? null) : await DoorstepAI.startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeout);
133
+ const customerId = options?.customerId ?? null;
134
+ const driverId = options?.driverId ?? null;
135
+ // Android's deprecated startDeliveryByLatLng does not accept
136
+ // autoStopAfterDropoffSeconds, so we forward only the supported
137
+ // parameters there.
138
+ const result = Platform.OS === 'ios' ? await DoorstepAI.startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeout, options?.autoStopAfterDropoffSeconds ?? null, customerId, driverId) : await DoorstepAI.startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeout, customerId, driverId);
127
139
  console.log('DOORSTEPAI - Delivery started successfully by LatLng:', latitude, longitude, subUnit, deliveryId);
128
140
  return result;
129
141
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModules","Platform","DoorstepAI","SDK_LOG_LEVEL_RAW","debug","info","warning","error","critical","DEFAULT_TIMEOUT_SECONDS","DoorstepAIModule","isInitialized","init","notificationTitle","notificationText","OS","console","log","setApiKey","apiKey","requestAllPermissions","requestAlwaysLocation","configureRemoteLogging","options","minLevelRaw","minLevel","enabled","flushIntervalSeconds","batchSize","maxQueueSize","startDeliveryByPlaceID","placeID","deliveryId","timeoutSeconds","timeout","autoStop","autoStopAfterDropoffSeconds","result","manualForeground","startDeliveryByPlusCode","plusCode","startDeliveryByAddress","address","coordinates","startDeliveryByAddressString","startDeliveryByLatLng","latitude","longitude","subUnit","markDropoff","dropoffType","stopDelivery","newEvent","eventName","enableDevMode","Boolean","validateDevModeAccess","disableDevMode"],"sourceRoot":"../../src","sources":["DoorstepAI.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,MAAM;EAAEC;AAAW,CAAC,GAAGF,aAAa;;AAgBpC;AACA;AACA;AACA;;AAuBA;AACA;AACA;AACA;;AAGA,MAAMG,iBAA8C,GAAG;EACrDC,KAAK,EAAE,CAAC;EACRC,IAAI,EAAE,CAAC;EACPC,OAAO,EAAE,CAAC;EACVC,KAAK,EAAE,CAAC;EACRC,QAAQ,EAAE;AACZ,CAAC;AAED,MAAMC,uBAAuB,GAAG,IAAI;AAEpC,MAAMC,gBAAgB,CAAC;EACrB,OAAOC,aAAa,GAAG,KAAK;EAE5B,aAAaC,IAAIA,CACfC,iBAA0B,EAC1BC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EAEA;EACA,aAAaE,qBAAqBA,CAAA,EAAqB;IACrD,IAAIvD,QAAQ,CAACc,EAAE,KAAK,SAAS,EAAE,OAAO,KAAK;IAC3C,OAAOwC,OAAO,CAAC,MAAMrD,UAAU,CAACsD,qBAAqB,CAAC,CAAC,CAAC;EAC1D;;EAEA;EACA,aAAaC,cAAcA,CAAA,EAAqB;IAC9C,IAAIxD,QAAQ,CAACc,EAAE,KAAK,SAAS,EAAE,OAAO,KAAK;IAC3C,OAAOwC,OAAO,CAAC,MAAMrD,UAAU,CAACuD,cAAc,CAAC,CAAC,CAAC;EACnD;AACF;AAEA,SAAS/C,gBAAgB,IAAIR,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["NativeModules","Platform","DoorstepAI","SDK_LOG_LEVEL_RAW","debug","info","warning","error","critical","DEFAULT_TIMEOUT_SECONDS","DoorstepAIModule","isInitialized","init","notificationTitle","notificationText","OS","console","log","setApiKey","apiKey","requestAllPermissions","requestAlwaysLocation","configureRemoteLogging","options","minLevelRaw","minLevel","enabled","flushIntervalSeconds","batchSize","maxQueueSize","startDeliveryByPlaceID","placeID","deliveryId","timeoutSeconds","timeout","autoStop","autoStopAfterDropoffSeconds","customerId","driverId","result","manualForeground","startDeliveryByPlusCode","plusCode","startDeliveryByAddress","address","coordinates","startDeliveryByAddressString","startDeliveryByLatLng","latitude","longitude","subUnit","markDropoff","dropoffType","stopDelivery","newEvent","eventName","enableDevMode","Boolean","validateDevModeAccess","disableDevMode"],"sourceRoot":"../../src","sources":["DoorstepAI.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,MAAM;EAAEC;AAAW,CAAC,GAAGF,aAAa;;AAgBpC;AACA;AACA;AACA;;AAiCA;AACA;AACA;AACA;;AAGA,MAAMG,iBAA8C,GAAG;EACrDC,KAAK,EAAE,CAAC;EACRC,IAAI,EAAE,CAAC;EACPC,OAAO,EAAE,CAAC;EACVC,KAAK,EAAE,CAAC;EACRC,Q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cAAcA,CAAA,EAAqB;IAC9C,IAAI1D,QAAQ,CAACc,EAAE,KAAK,SAAS,EAAE,OAAO,KAAK;IAC3C,OAAO0C,OAAO,CAAC,MAAMvD,UAAU,CAACyD,cAAc,CAAC,CAAC,CAAC;EACnD;AACF;AAEA,SAASjD,gBAAgB,IAAIR,UAAU","ignoreList":[]}
@@ -34,6 +34,16 @@ type StartDeliveryOptions = {
34
34
  * Ignored on iOS.
35
35
  */
36
36
  manualForeground?: boolean;
37
+ /**
38
+ * Optional customer identifier associated with this delivery. Forwarded to
39
+ * the native SDK on both platforms.
40
+ */
41
+ customerId?: string;
42
+ /**
43
+ * Optional driver identifier associated with this delivery. Forwarded to the
44
+ * native SDK on both platforms.
45
+ */
46
+ driverId?: string;
37
47
  };
38
48
  /**
39
49
  * Mirrors the iOS SDK's `SDKLogLevel` enum. Only used by
@@ -1 +1 @@
1
- {"version":3,"file":"DoorstepAI.d.ts","sourceRoot":"","sources":["../../../src/DoorstepAI.tsx"],"names":[],"mappings":"AAGA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB,EAAE,MAAM,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,KAAK,oBAAoB,GAAG;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,KAAK,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO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EAC1B,OAAO,CAAC,EAAE,oBAAoB;IA4ChC,2GAA2G;WAC9F,qBAAqB,CAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,oBAAoB;WA6CnB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,GAAG,SAAS;WAmB9D,YAAY,CAAC,UAAU,EAAE,MAAM;WAU/B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;WAkB9C,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ5D,0CAA0C;WAC7B,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAKtD,kCAAkC;WACrB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;CAIhD;AAED,OAAO,EAAE,gBAAgB,IAAI,UAAU,EAAE,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,WAAW,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doorstepai/dropoff-sdk",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "doorstep.ai dropoff sdk for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",
@@ -39,6 +39,16 @@ type StartDeliveryOptions = {
39
39
  * Ignored on iOS.
40
40
  */
41
41
  manualForeground?: boolean;
42
+ /**
43
+ * Optional customer identifier associated with this delivery. Forwarded to
44
+ * the native SDK on both platforms.
45
+ */
46
+ customerId?: string;
47
+ /**
48
+ * Optional driver identifier associated with this delivery. Forwarded to the
49
+ * native SDK on both platforms.
50
+ */
51
+ driverId?: string;
42
52
  };
43
53
 
44
54
  /**
@@ -128,6 +138,8 @@ class DoorstepAIModule {
128
138
  const timeout =
129
139
  timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
130
140
  const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
141
+ const customerId = options?.customerId ?? null;
142
+ const driverId = options?.driverId ?? null;
131
143
  const result =
132
144
  Platform.OS === 'android'
133
145
  ? await DoorstepAI.startDeliveryByPlaceID(
@@ -135,13 +147,17 @@ class DoorstepAIModule {
135
147
  deliveryId,
136
148
  timeout,
137
149
  autoStop,
138
- options?.manualForeground ?? false
150
+ options?.manualForeground ?? false,
151
+ customerId,
152
+ driverId
139
153
  )
140
154
  : await DoorstepAI.startDeliveryByPlaceID(
141
155
  placeID,
142
156
  deliveryId,
143
157
  timeout,
144
- autoStop
158
+ autoStop,
159
+ customerId,
160
+ driverId
145
161
  );
146
162
  console.log(
147
163
  'DOORSTEPAI - Delivery started successfully by Place ID:',
@@ -168,20 +184,27 @@ class DoorstepAIModule {
168
184
  try {
169
185
  const timeout =
170
186
  timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
171
- // Android's deprecated startDeliveryByPlusCode does not accept the new
172
- // options, so we forward only the supported parameters there.
187
+ const customerId = options?.customerId ?? null;
188
+ const driverId = options?.driverId ?? null;
189
+ // Android's deprecated startDeliveryByPlusCode does not accept
190
+ // autoStopAfterDropoffSeconds, so we forward only the supported
191
+ // parameters there.
173
192
  const result =
174
193
  Platform.OS === 'ios'
175
194
  ? await DoorstepAI.startDeliveryByPlusCode(
176
195
  plusCode,
177
196
  deliveryId,
178
197
  timeout,
179
- options?.autoStopAfterDropoffSeconds ?? null
198
+ options?.autoStopAfterDropoffSeconds ?? null,
199
+ customerId,
200
+ driverId
180
201
  )
181
202
  : await DoorstepAI.startDeliveryByPlusCode(
182
203
  plusCode,
183
204
  deliveryId,
184
- timeout
205
+ timeout,
206
+ customerId,
207
+ driverId
185
208
  );
186
209
  console.log(
187
210
  'DOORSTEPAI - Delivery started successfully by Plus Code:',
@@ -209,6 +232,8 @@ class DoorstepAIModule {
209
232
  const timeout =
210
233
  timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
211
234
  const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
235
+ const customerId = options?.customerId ?? null;
236
+ const driverId = options?.driverId ?? null;
212
237
  const result =
213
238
  Platform.OS === 'android'
214
239
  ? await DoorstepAI.startDeliveryByAddress(
@@ -217,14 +242,18 @@ class DoorstepAIModule {
217
242
  coordinates ?? null,
218
243
  timeout,
219
244
  autoStop,
220
- options?.manualForeground ?? false
245
+ options?.manualForeground ?? false,
246
+ customerId,
247
+ driverId
221
248
  )
222
249
  : await DoorstepAI.startDeliveryByAddress(
223
250
  address,
224
251
  deliveryId,
225
252
  coordinates ?? null,
226
253
  timeout,
227
- autoStop
254
+ autoStop,
255
+ customerId,
256
+ driverId
228
257
  );
229
258
  console.log(
230
259
  'DOORSTEPAI - Delivery started successfully by Address:',
@@ -249,6 +278,8 @@ class DoorstepAIModule {
249
278
  const timeout =
250
279
  timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
251
280
  const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
281
+ const customerId = options?.customerId ?? null;
282
+ const driverId = options?.driverId ?? null;
252
283
  const result =
253
284
  Platform.OS === 'android'
254
285
  ? await DoorstepAI.startDeliveryByAddressString(
@@ -257,14 +288,18 @@ class DoorstepAIModule {
257
288
  coordinates ?? null,
258
289
  timeout,
259
290
  autoStop,
260
- options?.manualForeground ?? false
291
+ options?.manualForeground ?? false,
292
+ customerId,
293
+ driverId
261
294
  )
262
295
  : await DoorstepAI.startDeliveryByAddressString(
263
296
  address,
264
297
  deliveryId,
265
298
  coordinates ?? null,
266
299
  timeout,
267
- autoStop
300
+ autoStop,
301
+ customerId,
302
+ driverId
268
303
  );
269
304
  console.log(
270
305
  'DOORSTEPAI - Delivery started successfully by Address String:',
@@ -293,8 +328,11 @@ class DoorstepAIModule {
293
328
  try {
294
329
  const timeout =
295
330
  timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
296
- // Android's deprecated startDeliveryByLatLng does not accept the new
297
- // options, so we forward only the supported parameters there.
331
+ const customerId = options?.customerId ?? null;
332
+ const driverId = options?.driverId ?? null;
333
+ // Android's deprecated startDeliveryByLatLng does not accept
334
+ // autoStopAfterDropoffSeconds, so we forward only the supported
335
+ // parameters there.
298
336
  const result =
299
337
  Platform.OS === 'ios'
300
338
  ? await DoorstepAI.startDeliveryByLatLng(
@@ -303,14 +341,18 @@ class DoorstepAIModule {
303
341
  subUnit,
304
342
  deliveryId,
305
343
  timeout,
306
- options?.autoStopAfterDropoffSeconds ?? null
344
+ options?.autoStopAfterDropoffSeconds ?? null,
345
+ customerId,
346
+ driverId
307
347
  )
308
348
  : await DoorstepAI.startDeliveryByLatLng(
309
349
  latitude,
310
350
  longitude,
311
351
  subUnit,
312
352
  deliveryId,
313
- timeout
353
+ timeout,
354
+ customerId,
355
+ driverId
314
356
  );
315
357
  console.log(
316
358
  'DOORSTEPAI - Delivery started successfully by LatLng:',