Files
project-inter-server/schema.graphqls
Claude fe649c81eb Change region to use top-left and bottom-right coordinates
Replace center+delta region representation with a bounding box defined
by topLeft and bottomRight coordinate pairs, which maps more directly
to the visible map area.

https://claude.ai/code/session_0162emnCi1KxW5FkTNn2ZrvH
2026-03-23 22:05:57 +00:00

154 lines
2.7 KiB
GraphQL

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!
initialRegion: Region
routes: [Route!]
route(id: ID): Route
stops: [Stop!]
stop(id: ID): Stop
shuttles: [Shuttle!]
shuttle(id: ID): Shuttle
parkingSystem: ParkingSystem
}
type Region {
topLeft: Coordinates!
bottomRight: Coordinates!
}
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
systemId: ID!
historicalAverages(input: HistoricalParkingAverageQueryInput): [HistoricalParkingAverageQueryResult!]
}
type HistoricalParkingAverageQueryResult {
from: DateTime!
to: DateTime!
averageSpotsAvailable: Float!
}
input HistoricalParkingAverageQueryInput {
from: DateTime!
to: DateTime!
intervalMs: Int!
}
type Route {
name: String!
id: ID!
systemId: ID!
orderedStop(forStopId: ID): OrderedStop
orderedStops: [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
}