@transistorsoft/background-geolocation-types 5.0.0-beta.1

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.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +137 -0
  3. package/dist/core/api/BackgroundGeolocation.d.ts +6 -0
  4. package/dist/core/api/BackgroundGeolocation.js +2 -0
  5. package/dist/core/api/CurrentPositionRequest.d.ts +44 -0
  6. package/dist/core/api/CurrentPositionRequest.js +2 -0
  7. package/dist/core/api/DeviceSettings.d.ts +77 -0
  8. package/dist/core/api/DeviceSettings.js +2 -0
  9. package/dist/core/api/Logger.d.ts +421 -0
  10. package/dist/core/api/Logger.js +2 -0
  11. package/dist/core/api/State.d.ts +75 -0
  12. package/dist/core/api/State.js +2 -0
  13. package/dist/core/config/ActivityConfig.d.ts +271 -0
  14. package/dist/core/config/ActivityConfig.js +2 -0
  15. package/dist/core/config/AppConfig.d.ts +599 -0
  16. package/dist/core/config/AppConfig.js +2 -0
  17. package/dist/core/config/AuthorizationConfig.d.ts +200 -0
  18. package/dist/core/config/AuthorizationConfig.js +2 -0
  19. package/dist/core/config/CompoundConfig.d.ts +19 -0
  20. package/dist/core/config/CompoundConfig.js +2 -0
  21. package/dist/core/config/Config.d.ts +149 -0
  22. package/dist/core/config/Config.js +2 -0
  23. package/dist/core/config/GeoConfig.d.ts +905 -0
  24. package/dist/core/config/GeoConfig.js +2 -0
  25. package/dist/core/config/HttpConfig.d.ts +579 -0
  26. package/dist/core/config/HttpConfig.js +2 -0
  27. package/dist/core/config/LocationFilter.d.ts +272 -0
  28. package/dist/core/config/LocationFilter.js +2 -0
  29. package/dist/core/config/LoggerConfig.d.ts +319 -0
  30. package/dist/core/config/LoggerConfig.js +2 -0
  31. package/dist/core/config/NotificationConfig.d.ts +519 -0
  32. package/dist/core/config/NotificationConfig.js +2 -0
  33. package/dist/core/config/PersistenceConfig.d.ts +552 -0
  34. package/dist/core/config/PersistenceConfig.js +2 -0
  35. package/dist/core/data/DeviceInfo.d.ts +61 -0
  36. package/dist/core/data/DeviceInfo.js +2 -0
  37. package/dist/core/data/Geofence.d.ts +16 -0
  38. package/dist/core/data/Geofence.js +2 -0
  39. package/dist/core/data/Location.d.ts +253 -0
  40. package/dist/core/data/Location.js +2 -0
  41. package/dist/core/data/Sensors.d.ts +30 -0
  42. package/dist/core/data/Sensors.js +2 -0
  43. package/dist/core/events/AuthorizationEvent.d.ts +15 -0
  44. package/dist/core/events/AuthorizationEvent.js +2 -0
  45. package/dist/core/events/ConnectivityChangeEvent.d.ts +9 -0
  46. package/dist/core/events/ConnectivityChangeEvent.js +2 -0
  47. package/dist/core/events/GeofenceEvent.d.ts +19 -0
  48. package/dist/core/events/GeofenceEvent.js +2 -0
  49. package/dist/core/events/GeofencesChangeEvent.d.ts +12 -0
  50. package/dist/core/events/GeofencesChangeEvent.js +2 -0
  51. package/dist/core/events/HeadlessEvent.d.ts +12 -0
  52. package/dist/core/events/HeadlessEvent.js +2 -0
  53. package/dist/core/events/HeartbeatEvent.d.ts +14 -0
  54. package/dist/core/events/HeartbeatEvent.js +2 -0
  55. package/dist/core/events/HttpEvent.d.ts +13 -0
  56. package/dist/core/events/HttpEvent.js +2 -0
  57. package/dist/core/events/MotionActivityEvent.d.ts +12 -0
  58. package/dist/core/events/MotionActivityEvent.js +2 -0
  59. package/dist/core/events/MotionChangeEvent.d.ts +12 -0
  60. package/dist/core/events/MotionChangeEvent.js +2 -0
  61. package/dist/core/events/ProviderChangeEvent.d.ts +17 -0
  62. package/dist/core/events/ProviderChangeEvent.js +2 -0
  63. package/dist/core/events/Subscription.d.ts +86 -0
  64. package/dist/core/events/Subscription.js +2 -0
  65. package/dist/docs-entry.d.ts +3 -0
  66. package/dist/docs-entry.js +20 -0
  67. package/dist/enums/AccuracyAuthorization.d.ts +16 -0
  68. package/dist/enums/AccuracyAuthorization.js +19 -0
  69. package/dist/enums/ActivityType.d.ts +28 -0
  70. package/dist/enums/ActivityType.js +31 -0
  71. package/dist/enums/AuthorizationStatus.d.ts +20 -0
  72. package/dist/enums/AuthorizationStatus.js +23 -0
  73. package/dist/enums/AuthorizationStrategy.d.ts +10 -0
  74. package/dist/enums/AuthorizationStrategy.js +13 -0
  75. package/dist/enums/DesiredAccuracy.d.ts +13 -0
  76. package/dist/enums/DesiredAccuracy.js +16 -0
  77. package/dist/enums/Event.d.ts +21 -0
  78. package/dist/enums/Event.js +24 -0
  79. package/dist/enums/GeofenceAction.d.ts +18 -0
  80. package/dist/enums/GeofenceAction.js +21 -0
  81. package/dist/enums/HttpMethod.d.ts +11 -0
  82. package/dist/enums/HttpMethod.js +14 -0
  83. package/dist/enums/KalmanProfile.d.ts +30 -0
  84. package/dist/enums/KalmanProfile.js +33 -0
  85. package/dist/enums/LocationError.d.ts +23 -0
  86. package/dist/enums/LocationError.js +26 -0
  87. package/dist/enums/LocationFilterPolicy.d.ts +108 -0
  88. package/dist/enums/LocationFilterPolicy.js +111 -0
  89. package/dist/enums/LogLevel.d.ts +13 -0
  90. package/dist/enums/LogLevel.js +16 -0
  91. package/dist/enums/LogLevelName.d.ts +1 -0
  92. package/dist/enums/LogLevelName.js +15 -0
  93. package/dist/enums/MotionActivityType.d.ts +14 -0
  94. package/dist/enums/MotionActivityType.js +17 -0
  95. package/dist/enums/NotificationPriority.d.ts +22 -0
  96. package/dist/enums/NotificationPriority.js +25 -0
  97. package/dist/enums/PersistMode.d.ts +12 -0
  98. package/dist/enums/PersistMode.js +15 -0
  99. package/dist/enums/SQLQueryOrder.d.ts +16 -0
  100. package/dist/enums/SQLQueryOrder.js +17 -0
  101. package/dist/enums/TrackingMode.d.ts +14 -0
  102. package/dist/enums/TrackingMode.js +17 -0
  103. package/dist/enums/TriggerActivity.d.ts +13 -0
  104. package/dist/enums/TriggerActivity.js +16 -0
  105. package/dist/index.d.ts +49 -0
  106. package/dist/index.js +69 -0
  107. package/dist/legacy/LegacyConfig.d.ts +24 -0
  108. package/dist/legacy/LegacyConfig.js +2 -0
  109. package/package.json +50 -0
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Defines the priority / visibility of the Android foreground-service notification.
3
+ *
4
+ * This affects how the notification appears in the status bar and how strongly
5
+ * the OS ranks it among other notifications.
6
+ *
7
+ * Mirrors Flutter’s `NotificationPriority` enum.
8
+ *
9
+ * @category Config
10
+ */
11
+ export declare const NotificationPriority: {
12
+ /** Default notification priority (normal weighting). */
13
+ readonly Default: 0;
14
+ /** Notification strongly weighted to top of list; icon strongly weighted to the left. */
15
+ readonly High: 1;
16
+ /** Notification weighted to bottom of list; icon weighted to the right. */
17
+ readonly Low: -1;
18
+ /** Same as {@link NotificationPriority.High}. */
19
+ readonly Max: 2;
20
+ /** Notification strongly weighted to bottom of list; icon hidden. */
21
+ readonly Min: -2;
22
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationPriority = void 0;
4
+ /**
5
+ * Defines the priority / visibility of the Android foreground-service notification.
6
+ *
7
+ * This affects how the notification appears in the status bar and how strongly
8
+ * the OS ranks it among other notifications.
9
+ *
10
+ * Mirrors Flutter’s `NotificationPriority` enum.
11
+ *
12
+ * @category Config
13
+ */
14
+ exports.NotificationPriority = {
15
+ /** Default notification priority (normal weighting). */
16
+ Default: 0,
17
+ /** Notification strongly weighted to top of list; icon strongly weighted to the left. */
18
+ High: 1,
19
+ /** Notification weighted to bottom of list; icon weighted to the right. */
20
+ Low: -1,
21
+ /** Same as {@link NotificationPriority.High}. */
22
+ Max: 2,
23
+ /** Notification strongly weighted to bottom of list; icon hidden. */
24
+ Min: -2,
25
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Persistence modes for BackgroundGeolocation SDK.
3
+ * Mirrors Flutter's `PersistMode` enum.
4
+ *
5
+ * @category Config
6
+ */
7
+ export declare const PersistMode: {
8
+ readonly All: 2;
9
+ readonly Location: 1;
10
+ readonly Geofence: -1;
11
+ readonly None: 0;
12
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PersistMode = void 0;
4
+ /**
5
+ * Persistence modes for BackgroundGeolocation SDK.
6
+ * Mirrors Flutter's `PersistMode` enum.
7
+ *
8
+ * @category Config
9
+ */
10
+ exports.PersistMode = {
11
+ All: 2,
12
+ Location: 1,
13
+ Geofence: -1,
14
+ None: 0
15
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Sort order for [[SQLQuery.order]].
3
+ *
4
+ * | Name | Value |
5
+ * |---------------|-------|
6
+ * | Asc | `1` |
7
+ * | Desc | `-1` |
8
+ *
9
+ * @category Logger
10
+ */
11
+ export declare const SQLQueryOrder: {
12
+ readonly Asc: 1;
13
+ readonly Desc: -1;
14
+ };
15
+ /** @hidden */
16
+ export type SQLQueryOrder = (typeof SQLQueryOrder)[keyof typeof SQLQueryOrder];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SQLQueryOrder = void 0;
4
+ /**
5
+ * Sort order for [[SQLQuery.order]].
6
+ *
7
+ * | Name | Value |
8
+ * |---------------|-------|
9
+ * | Asc | `1` |
10
+ * | Desc | `-1` |
11
+ *
12
+ * @category Logger
13
+ */
14
+ exports.SQLQueryOrder = {
15
+ Asc: 1,
16
+ Desc: -1,
17
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * SDK tracking mode (legacy RN values preserved).
3
+ *
4
+ * | Value | Name | Description |
5
+ * |------:|------------|-------------------------------|
6
+ * | 0 | Geofences | Monitor geofences only. |
7
+ * | 1 | Location | Monitor location + geofences. |
8
+ *
9
+ * @category Config
10
+ */
11
+ export declare const TrackingMode: {
12
+ readonly Geofences: 0;
13
+ readonly Location: 1;
14
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrackingMode = void 0;
4
+ /**
5
+ * SDK tracking mode (legacy RN values preserved).
6
+ *
7
+ * | Value | Name | Description |
8
+ * |------:|------------|-------------------------------|
9
+ * | 0 | Geofences | Monitor geofences only. |
10
+ * | 1 | Location | Monitor location + geofences. |
11
+ *
12
+ * @category Config
13
+ */
14
+ exports.TrackingMode = {
15
+ Geofences: 0,
16
+ Location: 1
17
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Allowed motion activity names that can trigger motion detection.
3
+ * Mirrors Flutter's TriggerActivity set.
4
+ *
5
+ * @category Config
6
+ */
7
+ export declare const TriggerActivity: {
8
+ readonly Walking: "walking";
9
+ readonly OnFoot: "on_foot";
10
+ readonly Running: "running";
11
+ readonly OnBicycle: "on_bicycle";
12
+ readonly InVehicle: "in_vehicle";
13
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TriggerActivity = void 0;
4
+ /**
5
+ * Allowed motion activity names that can trigger motion detection.
6
+ * Mirrors Flutter's TriggerActivity set.
7
+ *
8
+ * @category Config
9
+ */
10
+ exports.TriggerActivity = {
11
+ Walking: 'walking',
12
+ OnFoot: 'on_foot',
13
+ Running: 'running',
14
+ OnBicycle: 'on_bicycle',
15
+ InVehicle: 'in_vehicle'
16
+ };
@@ -0,0 +1,49 @@
1
+ export * from './enums/AuthorizationStatus';
2
+ export * from './enums/LogLevel';
3
+ export * from './enums/DesiredAccuracy';
4
+ export * from './enums/PersistMode';
5
+ export * from './enums/AuthorizationStrategy';
6
+ export * from './enums/LocationFilterPolicy';
7
+ export * from './enums/KalmanProfile';
8
+ export * from './enums/HttpMethod';
9
+ export * from './enums/TriggerActivity';
10
+ export * from './enums/NotificationPriority';
11
+ export * from './enums/MotionActivityType';
12
+ export * from './enums/TrackingMode';
13
+ export * from './enums/AccuracyAuthorization';
14
+ export * from './enums/LogLevelName';
15
+ export * from './enums/GeofenceAction';
16
+ export * from './enums/Event';
17
+ export * from './enums/ActivityType';
18
+ export * from './enums/LocationError';
19
+ export * from './enums/SQLQueryOrder';
20
+ export * from "./core/data/Location";
21
+ export * from './core/data/Geofence';
22
+ export * from "./core/data/DeviceInfo";
23
+ export * from './core/data/Sensors';
24
+ export * from "./core/events/Subscription";
25
+ export * from "./core/events/GeofenceEvent";
26
+ export * from "./core/events/AuthorizationEvent";
27
+ export * from "./core/events/MotionActivityEvent";
28
+ export * from "./core/events/HeadlessEvent";
29
+ export * from "./core/events/HeartbeatEvent";
30
+ export * from "./core/events/GeofencesChangeEvent";
31
+ export * from "./core/events/ConnectivityChangeEvent";
32
+ export * from "./core/events/MotionChangeEvent";
33
+ export * from "./core/events/ProviderChangeEvent";
34
+ export * from "./core/events/HttpEvent";
35
+ export * from './core/config/Config';
36
+ export * from './core/config/GeoConfig';
37
+ export * from './core/config/HttpConfig';
38
+ export * from './core/config/PersistenceConfig';
39
+ export * from './core/config/ActivityConfig';
40
+ export * from './core/config/AppConfig';
41
+ export * from './core/config/LoggerConfig';
42
+ export * from './core/config/AuthorizationConfig';
43
+ export * from './core/config/NotificationConfig';
44
+ export * from './core/config/LocationFilter';
45
+ export * from './core/api/BackgroundGeolocation';
46
+ export * from './core/api/State';
47
+ export * from './core/api/Logger';
48
+ export * from './core/api/DeviceSettings';
49
+ export * from './core/api/CurrentPositionRequest';
package/dist/index.js ADDED
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // enums
18
+ __exportStar(require("./enums/AuthorizationStatus"), exports);
19
+ __exportStar(require("./enums/LogLevel"), exports);
20
+ __exportStar(require("./enums/DesiredAccuracy"), exports);
21
+ __exportStar(require("./enums/PersistMode"), exports);
22
+ __exportStar(require("./enums/AuthorizationStrategy"), exports);
23
+ __exportStar(require("./enums/LocationFilterPolicy"), exports);
24
+ __exportStar(require("./enums/KalmanProfile"), exports);
25
+ __exportStar(require("./enums/HttpMethod"), exports);
26
+ __exportStar(require("./enums/TriggerActivity"), exports);
27
+ __exportStar(require("./enums/NotificationPriority"), exports);
28
+ __exportStar(require("./enums/MotionActivityType"), exports);
29
+ __exportStar(require("./enums/TrackingMode"), exports);
30
+ __exportStar(require("./enums/AccuracyAuthorization"), exports);
31
+ __exportStar(require("./enums/LogLevelName"), exports);
32
+ __exportStar(require("./enums/GeofenceAction"), exports);
33
+ __exportStar(require("./enums/Event"), exports);
34
+ __exportStar(require("./enums/ActivityType"), exports);
35
+ __exportStar(require("./enums/LocationError"), exports);
36
+ __exportStar(require("./enums/SQLQueryOrder"), exports);
37
+ // events/data
38
+ __exportStar(require("./core/data/Location"), exports);
39
+ __exportStar(require("./core/data/Geofence"), exports);
40
+ __exportStar(require("./core/data/DeviceInfo"), exports);
41
+ __exportStar(require("./core/data/Sensors"), exports);
42
+ __exportStar(require("./core/events/Subscription"), exports);
43
+ __exportStar(require("./core/events/GeofenceEvent"), exports);
44
+ __exportStar(require("./core/events/AuthorizationEvent"), exports);
45
+ __exportStar(require("./core/events/MotionActivityEvent"), exports);
46
+ __exportStar(require("./core/events/HeadlessEvent"), exports);
47
+ __exportStar(require("./core/events/HeartbeatEvent"), exports);
48
+ __exportStar(require("./core/events/GeofencesChangeEvent"), exports);
49
+ __exportStar(require("./core/events/ConnectivityChangeEvent"), exports);
50
+ __exportStar(require("./core/events/MotionChangeEvent"), exports);
51
+ __exportStar(require("./core/events/ProviderChangeEvent"), exports);
52
+ __exportStar(require("./core/events/HttpEvent"), exports);
53
+ // config groups
54
+ __exportStar(require("./core/config/Config"), exports);
55
+ __exportStar(require("./core/config/GeoConfig"), exports);
56
+ __exportStar(require("./core/config/HttpConfig"), exports);
57
+ __exportStar(require("./core/config/PersistenceConfig"), exports);
58
+ __exportStar(require("./core/config/ActivityConfig"), exports);
59
+ __exportStar(require("./core/config/AppConfig"), exports);
60
+ __exportStar(require("./core/config/LoggerConfig"), exports);
61
+ __exportStar(require("./core/config/AuthorizationConfig"), exports);
62
+ __exportStar(require("./core/config/NotificationConfig"), exports);
63
+ __exportStar(require("./core/config/LocationFilter"), exports);
64
+ // Primary API
65
+ __exportStar(require("./core/api/BackgroundGeolocation"), exports);
66
+ __exportStar(require("./core/api/State"), exports);
67
+ __exportStar(require("./core/api/Logger"), exports);
68
+ __exportStar(require("./core/api/DeviceSettings"), exports);
69
+ __exportStar(require("./core/api/CurrentPositionRequest"), exports);
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Historic, flat configuration surface.
3
+ *
4
+ * @deprecated Use {@link Config} groups instead:
5
+ * geolocation, http, persistence, activity, app, logger, authorization, notification.
6
+ *
7
+ * Full documentation intentionally preserved for hover/TypeDoc.
8
+ * @example
9
+ * ```ts
10
+ * import { LegacyConfig } from 'background-geolocation-types';
11
+ * const config: LegacyConfig = {
12
+ * desiredAccuracy: 10,
13
+ * distanceFilter: 50,
14
+ * stopOnTerminate: false,
15
+ * // ...etc
16
+ * };
17
+ * ```
18
+ * @category Config
19
+ */
20
+ export interface LegacyConfig {
21
+ desiredAccuracy?: number;
22
+ distanceFilter?: number;
23
+ stopOnTerminate?: boolean;
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@transistorsoft/background-geolocation-types",
3
+ "version": "5.0.0-beta.1",
4
+ "type": "commonjs",
5
+ "description": "Shared TypeScript type definitions and documentation for Transistor Software's Background Geolocation SDKs (React Native, Capacitor, Cordova)",
6
+ "author": "Transistor Software <info@transistorsoft.com>",
7
+ "license": "SEE LICENSE IN LICENSE",
8
+ "homepage": "https://github.com/transistorsoft/background-geolocation",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/transistorsoft/background-geolocation.git",
12
+ "directory": "packages/background-geolocation-types"
13
+ },
14
+ "keywords": [
15
+ "typescript",
16
+ "types",
17
+ "background-geolocation",
18
+ "react-native",
19
+ "capacitor",
20
+ "cordova",
21
+ "geolocation",
22
+ "transistorsoft"
23
+ ],
24
+ "types": "./dist/index.d.ts",
25
+ "main": "./dist/index.js",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "default": "./dist/index.js"
30
+ }
31
+ },
32
+ "sideEffects": false,
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "scripts": {
37
+ "clean": "rimraf dist",
38
+ "build": "tsc -p tsconfig.json",
39
+ "watch": "tsc -p tsconfig.json -w",
40
+ "prepare": "pnpm run build",
41
+ "docs": "typedoc --options typedoc.json"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^24.10.0",
45
+ "rimraf": "^5.0.0",
46
+ "typedoc": "^0.28.14",
47
+ "typedoc-plugin-markdown": "^4.9.0",
48
+ "typescript": "^5.6.0"
49
+ }
50
+ }