@opentripplanner/core-utils 12.0.0-alpha.8 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/esm/__tests__/__mocks__/bike-rental-itinerary.json +863 -0
  2. package/esm/__tests__/__mocks__/config.json +54 -0
  3. package/esm/__tests__/__mocks__/fare-products-itinerary.json +1299 -0
  4. package/esm/__tests__/__mocks__/routes.json +107 -0
  5. package/esm/__tests__/__mocks__/tnc-itinerary.json +1726 -0
  6. package/esm/bike-rental-itinerary.json +863 -0
  7. package/esm/config.json +54 -0
  8. package/esm/fare-products-itinerary.json +1299 -0
  9. package/esm/index.js +2 -0
  10. package/esm/index.js.map +1 -1
  11. package/esm/itinerary.js +46 -21
  12. package/esm/itinerary.js.map +1 -1
  13. package/esm/otpSchema.json +13373 -0
  14. package/esm/planQuery.graphql +281 -0
  15. package/esm/profile.js +1 -1
  16. package/esm/profile.js.map +1 -1
  17. package/esm/query-gen.js +8 -5
  18. package/esm/query-gen.js.map +1 -1
  19. package/esm/query.js +1 -5
  20. package/esm/query.js.map +1 -1
  21. package/esm/routes.json +107 -0
  22. package/esm/storage.js +2 -6
  23. package/esm/storage.js.map +1 -1
  24. package/esm/suspense.js +13 -0
  25. package/esm/suspense.js.map +1 -0
  26. package/esm/tnc-itinerary.json +1726 -0
  27. package/lib/__tests__/__mocks__/bike-rental-itinerary.json +863 -0
  28. package/lib/__tests__/__mocks__/config.json +54 -0
  29. package/lib/__tests__/__mocks__/fare-products-itinerary.json +1299 -0
  30. package/lib/__tests__/__mocks__/routes.json +107 -0
  31. package/lib/__tests__/__mocks__/tnc-itinerary.json +1726 -0
  32. package/lib/index.d.ts +2 -0
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js +10 -0
  35. package/lib/index.js.map +1 -1
  36. package/lib/itinerary.d.ts +13 -4
  37. package/lib/itinerary.d.ts.map +1 -1
  38. package/lib/itinerary.js +59 -22
  39. package/lib/itinerary.js.map +1 -1
  40. package/lib/otpSchema.json +13373 -0
  41. package/lib/planQuery.graphql +281 -0
  42. package/lib/profile.js +1 -1
  43. package/lib/profile.js.map +1 -1
  44. package/lib/query-gen.d.ts +3 -1
  45. package/lib/query-gen.d.ts.map +1 -1
  46. package/lib/query-gen.js +8 -5
  47. package/lib/query-gen.js.map +1 -1
  48. package/lib/query.js +1 -5
  49. package/lib/query.js.map +1 -1
  50. package/lib/storage.d.ts.map +1 -1
  51. package/lib/storage.js +2 -6
  52. package/lib/storage.js.map +1 -1
  53. package/lib/suspense.d.ts +8 -0
  54. package/lib/suspense.d.ts.map +1 -0
  55. package/lib/suspense.js +26 -0
  56. package/lib/suspense.js.map +1 -0
  57. package/package.json +3 -3
  58. package/src/__tests__/itinerary.ts +36 -1
  59. package/src/core-utils.story.tsx +1 -1
  60. package/src/index.ts +2 -0
  61. package/src/itinerary.ts +68 -26
  62. package/src/otpSchema.json +0 -12
  63. package/src/planQuery.graphql +27 -0
  64. package/src/profile.js +1 -1
  65. package/src/query-gen.ts +8 -4
  66. package/src/query.js +1 -4
  67. package/src/storage.ts +5 -9
  68. package/src/suspense.tsx +19 -0
  69. package/tsconfig.json +1 -2
  70. package/tsconfig.tsbuildinfo +1 -1
  71. package/lib/core-utils.story.d.ts +0 -22
  72. package/lib/core-utils.story.d.ts.map +0 -1
  73. package/lib/core-utils.story.js +0 -69
  74. package/lib/core-utils.story.js.map +0 -1
