@doorstepai/dropoff-sdk 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -3
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/doorstepai/dropoffsdk/DoorstepEmbedViewManager.kt +179 -0
- package/android/src/main/java/com/doorstepai/dropoffsdk/DropoffSdkPackage.kt +1 -2
- 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 +121 -30
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +4 -4
- 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 +3867 -3833
- 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 +121 -30
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +121 -30
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +8 -8
- 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 +3868 -3833
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +3836 -3802
- package/ios/DoorstepEmbedViewManager.mm +20 -0
- package/ios/DoorstepEmbedViewManager.swift +143 -0
- package/lib/module/DoorstepAI.js +3 -0
- package/lib/module/DoorstepAI.js.map +1 -1
- package/lib/module/DoorstepEmbedView.js +67 -0
- package/lib/module/DoorstepEmbedView.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/DoorstepAI.d.ts +3 -0
- package/lib/typescript/src/DoorstepAI.d.ts.map +1 -1
- package/lib/typescript/src/DoorstepEmbedView.d.ts +37 -0
- package/lib/typescript/src/DoorstepEmbedView.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/DoorstepAI.tsx +4 -0
- package/src/DoorstepEmbedView.tsx +130 -0
- package/src/index.tsx +6 -1
- package/CHANGELOG.md +0 -66
package/CHANGELOG.md
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Unreleased
|
|
4
|
-
|
|
5
|
-
### `checkPermissions` + `requestPermissions` are the permission surface again
|
|
6
|
-
|
|
7
|
-
The pair that shipped in `@doorstepai/dropoff-sdk-capacitor` 1.0.4 is restored as
|
|
8
|
-
the public permission API, with the published names and shapes, and is now
|
|
9
|
-
**identical across the React Native, Capacitor and Flutter wrappers**. It is
|
|
10
|
-
implemented over the native SDK — the wrapper owns no permission list, no alias
|
|
11
|
-
table for OS permissions, no request sequencing, and no `CLLocationManager` /
|
|
12
|
-
`CBCentralManager` of its own.
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
type PermissionState = 'granted' | 'denied' | 'prompt';
|
|
16
|
-
type DoorstepPermissionType = 'location' | 'motion' | 'bluetooth';
|
|
17
|
-
interface PermissionStatus { permissions: Record<DoorstepPermissionType, PermissionState> }
|
|
18
|
-
interface PermissionRequestOptions { permissions?: Array<DoorstepPermissionType | 'activity'> }
|
|
19
|
-
|
|
20
|
-
checkPermissions(): Promise<PermissionStatus>;
|
|
21
|
-
requestPermissions(options?: PermissionRequestOptions): Promise<PermissionStatus>;
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
- **Added `checkPermissions()`**, both platforms. Reads the platform's own
|
|
25
|
-
non-prompting status APIs — `CLLocationManager.authorizationStatus` (the instance
|
|
26
|
-
property), `CMMotionActivityManager.authorizationStatus()` and the static
|
|
27
|
-
`CBManager.authorization` on iOS; `ContextCompat.checkSelfPermission` on Android —
|
|
28
|
-
over the names `DoorstepAI.getRequiredPermissions()` returns. It never
|
|
29
|
-
instantiates a `CBCentralManager`, which would prompt and would crash a host
|
|
30
|
-
without `NSBluetoothAlwaysUsageDescription`.
|
|
31
|
-
- **`requestPermissions` now resolves a `PermissionStatus`, after the user answers.**
|
|
32
|
-
Previously it resolved as soon as the prompt was *issued*
|
|
33
|
-
(`{ requestedPermissions }` on Android, `{}` on iOS), which said nothing about the
|
|
34
|
-
outcome. A concurrent second call now **rejects** with
|
|
35
|
-
`E_PERMISSION_REQUEST_IN_FLIGHT` instead of interleaving prompt sequences. An
|
|
36
|
-
unanswered prompt resolves with the current state after 120 s rather than hanging.
|
|
37
|
-
- **Removed `RequestPermissionsOptions` and `PermissionRequestResult`.** The options
|
|
38
|
-
object is `PermissionRequestOptions` (`{ permissions? }`) and the result is
|
|
39
|
-
`PermissionStatus`. The `includeBluetooth`, `requestAlwaysLocation`,
|
|
40
|
-
`onlyIfNotDetermined` and `requestCode` options are gone; `requestAlwaysLocation`
|
|
41
|
-
and `onlyIfNotDetermined` are left at their native defaults (both `true`), which
|
|
42
|
-
is what keeps a launch-time call from re-escalating a "While Using the App"
|
|
43
|
-
choice.
|
|
44
|
-
- **`permissions` can only narrow Bluetooth**, and this is documented rather than
|
|
45
|
-
silently swallowed: both natives request their whole required set behind a single
|
|
46
|
-
`includeBluetooth` / `requestBluetooth` flag, so the array is read as
|
|
47
|
-
`includeBluetooth = permissions.includes('bluetooth')` (true when omitted) and
|
|
48
|
-
`location` + `motion` always ride the base set. Passing `['bluetooth']` alone
|
|
49
|
-
still requests the base set.
|
|
50
|
-
- **`'activity'` is still accepted** wherever a `DoorstepPermissionType` is passed,
|
|
51
|
-
as a deprecated alias for `'motion'`, because it was the published 1.0.4 type. It
|
|
52
|
-
is normalised in the JS layer, so neither bridge ever sees it, and it is never a
|
|
53
|
-
key of `PermissionStatus`.
|
|
54
|
-
- `<RootDoorstepAI />` now gates its second-phase background-location prompt on
|
|
55
|
-
`status.permissions.location === 'granted'` from the request itself, which is only
|
|
56
|
-
meaningful now that the promise resolves post-answer.
|
|
57
|
-
|
|
58
|
-
### Unchanged
|
|
59
|
-
|
|
60
|
-
- `requestBackgroundLocationPermission()` stays a separate Android-only entry
|
|
61
|
-
point, because Android 11+ requires background location as a second prompt after
|
|
62
|
-
the foreground grant and refuses to bundle it into one call. The wrapper does not
|
|
63
|
-
sequence the two for you. The iOS expression of the same intent is native's
|
|
64
|
-
`requestAlwaysLocation`, which `requestPermissions` leaves at its default (`true`).
|
|
65
|
-
- The query helpers `getRequiredPermissions` / `hasRequiredPermissions` /
|
|
66
|
-
`hasBackgroundLocationPermission` keep their shape and stay Android-only.
|