sdk: expose ClusterManager to python

This commit is contained in:
Koushik Dutta
2024-11-20 10:13:54 -08:00
parent 347a957cd3
commit bcf698daa3
6 changed files with 19 additions and 7 deletions

4
sdk/package-lock.json generated
View File

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

View File

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

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/types",
"version": "0.3.71",
"version": "0.3.72",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/types",
"version": "0.3.71",
"version": "0.3.72",
"license": "ISC",
"devDependencies": {
"@types/node": "^22.1.0",

View File

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

View File

@@ -1813,6 +1813,18 @@ class EndpointManager:
pass
class ClusterManager:
def getClusterMode(self) -> Any | Any:
pass
def getClusterWorkerId(self) -> str:
pass
async def getClusterWorkers(self) -> str:
pass
class ScryptedInterfaceProperty(str, Enum):
id = "id"
info = "info"

View File

@@ -151,7 +151,7 @@ const enums = schema.children?.filter((child) => child.kind === ReflectionKind.E
const interfaces = schema.children?.filter((child: any) => Object.values(ScryptedInterface).includes(child.name)) ?? [];
let python = '';
for (const iface of ['Logger', 'DeviceManager', 'SystemManager', 'MediaManager', 'EndpointManager']) {
for (const iface of ['Logger', 'DeviceManager', 'SystemManager', 'MediaManager', 'EndpointManager', 'ClusterManager']) {
const child = schema.children?.find((child: any) => child.name === iface);
if (child)