Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
447
services/gateway/docs/asyncapi_mobile.yaml
Normal file
447
services/gateway/docs/asyncapi_mobile.yaml
Normal file
@@ -0,0 +1,447 @@
|
||||
asyncapi: 2.0.0
|
||||
info:
|
||||
title: Mobile Websocket API
|
||||
version: 1.0.0
|
||||
description: This serves as the documentation for websocket connections made between the mobile app and the gateway.
|
||||
servers:
|
||||
local:
|
||||
url: localhost/secret_mobile
|
||||
description: local
|
||||
protocol: wss
|
||||
development:
|
||||
url: dev-gw.cloud.fiskerinc.com/secret_mobile
|
||||
description: dev
|
||||
protocol: wss
|
||||
preproduction:
|
||||
url: gw.cloud.fiskerinc.com/secret_mobile
|
||||
description: preprod
|
||||
protocol: wss
|
||||
production:
|
||||
url: gw.cec-prd.fiskerinc.com/secret_mobile
|
||||
description: prod
|
||||
protocol: wss
|
||||
production-eu:
|
||||
url: gw.cec-euprd.fiskerinc.com/secret_mobile
|
||||
description: prod-eu
|
||||
protocol: wss
|
||||
|
||||
channels:
|
||||
Verify:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/Verify'
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/VerifyResponse'
|
||||
DigitalTwin:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/DigitalTwinRequest'
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/DigitalTwin'
|
||||
MapDestination:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/MapDestinationRequest'
|
||||
MapRoute:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/MapRouteRequest'
|
||||
Profiles:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/Profiles'
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/ProfilesResponse'
|
||||
StoreInventory:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/StoreInventory'
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/StoreInventoryResponse'
|
||||
StoreInventoryError:
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/StoreInventoryError'
|
||||
StorePurchase:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/StorePurchase'
|
||||
StorePurchaseError:
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/StorePurchaseError'
|
||||
SettingsUpdate:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/SettingsUpdate'
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/SettingsUpdateNotification'
|
||||
SubscriptionsUpdate:
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/SubscriptionsUpdate'
|
||||
Updates:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/UpdatesGet'
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/Updates'
|
||||
UpdateApprove:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/UpdateApprove'
|
||||
CarUpdate:
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/CarUpdate'
|
||||
CarLocations:
|
||||
publish:
|
||||
message:
|
||||
$ref: '#/components/messages/CarLocationsRequest'
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/CarLocations'
|
||||
Error:
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/Error'
|
||||
|
||||
components:
|
||||
messages:
|
||||
Verify:
|
||||
description: Sent by mobile to authenticate with the cloud.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "verify"
|
||||
const: verify
|
||||
data:
|
||||
$ref: './schema/mobile/TXMessage.json#/$defs/VerifyModel'
|
||||
VerifyResponse:
|
||||
description: Recieved by mobile after authenticating.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "verify"
|
||||
const: verify
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/VerifyResponseModel'
|
||||
|
||||
MapDestinationRequest:
|
||||
description: Sends map destination to the cloud for the HMI.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "map_destination"
|
||||
const: map_destination
|
||||
data:
|
||||
$ref: './schema/mobile/TXMessage.json#/$defs/MapDestinationRequestModel'
|
||||
MapRouteRequest:
|
||||
description: Sends map route to the cloud for the HMI.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "map_route"
|
||||
const: map_route
|
||||
data:
|
||||
$ref: './schema/mobile/TXMessage.json#/$defs/MapRouteRequestModel'
|
||||
|
||||
DigitalTwinRequest:
|
||||
description: Sent by mobile to retrieve digital twin data for specified VIN.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "digital_twin"
|
||||
data:
|
||||
$ref: './schema/mobile/TXMessage.json#/$defs/DigitalTwinRequestModel'
|
||||
DigitalTwin:
|
||||
description: Sent to mobile of digital twin data for specified VIN.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "digital_twin"
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/DigitalTwinModel'
|
||||
|
||||
Profiles:
|
||||
description: Prompts the cloud to send down all profiles on all cars for the user.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "profiles"
|
||||
const: profiles
|
||||
ProfilesResponse:
|
||||
description: Provides an updated version of all profiles on all cars for the user.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "profiles"
|
||||
const: profiles
|
||||
data:
|
||||
type: array
|
||||
description: an array of ProfileModels
|
||||
items:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/ProfileModel'
|
||||
|
||||
StoreInventory:
|
||||
description: Sent by mobile to ask the cloud for store inventory.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "store_inventory"
|
||||
const: store_inventory
|
||||
StoreInventoryResponse:
|
||||
description: Recieved by mobile after asking the cloud for store inventory.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "store_inventory"
|
||||
const: store_inventory
|
||||
data:
|
||||
type: array
|
||||
description: an array of StoreInventoryModels
|
||||
items:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/StoreInventoryModel'
|
||||
StoreInventoryError:
|
||||
description: Received by mobile if there is an error retrieving store inventory.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "store_inventory_error"
|
||||
const: store_inventory_error
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/ErrorModel'
|
||||
|
||||
StorePurchase:
|
||||
description: Notifies the cloud of a subscription purchase from mobile.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "store_purchase"
|
||||
const: store_purchase
|
||||
data:
|
||||
$ref: './schema/mobile/TXMessage.json#/$defs/StorePurchaseModel'
|
||||
StorePurchaseError:
|
||||
description: Received by mobile if there is an error purchasing a subscription.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "store_purchase_error"
|
||||
const: store_purchase_error
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/ErrorModel'
|
||||
|
||||
SettingsUpdate:
|
||||
description: Notifies the cloud of a setting change from mobile.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "settings_update"
|
||||
const: settings_update
|
||||
data:
|
||||
$ref: './schema/mobile/TXMessage.json#/$defs/SettingsUpdateModel'
|
||||
SettingsUpdateNotification:
|
||||
description: Notifies the mobile of a change in settings.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "settings_update"
|
||||
const: settings_update
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/SettingsUpdateModel'
|
||||
|
||||
SubscriptionsUpdate:
|
||||
description: Notifies the mobile of a succesful change in a subscription.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "subscriptions_update"
|
||||
const: subscriptions_update
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/SubscriptionsUpdateModel'
|
||||
|
||||
UpdatesGet:
|
||||
description: Sent by mobile to recieve a summary of all available OTA updates.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "updates_get"
|
||||
const: updates_get
|
||||
data:
|
||||
$ref: './schema/mobile/TXMessage.json#/$defs/GetUpdatesModel'
|
||||
Updates:
|
||||
description: Received by mobile as a summary of all available OTA updates.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "updates"
|
||||
const: updates
|
||||
data:
|
||||
type: array
|
||||
description: stores data for response
|
||||
items:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/UpdateManifest'
|
||||
UpdateApprove:
|
||||
description: Sent by mobile to grant approval to download and install an OTA update.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "update_approve"
|
||||
const: update_approve
|
||||
CarUpdate:
|
||||
description: Provides a status update on a specific car update.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "car_update"
|
||||
const: car_update
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/UpdateProgressModel'
|
||||
|
||||
CarLocationsRequest:
|
||||
description: Provides a status update on a specific car update.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "car_locations"
|
||||
const: car_locations
|
||||
CarLocations:
|
||||
description: Provides a status update on a specific car update.
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "car_locations"
|
||||
const: car_locations
|
||||
data:
|
||||
type: array
|
||||
description: provides car locations with their respective VIN
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/CarLocationModel'
|
||||
Error:
|
||||
description: Generic error message
|
||||
payload:
|
||||
type: object
|
||||
required:
|
||||
- handler
|
||||
- data
|
||||
properties:
|
||||
handler:
|
||||
type: string
|
||||
description: expects the string "error"
|
||||
const: error
|
||||
data:
|
||||
$ref: './schema/mobile/RXMessage.json#/$defs/ErrorModel'
|
||||
Reference in New Issue
Block a user