@situm/react-native 3.15.0-beta.5 → 3.15.1-beta.0
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/README.md +187 -0
- package/lib/commonjs/index.js +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/sdk/index.js +22 -12
- package/lib/commonjs/sdk/index.js.map +1 -1
- package/lib/commonjs/sdk/types/index.js +99 -342
- package/lib/commonjs/sdk/types/index.js.map +1 -1
- package/lib/commonjs/wayfinding/components/MapView.js +1 -2
- package/lib/commonjs/wayfinding/components/MapView.js.map +1 -1
- package/lib/commonjs/wayfinding/store/index.js +1 -2
- package/lib/commonjs/wayfinding/store/index.js.map +1 -1
- package/lib/module/sdk/index.js +22 -12
- package/lib/module/sdk/index.js.map +1 -1
- package/lib/module/sdk/types/index.js +90 -333
- package/lib/module/sdk/types/index.js.map +1 -1
- package/lib/typescript/sdk/index.d.ts +11 -11
- package/lib/typescript/sdk/index.d.ts.map +1 -1
- package/lib/typescript/sdk/types/index.d.ts +224 -289
- package/lib/typescript/sdk/types/index.d.ts.map +1 -1
- package/lib/typescript/wayfinding/components/MapView.d.ts +2 -2
- package/package.json +5 -5
- package/src/sdk/index.ts +21 -12
- package/src/sdk/types/index.ts +224 -295
- package/src/wayfinding/components/MapView.tsx +2 -2
package/src/sdk/types/index.ts
CHANGED
|
@@ -8,389 +8,355 @@ import type {
|
|
|
8
8
|
} from "./constants";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @description A Building object definition
|
|
13
|
-
*
|
|
14
|
-
* @property {string} buildingIdentifier - The unique identifier of the resource
|
|
15
|
-
* @property {string} name - The building name that is appropriate for display to the user.
|
|
16
|
-
* @property {string} address - Te building address.
|
|
17
|
-
* @property {Bounds} bounds - Compute corners of this building, without rotation, in earth coordinates.
|
|
18
|
-
* @property {Bounds} boundsRotated - Compute corners of this building, with rotation, in earth coordinates.
|
|
19
|
-
* @property {Coordinate} center - Center of the building's base, as geographical coordinate.
|
|
20
|
-
* @property {Dimensions} Dimensions - Dimensions of building's base (height and width) in meters.
|
|
21
|
-
* @property {string} infoHtml - Additional information about building, formatted with HTML
|
|
22
|
-
* @property {string} pictureThumbUrl - The URL of building thumbnail image
|
|
23
|
-
* @property {string} pictureUrl - The URL of building image
|
|
24
|
-
* @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.
|
|
25
|
-
* @property {string} userIdentifier - Unique identifier of the owner user of the building
|
|
26
|
-
* @property {object} customFields - Map of custom fields, indexed by their name.
|
|
11
|
+
* A Building object definition.
|
|
27
12
|
*/
|
|
28
13
|
export type Building = {
|
|
14
|
+
/** The unique identifier of the resource */
|
|
29
15
|
buildingIdentifier: string;
|
|
16
|
+
/** The building name that is appropriate for display to the user. */
|
|
30
17
|
name: string;
|
|
18
|
+
/** The building address. */
|
|
31
19
|
address: string;
|
|
20
|
+
/** Compute corners of this building, without rotation, in earth coordinates. */
|
|
32
21
|
bounds: Bounds;
|
|
22
|
+
/** Compute corners of this building, with rotation, in earth coordinates. */
|
|
33
23
|
boundsRotated: Bounds;
|
|
24
|
+
/** Center of the building's base, as geographical coordinate. */
|
|
34
25
|
center: Coordinate;
|
|
26
|
+
/** Dimensions of building's base (height and width) in meters. */
|
|
35
27
|
dimensions: Dimensions;
|
|
28
|
+
/** Additional information about building, formatted with HTML. */
|
|
36
29
|
infoHtml: string;
|
|
30
|
+
/** The URL of building thumbnail image. */
|
|
37
31
|
pictureThumbUrl: string;
|
|
32
|
+
/** The URL of building image. */
|
|
38
33
|
pictureUrl: string;
|
|
34
|
+
/** Rotation angle of the building's base, relative to west-east axis. */
|
|
39
35
|
rotation: number;
|
|
36
|
+
/** Unique identifier of the owner user of the building. */
|
|
40
37
|
userIdentifier: string;
|
|
38
|
+
/** Map of custom fields, indexed by their name. */
|
|
41
39
|
customFields: object;
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
/**
|
|
45
|
-
*
|
|
46
|
-
* @description Full information of a building
|
|
47
|
-
*
|
|
48
|
-
* @property {Building} building - Building basic information
|
|
49
|
-
* @property {Floor[]} floors - Array with the information of each floor
|
|
50
|
-
* @property {Poi[]} indoorPOIs - Array with the information of each indoor POI
|
|
51
|
-
* @property {Poi[]} outdoorPOIs - Array with the information of each outdoor POI
|
|
52
|
-
* @property {Geofence} geofences - Array with the information of each geofence
|
|
43
|
+
* Full information of a building
|
|
53
44
|
*/
|
|
54
|
-
|
|
55
45
|
export type BuildingInfo = {
|
|
46
|
+
/** Building basic information */
|
|
56
47
|
building: Building;
|
|
48
|
+
/** Array with the information of each floor */
|
|
57
49
|
floors: Floor[];
|
|
50
|
+
/** Array with the information of each indoor POI */
|
|
58
51
|
indoorPOIs: Poi[];
|
|
52
|
+
/** Array with the information of each outdoor POI */
|
|
59
53
|
outdoorPOIs: Poi[];
|
|
54
|
+
/** Array with the information of each geofence */
|
|
60
55
|
geofences: Geofence[];
|
|
61
56
|
};
|
|
62
57
|
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* @property {Coordinate} northEast - The coordinate of the north-east corner of the bound.
|
|
67
|
-
* @property {Coordinate} northWest - The coordinate of the north-west corner of the bound.
|
|
68
|
-
* @property {Coordinate} southEast - The coordinate of the south-east corner of the bound.
|
|
69
|
-
* @property {Coordinate} southWest - The coordinate of the south-east corner of the bound.
|
|
58
|
+
/**
|
|
59
|
+
* Represents a rectangle bounds in a greographic 2D space.
|
|
70
60
|
*/
|
|
71
61
|
export type Bounds = {
|
|
62
|
+
/** The coordinate of the north-east corner of the bound. */
|
|
72
63
|
northEast: Coordinate;
|
|
64
|
+
/** The coordinate of the north-west corner of the bound. */
|
|
73
65
|
northWest: Coordinate;
|
|
66
|
+
/** The coordinate of the south-east corner of the bound. */
|
|
74
67
|
southEast: Coordinate;
|
|
68
|
+
/** The coordinate of the south-east corner of the bound. */
|
|
75
69
|
southWest: Coordinate;
|
|
76
70
|
};
|
|
77
71
|
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @property {number} width - Width of rectangle in meters
|
|
82
|
-
* @property {number} height - Height of rectangle in meters.
|
|
72
|
+
/**
|
|
73
|
+
* Define 2D dimensions of a rectangular area.
|
|
83
74
|
*/
|
|
84
75
|
export type Dimensions = {
|
|
76
|
+
/** Width of rectangle in meters */
|
|
85
77
|
width: number;
|
|
78
|
+
/** Height of rectangle in meters */
|
|
86
79
|
height: number;
|
|
87
80
|
};
|
|
88
81
|
|
|
89
82
|
/**
|
|
90
|
-
*
|
|
91
|
-
* @description A structure that contains geographical coordinate.
|
|
92
|
-
*
|
|
93
|
-
* @property {number} latitude - Latitude in degrees
|
|
94
|
-
* @property {number} longitude - Longitude in degrees
|
|
83
|
+
* A structure that contains geographical coordinate.
|
|
95
84
|
*/
|
|
96
85
|
export type Coordinate = {
|
|
86
|
+
/** Latitude in degrees */
|
|
97
87
|
latitude: number;
|
|
88
|
+
/** Longitude in degrees */
|
|
98
89
|
longitude: number;
|
|
99
90
|
};
|
|
100
91
|
|
|
101
92
|
/**
|
|
102
|
-
*
|
|
103
|
-
* @description A structure that contains cartesian coordinate.
|
|
104
|
-
*
|
|
105
|
-
* @property {number} x - Value of coordinate at x-axis
|
|
106
|
-
* @property {number} y - Value of coordinate at y-axis
|
|
93
|
+
* A structure that contains cartesian coordinate.
|
|
107
94
|
*/
|
|
108
95
|
export type CartesianCoordinate = {
|
|
96
|
+
/** Value of coordinate at x-axis */
|
|
109
97
|
x: number;
|
|
98
|
+
/** Value of coordinate at y-axis */
|
|
110
99
|
y: number;
|
|
111
100
|
};
|
|
112
101
|
|
|
113
102
|
/**
|
|
114
|
-
*
|
|
115
|
-
* @description Floor of a building.
|
|
116
|
-
*
|
|
117
|
-
* @property {number} altitude - Altitude of the floor above ground level, in meters.
|
|
118
|
-
* @property {string} buildingIdentifier - The identifier of building which this floor belongs.
|
|
119
|
-
* @property {number} level - The number of the floor.
|
|
120
|
-
* @property {string} name - The name of the floor
|
|
121
|
-
* @property {string} mapUrl - The floor map image url
|
|
122
|
-
* @property {number} scale - The scale of the floor image, in px/meters
|
|
123
|
-
* @property {string} floorIdentifier - The unique identifier of the resource
|
|
103
|
+
* Floor of a building.
|
|
124
104
|
*/
|
|
125
105
|
export type Floor = {
|
|
106
|
+
/** Altitude of the floor above ground level, in meters */
|
|
126
107
|
altitude: number;
|
|
108
|
+
/** The identifier of building which this floor belongs */
|
|
127
109
|
buildingIdentifier: string;
|
|
110
|
+
/** The number of the floor */
|
|
128
111
|
level: number;
|
|
112
|
+
/** The name of the floor */
|
|
129
113
|
name: string;
|
|
114
|
+
/** The floor map image url */
|
|
130
115
|
mapUrl: string;
|
|
116
|
+
/** The scale of the floor image, in px/meters */
|
|
131
117
|
scale: number;
|
|
118
|
+
/** The unique identifier of the resource */
|
|
132
119
|
floorIdentifier: string;
|
|
133
120
|
};
|
|
134
121
|
|
|
135
122
|
/**
|
|
136
|
-
*
|
|
137
|
-
* @description Point of Interest, associated to a building, regardless of whether it's place inside or outside the building.
|
|
138
|
-
*
|
|
139
|
-
* @property {string} identifier - The unique identifier of the resource
|
|
140
|
-
* @property {string} buildingIdentifier - Identifier of building to which the POI belongs.
|
|
141
|
-
* @property {CartesianCoordinate} cartesianCoordinate - Cartesian coordinate of this position, relative to building {@link Bounds}.
|
|
142
|
-
* @property {Coordinate} coordinate - Geographical coordinate of this position
|
|
143
|
-
* @property {string} floorIdentifier - If this POI is outside the building (isOutdoor == true), this field has no meaning.
|
|
144
|
-
* @property {string} poiName - A name for the POI, appropriate for display to the user.
|
|
145
|
-
* @property {Point} position - {@link Point} where the point is located.
|
|
146
|
-
* @property {boolean} isIndoor - Whether the POI is placed outside the building or not.
|
|
147
|
-
* @property {boolean} isOutdoor - Whether the POI is placed outside the building or not.
|
|
148
|
-
* @property {PoiCategory} category - Category of the POI
|
|
149
|
-
* @property {string} infoHtml - Additional information about POI, in HTML
|
|
150
|
-
* @property {object} customFields - Map of custom fields, indexed by their name.
|
|
123
|
+
* Point of Interest, associated to a building, regardless of whether it's placed inside or outside the building.
|
|
151
124
|
*/
|
|
152
125
|
export type Poi = {
|
|
126
|
+
/** The unique identifier of the resource */
|
|
153
127
|
identifier: string;
|
|
128
|
+
/** Identifier of building to which the POI belongs */
|
|
154
129
|
buildingIdentifier: string;
|
|
130
|
+
/** Cartesian coordinate of this position, relative to building {@link Bounds} */
|
|
155
131
|
cartesianCoordinate: CartesianCoordinate;
|
|
132
|
+
/** Geographical coordinate of this position */
|
|
156
133
|
coordinate: Coordinate;
|
|
134
|
+
/** If this POI is outside the building (isOutdoor == true), this field has no meaning */
|
|
157
135
|
floorIdentifier: string;
|
|
136
|
+
/** A name for the POI, appropriate for display to the user */
|
|
158
137
|
poiName: string;
|
|
138
|
+
/** {@link Point} where the point is located */
|
|
159
139
|
position: Point;
|
|
140
|
+
/** Whether the POI is placed outside the building or not */
|
|
160
141
|
isIndoor: boolean;
|
|
142
|
+
/** Whether the POI is placed outside the building or not */
|
|
161
143
|
isOutdoor: boolean;
|
|
144
|
+
/** Category of the POI */
|
|
162
145
|
category: PoiCategory;
|
|
146
|
+
/** Additional information about POI, in HTML */
|
|
163
147
|
infoHtml: string;
|
|
148
|
+
/** Map of custom fields, indexed by their name */
|
|
164
149
|
customFields: object;
|
|
165
150
|
};
|
|
166
151
|
|
|
167
152
|
/**
|
|
168
|
-
*
|
|
169
|
-
* @description Point of Interest, associated to a building, regardless of whether it's place inside or outside the building.
|
|
170
|
-
*
|
|
171
|
-
* @property {string} identifier - The unique identifier of the resource
|
|
172
|
-
* @property {string} buildingIdentifier - Identifier of building to which the POI belongs.
|
|
173
|
-
* @property {string} floorIdentifier - If this POI is outside the building (isOutdoor == true), this field has no meaning.
|
|
174
|
-
* @property {string} name - A name for the geofence, appropriate for display to the user.
|
|
175
|
-
* @property {string} infoHtml - Additional information about POI, in HTML
|
|
176
|
-
* @property {Point[]} polygonPoints - List of points of that define the area of the geofence
|
|
177
|
-
* @property {object} customFields - Map of custom fields, indexed by their name.
|
|
153
|
+
* Point of Interest, associated to a building, regardless of whether it's placed inside or outside the building.
|
|
178
154
|
*/
|
|
179
155
|
export type Geofence = {
|
|
156
|
+
/** The unique identifier of the resource */
|
|
180
157
|
identifier: string;
|
|
158
|
+
/** Identifier of building to which the POI belongs */
|
|
181
159
|
buildingIdentifier: string;
|
|
160
|
+
/** If this POI is outside the building (isOutdoor == true), this field has no meaning */
|
|
182
161
|
floorIdentifier: string;
|
|
162
|
+
/** A name for the geofence, appropriate for display to the user */
|
|
163
|
+
name: string;
|
|
164
|
+
/** Additional information about POI, in HTML */
|
|
183
165
|
infoHtml: string;
|
|
166
|
+
/** List of points of that define the area of the geofence */
|
|
184
167
|
polygonPoints: Point[];
|
|
168
|
+
/** Map of custom fields, indexed by their name */
|
|
185
169
|
customFields: object;
|
|
186
|
-
name: string;
|
|
187
170
|
};
|
|
188
171
|
|
|
189
172
|
/**
|
|
190
|
-
*
|
|
191
|
-
* @description Category of Point of Interest.
|
|
192
|
-
*
|
|
193
|
-
* @property {string} poiCategoryCode - Unique code of the category
|
|
194
|
-
* @property {string} poiCategoryName - The category name appropriate for display to the user
|
|
195
|
-
* @property {string} icon_selected - The selected icon url
|
|
196
|
-
* @property {string} icon_unselected - The unselected icon url
|
|
197
|
-
* @property {boolean} public - Whether the category is public or not
|
|
173
|
+
* Category of Point of Interest.
|
|
198
174
|
*/
|
|
199
175
|
export type PoiCategory = {
|
|
176
|
+
/** Unique code of the category */
|
|
200
177
|
poiCategoryCode: string;
|
|
178
|
+
/** The category name appropriate for display to the user */
|
|
201
179
|
poiCategoryName: string;
|
|
180
|
+
/** The selected icon url */
|
|
202
181
|
icon_selected: string;
|
|
182
|
+
/** The unselected icon url */
|
|
203
183
|
icon_unselected: string;
|
|
184
|
+
/** Whether the category is public or not */
|
|
204
185
|
isPublic: boolean;
|
|
205
186
|
};
|
|
206
187
|
|
|
207
188
|
/**
|
|
208
|
-
*
|
|
209
|
-
* @description Category of Point of Interest.
|
|
210
|
-
*
|
|
211
|
-
* @property {string} data - Base64 POI icon image
|
|
189
|
+
* Category of Point of Interest.
|
|
212
190
|
*/
|
|
213
191
|
export type PoiIcon = {
|
|
192
|
+
/** Base64 POI icon image */
|
|
214
193
|
data: string;
|
|
215
194
|
};
|
|
216
195
|
|
|
217
196
|
/**
|
|
218
|
-
*
|
|
219
|
-
* @description Associate geographical coordinate (Location) with Building and Floor (Cartography) and cartesian coordinate relative to that building.
|
|
220
|
-
*
|
|
221
|
-
* @property {string} buildingIdentifier - Unique identifier for the building to which this point belongs
|
|
222
|
-
* @property {CartesianCoordinate} cartesianCoordinate - Cartesian coordinate (in meters) relative to the Bounds of building's base.
|
|
223
|
-
* @property {Coordinate} coordinate - Geographic coordinate (latitude, longitude) of the point, regardless of whether it's placed inside or outside the building.
|
|
224
|
-
* @property {string} floorIdentifier - Floor identifier (inside the building) where this point is placed.
|
|
225
|
-
* @property {boolean} isIndoor - If the POI is inside the building.
|
|
226
|
-
* @property {boolean} idOutdoor - If the POI is outside the building.
|
|
197
|
+
* Associate geographical coordinate (Location) with Building and Floor (Cartography) and cartesian coordinate relative to that building.
|
|
227
198
|
*/
|
|
228
199
|
export type Point = {
|
|
200
|
+
/** Unique identifier for the building to which this point belongs */
|
|
229
201
|
buildingIdentifier: string;
|
|
202
|
+
/** Cartesian coordinate (in meters) relative to the Bounds of building's base */
|
|
230
203
|
cartesianCoordinate: CartesianCoordinate;
|
|
204
|
+
/** Geographic coordinate (latitude, longitude) of the point, regardless of whether it's placed inside or outside the building */
|
|
231
205
|
coordinate: Coordinate;
|
|
206
|
+
/** Floor identifier (inside the building) where this point is placed */
|
|
232
207
|
floorIdentifier: string;
|
|
208
|
+
/** If the POI is inside the building */
|
|
233
209
|
isIndoor?: boolean;
|
|
210
|
+
/** If the POI is outside the building */
|
|
234
211
|
isOutdoor?: boolean;
|
|
235
212
|
};
|
|
236
213
|
|
|
237
214
|
/**
|
|
238
|
-
*
|
|
239
|
-
* @description Route between two points.
|
|
240
|
-
*
|
|
241
|
-
* @property {Poi} poiTo - The destination Poi the user is currently navigating to.
|
|
242
|
-
* @property {RouteStep[]} edges - Ordered list of steps to go to the goal point
|
|
243
|
-
* @property {RouteStep} firstStep - First step
|
|
244
|
-
* @property {Point} from - Point where the route starts.
|
|
245
|
-
* @property {Indication} indications - Ordered list of instructions to go to the destination
|
|
246
|
-
* @property {RouteStep} lastStep - Last step
|
|
247
|
-
* @property {Point[]} nodes - A collection of points of the route (not ordered)
|
|
248
|
-
* @property {Point[]} points - List of ordered points of the route
|
|
249
|
-
* @property {Point} to - Last point and goal of the route.
|
|
250
|
-
* @property {RouteStep[]} steps - Ordered list of steps to go to the goal point
|
|
251
|
-
* @property {RouteSegment[]} segments - List of segments formed by consecutive points and a floor identifier
|
|
215
|
+
* Route between two points.
|
|
252
216
|
*/
|
|
253
217
|
export type Route = {
|
|
218
|
+
/** The destination Poi the user is currently navigating to */
|
|
254
219
|
poiTo?: Poi;
|
|
220
|
+
/** Ordered list of steps to go to the goal point */
|
|
255
221
|
edges: RouteStep[];
|
|
222
|
+
/** First step */
|
|
256
223
|
firstStep: RouteStep;
|
|
224
|
+
/** Point where the route starts */
|
|
257
225
|
from: Point;
|
|
226
|
+
/** Ordered list of instructions to go to the destination */
|
|
258
227
|
indications: Indication;
|
|
228
|
+
/** Last step */
|
|
259
229
|
lastStep: RouteStep;
|
|
230
|
+
/** A collection of points of the route (not ordered) */
|
|
260
231
|
nodes: Point[];
|
|
232
|
+
/** List of ordered points of the route */
|
|
261
233
|
points: Point[];
|
|
234
|
+
/** Last point and goal of the route */
|
|
262
235
|
to: Point;
|
|
236
|
+
/** Ordered list of steps to go to the goal point */
|
|
263
237
|
steps: RouteStep[];
|
|
238
|
+
/** List of segments formed by consecutive points and a floor identifier */
|
|
264
239
|
segments: RouteSegment[];
|
|
265
240
|
};
|
|
266
241
|
|
|
267
242
|
/**
|
|
268
|
-
*
|
|
269
|
-
* @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.
|
|
270
|
-
*
|
|
271
|
-
* @property {number} distance - Distance between from and to in meters.
|
|
272
|
-
* @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).
|
|
273
|
-
* @property {Point} from - Start point of this step.
|
|
274
|
-
* @property {number} id - Position of this RouteStep in the list of steps (Route.steps) of the route to which it belongs.
|
|
275
|
-
* @property {Point} to - End point of this step.
|
|
276
|
-
* @property {boolean} isFirst - Returns true if this is the first step in the route.
|
|
277
|
-
* @property {boolean} isLast - Returns true if this is the last step in the route.
|
|
243
|
+
* 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.
|
|
278
244
|
*/
|
|
279
245
|
export type RouteStep = {
|
|
246
|
+
/** Distance between from and to in meters */
|
|
280
247
|
distance: number;
|
|
248
|
+
/** Distance in meters between the start point of this step (from) and the last point in the route ('to' of the last step) */
|
|
281
249
|
distanceToGoal: number;
|
|
250
|
+
/** Start point of this step */
|
|
282
251
|
from: Point;
|
|
252
|
+
/** Position of this RouteStep in the list of steps (Route.steps) of the route to which it belongs */
|
|
283
253
|
id: number;
|
|
254
|
+
/** End point of this step */
|
|
284
255
|
to: Point;
|
|
256
|
+
/** Returns true if this is the first step in the route */
|
|
285
257
|
isFirst: boolean;
|
|
258
|
+
/** Returns true if this is the last step in the route */
|
|
286
259
|
isLast: boolean;
|
|
287
260
|
};
|
|
288
261
|
|
|
289
262
|
/**
|
|
290
|
-
*
|
|
291
|
-
* @description A fragment of a route, described by a floor identifier and a list of consecutive points from the same floor
|
|
292
|
-
*
|
|
293
|
-
* @property {string} floorIdentifier - Identifier of the floor containing the points in this segment
|
|
294
|
-
* @property {Point[]} points - Consecutive points in the same floor forming a path
|
|
263
|
+
* A fragment of a route, described by a floor identifier and a list of consecutive points from the same floor
|
|
295
264
|
*/
|
|
296
265
|
export type RouteSegment = {
|
|
266
|
+
/** Identifier of the floor containing the points in this segment */
|
|
297
267
|
floorIdentifier: string;
|
|
268
|
+
/** Consecutive points in the same floor forming a path */
|
|
298
269
|
points: Point[];
|
|
299
270
|
};
|
|
300
271
|
|
|
301
272
|
/**
|
|
302
|
-
*
|
|
303
|
-
* @description Represents the instruction that a user should follow when on a RouteStep to continue the route.
|
|
304
|
-
*
|
|
305
|
-
* @property {number} distance - The distance between the origin and destination
|
|
306
|
-
* @property {number} distanceToNextLevel - The number of levels between the origin and destination
|
|
307
|
-
* @property {string} indicationType - The Indication.Action of the instruction as String
|
|
308
|
-
* @property {number} orientation - The angle a user should change his direction in order to go from the origin to the destination.
|
|
309
|
-
* @property {string} orientationType - The Indication.Orientation of the instruction as String
|
|
310
|
-
* @property {number} stepIdxDestination - The index of the indication's step of destination.
|
|
311
|
-
* @property {number} stepIdxOrigin - The index of the indication's step of origin
|
|
312
|
-
* @property {boolean} neededLevelChange - If the user should change the level in order to arrive at the destination.
|
|
273
|
+
* Represents the instruction that a user should follow when on a RouteStep to continue the route.
|
|
313
274
|
*/
|
|
314
275
|
export type Indication = {
|
|
276
|
+
/** The distance between the origin and destination */
|
|
315
277
|
distance: number;
|
|
278
|
+
/** The number of levels between the origin and destination */
|
|
316
279
|
distanceToNextLevel: number;
|
|
280
|
+
/** The Indication.Action of the instruction as String */
|
|
317
281
|
indicationType: string;
|
|
282
|
+
/** If the user should change the level in order to arrive at the destination */
|
|
318
283
|
neededLevelChange: boolean;
|
|
284
|
+
/** The angle a user should change his direction in order to go from the origin to the destination */
|
|
319
285
|
orientation: number;
|
|
286
|
+
/** The Indication.Orientation of the instruction as String */
|
|
320
287
|
orientationType: string;
|
|
288
|
+
/** The index of the indication's step of destination */
|
|
321
289
|
stepIdxDestination: number;
|
|
290
|
+
/** The index of the indication's step of origin */
|
|
322
291
|
stepIdxOrigin: number;
|
|
323
292
|
};
|
|
324
293
|
|
|
325
294
|
/**
|
|
326
|
-
*
|
|
327
|
-
* @description Provides information of the progress of a user while following a route.
|
|
328
|
-
*
|
|
329
|
-
* @property {Location} closestLocationInRoute - Closest location in the route from the user location provided .
|
|
330
|
-
* @property {number} distanceToClosestPointInRoute - Distance between the real user location (provided to updateWithLocation(Location)) and the closest route location.
|
|
331
|
-
* @property {Indication} currentIndication - The current indication.
|
|
332
|
-
* @property {Indication} nextIndication - The next indication.
|
|
333
|
-
* @property {number} currentStepIndex - The index of the closest route step to the user, where closestLocationInRoute is.
|
|
334
|
-
* @property {number} distanceToGoal - The distance in meters from closestLocationInRoute to route's goal point.
|
|
335
|
-
* @property {number} distanceToEndStep - The distance in meters to go from closestLocationInRoute to the end of the current step.
|
|
336
|
-
* @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.
|
|
337
|
-
* @property {number} timeToGoal - The estimated time to go from closestLocationInRoute to the goal/end of route, considering a speed of 1 meter/second.
|
|
338
|
-
* @property {RouteStep} routeStep - The closest route step to the user, where closestLocationInRoute is.
|
|
339
|
-
* @property {Point[]} points - List of ordered points of the remaining route
|
|
340
|
-
* @property {RouteSegment[]} segments - List of segments formed by consecutive points and a floor identifier
|
|
295
|
+
* Provides information of the progress of a user while following a route.
|
|
341
296
|
*/
|
|
342
297
|
export type NavigationProgress = {
|
|
298
|
+
/** Closest location in the route from the user location provided */
|
|
343
299
|
closestLocationInRoute: Location;
|
|
300
|
+
/** The current indication */
|
|
344
301
|
currentIndication: number;
|
|
302
|
+
/** The index of the closest route step to the user, where closestLocationInRoute is */
|
|
345
303
|
currentStepIndex: number;
|
|
304
|
+
/** Distance between the real user location (provided to updateWithLocation(Location)) and the closest route location */
|
|
346
305
|
distanceToClosestPointInRoute: number;
|
|
306
|
+
/** The distance in meters to go from closestLocationInRoute to the end of the current step */
|
|
347
307
|
distanceToEndStep: number;
|
|
308
|
+
/** The distance in meters from closestLocationInRoute to route's goal point */
|
|
348
309
|
distanceToGoal: number;
|
|
310
|
+
/** The next indication */
|
|
349
311
|
nextIndication: Indication;
|
|
312
|
+
/** List of ordered points of the remaining route */
|
|
350
313
|
points: Point[];
|
|
314
|
+
/** The closest route step to the user, where closestLocationInRoute is */
|
|
351
315
|
routeStep: RouteStep;
|
|
316
|
+
/** List of segments formed by consecutive points and a floor identifier */
|
|
352
317
|
segments: RouteSegment[];
|
|
318
|
+
/** The estimated time to go from closestLocationInRoute to the end of the current route step, considering a speed of 1 meter/second */
|
|
353
319
|
timeToEndStep: number;
|
|
320
|
+
/** The estimated time to go from closestLocationInRoute to the goal/end of route, considering a speed of 1 meter/second */
|
|
354
321
|
timeToGoal: number;
|
|
355
322
|
type: SdkNavigationUpdateType;
|
|
356
323
|
};
|
|
357
324
|
|
|
358
325
|
/**
|
|
359
|
-
*
|
|
360
|
-
* @description A data object that contains parameters for the location service, LocationManager.
|
|
361
|
-
*
|
|
362
|
-
* @property {number} buildingIdentifier - Identifier of the building on which the positioning will be started
|
|
363
|
-
* @property {number} interval - Default interval (in milliseconds) to notify location updates
|
|
364
|
-
* @property {string} indoorProvider - Default indoor provider. Possible values are INPHONE and SUPPORT
|
|
365
|
-
* @property {boolean} useBle - Defines whether or not to use BLE for positioning
|
|
366
|
-
* @property {boolean} useWifi - Defines whether or not to use Wi-Fi for positioning
|
|
367
|
-
* @property {boolean} useGps - Defines whether or not to use GPS for indoor positioning
|
|
368
|
-
* @property {boolean} useBarometer - Defines whether or not to use the barometer for indoor positioning
|
|
369
|
-
* @property {string} motionMode - Default motion mode. Possible values are BY_CAR, BY_FOOT, and RADIOMAX
|
|
370
|
-
* @property {boolean} useForegroundService - Defines whether or not to activate the {@link http://developers.situm.es/pages/android/using_situm_sdk_background.html foreground service}
|
|
371
|
-
* @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.
|
|
372
|
-
* @property {OutdoorLocationOptions} outdoorLocationOptions - Outdoor location options. Only used in an indoor/outdoor request
|
|
373
|
-
* @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
|
|
374
|
-
* @property {number} smallestDisplacement - Default smallest displacement to notify location updates
|
|
375
|
-
* @property {string} realtimeUpdateInterval - Default interval to send locations to the Realtime. Possible values are REALTIME, FAST, NORMAL, SLOW, and BATTERY_SAVER
|
|
376
|
-
* @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}.
|
|
326
|
+
* A data object that contains parameters for the location service, LocationManager.
|
|
377
327
|
*/
|
|
378
328
|
export type LocationRequest = {
|
|
329
|
+
/** Tries to enable BLE if disabled while positioning. Will not work in modern Android versions */
|
|
379
330
|
autoEnableBleDuringPositioning?: boolean;
|
|
331
|
+
/** Beacon filters to be handled during scan time, otherwise only Situm beacons will be scanned */
|
|
380
332
|
beaconFilters?: BeaconFilter[];
|
|
333
|
+
/** Identifier of the building on which the positioning will be started */
|
|
381
334
|
buildingIdentifier?: number;
|
|
335
|
+
/** Default indoor provider. Possible values are INPHONE and SUPPORT */
|
|
382
336
|
indoorProvider?: string;
|
|
337
|
+
/** Default interval (in milliseconds) to notify location updates */
|
|
383
338
|
interval?: number;
|
|
339
|
+
/** Default motion mode. Possible values are BY_CAR, BY_FOOT, and RADIOMAX */
|
|
384
340
|
motionMode?: string;
|
|
341
|
+
/** Outdoor location options. Only used in an indoor/outdoor request */
|
|
385
342
|
outdoorLocationOptions?: OutdoorLocationOptions;
|
|
343
|
+
/** Default interval to send locations to the Realtime. Possible values are REALTIME, FAST, NORMAL, SLOW, and BATTERY_SAVER */
|
|
386
344
|
realtimeUpdateInterval?: string;
|
|
345
|
+
/** Default smallest displacement to notify location updates */
|
|
387
346
|
smallestDisplacement?: number;
|
|
347
|
+
/** Defines whether or not to use the barometer for indoor positioning */
|
|
388
348
|
useBarometer?: boolean;
|
|
349
|
+
/** Defines whether or not to use BLE for positioning */
|
|
389
350
|
useBle?: boolean;
|
|
351
|
+
/** Defines whether or not to use dead reckoning to get fast position updates using only the inertial sensors, between the server position updates */
|
|
390
352
|
useDeadReckoning?: boolean;
|
|
353
|
+
/** Defines whether or not to activate the foreground service */
|
|
391
354
|
useForegroundService?: boolean;
|
|
355
|
+
/** Used to configure the notification options for a foreground service */
|
|
392
356
|
foregroundServiceNotificationOptions?: ForegroundServiceNotificationOptions;
|
|
357
|
+
/** Defines whether or not to use GPS for indoor positioning */
|
|
393
358
|
useGps?: boolean;
|
|
359
|
+
/** Defines whether or not to use Wi-Fi for positioning */
|
|
394
360
|
useWifi?: boolean;
|
|
395
361
|
};
|
|
396
362
|
|
|
@@ -400,31 +366,32 @@ export type LocationRequest = {
|
|
|
400
366
|
* Foreground Service.
|
|
401
367
|
* To be used with {@link LocationRequest}.
|
|
402
368
|
* Only applies for Android.
|
|
403
|
-
* @property {ForegroundServiceNotificationOptions} foregroundServiceNotificationOptions
|
|
404
369
|
*/
|
|
405
370
|
export type ForegroundServiceNotificationOptions = {
|
|
371
|
+
/** Notification title */
|
|
406
372
|
title?: string;
|
|
373
|
+
/** Notification message */
|
|
407
374
|
message?: string;
|
|
375
|
+
/** Whether to show stop action */
|
|
408
376
|
showStopAction?: boolean;
|
|
377
|
+
/** Stop action text */
|
|
409
378
|
stopActionText?: string;
|
|
379
|
+
/** Action to perform when tapping the notification */
|
|
410
380
|
tapAction?: ForegroundServiceNotificationsTapAction;
|
|
411
381
|
};
|
|
412
382
|
|
|
413
383
|
/**
|
|
414
|
-
*
|
|
415
|
-
* @description Predefined actions performed when tapping the Situm Foreground Service Notification.
|
|
384
|
+
* Predefined actions performed when tapping the Situm Foreground Service Notification.
|
|
416
385
|
*/
|
|
417
386
|
export enum ForegroundServiceNotificationsTapAction {
|
|
418
387
|
/**
|
|
419
388
|
* Launch the app's main activity using the information returned by android.content.pm.PackageManager#getLaunchIntentForPackage(String).
|
|
420
389
|
*/
|
|
421
390
|
LaunchApp = "LAUNCH_APP",
|
|
422
|
-
|
|
423
391
|
/**
|
|
424
|
-
*
|
|
392
|
+
* Launch the operating system settings screen for the current app.
|
|
425
393
|
*/
|
|
426
394
|
LaunchSettings = "LAUNCH_SETTINGS",
|
|
427
|
-
|
|
428
395
|
/**
|
|
429
396
|
* Do nothing when tapping the notification.
|
|
430
397
|
*/
|
|
@@ -432,162 +399,144 @@ export enum ForegroundServiceNotificationsTapAction {
|
|
|
432
399
|
}
|
|
433
400
|
|
|
434
401
|
/**
|
|
435
|
-
*
|
|
436
|
-
* @description A data object that contains the request for navigation.
|
|
437
|
-
*
|
|
438
|
-
* @property {number} distanceToGoalThreshold - Distance threshold to consider reaching the goal (meters).
|
|
439
|
-
* @property {number} distanceToIgnoreFirstIndication - Maximum distance to ignore the first indication when navigating (meters).
|
|
440
|
-
* @property {number} distanceToFloorChangeThreshold - Distance threshold from when a floor change is considered reached (meters).
|
|
441
|
-
* @property {number} distanceToChangeIndicationThreshold - Distance threshold to change the indication (meters).
|
|
442
|
-
* @property {boolean} ignoreLowQualityLocations - Ignore low-quality locations.
|
|
443
|
-
* @property {number} indicationsInterval - Interval between indications (milliseconds).
|
|
444
|
-
* @property {number} outsideRouteThreshold - Distance threshold to consider being outside the route (meters).
|
|
445
|
-
* @property {number} roundIndicationsStep - Step to round indications (meters).
|
|
446
|
-
* @property {number} timeToFirstIndication - Time to wait until the first indication is returned (milliseconds).
|
|
447
|
-
* @property {number} timeToIgnoreUnexpectedFloorChanges - Time to ignore the locations received during navigation, when the next indication is a floor change,
|
|
448
|
-
* if the locations are on a wrong floor (not in origin or destination floors) (milliseconds).
|
|
402
|
+
* A data object that contains the request for navigation.
|
|
449
403
|
*/
|
|
450
404
|
export type NavigationRequest = {
|
|
405
|
+
/** Distance threshold to change the indication (meters) */
|
|
451
406
|
distanceToChangeIndicationThreshold?: number;
|
|
407
|
+
/** Distance threshold from when a floor change is considered reached (meters) */
|
|
452
408
|
distanceToFloorChangeThreshold?: number;
|
|
409
|
+
/** Distance threshold to consider reaching the goal (meters) */
|
|
453
410
|
distanceToGoalThreshold?: number;
|
|
411
|
+
/** Maximum distance to ignore the first indication when navigating (meters) */
|
|
454
412
|
distanceToIgnoreFirstIndication?: number;
|
|
413
|
+
/** Ignore low-quality locations */
|
|
455
414
|
ignoreLowQualityLocations?: boolean;
|
|
415
|
+
/** Interval between indications (milliseconds) */
|
|
456
416
|
indicationsInterval?: number;
|
|
417
|
+
/** Distance threshold to consider being outside the route (meters) */
|
|
457
418
|
outsideRouteThreshold?: number;
|
|
419
|
+
/** Step to round indications (meters) */
|
|
458
420
|
roundIndicationsStep?: number;
|
|
421
|
+
/** Time to wait until the first indication is returned (milliseconds) */
|
|
459
422
|
timeToFirstIndication?: number;
|
|
423
|
+
/** Time to ignore the locations received during navigation, when the next indication is a floor change,
|
|
424
|
+
* if the locations are on a wrong floor (not in origin or destination floors) (milliseconds) */
|
|
460
425
|
timeToIgnoreUnexpectedFloorChanges?: number;
|
|
461
426
|
};
|
|
462
427
|
|
|
463
428
|
/**
|
|
464
|
-
*
|
|
465
|
-
* @description A data object that contains the request for directions.
|
|
466
|
-
*
|
|
467
|
-
* @property {Building} positioningBuilding
|
|
468
|
-
* @property {Point|Location} from - Current user's position as the starting point of the route.
|
|
469
|
-
* @property {Point|Poi} to - Point to, where the route should end.
|
|
470
|
-
* @property {DirectionsOptions} options - Options that can be added to the request.
|
|
429
|
+
* A data object that contains the request for directions.
|
|
471
430
|
*/
|
|
472
431
|
export type DirectionsRequest = {
|
|
473
432
|
buildingIdentifier: string;
|
|
433
|
+
/** Current user's position as the starting point of the route */
|
|
474
434
|
from: Point | Location;
|
|
435
|
+
/** Point to, where the route should end */
|
|
475
436
|
to: Point | Poi;
|
|
476
437
|
} & DirectionsOptions;
|
|
477
438
|
|
|
478
439
|
/**
|
|
479
|
-
*
|
|
480
|
-
* @description A data object that contains the directions options.
|
|
481
|
-
*
|
|
482
|
-
* @property {boolean} minimizeFloorChanges - Defines wheter or not the route should be calculated minimizing the floor changes even if the result is longer.
|
|
483
|
-
* @property {string} accessibilityMode - Defines the accessibility mode of the route. Possible values are: CHOOSE_SHORTEST, ONLY_NOT_ACCESSIBLE_FLOOR_CHANGES, ONLY_ACCESSIBLE
|
|
484
|
-
* @property {number} startingAngle - Current user's orientation in degrees.
|
|
485
|
-
* @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
|
|
486
|
-
* @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.
|
|
440
|
+
* A data object that contains the directions options.
|
|
487
441
|
*/
|
|
488
442
|
export type DirectionsOptions = {
|
|
443
|
+
/** Defines whether or not the route should be calculated minimizing the floor changes even if the result is longer */
|
|
489
444
|
minimizeFloorChanges?: boolean;
|
|
445
|
+
/** Defines the accessibility mode of the route. Possible values are: CHOOSE_SHORTEST, ONLY_NOT_ACCESSIBLE_FLOOR_CHANGES, ONLY_ACCESSIBLE */
|
|
490
446
|
accessibilityMode?: AccessibilityMode;
|
|
491
|
-
|
|
447
|
+
/** Current user's orientation in degrees */
|
|
492
448
|
startingAngle?: number;
|
|
493
449
|
bearingFrom?: number;
|
|
450
|
+
/**
|
|
451
|
+
* List of tags that you want to use when calculating a route. Only the tags added here will be used.
|
|
452
|
+
* If there are other tags in the graph they won't be used. The edges without a tag will be used.
|
|
453
|
+
* If you don't set nothing all the graph will be used to calculate the route.
|
|
454
|
+
* @see https://situm.com/docs/cartography-management/#tags
|
|
455
|
+
*/
|
|
494
456
|
includedTags?: string[];
|
|
457
|
+
/**
|
|
458
|
+
* 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.
|
|
459
|
+
* If the route can only be generated passing through an edge with this tag the route calculation will fail.
|
|
460
|
+
* @see https://situm.com/docs/cartography-management/#tags
|
|
461
|
+
*/
|
|
495
462
|
excludedTags?: string[];
|
|
496
463
|
};
|
|
497
464
|
|
|
498
465
|
/**
|
|
499
|
-
*
|
|
500
|
-
* @description Outdoor location options are only used in indoor-outdoor mode (Only available for Android)
|
|
501
|
-
*
|
|
502
|
-
* @property {boolean} continuousMode - Environment detection continuous mode (true) or burst mode (false).
|
|
503
|
-
* @property {boolean} userDefinedThreshold
|
|
504
|
-
* @property {number} burstInterval - Interval to scan for GPS and detect the environment (in seconds).
|
|
505
|
-
* @property {number} averageSnrThreshold
|
|
466
|
+
* Outdoor location options are only used in indoor-outdoor mode (Only available for Android)
|
|
506
467
|
*/
|
|
507
468
|
export type OutdoorLocationOptions = {
|
|
469
|
+
/** Environment detection continuous mode (true) or burst mode (false) */
|
|
508
470
|
continuousMode?: boolean;
|
|
509
471
|
userDefinedThreshold?: boolean;
|
|
472
|
+
/** Interval to scan for GPS and detect the environment (in seconds) */
|
|
510
473
|
burstInterval?: number;
|
|
511
474
|
averageSnrThreshold?: number;
|
|
512
475
|
};
|
|
513
476
|
|
|
514
477
|
/**
|
|
515
|
-
*
|
|
516
|
-
* @description Represents a BLE filter. Now the only field is the BLE proximity UUID
|
|
517
|
-
*
|
|
518
|
-
* @property {string} uuid - Assigns the proximity UUID
|
|
478
|
+
* Represents a BLE filter. Now the only field is the BLE proximity UUID
|
|
519
479
|
*/
|
|
520
480
|
export type BeaconFilter = {
|
|
481
|
+
/** Assigns the proximity UUID */
|
|
521
482
|
uuid: string;
|
|
522
483
|
};
|
|
523
484
|
|
|
524
485
|
/**
|
|
525
|
-
*
|
|
526
|
-
* @description A data object that contains the parameters to process realtime data of the users.
|
|
527
|
-
*
|
|
528
|
-
* @property {Building} building object
|
|
529
|
-
* @property {int} pollTime - Interval in milliseconds (minimum is 3000ms).
|
|
486
|
+
* A data object that contains the parameters to process realtime data of the users.
|
|
530
487
|
*/
|
|
531
488
|
export type RealTimeRequest = {
|
|
489
|
+
/** Building object */
|
|
532
490
|
building: Building;
|
|
491
|
+
/** Interval in milliseconds (minimum is 3000ms) */
|
|
533
492
|
pollTime: number;
|
|
534
493
|
};
|
|
535
494
|
|
|
536
495
|
/**
|
|
537
|
-
*
|
|
538
|
-
* @description A data object that contains information of the location of users in realtime.
|
|
539
|
-
*
|
|
540
|
-
* @property {Array<Location>} locations object
|
|
496
|
+
* A data object that contains information of the location of users in realtime.
|
|
541
497
|
*/
|
|
542
498
|
export type RealTimeData = {
|
|
499
|
+
/** Array of location objects */
|
|
543
500
|
locations: Location[];
|
|
544
501
|
};
|
|
545
502
|
|
|
546
503
|
/**
|
|
547
|
-
*
|
|
548
|
-
* @
|
|
549
|
-
*
|
|
550
|
-
* @type
|
|
551
|
-
* @property {string} react_native - The version of React Native used in the SDK.
|
|
552
|
-
* @property {string} [ios] - Optional. The specific version of the Situm SDK for the iOS platform.
|
|
553
|
-
* @property {string} [android] - Optional. The specific version of the Situm SDK for the Android platform.
|
|
504
|
+
* Represents the version information of the SDK and its compatibility with different platforms.
|
|
505
|
+
* @deprecated This type will be removed in future versions.
|
|
554
506
|
*/
|
|
555
507
|
export type SdkVersion = {
|
|
508
|
+
/** The version of React Native used in the SDK */
|
|
556
509
|
react_native: string;
|
|
510
|
+
/** The specific version of the Situm SDK for the iOS platform */
|
|
557
511
|
ios?: string;
|
|
512
|
+
/** The specific version of the Situm SDK for the Android platform */
|
|
558
513
|
android?: string;
|
|
559
514
|
};
|
|
560
515
|
|
|
561
516
|
/**
|
|
562
|
-
*
|
|
563
|
-
* @description Configuration options for initializing the SDK or other modules.
|
|
564
|
-
*
|
|
565
|
-
* @type
|
|
566
|
-
* @property {boolean} [useRemoteConfig] - Optional. Determines whether to use Remote Configuration settings.
|
|
567
|
-
* @property {number} [cacheMaxAge] - Optional. The maximum age of the cache in seconds.
|
|
517
|
+
* Configuration options for initializing the SDK or other modules.
|
|
568
518
|
*/
|
|
569
519
|
export type ConfigurationOptions = {
|
|
520
|
+
/** Determines whether to use Remote Configuration settings */
|
|
570
521
|
useRemoteConfig?: boolean;
|
|
522
|
+
/** The maximum age of the cache in seconds */
|
|
571
523
|
cacheMaxAge?: number;
|
|
572
524
|
};
|
|
573
525
|
|
|
574
526
|
/**
|
|
575
|
-
*
|
|
576
|
-
* @description Represents a location with various attributes including position, accuracy, and bearing.
|
|
577
|
-
*
|
|
578
|
-
* @interface
|
|
579
|
-
* @property {Position} [position] - Optional. The position information of the location.
|
|
580
|
-
* @property {number} [accuracy] - Optional. The accuracy of the location information in meters.
|
|
581
|
-
* @property {Object} [bearing] - Optional. Bearing information including degrees and degreesClockwise.
|
|
582
|
-
* @property {boolean} [hasBearing] - Optional. Indicates if bearing information is available.
|
|
527
|
+
* Represents a location with various attributes including position, accuracy, and bearing.
|
|
583
528
|
*/
|
|
584
529
|
export interface Location {
|
|
530
|
+
/** The position information of the location */
|
|
585
531
|
position?: Position;
|
|
532
|
+
/** The accuracy of the location information in meters */
|
|
586
533
|
accuracy?: number;
|
|
534
|
+
/** Bearing information including degrees and degreesClockwise */
|
|
587
535
|
bearing?: {
|
|
588
536
|
degrees: number;
|
|
589
537
|
degreesClockwise: number;
|
|
590
538
|
};
|
|
539
|
+
/** Indicates if bearing information is available */
|
|
591
540
|
hasBearing?: boolean;
|
|
592
541
|
}
|
|
593
542
|
|
|
@@ -607,64 +556,52 @@ export interface Position {
|
|
|
607
556
|
}
|
|
608
557
|
|
|
609
558
|
/**
|
|
610
|
-
*
|
|
611
|
-
* @description Represents the status of a location, including a name and a numeric code.
|
|
612
|
-
*
|
|
613
|
-
* @interface
|
|
614
|
-
* @property {LocationStatusName} statusName - The name of the location status.
|
|
615
|
-
* @property {number} statusCode - The numeric code representing the location status.
|
|
559
|
+
* Represents the status of a location, including a name and a numeric code.
|
|
616
560
|
*/
|
|
617
561
|
export interface LocationStatus {
|
|
562
|
+
/** The name of the location status */
|
|
618
563
|
statusName: LocationStatusName;
|
|
564
|
+
/** The numeric code representing the location status */
|
|
619
565
|
statusCode: number;
|
|
620
566
|
}
|
|
621
567
|
|
|
622
568
|
/**
|
|
623
|
-
*
|
|
624
|
-
* @description Enumeration of error types to categorize the severity of errors.
|
|
625
|
-
*
|
|
626
|
-
* @enum {string}
|
|
627
|
-
* @property {string} CRITICAL - Represents critical errors that will cause the system not to work (e.g. positioning will be stopped).
|
|
628
|
-
* @property {string} NON_CRITICAL - Represents non-critical errors that are less severe.
|
|
569
|
+
* Enumeration of error types to categorize the severity of errors.
|
|
629
570
|
*/
|
|
630
571
|
export enum ErrorType {
|
|
572
|
+
/** Represents critical errors that will cause the system not to work (e.g. positioning will be stopped) */
|
|
631
573
|
CRITICAL = "CRITICAL",
|
|
574
|
+
/** Represents non-critical errors that are less severe */
|
|
632
575
|
NON_CRITICAL = "NON_CRITICAL",
|
|
633
576
|
}
|
|
634
577
|
|
|
635
578
|
/**
|
|
636
|
-
*
|
|
637
|
-
* @description Enumeration of error codes provided by Situm SDK.
|
|
638
|
-
*
|
|
639
|
-
* @enum {string}
|
|
640
|
-
* @property {string} LOCATION_PERMISSION_DENIED - Indicates that location permissions were not granted by the user.
|
|
641
|
-
* @property {string} BLUETOOTH_PERMISSION_DENIED - Indicates that Bluetooth permissions were not granted.
|
|
642
|
-
* @property {string} BLUETOOTH_DISABLED - Indicates that Bluetooth is disabled on the device.
|
|
643
|
-
* @property {string} LOCATION_DISABLED - Indicates that the location services are disabled on the device.
|
|
644
|
-
* @property {string} REDUCED_ACCURACY - Indicates that the precise location has been turned off on the device.
|
|
645
|
-
* @property {string} UNKNOWN - Represents an unknown error or an error that does not fit other categories.
|
|
579
|
+
* Enumeration of error codes provided by Situm SDK.
|
|
646
580
|
*/
|
|
647
581
|
export enum ErrorCode {
|
|
582
|
+
/** Indicates that location permissions were not granted by the user */
|
|
648
583
|
LOCATION_PERMISSION_DENIED = "LOCATION_PERMISSION_DENIED",
|
|
584
|
+
/** Indicates that Bluetooth permissions were not granted */
|
|
649
585
|
BLUETOOTH_PERMISSION_DENIED = "BLUETOOTH_PERMISSION_DENIED",
|
|
586
|
+
/** Indicates that Bluetooth is disabled on the device */
|
|
650
587
|
BLUETOOTH_DISABLED = "BLUETOOTH_DISABLED",
|
|
588
|
+
/** Indicates that the location services are disabled on the device */
|
|
651
589
|
LOCATION_DISABLED = "LOCATION_DISABLED",
|
|
590
|
+
/** Indicates that the precise location has been turned off on the device */
|
|
652
591
|
REDUCED_ACCURACY = "REDUCED_ACCURACY",
|
|
592
|
+
/** Represents an unknown error or an error that does not fit other categories */
|
|
653
593
|
UNKNOWN = "UNKNOWN",
|
|
654
594
|
}
|
|
655
595
|
|
|
656
596
|
/**
|
|
657
|
-
*
|
|
658
|
-
* @description Represents an error with a specific code, message, and type.
|
|
659
|
-
*
|
|
660
|
-
* @interface
|
|
661
|
-
* @property {ErrorCode} code - The specific error code associated with this error.
|
|
662
|
-
* @property {string} message - A descriptive message providing more details about the error.
|
|
663
|
-
* @property {ErrorType} type - The type of the error indicating its severity (critical or non-critical).
|
|
597
|
+
* Represents an error with a specific code, message, and type.
|
|
664
598
|
*/
|
|
665
599
|
export interface Error {
|
|
600
|
+
/** The specific error code associated with this error */
|
|
666
601
|
code: ErrorCode;
|
|
602
|
+
/** A descriptive message providing more details about the error */
|
|
667
603
|
message: string;
|
|
604
|
+
/** The type of the error indicating its severity (critical or non-critical) */
|
|
668
605
|
type: ErrorType;
|
|
669
606
|
}
|
|
670
607
|
|
|
@@ -686,29 +623,21 @@ export class InternalCall<T = any> {
|
|
|
686
623
|
}
|
|
687
624
|
|
|
688
625
|
/**
|
|
689
|
-
* @name
|
|
690
|
-
* UserHelperColorScheme
|
|
691
|
-
* @description
|
|
692
626
|
* Color scheme for the user helper UI.
|
|
693
|
-
* @property {string} primaryColor - Primary color for the user helper UI. Use HEX color code (e.g. "#ff5733").
|
|
694
|
-
* @property {string} secondaryColor - Secondary color for the user helper UI. Use HEX color code (e.g. "#ff5733").
|
|
695
627
|
*/
|
|
696
|
-
|
|
697
628
|
export type UserHelperColorScheme = {
|
|
629
|
+
/** Primary color for the user helper UI. Use HEX color code (e.g. "#ff5733") */
|
|
698
630
|
primaryColor: string;
|
|
631
|
+
/** Secondary color for the user helper UI. Use HEX color code (e.g. "#ff5733") */
|
|
699
632
|
secondaryColor: string;
|
|
700
633
|
};
|
|
701
634
|
|
|
702
635
|
/**
|
|
703
|
-
* @name
|
|
704
|
-
* UserHelperOptions
|
|
705
|
-
* @description
|
|
706
636
|
* Configuration options for the user helper.
|
|
707
|
-
* @property {boolean} enabled - Whether the user helper is enabled. Equivalent to the underlying native SitumSdk.userHelperManager#autoManage(true).
|
|
708
|
-
* @property {UserHelperColorScheme} colorScheme - Color scheme for the user helper UI.
|
|
709
637
|
*/
|
|
710
|
-
|
|
711
638
|
export type UserHelperOptions = {
|
|
639
|
+
/** Whether the user helper is enabled. Equivalent to the underlying native SitumSdk.userHelperManager#autoManage(true) */
|
|
712
640
|
enabled: boolean;
|
|
641
|
+
/** Color scheme for the user helper UI */
|
|
713
642
|
colorScheme: UserHelperColorScheme | undefined;
|
|
714
643
|
};
|