Skip to content

Commit

Permalink
update to TTYSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Aug 5, 2024
1 parent 2372dbc commit 1fe581a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
24 changes: 12 additions & 12 deletions sdk/types/scrypted_python/scrypted_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ class ScryptedInterface(str, Enum):
StartStop = "StartStop"
StreamService = "StreamService"
TTY = "TTY"
TTYSettings = "TTYSettings"
TamperSensor = "TamperSensor"
TemperatureSetting = "TemperatureSetting"
TerminalSettings = "TerminalSettings"
Thermometer = "Thermometer"
UltravioletSensor = "UltravioletSensor"
VOCSensor = "VOCSensor"
Expand Down Expand Up @@ -1478,6 +1478,13 @@ class TTY:

pass

class TTYSettings:
"""TTYSettings allows TTY backends to query plugins for modifications to the (non-)interactive terminal environment."""

async def getTTYSettings(self) -> Any:
pass


class TamperSensor:

tampered: TamperState
Expand All @@ -1490,13 +1497,6 @@ async def setTemperature(self, command: TemperatureCommand) -> None:
pass


class TerminalSettings:
"""TerminalSettings allows TerminalService to query plugins for modifications to the (non-)interactive terminal environment."""

def getPaths(self) -> list[str]:
pass


class Thermometer:

temperature: float # Get the ambient temperature in Celsius.
Expand Down Expand Up @@ -1936,7 +1936,7 @@ class ScryptedInterfaceMethods(str, Enum):
getScryptedUserAccessControl = "getScryptedUserAccessControl"
generateVideoFrames = "generateVideoFrames"
connectStream = "connectStream"
getPaths = "getPaths"
getTTYSettings = "getTTYSettings"

class DeviceState:

Expand Down Expand Up @@ -3151,10 +3151,10 @@ def systemDevice(self, value: ScryptedSystemDeviceInfo):
"methods": [],
"properties": []
},
"TerminalSettings": {
"name": "TerminalSettings",
"TTYSettings": {
"name": "TTYSettings",
"methods": [
"getPaths"
"getTTYSettings"
],
"properties": []
},
Expand Down
13 changes: 6 additions & 7 deletions sdk/types/src/types.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1537,14 +1537,13 @@ export interface StreamService<Input, Output=Input> {
export interface TTY {
}
/**
* TerminalSettings allows TerminalService to query plugins for modifications
* TTYSettings allows TTY backends to query plugins for modifications
* to the (non-)interactive terminal environment.
*/
export interface TerminalSettings {
/**
* List of extra PATHs to add to the terminal environment
*/
getPaths(): string[];
export interface TTYSettings {
getTTYSettings(): Promise<{
paths?: string[];
}>;
}
/**
* Logger is exposed via log.* to allow writing to the Scrypted log.
Expand Down Expand Up @@ -2162,7 +2161,7 @@ export enum ScryptedInterface {
VideoFrameGenerator = 'VideoFrameGenerator',
StreamService = 'StreamService',
TTY = 'TTY',
TerminalSettings = 'TerminalSettings',
TTYSettings = 'TTYSettings',

ScryptedSystemDevice = "ScryptedSystemDevice",
ScryptedDeviceCreator = "ScryptedDeviceCreator",
Expand Down

0 comments on commit 1fe581a

Please sign in to comment.