@transistorsoft/background-geolocation-types 5.2.0 → 5.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/dist/core/api/BackgroundGeolocation.d.ts +4 -3
- package/dist/core/api/LocationQuery.d.ts +7 -0
- package/dist/core/api/LocationQuery.js +2 -0
- package/dist/core/data/Location.d.ts +6 -0
- package/dist/core/events/LocationFilterEvent.d.ts +9 -0
- package/dist/enums/LocationFilterReason.d.ts +2 -0
- package/dist/enums/LocationFilterReason.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -2,9 +2,10 @@ import type { Logger } from './Logger';
|
|
|
2
2
|
import type { DeviceSettings } from './DeviceSettings';
|
|
3
3
|
import type { CurrentPositionRequest } from './CurrentPositionRequest';
|
|
4
4
|
import type { WatchPositionRequest } from './WatchPositionRequest';
|
|
5
|
+
import type { LocationQuery } from './LocationQuery';
|
|
5
6
|
import type { Config } from '../config/Config';
|
|
6
7
|
import type { State } from './State';
|
|
7
|
-
import type { Location } from '../data/Location';
|
|
8
|
+
import type { Location, LocationInput } from '../data/Location';
|
|
8
9
|
import type { LocationError } from '../../enums/LocationError';
|
|
9
10
|
import type { Geofence } from '../data/Geofence';
|
|
10
11
|
import type { DeviceInfo } from '../data/DeviceInfo';
|
|
@@ -109,8 +110,8 @@ export interface BackgroundGeolocationAPI extends BackgroundGeolocationEvents {
|
|
|
109
110
|
isPowerSaveMode(): Promise<boolean>;
|
|
110
111
|
destroyLocations(): Promise<void>;
|
|
111
112
|
destroyLocation(uuid: string): Promise<void>;
|
|
112
|
-
insertLocation(location:
|
|
113
|
-
getLocations(): Promise<Array<Object>>;
|
|
113
|
+
insertLocation(location: LocationInput): Promise<string>;
|
|
114
|
+
getLocations(query?: LocationQuery): Promise<Array<Object>>;
|
|
114
115
|
getCount(): Promise<number>;
|
|
115
116
|
sync(): Promise<Array<Object>>;
|
|
116
117
|
startBackgroundTask(): Promise<number>;
|
|
@@ -40,3 +40,9 @@ export interface Location {
|
|
|
40
40
|
activity: MotionActivity;
|
|
41
41
|
provider?: ProviderChangeEvent;
|
|
42
42
|
}
|
|
43
|
+
export interface LocationInput {
|
|
44
|
+
coords: Pick<Coords, "latitude" | "longitude"> & Partial<Coords>;
|
|
45
|
+
timestamp?: string | number;
|
|
46
|
+
uuid?: string;
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import type { Location } from '../data/Location';
|
|
2
2
|
import type { LocationFilterReason } from '../../enums/LocationFilterReason';
|
|
3
|
+
export interface GeofenceFilterInfo {
|
|
4
|
+
identifier: string;
|
|
5
|
+
action: string;
|
|
6
|
+
reason: string;
|
|
7
|
+
dist: number;
|
|
8
|
+
radius: number;
|
|
9
|
+
outsideBy: number;
|
|
10
|
+
}
|
|
3
11
|
export interface LocationFilterEvent {
|
|
4
12
|
location: Location;
|
|
5
13
|
reason: LocationFilterReason;
|
|
6
14
|
accuracy: number;
|
|
7
15
|
trackingAccuracyThreshold: number;
|
|
16
|
+
geofence?: GeofenceFilterInfo;
|
|
8
17
|
}
|
|
@@ -2,5 +2,7 @@ export declare const LocationFilterReason: {
|
|
|
2
2
|
readonly LowAccuracy: "low-accuracy";
|
|
3
3
|
readonly ImpliedSpeed: "implied-speed";
|
|
4
4
|
readonly OutlierCapped: "outlier-capped";
|
|
5
|
+
readonly GeofenceSpuriousExit: "geofence-spurious-exit";
|
|
6
|
+
readonly GeofenceDuplicateEnter: "geofence-duplicate-enter";
|
|
5
7
|
};
|
|
6
8
|
export type LocationFilterReason = (typeof LocationFilterReason)[keyof typeof LocationFilterReason];
|
package/dist/index.d.ts
CHANGED
|
@@ -51,4 +51,5 @@ export * from './core/api/Logger';
|
|
|
51
51
|
export * from './core/api/DeviceSettings';
|
|
52
52
|
export * from './core/api/CurrentPositionRequest';
|
|
53
53
|
export * from './core/api/WatchPositionRequest';
|
|
54
|
+
export * from './core/api/LocationQuery';
|
|
54
55
|
export * from './core/api/TransistorAuthorizationService';
|
package/dist/index.js
CHANGED
|
@@ -67,4 +67,5 @@ __exportStar(require("./core/api/Logger"), exports);
|
|
|
67
67
|
__exportStar(require("./core/api/DeviceSettings"), exports);
|
|
68
68
|
__exportStar(require("./core/api/CurrentPositionRequest"), exports);
|
|
69
69
|
__exportStar(require("./core/api/WatchPositionRequest"), exports);
|
|
70
|
+
__exportStar(require("./core/api/LocationQuery"), exports);
|
|
70
71
|
__exportStar(require("./core/api/TransistorAuthorizationService"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transistorsoft/background-geolocation-types",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
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>",
|