@camstack/types 1.2.65 → 1.2.67

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.
Files changed (79) hide show
  1. package/dist/addon.js +2 -2
  2. package/dist/addon.mjs +2 -2
  3. package/dist/capabilities/air-quality-sensor.cap.d.ts +10 -0
  4. package/dist/capabilities/alarm-panel.cap.d.ts +10 -0
  5. package/dist/capabilities/ambient-light-sensor.cap.d.ts +10 -0
  6. package/dist/capabilities/audio-metrics.cap.d.ts +7 -0
  7. package/dist/capabilities/automation-control.cap.d.ts +7 -0
  8. package/dist/capabilities/battery.cap.d.ts +10 -0
  9. package/dist/capabilities/binary.cap.d.ts +10 -0
  10. package/dist/capabilities/brightness.cap.d.ts +7 -0
  11. package/dist/capabilities/camera-streams.cap.d.ts +7 -0
  12. package/dist/capabilities/capability-definition.d.ts +58 -0
  13. package/dist/capabilities/carbon-monoxide.cap.d.ts +10 -0
  14. package/dist/capabilities/climate-control.cap.d.ts +7 -0
  15. package/dist/capabilities/color.cap.d.ts +7 -0
  16. package/dist/capabilities/connectivity.cap.d.ts +10 -0
  17. package/dist/capabilities/consumables.cap.d.ts +7 -0
  18. package/dist/capabilities/contact.cap.d.ts +10 -0
  19. package/dist/capabilities/control.cap.d.ts +7 -0
  20. package/dist/capabilities/cover.cap.d.ts +10 -0
  21. package/dist/capabilities/day-night.cap.d.ts +10 -0
  22. package/dist/capabilities/device-discovery.cap.d.ts +7 -0
  23. package/dist/capabilities/device-status.cap.d.ts +10 -0
  24. package/dist/capabilities/doorbell.cap.d.ts +7 -0
  25. package/dist/capabilities/enum-sensor.cap.d.ts +10 -0
  26. package/dist/capabilities/event-emitter.cap.d.ts +7 -0
  27. package/dist/capabilities/fan-control.cap.d.ts +7 -0
  28. package/dist/capabilities/feature-probe.cap.d.ts +7 -0
  29. package/dist/capabilities/flood.cap.d.ts +10 -0
  30. package/dist/capabilities/gas.cap.d.ts +10 -0
  31. package/dist/capabilities/humidifier.cap.d.ts +7 -0
  32. package/dist/capabilities/humidity-sensor.cap.d.ts +10 -0
  33. package/dist/capabilities/image-settings.cap.d.ts +10 -0
  34. package/dist/capabilities/image.cap.d.ts +7 -0
  35. package/dist/capabilities/index.d.ts +3 -3
  36. package/dist/capabilities/lawn-mower-control.cap.d.ts +7 -0
  37. package/dist/capabilities/lock-control.cap.d.ts +10 -0
  38. package/dist/capabilities/media-player.cap.d.ts +7 -0
  39. package/dist/capabilities/motion-trigger.cap.d.ts +7 -0
  40. package/dist/capabilities/motion-zones.cap.d.ts +10 -0
  41. package/dist/capabilities/motion.cap.d.ts +7 -0
  42. package/dist/capabilities/native-object-detection.cap.d.ts +10 -0
  43. package/dist/capabilities/notification-output.cap.d.ts +62 -0
  44. package/dist/capabilities/notification-rules.cap.d.ts +134 -6
  45. package/dist/capabilities/notifier.cap.d.ts +7 -0
  46. package/dist/capabilities/numeric-sensor.cap.d.ts +10 -0
  47. package/dist/capabilities/osd-manager.cap.d.ts +14 -0
  48. package/dist/capabilities/pet-feeder.cap.d.ts +7 -0
  49. package/dist/capabilities/power-meter.cap.d.ts +10 -0
  50. package/dist/capabilities/presence.cap.d.ts +10 -0
  51. package/dist/capabilities/pressure-sensor.cap.d.ts +10 -0
  52. package/dist/capabilities/privacy-mask.cap.d.ts +10 -0
  53. package/dist/capabilities/ptz-autotrack.cap.d.ts +7 -0
  54. package/dist/capabilities/scene-monitor.cap.d.ts +7 -0
  55. package/dist/capabilities/script-runner.cap.d.ts +7 -0
  56. package/dist/capabilities/smoke.cap.d.ts +10 -0
  57. package/dist/capabilities/stream-params.cap.d.ts +10 -0
  58. package/dist/capabilities/switch.cap.d.ts +10 -0
  59. package/dist/capabilities/tamper.cap.d.ts +10 -0
  60. package/dist/capabilities/temperature-sensor.cap.d.ts +10 -0
  61. package/dist/capabilities/update.cap.d.ts +7 -0
  62. package/dist/capabilities/vacuum-control.cap.d.ts +7 -0
  63. package/dist/capabilities/valve.cap.d.ts +7 -0
  64. package/dist/capabilities/vibration.cap.d.ts +10 -0
  65. package/dist/capabilities/water-heater.cap.d.ts +7 -0
  66. package/dist/capabilities/weather.cap.d.ts +7 -0
  67. package/dist/capabilities/zone-analytics.cap.d.ts +7 -0
  68. package/dist/capabilities/zone-rules.cap.d.ts +7 -0
  69. package/dist/capabilities/zones.cap.d.ts +7 -0
  70. package/dist/catalogs/coco-classmap.d.ts +21 -0
  71. package/dist/device/system-mirror.d.ts +37 -0
  72. package/dist/generated/runtime-state-durability.d.ts +31 -0
  73. package/dist/index.d.ts +4 -1
  74. package/dist/index.js +1345 -91
  75. package/dist/index.mjs +1322 -92
  76. package/dist/notification/audio-condition.d.ts +118 -0
  77. package/dist/{sleep-BxjBLp3L.mjs → sleep-CSgK0rNX.mjs} +3 -1
  78. package/dist/{sleep-BszXLEvP.js → sleep-Dh1EJSqF.js} +8 -0
  79. package/package.json +1 -1
