From 3169dc7efae513eeb2dc0fade7cff2a9e1a7fc33 Mon Sep 17 00:00:00 2001 From: Alessandro Kreslin Date: Wed, 25 Feb 2026 11:00:58 -0500 Subject: [PATCH 1/2] License filtering in search --- external_types/DatabaseCatalogAPI.yaml | 10 + src/app/screens/Feeds/AdvancedSearchTable.tsx | 55 +- src/app/screens/Feeds/SearchFilters.tsx | 74 + src/app/screens/Feeds/index.tsx | 39 + src/app/services/feeds/types.ts | 2940 +++++++++-------- 5 files changed, 1783 insertions(+), 1335 deletions(-) diff --git a/external_types/DatabaseCatalogAPI.yaml b/external_types/DatabaseCatalogAPI.yaml index 162fc348..abc315cd 100644 --- a/external_types/DatabaseCatalogAPI.yaml +++ b/external_types/DatabaseCatalogAPI.yaml @@ -338,6 +338,7 @@ paths: - $ref: "#/components/parameters/version_query_param" - $ref: "#/components/parameters/search_text_query_param" - $ref: "#/components/parameters/feature" + - $ref: "#/components/parameters/license_ids_query_param" security: - Authentication: [] responses: @@ -1793,6 +1794,15 @@ components: type: string example: 2.3 + license_ids_query_param: + name: license_ids + in: query + description: Comma separated list of license IDs to filter by. + required: False + schema: + type: string + example: CC-BY-4.0,CC0-1.0 + securitySchemes: Authentication: $ref: "./BearerTokenSchema.yaml#/components/securitySchemes/Authentication" diff --git a/src/app/screens/Feeds/AdvancedSearchTable.tsx b/src/app/screens/Feeds/AdvancedSearchTable.tsx index e999b9c4..71173881 100644 --- a/src/app/screens/Feeds/AdvancedSearchTable.tsx +++ b/src/app/screens/Feeds/AdvancedSearchTable.tsx @@ -31,6 +31,43 @@ export interface AdvancedSearchTableProps { selectedGbfsVersions: string[] | undefined; } +interface DetailsContainerProps { + children: React.ReactNode; + feedSearchItem: SearchFeedItem; +} + +const DetailsContainer = ({ + children, + feedSearchItem, +}: DetailsContainerProps): React.ReactElement => { + return ( + + {children} + + + {feedSearchItem.source_info?.license_id} + + + + ); +}; + const renderGTFSDetails = ( gtfsFeed: SearchFeedItem, selectedFeatures: string[], @@ -39,7 +76,7 @@ const renderGTFSDetails = ( const feedFeatures = gtfsFeed?.latest_dataset?.validation_report?.features ?? []; return ( - <> + {gtfsFeed?.feed_name != null && ( - + ); }; @@ -83,10 +120,12 @@ const renderGTFSRTDetails = ( gtfsRtFeed: SearchFeedItem, ): React.ReactElement => { return ( - + + + ); }; @@ -96,7 +135,7 @@ const renderGBFSDetails = ( ): React.ReactElement => { const theme = useTheme(); return ( - + {gbfsFeedSearchElement.versions?.map((version: string, index: number) => ( ))} - + ); }; diff --git a/src/app/screens/Feeds/SearchFilters.tsx b/src/app/screens/Feeds/SearchFilters.tsx index 11913f3d..393aeca9 100644 --- a/src/app/screens/Feeds/SearchFilters.tsx +++ b/src/app/screens/Feeds/SearchFilters.tsx @@ -27,10 +27,12 @@ interface SearchFiltersProps { isOfficialFeedSearch: boolean; selectedFeatures: string[]; selectedGbfsVersions: string[]; + selectedLicenses: string[]; setSelectedFeedTypes: (selectedFeedTypes: Record) => void; setIsOfficialFeedSearch: (isOfficialFeedSearch: boolean) => void; setSelectedFeatures: (selectedFeatures: string[]) => void; setSelectedGbfsVerions: (selectedVersions: string[]) => void; + setSelectedLicenses: (selectedLicenses: string[]) => void; isOfficialTagFilterEnabled: boolean; areFeatureFiltersEnabled: boolean; areGBFSFiltersEnabled: boolean; @@ -41,10 +43,12 @@ export function SearchFilters({ isOfficialFeedSearch, selectedFeatures, selectedGbfsVersions, + selectedLicenses, setSelectedFeedTypes, setIsOfficialFeedSearch, setSelectedFeatures, setSelectedGbfsVerions, + setSelectedLicenses, isOfficialTagFilterEnabled, areFeatureFiltersEnabled, areGBFSFiltersEnabled, @@ -61,6 +65,7 @@ export function SearchFilters({ features: areFeatureFiltersEnabled, tags: isOfficialTagFilterEnabled, gbfsVersions: true, + licenses: true, }); const [featureCheckboxData, setFeatureCheckboxData] = useState< CheckboxStructure[] @@ -279,6 +284,75 @@ export function SearchFilters({ > + + { + setExpandedCategories({ + ...expandedCategories, + licenses: !expandedCategories.licenses, + }); + }} + > + } + aria-controls='panel-licenses-content' + sx={{ + px: 0, + }} + > + Licenses + + + { + const selectedLicenseIds: string[] = []; + checkboxData.forEach((checkbox) => { + if (checkbox.checked) { + selectedLicenseIds.push(checkbox.title); + } + }); + setSelectedLicenses([...selectedLicenseIds]); + }} + > + + ); } diff --git a/src/app/screens/Feeds/index.tsx b/src/app/screens/Feeds/index.tsx index a1099545..316b5cf4 100644 --- a/src/app/screens/Feeds/index.tsx +++ b/src/app/screens/Feeds/index.tsx @@ -69,6 +69,9 @@ export default function Feed(): React.ReactElement { const [selectGbfsVersions, setSelectGbfsVersions] = useState( searchParams.get('gbfs_versions')?.split(',') ?? [], ); + const [selectedLicenses, setSelectedLicenses] = useState( + searchParams.get('licenses')?.split(',') ?? [], + ); const [activePagination, setActivePagination] = useState( searchParams.get('o') !== null ? Number(searchParams.get('o')) : 1, ); @@ -130,6 +133,10 @@ export default function Feed(): React.ReactElement { version: areGBFSFiltersEnabled ? selectGbfsVersions.join(',').replaceAll('v', '') : undefined, + license_ids: + selectedLicenses.length > 0 + ? selectedLicenses.join(',') + : undefined, }, }, }), @@ -143,6 +150,7 @@ export default function Feed(): React.ReactElement { isOfficialFeedSearch, selectedFeatures, selectGbfsVersions, + selectedLicenses, ]); useEffect(() => { @@ -169,6 +177,9 @@ export default function Feed(): React.ReactElement { if (selectGbfsVersions.length > 0) { newSearchParams.set('gbfs_versions', selectGbfsVersions.join(',')); } + if (selectedLicenses.length > 0) { + newSearchParams.set('licenses', selectedLicenses.join(',')); + } if (isOfficialFeedSearch) { newSearchParams.set('official', 'true'); } @@ -187,6 +198,7 @@ export default function Feed(): React.ReactElement { selectedFeedTypes, selectedFeatures, selectGbfsVersions, + selectedLicenses, isOfficialFeedSearch, ]); @@ -214,6 +226,11 @@ export default function Feed(): React.ReactElement { setSelectGbfsVersions([...newGbfsVersions]); } + const newLicenses = searchParams.get('licenses')?.split(',') ?? []; + if (newLicenses.join(',') !== selectedLicenses.join(',')) { + setSelectedLicenses([...newLicenses]); + } + const newSearchOfficial = Boolean(searchParams.get('official')) ?? false; if (newSearchOfficial !== isOfficialFeedSearch) { setIsOfficialFeedSearch(newSearchOfficial); @@ -265,6 +282,7 @@ export default function Feed(): React.ReactElement { }); setSelectedFeatures([]); setSelectGbfsVersions([]); + setSelectedLicenses([]); setIsOfficialFeedSearch(false); } @@ -400,6 +418,7 @@ export default function Feed(): React.ReactElement { isOfficialFeedSearch={isOfficialFeedSearch} selectedFeatures={selectedFeatures} selectedGbfsVersions={selectGbfsVersions} + selectedLicenses={selectedLicenses} setSelectedFeedTypes={(feedTypes) => { setActivePagination(1); setSelectedFeedTypes({ ...feedTypes }); @@ -416,6 +435,10 @@ export default function Feed(): React.ReactElement { setSelectGbfsVersions(versions); setActivePagination(1); }} + setSelectedLicenses={(licenses) => { + setActivePagination(1); + setSelectedLicenses(licenses); + }} isOfficialTagFilterEnabled={isOfficialTagFilterEnabled} areFeatureFiltersEnabled={areFeatureFiltersEnabled} areGBFSFiltersEnabled={areGBFSFiltersEnabled} @@ -515,8 +538,24 @@ export default function Feed(): React.ReactElement { /> ))} + {selectedLicenses.map((license) => ( + { + setSelectedLicenses([ + ...selectedLicenses.filter((sl) => sl !== license), + ]); + }} + /> + ))} + {(selectedFeatures.length > 0 || selectGbfsVersions.length > 0 || + selectedLicenses.length > 0 || isOfficialFeedSearch || selectedFeedTypes.gtfs_rt || selectedFeedTypes.gtfs || diff --git a/src/app/services/feeds/types.ts b/src/app/services/feeds/types.ts index c38b3f57..7eaa92fc 100644 --- a/src/app/services/feeds/types.ts +++ b/src/app/services/feeds/types.ts @@ -4,1384 +4,1670 @@ */ export interface paths { - '/v1/feeds': { - /** @description Get some (or all) feeds from the Mobility Database. The items are sorted by provider in alphabetical ascending order. */ - get: operations['getFeeds']; - }; - '/v1/feeds/{id}': { - /** @description Get the specified feed from the Mobility Database. */ - get: operations['getFeed']; - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - }; - '/v1/gtfs_feeds': { - /** @description Get some (or all) GTFS feeds from the Mobility Database. */ - get: operations['getGtfsFeeds']; - }; - '/v1/gtfs_rt_feeds': { - /** @description Get some (or all) GTFS Realtime feeds from the Mobility Database. */ - get: operations['getGtfsRtFeeds']; - }; - '/v1/gbfs_feeds': { - /** @description Get GBFS feeds from the Mobility Database. */ - get: operations['getGbfsFeeds']; - }; - '/v1/gtfs_feeds/{id}': { - /** @description Get the specified GTFS feed from the Mobility Database. Once a week, we check if the latest dataset has been updated and, if so, we update it in our system accordingly. */ - get: operations['getGtfsFeed']; - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - }; - '/v1/gtfs_rt_feeds/{id}': { - /** @description Get the specified GTFS Realtime feed from the Mobility Database. */ - get: operations['getGtfsRtFeed']; - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - }; - '/v1/gbfs_feeds/{id}': { - /** @description Get the specified GBFS feed from the Mobility Database. */ - get: operations['getGbfsFeed']; - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - }; - '/v1/gtfs_feeds/{id}/datasets': { - /** @description Get a list of datasets associated with a GTFS feed. Once a day, we check whether the latest dataset has changed; if it has, we update it in our system. The list is sorted from newest to oldest. */ - get: operations['getGtfsFeedDatasets']; - parameters: { - path: { - id: components['parameters']['feed_id_of_datasets_path_param']; - }; - }; - }; - '/v1/gtfs_feeds/{id}/gtfs_rt_feeds': { - /** @description Get a list of GTFS Realtime related to a GTFS feed. */ - get: operations['getGtfsFeedGtfsRtFeeds']; - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - }; - '/v1/datasets/gtfs/{id}': { - /** @description Get the specified dataset from the Mobility Database. */ - get: operations['getDatasetGtfs']; - }; - '/v1/metadata': { - /** @description Get metadata about this API. */ - get: operations['getMetadata']; - }; - '/v1/search': { - /** - * @description Search feeds on feed name, location and provider's information. - *
- * The current implementation leverages the text search functionalities from [PostgreSQL](https://www.postgresql.org/docs/current/textsearch-controls.html), in particulary `plainto_tsquery`. - *

- * Points to consider while using search endpoint: - *
- * - Operators are not currently supported. Operators are ignored as stop-words. - * - Search is based on lexemes(English) and case insensitive. The search_text_query_param is parsed and normalized much as for to_tsvector, then the & (AND) tsquery operator is inserted between surviving words. - * - The search will match all the lexemes with an AND operator. So, all lexemes must be present in the document. - * - Our current implementation only creates English lexemes. We are currently considering adding support to more languages. - * - The order of the words is not relevant for matching. The query __New York__ should give you the same results as __York New__. - *

- * Example: - *
- * Query: New York Transit - *
- * Search Executed: 'new' & york & 'transit' - *
- */ - get: operations['searchFeeds']; - }; - '/v1/licenses': { - /** @description Get the list of all licenses in the DB. */ - get: operations['getLicenses']; - }; - '/v1/licenses/{id}': { - /** @description Get the specified license from the Mobility Database, including the license rules. */ - get: operations['getLicense']; - parameters: { - path: { - id: components['parameters']['license_id_path_param']; - }; + "/v1/feeds": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get some (or all) feeds from the Mobility Database. The items are sorted by provider in alphabetical ascending order. */ + get: operations["getFeeds"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; - '/v1/licenses:match': { - /** @description Get the list of matching licenses based on the provided license URL */ - post: operations['getMatchingLicenses']; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - Redirect: { - /** - * @description The feed ID that should be used in replacement of the current one. - * @example mdb-10 - */ - target_id?: string; - /** - * @description A comment explaining the redirect. - * @example Redirected because of a change of URL. - */ - comment?: string; + "/v1/feeds/{id}": { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + /** @description Get the specified feed from the Mobility Database. */ + get: operations["getFeed"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - BasicFeed: { - /** - * @description Unique identifier used as a key for the feeds table. - * @example mdb-1210 - */ - id?: string; - /** - * @example gtfs - * @enum {string} - */ - data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; - /** - * Format: date-time - * @description The date and time the feed was added to the database, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - created_at?: string; - /** - * @description The ID that can be use to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- */ - external_ids?: components['schemas']['ExternalIds']; - /** - * @description A commonly used name for the transit provider included in the feed. - * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) - */ - provider?: string; - /** - * @description Use to contact the feed producer. - * @example someEmail@ladotbus.com - */ - feed_contact_email?: string; - source_info?: components['schemas']['SourceInfo']; - redirects?: Array; + "/v1/gtfs_feeds": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get some (or all) GTFS feeds from the Mobility Database. */ + get: operations["getGtfsFeeds"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - Feed: components['schemas']['BasicFeed'] & { - /** - * @description Describes status of the Feed. Should be one of - * * `active` Feed should be used in public trip planners. - * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. - * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. - * * `development` Feed is being used for development purposes and should not be used in public trip planners. - * * `future` Feed is not yet active but will be in the future. - * - * @example deprecated - * @enum {string} - */ - status?: 'active' | 'deprecated' | 'inactive' | 'development' | 'future'; - /** - * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. - * - * @example true - */ - official?: boolean; - /** - * Format: date-time - * @description The date and time the official status was last updated, in ISO 8601 date-time format. - * - * @example "2023-07-10T22:06:00.000Z" - */ - official_updated_at?: string; - /** - * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. - * - * @example Bus - */ - feed_name?: string; - /** @description A note to clarify complex use cases for consumers. */ - note?: string; - /** @description A list of related links for the feed. */ - related_links?: Array; + "/v1/gtfs_rt_feeds": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get some (or all) GTFS Realtime feeds from the Mobility Database. */ + get: operations["getGtfsRtFeeds"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - FeedRelatedLink: { - /** - * @description A short code to identify the type of link. - * - * @example next_1 - */ - code?: string; - /** - * @description A description of the link. - * - * @example The URL for a future feed version with an upcoming service period. - */ - description?: string; - /** - * Format: url - * @description The URL of the related link. - */ - url?: string; - /** - * Format: date-time - * @description The date and time the related link was created, in ISO 8601 date-time format. - * - * @example "2023-07-10T22:06:00.000Z" - */ - created_at?: string; + "/v1/gbfs_feeds": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get GBFS feeds from the Mobility Database. */ + get: operations["getGbfsFeeds"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - GtfsFeed: components['schemas']['Feed'] & { - /** - * @example gtfs - * @enum {string} - */ - data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; - locations?: components['schemas']['Locations']; - latest_dataset?: components['schemas']['LatestDataset']; - bounding_box?: components['schemas']['BoundingBox']; - /** - * @description The dataset ID of the dataset used to compute the visualization files. - * - * @example mdb-1210-202402121801 - */ - visualization_dataset_id?: string; + "/v1/gtfs_feeds/{id}": { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + /** @description Get the specified GTFS feed from the Mobility Database. Once a week, we check if the latest dataset has been updated and, if so, we update it in our system accordingly. */ + get: operations["getGtfsFeed"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - GbfsFeed: components['schemas']['BasicFeed'] & { - /** - * @example gbfs - * @enum {string} - */ - data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; - locations?: components['schemas']['Locations']; - /** - * @description The system ID of the feed. This is a unique identifier for the system that the feed belongs to. - * - * @example system-1234 - */ - system_id?: string; - /** - * Format: url - * @description The URL of the provider's website. This is the website of the organization that operates the system that the feed belongs to. - * - * @example https://www.citybikenyc.com/ - */ - provider_url?: string; - /** @description A list of GBFS versions that the feed supports. Each version is represented by its version number and a list of endpoints. */ - versions?: Array; - bounding_box?: components['schemas']['BoundingBox']; - /** - * Format: date-time - * @description The date and time the bounding box was generated, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - bounding_box_generated_at?: string; + "/v1/gtfs_rt_feeds/{id}": { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + /** @description Get the specified GTFS Realtime feed from the Mobility Database. */ + get: operations["getGtfsRtFeed"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - GbfsVersion: { - /** - * @description The version of the GBFS specification that the feed is using. This is a string that follows the semantic versioning format. - * - * @example 2.3 - */ - version?: string; - /** - * Format: date-time - * @description The date when the GBFS version was saved to the database. - * - * @example "2023-07-10T22:06:00.000Z" - */ - created_at?: string; - /** - * Format: date-time - * @description The date when the GBFS version was last updated in the database. - * - * @example "2023-07-10T22:06:00.000Z" - */ - last_updated_at?: string; - /** - * @description Indicates the origin of the version information. Possible values are: - * * `autodiscovery`: Retrieved directly from the main GBFS autodiscovery URL. - * * `gbfs_versions`: Retrieved from the `gbfs_versions` endpoint. - * - * @enum {string} - */ - source?: 'autodiscovery' | 'gbfs_versions'; - /** @description A list of endpoints that are available in the version. */ - endpoints?: Array; - latest_validation_report?: components['schemas']['GbfsValidationReport']; + "/v1/gbfs_feeds/{id}": { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + /** @description Get the specified GBFS feed from the Mobility Database. */ + get: operations["getGbfsFeed"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - /** @description A validation report of the GBFS feed. */ - GbfsValidationReport: { - /** - * Format: date-time - * @description The date and time the GBFS feed was validated, in ISO 8601 date-time format. - * - * @example "2023-07-10T22:06:00.000Z" - */ - validated_at?: string; - /** @example 10 */ - total_error?: number; - /** - * Format: url - * @description The URL of the JSON report of the validation summary. - * - * @example https://storage.googleapis.com/mobilitydata-datasets-prod/validation-reports/gbfs-1234-202402121801.json - */ - report_summary_url?: string; - /** - * @description The version of the validator used to validate the GBFS feed. - * - * @example 1.0.13 - */ - validator_version?: string; + "/v1/gtfs_feeds/{id}/datasets": { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the feed for which to obtain datasets. */ + id: components["parameters"]["feed_id_of_datasets_path_param"]; + }; + cookie?: never; + }; + /** @description Get a list of datasets associated with a GTFS feed. Once a day, we check whether the latest dataset has changed; if it has, we update it in our system. The list is sorted from newest to oldest. */ + get: operations["getGtfsFeedDatasets"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - GbfsEndpoint: { - /** - * @description The name of the endpoint. This is a human-readable name for the endpoint. - * - * @example system_information - */ - name?: string; - /** - * Format: url - * @description The URL of the endpoint. This is the URL where the endpoint can be accessed. - * - * @example https://gbfs.citibikenyc.com/gbfs/system_information.json - */ - url?: string; - /** - * @description The language of the endpoint. This is the language that the endpoint is available in for versions 2.3 and prior. - * - * @example en - */ - language?: string; - /** - * @description A boolean value indicating if the endpoint is a feature. A feature is defined as an optionnal endpoint. - * - * @example false - */ - is_feature?: boolean; + "/v1/gtfs_feeds/{id}/gtfs_rt_feeds": { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + /** @description Get a list of GTFS Realtime related to a GTFS feed. */ + get: operations["getGtfsFeedGtfsRtFeeds"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - GbfsFeeds: Array; - GtfsRTFeed: components['schemas']['Feed'] & { - /** - * @example gtfs_rt - * @enum {string} - */ - data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; - entity_types?: Array<'vp' | 'tu' | 'sa'>; - /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ - feed_references?: string[]; - locations?: components['schemas']['Locations']; + "/v1/datasets/gtfs/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get the specified dataset from the Mobility Database. */ + get: operations["getDatasetGtfs"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - SearchFeedItemResult: { - /** - * @description Unique identifier used as a key for the feeds table. - * @example mdb-1210 - */ - id: string; - /** - * @example gtfs - * @enum {string} - */ - data_type: 'gtfs' | 'gtfs_rt' | 'gbfs'; - /** - * @description Describes status of the Feed. Should be one of - * * `active` Feed should be used in public trip planners. - * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. - * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. - * * `development` Feed is being used for development purposes and should not be used in public trip planners. - * * `future` Feed is not yet active but will be in the future. - * - * @example deprecated - * @enum {string} - */ - status: 'active' | 'deprecated' | 'inactive' | 'development' | 'future'; - /** - * Format: date-time - * @description The date and time the feed was added to the database, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - created_at?: string; - /** - * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. - * - * @example true - */ - official?: boolean; - /** - * @description The ID that can be use to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- */ - external_ids?: components['schemas']['ExternalIds']; - /** - * @description A commonly used name for the transit provider included in the feed. - * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) - */ - provider?: string; - /** - * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. - * - * @example Bus - */ - feed_name?: string; - /** @description A note to clarify complex use cases for consumers. */ - note?: string; - /** - * @description Use to contact the feed producer. - * @example someEmail@ladotbus.com - */ - feed_contact_email?: string; - source_info?: components['schemas']['SourceInfo']; - redirects?: Array; - locations?: components['schemas']['Locations']; - latest_dataset?: components['schemas']['LatestDataset']; - entity_types?: Array<'vp' | 'tu' | 'sa'>; - /** @description The supported versions of the GBFS feed. */ - versions?: string[]; - /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ - feed_references?: string[]; + "/v1/metadata": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get metadata about this API. */ + get: operations["getMetadata"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - Feeds: Array; - GtfsFeeds: Array; - GtfsRTFeeds: Array; - LatestDataset: { - /** - * @description Identifier of the latest dataset for this feed. - * @example mdb-1210-202402121801 - */ - id?: string; - /** - * Format: url - * @description As a convenience, the URL of the latest uploaded dataset hosted by MobilityData. It should be the same URL as the one found in the latest dataset id dataset. An alternative way to find this is to use the latest dataset id to obtain the dataset and then use its hosted_url. - * - * @example https://storage.googleapis.com/mobilitydata-datasets-prod/mdb-1210/mdb-1210-202402121801/mdb-1210-202402121801.zip - */ - hosted_url?: string; - bounding_box?: components['schemas']['BoundingBox']; - /** - * Format: date-time - * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - downloaded_at?: string; - /** - * @description A hash of the dataset. - * @example ad3805c4941cd37881ff40c342e831b5f5224f3d8a9a2ec3ac197d3652c78e42 - */ - hash?: string; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. - * @example "2023-07-10T06:00:00.000Z" - */ - service_date_range_start?: string; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. - * @example 2023-07-10T05:59:59+00Z - */ - service_date_range_end?: string; - /** - * @description The timezone of the agency. - * @example America/Los_Angeles - */ - agency_timezone?: string; - /** - * @description The size of the zipped folder in MB. - * @example 100.2 - */ - zipped_folder_size_mb?: number; - /** - * @description The size of the unzipped folder in MB. - * @example 200.5 - */ - unzipped_folder_size_mb?: number; - validation_report?: { + "/v1/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; /** - * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview - * @example [ - * "Shapes", - * "Headsigns", - * "Wheelchair Accessibility" - * ] + * @description Search feeds on feed name, location and provider's information. + *
+ * The current implementation leverages the text search functionalities from [PostgreSQL](https://www.postgresql.org/docs/current/textsearch-controls.html), in particulary `plainto_tsquery`. + *

+ * Points to consider while using search endpoint: + *
+ * - Operators are not currently supported. Operators are ignored as stop-words. + * - Search is based on lexemes(English) and case insensitive. The search_text_query_param is parsed and normalized much as for to_tsvector, then the & (AND) tsquery operator is inserted between surviving words. + * - The search will match all the lexemes with an AND operator. So, all lexemes must be present in the document. + * - Our current implementation only creates English lexemes. We are currently considering adding support to more languages. + * - The order of the words is not relevant for matching. The query __New York__ should give you the same results as __York New__. + *

+ * Example: + *
+ * Query: New York Transit + *
+ * Search Executed: 'new' & york & 'transit' + *
*/ - features?: string[]; - /** @example 10 */ - total_error?: number; - /** @example 20 */ - total_warning?: number; - /** @example 30 */ - total_info?: number; - /** @example 1 */ - unique_error_count?: number; - /** @example 2 */ - unique_warning_count?: number; - /** @example 3 */ - unique_info_count?: number; - }; - }; - /** - * @description The ID that can be use to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- */ - ExternalIds: Array; - ExternalId: { - /** - * @description The ID that can be used to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- * - * @example 1210 - */ - external_id?: string; - /** - * @description The source of the external ID, e.g. the name of the database where the external ID can be used. - * @example mdb - */ - source?: string; - }; - SourceInfo: { - /** - * Format: url - * @description URL where the producer is providing the dataset. Refer to the authentication information to know how to access this URL. - * - * @example https://ladotbus.com/gtfs - */ - producer_url?: string; - /** - * @description Defines the type of authentication required to access the `producer_url`. Valid values for this field are: - * * 0 or (empty) - No authentication required. - * * 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information. - * * 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request. - * When not provided, the authentication type is assumed to be 0. - * - * @example 2 - * @enum {integer} - */ - authentication_type?: 0 | 1 | 2; - /** - * Format: url - * @description Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for `authentication_type=1` and `authentication_type=2`. - * - * @example https://apidevelopers.ladottransit.com - */ - authentication_info_url?: string; - /** - * @description Defines the name of the parameter to pass in the URL to provide the API key. This field is required for `authentication_type=1` and `authentication_type=2`. - * - * @example Ocp-Apim-Subscription-Key - */ - api_key_parameter_name?: string; - /** - * Format: url - * @description A URL where to find the license for the feed. - * @example https://www.ladottransit.com/dla.html - */ - license_url?: string; - /** - * @description Id of the feed license that can be used to query the license endpoint. - * @example 0BSD - */ - license_id?: string; - /** - * @description true if the license is SPDX. false if not. - * @example true - */ - license_is_spdx?: boolean; - /** - * @description Notes concerning the relation between the feed and the license. - * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. - */ - license_notes?: string; + get: operations["searchFeeds"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - Locations: Array; - Location: { - /** - * @description ISO 3166-1 alpha-2 code designating the country where the system is located. For a list of valid codes [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). - * - * @example US - */ - country_code?: string; - /** - * @description The english name of the country where the system is located. - * @example United States - */ - country?: string; - /** - * @description ISO 3166-2 english subdivision name designating the subdivision (e.g province, state, region) where the system is located. For a list of valid names [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). - * - * @example California - */ - subdivision_name?: string; - /** - * @description Primary municipality in english in which the transit system is located. - * @example Los Angeles - */ - municipality?: string; - }; - BasicDataset: { - /** - * @description Unique identifier used as a key for the datasets table. - * @example mdb-10-202402080058 - */ - id?: string; - /** - * @description ID of the feed related to this dataset. - * @example mdb-10 - */ - feed_id?: string; - }; - GtfsDataset: components['schemas']['BasicDataset'] & { - /** - * @description The URL of the dataset data as hosted by MobilityData. No authentication required. - * @example https://storage.googleapis.com/storage/v1/b/mdb-latest/o/us-maine-casco-bay-lines-gtfs-1.zip?alt=media - */ - hosted_url?: string; - /** @description A note to clarify complex use cases for consumers. */ - note?: string; - /** - * Format: date-time - * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - downloaded_at?: string; - /** - * @description A hash of the dataset. - * @example 6497e85e34390b8b377130881f2f10ec29c18a80dd6005d504a2038cdd00aa71 - */ - hash?: string; - bounding_box?: components['schemas']['BoundingBox']; - validation_report?: components['schemas']['ValidationReport']; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. - * @example "2023-07-10T06:00:00.000Z" - */ - service_date_range_start?: string; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. - * @example 2023-07-10T05:59:59+00Z - */ - service_date_range_end?: string; - /** - * @description The timezone of the agency. - * @example America/Los_Angeles - */ - agency_timezone?: string; - /** - * @description The size of the zipped folder in MB. - * @example 100.2 - */ - zipped_folder_size_mb?: number; - /** - * @description The size of the unzipped folder in MB. - * @example 200.5 - */ - unzipped_folder_size_mb?: number; - }; - /** @description Bounding box of the dataset when it was first added to the catalog. */ - BoundingBox: { - /** - * @description The minimum latitude for the dataset bounding box. - * @example 33.721601 - */ - minimum_latitude?: number; - /** - * @description The maximum latitude for the dataset bounding box. - * @example 34.323077 - */ - maximum_latitude?: number; - /** - * @description The minimum longitude for the dataset bounding box. - * @example -118.882829 - */ - minimum_longitude?: number; - /** - * @description The maximum longitude for the dataset bounding box. - * @example -118.131748 - */ - maximum_longitude?: number; - }; - GtfsDatasets: Array; - Metadata: { - /** @example 1.0.0 */ - version?: string; - /** @example 8635fdac4fbff025b4eaca6972fcc9504bc1552d */ - commit_hash?: string; - }; - /** @description Validation report */ - ValidationReport: { - /** - * Format: date-time - * @description The date and time the report was generated, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - validated_at?: string; - /** - * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview - * @example [ - * "Shapes", - * "Headsigns", - * "Wheelchair Accessibility" - * ] - */ - features?: string[]; - /** @example 4.2.0 */ - validator_version?: string; - /** @example 10 */ - total_error?: number; - /** @example 20 */ - total_warning?: number; - /** @example 30 */ - total_info?: number; - /** @example 1 */ - unique_error_count?: number; - /** @example 2 */ - unique_warning_count?: number; - /** @example 3 */ - unique_info_count?: number; - /** - * Format: url - * @description JSON validation report URL - * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.json - */ - url_json?: string; - /** - * Format: url - * @description HTML validation report URL - * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.html - */ - url_html?: string; + "/v1/licenses": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get the list of all licenses in the DB. */ + get: operations["getLicenses"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - LicenseRule: { - /** - * @description Name of the rule. - * @example commercial-use - */ - name?: string; - /** - * @description Label of the rule. - * @example Commercial use - */ - label?: string; - /** - * @description Description of the rule. - * @example This license allows the software or data to be used for commercial purposes. - */ - description?: string; - /** - * @description Type of rule. - * @enum {string} - */ - type?: 'permission' | 'condition' | 'limitation'; + "/v1/licenses/{id}": { + parameters: { + query?: never; + header?: never; + path: { + /** @description The license ID of the requested license. */ + id: components["parameters"]["license_id_path_param"]; + }; + cookie?: never; + }; + /** @description Get the specified license from the Mobility Database, including the license rules. */ + get: operations["getLicense"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - LicenseBase: { - /** - * @description Unique identifier for the license. - * @example 0BSD - */ - id?: string; - /** - * @description The type of license. - * @example standard - */ - type?: string; - /** @description true if license id spdx. */ - is_spdx?: boolean; - /** - * @description The user facing name of the license. - * @example BSD Zero Clause License - */ - name?: string; - /** - * Format: url - * @description A URL where to find the license for the feed. - * @example https://www.ladottransit.com/dla.html - */ - url?: string; - /** - * @description The description of the license. - * @example This is the 0BSD license. - */ - description?: string; - /** - * Format: date-time - * @description The date and time the license was added to the database, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - created_at?: string; - /** - * Format: date-time - * @description The last date and time the license was updated in the database, in ISO 8601 date-time format. - * @example "2023-07-10T22:06:00.000Z" - */ - updated_at?: string; + "/v1/licenses:match": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Get the list of matching licenses based on the provided license URL */ + post: operations["getMatchingLicenses"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - LicenseWithRules: components['schemas']['LicenseBase'] & { - license_rules?: Array; +} +export type webhooks = Record; +export interface components { + schemas: { + Redirect: { + /** + * @description The feed ID that should be used in replacement of the current one. + * @example mdb-10 + */ + target_id?: string; + /** + * @description A comment explaining the redirect. + * @example Redirected because of a change of URL. + */ + comment?: string; + }; + BasicFeed: { + /** + * @description Unique identifier used as a key for the feeds table. + * @example mdb-1210 + */ + id?: string; + /** + * @example gtfs + * @enum {string} + */ + data_type?: "gtfs" | "gtfs_rt" | "gbfs"; + /** + * Format: date-time + * @description The date and time the feed was added to the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * @description The ID that can be use to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ */ + external_ids?: components["schemas"]["ExternalIds"]; + /** + * @description A commonly used name for the transit provider included in the feed. + * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) + */ + provider?: string; + /** + * @description Use to contact the feed producer. + * @example someEmail@ladotbus.com + */ + feed_contact_email?: string; + source_info?: components["schemas"]["SourceInfo"]; + redirects?: components["schemas"]["Redirect"][]; + }; + Feed: components["schemas"]["BasicFeed"] & Omit<{ + /** + * @description Describes status of the Feed. Should be one of + * * `active` Feed should be used in public trip planners. + * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. + * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. + * * `development` Feed is being used for development purposes and should not be used in public trip planners. + * * `future` Feed is not yet active but will be in the future. + * @example deprecated + * @enum {string} + */ + status?: "active" | "deprecated" | "inactive" | "development" | "future"; + /** + * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. + * @example true + */ + official?: boolean; + /** + * Format: date-time + * @description The date and time the official status was last updated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + official_updated_at?: string; + /** + * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. + * @example Bus + */ + feed_name?: string; + /** @description A note to clarify complex use cases for consumers. */ + note?: string; + /** @description A list of related links for the feed. */ + related_links?: components["schemas"]["FeedRelatedLink"][]; + }, "data_type">; + FeedRelatedLink: { + /** + * @description A short code to identify the type of link. + * @example next_1 + */ + code?: string; + /** + * @description A description of the link. + * @example The URL for a future feed version with an upcoming service period. + */ + description?: string; + /** + * Format: url + * @description The URL of the related link. + */ + url?: string; + /** + * Format: date-time + * @description The date and time the related link was created, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + }; + GtfsFeed: components["schemas"]["Feed"] & { + /** + * @example gtfs + * @enum {string} + */ + data_type?: "gtfs" | "gtfs_rt" | "gbfs"; + locations?: components["schemas"]["Locations"]; + latest_dataset?: components["schemas"]["LatestDataset"]; + bounding_box?: components["schemas"]["BoundingBox"]; + /** + * @description The dataset ID of the dataset used to compute the visualization files. + * @example mdb-1210-202402121801 + */ + visualization_dataset_id?: string; + }; + GbfsFeed: components["schemas"]["BasicFeed"] & { + /** + * @example gbfs + * @enum {string} + */ + data_type?: "gtfs" | "gtfs_rt" | "gbfs"; + locations?: components["schemas"]["Locations"]; + /** + * @description The system ID of the feed. This is a unique identifier for the system that the feed belongs to. + * @example system-1234 + */ + system_id?: string; + /** + * Format: url + * @description The URL of the provider's website. This is the website of the organization that operates the system that the feed belongs to. + * @example https://www.citybikenyc.com/ + */ + provider_url?: string; + /** @description A list of GBFS versions that the feed supports. Each version is represented by its version number and a list of endpoints. */ + versions?: components["schemas"]["GbfsVersion"][]; + bounding_box?: components["schemas"]["BoundingBox"]; + /** + * Format: date-time + * @description The date and time the bounding box was generated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + bounding_box_generated_at?: string; + }; + GbfsVersion: { + /** + * @description The version of the GBFS specification that the feed is using. This is a string that follows the semantic versioning format. + * @example 2.3 + */ + version?: string; + /** + * Format: date-time + * @description The date when the GBFS version was saved to the database. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * Format: date-time + * @description The date when the GBFS version was last updated in the database. + * @example 2023-07-10T22:06:00Z + */ + last_updated_at?: string; + /** + * @description Indicates the origin of the version information. Possible values are: + * * `autodiscovery`: Retrieved directly from the main GBFS autodiscovery URL. + * * `gbfs_versions`: Retrieved from the `gbfs_versions` endpoint. + * @enum {string} + */ + source?: "autodiscovery" | "gbfs_versions"; + /** @description A list of endpoints that are available in the version. */ + endpoints?: components["schemas"]["GbfsEndpoint"][]; + latest_validation_report?: components["schemas"]["GbfsValidationReport"]; + }; + /** @description A validation report of the GBFS feed. */ + GbfsValidationReport: { + /** + * Format: date-time + * @description The date and time the GBFS feed was validated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + validated_at?: string; + /** @example 10 */ + total_error?: number; + /** + * Format: url + * @description The URL of the JSON report of the validation summary. + * @example https://storage.googleapis.com/mobilitydata-datasets-prod/validation-reports/gbfs-1234-202402121801.json + */ + report_summary_url?: string; + /** + * @description The version of the validator used to validate the GBFS feed. + * @example 1.0.13 + */ + validator_version?: string; + }; + GbfsEndpoint: { + /** + * @description The name of the endpoint. This is a human-readable name for the endpoint. + * @example system_information + */ + name?: string; + /** + * Format: url + * @description The URL of the endpoint. This is the URL where the endpoint can be accessed. + * @example https://gbfs.citibikenyc.com/gbfs/system_information.json + */ + url?: string; + /** + * @description The language of the endpoint. This is the language that the endpoint is available in for versions 2.3 and prior. + * @example en + */ + language?: string; + /** + * @description A boolean value indicating if the endpoint is a feature. A feature is defined as an optionnal endpoint. + * @example false + */ + is_feature?: boolean; + }; + GbfsFeeds: components["schemas"]["GbfsFeed"][]; + GtfsRTFeed: components["schemas"]["Feed"] & { + /** + * @example gtfs_rt + * @enum {string} + */ + data_type?: "gtfs" | "gtfs_rt" | "gbfs"; + entity_types?: ("vp" | "tu" | "sa")[]; + /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ + feed_references?: string[]; + locations?: components["schemas"]["Locations"]; + }; + SearchFeedItemResult: { + /** + * @description Unique identifier used as a key for the feeds table. + * @example mdb-1210 + */ + id: string; + /** + * @example gtfs + * @enum {string} + */ + data_type: "gtfs" | "gtfs_rt" | "gbfs"; + /** + * @description Describes status of the Feed. Should be one of + * * `active` Feed should be used in public trip planners. + * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. + * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. + * * `development` Feed is being used for development purposes and should not be used in public trip planners. + * * `future` Feed is not yet active but will be in the future. + * @example deprecated + * @enum {string} + */ + status: "active" | "deprecated" | "inactive" | "development" | "future"; + /** + * Format: date-time + * @description The date and time the feed was added to the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. + * @example true + */ + official?: boolean; + /** + * @description The ID that can be use to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ */ + external_ids?: components["schemas"]["ExternalIds"]; + /** + * @description A commonly used name for the transit provider included in the feed. + * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) + */ + provider?: string; + /** + * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. + * @example Bus + */ + feed_name?: string; + /** @description A note to clarify complex use cases for consumers. */ + note?: string; + /** + * @description Use to contact the feed producer. + * @example someEmail@ladotbus.com + */ + feed_contact_email?: string; + source_info?: components["schemas"]["SourceInfo"]; + redirects?: components["schemas"]["Redirect"][]; + locations?: components["schemas"]["Locations"]; + latest_dataset?: components["schemas"]["LatestDataset"]; + entity_types?: ("vp" | "tu" | "sa")[]; + /** @description The supported versions of the GBFS feed. */ + versions?: string[]; + /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ + feed_references?: string[]; + }; + Feeds: components["schemas"]["Feed"][]; + GtfsFeeds: components["schemas"]["GtfsFeed"][]; + GtfsRTFeeds: components["schemas"]["GtfsRTFeed"][]; + LatestDataset: { + /** + * @description Identifier of the latest dataset for this feed. + * @example mdb-1210-202402121801 + */ + id?: string; + /** + * Format: url + * @description As a convenience, the URL of the latest uploaded dataset hosted by MobilityData. It should be the same URL as the one found in the latest dataset id dataset. An alternative way to find this is to use the latest dataset id to obtain the dataset and then use its hosted_url. + * @example https://storage.googleapis.com/mobilitydata-datasets-prod/mdb-1210/mdb-1210-202402121801/mdb-1210-202402121801.zip + */ + hosted_url?: string; + bounding_box?: components["schemas"]["BoundingBox"]; + /** + * Format: date-time + * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + downloaded_at?: string; + /** + * @description A hash of the dataset. + * @example ad3805c4941cd37881ff40c342e831b5f5224f3d8a9a2ec3ac197d3652c78e42 + */ + hash?: string; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. + * @example 2023-07-10T06:00:00Z + */ + service_date_range_start?: string; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. + * @example 2023-07-10T05:59:59+00Z + */ + service_date_range_end?: string; + /** + * @description The timezone of the agency. + * @example America/Los_Angeles + */ + agency_timezone?: string; + /** + * @description The size of the zipped folder in MB. + * @example 100.2 + */ + zipped_folder_size_mb?: number; + /** + * @description The size of the unzipped folder in MB. + * @example 200.5 + */ + unzipped_folder_size_mb?: number; + validation_report?: { + /** + * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview + * @example [ + * "Shapes", + * "Headsigns", + * "Wheelchair Accessibility" + * ] + */ + features?: string[]; + /** @example 10 */ + total_error?: number; + /** @example 20 */ + total_warning?: number; + /** @example 30 */ + total_info?: number; + /** @example 1 */ + unique_error_count?: number; + /** @example 2 */ + unique_warning_count?: number; + /** @example 3 */ + unique_info_count?: number; + }; + }; + /** + * @description The ID that can be use to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ */ + ExternalIds: components["schemas"]["ExternalId"][]; + ExternalId: { + /** + * @description The ID that can be used to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ * @example 1210 + */ + external_id?: string; + /** + * @description The source of the external ID, e.g. the name of the database where the external ID can be used. + * @example mdb + */ + source?: string; + }; + SourceInfo: { + /** + * Format: url + * @description URL where the producer is providing the dataset. Refer to the authentication information to know how to access this URL. + * @example https://ladotbus.com/gtfs + */ + producer_url?: string; + /** + * @description Defines the type of authentication required to access the `producer_url`. Valid values for this field are: + * * 0 or (empty) - No authentication required. + * * 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information. + * * 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request. + * When not provided, the authentication type is assumed to be 0. + * @example 2 + * @enum {integer} + */ + authentication_type?: 0 | 1 | 2; + /** + * Format: url + * @description Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for `authentication_type=1` and `authentication_type=2`. + * @example https://apidevelopers.ladottransit.com + */ + authentication_info_url?: string; + /** + * @description Defines the name of the parameter to pass in the URL to provide the API key. This field is required for `authentication_type=1` and `authentication_type=2`. + * @example Ocp-Apim-Subscription-Key + */ + api_key_parameter_name?: string; + /** + * Format: url + * @description A URL where to find the license for the feed. + * @example https://www.ladottransit.com/dla.html + */ + license_url?: string; + /** + * @description Id of the feed license that can be used to query the license endpoint. + * @example 0BSD + */ + license_id?: string; + /** + * @description true if the license is SPDX. false if not. + * @example true + */ + license_is_spdx?: boolean; + /** + * @description Notes concerning the relation between the feed and the license. + * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. + */ + license_notes?: string; + }; + Locations: components["schemas"]["Location"][]; + Location: { + /** + * @description ISO 3166-1 alpha-2 code designating the country where the system is located. For a list of valid codes [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). + * @example US + */ + country_code?: string; + /** + * @description The english name of the country where the system is located. + * @example United States + */ + country?: string; + /** + * @description ISO 3166-2 english subdivision name designating the subdivision (e.g province, state, region) where the system is located. For a list of valid names [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). + * @example California + */ + subdivision_name?: string; + /** + * @description Primary municipality in english in which the transit system is located. + * @example Los Angeles + */ + municipality?: string; + }; + BasicDataset: { + /** + * @description Unique identifier used as a key for the datasets table. + * @example mdb-10-202402080058 + */ + id?: string; + /** + * @description ID of the feed related to this dataset. + * @example mdb-10 + */ + feed_id?: string; + }; + GtfsDataset: components["schemas"]["BasicDataset"] & { + /** + * @description The URL of the dataset data as hosted by MobilityData. No authentication required. + * @example https://storage.googleapis.com/storage/v1/b/mdb-latest/o/us-maine-casco-bay-lines-gtfs-1.zip?alt=media + */ + hosted_url?: string; + /** @description A note to clarify complex use cases for consumers. */ + note?: string; + /** + * Format: date-time + * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + downloaded_at?: string; + /** + * @description A hash of the dataset. + * @example 6497e85e34390b8b377130881f2f10ec29c18a80dd6005d504a2038cdd00aa71 + */ + hash?: string; + bounding_box?: components["schemas"]["BoundingBox"]; + validation_report?: components["schemas"]["ValidationReport"]; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. + * @example 2023-07-10T06:00:00Z + */ + service_date_range_start?: string; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. + * @example 2023-07-10T05:59:59+00Z + */ + service_date_range_end?: string; + /** + * @description The timezone of the agency. + * @example America/Los_Angeles + */ + agency_timezone?: string; + /** + * @description The size of the zipped folder in MB. + * @example 100.2 + */ + zipped_folder_size_mb?: number; + /** + * @description The size of the unzipped folder in MB. + * @example 200.5 + */ + unzipped_folder_size_mb?: number; + }; + /** @description Bounding box of the dataset when it was first added to the catalog. */ + BoundingBox: { + /** + * @description The minimum latitude for the dataset bounding box. + * @example 33.721601 + */ + minimum_latitude?: number; + /** + * @description The maximum latitude for the dataset bounding box. + * @example 34.323077 + */ + maximum_latitude?: number; + /** + * @description The minimum longitude for the dataset bounding box. + * @example -118.882829 + */ + minimum_longitude?: number; + /** + * @description The maximum longitude for the dataset bounding box. + * @example -118.131748 + */ + maximum_longitude?: number; + }; + GtfsDatasets: components["schemas"]["GtfsDataset"][]; + Metadata: { + /** @example 1.0.0 */ + version?: string; + /** @example 8635fdac4fbff025b4eaca6972fcc9504bc1552d */ + commit_hash?: string; + }; + /** @description Validation report */ + ValidationReport: { + /** + * Format: date-time + * @description The date and time the report was generated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + validated_at?: string; + /** + * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview + * @example [ + * "Shapes", + * "Headsigns", + * "Wheelchair Accessibility" + * ] + */ + features?: string[]; + /** @example 4.2.0 */ + validator_version?: string; + /** @example 10 */ + total_error?: number; + /** @example 20 */ + total_warning?: number; + /** @example 30 */ + total_info?: number; + /** @example 1 */ + unique_error_count?: number; + /** @example 2 */ + unique_warning_count?: number; + /** @example 3 */ + unique_info_count?: number; + /** + * Format: url + * @description JSON validation report URL + * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.json + */ + url_json?: string; + /** + * Format: url + * @description HTML validation report URL + * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.html + */ + url_html?: string; + }; + LicenseRule: { + /** + * @description Name of the rule. + * @example commercial-use + */ + name?: string; + /** + * @description Label of the rule. + * @example Commercial use + */ + label?: string; + /** + * @description Description of the rule. + * @example This license allows the software or data to be used for commercial purposes. + */ + description?: string; + /** + * @description Type of rule. + * @enum {string} + */ + type?: "permission" | "condition" | "limitation"; + }; + LicenseBase: { + /** + * @description Unique identifier for the license. + * @example 0BSD + */ + id?: string; + /** + * @description The type of license. + * @example standard + */ + type?: string; + /** @description true if license id spdx. */ + is_spdx?: boolean; + /** + * @description The user facing name of the license. + * @example BSD Zero Clause License + */ + name?: string; + /** + * Format: url + * @description A URL where to find the license for the feed. + * @example https://www.ladottransit.com/dla.html + */ + url?: string; + /** + * @description The description of the license. + * @example This is the 0BSD license. + */ + description?: string; + /** + * Format: date-time + * @description The date and time the license was added to the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * Format: date-time + * @description The last date and time the license was updated in the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + updated_at?: string; + }; + LicenseWithRules: components["schemas"]["LicenseBase"] & { + license_rules?: components["schemas"]["LicenseRule"][]; + }; + Licenses: components["schemas"]["LicenseBase"][]; + /** + * @description Matching a license + * @example { + * "license_id": "CC-BY-4.0", + * "license_url": "https://creativecommons.org/licenses/by/4.0/deed.nl", + * "normalized_url": "creativecommons.org/licenses/by/4.0", + * "match_type": "heuristic", + * "confidence": 0.99, + * "spdx_id": "CC-BY-4.0", + * "matched_name": "Creative Commons Attribution 4.0 International", + * "matched_catalog_url": "https://creativecommons.org/licenses/by/4.0/legalcode", + * "matched_source": "cc-resolver", + * "notes": "Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID.", + * "regional_id": "CC-BY-4.0-nl" + * } + */ + MatchingLicense: { + /** + * @description Unique identifier for the license (typically SPDX ID) + * @example CC-BY-4.0 + */ + license_id?: string; + /** + * @description Original license URL provided for resolution + * @example https://creativecommons.org/licenses/by/4.0/ + */ + license_url?: string; + /** + * @description URL after normalization (lowercased, trimmed, protocol removed) + * @example creativecommons.org/licenses/by/4.0 + */ + normalized_url?: string; + /** + * @description Type of match performed. One of: + * - 'exact': Direct match found in database + * - 'heuristic': Matched via pattern-based rules (CC resolver, common patterns) + * - 'fuzzy': Similarity-based match against same-host licenses + * @example heuristic + */ + match_type?: string; + /** + * @description Match confidence score (0.0-1.0), examples: + * - 1.0: Exact match + * - 0.99: Creative Commons resolved + * - 0.95: Pattern heuristic match + * - 0.0-1.0: Fuzzy match score based on string similarity + * @example 0.99 + */ + confidence?: number; + /** + * @description SPDX License Identifier if matched (e.g., 'CC-BY-4.0', 'MIT') + * @example CC-BY-4.0 + */ + spdx_id?: string; + /** + * @description Human-readable name of the matched license + * @example Creative Commons Attribution 4.0 International + */ + matched_name?: string; + /** + * @description Canonical URL from the license catalog/database + * @example https://creativecommons.org/licenses/by/4.0/legalcode + */ + matched_catalog_url?: string; + /** + * @description Source of the match. Examples: + * - 'db.license': Exact match from database + * - 'cc-resolver': Creative Commons license resolver + * - 'pattern-heuristics': Generic pattern matching + * @example cc-resolver + */ + matched_source?: string; + /** + * @description Additional context about the match (e.g., version normalization, locale detection) + * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. + */ + notes?: string; + /** + * @description Regional/jurisdictional variant identifier for ported licenses + * (e.g., 'CC-BY-2.1-jp' for Japan-ported Creative Commons) + * @example CC-BY-4.0-nl + */ + regional_id?: string; + }; + /** @description List of MatchingLicense */ + MatchingLicenses: components["schemas"]["MatchingLicense"][]; }; - Licenses: Array; - /** - * @description Matching a license - * @example { - * "license_id": "CC-BY-4.0", - * "license_url": "https://creativecommons.org/licenses/by/4.0/deed.nl", - * "normalized_url": "creativecommons.org/licenses/by/4.0", - * "match_type": "heuristic", - * "confidence": 0.99, - * "spdx_id": "CC-BY-4.0", - * "matched_name": "Creative Commons Attribution 4.0 International", - * "matched_catalog_url": "https://creativecommons.org/licenses/by/4.0/legalcode", - * "matched_source": "cc-resolver", - * "notes": "Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID.", - * "regional_id": "CC-BY-4.0-nl" - * } - */ - MatchingLicense: { - /** - * @description Unique identifier for the license (typically SPDX ID) - * @example CC-BY-4.0 - */ - license_id?: string; - /** - * @description Original license URL provided for resolution - * @example https://creativecommons.org/licenses/by/4.0/ - */ - license_url?: string; - /** - * @description URL after normalization (lowercased, trimmed, protocol removed) - * @example creativecommons.org/licenses/by/4.0 - */ - normalized_url?: string; - /** - * @description Type of match performed. One of: - * - 'exact': Direct match found in database - * - 'heuristic': Matched via pattern-based rules (CC resolver, common patterns) - * - 'fuzzy': Similarity-based match against same-host licenses - * - * @example heuristic - */ - match_type?: string; - /** - * @description Match confidence score (0.0-1.0), examples: - * - 1.0: Exact match - * - 0.99: Creative Commons resolved - * - 0.95: Pattern heuristic match - * - 0.0-1.0: Fuzzy match score based on string similarity - * - * @example 0.99 - */ - confidence?: number; - /** - * @description SPDX License Identifier if matched (e.g., 'CC-BY-4.0', 'MIT') - * @example CC-BY-4.0 - */ - spdx_id?: string; - /** - * @description Human-readable name of the matched license - * @example Creative Commons Attribution 4.0 International - */ - matched_name?: string; - /** - * @description Canonical URL from the license catalog/database - * @example https://creativecommons.org/licenses/by/4.0/legalcode - */ - matched_catalog_url?: string; - /** - * @description Source of the match. Examples: - * - 'db.license': Exact match from database - * - 'cc-resolver': Creative Commons license resolver - * - 'pattern-heuristics': Generic pattern matching - * - * @example cc-resolver - */ - matched_source?: string; - /** - * @description Additional context about the match (e.g., version normalization, locale detection) - * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. - */ - notes?: string; - /** - * @description Regional/jurisdictional variant identifier for ported licenses - * (e.g., 'CC-BY-2.1-jp' for Japan-ported Creative Commons) - * - * @example CC-BY-4.0-nl - */ - regional_id?: string; + responses: never; + parameters: { + /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ + status: "active" | "deprecated" | "inactive" | "development" | "future"; + /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ + statuses: ("active" | "deprecated" | "inactive" | "development" | "future")[]; + /** @description Filter feeds by their GTFS features. [GTFS features definitions defined here](https://gtfs.org/getting-started/features/overview) */ + feature: string[]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider: string; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url: string; + /** @description Filter feeds by their entity type. Expects a comma separated list of all types to fetch. */ + entity_types: string; + /** @description Filter feeds by their exact country code. */ + country_code: string; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + subdivision_name: string; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + municipality: string; + /** @description Filter feed datasets with downloaded date greater or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_after: string; + /** @description Filter feed datasets with downloaded date less or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_before: string; + /** + * @description Specify the minimum and maximum latitudes of the bounding box to use for filtering. + *
Filters by the bounding box of the `LatestDataset` for a feed. + *
Must be specified alongside `dataset_longitudes`. + */ + dataset_latitudes: string; + /** @description Specify the minimum and maximum longitudes of the bounding box to use for filtering.
Filters by the bounding box of the `LatestDataset` for a feed.
Must be specified alongside `dataset_latitudes`. */ + dataset_longitudes: string; + /** + * @description Specify the filtering method to use with the dataset_latitudes and dataset_longitudes parameters. + * * `completely_enclosed` - Get resources that are completely enclosed in the specified bounding box. + * * `partially_enclosed` - Get resources that are partially enclosed in the specified bounding box. + * * `disjoint` - Get resources that are completely outside the specified bounding box. + * @example completely_enclosed + */ + bounding_filter_method: "completely_enclosed" | "partially_enclosed" | "disjoint"; + /** @description If true, only return the latest dataset. */ + latest_query_param: boolean; + /** @description If true, only return official feeds. */ + is_official_query_param: boolean; + /** @description The number of items to be returned. */ + limit_query_param_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_gtfs_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_gtfs_rt_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_datasets_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_search_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_gbfs_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_licenses_endpoint: number; + /** @description Offset of the first item to return. */ + offset: number; + /** @description General search query to match against transit provider, location, and feed name. */ + search_text_query_param: string; + /** @description Comma separated list of GBFS versions to filter by. */ + version_query_param: string; + /** @description Comma separated list of data types to filter by. Valid values are gtfs, gtfs_rt and gbfs. */ + data_type_query_param: string; + /** @description The feed ID of the requested feed. */ + feed_id_query_param: string; + /** @description The feed ID of the requested feed. */ + feed_id_path_param: string; + /** @description The license ID of the requested license. */ + license_id_path_param: string; + /** @description The ID of the feed for which to obtain datasets. */ + feed_id_of_datasets_path_param: string; + /** @description The ID of the requested dataset. */ + dataset_id_path_param: string; + /** @description Filter feeds by their system ID. This is a unique identifier for the system that the feed belongs to. */ + system_id_param: string; + /** @description Filter feeds by their supported GBFS version. This is a string that follows the semantic versioning format. */ + version_param: string; + /** @description Comma separated list of license IDs to filter by. */ + license_ids_query_param: string; }; - /** @description List of MatchingLicense */ - MatchingLicenses: Array; - }; - responses: never; - parameters: { - /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ - status?: 'active' | 'deprecated' | 'inactive' | 'development' | 'future'; - /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ - statuses?: Array< - 'active' | 'deprecated' | 'inactive' | 'development' | 'future' - >; - /** @description Filter feeds by their GTFS features. [GTFS features definitions defined here](https://gtfs.org/getting-started/features/overview) */ - feature?: string[]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - provider?: string; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - producer_url?: string; - /** @description Filter feeds by their entity type. Expects a comma separated list of all types to fetch. */ - entity_types?: string; - /** @description Filter feeds by their exact country code. */ - country_code?: string; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - subdivision_name?: string; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - municipality?: string; - /** @description Filter feed datasets with downloaded date greater or equal to given date. Date should be in ISO 8601 date-time format. */ - downloaded_after?: string; - /** @description Filter feed datasets with downloaded date less or equal to given date. Date should be in ISO 8601 date-time format. */ - downloaded_before?: string; - /** - * @description Specify the minimum and maximum latitudes of the bounding box to use for filtering. - *
Filters by the bounding box of the `LatestDataset` for a feed. - *
Must be specified alongside `dataset_longitudes`. - */ - dataset_latitudes?: string; - /** @description Specify the minimum and maximum longitudes of the bounding box to use for filtering.
Filters by the bounding box of the `LatestDataset` for a feed.
Must be specified alongside `dataset_latitudes`. */ - dataset_longitudes?: string; - /** - * @description Specify the filtering method to use with the dataset_latitudes and dataset_longitudes parameters. - * * `completely_enclosed` - Get resources that are completely enclosed in the specified bounding box. - * * `partially_enclosed` - Get resources that are partially enclosed in the specified bounding box. - * * `disjoint` - Get resources that are completely outside the specified bounding box. - * - * @example completely_enclosed - */ - bounding_filter_method?: - | 'completely_enclosed' - | 'partially_enclosed' - | 'disjoint'; - /** @description If true, only return the latest dataset. */ - latest_query_param?: boolean; - /** @description If true, only return official feeds. */ - is_official_query_param?: boolean; - /** @description The number of items to be returned. */ - limit_query_param_feeds_endpoint?: number; - /** @description The number of items to be returned. */ - limit_query_param_gtfs_feeds_endpoint?: number; - /** @description The number of items to be returned. */ - limit_query_param_gtfs_rt_feeds_endpoint?: number; - /** @description The number of items to be returned. */ - limit_query_param_datasets_endpoint?: number; - /** @description The number of items to be returned. */ - limit_query_param_search_endpoint?: number; - /** @description The number of items to be returned. */ - limit_query_param_gbfs_feeds_endpoint?: number; - /** @description The number of items to be returned. */ - limit_query_param_licenses_endpoint?: number; - /** @description Offset of the first item to return. */ - offset?: number; - /** @description General search query to match against transit provider, location, and feed name. */ - search_text_query_param?: string; - /** @description Comma separated list of GBFS versions to filter by. */ - version_query_param?: string; - /** @description Comma separated list of data types to filter by. Valid values are gtfs, gtfs_rt and gbfs. */ - data_type_query_param?: string; - /** @description The feed ID of the requested feed. */ - feed_id_query_param?: string; - /** @description The feed ID of the requested feed. */ - feed_id_path_param: string; - /** @description The license ID of the requested license. */ - license_id_path_param: string; - /** @description The ID of the feed for which to obtain datasets. */ - feed_id_of_datasets_path_param: string; - /** @description The ID of the requested dataset. */ - dataset_id_path_param: string; - /** @description Filter feeds by their system ID. This is a unique identifier for the system that the feed belongs to. */ - system_id_param?: string; - /** @description Filter feeds by their supported GBFS version. This is a string that follows the semantic versioning format. */ - version_param?: string; - }; - requestBodies: never; - headers: never; - pathItems: never; + requestBodies: never; + headers: never; + pathItems: never; } - export type $defs = Record; - -export interface external { - 'BearerTokenSchema.yaml': { - paths: Record; - webhooks: Record; - components: { - schemas: never; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; - }; - $defs: Record; - }; -} - export interface operations { - /** @description Get some (or all) feeds from the Mobility Database. The items are sorted by provider in alphabetical ascending order. */ - getFeeds: { - parameters: { - query?: { - limit?: components['parameters']['limit_query_param_feeds_endpoint']; - offset?: components['parameters']['offset']; - status?: components['parameters']['status']; - provider?: components['parameters']['provider']; - producer_url?: components['parameters']['producer_url']; - is_official?: components['parameters']['is_official_query_param']; - }; - }; - responses: { - /** @description Successful pull of the feeds common info. This info has a reduced set of fields that are common to all types of feeds. */ - 200: { - content: { - 'application/json': components['schemas']['Feeds']; + getFeeds: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components["parameters"]["limit_query_param_feeds_endpoint"]; + /** @description Offset of the first item to return. */ + offset?: components["parameters"]["offset"]; + /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ + status?: components["parameters"]["status"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider?: components["parameters"]["provider"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url?: components["parameters"]["producer_url"]; + /** @description If true, only return official feeds. */ + is_official?: components["parameters"]["is_official_query_param"]; + }; + header?: never; + path?: never; + cookie?: never; }; - }; - }; - }; - /** @description Get the specified feed from the Mobility Database. */ - getFeed: { - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - responses: { - /** @description Successful pull of the feeds common info for the provided ID. This info has a reduced set of fields that are common to all types of feeds. */ - 200: { - content: { - 'application/json': components['schemas']['Feed']; + requestBody?: never; + responses: { + /** @description Successful pull of the feeds common info. This info has a reduced set of fields that are common to all types of feeds. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Feeds"]; + }; + }; }; - }; - }; - }; - /** @description Get some (or all) GTFS feeds from the Mobility Database. */ - getGtfsFeeds: { - parameters: { - query?: { - limit?: components['parameters']['limit_query_param_gtfs_feeds_endpoint']; - offset?: components['parameters']['offset']; - provider?: components['parameters']['provider']; - producer_url?: components['parameters']['producer_url']; - country_code?: components['parameters']['country_code']; - subdivision_name?: components['parameters']['subdivision_name']; - municipality?: components['parameters']['municipality']; - dataset_latitudes?: components['parameters']['dataset_latitudes']; - dataset_longitudes?: components['parameters']['dataset_longitudes']; - bounding_filter_method?: components['parameters']['bounding_filter_method']; - is_official?: components['parameters']['is_official_query_param']; - }; }; - responses: { - /** @description Successful pull of the GTFS feeds info. */ - 200: { - content: { - 'application/json': components['schemas']['GtfsFeeds']; + getFeed: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; }; - }; - }; - }; - /** @description Get some (or all) GTFS Realtime feeds from the Mobility Database. */ - getGtfsRtFeeds: { - parameters: { - query?: { - limit?: components['parameters']['limit_query_param_gtfs_rt_feeds_endpoint']; - offset?: components['parameters']['offset']; - provider?: components['parameters']['provider']; - producer_url?: components['parameters']['producer_url']; - entity_types?: components['parameters']['entity_types']; - country_code?: components['parameters']['country_code']; - subdivision_name?: components['parameters']['subdivision_name']; - municipality?: components['parameters']['municipality']; - is_official?: components['parameters']['is_official_query_param']; - }; - }; - responses: { - /** @description Successful pull of the GTFS Realtime feeds info. */ - 200: { - content: { - 'application/json': components['schemas']['GtfsRTFeeds']; + requestBody?: never; + responses: { + /** @description Successful pull of the feeds common info for the provided ID. This info has a reduced set of fields that are common to all types of feeds. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Feed"]; + }; + }; }; - }; - }; - }; - /** @description Get GBFS feeds from the Mobility Database. */ - getGbfsFeeds: { - parameters: { - query?: { - limit?: components['parameters']['limit_query_param_gbfs_feeds_endpoint']; - offset?: components['parameters']['offset']; - provider?: components['parameters']['provider']; - producer_url?: components['parameters']['producer_url']; - country_code?: components['parameters']['country_code']; - subdivision_name?: components['parameters']['subdivision_name']; - municipality?: components['parameters']['municipality']; - system_id?: components['parameters']['system_id_param']; - version?: components['parameters']['version_param']; - }; }; - responses: { - /** @description Successful pull of the GBFS feeds info. */ - 200: { - content: { - 'application/json': components['schemas']['GbfsFeeds']; + getGtfsFeeds: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components["parameters"]["limit_query_param_gtfs_feeds_endpoint"]; + /** @description Offset of the first item to return. */ + offset?: components["parameters"]["offset"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider?: components["parameters"]["provider"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url?: components["parameters"]["producer_url"]; + /** @description Filter feeds by their exact country code. */ + country_code?: components["parameters"]["country_code"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + subdivision_name?: components["parameters"]["subdivision_name"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + municipality?: components["parameters"]["municipality"]; + /** + * @description Specify the minimum and maximum latitudes of the bounding box to use for filtering. + *
Filters by the bounding box of the `LatestDataset` for a feed. + *
Must be specified alongside `dataset_longitudes`. + */ + dataset_latitudes?: components["parameters"]["dataset_latitudes"]; + /** @description Specify the minimum and maximum longitudes of the bounding box to use for filtering.
Filters by the bounding box of the `LatestDataset` for a feed.
Must be specified alongside `dataset_latitudes`. */ + dataset_longitudes?: components["parameters"]["dataset_longitudes"]; + /** + * @description Specify the filtering method to use with the dataset_latitudes and dataset_longitudes parameters. + * * `completely_enclosed` - Get resources that are completely enclosed in the specified bounding box. + * * `partially_enclosed` - Get resources that are partially enclosed in the specified bounding box. + * * `disjoint` - Get resources that are completely outside the specified bounding box. + * @example completely_enclosed + */ + bounding_filter_method?: components["parameters"]["bounding_filter_method"]; + /** @description If true, only return official feeds. */ + is_official?: components["parameters"]["is_official_query_param"]; + }; + header?: never; + path?: never; + cookie?: never; }; - }; - }; - }; - /** @description Get the specified GTFS feed from the Mobility Database. Once a week, we check if the latest dataset has been updated and, if so, we update it in our system accordingly. */ - getGtfsFeed: { - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - responses: { - /** @description Successful pull of the requested feed. */ - 200: { - content: { - 'application/json': components['schemas']['GtfsFeed']; + requestBody?: never; + responses: { + /** @description Successful pull of the GTFS feeds info. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GtfsFeeds"]; + }; + }; }; - }; - }; - }; - /** @description Get the specified GTFS Realtime feed from the Mobility Database. */ - getGtfsRtFeed: { - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; }; - responses: { - /** @description Successful pull of the requested feed. */ - 200: { - content: { - 'application/json': components['schemas']['GtfsRTFeed']; + getGtfsRtFeeds: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components["parameters"]["limit_query_param_gtfs_rt_feeds_endpoint"]; + /** @description Offset of the first item to return. */ + offset?: components["parameters"]["offset"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider?: components["parameters"]["provider"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url?: components["parameters"]["producer_url"]; + /** @description Filter feeds by their entity type. Expects a comma separated list of all types to fetch. */ + entity_types?: components["parameters"]["entity_types"]; + /** @description Filter feeds by their exact country code. */ + country_code?: components["parameters"]["country_code"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + subdivision_name?: components["parameters"]["subdivision_name"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + municipality?: components["parameters"]["municipality"]; + /** @description If true, only return official feeds. */ + is_official?: components["parameters"]["is_official_query_param"]; + }; + header?: never; + path?: never; + cookie?: never; }; - }; - }; - }; - /** @description Get the specified GBFS feed from the Mobility Database. */ - getGbfsFeed: { - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - responses: { - /** @description Successful pull of the requested feed. */ - 200: { - content: { - 'application/json': components['schemas']['GbfsFeed']; + requestBody?: never; + responses: { + /** @description Successful pull of the GTFS Realtime feeds info. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GtfsRTFeeds"]; + }; + }; }; - }; }; - }; - /** @description Get a list of datasets associated with a GTFS feed. Once a day, we check whether the latest dataset has changed; if it has, we update it in our system. The list is sorted from newest to oldest. */ - getGtfsFeedDatasets: { - parameters: { - query?: { - latest?: components['parameters']['latest_query_param']; - limit?: components['parameters']['limit_query_param_datasets_endpoint']; - offset?: components['parameters']['offset']; - downloaded_after?: components['parameters']['downloaded_after']; - downloaded_before?: components['parameters']['downloaded_before']; - }; - path: { - id: components['parameters']['feed_id_of_datasets_path_param']; - }; - }; - responses: { - /** @description Successful pull of the requested datasets. */ - 200: { - content: { - 'application/json': components['schemas']['GtfsDatasets']; + getGbfsFeeds: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components["parameters"]["limit_query_param_gbfs_feeds_endpoint"]; + /** @description Offset of the first item to return. */ + offset?: components["parameters"]["offset"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider?: components["parameters"]["provider"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url?: components["parameters"]["producer_url"]; + /** @description Filter feeds by their exact country code. */ + country_code?: components["parameters"]["country_code"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + subdivision_name?: components["parameters"]["subdivision_name"]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + municipality?: components["parameters"]["municipality"]; + /** @description Filter feeds by their system ID. This is a unique identifier for the system that the feed belongs to. */ + system_id?: components["parameters"]["system_id_param"]; + /** @description Filter feeds by their supported GBFS version. This is a string that follows the semantic versioning format. */ + version?: components["parameters"]["version_param"]; + }; + header?: never; + path?: never; + cookie?: never; }; - }; - }; - }; - /** @description Get a list of GTFS Realtime related to a GTFS feed. */ - getGtfsFeedGtfsRtFeeds: { - parameters: { - path: { - id: components['parameters']['feed_id_path_param']; - }; - }; - responses: { - /** @description Successful pull of the GTFS Realtime feeds info related to a GTFS feed. */ - 200: { - content: { - 'application/json': components['schemas']['GtfsRTFeeds']; + requestBody?: never; + responses: { + /** @description Successful pull of the GBFS feeds info. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GbfsFeeds"]; + }; + }; }; - }; }; - }; - /** @description Get the specified dataset from the Mobility Database. */ - getDatasetGtfs: { - parameters: { - path: { - id: components['parameters']['dataset_id_path_param']; - }; + getGtfsFeed: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested feed. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GtfsFeed"]; + }; + }; + }; }; - responses: { - /** @description Successful pull of the requested dataset. */ - 200: { - content: { - 'application/json': components['schemas']['GtfsDataset']; + getGtfsRtFeed: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested feed. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GtfsRTFeed"]; + }; + }; }; - }; }; - }; - /** @description Get metadata about this API. */ - getMetadata: { - responses: { - /** @description Successful pull of the metadata. */ - 200: { - content: { - 'application/json': components['schemas']['Metadata']; - }; - }; + getGbfsFeed: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested feed. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GbfsFeed"]; + }; + }; + }; }; - }; - /** - * @description Search feeds on feed name, location and provider's information. - *
- * The current implementation leverages the text search functionalities from [PostgreSQL](https://www.postgresql.org/docs/current/textsearch-controls.html), in particulary `plainto_tsquery`. - *

- * Points to consider while using search endpoint: - *
- * - Operators are not currently supported. Operators are ignored as stop-words. - * - Search is based on lexemes(English) and case insensitive. The search_text_query_param is parsed and normalized much as for to_tsvector, then the & (AND) tsquery operator is inserted between surviving words. - * - The search will match all the lexemes with an AND operator. So, all lexemes must be present in the document. - * - Our current implementation only creates English lexemes. We are currently considering adding support to more languages. - * - The order of the words is not relevant for matching. The query __New York__ should give you the same results as __York New__. - *

- * Example: - *
- * Query: New York Transit - *
- * Search Executed: 'new' & york & 'transit' - *
- */ - searchFeeds: { - parameters: { - query?: { - limit?: components['parameters']['limit_query_param_search_endpoint']; - offset?: components['parameters']['offset']; - status?: components['parameters']['statuses']; - feed_id?: components['parameters']['feed_id_query_param']; - data_type?: components['parameters']['data_type_query_param']; - is_official?: components['parameters']['is_official_query_param']; - version?: components['parameters']['version_query_param']; - search_query?: components['parameters']['search_text_query_param']; - feature?: components['parameters']['feature']; - }; + getGtfsFeedDatasets: { + parameters: { + query?: { + /** @description If true, only return the latest dataset. */ + latest?: components["parameters"]["latest_query_param"]; + /** @description The number of items to be returned. */ + limit?: components["parameters"]["limit_query_param_datasets_endpoint"]; + /** @description Offset of the first item to return. */ + offset?: components["parameters"]["offset"]; + /** @description Filter feed datasets with downloaded date greater or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_after?: components["parameters"]["downloaded_after"]; + /** @description Filter feed datasets with downloaded date less or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_before?: components["parameters"]["downloaded_before"]; + }; + header?: never; + path: { + /** @description The ID of the feed for which to obtain datasets. */ + id: components["parameters"]["feed_id_of_datasets_path_param"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested datasets. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GtfsDatasets"]; + }; + }; + }; }; - responses: { - /** @description Successful search feeds using full-text search on feed, location and provider's information, potentially returning a mixed array of different entity types. */ - 200: { - content: { - 'application/json': { - /** @description The total number of matching entities found regardless the limit and offset parameters. */ - total?: number; - results?: Array; - }; - }; - }; + getGtfsFeedGtfsRtFeeds: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components["parameters"]["feed_id_path_param"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the GTFS Realtime feeds info related to a GTFS feed. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GtfsRTFeeds"]; + }; + }; + }; }; - }; - /** @description Get the list of all licenses in the DB. */ - getLicenses: { - parameters: { - query?: { - limit?: components['parameters']['limit_query_param_licenses_endpoint']; - offset?: components['parameters']['offset']; - }; + getDatasetGtfs: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the requested dataset. */ + id: components["parameters"]["dataset_id_path_param"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested dataset. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GtfsDataset"]; + }; + }; + }; }; - responses: { - /** @description Successful pull of the licenses info. */ - 200: { - content: { - 'application/json': components['schemas']['Licenses']; + getMetadata: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the metadata. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Metadata"]; + }; + }; }; - }; }; - }; - /** @description Get the specified license from the Mobility Database, including the license rules. */ - getLicense: { - parameters: { - path: { - id: components['parameters']['license_id_path_param']; - }; + searchFeeds: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components["parameters"]["limit_query_param_search_endpoint"]; + /** @description Offset of the first item to return. */ + offset?: components["parameters"]["offset"]; + /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ + status?: components["parameters"]["statuses"]; + /** @description The feed ID of the requested feed. */ + feed_id?: components["parameters"]["feed_id_query_param"]; + /** @description Comma separated list of data types to filter by. Valid values are gtfs, gtfs_rt and gbfs. */ + data_type?: components["parameters"]["data_type_query_param"]; + /** @description If true, only return official feeds. */ + is_official?: components["parameters"]["is_official_query_param"]; + /** @description Comma separated list of GBFS versions to filter by. */ + version?: components["parameters"]["version_query_param"]; + /** @description General search query to match against transit provider, location, and feed name. */ + search_query?: components["parameters"]["search_text_query_param"]; + /** @description Filter feeds by their GTFS features. [GTFS features definitions defined here](https://gtfs.org/getting-started/features/overview) */ + feature?: components["parameters"]["feature"]; + /** @description Comma separated list of license IDs to filter by. */ + license_ids?: components["parameters"]["license_ids_query_param"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful search feeds using full-text search on feed, location and provider's information, potentially returning a mixed array of different entity types. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @description The total number of matching entities found regardless the limit and offset parameters. */ + total?: number; + results?: components["schemas"]["SearchFeedItemResult"][]; + }; + }; + }; + }; }; - responses: { - /** @description Successful pull of the license info for the provided ID. */ - 200: { - content: { - 'application/json': components['schemas']['LicenseWithRules']; + getLicenses: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components["parameters"]["limit_query_param_licenses_endpoint"]; + /** @description Offset of the first item to return. */ + offset?: components["parameters"]["offset"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the licenses info. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Licenses"]; + }; + }; }; - }; }; - }; - /** @description Get the list of matching licenses based on the provided license URL */ - getMatchingLicenses: { - /** @description Payload containing the license URL to match against the database. */ - requestBody: { - content: { - 'application/json': { - /** - * Format: url - * @description The license URL to resolve and match against the database. - * @example https://creativecommons.org/licenses/by/4.0/deed.nl - */ - license_url: string; - }; - }; + getLicense: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The license ID of the requested license. */ + id: components["parameters"]["license_id_path_param"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the license info for the provided ID. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["LicenseWithRules"]; + }; + }; + }; }; - responses: { - /** @description The list of matching licenses if any. */ - 200: { - content: { - 'application/json': components['schemas']['MatchingLicenses']; + getMatchingLicenses: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Payload containing the license URL to match against the database. */ + requestBody: { + content: { + "application/json": { + /** + * Format: url + * @description The license URL to resolve and match against the database. + * @example https://creativecommons.org/licenses/by/4.0/deed.nl + */ + license_url: string; + }; + }; + }; + responses: { + /** @description The list of matching licenses if any. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MatchingLicenses"]; + }; + }; }; - }; }; - }; } From 40476fdac4694fb6ca43a529108f2413655f9fae Mon Sep 17 00:00:00 2001 From: Alessandro Kreslin Date: Wed, 25 Feb 2026 11:06:31 -0500 Subject: [PATCH 2/2] lint fix --- src/app/services/feeds/types.ts | 3212 +++++++++++++++---------------- 1 file changed, 1597 insertions(+), 1615 deletions(-) diff --git a/src/app/services/feeds/types.ts b/src/app/services/feeds/types.ts index 7eaa92fc..b8846372 100644 --- a/src/app/services/feeds/types.ts +++ b/src/app/services/feeds/types.ts @@ -4,1134 +4,1282 @@ */ export interface paths { - "/v1/feeds": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get some (or all) feeds from the Mobility Database. The items are sorted by provider in alphabetical ascending order. */ - get: operations["getFeeds"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/feeds/{id}": { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - /** @description Get the specified feed from the Mobility Database. */ - get: operations["getFeed"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gtfs_feeds": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get some (or all) GTFS feeds from the Mobility Database. */ - get: operations["getGtfsFeeds"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gtfs_rt_feeds": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get some (or all) GTFS Realtime feeds from the Mobility Database. */ - get: operations["getGtfsRtFeeds"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gbfs_feeds": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get GBFS feeds from the Mobility Database. */ - get: operations["getGbfsFeeds"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gtfs_feeds/{id}": { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - /** @description Get the specified GTFS feed from the Mobility Database. Once a week, we check if the latest dataset has been updated and, if so, we update it in our system accordingly. */ - get: operations["getGtfsFeed"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gtfs_rt_feeds/{id}": { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - /** @description Get the specified GTFS Realtime feed from the Mobility Database. */ - get: operations["getGtfsRtFeed"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gbfs_feeds/{id}": { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - /** @description Get the specified GBFS feed from the Mobility Database. */ - get: operations["getGbfsFeed"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gtfs_feeds/{id}/datasets": { - parameters: { - query?: never; - header?: never; - path: { - /** @description The ID of the feed for which to obtain datasets. */ - id: components["parameters"]["feed_id_of_datasets_path_param"]; - }; - cookie?: never; - }; - /** @description Get a list of datasets associated with a GTFS feed. Once a day, we check whether the latest dataset has changed; if it has, we update it in our system. The list is sorted from newest to oldest. */ - get: operations["getGtfsFeedDatasets"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/gtfs_feeds/{id}/gtfs_rt_feeds": { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - /** @description Get a list of GTFS Realtime related to a GTFS feed. */ - get: operations["getGtfsFeedGtfsRtFeeds"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/datasets/gtfs/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get the specified dataset from the Mobility Database. */ - get: operations["getDatasetGtfs"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/metadata": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get metadata about this API. */ - get: operations["getMetadata"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * @description Search feeds on feed name, location and provider's information. - *
- * The current implementation leverages the text search functionalities from [PostgreSQL](https://www.postgresql.org/docs/current/textsearch-controls.html), in particulary `plainto_tsquery`. - *

- * Points to consider while using search endpoint: - *
- * - Operators are not currently supported. Operators are ignored as stop-words. - * - Search is based on lexemes(English) and case insensitive. The search_text_query_param is parsed and normalized much as for to_tsvector, then the & (AND) tsquery operator is inserted between surviving words. - * - The search will match all the lexemes with an AND operator. So, all lexemes must be present in the document. - * - Our current implementation only creates English lexemes. We are currently considering adding support to more languages. - * - The order of the words is not relevant for matching. The query __New York__ should give you the same results as __York New__. - *

- * Example: - *
- * Query: New York Transit - *
- * Search Executed: 'new' & york & 'transit' - *
- */ - get: operations["searchFeeds"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/licenses": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Get the list of all licenses in the DB. */ - get: operations["getLicenses"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/licenses/{id}": { - parameters: { - query?: never; - header?: never; - path: { - /** @description The license ID of the requested license. */ - id: components["parameters"]["license_id_path_param"]; - }; - cookie?: never; - }; - /** @description Get the specified license from the Mobility Database, including the license rules. */ - get: operations["getLicense"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/licenses:match": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** @description Get the list of matching licenses based on the provided license URL */ - post: operations["getMatchingLicenses"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; + '/v1/feeds': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; + /** @description Get some (or all) feeds from the Mobility Database. The items are sorted by provider in alphabetical ascending order. */ + get: operations['getFeeds']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/feeds/{id}': { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + /** @description Get the specified feed from the Mobility Database. */ + get: operations['getFeed']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gtfs_feeds': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get some (or all) GTFS feeds from the Mobility Database. */ + get: operations['getGtfsFeeds']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gtfs_rt_feeds': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get some (or all) GTFS Realtime feeds from the Mobility Database. */ + get: operations['getGtfsRtFeeds']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gbfs_feeds': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get GBFS feeds from the Mobility Database. */ + get: operations['getGbfsFeeds']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gtfs_feeds/{id}': { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + /** @description Get the specified GTFS feed from the Mobility Database. Once a week, we check if the latest dataset has been updated and, if so, we update it in our system accordingly. */ + get: operations['getGtfsFeed']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gtfs_rt_feeds/{id}': { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + /** @description Get the specified GTFS Realtime feed from the Mobility Database. */ + get: operations['getGtfsRtFeed']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gbfs_feeds/{id}': { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + /** @description Get the specified GBFS feed from the Mobility Database. */ + get: operations['getGbfsFeed']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gtfs_feeds/{id}/datasets': { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the feed for which to obtain datasets. */ + id: components['parameters']['feed_id_of_datasets_path_param']; + }; + cookie?: never; + }; + /** @description Get a list of datasets associated with a GTFS feed. Once a day, we check whether the latest dataset has changed; if it has, we update it in our system. The list is sorted from newest to oldest. */ + get: operations['getGtfsFeedDatasets']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/gtfs_feeds/{id}/gtfs_rt_feeds': { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + /** @description Get a list of GTFS Realtime related to a GTFS feed. */ + get: operations['getGtfsFeedGtfsRtFeeds']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/datasets/gtfs/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get the specified dataset from the Mobility Database. */ + get: operations['getDatasetGtfs']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/metadata': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get metadata about this API. */ + get: operations['getMetadata']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/search': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * @description Search feeds on feed name, location and provider's information. + *
+ * The current implementation leverages the text search functionalities from [PostgreSQL](https://www.postgresql.org/docs/current/textsearch-controls.html), in particulary `plainto_tsquery`. + *

+ * Points to consider while using search endpoint: + *
+ * - Operators are not currently supported. Operators are ignored as stop-words. + * - Search is based on lexemes(English) and case insensitive. The search_text_query_param is parsed and normalized much as for to_tsvector, then the & (AND) tsquery operator is inserted between surviving words. + * - The search will match all the lexemes with an AND operator. So, all lexemes must be present in the document. + * - Our current implementation only creates English lexemes. We are currently considering adding support to more languages. + * - The order of the words is not relevant for matching. The query __New York__ should give you the same results as __York New__. + *

+ * Example: + *
+ * Query: New York Transit + *
+ * Search Executed: 'new' & york & 'transit' + *
+ */ + get: operations['searchFeeds']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/licenses': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Get the list of all licenses in the DB. */ + get: operations['getLicenses']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/licenses/{id}': { + parameters: { + query?: never; + header?: never; + path: { + /** @description The license ID of the requested license. */ + id: components['parameters']['license_id_path_param']; + }; + cookie?: never; + }; + /** @description Get the specified license from the Mobility Database, including the license rules. */ + get: operations['getLicense']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/v1/licenses:match': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** @description Get the list of matching licenses based on the provided license URL */ + post: operations['getMatchingLicenses']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - Redirect: { - /** - * @description The feed ID that should be used in replacement of the current one. - * @example mdb-10 - */ - target_id?: string; - /** - * @description A comment explaining the redirect. - * @example Redirected because of a change of URL. - */ - comment?: string; - }; - BasicFeed: { - /** - * @description Unique identifier used as a key for the feeds table. - * @example mdb-1210 - */ - id?: string; - /** - * @example gtfs - * @enum {string} - */ - data_type?: "gtfs" | "gtfs_rt" | "gbfs"; - /** - * Format: date-time - * @description The date and time the feed was added to the database, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - created_at?: string; - /** - * @description The ID that can be use to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- */ - external_ids?: components["schemas"]["ExternalIds"]; - /** - * @description A commonly used name for the transit provider included in the feed. - * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) - */ - provider?: string; - /** - * @description Use to contact the feed producer. - * @example someEmail@ladotbus.com - */ - feed_contact_email?: string; - source_info?: components["schemas"]["SourceInfo"]; - redirects?: components["schemas"]["Redirect"][]; - }; - Feed: components["schemas"]["BasicFeed"] & Omit<{ - /** - * @description Describes status of the Feed. Should be one of - * * `active` Feed should be used in public trip planners. - * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. - * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. - * * `development` Feed is being used for development purposes and should not be used in public trip planners. - * * `future` Feed is not yet active but will be in the future. - * @example deprecated - * @enum {string} - */ - status?: "active" | "deprecated" | "inactive" | "development" | "future"; - /** - * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. - * @example true - */ - official?: boolean; - /** - * Format: date-time - * @description The date and time the official status was last updated, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - official_updated_at?: string; - /** - * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. - * @example Bus - */ - feed_name?: string; - /** @description A note to clarify complex use cases for consumers. */ - note?: string; - /** @description A list of related links for the feed. */ - related_links?: components["schemas"]["FeedRelatedLink"][]; - }, "data_type">; - FeedRelatedLink: { - /** - * @description A short code to identify the type of link. - * @example next_1 - */ - code?: string; - /** - * @description A description of the link. - * @example The URL for a future feed version with an upcoming service period. - */ - description?: string; - /** - * Format: url - * @description The URL of the related link. - */ - url?: string; - /** - * Format: date-time - * @description The date and time the related link was created, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - created_at?: string; - }; - GtfsFeed: components["schemas"]["Feed"] & { - /** - * @example gtfs - * @enum {string} - */ - data_type?: "gtfs" | "gtfs_rt" | "gbfs"; - locations?: components["schemas"]["Locations"]; - latest_dataset?: components["schemas"]["LatestDataset"]; - bounding_box?: components["schemas"]["BoundingBox"]; - /** - * @description The dataset ID of the dataset used to compute the visualization files. - * @example mdb-1210-202402121801 - */ - visualization_dataset_id?: string; - }; - GbfsFeed: components["schemas"]["BasicFeed"] & { - /** - * @example gbfs - * @enum {string} - */ - data_type?: "gtfs" | "gtfs_rt" | "gbfs"; - locations?: components["schemas"]["Locations"]; - /** - * @description The system ID of the feed. This is a unique identifier for the system that the feed belongs to. - * @example system-1234 - */ - system_id?: string; - /** - * Format: url - * @description The URL of the provider's website. This is the website of the organization that operates the system that the feed belongs to. - * @example https://www.citybikenyc.com/ - */ - provider_url?: string; - /** @description A list of GBFS versions that the feed supports. Each version is represented by its version number and a list of endpoints. */ - versions?: components["schemas"]["GbfsVersion"][]; - bounding_box?: components["schemas"]["BoundingBox"]; - /** - * Format: date-time - * @description The date and time the bounding box was generated, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - bounding_box_generated_at?: string; - }; - GbfsVersion: { - /** - * @description The version of the GBFS specification that the feed is using. This is a string that follows the semantic versioning format. - * @example 2.3 - */ - version?: string; - /** - * Format: date-time - * @description The date when the GBFS version was saved to the database. - * @example 2023-07-10T22:06:00Z - */ - created_at?: string; - /** - * Format: date-time - * @description The date when the GBFS version was last updated in the database. - * @example 2023-07-10T22:06:00Z - */ - last_updated_at?: string; - /** - * @description Indicates the origin of the version information. Possible values are: - * * `autodiscovery`: Retrieved directly from the main GBFS autodiscovery URL. - * * `gbfs_versions`: Retrieved from the `gbfs_versions` endpoint. - * @enum {string} - */ - source?: "autodiscovery" | "gbfs_versions"; - /** @description A list of endpoints that are available in the version. */ - endpoints?: components["schemas"]["GbfsEndpoint"][]; - latest_validation_report?: components["schemas"]["GbfsValidationReport"]; - }; - /** @description A validation report of the GBFS feed. */ - GbfsValidationReport: { - /** - * Format: date-time - * @description The date and time the GBFS feed was validated, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - validated_at?: string; - /** @example 10 */ - total_error?: number; - /** - * Format: url - * @description The URL of the JSON report of the validation summary. - * @example https://storage.googleapis.com/mobilitydata-datasets-prod/validation-reports/gbfs-1234-202402121801.json - */ - report_summary_url?: string; - /** - * @description The version of the validator used to validate the GBFS feed. - * @example 1.0.13 - */ - validator_version?: string; - }; - GbfsEndpoint: { - /** - * @description The name of the endpoint. This is a human-readable name for the endpoint. - * @example system_information - */ - name?: string; - /** - * Format: url - * @description The URL of the endpoint. This is the URL where the endpoint can be accessed. - * @example https://gbfs.citibikenyc.com/gbfs/system_information.json - */ - url?: string; - /** - * @description The language of the endpoint. This is the language that the endpoint is available in for versions 2.3 and prior. - * @example en - */ - language?: string; - /** - * @description A boolean value indicating if the endpoint is a feature. A feature is defined as an optionnal endpoint. - * @example false - */ - is_feature?: boolean; - }; - GbfsFeeds: components["schemas"]["GbfsFeed"][]; - GtfsRTFeed: components["schemas"]["Feed"] & { - /** - * @example gtfs_rt - * @enum {string} - */ - data_type?: "gtfs" | "gtfs_rt" | "gbfs"; - entity_types?: ("vp" | "tu" | "sa")[]; - /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ - feed_references?: string[]; - locations?: components["schemas"]["Locations"]; - }; - SearchFeedItemResult: { - /** - * @description Unique identifier used as a key for the feeds table. - * @example mdb-1210 - */ - id: string; - /** - * @example gtfs - * @enum {string} - */ - data_type: "gtfs" | "gtfs_rt" | "gbfs"; - /** - * @description Describes status of the Feed. Should be one of - * * `active` Feed should be used in public trip planners. - * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. - * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. - * * `development` Feed is being used for development purposes and should not be used in public trip planners. - * * `future` Feed is not yet active but will be in the future. - * @example deprecated - * @enum {string} - */ - status: "active" | "deprecated" | "inactive" | "development" | "future"; - /** - * Format: date-time - * @description The date and time the feed was added to the database, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - created_at?: string; - /** - * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. - * @example true - */ - official?: boolean; - /** - * @description The ID that can be use to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- */ - external_ids?: components["schemas"]["ExternalIds"]; - /** - * @description A commonly used name for the transit provider included in the feed. - * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) - */ - provider?: string; - /** - * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. - * @example Bus - */ - feed_name?: string; - /** @description A note to clarify complex use cases for consumers. */ - note?: string; - /** - * @description Use to contact the feed producer. - * @example someEmail@ladotbus.com - */ - feed_contact_email?: string; - source_info?: components["schemas"]["SourceInfo"]; - redirects?: components["schemas"]["Redirect"][]; - locations?: components["schemas"]["Locations"]; - latest_dataset?: components["schemas"]["LatestDataset"]; - entity_types?: ("vp" | "tu" | "sa")[]; - /** @description The supported versions of the GBFS feed. */ - versions?: string[]; - /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ - feed_references?: string[]; - }; - Feeds: components["schemas"]["Feed"][]; - GtfsFeeds: components["schemas"]["GtfsFeed"][]; - GtfsRTFeeds: components["schemas"]["GtfsRTFeed"][]; - LatestDataset: { - /** - * @description Identifier of the latest dataset for this feed. - * @example mdb-1210-202402121801 - */ - id?: string; - /** - * Format: url - * @description As a convenience, the URL of the latest uploaded dataset hosted by MobilityData. It should be the same URL as the one found in the latest dataset id dataset. An alternative way to find this is to use the latest dataset id to obtain the dataset and then use its hosted_url. - * @example https://storage.googleapis.com/mobilitydata-datasets-prod/mdb-1210/mdb-1210-202402121801/mdb-1210-202402121801.zip - */ - hosted_url?: string; - bounding_box?: components["schemas"]["BoundingBox"]; - /** - * Format: date-time - * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - downloaded_at?: string; - /** - * @description A hash of the dataset. - * @example ad3805c4941cd37881ff40c342e831b5f5224f3d8a9a2ec3ac197d3652c78e42 - */ - hash?: string; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. - * @example 2023-07-10T06:00:00Z - */ - service_date_range_start?: string; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. - * @example 2023-07-10T05:59:59+00Z - */ - service_date_range_end?: string; - /** - * @description The timezone of the agency. - * @example America/Los_Angeles - */ - agency_timezone?: string; - /** - * @description The size of the zipped folder in MB. - * @example 100.2 - */ - zipped_folder_size_mb?: number; - /** - * @description The size of the unzipped folder in MB. - * @example 200.5 - */ - unzipped_folder_size_mb?: number; - validation_report?: { - /** - * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview - * @example [ - * "Shapes", - * "Headsigns", - * "Wheelchair Accessibility" - * ] - */ - features?: string[]; - /** @example 10 */ - total_error?: number; - /** @example 20 */ - total_warning?: number; - /** @example 30 */ - total_info?: number; - /** @example 1 */ - unique_error_count?: number; - /** @example 2 */ - unique_warning_count?: number; - /** @example 3 */ - unique_info_count?: number; - }; - }; - /** - * @description The ID that can be use to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- */ - ExternalIds: components["schemas"]["ExternalId"][]; - ExternalId: { - /** - * @description The ID that can be used to find the feed data in an external or legacy database. - *
    - *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • - *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • - *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • - *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • - *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • - *
- * @example 1210 - */ - external_id?: string; - /** - * @description The source of the external ID, e.g. the name of the database where the external ID can be used. - * @example mdb - */ - source?: string; - }; - SourceInfo: { - /** - * Format: url - * @description URL where the producer is providing the dataset. Refer to the authentication information to know how to access this URL. - * @example https://ladotbus.com/gtfs - */ - producer_url?: string; - /** - * @description Defines the type of authentication required to access the `producer_url`. Valid values for this field are: - * * 0 or (empty) - No authentication required. - * * 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information. - * * 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request. - * When not provided, the authentication type is assumed to be 0. - * @example 2 - * @enum {integer} - */ - authentication_type?: 0 | 1 | 2; - /** - * Format: url - * @description Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for `authentication_type=1` and `authentication_type=2`. - * @example https://apidevelopers.ladottransit.com - */ - authentication_info_url?: string; - /** - * @description Defines the name of the parameter to pass in the URL to provide the API key. This field is required for `authentication_type=1` and `authentication_type=2`. - * @example Ocp-Apim-Subscription-Key - */ - api_key_parameter_name?: string; - /** - * Format: url - * @description A URL where to find the license for the feed. - * @example https://www.ladottransit.com/dla.html - */ - license_url?: string; - /** - * @description Id of the feed license that can be used to query the license endpoint. - * @example 0BSD - */ - license_id?: string; - /** - * @description true if the license is SPDX. false if not. - * @example true - */ - license_is_spdx?: boolean; - /** - * @description Notes concerning the relation between the feed and the license. - * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. - */ - license_notes?: string; - }; - Locations: components["schemas"]["Location"][]; - Location: { - /** - * @description ISO 3166-1 alpha-2 code designating the country where the system is located. For a list of valid codes [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). - * @example US - */ - country_code?: string; - /** - * @description The english name of the country where the system is located. - * @example United States - */ - country?: string; - /** - * @description ISO 3166-2 english subdivision name designating the subdivision (e.g province, state, region) where the system is located. For a list of valid names [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). - * @example California - */ - subdivision_name?: string; - /** - * @description Primary municipality in english in which the transit system is located. - * @example Los Angeles - */ - municipality?: string; - }; - BasicDataset: { - /** - * @description Unique identifier used as a key for the datasets table. - * @example mdb-10-202402080058 - */ - id?: string; - /** - * @description ID of the feed related to this dataset. - * @example mdb-10 - */ - feed_id?: string; - }; - GtfsDataset: components["schemas"]["BasicDataset"] & { - /** - * @description The URL of the dataset data as hosted by MobilityData. No authentication required. - * @example https://storage.googleapis.com/storage/v1/b/mdb-latest/o/us-maine-casco-bay-lines-gtfs-1.zip?alt=media - */ - hosted_url?: string; - /** @description A note to clarify complex use cases for consumers. */ - note?: string; - /** - * Format: date-time - * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - downloaded_at?: string; - /** - * @description A hash of the dataset. - * @example 6497e85e34390b8b377130881f2f10ec29c18a80dd6005d504a2038cdd00aa71 - */ - hash?: string; - bounding_box?: components["schemas"]["BoundingBox"]; - validation_report?: components["schemas"]["ValidationReport"]; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. - * @example 2023-07-10T06:00:00Z - */ - service_date_range_start?: string; - /** - * Format: date-time - * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. - * @example 2023-07-10T05:59:59+00Z - */ - service_date_range_end?: string; - /** - * @description The timezone of the agency. - * @example America/Los_Angeles - */ - agency_timezone?: string; - /** - * @description The size of the zipped folder in MB. - * @example 100.2 - */ - zipped_folder_size_mb?: number; - /** - * @description The size of the unzipped folder in MB. - * @example 200.5 - */ - unzipped_folder_size_mb?: number; - }; - /** @description Bounding box of the dataset when it was first added to the catalog. */ - BoundingBox: { - /** - * @description The minimum latitude for the dataset bounding box. - * @example 33.721601 - */ - minimum_latitude?: number; - /** - * @description The maximum latitude for the dataset bounding box. - * @example 34.323077 - */ - maximum_latitude?: number; - /** - * @description The minimum longitude for the dataset bounding box. - * @example -118.882829 - */ - minimum_longitude?: number; - /** - * @description The maximum longitude for the dataset bounding box. - * @example -118.131748 - */ - maximum_longitude?: number; - }; - GtfsDatasets: components["schemas"]["GtfsDataset"][]; - Metadata: { - /** @example 1.0.0 */ - version?: string; - /** @example 8635fdac4fbff025b4eaca6972fcc9504bc1552d */ - commit_hash?: string; - }; - /** @description Validation report */ - ValidationReport: { - /** - * Format: date-time - * @description The date and time the report was generated, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - validated_at?: string; - /** - * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview - * @example [ - * "Shapes", - * "Headsigns", - * "Wheelchair Accessibility" - * ] - */ - features?: string[]; - /** @example 4.2.0 */ - validator_version?: string; - /** @example 10 */ - total_error?: number; - /** @example 20 */ - total_warning?: number; - /** @example 30 */ - total_info?: number; - /** @example 1 */ - unique_error_count?: number; - /** @example 2 */ - unique_warning_count?: number; - /** @example 3 */ - unique_info_count?: number; - /** - * Format: url - * @description JSON validation report URL - * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.json - */ - url_json?: string; - /** - * Format: url - * @description HTML validation report URL - * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.html - */ - url_html?: string; - }; - LicenseRule: { - /** - * @description Name of the rule. - * @example commercial-use - */ - name?: string; - /** - * @description Label of the rule. - * @example Commercial use - */ - label?: string; - /** - * @description Description of the rule. - * @example This license allows the software or data to be used for commercial purposes. - */ - description?: string; - /** - * @description Type of rule. - * @enum {string} - */ - type?: "permission" | "condition" | "limitation"; - }; - LicenseBase: { - /** - * @description Unique identifier for the license. - * @example 0BSD - */ - id?: string; - /** - * @description The type of license. - * @example standard - */ - type?: string; - /** @description true if license id spdx. */ - is_spdx?: boolean; - /** - * @description The user facing name of the license. - * @example BSD Zero Clause License - */ - name?: string; - /** - * Format: url - * @description A URL where to find the license for the feed. - * @example https://www.ladottransit.com/dla.html - */ - url?: string; - /** - * @description The description of the license. - * @example This is the 0BSD license. - */ - description?: string; - /** - * Format: date-time - * @description The date and time the license was added to the database, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - created_at?: string; - /** - * Format: date-time - * @description The last date and time the license was updated in the database, in ISO 8601 date-time format. - * @example 2023-07-10T22:06:00Z - */ - updated_at?: string; - }; - LicenseWithRules: components["schemas"]["LicenseBase"] & { - license_rules?: components["schemas"]["LicenseRule"][]; - }; - Licenses: components["schemas"]["LicenseBase"][]; + schemas: { + Redirect: { + /** + * @description The feed ID that should be used in replacement of the current one. + * @example mdb-10 + */ + target_id?: string; + /** + * @description A comment explaining the redirect. + * @example Redirected because of a change of URL. + */ + comment?: string; + }; + BasicFeed: { + /** + * @description Unique identifier used as a key for the feeds table. + * @example mdb-1210 + */ + id?: string; + /** + * @example gtfs + * @enum {string} + */ + data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; + /** + * Format: date-time + * @description The date and time the feed was added to the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * @description The ID that can be use to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ */ + external_ids?: components['schemas']['ExternalIds']; + /** + * @description A commonly used name for the transit provider included in the feed. + * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) + */ + provider?: string; + /** + * @description Use to contact the feed producer. + * @example someEmail@ladotbus.com + */ + feed_contact_email?: string; + source_info?: components['schemas']['SourceInfo']; + redirects?: Array; + }; + Feed: components['schemas']['BasicFeed'] & + Omit< + { + /** + * @description Describes status of the Feed. Should be one of + * * `active` Feed should be used in public trip planners. + * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. + * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. + * * `development` Feed is being used for development purposes and should not be used in public trip planners. + * * `future` Feed is not yet active but will be in the future. + * @example deprecated + * @enum {string} + */ + status?: + | 'active' + | 'deprecated' + | 'inactive' + | 'development' + | 'future'; + /** + * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. + * @example true + */ + official?: boolean; + /** + * Format: date-time + * @description The date and time the official status was last updated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + official_updated_at?: string; + /** + * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. + * @example Bus + */ + feed_name?: string; + /** @description A note to clarify complex use cases for consumers. */ + note?: string; + /** @description A list of related links for the feed. */ + related_links?: Array; + }, + 'data_type' + >; + FeedRelatedLink: { + /** + * @description A short code to identify the type of link. + * @example next_1 + */ + code?: string; + /** + * @description A description of the link. + * @example The URL for a future feed version with an upcoming service period. + */ + description?: string; + /** + * Format: url + * @description The URL of the related link. + */ + url?: string; + /** + * Format: date-time + * @description The date and time the related link was created, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + }; + GtfsFeed: components['schemas']['Feed'] & { + /** + * @example gtfs + * @enum {string} + */ + data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; + locations?: components['schemas']['Locations']; + latest_dataset?: components['schemas']['LatestDataset']; + bounding_box?: components['schemas']['BoundingBox']; + /** + * @description The dataset ID of the dataset used to compute the visualization files. + * @example mdb-1210-202402121801 + */ + visualization_dataset_id?: string; + }; + GbfsFeed: components['schemas']['BasicFeed'] & { + /** + * @example gbfs + * @enum {string} + */ + data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; + locations?: components['schemas']['Locations']; + /** + * @description The system ID of the feed. This is a unique identifier for the system that the feed belongs to. + * @example system-1234 + */ + system_id?: string; + /** + * Format: url + * @description The URL of the provider's website. This is the website of the organization that operates the system that the feed belongs to. + * @example https://www.citybikenyc.com/ + */ + provider_url?: string; + /** @description A list of GBFS versions that the feed supports. Each version is represented by its version number and a list of endpoints. */ + versions?: Array; + bounding_box?: components['schemas']['BoundingBox']; + /** + * Format: date-time + * @description The date and time the bounding box was generated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + bounding_box_generated_at?: string; + }; + GbfsVersion: { + /** + * @description The version of the GBFS specification that the feed is using. This is a string that follows the semantic versioning format. + * @example 2.3 + */ + version?: string; + /** + * Format: date-time + * @description The date when the GBFS version was saved to the database. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * Format: date-time + * @description The date when the GBFS version was last updated in the database. + * @example 2023-07-10T22:06:00Z + */ + last_updated_at?: string; + /** + * @description Indicates the origin of the version information. Possible values are: + * * `autodiscovery`: Retrieved directly from the main GBFS autodiscovery URL. + * * `gbfs_versions`: Retrieved from the `gbfs_versions` endpoint. + * @enum {string} + */ + source?: 'autodiscovery' | 'gbfs_versions'; + /** @description A list of endpoints that are available in the version. */ + endpoints?: Array; + latest_validation_report?: components['schemas']['GbfsValidationReport']; + }; + /** @description A validation report of the GBFS feed. */ + GbfsValidationReport: { + /** + * Format: date-time + * @description The date and time the GBFS feed was validated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + validated_at?: string; + /** @example 10 */ + total_error?: number; + /** + * Format: url + * @description The URL of the JSON report of the validation summary. + * @example https://storage.googleapis.com/mobilitydata-datasets-prod/validation-reports/gbfs-1234-202402121801.json + */ + report_summary_url?: string; + /** + * @description The version of the validator used to validate the GBFS feed. + * @example 1.0.13 + */ + validator_version?: string; + }; + GbfsEndpoint: { + /** + * @description The name of the endpoint. This is a human-readable name for the endpoint. + * @example system_information + */ + name?: string; + /** + * Format: url + * @description The URL of the endpoint. This is the URL where the endpoint can be accessed. + * @example https://gbfs.citibikenyc.com/gbfs/system_information.json + */ + url?: string; + /** + * @description The language of the endpoint. This is the language that the endpoint is available in for versions 2.3 and prior. + * @example en + */ + language?: string; + /** + * @description A boolean value indicating if the endpoint is a feature. A feature is defined as an optionnal endpoint. + * @example false + */ + is_feature?: boolean; + }; + GbfsFeeds: Array; + GtfsRTFeed: components['schemas']['Feed'] & { + /** + * @example gtfs_rt + * @enum {string} + */ + data_type?: 'gtfs' | 'gtfs_rt' | 'gbfs'; + entity_types?: Array<'vp' | 'tu' | 'sa'>; + /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ + feed_references?: string[]; + locations?: components['schemas']['Locations']; + }; + SearchFeedItemResult: { + /** + * @description Unique identifier used as a key for the feeds table. + * @example mdb-1210 + */ + id: string; + /** + * @example gtfs + * @enum {string} + */ + data_type: 'gtfs' | 'gtfs_rt' | 'gbfs'; + /** + * @description Describes status of the Feed. Should be one of + * * `active` Feed should be used in public trip planners. + * * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners. + * * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information. + * * `development` Feed is being used for development purposes and should not be used in public trip planners. + * * `future` Feed is not yet active but will be in the future. + * @example deprecated + * @enum {string} + */ + status: 'active' | 'deprecated' | 'inactive' | 'development' | 'future'; + /** + * Format: date-time + * @description The date and time the feed was added to the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * @description A boolean value indicating if the feed is official or not. Official feeds are provided by the transit agency or a trusted source. + * @example true + */ + official?: boolean; + /** + * @description The ID that can be use to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ */ + external_ids?: components['schemas']['ExternalIds']; + /** + * @description A commonly used name for the transit provider included in the feed. + * @example Los Angeles Department of Transportation (LADOT, DASH, Commuter Express) + */ + provider?: string; + /** + * @description An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed. + * @example Bus + */ + feed_name?: string; + /** @description A note to clarify complex use cases for consumers. */ + note?: string; + /** + * @description Use to contact the feed producer. + * @example someEmail@ladotbus.com + */ + feed_contact_email?: string; + source_info?: components['schemas']['SourceInfo']; + redirects?: Array; + locations?: components['schemas']['Locations']; + latest_dataset?: components['schemas']['LatestDataset']; + entity_types?: Array<'vp' | 'tu' | 'sa'>; + /** @description The supported versions of the GBFS feed. */ + versions?: string[]; + /** @description A list of the GTFS feeds that the real time source is associated with, represented by their MDB source IDs. */ + feed_references?: string[]; + }; + Feeds: Array; + GtfsFeeds: Array; + GtfsRTFeeds: Array; + LatestDataset: { + /** + * @description Identifier of the latest dataset for this feed. + * @example mdb-1210-202402121801 + */ + id?: string; + /** + * Format: url + * @description As a convenience, the URL of the latest uploaded dataset hosted by MobilityData. It should be the same URL as the one found in the latest dataset id dataset. An alternative way to find this is to use the latest dataset id to obtain the dataset and then use its hosted_url. + * @example https://storage.googleapis.com/mobilitydata-datasets-prod/mdb-1210/mdb-1210-202402121801/mdb-1210-202402121801.zip + */ + hosted_url?: string; + bounding_box?: components['schemas']['BoundingBox']; + /** + * Format: date-time + * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + downloaded_at?: string; + /** + * @description A hash of the dataset. + * @example ad3805c4941cd37881ff40c342e831b5f5224f3d8a9a2ec3ac197d3652c78e42 + */ + hash?: string; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. + * @example 2023-07-10T06:00:00Z + */ + service_date_range_start?: string; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. + * @example 2023-07-10T05:59:59+00Z + */ + service_date_range_end?: string; + /** + * @description The timezone of the agency. + * @example America/Los_Angeles + */ + agency_timezone?: string; + /** + * @description The size of the zipped folder in MB. + * @example 100.2 + */ + zipped_folder_size_mb?: number; + /** + * @description The size of the unzipped folder in MB. + * @example 200.5 + */ + unzipped_folder_size_mb?: number; + validation_report?: { /** - * @description Matching a license - * @example { - * "license_id": "CC-BY-4.0", - * "license_url": "https://creativecommons.org/licenses/by/4.0/deed.nl", - * "normalized_url": "creativecommons.org/licenses/by/4.0", - * "match_type": "heuristic", - * "confidence": 0.99, - * "spdx_id": "CC-BY-4.0", - * "matched_name": "Creative Commons Attribution 4.0 International", - * "matched_catalog_url": "https://creativecommons.org/licenses/by/4.0/legalcode", - * "matched_source": "cc-resolver", - * "notes": "Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID.", - * "regional_id": "CC-BY-4.0-nl" - * } + * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview + * @example [ + * "Shapes", + * "Headsigns", + * "Wheelchair Accessibility" + * ] */ - MatchingLicense: { - /** - * @description Unique identifier for the license (typically SPDX ID) - * @example CC-BY-4.0 - */ - license_id?: string; - /** - * @description Original license URL provided for resolution - * @example https://creativecommons.org/licenses/by/4.0/ - */ - license_url?: string; - /** - * @description URL after normalization (lowercased, trimmed, protocol removed) - * @example creativecommons.org/licenses/by/4.0 - */ - normalized_url?: string; - /** - * @description Type of match performed. One of: - * - 'exact': Direct match found in database - * - 'heuristic': Matched via pattern-based rules (CC resolver, common patterns) - * - 'fuzzy': Similarity-based match against same-host licenses - * @example heuristic - */ - match_type?: string; - /** - * @description Match confidence score (0.0-1.0), examples: - * - 1.0: Exact match - * - 0.99: Creative Commons resolved - * - 0.95: Pattern heuristic match - * - 0.0-1.0: Fuzzy match score based on string similarity - * @example 0.99 - */ - confidence?: number; - /** - * @description SPDX License Identifier if matched (e.g., 'CC-BY-4.0', 'MIT') - * @example CC-BY-4.0 - */ - spdx_id?: string; - /** - * @description Human-readable name of the matched license - * @example Creative Commons Attribution 4.0 International - */ - matched_name?: string; - /** - * @description Canonical URL from the license catalog/database - * @example https://creativecommons.org/licenses/by/4.0/legalcode - */ - matched_catalog_url?: string; - /** - * @description Source of the match. Examples: - * - 'db.license': Exact match from database - * - 'cc-resolver': Creative Commons license resolver - * - 'pattern-heuristics': Generic pattern matching - * @example cc-resolver - */ - matched_source?: string; - /** - * @description Additional context about the match (e.g., version normalization, locale detection) - * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. - */ - notes?: string; - /** - * @description Regional/jurisdictional variant identifier for ported licenses - * (e.g., 'CC-BY-2.1-jp' for Japan-ported Creative Commons) - * @example CC-BY-4.0-nl - */ - regional_id?: string; - }; - /** @description List of MatchingLicense */ - MatchingLicenses: components["schemas"]["MatchingLicense"][]; + features?: string[]; + /** @example 10 */ + total_error?: number; + /** @example 20 */ + total_warning?: number; + /** @example 30 */ + total_info?: number; + /** @example 1 */ + unique_error_count?: number; + /** @example 2 */ + unique_warning_count?: number; + /** @example 3 */ + unique_info_count?: number; + }; + }; + /** + * @description The ID that can be use to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ */ + ExternalIds: Array; + ExternalId: { + /** + * @description The ID that can be used to find the feed data in an external or legacy database. + *
    + *
  • JBDA: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda--.
  • + *
  • TDG: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-.
  • + *
  • NTD: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-.
  • + *
  • TransitFeeds: Automatically imported from old TransitFeeds website. Pattern is tfs-.
  • + *
  • Transit.land: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-.
  • + *
+ * @example 1210 + */ + external_id?: string; + /** + * @description The source of the external ID, e.g. the name of the database where the external ID can be used. + * @example mdb + */ + source?: string; + }; + SourceInfo: { + /** + * Format: url + * @description URL where the producer is providing the dataset. Refer to the authentication information to know how to access this URL. + * @example https://ladotbus.com/gtfs + */ + producer_url?: string; + /** + * @description Defines the type of authentication required to access the `producer_url`. Valid values for this field are: + * * 0 or (empty) - No authentication required. + * * 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information. + * * 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request. + * When not provided, the authentication type is assumed to be 0. + * @example 2 + * @enum {integer} + */ + authentication_type?: 0 | 1 | 2; + /** + * Format: url + * @description Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for `authentication_type=1` and `authentication_type=2`. + * @example https://apidevelopers.ladottransit.com + */ + authentication_info_url?: string; + /** + * @description Defines the name of the parameter to pass in the URL to provide the API key. This field is required for `authentication_type=1` and `authentication_type=2`. + * @example Ocp-Apim-Subscription-Key + */ + api_key_parameter_name?: string; + /** + * Format: url + * @description A URL where to find the license for the feed. + * @example https://www.ladottransit.com/dla.html + */ + license_url?: string; + /** + * @description Id of the feed license that can be used to query the license endpoint. + * @example 0BSD + */ + license_id?: string; + /** + * @description true if the license is SPDX. false if not. + * @example true + */ + license_is_spdx?: boolean; + /** + * @description Notes concerning the relation between the feed and the license. + * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. + */ + license_notes?: string; + }; + Locations: Array; + Location: { + /** + * @description ISO 3166-1 alpha-2 code designating the country where the system is located. For a list of valid codes [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). + * @example US + */ + country_code?: string; + /** + * @description The english name of the country where the system is located. + * @example United States + */ + country?: string; + /** + * @description ISO 3166-2 english subdivision name designating the subdivision (e.g province, state, region) where the system is located. For a list of valid names [see here](https://unece.org/trade/uncefact/unlocode-country-subdivisions-iso-3166-2). + * @example California + */ + subdivision_name?: string; + /** + * @description Primary municipality in english in which the transit system is located. + * @example Los Angeles + */ + municipality?: string; + }; + BasicDataset: { + /** + * @description Unique identifier used as a key for the datasets table. + * @example mdb-10-202402080058 + */ + id?: string; + /** + * @description ID of the feed related to this dataset. + * @example mdb-10 + */ + feed_id?: string; + }; + GtfsDataset: components['schemas']['BasicDataset'] & { + /** + * @description The URL of the dataset data as hosted by MobilityData. No authentication required. + * @example https://storage.googleapis.com/storage/v1/b/mdb-latest/o/us-maine-casco-bay-lines-gtfs-1.zip?alt=media + */ + hosted_url?: string; + /** @description A note to clarify complex use cases for consumers. */ + note?: string; + /** + * Format: date-time + * @description The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + downloaded_at?: string; + /** + * @description A hash of the dataset. + * @example 6497e85e34390b8b377130881f2f10ec29c18a80dd6005d504a2038cdd00aa71 + */ + hash?: string; + bounding_box?: components['schemas']['BoundingBox']; + validation_report?: components['schemas']['ValidationReport']; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day. + * @example 2023-07-10T06:00:00Z + */ + service_date_range_start?: string; + /** + * Format: date-time + * @description The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day. + * @example 2023-07-10T05:59:59+00Z + */ + service_date_range_end?: string; + /** + * @description The timezone of the agency. + * @example America/Los_Angeles + */ + agency_timezone?: string; + /** + * @description The size of the zipped folder in MB. + * @example 100.2 + */ + zipped_folder_size_mb?: number; + /** + * @description The size of the unzipped folder in MB. + * @example 200.5 + */ + unzipped_folder_size_mb?: number; + }; + /** @description Bounding box of the dataset when it was first added to the catalog. */ + BoundingBox: { + /** + * @description The minimum latitude for the dataset bounding box. + * @example 33.721601 + */ + minimum_latitude?: number; + /** + * @description The maximum latitude for the dataset bounding box. + * @example 34.323077 + */ + maximum_latitude?: number; + /** + * @description The minimum longitude for the dataset bounding box. + * @example -118.882829 + */ + minimum_longitude?: number; + /** + * @description The maximum longitude for the dataset bounding box. + * @example -118.131748 + */ + maximum_longitude?: number; }; - responses: never; + GtfsDatasets: Array; + Metadata: { + /** @example 1.0.0 */ + version?: string; + /** @example 8635fdac4fbff025b4eaca6972fcc9504bc1552d */ + commit_hash?: string; + }; + /** @description Validation report */ + ValidationReport: { + /** + * Format: date-time + * @description The date and time the report was generated, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + validated_at?: string; + /** + * @description List of GTFS features associated to the dataset. More information, https://gtfs.org/getting-started/features/overview + * @example [ + * "Shapes", + * "Headsigns", + * "Wheelchair Accessibility" + * ] + */ + features?: string[]; + /** @example 4.2.0 */ + validator_version?: string; + /** @example 10 */ + total_error?: number; + /** @example 20 */ + total_warning?: number; + /** @example 30 */ + total_info?: number; + /** @example 1 */ + unique_error_count?: number; + /** @example 2 */ + unique_warning_count?: number; + /** @example 3 */ + unique_info_count?: number; + /** + * Format: url + * @description JSON validation report URL + * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.json + */ + url_json?: string; + /** + * Format: url + * @description HTML validation report URL + * @example https://storage.googleapis.com/mobilitydata-datasets-dev/mdb-10/mdb-10-202312181718/mdb-10-202312181718-report-4_2_0.html + */ + url_html?: string; + }; + LicenseRule: { + /** + * @description Name of the rule. + * @example commercial-use + */ + name?: string; + /** + * @description Label of the rule. + * @example Commercial use + */ + label?: string; + /** + * @description Description of the rule. + * @example This license allows the software or data to be used for commercial purposes. + */ + description?: string; + /** + * @description Type of rule. + * @enum {string} + */ + type?: 'permission' | 'condition' | 'limitation'; + }; + LicenseBase: { + /** + * @description Unique identifier for the license. + * @example 0BSD + */ + id?: string; + /** + * @description The type of license. + * @example standard + */ + type?: string; + /** @description true if license id spdx. */ + is_spdx?: boolean; + /** + * @description The user facing name of the license. + * @example BSD Zero Clause License + */ + name?: string; + /** + * Format: url + * @description A URL where to find the license for the feed. + * @example https://www.ladottransit.com/dla.html + */ + url?: string; + /** + * @description The description of the license. + * @example This is the 0BSD license. + */ + description?: string; + /** + * Format: date-time + * @description The date and time the license was added to the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + created_at?: string; + /** + * Format: date-time + * @description The last date and time the license was updated in the database, in ISO 8601 date-time format. + * @example 2023-07-10T22:06:00Z + */ + updated_at?: string; + }; + LicenseWithRules: components['schemas']['LicenseBase'] & { + license_rules?: Array; + }; + Licenses: Array; + /** + * @description Matching a license + * @example { + * "license_id": "CC-BY-4.0", + * "license_url": "https://creativecommons.org/licenses/by/4.0/deed.nl", + * "normalized_url": "creativecommons.org/licenses/by/4.0", + * "match_type": "heuristic", + * "confidence": 0.99, + * "spdx_id": "CC-BY-4.0", + * "matched_name": "Creative Commons Attribution 4.0 International", + * "matched_catalog_url": "https://creativecommons.org/licenses/by/4.0/legalcode", + * "matched_source": "cc-resolver", + * "notes": "Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID.", + * "regional_id": "CC-BY-4.0-nl" + * } + */ + MatchingLicense: { + /** + * @description Unique identifier for the license (typically SPDX ID) + * @example CC-BY-4.0 + */ + license_id?: string; + /** + * @description Original license URL provided for resolution + * @example https://creativecommons.org/licenses/by/4.0/ + */ + license_url?: string; + /** + * @description URL after normalization (lowercased, trimmed, protocol removed) + * @example creativecommons.org/licenses/by/4.0 + */ + normalized_url?: string; + /** + * @description Type of match performed. One of: + * - 'exact': Direct match found in database + * - 'heuristic': Matched via pattern-based rules (CC resolver, common patterns) + * - 'fuzzy': Similarity-based match against same-host licenses + * @example heuristic + */ + match_type?: string; + /** + * @description Match confidence score (0.0-1.0), examples: + * - 1.0: Exact match + * - 0.99: Creative Commons resolved + * - 0.95: Pattern heuristic match + * - 0.0-1.0: Fuzzy match score based on string similarity + * @example 0.99 + */ + confidence?: number; + /** + * @description SPDX License Identifier if matched (e.g., 'CC-BY-4.0', 'MIT') + * @example CC-BY-4.0 + */ + spdx_id?: string; + /** + * @description Human-readable name of the matched license + * @example Creative Commons Attribution 4.0 International + */ + matched_name?: string; + /** + * @description Canonical URL from the license catalog/database + * @example https://creativecommons.org/licenses/by/4.0/legalcode + */ + matched_catalog_url?: string; + /** + * @description Source of the match. Examples: + * - 'db.license': Exact match from database + * - 'cc-resolver': Creative Commons license resolver + * - 'pattern-heuristics': Generic pattern matching + * @example cc-resolver + */ + matched_source?: string; + /** + * @description Additional context about the match (e.g., version normalization, locale detection) + * @example Detected locale/jurisdiction port 'nl'. SPDX does not list ported CC licenses; using canonical ID. + */ + notes?: string; + /** + * @description Regional/jurisdictional variant identifier for ported licenses + * (e.g., 'CC-BY-2.1-jp' for Japan-ported Creative Commons) + * @example CC-BY-4.0-nl + */ + regional_id?: string; + }; + /** @description List of MatchingLicense */ + MatchingLicenses: Array; + }; + responses: never; + parameters: { + /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ + status: 'active' | 'deprecated' | 'inactive' | 'development' | 'future'; + /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ + statuses: Array< + 'active' | 'deprecated' | 'inactive' | 'development' | 'future' + >; + /** @description Filter feeds by their GTFS features. [GTFS features definitions defined here](https://gtfs.org/getting-started/features/overview) */ + feature: string[]; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider: string; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url: string; + /** @description Filter feeds by their entity type. Expects a comma separated list of all types to fetch. */ + entity_types: string; + /** @description Filter feeds by their exact country code. */ + country_code: string; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + subdivision_name: string; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + municipality: string; + /** @description Filter feed datasets with downloaded date greater or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_after: string; + /** @description Filter feed datasets with downloaded date less or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_before: string; + /** + * @description Specify the minimum and maximum latitudes of the bounding box to use for filtering. + *
Filters by the bounding box of the `LatestDataset` for a feed. + *
Must be specified alongside `dataset_longitudes`. + */ + dataset_latitudes: string; + /** @description Specify the minimum and maximum longitudes of the bounding box to use for filtering.
Filters by the bounding box of the `LatestDataset` for a feed.
Must be specified alongside `dataset_latitudes`. */ + dataset_longitudes: string; + /** + * @description Specify the filtering method to use with the dataset_latitudes and dataset_longitudes parameters. + * * `completely_enclosed` - Get resources that are completely enclosed in the specified bounding box. + * * `partially_enclosed` - Get resources that are partially enclosed in the specified bounding box. + * * `disjoint` - Get resources that are completely outside the specified bounding box. + * @example completely_enclosed + */ + bounding_filter_method: + | 'completely_enclosed' + | 'partially_enclosed' + | 'disjoint'; + /** @description If true, only return the latest dataset. */ + latest_query_param: boolean; + /** @description If true, only return official feeds. */ + is_official_query_param: boolean; + /** @description The number of items to be returned. */ + limit_query_param_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_gtfs_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_gtfs_rt_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_datasets_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_search_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_gbfs_feeds_endpoint: number; + /** @description The number of items to be returned. */ + limit_query_param_licenses_endpoint: number; + /** @description Offset of the first item to return. */ + offset: number; + /** @description General search query to match against transit provider, location, and feed name. */ + search_text_query_param: string; + /** @description Comma separated list of GBFS versions to filter by. */ + version_query_param: string; + /** @description Comma separated list of data types to filter by. Valid values are gtfs, gtfs_rt and gbfs. */ + data_type_query_param: string; + /** @description The feed ID of the requested feed. */ + feed_id_query_param: string; + /** @description The feed ID of the requested feed. */ + feed_id_path_param: string; + /** @description The license ID of the requested license. */ + license_id_path_param: string; + /** @description The ID of the feed for which to obtain datasets. */ + feed_id_of_datasets_path_param: string; + /** @description The ID of the requested dataset. */ + dataset_id_path_param: string; + /** @description Filter feeds by their system ID. This is a unique identifier for the system that the feed belongs to. */ + system_id_param: string; + /** @description Filter feeds by their supported GBFS version. This is a string that follows the semantic versioning format. */ + version_param: string; + /** @description Comma separated list of license IDs to filter by. */ + license_ids_query_param: string; + }; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + getFeeds: { parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components['parameters']['limit_query_param_feeds_endpoint']; + /** @description Offset of the first item to return. */ + offset?: components['parameters']['offset']; /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ - status: "active" | "deprecated" | "inactive" | "development" | "future"; - /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ - statuses: ("active" | "deprecated" | "inactive" | "development" | "future")[]; - /** @description Filter feeds by their GTFS features. [GTFS features definitions defined here](https://gtfs.org/getting-started/features/overview) */ - feature: string[]; + status?: components['parameters']['status']; /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - provider: string; + provider?: components['parameters']['provider']; /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - producer_url: string; - /** @description Filter feeds by their entity type. Expects a comma separated list of all types to fetch. */ - entity_types: string; + producer_url?: components['parameters']['producer_url']; + /** @description If true, only return official feeds. */ + is_official?: components['parameters']['is_official_query_param']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the feeds common info. This info has a reduced set of fields that are common to all types of feeds. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['Feeds']; + }; + }; + }; + }; + getFeed: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the feeds common info for the provided ID. This info has a reduced set of fields that are common to all types of feeds. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['Feed']; + }; + }; + }; + }; + getGtfsFeeds: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components['parameters']['limit_query_param_gtfs_feeds_endpoint']; + /** @description Offset of the first item to return. */ + offset?: components['parameters']['offset']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider?: components['parameters']['provider']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url?: components['parameters']['producer_url']; /** @description Filter feeds by their exact country code. */ - country_code: string; + country_code?: components['parameters']['country_code']; /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - subdivision_name: string; + subdivision_name?: components['parameters']['subdivision_name']; /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - municipality: string; - /** @description Filter feed datasets with downloaded date greater or equal to given date. Date should be in ISO 8601 date-time format. */ - downloaded_after: string; - /** @description Filter feed datasets with downloaded date less or equal to given date. Date should be in ISO 8601 date-time format. */ - downloaded_before: string; + municipality?: components['parameters']['municipality']; /** * @description Specify the minimum and maximum latitudes of the bounding box to use for filtering. *
Filters by the bounding box of the `LatestDataset` for a feed. *
Must be specified alongside `dataset_longitudes`. */ - dataset_latitudes: string; + dataset_latitudes?: components['parameters']['dataset_latitudes']; /** @description Specify the minimum and maximum longitudes of the bounding box to use for filtering.
Filters by the bounding box of the `LatestDataset` for a feed.
Must be specified alongside `dataset_latitudes`. */ - dataset_longitudes: string; + dataset_longitudes?: components['parameters']['dataset_longitudes']; /** * @description Specify the filtering method to use with the dataset_latitudes and dataset_longitudes parameters. * * `completely_enclosed` - Get resources that are completely enclosed in the specified bounding box. @@ -1139,535 +1287,369 @@ export interface components { * * `disjoint` - Get resources that are completely outside the specified bounding box. * @example completely_enclosed */ - bounding_filter_method: "completely_enclosed" | "partially_enclosed" | "disjoint"; - /** @description If true, only return the latest dataset. */ - latest_query_param: boolean; + bounding_filter_method?: components['parameters']['bounding_filter_method']; /** @description If true, only return official feeds. */ - is_official_query_param: boolean; - /** @description The number of items to be returned. */ - limit_query_param_feeds_endpoint: number; - /** @description The number of items to be returned. */ - limit_query_param_gtfs_feeds_endpoint: number; - /** @description The number of items to be returned. */ - limit_query_param_gtfs_rt_feeds_endpoint: number; - /** @description The number of items to be returned. */ - limit_query_param_datasets_endpoint: number; - /** @description The number of items to be returned. */ - limit_query_param_search_endpoint: number; + is_official?: components['parameters']['is_official_query_param']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the GTFS feeds info. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GtfsFeeds']; + }; + }; + }; + }; + getGtfsRtFeeds: { + parameters: { + query?: { /** @description The number of items to be returned. */ - limit_query_param_gbfs_feeds_endpoint: number; + limit?: components['parameters']['limit_query_param_gtfs_rt_feeds_endpoint']; + /** @description Offset of the first item to return. */ + offset?: components['parameters']['offset']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider?: components['parameters']['provider']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url?: components['parameters']['producer_url']; + /** @description Filter feeds by their entity type. Expects a comma separated list of all types to fetch. */ + entity_types?: components['parameters']['entity_types']; + /** @description Filter feeds by their exact country code. */ + country_code?: components['parameters']['country_code']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + subdivision_name?: components['parameters']['subdivision_name']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + municipality?: components['parameters']['municipality']; + /** @description If true, only return official feeds. */ + is_official?: components['parameters']['is_official_query_param']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the GTFS Realtime feeds info. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GtfsRTFeeds']; + }; + }; + }; + }; + getGbfsFeeds: { + parameters: { + query?: { /** @description The number of items to be returned. */ - limit_query_param_licenses_endpoint: number; + limit?: components['parameters']['limit_query_param_gbfs_feeds_endpoint']; /** @description Offset of the first item to return. */ - offset: number; - /** @description General search query to match against transit provider, location, and feed name. */ - search_text_query_param: string; - /** @description Comma separated list of GBFS versions to filter by. */ - version_query_param: string; - /** @description Comma separated list of data types to filter by. Valid values are gtfs, gtfs_rt and gbfs. */ - data_type_query_param: string; + offset?: components['parameters']['offset']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + provider?: components['parameters']['provider']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + producer_url?: components['parameters']['producer_url']; + /** @description Filter feeds by their exact country code. */ + country_code?: components['parameters']['country_code']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + subdivision_name?: components['parameters']['subdivision_name']; + /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ + municipality?: components['parameters']['municipality']; + /** @description Filter feeds by their system ID. This is a unique identifier for the system that the feed belongs to. */ + system_id?: components['parameters']['system_id_param']; + /** @description Filter feeds by their supported GBFS version. This is a string that follows the semantic versioning format. */ + version?: components['parameters']['version_param']; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the GBFS feeds info. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GbfsFeeds']; + }; + }; + }; + }; + getGtfsFeed: { + parameters: { + query?: never; + header?: never; + path: { /** @description The feed ID of the requested feed. */ - feed_id_query_param: string; + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested feed. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GtfsFeed']; + }; + }; + }; + }; + getGtfsRtFeed: { + parameters: { + query?: never; + header?: never; + path: { /** @description The feed ID of the requested feed. */ - feed_id_path_param: string; - /** @description The license ID of the requested license. */ - license_id_path_param: string; + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested feed. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GtfsRTFeed']; + }; + }; + }; + }; + getGbfsFeed: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested feed. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GbfsFeed']; + }; + }; + }; + }; + getGtfsFeedDatasets: { + parameters: { + query?: { + /** @description If true, only return the latest dataset. */ + latest?: components['parameters']['latest_query_param']; + /** @description The number of items to be returned. */ + limit?: components['parameters']['limit_query_param_datasets_endpoint']; + /** @description Offset of the first item to return. */ + offset?: components['parameters']['offset']; + /** @description Filter feed datasets with downloaded date greater or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_after?: components['parameters']['downloaded_after']; + /** @description Filter feed datasets with downloaded date less or equal to given date. Date should be in ISO 8601 date-time format. */ + downloaded_before?: components['parameters']['downloaded_before']; + }; + header?: never; + path: { /** @description The ID of the feed for which to obtain datasets. */ - feed_id_of_datasets_path_param: string; - /** @description The ID of the requested dataset. */ - dataset_id_path_param: string; - /** @description Filter feeds by their system ID. This is a unique identifier for the system that the feed belongs to. */ - system_id_param: string; - /** @description Filter feeds by their supported GBFS version. This is a string that follows the semantic versioning format. */ - version_param: string; - /** @description Comma separated list of license IDs to filter by. */ - license_ids_query_param: string; + id: components['parameters']['feed_id_of_datasets_path_param']; + }; + cookie?: never; }; - requestBodies: never; - headers: never; - pathItems: never; -} -export type $defs = Record; -export interface operations { - getFeeds: { - parameters: { - query?: { - /** @description The number of items to be returned. */ - limit?: components["parameters"]["limit_query_param_feeds_endpoint"]; - /** @description Offset of the first item to return. */ - offset?: components["parameters"]["offset"]; - /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ - status?: components["parameters"]["status"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - provider?: components["parameters"]["provider"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - producer_url?: components["parameters"]["producer_url"]; - /** @description If true, only return official feeds. */ - is_official?: components["parameters"]["is_official_query_param"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the feeds common info. This info has a reduced set of fields that are common to all types of feeds. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Feeds"]; - }; - }; - }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested datasets. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GtfsDatasets']; + }; + }; }; - getFeed: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the feeds common info for the provided ID. This info has a reduced set of fields that are common to all types of feeds. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Feed"]; - }; - }; - }; + }; + getGtfsFeedGtfsRtFeeds: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The feed ID of the requested feed. */ + id: components['parameters']['feed_id_path_param']; + }; + cookie?: never; }; - getGtfsFeeds: { - parameters: { - query?: { - /** @description The number of items to be returned. */ - limit?: components["parameters"]["limit_query_param_gtfs_feeds_endpoint"]; - /** @description Offset of the first item to return. */ - offset?: components["parameters"]["offset"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - provider?: components["parameters"]["provider"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - producer_url?: components["parameters"]["producer_url"]; - /** @description Filter feeds by their exact country code. */ - country_code?: components["parameters"]["country_code"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - subdivision_name?: components["parameters"]["subdivision_name"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - municipality?: components["parameters"]["municipality"]; - /** - * @description Specify the minimum and maximum latitudes of the bounding box to use for filtering. - *
Filters by the bounding box of the `LatestDataset` for a feed. - *
Must be specified alongside `dataset_longitudes`. - */ - dataset_latitudes?: components["parameters"]["dataset_latitudes"]; - /** @description Specify the minimum and maximum longitudes of the bounding box to use for filtering.
Filters by the bounding box of the `LatestDataset` for a feed.
Must be specified alongside `dataset_latitudes`. */ - dataset_longitudes?: components["parameters"]["dataset_longitudes"]; - /** - * @description Specify the filtering method to use with the dataset_latitudes and dataset_longitudes parameters. - * * `completely_enclosed` - Get resources that are completely enclosed in the specified bounding box. - * * `partially_enclosed` - Get resources that are partially enclosed in the specified bounding box. - * * `disjoint` - Get resources that are completely outside the specified bounding box. - * @example completely_enclosed - */ - bounding_filter_method?: components["parameters"]["bounding_filter_method"]; - /** @description If true, only return official feeds. */ - is_official?: components["parameters"]["is_official_query_param"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the GTFS feeds info. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GtfsFeeds"]; - }; - }; - }; + requestBody?: never; + responses: { + /** @description Successful pull of the GTFS Realtime feeds info related to a GTFS feed. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GtfsRTFeeds']; + }; + }; }; - getGtfsRtFeeds: { - parameters: { - query?: { - /** @description The number of items to be returned. */ - limit?: components["parameters"]["limit_query_param_gtfs_rt_feeds_endpoint"]; - /** @description Offset of the first item to return. */ - offset?: components["parameters"]["offset"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - provider?: components["parameters"]["provider"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - producer_url?: components["parameters"]["producer_url"]; - /** @description Filter feeds by their entity type. Expects a comma separated list of all types to fetch. */ - entity_types?: components["parameters"]["entity_types"]; - /** @description Filter feeds by their exact country code. */ - country_code?: components["parameters"]["country_code"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - subdivision_name?: components["parameters"]["subdivision_name"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - municipality?: components["parameters"]["municipality"]; - /** @description If true, only return official feeds. */ - is_official?: components["parameters"]["is_official_query_param"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the GTFS Realtime feeds info. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GtfsRTFeeds"]; - }; - }; - }; + }; + getDatasetGtfs: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The ID of the requested dataset. */ + id: components['parameters']['dataset_id_path_param']; + }; + cookie?: never; }; - getGbfsFeeds: { - parameters: { - query?: { - /** @description The number of items to be returned. */ - limit?: components["parameters"]["limit_query_param_gbfs_feeds_endpoint"]; - /** @description Offset of the first item to return. */ - offset?: components["parameters"]["offset"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - provider?: components["parameters"]["provider"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - producer_url?: components["parameters"]["producer_url"]; - /** @description Filter feeds by their exact country code. */ - country_code?: components["parameters"]["country_code"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - subdivision_name?: components["parameters"]["subdivision_name"]; - /** @description List only feeds with the specified value. Can be a partial match. Case insensitive. */ - municipality?: components["parameters"]["municipality"]; - /** @description Filter feeds by their system ID. This is a unique identifier for the system that the feed belongs to. */ - system_id?: components["parameters"]["system_id_param"]; - /** @description Filter feeds by their supported GBFS version. This is a string that follows the semantic versioning format. */ - version?: components["parameters"]["version_param"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the GBFS feeds info. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GbfsFeeds"]; - }; - }; - }; + requestBody?: never; + responses: { + /** @description Successful pull of the requested dataset. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['GtfsDataset']; + }; + }; }; - getGtfsFeed: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the requested feed. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GtfsFeed"]; - }; - }; - }; + }; + getMetadata: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; - getGtfsRtFeed: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the requested feed. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GtfsRTFeed"]; - }; - }; - }; + requestBody?: never; + responses: { + /** @description Successful pull of the metadata. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['Metadata']; + }; + }; }; - getGbfsFeed: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the requested feed. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GbfsFeed"]; - }; - }; - }; + }; + searchFeeds: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components['parameters']['limit_query_param_search_endpoint']; + /** @description Offset of the first item to return. */ + offset?: components['parameters']['offset']; + /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ + status?: components['parameters']['statuses']; + /** @description The feed ID of the requested feed. */ + feed_id?: components['parameters']['feed_id_query_param']; + /** @description Comma separated list of data types to filter by. Valid values are gtfs, gtfs_rt and gbfs. */ + data_type?: components['parameters']['data_type_query_param']; + /** @description If true, only return official feeds. */ + is_official?: components['parameters']['is_official_query_param']; + /** @description Comma separated list of GBFS versions to filter by. */ + version?: components['parameters']['version_query_param']; + /** @description General search query to match against transit provider, location, and feed name. */ + search_query?: components['parameters']['search_text_query_param']; + /** @description Filter feeds by their GTFS features. [GTFS features definitions defined here](https://gtfs.org/getting-started/features/overview) */ + feature?: components['parameters']['feature']; + /** @description Comma separated list of license IDs to filter by. */ + license_ids?: components['parameters']['license_ids_query_param']; + }; + header?: never; + path?: never; + cookie?: never; }; - getGtfsFeedDatasets: { - parameters: { - query?: { - /** @description If true, only return the latest dataset. */ - latest?: components["parameters"]["latest_query_param"]; - /** @description The number of items to be returned. */ - limit?: components["parameters"]["limit_query_param_datasets_endpoint"]; - /** @description Offset of the first item to return. */ - offset?: components["parameters"]["offset"]; - /** @description Filter feed datasets with downloaded date greater or equal to given date. Date should be in ISO 8601 date-time format. */ - downloaded_after?: components["parameters"]["downloaded_after"]; - /** @description Filter feed datasets with downloaded date less or equal to given date. Date should be in ISO 8601 date-time format. */ - downloaded_before?: components["parameters"]["downloaded_before"]; - }; - header?: never; - path: { - /** @description The ID of the feed for which to obtain datasets. */ - id: components["parameters"]["feed_id_of_datasets_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the requested datasets. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GtfsDatasets"]; - }; - }; - }; + requestBody?: never; + responses: { + /** @description Successful search feeds using full-text search on feed, location and provider's information, potentially returning a mixed array of different entity types. */ + 200: { + headers: Record; + content: { + 'application/json': { + /** @description The total number of matching entities found regardless the limit and offset parameters. */ + total?: number; + results?: Array; + }; + }; + }; }; - getGtfsFeedGtfsRtFeeds: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The feed ID of the requested feed. */ - id: components["parameters"]["feed_id_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the GTFS Realtime feeds info related to a GTFS feed. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GtfsRTFeeds"]; - }; - }; - }; + }; + getLicenses: { + parameters: { + query?: { + /** @description The number of items to be returned. */ + limit?: components['parameters']['limit_query_param_licenses_endpoint']; + /** @description Offset of the first item to return. */ + offset?: components['parameters']['offset']; + }; + header?: never; + path?: never; + cookie?: never; }; - getDatasetGtfs: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The ID of the requested dataset. */ - id: components["parameters"]["dataset_id_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the requested dataset. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["GtfsDataset"]; - }; - }; - }; + requestBody?: never; + responses: { + /** @description Successful pull of the licenses info. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['Licenses']; + }; + }; }; - getMetadata: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the metadata. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Metadata"]; - }; - }; - }; + }; + getLicense: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The license ID of the requested license. */ + id: components['parameters']['license_id_path_param']; + }; + cookie?: never; }; - searchFeeds: { - parameters: { - query?: { - /** @description The number of items to be returned. */ - limit?: components["parameters"]["limit_query_param_search_endpoint"]; - /** @description Offset of the first item to return. */ - offset?: components["parameters"]["offset"]; - /** @description Filter feeds by their status. [Status definitions defined here](https://github.com/MobilityData/mobility-database-catalogs?tab=readme-ov-file#gtfs-schedule-schema) */ - status?: components["parameters"]["statuses"]; - /** @description The feed ID of the requested feed. */ - feed_id?: components["parameters"]["feed_id_query_param"]; - /** @description Comma separated list of data types to filter by. Valid values are gtfs, gtfs_rt and gbfs. */ - data_type?: components["parameters"]["data_type_query_param"]; - /** @description If true, only return official feeds. */ - is_official?: components["parameters"]["is_official_query_param"]; - /** @description Comma separated list of GBFS versions to filter by. */ - version?: components["parameters"]["version_query_param"]; - /** @description General search query to match against transit provider, location, and feed name. */ - search_query?: components["parameters"]["search_text_query_param"]; - /** @description Filter feeds by their GTFS features. [GTFS features definitions defined here](https://gtfs.org/getting-started/features/overview) */ - feature?: components["parameters"]["feature"]; - /** @description Comma separated list of license IDs to filter by. */ - license_ids?: components["parameters"]["license_ids_query_param"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful search feeds using full-text search on feed, location and provider's information, potentially returning a mixed array of different entity types. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @description The total number of matching entities found regardless the limit and offset parameters. */ - total?: number; - results?: components["schemas"]["SearchFeedItemResult"][]; - }; - }; - }; - }; + requestBody?: never; + responses: { + /** @description Successful pull of the license info for the provided ID. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['LicenseWithRules']; + }; + }; }; - getLicenses: { - parameters: { - query?: { - /** @description The number of items to be returned. */ - limit?: components["parameters"]["limit_query_param_licenses_endpoint"]; - /** @description Offset of the first item to return. */ - offset?: components["parameters"]["offset"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the licenses info. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Licenses"]; - }; - }; - }; + }; + getMatchingLicenses: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; - getLicense: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The license ID of the requested license. */ - id: components["parameters"]["license_id_path_param"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful pull of the license info for the provided ID. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["LicenseWithRules"]; - }; - }; - }; + /** @description Payload containing the license URL to match against the database. */ + requestBody: { + content: { + 'application/json': { + /** + * Format: url + * @description The license URL to resolve and match against the database. + * @example https://creativecommons.org/licenses/by/4.0/deed.nl + */ + license_url: string; + }; + }; }; - getMatchingLicenses: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description Payload containing the license URL to match against the database. */ - requestBody: { - content: { - "application/json": { - /** - * Format: url - * @description The license URL to resolve and match against the database. - * @example https://creativecommons.org/licenses/by/4.0/deed.nl - */ - license_url: string; - }; - }; - }; - responses: { - /** @description The list of matching licenses if any. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MatchingLicenses"]; - }; - }; - }; + responses: { + /** @description The list of matching licenses if any. */ + 200: { + headers: Record; + content: { + 'application/json': components['schemas']['MatchingLicenses']; + }; + }; }; + }; }