@doorstepai/dropoff-sdk 2.0.3 → 2.0.5

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 (45) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/doorstepai/dropoffsdk/DoorstepAIModule.kt +29 -57
  3. package/ios/DoorstepAI.mm +12 -5
  4. package/ios/DoorstepAI.swift +41 -20
  5. package/ios/DoorstepDropoffSDK.xcframework/Info.plist +5 -5
  6. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
  7. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Headers/DoorstepDropoffSDK.h +1 -0
  8. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Headers/RateReducer.h +117 -0
  9. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Info.plist +0 -0
  10. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.abi.json +1248 -261
  11. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +13 -11
  12. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  13. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftinterface +13 -11
  14. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +24 -13
  15. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
  16. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +2103 -1583
  17. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
  18. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Headers/DoorstepDropoffSDK.h +1 -0
  19. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Headers/RateReducer.h +117 -0
  20. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Info.plist +0 -0
  21. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1248 -261
  22. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +13 -11
  23. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  24. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +13 -11
  25. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1248 -261
  26. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +13 -11
  27. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  28. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +13 -11
  29. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +34 -23
  30. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
  31. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +2103 -1583
  32. package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +2093 -1578
  33. package/lib/module/DoorstepAI.js +90 -19
  34. package/lib/module/DoorstepAI.js.map +1 -1
  35. package/lib/module/RootDoorstepAI.js.map +1 -1
  36. package/lib/module/index.js.map +1 -1
  37. package/lib/typescript/src/DoorstepAI.d.ts +61 -6
  38. package/lib/typescript/src/DoorstepAI.d.ts.map +1 -1
  39. package/lib/typescript/src/RootDoorstepAI.d.ts.map +1 -1
  40. package/lib/typescript/src/index.d.ts +1 -1
  41. package/lib/typescript/src/index.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/src/DoorstepAI.tsx +252 -47
  44. package/src/RootDoorstepAI.tsx +0 -1
  45. package/src/index.tsx +6 -1
@@ -4,6 +4,25 @@ import { NativeModules, Platform } from 'react-native';
4
4
  const {
5
5
  DoorstepAI
6
6
  } = NativeModules;
