From 4e7e10a8351fb867d727f71392002433cf5197ef Mon Sep 17 00:00:00 2001 From: Tim Kuilman Date: Wed, 11 Aug 2021 13:19:24 +0200 Subject: [PATCH] feat: update to 1.15.0 --- graphql.schema.json | 551 +++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- src/graphql.ts | 117 +++++++++- 3 files changed, 651 insertions(+), 19 deletions(-) diff --git a/graphql.schema.json b/graphql.schema.json index b1e5ed1..0a0f07c 100644 --- a/graphql.schema.json +++ b/graphql.schema.json @@ -1558,7 +1558,19 @@ }, { "name": "power", - "description": "The maximum power a plug accepts in kW", + "description": "Usable electric power in kW", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "max_electric_power", + "description": "Maximum electric power in kW", "args": [], "type": { "kind": "SCALAR", @@ -7477,6 +7489,22 @@ "ofType": null } }, + "isDeprecated": true, + "deprecationReason": "predicted_availability, no value will be sent. Deprecated in favor of predicted_occupancy" + }, + { + "name": "predicted_occupancy", + "description": "Predicted station occupancy", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StationPredictedOccupancy", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, @@ -9784,6 +9812,65 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "StationPredictedOccupancy", + "description": "Station occupancy for each weekday and hour", + "fields": [ + { + "name": "weekday", + "description": "Number of weekday from 1 (monday) to 7 (sunday)", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "occupancy", + "description": "Occupancy on a scale from 1 to 10, where 1 means free for charging and 10 means fully occupied", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "period_begin", + "description": "Start of the period of the occupancy prediction (string of 'hh-mmZ' format)", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "period_end", + "description": "End of the period of the occupancy prediction (string of 'hh-mmZ' format)", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "ChargerStatus", @@ -10211,8 +10298,19 @@ }, { "name": "polyline", - "description": "Polyline encoded route", - "args": [], + "description": "Polyline containing encoded coordinates", + "args": [ + { + "name": "decimals", + "description": "Number of decimals used for Google Polyline encoding Algorithm. Allowed values are 5 or 6, default is 5", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], "type": { "kind": "SCALAR", "name": "String", @@ -10317,6 +10415,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "instructions", + "description": "List of raw turn-by-turn navigation instructions", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RouteInstruction", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stationsAlongRoute", "description": "Alternative stations along a route within specified radius in meters. Only if it was provided at newRoute mutation", @@ -10922,6 +11036,283 @@ ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "RouteInstruction", + "description": null, + "fields": [ + { + "name": "points", + "description": "Information about the points on the polyline", + "args": [], + "type": { + "kind": "OBJECT", + "name": "RouteInstructionPoints", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sign", + "description": "Sign of the instruction. See `RouteInstructionSign`", + "args": [], + "type": { + "kind": "ENUM", + "name": "RouteInstructionSign", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the street on which the instruction is", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "distance", + "description": "Distance, in meters, of the current route instruction", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "time", + "description": "Duration, in seconds, of the current route instruction", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exit_number", + "description": "Exit number on a roundabout. This field exists only on sign `USE_ROUNDABOUT` (6), otherwise is null", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "turn_angle", + "description": "Curvature angle between the roundabout and street you exit the roundabout. This field exists only on sign USE_ROUNDABOUT (6), otherwise is null", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RouteInstructionPoints", + "description": null, + "fields": [ + { + "name": "size", + "description": "Number of polyline points which are included in this instruction", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "interval", + "description": "The interval of points that are included in this instruction, an array with 2 values, where the first value is the index of the polyline where the interval starts. The second value is where it ends", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "RouteInstructionSign", + "description": "Sign belonging to the instruction indicating the main maneuver", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "UNKNOWN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "U_TURN_UNKNOWN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "U_TURN_LEFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KEEP_LEFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LEAVE_ROUNDABOUT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TURN_SHARP_LEFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TURN_LEFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TURN_SLIGHT_LEFT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONTINUE_ON_STREET", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TURN_SLIGHT_RIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TURN_RIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TURN_SHARP_RIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FINISH", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REACHED_VIA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REACHED_CHARGING_STATION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "USE_ROUNDABOUT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "KEEP_RIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "U_TURN_RIGHT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_START_TRIP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_TRANSFER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PT_END_TRIP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IGNORE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "RouteStationsAlong", @@ -11516,6 +11907,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "instructions", + "description": "Flag indicating wether the turn-by-turn navigation instructions should be prepared. Disclaimer: The functionality is under active development and the final API is a subject to change. Not ready for production", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -12755,13 +13158,23 @@ }, { "name": "stationsAlongRouteRadius", - "description": "Alternative stations along a route within a specified radius in meters (min 500, max 5000)", + "description": "Alternative stations along a route within a specified radius in meters (minimum 500, maximum 5000)", "type": { "kind": "SCALAR", "name": "Int", "ofType": null }, "defaultValue": null + }, + { + "name": "instructions", + "description": "Flag indicating wether the turn-by-turn navigation instructions should be prepared. Disclaimer: The functionality is under active development and the final API is a subject to change. Not ready for production", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null } ], "interfaces": null, @@ -13058,12 +13471,6 @@ "description": "Full size image with a resolution at least 1536x864 px", "isDeprecated": false, "deprecationReason": null - }, - { - "name": "brand", - "description": "Full size brand (maker) logo with a resolution at least 768x432 px", - "isDeprecated": false, - "deprecationReason": null } ], "possibleTypes": null @@ -13093,10 +13500,134 @@ "description": "Is public and can be used by a customer", "isDeprecated": false, "deprecationReason": null + }, + { + "name": "removed", + "description": "Is removed and can not be used", + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CarMakerImage", + "description": null, + "fields": [ + { + "name": "url", + "description": "The full path URL of the large image", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "height", + "description": "The height of the large image", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "width", + "description": "The width of the large image", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "thumbnail_url", + "description": "The full path URL of the thumbnail image", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "thumbnail_height", + "description": "The height of the thumbnail image", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "thumbnail_width", + "description": "The width of the thumbnail image", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CarMaker", + "description": null, + "fields": [ + { + "name": "maker", + "description": "The name of the car maker", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "image", + "description": "The media image of the car maker", + "args": [], + "type": { + "kind": "OBJECT", + "name": "CarMakerImage", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "SCALAR", "name": "Upload", diff --git a/package.json b/package.json index 69b7ac4..851ef8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargetrip/types", - "version": "1.13.0", + "version": "1.15.0", "description": "Typescript types for the Chargetrip EV-routing GraphQL API", "license": "MIT", "keywords": [ diff --git a/src/graphql.ts b/src/graphql.ts index 657d092..5cd6bab 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -360,8 +360,10 @@ export type CarNaming = { export type CarPlug = { /** Plug type, known as connector standard in OCPI */ standard?: Maybe; - /** The maximum power a plug accepts in kW */ + /** Usable electric power in kW */ power?: Maybe; + /** Maximum electric power in kW */ + max_electric_power?: Maybe; /** Time it takes to charge from 10 to 80% with a fast charger, shown in minutes */ time?: Maybe; /** Charging speed in km/h */ @@ -1605,8 +1607,13 @@ export type Station = { private?: Maybe; /** Connectors grouped by power */ power?: Maybe; - /** Station availability */ + /** + * Station availability + * @deprecated predicted_availability, no value will be sent. Deprecated in favor of predicted_occupancy + */ predicted_availability?: Maybe>>; + /** Predicted station occupancy */ + predicted_occupancy?: Maybe>>; /** Charging speed for a station */ speed?: Maybe; /** Global status for a station */ @@ -2137,6 +2144,18 @@ export type StationPredictedAvailability = { prediction?: Maybe>>; }; +/** Station occupancy for each weekday and hour */ +export type StationPredictedOccupancy = { + /** Number of weekday from 1 (monday) to 7 (sunday) */ + weekday?: Maybe; + /** Occupancy on a scale from 1 to 10, where 1 means free for charging and 10 means fully occupied */ + occupancy?: Maybe; + /** Start of the period of the occupancy prediction (string of 'hh-mmZ' format) */ + period_begin?: Maybe; + /** End of the period of the occupancy prediction (string of 'hh-mmZ' format) */ + period_end?: Maybe; +}; + export enum ChargerStatus { /** The charger is free */ FREE = "free", @@ -2227,7 +2246,7 @@ export type RouteAlternative = { rangeEndKwh?: Maybe; /** Text information about a route direction */ via?: Maybe; - /** Polyline encoded route */ + /** Polyline containing encoded coordinates */ polyline?: Maybe; /** Path elevation, distance, duration, consumption and speed values, grouped into 100 segments */ pathPlot?: Maybe>>; @@ -2246,10 +2265,16 @@ export type RouteAlternative = { saving?: Maybe; /** Legs of the route */ legs?: Maybe>>; + /** List of raw turn-by-turn navigation instructions */ + instructions?: Maybe>>; /** Alternative stations along a route within specified radius in meters. Only if it was provided at newRoute mutation */ stationsAlongRoute?: Maybe>>; }; +export type RouteAlternativepolylineArgs = { + decimals?: Maybe; +}; + /** Types of an alternative route */ export enum RouteAlternativeType { /** Fastest route between origin and destination */ @@ -2366,6 +2391,56 @@ export enum LegType { STATIONFINAL = "stationFinal" } +export type RouteInstruction = { + /** Information about the points on the polyline */ + points?: Maybe; + /** Sign of the instruction. See `RouteInstructionSign` */ + sign?: Maybe; + /** Name of the street on which the instruction is */ + name?: Maybe; + /** Distance, in meters, of the current route instruction */ + distance?: Maybe; + /** Duration, in seconds, of the current route instruction */ + time?: Maybe; + /** Exit number on a roundabout. This field exists only on sign `USE_ROUNDABOUT` (6), otherwise is null */ + exit_number?: Maybe; + /** Curvature angle between the roundabout and street you exit the roundabout. This field exists only on sign USE_ROUNDABOUT (6), otherwise is null */ + turn_angle?: Maybe; +}; + +export type RouteInstructionPoints = { + /** Number of polyline points which are included in this instruction */ + size?: Maybe; + /** The interval of points that are included in this instruction, an array with 2 values, where the first value is the index of the polyline where the interval starts. The second value is where it ends */ + interval?: Maybe>>; +}; + +/** Sign belonging to the instruction indicating the main maneuver */ +export enum RouteInstructionSign { + UNKNOWN = "UNKNOWN", + U_TURN_UNKNOWN = "U_TURN_UNKNOWN", + U_TURN_LEFT = "U_TURN_LEFT", + KEEP_LEFT = "KEEP_LEFT", + LEAVE_ROUNDABOUT = "LEAVE_ROUNDABOUT", + TURN_SHARP_LEFT = "TURN_SHARP_LEFT", + TURN_LEFT = "TURN_LEFT", + TURN_SLIGHT_LEFT = "TURN_SLIGHT_LEFT", + CONTINUE_ON_STREET = "CONTINUE_ON_STREET", + TURN_SLIGHT_RIGHT = "TURN_SLIGHT_RIGHT", + TURN_RIGHT = "TURN_RIGHT", + TURN_SHARP_RIGHT = "TURN_SHARP_RIGHT", + FINISH = "FINISH", + REACHED_VIA = "REACHED_VIA", + REACHED_CHARGING_STATION = "REACHED_CHARGING_STATION", + USE_ROUNDABOUT = "USE_ROUNDABOUT", + KEEP_RIGHT = "KEEP_RIGHT", + U_TURN_RIGHT = "U_TURN_RIGHT", + PT_START_TRIP = "PT_START_TRIP", + PT_TRANSFER = "PT_TRANSFER", + PT_END_TRIP = "PT_END_TRIP", + IGNORE = "IGNORE" +} + export type RouteStationsAlong = { /** The ID of station */ id?: Maybe; @@ -2472,6 +2547,8 @@ export type RequestRoute = { via?: Maybe>>; /** Radius in meters for alternative stations along a route (min 500 - max 5000) */ stationsAlongRouteRadius?: Maybe; + /** Flag indicating wether the turn-by-turn navigation instructions should be prepared. Disclaimer: The functionality is under active development and the final API is a subject to change. Not ready for production */ + instructions?: Maybe; }; /** The season of the route */ @@ -2736,8 +2813,10 @@ export type RequestRouteInput = { destination: FeaturePointInput; /** An optional list of locations where we should stop */ via?: Maybe>>; - /** Alternative stations along a route within a specified radius in meters (min 500, max 5000) */ + /** Alternative stations along a route within a specified radius in meters (minimum 500, maximum 5000) */ stationsAlongRouteRadius?: Maybe; + /** Flag indicating wether the turn-by-turn navigation instructions should be prepared. Disclaimer: The functionality is under active development and the final API is a subject to change. Not ready for production */ + instructions?: Maybe; }; /** A GeoJSON Feature input */ @@ -2830,9 +2909,7 @@ export type SubscriptionstationDeletedByIdArgs = { /** When uploading images to a car, you can select one of this types. The rest of the types are automatically generated by the system */ export enum CarImageTypeUploadable { /** Full size image with a resolution at least 1536x864 px */ - IMAGE = "image", - /** Full size brand (maker) logo with a resolution at least 768x432 px */ - BRAND = "brand" + IMAGE = "image" } /** Status of a car */ @@ -2842,9 +2919,33 @@ export enum CarStatus { /** Is being reviewed by a human operator */ REVIEW = "review", /** Is public and can be used by a customer */ - PUBLIC = "public" + PUBLIC = "public", + /** Is removed and can not be used */ + REMOVED = "removed" } +export type CarMakerImage = { + /** The full path URL of the large image */ + url?: Maybe; + /** The height of the large image */ + height?: Maybe; + /** The width of the large image */ + width?: Maybe; + /** The full path URL of the thumbnail image */ + thumbnail_url?: Maybe; + /** The height of the thumbnail image */ + thumbnail_height?: Maybe; + /** The width of the thumbnail image */ + thumbnail_width?: Maybe; +}; + +export type CarMaker = { + /** The name of the car maker */ + maker?: Maybe; + /** The media image of the car maker */ + image?: Maybe; +}; + /** The price model */ export type Price = { /** The value of the price */