@camstack/types 1.2.249 → 1.2.251
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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/notification-output.cap.d.ts +2 -0
- package/dist/capabilities/settings-store.cap.d.ts +10 -0
- package/dist/index.js +171 -52
- package/dist/index.mjs +171 -52
- package/dist/{sleep-CvwUEq16.js → sleep-BAgDk7I9.js} +8 -2
- package/dist/{sleep-pM_J7YnY.mjs → sleep-D_4W7xuQ.mjs} +8 -2
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BAgDk7I9.js");
|
|
3
3
|
const require_event_category = require("./event-category-BVfsrBYA.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DeviceType, At as DATAPLANE_SECRET_HEADER, Dt as PEER_BYTES_STALL_MS, Et as PEER_BYTES_MAX_OUTSTANDING, G as readNodePin, J as ReadinessTimeoutError, L as expandCapMethods, Lt as emitReadiness, Mt as DisposerChain, Nt as BaseAddon, Ot as PEER_BYTES_TICKET_TTL_MS, Pt as normalizeAddonInitResult, S as DEVICE_CHILDREN_BATCH_MAX, T as describeCustomActions, Tt as PEER_BYTES_CHUNK_BYTES, W as nodePin, Z as scopeKey, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, h as createEventBusSliceSource, j as adminUiCapability, m as createDeviceProxy, p as isDeviceScopedCap, q as ReadinessRegistry, s as asString, t as sleep, u as parseJsonUnknown, x as viewerUiCapability } from "./sleep-
|
|
1
|
+
import { A as DeviceType, At as DATAPLANE_SECRET_HEADER, Dt as PEER_BYTES_STALL_MS, Et as PEER_BYTES_MAX_OUTSTANDING, G as readNodePin, J as ReadinessTimeoutError, L as expandCapMethods, Lt as emitReadiness, Mt as DisposerChain, Nt as BaseAddon, Ot as PEER_BYTES_TICKET_TTL_MS, Pt as normalizeAddonInitResult, S as DEVICE_CHILDREN_BATCH_MAX, T as describeCustomActions, Tt as PEER_BYTES_CHUNK_BYTES, W as nodePin, Z as scopeKey, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, h as createEventBusSliceSource, j as adminUiCapability, m as createDeviceProxy, p as isDeviceScopedCap, q as ReadinessRegistry, s as asString, t as sleep, u as parseJsonUnknown, x as viewerUiCapability } from "./sleep-D_4W7xuQ.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-BVDXG4tB.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
@@ -308,6 +308,7 @@ export declare const TargetKindSchema: z.ZodObject<{
|
|
|
308
308
|
iconUrl: z.ZodOptional<z.ZodString>;
|
|
309
309
|
iconMediaType: z.ZodOptional<z.ZodString>;
|
|
310
310
|
configSchema: z.ZodUnknown;
|
|
311
|
+
destinationKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
311
312
|
supportsDiscovery: z.ZodBoolean;
|
|
312
313
|
caps: z.ZodObject<{
|
|
313
314
|
attachments: z.ZodObject<{
|
|
@@ -438,6 +439,7 @@ export declare const notificationOutputCapability: {
|
|
|
438
439
|
iconUrl: z.ZodOptional<z.ZodString>;
|
|
439
440
|
iconMediaType: z.ZodOptional<z.ZodString>;
|
|
440
441
|
configSchema: z.ZodUnknown;
|
|
442
|
+
destinationKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
441
443
|
supportsDiscovery: z.ZodBoolean;
|
|
442
444
|
caps: z.ZodObject<{
|
|
443
445
|
attachments: z.ZodObject<{
|
|
@@ -127,6 +127,16 @@ declare const CollectionIndexSchema: z.ZodObject<{
|
|
|
127
127
|
* namespace, or none. Making the door enforce it is tracked separately —
|
|
128
128
|
* it renames tables, so it needs a migration.
|
|
129
129
|
*
|
|
130
|
+
* **So every method is `auth: 'admin'` (D634).** Because nothing scopes a
|
|
131
|
+
* call to its caller, a `protected` method here was a raw, unredacted read
|
|
132
|
+
* (and write) of every addon's collections for any role holding
|
|
133
|
+
* `category:system` — which is every role: a `viewer` could read every
|
|
134
|
+
* notifier token in plaintext from `notifiers:notification-targets`. No
|
|
135
|
+
* browser or app client calls this cap. Addons are not affected: an
|
|
136
|
+
* addon's `ctx.api` cap call is resolved to the provider directly and never
|
|
137
|
+
* enters the tRPC router (so the tier gates sessions and tokens, never
|
|
138
|
+
* addons), and the hub itself calls it through the capability registry.
|
|
139
|
+
*
|
|
130
140
|
* - `{ collection: 'addon-settings' }` → table `addon-settings`
|
|
131
141
|
* - `{ namespace: 'my-addon', collection: 'addon-settings' }` →
|
|
132
142
|
* table `my-addon:addon-settings`
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BAgDk7I9.js");
|
|
3
3
|
const require_event_category = require("./event-category-BVfsrBYA.js");
|
|
4
4
|
const require_canonical_hash = require("./canonical-hash-CSE4ioRi.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
@@ -8442,7 +8442,7 @@ var brokerCapability = {
|
|
|
8442
8442
|
}),
|
|
8443
8443
|
/** Read the broker's cached state for a key. Returns `null` when
|
|
8444
8444
|
* unknown to the broker (never published / unknown entity). */
|
|
8445
|
-
getState: require_sleep.method(GetStateInputSchema, zod.z.unknown().nullable()),
|
|
8445
|
+
getState: require_sleep.method(GetStateInputSchema, zod.z.unknown().nullable(), { auth: "admin" }),
|
|
8446
8446
|
/** Status method — explicit registration with a `z.void()` input so
|
|
8447
8447
|
* the codegen-generated tRPC router types its input as
|
|
8448
8448
|
* `{addonId?: string, nodeId?: string}` (system-scoped collection
|
|
@@ -10288,6 +10288,16 @@ var CollectionIndexSchema = zod.z.object({
|
|
|
10288
10288
|
* namespace, or none. Making the door enforce it is tracked separately —
|
|
10289
10289
|
* it renames tables, so it needs a migration.
|
|
10290
10290
|
*
|
|
10291
|
+
* **So every method is `auth: 'admin'` (D634).** Because nothing scopes a
|
|
10292
|
+
* call to its caller, a `protected` method here was a raw, unredacted read
|
|
10293
|
+
* (and write) of every addon's collections for any role holding
|
|
10294
|
+
* `category:system` — which is every role: a `viewer` could read every
|
|
10295
|
+
* notifier token in plaintext from `notifiers:notification-targets`. No
|
|
10296
|
+
* browser or app client calls this cap. Addons are not affected: an
|
|
10297
|
+
* addon's `ctx.api` cap call is resolved to the provider directly and never
|
|
10298
|
+
* enters the tRPC router (so the tier gates sessions and tokens, never
|
|
10299
|
+
* addons), and the hub itself calls it through the capability registry.
|
|
10300
|
+
*
|
|
10291
10301
|
* - `{ collection: 'addon-settings' }` → table `addon-settings`
|
|
10292
10302
|
* - `{ namespace: 'my-addon', collection: 'addon-settings' }` →
|
|
10293
10303
|
* table `my-addon:addon-settings`
|
|
@@ -10309,14 +10319,17 @@ var settingsStoreCapability = {
|
|
|
10309
10319
|
namespace: zod.z.string().optional(),
|
|
10310
10320
|
collection: zod.z.string(),
|
|
10311
10321
|
key: zod.z.string()
|
|
10312
|
-
}), zod.z.unknown()),
|
|
10322
|
+
}), zod.z.unknown(), { auth: "admin" }),
|
|
10313
10323
|
/** Set a value by key in a collection (upsert). */
|
|
10314
10324
|
set: require_sleep.method(zod.z.object({
|
|
10315
10325
|
namespace: zod.z.string().optional(),
|
|
10316
10326
|
collection: zod.z.string(),
|
|
10317
10327
|
key: zod.z.string(),
|
|
10318
10328
|
value: zod.z.unknown()
|
|
10319
|
-
}), zod.z.void(), {
|
|
10329
|
+
}), zod.z.void(), {
|
|
10330
|
+
kind: "mutation",
|
|
10331
|
+
auth: "admin"
|
|
10332
|
+
}),
|
|
10320
10333
|
/**
|
|
10321
10334
|
* Rows matching a filter.
|
|
10322
10335
|
*
|
|
@@ -10337,7 +10350,7 @@ var settingsStoreCapability = {
|
|
|
10337
10350
|
collection: zod.z.string(),
|
|
10338
10351
|
filter: QueryFilterSchema.optional(),
|
|
10339
10352
|
columns: zod.z.array(zod.z.string()).readonly().optional()
|
|
10340
|
-
}), zod.z.array(SettingsRecordSchema).readonly()),
|
|
10353
|
+
}), zod.z.array(SettingsRecordSchema).readonly(), { auth: "admin" }),
|
|
10341
10354
|
/**
|
|
10342
10355
|
* Make a SLOT hold this row — insert it, or update whatever already
|
|
10343
10356
|
* occupies the slot — and answer with the id the row HAS.
|
|
@@ -10390,7 +10403,10 @@ var settingsStoreCapability = {
|
|
|
10390
10403
|
}), zod.z.object({
|
|
10391
10404
|
/** The id the row HAS: assigned by SQLite on an insert, or the existing
|
|
10392
10405
|
* row's own id on an update. */
|
|
10393
|
-
id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
|
|
10406
|
+
id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
|
|
10407
|
+
kind: "mutation",
|
|
10408
|
+
auth: "admin"
|
|
10409
|
+
}),
|
|
10394
10410
|
/** Insert a new record. */
|
|
10395
10411
|
insert: require_sleep.method(zod.z.object({
|
|
10396
10412
|
namespace: zod.z.string().optional(),
|
|
@@ -10405,7 +10421,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
|
|
|
10405
10421
|
* for an absent one, or the ROWID SQLite assigned on an `INTEGER`
|
|
10406
10422
|
* primary key — which is the only place an auto key is knowable.
|
|
10407
10423
|
*/
|
|
10408
|
-
id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
|
|
10424
|
+
id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
|
|
10425
|
+
kind: "mutation",
|
|
10426
|
+
auth: "admin"
|
|
10427
|
+
}),
|
|
10409
10428
|
/**
|
|
10410
10429
|
* Insert MANY records in ONE transaction, returning how many landed.
|
|
10411
10430
|
*
|
|
@@ -10433,20 +10452,29 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
|
|
|
10433
10452
|
namespace: zod.z.string().optional(),
|
|
10434
10453
|
collection: zod.z.string(),
|
|
10435
10454
|
records: zod.z.array(BulkRecordSchema).readonly()
|
|
10436
|
-
}), zod.z.object({ inserted: zod.z.number().int() }), {
|
|
10455
|
+
}), zod.z.object({ inserted: zod.z.number().int() }), {
|
|
10456
|
+
kind: "mutation",
|
|
10457
|
+
auth: "admin"
|
|
10458
|
+
}),
|
|
10437
10459
|
/** Update an existing record by ID. */
|
|
10438
10460
|
update: require_sleep.method(zod.z.object({
|
|
10439
10461
|
namespace: zod.z.string().optional(),
|
|
10440
10462
|
collection: zod.z.string(),
|
|
10441
10463
|
id: zod.z.string(),
|
|
10442
10464
|
data: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
10443
|
-
}), zod.z.void(), {
|
|
10465
|
+
}), zod.z.void(), {
|
|
10466
|
+
kind: "mutation",
|
|
10467
|
+
auth: "admin"
|
|
10468
|
+
}),
|
|
10444
10469
|
/** Delete a record by key/ID. */
|
|
10445
10470
|
delete: require_sleep.method(zod.z.object({
|
|
10446
10471
|
namespace: zod.z.string().optional(),
|
|
10447
10472
|
collection: zod.z.string(),
|
|
10448
10473
|
key: zod.z.string()
|
|
10449
|
-
}), zod.z.void(), {
|
|
10474
|
+
}), zod.z.void(), {
|
|
10475
|
+
kind: "mutation",
|
|
10476
|
+
auth: "admin"
|
|
10477
|
+
}),
|
|
10450
10478
|
/**
|
|
10451
10479
|
* Delete every record matching `filter`, in ONE statement, returning how
|
|
10452
10480
|
* many rows went. This exists because its absence made every retention
|
|
@@ -10465,7 +10493,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
|
|
|
10465
10493
|
namespace: zod.z.string().optional(),
|
|
10466
10494
|
collection: zod.z.string(),
|
|
10467
10495
|
filter: MutationFilterSchema
|
|
10468
|
-
}), zod.z.object({ deleted: zod.z.number().int() }), {
|
|
10496
|
+
}), zod.z.object({ deleted: zod.z.number().int() }), {
|
|
10497
|
+
kind: "mutation",
|
|
10498
|
+
auth: "admin"
|
|
10499
|
+
}),
|
|
10469
10500
|
/**
|
|
10470
10501
|
* Apply `data` to every record matching `filter`, in one statement,
|
|
10471
10502
|
* returning how many rows changed. Same filter contract as
|
|
@@ -10476,13 +10507,16 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
|
|
|
10476
10507
|
collection: zod.z.string(),
|
|
10477
10508
|
filter: MutationFilterSchema,
|
|
10478
10509
|
data: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
10479
|
-
}), zod.z.object({ updated: zod.z.number().int() }), {
|
|
10510
|
+
}), zod.z.object({ updated: zod.z.number().int() }), {
|
|
10511
|
+
kind: "mutation",
|
|
10512
|
+
auth: "admin"
|
|
10513
|
+
}),
|
|
10480
10514
|
/** Count entries in a collection, optionally filtered. */
|
|
10481
10515
|
count: require_sleep.method(zod.z.object({
|
|
10482
10516
|
namespace: zod.z.string().optional(),
|
|
10483
10517
|
collection: zod.z.string(),
|
|
10484
10518
|
filter: QueryFilterSchema.optional()
|
|
10485
|
-
}), zod.z.number()),
|
|
10519
|
+
}), zod.z.number(), { auth: "admin" }),
|
|
10486
10520
|
/**
|
|
10487
10521
|
* `COUNT(*)` and one `SUM` / `MIN` / `MAX` per requested field, in ONE
|
|
10488
10522
|
* statement, over the rows `filter` selects.
|
|
@@ -10508,7 +10542,7 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
|
|
|
10508
10542
|
collection: zod.z.string(),
|
|
10509
10543
|
fields: zod.z.array(AggregateFieldSchema).readonly(),
|
|
10510
10544
|
filter: QueryFilterSchema.optional()
|
|
10511
|
-
}), AggregateResultSchema),
|
|
10545
|
+
}), AggregateResultSchema, { auth: "admin" }),
|
|
10512
10546
|
/** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
|
|
10513
10547
|
histogram: require_sleep.method(zod.z.object({
|
|
10514
10548
|
namespace: zod.z.string().optional(),
|
|
@@ -10520,12 +10554,12 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
|
|
|
10520
10554
|
}), zod.z.array(zod.z.object({
|
|
10521
10555
|
bucket: zod.z.number().int(),
|
|
10522
10556
|
count: zod.z.number().int()
|
|
10523
|
-
})).readonly()),
|
|
10557
|
+
})).readonly(), { auth: "admin" }),
|
|
10524
10558
|
/** Check if a collection is empty. */
|
|
10525
10559
|
isEmpty: require_sleep.method(zod.z.object({
|
|
10526
10560
|
namespace: zod.z.string().optional(),
|
|
10527
10561
|
collection: zod.z.string()
|
|
10528
|
-
}), zod.z.boolean()),
|
|
10562
|
+
}), zod.z.boolean(), { auth: "admin" }),
|
|
10529
10563
|
/**
|
|
10530
10564
|
* Declare a typed (SQL-backed) collection with explicit columns +
|
|
10531
10565
|
* indexes. Idempotent: re-declaring an existing collection with the
|
|
@@ -10546,7 +10580,10 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
|
|
|
10546
10580
|
collection: zod.z.string(),
|
|
10547
10581
|
columns: zod.z.array(CollectionColumnSchema).readonly(),
|
|
10548
10582
|
indexes: zod.z.array(CollectionIndexSchema).readonly().optional()
|
|
10549
|
-
}), zod.z.void(), {
|
|
10583
|
+
}), zod.z.void(), {
|
|
10584
|
+
kind: "mutation",
|
|
10585
|
+
auth: "admin"
|
|
10586
|
+
})
|
|
10550
10587
|
}
|
|
10551
10588
|
};
|
|
10552
10589
|
//#endregion
|
|
@@ -11800,8 +11837,14 @@ var deviceExportCapability = {
|
|
|
11800
11837
|
getStatus: require_sleep.method(zod.z.void(), DeviceExportStatusSchema),
|
|
11801
11838
|
listSupportedDeviceKinds: require_sleep.method(zod.z.void(), zod.z.array(DeviceKindSchema)),
|
|
11802
11839
|
listExposedDevices: require_sleep.method(zod.z.void(), zod.z.array(ExposedDeviceSchema)),
|
|
11803
|
-
exposeDevice: require_sleep.method(ExposeInputSchema, zod.z.void(), {
|
|
11804
|
-
|
|
11840
|
+
exposeDevice: require_sleep.method(ExposeInputSchema, zod.z.void(), {
|
|
11841
|
+
kind: "mutation",
|
|
11842
|
+
auth: "admin"
|
|
11843
|
+
}),
|
|
11844
|
+
unexposeDevice: require_sleep.method(UnexposeInputSchema, zod.z.void(), {
|
|
11845
|
+
kind: "mutation",
|
|
11846
|
+
auth: "admin"
|
|
11847
|
+
})
|
|
11805
11848
|
}
|
|
11806
11849
|
};
|
|
11807
11850
|
//#endregion
|
|
@@ -12559,11 +12602,14 @@ var deviceManagerCapability = {
|
|
|
12559
12602
|
/** Remove a device from the DB + in-memory registry. Called by DeviceManagerApi.remove(). */
|
|
12560
12603
|
removeDevice: require_sleep.method(DeviceRemovePayloadSchema, zod.z.void(), { kind: "mutation" }),
|
|
12561
12604
|
/** Persist device config blob. Called by DeviceConfig.set/setAll(). */
|
|
12562
|
-
persistConfig: require_sleep.method(DevicePersistConfigPayloadSchema, zod.z.void(), {
|
|
12605
|
+
persistConfig: require_sleep.method(DevicePersistConfigPayloadSchema, zod.z.void(), {
|
|
12606
|
+
kind: "mutation",
|
|
12607
|
+
auth: "admin"
|
|
12608
|
+
}),
|
|
12563
12609
|
/** Load persisted config for a device. Called at restore time. */
|
|
12564
|
-
loadConfig: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown())),
|
|
12610
|
+
loadConfig: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown()), { auth: "admin" }),
|
|
12565
12611
|
/** Load persisted runtime state. Called at device adopt time. */
|
|
12566
|
-
loadRuntimeState: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown())),
|
|
12612
|
+
loadRuntimeState: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.unknown()), { auth: "admin" }),
|
|
12567
12613
|
/** Load operator-organisational meta surface for a device. Called by
|
|
12568
12614
|
* the kernel proxy to populate `DeviceContext.deviceMeta` before
|
|
12569
12615
|
* the device class constructor runs. Returns `null` when the id
|
|
@@ -15382,12 +15428,27 @@ var mqttBrokerCapability = {
|
|
|
15382
15428
|
},
|
|
15383
15429
|
methods: {
|
|
15384
15430
|
listBrokers: require_sleep.method(zod.z.void(), zod.z.array(BrokerInfoSchema)),
|
|
15385
|
-
getBrokerConfig: require_sleep.method(IdInputSchema, BrokerConnectionDetailsSchema),
|
|
15386
|
-
addBroker: require_sleep.method(AddBrokerInputSchema, AddBrokerResultSchema, {
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15431
|
+
getBrokerConfig: require_sleep.method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }),
|
|
15432
|
+
addBroker: require_sleep.method(AddBrokerInputSchema, AddBrokerResultSchema, {
|
|
15433
|
+
kind: "mutation",
|
|
15434
|
+
auth: "admin"
|
|
15435
|
+
}),
|
|
15436
|
+
removeBroker: require_sleep.method(IdInputSchema, zod.z.void(), {
|
|
15437
|
+
kind: "mutation",
|
|
15438
|
+
auth: "admin"
|
|
15439
|
+
}),
|
|
15440
|
+
testConnection: require_sleep.method(IdInputSchema, TestResultSchema$1, {
|
|
15441
|
+
kind: "mutation",
|
|
15442
|
+
auth: "admin"
|
|
15443
|
+
}),
|
|
15444
|
+
startEmbeddedBroker: require_sleep.method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
|
|
15445
|
+
kind: "mutation",
|
|
15446
|
+
auth: "admin"
|
|
15447
|
+
}),
|
|
15448
|
+
stopEmbeddedBroker: require_sleep.method(IdInputSchema, zod.z.void(), {
|
|
15449
|
+
kind: "mutation",
|
|
15450
|
+
auth: "admin"
|
|
15451
|
+
}),
|
|
15391
15452
|
getStatus: require_sleep.method(zod.z.void(), StatusSchema)
|
|
15392
15453
|
}
|
|
15393
15454
|
};
|
|
@@ -15708,6 +15769,18 @@ var TargetKindSchema = zod.z.object({
|
|
|
15708
15769
|
*/
|
|
15709
15770
|
iconMediaType: zod.z.string().optional(),
|
|
15710
15771
|
configSchema: ConfigSchemaPassthrough,
|
|
15772
|
+
/**
|
|
15773
|
+
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
15774
|
+
* base URL, instance, chat, recipient). A save that changes any of them
|
|
15775
|
+
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
15776
|
+
* editor uses this to ask for the secret on exactly those edits instead of
|
|
15777
|
+
* on every edit.
|
|
15778
|
+
*
|
|
15779
|
+
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
15780
|
+
* kinds) and from a provider older than this field — an editor that finds
|
|
15781
|
+
* it absent must assume ANY edit may need the secret.
|
|
15782
|
+
*/
|
|
15783
|
+
destinationKeys: zod.z.array(zod.z.string()).optional(),
|
|
15711
15784
|
supportsDiscovery: zod.z.boolean(),
|
|
15712
15785
|
caps: TargetKindCapsSchema
|
|
15713
15786
|
});
|
|
@@ -15752,25 +15825,40 @@ var notificationOutputCapability = {
|
|
|
15752
15825
|
mode: "collection",
|
|
15753
15826
|
methods: {
|
|
15754
15827
|
listTargetKinds: require_sleep.method(zod.z.object({}), zod.z.array(TargetKindSchema)),
|
|
15755
|
-
listTargets: require_sleep.method(zod.z.object({}), zod.z.array(TargetSchema)),
|
|
15828
|
+
listTargets: require_sleep.method(zod.z.object({}), zod.z.array(TargetSchema), { auth: "admin" }),
|
|
15756
15829
|
discoverTargets: require_sleep.method(zod.z.object({
|
|
15757
15830
|
kind: zod.z.string(),
|
|
15758
15831
|
config: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
15759
|
-
}), zod.z.array(DiscoveredTargetSchema)),
|
|
15832
|
+
}), zod.z.array(DiscoveredTargetSchema), { auth: "admin" }),
|
|
15760
15833
|
send: require_sleep.method(zod.z.object({
|
|
15761
15834
|
targetId: zod.z.string(),
|
|
15762
15835
|
notification: NotificationSchema
|
|
15763
|
-
}), SendResultSchema, {
|
|
15836
|
+
}), SendResultSchema, {
|
|
15837
|
+
kind: "mutation",
|
|
15838
|
+
auth: "admin"
|
|
15839
|
+
}),
|
|
15764
15840
|
testTarget: require_sleep.method(zod.z.object({
|
|
15765
15841
|
targetId: zod.z.string(),
|
|
15766
15842
|
sample: NotificationSchema.optional()
|
|
15767
|
-
}), TestResultSchema, {
|
|
15768
|
-
|
|
15769
|
-
|
|
15843
|
+
}), TestResultSchema, {
|
|
15844
|
+
kind: "mutation",
|
|
15845
|
+
auth: "admin"
|
|
15846
|
+
}),
|
|
15847
|
+
upsertTarget: require_sleep.method(zod.z.object({ target: TargetSchema }), TargetSchema, {
|
|
15848
|
+
kind: "mutation",
|
|
15849
|
+
auth: "admin"
|
|
15850
|
+
}),
|
|
15851
|
+
deleteTarget: require_sleep.method(zod.z.object({ targetId: zod.z.string() }), zod.z.void(), {
|
|
15852
|
+
kind: "mutation",
|
|
15853
|
+
auth: "admin"
|
|
15854
|
+
}),
|
|
15770
15855
|
setTargetEnabled: require_sleep.method(zod.z.object({
|
|
15771
15856
|
targetId: zod.z.string(),
|
|
15772
15857
|
enabled: zod.z.boolean()
|
|
15773
|
-
}), zod.z.void(), {
|
|
15858
|
+
}), zod.z.void(), {
|
|
15859
|
+
kind: "mutation",
|
|
15860
|
+
auth: "admin"
|
|
15861
|
+
})
|
|
15774
15862
|
}
|
|
15775
15863
|
};
|
|
15776
15864
|
//#endregion
|
|
@@ -26403,54 +26491,78 @@ var storageCapability = {
|
|
|
26403
26491
|
resolve: require_sleep.method(zod.z.object({
|
|
26404
26492
|
location: StorageLocationRefSchema,
|
|
26405
26493
|
relativePath: zod.z.string()
|
|
26406
|
-
}), zod.z.string()),
|
|
26494
|
+
}), zod.z.string(), { auth: "admin" }),
|
|
26407
26495
|
write: require_sleep.method(zod.z.object({
|
|
26408
26496
|
location: StorageLocationRefSchema,
|
|
26409
26497
|
relativePath: zod.z.string(),
|
|
26410
26498
|
data: zod.z.instanceof(Uint8Array)
|
|
26411
|
-
}), zod.z.void(), {
|
|
26499
|
+
}), zod.z.void(), {
|
|
26500
|
+
kind: "mutation",
|
|
26501
|
+
auth: "admin"
|
|
26502
|
+
}),
|
|
26412
26503
|
read: require_sleep.method(zod.z.object({
|
|
26413
26504
|
location: StorageLocationRefSchema,
|
|
26414
26505
|
relativePath: zod.z.string()
|
|
26415
|
-
}), zod.z.instanceof(Uint8Array)),
|
|
26506
|
+
}), zod.z.instanceof(Uint8Array), { auth: "admin" }),
|
|
26416
26507
|
exists: require_sleep.method(zod.z.object({
|
|
26417
26508
|
location: StorageLocationRefSchema,
|
|
26418
26509
|
relativePath: zod.z.string()
|
|
26419
|
-
}), zod.z.boolean()),
|
|
26510
|
+
}), zod.z.boolean(), { auth: "admin" }),
|
|
26420
26511
|
list: require_sleep.method(zod.z.object({
|
|
26421
26512
|
location: StorageLocationRefSchema,
|
|
26422
26513
|
prefix: zod.z.string().optional()
|
|
26423
|
-
}), zod.z.array(zod.z.string()).readonly()),
|
|
26514
|
+
}), zod.z.array(zod.z.string()).readonly(), { auth: "admin" }),
|
|
26424
26515
|
delete: require_sleep.method(zod.z.object({
|
|
26425
26516
|
location: StorageLocationRefSchema,
|
|
26426
26517
|
relativePath: zod.z.string()
|
|
26427
|
-
}), zod.z.void(), {
|
|
26518
|
+
}), zod.z.void(), {
|
|
26519
|
+
kind: "mutation",
|
|
26520
|
+
auth: "admin"
|
|
26521
|
+
}),
|
|
26428
26522
|
getAvailableSpace: require_sleep.method(zod.z.object({ location: StorageLocationRefSchema }), zod.z.number().nullable()),
|
|
26429
26523
|
beginUpload: require_sleep.method(zod.z.object({
|
|
26430
26524
|
location: StorageLocationRefSchema,
|
|
26431
26525
|
relativePath: zod.z.string(),
|
|
26432
26526
|
sizeBytes: zod.z.number().optional()
|
|
26433
|
-
}), zod.z.object({ uploadId: zod.z.string() }), {
|
|
26527
|
+
}), zod.z.object({ uploadId: zod.z.string() }), {
|
|
26528
|
+
kind: "mutation",
|
|
26529
|
+
auth: "admin"
|
|
26530
|
+
}),
|
|
26434
26531
|
writeChunk: require_sleep.method(zod.z.object({
|
|
26435
26532
|
uploadId: zod.z.string(),
|
|
26436
26533
|
offset: zod.z.number(),
|
|
26437
26534
|
data: zod.z.instanceof(Uint8Array)
|
|
26438
|
-
}), zod.z.void(), {
|
|
26439
|
-
|
|
26440
|
-
|
|
26535
|
+
}), zod.z.void(), {
|
|
26536
|
+
kind: "mutation",
|
|
26537
|
+
auth: "admin"
|
|
26538
|
+
}),
|
|
26539
|
+
finalizeUpload: require_sleep.method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), {
|
|
26540
|
+
kind: "mutation",
|
|
26541
|
+
auth: "admin"
|
|
26542
|
+
}),
|
|
26543
|
+
abortUpload: require_sleep.method(zod.z.object({ uploadId: zod.z.string() }), zod.z.void(), {
|
|
26544
|
+
kind: "mutation",
|
|
26545
|
+
auth: "admin"
|
|
26546
|
+
}),
|
|
26441
26547
|
beginDownload: require_sleep.method(zod.z.object({
|
|
26442
26548
|
location: StorageLocationRefSchema,
|
|
26443
26549
|
relativePath: zod.z.string()
|
|
26444
26550
|
}), zod.z.object({
|
|
26445
26551
|
downloadId: zod.z.string(),
|
|
26446
26552
|
sizeBytes: zod.z.number()
|
|
26447
|
-
}), {
|
|
26553
|
+
}), {
|
|
26554
|
+
kind: "mutation",
|
|
26555
|
+
auth: "admin"
|
|
26556
|
+
}),
|
|
26448
26557
|
readChunk: require_sleep.method(zod.z.object({
|
|
26449
26558
|
downloadId: zod.z.string(),
|
|
26450
26559
|
offset: zod.z.number(),
|
|
26451
26560
|
length: zod.z.number()
|
|
26452
|
-
}), zod.z.instanceof(Uint8Array)),
|
|
26453
|
-
endDownload: require_sleep.method(zod.z.object({ downloadId: zod.z.string() }), zod.z.void(), {
|
|
26561
|
+
}), zod.z.instanceof(Uint8Array), { auth: "admin" }),
|
|
26562
|
+
endDownload: require_sleep.method(zod.z.object({ downloadId: zod.z.string() }), zod.z.void(), {
|
|
26563
|
+
kind: "mutation",
|
|
26564
|
+
auth: "admin"
|
|
26565
|
+
}),
|
|
26454
26566
|
listLocations: require_sleep.method(zod.z.object({ type: StorageLocationTypeSchema.optional() }), zod.z.array(StorageLocationSchema).readonly()),
|
|
26455
26567
|
listLocationDeclarations: require_sleep.method(zod.z.void(), zod.z.array(StorageLocationDeclarationSchema).readonly()),
|
|
26456
26568
|
upsertLocation: require_sleep.method(StorageLocationSchema.omit({
|
|
@@ -60678,7 +60790,11 @@ var ALARM = [
|
|
|
60678
60790
|
"alarm-armed",
|
|
60679
60791
|
"alarm-disarmed",
|
|
60680
60792
|
"alarm-arming",
|
|
60681
|
-
"alarm-arm-refused"
|
|
60793
|
+
"alarm-arm-refused",
|
|
60794
|
+
"alarm-pending",
|
|
60795
|
+
"alarm-rearmed",
|
|
60796
|
+
"alarm-sensor-bypass",
|
|
60797
|
+
"alarm-check-failed"
|
|
60682
60798
|
];
|
|
60683
60799
|
var COMBINED_ALARM = ["alarm-triggered"];
|
|
60684
60800
|
var DEVICE_EVENTS = [
|
|
@@ -61242,19 +61358,22 @@ var NC_TEMPLATE_VARS = [
|
|
|
61242
61358
|
systemEventKinds: [
|
|
61243
61359
|
"alarm-armed",
|
|
61244
61360
|
"alarm-arming",
|
|
61245
|
-
"alarm-arm-refused"
|
|
61361
|
+
"alarm-arm-refused",
|
|
61362
|
+
"alarm-pending",
|
|
61363
|
+
"alarm-rearmed",
|
|
61364
|
+
"alarm-check-failed"
|
|
61246
61365
|
]
|
|
61247
61366
|
},
|
|
61248
61367
|
{
|
|
61249
61368
|
name: "seconds",
|
|
61250
61369
|
label: "Seconds",
|
|
61251
|
-
description: "Arming: the exit delay left.
|
|
61370
|
+
description: "Arming: the exit delay left. Pending: the entry delay left to disarm.",
|
|
61252
61371
|
example: "30",
|
|
61253
61372
|
group: "system",
|
|
61254
61373
|
families: ["rule"],
|
|
61255
61374
|
fields: [...RULE_TEXT],
|
|
61256
61375
|
kinds: ["system"],
|
|
61257
|
-
systemEventKinds: ["alarm-arming", "alarm-
|
|
61376
|
+
systemEventKinds: ["alarm-arming", "alarm-pending"]
|
|
61258
61377
|
},
|
|
61259
61378
|
{
|
|
61260
61379
|
name: "rules",
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AudioStreamPickSchema, A as DeviceType, At as DATAPLANE_SECRET_HEADER, B as optionalMethod, Bt as WELL_KNOWN_TAB_MAP, C as customAction, Ct as parseProfileBrokerId, D as ChargingStatus, Dt as PEER_BYTES_STALL_MS, E as deviceCustomAction, Et as PEER_BYTES_MAX_OUTSTANDING, F as PROVIDER_PIN_FIELD, Ft as createDurableState, G as readNodePin, Gt as AUDIO_CHUNK_FORMATS, H as systemMethod, Ht as collectHydratedFieldValues, I as event, It as createEvent, J as ReadinessTimeoutError, Jt as isAudioChunkFormat, K as toNodeId, Kt as audioChunkBytesPerSample, L as expandCapMethods, Lt as emitReadiness, M as DEFAULT_RUNTIME_STATE_DURABILITY, Mt as DisposerChain, N as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Nt as BaseAddon, O as DeviceFeature, Ot as PEER_BYTES_TICKET_TTL_MS, P as DEVICE_STATUS_METHOD, Pt as normalizeAddonInitResult, Q as AudioChunkFormatSchema, R as isDeviceConfigCap, Rt as isEvent, S as DEVICE_CHILDREN_BATCH_MAX, St as makeSourceBrokerId, T as describeCustomActions, Tt as PEER_BYTES_CHUNK_BYTES, U as CAP_NODE_PIN_CONTEXT_KEY, Ut as hydrateSchema, V as resolveCapMount, Vt as collectHydratedFieldEntries, W as nodePin, Wt as resolveHydratedFieldValue, X as readinessKey, Y as emitDownForOwnedCaps, Z as scopeKey, _ as createMirrorSource, _t as SubscribeAudioChunksInputSchema, a as asJsonObject, at as CamStreamResolutionSchema, b as deviceOpsCapability, bt as SubscribeFramesResultSchema, c as parseJsonArray, ct as DecodedFrameSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as FrameHandleSchema, et as BrokerStatsSchema, f as DEVICE_SCOPED_CAPS, ft as ProfileRtspEntrySchema, g as createLazyTrpcSource, gt as StreamSourceSchema, h as createEventBusSliceSource, ht as StreamSourceEntrySchema, i as asJsonArray, it as CamStreamKindSchema, j as adminUiCapability, jt as SHARE_VIEW_KINDS, k as DeviceRole, kt as PeerBytesTicketSchema, l as parseJsonObject, lt as EncodedPacketSchema, m as createDeviceProxy, mt as ProfileSlotStatusSchema, n as sleepCancellable, nt as CAM_PROFILE_ORDER, o as asNumber, ot as CameraStreamSchema, p as isDeviceScopedCap, pt as ProfileSlotSchema, q as ReadinessRegistry, qt as expandAudioChunkToF32le, r as asBoolean, rt as CamProfileSchema, s as asString, st as DecodedAudioChunkSchema, t as sleep, tt as BrokerStatusSchema, u as parseJsonUnknown, ut as FrameHandleFormatSchema, v as createSliceHandle, vt as SubscribeAudioChunksResultSchema, w as defineCustomActions, wt as selectAssignedProfileSlots, x as viewerUiCapability, xt as makeProfileBrokerId, y as RawStateResultSchema, yt as SubscribeFramesInputSchema, z as method, zt as WELL_KNOWN_TABS } from "./sleep-
|
|
1
|
+
import { $ as AudioStreamPickSchema, A as DeviceType, At as DATAPLANE_SECRET_HEADER, B as optionalMethod, Bt as WELL_KNOWN_TAB_MAP, C as customAction, Ct as parseProfileBrokerId, D as ChargingStatus, Dt as PEER_BYTES_STALL_MS, E as deviceCustomAction, Et as PEER_BYTES_MAX_OUTSTANDING, F as PROVIDER_PIN_FIELD, Ft as createDurableState, G as readNodePin, Gt as AUDIO_CHUNK_FORMATS, H as systemMethod, Ht as collectHydratedFieldValues, I as event, It as createEvent, J as ReadinessTimeoutError, Jt as isAudioChunkFormat, K as toNodeId, Kt as audioChunkBytesPerSample, L as expandCapMethods, Lt as emitReadiness, M as DEFAULT_RUNTIME_STATE_DURABILITY, Mt as DisposerChain, N as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Nt as BaseAddon, O as DeviceFeature, Ot as PEER_BYTES_TICKET_TTL_MS, P as DEVICE_STATUS_METHOD, Pt as normalizeAddonInitResult, Q as AudioChunkFormatSchema, R as isDeviceConfigCap, Rt as isEvent, S as DEVICE_CHILDREN_BATCH_MAX, St as makeSourceBrokerId, T as describeCustomActions, Tt as PEER_BYTES_CHUNK_BYTES, U as CAP_NODE_PIN_CONTEXT_KEY, Ut as hydrateSchema, V as resolveCapMount, Vt as collectHydratedFieldEntries, W as nodePin, Wt as resolveHydratedFieldValue, X as readinessKey, Y as emitDownForOwnedCaps, Z as scopeKey, _ as createMirrorSource, _t as SubscribeAudioChunksInputSchema, a as asJsonObject, at as CamStreamResolutionSchema, b as deviceOpsCapability, bt as SubscribeFramesResultSchema, c as parseJsonArray, ct as DecodedFrameSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as FrameHandleSchema, et as BrokerStatsSchema, f as DEVICE_SCOPED_CAPS, ft as ProfileRtspEntrySchema, g as createLazyTrpcSource, gt as StreamSourceSchema, h as createEventBusSliceSource, ht as StreamSourceEntrySchema, i as asJsonArray, it as CamStreamKindSchema, j as adminUiCapability, jt as SHARE_VIEW_KINDS, k as DeviceRole, kt as PeerBytesTicketSchema, l as parseJsonObject, lt as EncodedPacketSchema, m as createDeviceProxy, mt as ProfileSlotStatusSchema, n as sleepCancellable, nt as CAM_PROFILE_ORDER, o as asNumber, ot as CameraStreamSchema, p as isDeviceScopedCap, pt as ProfileSlotSchema, q as ReadinessRegistry, qt as expandAudioChunkToF32le, r as asBoolean, rt as CamProfileSchema, s as asString, st as DecodedAudioChunkSchema, t as sleep, tt as BrokerStatusSchema, u as parseJsonUnknown, ut as FrameHandleFormatSchema, v as createSliceHandle, vt as SubscribeAudioChunksResultSchema, w as defineCustomActions, wt as selectAssignedProfileSlots, x as viewerUiCapability, xt as makeProfileBrokerId, y as RawStateResultSchema, yt as SubscribeFramesInputSchema, z as method, zt as WELL_KNOWN_TABS } from "./sleep-D_4W7xuQ.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-BVDXG4tB.mjs";
|
|
3
3
|
import { a as buildAudioArgs, c as buildVideoArgs, d as logBannerArgs, f as pickVideoEncoder, i as audioPlanFromEncodeProfile, l as invocationFromEncodeProfile, n as Fmp4BoxSplitter, o as buildFfmpegArgs, p as resolveStreamMaps, r as AUDIO_PRESETS, s as buildInputArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-CPK2Dy60.mjs";
|
|
4
4
|
import { EventSourceType } from "./enums.mjs";
|
|
@@ -8441,7 +8441,7 @@ var brokerCapability = {
|
|
|
8441
8441
|
}),
|
|
8442
8442
|
/** Read the broker's cached state for a key. Returns `null` when
|
|
8443
8443
|
* unknown to the broker (never published / unknown entity). */
|
|
8444
|
-
getState: method(GetStateInputSchema, z.unknown().nullable()),
|
|
8444
|
+
getState: method(GetStateInputSchema, z.unknown().nullable(), { auth: "admin" }),
|
|
8445
8445
|
/** Status method — explicit registration with a `z.void()` input so
|
|
8446
8446
|
* the codegen-generated tRPC router types its input as
|
|
8447
8447
|
* `{addonId?: string, nodeId?: string}` (system-scoped collection
|
|
@@ -10287,6 +10287,16 @@ var CollectionIndexSchema = z.object({
|
|
|
10287
10287
|
* namespace, or none. Making the door enforce it is tracked separately —
|
|
10288
10288
|
* it renames tables, so it needs a migration.
|
|
10289
10289
|
*
|
|
10290
|
+
* **So every method is `auth: 'admin'` (D634).** Because nothing scopes a
|
|
10291
|
+
* call to its caller, a `protected` method here was a raw, unredacted read
|
|
10292
|
+
* (and write) of every addon's collections for any role holding
|
|
10293
|
+
* `category:system` — which is every role: a `viewer` could read every
|
|
10294
|
+
* notifier token in plaintext from `notifiers:notification-targets`. No
|
|
10295
|
+
* browser or app client calls this cap. Addons are not affected: an
|
|
10296
|
+
* addon's `ctx.api` cap call is resolved to the provider directly and never
|
|
10297
|
+
* enters the tRPC router (so the tier gates sessions and tokens, never
|
|
10298
|
+
* addons), and the hub itself calls it through the capability registry.
|
|
10299
|
+
*
|
|
10290
10300
|
* - `{ collection: 'addon-settings' }` → table `addon-settings`
|
|
10291
10301
|
* - `{ namespace: 'my-addon', collection: 'addon-settings' }` →
|
|
10292
10302
|
* table `my-addon:addon-settings`
|
|
@@ -10308,14 +10318,17 @@ var settingsStoreCapability = {
|
|
|
10308
10318
|
namespace: z.string().optional(),
|
|
10309
10319
|
collection: z.string(),
|
|
10310
10320
|
key: z.string()
|
|
10311
|
-
}), z.unknown()),
|
|
10321
|
+
}), z.unknown(), { auth: "admin" }),
|
|
10312
10322
|
/** Set a value by key in a collection (upsert). */
|
|
10313
10323
|
set: method(z.object({
|
|
10314
10324
|
namespace: z.string().optional(),
|
|
10315
10325
|
collection: z.string(),
|
|
10316
10326
|
key: z.string(),
|
|
10317
10327
|
value: z.unknown()
|
|
10318
|
-
}), z.void(), {
|
|
10328
|
+
}), z.void(), {
|
|
10329
|
+
kind: "mutation",
|
|
10330
|
+
auth: "admin"
|
|
10331
|
+
}),
|
|
10319
10332
|
/**
|
|
10320
10333
|
* Rows matching a filter.
|
|
10321
10334
|
*
|
|
@@ -10336,7 +10349,7 @@ var settingsStoreCapability = {
|
|
|
10336
10349
|
collection: z.string(),
|
|
10337
10350
|
filter: QueryFilterSchema.optional(),
|
|
10338
10351
|
columns: z.array(z.string()).readonly().optional()
|
|
10339
|
-
}), z.array(SettingsRecordSchema).readonly()),
|
|
10352
|
+
}), z.array(SettingsRecordSchema).readonly(), { auth: "admin" }),
|
|
10340
10353
|
/**
|
|
10341
10354
|
* Make a SLOT hold this row — insert it, or update whatever already
|
|
10342
10355
|
* occupies the slot — and answer with the id the row HAS.
|
|
@@ -10389,7 +10402,10 @@ var settingsStoreCapability = {
|
|
|
10389
10402
|
}), z.object({
|
|
10390
10403
|
/** The id the row HAS: assigned by SQLite on an insert, or the existing
|
|
10391
10404
|
* row's own id on an update. */
|
|
10392
|
-
id: z.union([z.string(), z.number()]) }), {
|
|
10405
|
+
id: z.union([z.string(), z.number()]) }), {
|
|
10406
|
+
kind: "mutation",
|
|
10407
|
+
auth: "admin"
|
|
10408
|
+
}),
|
|
10393
10409
|
/** Insert a new record. */
|
|
10394
10410
|
insert: method(z.object({
|
|
10395
10411
|
namespace: z.string().optional(),
|
|
@@ -10404,7 +10420,10 @@ id: z.union([z.string(), z.number()]) }), { kind: "mutation" }),
|
|
|
10404
10420
|
* for an absent one, or the ROWID SQLite assigned on an `INTEGER`
|
|
10405
10421
|
* primary key — which is the only place an auto key is knowable.
|
|
10406
10422
|
*/
|
|
10407
|
-
id: z.union([z.string(), z.number()]) }), {
|
|
10423
|
+
id: z.union([z.string(), z.number()]) }), {
|
|
10424
|
+
kind: "mutation",
|
|
10425
|
+
auth: "admin"
|
|
10426
|
+
}),
|
|
10408
10427
|
/**
|
|
10409
10428
|
* Insert MANY records in ONE transaction, returning how many landed.
|
|
10410
10429
|
*
|
|
@@ -10432,20 +10451,29 @@ id: z.union([z.string(), z.number()]) }), { kind: "mutation" }),
|
|
|
10432
10451
|
namespace: z.string().optional(),
|
|
10433
10452
|
collection: z.string(),
|
|
10434
10453
|
records: z.array(BulkRecordSchema).readonly()
|
|
10435
|
-
}), z.object({ inserted: z.number().int() }), {
|
|
10454
|
+
}), z.object({ inserted: z.number().int() }), {
|
|
10455
|
+
kind: "mutation",
|
|
10456
|
+
auth: "admin"
|
|
10457
|
+
}),
|
|
10436
10458
|
/** Update an existing record by ID. */
|
|
10437
10459
|
update: method(z.object({
|
|
10438
10460
|
namespace: z.string().optional(),
|
|
10439
10461
|
collection: z.string(),
|
|
10440
10462
|
id: z.string(),
|
|
10441
10463
|
data: z.record(z.string(), z.unknown())
|
|
10442
|
-
}), z.void(), {
|
|
10464
|
+
}), z.void(), {
|
|
10465
|
+
kind: "mutation",
|
|
10466
|
+
auth: "admin"
|
|
10467
|
+
}),
|
|
10443
10468
|
/** Delete a record by key/ID. */
|
|
10444
10469
|
delete: method(z.object({
|
|
10445
10470
|
namespace: z.string().optional(),
|
|
10446
10471
|
collection: z.string(),
|
|
10447
10472
|
key: z.string()
|
|
10448
|
-
}), z.void(), {
|
|
10473
|
+
}), z.void(), {
|
|
10474
|
+
kind: "mutation",
|
|
10475
|
+
auth: "admin"
|
|
10476
|
+
}),
|
|
10449
10477
|
/**
|
|
10450
10478
|
* Delete every record matching `filter`, in ONE statement, returning how
|
|
10451
10479
|
* many rows went. This exists because its absence made every retention
|
|
@@ -10464,7 +10492,10 @@ id: z.union([z.string(), z.number()]) }), { kind: "mutation" }),
|
|
|
10464
10492
|
namespace: z.string().optional(),
|
|
10465
10493
|
collection: z.string(),
|
|
10466
10494
|
filter: MutationFilterSchema
|
|
10467
|
-
}), z.object({ deleted: z.number().int() }), {
|
|
10495
|
+
}), z.object({ deleted: z.number().int() }), {
|
|
10496
|
+
kind: "mutation",
|
|
10497
|
+
auth: "admin"
|
|
10498
|
+
}),
|
|
10468
10499
|
/**
|
|
10469
10500
|
* Apply `data` to every record matching `filter`, in one statement,
|
|
10470
10501
|
* returning how many rows changed. Same filter contract as
|
|
@@ -10475,13 +10506,16 @@ id: z.union([z.string(), z.number()]) }), { kind: "mutation" }),
|
|
|
10475
10506
|
collection: z.string(),
|
|
10476
10507
|
filter: MutationFilterSchema,
|
|
10477
10508
|
data: z.record(z.string(), z.unknown())
|
|
10478
|
-
}), z.object({ updated: z.number().int() }), {
|
|
10509
|
+
}), z.object({ updated: z.number().int() }), {
|
|
10510
|
+
kind: "mutation",
|
|
10511
|
+
auth: "admin"
|
|
10512
|
+
}),
|
|
10479
10513
|
/** Count entries in a collection, optionally filtered. */
|
|
10480
10514
|
count: method(z.object({
|
|
10481
10515
|
namespace: z.string().optional(),
|
|
10482
10516
|
collection: z.string(),
|
|
10483
10517
|
filter: QueryFilterSchema.optional()
|
|
10484
|
-
}), z.number()),
|
|
10518
|
+
}), z.number(), { auth: "admin" }),
|
|
10485
10519
|
/**
|
|
10486
10520
|
* `COUNT(*)` and one `SUM` / `MIN` / `MAX` per requested field, in ONE
|
|
10487
10521
|
* statement, over the rows `filter` selects.
|
|
@@ -10507,7 +10541,7 @@ id: z.union([z.string(), z.number()]) }), { kind: "mutation" }),
|
|
|
10507
10541
|
collection: z.string(),
|
|
10508
10542
|
fields: z.array(AggregateFieldSchema).readonly(),
|
|
10509
10543
|
filter: QueryFilterSchema.optional()
|
|
10510
|
-
}), AggregateResultSchema),
|
|
10544
|
+
}), AggregateResultSchema, { auth: "admin" }),
|
|
10511
10545
|
/** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
|
|
10512
10546
|
histogram: method(z.object({
|
|
10513
10547
|
namespace: z.string().optional(),
|
|
@@ -10519,12 +10553,12 @@ id: z.union([z.string(), z.number()]) }), { kind: "mutation" }),
|
|
|
10519
10553
|
}), z.array(z.object({
|
|
10520
10554
|
bucket: z.number().int(),
|
|
10521
10555
|
count: z.number().int()
|
|
10522
|
-
})).readonly()),
|
|
10556
|
+
})).readonly(), { auth: "admin" }),
|
|
10523
10557
|
/** Check if a collection is empty. */
|
|
10524
10558
|
isEmpty: method(z.object({
|
|
10525
10559
|
namespace: z.string().optional(),
|
|
10526
10560
|
collection: z.string()
|
|
10527
|
-
}), z.boolean()),
|
|
10561
|
+
}), z.boolean(), { auth: "admin" }),
|
|
10528
10562
|
/**
|
|
10529
10563
|
* Declare a typed (SQL-backed) collection with explicit columns +
|
|
10530
10564
|
* indexes. Idempotent: re-declaring an existing collection with the
|
|
@@ -10545,7 +10579,10 @@ id: z.union([z.string(), z.number()]) }), { kind: "mutation" }),
|
|
|
10545
10579
|
collection: z.string(),
|
|
10546
10580
|
columns: z.array(CollectionColumnSchema).readonly(),
|
|
10547
10581
|
indexes: z.array(CollectionIndexSchema).readonly().optional()
|
|
10548
|
-
}), z.void(), {
|
|
10582
|
+
}), z.void(), {
|
|
10583
|
+
kind: "mutation",
|
|
10584
|
+
auth: "admin"
|
|
10585
|
+
})
|
|
10549
10586
|
}
|
|
10550
10587
|
};
|
|
10551
10588
|
//#endregion
|
|
@@ -11799,8 +11836,14 @@ var deviceExportCapability = {
|
|
|
11799
11836
|
getStatus: method(z.void(), DeviceExportStatusSchema),
|
|
11800
11837
|
listSupportedDeviceKinds: method(z.void(), z.array(DeviceKindSchema)),
|
|
11801
11838
|
listExposedDevices: method(z.void(), z.array(ExposedDeviceSchema)),
|
|
11802
|
-
exposeDevice: method(ExposeInputSchema, z.void(), {
|
|
11803
|
-
|
|
11839
|
+
exposeDevice: method(ExposeInputSchema, z.void(), {
|
|
11840
|
+
kind: "mutation",
|
|
11841
|
+
auth: "admin"
|
|
11842
|
+
}),
|
|
11843
|
+
unexposeDevice: method(UnexposeInputSchema, z.void(), {
|
|
11844
|
+
kind: "mutation",
|
|
11845
|
+
auth: "admin"
|
|
11846
|
+
})
|
|
11804
11847
|
}
|
|
11805
11848
|
};
|
|
11806
11849
|
//#endregion
|
|
@@ -12558,11 +12601,14 @@ var deviceManagerCapability = {
|
|
|
12558
12601
|
/** Remove a device from the DB + in-memory registry. Called by DeviceManagerApi.remove(). */
|
|
12559
12602
|
removeDevice: method(DeviceRemovePayloadSchema, z.void(), { kind: "mutation" }),
|
|
12560
12603
|
/** Persist device config blob. Called by DeviceConfig.set/setAll(). */
|
|
12561
|
-
persistConfig: method(DevicePersistConfigPayloadSchema, z.void(), {
|
|
12604
|
+
persistConfig: method(DevicePersistConfigPayloadSchema, z.void(), {
|
|
12605
|
+
kind: "mutation",
|
|
12606
|
+
auth: "admin"
|
|
12607
|
+
}),
|
|
12562
12608
|
/** Load persisted config for a device. Called at restore time. */
|
|
12563
|
-
loadConfig: method(z.object({ deviceId: z.number() }), z.record(z.string(), z.unknown())),
|
|
12609
|
+
loadConfig: method(z.object({ deviceId: z.number() }), z.record(z.string(), z.unknown()), { auth: "admin" }),
|
|
12564
12610
|
/** Load persisted runtime state. Called at device adopt time. */
|
|
12565
|
-
loadRuntimeState: method(z.object({ deviceId: z.number() }), z.record(z.string(), z.unknown())),
|
|
12611
|
+
loadRuntimeState: method(z.object({ deviceId: z.number() }), z.record(z.string(), z.unknown()), { auth: "admin" }),
|
|
12566
12612
|
/** Load operator-organisational meta surface for a device. Called by
|
|
12567
12613
|
* the kernel proxy to populate `DeviceContext.deviceMeta` before
|
|
12568
12614
|
* the device class constructor runs. Returns `null` when the id
|
|
@@ -15381,12 +15427,27 @@ var mqttBrokerCapability = {
|
|
|
15381
15427
|
},
|
|
15382
15428
|
methods: {
|
|
15383
15429
|
listBrokers: method(z.void(), z.array(BrokerInfoSchema)),
|
|
15384
|
-
getBrokerConfig: method(IdInputSchema, BrokerConnectionDetailsSchema),
|
|
15385
|
-
addBroker: method(AddBrokerInputSchema, AddBrokerResultSchema, {
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15430
|
+
getBrokerConfig: method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }),
|
|
15431
|
+
addBroker: method(AddBrokerInputSchema, AddBrokerResultSchema, {
|
|
15432
|
+
kind: "mutation",
|
|
15433
|
+
auth: "admin"
|
|
15434
|
+
}),
|
|
15435
|
+
removeBroker: method(IdInputSchema, z.void(), {
|
|
15436
|
+
kind: "mutation",
|
|
15437
|
+
auth: "admin"
|
|
15438
|
+
}),
|
|
15439
|
+
testConnection: method(IdInputSchema, TestResultSchema$1, {
|
|
15440
|
+
kind: "mutation",
|
|
15441
|
+
auth: "admin"
|
|
15442
|
+
}),
|
|
15443
|
+
startEmbeddedBroker: method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, {
|
|
15444
|
+
kind: "mutation",
|
|
15445
|
+
auth: "admin"
|
|
15446
|
+
}),
|
|
15447
|
+
stopEmbeddedBroker: method(IdInputSchema, z.void(), {
|
|
15448
|
+
kind: "mutation",
|
|
15449
|
+
auth: "admin"
|
|
15450
|
+
}),
|
|
15390
15451
|
getStatus: method(z.void(), StatusSchema)
|
|
15391
15452
|
}
|
|
15392
15453
|
};
|
|
@@ -15707,6 +15768,18 @@ var TargetKindSchema = z.object({
|
|
|
15707
15768
|
*/
|
|
15708
15769
|
iconMediaType: z.string().optional(),
|
|
15709
15770
|
configSchema: ConfigSchemaPassthrough,
|
|
15771
|
+
/**
|
|
15772
|
+
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
15773
|
+
* base URL, instance, chat, recipient). A save that changes any of them
|
|
15774
|
+
* while leaving a secret redacted is refused by the provider (D634), so an
|
|
15775
|
+
* editor uses this to ask for the secret on exactly those edits instead of
|
|
15776
|
+
* on every edit.
|
|
15777
|
+
*
|
|
15778
|
+
* Optional: absent from a provider that holds no secret (the Home Assistant
|
|
15779
|
+
* kinds) and from a provider older than this field — an editor that finds
|
|
15780
|
+
* it absent must assume ANY edit may need the secret.
|
|
15781
|
+
*/
|
|
15782
|
+
destinationKeys: z.array(z.string()).optional(),
|
|
15710
15783
|
supportsDiscovery: z.boolean(),
|
|
15711
15784
|
caps: TargetKindCapsSchema
|
|
15712
15785
|
});
|
|
@@ -15751,25 +15824,40 @@ var notificationOutputCapability = {
|
|
|
15751
15824
|
mode: "collection",
|
|
15752
15825
|
methods: {
|
|
15753
15826
|
listTargetKinds: method(z.object({}), z.array(TargetKindSchema)),
|
|
15754
|
-
listTargets: method(z.object({}), z.array(TargetSchema)),
|
|
15827
|
+
listTargets: method(z.object({}), z.array(TargetSchema), { auth: "admin" }),
|
|
15755
15828
|
discoverTargets: method(z.object({
|
|
15756
15829
|
kind: z.string(),
|
|
15757
15830
|
config: z.record(z.string(), z.unknown()).optional()
|
|
15758
|
-
}), z.array(DiscoveredTargetSchema)),
|
|
15831
|
+
}), z.array(DiscoveredTargetSchema), { auth: "admin" }),
|
|
15759
15832
|
send: method(z.object({
|
|
15760
15833
|
targetId: z.string(),
|
|
15761
15834
|
notification: NotificationSchema
|
|
15762
|
-
}), SendResultSchema, {
|
|
15835
|
+
}), SendResultSchema, {
|
|
15836
|
+
kind: "mutation",
|
|
15837
|
+
auth: "admin"
|
|
15838
|
+
}),
|
|
15763
15839
|
testTarget: method(z.object({
|
|
15764
15840
|
targetId: z.string(),
|
|
15765
15841
|
sample: NotificationSchema.optional()
|
|
15766
|
-
}), TestResultSchema, {
|
|
15767
|
-
|
|
15768
|
-
|
|
15842
|
+
}), TestResultSchema, {
|
|
15843
|
+
kind: "mutation",
|
|
15844
|
+
auth: "admin"
|
|
15845
|
+
}),
|
|
15846
|
+
upsertTarget: method(z.object({ target: TargetSchema }), TargetSchema, {
|
|
15847
|
+
kind: "mutation",
|
|
15848
|
+
auth: "admin"
|
|
15849
|
+
}),
|
|
15850
|
+
deleteTarget: method(z.object({ targetId: z.string() }), z.void(), {
|
|
15851
|
+
kind: "mutation",
|
|
15852
|
+
auth: "admin"
|
|
15853
|
+
}),
|
|
15769
15854
|
setTargetEnabled: method(z.object({
|
|
15770
15855
|
targetId: z.string(),
|
|
15771
15856
|
enabled: z.boolean()
|
|
15772
|
-
}), z.void(), {
|
|
15857
|
+
}), z.void(), {
|
|
15858
|
+
kind: "mutation",
|
|
15859
|
+
auth: "admin"
|
|
15860
|
+
})
|
|
15773
15861
|
}
|
|
15774
15862
|
};
|
|
15775
15863
|
//#endregion
|
|
@@ -26402,54 +26490,78 @@ var storageCapability = {
|
|
|
26402
26490
|
resolve: method(z.object({
|
|
26403
26491
|
location: StorageLocationRefSchema,
|
|
26404
26492
|
relativePath: z.string()
|
|
26405
|
-
}), z.string()),
|
|
26493
|
+
}), z.string(), { auth: "admin" }),
|
|
26406
26494
|
write: method(z.object({
|
|
26407
26495
|
location: StorageLocationRefSchema,
|
|
26408
26496
|
relativePath: z.string(),
|
|
26409
26497
|
data: z.instanceof(Uint8Array)
|
|
26410
|
-
}), z.void(), {
|
|
26498
|
+
}), z.void(), {
|
|
26499
|
+
kind: "mutation",
|
|
26500
|
+
auth: "admin"
|
|
26501
|
+
}),
|
|
26411
26502
|
read: method(z.object({
|
|
26412
26503
|
location: StorageLocationRefSchema,
|
|
26413
26504
|
relativePath: z.string()
|
|
26414
|
-
}), z.instanceof(Uint8Array)),
|
|
26505
|
+
}), z.instanceof(Uint8Array), { auth: "admin" }),
|
|
26415
26506
|
exists: method(z.object({
|
|
26416
26507
|
location: StorageLocationRefSchema,
|
|
26417
26508
|
relativePath: z.string()
|
|
26418
|
-
}), z.boolean()),
|
|
26509
|
+
}), z.boolean(), { auth: "admin" }),
|
|
26419
26510
|
list: method(z.object({
|
|
26420
26511
|
location: StorageLocationRefSchema,
|
|
26421
26512
|
prefix: z.string().optional()
|
|
26422
|
-
}), z.array(z.string()).readonly()),
|
|
26513
|
+
}), z.array(z.string()).readonly(), { auth: "admin" }),
|
|
26423
26514
|
delete: method(z.object({
|
|
26424
26515
|
location: StorageLocationRefSchema,
|
|
26425
26516
|
relativePath: z.string()
|
|
26426
|
-
}), z.void(), {
|
|
26517
|
+
}), z.void(), {
|
|
26518
|
+
kind: "mutation",
|
|
26519
|
+
auth: "admin"
|
|
26520
|
+
}),
|
|
26427
26521
|
getAvailableSpace: method(z.object({ location: StorageLocationRefSchema }), z.number().nullable()),
|
|
26428
26522
|
beginUpload: method(z.object({
|
|
26429
26523
|
location: StorageLocationRefSchema,
|
|
26430
26524
|
relativePath: z.string(),
|
|
26431
26525
|
sizeBytes: z.number().optional()
|
|
26432
|
-
}), z.object({ uploadId: z.string() }), {
|
|
26526
|
+
}), z.object({ uploadId: z.string() }), {
|
|
26527
|
+
kind: "mutation",
|
|
26528
|
+
auth: "admin"
|
|
26529
|
+
}),
|
|
26433
26530
|
writeChunk: method(z.object({
|
|
26434
26531
|
uploadId: z.string(),
|
|
26435
26532
|
offset: z.number(),
|
|
26436
26533
|
data: z.instanceof(Uint8Array)
|
|
26437
|
-
}), z.void(), {
|
|
26438
|
-
|
|
26439
|
-
|
|
26534
|
+
}), z.void(), {
|
|
26535
|
+
kind: "mutation",
|
|
26536
|
+
auth: "admin"
|
|
26537
|
+
}),
|
|
26538
|
+
finalizeUpload: method(z.object({ uploadId: z.string() }), z.void(), {
|
|
26539
|
+
kind: "mutation",
|
|
26540
|
+
auth: "admin"
|
|
26541
|
+
}),
|
|
26542
|
+
abortUpload: method(z.object({ uploadId: z.string() }), z.void(), {
|
|
26543
|
+
kind: "mutation",
|
|
26544
|
+
auth: "admin"
|
|
26545
|
+
}),
|
|
26440
26546
|
beginDownload: method(z.object({
|
|
26441
26547
|
location: StorageLocationRefSchema,
|
|
26442
26548
|
relativePath: z.string()
|
|
26443
26549
|
}), z.object({
|
|
26444
26550
|
downloadId: z.string(),
|
|
26445
26551
|
sizeBytes: z.number()
|
|
26446
|
-
}), {
|
|
26552
|
+
}), {
|
|
26553
|
+
kind: "mutation",
|
|
26554
|
+
auth: "admin"
|
|
26555
|
+
}),
|
|
26447
26556
|
readChunk: method(z.object({
|
|
26448
26557
|
downloadId: z.string(),
|
|
26449
26558
|
offset: z.number(),
|
|
26450
26559
|
length: z.number()
|
|
26451
|
-
}), z.instanceof(Uint8Array)),
|
|
26452
|
-
endDownload: method(z.object({ downloadId: z.string() }), z.void(), {
|
|
26560
|
+
}), z.instanceof(Uint8Array), { auth: "admin" }),
|
|
26561
|
+
endDownload: method(z.object({ downloadId: z.string() }), z.void(), {
|
|
26562
|
+
kind: "mutation",
|
|
26563
|
+
auth: "admin"
|
|
26564
|
+
}),
|
|
26453
26565
|
listLocations: method(z.object({ type: StorageLocationTypeSchema.optional() }), z.array(StorageLocationSchema).readonly()),
|
|
26454
26566
|
listLocationDeclarations: method(z.void(), z.array(StorageLocationDeclarationSchema).readonly()),
|
|
26455
26567
|
upsertLocation: method(StorageLocationSchema.omit({
|
|
@@ -60677,7 +60789,11 @@ var ALARM = [
|
|
|
60677
60789
|
"alarm-armed",
|
|
60678
60790
|
"alarm-disarmed",
|
|
60679
60791
|
"alarm-arming",
|
|
60680
|
-
"alarm-arm-refused"
|
|
60792
|
+
"alarm-arm-refused",
|
|
60793
|
+
"alarm-pending",
|
|
60794
|
+
"alarm-rearmed",
|
|
60795
|
+
"alarm-sensor-bypass",
|
|
60796
|
+
"alarm-check-failed"
|
|
60681
60797
|
];
|
|
60682
60798
|
var COMBINED_ALARM = ["alarm-triggered"];
|
|
60683
60799
|
var DEVICE_EVENTS = [
|
|
@@ -61241,19 +61357,22 @@ var NC_TEMPLATE_VARS = [
|
|
|
61241
61357
|
systemEventKinds: [
|
|
61242
61358
|
"alarm-armed",
|
|
61243
61359
|
"alarm-arming",
|
|
61244
|
-
"alarm-arm-refused"
|
|
61360
|
+
"alarm-arm-refused",
|
|
61361
|
+
"alarm-pending",
|
|
61362
|
+
"alarm-rearmed",
|
|
61363
|
+
"alarm-check-failed"
|
|
61245
61364
|
]
|
|
61246
61365
|
},
|
|
61247
61366
|
{
|
|
61248
61367
|
name: "seconds",
|
|
61249
61368
|
label: "Seconds",
|
|
61250
|
-
description: "Arming: the exit delay left.
|
|
61369
|
+
description: "Arming: the exit delay left. Pending: the entry delay left to disarm.",
|
|
61251
61370
|
example: "30",
|
|
61252
61371
|
group: "system",
|
|
61253
61372
|
families: ["rule"],
|
|
61254
61373
|
fields: [...RULE_TEXT],
|
|
61255
61374
|
kinds: ["system"],
|
|
61256
|
-
systemEventKinds: ["alarm-arming", "alarm-
|
|
61375
|
+
systemEventKinds: ["alarm-arming", "alarm-pending"]
|
|
61257
61376
|
},
|
|
61258
61377
|
{
|
|
61259
61378
|
name: "rules",
|
|
@@ -3075,7 +3075,10 @@ var deviceOpsCapability = {
|
|
|
3075
3075
|
setConfig: method(zod.z.object({
|
|
3076
3076
|
deviceId: zod.z.number(),
|
|
3077
3077
|
values: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
3078
|
-
}), zod.z.void(), {
|
|
3078
|
+
}), zod.z.void(), {
|
|
3079
|
+
kind: "mutation",
|
|
3080
|
+
auth: "admin"
|
|
3081
|
+
}),
|
|
3079
3082
|
/**
|
|
3080
3083
|
* Invoke a device custom action on a forked/remote device (the
|
|
3081
3084
|
* cross-process transport for `IDevice.runDeviceAction`). Mirrors
|
|
@@ -3092,7 +3095,10 @@ var deviceOpsCapability = {
|
|
|
3092
3095
|
* (close sockets, stop background tasks, …). The device-manager still
|
|
3093
3096
|
* performs its own persistence cleanup before/after this call.
|
|
3094
3097
|
*/
|
|
3095
|
-
removeDevice: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
|
|
3098
|
+
removeDevice: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
|
|
3099
|
+
kind: "mutation",
|
|
3100
|
+
auth: "admin"
|
|
3101
|
+
}),
|
|
3096
3102
|
/**
|
|
3097
3103
|
* Build the ConfigUISchema (FormBuilder input shape) from the device's
|
|
3098
3104
|
* Zod config schema. Runs on the worker that owns the IDevice so the
|
|
@@ -3075,7 +3075,10 @@ var deviceOpsCapability = {
|
|
|
3075
3075
|
setConfig: method(z.object({
|
|
3076
3076
|
deviceId: z.number(),
|
|
3077
3077
|
values: z.record(z.string(), z.unknown())
|
|
3078
|
-
}), z.void(), {
|
|
3078
|
+
}), z.void(), {
|
|
3079
|
+
kind: "mutation",
|
|
3080
|
+
auth: "admin"
|
|
3081
|
+
}),
|
|
3079
3082
|
/**
|
|
3080
3083
|
* Invoke a device custom action on a forked/remote device (the
|
|
3081
3084
|
* cross-process transport for `IDevice.runDeviceAction`). Mirrors
|
|
@@ -3092,7 +3095,10 @@ var deviceOpsCapability = {
|
|
|
3092
3095
|
* (close sockets, stop background tasks, …). The device-manager still
|
|
3093
3096
|
* performs its own persistence cleanup before/after this call.
|
|
3094
3097
|
*/
|
|
3095
|
-
removeDevice: method(z.object({ deviceId: z.number() }), z.void(), {
|
|
3098
|
+
removeDevice: method(z.object({ deviceId: z.number() }), z.void(), {
|
|
3099
|
+
kind: "mutation",
|
|
3100
|
+
auth: "admin"
|
|
3101
|
+
}),
|
|
3096
3102
|
/**
|
|
3097
3103
|
* Build the ConfigUISchema (FormBuilder input shape) from the device's
|
|
3098
3104
|
* Zod config schema. Runs on the worker that owns the IDevice so the
|