starti.app 2.0.52 → 2.0.53

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.
@@ -15,26 +15,28 @@ export declare class Location extends EventTargetWithType<{
15
15
  * @param options - The options for retrieving the location.
16
16
  * @returns A promise that resolves to the current location.
17
17
  */
18
- getLocation(options?: LocationOptions): Promise<LocationDto>;
18
+ getLocation: (options?: LocationOptions) => Promise<LocationDto>;
19
19
  /**
20
20
  * Starts the location listener.
21
21
  *
22
22
  * @param options - The options for location listening.
23
23
  * @returns A promise that resolves when the location listener has started.
24
24
  */
25
- startLocationListener(options?: LocationListeningOptions): Promise<boolean>;
25
+ startLocationListener: (options?: LocationListeningOptions) => Promise<boolean>;
26
26
  /**
27
27
  * Checks if the location listener is active.
28
28
  * @returns True if the location listener is active, false otherwise.
29
29
  */
30
- isLocationListenerActive(): Promise<boolean>;
30
+ isLocationListenerActive: () => Promise<boolean>;
31
31
  /**
32
32
  * Stops the location listener.
33
33
  */
34
- stopLocationListener(): Promise<void>;
35
- createGeofence(region: GeofenceRegion): Promise<void>;
36
- removeGeofence(region: GeofenceRegion): Promise<void>;
37
- getGeofences(): Promise<GeofenceRegion[]>;
34
+ stopLocationListener: () => Promise<void>;
35
+ createGeofence: (region: GeofenceRegion) => Promise<void>;
36
+ removeGeofence: (region: GeofenceRegion) => Promise<void>;
37
+ getGeofences: () => Promise<GeofenceRegion[]>;
38
+ requestAccess: () => Promise<PermissionStatus>;
39
+ checkAccess: () => Promise<PermissionStatus>;
38
40
  private onListeningFailed;
39
41
  private onLocationChanged;
40
42
  private onGeofenceEvent;
@@ -56,4 +56,7 @@ export interface GeofenceRegion {
56
56
  notifyOnEntry?: boolean;
57
57
  notifyOnExit?: boolean;
58
58
  }
59
+ export interface PermissionStatus {
60
+ granted: boolean;
61
+ }
59
62
  export type GeofenceState = "entered" | "exited" | "unknown";
@@ -119,6 +119,8 @@ type LocationIntegration = {
119
119
  createGeofence(region: GeofenceRegion): void;
120
120
  removeGeofence(region: GeofenceRegion): void;
121
121
  getGeofences(): GeofenceRegion[];
122
+ requestAccess(): PermissionStatus;
123
+ checkAccess(): PermissionStatus;
122
124
  };
123
125
  export type Integrations = {
124
126
  "AppIntegration": AppIntegration;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "starti.app",
3
3
  "author": "starti.app",
4
4
  "license": "MIT",
5
- "version": "2.0.52",
5
+ "version": "2.0.53",
6
6
  "description": "Use this package for easy communication with the starti.app API.",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",