@wayq/beekon-rn 0.0.3 → 0.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.
- package/BeekonRn.podspec +1 -1
- package/README.md +91 -39
- package/android/build.gradle +9 -4
- package/android/src/main/java/in/wayq/beekonrn/BeekonRnModule.kt +306 -60
- package/ios/BeekonRn.mm +90 -24
- package/ios/BeekonRn.swift +360 -60
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/BeekonKit +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Info.plist +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.abi.json +7521 -1312
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftinterface +191 -40
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/BeekonKit +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Info.plist +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.abi.json +7521 -1312
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +191 -40
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +7521 -1312
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +191 -40
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/_CodeSignature/CodeResources +2 -80
- package/lib/module/NativeBeekonRn.js +22 -7
- package/lib/module/NativeBeekonRn.js.map +1 -1
- package/lib/module/beekon.js +198 -46
- package/lib/module/beekon.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/mappers.js +122 -28
- package/lib/module/internal/mappers.js.map +1 -1
- package/lib/module/types/config.js +2 -0
- package/lib/module/types/enums.js +2 -0
- package/lib/module/types/enums.js.map +1 -0
- package/lib/module/types/error.js +10 -4
- package/lib/module/types/error.js.map +1 -1
- package/lib/module/types/geofence.js +2 -0
- package/lib/module/types/geofence.js.map +1 -0
- package/lib/module/types/location.js +2 -0
- package/lib/module/types/sync.js +2 -0
- package/lib/module/types/sync.js.map +1 -0
- package/lib/typescript/src/NativeBeekonRn.d.ts +102 -20
- package/lib/typescript/src/NativeBeekonRn.d.ts.map +1 -1
- package/lib/typescript/src/beekon.d.ts +81 -33
- package/lib/typescript/src/beekon.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/mappers.d.ts +12 -6
- package/lib/typescript/src/internal/mappers.d.ts.map +1 -1
- package/lib/typescript/src/types/config.d.ts +50 -20
- package/lib/typescript/src/types/config.d.ts.map +1 -1
- package/lib/typescript/src/types/enums.d.ts +48 -0
- package/lib/typescript/src/types/enums.d.ts.map +1 -0
- package/lib/typescript/src/types/error.d.ts +11 -5
- package/lib/typescript/src/types/error.d.ts.map +1 -1
- package/lib/typescript/src/types/geofence.d.ts +36 -0
- package/lib/typescript/src/types/geofence.d.ts.map +1 -0
- package/lib/typescript/src/types/location.d.ts +22 -8
- package/lib/typescript/src/types/location.d.ts.map +1 -1
- package/lib/typescript/src/types/state.d.ts +13 -4
- package/lib/typescript/src/types/state.d.ts.map +1 -1
- package/lib/typescript/src/types/sync.d.ts +27 -0
- package/lib/typescript/src/types/sync.d.ts.map +1 -0
- package/package.json +4 -5
- package/scripts/fetch-beekonkit.sh +5 -5
- package/src/NativeBeekonRn.ts +110 -20
- package/src/beekon.ts +219 -49
- package/src/index.tsx +21 -2
- package/src/internal/mappers.ts +187 -30
- package/src/types/config.ts +52 -20
- package/src/types/enums.ts +64 -0
- package/src/types/error.ts +11 -8
- package/src/types/geofence.ts +37 -0
- package/src/types/location.ts +28 -8
- package/src/types/state.ts +13 -3
- package/src/types/sync.ts +23 -0
- package/ios/Frameworks/BeekonKit.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/_CodeSignature/CodeRequirements +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/_CodeSignature/CodeResources +0 -296
- package/ios/Frameworks/BeekonKit.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/_CodeSignature/CodeResources +0 -146
package/src/types/config.ts
CHANGED
|
@@ -1,33 +1,65 @@
|
|
|
1
|
+
import type { AccuracyMode, StationaryMode } from './enums';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
|
-
* Foreground-service notification overrides. Android-only —
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Foreground-service notification overrides. **Android-only** — the platform
|
|
5
|
+
* requires every location foreground service to show a persistent notification.
|
|
6
|
+
* Both fields are optional; missing values fall back to native defaults.
|
|
7
|
+
* Ignored on iOS.
|
|
6
8
|
*/
|
|
7
|
-
export type
|
|
8
|
-
/** Notification title. Defaults to "
|
|
9
|
+
export type NotificationConfig = {
|
|
10
|
+
/** Notification title. Defaults to "Tracking location". */
|
|
9
11
|
title?: string;
|
|
10
|
-
/** Notification body text. Defaults to
|
|
12
|
+
/** Notification body text. Defaults to no body. */
|
|
11
13
|
text?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Server-upload configuration. Presence of {@link BeekonConfig.sync} turns on
|
|
18
|
+
* batched uploads of stored locations and geofence events; omitting it keeps
|
|
19
|
+
* tracking local-only.
|
|
20
|
+
*/
|
|
21
|
+
export type SyncConfig = {
|
|
22
|
+
/** Ingest endpoint — an `http` or `https` URL. */
|
|
23
|
+
url: string;
|
|
24
|
+
/** Extra HTTP headers sent with every upload (e.g. `Authorization`). */
|
|
25
|
+
headers?: Record<string, string>;
|
|
12
26
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* Pass the resource name without extension or `R.drawable.` prefix. Defaults
|
|
16
|
-
* to the host app's `applicationInfo.icon`.
|
|
27
|
+
* Target seconds between uploads. The SDK enforces a 60s floor; background
|
|
28
|
+
* uploads may be delayed to the OS scheduler floor (~15 min). Default: `300`.
|
|
17
29
|
*/
|
|
18
|
-
|
|
30
|
+
intervalSeconds?: number;
|
|
31
|
+
/** Maximum locations per upload. Clamped to `[1, 1000]`. Default: `100`. */
|
|
32
|
+
batchSize?: number;
|
|
19
33
|
};
|
|
20
34
|
|
|
21
35
|
/**
|
|
22
|
-
* Tracking configuration.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
36
|
+
* Tracking configuration. Every field is optional — `Beekon.start()` falls back
|
|
37
|
+
* to the previously persisted config, or to the documented defaults below if
|
|
38
|
+
* never configured.
|
|
39
|
+
*
|
|
40
|
+
* The two gate knobs (`minTimeBetweenLocationsSeconds`,
|
|
41
|
+
* `minDistanceBetweenLocationsMeters`) admit a fix only when **both** are
|
|
42
|
+
* satisfied; pass `0` to disable a gate.
|
|
25
43
|
*/
|
|
26
44
|
export type BeekonConfig = {
|
|
27
|
-
/** Minimum seconds between admitted fixes. Default: `30`.
|
|
28
|
-
|
|
29
|
-
/** Minimum metres between admitted fixes.
|
|
30
|
-
|
|
45
|
+
/** Minimum seconds between admitted fixes (10s floor). Default: `30`. */
|
|
46
|
+
minTimeBetweenLocationsSeconds?: number;
|
|
47
|
+
/** Minimum metres between admitted fixes. `0` disables it. Default: `100`. */
|
|
48
|
+
minDistanceBetweenLocationsMeters?: number;
|
|
49
|
+
/** Accuracy / battery preset. Default: `'balanced'`. */
|
|
50
|
+
accuracyMode?: AccuracyMode;
|
|
51
|
+
/** Behaviour while stationary. Default: `'pause'`. */
|
|
52
|
+
whenStationary?: StationaryMode;
|
|
53
|
+
/** Stationary exit-geofence radius, clamped to `[5, 1000]`. Default: `5`. */
|
|
54
|
+
stationaryRadiusMeters?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Detect physical activity (walking, driving, …). Requires the
|
|
57
|
+
* `ACTIVITY_RECOGNITION` permission on Android and the `NSMotionUsageDescription`
|
|
58
|
+
* Info.plist key on iOS. Default: `false`.
|
|
59
|
+
*/
|
|
60
|
+
detectActivity?: boolean;
|
|
61
|
+
/** Server-upload configuration. Omit to keep tracking local-only. */
|
|
62
|
+
sync?: SyncConfig;
|
|
31
63
|
/** Android-only notification overrides. Ignored on iOS. */
|
|
32
|
-
|
|
64
|
+
notification?: NotificationConfig;
|
|
33
65
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value enums shared across the public API, expressed as string-literal unions
|
|
3
|
+
* (idiomatic TS). Each mirrors the like-named enum on both native SDKs by value;
|
|
4
|
+
* the wire layer carries them as plain strings and the mappers translate.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Accuracy / battery-life preset for the location provider.
|
|
9
|
+
*
|
|
10
|
+
* - `'high'` — highest precision, highest battery cost (GPS-grade).
|
|
11
|
+
* - `'balanced'` — city-block precision, balanced battery (the default).
|
|
12
|
+
* - `'low'` — coarse, lowest battery.
|
|
13
|
+
*/
|
|
14
|
+
export type AccuracyMode = 'high' | 'balanced' | 'low';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Behaviour while the device is stationary.
|
|
18
|
+
*
|
|
19
|
+
* - `'keepTracking'` — GPS stays on.
|
|
20
|
+
* - `'pause'` — GPS off while stationary, silent resume on movement (default).
|
|
21
|
+
* - `'pauseWithCheckIns'` — GPS off, but a location is recorded roughly every
|
|
22
|
+
* 15 minutes.
|
|
23
|
+
*/
|
|
24
|
+
export type StationaryMode = 'keepTracking' | 'pause' | 'pauseWithCheckIns';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Why a {@link Location} was admitted and persisted.
|
|
28
|
+
*
|
|
29
|
+
* - `'interval'` — a scheduled fix that passed the time/distance gate.
|
|
30
|
+
* - `'motion'` — the device started or stopped moving.
|
|
31
|
+
* - `'checkIn'` — a periodic check-in while stationary.
|
|
32
|
+
* - `'geofence'` — a geofence crossing.
|
|
33
|
+
* - `'manual'` — an explicit request.
|
|
34
|
+
*/
|
|
35
|
+
export type LocationTrigger =
|
|
36
|
+
| 'interval'
|
|
37
|
+
| 'motion'
|
|
38
|
+
| 'checkIn'
|
|
39
|
+
| 'geofence'
|
|
40
|
+
| 'manual';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The gate's quality verdict for a {@link Location}.
|
|
44
|
+
*
|
|
45
|
+
* - `'ok'` — passed the accuracy and speed checks.
|
|
46
|
+
* - `'lowAccuracy'` — worse than the usable accuracy threshold.
|
|
47
|
+
* - `'implausibleSpeed'` — an implausible jump from the previous fix.
|
|
48
|
+
*/
|
|
49
|
+
export type LocationQuality = 'ok' | 'lowAccuracy' | 'implausibleSpeed';
|
|
50
|
+
|
|
51
|
+
/** Device motion when a {@link Location} was captured. */
|
|
52
|
+
export type MotionState = 'moving' | 'stationary' | 'unknown';
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Detected physical activity. Only populated when
|
|
56
|
+
* {@link BeekonConfig.detectActivity} is enabled; otherwise `null`.
|
|
57
|
+
*/
|
|
58
|
+
export type ActivityType =
|
|
59
|
+
| 'stationary'
|
|
60
|
+
| 'walking'
|
|
61
|
+
| 'running'
|
|
62
|
+
| 'cycling'
|
|
63
|
+
| 'automotive'
|
|
64
|
+
| 'unknown';
|
package/src/types/error.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Error kinds thrown
|
|
3
|
-
*
|
|
2
|
+
* Error kinds thrown across the bridge. These are the **only** errors Beekon
|
|
3
|
+
* throws — permission / location-services / lifecycle problems never throw; they
|
|
4
|
+
* surface on the `onState` stream as `stopped(reason)` instead.
|
|
5
|
+
*
|
|
6
|
+
* - `'storage'` — a local-store (SQLite) read/write failed. Thrown by
|
|
7
|
+
* `getLocations()`, `deleteLocations()`, and `pendingUploadCount()`.
|
|
8
|
+
* - `'invalidGeofence'` — a geofence passed to `addGeofences()` failed
|
|
9
|
+
* validation (empty/oversized id, or non-positive radius).
|
|
4
10
|
*/
|
|
5
|
-
export type BeekonErrorKind =
|
|
6
|
-
| 'permissionDenied'
|
|
7
|
-
| 'locationServicesDisabled'
|
|
8
|
-
| 'storageFailure';
|
|
11
|
+
export type BeekonErrorKind = 'storage' | 'invalidGeofence';
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
|
-
* Typed error surfaced from the bridge. The native module rejects promises
|
|
12
|
-
*
|
|
14
|
+
* Typed error surfaced from the bridge. The native module rejects promises with
|
|
15
|
+
* the kind encoded as the error code; the facade re-wraps into this.
|
|
13
16
|
*/
|
|
14
17
|
export class BeekonError extends Error {
|
|
15
18
|
public readonly kind: BeekonErrorKind;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A circular geofence registered via `Beekon.addGeofences()`. Mirrors
|
|
3
|
+
* `BeekonGeofence` on both native SDKs. The SDK pages registrations
|
|
4
|
+
* automatically, so you may register more than the OS geofence limit.
|
|
5
|
+
*/
|
|
6
|
+
export type BeekonGeofence = {
|
|
7
|
+
/** Unique id, 1–100 characters. Re-adding an existing id replaces it. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Center latitude in degrees, WGS-84. */
|
|
10
|
+
latitude: number;
|
|
11
|
+
/** Center longitude in degrees, WGS-84. */
|
|
12
|
+
longitude: number;
|
|
13
|
+
/** Radius in metres. Must be `> 0`; `>= 100` is recommended for reliability. */
|
|
14
|
+
radiusMeters: number;
|
|
15
|
+
/** Emit an event on entry. Default: `true`. */
|
|
16
|
+
notifyOnEntry?: boolean;
|
|
17
|
+
/** Emit an event on exit. Default: `true`. */
|
|
18
|
+
notifyOnExit?: boolean;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** Whether a {@link GeofenceEvent} marks entering or exiting a geofence. */
|
|
22
|
+
export type Transition = 'enter' | 'exit';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A geofence entry/exit crossing, delivered via `Beekon.onGeofenceEvent()`.
|
|
26
|
+
* Mirrors `GeofenceEvent` on both native SDKs.
|
|
27
|
+
*/
|
|
28
|
+
export type GeofenceEvent = {
|
|
29
|
+
/** Unique event id. Used as the dedup key on upload. */
|
|
30
|
+
id: string;
|
|
31
|
+
/** The {@link BeekonGeofence.id} that was crossed. */
|
|
32
|
+
geofenceId: string;
|
|
33
|
+
/** Whether the device entered or exited. */
|
|
34
|
+
type: Transition;
|
|
35
|
+
/** When the crossing happened. */
|
|
36
|
+
timestamp: Date;
|
|
37
|
+
};
|
package/src/types/location.ts
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ActivityType,
|
|
3
|
+
LocationQuality,
|
|
4
|
+
LocationTrigger,
|
|
5
|
+
MotionState,
|
|
6
|
+
} from './enums';
|
|
7
|
+
|
|
1
8
|
/**
|
|
2
9
|
* A single location fix as emitted by the native SDK after gating. Fields map
|
|
3
10
|
* 1:1 to `in.wayq.beekon.Location` on Android and `BeekonKit.Location` on iOS.
|
|
4
11
|
*
|
|
5
|
-
* `
|
|
6
|
-
* are `null` when the OS did not report a value — the
|
|
7
|
-
* value to mask absence (e.g. a stationary device returns
|
|
8
|
-
* not `0`).
|
|
12
|
+
* `id`, `latitude`, `longitude`, and `timestamp` are always present. The four
|
|
13
|
+
* optional numeric fields are `null` when the OS did not report a value — the
|
|
14
|
+
* SDK never invents a value to mask absence (e.g. a stationary device returns
|
|
15
|
+
* `bearing === null`, not `0`). `activity` is `null` unless
|
|
16
|
+
* {@link BeekonConfig.detectActivity} is enabled.
|
|
9
17
|
*/
|
|
10
18
|
export type Location = {
|
|
19
|
+
/** Stable, unique storage id. Used as the dedup key on upload. */
|
|
20
|
+
id: string;
|
|
11
21
|
/** Latitude in degrees, WGS-84. */
|
|
12
|
-
|
|
22
|
+
latitude: number;
|
|
13
23
|
/** Longitude in degrees, WGS-84. */
|
|
14
|
-
|
|
24
|
+
longitude: number;
|
|
25
|
+
/** Time the OS provider reported this fix (not when JS received it). */
|
|
26
|
+
timestamp: Date;
|
|
15
27
|
/** Horizontal accuracy in meters (1-sigma); `null` if unreported. */
|
|
16
28
|
accuracy: number | null;
|
|
17
29
|
/** Speed in m/s; `null` if unreported. */
|
|
@@ -20,6 +32,14 @@ export type Location = {
|
|
|
20
32
|
bearing: number | null;
|
|
21
33
|
/** Altitude in meters above the WGS-84 ellipsoid; `null` if unreported. */
|
|
22
34
|
altitude: number | null;
|
|
23
|
-
/**
|
|
24
|
-
|
|
35
|
+
/** The gate's quality verdict for this fix. */
|
|
36
|
+
quality: LocationQuality;
|
|
37
|
+
/** Why this fix was captured. */
|
|
38
|
+
trigger: LocationTrigger;
|
|
39
|
+
/** Device motion when this fix was captured. */
|
|
40
|
+
motion: MotionState;
|
|
41
|
+
/** Detected activity, or `null` unless activity detection is enabled. */
|
|
42
|
+
activity: ActivityType | null;
|
|
43
|
+
/** `true` if the OS flagged this fix as mock/simulated. */
|
|
44
|
+
isMock: boolean;
|
|
25
45
|
};
|
package/src/types/state.ts
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reason a tracking session ended. Mirrors `StopReason` on both platforms.
|
|
3
3
|
*
|
|
4
|
-
* `'
|
|
5
|
-
*
|
|
4
|
+
* - `'user'` — `Beekon.stop()` was called.
|
|
5
|
+
* - `'permissionDenied'` — location permission is missing or was revoked
|
|
6
|
+
* (user-fixable in Settings).
|
|
7
|
+
* - `'locationServicesDisabled'` — system-wide location services are off
|
|
8
|
+
* (user-fixable in Settings).
|
|
9
|
+
* - `'locationUnavailable'` — no usable location backend on this device (e.g.
|
|
10
|
+
* Google Play Services absent/outdated on Android). Not user-fixable.
|
|
11
|
+
* - `'system'` — the OS terminated tracking (e.g. foreground-service kill,
|
|
12
|
+
* or an unrecoverable internal error).
|
|
6
13
|
*/
|
|
7
14
|
export type StopReason =
|
|
8
15
|
| 'user'
|
|
9
16
|
| 'permissionDenied'
|
|
10
17
|
| 'locationServicesDisabled'
|
|
18
|
+
| 'locationUnavailable'
|
|
11
19
|
| 'system';
|
|
12
20
|
|
|
13
21
|
/**
|
|
14
22
|
* Tracking state. Mirrors the native `BeekonState` sealed type on both
|
|
15
23
|
* platforms. Use the `kind` field as a discriminator.
|
|
16
24
|
*
|
|
17
|
-
* Lifecycle: `idle → tracking → stopped(reason)`.
|
|
25
|
+
* Lifecycle: `idle → tracking → stopped(reason)`. `start()` / `stop()` never
|
|
26
|
+
* throw — this stream is the single source of truth for whether tracking is
|
|
27
|
+
* active and why it stopped.
|
|
18
28
|
*/
|
|
19
29
|
export type BeekonState =
|
|
20
30
|
| { kind: 'idle' }
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why a server upload failed terminally. Mirrors `SyncFailure` on both
|
|
3
|
+
* platforms.
|
|
4
|
+
*
|
|
5
|
+
* - `'auth'` — `401`/`403`; credentials were rejected. Refresh them (via
|
|
6
|
+
* `Beekon.configure()` with new `sync.headers`) and sync resumes.
|
|
7
|
+
* - `'rejected'` — `400`/`422`; the server rejected the payload. A payload bug;
|
|
8
|
+
* it won't self-resolve.
|
|
9
|
+
*/
|
|
10
|
+
export type SyncFailure = 'auth' | 'rejected';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Upload health, delivered via `Beekon.onSyncStatus()`. Mirrors the native
|
|
14
|
+
* `SyncStatus` sealed type. Use the `kind` field as a discriminator.
|
|
15
|
+
*
|
|
16
|
+
* - `'idle'` — caught up, or sync is not configured.
|
|
17
|
+
* - `'pending'` — uploading or retrying (healthy).
|
|
18
|
+
* - `'failed'` — a terminal failure the app must act on.
|
|
19
|
+
*/
|
|
20
|
+
export type SyncStatus =
|
|
21
|
+
| { kind: 'idle' }
|
|
22
|
+
| { kind: 'pending' }
|
|
23
|
+
| { kind: 'failed'; reason: SyncFailure };
|
|
Binary file
|
|
Binary file
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>files</key>
|
|
6
|
-
<dict>
|
|
7
|
-
<key>LICENSE.txt</key>
|
|
8
|
-
<data>
|
|
9
|
-
Cd50llceWtwBPWNSIAJRdTfQQiE=
|
|
10
|
-
</data>
|
|
11
|
-
<key>ios-arm64/BeekonKit.framework/BeekonKit</key>
|
|
12
|
-
<data>
|
|
13
|
-
+naAIv6MaKzUx2+ey3MVX1DIjx8=
|
|
14
|
-
</data>
|
|
15
|
-
<key>ios-arm64/BeekonKit.framework/Info.plist</key>
|
|
16
|
-
<data>
|
|
17
|
-
J2Q8IsOOK4KAiFaP40/M4N6vym0=
|
|
18
|
-
</data>
|
|
19
|
-
<key>ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.abi.json</key>
|
|
20
|
-
<data>
|
|
21
|
-
g3XuCRuM2juW8XYn4Y2Xe208MbM=
|
|
22
|
-
</data>
|
|
23
|
-
<key>ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftdoc</key>
|
|
24
|
-
<data>
|
|
25
|
-
GYBAar6iPnb1XJGupWqUhKVBjKU=
|
|
26
|
-
</data>
|
|
27
|
-
<key>ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftinterface</key>
|
|
28
|
-
<data>
|
|
29
|
-
v4db5W67RIw4bayliPlZv35/sFU=
|
|
30
|
-
</data>
|
|
31
|
-
<key>ios-arm64/BeekonKit.framework/PrivacyInfo.xcprivacy</key>
|
|
32
|
-
<data>
|
|
33
|
-
9ZHPJ6MUYP0Ios5LKP+bfuWVxJk=
|
|
34
|
-
</data>
|
|
35
|
-
<key>ios-arm64/BeekonKit.framework/_CodeSignature/CodeResources</key>
|
|
36
|
-
<data>
|
|
37
|
-
qVAi0E8MUwJOhDlgAXFRDX/3vgQ=
|
|
38
|
-
</data>
|
|
39
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/BeekonKit</key>
|
|
40
|
-
<data>
|
|
41
|
-
FjUHhPklgfj60f3nqZyzCz/MPWQ=
|
|
42
|
-
</data>
|
|
43
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Info.plist</key>
|
|
44
|
-
<data>
|
|
45
|
-
uIBZEl29bIa6BD82AJqNnqxItQ8=
|
|
46
|
-
</data>
|
|
47
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
48
|
-
<data>
|
|
49
|
-
VX3G5xWaHufjuctExyD3KxnvPKo=
|
|
50
|
-
</data>
|
|
51
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
52
|
-
<data>
|
|
53
|
-
N69rpbNFqxF9nC3LxN0wVnxXtGI=
|
|
54
|
-
</data>
|
|
55
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
56
|
-
<data>
|
|
57
|
-
OwWAJveN4oSVFdX/aWzFdGsMh5s=
|
|
58
|
-
</data>
|
|
59
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
60
|
-
<data>
|
|
61
|
-
VX3G5xWaHufjuctExyD3KxnvPKo=
|
|
62
|
-
</data>
|
|
63
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
64
|
-
<data>
|
|
65
|
-
jNcXtOMMcpL2++xWcYLei9tqS5w=
|
|
66
|
-
</data>
|
|
67
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
68
|
-
<data>
|
|
69
|
-
aX58esTNE/RvDF6suImnsEDQMTM=
|
|
70
|
-
</data>
|
|
71
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/PrivacyInfo.xcprivacy</key>
|
|
72
|
-
<data>
|
|
73
|
-
9ZHPJ6MUYP0Ios5LKP+bfuWVxJk=
|
|
74
|
-
</data>
|
|
75
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/_CodeSignature/CodeResources</key>
|
|
76
|
-
<data>
|
|
77
|
-
EBmJZa5BQFnAnSPP6dz5anbVsTo=
|
|
78
|
-
</data>
|
|
79
|
-
</dict>
|
|
80
|
-
<key>files2</key>
|
|
81
|
-
<dict>
|
|
82
|
-
<key>LICENSE.txt</key>
|
|
83
|
-
<dict>
|
|
84
|
-
<key>hash2</key>
|
|
85
|
-
<data>
|
|
86
|
-
PDylgJZfZxoKTHUmgv6aK1hRYtMtH4titPlIb7e5iRY=
|
|
87
|
-
</data>
|
|
88
|
-
</dict>
|
|
89
|
-
<key>ios-arm64/BeekonKit.framework/BeekonKit</key>
|
|
90
|
-
<dict>
|
|
91
|
-
<key>hash2</key>
|
|
92
|
-
<data>
|
|
93
|
-
W7xcJOc7VsRvMXihdfEUxGsTpBfHxH1gPbjRVtI8kEM=
|
|
94
|
-
</data>
|
|
95
|
-
</dict>
|
|
96
|
-
<key>ios-arm64/BeekonKit.framework/Info.plist</key>
|
|
97
|
-
<dict>
|
|
98
|
-
<key>hash2</key>
|
|
99
|
-
<data>
|
|
100
|
-
igGx9bEJCs/Wm2r/0fm1xWlHDmA9Yd/HN+S1eNuxziU=
|
|
101
|
-
</data>
|
|
102
|
-
</dict>
|
|
103
|
-
<key>ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.abi.json</key>
|
|
104
|
-
<dict>
|
|
105
|
-
<key>hash2</key>
|
|
106
|
-
<data>
|
|
107
|
-
vc71j/YWrI9vpX+HcsT84p2Mh+AIR7i4y90BFkENP3w=
|
|
108
|
-
</data>
|
|
109
|
-
</dict>
|
|
110
|
-
<key>ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftdoc</key>
|
|
111
|
-
<dict>
|
|
112
|
-
<key>hash2</key>
|
|
113
|
-
<data>
|
|
114
|
-
gKcGwL/AcvR3lotu9XY2suukPsj+jWsSJvD7sm2jQXw=
|
|
115
|
-
</data>
|
|
116
|
-
</dict>
|
|
117
|
-
<key>ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftinterface</key>
|
|
118
|
-
<dict>
|
|
119
|
-
<key>hash2</key>
|
|
120
|
-
<data>
|
|
121
|
-
mitVvWaJ1tpzwgWCfcEIK3u3ybZ7hSpmykZJnK8vf00=
|
|
122
|
-
</data>
|
|
123
|
-
</dict>
|
|
124
|
-
<key>ios-arm64/BeekonKit.framework/PrivacyInfo.xcprivacy</key>
|
|
125
|
-
<dict>
|
|
126
|
-
<key>hash2</key>
|
|
127
|
-
<data>
|
|
128
|
-
KNi008FJ9ZF/nLOH4DadbEUqysKXh/HjMAmdLdidn4c=
|
|
129
|
-
</data>
|
|
130
|
-
</dict>
|
|
131
|
-
<key>ios-arm64/BeekonKit.framework/_CodeSignature/CodeResources</key>
|
|
132
|
-
<dict>
|
|
133
|
-
<key>hash2</key>
|
|
134
|
-
<data>
|
|
135
|
-
biAvH5F300CuORBO8PAXwbaZrvFJ6IKpJ03mwqoa9pw=
|
|
136
|
-
</data>
|
|
137
|
-
</dict>
|
|
138
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/BeekonKit</key>
|
|
139
|
-
<dict>
|
|
140
|
-
<key>hash2</key>
|
|
141
|
-
<data>
|
|
142
|
-
hn5zblRjRXs8jCxlS5BGNLVmLw5QciKIbrNDMVj7aZQ=
|
|
143
|
-
</data>
|
|
144
|
-
</dict>
|
|
145
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Info.plist</key>
|
|
146
|
-
<dict>
|
|
147
|
-
<key>hash2</key>
|
|
148
|
-
<data>
|
|
149
|
-
n7FykM0hwZBYpdOmRZVNIhq+yVw0D05HUv4gQvp3a+o=
|
|
150
|
-
</data>
|
|
151
|
-
</dict>
|
|
152
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
153
|
-
<dict>
|
|
154
|
-
<key>hash2</key>
|
|
155
|
-
<data>
|
|
156
|
-
9WWtJ/SunDN+RNh+QhuE+dUtw0x58nNbt9gYBn3XlBE=
|
|
157
|
-
</data>
|
|
158
|
-
</dict>
|
|
159
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
160
|
-
<dict>
|
|
161
|
-
<key>hash2</key>
|
|
162
|
-
<data>
|
|
163
|
-
kiW5NMFrXxi4aekbMu1hT1jL4NsFbUsT5gwvjIUim48=
|
|
164
|
-
</data>
|
|
165
|
-
</dict>
|
|
166
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
167
|
-
<dict>
|
|
168
|
-
<key>hash2</key>
|
|
169
|
-
<data>
|
|
170
|
-
v/Cfl3tF13LG5nhjGFypVGQvacvwZ+VAdyy0Iy6c994=
|
|
171
|
-
</data>
|
|
172
|
-
</dict>
|
|
173
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
174
|
-
<dict>
|
|
175
|
-
<key>hash2</key>
|
|
176
|
-
<data>
|
|
177
|
-
9WWtJ/SunDN+RNh+QhuE+dUtw0x58nNbt9gYBn3XlBE=
|
|
178
|
-
</data>
|
|
179
|
-
</dict>
|
|
180
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
181
|
-
<dict>
|
|
182
|
-
<key>hash2</key>
|
|
183
|
-
<data>
|
|
184
|
-
GMOMoBM3ikrulB6x4+R3kPTTGUXqZ5eueJPYsJ4NkaU=
|
|
185
|
-
</data>
|
|
186
|
-
</dict>
|
|
187
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
188
|
-
<dict>
|
|
189
|
-
<key>hash2</key>
|
|
190
|
-
<data>
|
|
191
|
-
cP2NWEZSOyc/7TF6zwN7la0671FBm2P9UHwb1WLWAog=
|
|
192
|
-
</data>
|
|
193
|
-
</dict>
|
|
194
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/PrivacyInfo.xcprivacy</key>
|
|
195
|
-
<dict>
|
|
196
|
-
<key>hash2</key>
|
|
197
|
-
<data>
|
|
198
|
-
KNi008FJ9ZF/nLOH4DadbEUqysKXh/HjMAmdLdidn4c=
|
|
199
|
-
</data>
|
|
200
|
-
</dict>
|
|
201
|
-
<key>ios-arm64_x86_64-simulator/BeekonKit.framework/_CodeSignature/CodeResources</key>
|
|
202
|
-
<dict>
|
|
203
|
-
<key>hash2</key>
|
|
204
|
-
<data>
|
|
205
|
-
AaRejSOyW3Vcnyr0w4kXJi9QuAwGpM4D9yxdKsJMrlk=
|
|
206
|
-
</data>
|
|
207
|
-
</dict>
|
|
208
|
-
</dict>
|
|
209
|
-
<key>rules</key>
|
|
210
|
-
<dict>
|
|
211
|
-
<key>^.*</key>
|
|
212
|
-
<true/>
|
|
213
|
-
<key>^.*\.lproj/</key>
|
|
214
|
-
<dict>
|
|
215
|
-
<key>optional</key>
|
|
216
|
-
<true/>
|
|
217
|
-
<key>weight</key>
|
|
218
|
-
<real>1000</real>
|
|
219
|
-
</dict>
|
|
220
|
-
<key>^.*\.lproj/locversion.plist$</key>
|
|
221
|
-
<dict>
|
|
222
|
-
<key>omit</key>
|
|
223
|
-
<true/>
|
|
224
|
-
<key>weight</key>
|
|
225
|
-
<real>1100</real>
|
|
226
|
-
</dict>
|
|
227
|
-
<key>^Base\.lproj/</key>
|
|
228
|
-
<dict>
|
|
229
|
-
<key>weight</key>
|
|
230
|
-
<real>1010</real>
|
|
231
|
-
</dict>
|
|
232
|
-
<key>^version.plist$</key>
|
|
233
|
-
<true/>
|
|
234
|
-
</dict>
|
|
235
|
-
<key>rules2</key>
|
|
236
|
-
<dict>
|
|
237
|
-
<key>.*\.dSYM($|/)</key>
|
|
238
|
-
<dict>
|
|
239
|
-
<key>weight</key>
|
|
240
|
-
<real>11</real>
|
|
241
|
-
</dict>
|
|
242
|
-
<key>^(.*/)?\.DS_Store$</key>
|
|
243
|
-
<dict>
|
|
244
|
-
<key>omit</key>
|
|
245
|
-
<true/>
|
|
246
|
-
<key>weight</key>
|
|
247
|
-
<real>2000</real>
|
|
248
|
-
</dict>
|
|
249
|
-
<key>^.*</key>
|
|
250
|
-
<true/>
|
|
251
|
-
<key>^.*\.lproj/</key>
|
|
252
|
-
<dict>
|
|
253
|
-
<key>optional</key>
|
|
254
|
-
<true/>
|
|
255
|
-
<key>weight</key>
|
|
256
|
-
<real>1000</real>
|
|
257
|
-
</dict>
|
|
258
|
-
<key>^.*\.lproj/locversion.plist$</key>
|
|
259
|
-
<dict>
|
|
260
|
-
<key>omit</key>
|
|
261
|
-
<true/>
|
|
262
|
-
<key>weight</key>
|
|
263
|
-
<real>1100</real>
|
|
264
|
-
</dict>
|
|
265
|
-
<key>^Base\.lproj/</key>
|
|
266
|
-
<dict>
|
|
267
|
-
<key>weight</key>
|
|
268
|
-
<real>1010</real>
|
|
269
|
-
</dict>
|
|
270
|
-
<key>^Info\.plist$</key>
|
|
271
|
-
<dict>
|
|
272
|
-
<key>omit</key>
|
|
273
|
-
<true/>
|
|
274
|
-
<key>weight</key>
|
|
275
|
-
<real>20</real>
|
|
276
|
-
</dict>
|
|
277
|
-
<key>^PkgInfo$</key>
|
|
278
|
-
<dict>
|
|
279
|
-
<key>omit</key>
|
|
280
|
-
<true/>
|
|
281
|
-
<key>weight</key>
|
|
282
|
-
<real>20</real>
|
|
283
|
-
</dict>
|
|
284
|
-
<key>^embedded\.provisionprofile$</key>
|
|
285
|
-
<dict>
|
|
286
|
-
<key>weight</key>
|
|
287
|
-
<real>20</real>
|
|
288
|
-
</dict>
|
|
289
|
-
<key>^version\.plist$</key>
|
|
290
|
-
<dict>
|
|
291
|
-
<key>weight</key>
|
|
292
|
-
<real>20</real>
|
|
293
|
-
</dict>
|
|
294
|
-
</dict>
|
|
295
|
-
</dict>
|
|
296
|
-
</plist>
|
|
Binary file
|