Skip to content
Wysp Docs

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

type: object

NameTypeRequiredDescription
inputobjectyesUser state input
planobject | nullyes
geometryobjectyesGeoJSON describing the user’s current position and planned routes.
statementsobject[]yesPlanned statements for the user
toolDefinitionsobject[]yesList of all Tools that may be available in this session
toolAvailabilitiesstring[]yesList of Tool IDs, for tools that are currently available and relevant
serverobjectyesMetadata about the current state of the server from the user’s perspective
{
"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"
}
}
}