@@ -109,5 +109,12 @@ export declare const lawnMowerControlCapability: {
109
109
  }>;
110
110
  lastChangedAt: z.ZodNumber;
111
111
  }, z.core.$strip>;
112
+ /**
113
+ * Runtime-state durability: **session** — as `vacuum-control`.
114
+ *
115
+ * See `RuntimeStateDurability`. Enforced by
116
+ * `scripts/check-runtime-state-durability.ts`.
117
+ */
118
+ readonly durability: "session";
112
119
  };
113
120
  export type ILawnMowerControlProvider = InferProvider<typeof lawnMowerControlCapability>;
@@ -87,5 +87,15 @@ export declare const lockControlCapability: {
87
87
  }>;
88
88
  lastChangedAt: z.ZodNumber;
89
89
  }, z.core.$strip>;
90
+ /**
91
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
92
+ *
93
+ * See `RuntimeStateDurability`. Enforced by
94
+ * `scripts/check-runtime-state-durability.ts`.
95
+ */
96
+ readonly durability: "restored";
97
+ /** Clock fields: written, but excluded from the compare that decides
98
+ * whether persisting is worth a SQLite commit. */
99
+ readonly volatileStateFields: readonly ["lastChangedAt"];
90
100
  };
91
101
  export type ILockControlProvider = InferProvider<typeof lockControlCapability>;
@@ -195,6 +195,13 @@ export declare const mediaPlayerCapability: {
195
195
  }>>;
196
196
  lastChangedAt: z.ZodNumber;
197
197
  }, z.core.$strip>;
198
+ /**
199
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
200
+ *
201
+ * See `RuntimeStateDurability`. Enforced by
202
+ * `scripts/check-runtime-state-durability.ts`.
203
+ */
204
+ readonly durability: "session";
198
205
  };
199
206
  export type IMediaPlayerProvider = InferProvider<typeof mediaPlayerCapability>;
200
207
  export {};
@@ -74,5 +74,12 @@ export declare const motionTriggerCapability: {
74
74
  lastChangedAt: z.ZodNumber;
75
75
  lastFetchedAt: z.ZodNumber;
76
76
  }, z.core.$strip>;
77
+ /**
78
+ * Runtime-state durability: **session** — the authority for motion-trigger enablement is the provider's own config; the slice is a mirror of it, re-published on connect.
79
+ *
80
+ * See `RuntimeStateDurability`. Enforced by
81
+ * `scripts/check-runtime-state-durability.ts`.
82
+ */
83
+ readonly durability: "session";
77
84
  };
78
85
  export type IMotionTriggerProvider = InferProvider<typeof motionTriggerCapability>;
@@ -160,5 +160,15 @@ export declare const motionZonesCapability: {
160
160
  }, z.core.$strip>>;
161
161
  lastFetchedAt: z.ZodNumber;
