gbfs-typescript-types
Version:
Language Bindings for GBFS in Typescript.
52 lines (44 loc) • 1.17 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 SystemAlerts = t.iface([], {
"data": "Data",
"last_updated": "number",
"ttl": "number",
"version": "Version",
[t.indexKey]: "any",
});
export const Data = t.iface([], {
"alerts": t.array("Alert"),
[t.indexKey]: "any",
});
export const Alert = t.iface([], {
"alert_id": "string",
"description": t.opt("string"),
"last_updated": t.opt("number"),
"region_ids": t.opt(t.array("string")),
"station_ids": t.opt(t.array("string")),
"summary": "string",
"times": t.opt(t.array("Time")),
"type": "Type",
"url": t.opt("string"),
[t.indexKey]: "any",
});
export const Time = t.iface([], {
"end": t.opt("number"),
"start": t.opt("number"),
[t.indexKey]: "any",
});
export const Type = t.union(t.lit("system_closure"), t.lit("station_closure"), t.lit("station_move"), t.lit("other"));
export const Version = t.lit("2.3");
const exportedTypeSuite: t.ITypeSuite = {
SystemAlerts,
Data,
Alert,
Time,
Type,
Version,
};
export default exportedTypeSuite;