@doorstepai/dropoff-sdk 2.1.2 → 2.2.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/CHANGELOG.md +66 -0
- package/README.md +308 -41
- package/android/build.gradle +5 -1
- package/android/src/main/java/com/doorstepai/dropoffsdk/DoorstepAIModule.kt +566 -2
- package/ios/DoorstepAI.mm +12 -2
- package/ios/DoorstepAI.swift +151 -2
- package/ios/DoorstepDropoffSDK.xcframework/Info.plist +5 -5
- 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 +10582 -5745
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +95 -4
- 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 +95 -4
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +10 -10
- 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 +3833 -2687
- 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 +10582 -5745
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +95 -4
- 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 +95 -4
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +10582 -5745
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +95 -4
- 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 +95 -4
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +20 -20
- 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 +3833 -2687
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +3802 -2674
- package/lib/module/DoorstepAI.js +425 -12
- package/lib/module/DoorstepAI.js.map +1 -1
- package/lib/module/RootDoorstepAI.js +88 -26
- package/lib/module/RootDoorstepAI.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/DoorstepAI.d.ts +349 -7
- package/lib/typescript/src/DoorstepAI.d.ts.map +1 -1
- package/lib/typescript/src/RootDoorstepAI.d.ts +31 -3
- package/lib/typescript/src/RootDoorstepAI.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/DoorstepAI.tsx +575 -23
- package/src/RootDoorstepAI.tsx +130 -47
- package/src/index.tsx +10 -0
package/lib/module/DoorstepAI.js
CHANGED
|
@@ -26,11 +26,177 @@ const doorstepEventEmitter = DoorstepAI ? new NativeEventEmitter(DoorstepAI) : u
|
|
|
26
26
|
* given platform are silently ignored.
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* A runtime-permission **bucket** — one bucket is one user-visible OS decision,
|
|
31
|
+
* spelled exactly as the native SDK spells it.
|
|
32
|
+
*
|
|
33
|
+
* The buckets are deliberately OS-specific, because the platforms are: iOS has a
|
|
34
|
+
* single Motion & Fitness authorization and no WiFi-scan permission at all,
|
|
35
|
+
* Android splits BLE scanning, nearby-WiFi and notifications into their own
|
|
36
|
+
* dialogs. Only the two location buckets exist on both.
|
|
37
|
+
*
|
|
38
|
+
* | bucket | iOS | Android |
|
|
39
|
+
* |---|---|---|
|
|
40
|
+
* | `locationWhenInUse` | `requestWhenInUseAuthorization` | `ACCESS_FINE_LOCATION` + `ACCESS_COARSE_LOCATION` |
|
|
41
|
+
* | `locationAlways` | `requestAlwaysAuthorization` | `ACCESS_BACKGROUND_LOCATION` |
|
|
42
|
+
* | `motionFitness` | Motion & Fitness | — (use `activityRecognition`) |
|
|
43
|
+
* | `activityRecognition` | — (use `motionFitness`) | `ACTIVITY_RECOGNITION` |
|
|
44
|
+
* | `bluetooth` | `CBCentralManager` | — (use `bluetoothScan`) |
|
|
45
|
+
* | `bluetoothScan` | — (use `bluetooth`) | `BLUETOOTH_SCAN` (API 31+) |
|
|
46
|
+
* | `nearbyWifiDevices` | — | `NEARBY_WIFI_DEVICES` (API 33+) |
|
|
47
|
+
* | `notifications` | — | `POST_NOTIFICATIONS` (API 33+) |
|
|
48
|
+
*
|
|
49
|
+
* You may pass **either platform's** name on either platform: the wrapper
|
|
50
|
+
* translates the counterpart bucket (`motionFitness` ⇄ `activityRecognition`,
|
|
51
|
+
* `bluetooth` ⇄ `bluetoothScan`) so one whitelist works on both without a
|
|
52
|
+
* `Platform.OS` branch. A bucket with no counterpart at all (`nearbyWifiDevices`
|
|
53
|
+
* / `notifications` on iOS) is reported back in `unsupported` rather than
|
|
54
|
+
* silently dropped.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Coarse aliases accepted anywhere a {@link DoorstepPermission} is, kept because
|
|
59
|
+
* they are what the published 2.x wrapper API took. Each expands to this
|
|
60
|
+
* platform's buckets: `location` → both location buckets, `motion` / `activity`
|
|
61
|
+
* → the platform's motion bucket, `bluetooth` → the platform's BLE bucket
|
|
62
|
+
* (`bluetooth` is also a real iOS bucket name, so it is both).
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/** Anything the whitelist accepts. */
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The state of one bucket. Eight states, **identical names on both platforms**,
|
|
69
|
+
* so host code branches once.
|
|
70
|
+
*
|
|
71
|
+
* - `granted` — held right now.
|
|
72
|
+
* - `notDetermined` — never asked; a request will show a dialog.
|
|
73
|
+
* - `whenInUseOnly` — **load-bearing.** Foreground location held, background not
|
|
74
|
+
* (iOS "While Using the App" / Android foreground-only). Only ever reported for
|
|
75
|
+
* `locationAlways`. Never treat it as `granted`: background collection and
|
|
76
|
+
* route geofencing do not work in it.
|
|
77
|
+
* - `denied` — refused, but another prompt is still possible. Android only; iOS
|
|
78
|
+
* refusals are always final.
|
|
79
|
+
* - `permanentlyDenied` — refused with no further prompt possible. Deep-link the
|
|
80
|
+
* user to Settings. Every iOS refusal lands here.
|
|
81
|
+
* - `restricted` — blocked by device policy / MDM / Screen Time.
|
|
82
|
+
* - `unavailable` — the OS version or the hardware does not have it. Not a
|
|
83
|
+
* failure, nothing to request.
|
|
84
|
+
* - `notDeclared` — **the HOST BUILD is missing the declaration**
|
|
85
|
+
* (`<uses-permission>` on Android, an `NS…UsageDescription` key on iOS), so the
|
|
86
|
+
* OS would never show a dialog. Fixable by you; it is NOT a user refusal.
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
/** The evaluated state of one bucket. */
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The grant state of one permission in the **legacy** three-value vocabulary the
|
|
93
|
+
* published 2.x wrapper API used. `'prompt'` means "not determined yet".
|
|
94
|
+
*
|
|
95
|
+
* @deprecated Read {@link PermissionStatus.statuses} instead — it distinguishes
|
|
96
|
+
* `whenInUseOnly`, `permanentlyDenied` and `notDeclared`, all of which collapse
|
|
97
|
+
* away here.
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The three coarse domains of the legacy view.
|
|
102
|
+
*
|
|
103
|
+
* @deprecated Use {@link DoorstepPermission}.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/** What {@link DoorstepAIModule.checkPermissions} answers. */
|
|
107
|
+
|
|
108
|
+
/** What {@link DoorstepAIModule.requestPermissions} answers. */
|
|
109
|
+
|
|
110
|
+
/** Options for {@link DoorstepAIModule.requestPermissions}. */
|
|
111
|
+
|
|
112
|
+
// ---- Whitelist normalisation ----------------------------------------------
|
|
113
|
+
//
|
|
114
|
+
// A NAMING translation, not a permission list: it maps the names the two native
|
|
115
|
+
// SDKs use onto each other so one host whitelist compiles on both. It never adds
|
|
116
|
+
// or removes a bucket of its own accord, and it never decides what gets
|
|
117
|
+
// requested — the native planner owns that.
|
|
118
|
+
|
|
119
|
+
const IOS_ALIASES = {
|
|
120
|
+
location: ['locationWhenInUse', 'locationAlways'],
|
|
121
|
+
locationwheninuse: ['locationWhenInUse'],
|
|
122
|
+
locationalways: ['locationAlways'],
|
|
123
|
+
motion: ['motionFitness'],
|
|
124
|
+
activity: ['motionFitness'],
|
|
125
|
+
motionfitness: ['motionFitness'],
|
|
126
|
+
activityrecognition: ['motionFitness'],
|
|
127
|
+
bluetooth: ['bluetooth'],
|
|
128
|
+
bluetoothscan: ['bluetooth'],
|
|
129
|
+
nearbywifidevices: [],
|
|
130
|
+
notifications: []
|
|
131
|
+
};
|
|
132
|
+
const ANDROID_ALIASES = {
|
|
133
|
+
location: ['locationWhenInUse', 'locationAlways'],
|
|
134
|
+
locationwheninuse: ['locationWhenInUse'],
|
|
135
|
+
locationalways: ['locationAlways'],
|
|
136
|
+
motion: ['activityRecognition'],
|
|
137
|
+
activity: ['activityRecognition'],
|
|
138
|
+
motionfitness: ['activityRecognition'],
|
|
139
|
+
activityrecognition: ['activityRecognition'],
|
|
140
|
+
bluetooth: ['bluetoothScan'],
|
|
141
|
+
bluetoothscan: ['bluetoothScan'],
|
|
142
|
+
nearbywifidevices: ['nearbyWifiDevices'],
|
|
143
|
+
notifications: ['notifications']
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/** Every bucket this platform has, derived from the one alias table above. */
|
|
147
|
+
function platformBuckets() {
|
|
148
|
+
const table = Platform.OS === 'ios' ? IOS_ALIASES : ANDROID_ALIASES;
|
|
149
|
+
const out = [];
|
|
150
|
+
for (const mapped of Object.values(table)) {
|
|
151
|
+
for (const bucket of mapped) if (!out.includes(bucket)) out.push(bucket);
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
155
|
+
function normalizeWhitelist(permissions) {
|
|
156
|
+
if (permissions == null) return {
|
|
157
|
+
buckets: undefined,
|
|
158
|
+
unsupported: []
|
|
159
|
+
};
|
|
160
|
+
const table = Platform.OS === 'ios' ? IOS_ALIASES : ANDROID_ALIASES;
|
|
161
|
+
const buckets = [];
|
|
162
|
+
const unsupported = [];
|
|
163
|
+
for (const raw of permissions) {
|
|
164
|
+
const mapped = table[String(raw).trim().toLowerCase()];
|
|
165
|
+
if (mapped == null || mapped.length === 0) {
|
|
166
|
+
unsupported.push(String(raw));
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
for (const bucket of mapped) {
|
|
170
|
+
if (!buckets.includes(bucket)) buckets.push(bucket);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
buckets,
|
|
175
|
+
unsupported
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Merges the wrapper-side `unsupported` list into whatever native answered. */
|
|
180
|
+
function withUnsupported(payload, unsupported) {
|
|
181
|
+
return {
|
|
182
|
+
...payload,
|
|
183
|
+
unsupported: [...(payload.unsupported ?? []), ...unsupported]
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
29
187
|
/**
|
|
30
188
|
* Mirrors the iOS SDK's `SDKLogLevel` enum. Only used by
|
|
31
189
|
* `configureRemoteLogging` (iOS only).
|
|
32
190
|
*/
|
|
33
191
|
|
|
192
|
+
/**
|
|
193
|
+
* Rejects instead of resolving a fabricated value: the Android runtime-permission
|
|
194
|
+
* query helpers have no counterpart on iOS, and a helper that silently resolved
|
|
195
|
+
* `true`/`[]` would read as "granted" / "nothing needed" to a cross-platform host.
|
|
196
|
+
*/
|
|
197
|
+
function unsupportedOnThisPlatform(method, supportedOn) {
|
|
198
|
+
return Promise.reject(new Error(`DoorstepAI.${method} is ${supportedOn}-only; there is no native counterpart on ${Platform.OS}.`));
|
|
199
|
+
}
|
|
34
200
|
const SDK_LOG_LEVEL_RAW = {
|
|
35
201
|
debug: 0,
|
|
36
202
|
info: 1,
|
|
@@ -38,7 +204,6 @@ const SDK_LOG_LEVEL_RAW = {
|
|
|
38
204
|
error: 3,
|
|
39
205
|
critical: 4
|
|
40
206
|
};
|
|
41
|
-
const DEFAULT_TIMEOUT_SECONDS = 3600;
|
|
42
207
|
class DoorstepAIModule {
|
|
43
208
|
static isInitialized = false;
|
|
44
209
|
static async init(notificationTitle, notificationText) {
|
|
@@ -61,14 +226,262 @@ class DoorstepAIModule {
|
|
|
61
226
|
}
|
|
62
227
|
|
|
63
228
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
229
|
+
* Sets the API key for the Doorstep Go service, which is a separate credential
|
|
230
|
+
* from {@link setApiKey}. Present on both native SDKs; a no-op if you do not use
|
|
231
|
+
* Doorstep Go.
|
|
67
232
|
*/
|
|
68
|
-
static
|
|
69
|
-
|
|
70
|
-
|
|
233
|
+
static setDoorstepGoApiKey(apiKey) {
|
|
234
|
+
DoorstepAI.setDoorstepGoApiKey(apiKey);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The native SDK's internal-state dump as compact JSON, for bug reports and
|
|
239
|
+
* support logs. Free-form and unstable — never branch on it. **iOS only**
|
|
240
|
+
* (`DoorstepAI.debugStateJson()`); the Android SDK has no counterpart, so it
|
|
241
|
+
* rejects there.
|
|
242
|
+
*/
|
|
243
|
+
static debugStateJson() {
|
|
244
|
+
if (Platform.OS !== 'ios') {
|
|
245
|
+
return unsupportedOnThisPlatform('debugStateJson', 'iOS');
|
|
246
|
+
}
|
|
247
|
+
return DoorstepAI.debugStateJson();
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Re-registers the raw-GNSS callbacks after the OS has dropped them (some
|
|
252
|
+
* devices stop delivering measurements without reporting an error). **Android
|
|
253
|
+
* only** — iOS has no raw-GNSS access at all, so it rejects there.
|
|
254
|
+
*/
|
|
255
|
+
static retryGnssCallbacks() {
|
|
256
|
+
if (Platform.OS !== 'android') {
|
|
257
|
+
return unsupportedOnThisPlatform('retryGnssCallbacks', 'Android');
|
|
258
|
+
}
|
|
259
|
+
return DoorstepAI.retryGnssCallbacks();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// ---- Runtime permissions -------------------------------------------------
|
|
263
|
+
// Every method below is a pass-through to the native SDK's own permission API.
|
|
264
|
+
// The SDK owns the permission list and the prompt ordering; this wrapper used to
|
|
265
|
+
// keep a second implementation beside it and drifted — it requested
|
|
266
|
+
// ACCESS_FINE_LOCATION with no ACCESS_COARSE_LOCATION (Android 12+ ignores that
|
|
267
|
+
// request outright), never requested ACCESS_BACKGROUND_LOCATION or
|
|
268
|
+
// POST_NOTIFICATIONS at all, and requested ACTIVITY_RECOGNITION, which native
|
|
269
|
+
// deliberately does not require (`internal/SensorCollectionManager.kt:139`).
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The dangerous runtime permissions the native SDK needs on THIS device,
|
|
273
|
+
* version-gated. **Android only.**
|
|
274
|
+
*
|
|
275
|
+
* Foreground set only — it deliberately excludes `ACCESS_BACKGROUND_LOCATION`,
|
|
276
|
+
* which Android 11+ requires be requested separately and only after foreground
|
|
277
|
+
* location is granted (see `requestBackgroundLocationPermission`).
|
|
278
|
+
*
|
|
279
|
+
* Feed it to your own permission UI (e.g. `PermissionsAndroid.requestMultiple`)
|
|
280
|
+
* when you want the grant results in JS — it is the same list `requestPermissions`
|
|
281
|
+
* asks for, so the two cannot diverge.
|
|
282
|
+
*
|
|
283
|
+
* @param includeBluetooth include `BLUETOOTH_SCAN` (Android 12+) and
|
|
284
|
+
* `NEARBY_WIFI_DEVICES` (Android 13+). Native default: `true`.
|
|
285
|
+
*/
|
|
286
|
+
static getRequiredPermissions(includeBluetooth) {
|
|
287
|
+
if (Platform.OS !== 'android') {
|
|
288
|
+
return unsupportedOnThisPlatform('getRequiredPermissions', 'Android');
|
|
289
|
+
}
|
|
290
|
+
return DoorstepAI.getRequiredPermissions(includeBluetooth ?? null);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* True when every foreground permission the SDK needs is currently granted.
|
|
295
|
+
* **Android only.**
|
|
296
|
+
*
|
|
297
|
+
* @param includeBluetooth native default here is `false`, unlike the request
|
|
298
|
+
* methods — Bluetooth is optional, so a denied "Nearby devices" grant must not
|
|
299
|
+
* make the SDK look unusable.
|
|
300
|
+
*/
|
|
301
|
+
static hasRequiredPermissions(includeBluetooth) {
|
|
302
|
+
if (Platform.OS !== 'android') {
|
|
303
|
+
return unsupportedOnThisPlatform('hasRequiredPermissions', 'Android');
|
|
304
|
+
}
|
|
305
|
+
return DoorstepAI.hasRequiredPermissions(includeBluetooth ?? null);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* True when `ACCESS_BACKGROUND_LOCATION` is granted (always true below API 29,
|
|
310
|
+
* where it is not a separate grant). **Android only.**
|
|
311
|
+
*/
|
|
312
|
+
static hasBackgroundLocationPermission() {
|
|
313
|
+
if (Platform.OS !== 'android') {
|
|
314
|
+
return unsupportedOnThisPlatform('hasBackgroundLocationPermission', 'Android');
|
|
315
|
+
}
|
|
316
|
+
return DoorstepAI.hasBackgroundLocationPermission();
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* The current state of the whitelisted permission buckets, on both platforms.
|
|
321
|
+
* **Pure observation — never prompts**, so it is safe at launch, on every
|
|
322
|
+
* screen, as often as you like.
|
|
323
|
+
*
|
|
324
|
+
* @param permissions whitelist; omit for every bucket this platform has.
|
|
325
|
+
*
|
|
326
|
+
* ```ts
|
|
327
|
+
* const { statuses } = await DoorstepAI.checkPermissions();
|
|
328
|
+
* if (statuses.locationAlways?.state === 'whenInUseOnly') {
|
|
329
|
+
* // foreground location only: background collection and route geofencing
|
|
330
|
+
* // will NOT work. Never read this as 'granted'.
|
|
331
|
+
* }
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* The buckets and their states come straight from the native SDKs
|
|
335
|
+
* (`DoorstepAI.checkPermissions(...)` on both platforms) — the wrapper keeps no
|
|
336
|
+
* permission list and no state machine of its own.
|
|
337
|
+
*/
|
|
338
|
+
static async checkPermissions(permissions) {
|
|
339
|
+
const {
|
|
340
|
+
buckets,
|
|
341
|
+
unsupported
|
|
342
|
+
} = normalizeWhitelist(permissions);
|
|
343
|
+
const payload = await DoorstepAI.checkPermissions(buckets ?? null);
|
|
344
|
+
return withUnsupported(payload, unsupported);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Every permission bucket this platform has — the whitelist
|
|
349
|
+
* {@link requestPermissions} uses when you pass none.
|
|
350
|
+
*
|
|
351
|
+
* Useful for building a permission screen that lists what the SDK can ask for
|
|
352
|
+
* without hardcoding a per-platform list. Synchronous: it is the wrapper's name
|
|
353
|
+
* table, not a device read. Use {@link checkPermissions} for state.
|
|
354
|
+
*/
|
|
355
|
+
static allPermissionBuckets() {
|
|
356
|
+
return platformBuckets();
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* {@link checkPermissions} rendered as the native SDK's own compact JSON — for
|
|
361
|
+
* bug reports, support logs and scripted on-device assertions.
|
|
362
|
+
*
|
|
363
|
+
* Shape: `{"<bucket>":{"state":"…","canRequest":true|false,"os":"…"}}`.
|
|
364
|
+
*/
|
|
365
|
+
static checkPermissionsJson(permissions) {
|
|
366
|
+
const {
|
|
367
|
+
buckets
|
|
368
|
+
} = normalizeWhitelist(permissions);
|
|
369
|
+
return DoorstepAI.checkPermissionsJson(buckets ?? null);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* The one permission requester, and the only one hosts should need.
|
|
374
|
+
*
|
|
375
|
+
* **No argument requests every bucket the platform has. An argument is a
|
|
376
|
+
* whitelist: exactly those buckets are requested and nothing else.** That is
|
|
377
|
+
* the native contract on both platforms
|
|
378
|
+
* (`DoorstepAI.requestPermissions(_ permissions:…)` on iOS,
|
|
379
|
+
* `DoorstepAI.requestPermissions(activity, permissions)` on Android) and this
|
|
380
|
+
* method is a pass-through to it — the wrapper does not decide what gets asked.
|
|
381
|
+
*
|
|
382
|
+
* ```ts
|
|
383
|
+
* await DoorstepAI.requestPermissions(); // everything
|
|
384
|
+
* await DoorstepAI.requestPermissions(['locationWhenInUse']); // just that
|
|
385
|
+
* await DoorstepAI.requestPermissions({ permissions: ['location', 'motion'] });
|
|
386
|
+
* ```
|
|
387
|
+
*
|
|
388
|
+
* Accepts the array directly or the legacy `{ permissions: [...] }` object; the
|
|
389
|
+
* object form additionally carries `onlyIfNotDetermined` (iOS) and
|
|
390
|
+
* `timeoutSeconds`.
|
|
391
|
+
*
|
|
392
|
+
* **Resolves only AFTER the user has answered**, with the settled state — a
|
|
393
|
+
* status read while a dialog is still up would be a lie. Anything the native
|
|
394
|
+
* planner declines to ask comes back explained rather than silent:
|
|
395
|
+
* `alreadyDetermined`, `unavailable`, `deferred`.
|
|
396
|
+
*
|
|
397
|
+
* The deferral to expect: **`locationAlways` is only ever requested alone, and
|
|
398
|
+
* only once foreground location is granted** (Android auto-denies a bundled
|
|
399
|
+
* background ask; iOS shows the When-In-Use prompt first and offers the Always
|
|
400
|
+
* upgrade later on its own schedule). So a full-whitelist call typically returns
|
|
401
|
+
* `locationAlways` in `deferred` — call again, with just that bucket, after the
|
|
402
|
+
* first batch is answered.
|
|
403
|
+
*
|
|
404
|
+
* A second call made while one is still in flight does not interleave prompt
|
|
405
|
+
* sequences: iOS reports every bucket as `deferred`, Android rejects with
|
|
406
|
+
* `E_PERMISSION_REQUEST_IN_FLIGHT`.
|
|
407
|
+
*
|
|
408
|
+
* iOS guidance from the SDK: call this **once, from a user-initiated flow**, not
|
|
409
|
+
* from app launch.
|
|
410
|
+
*/
|
|
411
|
+
static async requestPermissions(options) {
|
|
412
|
+
const opts = Array.isArray(options) ? {
|
|
413
|
+
permissions: options
|
|
414
|
+
} : options ?? {};
|
|
415
|
+
const {
|
|
416
|
+
buckets,
|
|
417
|
+
unsupported
|
|
418
|
+
} = normalizeWhitelist(opts.permissions);
|
|
419
|
+
const payload = await DoorstepAI.requestPermissions({
|
|
420
|
+
permissions: buckets ?? null,
|
|
421
|
+
onlyIfNotDetermined: opts.onlyIfNotDetermined ?? null,
|
|
422
|
+
timeoutSeconds: opts.timeoutSeconds ?? null
|
|
423
|
+
});
|
|
424
|
+
return withUnsupported(payload, unsupported);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Forward your Activity's `onRequestPermissionsResult` to the SDK. **Android
|
|
429
|
+
* only; a no-op elsewhere.**
|
|
430
|
+
*
|
|
431
|
+
* Optional but worth wiring: it is the only way the SDK can tell a refusal it
|
|
432
|
+
* may re-ask (`denied`) from one only Settings can fix (`permanentlyDenied`).
|
|
433
|
+
* Android reports the same signals for "permanently denied" and "never asked",
|
|
434
|
+
* and a *cancelled* dialog leaves the same trace as a denial — so the SDK
|
|
435
|
+
* refuses to guess and reports the re-askable `denied` until a real,
|
|
436
|
+
* host-forwarded answer says otherwise.
|
|
437
|
+
*
|
|
438
|
+
* It also settles a `requestPermissions` promise the moment the real answer
|
|
439
|
+
* arrives, instead of waiting on the activity-lifecycle backstop.
|
|
440
|
+
*
|
|
441
|
+
* ```kotlin
|
|
442
|
+
* // MainActivity.kt
|
|
443
|
+
* override fun onRequestPermissionsResult(
|
|
444
|
+
* requestCode: Int, permissions: Array<out String>, grantResults: IntArray
|
|
445
|
+
* ) {
|
|
446
|
+
* super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
|
447
|
+
* DoorstepAI.notePermissionRequestResult(this, permissions, grantResults)
|
|
448
|
+
* }
|
|
449
|
+
* ```
|
|
450
|
+
*
|
|
451
|
+
* If you would rather not touch Kotlin, call this from JS with the same values.
|
|
452
|
+
*/
|
|
453
|
+
static async notePermissionRequestResult(permissions, grantResults) {
|
|
454
|
+
if (Platform.OS !== 'android') return;
|
|
455
|
+
await DoorstepAI.notePermissionRequestResult(permissions, grantResults);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Requests `ACCESS_BACKGROUND_LOCATION` (Android 10+), required to keep
|
|
460
|
+
* collecting once the host app is backgrounded or the screen is off — without it
|
|
461
|
+
* the SDK refuses to start a session from the background and route geofences
|
|
462
|
+
* only fire in the foreground. **Android only.**
|
|
463
|
+
*
|
|
464
|
+
* This is a separate entry point because Android makes it one: from Android 11+
|
|
465
|
+
* the OS refuses to bundle background location into the foreground request, so it
|
|
466
|
+
* has to be a SECOND prompt issued after foreground location is granted, and
|
|
467
|
+
* asking earlier burns it on an automatic denial. The wrapper does not sequence
|
|
468
|
+
* the two calls for you — deciding when the user has been told why the app wants
|
|
469
|
+
* "Allow all the time" is the host's, not the wrapper's.
|
|
470
|
+
*
|
|
471
|
+
* On iOS the same intent is the `locationAlways` bucket of
|
|
472
|
+
* `requestPermissions`; there is no iOS counterpart to this method, so it
|
|
473
|
+
* rejects there rather than resolving a made-up answer. On Android you can also
|
|
474
|
+
* express it as `requestPermissions(['locationAlways'])` — same prompt, and it
|
|
475
|
+
* reports back why if the OS would have refused to show it.
|
|
476
|
+
*
|
|
477
|
+
* Resolves `true` when a request was actually issued (false below API 29 or when
|
|
478
|
+
* already granted).
|
|
479
|
+
*/
|
|
480
|
+
static requestBackgroundLocationPermission() {
|
|
481
|
+
if (Platform.OS !== 'android') {
|
|
482
|
+
return unsupportedOnThisPlatform('requestBackgroundLocationPermission', 'Android');
|
|
71
483
|
}
|
|
484
|
+
return DoorstepAI.requestBackgroundLocationPermission();
|
|
72
485
|
}
|
|
73
486
|
|
|
74
487
|
/**
|
|
@@ -83,7 +496,7 @@ class DoorstepAIModule {
|
|
|
83
496
|
}
|
|
84
497
|
static async startDeliveryByPlaceID(placeID, deliveryId, timeoutSeconds, options) {
|
|
85
498
|
try {
|
|
86
|
-
const timeout = timeoutSeconds ?? options?.timeoutSeconds
|
|
499
|
+
const timeout = timeoutSeconds ?? options?.timeoutSeconds;
|
|
87
500
|
const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
|
|
88
501
|
const customerId = options?.customerId ?? null;
|
|
89
502
|
const driverId = options?.driverId ?? null;
|
|
@@ -99,7 +512,7 @@ class DoorstepAIModule {
|
|
|
99
512
|
/** @deprecated Use `startDeliveryByAddressString` with coordinates instead. */
|
|
100
513
|
static async startDeliveryByPlusCode(plusCode, deliveryId, timeoutSeconds, options) {
|
|
101
514
|
try {
|
|
102
|
-
const timeout = timeoutSeconds ?? options?.timeoutSeconds
|
|
515
|
+
const timeout = timeoutSeconds ?? options?.timeoutSeconds;
|
|
103
516
|
const customerId = options?.customerId ?? null;
|
|
104
517
|
const driverId = options?.driverId ?? null;
|
|
105
518
|
// Android's deprecated startDeliveryByPlusCode does not accept
|
|
@@ -115,7 +528,7 @@ class DoorstepAIModule {
|
|
|
115
528
|
}
|
|
116
529
|
static async startDeliveryByAddress(address, deliveryId, timeoutSeconds, coordinates, options) {
|
|
117
530
|
try {
|
|
118
|
-
const timeout = timeoutSeconds ?? options?.timeoutSeconds
|
|
531
|
+
const timeout = timeoutSeconds ?? options?.timeoutSeconds;
|
|
119
532
|
const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
|
|
120
533
|
const customerId = options?.customerId ?? null;
|
|
121
534
|
const driverId = options?.driverId ?? null;
|
|
@@ -129,7 +542,7 @@ class DoorstepAIModule {
|
|
|
129
542
|
}
|
|
130
543
|
static async startDeliveryByAddressString(address, deliveryId, timeoutSeconds, coordinates, options) {
|
|
131
544
|
try {
|
|
132
|
-
const timeout = timeoutSeconds ?? options?.timeoutSeconds
|
|
545
|
+
const timeout = timeoutSeconds ?? options?.timeoutSeconds;
|
|
133
546
|
const autoStop = options?.autoStopAfterDropoffSeconds ?? null;
|
|
134
547
|
const customerId = options?.customerId ?? null;
|
|
135
548
|
const driverId = options?.driverId ?? null;
|
|
@@ -145,7 +558,7 @@ class DoorstepAIModule {
|
|
|
145
558
|
/** @deprecated Use `startDeliveryByAddress` or `startDeliveryByAddressString` with coordinates instead. */
|
|
146
559
|
static async startDeliveryByLatLng(latitude, longitude, subUnit, deliveryId, timeoutSeconds, options) {
|
|
147
560
|
try {
|
|
148
|
-
const timeout = timeoutSeconds ?? options?.timeoutSeconds
|
|
561
|
+
const timeout = timeoutSeconds ?? options?.timeoutSeconds;
|
|
149
562
|
const customerId = options?.customerId ?? null;
|
|
150
563
|
const driverId = options?.driverId ?? null;
|
|
151
564
|
// Android's deprecated startDeliveryByLatLng does not accept
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","NativeEventEmitter","Platform","DoorstepAI","GEOFENCE_SESSION_EVENT","doorstepEventEmitter","undefined","SDK_LOG_LEVEL_RAW","debug","info","warning","error","critical","DEFAULT_TIMEOUT_SECONDS","DoorstepAIModule","isInitialized","init","notificationTitle","notificationText","OS","console","log","setApiKey","apiKey","requestAllPermissions","requestAlwaysLocation","requestBluetooth","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","timestamp","startRouteGeofencing","stops","length","updateRouteStops","stopRouteGeofencing","resumeRouteGeofencingIfNeeded","getMonitoredStops","addGeofenceSessionListener","listener","addListener","enableDevMode","Boolean","validateDevModeAccess","disableDevMode"],"sourceRoot":"../../src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GEOFENCE_SESSION_EVENT","doorstepEventEmitter","undefined","IOS_ALIASES","location","locationwheninuse","locationalways","motion","activity","motionfitness","activityrecognition","bluetooth","bluetoothscan","nearbywifidevices","notifications","ANDROID_ALIASES","platformBuckets","table","OS","out","mapped","Object","values","bucket","includes","push","normalizeWhitelist","permissions","buckets","unsupported","raw","String","trim","toLowerCase","length","withUnsupported","payload","unsupportedOnThisPlatform","method","supportedOn","Promise","reject","Error","SDK_LOG_LEVEL_RAW","debug","info","warning","error","critical","DoorstepAIModule","isInitialized","init","notificationTitle","notificationText","console","log","setApiKey","apiKey","setDoorstepGoApiKey","debugStateJson","retryGnssCallbacks","getRequiredPermissions","includeBluetooth","hasRequiredPermissions","hasBackgroundLocationPermission","checkPermissions","allPermissionBuckets","checkPermissionsJson","requestPermissions","options","opts","Array","isArray","onlyIfNotDetermined","timeoutSeconds","notePermissionRequestResult","grantResults","requestBackgroundLocationPermission","configureRemoteLogging","minLevelRaw","minLevel","enabled","flushIntervalSeconds","batchSize","maxQueueSize","startDeliveryByPlaceID","placeID","deliveryId","timeout","autoStop","autoStopAfterDropoffSeconds","customerId","driverId","result","manualForeground","startDeliveryByPlusCode","plusCode","startDeliveryByAddress","address","coordinates","startDeliveryByAddressString","startDeliveryByLatLng","latitude","longitude","subUnit","markDropoff","dropoffType","stopDelivery","newEvent","eventName","timestamp","startRouteGeofencing","stops","updateRouteStops","stopRouteGeofencing","resumeRouteGeofencingIfNeeded","getMonitoredStops","addGeofenceSessionListener","listener","addListener","enableDevMode","Boolean","validateDevModeAccess","disableDevMode"],"sourceRoot":"../../src","sources":["DoorstepAI.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAE1E,MAAM;EAAEC;AAAW,CAAC,GAAGH,aAAa;;AAEpC;AACA;AACA,MAAMI,sBAAsB,GAAG,8BAA8B;AAC7D,MAAMC,oBAAoB,GAAGF,UAAU,GACnC,IAAIF,kBAAkB,CAACE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