gateway-addon
Version:
Bindings for WebThings Gateway add-ons
2,346 lines (2,344 loc) • 54.4 kB
text/typescript
/* tslint:disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* The top-level message which encapsulates all message types
*/
export type Message =
| PluginRegisterRequest
| PluginRegisterResponse
| PluginUnloadRequest
| PluginUnloadResponse
| PluginErrorNotification
| AdapterAddedNotification
| AdapterCancelPairingCommand
| AdapterCancelRemoveDeviceCommand
| AdapterPairingPromptNotification
| AdapterRemoveDeviceRequest
| AdapterRemoveDeviceResponse
| AdapterStartPairingCommand
| AdapterUnloadRequest
| AdapterUnloadResponse
| AdapterUnpairingPromptNotification
| DeviceActionStatusNotification
| DeviceAddedNotification
| DeviceConnectedStateNotification
| DeviceEventNotification
| DevicePropertyChangedNotification
| DeviceRemoveActionRequest
| DeviceRemoveActionResponse
| DeviceRequestActionRequest
| DeviceRequestActionResponse
| DeviceSetCredentialsRequest
| DeviceSetCredentialsResponse
| DeviceSetPINRequest
| DeviceSetPINResponse
| DeviceSetPropertyCommand
| DeviceSavedNotification
| NotifierAddedNotification
| NotifierUnloadRequest
| NotifierUnloadResponse
| OutletAddedNotification
| OutletNotifyRequest
| OutletNotifyResponse
| OutletRemovedNotification
| APIHandlerAddedNotification
| APIHandlerAPIRequest
| APIHandlerAPIResponse
| APIHandlerUnloadRequest
| APIHandlerUnloadResponse
| MockAdapterAddDeviceRequest
| MockAdapterAddDeviceResponse
| MockAdapterClearStateRequest
| MockAdapterClearStateResponse
| MockAdapterPairDeviceCommand
| MockAdapterRemoveDeviceRequest
| MockAdapterRemoveDeviceResponse
| MockAdapterUnpairDeviceCommand;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType = number;
/**
* ID of the plugin being registered
*/
export type PluginID = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType1 = 1;
/**
* ID of the plugin which has been registered
*/
export type PluginID1 = string;
/**
* Version of the running gateway
*/
export type GatewayVersion = string;
/**
* Add-ons directory, e.g. "/home/pi/.webthings/addons"
*/
export type AddOnsDirectory = string;
/**
* Base user profile directory, e.g. "/home/pi/.webthings"
*/
export type BaseDirectory = string;
/**
* Configuration directory, e.g. "/home/pi/.webthings/config"
*/
export type ConfigurationDirectory = string;
/**
* Data directory, e.g. "/home/pi/.webthings/data"
*/
export type DataDirectory = string;
/**
* Media directory, e.g. "/home/pi/.webthings/media"
*/
export type MediaDirectory = string;
/**
* Log directory, e.g. "/home/pi/.webthings/log"
*/
export type LogDirectory = string;
/**
* Gateway directory, e.g. "/home/pi/webthings/gateway"
*/
export type GatewayDirectory = string;
/**
* User's preferred language, e.g. "en-US"
*/
export type Language = string;
/**
* Preferred temperature unit, e.g. "degree celsius"
*/
export type Temperature = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType2 = 2;
/**
* ID of the plugin being unloaded
*/
export type PluginID2 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType3 = 3;
/**
* ID of the plugin which has been unloaded
*/
export type PluginID3 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType4 = 4;
/**
* ID of the plugin which has had an error
*/
export type PluginID4 = string;
/**
* Error message
*/
export type ErrorMessage = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType5 = 4096;
/**
* ID of the plugin
*/
export type PluginID5 = string;
/**
* ID of the new adapter
*/
export type AdapterID = string;
/**
* Name of the new adapter
*/
export type Name = string;
/**
* Name of the add-on package
*/
export type PackageName = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType6 = 4100;
/**
* ID of the plugin
*/
export type PluginID6 = string;
/**
* ID of the adapter
*/
export type AdapterID1 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType7 = 4105;
/**
* ID of the plugin
*/
export type PluginID7 = string;
/**
* ID of the adapter
*/
export type AdapterID2 = string;
/**
* ID of the device which is being removed
*/
export type DeviceID = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType8 = 4101;
/**
* ID of the plugin
*/
export type PluginID8 = string;
/**
* ID of the adapter
*/
export type AdapterID3 = string;
/**
* The message to present to the user
*/
export type Prompt = string;
/**
* URL of a web page containing more information
*/
export type URL = string;
/**
* ID of specific device the prompt pertains to
*/
export type DeviceID1 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType9 = 4103;
/**
* ID of the plugin
*/
export type PluginID9 = string;
/**
* ID of the adapter
*/
export type AdapterID4 = string;
/**
* ID of the device to remove
*/
export type DeviceID2 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType10 = 4104;
/**
* ID of the plugin
*/
export type PluginID10 = string;
/**
* ID of the adapter
*/
export type AdapterID5 = string;
/**
* ID of the device which has been removed
*/
export type DeviceID3 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType11 = 4099;
/**
* ID of the plugin
*/
export type PluginID11 = string;
/**
* ID of the adapter
*/
export type AdapterID6 = string;
/**
* Number of seconds to run the pairing process before timing out
*/
export type Timeout = number;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType12 = 4097;
/**
* ID of the plugin
*/
export type PluginID12 = string;
/**
* ID of the adapter
*/
export type AdapterID7 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType13 = 4098;
/**
* ID of the plugin
*/
export type PluginID13 = string;
/**
* ID of the adapter
*/
export type AdapterID8 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType14 = 4102;
/**
* ID of the plugin
*/
export type PluginID14 = string;
/**
* ID of the adapter
*/
export type AdapterID9 = string;
/**
* The message to present to the user
*/
export type Prompt1 = string;
/**
* URL of a web page containing more information
*/
export type URL1 = string;
/**
* ID of specific device the prompt pertains to
*/
export type DeviceID4 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType15 = 8201;
/**
* ID of the plugin
*/
export type PluginID15 = string;
/**
* ID of the adapter
*/
export type AdapterID10 = string;
/**
* ID of the device
*/
export type DeviceID5 = string;
/**
* ID of the Action
*/
export type ActionID = string;
/**
* Name of the Action
*/
export type ActionName = string;
export type Any =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* Status of the Action
*/
export type ActionStatus = string;
/**
* Request time of the Action
*/
export type ActionRequestTime = string;
/**
* Completion time of the Action
*/
export type ActionCompletionTime = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType16 = 8192;
/**
* ID of the plugin
*/
export type PluginID16 = string;
/**
* ID of the adapter
*/
export type AdapterID11 = string;
/**
* The JSON-LD context used by the device
*/
export type DeviceContext = string;
/**
* A JSON-LD context used by the device
*/
export type DeviceContext1 = string;
/**
* An array of JSON-LD contexts used by the device
*/
export type DeviceContexts = (DeviceContext1 | PrefixedDeviceContext)[];
/**
* Types of the device
*/
export type DeviceTypes = string;
/**
* ID of the device
*/
export type DeviceID6 = string;
/**
* Title of the Device
*/
export type DeviceTitle = string;
/**
* Description of the device
*/
export type DeviceDescription = string;
/**
* The type of the property
*/
export type PropertyType = string;
/**
* The name of the property
*/
export type PropertyName = string;
/**
* The title of the property
*/
export type PropertyTitle = string;
/**
* Description of the property
*/
export type PropertyDescription = string;
export type PropertyForm = Form & {
op?:
| ("readproperty" | "writeproperty" | "observeproperty" | "unobserveproperty")
| ("readproperty" | "writeproperty" | "observeproperty" | "unobserveproperty")[];
[k: string]: unknown;
};
/**
* The type of the property value
*/
export type PropertyValueType = "null" | "boolean" | "object" | "array" | "number" | "integer" | "string";
/**
* The unit of the property
*/
export type PropertyUnit = string;
/**
* The minimum value of the property
*/
export type PropertyMinimumValue = number;
/**
* The maximum value of the property
*/
export type PropertyMaximumValue = number;
/**
* The precision of the value
*/
export type PropertyValuePrecision = number;
/**
* The possible values of the property
*/
export type Any1 =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* If the property is read-only
*/
export type PropertyReadOnly = boolean;
/**
* The value of the property
*/
export type Any2 =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* The type of the action
*/
export type ActionType = string;
/**
* The title of the Action
*/
export type ActionTitle = string;
/**
* Description of the Action
*/
export type ActionDescription1 = string;
export type ActionInput = ObjectActionInput | ActionInputProperty;
/**
* The type of the input
*/
export type ObjectInputType = "object";
/**
* The type of the input property
*/
export type InputPropertyType = string;
/**
* The type of the input property value
*/
export type InputPropertyValueType = "null" | "boolean" | "object" | "array" | "number" | "integer" | "string";
/**
* The unit of the input property
*/
export type InputPropertyUnit = string;
/**
* The minimum value of the input property
*/
export type InputPropertyMinimumValue = number;
/**
* The maximum value of the input property
*/
export type InputPropertyMaximumValue = number;
/**
* The precision of the value
*/
export type InputPropertyValuePrecision = number;
/**
* The possible values of the input property
*/
export type Any3 =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* The type of the event
*/
export type EventType = string;
/**
* The name of the event
*/
export type EventName = string;
/**
* The title of the event
*/
export type EventTitle = string;
/**
* Description of the event
*/
export type EventDescription = string;
/**
* Event payload data schema (deprecated in favour of data.type)
*/
export type EventValueType = "null" | "boolean" | "object" | "array" | "number" | "integer" | "string";
/**
* The unit of the event (deprecated in favour of data.unit)
*/
export type EventUnit = string;
/**
* The minimum value of the event (deprecated in favour of data.minimum)
*/
export type EventMinimumValue = number;
/**
* The maximum value of the event (deprecated in favour of data.maximum)
*/
export type EventMaximumValue = number;
/**
* The precision of the value (deprecated in favour of data.multipleOf)
*/
export type EventValuePrecision = number;
/**
* The possible values of the property (deprecated in favour of data.enum)
*/
export type Any4 =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* The type of the event value
*/
export type EventValueType1 = "null" | "boolean" | "object" | "array" | "number" | "integer" | "string";
/**
* The unit of the event
*/
export type EventUnit1 = string;
/**
* The minimum value of the event
*/
export type EventMinimumValue1 = number;
/**
* The maximum value of the event
*/
export type EventMaximumValue1 = number;
/**
* The precision of the value
*/
export type EventValuePrecision1 = number;
/**
* The possible values of the property
*/
export type Any5 =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* The href of the link
*/
export type LinkHref = string;
/**
* The type of the relationship
*/
export type LinkRel = string;
/**
* The media type of the link (deprecated in favour of type)
*/
export type LinkMediaType = string;
/**
* The media type of the link
*/
export type LinkMediaType1 = string;
/**
* The base href of the device
*/
export type DeviceBaseHref = string;
/**
* If the pin is required
*/
export type PinRequired = boolean;
/**
* The pattern of the pin
*/
export type PinPattern = string;
/**
* If credentials are required
*/
export type DeviceCredentialsRequired = boolean;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType17 = 8197;
/**
* ID of the plugin
*/
export type PluginID17 = string;
/**
* ID of the adapter
*/
export type AdapterID12 = string;
/**
* ID of the device
*/
export type DeviceID7 = string;
/**
* Whether or not the device is currently connected
*/
export type Connected = boolean;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType18 = 8200;
/**
* ID of the plugin
*/
export type PluginID18 = string;
/**
* ID of the adapter
*/
export type AdapterID13 = string;
/**
* ID of the device
*/
export type DeviceID8 = string;
/**
* Name of the event
*/
export type EventName1 = string;
/**
* Timestamp of the event
*/
export type EventTimestamp = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType19 = 8199;
/**
* ID of the plugin
*/
export type PluginID19 = string;
/**
* ID of the adapter
*/
export type AdapterID14 = string;
/**
* ID of the device
*/
export type DeviceID9 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType20 = 8202;
/**
* ID of the plugin
*/
export type PluginID20 = string;
/**
* ID of the adapter
*/
export type AdapterID15 = string;
/**
* Unique ID of this message
*/
export type MessageID = number;
/**
* ID of the device
*/
export type DeviceID10 = string;
/**
* Name of the action
*/
export type ActionName1 = string;
/**
* ID of the existing action
*/
export type ActionID1 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType21 = 8203;
/**
* ID of the plugin
*/
export type PluginID21 = string;
/**
* ID of the adapter
*/
export type AdapterID16 = string;
/**
* ID of the device
*/
export type DeviceID11 = string;
/**
* ID of the request message
*/
export type MessageID1 = number;
/**
* Name of the action
*/
export type ActionName2 = string;
/**
* ID of the action
*/
export type ActionID2 = string;
/**
* Whether or not the operation was successful
*/
export type Success = boolean;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType22 = 8204;
/**
* ID of the plugin
*/
export type PluginID22 = string;
/**
* ID of the adapter
*/
export type AdapterID17 = string;
/**
* ID of the device
*/
export type DeviceID12 = string;
/**
* Name of the action
*/
export type ActionName3 = string;
/**
* Unique ID of this existing action
*/
export type ActionID3 = string;
/**
* Input to the action
*/
export type Any6 =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType23 = 8205;
/**
* ID of the plugin
*/
export type PluginID23 = string;
/**
* ID of the adapter
*/
export type AdapterID18 = string;
/**
* ID of the device
*/
export type DeviceID13 = string;
/**
* Name of the action
*/
export type ActionName4 = string;
/**
* ID of the action
*/
export type ActionID4 = string;
/**
* Whether or not the operation was successful
*/
export type Success1 = boolean;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType24 = 8195;
/**
* ID of the plugin
*/
export type PluginID24 = string;
/**
* ID of the adapter
*/
export type AdapterID19 = string;
/**
* Unique ID of this message
*/
export type MessageID2 = number;
/**
* ID of the device
*/
export type DeviceID14 = string;
/**
* Username to set
*/
export type Username = string;
/**
* Password to set
*/
export type Password = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType25 = 8196;
/**
* ID of the plugin
*/
export type PluginID25 = string;
/**
* ID of the adapter
*/
export type AdapterID20 = string;
/**
* ID of the request message
*/
export type MessageID3 = number;
/**
* Whether or not the operation was successful
*/
export type Success2 = boolean;
/**
* ID of the device
*/
export type DeviceID15 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType26 = 8193;
/**
* ID of the plugin
*/
export type PluginID26 = string;
/**
* ID of the adapter
*/
export type AdapterID21 = string;
/**
* Unique ID of this message
*/
export type MessageID4 = number;
/**
* ID of the device
*/
export type DeviceID16 = string;
/**
* PIN to set
*/
export type PIN = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType27 = 8194;
/**
* ID of the plugin
*/
export type PluginID27 = string;
/**
* ID of the adapter
*/
export type AdapterID22 = string;
/**
* ID of the request message
*/
export type MessageID5 = number;
/**
* Whether or not the operation was successful
*/
export type Success3 = boolean;
/**
* ID of the device
*/
export type DeviceID17 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType28 = 8198;
/**
* ID of the plugin
*/
export type PluginID28 = string;
/**
* ID of the adapter
*/
export type AdapterID23 = string;
/**
* ID of the device
*/
export type DeviceID18 = string;
/**
* Name of the property to set
*/
export type PropertyName1 = string;
/**
* New value of the property
*/
export type Any7 =
| null
| boolean
| {
[k: string]: unknown;
}
| unknown[]
| number
| string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType29 = 8207;
/**
* ID of the plugin
*/
export type PluginID29 = string;
/**
* ID of the adapter
*/
export type AdapterID24 = string;
/**
* ID of the device
*/
export type DeviceID19 = string;
/**
* Types of the device
*/
export type DeviceTypes1 = string;
/**
* Title of the Device
*/
export type DeviceTitle1 = string;
/**
* Description of the device
*/
export type DeviceDescription1 = string;
/**
* The base href of the device
*/
export type DeviceBaseHref1 = string;
/**
* If credentials are required
*/
export type DeviceCredentialsRequired1 = boolean;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType30 = 12288;
/**
* ID of the plugin
*/
export type PluginID30 = string;
/**
* ID of the new notifier
*/
export type NotifierID = string;
/**
* Name of the new notifier
*/
export type Name1 = string;
/**
* Name of the add-on package
*/
export type PackageName1 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType31 = 12289;
/**
* ID of the plugin
*/
export type PluginID31 = string;
/**
* ID of the notifier
*/
export type NotifierID1 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType32 = 12290;
/**
* ID of the plugin
*/
export type PluginID32 = string;
/**
* ID of the notifier
*/
export type NotifierID2 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType33 = 16384;
/**
* ID of the plugin
*/
export type PluginID33 = string;
/**
* ID of the notifier
*/
export type NotifierID3 = string;
/**
* ID of the Outlet
*/
export type OutletID = string;
/**
* Name of the Outlet
*/
export type OutletName = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType34 = 16386;
/**
* ID of the plugin
*/
export type PluginID34 = string;
/**
* ID of the notifier
*/
export type NotifierID4 = string;
/**
* ID of the outlet
*/
export type OutletID1 = string;
/**
* Unique ID of this message
*/
export type MessageID6 = number;
/**
* Title of the notification
*/
export type Title = string;
/**
* Message of the notification
*/
export type NotificationMessage = string;
/**
* Priority level of the notification, 0 being the lowest priority
*/
export type Level = 0 | 1 | 2;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType35 = 16387;
/**
* ID of the plugin
*/
export type PluginID35 = string;
/**
* ID of the notifier
*/
export type NotifierID5 = string;
/**
* ID of the outlet
*/
export type OutletID2 = string;
/**
* ID of the request message
*/
export type MessageID7 = number;
/**
* Whether or not the operation was successful
*/
export type Success4 = boolean;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType36 = 16385;
/**
* ID of the plugin
*/
export type PluginID36 = string;
/**
* ID of the notifier
*/
export type NotifierID6 = string;
/**
* ID of the outlet which was removed
*/
export type OutletID3 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType37 = 20480;
/**
* ID of the plugin
*/
export type PluginID37 = string;
/**
* Name of the add-on package
*/
export type PackageName2 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType38 = 20483;
/**
* ID of the plugin
*/
export type PluginID38 = string;
/**
* Name of the add-on package
*/
export type PackageName3 = string;
/**
* Unique ID of this message
*/
export type MessageID8 = number;
/**
* HTTP method of the request
*/
export type Method = string;
/**
* Request path, relative to this handler
*/
export type Path = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType39 = 20484;
/**
* ID of the plugin
*/
export type PluginID39 = string;
/**
* Name of the add-on package
*/
export type PackageName4 = string;
/**
* ID of the request message
*/
export type MessageID9 = number;
/**
* HTTP status code
*/
export type Status = number;
/**
* Content-Type of the response body
*/
export type ContentType = null | string;
/**
* Body content
*/
export type Content = null | string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType40 = 20481;
/**
* ID of the plugin
*/
export type PluginID40 = string;
/**
* Name of the add-on package
*/
export type PackageName5 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType41 = 20482;
/**
* ID of the plugin
*/
export type PluginID41 = string;
/**
* Name of the add-on package
*/
export type PackageName6 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType42 = 61440;
/**
* ID of the plugin
*/
export type PluginID42 = string;
/**
* ID of the adapter
*/
export type AdapterID25 = string;
/**
* ID of the new device
*/
export type DeviceID20 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType43 = 61441;
/**
* ID of the plugin
*/
export type PluginID43 = string;
/**
* ID of the adapter
*/
export type AdapterID26 = string;
/**
* Whether or not the operation was successful
*/
export type Success5 = boolean;
/**
* ID of the new device
*/
export type DeviceID21 = string;
/**
* Error message in the case of failure
*/
export type Error = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType44 = 61446;
/**
* ID of the plugin
*/
export type PluginID44 = string;
/**
* ID of the adapter
*/
export type AdapterID27 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType45 = 61447;
/**
* ID of the plugin
*/
export type PluginID45 = string;
/**
* ID of the adapter
*/
export type AdapterID28 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType46 = 61444;
/**
* ID of the plugin
*/
export type PluginID46 = string;
/**
* ID of the adapter
*/
export type AdapterID29 = string;
/**
* ID of the device
*/
export type DeviceID22 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType47 = 61442;
/**
* ID of the plugin
*/
export type PluginID47 = string;
/**
* ID of the adapter
*/
export type AdapterID30 = string;
/**
* ID of the device
*/
export type DeviceID23 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType48 = 61443;
/**
* ID of the plugin
*/
export type PluginID48 = string;
/**
* ID of the adapter
*/
export type AdapterID31 = string;
/**
* Whether or not the operation was successful
*/
export type Success6 = boolean;
/**
* ID of the device
*/
export type DeviceID24 = string;
/**
* Error message in the case of failure
*/
export type Error1 = string;
/**
* The message type, used by the IPC client and server to differentiate messages
*/
export type MessageType49 = 61445;
/**
* ID of the plugin
*/
export type PluginID49 = string;
/**
* ID of the adapter
*/
export type AdapterID32 = string;
/**
* ID of the device
*/
export type DeviceID25 = string;
/**
* IPC messages between WebThings Gateway and add-ons
*/
export interface AddOnIPC {
message: Message;
[k: string]: unknown;
}
/**
* Register a plugin with the gateway
*/
export interface PluginRegisterRequest {
messageType: MessageType;
data: PluginRegisterRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface PluginRegisterRequestMessageData {
pluginId: PluginID;
[k: string]: unknown;
}
/**
* Acknowledgement that the gateway has registered a plugin
*/
export interface PluginRegisterResponse {
messageType: MessageType1;
data: PluginRegisterResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface PluginRegisterResponseMessageData {
pluginId: PluginID1;
gatewayVersion: GatewayVersion;
userProfile: UserProfile;
preferences: Preferences;
[k: string]: unknown;
}
/**
* User profile information, e.g. file paths of various things
*/
export interface UserProfile {
addonsDir: AddOnsDirectory;
baseDir: BaseDirectory;
configDir: ConfigurationDirectory;
dataDir: DataDirectory;
mediaDir: MediaDirectory;
logDir: LogDirectory;
gatewayDir: GatewayDirectory;
[k: string]: unknown;
}
/**
* User preferences
*/
export interface Preferences {
language: Language;
units: Units;
[k: string]: unknown;
}
/**
* User's preferred units
*/
export interface Units {
temperature: Temperature;
[k: string]: unknown;
}
/**
* Unload a plugin from the gateway
*/
export interface PluginUnloadRequest {
messageType: MessageType2;
data: PluginUnloadRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface PluginUnloadRequestMessageData {
pluginId: PluginID2;
[k: string]: unknown;
}
/**
* Notification that a plugin has been unloaded
*/
export interface PluginUnloadResponse {
messageType: MessageType3;
data: PluginUnloadResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface PluginUnloadResponseMessageData {
pluginId: PluginID3;
[k: string]: unknown;
}
/**
* Notification that a plugin has encountered an error while loading
*/
export interface PluginErrorNotification {
messageType: MessageType4;
data: PluginErrorNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface PluginErrorNotificationMessageData {
pluginId: PluginID4;
message: ErrorMessage;
[k: string]: unknown;
}
/**
* Notification that a plugin has added an adapter
*/
export interface AdapterAddedNotification {
messageType: MessageType5;
data: AdapterAddedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterAddedNotificationMessageData {
pluginId: PluginID5;
adapterId: AdapterID;
name: Name;
packageName: PackageName;
[k: string]: unknown;
}
/**
* Tell an adapter to cancel the pairing process
*/
export interface AdapterCancelPairingCommand {
messageType: MessageType6;
data: AdapterCancelPairingCommandMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterCancelPairingCommandMessageData {
pluginId: PluginID6;
adapterId: AdapterID1;
[k: string]: unknown;
}
/**
* Tell an adapter to cancel the removal of a device
*/
export interface AdapterCancelRemoveDeviceCommand {
messageType: MessageType7;
data: AdapterCancelRemoveDeviceCommandMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterCancelRemoveDeviceCommandMessageData {
pluginId: PluginID7;
adapterId: AdapterID2;
deviceId: DeviceID;
[k: string]: unknown;
}
/**
* Notification that a prompt should be presented to the user while pairing
*/
export interface AdapterPairingPromptNotification {
messageType: MessageType8;
data: AdapterPairingPromptNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterPairingPromptNotificationMessageData {
pluginId: PluginID8;
adapterId: AdapterID3;
prompt: Prompt;
url?: URL;
deviceId?: DeviceID1;
[k: string]: unknown;
}
/**
* Ask an adapter to remove a device
*/
export interface AdapterRemoveDeviceRequest {
messageType: MessageType9;
data: AdapterRemoveDeviceRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterRemoveDeviceRequestMessageData {
pluginId: PluginID9;
adapterId: AdapterID4;
deviceId: DeviceID2;
[k: string]: unknown;
}
/**
* Notice that an adapter has removed a device
*/
export interface AdapterRemoveDeviceResponse {
messageType: MessageType10;
data: AdapterRemoveDeviceResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterRemoveDeviceResponseMessageData {
pluginId: PluginID10;
adapterId: AdapterID5;
deviceId: DeviceID3;
[k: string]: unknown;
}
/**
* Tell an adapter to start the pairing process
*/
export interface AdapterStartPairingCommand {
messageType: MessageType11;
data: AdapterStartPairingCommandMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterStartPairingCommandMessageData {
pluginId: PluginID11;
adapterId: AdapterID6;
timeout: Timeout;
[k: string]: unknown;
}
/**
* Request that an adapter is unloaded
*/
export interface AdapterUnloadRequest {
messageType: MessageType12;
data: AdapterUnloadRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterUnloadRequestMessageData {
pluginId: PluginID12;
adapterId: AdapterID7;
[k: string]: unknown;
}
/**
* Notice that an adapter is unloaded
*/
export interface AdapterUnloadResponse {
messageType: MessageType13;
data: AdapterUnloadResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterUnloadResponseMessageData {
pluginId: PluginID13;
adapterId: AdapterID8;
[k: string]: unknown;
}
/**
* Notification that a prompt should be presented to the user while unpairing
*/
export interface AdapterUnpairingPromptNotification {
messageType: MessageType14;
data: AdapterUnpairingPromptNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface AdapterUnpairingPromptNotificationMessageData {
pluginId: PluginID14;
adapterId: AdapterID9;
prompt: Prompt1;
url?: URL1;
deviceId?: DeviceID4;
[k: string]: unknown;
}
/**
* Notification that an action's status has changed on a device
*/
export interface DeviceActionStatusNotification {
messageType: MessageType15;
data: DeviceActionStatusNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceActionStatusNotificationMessageData {
pluginId: PluginID15;
adapterId: AdapterID10;
deviceId: DeviceID5;
action: ActionDescription;
[k: string]: unknown;
}
/**
* Description of the action
*/
export interface ActionDescription {
id: ActionID;
name: ActionName;
input?: Any;
status: ActionStatus;
timeRequested: ActionRequestTime;
timeCompleted?: ActionCompletionTime;
[k: string]: unknown;
}
/**
* Notification that a new device has been added to an adapter
*/
export interface DeviceAddedNotification {
messageType: MessageType16;
data: DeviceAddedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceAddedNotificationMessageData {
pluginId: PluginID16;
adapterId: AdapterID11;
device: Device;
[k: string]: unknown;
}
/**
* Description of the device
*/
export interface Device {
"@context"?: DeviceContext | DeviceContexts;
"@type"?: DeviceTypes[];
id: DeviceID6;
title?: DeviceTitle;
description?: DeviceDescription;
properties?: {
[k: string]: Property;
};
actions?: {
[k: string]: Action;
};
events?: {
[k: string]: Event;
};
links?: Link[];
baseHref?: DeviceBaseHref;
pin?: DevicePin;
credentialsRequired?: DeviceCredentialsRequired;
[k: string]: unknown;
}
/**
* A JSON-LD context used by the device, with prefix as key and context URI as value
*/
export interface PrefixedDeviceContext {
[k: string]: unknown;
}
/**
* Description of the Property
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` ".*".
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` ".*".
*/
export interface Property {
"@type"?: PropertyType;
name?: PropertyName;
title?: PropertyTitle;
description?: PropertyDescription;
forms?: PropertyForm[];
type: PropertyValueType;
unit?: PropertyUnit;
minimum?: PropertyMinimumValue;
maximum?: PropertyMaximumValue;
multipleOf?: PropertyValuePrecision;
enum?: Any1[];
readOnly?: PropertyReadOnly;
value?: Any2;
[k: string]: unknown;
}
export interface Form {
href: string;
contentType?: string;
contentCoding?: string;
subprotocol?: string;
security?: string[] | string;
scopes?: string[] | string;
response?: {
contentType?: string;
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
* Description of the Action
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` ".*".
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` ".*".
*/
export interface Action {
"@type"?: ActionType;
title?: ActionTitle;
description?: ActionDescription1;
forms?: (Form & {
op?: "invokeaction" | "invokeaction"[];
[k: string]: unknown;
})[];
input?: ActionInput;
[k: string]: unknown;
}
/**
* An object action input
*/
export interface ObjectActionInput {
type: ObjectInputType;
properties: ActionInputProperties;
[k: string]: unknown;
}
/**
* A map of action input properties
*/
export interface ActionInputProperties {
[k: string]: ActionInputProperty;
}
/**
* An action input property
*
* This interface was referenced by `ActionInputProperties`'s JSON-Schema definition
* via the `patternProperty` ".*".
*/
export interface ActionInputProperty {
"@type"?: InputPropertyType;
type?: InputPropertyValueType;
unit?: InputPropertyUnit;
minimum?: InputPropertyMinimumValue;
maximum?: InputPropertyMaximumValue;
multipleOf?: InputPropertyValuePrecision;
enum?: Any3[];
[k: string]: unknown;
}
/**
* Description of the event
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` ".*".
*
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` ".*".
*/
export interface Event {
"@type"?: EventType;
name?: EventName;
title?: EventTitle;
description?: EventDescription;
forms?: (Form & {
op?: ("subscribeevent" | "unsubscribeevent") | ("subscribeevent" | "unsubscribeevent")[];
[k: string]: unknown;
})[];
type?: EventValueType;
unit?: EventUnit;
minimum?: EventMinimumValue;
maximum?: EventMaximumValue;
multipleOf?: EventValuePrecision;
enum?: Any4[];
/**
* Event payload data schema
*/
data?: {
type?: EventValueType1;
unit?: EventUnit1;
minimum?: EventMinimumValue1;
maximum?: EventMaximumValue1;
multipleOf?: EventValuePrecision1;
enum?: Any5[];
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
* A link
*/
export interface Link {
href: LinkHref;
rel?: LinkRel;
mediaType?: LinkMediaType;
type?: LinkMediaType1;
[k: string]: unknown;
}
/**
* The pin of the device
*/
export interface DevicePin {
required: PinRequired;
pattern?: PinPattern;
[k: string]: unknown;
}
/**
* Notification that the connected state has changed for a device
*/
export interface DeviceConnectedStateNotification {
messageType: MessageType17;
data: DeviceConnectedStateNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceConnectedStateNotificationMessageData {
pluginId: PluginID17;
adapterId: AdapterID12;
deviceId: DeviceID7;
connected: Connected;
[k: string]: unknown;
}
/**
* Notification that an event has occurred on a device
*/
export interface DeviceEventNotification {
messageType: MessageType18;
data: DeviceEventNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceEventNotificationMessageData {
pluginId: PluginID18;
adapterId: AdapterID13;
deviceId: DeviceID8;
event: EventDescription1;
[k: string]: unknown;
}
/**
* Description of the event
*/
export interface EventDescription1 {
name: EventName1;
data?: Any;
timestamp: EventTimestamp;
[k: string]: unknown;
}
/**
* Notification that a property on a device has changed
*/
export interface DevicePropertyChangedNotification {
messageType: MessageType19;
data: DevicePropertyChangedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DevicePropertyChangedNotificationMessageData {
pluginId: PluginID19;
adapterId: AdapterID14;
deviceId: DeviceID9;
property: Property;
[k: string]: unknown;
}
/**
* Remove/cancel an existing action from a device
*/
export interface DeviceRemoveActionRequest {
messageType: MessageType20;
data: DeviceRemoveActionRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceRemoveActionRequestMessageData {
pluginId: PluginID20;
adapterId: AdapterID15;
messageId: MessageID;
deviceId: DeviceID10;
actionName: ActionName1;
actionId: ActionID1;
[k: string]: unknown;
}
/**
* Notice that an action has been removed/cancelled from a device
*/
export interface DeviceRemoveActionResponse {
messageType: MessageType21;
data: DeviceRemoveActionResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceRemoveActionResponseMessageData {
pluginId: PluginID21;
adapterId: AdapterID16;
deviceId: DeviceID11;
messageId: MessageID1;
actionName: ActionName2;
actionId: ActionID2;
success: Success;
[k: string]: unknown;
}
/**
* Request a new action on a device
*/
export interface DeviceRequestActionRequest {
messageType: MessageType22;
data: DeviceRequestActionRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceRequestActionRequestMessageData {
pluginId: PluginID22;
adapterId: AdapterID17;
deviceId: DeviceID12;
actionName: ActionName3;
actionId: ActionID3;
input: Any6;
[k: string]: unknown;
}
/**
* Notice that an action has been requested on a device
*/
export interface DeviceRequestActionResponse {
messageType: MessageType23;
data: DeviceRequestActionResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceRequestActionResponseMessageData {
pluginId: PluginID23;
adapterId: AdapterID18;
deviceId: DeviceID13;
actionName: ActionName4;
actionId: ActionID4;
success: Success1;
[k: string]: unknown;
}
/**
* Set the credentials on a device
*/
export interface DeviceSetCredentialsRequest {
messageType: MessageType24;
data: DeviceSetCredentialsRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceSetCredentialsRequestMessageData {
pluginId: PluginID24;
adapterId: AdapterID19;
messageId: MessageID2;
deviceId: DeviceID14;
username: Username;
password: Password;
[k: string]: unknown;
}
/**
* Notice that setting the credentials on a device has finished
*/
export interface DeviceSetCredentialsResponse {
messageType: MessageType25;
data: DeviceSetCredentialsResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceSetCredentialsResponseMessageData {
pluginId: PluginID25;
adapterId: AdapterID20;
messageId: MessageID3;
success: Success2;
deviceId?: DeviceID15;
device?: Device;
[k: string]: unknown;
}
/**
* Set the PIN on a device
*/
export interface DeviceSetPINRequest {
messageType: MessageType26;
data: DeviceSetPINRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceSetPINRequestMessageData {
pluginId: PluginID26;
adapterId: AdapterID21;
messageId: MessageID4;
deviceId: DeviceID16;
pin: PIN;
[k: string]: unknown;
}
/**
* Notice that setting the PIN on a device has finished
*/
export interface DeviceSetPINResponse {
messageType: MessageType27;
data: DeviceSetPINResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceSetPINResponseMessageData {
pluginId: PluginID27;
adapterId: AdapterID22;
messageId: MessageID5;
success: Success3;
deviceId?: DeviceID17;
device?: Device;
[k: string]: unknown;
}
/**
* Set a property value on a device
*/
export interface DeviceSetPropertyCommand {
messageType: MessageType28;
data: DeviceSetPropertyCommandMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceSetPropertyCommandMessageData {
pluginId: PluginID28;
adapterId: AdapterID23;
deviceId: DeviceID18;
propertyName: PropertyName1;
propertyValue: Any7;
[k: string]: unknown;
}
/**
* Notification that the user has saved a device
*/
export interface DeviceSavedNotification {
messageType: MessageType29;
data: DeviceSavedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface DeviceSavedNotificationMessageData {
pluginId: PluginID29;
adapterId: AdapterID24;
deviceId: DeviceID19;
device: DeviceWithoutId;
[k: string]: unknown;
}
/**
* Description of the device
*/
export interface DeviceWithoutId {
"@context"?: DeviceContext | DeviceContexts;
"@type"?: DeviceTypes1[];
title?: DeviceTitle1;
description?: DeviceDescription1;
properties?: {
[k: string]: Property;
};
actions?: {
[k: string]: Action;
};
events?: {
[k: string]: Event;
};
links?: Link[];
baseHref?: DeviceBaseHref1;
pin?: DevicePin;
credentialsRequired?: DeviceCredentialsRequired1;
[k: string]: unknown;
}
/**
* Notification that a plugin has added a notifier
*/
export interface NotifierAddedNotification {
messageType: MessageType30;
data: NotifierAddedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface NotifierAddedNotificationMessageData {
pluginId: PluginID30;
notifierId: NotifierID;
name: Name1;
packageName: PackageName1;
[k: string]: unknown;
}
/**
* Request that an notifier is unloaded
*/
export interface NotifierUnloadRequest {
messageType: MessageType31;
data: NotifierUnloadRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface NotifierUnloadRequestMessageData {
pluginId: PluginID31;
notifierId: NotifierID1;
[k: string]: unknown;
}
/**
* Notice that an notifier is unloaded
*/
export interface NotifierUnloadResponse {
messageType: MessageType32;
data: NotifierUnloadResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface NotifierUnloadResponseMessageData {
pluginId: PluginID32;
notifierId: NotifierID2;
[k: string]: unknown;
}
/**
* Notification that a new outlet has been added to a notifier
*/
export interface OutletAddedNotification {
messageType: MessageType33;
data: OutletAddedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface OutletAddedNotificationMessageData {
pluginId: PluginID33;
notifierId: NotifierID3;
outlet: OutletDescription;
[k: string]: unknown;
}
/**
* Description of the outlet
*/
export interface OutletDescription {
id: OutletID;
name: OutletName;
[k: string]: unknown;
}
/**
* Notify a user via an outlet
*/
export interface OutletNotifyRequest {
messageType: MessageType34;
data: OutletNotifyRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface OutletNotifyRequestMessageData {
pluginId: PluginID34;
notifierId: NotifierID4;
outletId: OutletID1;
messageId: MessageID6;
title: Title;
message: NotificationMessage;
level: Level;
[k: string]: unknown;
}
/**
* Notice that an outlet notification has finished
*/
export interface OutletNotifyResponse {
messageType: MessageType35;
data: OutletNotifyResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface OutletNotifyResponseMessageData {
pluginId: PluginID35;
notifierId: NotifierID5;
outletId: OutletID2;
messageId: MessageID7;
success: Success4;
[k: string]: unknown;
}
/**
* Notification that an outlet has been removed from a notifier
*/
export interface OutletRemovedNotification {
messageType: MessageType36;
data: OutletRemovedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface OutletRemovedNotificationMessageData {
pluginId: PluginID36;
notifierId: NotifierID6;
outletId: OutletID3;
[k: string]: unknown;
}
/**
* Notification that a plugin has added an API handler
*/
export interface APIHandlerAddedNotification {
messageType: MessageType37;
data: APIHandlerAddedNotificationMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface APIHandlerAddedNotificationMessageData {
pluginId: PluginID37;
packageName: PackageName2;
[k: string]: unknown;
}
/**
* Handler an incoming API request
*/
export interface APIHandlerAPIRequest {
messageType: MessageType38;
data: APIHandlerAPIRequestMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface APIHandlerAPIRequestMessageData {
pluginId: PluginID38;
packageName: PackageName3;
messageId: MessageID8;
request: Request;
[k: string]: unknown;
}
/**
* Incoming request
*/
export interface Request {
method: Method;
path: Path;
query: Query;
body: Body;
[k: string]: unknown;
}
/**
* Query parameters from URL
*/
export interface Query {
[k: string]: unknown;
}
/**
* Parsed parameters from the body
*/
export interface Body {
[k: string]: unknown;
}
/**
* Response message from an API handler request
*/
export interface APIHandlerAPIResponse {
messageType: MessageType39;
data: APIHandlerAPIResponseMessageData;
[k: string]: unknown;
}
/**
* Message-specific data
*/
export interface APIHandlerAPIResponseMessageData {
pluginId: PluginID39;
packageName: PackageName4;
messageId: MessageID9;
response: Response;
[k: string]: unknown;
}
/**
* Outgoing response
*/
export int