@camstack/types 1.2.266 → 1.2.268
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 +4 -4
- package/dist/addon.mjs +3 -3
- package/dist/capabilities/battery.cap.d.ts +17 -2
- package/dist/capabilities/capability-definition.d.ts +22 -0
- package/dist/capabilities/composer.cap.d.ts +99 -0
- package/dist/capabilities/consumables.cap.d.ts +79 -0
- package/dist/capabilities/core-blocks.cap.d.ts +1149 -91
- package/dist/capabilities/device-extension.cap.d.ts +12 -13
- package/dist/capabilities/device-state.cap.d.ts +186 -2
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/pipeline-analytics.cap.d.ts +14 -0
- package/dist/composition/composition-graph.d.ts +42 -9
- package/dist/composition/composition-items.d.ts +25 -0
- package/dist/composition/composition-report.d.ts +93 -2
- package/dist/composition/composition.d.ts +154 -3
- package/dist/composition/customization-name.d.ts +6 -0
- package/dist/composition/evaluate-field.d.ts +12 -0
- package/dist/composition/examples.d.ts +33 -0
- package/dist/composition/field-kinds.d.ts +42 -0
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/plan-result.d.ts +16 -0
- package/dist/composition/state-fields.d.ts +6 -0
- package/dist/composition/validate-composition.d.ts +44 -9
- package/dist/composition-CPFIlFfw.mjs +1759 -0
- package/dist/composition-QlOB7QTG.js +2184 -0
- package/dist/device/device-context.d.ts +9 -0
- package/dist/device/device-runtime-state.d.ts +15 -1
- package/dist/device/index.d.ts +1 -1
- package/dist/device-extension/slot-descriptor.d.ts +8 -11
- package/dist/device-extension/slot-provider.d.ts +0 -2
- package/dist/enums/event-category.d.ts +25 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/err-msg-DX6i_MY4.mjs +339 -0
- package/dist/err-msg-Dx2Kor0g.js +368 -0
- package/dist/{event-category-BVDXG4tB.mjs → event-category-C5xZWqz6.mjs} +31 -1
- package/dist/{event-category-BVfsrBYA.js → event-category-MbnB-6AN.js} +48 -0
- package/dist/generated/addon-api.d.ts +42 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1548 -1660
- package/dist/index.mjs +1243 -1388
- package/dist/interfaces/kernel-abstractions.d.ts +16 -0
- package/dist/interfaces/status-overlay.d.ts +42 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +29 -8
- package/dist/node.mjs +23 -3
- package/dist/{sleep-8K9gue-H.js → sleep-BSzia-xT.js} +6 -352
- package/dist/{sleep-DC-wdyeS.mjs → sleep-jkRQgtSc.mjs} +7 -329
- package/package.json +1 -1
- package/dist/canonical-hash-CPK2Dy60.mjs +0 -715
- package/dist/canonical-hash-CSE4ioRi.js +0 -792
- package/dist/err-msg-COpsHMw2.js +0 -18
- package/dist/err-msg-IQTHeDzc.mjs +0 -13
package/dist/addon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
3
|
-
const require_event_category = require("./event-category-
|
|
4
|
-
const require_err_msg = require("./err-msg-
|
|
2
|
+
const require_sleep = require("./sleep-BSzia-xT.js");
|
|
3
|
+
const require_event_category = require("./event-category-MbnB-6AN.js");
|
|
4
|
+
const require_err_msg = require("./err-msg-Dx2Kor0g.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
|
7
7
|
* AUTO-GENERATED by scripts/generate-cap-input-defaults.ts — DO NOT EDIT.
|
|
@@ -388,7 +388,7 @@ exports.COLLECTION_ARRAY_METHODS = COLLECTION_ARRAY_METHODS;
|
|
|
388
388
|
exports.DATAPLANE_SECRET_HEADER = require_sleep.DATAPLANE_SECRET_HEADER;
|
|
389
389
|
exports.DEVICE_CHILDREN_BATCH_MAX = require_sleep.DEVICE_CHILDREN_BATCH_MAX;
|
|
390
390
|
exports.DEVICE_SCOPED_CAPS = require_sleep.DEVICE_SCOPED_CAPS;
|
|
391
|
-
exports.DeviceType =
|
|
391
|
+
exports.DeviceType = require_err_msg.DeviceType;
|
|
392
392
|
exports.DisposerChain = require_sleep.DisposerChain;
|
|
393
393
|
exports.EventCategory = require_event_category.EventCategory;
|
|
394
394
|
exports.PEER_BYTES_CHUNK_BYTES = require_sleep.PEER_BYTES_CHUNK_BYTES;
|
package/dist/addon.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as EventCategory } from "./event-category-
|
|
3
|
-
import { t as errMsg } from "./err-msg-
|
|
1
|
+
import { At as normalizeAddonInitResult, B as nodePin, Ct as PEER_BYTES_STALL_MS, D as adminUiCapability, Et as DATAPLANE_SECRET_HEADER, N as expandCapMethods, Ot as DisposerChain, Pt as emitReadiness, S as DEVICE_CHILDREN_BATCH_MAX, St as PEER_BYTES_MAX_OUTSTANDING, T as describeCustomActions, U as ReadinessRegistry, V as readNodePin, W as ReadinessTimeoutError, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, h as createEventBusSliceSource, kt as BaseAddon, m as createDeviceProxy, p as isDeviceScopedCap, q as scopeKey, s as asString, t as sleep, u as parseJsonUnknown, wt as PEER_BYTES_TICKET_TTL_MS, x as viewerUiCapability, xt as PEER_BYTES_CHUNK_BYTES } from "./sleep-jkRQgtSc.mjs";
|
|
2
|
+
import { t as EventCategory } from "./event-category-C5xZWqz6.mjs";
|
|
3
|
+
import { a as DeviceType, t as errMsg } from "./err-msg-DX6i_MY4.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
|
6
6
|
* AUTO-GENERATED by scripts/generate-cap-input-defaults.ts — DO NOT EDIT.
|
|
@@ -27,7 +27,7 @@ export declare const batteryCapability: {
|
|
|
27
27
|
readonly scope: "device";
|
|
28
28
|
readonly deviceNative: true;
|
|
29
29
|
readonly mode: "singleton";
|
|
30
|
-
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch];
|
|
30
|
+
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container];
|
|
31
31
|
readonly methods: {
|
|
32
32
|
/**
|
|
33
33
|
* Explicitly wake the camera from low-power sleep ahead of a
|
|
@@ -53,6 +53,21 @@ export declare const batteryCapability: {
|
|
|
53
53
|
durationMs: z.ZodNumber;
|
|
54
54
|
}, z.core.$strip>, "mutation">;
|
|
55
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* A composed provider (battery ADDED to a pet feeder or container that has
|
|
58
|
+
* no wake surface) answers `wakeForStream` with the same "unavailable"
|
|
59
|
+
* result the contract already defines above: "Returns `awoke: false` when
|
|
60
|
+
* … the cap surface is unavailable." (D663).
|
|
61
|
+
*/
|
|
62
|
+
readonly composedMethods: {
|
|
63
|
+
readonly wakeForStream: {
|
|
64
|
+
readonly kind: "answer";
|
|
65
|
+
readonly value: {
|
|
66
|
+
readonly awoke: false;
|
|
67
|
+
readonly durationMs: 0;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
56
71
|
readonly events: {
|
|
57
72
|
/**
|
|
58
73
|
* Emitted whenever the cached status changes (firmware push OR
|
|
@@ -95,7 +110,7 @@ export declare const batteryCapability: {
|
|
|
95
110
|
}, z.core.$strip>;
|
|
96
111
|
readonly kind: "push";
|
|
97
112
|
readonly empty: {
|
|
98
|
-
readonly percentage:
|
|
113
|
+
readonly percentage: null;
|
|
99
114
|
readonly charging: "unknown";
|
|
100
115
|
readonly sleeping: false;
|
|
101
116
|
readonly lastUpdated: 0;
|
|
@@ -370,6 +370,20 @@ export interface DeviceConfigSpec {
|
|
|
370
370
|
export type RuntimeStateDurability = 'session' | 'restored';
|
|
371
371
|
/** The default applied to a `runtimeState` cap that declares no `durability`. */
|
|
372
372
|
export declare const DEFAULT_RUNTIME_STATE_DURABILITY: RuntimeStateDurability;
|
|
373
|
+
/**
|
|
374
|
+
* How a COMPOSED provider answers a method it cannot forward yet (D663). A
|
|
375
|
+
* composition that ADDS a cap to a device serves this cap's methods from here
|
|
376
|
+
* until `forward` arrives (slice 3). A cap with a served method that is NOT
|
|
377
|
+
* listed stays uncomposable (`has-commands`). Only an answer the cap's own
|
|
378
|
+
* contract already defines as "not available" belongs here.
|
|
379
|
+
*/
|
|
380
|
+
export type ComposedMethodAnswer = {
|
|
381
|
+
readonly kind: 'refuse';
|
|
382
|
+
readonly reason: string;
|
|
383
|
+
} | {
|
|
384
|
+
readonly kind: 'answer';
|
|
385
|
+
readonly value: unknown;
|
|
386
|
+
};
|
|
373
387
|
/**
|
|
374
388
|
* Full definition of a capability — the single source of truth for the
|
|
375
389
|
* functional contract (methods + events).
|
|
@@ -426,6 +440,14 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
|
|
|
426
440
|
* from `scope:'device'` SYSTEM caps (zones/recording/motion/events) whose
|
|
427
441
|
* single provider dispatches on deviceId internally. Default: undefined/false. */
|
|
428
442
|
readonly deviceNative?: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* How a COMPOSED provider answers a method it cannot forward yet (D663). A
|
|
445
|
+
* composition that ADDS a cap to a device serves this cap's methods from
|
|
446
|
+
* here until `forward` arrives (slice 3). A cap with a served method that
|
|
447
|
+
* is NOT listed stays uncomposable (`has-commands`). Only an answer the
|
|
448
|
+
* cap's own contract already defines as "not available" belongs here.
|
|
449
|
+
*/
|
|
450
|
+
readonly composedMethods?: Readonly<Record<string, ComposedMethodAnswer>>;
|
|
429
451
|
/** Method definitions: name → { input, output } Zod schemas */
|
|
430
452
|
readonly methods: TMethods;
|
|
431
453
|
/** Event definitions: name → { data } Zod schema (optional) */
|
|
@@ -56,6 +56,36 @@ export declare const ComposerBlockSchema: z.ZodObject<{
|
|
|
56
56
|
kind: z.ZodLiteral<"code">;
|
|
57
57
|
code: z.ZodString;
|
|
58
58
|
}, z.core.$strip>], "kind">>;
|
|
59
|
+
items: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
60
|
+
label: z.ZodString;
|
|
61
|
+
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
62
|
+
source: z.ZodObject<{
|
|
63
|
+
addonId: z.ZodString;
|
|
64
|
+
stableId: z.ZodString;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
cap: z.ZodString;
|
|
67
|
+
fieldPath: z.ZodString;
|
|
68
|
+
kind: z.ZodLiteral<"from">;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
kind: z.ZodLiteral<"expression">;
|
|
71
|
+
expr: z.ZodString;
|
|
72
|
+
bindings: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
73
|
+
source: z.ZodObject<{
|
|
74
|
+
addonId: z.ZodString;
|
|
75
|
+
stableId: z.ZodString;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
cap: z.ZodString;
|
|
78
|
+
fieldPath: z.ZodString;
|
|
79
|
+
kind: z.ZodLiteral<"from">;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"literal">;
|
|
82
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
83
|
+
}, z.core.$strip>], "kind">>;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
kind: z.ZodLiteral<"code">;
|
|
86
|
+
code: z.ZodString;
|
|
87
|
+
}, z.core.$strip>], "kind">>;
|
|
88
|
+
}, z.core.$strip>>>;
|
|
59
89
|
commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
60
90
|
kind: z.ZodLiteral<"forward">;
|
|
61
91
|
source: z.ZodObject<{
|
|
@@ -141,6 +171,36 @@ export declare const ComposerApplyInputSchema: z.ZodObject<{
|
|
|
141
171
|
kind: z.ZodLiteral<"code">;
|
|
142
172
|
code: z.ZodString;
|
|
143
173
|
}, z.core.$strip>], "kind">>;
|
|
174
|
+
items: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
175
|
+
label: z.ZodString;
|
|
176
|
+
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
177
|
+
source: z.ZodObject<{
|
|
178
|
+
addonId: z.ZodString;
|
|
179
|
+
stableId: z.ZodString;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
cap: z.ZodString;
|
|
182
|
+
fieldPath: z.ZodString;
|
|
183
|
+
kind: z.ZodLiteral<"from">;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
kind: z.ZodLiteral<"expression">;
|
|
186
|
+
expr: z.ZodString;
|
|
187
|
+
bindings: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
188
|
+
source: z.ZodObject<{
|
|
189
|
+
addonId: z.ZodString;
|
|
190
|
+
stableId: z.ZodString;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
cap: z.ZodString;
|
|
193
|
+
fieldPath: z.ZodString;
|
|
194
|
+
kind: z.ZodLiteral<"from">;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
kind: z.ZodLiteral<"literal">;
|
|
197
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
198
|
+
}, z.core.$strip>], "kind">>;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
kind: z.ZodLiteral<"code">;
|
|
201
|
+
code: z.ZodString;
|
|
202
|
+
}, z.core.$strip>], "kind">>;
|
|
203
|
+
}, z.core.$strip>>>;
|
|
144
204
|
commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
145
205
|
kind: z.ZodLiteral<"forward">;
|
|
146
206
|
source: z.ZodObject<{
|
|
@@ -178,6 +238,7 @@ export declare const ComposerBlockVerdictSchema: z.ZodObject<{
|
|
|
178
238
|
failed: "failed";
|
|
179
239
|
stopped: "stopped";
|
|
180
240
|
starting: "starting";
|
|
241
|
+
degraded: "degraded";
|
|
181
242
|
}>;
|
|
182
243
|
reason: z.ZodOptional<z.ZodString>;
|
|
183
244
|
}, z.core.$strip>;
|
|
@@ -190,6 +251,7 @@ export declare const ComposerApplyResultSchema: z.ZodObject<{
|
|
|
190
251
|
failed: "failed";
|
|
191
252
|
stopped: "stopped";
|
|
192
253
|
starting: "starting";
|
|
254
|
+
degraded: "degraded";
|
|
193
255
|
}>;
|
|
194
256
|
reason: z.ZodOptional<z.ZodString>;
|
|
195
257
|
}, z.core.$strip>>;
|
|
@@ -256,6 +318,36 @@ export declare const composerCapability: {
|
|
|
256
318
|
kind: z.ZodLiteral<"code">;
|
|
257
319
|
code: z.ZodString;
|
|
258
320
|
}, z.core.$strip>], "kind">>;
|
|
321
|
+
items: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
322
|
+
label: z.ZodString;
|
|
323
|
+
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
324
|
+
source: z.ZodObject<{
|
|
325
|
+
addonId: z.ZodString;
|
|
326
|
+
stableId: z.ZodString;
|
|
327
|
+
}, z.core.$strip>;
|
|
328
|
+
cap: z.ZodString;
|
|
329
|
+
fieldPath: z.ZodString;
|
|
330
|
+
kind: z.ZodLiteral<"from">;
|
|
331
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
332
|
+
kind: z.ZodLiteral<"expression">;
|
|
333
|
+
expr: z.ZodString;
|
|
334
|
+
bindings: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
335
|
+
source: z.ZodObject<{
|
|
336
|
+
addonId: z.ZodString;
|
|
337
|
+
stableId: z.ZodString;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
cap: z.ZodString;
|
|
340
|
+
fieldPath: z.ZodString;
|
|
341
|
+
kind: z.ZodLiteral<"from">;
|
|
342
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
343
|
+
kind: z.ZodLiteral<"literal">;
|
|
344
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
345
|
+
}, z.core.$strip>], "kind">>;
|
|
346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
+
kind: z.ZodLiteral<"code">;
|
|
348
|
+
code: z.ZodString;
|
|
349
|
+
}, z.core.$strip>], "kind">>;
|
|
350
|
+
}, z.core.$strip>>>;
|
|
259
351
|
commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
260
352
|
kind: z.ZodLiteral<"forward">;
|
|
261
353
|
source: z.ZodObject<{
|
|
@@ -292,6 +384,7 @@ export declare const composerCapability: {
|
|
|
292
384
|
failed: "failed";
|
|
293
385
|
stopped: "stopped";
|
|
294
386
|
starting: "starting";
|
|
387
|
+
degraded: "degraded";
|
|
295
388
|
}>;
|
|
296
389
|
reason: z.ZodOptional<z.ZodString>;
|
|
297
390
|
}, z.core.$strip>>;
|
|
@@ -308,11 +401,17 @@ export declare const composerCapability: {
|
|
|
308
401
|
failed: "failed";
|
|
309
402
|
stopped: "stopped";
|
|
310
403
|
starting: "starting";
|
|
404
|
+
degraded: "degraded";
|
|
311
405
|
}>;
|
|
312
406
|
reason: z.ZodOptional<z.ZodString>;
|
|
313
407
|
fields: z.ZodArray<z.ZodObject<{
|
|
314
408
|
cap: z.ZodString;
|
|
315
409
|
path: z.ZodString;
|
|
410
|
+
item: z.ZodOptional<z.ZodObject<{
|
|
411
|
+
arrayPath: z.ZodString;
|
|
412
|
+
key: z.ZodString;
|
|
413
|
+
label: z.ZodString;
|
|
414
|
+
}, z.core.$strip>>;
|
|
316
415
|
state: z.ZodEnum<{
|
|
317
416
|
unavailable: "unavailable";
|
|
318
417
|
fresh: "fresh";
|
|
@@ -13,6 +13,25 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
13
13
|
* provider populates it by guessing (no HA inference). The UI renders a
|
|
14
14
|
* "No consumables reported" placeholder when `items` is empty.
|
|
15
15
|
*/
|
|
16
|
+
/** Units a remaining-life counter is reported in. Closed: the panel renders
|
|
17
|
+
* each. */
|
|
18
|
+
export declare const ConsumableRemainingUnitSchema: z.ZodEnum<{
|
|
19
|
+
cycles: "cycles";
|
|
20
|
+
days: "days";
|
|
21
|
+
hours: "hours";
|
|
22
|
+
}>;
|
|
23
|
+
export type ConsumableRemainingUnit = z.infer<typeof ConsumableRemainingUnitSchema>;
|
|
24
|
+
/** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
|
|
25
|
+
* days). `value` null = unknown (D393). */
|
|
26
|
+
export declare const ConsumableRemainingSchema: z.ZodObject<{
|
|
27
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
28
|
+
unit: z.ZodEnum<{
|
|
29
|
+
cycles: "cycles";
|
|
30
|
+
days: "days";
|
|
31
|
+
hours: "hours";
|
|
32
|
+
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type ConsumableRemaining = z.infer<typeof ConsumableRemainingSchema>;
|
|
16
35
|
/** A single consumable item. Either a continuous `level` (remaining
|
|
17
36
|
* life %) or a discrete `status` may be known — both may be null when a
|
|
18
37
|
* provider only knows the item exists. `level` and `status` are not
|
|
@@ -27,6 +46,14 @@ export declare const ConsumableItemSchema: z.ZodObject<{
|
|
|
27
46
|
}>>;
|
|
28
47
|
lastResetAt: z.ZodNullable<z.ZodNumber>;
|
|
29
48
|
resettable: z.ZodBoolean;
|
|
49
|
+
remaining: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
unit: z.ZodEnum<{
|
|
52
|
+
cycles: "cycles";
|
|
53
|
+
days: "days";
|
|
54
|
+
hours: "hours";
|
|
55
|
+
}>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
30
57
|
}, z.core.$strip>;
|
|
31
58
|
export declare const ConsumablesStatusSchema: z.ZodObject<{
|
|
32
59
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -39,6 +66,14 @@ export declare const ConsumablesStatusSchema: z.ZodObject<{
|
|
|
39
66
|
}>>;
|
|
40
67
|
lastResetAt: z.ZodNullable<z.ZodNumber>;
|
|
41
68
|
resettable: z.ZodBoolean;
|
|
69
|
+
remaining: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
71
|
+
unit: z.ZodEnum<{
|
|
72
|
+
cycles: "cycles";
|
|
73
|
+
days: "days";
|
|
74
|
+
hours: "hours";
|
|
75
|
+
}>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
42
77
|
}, z.core.$strip>>;
|
|
43
78
|
lastChangedAt: z.ZodNumber;
|
|
44
79
|
}, z.core.$strip>;
|
|
@@ -68,6 +103,18 @@ export declare const consumablesCapability: {
|
|
|
68
103
|
key: z.ZodString;
|
|
69
104
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
70
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* A composed consumable (item added to a device with no native consumables
|
|
108
|
+
* provider) refuses `reset` by name: "Only meaningful when the item's
|
|
109
|
+
* `resettable` is true" — a composed item is never resettable until
|
|
110
|
+
* commands (`forward`) arrive in slice 3 (D663).
|
|
111
|
+
*/
|
|
112
|
+
readonly composedMethods: {
|
|
113
|
+
readonly reset: {
|
|
114
|
+
readonly kind: "refuse";
|
|
115
|
+
readonly reason: "a composed consumable is not resettable until commands (forward) arrive — slice 3";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
71
118
|
readonly status: {
|
|
72
119
|
readonly schema: z.ZodObject<{
|
|
73
120
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -80,6 +127,14 @@ export declare const consumablesCapability: {
|
|
|
80
127
|
}>>;
|
|
81
128
|
lastResetAt: z.ZodNullable<z.ZodNumber>;
|
|
82
129
|
resettable: z.ZodBoolean;
|
|
130
|
+
remaining: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
132
|
+
unit: z.ZodEnum<{
|
|
133
|
+
cycles: "cycles";
|
|
134
|
+
days: "days";
|
|
135
|
+
hours: "hours";
|
|
136
|
+
}>;
|
|
137
|
+
}, z.core.$strip>>;
|
|
83
138
|
}, z.core.$strip>>;
|
|
84
139
|
lastChangedAt: z.ZodNumber;
|
|
85
140
|
}, z.core.$strip>;
|
|
@@ -92,6 +147,10 @@ export declare const consumablesCapability: {
|
|
|
92
147
|
status: "replace" | "ok" | null;
|
|
93
148
|
lastResetAt: number | null;
|
|
94
149
|
resettable: boolean;
|
|
150
|
+
remaining?: {
|
|
151
|
+
value: number | null;
|
|
152
|
+
unit: "cycles" | "days" | "hours";
|
|
153
|
+
} | undefined;
|
|
95
154
|
}[];
|
|
96
155
|
lastChangedAt: number;
|
|
97
156
|
};
|
|
@@ -109,6 +168,14 @@ export declare const consumablesCapability: {
|
|
|
109
168
|
}>>;
|
|
110
169
|
lastResetAt: z.ZodNullable<z.ZodNumber>;
|
|
111
170
|
resettable: z.ZodBoolean;
|
|
171
|
+
remaining: z.ZodOptional<z.ZodObject<{
|
|
172
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
173
|
+
unit: z.ZodEnum<{
|
|
174
|
+
cycles: "cycles";
|
|
175
|
+
days: "days";
|
|
176
|
+
hours: "hours";
|
|
177
|
+
}>;
|
|
178
|
+
}, z.core.$strip>>;
|
|
112
179
|
}, z.core.$strip>;
|
|
113
180
|
readonly emptyItem: {
|
|
114
181
|
key: string;
|
|
@@ -117,6 +184,10 @@ export declare const consumablesCapability: {
|
|
|
117
184
|
status: "replace" | "ok" | null;
|
|
118
185
|
lastResetAt: number | null;
|
|
119
186
|
resettable: boolean;
|
|
187
|
+
remaining?: {
|
|
188
|
+
value: number | null;
|
|
189
|
+
unit: "cycles" | "days" | "hours";
|
|
190
|
+
} | undefined;
|
|
120
191
|
};
|
|
121
192
|
};
|
|
122
193
|
};
|
|
@@ -131,6 +202,14 @@ export declare const consumablesCapability: {
|
|
|
131
202
|
}>>;
|
|
132
203
|
lastResetAt: z.ZodNullable<z.ZodNumber>;
|
|
133
204
|
resettable: z.ZodBoolean;
|
|
205
|
+
remaining: z.ZodOptional<z.ZodObject<{
|
|
206
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
207
|
+
unit: z.ZodEnum<{
|
|
208
|
+
cycles: "cycles";
|
|
209
|
+
days: "days";
|
|
210
|
+
hours: "hours";
|
|
211
|
+
}>;
|
|
212
|
+
}, z.core.$strip>>;
|
|
134
213
|
}, z.core.$strip>>;
|
|
135
214
|
lastChangedAt: z.ZodNumber;
|
|
136
215
|
lastFetchedAt: z.ZodNumber;
|