162
162
  }, z.core.$strip>;
163
+ /**
164
+ * Runtime-state durability: **restored** — the 14 KB polygon list is the single largest slice on the fleet and has not changed since the operator drew it. Highest value per byte in the table.
165
+ *
166
+ * See `RuntimeStateDurability`. Enforced by
167
+ * `scripts/check-runtime-state-durability.ts`.
168
+ */
169
+ readonly durability: "restored";
170
+ /** Clock fields: written, but excluded from the compare that decides
171
+ * whether persisting is worth a SQLite commit. */
172
+ readonly volatileStateFields: readonly ["lastFetchedAt"];
163
173
  };
164
174
  export type IMotionZonesProvider = InferNativeProvider<typeof motionZonesCapability>;
@@ -129,5 +129,12 @@ export declare const motionCapability: {
129
129
  lastDetectedAt: z.ZodNullable<z.ZodNumber>;
130
130
  autoClearAfterMs: z.ZodNullable<z.ZodNumber>;
131
131
  }, z.core.$strip>;
132
+ /**
133
+ * Runtime-state durability: **session** — self-clearing by construction (`autoClearAfterMs`); a restored `detected: true` is a frozen event, and the next frame re-publishes the real one.
134
+ *
135
+ * See `RuntimeStateDurability`. Enforced by
136
+ * `scripts/check-runtime-state-durability.ts`.
137
+ */
138
+ readonly durability: "session";
132
139
  };
133
140
  export type IMotionProvider = InferProvider<typeof motionCapability>;
@@ -193,5 +193,15 @@ export declare const nativeObjectDetectionCapability: {
193
193
  enabled: z.ZodBoolean;
194
194
  lastFetchedAt: z.ZodNumber;
195
195
  }, z.core.$strip>;
196
+ /**
197
+ * Runtime-state durability: **restored** — `enabled` is an operator toggle on a camera whose refresh is a no-op and whose staleMs is Infinity. There is no hardware value to re-read — losing it loses the setting.
198
+ *
199
+ * See `RuntimeStateDurability`. Enforced by
200
+ * `scripts/check-runtime-state-durability.ts`.
201
+ */
202
+ readonly durability: "restored";
203
+ /** Clock fields: written, but excluded from the compare that decides
204
+ * whether persisting is worth a SQLite commit. */
205
+ readonly volatileStateFields: readonly ["lastFetchedAt"];
196
206
  };
197
207
  export type INativeObjectDetectionProvider = InferProvider<typeof nativeObjectDetectionCapability>;
@@ -82,8 +82,30 @@ export type NotificationFormat = z.infer<typeof NotificationFormatSchema>;
82
82
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
83
83
  * renderer's icon set; "acknowledge" survives an adapter that draws it
84
84
  * differently.
85
+ *
86
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
87
+ *
88
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
89
+ * the whole set onto its own renderer's vocabulary through a
90
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
91
+ * fallback, so adding a member here fails every adapter's build until someone
92
+ * decides its glyph, which is the only place that decision can be made
93
+ * honestly.
94
+ *
95
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
96
+ * `disarm` straight through; iOS feeds that string to
97
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
98
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
99
+ * mapping, and "the field is documented" is not "the value renders".
100
+ *
101
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
102
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
103
+ * so an addon that emits a token the running hub does not know does not lose an
104
+ * icon — its whole `send` fails Zod validation and the notification never
105
+ * arrives. Never emit a new token from an addon before the train carrying it.
85
106
  */
