state.bootstrap
state.bootstrap
Section titled “state.bootstrap”On socket connection, server sends the entire state object. The client should hold this in memory, merging in deltas over time as they arrive in state.delta messages
Data Schema
Section titled “Data Schema”type: object
Properties
Section titled “Properties”| Name | Type | Required | Description |
|---|---|---|---|
input | object | yes | User state input |
plan | object | null | yes | |
geometry | object | yes | GeoJSON describing the user’s current position and planned routes. |
statements | object[] | yes | Planned statements for the user |
toolDefinitions | object[] | yes | List of all Tools that may be available in this session |
toolAvailabilities | string[] | yes | List of Tool IDs, for tools that are currently available and relevant |
server | object | yes | Metadata about the current state of the server from the user’s perspective |
Example
Section titled “Example”{ "kind": "state.bootstrap", "data": { "input": { "languages": [ "en-US", "nb-NO" ], "unitSystem": "LOCAL", "givenName": "Marius", "travelMode": "FOOT", "destinations": [ { "kind": "PRESENCE", "name": "Home" } ] }, "plan": { "durationSeconds": 852, "distanceMeters": 600 }, "geometry": { "fix": null, "triggers": {}, "routeLines": [], "routePoints": [] }, "statements": [ { "id": "c04dd717-7e2c-434d-8d31-2f7268e5b51b", "transcript": "Turn left at the roundabout.", "locale": "en-US", "clipId": "18905e54-0091-4e3a-90f7-58d1dcecb913", "trigger": { "kind": "LOCATION", "lat": 37.7749, "lng": -122.4194, "heading": 90 } } ], "toolDefinitions": [], "toolAvailabilities": [ "string" ], "server": { "isPlanning": false, "errorMessage": null, "dataAvailability": "FULL" } }}