// Copyright 2025 MobilityData // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * Describes the vehicle availabilities of the system. */ export interface VehicleAvailability { data: Data; /** * Last time the data in the feed was updated in RFC3339 format. */ last_updated: string; /** * Number of seconds before the data in the feed will be updated again (0 if the data should * always be refreshed). */ ttl: number; /** * GBFS version number to which the feed conforms, according to the versioning framework * (added in v1.1). */ version: Version; } export interface Data { /** * Contains one object per vehicle. */ vehicles: Vehicle[]; } export interface Vehicle { /** * Array of time slots during which the specified vehicle is available. */ availabilities: Availability[]; /** * The plan_id of the pricing plan this vehicle is eligible for */ pricing_plan_id?: string; /** * The id of the station where this vehicle is located when available */ station_id: string; /** * List of vehicle equipment provided by the operator */ vehicle_equipment?: string[]; /** * Identifier of a vehicle */ vehicle_id: string; /** * Unique identifier of a vehicle type as defined in vehicle_types.json */ vehicle_type_id?: string; } export interface Availability { /** * Start date and time of available time slot. */ from: string; /** * End date and time of available time slot. */ until?: string; } export type Version = "3.1-RC3";