diff --git a/gtfs.yml b/gtfs.yml index 746df907d..7774b8e7c 100644 --- a/gtfs.yml +++ b/gtfs.yml @@ -233,7 +233,12 @@ text: Not possible (2) columnWidth: 12 helpContent: "The wheelchair_boarding field identifies whether wheelchair boardings are possible from the specified stop or station. The field can have the following values:" - + - name: "stop_area_ids" + required: false + inputType: GTFS_STOP_AREA + bulkEditEnabled: true + columnWidth: 12 + helpContent: "The area_id field defines the area that this stop belongs to. This is used to group stops together in a logical way, such as all stops in a particular neighborhood or district. If this stop is not part of an area, leave this field blank." - id: route name: routes.txt @@ -549,6 +554,18 @@ inputType: URL columnWidth: 12 helpContent: + - name: network_id + required: false + inputType: GTFS_NETWORK + bulkEditEnabled: true + columnWidth: 12 + helpContent: "The network_id field defines the network that this route belongs to. This is used to group routes together in a logical way, such as all routes in a particular region or operated by a particular brand. If this route is not part of a network, leave this field blank." + - name: route_network_ids + required: false + inputType: GTFS_ROUTE_NETWORK + bulkEditEnabled: true + columnWidth: 12 + helpContent: "The network_id field defines the network that this route belongs to. This is used to group routes together in a logical way, such as all routes in a particular region or operated by a particular brand. If this route is not part of a network, leave this field blank." - id: trip name: trips.txt @@ -1017,3 +1034,153 @@ required: false - name: added_service required: false + +# Fares v2 + +- id: fareproduct + name: fare_products.txt + helpContent: Used to describe the range of fares available for purchase by riders or taken into account when computing the total fare for journeys with multiple legs, such as transfer costs. + fields: + - name: fare_product_id + required: true + inputType: GTFS_ID + - name: fare_product_name + required: false + inputType: TEXT + # FARE-TODO: Add rider_category_id? + - name: fare_media_id + required: false + inputType: GTFS_FARE_MEDIA + - name: amount + inputType: NUMBER + required: true + - name: currency + required: true + inputType: DROPDOWN + bulkEditEnabled: true + options: + - value: USD + text: US dollar (USD) + - value: AUD + text: Australian dollar (AUD) + - value: CAD + text: Canadian dollar (CAD) + - value: CHF + text: Swiss franc (CHF) + - value: CNH + text: Chinese renminbi (CNH) + - value: EUR + text: Euro (EUR) + - value: GBP + text: Pound sterling (GBP) + - value: JPY + text: Japanese yen (JPY) + - value: MXN + text: Mexican peso (MXN) + - value: NZD + text: New Zealand dollar (NZD) + - value: SEK + text: Swedish krona (SEK) +- id: faremedia + name: fare_media.txt + helpContent: To describe the different fare media that can be employed to use fare products. Fare media are physical or virtual holders used for the representation and/or validation of a fare product. + fields: + - name: fare_media_id + required: true + inputType: GTFS_ID + - name: fare_media_name + inputType: TEXT + - name: fare_media_type + required: true + inputType: DROPDOWN + options: + - value: '0' + text: None (0) + - value: '1' + text: Physical paper ticket (1) + - value: '2' + text: Physical transit card (2) + - value: '3' + text: cEMV (3) + - value: '4' + text: Mobile app (4) +- id: faretransferrule + name: fare_transfer_rules.txt + helpContent: Fare rules for transfers between legs of travel defined in fare_leg_rules.txt. + fields: + - name: from_leg_group_id + required: false + inputType: TEXT # FARE-TODO: Needs to reference fare_leg_rules + - name: to_leg_group_id + required: false + inputType: TEXT # FARE-TODO: Needs to reference fare_leg_rules + - name: transfer_count + inputType: NUMBER # FARE-TODO: NON-ZERO INT + - name: duration_limit + inputType: POSITIVE_INT + - name: duration_limit_type + inputType: DROPDOWN + # FARE-TODO: Some help content? + options: + - value: '0' + - value: '1' + - value: '2' + - value: '3' + - name: fare_transfer_type + inputType: DROPDOWN + # FARE-TODO: Some help content? + options: + - value: '0' + - value: '1' + - value: '2' + - name: fare_product_id + required: false + inputType: GTFS_FARE_PRODUCT +- id: farelegrule + name: fare_leg_rules.txt + # FARE-TODO: Some help content? + fields: + - name: leg_group_id + required: false + inputType: TEXT # FARE-TODO: should this be text or id? + - name: network_id + required: false + inputType: TEXT # FARE-TODO: Needs to reference networks.network_id or routes.network_id + - name: from_area_id + required: false + inputType: TEXT # FARE-TODO: Needs to reference areas.area_id + - name: to_area_id + required: false + inputType: TEXT # FARE-TODO: Needs to reference areas.area_id + - name: from_timeframe_group_id + required: false + inputType: TEXT # FARE-TODO: Needs to reference timeframes.timeframe_group_id + - name: to_timeframe_group_id + required: false + inputType: TEXT # FARE-TODO: Needs to reference timeframes.timeframe_group_id + - name: fare_product_id + required: true + inputType: TEXT # FARE-TODO: Needs to reference fare_products.fare_product_id + - name: rule_priority + required: false + inputType: POSITIVE_INT +- id: area + name: areas.txt + helpContent: Areas that can be used to define fare zones. + fields: + - name: area_id + required: true + inputType: GTFS_ID + - name: area_name + required: false + inputType: TEXT +- id: network + name: networks.txt + helpContent: Networks that can be used to group routes and fare legs. + fields: + - name: network_id + required: true + inputType: GTFS_ID + - name: network_name + required: false + inputType: TEXT \ No newline at end of file diff --git a/lib/editor/actions/editor.js b/lib/editor/actions/editor.js index b83e5ad06..78031c1da 100644 --- a/lib/editor/actions/editor.js +++ b/lib/editor/actions/editor.js @@ -489,6 +489,11 @@ export function fetchBaseGtfs ({ agency_id agency_name } + area (limit: -1) { + id + area_id + area_name + } calendar (limit: -1) { id service_id @@ -498,6 +503,31 @@ export function fetchBaseGtfs ({ id fare_id } + fare_product (limit: -1) { + id + fare_product_id + fare_media_id + } + fare_media (limit: -1) { + id + fare_media_id + } + fare_transfer_rule (limit: -1) { + id + from_leg_group_id + to_leg_group_id + fare_product_id + } + fare_leg_rule (limit: -1) { + fare_product_id + leg_group_id + id + } + network (limit: -1) { + id + network_id + network_name + } routes (limit: -1) { id route_id diff --git a/lib/editor/components/EditorInput.js b/lib/editor/components/EditorInput.js index b72248c54..675fe5c7d 100644 --- a/lib/editor/components/EditorInput.js +++ b/lib/editor/components/EditorInput.js @@ -20,6 +20,8 @@ import type {Entity, Feed, GtfsSpecField, GtfsAgency, GtfsStop} from '../../type import type {EditorTables} from '../../types/reducers' import ColorField from './ColorField' +import FareProductSelect from './FareProductSelect' +import StopAreasSelector from './StopAreasSelector' import RouteTypeSelect from './RouteTypeSelect' import VirtualizedEntitySelect from './VirtualizedEntitySelect' import ZoneSelect from './ZoneSelect' @@ -68,7 +70,15 @@ export default class EditorInput extends React.Component { onChange, updateActiveGtfsEntity } = this.props + console.log('processing field change::::', field.name, val, activeComponent, activeEntity) onChange && onChange(val) + // FARE_TODO::: HANDLE CONDITIONAL FORBIDDEN FIELDS (network_id on route when route_network_ids is populated) + let props = {[field.name]: val} + console.log('props::::', props) + if (activeEntity === 'route' && field.name !== 'network_id') { + props = {...props, network_id: ''} + } + console.log('props after network_id check::::', props) updateActiveGtfsEntity && activeEntity && updateActiveGtfsEntity({ component: activeComponent, entity: activeEntity, @@ -109,6 +119,7 @@ export default class EditorInput extends React.Component { } } + /* eslint-disable complexity */ render () { const { activeEntity, @@ -386,6 +397,77 @@ export default class EditorInput extends React.Component { ) } + case 'GTFS_FARE_PRODUCT': + const fareProducts = getTableById(tableData, 'fareproduct').map(fareProduct => ({ + value: fareProduct.fare_product_id, + label: `${fareProduct.fare_product_id} (${fareProduct.fare_media_id})` + })) + return ( + + {basicLabel} + + + ) + case 'GTFS_FARE_MEDIA': + // FARE-TODO: media entities are not loaded in the editor until each fare_media entity is opened in the fare media tab. + // ex. go to products tab, select fare media, they will be undefined. + const fareMedia = getTableById(tableData, 'faremedia').map(fareMedia => ({ + value: fareMedia.fare_media_id, + label: `${fareMedia.fare_media_name} (${fareMedia.fare_media_id})` + })) + return ( + + {basicLabel} + + ) + } +} diff --git a/lib/editor/components/StopAreasSelector.js b/lib/editor/components/StopAreasSelector.js new file mode 100644 index 000000000..4cb11fc16 --- /dev/null +++ b/lib/editor/components/StopAreasSelector.js @@ -0,0 +1,86 @@ +// @flow + +// $FlowFixMe React hook bindings not picked up +import React, { useState } from 'react' +import Icon from '@conveyal/woonerf/components/icon' +import { Button } from 'react-bootstrap' + +import type { GtfsArea, GtfsStop } from '../../types' + +import VirtualizedEntitySelect from './VirtualizedEntitySelect' + +type Props = { + areas: Array, + currentValue: Array | string, + processFieldChange: (val: any) => void +} + +const StopAreasSelector = ({ currentValue, areas, processFieldChange }: Props) => { + const [dropdownShowing, setDropdownShowing] = useState(false) + const getAreaName = + (entityId) => { + const entity = areas.find((area) => area.area_id === entityId) + const name = entity && entity.area_name ? entity.area_name : entityId + return `${name}` + } + + const deleteEntity = (entityId) => { + if (typeof currentValue === 'string') return + + const filtered = currentValue.filter(id => id !== entityId) + const newValue = filtered.length > 1 ? filtered.join('§') : (filtered[0] || '') + processFieldChange(newValue) + } + + console.log('currentValue:::::::', currentValue) + + return ( + <> +
+ {currentValue && typeof currentValue !== 'string' && + currentValue.map((l) => ( + + {getAreaName(l)} + + + ))} +
+ {!dropdownShowing && !(areas.length === 0) && } + {dropdownShowing && { + return !currentValue || !currentValue.includes( + // $FlowFixMe making this flow compatible would introduce a lot of unneeded code + stopOrArea.stop_id || stopOrArea.area_id + ) + })} + onChange={(change) => { + const selectedId = change.entity.stop_id || change.entity.area_id || change.entity.network_id + const valuesArray = Array.isArray(currentValue) ? currentValue : (currentValue ? [currentValue] : []) + const newValue = [...valuesArray, selectedId].filter(Boolean).join('§') + processFieldChange(newValue) + setDropdownShowing(false) + }} + />} + + ) +} + +export default StopAreasSelector diff --git a/lib/editor/components/VirtualizedTableSelect.js b/lib/editor/components/VirtualizedTableSelect.js new file mode 100644 index 000000000..85d0b3d74 --- /dev/null +++ b/lib/editor/components/VirtualizedTableSelect.js @@ -0,0 +1,124 @@ +// @flow + +import React, {Component} from 'react' +import VirtualizedSelect from 'react-virtualized-select' + +// FARE-TODO: clean up this file!!!! +// import {getEntityName} from '../util/gtfs' + +import type {Entity, Style} from '../../types' + +export type EntityOption = { + entity: Entity, + label: string, + value: string +} + +type Props = { + clearable?: boolean, + component: string, + entities: Array, + // entityKey: string, + onChange: any => void, + optionRenderer?: Function, + style?: Style, + value?: any +} + +type State = { + options: Array, + value: any +} + +export default class VirtualizedEntitySelect extends Component { + static defaultProps = { + clearable: true + // entityKey: 'id' + } + + componentWillMount () { + this.setState({ + value: this.props.value, + options: [] + }) + } + + /** + * This component can hold a large number of options, so its + * shouldComponentUpdate method checks only for changes in state (i.e., the + * selected value) and a change in length of its entities. + */ + // shouldComponentUpdate (nextProps, nextState) { + // if (nextState.value !== this.state.value || this.state.options.length !== nextState.options.length) { + // return true + // } + // const nextEntities = nextProps.entities || [] + // const currentEntities = this.props.entities || [] + // if (nextEntities.length !== currentEntities.length) { + // console.log('entities length changed', nextEntities, currentEntities) + // return true + // } + // return false + // } + + componentWillReceiveProps (nextProps: Props) { + if (this.state.value !== nextProps.value && typeof this.props.value !== 'undefined') { + this.setState({value: nextProps.value}) + } + } + + _onChange = (value: any) => { + const {onChange} = this.props + this.setState({value}) + onChange && onChange(value) + } + + _entityToOption = (entity: any) => { + // const {entityKey} = this.props + return { + value: entity, + label: entity, + entity + } + } + + render () { + const { + clearable, + component, + entities, + optionRenderer, + style + } = this.props + const {value} = this.state + let disabled = false + let placeholder = `Select ${component}...` + let options = [] + if (entities.length > 30000) { + console.warn(`Entity list too large (count=${entities.length}). Disabling entity selector.`) + disabled = true + placeholder = 'Selector disabled. List is too large.' + } else { + options = entities + .filter(e => { + if (e.id < 0) { + console.warn(`Entity has a negative id, which indicates an unsaved entity that should not be selectable. Filtering out of selector.`, e) + return false + } else return e + }) + .map(this._entityToOption) + } + return ( + + ) + } +} diff --git a/lib/editor/reducers/data.js b/lib/editor/reducers/data.js index b4811af8b..86938ac5d 100644 --- a/lib/editor/reducers/data.js +++ b/lib/editor/reducers/data.js @@ -30,9 +30,15 @@ export const defaultState = { status: {}, tables: { agency: [], + area: [], calendar: [], fares: [], + fare_leg_rule: [], + fare_media: [], + fare_product: [], + fare_transfer_rule: [], feed_info: [], + network: [], routes: [], schedule_exceptions: [], stops: [], diff --git a/lib/editor/util/gtfs.js b/lib/editor/util/gtfs.js index c1c136394..4a2a97f51 100644 --- a/lib/editor/util/gtfs.js +++ b/lib/editor/util/gtfs.js @@ -31,7 +31,13 @@ export const COMPONENT_LIST = [ // FIXME: table name for calendar, fare, and schedule exception { id: 'calendar', tableName: 'calendar' }, { id: 'scheduleexception', tableName: 'schedule_exceptions' }, - { id: 'agency', tableName: 'agency' } + { id: 'agency', tableName: 'agency' }, + { id: 'fareproduct', tableName: 'fare_product' }, + { id: 'faremedia', tableName: 'fare_media' }, + { id: 'faretransferrule', tableName: 'fare_transfer_rule' }, + { id: 'farelegrule', tableName: 'fare_leg_rule' }, + { id: 'area', tableName: 'area' }, + { id: 'network', tableName: 'network' } ] export function getTableById (tableData: any, id?: string, emptyArrayOnNull: boolean = true): any { @@ -240,7 +246,23 @@ export function getEntityName (entity: any): string { nameKey = 'description' } else if (typeof entity.fare_id !== 'undefined') { nameKey = 'fare_id' - } else if (typeof entity.exemplar !== 'undefined') { + } else if (typeof entity.fare_product_id !== 'undefined' && typeof entity.fare_media_id !== 'undefined') { + nameKey = 'fare_product_id' + } else if (typeof entity.fare_media_id !== 'undefined') { + nameKey = 'fare_media_id' + } else if (typeof entity.from_leg_group_id !== 'undefined' && typeof entity.to_leg_group_id !== 'undefined' && entity.fare_product_id !== 'undefined') { + nameKey = 'fare_transfer_rule_id' // FARE-TODO: fare_media_name? Some combo? + } else if (typeof entity.fare_product_id !== 'undefined' && typeof entity.leg_group_id !== 'undefined') { + nameKey = 'fare_leg_rule_id' // FARE-TODO: fare_media_name? Some combo? + } else if (typeof entity.area_id !== 'undefined') { + nameKey = 'area_id' // FARE-TODO: area_name? + } else if (typeof entity.network_id !== 'undefined') { + nameKey = 'network_id' // FARE-TODO: network_name? + } + + // FARE-TODO: what to do with fare_transfer_rules.txt? + // FARE-TODO: what to do with fare_leg_rules.txt? + if (typeof entity.exemplar !== 'undefined') { nameKey = 'name' } @@ -274,6 +296,21 @@ export function getEntityName (entity: any): string { return `${serviceCalendar.service_id} ${serviceCalendar.description ? `(${serviceCalendar.description})` : ''}` + case 'fare_product_id': + // FARE-TODO: type! + return `${entity.fare_product_id} (${entity.fare_media_id})` + case 'fare_transfer_rule_id': + // FARE-TODO: type! + return `${entity.from_leg_group_id} ➡️ ${entity.to_leg_group_id} (${entity.fare_product_id})` + case 'fare_leg_rule_id': + // FARE-TODO: type! + return `${entity.fare_product_id} (${entity.leg_group_id})` + case 'area_id': + // FARE-TODO: type! + return `${entity.area_id} (${entity.area_name})` + case 'network_id': + // FARE-TODO: type! + return `${entity.network_id} (${entity.network_name})` default: const otherEntityType: any = entity return otherEntityType[nameKey] || NO_NAME @@ -348,3 +385,7 @@ export function gtfsSort (a: Entity, b: Entity): number { if (aName.toLowerCase() > bName.toLowerCase()) return 1 return 0 } + +export function isComponentFaresv2 (component: string): boolean { + return ['fareproduct', 'faremedia', 'faretransferrule', 'farelegrule'].includes(component) +} diff --git a/lib/editor/util/objects.js b/lib/editor/util/objects.js index 43b3744f9..75d120a05 100644 --- a/lib/editor/util/objects.js +++ b/lib/editor/util/objects.js @@ -1,13 +1,20 @@ // @flow import {ENTITY} from '../constants' import {camelCaseKeys, snakeCaseKeys} from '../../common/util/map-keys' - import type {Entity} from '../../types' export function componentToText (component: string): string { switch (component) { case 'scheduleexception': return 'exception' + case 'fareproduct': + return 'product' + case 'faremedia': + return 'media' + case 'faretransferrule': + return 'transfer rule' + case 'farelegrule': + return 'leg rule' default: return component } diff --git a/lib/editor/util/ui.js b/lib/editor/util/ui.js index 55615ff95..0a8dceaa4 100644 --- a/lib/editor/util/ui.js +++ b/lib/editor/util/ui.js @@ -73,6 +73,68 @@ export const GTFS_ICONS = [ addable: true, title: messages('fare.title'), label: messages('fare.label') + }, + { + id: 'fareproduct', + tableName: 'fareproduct', + icon: 'credit-card', + addable: true, + title: 'Fares v2', + label: 'Fares v2' + }, + { + id: 'faremedia', + tableName: 'faremedia', + icon: 'id-card', + addable: true, + hideSidebar: true, + title: 'FARE MEDIA TEST TITLE', + label: 'V2: Media' + }, + { + id: 'faretransferrule', + tableName: 'faretransferrule', + icon: 'link', + addable: true, + hideSidebar: true, + title: 'FARE TRANSFER RULE TEST TITLE', + label: 'V2: Transfer Rules' + }, + { + id: 'farelegrule', + tableName: 'farelegrule', + icon: 'book', + addable: true, + hideSidebar: true, + title: 'FARE LEG RULE TEST TITLE', + label: 'V2: Leg Rules' + }, + { + id: 'area', + tableName: 'area', + icon: 'map', + addable: true, + hideSidebar: true, + title: 'AREAS TEST TITLE', + label: 'V2: Areas' + }, + { + id: 'stoparea', + tableName: 'stoparea', + icon: 'map-marker', + addable: true, + hideSidebar: true, + title: 'STOP AREAS TEST TITLE', + label: 'V2: Stop Areas' + }, + { + id: 'network', + tableName: 'network', + icon: 'sitemap', + addable: true, + hideSidebar: true, + title: 'NETWORKS TEST TITLE', + label: 'V2: Networks' } ] diff --git a/lib/gtfs/util/index.js b/lib/gtfs/util/index.js index 77bd5192a..f5a9e7693 100644 --- a/lib/gtfs/util/index.js +++ b/lib/gtfs/util/index.js @@ -15,6 +15,18 @@ export function getEntityIdField (type: string): string { return 'agency_id' case 'fare': return 'fare_id' + case 'fareproduct': + return 'fare_product_id' + case 'faremedia': + return 'fare_media_id' + case 'faretransferrule': + return 'id' + case 'farelegrule': + return 'id' + case 'area': + return 'area_id' + case 'network': + return 'network_id' case 'calendar': return 'service_id' case 'stop': @@ -59,6 +71,8 @@ export function getGraphQLFieldsForEntity (type: string, editor: boolean = false .map(field => field.name) .join('\n') : '' + + console.log(`Constructing GraphQL fields for entity type ${type} with fields: ${fields}`) // stop_times are a special case because they must be requested as a // nested list underneath a trip const shapeFields = `shape_points: shape (limit: -1) { @@ -103,6 +117,32 @@ export function getGraphQLFieldsForEntity (type: string, editor: boolean = false contains_id } ` + case 'fareproduct': + return ` + ${fields} + ` + case 'faremedia': + return ` + ${fields} + ` + case 'faretransferrule': + return ` + id + ${fields} + ` + case 'farelegrule': + return ` + id + ${fields} + ` + case 'area': + return ` + ${fields} + ` + case 'network': + return ` + ${fields} + ` case 'pattern': return ` shape_id @@ -138,10 +178,22 @@ export function getEntityGraphQLRoot (type: string): string { switch (type.toLowerCase()) { case 'agency': return 'agency' + case 'area': + return 'area' + case 'network': + return 'network' case 'calendar': return 'calendar' case 'fare': return 'fares' + case 'fareproduct': + return 'fare_product' + case 'faremedia': + return 'fare_media' + case 'faretransferrule': + return 'fare_transfer_rule' + case 'farelegrule': + return 'fare_leg_rule' case 'feedinfo': return 'feed_info' case 'stop': @@ -171,14 +223,26 @@ export function getEntityTableString (type: string): string { switch (type.toLowerCase()) { case 'agency': return 'agency' + case 'area': + return 'area' case 'calendar': return 'calendar' - case 'fare': - return 'fare_attributes' - case 'fare_rules': - return 'fare_rules' + case 'fare': // Fares v1 + return 'fare_attributes' // Fares v1 + case 'fareproduct': + return 'fareproduct' + case 'faremedia': + return 'faremedia' + case 'fare_rules': // Fares v1 + return 'fare_rules' // Fares v1 + case 'faretransferrule': + return 'faretransferrule' + case 'farelegrule': + return 'farelegrule' case 'feedinfo': return 'feedinfo' + case 'network': + return 'network' case 'stop': return 'stop' case 'route': diff --git a/lib/types/index.js b/lib/types/index.js index 1c176ef4e..2200be109 100644 --- a/lib/types/index.js +++ b/lib/types/index.js @@ -41,7 +41,10 @@ type InputType = 'DAY_OF_WEEK_BOOLEAN' | 'NUMBER' | 'GTFS_FARE' | - 'EXCEPTION_DATE' + 'EXCEPTION_DATE' | // FARE-TODO NEW TYPES!!!!! + 'GTFS_FARE_PRODUCT' | + 'GTFS_FARE_MEDIA' | + 'GTFS_STOP_AREA' export type RtdEntity = { AgencyId: string, @@ -643,6 +646,15 @@ export type Pattern = {| useFrequency: boolean |} +export type FareRule = { + contains_id: ?string, + destination_id: ?string, + fare_id: string, + id: number, + origin_id: ?string, + route_id: ?string +} + export type GtfsAgency = {| agency_branding_url: string, agency_email: string, @@ -657,14 +669,10 @@ export type GtfsAgency = {| id: number |} -export type FareRule = { - contains_id: ?string, - destination_id: ?string, - fare_id: string, - id: number, - origin_id: ?string, - route_id: ?string -} +export type GtfsArea = {| + area_id: string, + area_name: ?string +|} export type GtfsFare = {| agency_id: ?string, @@ -726,6 +734,7 @@ export type GtfsRoute = {| route_desc: string, route_id: string, route_long_name: ?string, + route_network_ids: ?string, route_short_name: ?string, route_text_color: string, route_type: string, @@ -745,6 +754,7 @@ export type GtfsStop = {| parent_station?: ?string, pickupType?: ?number, stopId?: string, + stop_area_ids?: ?string, stop_code?: ?string, stop_desc?: string, stop_id: string, diff --git a/lib/types/reducers.js b/lib/types/reducers.js index 17a74223e..79436de68 100644 --- a/lib/types/reducers.js +++ b/lib/types/reducers.js @@ -116,11 +116,16 @@ export type EditorTables = { agency_name: string, id: number }>, + area: Array<{}>, // FARE-TODO: add fields and their types calendar: Array<{ description: string, id: number, service_id: string }>, + fare_leg_rule: Array<{}>, // FARE-TODO: Do this + fare_media: Array<{}>, // FARE-TODO: Do this + fare_product: Array<{}>, // FARE-TODO: Do this + fare_transfer_rule: Array<{}>, // FARE-TODO: Do this fares: Array<{ fare_id: string, id: number, @@ -136,6 +141,11 @@ export type EditorTables = { feed_version: string, id: number }>, + network: Array<{ + id: number, + network_id: string, + network_name: ?string + }>, routes: Array<{ id: number, route_id: string, @@ -156,7 +166,7 @@ export type EditorTables = { stop_lon: number, stop_name: string, zone_id: string - }>, + }>, // FARE-TODO: add fields and their types trip_counts: TripCounts }