86
107
  export declare const NotificationActionIconSchema: z.ZodEnum<{
108
+ camera: "camera";
87
109
  light: "light";
88
110
  lock: "lock";
89
111
  view: "view";
@@ -96,6 +118,10 @@ export declare const NotificationActionIconSchema: z.ZodEnum<{
96
118
  play: "play";
97
119
  acknowledge: "acknowledge";
98
120
  silence: "silence";
121
+ snooze: "snooze";
122
+ "arm-home": "arm-home";
123
+ "arm-away": "arm-away";
124
+ "arm-night": "arm-night";
99
125
  alert: "alert";
100
126
  }>;
101
127
  export type NotificationActionIcon = z.infer<typeof NotificationActionIconSchema>;
@@ -105,6 +131,7 @@ export declare const NotificationActionSchema: z.ZodObject<{
105
131
  label: z.ZodString;
106
132
  url: z.ZodOptional<z.ZodString>;
107
133
  icon: z.ZodOptional<z.ZodEnum<{
134
+ camera: "camera";
108
135
  light: "light";
109
136
  lock: "lock";
110
137
  view: "view";
@@ -117,9 +144,17 @@ export declare const NotificationActionSchema: z.ZodObject<{
117
144
  play: "play";
118
145
  acknowledge: "acknowledge";
119
146
  silence: "silence";
147
+ snooze: "snooze";
148
+ "arm-home": "arm-home";
149
+ "arm-away": "arm-away";
150
+ "arm-night": "arm-night";
120
151
  alert: "alert";
121
152
  }>>;
122
153
  destructive: z.ZodOptional<z.ZodBoolean>;
154
+ mode: z.ZodOptional<z.ZodEnum<{
155
+ navigate: "navigate";
156
+ background: "background";
157
+ }>>;
123
158
  }, z.core.$strip>;
124
159
  export type NotificationAction = z.infer<typeof NotificationActionSchema>;
125
160
  /**
@@ -159,6 +194,7 @@ export declare const NotificationSchema: z.ZodObject<{
159
194
  label: z.ZodString;
160
195
  url: z.ZodOptional<z.ZodString>;
161
196
  icon: z.ZodOptional<z.ZodEnum<{
197
+ camera: "camera";
162
198
  light: "light";
163
199
  lock: "lock";
164
200
  view: "view";
@@ -171,9 +207,17 @@ export declare const NotificationSchema: z.ZodObject<{
171
207
  play: "play";
172
208
  acknowledge: "acknowledge";
173
209
  silence: "silence";
210
+ snooze: "snooze";
211
+ "arm-home": "arm-home";
212
+ "arm-away": "arm-away";
213
+ "arm-night": "arm-night";
174
214
  alert: "alert";
175
215
  }>>;
176
216
  destructive: z.ZodOptional<z.ZodBoolean>;
217
+ mode: z.ZodOptional<z.ZodEnum<{
218
+ navigate: "navigate";
219
+ background: "background";
220
+ }>>;
177
221
  }, z.core.$strip>>>;
178
222
  sound: z.ZodOptional<z.ZodString>;
179
223
  ttl: z.ZodOptional<z.ZodNumber>;
@@ -484,6 +528,7 @@ export declare const notificationOutputCapability: {
484
528
  label: z.ZodString;
485
529
  url: z.ZodOptional<z.ZodString>;
486
530
  icon: z.ZodOptional<z.ZodEnum<{
531
+ camera: "camera";
487
532
  light: "light";
488
533
  lock: "lock";
489
534
  view: "view";
@@ -496,9 +541,17 @@ export declare const notificationOutputCapability: {
496
541
  play: "play";
497
542
  acknowledge: "acknowledge";
498
543
  silence: "silence";
544
+ snooze: "snooze";
545
+ "arm-home": "arm-home";
546
+ "arm-away": "arm-away";
547
+ "arm-night": "arm-night";
499
548
  alert: "alert";
500
549
  }>>;
501
550
  destructive: z.ZodOptional<z.ZodBoolean>;
551
+ mode: z.ZodOptional<z.ZodEnum<{
552
+ navigate: "navigate";
553
+ background: "background";
554
+ }>>;
502
555
  }, z.core.$strip>>>;
503
556
  sound: z.ZodOptional<z.ZodString>;
504
557
  ttl: z.ZodOptional<z.ZodNumber>;
@@ -554,6 +607,7 @@ export declare const notificationOutputCapability: {
554
607
  label: z.ZodString;
555
608
  url: z.ZodOptional<z.ZodString>;
556
609
  icon: z.ZodOptional<z.ZodEnum<{
610
+ camera: "camera";
557
611
  light: "light";
558
612
  lock: "lock";
559
613
  view: "view";
@@ -566,9 +620,17 @@ export declare const notificationOutputCapability: {
566
620
  play: "play";
567
621
  acknowledge: "acknowledge";
568
622
  silence: "silence";
623
+ snooze: "snooze";
624
+ "arm-home": "arm-home";
625
+ "arm-away": "arm-away";
626
+ "arm-night": "arm-night";
569
627
  alert: "alert";
570
628
  }>>;
571
629
  destructive: z.ZodOptional<z.ZodBoolean>;
630
+ mode: z.ZodOptional<z.ZodEnum<{
631
+ navigate: "navigate";
632
+ background: "background";
633
+ }>>;
572
634
  }, z.core.$strip>>>;
573
635
  sound: z.ZodOptional<z.ZodString>;
574
636
  ttl: z.ZodOptional<z.ZodNumber>;