import { type Building, type BuildingInfo, type ConfigurationOptions, type DirectionsOptions, type Error, type Floor, type Geofence, InternalCall, type Location, type LocationRequest, type LocationStatus, type NavigationProgress, type NavigationRequest, type Poi, type PoiCategory, type PoiIcon, type Point, type Route, type SdkVersion, TextToSpeechMessage, type UserHelperOptions } from "./types"; export * from "./types"; export * from "./types/constants"; export default class SitumPlugin { /** * Whether the positioning is currently in execution. * @returns boolean */ static positioningIsRunning: () => boolean; /** * Whether the navigation is currently in execution. * @returns boolean */ static navigationIsRunning: () => boolean; /** * Initializes {@link SitumPlugin}. * * This method must be called before invoking any other methods. * This method can be safely called many times as it will only initialise the SDK * if it is not already initialised. * * @returns void * @throws Exception */ static init: () => void; /** * Provides your API key to the Situm SDK. * * This key is generated for your application in the Dashboard. * Old credentials will be removed. * * @param apiKey user's apikey. * * @returns Promise that resolves when the API key is set, and rejects if the * native SDK rejects it. */ static setApiKey: (apiKey: string) => Promise; /** * Provides your token to the Situm SDK. Any previously configured credentials will be replaced. * The SDK does not cryptographically validate the token signature, nor does it verify the * token against Situm servers when this method is called. The token is parsed locally only to * obtain the account information needed by the SDK, and it will be sent as a Bearer token in * subsequent authenticated network requests. * * If the provided token is expired, has an invalid signature, or is otherwise rejected by * Situm servers, network operations that require server authentication will fail. However, * features that can operate with already cached local data may continue to work, such as * visualizing cached resources or positioning with previously downloaded positioning data. * * User-provided tokens cannot be renewed automatically by the SDK. To recover from an * expired or rejected token, provide a new token by calling this method again. * * @param token JWT token used for authentication. * The expected format is a base64-encoded JWT with header, payload and signature sections. * This token can be retrieved from [a REST endpoint](https://developers.situm.com/pages/rest/openapi/#tag/jwt/POST/api/v1/auth/access_tokens). * * @returns Promise that resolves when the token is set, and rejects if the * native SDK rejects it. */ static setToken: (token: string) => Promise; /** * Provides user's email and password. This credentials will be used to obtain a * valid user token to authenticate the server request, when necessary. Token * obtaining is not necessary done when this method is executed. Old credentials * will be removed. * * @param email user's email. * @param password user's password. * * @returns Promise that resolves when the credentials are set, and rejects if * the native SDK rejects them. */ static setUserPass: (email: string, password: string) => Promise; /** * Sets the API's base URL to retrieve the data. * * @param url Base URL of the Situm API, including the protocol and the domain. * * @returns void * @throws Exception if the URL is empty. */ static setDashboardURL: (url: string) => void; /** * Set to true if you want the SDK to download the configuration from the Situm API * and use it by default. Right now it only affects the {@link LocationRequest}. * Default value is true from SDK version 2.83.5 * * @param useRemoteConfig * * @returns Promise that resolves when the setting is applied. */ static setUseRemoteConfig: (useRemoteConfig: boolean) => Promise; /** * Sets the max seconds the cache is valid * * @returns Promise that resolves when the cache max age is set, and rejects if * the native SDK rejects it. */ private static setMaxCacheAge; /** * Sets the SDK {@link ConfigurationOptions}. * * @param options {@link ConfigurationOptions} * * @returns Promise that resolves when the configuration is applied, and rejects * if the native SDK rejects any of the options. */ static setConfiguration: (options: ConfigurationOptions) => Promise; /** * Invalidate all the resources in the cache * * @returns void * @throws Exception */ static invalidateCache: () => void; /** * @deprecated * DEPRECATED: this method will not work anymore. * * Gets the list of versions for the current plugin and environment * * @returns void * @throws Exception */ static sdkVersion: () => SdkVersion; /** * Returns the device identifier that has generated the location */ static getDeviceId: () => Promise; /** * Downloads all the {@link Building}s for the current user. */ static fetchBuildings: () => Promise; /** * Downloads all the building data for the selected building. This info includes * {@link Floor}, indoor and outdoor {@link Poi}s, events and paths. Also it download floor * maps and {@link PoiCategory} icons to local storage. * * @param building {@link Building} */ static fetchBuildingInfo: (building: Building) => Promise; /** * (Experimental) Downloads the tiled-map of a certain building * * @param building {@link Building} whose tiles will be downloaded */ static fetchTilesFromBuilding: (building: Building) => Promise; /** * Downloads all the floors of a building * * @param building {@link Building} */ static fetchFloorsFromBuilding: (building: Building) => Promise; /** * Downloads the map image of a {@link Floor} * * @param floor {@link Floor} */ static fetchMapFromFloor: (floor: Floor) => Promise; /** * Get the geofences of a {@link Building} * * @param building {@link Building} */ static fetchGeofencesFromBuilding: (building: Building) => Promise; /** * Get all {@link PoiCategory}, download and cache their icons asynchronously. */ static fetchPoiCategories: () => Promise; /** * Get the normal {@link PoiIcon} for a category * * @param category {@link PoiCategory}. Not null. */ static fetchPoiCategoryIconNormal: (category: PoiCategory) => Promise; /** * Get the selected {@link PoiIcon} for a {@link PoiCategory} * * @param category {@link PoiCategory}. Not null. */ static fetchPoiCategoryIconSelected: (category: PoiCategory) => Promise; /** * Download the indoor {@link Poi}s of a {@link Building} * * @param building {@link Building} */ static fetchIndoorPOIsFromBuilding: (building: Building) => Promise; /** * Download the outdoor {@link Poi}s of a {@link Building} * * @param building {@link Building} */ static fetchOutdoorPOIsFromBuilding: (building: Building) => Promise; /** * Starts positioning. * * @param {LocationRequest} locationRequest Positioning options to configure how positioning will behave */ static requestLocationUpdates: (locationRequest?: LocationRequest) => void; /** * Stops positioning, removing all location updates * * @returns Promise that resolves when positioning is stopped, and rejects if * the native positioning stop operation fails. */ static removeLocationUpdates: () => Promise; /** * Calculates a route between two points. The result is provided * asynchronously using the callback. * * @param building {@link Building} * @param from {@link Point} route origin * @param to {@link Point} route destination * @param directionOptions {@link DirectionsOptions} */ static requestDirections: (building: Building, from: Point | Location, to: Point | Poi, directionOptions?: DirectionsOptions) => Promise; /** * Set the navigation params, and the listener that receives the updated * navigation progress. * * Can only exist one navigation with one listener at a time. If this method was * previously invoked, but removeLocationUpdates() wasn't, removeLocationUpdates() * is called internally. * * @param options {@link NavigationRequest} */ static requestNavigationUpdates: (options?: NavigationRequest) => void; /** * Informs NavigationManager object the change of the user's location * * @param location new {@link Location} of the user. If null, nothing is done * @returns Promise that resolves when the navigation is updated, and rejects if * the native SDK fails to update it. * @throws Exception if there is no active navigation. */ static updateNavigationWithLocation: (location: Location) => Promise; /** * Removes all location updates. This removes the internal state of the manager, * including the listener provided in requestNavigationUpdates(NavigationRequest, * NavigationListener), so it won't receive more progress updates. * */ static removeNavigationUpdates: () => Promise; /** * Requests a real time devices positions * * @param realtimeUpdates callback to use when new device positions are updated * @param error callback to use when an error on navigation udpates raises * @param options Represents the configuration for getting realtime devices positions in */ static requestRealTimeUpdates: (realtimeUpdates: (event: any) => void, error?: (event: any) => void, options?: any) => void; /** * Removes all real time updates listners. * * @param _callback */ static removeRealTimeUpdates: (_callback?: Function) => void; /** * Checks if a point is inside a {@link Geofence} * */ static checkIfPointInsideGeofence: (request: any, callback?: (response: { isInsideGeofence: boolean; geofence: any; }) => void) => void; /** * Automatically assists users in resolving app-related permission and sensor issues. * * This method tells the native SDKs to present a user interface that explains detected * configuration issues and guides users through the required steps to resolve them, * following best practices for runtime permission requests. * * Issues addressed include: * - Missing permissions for Location or Bluetooth. * - Disabled Location or Bluetooth sensors. * * Use the userHelperOptions parameter to configure the available options. * Call {@link enableUserHelper} as a shortcut to enable the user helper with default configuration. * Call {@link disableUserHelper} as a shortcut to disable the user helper. * * @param {UserHelperOptions} userHelperOptions - Options for the user helper. * @returns Promise that resolves when the user helper is configured, and rejects * if the native SDK fails to configure it. */ static configureUserHelper: (userHelperOptions: UserHelperOptions) => Promise; /** * Enables the user helper. * * Shortcut for {@link configureUserHelper} with {enabled: true}. * * @returns The Promise returned by {@link configureUserHelper}. */ static enableUserHelper: () => Promise; /** * Disables the user helper. * * Shortcut for {@link configureUserHelper} with {enabled: false}. * * @returns The Promise returned by {@link configureUserHelper}. */ static disableUserHelper: () => Promise; /** * INTERNAL METHOD. * * Update SDK with the viewer navigation states. * Do not use this method as it is intended for internal use * by the map viewer module. * * @param externalNavigation */ static updateNavigationState: (externalNavigation: Map) => void; /** * INTERNAL METHOD. * * Ask sdk to start sharing its location. * Do not use this method as it is intended for internal use * by the map viewer module. * */ static startShareLiveLocation: (options: any) => void; /** * INTERNAL METHOD. * * Ask sdk to stop sharing its location. * Do not use this method as it is intended for internal use * by the map viewer module. * */ static stopShareLiveLocation: () => void; /** * INTERNAL METHOD. * * Validate if the mapView internal settings have been properly configured * Do not use this method as it is intended for internal use * by the map viewer module. * */ static validateMapViewProjectSettings: () => void; /** * INTERNAL METHOD. * * Set a native MethodCall delegate. Do not use this method as it is intended for internal use by the map viewer module. * @param callback */ static internalSetMethodCallMapDelegate: (callback: (internalCall: InternalCall) => void) => void; /** * INTERNAL METHOD. * * Internal method that handles the required logic to speak aloud MapView messages. * * @param message The message that will be spoken aloud. See {@link TextToSpeechMessage} */ static speakAloudText: (message: TextToSpeechMessage) => void; /** * Callback that notifies when the user enters a {@link Geofence}. * * In order to use correctly these callbacks you must know the following: * - Positioning geofences (with trainer_metadata custom field) won't be notified. * - These callbacks only work with indoor locations. Any outdoor location will * produce a call to onExitedGeofences with the last positioned geofences as argument. * * @param callback the function called when the user enters a {@link Geofence} */ static onEnterGeofences: (callback: (event: Geofence) => void) => void; /** * Callback that notifies when the user exits a {@link Geofence}. * * In order to use correctly these callbacks you must know the following: * - Positioning geofences (with trainer_metadata custom field) won't be notified. * - These callbacks only work with indoor locations. Any outdoor location will * produce a call to onExitedGeofences with the last positioned geofences as argument. * * @param callback the function called when the user exits a {@link Geofence} */ static onExitGeofences: (callback: (event: Geofence) => void) => void; /** * Callback that notifies when the user {@link Location} changes. * * @param callback the function called when the user {@link Location} changes */ static onLocationUpdate: (callback: (location: Location) => void) => void; /** * Callback that notifies when the user {@link LocationStatus} changes. * * @param callback the function called when the user {@link LocationStatus} changes */ static onLocationStatus: (callback: (status: LocationStatus) => void) => void; /** * Callback that notifies when there is an error while the user is positioining. * * @param callback the function called when there is an error */ static onLocationError: (callback: (error: Error) => void) => void; /** * Callback that notifies when the user stops positioning. * * @param callback the function called when the user stops positioning. */ static onLocationStopped: (callback: () => void) => void; /** * Callback that notifies when navigation starts. * * @param callback a function that returns the initial {@link Route} by parameters. */ static onNavigationStart: (callback: (route: Route) => void) => void; /** * Callback that notifies every progress the user makes while navigating. * * @param callback a function that returns the {@link NavigationProgress} by parameters. */ static onNavigationProgress: (callback: (progress: NavigationProgress) => void) => void; /** * Callback that notifies when the user reaches the destination POI. * * @param callback a function that returns the completed {@link Route} by parameters. */ static onNavigationDestinationReached: (callback: (route: Route) => void) => void; /** * Callback that notifies when the user gets out of the current route. * * @param callback the function called when the user gets out of the current route. */ static onNavigationOutOfRoute: (callback: () => void) => void; /** * @deprecated * DEPRECATED: Use instead onNavigationCancellation() * and onNavigationDestinationReached() to determine why did the navigation end. * * Callback that notifies when the user finishes the route. * * @param callback the function called when the user finishes the route. */ static onNavigationFinished: (callback: () => void) => void; /** * Callback that notifies when the user does cancel the navigation. * * @param callback the function called when the user cancels the navigation. */ static onNavigationCancellation: (callback: () => void) => void; /** * Callback that notifies when there is an error during navigation. * * @param callback the function called when there is an error during navigation. */ static onNavigationError: (callback: (error: any) => void) => void; } //# sourceMappingURL=index.d.ts.map