@camstack/server 1.2.740 → 1.2.742
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/CHANGELOG.md +13 -0
- package/dist/api/core/cap-providers.js +167 -43
- package/dist/api/core/integration-role.js +20 -0
- package/dist/api/trpc/generated-cap-mounts.js +18 -1
- package/dist/api/trpc/generated-cap-routers.js +2434 -2379
- package/package.json +16 -16
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-DXWlu1kP.js → agent-https-CsDhLoui.js} +1 -1
- package/system/dist/{agent-https-DcYKH3q_.mjs → agent-https-lgka7y2l.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +4 -4
- package/system/dist/builtins/alerts/alerts.addon.mjs +4 -4
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +4 -4
- package/system/dist/builtins/camera-grid/index.mjs +4 -4
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +193 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +193 -3
- package/system/dist/builtins/core-blocks/migrations/index.d.ts +5 -0
- package/system/dist/builtins/core-blocks/migrations/pump-cycle-split.d.ts +43 -0
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +146 -48
- package/system/dist/builtins/loki-logging/index.mjs +146 -48
- package/system/dist/builtins/loki-logging/loki-logging.addon.d.ts +15 -0
- package/system/dist/builtins/loki-logging/loki-record-kinds.d.ts +2 -0
- package/system/dist/builtins/loki-logging/migrations/index.d.ts +11 -1
- package/system/dist/builtins/loki-logging/migrations/registry-toggle-to-record.d.ts +26 -0
- package/system/dist/builtins/loki-logging/retire-enabled-flag.d.ts +8 -23
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{composition-sources-BNa_vU07.mjs → composition-sources-BE6yrVCB.mjs} +1 -1
- package/system/dist/{composition-sources-BfWnLt2j.js → composition-sources-ny5MCbhd.js} +1 -1
- package/system/dist/{constants-DugYIgQF.js → constants-BbgVaoOX.js} +1 -1
- package/system/dist/{constants-DCYUT12P.mjs → constants-DiDTdj26.mjs} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-BIJZBObd.mjs → custom-action-registry-oHl1xltx.mjs} +37 -37
- package/system/dist/{device-ca-CFs0PY9S.js → device-ca-BdgE_3J6.js} +1 -1
- package/system/dist/{device-ca-BnBFt1ex.mjs → device-ca-CVcZIfhA.mjs} +1 -1
- package/system/dist/{dist-BF9MiiHX.mjs → dist-BqlGZK-1.mjs} +397 -132
- package/system/dist/{dist-DwI4ifnv.js → dist-DdlfeOQx.js} +402 -131
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CnSqBHO9.mjs → hub-mdns-ciao-BZsVTXQ7.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Dsk7HF0G.js → hub-mdns-ciao-D3ZQMWjg.js} +2 -2
- package/system/dist/index.js +14 -9
- package/system/dist/index.mjs +225 -220
- package/system/dist/migrations/hub/2026-11-02-integration-addon-id-bare.d.ts +3 -0
- package/system/dist/{restore-archive-CDgSTubW.mjs → restore-archive-BFem7ZuS.mjs} +94 -94
- package/system/dist/{restore-archive-CnG6nyar.js → restore-archive-Ch76C3VQ.js} +1 -1
- package/system/dist/{retention-csYEu0l3.mjs → retention-D5Vk8FXc.mjs} +1 -1
- package/system/dist/{retention-voCdtR4h.js → retention-DWsfcaKe.js} +1 -1
- package/system/dist/{wal-maintenance-CTsOr0e7.mjs → wal-maintenance-CS-Wtg9w.mjs} +0 -0
- package/system/dist/{wal-maintenance-DrLnLCGO.js → wal-maintenance-DcVdVWDD.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1165,7 +1165,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1165
1165
|
return DeviceRole;
|
|
1166
1166
|
}({});
|
|
1167
1167
|
//#endregion
|
|
1168
|
-
//#region ../types/dist/sleep-
|
|
1168
|
+
//#region ../types/dist/sleep-hmSP-eJt.mjs
|
|
1169
1169
|
/**
|
|
1170
1170
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1171
1171
|
* window to float samples (D455).
|
|
@@ -6069,6 +6069,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
6069
6069
|
"backup",
|
|
6070
6070
|
"battery",
|
|
6071
6071
|
"binary",
|
|
6072
|
+
"board-key-source",
|
|
6072
6073
|
"brightness",
|
|
6073
6074
|
"broker",
|
|
6074
6075
|
"button",
|
|
@@ -6190,6 +6191,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
6190
6191
|
"privacy-mask",
|
|
6191
6192
|
"ptz",
|
|
6192
6193
|
"ptz-autotrack",
|
|
6194
|
+
"pump-cycle",
|
|
6193
6195
|
"reboot",
|
|
6194
6196
|
"record-entries",
|
|
6195
6197
|
"recording",
|
|
@@ -7482,18 +7484,6 @@ Object.freeze({
|
|
|
7482
7484
|
"path": "pumpRunning",
|
|
7483
7485
|
"valueType": "boolean"
|
|
7484
7486
|
},
|
|
7485
|
-
{
|
|
7486
|
-
"path": "pumpIntervalEnabled",
|
|
7487
|
-
"valueType": "boolean"
|
|
7488
|
-
},
|
|
7489
|
-
{
|
|
7490
|
-
"path": "pumpOnTime",
|
|
7491
|
-
"valueType": "number"
|
|
7492
|
-
},
|
|
7493
|
-
{
|
|
7494
|
-
"path": "pumpOffTime",
|
|
7495
|
-
"valueType": "number"
|
|
7496
|
-
},
|
|
7497
7487
|
{
|
|
7498
7488
|
"path": "lastDrink",
|
|
7499
7489
|
"valueType": "number"
|
|
@@ -7617,6 +7607,20 @@ Object.freeze({
|
|
|
7617
7607
|
"valueType": "number"
|
|
7618
7608
|
}
|
|
7619
7609
|
],
|
|
7610
|
+
"pump-cycle": [
|
|
7611
|
+
{
|
|
7612
|
+
"path": "enabled",
|
|
7613
|
+
"valueType": "boolean"
|
|
7614
|
+
},
|
|
7615
|
+
{
|
|
7616
|
+
"path": "onTime",
|
|
7617
|
+
"valueType": "number"
|
|
7618
|
+
},
|
|
7619
|
+
{
|
|
7620
|
+
"path": "offTime",
|
|
7621
|
+
"valueType": "number"
|
|
7622
|
+
}
|
|
7623
|
+
],
|
|
7620
7624
|
"recording-archive": [
|
|
7621
7625
|
{
|
|
7622
7626
|
"path": "deviceId",
|
|
@@ -10841,6 +10845,73 @@ var NodeColorIdSchema = zod.z.enum([
|
|
|
10841
10845
|
"node-g",
|
|
10842
10846
|
"node-h"
|
|
10843
10847
|
]);
|
|
10848
|
+
//#endregion
|
|
10849
|
+
//#region ../types/dist/index.mjs
|
|
10850
|
+
var SMTP_INBOUND_DEFAULT_PORT = 2525;
|
|
10851
|
+
var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
|
|
10852
|
+
var SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES = 25 * 1024 * 1024;
|
|
10853
|
+
/** The text excerpt a message carries on the bus. */
|
|
10854
|
+
var SMTP_INBOUND_TEXT_MAX_CHARS = 4096;
|
|
10855
|
+
var PortSchema = zod.z.number().int().min(1).max(65535);
|
|
10856
|
+
/** A recipient local-part: what stands before the `@`. */
|
|
10857
|
+
var SmtpRecipientSchema = zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9._+-]+$/);
|
|
10858
|
+
zod.z.object({
|
|
10859
|
+
port: PortSchema.default(SMTP_INBOUND_DEFAULT_PORT),
|
|
10860
|
+
bindHost: zod.z.string().min(1).default("0.0.0.0"),
|
|
10861
|
+
domain: zod.z.string().min(1).default(SMTP_INBOUND_DEFAULT_DOMAIN),
|
|
10862
|
+
requireAuth: zod.z.boolean().default(true),
|
|
10863
|
+
username: zod.z.string().default(""),
|
|
10864
|
+
password: zod.z.string().default("").meta({ secret: true }),
|
|
10865
|
+
starttls: zod.z.boolean().default(false),
|
|
10866
|
+
maxMessageBytes: zod.z.number().int().positive().default(SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES)
|
|
10867
|
+
});
|
|
10868
|
+
zod.z.object({
|
|
10869
|
+
host: zod.z.string().min(1).nullable(),
|
|
10870
|
+
hostReason: zod.z.string().nullable(),
|
|
10871
|
+
port: PortSchema,
|
|
10872
|
+
domain: zod.z.string().min(1),
|
|
10873
|
+
requireAuth: zod.z.boolean(),
|
|
10874
|
+
username: zod.z.string(),
|
|
10875
|
+
password: zod.z.string(),
|
|
10876
|
+
starttls: zod.z.boolean()
|
|
10877
|
+
});
|
|
10878
|
+
zod.z.object({
|
|
10879
|
+
recipients: zod.z.array(SmtpRecipientSchema).min(1),
|
|
10880
|
+
/**
|
|
10881
|
+
* Who is subscribing. A second `subscribe` with the same id REPLACES that subscriber's
|
|
10882
|
+
* recipients (the way a consumer that restarted, or lost a device, declares its set again);
|
|
10883
|
+
* a recipient held by another subscriber is refused with `smtp-inbound/recipient-claimed`.
|
|
10884
|
+
* Absent, the subscriber is anonymous and unique.
|
|
10885
|
+
*/
|
|
10886
|
+
subscriberId: zod.z.string().min(1).max(64).optional()
|
|
10887
|
+
});
|
|
10888
|
+
var SmtpInboundAttachmentSchema = zod.z.object({
|
|
10889
|
+
filename: zod.z.string(),
|
|
10890
|
+
contentType: zod.z.string(),
|
|
10891
|
+
bytes: zod.z.number().int().nonnegative()
|
|
10892
|
+
});
|
|
10893
|
+
/** The payload of one `broker.message` (the key is the recipient local-part). */
|
|
10894
|
+
var SmtpInboundMessageSchema = zod.z.object({
|
|
10895
|
+
/** Monotonic per mailbox; a gap tells a consumer it missed an event. */
|
|
10896
|
+
seq: zod.z.number().int().positive(),
|
|
10897
|
+
messageId: zod.z.string(),
|
|
10898
|
+
receivedAt: zod.z.number().int().nonnegative(),
|
|
10899
|
+
from: zod.z.string(),
|
|
10900
|
+
to: zod.z.string(),
|
|
10901
|
+
subject: zod.z.string(),
|
|
10902
|
+
text: zod.z.string().max(SMTP_INBOUND_TEXT_MAX_CHARS),
|
|
10903
|
+
attachments: zod.z.array(SmtpInboundAttachmentSchema)
|
|
10904
|
+
});
|
|
10905
|
+
zod.z.object({
|
|
10906
|
+
/** The newest seq issued so far (0 before any mail). */
|
|
10907
|
+
lastSeq: zod.z.number().int().nonnegative(),
|
|
10908
|
+
/** The oldest seq still retained; messages below it are gone. */
|
|
10909
|
+
oldestSeq: zod.z.number().int().nonnegative(),
|
|
10910
|
+
messages: zod.z.array(zod.z.object({
|
|
10911
|
+
key: zod.z.string(),
|
|
10912
|
+
message: SmtpInboundMessageSchema
|
|
10913
|
+
}))
|
|
10914
|
+
});
|
|
10844
10915
|
new Set([
|
|
10845
10916
|
"track",
|
|
10846
10917
|
"face",
|
|
@@ -11004,6 +11075,7 @@ var RecordIntegrationInstances = class {
|
|
|
11004
11075
|
return record === null ? null : {
|
|
11005
11076
|
id,
|
|
11006
11077
|
body: record.data,
|
|
11078
|
+
enabled: record.data.enabled !== false,
|
|
11007
11079
|
secrets: "resolved"
|
|
11008
11080
|
};
|
|
11009
11081
|
} catch (err) {
|
|
@@ -11013,6 +11085,7 @@ var RecordIntegrationInstances = class {
|
|
|
11013
11085
|
return {
|
|
11014
11086
|
id,
|
|
11015
11087
|
body: Object.fromEntries(Object.entries(stored.data).filter(([key]) => !this.secretKeys.has(key))),
|
|
11088
|
+
enabled: stored.data.enabled !== false,
|
|
11016
11089
|
secrets: "unavailable"
|
|
11017
11090
|
};
|
|
11018
11091
|
}
|
|
@@ -11038,6 +11111,7 @@ var RecordIntegrationInstances = class {
|
|
|
11038
11111
|
id: record.id,
|
|
11039
11112
|
name: typeof rawName === "string" ? rawName : record.id,
|
|
11040
11113
|
configured: this.hooks.configured(record.data),
|
|
11114
|
+
enabled: record.data.enabled !== false,
|
|
11041
11115
|
formValues: shown
|
|
11042
11116
|
};
|
|
11043
11117
|
}
|
|
@@ -11072,6 +11146,12 @@ var RecordIntegrationInstances = class {
|
|
|
11072
11146
|
await this.hooks.onChanged?.(id);
|
|
11073
11147
|
return { ok: true };
|
|
11074
11148
|
};
|
|
11149
|
+
/** The switch lives in the record body; the addon is told so it applies it (D996). */
|
|
11150
|
+
setInstanceEnabled = async ({ id, enabled }) => {
|
|
11151
|
+
await this.handle.patch(id, { enabled });
|
|
11152
|
+
await this.hooks.onChanged?.(id);
|
|
11153
|
+
return { ok: true };
|
|
11154
|
+
};
|
|
11075
11155
|
/** The row and its keychain refs go together (the records door). */
|
|
11076
11156
|
deleteInstance = async ({ id }) => {
|
|
11077
11157
|
await this.handle.delete(id);
|
|
@@ -11095,6 +11175,7 @@ var RecordIntegrationInstances = class {
|
|
|
11095
11175
|
getInstance: this.getInstance,
|
|
11096
11176
|
createInstance: this.createInstance,
|
|
11097
11177
|
updateInstance: this.updateInstance,
|
|
11178
|
+
setInstanceEnabled: this.setInstanceEnabled,
|
|
11098
11179
|
deleteInstance: this.deleteInstance,
|
|
11099
11180
|
testInstance: this.testInstance
|
|
11100
11181
|
};
|
|
@@ -18077,24 +18158,52 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
18077
18158
|
args: { on: false }
|
|
18078
18159
|
},
|
|
18079
18160
|
{
|
|
18080
|
-
id: "petFountain.
|
|
18081
|
-
method: "
|
|
18161
|
+
id: "petFountain.resetDailyConsumption",
|
|
18162
|
+
method: "resetDailyConsumption",
|
|
18163
|
+
label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
|
|
18164
|
+
phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
|
|
18165
|
+
icon: "rotate-ccw"
|
|
18166
|
+
}
|
|
18167
|
+
],
|
|
18168
|
+
state: [{
|
|
18169
|
+
kind: "boolean",
|
|
18170
|
+
field: "empty",
|
|
18171
|
+
label: t("Tank empty", "Serbatoio vuoto"),
|
|
18172
|
+
whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
|
|
18173
|
+
whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
|
|
18174
|
+
icon: "droplet"
|
|
18175
|
+
}, {
|
|
18176
|
+
kind: "numeric",
|
|
18177
|
+
field: "waterLevel",
|
|
18178
|
+
quantity: t("the water level", "il livello dell’acqua"),
|
|
18179
|
+
label: t("Water level", "Livello dell’acqua"),
|
|
18180
|
+
unit: "%",
|
|
18181
|
+
icon: "droplets"
|
|
18182
|
+
}]
|
|
18183
|
+
},
|
|
18184
|
+
"pump-cycle": {
|
|
18185
|
+
scope: "device",
|
|
18186
|
+
noun: t("Pump cycle", "Ciclo della pompa"),
|
|
18187
|
+
actions: [
|
|
18188
|
+
{
|
|
18189
|
+
id: "pumpCycle.on",
|
|
18190
|
+
method: "setEnabled",
|
|
18082
18191
|
label: t("Pump cycle on", "Ciclo pompa attivo"),
|
|
18083
18192
|
phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
|
|
18084
18193
|
icon: "timer",
|
|
18085
18194
|
args: { on: true }
|
|
18086
18195
|
},
|
|
18087
18196
|
{
|
|
18088
|
-
id: "
|
|
18089
|
-
method: "
|
|
18197
|
+
id: "pumpCycle.off",
|
|
18198
|
+
method: "setEnabled",
|
|
18090
18199
|
label: t("Pump cycle off", "Ciclo pompa spento"),
|
|
18091
18200
|
phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
|
|
18092
18201
|
icon: "timer-off",
|
|
18093
18202
|
args: { on: false }
|
|
18094
18203
|
},
|
|
18095
18204
|
{
|
|
18096
|
-
id: "
|
|
18097
|
-
method: "
|
|
18205
|
+
id: "pumpCycle.onMinutes",
|
|
18206
|
+
method: "setOnMinutes",
|
|
18098
18207
|
label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
|
|
18099
18208
|
phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
|
|
18100
18209
|
icon: "timer",
|
|
@@ -18110,8 +18219,8 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
18110
18219
|
}]
|
|
18111
18220
|
},
|
|
18112
18221
|
{
|
|
18113
|
-
id: "
|
|
18114
|
-
method: "
|
|
18222
|
+
id: "pumpCycle.offMinutes",
|
|
18223
|
+
method: "setOffMinutes",
|
|
18115
18224
|
label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
|
|
18116
18225
|
phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
|
|
18117
18226
|
icon: "timer-off",
|
|
@@ -18125,29 +18234,15 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
18125
18234
|
unit: "min"
|
|
18126
18235
|
}
|
|
18127
18236
|
}]
|
|
18128
|
-
},
|
|
18129
|
-
{
|
|
18130
|
-
id: "petFountain.resetDailyConsumption",
|
|
18131
|
-
method: "resetDailyConsumption",
|
|
18132
|
-
label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
|
|
18133
|
-
phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
|
|
18134
|
-
icon: "rotate-ccw"
|
|
18135
18237
|
}
|
|
18136
18238
|
],
|
|
18137
18239
|
state: [{
|
|
18138
18240
|
kind: "boolean",
|
|
18139
|
-
field: "
|
|
18140
|
-
label: t("
|
|
18141
|
-
whenTrue: t("When
|
|
18142
|
-
whenFalse: t("When
|
|
18143
|
-
icon: "
|
|
18144
|
-
}, {
|
|
18145
|
-
kind: "numeric",
|
|
18146
|
-
field: "waterLevel",
|
|
18147
|
-
quantity: t("the water level", "il livello dell’acqua"),
|
|
18148
|
-
label: t("Water level", "Livello dell’acqua"),
|
|
18149
|
-
unit: "%",
|
|
18150
|
-
icon: "droplets"
|
|
18241
|
+
field: "enabled",
|
|
18242
|
+
label: t("Pump cycle", "Ciclo pompa"),
|
|
18243
|
+
whenTrue: t("When {device} starts running its pump on a cycle", "Quando {device} inizia a far lavorare la pompa a ciclo"),
|
|
18244
|
+
whenFalse: t("When {device} runs its pump continuously", "Quando {device} fa lavorare la pompa in continuo"),
|
|
18245
|
+
icon: "timer"
|
|
18151
18246
|
}]
|
|
18152
18247
|
},
|
|
18153
18248
|
"media-player": {
|
|
@@ -20040,6 +20135,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
20040
20135
|
"audio-analyzer": system(PIPELINE),
|
|
20041
20136
|
"audio-codec": system(INTERNAL),
|
|
20042
20137
|
"auth-provider": system(IDENTITY),
|
|
20138
|
+
"board-key-source": system(INTERNAL),
|
|
20043
20139
|
backup: system("system backups — run and restored from the Backups page"),
|
|
20044
20140
|
broker: system("message-broker connections — configured, not actuated"),
|
|
20045
20141
|
"calendar-source": system(INTERNAL),
|
|
@@ -47423,6 +47519,63 @@ var binaryCapability = {
|
|
|
47423
47519
|
volatileStateFields: ["lastChangedAt"]
|
|
47424
47520
|
};
|
|
47425
47521
|
/**
|
|
47522
|
+
* Why a board key could not be read. Typed so a caller reports the cause and
|
|
47523
|
+
* never treats "could not read" as "has no key" (D49).
|
|
47524
|
+
*/
|
|
47525
|
+
var BoardKeyFailureReasonSchema = zod.z.enum([
|
|
47526
|
+
"unknown-source",
|
|
47527
|
+
"not-admin",
|
|
47528
|
+
"no-builder",
|
|
47529
|
+
"no-ingress-url",
|
|
47530
|
+
"unreachable",
|
|
47531
|
+
"unknown-board",
|
|
47532
|
+
"no-encryption-key",
|
|
47533
|
+
"unreadable-config"
|
|
47534
|
+
]);
|
|
47535
|
+
var BoardKeySourceSchema = zod.z.object({
|
|
47536
|
+
sourceId: zod.z.string(),
|
|
47537
|
+
name: zod.z.string()
|
|
47538
|
+
});
|
|
47539
|
+
var BoardKeyBoardSchema = zod.z.object({
|
|
47540
|
+
/** The builder's file name, e.g. `kitchen.yaml`: the handle `getBoardKey` takes. */
|
|
47541
|
+
configuration: zod.z.string(),
|
|
47542
|
+
/** The node name the builder gives the board. */
|
|
47543
|
+
name: zod.z.string(),
|
|
47544
|
+
/** The address the builder knows the board by, when it has one. */
|
|
47545
|
+
address: zod.z.string().nullable()
|
|
47546
|
+
});
|
|
47547
|
+
var BoardKeyFailureSchema = zod.z.object({
|
|
47548
|
+
ok: zod.z.literal(false),
|
|
47549
|
+
reason: BoardKeyFailureReasonSchema,
|
|
47550
|
+
detail: zod.z.string().optional()
|
|
47551
|
+
});
|
|
47552
|
+
var ListBoardsResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
47553
|
+
ok: zod.z.literal(true),
|
|
47554
|
+
boards: zod.z.array(BoardKeyBoardSchema).readonly()
|
|
47555
|
+
}), BoardKeyFailureSchema]);
|
|
47556
|
+
var GetBoardKeyResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
47557
|
+
ok: zod.z.literal(true),
|
|
47558
|
+
key: zod.z.string()
|
|
47559
|
+
}), BoardKeyFailureSchema]);
|
|
47560
|
+
/**
|
|
47561
|
+
* Where a device board's API encryption key can be read from (the ESPHome
|
|
47562
|
+
* builder that runs beside a Home Assistant). Admin only: `getBoardKey`
|
|
47563
|
+
* returns a credential, and nothing else the source holds ever crosses.
|
|
47564
|
+
*/
|
|
47565
|
+
var boardKeySourceCapability = {
|
|
47566
|
+
name: "board-key-source",
|
|
47567
|
+
scope: "system",
|
|
47568
|
+
mode: "collection",
|
|
47569
|
+
methods: {
|
|
47570
|
+
listSources: method(zod.z.void(), zod.z.array(BoardKeySourceSchema).readonly(), { auth: "admin" }),
|
|
47571
|
+
listBoards: method(zod.z.object({ sourceId: zod.z.string().min(1) }), ListBoardsResultSchema, { auth: "admin" }),
|
|
47572
|
+
getBoardKey: method(zod.z.object({
|
|
47573
|
+
sourceId: zod.z.string().min(1),
|
|
47574
|
+
configuration: zod.z.string().min(1)
|
|
47575
|
+
}), GetBoardKeyResultSchema, { auth: "admin" })
|
|
47576
|
+
}
|
|
47577
|
+
};
|
|
47578
|
+
/**
|
|
47426
47579
|
* Dimmable-light brightness control. Co-exists with `switch` on the
|
|
47427
47580
|
* same device — the switch toggles on/off, this cap sets the level
|
|
47428
47581
|
* applied when the light is on. Drivers map their per-vendor dim
|
|
@@ -52595,7 +52748,7 @@ async function runFanOut(calls, invoke) {
|
|
|
52595
52748
|
}
|
|
52596
52749
|
/**
|
|
52597
52750
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
52598
|
-
* 43 caps with series (81 series),
|
|
52751
|
+
* 43 caps with series (81 series), 37 caps answered `'none'`.
|
|
52599
52752
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
52600
52753
|
*/
|
|
52601
52754
|
var HISTORY_CATALOG = {
|
|
@@ -59073,7 +59226,7 @@ var DishwasherStatusSchema = zod.z.object({
|
|
|
59073
59226
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
59074
59227
|
lastFetchedAt: zod.z.number()
|
|
59075
59228
|
});
|
|
59076
|
-
var DeviceIdSchema$
|
|
59229
|
+
var DeviceIdSchema$2 = zod.z.number().int().nonnegative();
|
|
59077
59230
|
/** A value a program option or setting can take. */
|
|
59078
59231
|
var DishwasherValueSchema = zod.z.union([
|
|
59079
59232
|
zod.z.boolean(),
|
|
@@ -59148,77 +59301,77 @@ var dishwasherCapability = {
|
|
|
59148
59301
|
* option feature keys; each is checked against the program's constraints.
|
|
59149
59302
|
*/
|
|
59150
59303
|
start: method(zod.z.object({
|
|
59151
|
-
deviceId: DeviceIdSchema$
|
|
59304
|
+
deviceId: DeviceIdSchema$2,
|
|
59152
59305
|
program: zod.z.string().min(1).optional(),
|
|
59153
59306
|
options: zod.z.record(zod.z.string(), DishwasherValueSchema).optional()
|
|
59154
59307
|
}), zod.z.void(), {
|
|
59155
59308
|
kind: "mutation",
|
|
59156
59309
|
auth: "protected"
|
|
59157
59310
|
}),
|
|
59158
|
-
pause: method(zod.z.object({ deviceId: DeviceIdSchema$
|
|
59311
|
+
pause: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), zod.z.void(), {
|
|
59159
59312
|
kind: "mutation",
|
|
59160
59313
|
auth: "protected"
|
|
59161
59314
|
}),
|
|
59162
|
-
resume: method(zod.z.object({ deviceId: DeviceIdSchema$
|
|
59315
|
+
resume: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), zod.z.void(), {
|
|
59163
59316
|
kind: "mutation",
|
|
59164
59317
|
auth: "protected"
|
|
59165
59318
|
}),
|
|
59166
|
-
stop: method(zod.z.object({ deviceId: DeviceIdSchema$
|
|
59319
|
+
stop: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), zod.z.void(), {
|
|
59167
59320
|
kind: "mutation",
|
|
59168
59321
|
auth: "protected"
|
|
59169
59322
|
}),
|
|
59170
59323
|
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
59171
59324
|
setProgram: method(zod.z.object({
|
|
59172
|
-
deviceId: DeviceIdSchema$
|
|
59325
|
+
deviceId: DeviceIdSchema$2,
|
|
59173
59326
|
program: zod.z.string().min(1)
|
|
59174
59327
|
}), zod.z.void(), {
|
|
59175
59328
|
kind: "mutation",
|
|
59176
59329
|
auth: "protected"
|
|
59177
59330
|
}),
|
|
59178
59331
|
setPower: method(zod.z.object({
|
|
59179
|
-
deviceId: DeviceIdSchema$
|
|
59332
|
+
deviceId: DeviceIdSchema$2,
|
|
59180
59333
|
on: zod.z.boolean()
|
|
59181
59334
|
}), zod.z.void(), {
|
|
59182
59335
|
kind: "mutation",
|
|
59183
59336
|
auth: "protected"
|
|
59184
59337
|
}),
|
|
59185
59338
|
setHalfLoad: method(zod.z.object({
|
|
59186
|
-
deviceId: DeviceIdSchema$
|
|
59339
|
+
deviceId: DeviceIdSchema$2,
|
|
59187
59340
|
on: zod.z.boolean()
|
|
59188
59341
|
}), zod.z.void(), {
|
|
59189
59342
|
kind: "mutation",
|
|
59190
59343
|
auth: "protected"
|
|
59191
59344
|
}),
|
|
59192
59345
|
setHygienePlus: method(zod.z.object({
|
|
59193
|
-
deviceId: DeviceIdSchema$
|
|
59346
|
+
deviceId: DeviceIdSchema$2,
|
|
59194
59347
|
on: zod.z.boolean()
|
|
59195
59348
|
}), zod.z.void(), {
|
|
59196
59349
|
kind: "mutation",
|
|
59197
59350
|
auth: "protected"
|
|
59198
59351
|
}),
|
|
59199
59352
|
setExtraDry: method(zod.z.object({
|
|
59200
|
-
deviceId: DeviceIdSchema$
|
|
59353
|
+
deviceId: DeviceIdSchema$2,
|
|
59201
59354
|
on: zod.z.boolean()
|
|
59202
59355
|
}), zod.z.void(), {
|
|
59203
59356
|
kind: "mutation",
|
|
59204
59357
|
auth: "protected"
|
|
59205
59358
|
}),
|
|
59206
59359
|
setIntensiveZone: method(zod.z.object({
|
|
59207
|
-
deviceId: DeviceIdSchema$
|
|
59360
|
+
deviceId: DeviceIdSchema$2,
|
|
59208
59361
|
on: zod.z.boolean()
|
|
59209
59362
|
}), zod.z.void(), {
|
|
59210
59363
|
kind: "mutation",
|
|
59211
59364
|
auth: "protected"
|
|
59212
59365
|
}),
|
|
59213
59366
|
setVarioSpeedPlus: method(zod.z.object({
|
|
59214
|
-
deviceId: DeviceIdSchema$
|
|
59367
|
+
deviceId: DeviceIdSchema$2,
|
|
59215
59368
|
on: zod.z.boolean()
|
|
59216
59369
|
}), zod.z.void(), {
|
|
59217
59370
|
kind: "mutation",
|
|
59218
59371
|
auth: "protected"
|
|
59219
59372
|
}),
|
|
59220
59373
|
setChildLock: method(zod.z.object({
|
|
59221
|
-
deviceId: DeviceIdSchema$
|
|
59374
|
+
deviceId: DeviceIdSchema$2,
|
|
59222
59375
|
on: zod.z.boolean()
|
|
59223
59376
|
}), zod.z.void(), {
|
|
59224
59377
|
kind: "mutation",
|
|
@@ -59230,7 +59383,7 @@ var dishwasherCapability = {
|
|
|
59230
59383
|
* its declared range / members.
|
|
59231
59384
|
*/
|
|
59232
59385
|
setOption: method(zod.z.object({
|
|
59233
|
-
deviceId: DeviceIdSchema$
|
|
59386
|
+
deviceId: DeviceIdSchema$2,
|
|
59234
59387
|
key: zod.z.string().min(1),
|
|
59235
59388
|
value: DishwasherValueSchema
|
|
59236
59389
|
}), zod.z.void(), {
|
|
@@ -59238,7 +59391,7 @@ var dishwasherCapability = {
|
|
|
59238
59391
|
auth: "protected"
|
|
59239
59392
|
}),
|
|
59240
59393
|
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
59241
|
-
getOptions: method(zod.z.object({ deviceId: DeviceIdSchema$
|
|
59394
|
+
getOptions: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), DishwasherOptionsSchema, { auth: "protected" })
|
|
59242
59395
|
},
|
|
59243
59396
|
status: {
|
|
59244
59397
|
schema: DishwasherStatusSchema,
|
|
@@ -61788,6 +61941,11 @@ var IntegrationInstanceSchema = zod.z.object({
|
|
|
61788
61941
|
name: zod.z.string(),
|
|
61789
61942
|
/** The addon's own rule (an URL is present, a client id is present...). */
|
|
61790
61943
|
configured: zod.z.boolean(),
|
|
61944
|
+
/**
|
|
61945
|
+
* The instance's own on/off switch (D996): always present, derived from the record body
|
|
61946
|
+
* (`enabled !== false`, so a row written before the field existed is on).
|
|
61947
|
+
*/
|
|
61948
|
+
enabled: zod.z.boolean(),
|
|
61791
61949
|
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
61792
61950
|
formValues: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
61793
61951
|
status: IntegrationInstanceStatusSchema.optional()
|
|
@@ -61820,6 +61978,17 @@ var integrationInstancesCapability = {
|
|
|
61820
61978
|
kind: "mutation",
|
|
61821
61979
|
auth: "admin"
|
|
61822
61980
|
}),
|
|
61981
|
+
/**
|
|
61982
|
+
* Switch ONE instance on or off. A row control, not a form field: `updateInstance.values` is the
|
|
61983
|
+
* form patch (D62, D996). An off instance keeps its record and secrets and does no work.
|
|
61984
|
+
*/
|
|
61985
|
+
setInstanceEnabled: method(zod.z.object({
|
|
61986
|
+
id: IntegrationInstanceIdSchema,
|
|
61987
|
+
enabled: zod.z.boolean()
|
|
61988
|
+
}), zod.z.object({ ok: zod.z.literal(true) }), {
|
|
61989
|
+
kind: "mutation",
|
|
61990
|
+
auth: "admin"
|
|
61991
|
+
}),
|
|
61823
61992
|
/** Delete the record and its keychain refs together. */
|
|
61824
61993
|
deleteInstance: method(zod.z.object({ id: IntegrationInstanceIdSchema }), zod.z.object({ ok: zod.z.literal(true) }), {
|
|
61825
61994
|
kind: "mutation",
|
|
@@ -77544,7 +77713,7 @@ var petFeederCapability = {
|
|
|
77544
77713
|
/**
|
|
77545
77714
|
* Pet water-fountain cap. Models the telemetry and the control surface of a
|
|
77546
77715
|
* circulating drinking fountain: how much water is in the tank, how much the
|
|
77547
|
-
* pet drank, whether the pump runs
|
|
77716
|
+
* pet drank, whether the pump runs.
|
|
77548
77717
|
*
|
|
77549
77718
|
* It has no native vendor provider of its own: a fountain reaches CamStack as
|
|
77550
77719
|
* a container of loose entities (a pump switch, two number boxes, a "filter
|
|
@@ -77560,8 +77729,10 @@ var petFeederCapability = {
|
|
|
77560
77729
|
* never here. Every reading may be `null`: a source that is offline or does
|
|
77561
77730
|
* not report is unknown, never zero.
|
|
77562
77731
|
*
|
|
77563
|
-
* The
|
|
77564
|
-
* cap
|
|
77732
|
+
* The pump's on/off duty cycle is model-specific and lives in the optional
|
|
77733
|
+
* `pump-cycle` cap. The filter, the cleaning and the water change are not
|
|
77734
|
+
* fields of this cap: they are items of the `consumables` cap on the same
|
|
77735
|
+
* device (kind `wear`), reset by the same forward mechanism.
|
|
77565
77736
|
*/
|
|
77566
77737
|
var PetFountainStatusSchema = zod.z.object({
|
|
77567
77738
|
/** Water in the tank, 0..100 (%). Null while the source has not reported. */
|
|
@@ -77572,27 +77743,20 @@ var PetFountainStatusSchema = zod.z.object({
|
|
|
77572
77743
|
empty: zod.z.boolean().nullable(),
|
|
77573
77744
|
/** True while the pump is running. Null while unknown. */
|
|
77574
77745
|
pumpRunning: zod.z.boolean().nullable(),
|
|
77575
|
-
/** True when the pump works on an on/off duty cycle rather than continuously. */
|
|
77576
|
-
pumpIntervalEnabled: zod.z.boolean().nullable(),
|
|
77577
|
-
/** How long the pump runs per cycle, in seconds. */
|
|
77578
|
-
pumpOnTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
|
|
77579
|
-
/** How long the pump rests per cycle, in seconds. */
|
|
77580
|
-
pumpOffTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
|
|
77581
77746
|
/** Water drunk in the last drink, in litres. */
|
|
77582
77747
|
lastDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
|
|
77583
77748
|
/** Water drunk in the current hour, in litres. */
|
|
77584
77749
|
currentHourDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
|
|
77585
77750
|
/** Water drunk over the last 24 hours (rolling), in litres. */
|
|
77586
77751
|
last24hDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
|
|
77587
|
-
/** Water drunk since local midnight, in litres. */
|
|
77752
|
+
/** Water drunk since local midnight, in litres. Null when the fountain has no such sensor. */
|
|
77588
77753
|
todayDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
|
|
77589
77754
|
/** Decoded fault message. Null means healthy; a non-null string is an active fault. */
|
|
77590
77755
|
error: zod.z.string().nullable(),
|
|
77591
77756
|
/** Ms epoch when the slice was last refreshed. */
|
|
77592
77757
|
lastFetchedAt: zod.z.number()
|
|
77593
77758
|
});
|
|
77594
|
-
var DeviceIdSchema = zod.z.number().int().nonnegative();
|
|
77595
|
-
var MinutesSchema = zod.z.number().int().min(0);
|
|
77759
|
+
var DeviceIdSchema$1 = zod.z.number().int().nonnegative();
|
|
77596
77760
|
var petFountainCapability = {
|
|
77597
77761
|
name: "pet-fountain",
|
|
77598
77762
|
scope: "device",
|
|
@@ -77602,38 +77766,14 @@ var petFountainCapability = {
|
|
|
77602
77766
|
methods: {
|
|
77603
77767
|
/** Start or stop the pump. */
|
|
77604
77768
|
setPump: method(zod.z.object({
|
|
77605
|
-
deviceId: DeviceIdSchema,
|
|
77606
|
-
on: zod.z.boolean()
|
|
77607
|
-
}), zod.z.void(), {
|
|
77608
|
-
kind: "mutation",
|
|
77609
|
-
auth: "protected"
|
|
77610
|
-
}),
|
|
77611
|
-
/** Switch the on/off duty cycle on or off (off = the pump runs continuously). */
|
|
77612
|
-
setPumpInterval: method(zod.z.object({
|
|
77613
|
-
deviceId: DeviceIdSchema,
|
|
77769
|
+
deviceId: DeviceIdSchema$1,
|
|
77614
77770
|
on: zod.z.boolean()
|
|
77615
77771
|
}), zod.z.void(), {
|
|
77616
77772
|
kind: "mutation",
|
|
77617
77773
|
auth: "protected"
|
|
77618
77774
|
}),
|
|
77619
|
-
/** Set how many minutes the pump runs per cycle. */
|
|
77620
|
-
setPumpOnMinutes: method(zod.z.object({
|
|
77621
|
-
deviceId: DeviceIdSchema,
|
|
77622
|
-
minutes: MinutesSchema
|
|
77623
|
-
}), zod.z.void(), {
|
|
77624
|
-
kind: "mutation",
|
|
77625
|
-
auth: "protected"
|
|
77626
|
-
}),
|
|
77627
|
-
/** Set how many minutes the pump rests per cycle. */
|
|
77628
|
-
setPumpOffMinutes: method(zod.z.object({
|
|
77629
|
-
deviceId: DeviceIdSchema,
|
|
77630
|
-
minutes: MinutesSchema
|
|
77631
|
-
}), zod.z.void(), {
|
|
77632
|
-
kind: "mutation",
|
|
77633
|
-
auth: "protected"
|
|
77634
|
-
}),
|
|
77635
77775
|
/** Clear the rolling daily consumption counters on the device. */
|
|
77636
|
-
resetDailyConsumption: method(zod.z.object({ deviceId: DeviceIdSchema }), zod.z.void(), {
|
|
77776
|
+
resetDailyConsumption: method(zod.z.object({ deviceId: DeviceIdSchema$1 }), zod.z.void(), {
|
|
77637
77777
|
kind: "mutation",
|
|
77638
77778
|
auth: "protected"
|
|
77639
77779
|
})
|
|
@@ -80633,6 +80773,79 @@ var ptzAutotrackCapability = {
|
|
|
80633
80773
|
history: "none"
|
|
80634
80774
|
};
|
|
80635
80775
|
/**
|
|
80776
|
+
* The on/off duty cycle of a pet fountain's pump. Some models run the pump
|
|
80777
|
+
* continuously and have nothing to configure; others can alternate a run time
|
|
80778
|
+
* and a rest time. That is model-specific, so it is its own optional cap on the
|
|
80779
|
+
* fountain device: a fountain without cycle entities simply never composes it
|
|
80780
|
+
* (planning#366), and the `pet-fountain` cap stays the model-independent core.
|
|
80781
|
+
*
|
|
80782
|
+
* Like `pet-fountain` it has no native vendor provider: an operator BUILDS the
|
|
80783
|
+
* cycle from loose entities (a cycle switch and two number boxes) and every
|
|
80784
|
+
* method is a forward to one source entity (D659, D967). Durations are stored
|
|
80785
|
+
* in SECONDS (D944); a number box that cannot be read back leaves them `null`
|
|
80786
|
+
* — unknown, never zero (D393).
|
|
80787
|
+
*/
|
|
80788
|
+
var PumpCycleStatusSchema = zod.z.object({
|
|
80789
|
+
/** True when the pump works on the on/off cycle, false when it runs continuously. Null while unknown. */
|
|
80790
|
+
enabled: zod.z.boolean().nullable(),
|
|
80791
|
+
/** How long the pump runs per cycle, in seconds. Null while unknown. */
|
|
80792
|
+
onTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
|
|
80793
|
+
/** How long the pump rests per cycle, in seconds. Null while unknown. */
|
|
80794
|
+
offTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
|
|
80795
|
+
/** Ms epoch when the slice was last refreshed. */
|
|
80796
|
+
lastFetchedAt: zod.z.number()
|
|
80797
|
+
});
|
|
80798
|
+
var DeviceIdSchema = zod.z.number().int().nonnegative();
|
|
80799
|
+
var MinutesSchema = zod.z.number().int().min(0);
|
|
80800
|
+
var pumpCycleCapability = {
|
|
80801
|
+
name: "pump-cycle",
|
|
80802
|
+
scope: "device",
|
|
80803
|
+
deviceNative: true,
|
|
80804
|
+
mode: "singleton",
|
|
80805
|
+
deviceTypes: [DeviceType.PetFountain],
|
|
80806
|
+
methods: {
|
|
80807
|
+
/** Switch the on/off duty cycle on or off (off = the pump runs continuously). */
|
|
80808
|
+
setEnabled: method(zod.z.object({
|
|
80809
|
+
deviceId: DeviceIdSchema,
|
|
80810
|
+
on: zod.z.boolean()
|
|
80811
|
+
}), zod.z.void(), {
|
|
80812
|
+
kind: "mutation",
|
|
80813
|
+
auth: "protected"
|
|
80814
|
+
}),
|
|
80815
|
+
/** Set how many minutes the pump runs per cycle. */
|
|
80816
|
+
setOnMinutes: method(zod.z.object({
|
|
80817
|
+
deviceId: DeviceIdSchema,
|
|
80818
|
+
minutes: MinutesSchema
|
|
80819
|
+
}), zod.z.void(), {
|
|
80820
|
+
kind: "mutation",
|
|
80821
|
+
auth: "protected"
|
|
80822
|
+
}),
|
|
80823
|
+
/** Set how many minutes the pump rests per cycle. */
|
|
80824
|
+
setOffMinutes: method(zod.z.object({
|
|
80825
|
+
deviceId: DeviceIdSchema,
|
|
80826
|
+
minutes: MinutesSchema
|
|
80827
|
+
}), zod.z.void(), {
|
|
80828
|
+
kind: "mutation",
|
|
80829
|
+
auth: "protected"
|
|
80830
|
+
})
|
|
80831
|
+
},
|
|
80832
|
+
status: {
|
|
80833
|
+
schema: PumpCycleStatusSchema,
|
|
80834
|
+
kind: "push"
|
|
80835
|
+
},
|
|
80836
|
+
/** Runtime-state slice — mirrored by the kernel; the hero card reads it whole. */
|
|
80837
|
+
runtimeState: PumpCycleStatusSchema,
|
|
80838
|
+
/**
|
|
80839
|
+
* Runtime-state durability: **session** — live appliance state re-published on connect.
|
|
80840
|
+
*
|
|
80841
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
80842
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
80843
|
+
*/
|
|
80844
|
+
durability: "session",
|
|
80845
|
+
/** History (D850): a duty-cycle setting is not a series worth recording. */
|
|
80846
|
+
history: "none"
|
|
80847
|
+
};
|
|
80848
|
+
/**
|
|
80636
80849
|
* reboot — device-scoped capability for "soft" device reboots (firmware
|
|
80637
80850
|
* reboot via vendor protocol; cameras, NVRs, doorbells). Surfaces a
|
|
80638
80851
|
* single mutation so the UI can offer a confirm-and-reboot button for
|
|
@@ -91111,6 +91324,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
91111
91324
|
backupCapability,
|
|
91112
91325
|
batteryCapability,
|
|
91113
91326
|
binaryCapability,
|
|
91327
|
+
boardKeySourceCapability,
|
|
91114
91328
|
brightnessCapability,
|
|
91115
91329
|
brokerCapability,
|
|
91116
91330
|
buttonCapability,
|
|
@@ -91232,6 +91446,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
91232
91446
|
privacyMaskCapability,
|
|
91233
91447
|
ptzCapability,
|
|
91234
91448
|
ptzAutotrackCapability,
|
|
91449
|
+
pumpCycleCapability,
|
|
91235
91450
|
rebootCapability,
|
|
91236
91451
|
recordEntriesCapability,
|
|
91237
91452
|
recordingCapability,
|
|
@@ -92969,6 +93184,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
92969
93184
|
pressureSensor: pressureSensorCapability,
|
|
92970
93185
|
privacyMask: privacyMaskCapability,
|
|
92971
93186
|
ptzAutotrack: ptzAutotrackCapability,
|
|
93187
|
+
pumpCycle: pumpCycleCapability,
|
|
92972
93188
|
recordingOnboard: recordingOnboardCapability,
|
|
92973
93189
|
recordingSignal: recordingSignalCapability,
|
|
92974
93190
|
runningState: runningStateCapability,
|
|
@@ -94939,6 +95155,27 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
94939
95155
|
access: "view",
|
|
94940
95156
|
role: "viewer"
|
|
94941
95157
|
},
|
|
95158
|
+
"boardKeySource.getBoardKey": {
|
|
95159
|
+
capName: "board-key-source",
|
|
95160
|
+
capScope: "system",
|
|
95161
|
+
addonId: null,
|
|
95162
|
+
access: "view",
|
|
95163
|
+
role: "admin"
|
|
95164
|
+
},
|
|
95165
|
+
"boardKeySource.listBoards": {
|
|
95166
|
+
capName: "board-key-source",
|
|
95167
|
+
capScope: "system",
|
|
95168
|
+
addonId: null,
|
|
95169
|
+
access: "view",
|
|
95170
|
+
role: "admin"
|
|
95171
|
+
},
|
|
95172
|
+
"boardKeySource.listSources": {
|
|
95173
|
+
capName: "board-key-source",
|
|
95174
|
+
capScope: "system",
|
|
95175
|
+
addonId: null,
|
|
95176
|
+
access: "view",
|
|
95177
|
+
role: "admin"
|
|
95178
|
+
},
|
|
94942
95179
|
"brightness.getStatus": {
|
|
94943
95180
|
capName: "brightness",
|
|
94944
95181
|
capScope: "device",
|
|
@@ -97620,6 +97857,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
97620
97857
|
access: "view",
|
|
97621
97858
|
role: "admin"
|
|
97622
97859
|
},
|
|
97860
|
+
"integrationInstances.setInstanceEnabled": {
|
|
97861
|
+
capName: "integration-instances",
|
|
97862
|
+
capScope: "system",
|
|
97863
|
+
addonId: null,
|
|
97864
|
+
access: "create",
|
|
97865
|
+
role: "admin"
|
|
97866
|
+
},
|
|
97623
97867
|
"integrationInstances.testInstance": {
|
|
97624
97868
|
capName: "integration-instances",
|
|
97625
97869
|
capScope: "system",
|
|
@@ -99755,27 +99999,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
99755
99999
|
access: "create",
|
|
99756
100000
|
role: "viewer"
|
|
99757
100001
|
},
|
|
99758
|
-
"petFountain.setPumpInterval": {
|
|
99759
|
-
capName: "pet-fountain",
|
|
99760
|
-
capScope: "device",
|
|
99761
|
-
addonId: null,
|
|
99762
|
-
access: "create",
|
|
99763
|
-
role: "viewer"
|
|
99764
|
-
},
|
|
99765
|
-
"petFountain.setPumpOffMinutes": {
|
|
99766
|
-
capName: "pet-fountain",
|
|
99767
|
-
capScope: "device",
|
|
99768
|
-
addonId: null,
|
|
99769
|
-
access: "create",
|
|
99770
|
-
role: "viewer"
|
|
99771
|
-
},
|
|
99772
|
-
"petFountain.setPumpOnMinutes": {
|
|
99773
|
-
capName: "pet-fountain",
|
|
99774
|
-
capScope: "device",
|
|
99775
|
-
addonId: null,
|
|
99776
|
-
access: "create",
|
|
99777
|
-
role: "viewer"
|
|
99778
|
-
},
|
|
99779
100002
|
"pipelineAnalytics.addRetrainFrameFromRecording": {
|
|
99780
100003
|
capName: "pipeline-analytics",
|
|
99781
100004
|
capScope: "device",
|
|
@@ -101554,6 +101777,34 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
101554
101777
|
access: "create",
|
|
101555
101778
|
role: "admin"
|
|
101556
101779
|
},
|
|
101780
|
+
"pumpCycle.getStatus": {
|
|
101781
|
+
capName: "pump-cycle",
|
|
101782
|
+
capScope: "device",
|
|
101783
|
+
addonId: null,
|
|
101784
|
+
access: "view",
|
|
101785
|
+
role: "viewer"
|
|
101786
|
+
},
|
|
101787
|
+
"pumpCycle.setEnabled": {
|
|
101788
|
+
capName: "pump-cycle",
|
|
101789
|
+
capScope: "device",
|
|
101790
|
+
addonId: null,
|
|
101791
|
+
access: "create",
|
|
101792
|
+
role: "viewer"
|
|
101793
|
+
},
|
|
101794
|
+
"pumpCycle.setOffMinutes": {
|
|
101795
|
+
capName: "pump-cycle",
|
|
101796
|
+
capScope: "device",
|
|
101797
|
+
addonId: null,
|
|
101798
|
+
access: "create",
|
|
101799
|
+
role: "viewer"
|
|
101800
|
+
},
|
|
101801
|
+
"pumpCycle.setOnMinutes": {
|
|
101802
|
+
capName: "pump-cycle",
|
|
101803
|
+
capScope: "device",
|
|
101804
|
+
addonId: null,
|
|
101805
|
+
access: "create",
|
|
101806
|
+
role: "viewer"
|
|
101807
|
+
},
|
|
101557
101808
|
"reboot.reboot": {
|
|
101558
101809
|
capName: "reboot",
|
|
101559
101810
|
capScope: "device",
|
|
@@ -104597,6 +104848,7 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
104597
104848
|
"privacy-mask",
|
|
104598
104849
|
"ptz",
|
|
104599
104850
|
"ptz-autotrack",
|
|
104851
|
+
"pump-cycle",
|
|
104600
104852
|
"recording-archive",
|
|
104601
104853
|
"recording-onboard",
|
|
104602
104854
|
"recording-signal",
|
|
@@ -106187,21 +106439,6 @@ Object.freeze({
|
|
|
106187
106439
|
form: "single",
|
|
106188
106440
|
optional: false
|
|
106189
106441
|
}],
|
|
106190
|
-
"petFountain.setPumpInterval": [{
|
|
106191
|
-
name: "deviceId",
|
|
106192
|
-
form: "single",
|
|
106193
|
-
optional: false
|
|
106194
|
-
}],
|
|
106195
|
-
"petFountain.setPumpOffMinutes": [{
|
|
106196
|
-
name: "deviceId",
|
|
106197
|
-
form: "single",
|
|
106198
|
-
optional: false
|
|
106199
|
-
}],
|
|
106200
|
-
"petFountain.setPumpOnMinutes": [{
|
|
106201
|
-
name: "deviceId",
|
|
106202
|
-
form: "single",
|
|
106203
|
-
optional: false
|
|
106204
|
-
}],
|
|
106205
106442
|
"pipelineAnalytics.addRetrainFrameFromRecording": [{
|
|
106206
106443
|
name: "deviceId",
|
|
106207
106444
|
form: "single",
|
|
@@ -106837,6 +107074,26 @@ Object.freeze({
|
|
|
106837
107074
|
form: "single",
|
|
106838
107075
|
optional: false
|
|
106839
107076
|
}],
|
|
107077
|
+
"pumpCycle.getStatus": [{
|
|
107078
|
+
name: "deviceId",
|
|
107079
|
+
form: "single",
|
|
107080
|
+
optional: false
|
|
107081
|
+
}],
|
|
107082
|
+
"pumpCycle.setEnabled": [{
|
|
107083
|
+
name: "deviceId",
|
|
107084
|
+
form: "single",
|
|
107085
|
+
optional: false
|
|
107086
|
+
}],
|
|
107087
|
+
"pumpCycle.setOffMinutes": [{
|
|
107088
|
+
name: "deviceId",
|
|
107089
|
+
form: "single",
|
|
107090
|
+
optional: false
|
|
107091
|
+
}],
|
|
107092
|
+
"pumpCycle.setOnMinutes": [{
|
|
107093
|
+
name: "deviceId",
|
|
107094
|
+
form: "single",
|
|
107095
|
+
optional: false
|
|
107096
|
+
}],
|
|
106840
107097
|
"reboot.reboot": [{
|
|
106841
107098
|
name: "deviceId",
|
|
106842
107099
|
form: "single",
|
|
@@ -107587,7 +107844,7 @@ Object.freeze({
|
|
|
107587
107844
|
});
|
|
107588
107845
|
/**
|
|
107589
107846
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
107590
|
-
* `runtimeState`.
|
|
107847
|
+
* `runtimeState`. 81 caps: 39 `restored`, 42 `session`.
|
|
107591
107848
|
*
|
|
107592
107849
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
107593
107850
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -107825,6 +108082,10 @@ var RUNTIME_STATE_POLICY = {
|
|
|
107825
108082
|
durability: "session",
|
|
107826
108083
|
volatileFields: []
|
|
107827
108084
|
},
|
|
108085
|
+
"pump-cycle": {
|
|
108086
|
+
durability: "session",
|
|
108087
|
+
volatileFields: []
|
|
108088
|
+
},
|
|
107828
108089
|
"recording-onboard": {
|
|
107829
108090
|
durability: "restored",
|
|
107830
108091
|
volatileFields: ["lastFetchedAt"]
|
|
@@ -109439,6 +109700,10 @@ var ADDON_ID_PREFIX = "addon:";
|
|
|
109439
109700
|
function bareAddonId(id) {
|
|
109440
109701
|
return id.startsWith(ADDON_ID_PREFIX) ? id.slice(6) : id;
|
|
109441
109702
|
}
|
|
109703
|
+
/** True when both ids name the same addon, prefixed or not. */
|
|
109704
|
+
function isSameAddonId(a, b) {
|
|
109705
|
+
return bareAddonId(a) === bareAddonId(b);
|
|
109706
|
+
}
|
|
109442
109707
|
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
109443
109708
|
var MB = 1024 * 1024;
|
|
109444
109709
|
1024 * MB, 3072 * MB;
|
|
@@ -111547,6 +111812,12 @@ Object.defineProperty(exports, "isReadingQuantity", {
|
|
|
111547
111812
|
return isReadingQuantity;
|
|
111548
111813
|
}
|
|
111549
111814
|
});
|
|
111815
|
+
Object.defineProperty(exports, "isSameAddonId", {
|
|
111816
|
+
enumerable: true,
|
|
111817
|
+
get: function() {
|
|
111818
|
+
return isSameAddonId;
|
|
111819
|
+
}
|
|
111820
|
+
});
|
|
111550
111821
|
Object.defineProperty(exports, "isSecretClear", {
|
|
111551
111822
|
enumerable: true,
|
|
111552
111823
|
get: function() {
|