@mappedin/mappedin-js 6.0.0-alpha.8 → 6.0.1-alpha.2

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 (44) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +44 -157
  3. package/lib/esm/Arrival-7CH7MHGT.js +1 -0
  4. package/lib/esm/Chalet-HJY2RRWP.js +1 -0
  5. package/lib/esm/GLTFExporter-6MY3TTW5.js +1 -0
  6. package/lib/esm/HelveticaNeue-KYLSWWLS.js +1 -0
  7. package/lib/esm/Helvetiker-INS43MZX.js +1 -0
  8. package/lib/esm/Lato-ULDR5SED.js +1 -0
  9. package/lib/esm/MyriadPro-ZAEETUH5.js +1 -0
  10. package/lib/esm/PerformanceController-VMCH7DPO.js +1 -0
  11. package/lib/esm/ProximaNova-Q6CVROCO.js +1 -0
  12. package/lib/esm/SimonCircular-I6ROXOEJ.js +1 -0
  13. package/lib/esm/browser-G6HNHS3R.js +1 -0
  14. package/lib/esm/chunk-ISNJUESV.js +1 -0
  15. package/lib/esm/chunk-J5IUISYU.js +1 -0
  16. package/lib/esm/chunk-SVP2SCIT.js +1 -0
  17. package/lib/esm/chunk-VSBVGSLC.js +1 -0
  18. package/lib/esm/index.css +1 -0
  19. package/lib/esm/index.d.ts +14657 -0
  20. package/lib/esm/index.js +1 -0
  21. package/lib/esm/outdoor-context-HUI6WIRE.js +1 -0
  22. package/lib/index.css +1 -0
  23. package/package.json +18 -53
  24. package/lib/esm/get-venue/index.d.ts +0 -2466
  25. package/lib/esm/get-venue/index.js +0 -1
  26. package/lib/esm/navigator/index.d.ts +0 -243
  27. package/lib/esm/navigator/index.js +0 -1
  28. package/lib/esm/renderer/Arrival-HFFQMV6K.js +0 -1
  29. package/lib/esm/renderer/Chalet-4T7G2EOB.js +0 -1
  30. package/lib/esm/renderer/HelveticaNeue-SYBCLCMV.js +0 -1
  31. package/lib/esm/renderer/Helvetiker-YQQ7YLDG.js +0 -1
  32. package/lib/esm/renderer/Lato-VOB7DTFK.js +0 -1
  33. package/lib/esm/renderer/MyriadPro-3UT6I6O6.js +0 -1
  34. package/lib/esm/renderer/ProximaNova-JID4Q6QR.js +0 -1
  35. package/lib/esm/renderer/SimonCircular-EOKJ3PHU.js +0 -1
  36. package/lib/esm/renderer/browser-IFEP2NKH.js +0 -1
  37. package/lib/esm/renderer/chunk-6MFNIXKK.js +0 -1
  38. package/lib/esm/renderer/chunk-K7MHFVG3.js +0 -1
  39. package/lib/esm/renderer/index.css +0 -1
  40. package/lib/esm/renderer/index.d.ts +0 -5261
  41. package/lib/esm/renderer/index.js +0 -1
  42. package/lib/mappedin.css +0 -1
  43. package/lib/mappedin.js +0 -1
  44. package/lib/node/index.js +0 -1
