s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
907 lines • 33.3 kB
TypeScript
/**
* # Free Bike Status Schema V2.3, V2.2, V2.1, OR V2.0
* Describes the vehicles that are available for rent.
*
* ## Links
* - [GBFS Specification V2.3](https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#free_bike_statusjson)
* - [GBFS Specification V2.2](https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson)
* - [GBFS Specification V2.1](https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#free_bike_statusjson)
* - [GBFS Specification V2.0](https://github.com/MobilityData/gbfs/blob/v2.0/gbfs.md#free_bike_statusjson)
*/
export type GBFSFreeBikeStatusV2 = GBFSFreeBikeStatusV23 | GBFSFreeBikeStatusV22 | GBFSFreeBikeStatusV21 | GBFSFreeBikeStatusV20;
/**
* # Free Bike Status Schema V2.3
* Describes the vehicles that are available for rent (as of v2.1-RC2).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#free_bike_statusjson)
*/
export declare const gbfsFreeBikeStatusSchemaV23: {
$schema: string;
$id: string;
description: string;
type: string;
properties: {
last_updated: {
description: string;
type: string;
minimum: number;
};
ttl: {
description: string;
type: string;
minimum: number;
};
version: {
description: string;
type: string;
const: string;
};
data: {
description: string;
type: string;
properties: {
bikes: {
type: string;
items: {
type: string;
properties: {
bike_id: {
description: string;
type: string;
};
lat: {
description: string;
type: string;
minimum: number;
maximum: number;
};
lon: {
description: string;
type: string;
minimum: number;
maximum: number;
};
is_reserved: {
description: string;
type: string;
};
is_disabled: {
description: string;
type: string;
};
rental_uris: {
description: string;
type: string;
properties: {
android: {
description: string;
type: string;
format: string;
};
ios: {
description: string;
type: string;
format: string;
};
web: {
description: string;
type: string;
format: string;
};
};
};
vehicle_type_id: {
description: string;
type: string;
};
last_reported: {
description: string;
type: string;
minimum: number;
};
current_range_meters: {
description: string;
type: string;
minimum: number;
};
current_fuel_percent: {
description: string;
type: string;
minimum: number;
maximum: number;
};
station_id: {
description: string;
type: string;
};
home_station_id: {
description: string;
type: string;
};
pricing_plan_id: {
description: string;
type: string;
};
vehicle_equipment: {
description: string;
type: string;
items: {
enum: string[];
};
};
available_until: {
description: string;
type: string;
pattern: string;
};
};
anyOf: ({
required: string[];
errorMessage: string;
properties?: undefined;
} | {
required: string[];
properties: {
lat: {
not: {};
};
lon: {
not: {};
};
};
errorMessage: string;
})[];
required: string[];
};
};
};
required: string[];
};
};
additionalProperties: boolean;
required: string[];
};
/**
* # Free Bike Status V2.3
* Describes the vehicles that are available for rent (as of v2.1-RC2).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#free_bike_statusjson)
*/
export interface GBFSFreeBikeStatusV23 {
/**
* Last time the data in the feed was updated in POSIX time.
* **Minimum**: 1450155600
*/
last_updated: number;
/**
* Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).
* **Minimum**: 0
*/
ttl: number;
/**
* GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).
* **Const**: 2.3
*/
version: '2.3';
/**
* Contains the list of bikes published by the auto-discovery file.
*/
data: {
/**
* An array of all bikes available for rent.
*/
bikes: Array<{
/**
* Rotating (as of v2.0) identifier of a vehicle.
*/
bike_id: string;
/**
* The latitude of the vehicle.
* **Minimum**: -90
* **Maximum**: 90
*/
lat?: number;
/**
* The longitude of the vehicle.
* **Minimum**: -180
* **Maximum**: 180
*/
lon?: number;
/**
* Is the vehicle currently reserved?
*/
is_reserved: boolean;
/**
* Is the vehicle currently disabled (broken)?
*/
is_disabled: boolean;
/**
* Contains rental URIs for Android, iOS, and web (added in v1.1).
*/
rental_uris?: {
/**
* URI that can be passed to an Android app with an intent (added in v1.1).
* **Format**: uri
*/
android?: string;
/**
* URI that can be used on iOS to launch the rental app for this vehicle (added in v1.1).
* **Format**: uri
*/
ios?: string;
/**
* URL that can be used by a web browser to show more information about renting this vehicle (added in v1.1).
* **Format**: uri
*/
web?: string;
};
/**
* The vehicle_type_id of this vehicle (added in v2.1-RC).
*/
vehicle_type_id?: string;
/**
* The last time this vehicle reported its status to the operator's backend in POSIX time (added in v2.1-RC).
* **Minimum**: 1450155600
*/
last_reported?: number;
/**
* The furthest distance in meters that the vehicle can travel without recharging or refueling with the vehicle's current charge or fuel (added in v2.1-RC).
* **Minimum**: 0
*/
current_range_meters?: number;
/**
* This value represents the current percentage, expressed from 0 to 1, of fuel or battery power remaining in the vehicle. Added in v2.3-RC.
* **Minimum**: 0
* **Maximum**: 1
*/
current_fuel_percent?: number;
/**
* Identifier referencing the station_id if the vehicle is currently at a station (added in v2.1-RC2).
*/
station_id?: string;
/**
* The station_id of the station this vehicle must be returned to (added in v2.3-RC).
*/
home_station_id?: string;
/**
* The plan_id of the pricing plan this vehicle is eligible for (added in v2.2).
*/
pricing_plan_id?: string;
/**
* List of vehicle equipment provided by the operator in addition to the accessories already provided in the vehicle. Added in v2.3.
*/
vehicle_equipment?: Array<'child_seat_a' | 'child_seat_b' | 'child_seat_c' | 'winter_tires' | 'snow_chains'>;
/**
* The date and time when any rental of the vehicle must be completed. Added in v2.3.
* **Pattern**: `^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(([+-]([0-9]{2}):([0-9]{2}))|Z)$`
*/
available_until?: string;
}>;
};
}
/**
* # Free Bike Status Schema V2.2
* Describes the vehicles that are available for rent (as of v2.1-RC2).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson)
*/
export declare const gbfsFreeBikeStatusSchemaV22: {
$schema: string;
$id: string;
description: string;
type: string;
properties: {
last_updated: {
description: string;
type: string;
minimum: number;
};
ttl: {
description: string;
type: string;
minimum: number;
};
version: {
description: string;
type: string;
const: string;
};
data: {
description: string;
type: string;
properties: {
bikes: {
type: string;
items: {
type: string;
properties: {
bike_id: {
description: string;
type: string;
};
lat: {
description: string;
type: string;
minimum: number;
maximum: number;
};
lon: {
description: string;
type: string;
minimum: number;
maximum: number;
};
is_reserved: {
description: string;
type: string;
};
is_disabled: {
description: string;
type: string;
};
rental_uris: {
description: string;
type: string;
properties: {
android: {
description: string;
type: string;
format: string;
};
ios: {
description: string;
type: string;
format: string;
};
web: {
description: string;
type: string;
format: string;
};
};
};
vehicle_type_id: {
description: string;
type: string;
};
last_reported: {
description: string;
type: string;
minimum: number;
};
current_range_meters: {
description: string;
type: string;
minimum: number;
};
station_id: {
description: string;
type: string;
};
pricing_plan_id: {
description: string;
type: string;
};
};
anyOf: ({
required: string[];
errorMessage: string;
properties?: undefined;
} | {
required: string[];
properties: {
lat: {
not: {};
};
lon: {
not: {};
};
};
errorMessage: string;
})[];
required: string[];
};
};
};
required: string[];
};
};
additionalProperties: boolean;
required: string[];
};
/**
* # Free Bike Status V2.2
* Describes the vehicles that are available for rent (as of v2.1-RC2).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson)
*/
export interface GBFSFreeBikeStatusV22 {
/**
* Last time the data in the feed was updated in POSIX time.
* **Minimum**: 1450155600
*/
last_updated: number;
/**
* Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).
* **Minimum**: 0
*/
ttl: number;
/**
* GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).
* **Const**: 2.2
*/
version: '2.2';
/**
* Contains the list of bikes published by the auto-discovery file.
*/
data: {
/**
* An array of all bikes available for rent.
*/
bikes: Array<{
/**
* Rotating (as of v2.0) identifier of a vehicle.
*/
bike_id: string;
/**
* The latitude of the vehicle.
* **Minimum**: -90
* **Maximum**: 90
*/
lat?: number;
/**
* The longitude of the vehicle.
* **Minimum**: -180
* **Maximum**: 180
*/
lon?: number;
/**
* Is the vehicle currently reserved?
*/
is_reserved: boolean;
/**
* Is the vehicle currently disabled (broken)?
*/
is_disabled: boolean;
/**
* Contains rental URIs for Android, iOS, and web (added in v1.1).
*/
rental_uris?: {
/**
* URI that can be passed to an Android app with an intent (added in v1.1).
* **Format**: uri
*/
android?: string;
/**
* URI that can be used on iOS to launch the rental app for this vehicle (added in v1.1).
* **Format**: uri
*/
ios?: string;
/**
* URL that can be used by a web browser to show more information about renting this vehicle (added in v1.1).
* **Format**: uri
*/
web?: string;
};
/**
* The vehicle_type_id of this vehicle (added in v2.1-RC).
*/
vehicle_type_id?: string;
/**
* The last time this vehicle reported its status to the operator's backend in POSIX time (added in v2.1-RC).
* **Minimum**: 1450155600
*/
last_reported?: number;
/**
* The furthest distance in meters that the vehicle can travel without recharging or refueling with the vehicle's current charge or fuel (added in v2.1-RC).
* **Minimum**: 0
*/
current_range_meters?: number;
/**
* Identifier referencing the station_id if the vehicle is currently at a station (added in v2.1-RC2).
*/
station_id?: string;
/**
* The plan_id of the pricing plan this vehicle is eligible for (added in v2.1-RC2).
*/
pricing_plan_id?: string;
}>;
};
}
/**
* # Free Bike Status Schema V2.1
* Describes the vehicles that are available for rent (as of v2.1-RC2).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#free_bike_statusjson)
*/
export declare const gbfsFreeBikeStatusSchemaV21: {
$schema: string;
$id: string;
description: string;
type: string;
properties: {
last_updated: {
description: string;
type: string;
minimum: number;
};
ttl: {
description: string;
type: string;
minimum: number;
};
version: {
description: string;
type: string;
const: string;
};
data: {
description: string;
type: string;
properties: {
bikes: {
type: string;
items: {
type: string;
properties: {
bike_id: {
description: string;
type: string;
};
lat: {
description: string;
type: string;
minimum: number;
maximum: number;
};
lon: {
description: string;
type: string;
minimum: number;
maximum: number;
};
is_reserved: {
description: string;
type: string;
};
is_disabled: {
description: string;
type: string;
};
rental_uris: {
description: string;
type: string;
properties: {
android: {
description: string;
type: string;
format: string;
};
ios: {
description: string;
type: string;
format: string;
};
web: {
description: string;
type: string;
format: string;
};
};
};
vehicle_type_id: {
description: string;
type: string;
};
last_reported: {
description: string;
type: string;
minimum: number;
};
current_range_meters: {
description: string;
type: string;
minimum: number;
};
station_id: {
description: string;
type: string;
};
};
anyOf: ({
required: string[];
errorMessage: string;
properties?: undefined;
} | {
required: string[];
properties: {
lat: {
not: {};
};
lon: {
not: {};
};
};
errorMessage: string;
})[];
required: string[];
};
};
};
required: string[];
};
};
required: string[];
};
/**
* # Free Bike Status V2.1
* Describes the vehicles that are available for rent (as of v2.1-RC2).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#free_bike_statusjson)
*/
export interface GBFSFreeBikeStatusV21 {
/**
* Last time the data in the feed was updated in POSIX time.
* **Minimum**: 1450155600
*/
last_updated: number;
/**
* Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).
* **Minimum**: 0
*/
ttl: number;
/**
* GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).
* **Const**: 2.1
*/
version: '2.1';
/**
* Contains the list of bikes published by the auto-discovery file.
*/
data: {
/**
* An array of all bikes available for rent.
*/
bikes: Array<{
/**
* Rotating (as of v2.0) identifier of a vehicle.
*/
bike_id: string;
/**
* The latitude of the vehicle.
* **Minimum**: -90
* **Maximum**: 90
*/
lat?: number;
/**
* The longitude of the vehicle.
* **Minimum**: -180
* **Maximum**: 180
*/
lon?: number;
/**
* Is the vehicle currently reserved?
*/
is_reserved: boolean;
/**
* Is the vehicle currently disabled (broken)?
*/
is_disabled: boolean;
/**
* Contains rental URIs for Android, iOS, and web (added in v1.1).
*/
rental_uris?: {
/**
* URI that can be passed to an Android app with an intent (added in v1.1).
* **Format**: uri
*/
android?: string;
/**
* URI that can be used on iOS to launch the rental app for this vehicle (added in v1.1).
* **Format**: uri
*/
ios?: string;
/**
* URL that can be used by a web browser to show more information about renting this vehicle (added in v1.1).
* **Format**: uri
*/
web?: string;
};
/**
* The vehicle_type_id of this vehicle (added in v2.1-RC).
*/
vehicle_type_id?: string;
/**
* The last time this vehicle reported its status to the operator's backend in POSIX time (added in v2.1-RC).
* **Minimum**: 1450155600
*/
last_reported?: number;
/**
* The furthest distance in meters that the vehicle can travel without recharging or refueling (added in v2.1-RC).
* **Minimum**: 0
*/
current_range_meters?: number;
/**
* Identifier referencing the station_id if the vehicle is currently at a station (added in v2.1-RC2).
*/
station_id?: string;
}>;
};
}
/**
* # Free Bike Status Schema V2.0
* Describes the vehicles that are not at a station and are available for rent.
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.0/gbfs.md#free_bike_statusjson)
*/
export declare const gbfsFreeBikeStatusSchemaV20: {
$schema: string;
$id: string;
description: string;
type: string;
properties: {
last_updated: {
description: string;
type: string;
minimum: number;
};
ttl: {
description: string;
type: string;
minimum: number;
};
version: {
description: string;
type: string;
const: string;
};
data: {
description: string;
type: string;
properties: {
bikes: {
type: string;
items: {
type: string;
properties: {
bike_id: {
description: string;
type: string;
};
lat: {
description: string;
type: string;
minimum: number;
maximum: number;
};
lon: {
description: string;
type: string;
minimum: number;
maximum: number;
};
is_reserved: {
description: string;
type: string;
};
is_disabled: {
description: string;
type: string;
};
rental_uris: {
description: string;
type: string;
properties: {
android: {
description: string;
type: string;
format: string;
};
ios: {
description: string;
type: string;
format: string;
};
web: {
description: string;
type: string;
format: string;
};
};
};
};
required: string[];
};
};
};
required: string[];
};
};
required: string[];
};
/**
* # Free Bike Status V2.0
* Describes the vehicles that are not at a station and are available for rent.
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v2.0/gbfs.md#free_bike_statusjson)
*/
export interface GBFSFreeBikeStatusV20 {
/**
* Last time the data in the feed was updated in POSIX time.
* **Minimum**: 1450155600
*/
last_updated: number;
/**
* Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).
* **Minimum**: 0
*/
ttl: number;
/**
* GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).
* **Const**: 2.0
*/
version: '2.0';
/**
* Contains the list of bikes published by the auto-discovery file.
*/
data: {
/**
* An array of all bikes available for rent.
*/
bikes: Array<{
/**
* Rotating (as of v2.0) identifier of a vehicle.
*/
bike_id: string;
/**
* The latitude of the vehicle.
* **Minimum**: -90
* **Maximum**: 90
*/
lat: number;
/**
* The longitude of the vehicle.
* **Minimum**: -180
* **Maximum**: 180
*/
lon: number;
/**
* Is the vehicle currently reserved?
*/
is_reserved: boolean;
/**
* Is the vehicle currently disabled (broken)?
*/
is_disabled: boolean;
/**
* Contains rental URIs for Android, iOS, and web (added in v1.1).
*/
rental_uris?: {
/**
* URI that can be passed to an Android app with an intent (added in v1.1).
* **Format**: uri
*/
android?: string;
/**
* URI that can be used on iOS to launch the rental app for this vehicle (added in v1.1).
* **Format**: uri
*/
ios?: string;
/**
* URL that can be used by a web browser to show more information about renting this vehicle (added in v1.1).
* **Format**: uri
*/
web?: string;
};
}>;
};
}
//# sourceMappingURL=freeBikeStatus.d.ts.map