@camstack/types 1.2.28 → 1.2.29

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.
@@ -748,9 +748,23 @@ export declare const deviceManagerCapability: {
748
748
  parentDeviceId: z.ZodNullable<z.ZodNumber>;
749
749
  role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
750
750
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
751
- /** List all devices (live registry), optionally filtered by addonId. */
751
+ /**
752
+ * List all devices (live registry), optionally filtered by addonId.
753
+ *
754
+ * **Ask for `projection: 'slim'` unless you need `config`.** A full listing
755
+ * of 293 devices measured 271 KB, of which `config` was 113 KB and
756
+ * `metadata` 22 KB — half the payload — and the viewer's camera list, the
757
+ * largest consumer, reads 1.8 KB of it. Worse, the persisted branch reads
758
+ * each device's settings row one at a time, so `config` costs a
759
+ * per-device round-trip as well as its bytes.
760
+ */
752
761
  readonly listAll: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
753
762
  addonId: z.ZodOptional<z.ZodString>;
763
+ projection: z.ZodOptional<z.ZodEnum<{
764
+ full: "full";
765
+ slim: "slim";
766
+ }>>;
767
+ isCamera: z.ZodOptional<z.ZodBoolean>;
754
768
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
755
769
  id: z.ZodNumber;
756
770
  stableId: z.ZodString;
@@ -18,8 +18,8 @@ export declare const IntercomAbilitySchema: z.ZodObject<{
18
18
  codecs: z.ZodArray<z.ZodString>;
19
19
  sampleRate: z.ZodNumber;
20
20
  duplex: z.ZodEnum<{
21
- half: "half";
22
21
  full: "full";
22
+ half: "half";
23
23
  }>;
24
24
  maxBacklogMs: z.ZodNumber;
25
25
  }, z.core.$strip>;
@@ -31,8 +31,8 @@ export declare const IntercomStatusSchema: z.ZodObject<{
31
31
  codecs: z.ZodArray<z.ZodString>;
32
32
  sampleRate: z.ZodNumber;
33
33
  duplex: z.ZodEnum<{
34
- half: "half";
35
34
  full: "full";
35
+ half: "half";
36
36
  }>;
37
37
  maxBacklogMs: z.ZodNumber;
38
38
  }, z.core.$strip>>;
@@ -152,8 +152,8 @@ export declare const intercomCapability: {
152
152
  codecs: z.ZodArray<z.ZodString>;
153
153
  sampleRate: z.ZodNumber;
154
154
  duplex: z.ZodEnum<{
155
- half: "half";
156
155
  full: "full";
156
+ half: "half";
157
157
  }>;
158
158
  maxBacklogMs: z.ZodNumber;
159
159
  }, z.core.$strip>>;
@@ -169,8 +169,8 @@ export declare const intercomCapability: {
169
169
  codecs: z.ZodArray<z.ZodString>;
170
170
  sampleRate: z.ZodNumber;
171
171
  duplex: z.ZodEnum<{
172
- half: "half";
173
172
  full: "full";
173
+ half: "half";
174
174
  }>;
175
175
  maxBacklogMs: z.ZodNumber;
176
176
  }, z.core.$strip>>;
package/dist/index.js CHANGED
@@ -19055,8 +19055,30 @@ var deviceManagerCapability = {
19055
19055
  }),
19056
19056
  /** List persisted devices for an addon (DB, for restore). */
19057
19057
  listPersistedByAddon: require_sleep.method(zod.z.object({ addonId: zod.z.string() }), zod.z.array(SavedDeviceRowSchema)),
19058
- /** List all devices (live registry), optionally filtered by addonId. */
19059
- listAll: require_sleep.method(zod.z.object({ addonId: zod.z.string().optional() }), zod.z.array(DeviceInfoSchema)),
19058
+ /**
19059
+ * List all devices (live registry), optionally filtered by addonId.
19060
+ *
19061
+ * **Ask for `projection: 'slim'` unless you need `config`.** A full listing
19062
+ * of 293 devices measured 271 KB, of which `config` was 113 KB and
19063
+ * `metadata` 22 KB — half the payload — and the viewer's camera list, the
19064
+ * largest consumer, reads 1.8 KB of it. Worse, the persisted branch reads
19065
+ * each device's settings row one at a time, so `config` costs a
19066
+ * per-device round-trip as well as its bytes.
19067
+ */
19068
+ listAll: require_sleep.method(zod.z.object({
19069
+ addonId: zod.z.string().optional(),
19070
+ /**
19071
+ * `slim` omits `config` (returned `{}`), `metadata` (null) and the
19072
+ * `sourceInfo` derived from config — and skips the per-device settings
19073
+ * read that produces them. Everything identifying a device (id, name,
19074
+ * type, online, features, isCamera, parent/link ids) is unchanged.
19075
+ * Do not use it for dispatch routing, which needs `sourceInfo`.
19076
+ */
19077
+ projection: zod.z.enum(["full", "slim"]).optional(),
19078
+ /** Return only camera devices. Filtering server-side instead of
19079
+ * shipping 293 rows to find 12. */
19080
+ isCamera: zod.z.boolean().optional()
19081
+ }), zod.z.array(DeviceInfoSchema)),
19060
19082
  /** Get a single device by numeric deviceId. */
19061
19083
  getDevice: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), DeviceInfoSchema.nullable()),
19062
19084
  /** List children of a parent device (by parent numeric id). */
package/dist/index.mjs CHANGED
@@ -19054,8 +19054,30 @@ var deviceManagerCapability = {
19054
19054
  }),
19055
19055
  /** List persisted devices for an addon (DB, for restore). */
19056
19056
  listPersistedByAddon: method(z.object({ addonId: z.string() }), z.array(SavedDeviceRowSchema)),
19057
- /** List all devices (live registry), optionally filtered by addonId. */
19058
- listAll: method(z.object({ addonId: z.string().optional() }), z.array(DeviceInfoSchema)),
19057
+ /**
19058
+ * List all devices (live registry), optionally filtered by addonId.
19059
+ *
19060
+ * **Ask for `projection: 'slim'` unless you need `config`.** A full listing
19061
+ * of 293 devices measured 271 KB, of which `config` was 113 KB and
19062
+ * `metadata` 22 KB — half the payload — and the viewer's camera list, the
19063
+ * largest consumer, reads 1.8 KB of it. Worse, the persisted branch reads
19064
+ * each device's settings row one at a time, so `config` costs a
19065
+ * per-device round-trip as well as its bytes.
19066
+ */
19067
+ listAll: method(z.object({
19068
+ addonId: z.string().optional(),
19069
+ /**
19070
+ * `slim` omits `config` (returned `{}`), `metadata` (null) and the
19071
+ * `sourceInfo` derived from config — and skips the per-device settings
19072
+ * read that produces them. Everything identifying a device (id, name,
19073
+ * type, online, features, isCamera, parent/link ids) is unchanged.
19074
+ * Do not use it for dispatch routing, which needs `sourceInfo`.
19075
+ */
19076
+ projection: z.enum(["full", "slim"]).optional(),
19077
+ /** Return only camera devices. Filtering server-side instead of
19078
+ * shipping 293 rows to find 12. */
19079
+ isCamera: z.boolean().optional()
19080
+ }), z.array(DeviceInfoSchema)),
19059
19081
  /** Get a single device by numeric deviceId. */
19060
19082
  getDevice: method(z.object({ deviceId: z.number() }), DeviceInfoSchema.nullable()),
19061
19083
  /** List children of a parent device (by parent numeric id). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.28",
3
+ "version": "1.2.29",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",