@kohost/api-client 3.0.0-beta.70 → 3.0.0-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Events/SystemEntityDeletedEvent.js +17 -0
- package/dist/cjs/Events/SystemOrganizationUpdatedEvent.js +17 -0
- package/dist/cjs/Events/SystemPropertyUpdatedEvent.js +17 -0
- package/dist/cjs/Events/index.js +9 -0
- package/dist/cjs/schemas/AlarmSchema.d.ts +1 -0
- package/dist/cjs/schemas/CourtesySchema.d.ts +1 -0
- package/dist/cjs/schemas/DimmerSchema.d.ts +1 -0
- package/dist/cjs/schemas/GatewaySchema.d.ts +1 -0
- package/dist/cjs/schemas/LockSchema.d.ts +1 -0
- package/dist/cjs/schemas/OrganizationSchema.d.ts +2 -1
- package/dist/cjs/schemas/PropertySchema.d.ts +16 -110
- package/dist/cjs/schemas/RoomSchema.d.ts +6 -0
- package/dist/cjs/schemas/SwitchSchema.d.ts +1 -0
- package/dist/cjs/schemas/WindowCoveringSchema.d.ts +1 -0
- package/dist/cjs/schemas/alarm.json +0 -1
- package/dist/cjs/schemas/courtesy.json +0 -1
- package/dist/cjs/schemas/dimmer.json +0 -1
- package/dist/cjs/schemas/gateway.json +0 -1
- package/dist/cjs/schemas/lock.json +0 -1
- package/dist/cjs/schemas/organization.json +5 -1
- package/dist/cjs/schemas/property.json +10 -23
- package/dist/cjs/schemas/switch.json +0 -1
- package/dist/cjs/schemas/windowCovering.json +0 -1
- package/dist/esm/Events.js +72 -0
- package/dist/esm/Events.js.map +3 -3
- package/dist/esm/Models.js +257 -274
- package/dist/esm/Models.js.map +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const Event = require("./Event");
|
|
2
|
+
|
|
3
|
+
class SystemEntityDeletedEvent extends Event {
|
|
4
|
+
constructor(data) {
|
|
5
|
+
super(data);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get name() {
|
|
9
|
+
return "SystemEntityDeleted";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get routingKey() {
|
|
13
|
+
return `entity.${this.keyId}.deleted`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = SystemEntityDeletedEvent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const Event = require("./Event");
|
|
2
|
+
|
|
3
|
+
class SystemOrganizationUpdatedEvent extends Event {
|
|
4
|
+
constructor(organization) {
|
|
5
|
+
super(organization);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get name() {
|
|
9
|
+
return "SystemOrganizationUpdated";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get routingKey() {
|
|
13
|
+
return `organization.${this.keyId}.updated`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = SystemOrganizationUpdatedEvent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const Event = require("./Event");
|
|
2
|
+
|
|
3
|
+
class SystemPropertyUpdatedEvent extends Event {
|
|
4
|
+
constructor(property) {
|
|
5
|
+
super(property);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get name() {
|
|
9
|
+
return "SystemPropertyUpdated";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get routingKey() {
|
|
13
|
+
return `property.${this.keyId}.updated`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = SystemPropertyUpdatedEvent;
|
package/dist/cjs/Events/index.js
CHANGED
|
@@ -10,6 +10,8 @@ const SystemMediaSourceUpdatedEvent = require("./SystemMediaSourceUpdatedEvent")
|
|
|
10
10
|
const SystemCourtesyUpdatedEvent = require("./SystemCourtesyUpdatedEvent");
|
|
11
11
|
const SystemAlarmUpdatedEvent = require("./SystemAlarmUpdatedEvent");
|
|
12
12
|
const SystemMotionSensorUpdatedEvent = require("./SystemMotionSensorUpdatedEvent");
|
|
13
|
+
const SystemPropertyUpdatedEvent = require("./SystemPropertyUpdatedEvent");
|
|
14
|
+
const SystemOrganizationUpdatedEvent = require("./SystemOrganizationUpdatedEvent");
|
|
13
15
|
|
|
14
16
|
const SceneSetEvent = require("./SceneSetEvent");
|
|
15
17
|
|
|
@@ -27,6 +29,10 @@ const ShortLinkCreatedEvent = require("./ShortLinkCreatedEvent");
|
|
|
27
29
|
const ApplicationInUseEvent = require("./ApplicationInUseEvent");
|
|
28
30
|
const ApplicationOutOfUseEvent = require("./ApplicationOutOfUseEvent");
|
|
29
31
|
|
|
32
|
+
// Delete Events
|
|
33
|
+
const SystemEntityDeletedEvent = require("./SystemEntityDeletedEvent");
|
|
34
|
+
|
|
35
|
+
|
|
30
36
|
module.exports = {
|
|
31
37
|
SystemAlarmUpdatedEvent,
|
|
32
38
|
SystemGatewayUpdatedEvent,
|
|
@@ -44,7 +50,10 @@ module.exports = {
|
|
|
44
50
|
SystemSpaceUpdatedEvent,
|
|
45
51
|
SystemCategoryUpdatedEvent,
|
|
46
52
|
SystemProductUpdatedEvent,
|
|
53
|
+
SystemPropertyUpdatedEvent,
|
|
54
|
+
SystemOrganizationUpdatedEvent,
|
|
47
55
|
SystemReservationUpdatedEvent,
|
|
56
|
+
SystemEntityDeletedEvent,
|
|
48
57
|
SceneSetEvent,
|
|
49
58
|
SMSEvent,
|
|
50
59
|
EmailEvent,
|
|
@@ -11,122 +11,28 @@
|
|
|
11
11
|
export interface Property {
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
-
type:
|
|
14
|
+
type: string;
|
|
15
|
+
discriminator?: "hospitality" | "education" | "commercial";
|
|
15
16
|
timezone?: string;
|
|
16
17
|
smsNumber?: string;
|
|
17
|
-
hostname: string;
|
|
18
|
+
hostname: string | null;
|
|
18
19
|
/**
|
|
19
20
|
* Reference (id) to the organization that owns this property
|
|
20
21
|
*/
|
|
21
|
-
organization: string;
|
|
22
|
+
organization: string | null;
|
|
22
23
|
checkInTime?: string;
|
|
23
24
|
checkOutTime?: string;
|
|
24
|
-
address?:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
short_name?: string;
|
|
37
|
-
scope?: string;
|
|
38
|
-
start_url?: string;
|
|
39
|
-
themeColor?: string;
|
|
40
|
-
backgroundColor?: string;
|
|
41
|
-
display?: "fullscreen" | "standalone" | "minimal-ui" | "browser";
|
|
42
|
-
orientation?: "portrait" | "landscape";
|
|
43
|
-
splash?: {
|
|
44
|
-
src?: string;
|
|
45
|
-
type?: string;
|
|
46
|
-
sizes?: string;
|
|
47
|
-
[k: string]: unknown;
|
|
48
|
-
};
|
|
49
|
-
icons?: {
|
|
50
|
-
src?: string;
|
|
51
|
-
sizes?: string;
|
|
52
|
-
type?: string;
|
|
53
|
-
[k: string]: unknown;
|
|
54
|
-
}[];
|
|
55
|
-
logo?: {
|
|
56
|
-
src?: string;
|
|
57
|
-
type?: string;
|
|
58
|
-
sizes?: string;
|
|
59
|
-
[k: string]: unknown;
|
|
60
|
-
};
|
|
61
|
-
[k: string]: unknown;
|
|
62
|
-
};
|
|
63
|
-
appFeatures?: {
|
|
64
|
-
RoomControl?: {
|
|
65
|
-
commonAreas?: {
|
|
66
|
-
spaces?: string[];
|
|
67
|
-
[k: string]: unknown;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
CheckIn?: {
|
|
71
|
-
payment?: unknown;
|
|
72
|
-
identification?: unknown;
|
|
73
|
-
earlyCheckIn?: {
|
|
74
|
-
dynamic: boolean;
|
|
75
|
-
minimumPrice?: number;
|
|
76
|
-
maximumPrice?: number;
|
|
77
|
-
priceRatioPerHour?: number;
|
|
78
|
-
[k: string]: unknown;
|
|
79
|
-
};
|
|
80
|
-
roomUpgrades?: unknown;
|
|
81
|
-
[k: string]: unknown;
|
|
82
|
-
};
|
|
83
|
-
CheckOut?: {
|
|
84
|
-
lateCheckOut?: {
|
|
85
|
-
dynamic: boolean;
|
|
86
|
-
minimumPrice?: number;
|
|
87
|
-
maximumPrice?: number;
|
|
88
|
-
priceRatioPerHour?: number;
|
|
89
|
-
[k: string]: unknown;
|
|
90
|
-
};
|
|
91
|
-
[k: string]: unknown;
|
|
92
|
-
};
|
|
93
|
-
Concierge?: unknown;
|
|
94
|
-
DigitalKey?: {
|
|
95
|
-
system?: "salto";
|
|
96
|
-
systemOnline?: boolean;
|
|
97
|
-
enableApp?: boolean;
|
|
98
|
-
branding?: {
|
|
99
|
-
logo?: string;
|
|
100
|
-
/**
|
|
101
|
-
* @minItems 2
|
|
102
|
-
* @maxItems 2
|
|
103
|
-
*/
|
|
104
|
-
gradient?: [string, string];
|
|
105
|
-
/**
|
|
106
|
-
* @minItems 2
|
|
107
|
-
* @maxItems 3
|
|
108
|
-
*/
|
|
109
|
-
highlightedGradient?: [string, string] | [string, string, string];
|
|
110
|
-
[k: string]: unknown;
|
|
111
|
-
};
|
|
112
|
-
[k: string]: unknown;
|
|
113
|
-
};
|
|
114
|
-
Elevator?: unknown;
|
|
115
|
-
};
|
|
116
|
-
notifications?: {
|
|
117
|
-
email?: {
|
|
118
|
-
enabled?: boolean;
|
|
119
|
-
};
|
|
120
|
-
sms?: {
|
|
121
|
-
enabled?: boolean;
|
|
122
|
-
};
|
|
123
|
-
push?: {
|
|
124
|
-
enabled?: boolean;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
credentials?: {
|
|
128
|
-
[k: string]: unknown;
|
|
129
|
-
};
|
|
130
|
-
additionalProperties?: never;
|
|
25
|
+
address?: Address;
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface Address {
|
|
29
|
+
id?: string;
|
|
30
|
+
line1?: string;
|
|
31
|
+
line2?: string;
|
|
32
|
+
line3?: string;
|
|
33
|
+
city?: string;
|
|
34
|
+
state?: string;
|
|
35
|
+
postalCode?: string;
|
|
36
|
+
countryCode?: string;
|
|
131
37
|
[k: string]: unknown;
|
|
132
38
|
}
|
|
@@ -168,6 +168,7 @@ export interface Dimmer {
|
|
|
168
168
|
level: number;
|
|
169
169
|
systemId?: string;
|
|
170
170
|
watts?: number;
|
|
171
|
+
[k: string]: unknown;
|
|
171
172
|
}
|
|
172
173
|
/**
|
|
173
174
|
* Any smart switch
|
|
@@ -252,6 +253,7 @@ export interface Switch {
|
|
|
252
253
|
state: "on" | "off";
|
|
253
254
|
systemId?: string;
|
|
254
255
|
watts?: number;
|
|
256
|
+
[k: string]: unknown;
|
|
255
257
|
}
|
|
256
258
|
/**
|
|
257
259
|
* Any smart thermostat
|
|
@@ -449,6 +451,7 @@ export interface Lock {
|
|
|
449
451
|
batteryLevel?: number;
|
|
450
452
|
systemId?: string;
|
|
451
453
|
watts?: number;
|
|
454
|
+
[k: string]: unknown;
|
|
452
455
|
}
|
|
453
456
|
/**
|
|
454
457
|
* Any smart window covering
|
|
@@ -532,6 +535,7 @@ export interface WindowCovering {
|
|
|
532
535
|
position: number;
|
|
533
536
|
systemId?: string;
|
|
534
537
|
watts?: number;
|
|
538
|
+
[k: string]: unknown;
|
|
535
539
|
}
|
|
536
540
|
/**
|
|
537
541
|
* Any smart courtesy system
|
|
@@ -616,6 +620,7 @@ export interface Courtesy {
|
|
|
616
620
|
state: "privacy" | "service" | "none";
|
|
617
621
|
systemId?: string;
|
|
618
622
|
watts?: number;
|
|
623
|
+
[k: string]: unknown;
|
|
619
624
|
}
|
|
620
625
|
/**
|
|
621
626
|
* Any smart camera
|
|
@@ -1057,4 +1062,5 @@ export interface Alarm {
|
|
|
1057
1062
|
bypassed?: boolean | null;
|
|
1058
1063
|
}[];
|
|
1059
1064
|
watts?: number;
|
|
1065
|
+
[k: string]: unknown;
|
|
1060
1066
|
}
|
|
@@ -13,9 +13,14 @@
|
|
|
13
13
|
"type": "string"
|
|
14
14
|
},
|
|
15
15
|
"type": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"default": "property"
|
|
18
|
+
},
|
|
19
|
+
"discriminator": {
|
|
16
20
|
"type": "string",
|
|
17
21
|
"enum": ["hospitality", "education", "commercial"]
|
|
18
22
|
},
|
|
23
|
+
|
|
19
24
|
"timezone": {
|
|
20
25
|
"type": "string"
|
|
21
26
|
},
|
|
@@ -23,10 +28,10 @@
|
|
|
23
28
|
"type": "string"
|
|
24
29
|
},
|
|
25
30
|
"hostname": {
|
|
26
|
-
"type": "string"
|
|
31
|
+
"type": ["string", "null"]
|
|
27
32
|
},
|
|
28
33
|
"organization": {
|
|
29
|
-
"type": "string",
|
|
34
|
+
"type": ["string", "null"],
|
|
30
35
|
"description": "Reference (id) to the organization that owns this property"
|
|
31
36
|
},
|
|
32
37
|
"checkInTime": {
|
|
@@ -36,24 +41,8 @@
|
|
|
36
41
|
"type": "string"
|
|
37
42
|
},
|
|
38
43
|
"address": {
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"street": {
|
|
42
|
-
"type": "string"
|
|
43
|
-
},
|
|
44
|
-
"city": {
|
|
45
|
-
"type": "string"
|
|
46
|
-
},
|
|
47
|
-
"state": {
|
|
48
|
-
"type": "string"
|
|
49
|
-
},
|
|
50
|
-
"zip": {
|
|
51
|
-
"type": "string"
|
|
52
|
-
},
|
|
53
|
-
"country": {
|
|
54
|
-
"type": "string"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
44
|
+
"$ref": "definitions.json#/definitions/address"
|
|
45
|
+
}
|
|
57
46
|
},
|
|
58
47
|
"latitude": {
|
|
59
48
|
"type": "number"
|
|
@@ -340,7 +329,5 @@
|
|
|
340
329
|
"credentials": {
|
|
341
330
|
"type": "object",
|
|
342
331
|
"additionalProperties": true
|
|
343
|
-
}
|
|
344
|
-
"additionalProperties": false
|
|
345
|
-
}
|
|
332
|
+
}
|
|
346
333
|
}
|
package/dist/esm/Events.js
CHANGED
|
@@ -331,6 +331,50 @@ var require_SystemMotionSensorUpdatedEvent = __commonJS({
|
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
333
|
|
|
334
|
+
// src/Events/SystemPropertyUpdatedEvent.js
|
|
335
|
+
var require_SystemPropertyUpdatedEvent = __commonJS({
|
|
336
|
+
"src/Events/SystemPropertyUpdatedEvent.js"(exports, module) {
|
|
337
|
+
var Event = require_Event();
|
|
338
|
+
var SystemPropertyUpdatedEvent = class extends Event {
|
|
339
|
+
static {
|
|
340
|
+
__name(this, "SystemPropertyUpdatedEvent");
|
|
341
|
+
}
|
|
342
|
+
constructor(property) {
|
|
343
|
+
super(property);
|
|
344
|
+
}
|
|
345
|
+
get name() {
|
|
346
|
+
return "SystemPropertyUpdated";
|
|
347
|
+
}
|
|
348
|
+
get routingKey() {
|
|
349
|
+
return `property.${this.keyId}.updated`;
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
module.exports = SystemPropertyUpdatedEvent;
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// src/Events/SystemOrganizationUpdatedEvent.js
|
|
357
|
+
var require_SystemOrganizationUpdatedEvent = __commonJS({
|
|
358
|
+
"src/Events/SystemOrganizationUpdatedEvent.js"(exports, module) {
|
|
359
|
+
var Event = require_Event();
|
|
360
|
+
var SystemOrganizationUpdatedEvent = class extends Event {
|
|
361
|
+
static {
|
|
362
|
+
__name(this, "SystemOrganizationUpdatedEvent");
|
|
363
|
+
}
|
|
364
|
+
constructor(organization) {
|
|
365
|
+
super(organization);
|
|
366
|
+
}
|
|
367
|
+
get name() {
|
|
368
|
+
return "SystemOrganizationUpdated";
|
|
369
|
+
}
|
|
370
|
+
get routingKey() {
|
|
371
|
+
return `organization.${this.keyId}.updated`;
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
module.exports = SystemOrganizationUpdatedEvent;
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
|
|
334
378
|
// src/Events/SceneSetEvent.js
|
|
335
379
|
var require_SceneSetEvent = __commonJS({
|
|
336
380
|
"src/Events/SceneSetEvent.js"(exports, module) {
|
|
@@ -581,6 +625,28 @@ var require_ApplicationOutOfUseEvent = __commonJS({
|
|
|
581
625
|
}
|
|
582
626
|
});
|
|
583
627
|
|
|
628
|
+
// src/Events/SystemEntityDeletedEvent.js
|
|
629
|
+
var require_SystemEntityDeletedEvent = __commonJS({
|
|
630
|
+
"src/Events/SystemEntityDeletedEvent.js"(exports, module) {
|
|
631
|
+
var Event = require_Event();
|
|
632
|
+
var SystemEntityDeletedEvent = class extends Event {
|
|
633
|
+
static {
|
|
634
|
+
__name(this, "SystemEntityDeletedEvent");
|
|
635
|
+
}
|
|
636
|
+
constructor(data) {
|
|
637
|
+
super(data);
|
|
638
|
+
}
|
|
639
|
+
get name() {
|
|
640
|
+
return "SystemEntityDeleted";
|
|
641
|
+
}
|
|
642
|
+
get routingKey() {
|
|
643
|
+
return `entity.${this.keyId}.deleted`;
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
module.exports = SystemEntityDeletedEvent;
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
|
|
584
650
|
// src/Events/index.js
|
|
585
651
|
var require_Events = __commonJS({
|
|
586
652
|
"src/Events/index.js"(exports, module) {
|
|
@@ -596,6 +662,8 @@ var require_Events = __commonJS({
|
|
|
596
662
|
var SystemCourtesyUpdatedEvent = require_SystemCourtesyUpdatedEvent();
|
|
597
663
|
var SystemAlarmUpdatedEvent = require_SystemAlarmUpdatedEvent();
|
|
598
664
|
var SystemMotionSensorUpdatedEvent = require_SystemMotionSensorUpdatedEvent();
|
|
665
|
+
var SystemPropertyUpdatedEvent = require_SystemPropertyUpdatedEvent();
|
|
666
|
+
var SystemOrganizationUpdatedEvent = require_SystemOrganizationUpdatedEvent();
|
|
599
667
|
var SceneSetEvent = require_SceneSetEvent();
|
|
600
668
|
var SystemUserUpdatedEvent = require_SystemUserUpdatedEvent();
|
|
601
669
|
var SystemSpaceUpdatedEvent = require_SystemSpaceUpdatedEvent();
|
|
@@ -607,6 +675,7 @@ var require_Events = __commonJS({
|
|
|
607
675
|
var ShortLinkCreatedEvent = require_ShortLinkCreatedEvent();
|
|
608
676
|
var ApplicationInUseEvent = require_ApplicationInUseEvent();
|
|
609
677
|
var ApplicationOutOfUseEvent = require_ApplicationOutOfUseEvent();
|
|
678
|
+
var SystemEntityDeletedEvent = require_SystemEntityDeletedEvent();
|
|
610
679
|
module.exports = {
|
|
611
680
|
SystemAlarmUpdatedEvent,
|
|
612
681
|
SystemGatewayUpdatedEvent,
|
|
@@ -624,7 +693,10 @@ var require_Events = __commonJS({
|
|
|
624
693
|
SystemSpaceUpdatedEvent,
|
|
625
694
|
SystemCategoryUpdatedEvent,
|
|
626
695
|
SystemProductUpdatedEvent,
|
|
696
|
+
SystemPropertyUpdatedEvent,
|
|
697
|
+
SystemOrganizationUpdatedEvent,
|
|
627
698
|
SystemReservationUpdatedEvent,
|
|
699
|
+
SystemEntityDeletedEvent,
|
|
628
700
|
SceneSetEvent,
|
|
629
701
|
SMSEvent,
|
|
630
702
|
EmailEvent,
|