Change API entity definition from enum to string for relevant types
This commit is contained in:
parent
f016058b57
commit
efac28fc30
1 changed files with 12 additions and 56 deletions
68
plejd/types/ApiSite.d.ts
vendored
68
plejd/types/ApiSite.d.ts
vendored
|
|
@ -30,7 +30,7 @@ export interface ApiSite {
|
||||||
outputGroups: { [key: string]: OutputGroup };
|
outputGroups: { [key: string]: OutputGroup };
|
||||||
roomAddress: { [key: string]: number };
|
roomAddress: { [key: string]: number };
|
||||||
sceneIndex: { [key: string]: number };
|
sceneIndex: { [key: string]: number };
|
||||||
images: Images;
|
images: string;
|
||||||
deviceLimit: number;
|
deviceLimit: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ export interface Hardware {
|
||||||
predefinedLoad: PredefinedLoad;
|
predefinedLoad: PredefinedLoad;
|
||||||
supportedFirmware: PredefinedLoad;
|
supportedFirmware: PredefinedLoad;
|
||||||
ACL: AstroEventACL;
|
ACL: AstroEventACL;
|
||||||
objectId: HardwareObjectID;
|
objectId: string;
|
||||||
__type: AstroEventType;
|
__type: AstroEventType;
|
||||||
className: HardwareClassName;
|
className: HardwareClassName;
|
||||||
}
|
}
|
||||||
|
|
@ -132,7 +132,7 @@ export enum ImageType {
|
||||||
export interface PlejdMeshClass {
|
export interface PlejdMeshClass {
|
||||||
__type: InstallerType;
|
__type: InstallerType;
|
||||||
className: SiteClassName;
|
className: SiteClassName;
|
||||||
objectId: ObjectID;
|
objectId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum InstallerType {
|
export enum InstallerType {
|
||||||
|
|
@ -148,28 +148,11 @@ export enum SiteClassName {
|
||||||
UserProfile = 'UserProfile',
|
UserProfile = 'UserProfile',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ObjectID {
|
|
||||||
BBBJO2Cufm = 'BBBJO2cufm',
|
|
||||||
D4Dw87Hq21 = 'D4DW87HQ21',
|
|
||||||
FCrrS1NJHH = 'FCrrS1nJHH',
|
|
||||||
GX1W4P06QS = 'gX1W4p06QS',
|
|
||||||
Ndlvzgh4Df = 'ndlvzgh4df',
|
|
||||||
UHoKQLuXqZ = 'uHoKQLuXqZ',
|
|
||||||
VfHiawBPA8 = 'vfHiawBPA8',
|
|
||||||
WgAFPloWjK = 'wgAfPloWjK',
|
|
||||||
YkyNDotBNa = 'YkyNDotBNa',
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum Name {
|
export enum Name {
|
||||||
Ctr01 = 'CTR-01',
|
Ctr01 = 'CTR-01',
|
||||||
Dim01 = 'DIM-01',
|
Dim01 = 'DIM-01',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum HardwareObjectID {
|
|
||||||
R3Gfd6ACAu = 'R3gfd6ACAu',
|
|
||||||
XjslOltgvi = 'xjslOltgvi',
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PredefinedLoad {
|
export interface PredefinedLoad {
|
||||||
__type: SupportedFirmwareType;
|
__type: SupportedFirmwareType;
|
||||||
className: PredefinedLoadClassName;
|
className: PredefinedLoadClassName;
|
||||||
|
|
@ -204,7 +187,7 @@ export interface Gateway {
|
||||||
deviceId: string;
|
deviceId: string;
|
||||||
siteId: string;
|
siteId: string;
|
||||||
hardwareId: string;
|
hardwareId: string;
|
||||||
installer: ObjectID;
|
installer: string;
|
||||||
firmware: number;
|
firmware: number;
|
||||||
firmwareObject: Firmware;
|
firmwareObject: Firmware;
|
||||||
dirtyInstall: boolean;
|
dirtyInstall: boolean;
|
||||||
|
|
@ -220,47 +203,20 @@ export interface Gateway {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Firmware {
|
export interface Firmware {
|
||||||
notes: Notes;
|
notes: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
data: Image;
|
data: Image;
|
||||||
metaData: Image;
|
metaData: Image;
|
||||||
version: Version;
|
version: string;
|
||||||
buildTime: number;
|
buildTime: number;
|
||||||
firmwareApi: string;
|
firmwareApi: string;
|
||||||
ACL: AstroEventACL;
|
ACL: AstroEventACL;
|
||||||
objectId: FirmwareObjectObjectID;
|
objectId: string;
|
||||||
__type: AstroEventType;
|
__type: AstroEventType;
|
||||||
className: SiteClassName;
|
className: SiteClassName;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Notes {
|
|
||||||
Ctr01 = 'CTR-01',
|
|
||||||
Ctr20ReleaseCandidate1 = 'Ctr 2.0 Release candidate 1',
|
|
||||||
Dim20ReleaseCandidate1 = 'Dim 2.0 Release candidate 1',
|
|
||||||
Dim221ReleaseCandidate = 'Dim 2.2.1 Release Candidate',
|
|
||||||
GWY10ReleaseCandidate = 'GWY 1.0 Release Candidate',
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum FirmwareObjectObjectID {
|
|
||||||
BBBJO2Cufm = 'BBBJO2cufm',
|
|
||||||
E6YxfREDuF = 'E6yxfREDuF',
|
|
||||||
JYSZ0EvyCU = 'JYSZ0EvyCU',
|
|
||||||
Ndlvzgh4Df = 'ndlvzgh4df',
|
|
||||||
RlglTfVHDe = 'rlglTfVHDe',
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum Version {
|
|
||||||
The12 = '1.2',
|
|
||||||
The20 = '2.0',
|
|
||||||
The221 = '2.2.1',
|
|
||||||
The304 = '3.0.4',
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Images {
|
|
||||||
'2afc6c6e-7a26-466a-b8ec-febbca90f5f7': string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface InputSetting {
|
export interface InputSetting {
|
||||||
deviceId: string;
|
deviceId: string;
|
||||||
input: number;
|
input: number;
|
||||||
|
|
@ -472,7 +428,7 @@ export interface PlejdMesh {
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
site: PlejdMeshClass;
|
site: PlejdMeshClass;
|
||||||
ACL: AstroEventACL;
|
ACL: AstroEventACL;
|
||||||
objectId: ObjectID;
|
objectId: string;
|
||||||
__type: AstroEventType;
|
__type: AstroEventType;
|
||||||
className: SiteClassName;
|
className: SiteClassName;
|
||||||
}
|
}
|
||||||
|
|
@ -549,7 +505,7 @@ export interface Scene {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SiteDetailsSite {
|
export interface SiteDetailsSite {
|
||||||
installers: ObjectID[];
|
installers: string[];
|
||||||
title: string;
|
title: string;
|
||||||
siteId: string;
|
siteId: string;
|
||||||
version: number;
|
version: number;
|
||||||
|
|
@ -564,7 +520,7 @@ export interface SiteDetailsSite {
|
||||||
country: string;
|
country: string;
|
||||||
previousOwners: string[];
|
previousOwners: string[];
|
||||||
ACL: AstroEventACL;
|
ACL: AstroEventACL;
|
||||||
objectId: ObjectID;
|
objectId: string;
|
||||||
__type: AstroEventType;
|
__type: AstroEventType;
|
||||||
className: SiteClassName;
|
className: SiteClassName;
|
||||||
}
|
}
|
||||||
|
|
@ -581,7 +537,7 @@ export interface DeviceAstroTable {
|
||||||
|
|
||||||
export interface SitePermission {
|
export interface SitePermission {
|
||||||
siteId: string;
|
siteId: string;
|
||||||
userId: ObjectID;
|
userId: string;
|
||||||
user: User;
|
user: User;
|
||||||
isOwner: boolean;
|
isOwner: boolean;
|
||||||
isInstaller: boolean;
|
isInstaller: boolean;
|
||||||
|
|
@ -608,7 +564,7 @@ export interface User {
|
||||||
_failed_login_count: number;
|
_failed_login_count: number;
|
||||||
hasIntegration: boolean;
|
hasIntegration: boolean;
|
||||||
ACL: UserACL;
|
ACL: UserACL;
|
||||||
objectId: ObjectID;
|
objectId: string;
|
||||||
__type: AstroEventType;
|
__type: AstroEventType;
|
||||||
className: SiteClassName;
|
className: SiteClassName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue