@situm/react-native 3.15.0-beta.2 → 3.15.0-beta.3

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 (49) hide show
  1. package/lib/commonjs/index.js +73 -0
  2. package/lib/commonjs/sdk/index.js +931 -0
  3. package/lib/commonjs/sdk/internaDelegatedState.js +48 -0
  4. package/lib/commonjs/sdk/nativeInterface.js +20 -0
  5. package/lib/commonjs/sdk/types/constants.js +73 -0
  6. package/lib/commonjs/sdk/types/index.js +414 -0
  7. package/lib/commonjs/sdk/utils.js +156 -0
  8. package/lib/commonjs/utils/index.js +17 -0
  9. package/lib/commonjs/utils/logError.js +21 -0
  10. package/lib/commonjs/wayfinding/components/MapView.js +389 -0
  11. package/lib/commonjs/wayfinding/components/MapView.js.map +1 -0
  12. package/lib/commonjs/wayfinding/hooks/index.js +233 -0
  13. package/lib/commonjs/wayfinding/hooks/index.js.map +1 -0
  14. package/lib/commonjs/wayfinding/index.js +57 -0
  15. package/lib/commonjs/wayfinding/store/index.js +247 -0
  16. package/lib/commonjs/wayfinding/store/index.js.map +1 -0
  17. package/lib/commonjs/wayfinding/store/utils.js +49 -0
  18. package/lib/commonjs/wayfinding/store/utils.js.map +1 -0
  19. package/lib/commonjs/wayfinding/types/constants.js +13 -0
  20. package/lib/commonjs/wayfinding/types/constants.js.map +1 -0
  21. package/lib/commonjs/wayfinding/types/index.js +6 -0
  22. package/lib/commonjs/wayfinding/utils/index.js +12 -0
  23. package/lib/commonjs/wayfinding/utils/mapper.js +204 -0
  24. package/lib/module/index.js +14 -0
  25. package/lib/module/sdk/index.js +904 -0
  26. package/lib/module/sdk/index.js.map +1 -0
  27. package/lib/module/sdk/internaDelegatedState.js +43 -0
  28. package/lib/module/sdk/nativeInterface.js +20 -0
  29. package/lib/module/sdk/types/constants.js +70 -0
  30. package/lib/module/sdk/types/index.js +445 -0
  31. package/lib/module/sdk/utils.js +146 -0
  32. package/lib/module/utils/index.js +4 -0
  33. package/lib/module/utils/logError.js +17 -0
  34. package/lib/module/utils/logError.js.map +1 -0
  35. package/lib/module/wayfinding/components/MapView.js +381 -0
  36. package/lib/module/wayfinding/components/MapView.js.map +1 -0
  37. package/lib/module/wayfinding/hooks/index.js +226 -0
  38. package/lib/module/wayfinding/hooks/index.js.map +1 -0
  39. package/lib/module/wayfinding/index.js +15 -0
  40. package/lib/module/wayfinding/store/index.js +213 -0
  41. package/lib/module/wayfinding/store/index.js.map +1 -0
  42. package/lib/module/wayfinding/store/utils.js +40 -0
  43. package/lib/module/wayfinding/store/utils.js.map +1 -0
  44. package/lib/module/wayfinding/types/constants.js +9 -0
  45. package/lib/module/wayfinding/types/index.js +4 -0
  46. package/lib/module/wayfinding/types/index.js.map +1 -0
  47. package/lib/module/wayfinding/utils/index.js +7 -0
  48. package/lib/module/wayfinding/utils/mapper.js +195 -0
  49. package/package.json +3 -3
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DelegatedStateManager = void 0;
7
+ // Internal state forwarded to the MapView as soon as possible.
8
+
9
+ class DelegatedStateManager {
10
+ state = {
11
+ location: null,
12
+ status: null,
13
+ error: null
14
+ };
15
+ constructor() {}
16
+ static getInstance() {
17
+ if (!DelegatedStateManager.instance) {
18
+ DelegatedStateManager.instance = new DelegatedStateManager();
19
+ }
20
+ return DelegatedStateManager.instance;
21
+ }
22
+ updateLocation(location) {
23
+ this.state = {
24
+ location,
25
+ status: null,
26
+ error: null
27
+ };
28
+ }
29
+ updateStatus(status) {
30
+ this.state = {
31
+ location: null,
32
+ status,
33
+ error: null
34
+ };
35
+ }
36
+ updateError(error) {
37
+ this.state = {
38
+ location: null,
39
+ status: null,
40
+ error
41
+ };
42
+ }
43
+ getValues() {
44
+ return this.state;
45
+ }
46
+ }
47
+ exports.DelegatedStateManager = DelegatedStateManager;
48
+ //# sourceMappingURL=internaDelegatedState.js.map
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ var _reactNative = require("react-native");
4
+ const {
5
+ RNCSitumPlugin
6
+ } = _reactNative.NativeModules;
7
+ if (!RNCSitumPlugin) {
8
+ throw new Error("react-native-situm-plugin: NativeModule is null");
9
+ }
10
+ let nativeEventEmitter = null;
11
+ module.exports = {
12
+ RNCSitumPlugin,
13
+ get SitumPluginEventEmitter() {
14
+ if (!nativeEventEmitter) {
15
+ nativeEventEmitter = new _reactNative.NativeEventEmitter(RNCSitumPlugin);
16
+ }
17
+ return nativeEventEmitter;
18
+ }
19
+ };
20
+ //# sourceMappingURL=nativeInterface.js.map
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SdkNavigationUpdateType = exports.NavigationUpdateType = exports.NavigationStatus = exports.LocationStatusName = exports.InternalCallType = exports.CUSTOM_DESTINATION_LOCATION_ID = exports.CURRENT_USER_LOCATION_ID = exports.AccessibilityMode = void 0;
7
+ let NavigationStatus = exports.NavigationStatus = /*#__PURE__*/function (NavigationStatus) {
8
+ NavigationStatus["START"] = "start";
9
+ NavigationStatus["STOP"] = "stop";
10
+ NavigationStatus["OUT_OF_ROUTE"] = "outOfRoute";
11
+ NavigationStatus["UPDATE"] = "update";
12
+ return NavigationStatus;
13
+ }({});
14
+ let NavigationUpdateType = exports.NavigationUpdateType = /*#__PURE__*/function (NavigationUpdateType) {
15
+ NavigationUpdateType["PROGRESS"] = "PROGRESS";
16
+ NavigationUpdateType["OUT_OF_ROUTE"] = "OUT_OF_ROUTE";
17
+ NavigationUpdateType["DESTINATION_REACHED"] = "DESTINATION_REACHED";
18
+ NavigationUpdateType["CANCELLED"] = "CANCELLED";
19
+ return NavigationUpdateType;
20
+ }({});
21
+ let SdkNavigationUpdateType = exports.SdkNavigationUpdateType = /*#__PURE__*/function (SdkNavigationUpdateType) {
22
+ SdkNavigationUpdateType["START"] = "onNavigationStart";
23
+ SdkNavigationUpdateType["PROGRESS"] = "onNavigationProgress";
24
+ SdkNavigationUpdateType["FINISHED"] = "onNavigationFinished";
25
+ SdkNavigationUpdateType["DESTINATION_REACHED"] = "onNavigationDestinationReached";
26
+ SdkNavigationUpdateType["OUTSIDE_ROUTE"] = "onUserOutsideRoute";
27
+ SdkNavigationUpdateType["CANCELLATION"] = "onNavigationCancellation";
28
+ SdkNavigationUpdateType["ERROR"] = "onNavigationError";
29
+ return SdkNavigationUpdateType;
30
+ }({});
31
+ let LocationStatusName = exports.LocationStatusName = /*#__PURE__*/function (LocationStatusName) {
32
+ LocationStatusName["STARTING"] = "STARTING";
33
+ // CALCULATING: removed! The viewer will process STARTING status, not CALCULATING.
34
+ // We want to send the last (valid) known status to the viewer as soon as it is
35
+ // loaded. If we overwrite the STARTING status with CALCULATING, the viewer will not
36
+ // proccess it and it won't show the "positioning..." UI.
37
+ LocationStatusName["USER_NOT_IN_BUILDING"] = "USER_NOT_IN_BUILDING";
38
+ LocationStatusName["STOPPED"] = "STOPPED";
39
+ return LocationStatusName;
40
+ }({});
41
+ /**
42
+ * Available accessibility modes used in the {@link DirectionsRequest}.
43
+ *
44
+ * @property CHOOSE_SHORTEST The route should choose the best route, without taking into account if it is accessible or not.
45
+ * This option is the default so you don't have to do anything in order to use it
46
+ * @property ONLY_ACCESSIBLE The route should always use accessible nodes.
47
+ * @property ONLY_NOT_ACCESSIBLE_FLOOR_CHANGES The route should never use accessible floor changes (use this to force routes not to use lifts).
48
+ */
49
+ let AccessibilityMode = exports.AccessibilityMode = /*#__PURE__*/function (AccessibilityMode) {
50
+ AccessibilityMode["CHOOSE_SHORTEST"] = "CHOOSE_SHORTEST";
51
+ AccessibilityMode["ONLY_ACCESSIBLE"] = "ONLY_ACCESSIBLE";
52
+ AccessibilityMode["ONLY_NOT_ACCESSIBLE_FLOOR_CHANGES"] = "ONLY_NOT_ACCESSIBLE_FLOOR_CHANGES";
53
+ return AccessibilityMode;
54
+ }({});
55
+ let InternalCallType = exports.InternalCallType = /*#__PURE__*/function (InternalCallType) {
56
+ InternalCallType["LOCATION"] = "LOCATION";
57
+ InternalCallType["LOCATION_STATUS"] = "LOCATION_STATUS";
58
+ InternalCallType["LOCATION_ERROR"] = "LOCATION_ERROR";
59
+ InternalCallType["LOCATION_STOPPED"] = "LOCATION_STOPPED";
60
+ // TODO: Exists only in RN, delete!
61
+ InternalCallType["NAVIGATION_START"] = "NAVIGATION_START";
62
+ InternalCallType["NAVIGATION_DESTINATION_REACHED"] = "NAVIGATION_DESTINATION_REACHED";
63
+ InternalCallType["NAVIGATION_PROGRESS"] = "NAVIGATION_PROGRESS";
64
+ InternalCallType["NAVIGATION_OUT_OF_ROUTE"] = "NAVIGATION_OUT_OF_ROUTE";
65
+ InternalCallType["NAVIGATION_CANCELLATION"] = "NAVIGATION_CANCELLATION";
66
+ InternalCallType["NAVIGATION_ERROR"] = "NAVIGATION_ERROR";
67
+ InternalCallType["GEOFENCES_ENTER"] = "GEOFENCES_ENTER";
68
+ InternalCallType["GEOFENCES_EXIT"] = "GEOFENCES_EXIT";
69
+ return InternalCallType;
70
+ }({});
71
+ const CURRENT_USER_LOCATION_ID = exports.CURRENT_USER_LOCATION_ID = -1;
72
+ const CUSTOM_DESTINATION_LOCATION_ID = exports.CUSTOM_DESTINATION_LOCATION_ID = -2;
73
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,414 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InternalCall = exports.ForegroundServiceNotificationsTapAction = exports.ErrorType = exports.ErrorCode = void 0;
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+ /**
9
+ * @name Building
10
+ * @description A Building object definition
11
+ *
12
+ * @property {string} buildingIdentifier - The unique identifier of the resource
13
+ * @property {string} name - The building name that is appropriate for display to the user.
14
+ * @property {string} address - Te building address.
15
+ * @property {Bounds} bounds - Compute corners of this building, without rotation, in earth coordinates.
16
+ * @property {Bounds} boundsRotated - Compute corners of this building, with rotation, in earth coordinates.
17
+ * @property {Coordinate} center - Center of the building's base, as geographical coordinate.
18
+ * @property {Dimensions} Dimensions - Dimensions of building's base (height and width) in meters.
19
+ * @property {string} infoHtml - Additional information about building, formatted with HTML
20
+ * @property {string} pictureThumbUrl - The URL of building thumbnail image
21
+ * @property {string} pictureUrl - The URL of building image
22
+ * @property {number} rotation - Rotation angle of the building's base, relative to the west-east axis, increasing in counter-clockwise, being 0 the west-east axis.
23
+ * @property {string} userIdentifier - Unique identifier of the owner user of the building
24
+ * @property {object} customFields - Map of custom fields, indexed by their name.
25
+ */
26
+ /**
27
+ * @name BuildingInfo
28
+ * @description Full information of a building
29
+ *
30
+ * @property {Building} building - Building basic information
31
+ * @property {Floor[]} floors - Array with the information of each floor
32
+ * @property {Poi[]} indoorPOIs - Array with the information of each indoor POI
33
+ * @property {Poi[]} outdoorPOIs - Array with the information of each outdoor POI
34
+ * @property {Geofence} geofences - Array with the information of each geofence
35
+ */
36
+ /** @name Bounds
37
+ * @description Represents a rectangle bounds in a greographic 2D space.
38
+ *
39
+ * @property {Coordinate} northEast - The coordinate of the north-east corner of the bound.
40
+ * @property {Coordinate} northWest - The coordinate of the north-west corner of the bound.
41
+ * @property {Coordinate} southEast - The coordinate of the south-east corner of the bound.
42
+ * @property {Coordinate} southWest - The coordinate of the south-east corner of the bound.
43
+ */
44
+ /** @name Dimensions
45
+ * @description Define 2D dimensions of a rectangular area.
46
+ *
47
+ * @property {number} width - Width of rectangle in meters
48
+ * @property {number} height - Height of rectangle in meters.
49
+ */
50
+ /**
51
+ * @name Coordinate
52
+ * @description A structure that contains geographical coordinate.
53
+ *
54
+ * @property {number} latitude - Latitude in degrees
55
+ * @property {number} longitude - Longitude in degrees
56
+ */
57
+ /**
58
+ * @name CartesianCoordinate
59
+ * @description A structure that contains cartesian coordinate.
60
+ *
61
+ * @property {number} x - Value of coordinate at x-axis
62
+ * @property {number} y - Value of coordinate at y-axis
63
+ */
64
+ /**
65
+ * @name Floor
66
+ * @description Floor of a building.
67
+ *
68
+ * @property {number} altitude - Altitude of the floor above ground level, in meters.
69
+ * @property {string} buildingIdentifier - The identifier of building which this floor belongs.
70
+ * @property {number} level - The number of the floor.
71
+ * @property {string} name - The name of the floor
72
+ * @property {string} mapUrl - The floor map image url
73
+ * @property {number} scale - The scale of the floor image, in px/meters
74
+ * @property {string} floorIdentifier - The unique identifier of the resource
75
+ */
76
+ /**
77
+ * @name POI
78
+ * @description Point of Interest, associated to a building, regardless of whether it's place inside or outside the building.
79
+ *
80
+ * @property {string} identifier - The unique identifier of the resource
81
+ * @property {string} buildingIdentifier - Identifier of building to which the POI belongs.
82
+ * @property {CartesianCoordinate} cartesianCoordinate - Cartesian coordinate of this position, relative to building {@link Bounds}.
83
+ * @property {Coordinate} coordinate - Geographical coordinate of this position
84
+ * @property {string} floorIdentifier - If this POI is outside the building (isOutdoor == true), this field has no meaning.
85
+ * @property {string} poiName - A name for the POI, appropriate for display to the user.
86
+ * @property {Point} position - {@link Point} where the point is located.
87
+ * @property {boolean} isIndoor - Whether the POI is placed outside the building or not.
88
+ * @property {boolean} isOutdoor - Whether the POI is placed outside the building or not.
89
+ * @property {PoiCategory} category - Category of the POI
90
+ * @property {string} infoHtml - Additional information about POI, in HTML
91
+ * @property {object} customFields - Map of custom fields, indexed by their name.
92
+ */
93
+ /**
94
+ * @name Geofence
95
+ * @description Point of Interest, associated to a building, regardless of whether it's place inside or outside the building.
96
+ *
97
+ * @property {string} identifier - The unique identifier of the resource
98
+ * @property {string} buildingIdentifier - Identifier of building to which the POI belongs.
99
+ * @property {string} floorIdentifier - If this POI is outside the building (isOutdoor == true), this field has no meaning.
100
+ * @property {string} name - A name for the geofence, appropriate for display to the user.
101
+ * @property {string} infoHtml - Additional information about POI, in HTML
102
+ * @property {Point[]} polygonPoints - List of points of that define the area of the geofence
103
+ * @property {object} customFields - Map of custom fields, indexed by their name.
104
+ */
105
+ /**
106
+ * @name PoiCategory
107
+ * @description Category of Point of Interest.
108
+ *
109
+ * @property {string} poiCategoryCode - Unique code of the category
110
+ * @property {string} poiCategoryName - The category name appropriate for display to the user
111
+ * @property {string} icon_selected - The selected icon url
112
+ * @property {string} icon_unselected - The unselected icon url
113
+ * @property {boolean} public - Whether the category is public or not
114
+ */
115
+ /**
116
+ * @name PoiIcon
117
+ * @description Category of Point of Interest.
118
+ *
119
+ * @property {string} data - Base64 POI icon image
120
+ */
121
+ /**
122
+ * @name Point
123
+ * @description Associate geographical coordinate (Location) with Building and Floor (Cartography) and cartesian coordinate relative to that building.
124
+ *
125
+ * @property {string} buildingIdentifier - Unique identifier for the building to which this point belongs
126
+ * @property {CartesianCoordinate} cartesianCoordinate - Cartesian coordinate (in meters) relative to the Bounds of building's base.
127
+ * @property {Coordinate} coordinate - Geographic coordinate (latitude, longitude) of the point, regardless of whether it's placed inside or outside the building.
128
+ * @property {string} floorIdentifier - Floor identifier (inside the building) where this point is placed.
129
+ * @property {boolean} isIndoor - If the POI is inside the building.
130
+ * @property {boolean} idOutdoor - If the POI is outside the building.
131
+ */
132
+ /**
133
+ * @name Route
134
+ * @description Route between two points.
135
+ *
136
+ * @property {Poi} poiTo - The destination Poi the user is currently navigating to.
137
+ * @property {RouteStep[]} edges - Ordered list of steps to go to the goal point
138
+ * @property {RouteStep} firstStep - First step
139
+ * @property {Point} from - Point where the route starts.
140
+ * @property {Indication} indications - Ordered list of instructions to go to the destination
141
+ * @property {RouteStep} lastStep - Last step
142
+ * @property {Point[]} nodes - A collection of points of the route (not ordered)
143
+ * @property {Point[]} points - List of ordered points of the route
144
+ * @property {Point} to - Last point and goal of the route.
145
+ * @property {RouteStep[]} steps - Ordered list of steps to go to the goal point
146
+ * @property {RouteSegment[]} segments - List of segments formed by consecutive points and a floor identifier
147
+ */
148
+ /**
149
+ * @name RouteStep
150
+ * @description A fragment of a route, described by the initial point from and the last point to of the fragment, and some information about the step within the route.
151
+ *
152
+ * @property {number} distance - Distance between from and to in meters.
153
+ * @property {number} distanceToGoal - Distance in meters between the start point of this step (from) and the last point in the route ('to' of the last step).
154
+ * @property {Point} from - Start point of this step.
155
+ * @property {number} id - Position of this RouteStep in the list of steps (Route.steps) of the route to which it belongs.
156
+ * @property {Point} to - End point of this step.
157
+ * @property {boolean} isFirst - Returns true if this is the first step in the route.
158
+ * @property {boolean} isLast - Returns true if this is the last step in the route.
159
+ */
160
+ /**
161
+ * @name RouteSegment
162
+ * @description A fragment of a route, described by a floor identifier and a list of consecutive points from the same floor
163
+ *
164
+ * @property {string} floorIdentifier - Identifier of the floor containing the points in this segment
165
+ * @property {Point[]} points - Consecutive points in the same floor forming a path
166
+ */
167
+ /**
168
+ * @name Indication
169
+ * @description Represents the instruction that a user should follow when on a RouteStep to continue the route.
170
+ *
171
+ * @property {number} distance - The distance between the origin and destination
172
+ * @property {number} distanceToNextLevel - The number of levels between the origin and destination
173
+ * @property {string} indicationType - The Indication.Action of the instruction as String
174
+ * @property {number} orientation - The angle a user should change his direction in order to go from the origin to the destination.
175
+ * @property {string} orientationType - The Indication.Orientation of the instruction as String
176
+ * @property {number} stepIdxDestination - The index of the indication's step of destination.
177
+ * @property {number} stepIdxOrigin - The index of the indication's step of origin
178
+ * @property {boolean} neededLevelChange - If the user should change the level in order to arrive at the destination.
179
+ */
180
+ /**
181
+ * @name NavigationProgress
182
+ * @description Provides information of the progress of a user while following a route.
183
+ *
184
+ * @property {Location} closestLocationInRoute - Closest location in the route from the user location provided .
185
+ * @property {number} distanceToClosestPointInRoute - Distance between the real user location (provided to updateWithLocation(Location)) and the closest route location.
186
+ * @property {Indication} currentIndication - The current indication.
187
+ * @property {Indication} nextIndication - The next indication.
188
+ * @property {number} currentStepIndex - The index of the closest route step to the user, where closestLocationInRoute is.
189
+ * @property {number} distanceToGoal - The distance in meters from closestLocationInRoute to route's goal point.
190
+ * @property {number} distanceToEndStep - The distance in meters to go from closestLocationInRoute to the end of the current step.
191
+ * @property {number} timeToEndStep - The estimated time to go from closestLocationInRoute to the end of the current route step, considering a speed of 1 meter/second.
192
+ * @property {number} timeToGoal - The estimated time to go from closestLocationInRoute to the goal/end of route, considering a speed of 1 meter/second.
193
+ * @property {RouteStep} routeStep - The closest route step to the user, where closestLocationInRoute is.
194
+ * @property {Point[]} points - List of ordered points of the remaining route
195
+ * @property {RouteSegment[]} segments - List of segments formed by consecutive points and a floor identifier
196
+ */
197
+ /**
198
+ * @name LocationRequest
199
+ * @description A data object that contains parameters for the location service, LocationManager.
200
+ *
201
+ * @property {number} buildingIdentifier - Identifier of the building on which the positioning will be started
202
+ * @property {number} interval - Default interval (in milliseconds) to notify location updates
203
+ * @property {string} indoorProvider - Default indoor provider. Possible values are INPHONE and SUPPORT
204
+ * @property {boolean} useBle - Defines whether or not to use BLE for positioning
205
+ * @property {boolean} useWifi - Defines whether or not to use Wi-Fi for positioning
206
+ * @property {boolean} useGps - Defines whether or not to use GPS for indoor positioning
207
+ * @property {boolean} useBarometer - Defines whether or not to use the barometer for indoor positioning
208
+ * @property {string} motionMode - Default motion mode. Possible values are BY_CAR, BY_FOOT, and RADIOMAX
209
+ * @property {boolean} useForegroundService - Defines whether or not to activate the {@link http://developers.situm.es/pages/android/using_situm_sdk_background.html foreground service}
210
+ * @property {boolean} useDeadReckoning - Defines whether or not to use dead reckoning to get fast position updates using only the inertial sensors, between the server position updates.
211
+ * @property {OutdoorLocationOptions} outdoorLocationOptions - Outdoor location options. Only used in an indoor/outdoor request
212
+ * @property {BeaconFilter[]} beaconFilters - Deprecated - Beacon filters to be handled during scan time, otherwise only Situm beacons will be scanned. Can be invoked multiple times to add as much beacon filters as you want. The SitumSDK now does it automatically
213
+ * @property {number} smallestDisplacement - Default smallest displacement to notify location updates
214
+ * @property {string} realtimeUpdateInterval - Default interval to send locations to the Realtime. Possible values are REALTIME, FAST, NORMAL, SLOW, and BATTERY_SAVER
215
+ * @property {ForegroundServiceNotificationOptions} foregroundServiceNotificationOptions - Used to configure the notification options for a foreground service, allowing the definition of the title, message, stop button, button text, and the {@link ForegroundServiceNotificationsTapAction}.
216
+ */
217
+ /**
218
+ * A data object that let you customize the Foreground Service Notification
219
+ * that will be shown in the system's tray when the app is running as a
220
+ * Foreground Service.
221
+ * To be used with {@link LocationRequest}.
222
+ * Only applies for Android.
223
+ * @property {ForegroundServiceNotificationOptions} foregroundServiceNotificationOptions
224
+ */
225
+ /**
226
+ * @name ForegroundServiceNotificationsTapAction
227
+ * @description Predefined actions performed when tapping the Situm Foreground Service Notification.
228
+ */
229
+ let ForegroundServiceNotificationsTapAction = exports.ForegroundServiceNotificationsTapAction = /*#__PURE__*/function (ForegroundServiceNotificationsTapAction) {
230
+ /**
231
+ * Launch the app's main activity using the information returned by android.content.pm.PackageManager#getLaunchIntentForPackage(String).
232
+ */
233
+ ForegroundServiceNotificationsTapAction["LaunchApp"] = "LAUNCH_APP";
234
+ /**
235
+ * Launch the operating system settings screen for the current app.
236
+ */
237
+ ForegroundServiceNotificationsTapAction["LaunchSettings"] = "LAUNCH_SETTINGS";
238
+ /**
239
+ * Do nothing when tapping the notification.
240
+ */
241
+ ForegroundServiceNotificationsTapAction["DoNothing"] = "DO_NOTHING";
242
+ return ForegroundServiceNotificationsTapAction;
243
+ }({});
244
+ /**
245
+ * @name NavigationRequest
246
+ * @description A data object that contains the request for navigation.
247
+ *
248
+ * @property {number} distanceToGoalThreshold - Distance threshold to consider reaching the goal (meters).
249
+ * @property {number} distanceToIgnoreFirstIndication - Maximum distance to ignore the first indication when navigating (meters).
250
+ * @property {number} distanceToFloorChangeThreshold - Distance threshold from when a floor change is considered reached (meters).
251
+ * @property {number} distanceToChangeIndicationThreshold - Distance threshold to change the indication (meters).
252
+ * @property {boolean} ignoreLowQualityLocations - Ignore low-quality locations.
253
+ * @property {number} indicationsInterval - Interval between indications (milliseconds).
254
+ * @property {number} outsideRouteThreshold - Distance threshold to consider being outside the route (meters).
255
+ * @property {number} roundIndicationsStep - Step to round indications (meters).
256
+ * @property {number} timeToFirstIndication - Time to wait until the first indication is returned (milliseconds).
257
+ * @property {number} timeToIgnoreUnexpectedFloorChanges - Time to ignore the locations received during navigation, when the next indication is a floor change,
258
+ * if the locations are on a wrong floor (not in origin or destination floors) (milliseconds).
259
+ */
260
+ /**
261
+ * @name DirectionsRequest
262
+ * @description A data object that contains the request for directions.
263
+ *
264
+ * @property {Building} positioningBuilding
265
+ * @property {Point|Location} from - Current user's position as the starting point of the route.
266
+ * @property {Point|Poi} to - Point to, where the route should end.
267
+ * @property {DirectionsOptions} options - Options that can be added to the request.
268
+ */
269
+ /**
270
+ * @name DirectionsOptions
271
+ * @description A data object that contains the directions options.
272
+ *
273
+ * @property {boolean} minimizeFloorChanges - Defines wheter or not the route should be calculated minimizing the floor changes even if the result is longer.
274
+ * @property {string} accessibilityMode - Defines the accessibility mode of the route. Possible values are: CHOOSE_SHORTEST, ONLY_NOT_ACCESSIBLE_FLOOR_CHANGES, ONLY_ACCESSIBLE
275
+ * @property {number} startingAngle - Current user's orientation in degrees.
276
+ * @property {String[]} includedTags List of tags that you want to use when calculating a route. Only the tags added here will be used. If there are other tags in the graph they won't be used. The edges without a tag will be used. If you don't set nothing all the graph will be used to calculate the route. You can learn more about this topic on https://situm.com/docs/cartography-management/#tags
277
+ * @property {String[]} excludedTags List of tags that you want your route to avoid. If you exclude a tag the route will never pass through an edge that have this tag. If the route can only be generated passing through an edge with this tag the route calculation will fail. You can learn more about this topic on https://situm.com/docs/cartography-management/#tags.
278
+ */
279
+ /**
280
+ * @name OutdoorLocationOptions
281
+ * @description Outdoor location options are only used in indoor-outdoor mode (Only available for Android)
282
+ *
283
+ * @property {boolean} continuousMode - Environment detection continuous mode (true) or burst mode (false).
284
+ * @property {boolean} userDefinedThreshold
285
+ * @property {number} burstInterval - Interval to scan for GPS and detect the environment (in seconds).
286
+ * @property {number} averageSnrThreshold
287
+ */
288
+ /**
289
+ * @name BeaconFilter
290
+ * @description Represents a BLE filter. Now the only field is the BLE proximity UUID
291
+ *
292
+ * @property {string} uuid - Assigns the proximity UUID
293
+ */
294
+ /**
295
+ * @name RealTimeRequest
296
+ * @description A data object that contains the parameters to process realtime data of the users.
297
+ *
298
+ * @property {Building} building object
299
+ * @property {int} pollTime - Interval in milliseconds (minimum is 3000ms).
300
+ */
301
+ /**
302
+ * @name RealTimeData
303
+ * @description A data object that contains information of the location of users in realtime.
304
+ *
305
+ * @property {Array<Location>} locations object
306
+ */
307
+ /**
308
+ * @name SdkVersion
309
+ * @description Represents the version information of the SDK and its compatibility with different platforms.
310
+ *
311
+ * @type
312
+ * @property {string} react_native - The version of React Native used in the SDK.
313
+ * @property {string} [ios] - Optional. The specific version of the Situm SDK for the iOS platform.
314
+ * @property {string} [android] - Optional. The specific version of the Situm SDK for the Android platform.
315
+ */
316
+ /**
317
+ * @name ConfigurationOptions
318
+ * @description Configuration options for initializing the SDK or other modules.
319
+ *
320
+ * @type
321
+ * @property {boolean} [useRemoteConfig] - Optional. Determines whether to use Remote Configuration settings.
322
+ * @property {number} [cacheMaxAge] - Optional. The maximum age of the cache in seconds.
323
+ */
324
+ /**
325
+ * @name Location
326
+ * @description Represents a location with various attributes including position, accuracy, and bearing.
327
+ *
328
+ * @interface
329
+ * @property {Position} [position] - Optional. The position information of the location.
330
+ * @property {number} [accuracy] - Optional. The accuracy of the location information in meters.
331
+ * @property {Object} [bearing] - Optional. Bearing information including degrees and degreesClockwise.
332
+ * @property {boolean} [hasBearing] - Optional. Indicates if bearing information is available.
333
+ */
334
+ /**
335
+ * @name LocationStatus
336
+ * @description Represents the status of a location, including a name and a numeric code.
337
+ *
338
+ * @interface
339
+ * @property {LocationStatusName} statusName - The name of the location status.
340
+ * @property {number} statusCode - The numeric code representing the location status.
341
+ */
342
+ /**
343
+ * @name ErrorType
344
+ * @description Enumeration of error types to categorize the severity of errors.
345
+ *
346
+ * @enum {string}
347
+ * @property {string} CRITICAL - Represents critical errors that will cause the system not to work (e.g. positioning will be stopped).
348
+ * @property {string} NON_CRITICAL - Represents non-critical errors that are less severe.
349
+ */
350
+ let ErrorType = exports.ErrorType = /*#__PURE__*/function (ErrorType) {
351
+ ErrorType["CRITICAL"] = "CRITICAL";
352
+ ErrorType["NON_CRITICAL"] = "NON_CRITICAL";
353
+ return ErrorType;
354
+ }({});
355
+ /**
356
+ * @name ErrorCode
357
+ * @description Enumeration of error codes provided by Situm SDK.
358
+ *
359
+ * @enum {string}
360
+ * @property {string} LOCATION_PERMISSION_DENIED - Indicates that location permissions were not granted by the user.
361
+ * @property {string} BLUETOOTH_PERMISSION_DENIED - Indicates that Bluetooth permissions were not granted.
362
+ * @property {string} BLUETOOTH_DISABLED - Indicates that Bluetooth is disabled on the device.
363
+ * @property {string} LOCATION_DISABLED - Indicates that the location services are disabled on the device.
364
+ * @property {string} REDUCED_ACCURACY - Indicates that the precise location has been turned off on the device.
365
+ * @property {string} UNKNOWN - Represents an unknown error or an error that does not fit other categories.
366
+ */
367
+ let ErrorCode = exports.ErrorCode = /*#__PURE__*/function (ErrorCode) {
368
+ ErrorCode["LOCATION_PERMISSION_DENIED"] = "LOCATION_PERMISSION_DENIED";
369
+ ErrorCode["BLUETOOTH_PERMISSION_DENIED"] = "BLUETOOTH_PERMISSION_DENIED";
370
+ ErrorCode["BLUETOOTH_DISABLED"] = "BLUETOOTH_DISABLED";
371
+ ErrorCode["LOCATION_DISABLED"] = "LOCATION_DISABLED";
372
+ ErrorCode["REDUCED_ACCURACY"] = "REDUCED_ACCURACY";
373
+ ErrorCode["UNKNOWN"] = "UNKNOWN";
374
+ return ErrorCode;
375
+ }({});
376
+ /**
377
+ * @name Error
378
+ * @description Represents an error with a specific code, message, and type.
379
+ *
380
+ * @interface
381
+ * @property {ErrorCode} code - The specific error code associated with this error.
382
+ * @property {string} message - A descriptive message providing more details about the error.
383
+ * @property {ErrorType} type - The type of the error indicating its severity (critical or non-critical).
384
+ */
385
+ // TODO: add types
386
+ class InternalCall {
387
+ constructor(type, data) {
388
+ this.type = type;
389
+ this.data = data;
390
+ }
391
+ get() {
392
+ return this.data;
393
+ }
394
+ }
395
+
396
+ /**
397
+ * @name
398
+ * UserHelperColorScheme
399
+ * @description
400
+ * Color scheme for the user helper UI.
401
+ * @property {string} primaryColor - Primary color for the user helper UI. Use HEX color code (e.g. "#ff5733").
402
+ * @property {string} secondaryColor - Secondary color for the user helper UI. Use HEX color code (e.g. "#ff5733").
403
+ */
404
+
405
+ /**
406
+ * @name
407
+ * UserHelperOptions
408
+ * @description
409
+ * Configuration options for the user helper.
410
+ * @property {boolean} enabled - Whether the user helper is enabled. Equivalent to the underlying native SitumSdk.userHelperManager#autoManage(true).
411
+ * @property {UserHelperColorScheme} colorScheme - Color scheme for the user helper UI.
412
+ */
413
+ exports.InternalCall = InternalCall;
414
+ //# sourceMappingURL=index.js.map