UNPKG

mobility-toolbox-js

Version:

Toolbox for JavaScript applications in the domains of mobility and logistics.

144 lines (140 loc) 4.4 kB
/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { '/': { /** Returns a stop (or multiple) as GeoJSON FeatureCollection */ get: { parameters: { query: { /** Control how many matches will be returned */ limit?: number; /** Anything you'd like to search for */ q: string; /** * comma seperated list, order chooses which agency will be preferred * as ident_source (for id and code fields) */ prefagencies?: 'sbb' | 'db'; /** * comma seperated list of mot's which should be available * at the stop */ mots?: | 'bus' | 'ferry' | 'gondola' | 'tram' | 'rail' | 'funicular' | 'cable_car' | 'subway'; /** * left,bottom,right,up coordinates in WGS84 wherein the * station should lie */ bbox?: string; /** which field to look up, default: all of them */ field?: 'id' | 'name' | 'coords'; /** * Coordinates in WGS84 (in lat,lon order) used to rank stops close to * this position higher */ ref_location?: string; }; }; responses: { /** stop(s) */ 200: { schema: { /** @enum {string} */ type?: 'FeatureCollection'; features?: { /** @enum {string} */ type?: 'Feature'; properties?: { /** @description internal ID */ uid?: string; /** * @description name of the stop * @example Bern */ name?: string; /** * @description 2 letter country code where the station is located * @example CH */ country_code?: string; /** * @description how well the result matches your query, 0 * means best */ rank?: number; /** * @description array of translations of the stopname * @default [] */ translated_names?: { value?: string; /** @enum {string} */ language?: 'de' | 'en' | 'fr' | 'it'; }[]; /** @description Means of transport that are available at this station */ mot?: { bus?: boolean; ferry?: boolean; gondola?: boolean; tram?: boolean; rail?: boolean; funicular?: boolean; cable_car?: boolean; subway?: boolean; }; /** * @description source agency for id and code (see below) * @example sbb */ ident_source?: string; /** * @description uic number * @example 8507000 */ id?: string; /** * @description Abbreviation code from the transport agency (e.g. DS100 for Deutsche Bahn) * * @example BN */ code?: string; /** @description ifopt identifier, if available */ ifopt?: string; }; /** @description the coordinates of the stop */ geometry?: { /** @enum {string} */ type?: 'Point'; /** * @example [ * 7.439119, * 46.94882 * ] */ coordinates?: number[]; }; }[]; }; }; /** limit parameter too high */ 400: { schema: { /** @enum {string} */ error?: '400 Bad Request: Limit has to be an integer between 1 and 500'; }; }; }; }; }; } export interface operations {} export interface external {}