@transistorsoft/background-geolocation-types 5.1.2 → 5.2.0
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/dist/core/api/BackgroundGeolocation.d.ts +3 -0
- package/dist/core/events/LocationFilterEvent.d.ts +8 -0
- package/dist/core/events/LocationFilterEvent.js +2 -0
- package/dist/enums/Event.d.ts +1 -0
- package/dist/enums/Event.js +1 -0
- package/dist/enums/LocationFilterReason.d.ts +6 -0
- package/dist/enums/LocationFilterReason.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ import type { HeartbeatEvent } from '../events/HeartbeatEvent';
|
|
|
18
18
|
import type { GeofencesChangeEvent } from '../events/GeofencesChangeEvent';
|
|
19
19
|
import type { ConnectivityChangeEvent } from '../events/ConnectivityChangeEvent';
|
|
20
20
|
import type { MotionChangeEvent } from '../events/MotionChangeEvent';
|
|
21
|
+
import type { LocationFilterEvent } from '../events/LocationFilterEvent';
|
|
21
22
|
import type { ProviderChangeEvent } from '../events/ProviderChangeEvent';
|
|
22
23
|
import type { HttpEvent } from '../events/HttpEvent';
|
|
23
24
|
import type { AuthorizationStatus } from '../../enums/AuthorizationStatus';
|
|
@@ -29,6 +30,7 @@ export interface EventPayloads {
|
|
|
29
30
|
location: Location;
|
|
30
31
|
motionchange: MotionChangeEvent;
|
|
31
32
|
activitychange: MotionActivityEvent;
|
|
33
|
+
locationfilter: LocationFilterEvent;
|
|
32
34
|
geofence: GeofenceEvent;
|
|
33
35
|
geofenceschange: GeofencesChangeEvent;
|
|
34
36
|
http: HttpEvent;
|
|
@@ -53,6 +55,7 @@ export interface EventPayloads {
|
|
|
53
55
|
export interface BackgroundGeolocationEvents {
|
|
54
56
|
onLocation(cb: (location: Location) => void, onError?: (err: LocationError) => void): Subscription;
|
|
55
57
|
onMotionChange(cb: (event: MotionChangeEvent) => void): Subscription;
|
|
58
|
+
onLocationFilter(cb: (event: LocationFilterEvent) => void): Subscription;
|
|
56
59
|
onGeofence(cb: (event: GeofenceEvent) => void): Subscription;
|
|
57
60
|
onGeofencesChange(cb: (event: GeofencesChangeEvent) => void): Subscription;
|
|
58
61
|
onActivityChange(cb: (event: MotionActivityEvent) => void): Subscription;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Location } from '../data/Location';
|
|
2
|
+
import type { LocationFilterReason } from '../../enums/LocationFilterReason';
|
|
3
|
+
export interface LocationFilterEvent {
|
|
4
|
+
location: Location;
|
|
5
|
+
reason: LocationFilterReason;
|
|
6
|
+
accuracy: number;
|
|
7
|
+
trackingAccuracyThreshold: number;
|
|
8
|
+
}
|
package/dist/enums/Event.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare const Event: {
|
|
|
4
4
|
readonly Location: "location";
|
|
5
5
|
readonly MotionChange: "motionchange";
|
|
6
6
|
readonly ActivityChange: "activitychange";
|
|
7
|
+
readonly LocationFilter: "locationfilter";
|
|
7
8
|
readonly Geofence: "geofence";
|
|
8
9
|
readonly GeofencesChange: "geofenceschange";
|
|
9
10
|
readonly Http: "http";
|
package/dist/enums/Event.js
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const LocationFilterReason: {
|
|
2
|
+
readonly LowAccuracy: "low-accuracy";
|
|
3
|
+
readonly ImpliedSpeed: "implied-speed";
|
|
4
|
+
readonly OutlierCapped: "outlier-capped";
|
|
5
|
+
};
|
|
6
|
+
export type LocationFilterReason = (typeof LocationFilterReason)[keyof typeof LocationFilterReason];
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './enums/GeofenceAction';
|
|
|
17
17
|
export * from './enums/Event';
|
|
18
18
|
export * from './enums/ActivityType';
|
|
19
19
|
export * from './enums/LocationError';
|
|
20
|
+
export * from './enums/LocationFilterReason';
|
|
20
21
|
export * from './enums/SQLQueryOrder';
|
|
21
22
|
export * from "./core/data/Location";
|
|
22
23
|
export * from './core/data/Geofence';
|
|
@@ -31,6 +32,7 @@ export * from "./core/events/HeartbeatEvent";
|
|
|
31
32
|
export * from "./core/events/GeofencesChangeEvent";
|
|
32
33
|
export * from "./core/events/ConnectivityChangeEvent";
|
|
33
34
|
export * from "./core/events/MotionChangeEvent";
|
|
35
|
+
export * from "./core/events/LocationFilterEvent";
|
|
34
36
|
export * from "./core/events/ProviderChangeEvent";
|
|
35
37
|
export * from "./core/events/HttpEvent";
|
|
36
38
|
export * from './core/config/Config';
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __exportStar(require("./enums/GeofenceAction"), exports);
|
|
|
33
33
|
__exportStar(require("./enums/Event"), exports);
|
|
34
34
|
__exportStar(require("./enums/ActivityType"), exports);
|
|
35
35
|
__exportStar(require("./enums/LocationError"), exports);
|
|
36
|
+
__exportStar(require("./enums/LocationFilterReason"), exports);
|
|
36
37
|
__exportStar(require("./enums/SQLQueryOrder"), exports);
|
|
37
38
|
__exportStar(require("./core/data/Location"), exports);
|
|
38
39
|
__exportStar(require("./core/data/Geofence"), exports);
|
|
@@ -47,6 +48,7 @@ __exportStar(require("./core/events/HeartbeatEvent"), exports);
|
|
|
47
48
|
__exportStar(require("./core/events/GeofencesChangeEvent"), exports);
|
|
48
49
|
__exportStar(require("./core/events/ConnectivityChangeEvent"), exports);
|
|
49
50
|
__exportStar(require("./core/events/MotionChangeEvent"), exports);
|
|
51
|
+
__exportStar(require("./core/events/LocationFilterEvent"), exports);
|
|
50
52
|
__exportStar(require("./core/events/ProviderChangeEvent"), exports);
|
|
51
53
|
__exportStar(require("./core/events/HttpEvent"), exports);
|
|
52
54
|
__exportStar(require("./core/config/Config"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transistorsoft/background-geolocation-types",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "Shared TypeScript type definitions and documentation for Transistor Software's Background Geolocation SDKs (React Native, Capacitor, Cordova)",
|
|
6
6
|
"author": "Transistor Software <info@transistorsoft.com>",
|