@@ -0,0 +1,281 @@
1
+ query Plan(
2
+ $arriveBy: Boolean
3
+ $banned: InputBanned
4
+ $bikeReluctance: Float
5
+ $carReluctance: Float
6
+ $date: String
7
+ $fromPlace: String!
8
+ $modes: [TransportMode]
9
+ $numItineraries: Int
10
+ $preferred: InputPreferred
11
+ $time: String
12
+ $toPlace: String!
13
+ $unpreferred: InputUnpreferred
14
+ $walkReluctance: Float
15
+ $walkSpeed: Float
16
+ $wheelchair: Boolean
17
+ ) {
18
+ plan(
19
+ arriveBy: $arriveBy
20
+ banned: $banned
21
+ bikeReluctance: $bikeReluctance
22
+ carReluctance: $carReluctance
23
+ date: $date
24
+ fromPlace: $fromPlace
25
+ # Currently only supporting EN locale, used for times and text
26
+ locale: "en"
27
+ numItineraries: $numItineraries
28
+ preferred: $preferred
29
+ time: $time
30
+ toPlace: $toPlace
31
+ transportModes: $modes
32
+ unpreferred: $unpreferred
33
+ walkReluctance: $walkReluctance
34
+ walkSpeed: $walkSpeed
35
+ wheelchair: $wheelchair
36
+ ) {
37
+ itineraries {
38
+ accessibilityScore
39
+ duration
40
+ endTime
41
+ legs {
42
+ accessibilityScore
43
+ agency {
44
+ alerts {
45
+ alertDescriptionText
46
+ alertHeaderText
47
+ alertUrl
48
+ effectiveStartDate
49
+ id
50
+ }
51
+ gtfsId
52
+ id: gtfsId
53
+ name
54
+ timezone
55
+ url
56
+ }
57
+ alerts {
58
+ alertDescriptionText
59
+ alertHeaderText
60
+ alertUrl
61
+ effectiveStartDate
62
+ id
63
+ }
64
+ arrivalDelay
65
+ departureDelay
66
+ distance
67
+ dropOffBookingInfo {
68
+ contactInfo {
69
+ bookingUrl
70
+ infoUrl
71
+ phoneNumber
72
+ }
73
+ earliestBookingTime {
74
+ daysPrior
75
+ time
76
+ }
77
+ latestBookingTime {
78
+ daysPrior
79
+ time
80
+ }
81
+ message
82
+ }
83
+ dropoffType
84
+ duration
85
+ endTime
86
+ fareProducts {
87
+ id
88
+ product {
89
+ __typename
90
+ id
91
+ medium {
92
+ id
93
+ name
94
+ }
95
+ name
96
+ riderCategory {
97
+ id
98
+ name
99
+ }
100
+ ... on DefaultFareProduct {
101
+ price {
102
+ amount
103
+ currency {
104
+ code
105
+ digits
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ from {
112
+ lat
113
+ lon
114
+ name
115
+ rentalVehicle {
116
+ id
117
+ network
118
+ }
119
+ stop {
120
+ alerts {
121
+ alertDescriptionText
122
+ alertHeaderText
123
+ alertUrl
124
+ effectiveStartDate
125
+ id
126
+ }
127
+ code
128
+ gtfsId
129
+ id
130
+ lat
131
+ lon
132
+ }
133
+ vertexType
134
+ }
135
+ headsign
136
+ interlineWithPreviousLeg
137
+ intermediateStops {
138
+ lat
139
+ locationType
140
+ lon
141
+ name
142
+ stopCode: code
143
+ stopId: id
144
+ }
145
+ legGeometry {
146
+ length
147
+ points
148
+ }
149
+ mode
150
+ pickupBookingInfo {
151
+ contactInfo {
152
+ bookingUrl
153
+ infoUrl
154
+ phoneNumber
155
+ }
156
+ earliestBookingTime {
157
+ daysPrior
158
+ time
159
+ }
160
+ latestBookingTime {
161
+ daysPrior
162
+ time
163
+ }
164
+ message
165
+ }
166
+ pickupType
167
+ realTime
168
+ realtimeState
169
+ rentedBike
170
+ rideHailingEstimate {
171
+ arrival
172
+ maxPrice {
173
+ amount
174
+ currency {
175
+ code
176
+ }
177
+ }
178
+ minPrice {
179
+ amount
180
+ currency {
181
+ code
182
+ }
183
+ }
184
+ provider {
185
+ id
186
+ }
187
+ }
188
+ route {
189
+ alerts {
190
+ alertDescriptionText
191
+ alertHeaderText
192
+ alertUrl
193
+ effectiveStartDate
194
+ id
195
+ }
196
+ color
197
+ gtfsId
198
+ id: gtfsId
199
+ longName
200
+ shortName
201
+ textColor
202
+ type
203
+ }
204
+ startTime
205
+ steps {
206
+ absoluteDirection
207
+ alerts {
208
+ alertDescriptionText
209
+ alertHeaderText
210
+ alertUrl
211
+ effectiveStartDate
212
+ id
213
+ }
214
+ area
215
+ distance
216
+ elevationProfile {
217
+ distance
218
+ elevation
219
+ }
220
+ lat
221
+ lon
222
+ relativeDirection
223
+ stayOn
224
+ streetName
225
+ }
226
+ to {
227
+ lat
228
+ lon
229
+ name
230
+ rentalVehicle {
231
+ id
232
+ network
233
+ }
234
+ stop {
235
+ alerts {
236
+ alertDescriptionText
237
+ alertHeaderText
238
+ alertUrl
239
+ effectiveStartDate
240
+ id
241
+ }
242
+ code
243
+ gtfsId
244
+ id
245
+ lat
246
+ lon
247
+ }
248
+ vertexType
249
+ }
250
+ transitLeg
251
+ trip {
252
+ arrivalStoptime {
253
+ stop {
254
+ gtfsId
255
+ id
256
+ }
257
+ stopPosition
258
+ }
259
+ departureStoptime {
260
+ stop {
261
+ gtfsId
262
+ id
263
+ }
264
+ stopPosition
265
+ }
266
+ gtfsId
267
+ id
268
+ }
269
+ }
270
+ startTime
271
+ transfers: numberOfTransfers
272
+ waitingTime
273
+ walkTime
274
+ }
275
+ routingErrors {
276
+ code
277
+ description
278
+ inputField
279
+ }
280
+ }
281
+ }
package/lib/profile.js CHANGED
@@ -7,7 +7,7 @@ exports.filterProfileOptions = filterProfileOptions;
7
7
  exports.profileOptionsToItineraries = profileOptionsToItineraries;
8
8
 
9
9
  function filterProfileOptions(response) {
10
- // Filter out similar options. TODO: handle on server??
10
+ // Filter out similar options. TODO: handle on server?
11
11
  const optStrs = [];
12
12
  const filteredIndices = [];
13
13
  const filteredProfile = response.otp.profile.filter((option, i) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/profile.js"],"names":["filterProfileOptions","response","optStrs","filteredIndices","filteredProfile","otp","profile","filter","option","i","optStr","access","map","a","mode","join","transit","routes","route","id","indexOf","push","filteredJourneys","journeys","journey","locationString","str","split","accessToLeg","origin","destination","duration","time","transitLeg","from","name","to","optionToItinerary","query","itin","legs","walkTime","waitingTime","length","status","walkOnEdges","bikeEdges","walkOffEdges","onStationName","walkOnTime","offStationName","walkOffTime","streetEdges","forEach","edge","bikeRentalOffStation","distance","bikeRentalOnStation","fromName","toName","rideStats","avg","averageWait","waitStats","egress","profileOptionsToItineraries","options"],"mappings":";;;;;;;;AAAO,SAASA,oBAAT,CAA8BC,QAA9B,EAAwC;AAC7C;AACA,QAAMC,OAAO,GAAG,EAAhB;AACA,QAAMC,eAAe,GAAG,EAAxB;AAEA,QAAMC,eAAe,GAAGH,QAAQ,CAACI,GAAT,CAAaC,OAAb,CAAqBC,MAArB,CAA4B,CAACC,MAAD,EAASC,CAAT,KAAe;AACjE,QAAIC,MAAM,G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AO,CAAC2C;AADZ,SANS;AASb1C,QAAAA,MAAM,EAAED,OAAO,CAACC,MATH;AAUbc,QAAAA,QAAQ,EAAEf,OAAO,CAAC4C,SAAR,CAAkBC,GAVf;AAWbC,QAAAA,WAAW,EAAE9C,OAAO,CAAC+C,SAAR,CAAkBF;AAXlB,OAAf;AAaAtB,MAAAA,IAAI,CAACG,WAAL,IAAoB1B,OAAO,CAAC+C,SAAR,CAAkBF,GAAtC;AACD,KAfD;AAgBD,GAlHuC,CAoHxC;;;AACA,MAAIrD,MAAM,CAACwD,MAAP,IAAiBxD,MAAM,CAACwD,MAAP,CAAcrB,MAAd,GAAuB,CAA5C,EAA+C;AAC7C;AACA,UAAMd,MAAM,GAAGrB,MAAM,CAACQ,OAAP,GACXR,MAAM,CAACQ,OAAP,CAAeR,MAAM,CAACQ,OAAP,CAAe2B,MAAf,GAAwB,CAAvC,EAA0CgB,MAD/B,GAEX,IAFJ;AAIApB,IAAAA,IAAI,CAACC,IAAL,CAAUnB,IAAV,CACEO,WAAW,CAACpB,MAAM,CAACwD,MAAP,CAAc,CAAd,CAAD,EAAmBnC,MAAnB,EAA2BS,KAAK,IAAIA,KAAK,CAACF,EAAN,CAASD,IAA7C,CADb;AAGA,QAAI3B,MAAM,CAACwD,MAAP,CAAc,CAAd,EAAiBlD,IAAjB,KAA0B,MAA9B,EACEyB,IAAI,CAACE,QAAL,IAAiBjC,MAAM,CAACwD,MAAP,CAAc,CAAd,EAAiBhC,IAAlC;AACH;;AAED,SAAOO,IAAP;AACD;AAED;;;AAEO,SAAS0B,2BAAT,CAAqCC,OAArC,EAA8C5B,KAA9C,EAAqD;AAC1D,SAAO4B,OAAO,CAACtD,GAAR,CAAYJ,MAAM,IAAI6B,iBAAiB,CAAC7B,MAAD,EAAS8B,KAAT,CAAvC,CAAP;AACD","sourcesContent":["export function filterProfileOptions(response) {\n // Filter out similar options. TODO: handle on server??\n const optStrs = [];\n const filteredIndices = [];\n\n const filteredProfile = response.otp.profile.filter((option, i) => {\n let optStr = option.access.map(a => a.mode).join(\"/\");\n if (option.transit) {\n optStr += ` to ${option.transit\n .map(transit => {\n return transit.routes.map(route => route.id).join(\"/\");\n })\n .join(\",\")}`;\n }\n if (optStrs.indexOf(optStr) !== -1) return false;\n optStrs.push(optStr);\n filteredIndices.push(i);\n return true;\n });\n\n const filteredJourneys = response.otp.journeys.filter(\n (journey, i) => filteredIndices.indexOf(i) !== -1\n );\n\n response.otp.profile = filteredProfile;\n response.otp.journeys = filteredJourneys;\n return response;\n}\n\nfunction locationString(str) {\n return str?.split(\",\")[0];\n}\n\nfunction accessToLeg(access, origin, destination) {\n return {\n mode: access.mode,\n duration: access.time,\n transitLeg: false,\n from: {\n name: locationString(origin)\n },\n to: {\n name: locationString(destination)\n }\n };\n}\n\n// helper functions for profileOptionsToItineraries:\n\nfunction optionToItinerary(option, query) {\n const itin = {\n duration: option.time,\n legs: [],\n walkTime: 0,\n waitingTime: 0\n };\n\n // access leg\n if (option.access && option.access.length > 0) {\n if (option.access[0].mode === \"BICYCLE_RENT\") {\n let status = \"WALK_ON\";\n const walkOnEdges = [];\n const bikeEdges = [];\n const walkOffEdges = [];\n let onStationName;\n let walkOnTime = 0;\n let offStationName;\n let walkOffTime = 0;\n option.access[0].streetEdges.forEach(edge => {\n // check if we're returning the bike\n if (edge.bikeRentalOffStation) {\n status = \"WALK_OFF\";\n offStationName = edge.bikeRentalOffStation.name;\n }\n\n if (status === \"WALK_ON\") {\n walkOnEdges.push(edge);\n walkOnTime += edge.distance;\n } else if (status === \"BIKE\") {\n bikeEdges.push(edge);\n } else if (status === \"WALK_OFF\") {\n walkOffEdges.push(edge);\n walkOffTime += edge.distance;\n }\n\n // check if we're picking up the bike\n if (edge.bikeRentalOnStation) {\n status = \"BIKE\";\n onStationName = edge.bikeRentalOnStation.name;\n }\n });\n\n itin.walkTime += walkOnTime + walkOffTime;\n\n // create the 'on' walk leg\n itin.legs.push({\n mode: \"WALK\",\n duration: walkOnTime,\n transitLeg: false,\n from: {\n name: locationString(query && query.from.name)\n },\n to: {\n name: onStationName\n }\n });\n\n // create the bike leg\n itin.legs.push({\n mode: \"BICYCLE_RENT\",\n duration: option.time - walkOnTime - walkOffTime,\n transitLeg: false,\n from: {\n name: onStationName\n },\n to: {\n name: offStationName\n }\n });\n\n // create the 'off' walk leg\n itin.legs.push({\n mode: \"WALK\",\n duration: walkOffTime,\n transitLeg: false,\n from: {\n name: offStationName\n },\n to: {\n name: locationString(query && query.to.name)\n }\n });\n } else {\n itin.legs.push(\n accessToLeg(\n option.access[0],\n query && query.from.name,\n option.transit ? null : query && query.to.name\n )\n );\n if (option.access[0].mode === \"WALK\")\n itin.walkTime += option.access[0].time;\n }\n }\n\n // transit legs\n if (option.transit) {\n option.transit.forEach(transit => {\n itin.legs.push({\n transitLeg: true,\n mode: transit.mode,\n from: {\n name: transit.fromName\n },\n to: {\n name: transit.toName\n },\n routes: transit.routes,\n duration: transit.rideStats.avg,\n averageWait: transit.waitStats.avg\n });\n itin.waitingTime += transit.waitStats.avg;\n });\n }\n\n // egress leg\n if (option.egress && option.egress.length > 0) {\n // find the origin name, for transit trips\n const origin = option.transit\n ? option.transit[option.transit.length - 1].toName\n : null;\n\n itin.legs.push(\n accessToLeg(option.egress[0], origin, query && query.to.name)\n );\n if (option.egress[0].mode === \"WALK\")\n itin.walkTime += option.egress[0].time;\n }\n\n return itin;\n}\n\n/** profileOptionsToItineraries * */\n\nexport function profileOptionsToItineraries(options, query) {\n return options.map(option => optionToItinerary(option, query));\n}\n"],"file":"profile.js"}
1
+ {"version":3,"sources":["../src/profile.js"],"names":["filterProfileOptions","response","optStrs","filteredIndices","filteredProfile","otp","profile","filter","option","i","optStr","access","map","a","mode","join","transit","routes","route","id","indexOf","push","filteredJourneys","journeys","journey","locationString","str","split","accessToLeg","origin","destination","duration","time","transitLeg","from","name","to","optionToItinerary","query","itin","legs","walkTime","waitingTime","length","status","walkOnEdges","bikeEdges","walkOffEdges","onStationName","walkOnTime","offStationName","walkOffTime","streetEdges","forEach","edge","bikeRentalOffStation","distance","bikeRentalOnStation","fromName","toName","rideStats","avg","averageWait","waitStats","egress","profileOptionsToItineraries","options"],"mappings":";;;;;;;;AAAO,SAASA,oBAAT,CAA8BC,QAA9B,EAAwC;AAC7C;AACA,QAAMC,OAAO,GAAG,EAAhB;AACA,QAAMC,eAAe,GAAG,EAAxB;AAEA,QAAMC,eAAe,GAAGH,QAAQ,CAACI,GAAT,CAAaC,OAAb,CAAqBC,MAArB,CAA4B,CAACC,MAAD,EAASC,CAAT,KAAe;AACjE,QAAIC,MAAM,GAAGF,MAAM,CAACG,MAAP,CAAcC,GAAd,CAAkBC,CAAC,IAAIA,CAAC,CAACC,IAAzB,EAA+BC,IAA/B,CAAoC,GAApC,CAAb;;AACA,QAAIP,MAAM,CAACQ,OAAX,EAAoB;AAClBN,MAAAA,MAAM,IAAK,OAAMF,MAAM,CAACQ,OAAP,CACdJ,GADc,CACVI,OAAO,IAAI;AACd,eAAOA,OAAO,CAACC,MAAR,CAAeL,GAAf,CAAmBM,KAAK,IAAIA,KAAK,CAACC,EAAlC,EAAsCJ,IAAtC,CAA2C,GAA3C,CAAP;AACD,OAHc,EAIdA,IAJc,CAIT,GAJS,CAIJ,EAJb;AAKD;;AACD,QAAIb,OAAO,CAACkB,OAAR,CAAgBV,MAAhB,MAA4B,CAAC,CAAjC,EAAoC,OAAO,KAAP;AACpCR,IAAAA,OAAO,CAACmB,IAAR,CAAaX,MAAb;AACAP,IAAAA,eAAe,CAACkB,IAAhB,CAAqBZ,CAArB;AACA,WAAO,IAAP;AACD,GAbuB,CAAxB;AAeA,QAAMa,gBAAgB,GAAGrB,QAAQ,CAACI,GAAT,CAAakB,QAAb,CAAsBhB,MAAtB,CACvB,CAACiB,OAAD,EAAUf,CAAV,KAAgBN,eAAe,CAACiB,OAAhB,CAAwBX,CAAxB,MAA+B,CAAC,CADzB,CAAzB;AAIAR,EAAAA,QAAQ,CAACI,GAAT,CAAaC,OAAb,GAAuBF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AAM,CAACwD,MAAP,CAAc,CAAd,EAAiBhC,IAAlC;AACH;;AAED,SAAOO,IAAP;AACD;AAED;;;AAEO,SAAS0B,2BAAT,CAAqCC,OAArC,EAA8C5B,KAA9C,EAAqD;AAC1D,SAAO4B,OAAO,CAACtD,GAAR,CAAYJ,MAAM,IAAI6B,iBAAiB,CAAC7B,MAAD,EAAS8B,KAAT,CAAvC,CAAP;AACD","sourcesContent":["export function filterProfileOptions(response) {\n // Filter out similar options. TODO: handle on server?\n const optStrs = [];\n const filteredIndices = [];\n\n const filteredProfile = response.otp.profile.filter((option, i) => {\n let optStr = option.access.map(a => a.mode).join(\"/\");\n if (option.transit) {\n optStr += ` to ${option.transit\n .map(transit => {\n return transit.routes.map(route => route.id).join(\"/\");\n })\n .join(\",\")}`;\n }\n if (optStrs.indexOf(optStr) !== -1) return false;\n optStrs.push(optStr);\n filteredIndices.push(i);\n return true;\n });\n\n const filteredJourneys = response.otp.journeys.filter(\n (journey, i) => filteredIndices.indexOf(i) !== -1\n );\n\n response.otp.profile = filteredProfile;\n response.otp.journeys = filteredJourneys;\n return response;\n}\n\nfunction locationString(str) {\n return str?.split(\",\")[0];\n}\n\nfunction accessToLeg(access, origin, destination) {\n return {\n mode: access.mode,\n duration: access.time,\n transitLeg: false,\n from: {\n name: locationString(origin)\n },\n to: {\n name: locationString(destination)\n }\n };\n}\n\n// helper functions for profileOptionsToItineraries:\n\nfunction optionToItinerary(option, query) {\n const itin = {\n duration: option.time,\n legs: [],\n walkTime: 0,\n waitingTime: 0\n };\n\n // access leg\n if (option.access && option.access.length > 0) {\n if (option.access[0].mode === \"BICYCLE_RENT\") {\n let status = \"WALK_ON\";\n const walkOnEdges = [];\n const bikeEdges = [];\n const walkOffEdges = [];\n let onStationName;\n let walkOnTime = 0;\n let offStationName;\n let walkOffTime = 0;\n option.access[0].streetEdges.forEach(edge => {\n // check if we're returning the bike\n if (edge.bikeRentalOffStation) {\n status = \"WALK_OFF\";\n offStationName = edge.bikeRentalOffStation.name;\n }\n\n if (status === \"WALK_ON\") {\n walkOnEdges.push(edge);\n walkOnTime += edge.distance;\n } else if (status === \"BIKE\") {\n bikeEdges.push(edge);\n } else if (status === \"WALK_OFF\") {\n walkOffEdges.push(edge);\n walkOffTime += edge.distance;\n }\n\n // check if we're picking up the bike\n if (edge.bikeRentalOnStation) {\n status = \"BIKE\";\n onStationName = edge.bikeRentalOnStation.name;\n }\n });\n\n itin.walkTime += walkOnTime + walkOffTime;\n\n // create the 'on' walk leg\n itin.legs.push({\n mode: \"WALK\",\n duration: walkOnTime,\n transitLeg: false,\n from: {\n name: locationString(query && query.from.name)\n },\n to: {\n name: onStationName\n }\n });\n\n // create the bike leg\n itin.legs.push({\n mode: \"BICYCLE_RENT\",\n duration: option.time - walkOnTime - walkOffTime,\n transitLeg: false,\n from: {\n name: onStationName\n },\n to: {\n name: offStationName\n }\n });\n\n // create the 'off' walk leg\n itin.legs.push({\n mode: \"WALK\",\n duration: walkOffTime,\n transitLeg: false,\n from: {\n name: offStationName\n },\n to: {\n name: locationString(query && query.to.name)\n }\n });\n } else {\n itin.legs.push(\n accessToLeg(\n option.access[0],\n query && query.from.name,\n option.transit ? null : query && query.to.name\n )\n );\n if (option.access[0].mode === \"WALK\")\n itin.walkTime += option.access[0].time;\n }\n }\n\n // transit legs\n if (option.transit) {\n option.transit.forEach(transit => {\n itin.legs.push({\n transitLeg: true,\n mode: transit.mode,\n from: {\n name: transit.fromName\n },\n to: {\n name: transit.toName\n },\n routes: transit.routes,\n duration: transit.rideStats.avg,\n averageWait: transit.waitStats.avg\n });\n itin.waitingTime += transit.waitStats.avg;\n });\n }\n\n // egress leg\n if (option.egress && option.egress.length > 0) {\n // find the origin name, for transit trips\n const origin = option.transit\n ? option.transit[option.transit.length - 1].toName\n : null;\n\n itin.legs.push(\n accessToLeg(option.egress[0], origin, query && query.to.name)\n );\n if (option.egress[0].mode === \"WALK\")\n itin.walkTime += option.egress[0].time;\n }\n\n return itin;\n}\n\n/** profileOptionsToItineraries * */\n\nexport function profileOptionsToItineraries(options, query) {\n return options.map(option => optionToItinerary(option, query));\n}\n"],"file":"profile.js"}
@@ -27,6 +27,7 @@ declare type OTPQueryParams = {
27
27
  };
28
28
  banned?: InputBanned;
29
29
  preferred?: InputPreferred;
30
+ unpreferred?: InputPreferred;
30
31
  };
31
32
  declare type GraphQLQuery = {
32
33
  query: string;
@@ -55,6 +56,7 @@ export declare const SIMPLIFICATIONS: {
55
56
  FUNICULAR: string;
56
57
  GONDOLA: string;
57
58
  RAIL: string;
59
+ MONORAIL: string;
58
60
  SCOOTER: string;
59
61
  SUBWAY: string;
60
62
  TROLLEYBUS: string;
@@ -77,6 +79,6 @@ export declare function generateCombinations(params: OTPQueryParams): OTPQueryPa
77
79
  * @param planQuery Override the default query for OTP
78
80
  * @returns A fully formed query+variables ready to be sent to GraphQL backend
79
81
  */
80
- export declare function generateOtp2Query({ arriveBy, banned, date, from, modes, modeSettings, numItineraries, preferred, time, to }: OTPQueryParams, planQuery?: import("graphql").DocumentNode): GraphQLQuery;
82
+ export declare function generateOtp2Query({ arriveBy, banned, date, from, modes, modeSettings, numItineraries, preferred, time, to, unpreferred }: OTPQueryParams, planQuery?: import("graphql").DocumentNode): GraphQLQuery;
81
83
  export {};
82
84
  //# sourceMappingURL=query-gen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-gen.d.ts","sourceRoot":"","sources":["../src/query-gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EACL,WAAW,EAEX,aAAa,EACd,MAAM,wBAAwB,CAAC;AAIhC,aAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF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AAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,WAAW,EAAE,EAC3B,YAAY,EAAE,aAAa,EAAE,GAC5B,aAAa,EAAE,CA2BjB;AAoBD;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAkB3B,CAAC;AAeF,eAAO,MAAM,gBAAgB,UAE5B,CAAC;AACF,eAAO,MAAM,4BAA4B,UAExC,CAAC;AA6CF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,EAAE,CAc7E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,EACE,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,IAAI,EACJ,EAAE,EACF,WAAW,EACZ,EAAE,cAAc,EACjB,SAAS,iCAAmB,GAC3B,YAAY,CA4Cd"}
package/lib/query-gen.js CHANGED
@@ -10,7 +10,7 @@ exports.TRANSIT_SUBMODES_AND_TRANSIT = exports.TRANSIT_SUBMODES = exports.SIMPLI
10
10
 
11
11
  var _graphql = require("graphql");
12
12
 
13
- var DefaultPlanQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "Plan" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "banned" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputBanned" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "date" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "modes" } }, type: { kind: "ListType", type: { kind: "NamedType", name: { kind: "Name", value: "TransportMode" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "preferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputPreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "time" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "toPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputUnpreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "walkSpeed" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "plan" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "arriveBy" }, value: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } } }, { kind: "Argument", name: { kind: "Name", value: "banned" }, value: { kind: "Variable", name: { kind: "Name", value: "banned" } } }, { kind: "Argument", name: { kind: "Name", value: "bikeReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "carReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "date" }, value: { kind: "Variable", name: { kind: "Name", value: "date" } } }, { kind: "Argument", name: { kind: "Name", value: "fromPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "locale" }, value: { kind: "StringValue", value: "en", block: false } }, { kind: "Argument", name: { kind: "Name", value: "numItineraries" }, value: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } } }, { kind: "Argument", name: { kind: "Name", value: "preferred" }, value: { kind: "Variable", name: { kind: "Name", value: "preferred" } } }, { kind: "Argument", name: { kind: "Name", value: "time" }, value: { kind: "Variable", name: { kind: "Name", value: "time" } } }, { kind: "Argument", name: { kind: "Name", value: "toPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "toPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "transportModes" }, value: { kind: "Variable", name: { kind: "Name", value: "modes" } } }, { kind: "Argument", name: { kind: "Name", value: "unpreferred" }, value: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } } }, { kind: "Argument", name: { kind: "Name", value: "walkReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "walkSpeed" }, value: { kind: "Variable", name: { kind: "Name", value: "walkSpeed" } } }, { kind: "Argument", name: { kind: "Name", value: "wheelchair" }, value: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "itineraries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "legs" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "agency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "id" }, name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "timezone" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "arrivalDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "departureDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "dropoffType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "fareProducts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "product" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "medium" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "riderCategory" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "DefaultFareProduct" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "price" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "digits" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "from" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "headsign" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "interlineWithPreviousLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "intermediateStops" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locationType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopCode" }, name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopId" }, name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "legGeometry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "length" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "points" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "pickupBookingInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "earliestBookingTime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "daysPrior" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "pickupType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "realTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "realtimeState" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentedBike" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rideHailingEstimate" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "arrival" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "maxPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "minPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "provider" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "route" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "color" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "id" }, name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "longName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "shortName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "textColor" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "steps" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "absoluteDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "area" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "elevationProfile" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "elevation" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "relativeDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "stayOn" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "streetName" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "to" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "transitLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "trip" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "arrivalStoptime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stopPosition" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "departureStoptime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stopPosition" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "transfers" }, name: { kind: "Name", value: "numberOfTransfers" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "waitingTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "walkTime" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "routingErrors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "description" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputField" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 4950, source: { body: "query Plan(\n $arriveBy: Boolean\n $banned: InputBanned\n $bikeReluctance: Float\n $carReluctance: Float\n $date: String\n $fromPlace: String!\n $modes: [TransportMode]\n $numItineraries: Int\n $preferred: InputPreferred\n $time: String\n $toPlace: String!\n $unpreferred: InputUnpreferred\n $walkReluctance: Float\n $walkSpeed: Float\n $wheelchair: Boolean\n) {\n plan(\n arriveBy: $arriveBy\n banned: $banned\n bikeReluctance: $bikeReluctance\n carReluctance: $carReluctance\n date: $date\n fromPlace: $fromPlace\n # Currently only supporting EN locale, used for times and text\n locale: \"en\"\n numItineraries: $numItineraries\n preferred: $preferred\n time: $time\n toPlace: $toPlace\n transportModes: $modes\n unpreferred: $unpreferred\n walkReluctance: $walkReluctance\n walkSpeed: $walkSpeed\n wheelchair: $wheelchair\n ) {\n itineraries {\n accessibilityScore\n duration\n endTime\n legs {\n accessibilityScore\n agency {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n gtfsId\n id: gtfsId\n name\n timezone\n url\n }\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n arrivalDelay\n departureDelay\n distance\n dropoffType\n duration\n endTime\n fareProducts {\n id\n product {\n __typename\n id\n medium {\n id\n name\n }\n name\n riderCategory {\n id\n name\n }\n ... on DefaultFareProduct {\n price {\n amount\n currency {\n code\n digits\n }\n }\n }\n }\n }\n from {\n lat\n lon\n name\n rentalVehicle {\n id\n network\n }\n stop {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n code\n gtfsId\n id\n lat\n lon\n }\n vertexType\n }\n headsign\n interlineWithPreviousLeg\n intermediateStops {\n lat\n locationType\n lon\n name\n stopCode: code\n stopId: id\n }\n legGeometry {\n length\n points\n }\n mode\n pickupBookingInfo {\n earliestBookingTime {\n daysPrior\n }\n }\n pickupType\n realTime\n realtimeState\n rentedBike\n rideHailingEstimate {\n arrival\n maxPrice {\n amount\n currency {\n code\n }\n }\n minPrice {\n amount\n currency {\n code\n }\n }\n provider {\n id\n }\n }\n route {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n color\n gtfsId\n id: gtfsId\n longName\n shortName\n textColor\n type\n }\n startTime\n steps {\n absoluteDirection\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n area\n distance\n elevationProfile {\n distance\n elevation\n }\n lat\n lon\n relativeDirection\n stayOn\n streetName\n }\n to {\n lat\n lon\n name\n rentalVehicle {\n id\n network\n }\n stop {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n code\n gtfsId\n id\n lat\n lon\n }\n vertexType\n }\n transitLeg\n trip {\n arrivalStoptime {\n stop {\n gtfsId\n id\n }\n stopPosition\n }\n departureStoptime {\n stop {\n gtfsId\n id\n }\n stopPosition\n }\n gtfsId\n id\n }\n }\n startTime\n transfers: numberOfTransfers\n waitingTime\n walkTime\n }\n routingErrors {\n code\n description\n inputField\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
13
+ var DefaultPlanQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "Plan" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "banned" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputBanned" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "date" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "modes" } }, type: { kind: "ListType", type: { kind: "NamedType", name: { kind: "Name", value: "TransportMode" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "preferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputPreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "time" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "toPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputUnpreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "walkSpeed" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "plan" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "arriveBy" }, value: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } } }, { kind: "Argument", name: { kind: "Name", value: "banned" }, value: { kind: "Variable", name: { kind: "Name", value: "banned" } } }, { kind: "Argument", name: { kind: "Name", value: "bikeReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "carReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "date" }, value: { kind: "Variable", name: { kind: "Name", value: "date" } } }, { kind: "Argument", name: { kind: "Name", value: "fromPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "locale" }, value: { kind: "StringValue", value: "en", block: false } }, { kind: "Argument", name: { kind: "Name", value: "numItineraries" }, value: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } } }, { kind: "Argument", name: { kind: "Name", value: "preferred" }, value: { kind: "Variable", name: { kind: "Name", value: "preferred" } } }, { kind: "Argument", name: { kind: "Name", value: "time" }, value: { kind: "Variable", name: { kind: "Name", value: "time" } } }, { kind: "Argument", name: { kind: "Name", value: "toPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "toPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "transportModes" }, value: { kind: "Variable", name: { kind: "Name", value: "modes" } } }, { kind: "Argument", name: { kind: "Name", value: "unpreferred" }, value: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } } }, { kind: "Argument", name: { kind: "Name", value: "walkReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "walkSpeed" }, value: { kind: "Variable", name: { kind: "Name", value: "walkSpeed" } } }, { kind: "Argument", name: { kind: "Name", value: "wheelchair" }, value: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "itineraries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "legs" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "agency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "id" }, name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "timezone" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "arrivalDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "departureDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "dropOffBookingInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "contactInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "bookingUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "infoUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "phoneNumber" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "earliestBookingTime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "daysPrior" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "time" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "latestBookingTime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "daysPrior" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "time" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "message" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "dropoffType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "fareProducts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "product" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "medium" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "riderCategory" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "DefaultFareProduct" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "price" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "digits" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "from" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "headsign" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "interlineWithPreviousLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "intermediateStops" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locationType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopCode" }, name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopId" }, name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "legGeometry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "length" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "points" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "pickupBookingInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "contactInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "bookingUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "infoUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "phoneNumber" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "earliestBookingTime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "daysPrior" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "time" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "latestBookingTime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "daysPrior" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "time" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "message" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "pickupType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "realTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "realtimeState" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentedBike" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rideHailingEstimate" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "arrival" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "maxPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "minPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "provider" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "route" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "color" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "id" }, name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "longName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "shortName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "textColor" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "steps" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "absoluteDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "area" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "elevationProfile" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "elevation" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "relativeDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "stayOn" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "streetName" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "to" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "transitLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "trip" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "arrivalStoptime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stopPosition" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "departureStoptime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stopPosition" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "transfers" }, name: { kind: "Name", value: "numberOfTransfers" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "waitingTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "walkTime" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "routingErrors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "description" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputField" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 5493, source: { body: "query Plan(\n $arriveBy: Boolean\n $banned: InputBanned\n $bikeReluctance: Float\n $carReluctance: Float\n $date: String\n $fromPlace: String!\n $modes: [TransportMode]\n $numItineraries: Int\n $preferred: InputPreferred\n $time: String\n $toPlace: String!\n $unpreferred: InputUnpreferred\n $walkReluctance: Float\n $walkSpeed: Float\n $wheelchair: Boolean\n) {\n plan(\n arriveBy: $arriveBy\n banned: $banned\n bikeReluctance: $bikeReluctance\n carReluctance: $carReluctance\n date: $date\n fromPlace: $fromPlace\n # Currently only supporting EN locale, used for times and text\n locale: \"en\"\n numItineraries: $numItineraries\n preferred: $preferred\n time: $time\n toPlace: $toPlace\n transportModes: $modes\n unpreferred: $unpreferred\n walkReluctance: $walkReluctance\n walkSpeed: $walkSpeed\n wheelchair: $wheelchair\n ) {\n itineraries {\n accessibilityScore\n duration\n endTime\n legs {\n accessibilityScore\n agency {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n gtfsId\n id: gtfsId\n name\n timezone\n url\n }\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n arrivalDelay\n departureDelay\n distance\n dropOffBookingInfo {\n contactInfo {\n bookingUrl\n infoUrl\n phoneNumber\n }\n earliestBookingTime {\n daysPrior\n time\n }\n latestBookingTime {\n daysPrior\n time\n }\n message\n }\n dropoffType\n duration\n endTime\n fareProducts {\n id\n product {\n __typename\n id\n medium {\n id\n name\n }\n name\n riderCategory {\n id\n name\n }\n ... on DefaultFareProduct {\n price {\n amount\n currency {\n code\n digits\n }\n }\n }\n }\n }\n from {\n lat\n lon\n name\n rentalVehicle {\n id\n network\n }\n stop {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n code\n gtfsId\n id\n lat\n lon\n }\n vertexType\n }\n headsign\n interlineWithPreviousLeg\n intermediateStops {\n lat\n locationType\n lon\n name\n stopCode: code\n stopId: id\n }\n legGeometry {\n length\n points\n }\n mode\n pickupBookingInfo {\n contactInfo {\n bookingUrl\n infoUrl\n phoneNumber\n }\n earliestBookingTime {\n daysPrior\n time\n }\n latestBookingTime {\n daysPrior\n time\n }\n message\n }\n pickupType\n realTime\n realtimeState\n rentedBike\n rideHailingEstimate {\n arrival\n maxPrice {\n amount\n currency {\n code\n }\n }\n minPrice {\n amount\n currency {\n code\n }\n }\n provider {\n id\n }\n }\n route {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n color\n gtfsId\n id: gtfsId\n longName\n shortName\n textColor\n type\n }\n startTime\n steps {\n absoluteDirection\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n area\n distance\n elevationProfile {\n distance\n elevation\n }\n lat\n lon\n relativeDirection\n stayOn\n streetName\n }\n to {\n lat\n lon\n name\n rentalVehicle {\n id\n network\n }\n stop {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n code\n gtfsId\n id\n lat\n lon\n }\n vertexType\n }\n transitLeg\n trip {\n arrivalStoptime {\n stop {\n gtfsId\n id\n }\n stopPosition\n }\n departureStoptime {\n stop {\n gtfsId\n id\n }\n stopPosition\n }\n gtfsId\n id\n }\n }\n startTime\n transfers: numberOfTransfers\n waitingTime\n walkTime\n }\n routingErrors {\n code\n description\n inputField\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
14
14
 
15
15
  /**
16
16
  * Mode Settings can contain additional modes to add to the query,
@@ -24,7 +24,7 @@ function extractAdditionalModes(modeSettings, enabledModes) {
24
24
  // First, ensure that the mode associated with this setting is even enabled
25
25
  if (!enabledModes.map(m => m.mode).includes(cur.applicableMode)) {
26
26
  return prev;
27
- } // In checkboxes (or submode checkboxes), mode must be enabled and have a transport mode in it
27
+ } // In checkboxes, mode must be enabled and have a transport mode in it
28
28
 
29
29
 
30
30
  if ((cur.type === "CHECKBOX" || cur.type === "SUBMODE") && cur.addTransportMode && cur.value) {
@@ -79,6 +79,7 @@ const SIMPLIFICATIONS = {
79
79
  FUNICULAR: "TRANSIT",
80
80
  GONDOLA: "TRANSIT",
81
81
  RAIL: "TRANSIT",
82
+ MONORAIL: "TRANSIT",
82
83
  SCOOTER: "PERSONAL",
83
84
  SUBWAY: "TRANSIT",
84
85
  TROLLEYBUS: "TRANSIT",
@@ -159,7 +160,8 @@ function generateOtp2Query({
159
160
  numItineraries,
160
161
  preferred,
161
162
  time,
162
- to
163
+ to,
164
+ unpreferred
163
165
  }, planQuery = DefaultPlanQuery) {
164
166
  // This extracts the values from the mode settings to key value pairs
165
167
  const modeSettingValues = modeSettings.reduce((prev, cur) => {
@@ -192,12 +194,13 @@ function generateOtp2Query({
192
194
  bikeReluctance,
193
195
  carReluctance,
194
196
  date,
195
- fromPlace: `${from.name}::${from.lat},${from.lon}}`,
197
+ fromPlace: `${from.name}::${from.lat},${from.lon}`,
196
198
  modes,
197
199
  numItineraries,
198
200
  preferred,
199
201
  time,
200
- toPlace: `${to.name}::${to.lat},${to.lon}}`,
202
+ toPlace: `${to.name}::${to.lat},${to.lon}`,
203
+ unpreferred,
201
204
  walkReluctance,
202
205
  walkSpeed,
203
206
  wheelchair