scalar DateTime # The Interchange system schema. # Note how Passio ID and parking ID are abstracted away # from the endpoints. type System { id: ID! name: String! routes: [Route!] route(id: ID): Route stops: [Stop!] stop(id: ID): Stop shuttles: [Shuttle!] shuttle(id: ID): Shuttle parkingSystem: ParkingSystem } type ParkingSystem { systemId: ID! parkingStructures: [ParkingStructure!] parkingStructure(id: ID): ParkingStructure } type ParkingStructure { id: ID! name: String! capacity: Int! spotsAvailable: Int! coordinates: Coordinates! address: String! updatedTime: DateTime } type Route { name: String! id: ID! systemId: ID! orderedStop(forStopId: ID): OrderedStop shuttles: [Shuttle!] polylineCoordinates: [Coordinates!]! color: String! updatedTime: DateTime } type OrderedStop { nextStop: OrderedStop previousStop: OrderedStop route: Route routeId: ID! stop: Stop stopId: ID! systemId: ID! updatedTime: DateTime } type Stop { id: ID! systemId: ID! name: String! coordinates: Coordinates! etas: [ETA!] orderedStops: [OrderedStop!] updatedTime: DateTime } type Coordinates { latitude: Float! longitude: Float! } type ETA { stop: Stop stopId: ID! shuttle: Shuttle shuttleId: ID! secondsRemaining: Float! systemId: ID! updatedTime: DateTime } type Shuttle { name: String! systemId: ID! id: ID!, coordinates: Coordinates! route: Route routeId: ID! etas: [ETA!] eta(forStopId: ID): ETA orientationInDegrees: Float! updatedTime: DateTime } # Queries type Query { systems: [System!]! system(id: ID): System isNotificationScheduled(input: NotificationInput!): Boolean secondsThresholdForNotification(input: NotificationInput!): Int schemaMinVersion: Int! schemaCurrentVersion: Int! } # Mutations type Mutation { scheduleNotification(input: NotificationInput!): NotificationResponse! cancelNotification(input: NotificationInput!): NotificationResponse! } input NotificationInput { deviceId: ID! shuttleId: ID! stopId: ID! secondsThreshold: Int } type NotificationResponse { success: Boolean! message: String! data: Notification } type Notification { deviceId: ID! shuttleId: ID! stopId: ID! secondsThreshold: Int }