@motis-project/motis-client 2.8.0 → 2.8.2

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.
@@ -466,6 +466,13 @@ Can be missing if neither real-time updates nor the schedule timetable contains
466
466
  description: "Time that on-demand service ends",
467
467
  type: "string",
468
468
  format: "date-time"
469
+ },
470
+ modes: {
471
+ description: "available transport modes for stops",
472
+ type: "array",
473
+ items: {
474
+ "$ref": "#/components/schemas/Mode"
475
+ }
469
476
  }
470
477
  }
471
478
  };
@@ -515,7 +522,7 @@ var ReachableSchema = {
515
522
  var StopTimeSchema = {
516
523
  description: "departure or arrival event at a stop",
517
524
  type: "object",
518
- required: ["place", "mode", "realTime", "headsign", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeId", "directionId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"],
525
+ required: ["place", "mode", "realTime", "headsign", "tripFrom", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeId", "directionId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"],
519
526
  properties: {
520
527
  place: {
521
528
  "$ref": "#/components/schemas/Place",
@@ -535,6 +542,10 @@ For non-transit legs, null
535
542
  `,
536
543
  type: "string"
537
544
  },
545
+ tripFrom: {
546
+ description: "first stop of this trip",
547
+ "$ref": "#/components/schemas/Place"
548
+ },
538
549
  tripTo: {
539
550
  description: "final stop of this trip",
540
551
  "$ref": "#/components/schemas/Place"
@@ -1322,6 +1333,10 @@ For non-transit legs, null
1322
1333
  `,
1323
1334
  type: "string"
1324
1335
  },
1336
+ tripFrom: {
1337
+ description: "first stop of this trip",
1338
+ "$ref": "#/components/schemas/Place"
1339
+ },
1325
1340
  tripTo: {
1326
1341
  description: "final stop of this trip (can differ from headsign)",
1327
1342
  "$ref": "#/components/schemas/Place"
@@ -1423,6 +1438,11 @@ by looping active weekdays, e.g. from calendar.txt in GTFS.
1423
1438
  `,
1424
1439
  type: "string",
1425
1440
  format: "date-time"
1441
+ },
1442
+ bikesAllowed: {
1443
+ description: `Whether bikes can be carried on this leg.
1444
+ `,
1445
+ type: "boolean"
1426
1446
  }
1427
1447
  }
1428
1448
  };
@@ -1726,9 +1746,11 @@ var ServerConfigSchema = {
1726
1746
  };
1727
1747
  var ErrorSchema = {
1728
1748
  type: "object",
1749
+ required: ["error"],
1729
1750
  properties: {
1730
1751
  error: {
1731
- type: "string"
1752
+ type: "string",
1753
+ description: "error message"
1732
1754
  }
1733
1755
  }
1734
1756
  };
package/dist/index.js CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  TripInfoSchema,
50
50
  TripSegmentSchema,
51
51
  VertexTypeSchema
52
- } from "./chunk-2KJNFZVR.js";
52
+ } from "./chunk-3462JEGC.js";
53
53
  import {
54
54
  client,
55
55
  geocode,
@@ -380,6 +380,13 @@ declare const PlaceSchema: {
380
380
  readonly type: "string";
381
381
  readonly format: "date-time";
382
382
  };
383
+ readonly modes: {
384
+ readonly description: "available transport modes for stops";
385
+ readonly type: "array";
386
+ readonly items: {
387
+ readonly $ref: "#/components/schemas/Mode";
388
+ };
389
+ };
383
390
  };
384
391
  };
385
392
  declare const ReachablePlaceSchema: {
@@ -420,7 +427,7 @@ declare const ReachableSchema: {
420
427
  declare const StopTimeSchema: {
421
428
  readonly description: "departure or arrival event at a stop";
422
429
  readonly type: "object";
423
- readonly required: readonly ["place", "mode", "realTime", "headsign", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeId", "directionId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"];
430
+ readonly required: readonly ["place", "mode", "realTime", "headsign", "tripFrom", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeId", "directionId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"];
424
431
  readonly properties: {
425
432
  readonly place: {
426
433
  readonly $ref: "#/components/schemas/Place";
@@ -438,6 +445,10 @@ declare const StopTimeSchema: {
438
445
  readonly description: "The headsign of the bus or train being used.\nFor non-transit legs, null\n";
439
446
  readonly type: "string";
440
447
  };
448
+ readonly tripFrom: {
449
+ readonly description: "first stop of this trip";
450
+ readonly $ref: "#/components/schemas/Place";
451
+ };
441
452
  readonly tripTo: {
442
453
  readonly description: "final stop of this trip";
443
454
  readonly $ref: "#/components/schemas/Place";
@@ -1172,6 +1183,10 @@ declare const LegSchema: {
1172
1183
  readonly description: "For transit legs, the headsign of the bus or train being used.\nFor non-transit legs, null\n";
1173
1184
  readonly type: "string";
1174
1185
  };
1186
+ readonly tripFrom: {
1187
+ readonly description: "first stop of this trip";
1188
+ readonly $ref: "#/components/schemas/Place";
1189
+ };
1175
1190
  readonly tripTo: {
1176
1191
  readonly description: "final stop of this trip (can differ from headsign)";
1177
1192
  readonly $ref: "#/components/schemas/Place";
@@ -1263,6 +1278,10 @@ declare const LegSchema: {
1263
1278
  readonly type: "string";
1264
1279
  readonly format: "date-time";
1265
1280
  };
1281
+ readonly bikesAllowed: {
1282
+ readonly description: "Whether bikes can be carried on this leg.\n";
1283
+ readonly type: "boolean";
1284
+ };
1266
1285
  };
1267
1286
  };
1268
1287
  declare const RiderCategorySchema: {
@@ -1507,9 +1526,11 @@ declare const ServerConfigSchema: {
1507
1526
  };
1508
1527
  declare const ErrorSchema: {
1509
1528
  readonly type: "object";
1529
+ readonly required: readonly ["error"];
1510
1530
  readonly properties: {
1511
1531
  readonly error: {
1512
1532
  readonly type: "string";
1533
+ readonly description: "error message";
1513
1534
  };
1514
1535
  };
1515
1536
  };
@@ -49,7 +49,7 @@ import {
49
49
  TripInfoSchema,
50
50
  TripSegmentSchema,
51
51
  VertexTypeSchema
52
- } from "./chunk-2KJNFZVR.js";
52
+ } from "./chunk-3462JEGC.js";
53
53
  export {
54
54
  AlertCauseSchema,
55
55
  AlertEffectSchema,
@@ -409,6 +409,10 @@ type Place = {
409
409
  * Time that on-demand service ends
410
410
  */
411
411
  flexEndPickupDropOffWindow?: string;
412
+ /**
413
+ * available transport modes for stops
414
+ */
415
+ modes?: Array<Mode>;
412
416
  };
413
417
  /**
414
418
  * Place reachable by One-to-All
@@ -470,6 +474,10 @@ type StopTime = {
470
474
  *
471
475
  */
472
476
  headsign: string;
477
+ /**
478
+ * first stop of this trip
479
+ */
480
+ tripFrom: Place;
473
481
  /**
474
482
  * final stop of this trip
475
483
  */
@@ -1077,6 +1085,10 @@ type Leg = {
1077
1085
  *
1078
1086
  */
1079
1087
  headsign?: string;
1088
+ /**
1089
+ * first stop of this trip
1090
+ */
1091
+ tripFrom?: Place;
1080
1092
  /**
1081
1093
  * final stop of this trip (can differ from headsign)
1082
1094
  */
@@ -1139,6 +1151,11 @@ type Leg = {
1139
1151
  *
1140
1152
  */
1141
1153
  loopedCalendarSince?: string;
1154
+ /**
1155
+ * Whether bikes can be carried on this leg.
1156
+ *
1157
+ */
1158
+ bikesAllowed?: boolean;
1142
1159
  };
1143
1160
  type RiderCategory = {
1144
1161
  /**
@@ -1371,7 +1388,10 @@ type ServerConfig = {
1371
1388
  maxDirectTimeLimit: number;
1372
1389
  };
1373
1390
  type Error = {
1374
- error?: string;
1391
+ /**
1392
+ * error message
1393
+ */
1394
+ error: string;
1375
1395
  };
1376
1396
  type PlanData = {
1377
1397
  query: {
@@ -1406,7 +1426,7 @@ type PlanData = {
1406
1426
  * - false: Only return basic information (start time, end time, duration) for transfers.
1407
1427
  *
1408
1428
  */
1409
- detailedTransfers: boolean;
1429
+ detailedTransfers?: boolean;
1410
1430
  /**
1411
1431
  * Optional. Default is `WALK` which will compute walking routes as direct connections.
1412
1432
  *
@@ -2351,6 +2371,10 @@ type StoptimesData = {
2351
2371
  *
2352
2372
  */
2353
2373
  time?: string;
2374
+ /**
2375
+ * Optional. Default is `true`. If set to `false`, alerts are omitted in the metadata of place for all stopTimes.
2376
+ */
2377
+ withAlerts?: boolean;
2354
2378
  /**
2355
2379
  * Optional. Include stoptimes where passengers can not alight/board according to schedule.
2356
2380
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motis-project/motis-client",
3
- "version": "2.8.0",
3
+ "version": "2.8.2",
4
4
  "description": "A JS client for the MOTIS API.",
5
5
  "public": true,
6
6
  "main": "dist/index.js",