7
+
8
+ /**
9
+ * Per-delivery options shared across both platforms. Fields not supported on a
10
+ * given platform are silently ignored.
11
+ */
12
+
13
+ /**
14
+ * Mirrors the iOS SDK's `SDKLogLevel` enum. Only used by
15
+ * `configureRemoteLogging` (iOS only).
16
+ */
17
+
18
+ const SDK_LOG_LEVEL_RAW = {
19
+ debug: 0,
20
+ info: 1,
21
+ warning: 2,
22
+ error: 3,
23
+ critical: 4
24
+ };
25
+ const DEFAULT_TIMEOUT_SECONDS = 7200;
7
26
  class DoorstepAIModule {
8
27
  static isInitialized = false;
9
28
  static async init(notificationTitle, notificationText) {
@@ -14,7 +33,7 @@ class DoorstepAIModule {
14
33
  try {
15
34
  await DoorstepAI.init(notificationTitle, notificationText);
16
35
  console.log('DOORSTEPAI - DoorstepAI initialized');
17
- this.isInitialized = true; // Mark as initialized on success
36
+ this.isInitialized = true;
18
37
  } catch (error) {
19
38
  console.error('DOORSTEPAI - Failed to initialize DoorstepAI:', error);
20
39
  throw error;
@@ -25,22 +44,47 @@ class DoorstepAIModule {
25
44
  DoorstepAI.setApiKey(apiKey);
26
45
  }
27
46
 
28
- // Add deliveryId parameter
29
- static async startDeliveryByPlaceID(placeID, deliveryId, timeoutSeconds) {
47
+ /**
48
+ * Triggers iOS Motion/Fitness + Location permission prompts up-front so the
49
+ * host app does not need to manage them itself. No-op on Android — use
50
+ * `PermissionsAndroid` (already wired into `RootDoorstepAI`).
51
+ */
52
+ static requestAllPermissions(requestAlwaysLocation = true) {
53
+ if (Platform.OS === 'ios') {
54
+ DoorstepAI.requestAllPermissions(requestAlwaysLocation);
55
+ }
56
+ }
57
+
58
+ /**
59
+ * Configures the iOS SDK's remote logging pipeline. No-op on Android (the
60
+ * Android SDK currently configures remote logging via remote config / dev
61
+ * mode rather than a public host-app entry point).
62
+ */
63
+ static configureRemoteLogging(options) {
64
+ if (Platform.OS !== 'ios') return;
65
+ const minLevelRaw = options.minLevel != null ? SDK_LOG_LEVEL_RAW[options.minLevel] : null;
66
+ DoorstepAI.configureRemoteLogging(options.enabled, minLevelRaw, options.flushIntervalSeconds ?? null, options.batchSize ?? null, options.maxQueueSize ?? null);
67
+ }
68
+ static async startDeliveryByPlaceID(placeID, deliveryId, timeoutSeconds, options) {
30
69
  try {
31
- const result = await DoorstepAI.startDeliveryByPlaceID(placeID, deliveryId, timeoutSeconds ?? 7200);
70
+ const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
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);
32
73
  console.log('DOORSTEPAI - Delivery started successfully by Place ID:', placeID, deliveryId);
33
- return result; // Return result (e.g., session ID from Android)
74
+ return result;
34
75
  } catch (error) {
35
76
  console.error('DOORSTEPAI - Failed to start delivery by Place ID:', error);
36
- throw error; // Re-throw error for caller handling
77
+ throw error;
37
78
  }
38
79
  }
39
80
 
40
- // Add deliveryId parameter
41
- static async startDeliveryByPlusCode(plusCode, deliveryId, timeoutSeconds) {
81
+ /** @deprecated Use `startDeliveryByAddressString` with coordinates instead. */
82
+ static async startDeliveryByPlusCode(plusCode, deliveryId, timeoutSeconds, options) {
42
83
  try {
43
- const result = await DoorstepAI.startDeliveryByPlusCode(plusCode, deliveryId, timeoutSeconds ?? 7200);
84
+ 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);
44
88
  console.log('DOORSTEPAI - Delivery started successfully by Plus Code:', plusCode, deliveryId);
45
89
  return result;
46
90
  } catch (error) {
@@ -48,9 +92,11 @@ class DoorstepAIModule {
48
92
  throw error;
49
93
  }
50
94
  }
51
- static async startDeliveryByAddress(address, deliveryId, timeoutSeconds, coordinates) {
95
+ static async startDeliveryByAddress(address, deliveryId, timeoutSeconds, coordinates, options) {
52
96
  try {
53
- let result = await DoorstepAI.startDeliveryByAddress(address, deliveryId, coordinates ?? null, timeoutSeconds ?? 7200);
97
+ const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
98
+ 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);
54
100
  console.log('DOORSTEPAI - Delivery started successfully by Address:', address, deliveryId);
55
101
  return result;
56
102
  } catch (error) {
@@ -58,9 +104,11 @@ class DoorstepAIModule {
58
104
  throw error;
59
105
  }
60
106
  }
61
- static async startDeliveryByAddressString(address, deliveryId, timeoutSeconds, coordinates) {
107
+ static async startDeliveryByAddressString(address, deliveryId, timeoutSeconds, coordinates, options) {
62
108
  try {
63
- const result = await DoorstepAI.startDeliveryByAddressString(address, deliveryId, coordinates ?? null, timeoutSeconds ?? 7200);
109
+ const timeout = timeoutSeconds ?? options?.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS;
110
+ 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);
64
112
  console.log('DOORSTEPAI - Delivery started successfully by Address String:', address, deliveryId);
65
113
  return result;
66
114
  } catch (error) {
@@ -68,9 +116,14 @@ class DoorstepAIModule {
68
116
  throw error;
69
117
  }
70
118
  }
71
- static async startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeoutSeconds) {
119
+
120
+ /** @deprecated Use `startDeliveryByAddress` or `startDeliveryByAddressString` with coordinates instead. */
121
+ static async startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeoutSeconds, options) {
72
122
  try {
73
- const result = await DoorstepAI.startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeoutSeconds ?? 7200);
123
+ 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);
74
127
  console.log('DOORSTEPAI - Delivery started successfully by LatLng:', latitude, longitude, subUnit, deliveryId);
75
128
  return result;
76
129
  } catch (error) {
@@ -87,8 +140,6 @@ class DoorstepAIModule {
87
140
  throw error;
88
141
  }
89
142
  }
90
-
91
- // Add deliveryId parameter
92
143
  static async stopDelivery(deliveryId) {
93
144
  try {
94
145
  await DoorstepAI.stopDelivery(deliveryId);
@@ -98,8 +149,6 @@ class DoorstepAIModule {
98
149
  throw error;
99
150
  }
100
151
  }
101
-
102
- // Add deliveryId parameter
103
152
  static async newEvent(eventName, deliveryId) {
104
153
  try {
105
154
  const result = await DoorstepAI.newEvent(eventName, deliveryId);
@@ -110,6 +159,28 @@ class DoorstepAIModule {
110
159
  throw error;
111
160
  }
112
161
  }
162
+
163
+ // ---- Dev-mode helpers (Android exposes a richer surface than iOS) ----
164
+
165
+ static async enableDevMode(apiKey) {
166
+ if (Platform.OS === 'ios') {
167
+ await DoorstepAI.enableDevMode(apiKey);
168
+ return true;
169
+ }
170
+ return Boolean(await DoorstepAI.enableDevMode());
171
+ }
172
+
173
+ /** Android only. Returns false on iOS. */
174
+ static async validateDevModeAccess() {
175
+ if (Platform.OS !== 'android') return false;
176
+ return Boolean(await DoorstepAI.validateDevModeAccess());
177
+ }
178
+
179
+ /** Android only. No-op on iOS. */
180
+ static async disableDevMode() {
181
+ if (Platform.OS !== 'android') return false;
182
+ return Boolean(await DoorstepAI.disableDevMode());
183
+ }
113
184
  }
114
185
  export { DoorstepAIModule as DoorstepAI };
115
186
  //# sourceMappingURL=DoorstepAI.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModules","Platform","DoorstepAI","DoorstepAIModule","isInitialized","init","notificationTitle","notificationText","OS","console","log","error","setApiKey","apiKey","startDeliveryByPlaceID","placeID","deliveryId","timeoutSeconds","result","startDeliveryByPlusCode","plusCode","startDeliveryByAddress","address","coordinates","startDeliveryByAddressString","startDeliveryByLatLng","latitude","longitude","subUnit","markDropoff","dropoffType","stopDelivery","newEvent","eventName"],"sourceRoot":"../../src","sources":["DoorstepAI.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,MAAM;EAAEC;AAAW,CAAC,GAAGF,aAAa;AAgBpC,MAAMG,gBAAgB,CAAC;EACrB,OAAOC,aAAa,GAAG,KAAK;EAG5B,aAAaC,IAAIA,CACfC,iBAA0B,EAC1BC,gBAAyB,EACV;IACf,IAAIN,QAAQ,CAACO,EAAE,KAAK,SAAS,EAAE;MAC7B,IAAI,IAAI,CAACJ,aAAa,EAAE;QACtB;MACF;MACA,IAAI;QACF,MAAMF,UAAU,CAACG,IAAI,CAACC,iBAAiB,EAAEC,gBAAgB,CAAC;QAC1DE,OAAO,CAACC,GAAG,CAAC,qCAAqC,CAAC;QAClD,IAAI,CAACN,aAAa,GAAG,IAAI,CAAC,CAAC;MAC7B,CA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aAAakB,WAAWA,CAACb,UAAkB,EAAEc,WAA8B,EAAE;IAC3E,IAAI;MACF,MAAM5B,UAAU,CAAC2B,WAAW,CAACb,UAAU,EAAEc,WAAW,CAAC;MACrDrB,OAAO,CAACC,GAAG,CAAC,2CAA2C,EAAEM,UAAU,EAAEc,WAAW,CAAC;IACnF,CAAC,CAAC,OAAOnB,KAAU,EAAE;MACnBF,OAAO,CAACE,KAAK,CAAC,sCAAsC,EAAEK,UAAU,EAAEc,WAAW,EAAEnB,KAAK,CAAC;MACrF,MAAMA,KAAK;IACb;EACF;;EAEA;EACA,aAAaoB,YAAYA,CAACf,UAAkB,EAAE;IAC5C,IAAI;MACF,MAAMd,UAAU,CAAC6B,YAAY,CAACf,UAAU,CAAC;MACzCP,OAAO,CAACC,GAAG,CAAC,4CAA4C,CAAC;IAC3D,CAAC,CAAC,OAAOC,KAAU,EAAE;MACnBF,OAAO,CAACE,KAAK,CAAC,uCAAuC,EAAEA,KAAK,CAAC;MAC7D,MAAMA,KAAK;IACb;EACF;;EAEA;EACA,aAAaqB,QAAQA,CAACC,SAAiB,EAAEjB,UAAkB,EAAE;IAC3D,IAAI;MACF,MAAME,MAAM,GAAG,MAAMhB,UAAU,CAAC8B,QAAQ,CAACC,SAAS,EAAEjB,UAAU,CAAC;MAC/DP,OAAO,CAACC,GAAG,CAAC,uCAAuC,EAAEQ,MAAM,CAAC;MAC5D,OAAOA,MAAM;IACf,CAAC,CAAC,OAAOP,KAAU,EAAE;MACnBF,OAAO,CAACE,KAAK,CAAC,oCAAoC,EAAEsB,SAAS,EAAEjB,UAAU,EAAEL,KAAK,CAAC;MACjF,MAAMA,KAAK;IACb;EACF;AAEF;AAEA,SAASR,gBAAgB,IAAID,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","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,gBAAyB,EACV;IACf,IAAIb,QAAQ,CAACc,EAAE,KAAK,SAAS,EAAE;MAC7B,IAAI,IAAI,CAACJ,aAAa,EAAE;QACtB;MACF;MACA,IAAI;QACF,MAAMT,UAAU,CAACU,IAAI,CAACC,iBAAiB,EAAEC,gBAAgB,CAAC;QAC1DE,OAAO,CAACC,GAAG,CAAC,qCAAqC,CAAC;QAClD,IAAI,CAACN,aAAa,GAAG,IAAI;MAC3B,CAAC,CAAC,OAAOJ,KAAK,EAAE;QACdS,OAAO,CAACT,KAAK,CAAC,+CAA+C,EAAEA,KAAK,CAAC;QACrE,MAAMA,KAAK;MACb;IACF,CAAC,CAAC;EACJ;EAEA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}
@@ -1 +1 @@
1
- {"version":3,"names":["requireNativeComponent","View","Platform","StyleSheet","PermissionsAndroid","useEffect","DoorstepAI","jsx","_jsx","DoorstepAIView","RootDoorstepAI","props","initializeAndRequestPermissions","OS","init","notificationTitle","notificationText","setApiKey","apiKey","permissionsToRequest","PERMISSIONS","ACCESS_FINE_LOCATION","ACTIVITY_RECOGNITION","granted","requestMultiple","RESULTS","GRANTED","console","log","warn","err","style","styles","container","children","create","height","width"],"sourceRoot":"../../src","sources":["RootDoorstepAI.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,IAAI,EACJC,QAAQ,EACRC,UAAU,EACVC,kBAAkB,QACb,cAAc;AAErB,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,MAAMC,cAAc,GAAGT,sBAAsB,CAAC,oBAAoB,CAAC;AAGnE,OAAO,SAASU,cAAcA,CAACC,KAI9B,EAAE;EACDN,SAAS,CAAC,MAAM;IACd,MAAMO,+BAA+B,GAAG,MAAAA,CAAA,KAAY;MAClD,IAAIV,QAAQ,CAACW,EAAE,KAAK,SAAS,EAAE;QAC7B,MAAMP,UAAU,CAACQ,IAAI,CACnBH,KAAK,CAACI,iBAAiB,IAAI,EAAE,EAC7BJ,KAAK,CAACK,gBAAgB,IAAI,EAC5B,CAAC;MACH;MAEAV,UAAU,CAACW,SAAS,CAACN,KAAK,CAACO,MAAM,CAAC;MAElC,IAAIhB,QAAQ,CAACW,EAAE,KAAK,SAAS,EAAE;QAC7B,IAAI;UACF,MAAMM,oBAAoB,GAAG,CAC3Bf,kBAAkB,CAACgB,WAAW,CAACC,oBAAoB,EACnDjB,kBAAkB,CAACgB,WAAW,CAACE,oBAAoB,CACpD;UAED,MAAMC,OAAO,GACX,MAAMnB,kBAAkB,CAACoB,eAAe,CAACL,oBAAoB,CAAC;UAEhE,IACEI,OAAO,CAACnB,kBAAkB,CAACgB,WAAW,CAACC,oBAAoB,CAAC,KAC1DjB,kBAAkB,CAACqB,OAAO,CAACC,OAAO,IACpCH,OAAO,CAACnB,kBAAkB,CAACgB,WAAW,CAACE,oBAAoB,CAAC,KAC1DlB,kBAAkB,CAACqB,OAAO,CAACC,OAAO,EACpC;YACAC,OAAO,CAACC,GAAG,CAAC,sCAAsC,CAAC;UACrD,CAAC,MAAM;YACLD,OAAO,CAACE,IAAI,CAAC,iDAAiD,CAAC;UACjE;QACF,CAAC,CAAC,OAAOC,GAAG,EAAE;UACZH,OAAO,CAACE,IAAI,CAAC,uCAAuC,EAAEC,GAAG,CAAC;QAC5D;MACF,CAAC,MAAM,IAAI5B,QAAQ,CAACW,EAAE,KAAK,KAAK,EAAE;QAChCc,OAAO,CAACC,GAAG,CACT,sEACF,CAAC;MACH;IACF,CAAC;IAEDhB,+BAA+B,CAAC,CAAC;EACnC,CAAC,EAAE,CAACD,KAAK,CAACO,MAAM,EAAEP,KAAK,CAACI,iBAAiB,EAAEJ,KAAK,CAACK,gBAAgB,CAAC,CAAC;;EAEnE;EACA;EACA,oBACER,IAAA,CAACP,IAAI;IAAC8B,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BhC,QAAQ,CAACW,EAAE,KAAK,KAAK,gBAAGL,IAAA,CAACC,cAAc,IAAE,CAAC,GAAG;EAAI,CAC9C,CAAC;AAEX;AAEA,MAAMuB,MAAM,GAAG7B,UAAU,CAACgC,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["requireNativeComponent","View","Platform","StyleSheet","PermissionsAndroid","useEffect","DoorstepAI","jsx","_jsx","DoorstepAIView","RootDoorstepAI","props","initializeAndRequestPermissions","OS","init","notificationTitle","notificationText","setApiKey","apiKey","permissionsToRequest","PERMISSIONS","ACCESS_FINE_LOCATION","ACTIVITY_RECOGNITION","granted","requestMultiple","RESULTS","GRANTED","console","log","warn","err","style","styles","container","children","create","height","width"],"sourceRoot":"../../src","sources":["RootDoorstepAI.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,IAAI,EACJC,QAAQ,EACRC,UAAU,EACVC,kBAAkB,QACb,cAAc;AAErB,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,MAAMC,cAAc,GAAGT,sBAAsB,CAAC,oBAAoB,CAAC;AAEnE,OAAO,SAASU,cAAcA,CAACC,KAI9B,EAAE;EACDN,SAAS,CAAC,MAAM;IACd,MAAMO,+BAA+B,GAAG,MAAAA,CAAA,KAAY;MAClD,IAAIV,QAAQ,CAACW,EAAE,KAAK,SAAS,EAAE;QAC7B,MAAMP,UAAU,CAACQ,IAAI,CACnBH,KAAK,CAACI,iBAAiB,IAAI,EAAE,EAC7BJ,KAAK,CAACK,gBAAgB,IAAI,EAC5B,CAAC;MACH;MAEAV,UAAU,CAACW,SAAS,CAACN,KAAK,CAACO,MAAM,CAAC;MAElC,IAAIhB,QAAQ,CAACW,EAAE,KAAK,SAAS,EAAE;QAC7B,IAAI;UACF,MAAMM,oBAAoB,GAAG,CAC3Bf,kBAAkB,CAACgB,WAAW,CAACC,oBAAoB,EACnDjB,kBAAkB,CAACgB,WAAW,CAACE,oBAAoB,CACpD;UAED,MAAMC,OAAO,GACX,MAAMnB,kBAAkB,CAACoB,eAAe,CAACL,oBAAoB,CAAC;UAEhE,IACEI,OAAO,CAACnB,kBAAkB,CAACgB,WAAW,CAACC,oBAAoB,CAAC,KAC1DjB,kBAAkB,CAACqB,OAAO,CAACC,OAAO,IACpCH,OAAO,CAACnB,kBAAkB,CAACgB,WAAW,CAACE,oBAAoB,CAAC,KAC1DlB,kBAAkB,CAACqB,OAAO,CAACC,OAAO,EACpC;YACAC,OAAO,CAACC,GAAG,CAAC,sCAAsC,CAAC;UACrD,CAAC,MAAM;YACLD,OAAO,CAACE,IAAI,CAAC,iDAAiD,CAAC;UACjE;QACF,CAAC,CAAC,OAAOC,GAAG,EAAE;UACZH,OAAO,CAACE,IAAI,CAAC,uCAAuC,EAAEC,GAAG,CAAC;QAC5D;MACF,CAAC,MAAM,IAAI5B,QAAQ,CAACW,EAAE,KAAK,KAAK,EAAE;QAChCc,OAAO,CAACC,GAAG,CACT,sEACF,CAAC;MACH;IACF,CAAC;IAEDhB,+BAA+B,CAAC,CAAC;EACnC,CAAC,EAAE,CAACD,KAAK,CAACO,MAAM,EAAEP,KAAK,CAACI,iBAAiB,EAAEJ,KAAK,CAACK,gBAAgB,CAAC,CAAC;;EAEnE;EACA;EACA,oBACER,IAAA,CAACP,IAAI;IAAC8B,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BhC,QAAQ,CAACW,EAAE,KAAK,KAAK,gBAAGL,IAAA,CAACC,cAAc,IAAE,CAAC,GAAG;EAAI,CAC9C,CAAC;AAEX;AAEA,MAAMuB,MAAM,GAAG7B,UAAU,CAACgC,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["RootDoorstepAI","DoorstepAI"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,UAAU,QAAQ,iBAAc;AAGzC,SAASA,UAAU,EAAED,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["RootDoorstepAI","DoorstepAI"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,UAAU,QAAQ,iBAAc;AAQzC,SAASA,UAAU,EAAED,cAAc","ignoreList":[]}
@@ -10,19 +10,74 @@ type LatLngObject = {
10
10
  lat: number;
11
11
  lng: number;
12
12
  };
13
+ /**
14
+ * Per-delivery options shared across both platforms. Fields not supported on a
15
+ * given platform are silently ignored.
16
+ */
17
+ type StartDeliveryOptions = {
18
+ /**
19
+ * Hard upper bound on the delivery's tracking session in seconds. When the
20
+ * timer fires the SDK calls `stopDelivery` automatically. Defaults to 7200
21
+ * (2 hours) when not provided.
22
+ */
23
+ timeoutSeconds?: number;
24
+ /**
25
+ * Optional countdown (in seconds) to auto-stop the delivery once
26
+ * `markDropoff` is invoked. Survives backgrounding/process death on both
27
+ * platforms (UserDefaults on iOS, AlarmManager on Android).
28
+ */
29
+ autoStopAfterDropoffSeconds?: number;
30
+ /**
31
+ * Android only. When `true`, the SDK will NOT promote its internal
32
+ * tracking service to the foreground — it expects the host app to already
33
+ * be running its own foreground service that keeps the process alive.
34
+ * Ignored on iOS.
35
+ */
36
+ manualForeground?: boolean;
37
+ };
38
+ /**
39
+ * Mirrors the iOS SDK's `SDKLogLevel` enum. Only used by
40
+ * `configureRemoteLogging` (iOS only).
41
+ */
42
+ type SDKLogLevel = 'debug' | 'info' | 'warning' | 'error' | 'critical';
13
43
  declare class DoorstepAIModule {
14
44
  static isInitialized: boolean;
15
45
  static init(notificationTitle?: string, notificationText?: string): Promise<void>;
16
46
  static setApiKey(apiKey: string): void;
17
- static startDeliveryByPlaceID(placeID: string, deliveryId: string, timeoutSeconds?: number): Promise<any>;
18
- static startDeliveryByPlusCode(plusCode: string, deliveryId: string, timeoutSeconds?: number): Promise<any>;
19
- static startDeliveryByAddress(address: AddressType, deliveryId: string, timeoutSeconds?: number, coordinates?: LatLngObject): Promise<any>;
20
- static startDeliveryByAddressString(address: string, deliveryId: string, timeoutSeconds?: number, coordinates?: LatLngObject): Promise<any>;
21
- static startDeliveryByLatLng(latitude: number, longitude: number, subUnit: string, deliveryId: string, timeoutSeconds?: number): Promise<any>;
47
+ /**
48
+ * Triggers iOS Motion/Fitness + Location permission prompts up-front so the
49
+ * host app does not need to manage them itself. No-op on Android — use
50
+ * `PermissionsAndroid` (already wired into `RootDoorstepAI`).
51
+ */
52
+ static requestAllPermissions(requestAlwaysLocation?: boolean): void;
53
+ /**
54
+ * Configures the iOS SDK's remote logging pipeline. No-op on Android (the
55
+ * Android SDK currently configures remote logging via remote config / dev
56
+ * mode rather than a public host-app entry point).
57
+ */
58
+ static configureRemoteLogging(options: {
59
+ enabled: boolean;
60
+ minLevel?: SDKLogLevel;
61
+ flushIntervalSeconds?: number;
62
+ batchSize?: number;
63
+ maxQueueSize?: number;
64
+ }): void;
65
+ static startDeliveryByPlaceID(placeID: string, deliveryId: string, timeoutSeconds?: number, options?: StartDeliveryOptions): Promise<any>;
66
+ /** @deprecated Use `startDeliveryByAddressString` with coordinates instead. */
67
+ static startDeliveryByPlusCode(plusCode: string, deliveryId: string, timeoutSeconds?: number, options?: StartDeliveryOptions): Promise<any>;
68
+ static startDeliveryByAddress(address: AddressType, deliveryId: string, timeoutSeconds?: number, coordinates?: LatLngObject, options?: StartDeliveryOptions): Promise<any>;
69
+ static startDeliveryByAddressString(address: string, deliveryId: string, timeoutSeconds?: number, coordinates?: LatLngObject, options?: StartDeliveryOptions): Promise<any>;
70
+ /** @deprecated Use `startDeliveryByAddress` or `startDeliveryByAddressString` with coordinates instead. */
71
+ static startDeliveryByLatLng(latitude: number, longitude: number, subUnit: string, deliveryId: string, timeoutSeconds?: number, options?: StartDeliveryOptions): Promise<any>;
22
72
  static markDropoff(deliveryId: string, dropoffType: 'pod' | 'non_pod'): Promise<void>;
23
73
  static stopDelivery(deliveryId: string): Promise<void>;
24
74
  static newEvent(eventName: string, deliveryId: string): Promise<any>;
75
+ static enableDevMode(apiKey: string): Promise<boolean>;
76
+ /** Android only. Returns false on iOS. */
77
+ static validateDevModeAccess(): Promise<boolean>;
78
+ /** Android only. No-op on iOS. */
79
+ static disableDevMode(): Promise<boolean>;
25
80
  }
26
81
  export { DoorstepAIModule as DoorstepAI };
27
- export type { AddressType, LatLngObject };
82
+ export type { AddressType, LatLngObject, StartDeliveryOptions, SDKLogLevel };
28
83
  //# source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Aa,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"RootDoorstepAI.d.ts","sourceRoot":"","sources":["../../../src/RootDoorstepAI.tsx"],"names":[],"mappings":"AAeA,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,2CAoDA"}
1
+ {"version":3,"file":"RootDoorstepAI.d.ts","sourceRoot":"","sources":["../../../src/RootDoorstepAI.tsx"],"names":[],"mappings":"AAcA,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,2CAoDA"}
@@ -1,5 +1,5 @@
1
1
  import { RootDoorstepAI } from './RootDoorstepAI';
2
2
  import { DoorstepAI } from './DoorstepAI';
3
- export type { AddressType, LatLngObject } from './DoorstepAI';
3
+ export type { AddressType, LatLngObject, StartDeliveryOptions, SDKLogLevel, } from './DoorstepAI';
4
4
  export { DoorstepAI, RootDoorstepAI };
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doorstepai/dropoff-sdk",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "doorstep.ai dropoff sdk for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",