@placeos/ts-client 4.7.6 → 4.7.9
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/drivers/driver.d.ts +3 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/modules/module.d.ts +3 -0
- package/dist/systems/system.d.ts +2 -2
- package/package.json +1 -1
- package/src/auth/functions.ts +5 -3
- package/src/drivers/driver.ts +4 -0
- package/src/modules/module.ts +4 -0
- package/src/systems/system.ts +3 -3
package/dist/index.es.js
CHANGED
|
@@ -2147,9 +2147,11 @@ function X(t = !0) {
|
|
|
2147
2147
|
const e = I.getItem(`${q}_expires_at`) || "", n = De.getValue();
|
|
2148
2148
|
return cs(+e, /* @__PURE__ */ new Date()) && (d("Auth", "Token expired. Requesting new token..."), qn(), S.load_authority || (qt += 1, oe(
|
|
2149
2149
|
"re-authorise",
|
|
2150
|
-
() =>
|
|
2151
|
-
|
|
2152
|
-
|
|
2150
|
+
async () => {
|
|
2151
|
+
delete S.authorise, await qr().catch(
|
|
2152
|
+
(r) => d("Auth", `Failed to get token: ${r}`)
|
|
2153
|
+
);
|
|
2154
|
+
},
|
|
2153
2155
|
200 * Math.min(20, qt)
|
|
2154
2156
|
)), !t) ? "" : n || I.getItem(`${q}_access_token`) || "";
|
|
2155
2157
|
}
|
|
@@ -3150,10 +3152,12 @@ class Hr extends L {
|
|
|
3150
3152
|
/** Whether newer version of driver is available */
|
|
3151
3153
|
update_available;
|
|
3152
3154
|
update_info;
|
|
3155
|
+
/** */
|
|
3156
|
+
alert_level;
|
|
3153
3157
|
/** Tuple of user settings of differring encryption levels for the driver */
|
|
3154
3158
|
settings;
|
|
3155
3159
|
constructor(e = {}) {
|
|
3156
|
-
super(e), this.description = e.description || "", this.module_name = e.module_name || "", this.role = e.role ?? Mt.Logic, this.default_uri = e.default_uri || "", this.default_port = e.default_port || 1, this.ignore_connected = e.ignore_connected || !1, this.class_name = e.class_name || "", this.repository_id = e.repository_id || "", this.file_name = e.file_name || "", this.commit = e.commit || "", this.update_available = e.update_available || !1, this.update_info = e.update_info, this.settings = e.settings || [null, null, null, null], typeof this.settings != "object" && (this.settings = [null, null, null, null]);
|
|
3160
|
+
super(e), this.description = e.description || "", this.module_name = e.module_name || "", this.role = e.role ?? Mt.Logic, this.default_uri = e.default_uri || "", this.default_port = e.default_port || 1, this.ignore_connected = e.ignore_connected || !1, this.class_name = e.class_name || "", this.repository_id = e.repository_id || "", this.file_name = e.file_name || "", this.commit = e.commit || "", this.update_available = e.update_available || !1, this.update_info = e.update_info, this.alert_level = e.alert_level || "medium", this.settings = e.settings || [null, null, null, null], typeof this.settings != "object" && (this.settings = [null, null, null, null]);
|
|
3157
3161
|
for (const n in He)
|
|
3158
3162
|
!isNaN(Number(n)) && !this.settings[n] && (this.settings[n] = new Ee({
|
|
3159
3163
|
parent_id: this.id,
|
|
@@ -3563,8 +3567,8 @@ class Lr extends L {
|
|
|
3563
3567
|
support_url;
|
|
3564
3568
|
/** URL for the timetable UI linked to the system */
|
|
3565
3569
|
timetable_url;
|
|
3566
|
-
/**
|
|
3567
|
-
|
|
3570
|
+
/** URLs for requesting snapshots of the assosiated camera */
|
|
3571
|
+
camera_snapshot_urls;
|
|
3568
3572
|
/** URL for managing the attached camera */
|
|
3569
3573
|
camera_url;
|
|
3570
3574
|
/** External booking URL for the system */
|
|
@@ -3592,7 +3596,7 @@ class Lr extends L {
|
|
|
3592
3596
|
/** Orientation of the signage system */
|
|
3593
3597
|
orientation;
|
|
3594
3598
|
constructor(e = {}) {
|
|
3595
|
-
super(e), this.display_name = e.display_name || "", this.description = e.description || "", this.email = e.email || "", this.code = e.code || "", this.capacity = e.capacity || 0, this.features = e.features || [], this.bookable = e.bookable || !1, this.public = e.public ?? !1, this.installed_ui_devices = e.installed_ui_devices || 0, this.support_url = e.support_url || "", this.
|
|
3599
|
+
super(e), this.display_name = e.display_name || "", this.description = e.description || "", this.email = e.email || "", this.code = e.code || "", this.capacity = e.capacity || 0, this.features = e.features || [], this.bookable = e.bookable || !1, this.public = e.public ?? !1, this.installed_ui_devices = e.installed_ui_devices || 0, this.support_url = e.support_url || "", this.camera_snapshot_urls = e.camera_snapshot_urls || [], this.camera_url = e.camera_url || "", this.timetable_url = e.timetable_url || "", this.room_booking_url = e.room_booking_url || "", this.map_id = e.map_id || "", this.modules = e.modules || [], this.images = e.images || [], this.zones = e.zones || [], this.settings = e.settings || [null, null, null, null], this.timezone = e.timezone || "", this.signage = e.signage || !1, this.playlists = e.playlists || [], this.orientation = e.orientation || "unspecified", this.approval = e.approval || !1, typeof this.settings != "object" && (this.settings = [null, null, null, null]);
|
|
3596
3600
|
for (const n in He)
|
|
3597
3601
|
!isNaN(Number(n)) && !this.settings[n] && (this.settings[n] = new Ee({
|
|
3598
3602
|
parent_id: this.id,
|
|
@@ -3646,6 +3650,8 @@ class Br extends L {
|
|
|
3646
3650
|
has_runtime_error;
|
|
3647
3651
|
/** Timestamp of the last runtime error in ms since UTC epoch */
|
|
3648
3652
|
error_timestamp;
|
|
3653
|
+
/** */
|
|
3654
|
+
alert_level;
|
|
3649
3655
|
/** ID of the system associated with the module */
|
|
3650
3656
|
get system_id() {
|
|
3651
3657
|
return this.control_system_id;
|
|
@@ -3653,7 +3659,7 @@ class Br extends L {
|
|
|
3653
3659
|
constructor(e = {}) {
|
|
3654
3660
|
super(e), this.driver_id = e.driver_id || e.dependency_id || "", this.control_system_id = e.control_system_id || "", this.edge_id = e.edge_id || "", this.ip = e.ip || "", this.tls = e.tls || !1, this.udp = e.udp || !1, this.port = e.port || 1, this.makebreak = e.makebreak || !1, this.uri = e.uri || "", this.custom_name = e.custom_name || "", this.role = e.role ?? Mt.Logic, this.notes = e.notes || "", this.ignore_connected = e.ignore_connected || !1, this.connected = e.connected, this.running = e.running || !1, this.updated_at = e.updated_at || 0, this.system = new Lr(
|
|
3655
3661
|
e.control_system || e.system
|
|
3656
|
-
), this.has_runtime_error = e.has_runtime_error || !1, this.error_timestamp = e.error_timestamp || 0, this.driver = new Hr(e.dependency || e.driver), this.settings = e.settings || [null, null, null, null], typeof this.settings != "object" && (this.settings = [null, null, null, null]);
|
|
3662
|
+
), this.has_runtime_error = e.has_runtime_error || !1, this.error_timestamp = e.error_timestamp || 0, this.driver = new Hr(e.dependency || e.driver), this.settings = e.settings || [null, null, null, null], this.alert_level = e.alert_level || "medium", typeof this.settings != "object" && (this.settings = [null, null, null, null]);
|
|
3657
3663
|
for (const n in He)
|
|
3658
3664
|
!isNaN(Number(n)) && !this.settings[n] && (this.settings[n] = new Ee({
|
|
3659
3665
|
parent_id: this.id,
|