gbfs-typescript-types
Version:
Language Bindings for GBFS in Typescript.
112 lines (96 loc) • 3.29 kB
text/typescript
/**
* This module was automatically generated by `ts-interface-builder`
*/
import * as t from "ts-interface-checker";
// tslint:disable:object-literal-key-quotes
export const VehicleTypes = t.iface([], {
"data": "Data",
"last_updated": "string",
"ttl": "number",
"version": "Version",
[t.indexKey]: "any",
});
export const Data = t.iface([], {
"vehicle_types": t.array("VehicleType"),
[t.indexKey]: "any",
});
export const VehicleType = t.iface([], {
"cargo_load_capacity": t.opt("number"),
"cargo_volume_capacity": t.opt("number"),
"color": t.opt("string"),
"default_pricing_plan_id": t.opt("string"),
"default_reserve_time": t.opt("number"),
"description": t.opt(t.array("Description")),
"eco_labels": t.opt(t.array("EcoLabel")),
"form_factor": "FormFactor",
"g_CO2_km": t.opt("number"),
"make": t.opt(t.array("Make")),
"max_permitted_speed": t.opt("number"),
"max_range_meters": t.opt("number"),
"model": t.opt(t.array("Model")),
"name": t.opt(t.array("Name")),
"pricing_plan_ids": t.opt(t.array("string")),
"propulsion_type": "PropulsionType",
"rated_power": t.opt("number"),
"return_constraint": t.opt("ReturnConstraint"),
"rider_capacity": t.opt("number"),
"vehicle_accessories": t.opt(t.array("VehicleAccessory")),
"vehicle_assets": t.opt("VehicleAssets"),
"vehicle_image": t.opt("string"),
"vehicle_type_id": "string",
"wheel_count": t.opt("number"),
[t.indexKey]: "any",
});
export const Description = t.iface([], {
"language": "string",
"text": "string",
[t.indexKey]: "any",
});
export const EcoLabel = t.iface([], {
"country_code": t.opt("string"),
"eco_sticker": t.opt("string"),
[t.indexKey]: "any",
});
export const FormFactor = t.union(t.lit("bicycle"), t.lit("cargo_bicycle"), t.lit("car"), t.lit("moped"), t.lit("scooter_standing"), t.lit("scooter_seated"), t.lit("other"), t.lit("scooter"));
export const Make = t.iface([], {
"language": "string",
"text": "string",
[t.indexKey]: "any",
});
export const Model = t.iface([], {
"language": "string",
"text": "string",
[t.indexKey]: "any",
});
export const Name = t.iface([], {
"language": "string",
"text": "string",
[t.indexKey]: "any",
});
export const PropulsionType = t.union(t.lit("human"), t.lit("electric_assist"), t.lit("electric"), t.lit("combustion"), t.lit("combustion_diesel"), t.lit("hybrid"), t.lit("plug_in_hybrid"), t.lit("hydrogen_fuel_cell"));
export const ReturnConstraint = t.union(t.lit("free_floating"), t.lit("roundtrip_station"), t.lit("any_station"), t.lit("hybrid"));
export const VehicleAccessory = t.union(t.lit("air_conditioning"), t.lit("automatic"), t.lit("manual"), t.lit("convertible"), t.lit("cruise_control"), t.lit("doors_2"), t.lit("doors_3"), t.lit("doors_4"), t.lit("doors_5"), t.lit("navigation"));
export const VehicleAssets = t.iface([], {
"icon_last_modified": "string",
"icon_url": "string",
"icon_url_dark": t.opt("string"),
[t.indexKey]: "any",
});
export const Version = t.lit("3.0");
const exportedTypeSuite: t.ITypeSuite = {
VehicleTypes,
Data,
VehicleType,
Description,
EcoLabel,
FormFactor,
Make,
Model,
Name,
PropulsionType,
ReturnConstraint,
VehicleAccessory,
VehicleAssets,
Version,
};
export default exportedTypeSuite;