@@ -1,2466 +0,0 @@
1
- // Generated by dts-bundle v0.7.3
2
- // Dependencies for this module:
3
- // ../minisearch
4
- // ../geojson
5
-
6
- declare module '@mappedin/mappedin-js/lib/esm/get-venue' {
7
- import type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
8
- import { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
9
- /**
10
- * This is how we can avoid bundling in node-fetch (via isomorphic fetch),
11
- * which keeps popping up in security advisories
12
- * This is a pattern that most isomorphic libraries appear to use,
13
- * where when running in node, you can pass your own fetch function
14
- * as one is not provided by Node.js.
15
- *
16
- */
17
- export function isomorphicFetch(): Window['fetch'];
18
- /**
19
- * Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest
20
- */
21
- export function setFetchFn(fetchFn: any): void;
22
- /** Classes */
23
- export { Mappedin, MappedinCollectionType } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
24
- export { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
25
- export { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
26
- export { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
27
- export { MappedinCategory } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCategory';
28
- export { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
29
- export { MappedinEvent } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinEvent';
30
- export { MappedinMapGroup } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMapGroup';
31
- export { MappedinVenue } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVenue';
32
- export { MappedinVortex } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVortex';
33
- export { MappedinDirections } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
34
- export { MappedinCoordinate } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate';
35
- export { MappedinRankings } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinRankings';
36
- export { MappedinDestinationSet } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDestinationSet';
37
- export { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
38
- export type { TTHINGS } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
39
- export type { TMappedinDirective } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
40
- export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator';
41
- export type { TOperationHoursMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
42
- export type { TMappedinCoordinateOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate';
43
- export type { TDirectionToOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
44
- export { OfflineSearch } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.OfflineSearch';
45
- export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.OfflineSearch';
46
- /** API data types */
47
- export type { TLocationType, TNode, TImage, TLogo, TGalleryImage, TPhone, TSocial, TColor, TVortex, TPicture, TOpeningHours, TSiblingGroup, TState, TCategory, TEvent, TGeoReference, TMap, TMapGroup, TBuilding, TLocation, TPolygon, TPolygonRanking, TVenue, TMappedinAPI } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
48
- export type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
49
- import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
50
- export type TShowVenueOptions = {
51
- /**
52
- * Sets the initial background color of the map, including while loading.
53
- *
54
- */
55
- backgroundColor?: string;
56
- /**
57
- * The opacity of the initial background color.
58
- */
59
- backgroundAlpha?: number;
60
- /**
61
- * Whether or not to display default styled Floating Labels initially
62
- */
63
- labelAllLocationsOnInit?: boolean;
64
- /**
65
- * The id of the first map to show on map load
66
- */
67
- firstMapId?: string;
68
- loadOptions?: {
69
- /**
70
- * Set the map render strategy in order to optimize FPS
71
- *
72
- * @beta
73
- */
74
- mapRenderStrategy?: MAP_RENDER_MODE;
75
- };
76
- };
77
- export { MAP_RENDER_MODE };
78
- /**
79
- * @internal
80
- */
81
- export function getVenueMVF(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
82
- /**
83
- * Get Venue Data for a Mappedin Venue
84
- */
85
- export function getVenue(userOptions: TGetVenueOptions): Promise<Mappedin>;
86
- /**
87
- * @internal
88
- */
89
- export function __setGetVenueMock(fn: any): void;
90
- export type TGetVenueBundleOptions = TGetVenueOptions & {
91
- bundleBaseUri?: string;
92
- version?: string;
93
- /**
94
- * Parse bundle and convert images to blobs. Disabled in React Native
95
- * @private
96
- */
97
- shouldPopulateBundledImagesAsBlobs?: boolean;
98
- };
99
- /**
100
- * @deprecated
101
- * Fetching an offline Venue bundle
102
- * It is possible to download the venue bundle with all assets built in, which allows for caching/offline solutions.
103
- * Note 1: This requires enabling from Mappedin's Customer Solutions team.
104
- * Note 2: This may behave a lot slower for large venues, especially those with many images. We are actively working on improving load times.
105
- */
106
- export function getVenueBundle(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
107
- /**
108
- * Get the bundle URL and updated_at time.
109
- * @internal
110
- */
111
- export function getVenueBundleURL(userOptions: TGetVenueBundleOptions): Promise<{
112
- url: string;
113
- updated_at: string;
114
- }>;
115
- /**
116
- * Download a bundle and return a Mappedin instance
117
- * @internal
118
- */
119
- export function downloadBundle(userOptions: any, { url, updated_at }: {
120
- url: any;
121
- updated_at: any;
122
- }): Promise<Mappedin>;
123
- /**
124
- * Get the bundle URL and updated_at time.
125
- * @internal
126
- */
127
- export function getVenueMVFURL(userOptions: TGetVenueBundleOptions): Promise<{
128
- url: string;
129
- updated_at: string;
130
- }>;
131
- /**
132
- * @internal
133
- */
134
- export function downloadVenueBundleMVF(options: TGetVenueBundleOptions,
135
- /**
136
- * use Web Workers to speed up MVF parsing. This is likely only benefitial for larger venues,
137
- * and may be determental to smaller ones, hence it is off by default
138
- */
139
- useWorker?: boolean): Promise<unknown>;
140
- }
141
-
142
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types' {
143
- export type TGetVenueOptions = {
144
- accessToken?: string;
145
- clientId?: string;
146
- clientSecret?: string;
147
- baseUrl?: string;
148
- includeHidden?: boolean;
149
- noAuth?: boolean;
150
- perspective?: string;
151
- language?: string;
152
- headers?: {
153
- [key in string]: string;
154
- };
155
- venue: string;
156
- things?: any;
157
- useDraftData?: boolean;
158
- platformString?: string;
159
- emitAnalyticsEvents?: boolean;
160
- };
161
- export type TGetVenueOptionsInternal = {
162
- baseUrl?: string;
163
- supplementaryUrl?: string;
164
- noAuth?: boolean;
165
- includeHidden?: boolean;
166
- apiGateway?: string;
167
- authorization?: string;
168
- things?: any;
169
- headers?: any;
170
- };
171
- export enum MAP_RENDER_MODE {
172
- /** Each polygon, its geometry and mesh are sent to the GPU every render frame.
173
- * This was the default rendering mode before 4.0.17
174
- */
175
- MULTI_GEOMETRY = "MULTI_GEOMETRY",
176
- /** Polygons' geometries are grouped by material and merged together, resulting in far fewer
177
- * draw calls to the GPU. Default rendering mode since 4.0.17
178
- */
179
- SINGLE_GEOMETRY = "SINGLE_GEOMETRY"
180
- }
181
- }
182
-
183
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin' {
184
- import { Navigator } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator';
185
- import { MVFData } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.MVF.types';
186
- import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
187
- import { MappedinCategory } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCategory';
188
- import { MappedinEvent } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinEvent';
189
- import { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
190
- import { MappedinLocationRankings } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocationRankings';
191
- import { MappedinLocationState } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocationState';
192
- import { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
193
- import { MappedinMapGroup } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMapGroup';
194
- import { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
195
- import { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
196
- import { MappedinRankings } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinRankings';
197
- import { MappedinTheme } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinTheme';
198
- import { MappedinVenue } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVenue';
199
- import { MappedinVortex } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVortex';
200
- import { IAnalytics } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.Analytics';
201
- export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
202
- export enum MappedinCollectionType {
203
- CATEGORY = "categories",
204
- EVENT = "events",
205
- LOCATION = "locations",
206
- MAPGROUP = "mapGroups",
207
- MAP = "maps",
208
- NODE = "nodes",
209
- POLYGON = "polygons",
210
- VORTEX = "vortexes"
211
- }
212
- type TAccessors = {
213
- [MappedinCollectionType.CATEGORY]: MappedinCategory;
214
- [MappedinCollectionType.EVENT]: MappedinEvent;
215
- [MappedinCollectionType.LOCATION]: MappedinLocation;
216
- [MappedinCollectionType.MAPGROUP]: MappedinMapGroup;
217
- [MappedinCollectionType.MAP]: MappedinMap;
218
- [MappedinCollectionType.NODE]: MappedinNode;
219
- [MappedinCollectionType.POLYGON]: MappedinPolygon;
220
- [MappedinCollectionType.VORTEX]: MappedinVortex;
221
- };
222
- const THINGS: {
223
- categories: typeof MappedinCategory;
224
- locations: typeof MappedinLocation;
225
- vortexes: typeof MappedinVortex;
226
- maps: typeof MappedinMap;
227
- nodes: typeof MappedinNode;
228
- polygons: typeof MappedinPolygon;
229
- venue: typeof MappedinVenue;
230
- events: typeof MappedinEvent;
231
- mapGroups: typeof MappedinMapGroup;
232
- themes: typeof MappedinTheme;
233
- locationStates: typeof MappedinLocationState;
234
- rankings: typeof MappedinRankings;
235
- };
236
- export type TTHINGS = keyof typeof THINGS;
237
- export class Mappedin {
238
- #private;
239
- perspective: any;
240
- things: any;
241
- options: any;
242
- updatedAt?: string;
243
- categories: MappedinCategory[];
244
- locations: MappedinLocation[];
245
- vortexes: MappedinVortex[];
246
- maps: MappedinMap[];
247
- nodes: MappedinNode[];
248
- polygons: MappedinPolygon[];
249
- venue: MappedinVenue;
250
- events: MappedinEvent[];
251
- mapGroups: MappedinMapGroup[];
252
- themes: MappedinTheme[];
253
- locationStates: MappedinLocationState[];
254
- rankings?: MappedinRankings;
255
- /**
256
- * @hidden
257
- * @internal
258
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
259
- */
260
- _categoriesById?: {
261
- [id: string]: MappedinCategory;
262
- };
263
- /**
264
- * @hidden
265
- * @internal
266
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
267
- */
268
- _locationsById?: {
269
- [id: string]: MappedinLocation;
270
- };
271
- /**
272
- * @hidden
273
- * @internal
274
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
275
- */
276
- _vortexesById?: {
277
- [id: string]: MappedinVortex;
278
- };
279
- /**
280
- * @hidden
281
- * @internal
282
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
283
- */
284
- _mapsById?: {
285
- [id: string]: MappedinMap;
286
- };
287
- /**
288
- * @hidden
289
- * @internal
290
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
291
- */
292
- _nodesById?: {
293
- [id: string]: MappedinNode;
294
- };
295
- /**
296
- * @hidden
297
- * @internal
298
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
299
- */
300
- _polygonsById?: {
301
- [id: string]: MappedinPolygon;
302
- };
303
- /**
304
- * @hidden
305
- * @internal
306
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
307
- */
308
- _eventsById?: {
309
- [id: string]: MappedinEvent;
310
- };
311
- /**
312
- * @hidden
313
- * @internal
314
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
315
- */
316
- _mapGroupsById?: {
317
- [id: string]: MappedinMapGroup;
318
- };
319
- /**
320
- * @hidden
321
- * @internal
322
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
323
- */
324
- _locationStatesById?: {
325
- [id: string]: MappedinLocationState;
326
- };
327
- /**
328
- * @hidden
329
- * @internal
330
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
331
- */
332
- _locationRankingsById?: {
333
- [id: string]: MappedinLocationRankings;
334
- };
335
- /**
336
- * @hidden
337
- * @internal
338
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
339
- */
340
- _rankingsById?: {
341
- [id: string]: MappedinRankings;
342
- };
343
- /**
344
- * @hidden
345
- * @internal
346
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
347
- */
348
- _categoriesByExternalId?: {
349
- [id: string]: MappedinCategory;
350
- };
351
- /**
352
- * @hidden
353
- * @internal
354
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
355
- */
356
- _locationsByExternalId?: {
357
- [id: string]: MappedinLocation;
358
- };
359
- /**
360
- * @hidden
361
- * @internal
362
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
363
- */
364
- _vortexesByExternalId?: {
365
- [id: string]: MappedinVortex;
366
- };
367
- /**
368
- * @hidden
369
- * @internal
370
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
371
- */
372
- _mapsByExternalId?: {
373
- [id: string]: MappedinMap;
374
- };
375
- /**
376
- * @hidden
377
- * @internal
378
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
379
- */
380
- _nodesByExternalId?: {
381
- [id: string]: MappedinNode;
382
- };
383
- /**
384
- * @hidden
385
- * @internal
386
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
387
- */
388
- _polygonsByExternalId?: {
389
- [id: string]: MappedinPolygon;
390
- };
391
- /**
392
- * @hidden
393
- * @internal
394
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
395
- */
396
- _eventsByExternalId?: {
397
- [id: string]: MappedinEvent;
398
- };
399
- /**
400
- * @hidden
401
- * @internal
402
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
403
- */
404
- _mapGroupsByExternalId?: {
405
- [id: string]: MappedinMapGroup;
406
- };
407
- /**
408
- * @hidden
409
- * @internal
410
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
411
- */
412
- _locationStatesByExternalId?: {
413
- [id: string]: MappedinLocationState;
414
- };
415
- /**
416
- * @hidden
417
- * @internal
418
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
419
- */
420
- _locationRankingsByExternalId?: {
421
- [id: string]: MappedinLocationRankings;
422
- };
423
- /**
424
- * @hidden
425
- * @internal
426
- * @deprecated Use {@link Mappedin.getCollectionItemById} instead
427
- */
428
- _rankingsByExternalId?: {
429
- [id: string]: MappedinRankings;
430
- };
431
- getCollectionItemById<T extends keyof TAccessors, I extends string>(name: T, id: I): TAccessors[T] | null;
432
- /**
433
- * @hidden
434
- * @internal
435
- */
436
- hydrateFromMVF(mvfData: MVFData): Promise<undefined>;
437
- /**
438
- *
439
- * [experimental] Hydrate the Mappedin instance using a response from either {@link IMappedin.toString()}, {@link getVenueBundle} or by downloading the bundle manually
440
- * @param mappedinSerializableData Mappedin data that was serialized or exported as JSON
441
- * @param shouldPopulateBundledImagesAsBlobs Takes the scenes and images from a bundle and maps them as blobs to where they exist as URLs in the bundle. False by default
442
- */
443
- hydrate(mappedinSerializableData: string | object, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<undefined>;
444
- images: any;
445
- imageBinaries?: Map<string, Uint8Array>;
446
- scenes: any;
447
- fetch(): Promise<void>;
448
- constructor(options: TGetVenueOptionsInternal & TGetVenueOptions);
449
- analytics: IAnalytics;
450
- /**
451
- * @hidden
452
- */
453
- navigator?: Navigator;
454
- /**
455
- * Export venue data to JSON (for storage, encryption, etc)
456
- */
457
- toJSON(): any;
458
- /**
459
- * Export venue data to String
460
- */
461
- toString(): string;
462
- }
463
- export {};
464
- }
465
-
466
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation' {
467
- import type { TLocation, TColor, TGalleryImage, TLogo, TOpeningHours, TPhone, TPicture, TSiblingGroup, TSocial } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
468
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
469
- import type { MappedinLocationState } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocationState';
470
- import type { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
471
- import type { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
472
- import type { MappedinCategory } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCategory';
473
- import { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
474
- export function getCurrentLocationState(location: MappedinLocation, states: MappedinLocationState[], date?: Date): MappedinLocationState | undefined;
475
- export type TOperationHoursMap = {
476
- [key in string]: TOpeningHours[];
477
- };
478
- /**
479
- * A {@link MappedinLocation} is something like a store or washroom on a {@link MappedinMap}. It has an ID and will be linked to zero or more {@link MappedinNode}s and {@link MappedinPolygon}s.
480
- *
481
- * A Location's Nodes and Polygons can be on multiple Maps, or in multiple non-adjacent places on the same Map.
482
- * For example, all washroom at a given Venue could belong to one Location, or a department store could live on multiple floors. A Washroom Location might a have a few Polygons spread throughout the Venue for each one that exists, but a single store might just have one presence, and therefore one Polygon. Some Locations just have a single point and only have Nodes.
483
- *
484
- * A Location can have more properties (typically things like 'name', 'externalId', 'type', 'categories', 'description', 'logo', etc).
485
- *
486
- * The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Locations. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
487
- *
488
- * See below for an example a 'things' object with available Location properties specified:
489
- *
490
- * things: {
491
- * venue: [],
492
- * locations: ['venue', 'name', 'type', 'icon', 'logo', 'language', 'externalId', 'description', 'categories', 'phone', 'operationHours', 'social', 'tags', 'parents', 'sortOrder'],
493
- * categories: [],
494
- * maps: []
495
- * }
496
- *
497
- * @class MappedinLocation
498
- */
499
- export class MappedinLocation extends MappedinNavigatable {
500
- #private;
501
- states: TLocation['states'];
502
- id: string;
503
- name: string;
504
- type: string;
505
- description?: string;
506
- sortOrder?: number;
507
- logo?: TLogo;
508
- phone?: TPhone;
509
- social?: TSocial;
510
- color?: TColor;
511
- shortName?: string;
512
- detailsUrl?: string;
513
- tags?: string[];
514
- externalId?: string;
515
- showLabelWhenImagePresent?: boolean;
516
- picture?: TPicture;
517
- operationHours?: TOpeningHours[] | undefined;
518
- siblingGroups?: TSiblingGroup[] | undefined;
519
- gallery?: TGalleryImage[] | undefined;
520
- constructor(mappedin: Mappedin, data: any);
521
- /**
522
- * Polygons this Location is attached to.
523
- *
524
- * @property polygons
525
- * @type [MappedinPolygon]
526
- */
527
- get polygons(): MappedinPolygon[];
528
- set polygons(polygons: MappedinPolygon[]);
529
- /**
530
- * Nodes this Location is attached to.
531
- *
532
- * @property nodes
533
- * @type [MappedinNode]
534
- */
535
- get nodes(): MappedinNode[];
536
- set nodes(nodes: MappedinNode[]);
537
- /**
538
- * Parent of this Location, if any. Used in cases where one Location is inside another, more "important" Location.
539
- *
540
- * @property parent
541
- * @type MappedinLocation
542
- */
543
- get parent(): MappedinLocation | undefined;
544
- set parent(parent: MappedinLocation | undefined);
545
- /**
546
- * Categories related to this location.
547
- *
548
- * @property categories
549
- * @type [MappedinCategory]
550
- */
551
- get categories(): MappedinCategory[];
552
- get state(): MappedinLocationState | undefined;
553
- clone(): MappedinLocation;
554
- get nodeOperationHours(): TOperationHoursMap;
555
- static hydrate(locations: any, mappedin: Mappedin): MappedinLocation[];
556
- static fetch(mappedin: Mappedin): Promise<MappedinLocation[]>;
557
- toJSON(): any;
558
- }
559
- }
560
-
561
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon' {
562
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
563
- import type { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
564
- import type { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
565
- import { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
566
- import { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
567
- /**
568
- * The {@link MappedinPolygon} class represents the 3D shape of a {@link MappedinLocation} on a {{@link MappedinMap}. Polygons have access to Locations they belong to, and any entrances to the Polygon.
569
- *
570
- * A Polygon can have more properties but usually the default is sufficient. The {@link Mappedin}'things' object is where you would specify what properties you want to download for Polygons. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
571
- *
572
- * @class MappedinPolygon
573
- */
574
- export class MappedinPolygon extends MappedinNavigatable {
575
- #private;
576
- geometry: any;
577
- perspectives?: any;
578
- image?: {
579
- visible: boolean;
580
- url: string | Blob;
581
- original: string | Blob;
582
- useLocalScaling: boolean;
583
- viewBox: {
584
- width: number;
585
- height: number;
586
- };
587
- scale: {
588
- x: number;
589
- y: number;
590
- };
591
- fitToBounds: boolean;
592
- position: {
593
- x: number;
594
- y: number;
595
- z: number;
596
- };
597
- rotation: {
598
- x: number;
599
- y: number;
600
- z: number;
601
- };
602
- _isAbsolutelyPositioned?: boolean;
603
- };
604
- holes?: unknown[];
605
- textures?: {
606
- image: any;
607
- name: 'front' | 'side';
608
- useFrontFaceImage?: boolean;
609
- }[];
610
- material: {
611
- color: string;
612
- opacity?: number;
613
- };
614
- label?: {
615
- visible: boolean;
616
- text: string;
617
- align: string;
618
- position: {
619
- x: number;
620
- y: number;
621
- z: number;
622
- };
623
- rotation: {
624
- x: number;
625
- y: number;
626
- z: number;
627
- };
628
- fontFamily: string;
629
- fontSize: number;
630
- color: string;
631
- };
632
- /**
633
- * Node ID.
634
- *
635
- * @property id {string}
636
- */
637
- id: string;
638
- layer?: string;
639
- layerId?: string;
640
- name?: string;
641
- externalId?: string;
642
- vertexes?: {
643
- x: number;
644
- y: number;
645
- }[];
646
- canvasBounds?: {
647
- align: string;
648
- maxHeight: number;
649
- maxWidth: number;
650
- rotation: number;
651
- x: number;
652
- y: number;
653
- };
654
- constructor(mappedin: Mappedin, data: any);
655
- /**
656
- * Map Object that this Polygon is located on.
657
- *
658
- * @property map {MappedinMap}
659
- */
660
- get map(): MappedinMap;
661
- /**
662
- * Locations attached to the Polygon.
663
- *
664
- * @property locations {[MappedinLocation]}
665
- */
666
- get locations(): MappedinLocation[];
667
- /**
668
- * Polygon's entrance Nodes.
669
- *
670
- * @property entrances {[MappedinNode]}
671
- */
672
- get entrances(): MappedinNode[];
673
- set entrances(entrances: MappedinNode[]);
674
- /**
675
- * Ranking for this polygon.
676
- */
677
- get rank(): {
678
- score: number;
679
- node: string;
680
- } | null;
681
- static hydrate(polygons: any, mappedin: Mappedin): MappedinPolygon[];
682
- static fetch(mappedin: Mappedin): Promise<MappedinPolygon[]>;
683
- toJSON(): any;
684
- }
685
- }
686
-
687
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode' {
688
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
689
- import type { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
690
- import type { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
691
- import type { TOpeningHours } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
692
- import { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
693
- import { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
694
- /**
695
- * A {@link MappedinNode} represents a position, anchored to a specific {@link MappedinMap}.
696
- *
697
- * A Node can have more properties but usually the default is sufficient. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Nodes. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
698
- *
699
- * @class MappedinNode
700
- */
701
- export class MappedinNode extends MappedinNavigatable {
702
- #private;
703
- /**
704
- * Node ID.
705
- * @property id {string}
706
- */
707
- id: string;
708
- /**
709
- * X coordinate of Node's position.
710
- * @property x {number}
711
- */
712
- x: number;
713
- /**
714
- * Y coordinate of Node's position.
715
- * @property y {number}
716
- */
717
- y: number;
718
- /**
719
- * Operation Hours of this node. A Location may have different operation hours per node, for example 2 washrooms
720
- */
721
- operationHours?: TOpeningHours[];
722
- externalId?: string;
723
- constructor(mappedin: Mappedin, data: any);
724
- /**
725
- * Map Object that this Node is located on.
726
- *
727
- * @property map {MappedinMap}
728
- */
729
- get map(): MappedinMap;
730
- /**
731
- * Latitude of node. This is expensive, especially if doing it for many/all nodes
732
- */
733
- get lat(): number;
734
- /**
735
- * Longitude of node. This is expensive, especially if doing it for many/all nodes
736
- */
737
- get lon(): number;
738
- /**
739
- * Adjacent Nodes.
740
- *
741
- * @property paths
742
- * @type [MappedinNode]
743
- */
744
- get paths(): MappedinNode[];
745
- set paths(paths: MappedinNode[]);
746
- /**
747
- * Locations attached to this Node.
748
- *
749
- * @property locations
750
- * @type [MappedinLocation]
751
- */
752
- get locations(): MappedinLocation[];
753
- /**
754
- * Polygon that this node is part of
755
- */
756
- get polygon(): MappedinPolygon;
757
- static hydrate(nodes: any, mappedin: Mappedin): MappedinNode[];
758
- static fetch(mappedin: Mappedin): Promise<MappedinNode[]>;
759
- toJSON(): any;
760
- }
761
- }
762
-
763
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCategory' {
764
- /**
765
- * Collection of all Categories within the Venue.
766
- *
767
- * @property categories
768
- * @type [MappedinCategory]
769
- */
770
- import type { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
771
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
772
- import type { TPicture } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
773
- /**
774
- * A {@link MappedinCategory} is a collection of similar Locations.
775
- *
776
- * A Category can have more properties such as 'name', or 'parents' (for hierarchical categories) as well.
777
- * For example, you may have a Fashion category, which has a Men's Fashion and Women's Fashion category. A Men's clothing store would belong to the Men’s Fashion category, but not necessarily be present in the Fashion category's list of Locations.
778
- *
779
- * The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Categories. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
780
- *
781
- * See below for an example a 'things' object with available Category properties specified:
782
- *
783
- * things: {
784
- * venue: [],
785
- * locations: [],
786
- * categories: ['venue', 'name', 'language', 'externalId', 'parents'],
787
- * maps: []
788
- * }
789
- *
790
- * @class MappedinCategory
791
- */
792
- export class MappedinCategory {
793
- #private;
794
- name?: string | undefined;
795
- externalId?: string | undefined;
796
- parents?: string[] | undefined;
797
- id?: string | undefined;
798
- icon?: TPicture | undefined;
799
- constructor(mappedin: Mappedin, data: any);
800
- /**
801
- * Locations in this Category.
802
- *
803
- * @property locations
804
- * @type [MappedinLocation]
805
- */
806
- get locations(): MappedinLocation[];
807
- static hydrate(categories: any, mappedin: Mappedin): MappedinCategory[];
808
- static fetch(mappedin: Mappedin): Promise<MappedinCategory[]>;
809
- toJSON(): any;
810
- }
811
- }
812
-
813
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap' {
814
- import type { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
815
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
816
- import type { TGeoReference } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
817
- import type { MappedinMapGroup } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMapGroup';
818
- import { MappedinCoordinate } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate';
819
- import { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue';
820
- /**
821
- * A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link MapView} to display to the user.
822
- *
823
- * A Map can have more properties such as 'elevation', 'name' (e.g. Level 1), and 'shortName' (e.g. L1). The elevation property can be used to determine the order of the floors (first, second, etc). Elevation is 0 based, going up and down in integers representing the number of floors above or below 0, which is ground level.
824
- *
825
- * The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Maps. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
826
- *
827
- * See below for an example a 'things' object with available Map properties specified:
828
- *
829
- * things: {
830
- * venue: [],
831
- * locations: [],
832
- * categories: [],
833
- * maps: ['name', 'elevation', 'shortName']
834
- * }
835
- *
836
- * @class MappedinMap
837
- */
838
- export class MappedinMap {
839
- #private;
840
- id: string;
841
- group: string;
842
- name: string;
843
- shortName: string;
844
- elevation: number;
845
- scale?: number;
846
- layers: {
847
- visible: boolean;
848
- name: string;
849
- id: string;
850
- }[];
851
- x_scale?: number;
852
- perspectiveId?: string;
853
- scene: any;
854
- width: number;
855
- height: number;
856
- georeference: TGeoReference[];
857
- constructor(mappedin: Mappedin, data: any);
858
- _scale: number;
859
- /**
860
- * Polygons on this Map.
861
- *
862
- * @property polygons {[MappedinPolygon]}
863
- */
864
- get polygons(): MappedinPolygon[] | undefined;
865
- /**
866
- * Locations on this map
867
- */
868
- get locations(): MappedinLocation[];
869
- get nodes(): import("./MappedinNode").MappedinNode[];
870
- /**
871
- * Map Group this map belongs to.
872
- *
873
- * @property mapGroup {MappedinMapGroup}
874
- */
875
- get mapGroup(): MappedinMapGroup | null;
876
- /**
877
- * Create coordinate using mappedin units
878
- * @internal
879
- *
880
- * @param x x of coordinate
881
- * @param y y of coordinate
882
- */
883
- createCoordinateByXY(x: number, y: number): MappedinCoordinate;
884
- /**
885
- * Create coordinate using lat/lon
886
- *
887
- * @param lat latitude of coordinate
888
- * @param lon longitude of coordinate
889
- */
890
- createCoordinate(lat: number, lon: number): MappedinCoordinate;
891
- /**
892
- *
893
- * @returns map rotation in radians from north
894
- */
895
- getNorth(): any;
896
- static hydrate(maps: any, mappedin: Mappedin): MappedinMap[];
897
- static fetch(mappedin: Mappedin): Promise<MappedinMap[]>;
898
- toJSON(): any;
899
- }
900
- }
901
-
902
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinEvent' {
903
- import type { TImage } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
904
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
905
- import type { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
906
- /**
907
- * An event such as a promotion attached to a location in a venue for a period of time. Events can be created in the Mappedin CMS.
908
- *
909
- * @class MappedinEvent
910
- */
911
- export class MappedinEvent {
912
- #private;
913
- /**
914
- * Unique id string of the event.
915
- */
916
- id: string;
917
- type: string;
918
- /**
919
- * Event name
920
- */
921
- name: string;
922
- /**
923
- * Optional, longer description of the event.
924
- */
925
- description?: string | undefined;
926
- /**
927
- * Optional image to be used for displaying the event.
928
- */
929
- image?: TImage | undefined;
930
- /**
931
- * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
932
- */
933
- startDate?: number | undefined;
934
- /**
935
- * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
936
- */
937
- endDate?: number | undefined;
938
- /**
939
- * Timestamp when the event should be displayed. Javascript date in milliseconds since 1 January 1970 UTC.
940
- */
941
- showDate?: number | undefined;
942
- /**
943
- * @internal
944
- */
945
- constructor(mappedin: Mappedin, data: any);
946
- /**
947
- * Location this event is occuring at.
948
- */
949
- location(): MappedinLocation | undefined;
950
- /**
951
- * @internal
952
- */
953
- static hydrate(events: any, mappedin: Mappedin): MappedinEvent[];
954
- /**
955
- * @internal
956
- */
957
- static fetch(mappedin: Mappedin): Promise<MappedinEvent[]>;
958
- toJSON(): any;
959
- }
960
- }
961
-
962
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMapGroup' {
963
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
964
- import type { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
965
- /**
966
- * A {@link MappedinMapGroup} is a collection of maps, usually representing the different floors of a single building. All Maps will be in a MapGroup, but if your Venue is only a single building (like a mall) you can likely ignore MapGroups entirely.
967
- *
968
- * @class MappedinMapGroup
969
- */
970
- export class MappedinMapGroup {
971
- #private;
972
- id: string;
973
- name: string;
974
- constructor(mappedin: Mappedin, data: any);
975
- /**
976
- * Maps within this MapGroup.
977
- *
978
- * @property maps {[MappedinMap]}
979
- */
980
- get maps(): MappedinMap[];
981
- static hydrate(mapGroups: any, mappedin: Mappedin): MappedinMapGroup[];
982
- static fetch(mappedin: Mappedin): Promise<MappedinMapGroup[]>;
983
- toJSON(): any;
984
- }
985
- }
986
-
987
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVenue' {
988
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
989
- import type { TLogo, TOpeningHours } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
990
- /**
991
- * A {@link MappedinVenue} is a specific place (like a mall) with one or more Maps (typically representing different floors) and Locations (stores, washrooms, elevators, etc).
992
- *
993
- * A Venue can have more properties such as 'name' and 'slug'. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Venues. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.
994
- *
995
- * See below for an example a 'things' object with available Venue properties specified:
996
- *
997
- * things: {
998
- * venue: ['slug', 'name', 'language', 'address', 'city', 'state', 'postal', 'telephone', 'latitude', 'longitude', 'website', 'operationHours'],
999
- * locations: [],
1000
- * categories: [],
1001
- * maps: []
1002
- * }
1003
- *
1004
- *
1005
- * @class MappedinVenue
1006
- */
1007
- export class MappedinVenue {
1008
- #private;
1009
- defaultMap: string;
1010
- address: string;
1011
- city: string;
1012
- countrycode: string;
1013
- externalId: string;
1014
- id: string;
1015
- latitude?: number;
1016
- logo?: TLogo;
1017
- longitude?: number;
1018
- metadata?: any;
1019
- name: string;
1020
- operationHours?: TOpeningHours[];
1021
- postal: string;
1022
- slug: string;
1023
- state: string;
1024
- telephone: string;
1025
- tzid: string;
1026
- tzidOverride: string;
1027
- utcOffset: string;
1028
- website: string;
1029
- constructor(mappedin: Mappedin, data: any);
1030
- static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
1031
- static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
1032
- get isMultiBuilding(): any;
1033
- toJSON(): any;
1034
- }
1035
- }
1036
-
1037
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVortex' {
1038
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1039
- /**
1040
- * A {@link MappedinVortex} is a special entity that represents a link between two or more {@link MappedinMap}s at a given {@link MappedinVenue}. It is typically something like an elevator or stairs. These are also known as Connections in some parts of the system.
1041
- *
1042
- * They can be marked (wheelchair) Accessible or not for pathfinding purposes. If you ask for Accessible directions, paths that include non-accessible Vortexes like Stairs will not be used.
1043
- *
1044
- * @class MappedinVortex
1045
- */
1046
- export class MappedinVortex {
1047
- #private;
1048
- /**
1049
- * Vortex ID.
1050
- *
1051
- * @property id {string}
1052
- */
1053
- id: string;
1054
- name?: string;
1055
- type?: string;
1056
- weight?: number;
1057
- multiplier?: number;
1058
- constructor(data: any);
1059
- static hydrate(vortexes: any): MappedinVortex[];
1060
- static fetch(mappedin: Mappedin): Promise<MappedinVortex[]>;
1061
- toJSON(): any;
1062
- }
1063
- }
1064
-
1065
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections' {
1066
- import { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator';
1067
- import { ACTION_TYPE, BEARING_TYPE } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive';
1068
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1069
- import type { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
1070
- import type { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
1071
- import type { MappedinVortex } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVortex';
1072
- interface IActionDeparture {
1073
- type: ACTION_TYPE.DEPARTURE;
1074
- }
1075
- interface IActionArrival {
1076
- type: ACTION_TYPE.ARRIVAL;
1077
- }
1078
- interface IActionTakeVortex {
1079
- type: ACTION_TYPE.TAKEVORTEX;
1080
- toMap: MappedinMap;
1081
- fromMap: MappedinMap;
1082
- }
1083
- interface IActionExitVortex {
1084
- type: ACTION_TYPE.EXITVORTEX;
1085
- toMap: MappedinMap;
1086
- fromMap: MappedinMap;
1087
- }
1088
- interface IActionTurn {
1089
- type: ACTION_TYPE.TURN;
1090
- bearing: BEARING_TYPE;
1091
- referencePosition?: string;
1092
- }
1093
- export type IAction = IActionArrival | IActionDeparture | IActionTurn | IActionTakeVortex | IActionExitVortex;
1094
- /** this is the "overloaded" version of the directive, with get-venue classes instead of stubs */
1095
- export type TMappedinDirective = {
1096
- node: MappedinNode;
1097
- /**
1098
- * Distance from the last instruction to the current. Useful for turn by turn navigation
1099
- */
1100
- distance: number;
1101
- instruction: string;
1102
- action?: IAction;
1103
- atLocation?: MappedinVortex;
1104
- type?: BEARING_TYPE;
1105
- };
1106
- /**
1107
- * Directions Object
1108
- */
1109
- export class MappedinDirections {
1110
- #private;
1111
- /**
1112
- * Total Distance
1113
- */
1114
- distance: number;
1115
- path: MappedinNode[];
1116
- instructions: TMappedinDirective[];
1117
- constructor(mappedin: Mappedin, directions: IDirectionsResult);
1118
- toJSON(): IDirectionsResult;
1119
- }
1120
- export {};
1121
- }
1122
-
1123
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate' {
1124
- import { Mappedin, MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue';
1125
- import type { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
1126
- export type TMappedinCoordinateOptions = {
1127
- map: MappedinMap;
1128
- mappedin: Mappedin;
1129
- x: number;
1130
- y: number;
1131
- lat?: undefined;
1132
- lon?: undefined;
1133
- } | {
1134
- map: MappedinMap;
1135
- mappedin: Mappedin;
1136
- x?: undefined;
1137
- y?: undefined;
1138
- lat: number;
1139
- lon: number;
1140
- };
1141
- /**
1142
- * A {@link MappedinCoordinate} represents a coordinate on a map, created using lat/lon.
1143
- *
1144
- * @class MappedinCoordinate
1145
- */
1146
- export class MappedinCoordinate {
1147
- #private;
1148
- /**
1149
- * The Map that the Node is located on.
1150
- *
1151
- * @property map {MappedinMap}
1152
- */
1153
- map: MappedinMap;
1154
- /**
1155
- * X coordinate in Mappedin Units
1156
- * @property x {number}
1157
- */
1158
- get x(): number;
1159
- /**
1160
- * Y coordinate in Mappedin Units
1161
- * @property y {number}
1162
- */
1163
- get y(): number;
1164
- /**
1165
- * Latitude
1166
- */
1167
- get lat(): number;
1168
- /**
1169
- * Longitude
1170
- */
1171
- get lon(): number;
1172
- /**
1173
- * @internal
1174
- */
1175
- constructor(options: TMappedinCoordinateOptions);
1176
- /**
1177
- *
1178
- * Calculate distance between a coordinate and a {@link MappedinNode} or {@link MappedinCoordinate}
1179
- *
1180
- * @param destination Destination to measure real distance to
1181
- * @returns distance in meters
1182
- */
1183
- absoluteDistanceTo(destination: MappedinCoordinate): number;
1184
- /**
1185
- * Get Nearest Node to Coordinate, which can then be used for navigation
1186
- */
1187
- get nearestNode(): MappedinNode;
1188
- toJSON(): {
1189
- x: number;
1190
- y: number;
1191
- map: MappedinMap;
1192
- lat: number;
1193
- lon: number;
1194
- };
1195
- }
1196
- }
1197
-
1198
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinRankings' {
1199
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1200
- import type { TPolygonRanking } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
1201
- /**
1202
- * A {@link MappedinRankings} object is something that contains all the rankings for all the {@link MappedinPolygon}s in the venue. It has a `polygons` array in which each item is linked to zero or more {@link MappedinPolygon}s.
1203
- *
1204
- * Rankings shows what the priority of displaying each polygon is.
1205
- *
1206
- * A specific polygon's ranking can have the properties `polygonId`, `entranceNodeId`, `score`.
1207
- *
1208
- * The {@link Mappedin} `things` object is where you would specify what type of ranking data you want to download for the venue. Only specify what you will actually use, to minimize transfer time.
1209
- *
1210
- * See below for an example a `things` object with the available ranking properties specified:
1211
- *
1212
- * things: {
1213
- * venue: [],
1214
- * locations: [],
1215
- * categories: [],
1216
- * maps: [],
1217
- * rankings: ['polygons'],
1218
- * }
1219
- *
1220
- * @class MappedinRankings
1221
- */
1222
- export class MappedinRankings {
1223
- #private;
1224
- constructor(data: any);
1225
- polygons: TPolygonRanking[];
1226
- static hydrate(rankings: any): MappedinRankings;
1227
- static fetch(mappedin: Mappedin): Promise<MappedinRankings | null>;
1228
- toJSON(): any;
1229
- }
1230
- }
1231
-
1232
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDestinationSet' {
1233
- import type { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
1234
- import type { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
1235
- import type { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
1236
- export class MappedinDestinationSet {
1237
- destinations: (MappedinLocation | MappedinNode | MappedinPolygon)[];
1238
- constructor(destinations: (MappedinLocation | MappedinNode | MappedinPolygon)[]);
1239
- }
1240
- }
1241
-
1242
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable' {
1243
- import type { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
1244
- import type { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
1245
- import type { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
1246
- import { MappedinDestinationSet } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDestinationSet';
1247
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1248
- import { MappedinDirections } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
1249
- export type TDirectionToOptions = {
1250
- accessible?: boolean;
1251
- };
1252
- export abstract class MappedinNavigatable {
1253
- #private;
1254
- constructor(mappedin: Mappedin);
1255
- /**
1256
- *
1257
- * Get Directions to a node, polygon, or location
1258
- */
1259
- directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections;
1260
- directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[];
1261
- /**
1262
- *
1263
- * Calculate distance between 2 nodes, polygons or locations
1264
- */
1265
- distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options: TDirectionToOptions): number;
1266
- }
1267
- }
1268
-
1269
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator' {
1270
- import NavigationGraph from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/NavigationGraph';
1271
- import Navigator from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator';
1272
- export { ACTION_TYPE, BEARING_TYPE } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive';
1273
- export { Navigator, NavigationGraph };
1274
- export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator';
1275
- export { E_MESSAGES } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator';
1276
- }
1277
-
1278
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.OfflineSearch' {
1279
- import { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1280
- import type { SearchOptions } from 'minisearch';
1281
- import { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
1282
- import { MappedinCategory } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCategory';
1283
- export const removeAccents: (it: string) => string;
1284
- export type { SearchOptions };
1285
- /**
1286
- * A {@link Mappedin.OfflineSearch} is an offline search module
1287
- *
1288
- *
1289
- * @class Mappedin.OfflineSearch
1290
- */
1291
- export type TMappedinOfflineSearchAllOptions = {
1292
- /**
1293
- * Array of stopwords to ignore when searching, default: english stopwords
1294
- */
1295
- stopWords?: string[];
1296
- /**
1297
- * Index location tags - typically better to use either tags or descriptions, depending on what's available
1298
- * @default true
1299
- */
1300
- searchTags?: boolean;
1301
- /**
1302
- * Index location descriptions - typically better to use either tags or descriptions, depending on what's available
1303
- * @default true
1304
- */
1305
- searchDescriptions?: boolean;
1306
- /**
1307
- * Also index all tags for every location in every category (caution: this may slow down indexing and search)
1308
- * @default false
1309
- */
1310
- searchTagsInCategories?: boolean;
1311
- /**
1312
- * Also index all tags for every location in every category (caution: this may slow down indexing and search)
1313
- * @default false
1314
- */
1315
- searchDescriptionsInCategories?: boolean;
1316
- /**
1317
- * Initialize Search with a previously indexed JSON string (outputted by OfflineSearch.toJSON())
1318
- */
1319
- jsonIndex?: string;
1320
- /**
1321
- * Use the location polygons' rank in weighing results
1322
- */
1323
- useLocationRank?: boolean;
1324
- /**
1325
- * Emit Analytics events when doing search
1326
- * @default true when running in production
1327
- */
1328
- emitAnalyticsEvents?: boolean;
1329
- /**
1330
- * Fine tune search constants
1331
- */
1332
- constants: {
1333
- /**
1334
- * Fuzziness index for location names and tags
1335
- * @default 0.09
1336
- */
1337
- PRIMARY_INDEX_FUZZYNESS: number;
1338
- /**
1339
- * Multiplier for location names (1 by default)
1340
- * @default 1
1341
- */
1342
- PRIMARY_INDEX_WEIGHT: number;
1343
- /**
1344
- * Multiplier for descriptions
1345
- * @default 0.025
1346
- */
1347
- SECONDARY_INDEX_WEIGHT: number;
1348
- /**
1349
- * Multiplier for location names
1350
- * @default 1
1351
- */
1352
- LOCATION_NAME_WEIGHT: number;
1353
- /**
1354
- * Multiplier for category names
1355
- * @default 0.5
1356
- */
1357
- CATEGORY_NAME_WEIGHT: number;
1358
- /**
1359
- * Multiplier for category locations' descriptions
1360
- * @default 0.0005
1361
- */
1362
- CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
1363
- /**
1364
- * Multiplier for category locations' tags
1365
- * @default 0.0005
1366
- */
1367
- CATEGORY_LOCATION_TAGS_WEIGHT: number;
1368
- /**
1369
- * Multiplier for category locations' names
1370
- * @default 0.01
1371
- */
1372
- CATEGORY_LOCATION_NAME_WEIGHT: number;
1373
- /**
1374
- * Multiplier for location tags
1375
- * @default 0.05
1376
- */
1377
- PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
1378
- /**
1379
- * Default rank when one isn't available in the data, default = 1
1380
- * @default 1
1381
- */
1382
- LOCATION_DEFAULT_RANK: number;
1383
- /**
1384
- * Ratio of Fuzzy Searches of Location names and tags relative to exact
1385
- * @default 0.01
1386
- */
1387
- RATIO_OF_FUZZY_TO_EXACT: number;
1388
- /**
1389
- * Ratio of Prefix Searches of Location names and tags relative to exact
1390
- * @default 0.2
1391
- */
1392
- RATIO_OF_PREFIX_TO_EXACT: number;
1393
- };
1394
- };
1395
- export type TMappedinOfflineAllSearchMatch = {
1396
- /**
1397
- * The term that was found
1398
- */
1399
- term: string;
1400
- /**
1401
- * Term's weight
1402
- */
1403
- weight: number;
1404
- /**
1405
- * What field the search matched on
1406
- */
1407
- matchesOn: string;
1408
- /**
1409
- * The value of that field
1410
- */
1411
- value?: string;
1412
- };
1413
- export type TMappedinOfflineSearchOptions = Partial<TMappedinOfflineSearchAllOptions>;
1414
- export type TMappedinOfflineSearchResult = {
1415
- /**
1416
- * Type describing the object
1417
- */
1418
- type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
1419
- /**
1420
- * Details on why the result was returned
1421
- */
1422
- matches: TMappedinOfflineAllSearchMatch[];
1423
- /**
1424
- * Found object
1425
- */
1426
- object: MappedinLocation | MappedinCategory | Record<string, unknown>;
1427
- /**
1428
- * Total score of the result
1429
- */
1430
- score: number;
1431
- };
1432
- export type TMappedinOfflineSearchSuggestions = {
1433
- /**
1434
- * Total number of suggestions generated
1435
- */
1436
- total: number;
1437
- /**
1438
- * List of suggestions
1439
- */
1440
- hits: {
1441
- /**
1442
- * Suggestion text
1443
- */
1444
- text: string;
1445
- }[];
1446
- };
1447
- /**
1448
- * A {@link OfflineSearch} is an offline search module. It can be initialized at any time by passing the {@link Mappedin} object and a set of {@link TMappedinOfflineSearchOptions} options.
1449
- *
1450
- *
1451
- * @class Mappedin.OfflineSearch
1452
- */
1453
- export class OfflineSearch {
1454
- #private;
1455
- constructor(
1456
- /**
1457
- * Mappedin Venue Object, typically returned by `getVenue`/`showVenue`
1458
- */
1459
- mappedin: Mappedin, options?: TMappedinOfflineSearchOptions);
1460
- /**
1461
- * Get Suggestions for term
1462
- */
1463
- suggest(
1464
- /**
1465
- * Search term
1466
- */
1467
- term: string): Promise<TMappedinOfflineSearchSuggestions>;
1468
- /**
1469
- * Search for a term
1470
- */
1471
- search(
1472
- /**
1473
- * Search term
1474
- */
1475
- term: string): Promise<TMappedinOfflineSearchResult[]>;
1476
- /**
1477
- * Export search index to JSON for storage/caching - this would avoid having to re-index
1478
- * on page reload
1479
- */
1480
- toJSON(): Promise<string>;
1481
- /**
1482
- * Add a custom query to the search index
1483
- */
1484
- addQuery(params: {
1485
- /**
1486
- * Query string to match for this object
1487
- */
1488
- query: string;
1489
- /**
1490
- * Object that is returned when query matches
1491
- */
1492
- object: MappedinLocation | MappedinCategory | Record<string, unknown>;
1493
- /**
1494
- * Optional weight to multiply by the score
1495
- */
1496
- weight?: number;
1497
- }): Promise<void>;
1498
- }
1499
- }
1500
-
1501
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types' {
1502
- /**
1503
- * This file contains the API types for MappedinSDK - before they get turned into Classes
1504
- */
1505
- export type TLocationType = 'amenities' | 'tenant';
1506
- export type TNode = {
1507
- id: string;
1508
- x: number;
1509
- y: number;
1510
- map: string;
1511
- externalId?: string;
1512
- paths: {
1513
- node: string;
1514
- map: string;
1515
- }[];
1516
- [propName: string]: any;
1517
- };
1518
- export type TImage = {
1519
- original?: string;
1520
- large?: string;
1521
- '140x140'?: string;
1522
- xxlarge?: string;
1523
- xsmall?: string;
1524
- '66x66'?: string;
1525
- xlarge?: string;
1526
- medium?: string;
1527
- xxsmall?: string;
1528
- small?: string;
1529
- };
1530
- export type TLogo = TImage;
1531
- export type TGalleryImage = {
1532
- image: TImage;
1533
- caption?: string;
1534
- };
1535
- export type TPhone = {
1536
- number?: string;
1537
- };
1538
- export type TSocial = {
1539
- website?: string;
1540
- twitter?: string;
1541
- facebook?: string;
1542
- instagram?: string;
1543
- };
1544
- export type TColor = {
1545
- hex: string;
1546
- opacity: number;
1547
- rgba: string;
1548
- };
1549
- export type TVortex = {
1550
- id: string;
1551
- name: string;
1552
- type: string;
1553
- weight: number;
1554
- multiplier: number;
1555
- [propName: string]: any;
1556
- };
1557
- export type TPicture = {
1558
- original?: string;
1559
- };
1560
- export type TOpeningHours = {
1561
- '@type': string;
1562
- opens: string;
1563
- closes: string;
1564
- dayOfWeek: string[];
1565
- };
1566
- export type TSiblingGroup = {
1567
- label: string;
1568
- siblings: string[];
1569
- };
1570
- export type TState = {
1571
- type: string;
1572
- start?: string;
1573
- end?: string;
1574
- };
1575
- export type TCategory = {
1576
- name?: string;
1577
- externalId?: string;
1578
- parents?: string[];
1579
- id?: string;
1580
- icon?: TPicture;
1581
- };
1582
- export type TEvent = {
1583
- id: string;
1584
- type: string;
1585
- name: string;
1586
- location?: string;
1587
- description?: string;
1588
- image?: TImage;
1589
- startDate?: number;
1590
- endDate?: number;
1591
- showDate?: number;
1592
- };
1593
- export interface TGeoReference {
1594
- target: {
1595
- x: number;
1596
- y: number;
1597
- };
1598
- control: {
1599
- x: number;
1600
- y: number;
1601
- };
1602
- }
1603
- export interface TMap {
1604
- id: string;
1605
- name: string;
1606
- shortName: string;
1607
- elevation?: number;
1608
- scale?: number;
1609
- x_scale?: number;
1610
- georeference?: TGeoReference[];
1611
- [propName: string]: any;
1612
- }
1613
- export type TMapGroup = {
1614
- name: string;
1615
- id: string;
1616
- };
1617
- export type TBuilding = TLocation & {
1618
- groupId: string;
1619
- };
1620
- export type TLocation = {
1621
- id: string;
1622
- name: string;
1623
- type: string;
1624
- nodes: {
1625
- map: TMap['id'];
1626
- node: TNode['id'];
1627
- }[];
1628
- polygons: {
1629
- map: TMap['id'];
1630
- id: TPolygon['id'];
1631
- }[];
1632
- categories: string[];
1633
- description?: string;
1634
- sortOrder?: number;
1635
- logo?: TLogo;
1636
- phone?: TPhone;
1637
- social?: TSocial;
1638
- color?: TColor;
1639
- shortName?: string;
1640
- detailsUrl?: string;
1641
- parent?: string | null;
1642
- tags?: string[];
1643
- externalId?: string;
1644
- picture?: TPicture;
1645
- states?: TState[];
1646
- operationHours?: TOpeningHours[] | undefined;
1647
- siblingGroups?: TSiblingGroup[] | undefined;
1648
- gallery?: TGalleryImage[] | undefined;
1649
- [propName: string]: any;
1650
- };
1651
- export type TPolygon = {
1652
- id: string;
1653
- map: string;
1654
- layer?: string;
1655
- layerId?: string;
1656
- externalId?: string;
1657
- name?: string;
1658
- entrances: {
1659
- map: TMap['id'];
1660
- node: TNode['id'];
1661
- }[];
1662
- };
1663
- export type TPolygonRanking = {
1664
- polygonId: string;
1665
- entranceNodeId: string;
1666
- score: number;
1667
- };
1668
- export type TLocationState = {
1669
- id: string;
1670
- name: string;
1671
- value: string;
1672
- };
1673
- export type TVenue = {
1674
- address?: string;
1675
- city?: string;
1676
- countrycode?: string;
1677
- defaultMap?: string;
1678
- externalId?: string;
1679
- id?: string;
1680
- latitude?: number;
1681
- logo?: TLogo;
1682
- longitude?: number;
1683
- metadata?: any;
1684
- name?: string;
1685
- operationHours?: TOpeningHours[];
1686
- postal?: string;
1687
- slug?: string;
1688
- state?: string;
1689
- telephone?: string;
1690
- tzid?: string;
1691
- tzidOverride?: string;
1692
- utcOffset?: string;
1693
- website?: string;
1694
- };
1695
- export type TMappedinAPI = {
1696
- nodes: TNode[];
1697
- locations: TLocation[];
1698
- categories: TCategory[];
1699
- mapGroups: TMapGroup[];
1700
- polygons: TPolygon[];
1701
- maps: TMap[];
1702
- themes: any;
1703
- venue: TVenue;
1704
- vortexes: TVortex[];
1705
- locationStates?: TLocationState[];
1706
- imageBinaries?: Map<string, Uint8Array>;
1707
- };
1708
- }
1709
-
1710
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.MVF.types' {
1711
- import { FeatureCollection, Polygon, Point, MultiPolygon, Position } from 'geojson';
1712
- type ManifestFile = {
1713
- type: 'file';
1714
- name: string;
1715
- };
1716
- type ManifestFolder = {
1717
- type: 'folder';
1718
- name: string;
1719
- children: ManifestFile[];
1720
- };
1721
- type OpeningHours = {
1722
- opens: string;
1723
- closes: string;
1724
- dayOfWeek: string;
1725
- validFrom?: string;
1726
- validThrough?: string;
1727
- };
1728
- type Image = {
1729
- original?: string;
1730
- xlarge?: string;
1731
- xxlarge?: string;
1732
- medium?: string;
1733
- '140x140'?: string;
1734
- xsmall?: string;
1735
- xxsmall?: string;
1736
- '66x66'?: string;
1737
- small?: string;
1738
- large?: string;
1739
- };
1740
- type PolygonImage = string;
1741
- type Phone = {
1742
- number: string;
1743
- extension?: string;
1744
- };
1745
- type Link = {
1746
- label: string;
1747
- url: string;
1748
- };
1749
- type Social = {
1750
- facebook?: string;
1751
- twitter?: string;
1752
- instagram?: string;
1753
- website?: string;
1754
- };
1755
- type LocationState = {
1756
- type: string;
1757
- start?: string;
1758
- end?: string;
1759
- };
1760
- type SiblingGroup = {
1761
- label: string;
1762
- siblings: string[];
1763
- };
1764
- export type MILocationProperties = {
1765
- id: string;
1766
- address?: string | null;
1767
- categories: string[];
1768
- description?: string | null;
1769
- email?: string | null;
1770
- externalId?: string | null;
1771
- hours?: OpeningHours[] | null;
1772
- links?: Link[] | null;
1773
- logo?: Image | null;
1774
- name: string;
1775
- phone?: Phone | null;
1776
- picture?: Image | null;
1777
- services?: string | null;
1778
- siblingGroups?: SiblingGroup[] | null;
1779
- social?: Social | null;
1780
- spaces?: TLocationSpaceReference[] | null;
1781
- states?: LocationState[] | null;
1782
- type: string;
1783
- };
1784
- export type MICategoryProperties = {
1785
- id: string;
1786
- name: string;
1787
- picture?: Image;
1788
- };
1789
- export type MIBuildingProperties = {
1790
- id: string;
1791
- name: string;
1792
- venue: string;
1793
- };
1794
- export type MILevelProperties = {
1795
- id: string;
1796
- abbreviation?: string;
1797
- building?: string;
1798
- elevation?: number;
1799
- name: string;
1800
- };
1801
- export type MIPolygonlikeProperties = {
1802
- id: string;
1803
- altitude?: string;
1804
- color?: string;
1805
- externalId?: string | null;
1806
- height?: string;
1807
- layer?: string;
1808
- level: string;
1809
- parent?: string | null;
1810
- };
1811
- type TPseudoNodeSpaceReference = {
1812
- node: string;
1813
- map: string;
1814
- };
1815
- export type TRealSpaceReference = {
1816
- id: string;
1817
- map: string;
1818
- };
1819
- type TLocationSpaceReference = TPseudoNodeSpaceReference | TRealSpaceReference;
1820
- export type TEntrances = {
1821
- id: string;
1822
- level: string;
1823
- };
1824
- export type MISpaceProperties = MIPolygonlikeProperties & {
1825
- entrances: TEntrances[];
1826
- };
1827
- export type MIObstructionProperties = MIPolygonlikeProperties;
1828
- export type MIConnectionProperties = {
1829
- id: string;
1830
- accessible: boolean;
1831
- destinations: string[];
1832
- level: string;
1833
- multiplier: number;
1834
- name: string;
1835
- type: string;
1836
- weight: number;
1837
- };
1838
- export type MINodeProperties = {
1839
- id: string;
1840
- accessible: boolean;
1841
- externalId: string | null;
1842
- level: string;
1843
- multiplier: number;
1844
- neighbors: string[];
1845
- weight: number;
1846
- };
1847
- export type MIManifestProperties = {
1848
- name: string;
1849
- folder_struct: (ManifestFolder | ManifestFile)[];
1850
- version: string;
1851
- time: string;
1852
- };
1853
- export type MIStyle = {
1854
- id: string;
1855
- /** The altitude of the bottom of the geometry, in metres. */
1856
- altitude: number;
1857
- color: string;
1858
- height: number;
1859
- image?: PolygonImage;
1860
- opacity: number;
1861
- };
1862
- export type MIImageInstance = {
1863
- /** The local path or URL of the image. */
1864
- path: string;
1865
- /** The position of the centre of the image, in [long, lat] form. */
1866
- position: Position;
1867
- /** The altitude of the image, in metres. */
1868
- altitude: number;
1869
- /** Euler angles representing the rotation of the image, in degrees. Angles are in XYZ order. */
1870
- rotation: {
1871
- x: number;
1872
- y: number;
1873
- z: number;
1874
- };
1875
- /** The size of the image, in metres. */
1876
- size: {
1877
- x: number;
1878
- y: number;
1879
- };
1880
- /** The portion of the image to display. */
1881
- viewBox: {
1882
- top: number;
1883
- left: number;
1884
- width: number;
1885
- height: number;
1886
- };
1887
- /**
1888
- * A space or obstruction to associate this image with. If provided,
1889
- * changes to the polygon's visibility will affect this image.
1890
- * */
1891
- polygonId?: string;
1892
- };
1893
- export type MIGeoJSONManifestCollection = FeatureCollection<Point, MIManifestProperties>;
1894
- export type MIGeoJSONBuildingCollection = FeatureCollection<Polygon, MIBuildingProperties>;
1895
- export type MIGeoJSONConnectionCollection = FeatureCollection<Point, MIConnectionProperties>;
1896
- export type MIGeoJSONLevelCollection = FeatureCollection<Polygon | MultiPolygon, MILevelProperties>;
1897
- export type MIGeoJSONSpaceCollection = FeatureCollection<Polygon, MISpaceProperties>;
1898
- export type MIGeoJSONObstructionCollection = FeatureCollection<Polygon, MIObstructionProperties>;
1899
- export type MIGeoJSONNodeCollection = FeatureCollection<Point, MINodeProperties>;
1900
- export type MIGeoJSONLocationCollection = FeatureCollection<null, MILocationProperties>;
1901
- export type MIGeoJSONCategoryCollection = FeatureCollection<null, MICategoryProperties>;
1902
- export type WithIDs<T> = Map<string, T>;
1903
- export type MIStyleCollection = MIStyle[];
1904
- /**
1905
- * A mapping of polygon IDs to style IDs;
1906
- */
1907
- export type MIPolygonStyle = {
1908
- [key in string]: string;
1909
- };
1910
- export type MIImageInstanceCollection = MIImageInstance[];
1911
- /**
1912
- * The entire data collection for an MVF, in a single JSON collection.
1913
- *
1914
- */
1915
- export type MVFDataJSON = {
1916
- connection: WithIDs<MIGeoJSONConnectionCollection>;
1917
- level: WithIDs<MIGeoJSONLevelCollection>;
1918
- node: WithIDs<MIGeoJSONNodeCollection>;
1919
- obstruction: WithIDs<MIGeoJSONObstructionCollection>;
1920
- space: WithIDs<MIGeoJSONSpaceCollection>;
1921
- building: MIGeoJSONBuildingCollection;
1922
- category: MIGeoJSONCategoryCollection;
1923
- style: MIStyleCollection;
1924
- polygonStyle: WithIDs<MIPolygonStyle>;
1925
- imageInstance: WithIDs<MIImageInstanceCollection>;
1926
- location: MIGeoJSONLocationCollection;
1927
- manifest: MIGeoJSONManifestCollection;
1928
- };
1929
- export type MVFData = MVFDataJSON & {
1930
- imageBinaries: WithIDs<Uint8Array>;
1931
- };
1932
- export {};
1933
- }
1934
-
1935
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocationRankings' {
1936
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1937
- import type { TLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
1938
- /** One of these contains all the venue's rankings. * */
1939
- export class MappedinLocationRankings {
1940
- #private;
1941
- constructor(data: any);
1942
- locations: TLocation[];
1943
- static hydrate(locationRankings: any): MappedinLocationRankings;
1944
- static fetch(mappedin: Mappedin): Promise<MappedinLocationRankings>;
1945
- toJSON(): any;
1946
- }
1947
- }
1948
-
1949
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocationState' {
1950
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1951
- /**
1952
- * A location state, that can belong to any number of {@link MappedinLocation}s.
1953
- * @class MappedinLocationState
1954
- */
1955
- export class MappedinLocationState {
1956
- #private;
1957
- constructor(data: any);
1958
- static hydrate(locationStates: any): MappedinLocationState[];
1959
- id: string;
1960
- name: string;
1961
- value: string;
1962
- static fetch(mappedin: Mappedin): Promise<MappedinLocationState[]>;
1963
- toJSON(): any;
1964
- }
1965
- }
1966
-
1967
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinTheme' {
1968
- import type { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
1969
- export class MappedinTheme {
1970
- #private;
1971
- /**
1972
- * Theme ID.
1973
- *
1974
- * @property id {string}
1975
- */
1976
- id: string;
1977
- constructor(data: any);
1978
- static hydrate(themes: any): MappedinTheme[];
1979
- static fetch(mappedin: Mappedin): Promise<MappedinTheme[]>;
1980
- toJSON(): any;
1981
- }
1982
- }
1983
-
1984
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.Analytics' {
1985
- import { MappedinCategory, MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue';
1986
- type AnalyticsOptions = {
1987
- clientId?: string;
1988
- clientSecret?: string;
1989
- accessToken?: string;
1990
- noAuth?: boolean;
1991
- venue: string;
1992
- testMode?: boolean | string;
1993
- context?: string;
1994
- platformString?: string;
1995
- };
1996
- interface IAnalytics {
1997
- locationSelected(location: MappedinLocation): void;
1998
- categorySelected(category: MappedinCategory): void;
1999
- getDirections(start: MappedinLocation, end: MappedinLocation): void;
2000
- }
2001
- interface IInternalAnalytics extends IAnalytics {
2002
- track(target: string, query: any): void;
2003
- mapViewLoaded(type: '2d' | '3d', forced: boolean, benchmark: number, reason: string): void;
2004
- getSessionID(): string;
2005
- getDeviceID(): string;
2006
- setGeolocationMode(mode: boolean): void;
2007
- trackBlueDotEvent(blueDotEvent: Record<string, unknown>): void;
2008
- trackSearch(searchAnalyticsObject: Record<string, unknown>): void;
2009
- trackSearchSuggest(searchAnalyticsObject: Record<string, unknown>): void;
2010
- }
2011
- /**
2012
- * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
2013
- * This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`.
2014
- *
2015
- * @type {any}
2016
- *
2017
- * @class Analytics
2018
- * @param options {Object} A list of configuration options for the Analytics API.
2019
- * @param [options.clientId] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
2020
- * @param [options.clientSecret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
2021
- * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
2022
- * @param [options.context] {String} The context to pass with the analytics request. Defaults to "websdk".
2023
- * @param [options.noAuth] {Boolean} Whether authentication should not be sent with analytics requests.
2024
- * @param [options.testMode] {Boolean} Whether analytics events should be dropped because this is running in a test environment.
2025
- */
2026
- class Analytics implements IInternalAnalytics {
2027
- #private;
2028
- constructor(options: AnalyticsOptions);
2029
- track(target: any, query: any): void;
2030
- /**
2031
- * Whenever a location is selected, you should fire this event. What "selected" means can vary by venue,
2032
- * but a good rule of thumb is that you fire the event whenever you would show the location's details.
2033
- * Typically this is when the user taps it's polygon on the map, picks it from search results or a category list.
2034
- * or deep links directly into the map.
2035
- * @method locationSelected
2036
- * @param location {MappedinLocation} The location the user selected.
2037
- */
2038
- locationSelected(location: any): void;
2039
- /**
2040
- * Whenever a category is selected, you should fire this event.
2041
- * @method categorySelected
2042
- * @param category {MappedinCategory} The category the user selected.
2043
- */
2044
- categorySelected(category: any): void;
2045
- mapViewLoaded(type: any, forced: any, benchmark: any, reason: any): void;
2046
- /**
2047
- * Whenever a user requests directions, you should fire this event.
2048
- * @method getDirections
2049
- * @param start {MappedinLocation} The start location for wayfinding.
2050
- * @param end {MappedinLocation} The end location for wayfinding.
2051
- */
2052
- getDirections(start: any, end: any): void;
2053
- getSessionID(): string;
2054
- getDeviceID(): string;
2055
- /**
2056
- * @param mode {Boolean} Indicates whether the user's geolocation is enabled.
2057
- */
2058
- setGeolocationMode(mode: any): void;
2059
- /**
2060
- * Track an event.
2061
- * @method trackBlueDotEvent
2062
- * @param event {String}
2063
- * event param should be a property of the {{#crossLink "Analytics/BLUEDOT_EVENT:property"}}{{/crossLink}} property.
2064
- */
2065
- trackBlueDotEvent(blueDotEvent: any): void;
2066
- trackSearch(searchAnalyticsObject: any): void;
2067
- trackSearchSuggest(searchAnalyticsObject: any): void;
2068
- /**
2069
- * Sets the current global context of the Analytics class.
2070
- * @method setContext
2071
- * @param context {String} The Analytics context to be set.
2072
- * @hidden
2073
- */
2074
- static setContext(context: any): void;
2075
- /**
2076
- * Sets the current global context of the Analytics class to undefined.
2077
- * @method clearContext
2078
- * @hidden
2079
- */
2080
- static clearContext(): void;
2081
- /**
2082
- * Enum of valid bluedot events.
2083
- * Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method.
2084
- * Valid properties are: ATTEMPT_BLUEDOT, FOUND_POSITION, FOUND_FLOOR.
2085
- * @property BLUEDOT_EVENT {Object}
2086
- * @example
2087
- * Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT)
2088
- */
2089
- static BLUEDOT_EVENT: {
2090
- ATTEMPT_BLUEDOT: string;
2091
- FOUND_POSITION: string;
2092
- FOUND_FLOOR: string;
2093
- };
2094
- }
2095
- export type { IAnalytics };
2096
- export default Analytics;
2097
- }
2098
-
2099
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue' {
2100
- import type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
2101
- import { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
2102
- /**
2103
- * This is how we can avoid bundling in node-fetch (via isomorphic fetch),
2104
- * which keeps popping up in security advisories
2105
- * This is a pattern that most isomorphic libraries appear to use,
2106
- * where when running in node, you can pass your own fetch function
2107
- * as one is not provided by Node.js.
2108
- *
2109
- */
2110
- export function isomorphicFetch(): Window['fetch'];
2111
- /**
2112
- * Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest
2113
- */
2114
- export function setFetchFn(fetchFn: any): void;
2115
- /** Classes */
2116
- export { Mappedin, MappedinCollectionType } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
2117
- export { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
2118
- export { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
2119
- export { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
2120
- export { MappedinCategory } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCategory';
2121
- export { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
2122
- export { MappedinEvent } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinEvent';
2123
- export { MappedinMapGroup } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMapGroup';
2124
- export { MappedinVenue } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVenue';
2125
- export { MappedinVortex } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVortex';
2126
- export { MappedinDirections } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
2127
- export { MappedinCoordinate } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate';
2128
- export { MappedinRankings } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinRankings';
2129
- export { MappedinDestinationSet } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDestinationSet';
2130
- export { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
2131
- export type { TTHINGS } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
2132
- export type { TMappedinDirective } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
2133
- export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator';
2134
- export type { TOperationHoursMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
2135
- export type { TMappedinCoordinateOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate';
2136
- export type { TDirectionToOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
2137
- export { OfflineSearch } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.OfflineSearch';
2138
- export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.OfflineSearch';
2139
- /** API data types */
2140
- export type { TLocationType, TNode, TImage, TLogo, TGalleryImage, TPhone, TSocial, TColor, TVortex, TPicture, TOpeningHours, TSiblingGroup, TState, TCategory, TEvent, TGeoReference, TMap, TMapGroup, TBuilding, TLocation, TPolygon, TPolygonRanking, TVenue, TMappedinAPI } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
2141
- export type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
2142
- import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
2143
- export type TShowVenueOptions = {
2144
- /**
2145
- * Sets the initial background color of the map, including while loading.
2146
- *
2147
- */
2148
- backgroundColor?: string;
2149
- /**
2150
- * The opacity of the initial background color.
2151
- */
2152
- backgroundAlpha?: number;
2153
- /**
2154
- * Whether or not to display default styled Floating Labels initially
2155
- */
2156
- labelAllLocationsOnInit?: boolean;
2157
- /**
2158
- * The id of the first map to show on map load
2159
- */
2160
- firstMapId?: string;
2161
- loadOptions?: {
2162
- /**
2163
- * Set the map render strategy in order to optimize FPS
2164
- *
2165
- * @beta
2166
- */
2167
- mapRenderStrategy?: MAP_RENDER_MODE;
2168
- };
2169
- };
2170
- export { MAP_RENDER_MODE };
2171
- /**
2172
- * @internal
2173
- */
2174
- export function getVenueMVF(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
2175
- /**
2176
- * Get Venue Data for a Mappedin Venue
2177
- */
2178
- export function getVenue(userOptions: TGetVenueOptions): Promise<Mappedin>;
2179
- /**
2180
- * @internal
2181
- */
2182
- export function __setGetVenueMock(fn: any): void;
2183
- export type TGetVenueBundleOptions = TGetVenueOptions & {
2184
- bundleBaseUri?: string;
2185
- version?: string;
2186
- /**
2187
- * Parse bundle and convert images to blobs. Disabled in React Native
2188
- * @private
2189
- */
2190
- shouldPopulateBundledImagesAsBlobs?: boolean;
2191
- };
2192
- /**
2193
- * @deprecated
2194
- * Fetching an offline Venue bundle
2195
- * It is possible to download the venue bundle with all assets built in, which allows for caching/offline solutions.
2196
- * Note 1: This requires enabling from Mappedin's Customer Solutions team.
2197
- * Note 2: This may behave a lot slower for large venues, especially those with many images. We are actively working on improving load times.
2198
- */
2199
- export function getVenueBundle(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
2200
- /**
2201
- * Get the bundle URL and updated_at time.
2202
- * @internal
2203
- */
2204
- export function getVenueBundleURL(userOptions: TGetVenueBundleOptions): Promise<{
2205
- url: string;
2206
- updated_at: string;
2207
- }>;
2208
- /**
2209
- * Download a bundle and return a Mappedin instance
2210
- * @internal
2211
- */
2212
- export function downloadBundle(userOptions: any, { url, updated_at }: {
2213
- url: any;
2214
- updated_at: any;
2215
- }): Promise<Mappedin>;
2216
- /**
2217
- * Get the bundle URL and updated_at time.
2218
- * @internal
2219
- */
2220
- export function getVenueMVFURL(userOptions: TGetVenueBundleOptions): Promise<{
2221
- url: string;
2222
- updated_at: string;
2223
- }>;
2224
- /**
2225
- * @internal
2226
- */
2227
- export function downloadVenueBundleMVF(options: TGetVenueBundleOptions,
2228
- /**
2229
- * use Web Workers to speed up MVF parsing. This is likely only benefitial for larger venues,
2230
- * and may be determental to smaller ones, hence it is off by default
2231
- */
2232
- useWorker?: boolean): Promise<unknown>;
2233
- }
2234
-
2235
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive' {
2236
- import ILocation from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/ILocation';
2237
- import IMap from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IMap';
2238
- import INode from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/INode';
2239
- export enum ACTION_TYPE {
2240
- DEPARTURE = "Departure",
2241
- TAKEVORTEX = "TakeVortex",
2242
- EXITVORTEX = "ExitVortex",
2243
- TURN = "Turn",
2244
- ARRIVAL = "Arrival"
2245
- }
2246
- export enum BEARING_TYPE {
2247
- STRAIGHT = "Straight",
2248
- RIGHT = "Right",
2249
- SLIGHTRIGHT = "SlightRight",
2250
- LEFT = "Left",
2251
- SLIGHTLEFT = "SlightLeft"
2252
- }
2253
- export enum VORTEX_DIRECTION_TYPE {
2254
- UP = "up",
2255
- DOWN = "down",
2256
- NONE = "none"
2257
- }
2258
- interface IActionDeparture {
2259
- type: ACTION_TYPE.DEPARTURE;
2260
- }
2261
- interface IActionArrival {
2262
- type: ACTION_TYPE.ARRIVAL;
2263
- }
2264
- interface IActionTakeVortex {
2265
- type: ACTION_TYPE.TAKEVORTEX;
2266
- toMap: IMap;
2267
- fromMap: IMap;
2268
- direction: VORTEX_DIRECTION_TYPE;
2269
- }
2270
- interface IActionExitVortex {
2271
- type: ACTION_TYPE.EXITVORTEX;
2272
- toMap: IMap;
2273
- fromMap: IMap;
2274
- }
2275
- interface IActionTurn {
2276
- type: ACTION_TYPE.TURN;
2277
- bearing: BEARING_TYPE;
2278
- referencePosition?: string;
2279
- }
2280
- export type IAction = IActionArrival | IActionDeparture | IActionTurn | IActionTakeVortex | IActionExitVortex;
2281
- class Directive {
2282
- node?: INode;
2283
- instruction: string;
2284
- action?: IAction;
2285
- atLocation?: ILocation;
2286
- type?: BEARING_TYPE;
2287
- distance: number;
2288
- constructor({ origin, action, distance, atLocation, instruction }: {
2289
- origin?: INode;
2290
- action?: IAction;
2291
- distance?: number;
2292
- atLocation?: ILocation;
2293
- instruction?: string;
2294
- });
2295
- }
2296
- export default Directive;
2297
- }
2298
-
2299
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/NavigationGraph' {
2300
- import Edge from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Edge';
2301
- import IMap from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IMap';
2302
- import INode from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/INode';
2303
- import IVortex from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IVortex';
2304
- export function getMapScale(map: IMap): number;
2305
- export function getAngle(origin: INode, destination: INode): number;
2306
- class NavigationGraph {
2307
- edges: {
2308
- [propName: string]: Edge[];
2309
- };
2310
- nodesById: {
2311
- [propName: string]: INode;
2312
- };
2313
- mapsById: {
2314
- [propName: string]: IMap;
2315
- };
2316
- constructor({ nodes, vortexes, maps, showVortexNames }: {
2317
- nodes: INode[];
2318
- vortexes: IVortex[];
2319
- maps: IMap[];
2320
- showVortexNames?: boolean;
2321
- });
2322
- /**
2323
- * aStar takes one or more origin node ids, one or more destination node ids
2324
- * and returns an array of nodes that define the shortest path from an origin
2325
- * a destination.
2326
- *
2327
- * @param originIds array - of one or more node ids
2328
- * @param destinationNodeIds array - of onr or more node ids
2329
- * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
2330
- */
2331
- aStar(originIds: string[], destinationNodeIds: string[], accessible: boolean): Edge[];
2332
- getDistance(origin: INode, destination: INode): number;
2333
- getShortestEuclideanDistance(origin: INode, destinations: INode[]): number;
2334
- }
2335
- export default NavigationGraph;
2336
- }
2337
-
2338
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator' {
2339
- import Directive from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive';
2340
- import Edge from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Edge';
2341
- import ILocation from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/ILocation';
2342
- import IMap from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IMap';
2343
- import INode from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/INode';
2344
- import IVortex from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IVortex';
2345
- export enum E_MESSAGES {
2346
- NO_VALID_PATH = "No Valid Path Available"
2347
- }
2348
- export function differenceBetweenAngles(a: any, b: any): number;
2349
- export interface IDirectionsResult {
2350
- distance: number;
2351
- path: INode[];
2352
- instructions: Directive[];
2353
- }
2354
- class Navigator {
2355
- constructor({ locations, nodes, vortexes, maps, showVortexNames }: {
2356
- locations: ILocation[];
2357
- nodes: INode[];
2358
- vortexes: IVortex[];
2359
- maps: IMap[];
2360
- showVortexNames?: boolean;
2361
- });
2362
- getClosestLocationInRay(startingEdge: Edge, angleThreshold?: number, distanceThreshold?: number): ILocation | null;
2363
- /**
2364
- * getDirections takes one or more origin node ids, one or more destination node ids
2365
- * and returns a distance, array of directives, and an array of nodes that define the
2366
- * path to take.
2367
- *
2368
- * The returned directives array defines nodes, vortexes, and locations along the path
2369
- * along with text directions.
2370
- *
2371
- * @param originIds array - of one or more node ids
2372
- * @param destinationNodeIds array - of onr or more node ids
2373
- * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
2374
- * @param departFrom ILocation - optional, id and name of a location to represent start of journey
2375
- * @param arriveAt ILocation - optional, id and name of a location to represent end of journey
2376
- */
2377
- getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt }: {
2378
- originIds: string[];
2379
- destinationNodeIds: string[];
2380
- accessible: boolean;
2381
- departFrom?: ILocation;
2382
- arriveAt?: ILocation;
2383
- }): IDirectionsResult;
2384
- }
2385
- export default Navigator;
2386
- }
2387
-
2388
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/ILocation' {
2389
- interface ILocation {
2390
- id: string;
2391
- name: string;
2392
- [propName: string]: any;
2393
- }
2394
- export default ILocation;
2395
- }
2396
-
2397
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IMap' {
2398
- interface IGeoReference {
2399
- target: {
2400
- x: number;
2401
- y: number;
2402
- };
2403
- control: {
2404
- x: number;
2405
- y: number;
2406
- };
2407
- }
2408
- interface IMap {
2409
- id: string;
2410
- name: string;
2411
- shortName: string;
2412
- elevation?: number;
2413
- scale?: number;
2414
- x_scale?: number;
2415
- georeference?: IGeoReference[];
2416
- [propName: string]: any;
2417
- }
2418
- export default IMap;
2419
- }
2420
-
2421
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/INode' {
2422
- interface INode {
2423
- id: string;
2424
- x: number;
2425
- y: number;
2426
- map: string;
2427
- externalId?: string;
2428
- [propName: string]: any;
2429
- }
2430
- export default INode;
2431
- }
2432
-
2433
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Edge' {
2434
- import INode from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/INode';
2435
- import IVortex from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IVortex';
2436
- class Edge {
2437
- origin: INode;
2438
- destination: INode;
2439
- vortex?: IVortex;
2440
- distance: number;
2441
- angle: number;
2442
- weight: number;
2443
- constructor({ origin, destination, vortex, elevationDelta, distance, angle }: {
2444
- origin: INode;
2445
- destination: INode;
2446
- vortex?: IVortex;
2447
- elevationDelta?: number;
2448
- distance?: number;
2449
- angle?: number;
2450
- });
2451
- }
2452
- export default Edge;
2453
- }
2454
-
2455
- declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IVortex' {
2456
- interface IVortex {
2457
- id: string;
2458
- name: string;
2459
- type: string;
2460
- weight: number;
2461
- multiplier: number;
2462
- [propName: string]: any;
2463
- }
2464
- export default IVortex;
2465
- }
2466
-