sdk: update python sdk

This commit is contained in:
Koushik Dutta
2023-04-16 11:43:02 -07:00
parent 74e5884285
commit 8201e9883a
6 changed files with 116 additions and 6 deletions

4
sdk/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/sdk",
"version": "0.2.96",
"version": "0.2.97",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/sdk",
"version": "0.2.96",
"version": "0.2.97",
"license": "ISC",
"dependencies": {
"@babel/preset-typescript": "^7.18.6",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/sdk",
"version": "0.2.96",
"version": "0.2.97",
"description": "",
"main": "dist/src/index.js",
"exports": {

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/types",
"version": "0.2.86",
"version": "0.2.87",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/types",
"version": "0.2.86",
"version": "0.2.87",
"license": "ISC",
"devDependencies": {
"@types/rimraf": "^3.0.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/types",
"version": "0.2.86",
"version": "0.2.87",
"description": "",
"main": "dist/index.js",
"author": "",

View File

@@ -1380,6 +1380,108 @@ class ScryptedInterfaceProperty(Enum):
fan = "fan"
applicationInfo = "applicationInfo"
class ScryptedInterfaceMethods(Enum):
listen = "listen"
probe = "probe"
setMixins = "setMixins"
setName = "setName"
setRoom = "setRoom"
setType = "setType"
getPluginJson = "getPluginJson"
turnOff = "turnOff"
turnOn = "turnOn"
setBrightness = "setBrightness"
getTemperatureMaxK = "getTemperatureMaxK"
getTemperatureMinK = "getTemperatureMinK"
setColorTemperature = "setColorTemperature"
setRgb = "setRgb"
setHsv = "setHsv"
sendNotification = "sendNotification"
start = "start"
stop = "stop"
pause = "pause"
resume = "resume"
dock = "dock"
setTemperature = "setTemperature"
setThermostatMode = "setThermostatMode"
setThermostatSetpoint = "setThermostatSetpoint"
setThermostatSetpointHigh = "setThermostatSetpointHigh"
setThermostatSetpointLow = "setThermostatSetpointLow"
setTemperatureUnit = "setTemperatureUnit"
getPictureOptions = "getPictureOptions"
takePicture = "takePicture"
getAudioStream = "getAudioStream"
startDisplay = "startDisplay"
stopDisplay = "stopDisplay"
getVideoStream = "getVideoStream"
getVideoStreamOptions = "getVideoStreamOptions"
getRecordingStream = "getRecordingStream"
getRecordingStreamCurrentTime = "getRecordingStreamCurrentTime"
getRecordingStreamOptions = "getRecordingStreamOptions"
getRecordingStreamThumbnail = "getRecordingStreamThumbnail"
ptzCommand = "ptzCommand"
getRecordedEvents = "getRecordedEvents"
getVideoClip = "getVideoClip"
getVideoClipThumbnail = "getVideoClipThumbnail"
getVideoClips = "getVideoClips"
removeVideoClips = "removeVideoClips"
setVideoStreamOptions = "setVideoStreamOptions"
startIntercom = "startIntercom"
stopIntercom = "stopIntercom"
lock = "lock"
unlock = "unlock"
addPassword = "addPassword"
getPasswords = "getPasswords"
removePassword = "removePassword"
activate = "activate"
deactivate = "deactivate"
isReversible = "isReversible"
closeEntry = "closeEntry"
openEntry = "openEntry"
getDevice = "getDevice"
releaseDevice = "releaseDevice"
adoptDevice = "adoptDevice"
discoverDevices = "discoverDevices"
createDevice = "createDevice"
getCreateDeviceSettings = "getCreateDeviceSettings"
getRefreshFrequency = "getRefreshFrequency"
refresh = "refresh"
getMediaStatus = "getMediaStatus"
load = "load"
seek = "seek"
skipNext = "skipNext"
skipPrevious = "skipPrevious"
convert = "convert"
getSettings = "getSettings"
putSetting = "putSetting"
armSecuritySystem = "armSecuritySystem"
disarmSecuritySystem = "disarmSecuritySystem"
getReadmeMarkdown = "getReadmeMarkdown"
getOauthUrl = "getOauthUrl"
onOauthCallback = "onOauthCallback"
canMixin = "canMixin"
getMixin = "getMixin"
releaseMixin = "releaseMixin"
onRequest = "onRequest"
onConnection = "onConnection"
onPush = "onPush"
run = "run"
eval = "eval"
loadScripts = "loadScripts"
saveScript = "saveScript"
trackObjects = "trackObjects"
getDetectionInput = "getDetectionInput"
getObjectTypes = "getObjectTypes"
detectObjects = "detectObjects"
generateObjectDetections = "generateObjectDetections"
getDetectionModel = "getDetectionModel"
setHumidity = "setHumidity"
setFan = "setFan"
startRTCSignalingSession = "startRTCSignalingSession"
createRTCSignalingSession = "createRTCSignalingSession"
getScryptedUserAccessControl = "getScryptedUserAccessControl"
generateVideoFrames = "generateVideoFrames"
class DeviceState:
def getScryptedProperty(self, property: str) -> Any:
pass

View File

@@ -195,6 +195,14 @@ for (const val of properties) {
`;
}
python += `
class ScryptedInterfaceMethods(Enum):
`
for (const val of methods) {
python += ` ${val} = "${val}"
`;
}
python += `
class DeviceState:
def getScryptedProperty(self, property: str) -> Any: