@mappedin/mappedin-js 5.9.0 → 5.10.0

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