venue-js 1.4.0-next.1 → 1.4.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -84,7 +84,9 @@ type AnchorProperties = EntityTimestamps & {
|
|
|
84
84
|
unit_id: Id;
|
|
85
85
|
locale: string;
|
|
86
86
|
};
|
|
87
|
-
type AnchorFeature = ImdfFeature<AnchorGeometry, AnchorProperties
|
|
87
|
+
type AnchorFeature = ImdfFeature<AnchorGeometry, AnchorProperties> & {
|
|
88
|
+
feature_type: "anchor";
|
|
89
|
+
};
|
|
88
90
|
type AmenityGeometry = Point;
|
|
89
91
|
type AmenityProperties = EntityTimestamps & {
|
|
90
92
|
amenity_logo: Media | null;
|
|
@@ -489,6 +491,10 @@ type AnchorFeaturePopulated = AnchorFeature & {
|
|
|
489
491
|
* [IMDF] Level that kiosk is on
|
|
490
492
|
*/
|
|
491
493
|
level: LevelFeaturePopulated;
|
|
494
|
+
/**
|
|
495
|
+
* [venue.in.th] Venue that anchor is in
|
|
496
|
+
*/
|
|
497
|
+
venue: VenueFeaturePopulated;
|
|
492
498
|
/**
|
|
493
499
|
* [Derived] The section this anchor is on.
|
|
494
500
|
* This is added during feature enrichment and not part of the original IMDF dataset.
|
package/dist/index.d.ts
CHANGED
|
@@ -84,7 +84,9 @@ type AnchorProperties = EntityTimestamps & {
|
|
|
84
84
|
unit_id: Id;
|
|
85
85
|
locale: string;
|
|
86
86
|
};
|
|
87
|
-
type AnchorFeature = ImdfFeature<AnchorGeometry, AnchorProperties
|
|
87
|
+
type AnchorFeature = ImdfFeature<AnchorGeometry, AnchorProperties> & {
|
|
88
|
+
feature_type: "anchor";
|
|
89
|
+
};
|
|
88
90
|
type AmenityGeometry = Point;
|
|
89
91
|
type AmenityProperties = EntityTimestamps & {
|
|
90
92
|
amenity_logo: Media | null;
|
|
@@ -489,6 +491,10 @@ type AnchorFeaturePopulated = AnchorFeature & {
|
|
|
489
491
|
* [IMDF] Level that kiosk is on
|
|
490
492
|
*/
|
|
491
493
|
level: LevelFeaturePopulated;
|
|
494
|
+
/**
|
|
495
|
+
* [venue.in.th] Venue that anchor is in
|
|
496
|
+
*/
|
|
497
|
+
venue: VenueFeaturePopulated;
|
|
492
498
|
/**
|
|
493
499
|
* [Derived] The section this anchor is on.
|
|
494
500
|
* This is added during feature enrichment and not part of the original IMDF dataset.
|
package/dist/index.js
CHANGED
|
@@ -455,6 +455,7 @@ var createPopulator = ({
|
|
|
455
455
|
};
|
|
456
456
|
const populateAnchor = async (anchor) => {
|
|
457
457
|
const unit = await internalFindById(anchor.properties.unit_id);
|
|
458
|
+
const venue = await internalFindById(unit.properties.venue_id);
|
|
458
459
|
const level = await internalFindById(unit.properties.level_id);
|
|
459
460
|
const sections = await internalFilterByType("section");
|
|
460
461
|
const section = sections.find((section2) => (0, import_boolean_within.booleanWithin)(anchor, section2));
|
|
@@ -464,7 +465,9 @@ var createPopulator = ({
|
|
|
464
465
|
...anchor.properties,
|
|
465
466
|
level: await populateLevel(level),
|
|
466
467
|
unit: await populateUnit(unit),
|
|
467
|
-
section: section ? await populateSection(section) : null
|
|
468
|
+
section: section ? await populateSection(section) : null,
|
|
469
|
+
venue: await populateVenue(venue),
|
|
470
|
+
ordinal: level.properties.ordinal
|
|
468
471
|
}
|
|
469
472
|
};
|
|
470
473
|
};
|