@doorstepai/dropoff-sdk 2.2.0 → 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/README.md +267 -112
- package/android/build.gradle +5 -1
- package/android/src/main/java/com/doorstepai/dropoffsdk/DoorstepAIModule.kt +368 -136
- package/ios/DoorstepAI.mm +8 -1
- package/ios/DoorstepAI.swift +120 -139
- 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 +10066 -6190
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +82 -0
- 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 +82 -0
- 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 -3248
- 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 +10066 -6190
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +82 -0
- 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 +82 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +10066 -6190
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +82 -0
- 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 +82 -0
- 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 -3248
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +3802 -3233
- package/lib/module/DoorstepAI.js +306 -71
- package/lib/module/DoorstepAI.js.map +1 -1
- package/lib/module/RootDoorstepAI.js +50 -32
- package/lib/module/RootDoorstepAI.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/DoorstepAI.d.ts +271 -73
- package/lib/typescript/src/DoorstepAI.d.ts.map +1 -1
- package/lib/typescript/src/RootDoorstepAI.d.ts +24 -7
- 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 +1 -1
- package/src/DoorstepAI.tsx +425 -91
- package/src/RootDoorstepAI.tsx +75 -45
- package/src/index.tsx +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["requireNativeComponent","View","Platform","StyleSheet","AppState","useEffect","DoorstepAI","jsx","_jsx","DoorstepAIView","RootDoorstepAI","props","apiKey","notificationTitle","notificationText","requestBluetooth","requestBackgroundLocation","cancelled","backgroundPhaseSettled","
|
|
1
|
+
{"version":3,"names":["requireNativeComponent","View","Platform","StyleSheet","AppState","useEffect","DoorstepAI","jsx","_jsx","DoorstepAIView","RootDoorstepAI","props","apiKey","notificationTitle","notificationText","permissions","requestBluetooth","requestBackgroundLocation","cancelled","backgroundPhaseSettled","whitelist","allPermissionBuckets","filter","bucket","undefined","backgroundInScope","some","p","runBackgroundLocationPhase","statuses","checkPermissions","always","locationAlways","state","locationWhenInUse","requestPermissions","err","console","warn","appStateSubscription","addEventListener","initializeAndRequestPermissions","OS","init","setApiKey","remove","style","styles","container","children","create","height","width"],"sourceRoot":"../../src","sources":["RootDoorstepAI.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,IAAI,EACJC,QAAQ,EACRC,UAAU,EACVC,QAAQ,QACH,cAAc;AAErB,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG1C,MAAMC,cAAc,GAAGT,sBAAsB,CAAC,oBAAoB,CAAC;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,cAAcA,CAACC,KA4B9B,EAAE;EACD,MAAM;IACJC,MAAM;IACNC,iBAAiB;IACjBC,gBAAgB;IAChBC,WAAW;IACXC,gBAAgB;IAChBC;EACF,CAAC,GAAGN,KAAK;EAETN,SAAS,CAAC,MAAM;IACd,IAAIa,SAAS,GAAG,KAAK;IACrB,IAAIC,sBAAsB,GAAG,KAAK;;IAElC;IACA;IACA;IACA,MAAMC,SAAgD,GACpDL,WAAW,KACVC,gBAAgB,KAAK,KAAK,GACvBV,UAAU,CAACe,oBAAoB,CAAC,CAAC,CAACC,MAAM,CACrCC,MAAM,IAAKA,MAAM,KAAK,WAAW,IAAIA,MAAM,KAAK,eACnD,CAAC,GACDC,SAAS,CAAC;;IAEhB;IACA;IACA;IACA,MAAMC,iBAAiB,GACrBR,yBAAyB,KAAK,KAAK,KAClCG,SAAS,IAAI,IAAI,IAChBA,SAAS,CAACM,IAAI,CAAEC,CAAC,IAAKA,CAAC,KAAK,gBAAgB,IAAIA,CAAC,KAAK,UAAU,CAAC,CAAC;;IAEtE;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,MAAMC,0BAA0B,GAAG,MAAAA,CAAA,KAAY;MAC7C,IAAIV,SAAS,IAAIC,sBAAsB,IAAI,CAACM,iBAAiB,EAAE;MAC/D,IAAI;QACF,MAAM;UAAEI;QAAS,CAAC,GAAG,MAAMvB,UAAU,CAACwB,gBAAgB,CAAC,CACrD,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C,yCAAyC,EAAEF,GAAG,CAAC;MAC9D;IACF,CAAC;IAEDK,+BAA+B,CAAC,CAAC;IAEjC,OAAO,MAAM;MACXvB,SAAS,GAAG,IAAI;MAChBqB,oBAAoB,CAACM,MAAM,CAAC,CAAC;IAC/B,CAAC;EACH,CAAC,EAAE,CACDjC,MAAM,EACNC,iBAAiB,EACjBC,gBAAgB,EAChBC,WAAW,EACXC,gBAAgB,EAChBC,yBAAyB,CAC1B,CAAC;;EAEF;EACA;EACA,oBACET,IAAA,CAACP,IAAI;IAAC6C,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3B/C,QAAQ,CAACwC,EAAE,KAAK,KAAK,gBAAGlC,IAAA,CAACC,cAAc,IAAE,CAAC,GAAG;EAAI,CAC9C,CAAC;AAEX;AAEA,MAAMsC,MAAM,GAAG5C,UAAU,CAAC+C,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RootDoorstepAI","DoorstepAI"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,UAAU,QAAQ,iBAAc;
|
|
1
|
+
{"version":3,"names":["RootDoorstepAI","DoorstepAI"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,UAAU,QAAQ,iBAAc;AAsBzC,SAASA,UAAU,EAAED,cAAc","ignoreList":[]}
|
|
@@ -86,44 +86,173 @@ type StartDeliveryOptions = {
|
|
|
86
86
|
driverId?: string;
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
* spelled
|
|
89
|
+
* A runtime-permission **bucket** — one bucket is one user-visible OS decision,
|
|
90
|
+
* spelled exactly as the native SDK spells it.
|
|
91
|
+
*
|
|
92
|
+
* The buckets are deliberately OS-specific, because the platforms are: iOS has a
|
|
93
|
+
* single Motion & Fitness authorization and no WiFi-scan permission at all,
|
|
94
|
+
* Android splits BLE scanning, nearby-WiFi and notifications into their own
|
|
95
|
+
* dialogs. Only the two location buckets exist on both.
|
|
96
|
+
*
|
|
97
|
+
* | bucket | iOS | Android |
|
|
98
|
+
* |---|---|---|
|
|
99
|
+
* | `locationWhenInUse` | `requestWhenInUseAuthorization` | `ACCESS_FINE_LOCATION` + `ACCESS_COARSE_LOCATION` |
|
|
100
|
+
* | `locationAlways` | `requestAlwaysAuthorization` | `ACCESS_BACKGROUND_LOCATION` |
|
|
101
|
+
* | `motionFitness` | Motion & Fitness | — (use `activityRecognition`) |
|
|
102
|
+
* | `activityRecognition` | — (use `motionFitness`) | `ACTIVITY_RECOGNITION` |
|
|
103
|
+
* | `bluetooth` | `CBCentralManager` | — (use `bluetoothScan`) |
|
|
104
|
+
* | `bluetoothScan` | — (use `bluetooth`) | `BLUETOOTH_SCAN` (API 31+) |
|
|
105
|
+
* | `nearbyWifiDevices` | — | `NEARBY_WIFI_DEVICES` (API 33+) |
|
|
106
|
+
* | `notifications` | — | `POST_NOTIFICATIONS` (API 33+) |
|
|
107
|
+
*
|
|
108
|
+
* You may pass **either platform's** name on either platform: the wrapper
|
|
109
|
+
* translates the counterpart bucket (`motionFitness` ⇄ `activityRecognition`,
|
|
110
|
+
* `bluetooth` ⇄ `bluetoothScan`) so one whitelist works on both without a
|
|
111
|
+
* `Platform.OS` branch. A bucket with no counterpart at all (`nearbyWifiDevices`
|
|
112
|
+
* / `notifications` on iOS) is reported back in `unsupported` rather than
|
|
113
|
+
* silently dropped.
|
|
91
114
|
*/
|
|
92
|
-
type
|
|
115
|
+
type DoorstepPermission = 'locationWhenInUse' | 'locationAlways' | 'motionFitness' | 'bluetooth' | 'activityRecognition' | 'bluetoothScan' | 'nearbyWifiDevices' | 'notifications';
|
|
93
116
|
/**
|
|
94
|
-
*
|
|
117
|
+
* Coarse aliases accepted anywhere a {@link DoorstepPermission} is, kept because
|
|
118
|
+
* they are what the published 2.x wrapper API took. Each expands to this
|
|
119
|
+
* platform's buckets: `location` → both location buckets, `motion` / `activity`
|
|
120
|
+
* → the platform's motion bucket, `bluetooth` → the platform's BLE bucket
|
|
121
|
+
* (`bluetooth` is also a real iOS bucket name, so it is both).
|
|
122
|
+
*/
|
|
123
|
+
type DoorstepPermissionAlias = 'location' | 'motion' | 'activity';
|
|
124
|
+
/** Anything the whitelist accepts. */
|
|
125
|
+
type DoorstepPermissionInput = DoorstepPermission | DoorstepPermissionAlias;
|
|
126
|
+
/**
|
|
127
|
+
* The state of one bucket. Eight states, **identical names on both platforms**,
|
|
128
|
+
* so host code branches once.
|
|
95
129
|
*
|
|
96
|
-
* - `
|
|
97
|
-
* - `
|
|
98
|
-
* - `
|
|
130
|
+
* - `granted` — held right now.
|
|
131
|
+
* - `notDetermined` — never asked; a request will show a dialog.
|
|
132
|
+
* - `whenInUseOnly` — **load-bearing.** Foreground location held, background not
|
|
133
|
+
* (iOS "While Using the App" / Android foreground-only). Only ever reported for
|
|
134
|
+
* `locationAlways`. Never treat it as `granted`: background collection and
|
|
135
|
+
* route geofencing do not work in it.
|
|
136
|
+
* - `denied` — refused, but another prompt is still possible. Android only; iOS
|
|
137
|
+
* refusals are always final.
|
|
138
|
+
* - `permanentlyDenied` — refused with no further prompt possible. Deep-link the
|
|
139
|
+
* user to Settings. Every iOS refusal lands here.
|
|
140
|
+
* - `restricted` — blocked by device policy / MDM / Screen Time.
|
|
141
|
+
* - `unavailable` — the OS version or the hardware does not have it. Not a
|
|
142
|
+
* failure, nothing to request.
|
|
143
|
+
* - `notDeclared` — **the HOST BUILD is missing the declaration**
|
|
144
|
+
* (`<uses-permission>` on Android, an `NS…UsageDescription` key on iOS), so the
|
|
145
|
+
* OS would never show a dialog. Fixable by you; it is NOT a user refusal.
|
|
146
|
+
*/
|
|
147
|
+
type DoorstepPermissionState = 'granted' | 'notDetermined' | 'whenInUseOnly' | 'denied' | 'permanentlyDenied' | 'restricted' | 'unavailable' | 'notDeclared';
|
|
148
|
+
/** The evaluated state of one bucket. */
|
|
149
|
+
type DoorstepPermissionStatus = {
|
|
150
|
+
permission: DoorstepPermission;
|
|
151
|
+
state: DoorstepPermissionState;
|
|
152
|
+
/**
|
|
153
|
+
* Raw evidence in the OS's own vocabulary (`"authorizedWhenInUse"`,
|
|
154
|
+
* `"ACCESS_FINE_LOCATION=granted,ACCESS_COARSE_LOCATION=denied"`, …).
|
|
155
|
+
* Diagnostic only — never branch on it.
|
|
156
|
+
*/
|
|
157
|
+
osStatus: string;
|
|
158
|
+
/** True when `requestPermissions` would actually raise a dialog for it. */
|
|
159
|
+
canRequest: boolean;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* The grant state of one permission in the **legacy** three-value vocabulary the
|
|
163
|
+
* published 2.x wrapper API used. `'prompt'` means "not determined yet".
|
|
164
|
+
*
|
|
165
|
+
* @deprecated Read {@link PermissionStatus.statuses} instead — it distinguishes
|
|
166
|
+
* `whenInUseOnly`, `permanentlyDenied` and `notDeclared`, all of which collapse
|
|
167
|
+
* away here.
|
|
168
|
+
*/
|
|
169
|
+
type PermissionState = 'granted' | 'denied' | 'prompt';
|
|
170
|
+
/**
|
|
171
|
+
* The three coarse domains of the legacy view.
|
|
99
172
|
*
|
|
100
|
-
*
|
|
101
|
-
* is passed, as a **deprecated alias for `'motion'`** — it was the published name
|
|
102
|
-
* in `@doorstepai/dropoff-sdk-capacitor` 1.0.4 and dropping it would break hosts.
|
|
103
|
-
* It is normalised to `'motion'` before it reaches native, and it is never a key
|
|
104
|
-
* of {@link PermissionStatus}.
|
|
173
|
+
* @deprecated Use {@link DoorstepPermission}.
|
|
105
174
|
*/
|
|
106
175
|
type DoorstepPermissionType = 'location' | 'motion' | 'bluetooth';
|
|
107
|
-
/**
|
|
176
|
+
/** What {@link DoorstepAIModule.checkPermissions} answers. */
|
|
108
177
|
interface PermissionStatus {
|
|
178
|
+
/**
|
|
179
|
+
* One entry per whitelisted bucket, keyed by bucket name. This is the real
|
|
180
|
+
* answer; everything else on this object is a convenience over it.
|
|
181
|
+
*/
|
|
182
|
+
statuses: Partial<Record<DoorstepPermission, DoorstepPermissionStatus>>;
|
|
183
|
+
/**
|
|
184
|
+
* The legacy three-key view, kept so hosts written against the published 2.x
|
|
185
|
+
* API keep working. Collapsed from `statuses` as: `whenInUseOnly` and
|
|
186
|
+
* `unavailable` → `'granted'`, `notDetermined` → `'prompt'`, everything else
|
|
187
|
+
* (including `notDeclared`) → `'denied'`.
|
|
188
|
+
*
|
|
189
|
+
* `motion` is unconditionally `'granted'` on Android, as it has always been, and
|
|
190
|
+
* that is the honest answer to what the key asks: Android's IMU streams need no
|
|
191
|
+
* runtime grant, so motion collection is always possible. `activityRecognition`
|
|
192
|
+
* adds only the step-counter streams — read `statuses.activityRecognition` if you
|
|
193
|
+
* need its real state. On iOS `motion` does track Motion & Fitness, which really
|
|
194
|
+
* does gate capability there.
|
|
195
|
+
*
|
|
196
|
+
* @deprecated Read `statuses`.
|
|
197
|
+
*/
|
|
109
198
|
permissions: Record<DoorstepPermissionType, PermissionState>;
|
|
199
|
+
/**
|
|
200
|
+
* Whitelist entries this platform has no bucket for, echoed back rather than
|
|
201
|
+
* dropped in silence (e.g. `notifications` on iOS).
|
|
202
|
+
*/
|
|
203
|
+
unsupported: string[];
|
|
204
|
+
}
|
|
205
|
+
/** What {@link DoorstepAIModule.requestPermissions} answers. */
|
|
206
|
+
interface PermissionRequestResult extends PermissionStatus {
|
|
207
|
+
/** Buckets a dialog was actually raised for. */
|
|
208
|
+
requested: DoorstepPermission[];
|
|
209
|
+
/**
|
|
210
|
+
* Whitelisted buckets that were already answered, so the default policy left
|
|
211
|
+
* them alone.
|
|
212
|
+
*/
|
|
213
|
+
alreadyDetermined: DoorstepPermission[];
|
|
214
|
+
/**
|
|
215
|
+
* Whitelisted buckets that cannot be requested on this device or in this build
|
|
216
|
+
* (`unavailable` or `notDeclared`).
|
|
217
|
+
*/
|
|
218
|
+
unavailable: DoorstepPermission[];
|
|
219
|
+
/**
|
|
220
|
+
* Whitelisted buckets deliberately skipped, with the reason. The one to expect:
|
|
221
|
+
* `locationAlways` is only ever asked **alone and after foreground location is
|
|
222
|
+
* granted**, so a whitelist containing anything else askable defers it — call
|
|
223
|
+
* again once the first batch is answered.
|
|
224
|
+
*/
|
|
225
|
+
deferred: Partial<Record<DoorstepPermission, string>>;
|
|
226
|
+
/** True when at least one dialog was raised. */
|
|
227
|
+
didRequest: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Android only, diagnostic: the manifest permission strings actually passed to
|
|
230
|
+
* `ActivityCompat.requestPermissions`.
|
|
231
|
+
*/
|
|
232
|
+
androidPermissions?: string[];
|
|
110
233
|
}
|
|
111
234
|
/** Options for {@link DoorstepAIModule.requestPermissions}. */
|
|
112
235
|
interface PermissionRequestOptions {
|
|
113
236
|
/**
|
|
114
|
-
*
|
|
237
|
+
* The whitelist: **exactly these buckets are requested, and nothing else**.
|
|
238
|
+
* Omit it (or pass `undefined`) to request every bucket the platform has.
|
|
115
239
|
*
|
|
116
|
-
*
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
|
|
240
|
+
* An empty array requests nothing — it is not the same as omitting the field.
|
|
241
|
+
*/
|
|
242
|
+
permissions?: DoorstepPermissionInput[];
|
|
243
|
+
/**
|
|
244
|
+
* Skip buckets the user has already answered. Default `true`, which is what
|
|
245
|
+
* makes a launch-time call safe and what stops a deliberate "While Using the
|
|
246
|
+
* App" choice from being re-escalated. **iOS only** — on Android a first denial
|
|
247
|
+
* is re-askable by design, so the native planner always re-asks it.
|
|
248
|
+
*/
|
|
249
|
+
onlyIfNotDetermined?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* How long to wait for each answer before giving up and reporting the state as
|
|
252
|
+
* it stands (default 120 s). A prompt the user never answers is reported
|
|
253
|
+
* `notDetermined`, not guessed at.
|
|
125
254
|
*/
|
|
126
|
-
|
|
255
|
+
timeoutSeconds?: number;
|
|
127
256
|
}
|
|
128
257
|
/**
|
|
129
258
|
* Mirrors the iOS SDK's `SDKLogLevel` enum. Only used by
|
|
@@ -134,6 +263,25 @@ declare class DoorstepAIModule {
|
|
|
134
263
|
static isInitialized: boolean;
|
|
135
264
|
static init(notificationTitle?: string, notificationText?: string): Promise<void>;
|
|
136
265
|
static setApiKey(apiKey: string): void;
|
|
266
|
+
/**
|
|
267
|
+
* Sets the API key for the Doorstep Go service, which is a separate credential
|
|
268
|
+
* from {@link setApiKey}. Present on both native SDKs; a no-op if you do not use
|
|
269
|
+
* Doorstep Go.
|
|
270
|
+
*/
|
|
271
|
+
static setDoorstepGoApiKey(apiKey: string): void;
|
|
272
|
+
/**
|
|
273
|
+
* The native SDK's internal-state dump as compact JSON, for bug reports and
|
|
274
|
+
* support logs. Free-form and unstable — never branch on it. **iOS only**
|
|
275
|
+
* (`DoorstepAI.debugStateJson()`); the Android SDK has no counterpart, so it
|
|
276
|
+
* rejects there.
|
|
277
|
+
*/
|
|
278
|
+
static debugStateJson(): Promise<string>;
|
|
279
|
+
/**
|
|
280
|
+
* Re-registers the raw-GNSS callbacks after the OS has dropped them (some
|
|
281
|
+
* devices stop delivering measurements without reporting an error). **Android
|
|
282
|
+
* only** — iOS has no raw-GNSS access at all, so it rejects there.
|
|
283
|
+
*/
|
|
284
|
+
static retryGnssCallbacks(): Promise<boolean>;
|
|
137
285
|
/**
|
|
138
286
|
* The dangerous runtime permissions the native SDK needs on THIS device,
|
|
139
287
|
* version-gated. **Android only.**
|
|
@@ -165,59 +313,108 @@ declare class DoorstepAIModule {
|
|
|
165
313
|
*/
|
|
166
314
|
static hasBackgroundLocationPermission(): Promise<boolean>;
|
|
167
315
|
/**
|
|
168
|
-
* The current
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
316
|
+
* The current state of the whitelisted permission buckets, on both platforms.
|
|
317
|
+
* **Pure observation — never prompts**, so it is safe at launch, on every
|
|
318
|
+
* screen, as often as you like.
|
|
319
|
+
*
|
|
320
|
+
* @param permissions whitelist; omit for every bucket this platform has.
|
|
321
|
+
*
|
|
322
|
+
* ```ts
|
|
323
|
+
* const { statuses } = await DoorstepAI.checkPermissions();
|
|
324
|
+
* if (statuses.locationAlways?.state === 'whenInUseOnly') {
|
|
325
|
+
* // foreground location only: background collection and route geofencing
|
|
326
|
+
* // will NOT work. Never read this as 'granted'.
|
|
327
|
+
* }
|
|
328
|
+
* ```
|
|
329
|
+
*
|
|
330
|
+
* The buckets and their states come straight from the native SDKs
|
|
331
|
+
* (`DoorstepAI.checkPermissions(...)` on both platforms) — the wrapper keeps no
|
|
332
|
+
* permission list and no state machine of its own.
|
|
333
|
+
*/
|
|
334
|
+
static checkPermissions(permissions?: DoorstepPermissionInput[]): Promise<PermissionStatus>;
|
|
335
|
+
/**
|
|
336
|
+
* Every permission bucket this platform has — the whitelist
|
|
337
|
+
* {@link requestPermissions} uses when you pass none.
|
|
173
338
|
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
339
|
+
* Useful for building a permission screen that lists what the SDK can ask for
|
|
340
|
+
* without hardcoding a per-platform list. Synchronous: it is the wrapper's name
|
|
341
|
+
* table, not a device read. Use {@link checkPermissions} for state.
|
|
342
|
+
*/
|
|
343
|
+
static allPermissionBuckets(): DoorstepPermission[];
|
|
344
|
+
/**
|
|
345
|
+
* {@link checkPermissions} rendered as the native SDK's own compact JSON — for
|
|
346
|
+
* bug reports, support logs and scripted on-device assertions.
|
|
177
347
|
*
|
|
178
|
-
*
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* The one permission requester. Asks for every runtime permission the SDK needs
|
|
185
|
-
* on whichever platform the app is running: Android's foreground runtime
|
|
186
|
-
* permissions (`DoorstepAI.requestPermissions(activity, requestCode,
|
|
187
|
-
* includeBluetooth)`, only the not-yet-granted ones) and iOS's Location +
|
|
188
|
-
* Motion/Fitness + Bluetooth prompts
|
|
189
|
-
* (`DoorstepAI.requestAllPermissions(requestAlwaysLocation:requestBluetooth:onlyIfNotDetermined:)`).
|
|
348
|
+
* Shape: `{"<bucket>":{"state":"…","canRequest":true|false,"os":"…"}}`.
|
|
349
|
+
*/
|
|
350
|
+
static checkPermissionsJson(permissions?: DoorstepPermissionInput[]): Promise<string>;
|
|
351
|
+
/**
|
|
352
|
+
* The one permission requester, and the only one hosts should need.
|
|
190
353
|
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
354
|
+
* **No argument requests every bucket the platform has. An argument is a
|
|
355
|
+
* whitelist: exactly those buckets are requested and nothing else.** That is
|
|
356
|
+
* the native contract on both platforms
|
|
357
|
+
* (`DoorstepAI.requestPermissions(_ permissions:…)` on iOS,
|
|
358
|
+
* `DoorstepAI.requestPermissions(activity, permissions)` on Android) and this
|
|
359
|
+
* method is a pass-through to it — the wrapper does not decide what gets asked.
|
|
193
360
|
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
361
|
+
* ```ts
|
|
362
|
+
* await DoorstepAI.requestPermissions(); // everything
|
|
363
|
+
* await DoorstepAI.requestPermissions(['locationWhenInUse']); // just that
|
|
364
|
+
* await DoorstepAI.requestPermissions({ permissions: ['location', 'motion'] });
|
|
365
|
+
* ```
|
|
366
|
+
*
|
|
367
|
+
* Accepts the array directly or the legacy `{ permissions: [...] }` object; the
|
|
368
|
+
* object form additionally carries `onlyIfNotDetermined` (iOS) and
|
|
369
|
+
* `timeoutSeconds`.
|
|
370
|
+
*
|
|
371
|
+
* **Resolves only AFTER the user has answered**, with the settled state — a
|
|
372
|
+
* status read while a dialog is still up would be a lie. Anything the native
|
|
373
|
+
* planner declines to ask comes back explained rather than silent:
|
|
374
|
+
* `alreadyDetermined`, `unavailable`, `deferred`.
|
|
375
|
+
*
|
|
376
|
+
* The deferral to expect: **`locationAlways` is only ever requested alone, and
|
|
377
|
+
* only once foreground location is granted** (Android auto-denies a bundled
|
|
378
|
+
* background ask; iOS shows the When-In-Use prompt first and offers the Always
|
|
379
|
+
* upgrade later on its own schedule). So a full-whitelist call typically returns
|
|
380
|
+
* `locationAlways` in `deferred` — call again, with just that bucket, after the
|
|
381
|
+
* first batch is answered.
|
|
382
|
+
*
|
|
383
|
+
* A second call made while one is still in flight does not interleave prompt
|
|
384
|
+
* sequences: iOS reports every bucket as `deferred`, Android rejects with
|
|
385
|
+
* `E_PERMISSION_REQUEST_IN_FLIGHT`.
|
|
386
|
+
*
|
|
387
|
+
* iOS guidance from the SDK: call this **once, from a user-initiated flow**, not
|
|
388
|
+
* from app launch.
|
|
389
|
+
*/
|
|
390
|
+
static requestPermissions(options?: DoorstepPermissionInput[] | PermissionRequestOptions): Promise<PermissionRequestResult>;
|
|
391
|
+
/**
|
|
392
|
+
* Forward your Activity's `onRequestPermissionsResult` to the SDK. **Android
|
|
393
|
+
* only; a no-op elsewhere.**
|
|
200
394
|
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
395
|
+
* Optional but worth wiring: it is the only way the SDK can tell a refusal it
|
|
396
|
+
* may re-ask (`denied`) from one only Settings can fix (`permanentlyDenied`).
|
|
397
|
+
* Android reports the same signals for "permanently denied" and "never asked",
|
|
398
|
+
* and a *cancelled* dialog leaves the same trace as a denial — so the SDK
|
|
399
|
+
* refuses to guess and reports the re-askable `denied` until a real,
|
|
400
|
+
* host-forwarded answer says otherwise.
|
|
207
401
|
*
|
|
208
|
-
*
|
|
402
|
+
* It also settles a `requestPermissions` promise the moment the real answer
|
|
403
|
+
* arrives, instead of waiting on the activity-lifecycle backstop.
|
|
209
404
|
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
405
|
+
* ```kotlin
|
|
406
|
+
* // MainActivity.kt
|
|
407
|
+
* override fun onRequestPermissionsResult(
|
|
408
|
+
* requestCode: Int, permissions: Array<out String>, grantResults: IntArray
|
|
409
|
+
* ) {
|
|
410
|
+
* super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
|
411
|
+
* DoorstepAI.notePermissionRequestResult(this, permissions, grantResults)
|
|
412
|
+
* }
|
|
413
|
+
* ```
|
|
213
414
|
*
|
|
214
|
-
*
|
|
215
|
-
* Android 11+ requires it as a second prompt issued after the foreground grant,
|
|
216
|
-
* so it keeps its own entry point (`requestBackgroundLocationPermission`). The
|
|
217
|
-
* iOS expression of the same intent is native's `requestAlwaysLocation`, left at
|
|
218
|
-
* its default (`true`) here.
|
|
415
|
+
* If you would rather not touch Kotlin, call this from JS with the same values.
|
|
219
416
|
*/
|
|
220
|
-
static
|
|
417
|
+
static notePermissionRequestResult(permissions: string[], grantResults: number[]): Promise<void>;
|
|
221
418
|
/**
|
|
222
419
|
* Requests `ACCESS_BACKGROUND_LOCATION` (Android 10+), required to keep
|
|
223
420
|
* collecting once the host app is backgrounded or the screen is off — without it
|
|
@@ -231,10 +428,11 @@ declare class DoorstepAIModule {
|
|
|
231
428
|
* the two calls for you — deciding when the user has been told why the app wants
|
|
232
429
|
* "Allow all the time" is the host's, not the wrapper's.
|
|
233
430
|
*
|
|
234
|
-
* On iOS the same intent is
|
|
235
|
-
* `
|
|
236
|
-
*
|
|
237
|
-
*
|
|
431
|
+
* On iOS the same intent is the `locationAlways` bucket of
|
|
432
|
+
* `requestPermissions`; there is no iOS counterpart to this method, so it
|
|
433
|
+
* rejects there rather than resolving a made-up answer. On Android you can also
|
|
434
|
+
* express it as `requestPermissions(['locationAlways'])` — same prompt, and it
|
|
435
|
+
* reports back why if the OS would have refused to show it.
|
|
238
436
|
*
|
|
239
437
|
* Resolves `true` when a request was actually issued (false below API 29 or when
|
|
240
438
|
* already granted).
|
|
@@ -302,5 +500,5 @@ declare class DoorstepAIModule {
|
|
|
302
500
|
static disableDevMode(): Promise<boolean>;
|
|
303
501
|
}
|
|
304
502
|
export { DoorstepAIModule as DoorstepAI };
|
|
305
|
-
export type { AddressType, LatLngObject, StartDeliveryOptions, PermissionState, DoorstepPermissionType, PermissionStatus, PermissionRequestOptions, SDKLogLevel, DeliveryStop, RouteGeofenceOptions, GeofenceSessionEvent, GeofenceSessionEventType, };
|
|
503
|
+
export type { AddressType, LatLngObject, StartDeliveryOptions, DoorstepPermission, DoorstepPermissionAlias, DoorstepPermissionInput, DoorstepPermissionState, DoorstepPermissionStatus, PermissionState, DoorstepPermissionType, PermissionStatus, PermissionRequestOptions, PermissionRequestResult, SDKLogLevel, DeliveryStop, RouteGeofenceOptions, GeofenceSessionEvent, GeofenceSessionEventType, };
|
|
306
504
|
//# sourceMappingURL=DoorstepAI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DoorstepAI.d.ts","sourceRoot":"","sources":["../../../src/DoorstepAI.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAUxD,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;;;;;GAKG;AACH,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gGAAgG;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AAC;IAUzD;;;;OAIG;IACH,MAAM,CAAC,0BAA0B,CAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAC9C,mBAAmB,GAAG,SAAS;WAMrB,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,EACV,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,GACzB,CAAC"}
|
|
@@ -1,18 +1,35 @@
|
|
|
1
|
+
import type { DoorstepPermissionInput } from './DoorstepAI';
|
|
2
|
+
/**
|
|
3
|
+
* Drop-in bootstrap: mount it once, near the root, and it runs the SDK's
|
|
4
|
+
* `init` + `setApiKey` and the permission sequence for you. Everything it does is
|
|
5
|
+
* available a la carte on {@link DoorstepAI} — this component exists so a host
|
|
6
|
+
* that just wants the default flow does not have to write it.
|
|
7
|
+
*/
|
|
1
8
|
export declare function RootDoorstepAI(props: {
|
|
2
9
|
apiKey: string;
|
|
3
10
|
notificationTitle?: string;
|
|
4
11
|
notificationText?: string;
|
|
5
12
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
13
|
+
* The whitelist handed to `requestPermissions`: **exactly these buckets are
|
|
14
|
+
* requested and nothing else.** Omit it to request every bucket the platform
|
|
15
|
+
* has, which is the SDK's own default.
|
|
16
|
+
*/
|
|
17
|
+
permissions?: DoorstepPermissionInput[];
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Pass a {@link permissions} whitelist instead — it can narrow any
|
|
20
|
+
* bucket, not just this one. Kept because it was the published prop: `false`
|
|
21
|
+
* drops the platform's Bluetooth bucket from the default whitelist. Ignored when
|
|
22
|
+
* `permissions` is given.
|
|
10
23
|
*/
|
|
11
24
|
requestBluetooth?: boolean;
|
|
12
25
|
/**
|
|
13
|
-
* Run the second-phase
|
|
14
|
-
*
|
|
15
|
-
*
|
|
26
|
+
* Run the second-phase background-location request (`locationAlways`) once
|
|
27
|
+
* foreground location has been granted. Default on.
|
|
28
|
+
*
|
|
29
|
+
* It has to be a second phase because Android forbids bundling background
|
|
30
|
+
* location with the foreground ask — a bundled request is auto-denied from
|
|
31
|
+
* Android 11 on. Turn it off if your app asks for "Allow all the time" from its
|
|
32
|
+
* own onboarding UI; without the grant the SDK cannot collect while
|
|
16
33
|
* backgrounded and route geofences fire foreground-only.
|
|
17
34
|
*/
|
|
18
35
|
requestBackgroundLocation?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootDoorstepAI.d.ts","sourceRoot":"","sources":["../../../src/RootDoorstepAI.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RootDoorstepAI.d.ts","sourceRoot":"","sources":["../../../src/RootDoorstepAI.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAI5D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACxC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,+BAyHA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootDoorstepAI } from './RootDoorstepAI';
|
|
2
2
|
import { DoorstepAI } from './DoorstepAI';
|
|
3
|
-
export type { AddressType, LatLngObject, StartDeliveryOptions, PermissionState, DoorstepPermissionType, PermissionStatus, PermissionRequestOptions, SDKLogLevel, DeliveryStop, RouteGeofenceOptions, GeofenceSessionEvent, GeofenceSessionEventType, } from './DoorstepAI';
|
|
3
|
+
export type { AddressType, LatLngObject, StartDeliveryOptions, DoorstepPermission, DoorstepPermissionAlias, DoorstepPermissionInput, DoorstepPermissionState, DoorstepPermissionStatus, PermissionState, DoorstepPermissionType, PermissionStatus, PermissionRequestOptions, PermissionRequestResult, SDKLogLevel, DeliveryStop, RouteGeofenceOptions, GeofenceSessionEvent, GeofenceSessionEventType, } 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,EACV,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAEtB,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,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|