Options
All
  • Public
  • Public/Protected
  • All
Menu

@entur/sdk

Index

Type aliases

DeparturesById: { departures: Departure[]; id: string }

Type declaration

EnturService: EnturClient
deprecated

Use EnturClient instead.

Feature: { geometry: { coordinates: [number, number]; type: "Point" }; properties: { accuracy: "point"; borough: string; borough_gid: string; category: FeatureCategory[]; country_gid: string; county: string; county_gid: string; gid: string; housenumber?: string; id: string; label?: string; layer: "venue" | "address"; locality: string; locality_gid: string; name: string; postalcode: string; source: string; source_id: string; street: string; tariff_zones?: string[] } }
deprecated

Use the geocoder.autocomplete and geocoder.reverse methods instead and related types.

Type declaration

  • geometry: { coordinates: [number, number]; type: "Point" }
    • coordinates: [number, number]
    • type: "Point"
  • properties: { accuracy: "point"; borough: string; borough_gid: string; category: FeatureCategory[]; country_gid: string; county: string; county_gid: string; gid: string; housenumber?: string; id: string; label?: string; layer: "venue" | "address"; locality: string; locality_gid: string; name: string; postalcode: string; source: string; source_id: string; street: string; tariff_zones?: string[] }
    • accuracy: "point"
    • borough: string
    • borough_gid: string
    • category: FeatureCategory[]
    • country_gid: string
    • county: string
    • county_gid: string
    • gid: string
    • Optional housenumber?: string
    • id: string
    • Optional label?: string
    • layer: "venue" | "address"
    • locality: string
    • locality_gid: string
    • name: string
    • postalcode: string
    • source: string
    • source_id: string
    • street: string
    • Optional tariff_zones?: string[]
FlexibleLineType: "corridorService" | "mainRouteWithFlexibleEnds" | "flexibleAreasOnly" | "hailAndRideSections" | "fixedStopAreaWide" | "freeAreaAreaWide" | "mixedFlexible" | "mixedFlexibleAndFixed" | "fixed" | "other"
IntermediateEstimatedCall: EstimatedCall
LimitationStatusType: "FALSE" | "TRUE" | "PARTIAL" | "UNKNOWN"
Line: { bookingArrangements?: BookingArrangement; description?: string; flexibleLineType?: FlexibleLineType; id: string; name: string; notices: Notice[]; publicCode: string; transportMode: TransportMode; transportSubmode: TransportSubmode }

Type declaration

  • Optional bookingArrangements?: BookingArrangement
    deprecated

    Use bookingArrangements on Leg or ServiceJourney instead.

  • Optional description?: string
  • Optional flexibleLineType?: FlexibleLineType
  • id: string
  • name: string
  • notices: Notice[]
  • publicCode: string
  • transportMode: TransportMode
  • transportSubmode: TransportSubmode
ParkingVehicle: "pedalCycle" | "moped" | "motorcycle" | "motorcycleWithSidecar" | "motorScooter" | "twoWheeledVehicle" | "threeWheeledVehicle" | "car" | "smallCar" | "passengerCar" | "largeCar" | "fourWheelDrive" | "taxi" | "camperCar" | "carWithTrailer" | "carWithCaravan" | "minibus" | "bus" | "van" | "largeVan" | "highSidedVehicle" | "lightGoodsVehicle" | "heavyGoodsVehicle" | "truck" | "agriculturalVehicle" | "tanker" | "tram" | "articulatedVehicle" | "vehicleWithTrailer" | "lightGoodsVehicleWithTrailer" | "heavyGoodsVehicleWithTrailer" | "undefined" | "other" | "allPassengerVehicles" | "all"
PointsOnLink: { length: number; points: string }

Type declaration

  • length: number
  • points: string
ReportType: "general" | "incident" | null
RequestOptions: Pick<RequestInit, "signal" | "headers">

Options to be passed on to the fetch request. You can use this to add custom headers or a signal for use with an AbortController.

SanitaryEquipment: { gender: "both" | "femaleOnly" | "maleOnly" | "sameSexOnly"; id: string; numberOfToilets: number }

Type declaration

  • gender: "both" | "femaleOnly" | "maleOnly" | "sameSexOnly"
  • id: string
  • numberOfToilets: number
ShelterEquipment: { id: string }

Type declaration

  • id: string
TicketingEquipment: { id: string; numberOfMachines: number; ticketMachines: boolean; ticketOffice: boolean }

Type declaration

  • id: string
  • numberOfMachines: number
  • ticketMachines: boolean
  • ticketOffice: boolean
WaitingRoomEquipment: { id: string }

Type declaration

  • id: string

Functions

  • convertPositionToBbox(coordinates: Coordinates, distance: number): Bbox
  • journeyPlannerQuery<T>(queryObj: string, variables: Record<string, any>, config: ServiceConfig, options?: RequestOptions): Promise<T>
  • Type parameters

    • T

    Parameters

    • queryObj: string
    • variables: Record<string, any>
    • config: ServiceConfig
    • Optional options: RequestOptions

    Returns Promise<T>

  • nsrQuery<T>(query: string, variables: Record<string, any>, config: ServiceConfig, options?: RequestOptions): Promise<T>
  • Type parameters

    • T

    Parameters

    • query: string
    • variables: Record<string, any>
    • config: ServiceConfig
    • Optional options: RequestOptions

    Returns Promise<T>

  • throttler<T, V>(func: (arg: T) => Promise<V>, args: T[]): Promise<V[]>
  • Type parameters

    • T

    • V

    Parameters

    • func: (arg: T) => Promise<V>
        • (arg: T): Promise<V>
        • Parameters

          • arg: T

          Returns Promise<V>

    • args: T[]

    Returns Promise<V[]>

Generated using TypeDoc