venue-js 1.7.0 → 1.8.0-next.10

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.
@@ -460,7 +460,7 @@ type ElementFeature = ImdfFeature<ElementGeometry, ElementProperties>;
460
460
  */
461
461
  type SponsoredContentLegacyType = "HOMEPAGE_SPOTLIGHT" | "SCREENSAVER" | "SUGGESTED_BRAND" | "SEARCH_RESULT" | "POPUP_BANNER" | "FOOTER_BANNER" | "RECOMMENDED_EVENT" | "RECOMMENDED_PROMOTION" | "RECOMMENDED_DIRECTORY";
462
462
  type SponsoredContentPlacementType = "HOMEPAGE_SPOTLIGHT" | "SEARCH_SUGGESTION" | "SEARCH_RESULT" | "LIST_TOPITEM" | "POPUP_BANNER" | "FOOTER_BANNER" | "SCREENSAVER";
463
- type SponsoredContentAttributes = {
463
+ type SponsoredContentProperties = {
464
464
  venue_id: string;
465
465
  project_id: string;
466
466
  name: {
@@ -479,16 +479,17 @@ type SponsoredContentAttributes = {
479
479
  updatedAt: string;
480
480
  publishedAt: string;
481
481
  media?: Media;
482
- locale: string;
482
+ media_duration?: number;
483
+ media_resize_mode?: string;
484
+ locale?: string;
483
485
  };
486
+ /** @deprecated: Use SponsoredContentResponseItem instead */
484
487
  type SponsoredContentStrapiV4ApiResponse = {
485
488
  id: string;
486
- attributes: SponsoredContentAttributes;
489
+ attributes: SponsoredContentProperties;
487
490
  };
488
491
  /** Parsed for internal use */
489
- type SponsoredContentFeature = SponsoredContentAttributes & {
490
- id: string;
491
- };
492
+ type SponsoredContentFeature = ImdfFeature<null, SponsoredContentProperties>;
492
493
  type Page = {
493
494
  id: Id;
494
495
  attributes: Record<string, unknown>;
@@ -1065,6 +1066,7 @@ interface VenueClientOptions {
1065
1066
  previewToken?: string;
1066
1067
  baseUrl?: string;
1067
1068
  queryClient?: QueryClient;
1069
+ refetchIntervals?: Partial<Record<FeatureType, number>>;
1068
1070
  }
1069
1071
  type SearchClient = {
1070
1072
  search: (txt: string) => FuseResult<ImdfFeature>[];
@@ -1072,15 +1074,19 @@ type SearchClient = {
1072
1074
  interface FindParams {
1073
1075
  populate?: boolean;
1074
1076
  }
1077
+ interface SortParam {
1078
+ key: string;
1079
+ order?: 'asc' | 'desc';
1080
+ }
1075
1081
  interface FilterParams {
1076
1082
  populate?: boolean;
1077
1083
  filters?: Filters;
1084
+ sort?: SortParam;
1078
1085
  }
1079
1086
  interface PopulatedParams {
1080
1087
  populate: true;
1081
1088
  }
1082
1089
  interface FeatureQueryOptions {
1083
- refetchInterval?: number;
1084
1090
  staleTime?: number;
1085
1091
  cacheTime?: number;
1086
1092
  enabled?: boolean;
@@ -1095,7 +1101,9 @@ interface VenueDataClient {
1095
1101
  registerObserver: (featureType: FeatureType, refetchInterval: number) => QueryObserver;
1096
1102
  destroyObserver: (featureType: FeatureType) => void;
1097
1103
  destroyObservers: () => void;
1098
- createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
1104
+ createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]> & {
1105
+ refetchInterval?: number;
1106
+ };
1099
1107
  createFindByIdQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, id: string, params: FindParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
1100
1108
  _internalFindById: InternalFindById;
1101
1109
  filterByType: <T extends FeatureType>(featureType: T, params?: FilterParams) => Promise<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
@@ -1250,4 +1258,4 @@ declare const createWalkablePathService: (ctx: NavigateContext, options?: {
1250
1258
  resolution: number;
1251
1259
  }) => WalkablePathUtils;
1252
1260
 
1253
- export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, type AngleDirection, type AnyRelationshipFeature, type BaseRelationshipProperties, type CoordinateOrdinalString, type CreateStepUtilsOptions, DEFAULT_BASE_URL, type DescribableFeature, type DetailFeature, type DetailGeometry, type DetailProperties, type DistanceOptions, type ElementFeature, type ElementGeometry, type ElementProperties, type ElevatorRelationshipFeature, type ElevatorRelationshipFeaturePopulated, type ElevatorRelationshipProperties, type EscalatorRelationshipFeature, type EscalatorRelationshipFeaturePopulated, type EscalatorRelationshipProperties, type EventFeature, type EventProperties, type FeatureId, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindByIdSync, type FindParams, type FindRouteOptions, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, type GetNavigateClientOptions, ID_PREFIX_TO_FEATURE_TYPE, type IMDFUnitCategory, type IMDFVerticalUnitCategory, IMDF_FEATURE_TYPES, IMDF_UNIT_CATEGORIES, type Id, type ImdfFeature, type Instruction, type InstructionTurn, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, type LabelFeature, type LabelGeometry, type LabelProperties, type Landmark, type LandmarkService, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, type Media, type MediaFile, type Model3d, type Model3dFeature, type Model3dGeometry, type Model3dPopulated, type Model3dProperties, NONIMDF_FEATURE_TYPES, type NavigatableFeature, type NavigatableParam, type NavigateClient, type NavigateContext, type NeighborMap, type NodeId, type NodeMap, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, type OpeningTypeAndId, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrepareGraphOptions, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RampRelationshipFeature, type RampRelationshipFeaturePopulated, type RampRelationshipProperties, type RelationshipCategories, type RelationshipDirectionTypes, type RelationshipFeature, type RelationshipFeaturePopulated, type RelationshipGeometry, type Route, type SearchClient, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SingleGeometry, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type StairRelationshipFeaturePopulated, type StairsRelationshipFeature, type StairsRelationshipProperties, type Step, type StepDescription, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, type TransalatableString, type TraversalRelationshipFeature, type TraversalRelationshipFeaturePopulated, type TraversalRelationshipProperties, type TurnSide, type UnitAmenities, type UnitDistanceOptions, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitKiosks, type UnitOpenings, type UnitProperties, type UnitTypeAndId, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, type VerticalDistanceOptions, type VerticalUnitCategory, type WalkablePathUtils, type Waypoint, type WaypointSourceType, amenityToLandmark, angleDiff, createFindByIdSync, createInstructionService, createLandmarkService, createNavigateContext, createStepService, createWalkablePathService, createWaypointService, defaultFeatureQueryOptionsMap, describeHorizontalStep, describeLastStep, describeVerticalStep, distanceToWall, fetchDeliveryApi, fetchPreviewApi, findContainingUnit, findContainingUnitAtPoint, getDataClient, getInstructionText, getNavigateClient, getPointOnFeature, getSearchClient, getTurn, matchFilter, matchFilters, mergeStepsByOrdinal, mergeTwoSteps, occupantToLandmark, openingToLandmark, outerRingsToLine, outwardOpeningBearing, prepareGraph, safeFetchFeature, trace, turnSide, unitToLandmark };
1261
+ export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, type AngleDirection, type AnyRelationshipFeature, type BaseRelationshipProperties, type CoordinateOrdinalString, type CreateStepUtilsOptions, DEFAULT_BASE_URL, type DescribableFeature, type DetailFeature, type DetailGeometry, type DetailProperties, type DistanceOptions, type ElementFeature, type ElementGeometry, type ElementProperties, type ElevatorRelationshipFeature, type ElevatorRelationshipFeaturePopulated, type ElevatorRelationshipProperties, type EscalatorRelationshipFeature, type EscalatorRelationshipFeaturePopulated, type EscalatorRelationshipProperties, type EventFeature, type EventProperties, type FeatureId, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindByIdSync, type FindParams, type FindRouteOptions, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, type GetNavigateClientOptions, ID_PREFIX_TO_FEATURE_TYPE, type IMDFUnitCategory, type IMDFVerticalUnitCategory, IMDF_FEATURE_TYPES, IMDF_UNIT_CATEGORIES, type Id, type ImdfFeature, type Instruction, type InstructionTurn, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, type LabelFeature, type LabelGeometry, type LabelProperties, type Landmark, type LandmarkService, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, type Media, type MediaFile, type Model3d, type Model3dFeature, type Model3dGeometry, type Model3dPopulated, type Model3dProperties, NONIMDF_FEATURE_TYPES, type NavigatableFeature, type NavigatableParam, type NavigateClient, type NavigateContext, type NeighborMap, type NodeId, type NodeMap, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, type OpeningTypeAndId, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrepareGraphOptions, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RampRelationshipFeature, type RampRelationshipFeaturePopulated, type RampRelationshipProperties, type RelationshipCategories, type RelationshipDirectionTypes, type RelationshipFeature, type RelationshipFeaturePopulated, type RelationshipGeometry, type Route, type SearchClient, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SingleGeometry, type SortParam, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentProperties, type SponsoredContentStrapiV4ApiResponse, type StairRelationshipFeaturePopulated, type StairsRelationshipFeature, type StairsRelationshipProperties, type Step, type StepDescription, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, type TransalatableString, type TraversalRelationshipFeature, type TraversalRelationshipFeaturePopulated, type TraversalRelationshipProperties, type TurnSide, type UnitAmenities, type UnitDistanceOptions, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitKiosks, type UnitOpenings, type UnitProperties, type UnitTypeAndId, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, type VerticalDistanceOptions, type VerticalUnitCategory, type WalkablePathUtils, type Waypoint, type WaypointSourceType, amenityToLandmark, angleDiff, createFindByIdSync, createInstructionService, createLandmarkService, createNavigateContext, createStepService, createWalkablePathService, createWaypointService, defaultFeatureQueryOptionsMap, describeHorizontalStep, describeLastStep, describeVerticalStep, distanceToWall, fetchDeliveryApi, fetchPreviewApi, findContainingUnit, findContainingUnitAtPoint, getDataClient, getInstructionText, getNavigateClient, getPointOnFeature, getSearchClient, getTurn, matchFilter, matchFilters, mergeStepsByOrdinal, mergeTwoSteps, occupantToLandmark, openingToLandmark, outerRingsToLine, outwardOpeningBearing, prepareGraph, safeFetchFeature, trace, turnSide, unitToLandmark };
@@ -460,7 +460,7 @@ type ElementFeature = ImdfFeature<ElementGeometry, ElementProperties>;
460
460
  */
461
461
  type SponsoredContentLegacyType = "HOMEPAGE_SPOTLIGHT" | "SCREENSAVER" | "SUGGESTED_BRAND" | "SEARCH_RESULT" | "POPUP_BANNER" | "FOOTER_BANNER" | "RECOMMENDED_EVENT" | "RECOMMENDED_PROMOTION" | "RECOMMENDED_DIRECTORY";
462
462
  type SponsoredContentPlacementType = "HOMEPAGE_SPOTLIGHT" | "SEARCH_SUGGESTION" | "SEARCH_RESULT" | "LIST_TOPITEM" | "POPUP_BANNER" | "FOOTER_BANNER" | "SCREENSAVER";
463
- type SponsoredContentAttributes = {
463
+ type SponsoredContentProperties = {
464
464
  venue_id: string;
465
465
  project_id: string;
466
466
  name: {
@@ -479,16 +479,17 @@ type SponsoredContentAttributes = {
479
479
  updatedAt: string;
480
480
  publishedAt: string;
481
481
  media?: Media;
482
- locale: string;
482
+ media_duration?: number;
483
+ media_resize_mode?: string;
484
+ locale?: string;
483
485
  };
486
+ /** @deprecated: Use SponsoredContentResponseItem instead */
484
487
  type SponsoredContentStrapiV4ApiResponse = {
485
488
  id: string;
486
- attributes: SponsoredContentAttributes;
489
+ attributes: SponsoredContentProperties;
487
490
  };
488
491
  /** Parsed for internal use */
489
- type SponsoredContentFeature = SponsoredContentAttributes & {
490
- id: string;
491
- };
492
+ type SponsoredContentFeature = ImdfFeature<null, SponsoredContentProperties>;
492
493
  type Page = {
493
494
  id: Id;
494
495
  attributes: Record<string, unknown>;
@@ -1065,6 +1066,7 @@ interface VenueClientOptions {
1065
1066
  previewToken?: string;
1066
1067
  baseUrl?: string;
1067
1068
  queryClient?: QueryClient;
1069
+ refetchIntervals?: Partial<Record<FeatureType, number>>;
1068
1070
  }
1069
1071
  type SearchClient = {
1070
1072
  search: (txt: string) => FuseResult<ImdfFeature>[];
@@ -1072,15 +1074,19 @@ type SearchClient = {
1072
1074
  interface FindParams {
1073
1075
  populate?: boolean;
1074
1076
  }
1077
+ interface SortParam {
1078
+ key: string;
1079
+ order?: 'asc' | 'desc';
1080
+ }
1075
1081
  interface FilterParams {
1076
1082
  populate?: boolean;
1077
1083
  filters?: Filters;
1084
+ sort?: SortParam;
1078
1085
  }
1079
1086
  interface PopulatedParams {
1080
1087
  populate: true;
1081
1088
  }
1082
1089
  interface FeatureQueryOptions {
1083
- refetchInterval?: number;
1084
1090
  staleTime?: number;
1085
1091
  cacheTime?: number;
1086
1092
  enabled?: boolean;
@@ -1095,7 +1101,9 @@ interface VenueDataClient {
1095
1101
  registerObserver: (featureType: FeatureType, refetchInterval: number) => QueryObserver;
1096
1102
  destroyObserver: (featureType: FeatureType) => void;
1097
1103
  destroyObservers: () => void;
1098
- createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
1104
+ createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]> & {
1105
+ refetchInterval?: number;
1106
+ };
1099
1107
  createFindByIdQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, id: string, params: FindParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
1100
1108
  _internalFindById: InternalFindById;
1101
1109
  filterByType: <T extends FeatureType>(featureType: T, params?: FilterParams) => Promise<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
@@ -1250,4 +1258,4 @@ declare const createWalkablePathService: (ctx: NavigateContext, options?: {
1250
1258
  resolution: number;
1251
1259
  }) => WalkablePathUtils;
1252
1260
 
1253
- export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, type AngleDirection, type AnyRelationshipFeature, type BaseRelationshipProperties, type CoordinateOrdinalString, type CreateStepUtilsOptions, DEFAULT_BASE_URL, type DescribableFeature, type DetailFeature, type DetailGeometry, type DetailProperties, type DistanceOptions, type ElementFeature, type ElementGeometry, type ElementProperties, type ElevatorRelationshipFeature, type ElevatorRelationshipFeaturePopulated, type ElevatorRelationshipProperties, type EscalatorRelationshipFeature, type EscalatorRelationshipFeaturePopulated, type EscalatorRelationshipProperties, type EventFeature, type EventProperties, type FeatureId, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindByIdSync, type FindParams, type FindRouteOptions, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, type GetNavigateClientOptions, ID_PREFIX_TO_FEATURE_TYPE, type IMDFUnitCategory, type IMDFVerticalUnitCategory, IMDF_FEATURE_TYPES, IMDF_UNIT_CATEGORIES, type Id, type ImdfFeature, type Instruction, type InstructionTurn, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, type LabelFeature, type LabelGeometry, type LabelProperties, type Landmark, type LandmarkService, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, type Media, type MediaFile, type Model3d, type Model3dFeature, type Model3dGeometry, type Model3dPopulated, type Model3dProperties, NONIMDF_FEATURE_TYPES, type NavigatableFeature, type NavigatableParam, type NavigateClient, type NavigateContext, type NeighborMap, type NodeId, type NodeMap, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, type OpeningTypeAndId, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrepareGraphOptions, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RampRelationshipFeature, type RampRelationshipFeaturePopulated, type RampRelationshipProperties, type RelationshipCategories, type RelationshipDirectionTypes, type RelationshipFeature, type RelationshipFeaturePopulated, type RelationshipGeometry, type Route, type SearchClient, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SingleGeometry, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type StairRelationshipFeaturePopulated, type StairsRelationshipFeature, type StairsRelationshipProperties, type Step, type StepDescription, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, type TransalatableString, type TraversalRelationshipFeature, type TraversalRelationshipFeaturePopulated, type TraversalRelationshipProperties, type TurnSide, type UnitAmenities, type UnitDistanceOptions, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitKiosks, type UnitOpenings, type UnitProperties, type UnitTypeAndId, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, type VerticalDistanceOptions, type VerticalUnitCategory, type WalkablePathUtils, type Waypoint, type WaypointSourceType, amenityToLandmark, angleDiff, createFindByIdSync, createInstructionService, createLandmarkService, createNavigateContext, createStepService, createWalkablePathService, createWaypointService, defaultFeatureQueryOptionsMap, describeHorizontalStep, describeLastStep, describeVerticalStep, distanceToWall, fetchDeliveryApi, fetchPreviewApi, findContainingUnit, findContainingUnitAtPoint, getDataClient, getInstructionText, getNavigateClient, getPointOnFeature, getSearchClient, getTurn, matchFilter, matchFilters, mergeStepsByOrdinal, mergeTwoSteps, occupantToLandmark, openingToLandmark, outerRingsToLine, outwardOpeningBearing, prepareGraph, safeFetchFeature, trace, turnSide, unitToLandmark };
1261
+ export { ALL_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, type AngleDirection, type AnyRelationshipFeature, type BaseRelationshipProperties, type CoordinateOrdinalString, type CreateStepUtilsOptions, DEFAULT_BASE_URL, type DescribableFeature, type DetailFeature, type DetailGeometry, type DetailProperties, type DistanceOptions, type ElementFeature, type ElementGeometry, type ElementProperties, type ElevatorRelationshipFeature, type ElevatorRelationshipFeaturePopulated, type ElevatorRelationshipProperties, type EscalatorRelationshipFeature, type EscalatorRelationshipFeaturePopulated, type EscalatorRelationshipProperties, type EventFeature, type EventProperties, type FeatureId, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindByIdSync, type FindParams, type FindRouteOptions, type FixtureFeature, type FixtureFeaturePopulated, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, type GetNavigateClientOptions, ID_PREFIX_TO_FEATURE_TYPE, type IMDFUnitCategory, type IMDFVerticalUnitCategory, IMDF_FEATURE_TYPES, IMDF_UNIT_CATEGORIES, type Id, type ImdfFeature, type Instruction, type InstructionTurn, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, type LabelFeature, type LabelGeometry, type LabelProperties, type Landmark, type LandmarkService, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, type Media, type MediaFile, type Model3d, type Model3dFeature, type Model3dGeometry, type Model3dPopulated, type Model3dProperties, NONIMDF_FEATURE_TYPES, type NavigatableFeature, type NavigatableParam, type NavigateClient, type NavigateContext, type NeighborMap, type NodeId, type NodeMap, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, occupantHelper as OccupantHelpers, type OccupantProperties, type OpeningFeature, type OpeningFeaturePopulated, type OpeningGeometry, type OpeningProperties, type OpeningTypeAndId, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrepareGraphOptions, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RampRelationshipFeature, type RampRelationshipFeaturePopulated, type RampRelationshipProperties, type RelationshipCategories, type RelationshipDirectionTypes, type RelationshipFeature, type RelationshipFeaturePopulated, type RelationshipGeometry, type Route, type SearchClient, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SingleGeometry, type SortParam, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentProperties, type SponsoredContentStrapiV4ApiResponse, type StairRelationshipFeaturePopulated, type StairsRelationshipFeature, type StairsRelationshipProperties, type Step, type StepDescription, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, type TransalatableString, type TraversalRelationshipFeature, type TraversalRelationshipFeaturePopulated, type TraversalRelationshipProperties, type TurnSide, type UnitAmenities, type UnitDistanceOptions, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitKiosks, type UnitOpenings, type UnitProperties, type UnitTypeAndId, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, type VerticalDistanceOptions, type VerticalUnitCategory, type WalkablePathUtils, type Waypoint, type WaypointSourceType, amenityToLandmark, angleDiff, createFindByIdSync, createInstructionService, createLandmarkService, createNavigateContext, createStepService, createWalkablePathService, createWaypointService, defaultFeatureQueryOptionsMap, describeHorizontalStep, describeLastStep, describeVerticalStep, distanceToWall, fetchDeliveryApi, fetchPreviewApi, findContainingUnit, findContainingUnitAtPoint, getDataClient, getInstructionText, getNavigateClient, getPointOnFeature, getSearchClient, getTurn, matchFilter, matchFilters, mergeStepsByOrdinal, mergeTwoSteps, occupantToLandmark, openingToLandmark, outerRingsToLine, outwardOpeningBearing, prepareGraph, safeFetchFeature, trace, turnSide, unitToLandmark };
@@ -196,8 +196,6 @@ var defaultFeatureQueryOptionsMap = {
196
196
  kiosk: {},
197
197
  level: {},
198
198
  occupant: {
199
- refetchInterval: 5 * 60 * 1e3,
200
- // refresh every 5 min
201
199
  staleTime: 5 * 60 * 1e3
202
200
  },
203
201
  opening: {},
@@ -210,16 +208,11 @@ var defaultFeatureQueryOptionsMap = {
210
208
  privilege: {},
211
209
  event: {},
212
210
  promotion: {
213
- refetchInterval: 0.5 * 60 * 1e3,
214
- // refresh every 5 min
215
211
  staleTime: 0.5 * 60 * 1e3
216
212
  },
217
213
  label: {},
218
214
  // NON GEOJSON
219
- "sponsored-content": {
220
- refetchInterval: 1 * 60 * 1e3
221
- // refresh every 5 min
222
- },
215
+ "sponsored-content": {},
223
216
  element: {},
224
217
  page: {},
225
218
  model3d: {}
@@ -448,6 +441,9 @@ var getOccupantMarkerLocations = (occupant, options) => {
448
441
  return compact([mainLocation, ...onePerLevelLocations]);
449
442
  };
450
443
 
444
+ // src/data/getDataClient.ts
445
+ var import_lodash23 = require("lodash");
446
+
451
447
  // src/data/api/delivery-project.ts
452
448
  async function fetchDeliveryApi(projectId, apiKey, featureType, baseUrl = DEFAULT_BASE_URL) {
453
449
  switch (featureType) {
@@ -469,18 +465,6 @@ async function fetchDeliveryApi(projectId, apiKey, featureType, baseUrl = DEFAUL
469
465
  const items = await res.json();
470
466
  return items.features;
471
467
  }
472
- case "sponsored-content": {
473
- const res = await fetch(
474
- `${baseUrl}/delivery/projects/${projectId}/sponsored-content.json?api-key=${apiKey}`
475
- );
476
- if (res.status !== 200) return [];
477
- const jsonRes = await res.json();
478
- const items = jsonRes.data;
479
- return items.map((item) => ({
480
- id: item.id,
481
- ...item.attributes
482
- }));
483
- }
484
468
  default: {
485
469
  const res = await fetch(
486
470
  `${baseUrl}/delivery/projects/${projectId}/imdf/${featureType}.geojson?api-key=${apiKey}`
@@ -508,6 +492,7 @@ async function fetchPreviewApi(projectId, previewToken, featureType, baseUrl = D
508
492
  const items = await res.json();
509
493
  return items;
510
494
  }
495
+ // TODO: Move preview endpoint to /imdf/sponsored-content.geojson
511
496
  case "sponsored-content": {
512
497
  const res = await fetch(
513
498
  `${baseUrl}/preview/projects/${projectId}/sponsored-content.json`,
@@ -1705,7 +1690,8 @@ var prepareGraph = (options) => {
1705
1690
  (section) => {
1706
1691
  const sectionLevelId = section?.properties?.level_id;
1707
1692
  const displayPoint = section?.properties?.display_point;
1708
- const unit = findContainingUnitAtPoint(displayPoint, sectionLevelId, walkableUnits) || findContainingUnit(section, walkableUnits);
1693
+ const representativePoint = displayPoint ?? (0, import_center8.center)(section).geometry;
1694
+ const unit = findContainingUnitAtPoint(representativePoint, sectionLevelId, walkableUnits) || findContainingUnit(section, walkableUnits);
1709
1695
  if (!unit) {
1710
1696
  console.warn(`[venue-js] Section ${section.id} on level ${section?.properties?.level_id} has no walkable containing unit \u2014 section will be excluded from routing.`);
1711
1697
  return null;
@@ -3101,7 +3087,7 @@ var getDataClient = (options) => {
3101
3087
  let navigateClient;
3102
3088
  const observers = /* @__PURE__ */ new Map();
3103
3089
  const queryClient = options.queryClient ?? new import_query_core.QueryClient();
3104
- const { mode = "delivery", projectId, apiKey, baseUrl, previewToken } = options;
3090
+ const { mode = "delivery", projectId, apiKey, baseUrl, previewToken, refetchIntervals } = options;
3105
3091
  if (!projectId)
3106
3092
  throw new Error(
3107
3093
  "Cannot create VenueDataClient. Reason: `projectId` is missing"
@@ -3176,6 +3162,8 @@ var getDataClient = (options) => {
3176
3162
  if (!record) return;
3177
3163
  record.unsubscribe();
3178
3164
  observers.delete(featureType);
3165
+ const baseline = refetchIntervals?.[featureType];
3166
+ if (baseline) registerObserver(featureType, baseline);
3179
3167
  };
3180
3168
  const destroyObservers = () => {
3181
3169
  observers.forEach(({ observer, unsubscribe }) => {
@@ -3193,9 +3181,14 @@ var getDataClient = (options) => {
3193
3181
  if (params.filters) {
3194
3182
  result = features.filter((f) => matchFilters(f, filters));
3195
3183
  }
3184
+ if (params.sort) {
3185
+ const { key, order = "asc" } = params.sort;
3186
+ result = (0, import_lodash23.orderBy)(result, `properties.${key}`, order);
3187
+ }
3196
3188
  return params.populate === true ? await Promise.all(result.map((f) => populator[featureType](f))) : result;
3197
3189
  },
3198
- ...options2 ?? {}
3190
+ ...options2 ?? {},
3191
+ refetchInterval: refetchIntervals?.[featureType]
3199
3192
  });
3200
3193
  const createFindByIdQueryOptions = (featureType, id, params = {}, options2 = {}) => ({
3201
3194
  queryKey: [featureType, "detail", id, params],
@@ -3252,6 +3245,11 @@ var getDataClient = (options) => {
3252
3245
  }
3253
3246
  return navigateClient.findRoute(origin, destination, options2);
3254
3247
  };
3248
+ if (refetchIntervals) {
3249
+ for (const [featureType, interval] of Object.entries(refetchIntervals)) {
3250
+ registerObserver(featureType, interval);
3251
+ }
3252
+ }
3255
3253
  return {
3256
3254
  projectId,
3257
3255
  queryClient,