@camstack/addon-provider-dreame 0.2.41 → 0.2.43

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 (3) hide show
  1. package/dist/addon.js +154 -19
  2. package/dist/addon.mjs +154 -19
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -58544,18 +58544,61 @@ var RelocateFootageInputSchema = object({
58544
58544
  * `RecordingConfig.enabled` or camera wrapper bindings. */
58545
58545
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
58546
58546
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
58547
+ /**
58548
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
58549
+ * mover (the engine already walks both collections with a timestamp cursor and
58550
+ * already has a stamp-without-copy path).
58551
+ *
58552
+ * - `move` — the default and the historical behaviour: event-media and
58553
+ * retrain blobs move to `toLocationId` and their rows are
58554
+ * stamped. The enrolled gallery is skipped (D197).
58555
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
58556
+ * stamped with `toLocationId`. `toLocationId` here is the id the
58557
+ * bytes ALREADY sit on — today's `eventMedia` default — because
58558
+ * a NULL row means "wherever `eventMedia` points *now*", and the
58559
+ * instant a repoint moves that pointer the row reads from the
58560
+ * new disk while its bytes are on the old one.
58561
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
58562
+ * (enrolled-gallery) rows, which `move` deliberately skips.
58563
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
58564
+ * never run beside a live second location: it is stop-the-world
58565
+ * by construction, which is acceptable only because the gallery
58566
+ * is a few KB per enrolled sample.
58567
+ */
58568
+ var MediaRelocateModeSchema = _enum([
58569
+ "move",
58570
+ "seal",
58571
+ "gallery"
58572
+ ]);
58547
58573
  var RelocateMediaInputSchema = object({
58548
58574
  toLocationId: string(),
58549
- throttleMbps: number().min(1).max(1e3).optional()
58575
+ throttleMbps: number().min(1).max(1e3).optional(),
58576
+ /** Omitted = `move`, the pre-existing behaviour. */
58577
+ mode: MediaRelocateModeSchema.optional()
58578
+ });
58579
+ /** How many rows still carry NO `locationId` — the population a repoint would
58580
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
58581
+ * value that permits a non-blocking `eventMedia` cutover. */
58582
+ var UnstampedEventMediaCountSchema = object({
58583
+ media: number().int().nonnegative(),
58584
+ retrainFrames: number().int().nonnegative(),
58585
+ total: number().int().nonnegative()
58550
58586
  });
58551
58587
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
58552
- /** The independently selectable logical storage classes. `recordings`
58553
- * encompasses the high and mid segment profiles; `recordingsLow` is low
58554
- * segments; `eventMedia` is post-analysis blobs. */
58588
+ /** The independently selectable logical storage classes — every class
58589
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
58590
+ * Zod enum error where they should meet an explanation.
58591
+ *
58592
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
58593
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
58594
+ * enrolled gallery; `backups` is the system backup archive. The last two have
58595
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
58555
58596
  var StorageMigrationClassSchema = _enum([
58556
58597
  "recordings",
58557
58598
  "recordingsLow",
58558
- "eventMedia"
58599
+ "eventMedia",
58600
+ "backups",
58601
+ "galleryMedia"
58559
58602
  ]);
58560
58603
  /** A destination is always an existing, fully-qualified location id. The
58561
58604
  * migration API intentionally never changes a source location's `basePath`:
@@ -58563,20 +58606,56 @@ var StorageMigrationClassSchema = _enum([
58563
58606
  var StorageMigrationDestinationsSchema = object({
58564
58607
  recordings: string().min(1).optional(),
58565
58608
  recordingsLow: string().min(1).optional(),
58566
- eventMedia: string().min(1).optional()
58609
+ eventMedia: string().min(1).optional(),
58610
+ backups: string().min(1).optional(),
58611
+ galleryMedia: string().min(1).optional()
58567
58612
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
58613
+ /**
58614
+ * How a migration sequences the cutover against the byte move.
58615
+ *
58616
+ * - `blocking` — the historical order: pause, move every byte, repoint,
58617
+ * resume. Recording is stopped for the whole move. Right
58618
+ * for a small or a cold class, and the only legal mode for
58619
+ * a `cardinality: 'single'` class.
58620
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
58621
+ * refresh, resume, then move the past with everything
58622
+ * running. The pause is three bounded instants (a detach +
58623
+ * attach round, a write-gate drain, a lease) instead of one
58624
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
58625
+ * stopped recording under `blocking`; the same move is
58626
+ * seconds of stopped recording under `nonBlocking`.
58627
+ *
58628
+ * The mode is on the JOB, not only on the input, because `status` is where an
58629
+ * operator finds out which one is running.
58630
+ */
58631
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
58568
58632
  /** Shared input for planning and starting an orchestrated storage migration. */
58569
58633
  var StorageMigrationInputSchema = object({
58570
58634
  destinations: StorageMigrationDestinationsSchema,
58571
- throttleMbps: number().min(1).max(1e3).optional()
58635
+ throttleMbps: number().min(1).max(1e3).optional(),
58636
+ /** Omitted = `blocking`, which stays the default. */
58637
+ mode: StorageMigrationModeSchema.optional()
58572
58638
  });
58573
- /** The durable coordinator state machine. The only phase that changes default
58574
- * locations is `repointing`, after every selected mover has completed and been
58575
- * verified. */
58639
+ /**
58640
+ * The durable coordinator state machine.
58641
+ *
58642
+ * `blocking`:
58643
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
58644
+ *
58645
+ * `nonBlocking`:
58646
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
58647
+ *
58648
+ * Same phases, different order plus two new ones — not a second mover.
58649
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
58650
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
58651
+ * `repointing` is still the only phase that changes a default location.
58652
+ */
58576
58653
  var StorageMigrationPhaseSchema = _enum([
58577
58654
  "planning",
58655
+ "sealing",
58578
58656
  "pausing",
58579
58657
  "moving",
58658
+ "draining",
58580
58659
  "verifying",
58581
58660
  "repointing",
58582
58661
  "refreshing",
@@ -58601,6 +58680,9 @@ var StorageMigrationMoveSchema = object({
58601
58680
  var StorageMigrationJobSchema = object({
58602
58681
  jobId: string(),
58603
58682
  phase: StorageMigrationPhaseSchema,
58683
+ /** Which order this job is running. `status` is the only place an operator
58684
+ * can tell a seconds-long cutover from a thirty-hour one. */
58685
+ mode: StorageMigrationModeSchema,
58604
58686
  destinations: StorageMigrationDestinationsSchema,
58605
58687
  throttleMbps: number(),
58606
58688
  moves: array(StorageMigrationMoveSchema),
@@ -58613,13 +58695,30 @@ var StorageMigrationJobSchema = object({
58613
58695
  finishedAt: number().nullable(),
58614
58696
  error: string().nullable()
58615
58697
  });
58698
+ var StorageMigrationFindingSchema = object({
58699
+ code: _enum([
58700
+ "sharesDeviceWithSource",
58701
+ "deviceIdentityUnknown",
58702
+ "unstampedEventMediaRows",
58703
+ "blockingOnly",
58704
+ "noMover"
58705
+ ]),
58706
+ storageClass: StorageMigrationClassSchema,
58707
+ /** Human-readable, already carrying the ids and counts. */
58708
+ message: string()
58709
+ });
58616
58710
  var StorageMigrationPlanSchema = object({
58617
58711
  destinations: StorageMigrationDestinationsSchema,
58712
+ /** The mode this plan was built for. A plan is only valid for its mode: the
58713
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
58714
+ * it. */
58715
+ mode: StorageMigrationModeSchema,
58618
58716
  moves: array(object({
58619
58717
  storageClass: StorageMigrationClassSchema,
58620
58718
  fromLocationId: string(),
58621
58719
  toLocationId: string()
58622
- }))
58720
+ })),
58721
+ findings: array(StorageMigrationFindingSchema)
58623
58722
  });
58624
58723
  /**
58625
58724
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -69489,7 +69588,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
69489
69588
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
69490
69589
  kind: "mutation",
69491
69590
  auth: "admin"
69492
- }), method(object({}), array(RelocateJobSchema).readonly(), {
69591
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
69493
69592
  kind: "query",
69494
69593
  auth: "admin"
69495
69594
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -71396,7 +71495,10 @@ method(object({
71396
71495
  }), StorageLocationSchema, {
71397
71496
  kind: "mutation",
71398
71497
  auth: "admin"
71399
- }), method(object({ id: string() }), _void(), {
71498
+ }), method(object({
71499
+ id: string(),
71500
+ force: boolean().optional()
71501
+ }), _void(), {
71400
71502
  kind: "mutation",
71401
71503
  auth: "admin"
71402
71504
  }), method(object({ id: string() }), object({
@@ -75489,6 +75591,33 @@ var intercomCapability = {
75489
75591
  deviceNative: true,
75490
75592
  mode: "singleton",
75491
75593
  deviceTypes: [DeviceType.Camera],
75594
+ /**
75595
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
75596
+ *
75597
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
75598
+ * cap has no configuration surface at all: all six methods open, feed and
75599
+ * close one live audio session against one `deviceId`. That is the same
75600
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
75601
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
75602
+ * `admin` because they change what the device IS.
75603
+ *
75604
+ * `protected` does not mean ungated: `protectedProcedure` runs the
75605
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
75606
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
75607
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
75608
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
75609
+ * camera 7.
75610
+ *
75611
+ * Every method was `auth: 'admin'` from the initial commit, which made the
75612
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
75613
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
75614
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
75615
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
75616
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
75617
+ * snapshots" since that same commit; the promise could not be kept. Recorded
75618
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
75619
+ * preset promises a cap no row of that preset can reach.
75620
+ */
75492
75621
  methods: {
75493
75622
  /**
75494
75623
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -75501,7 +75630,7 @@ var intercomCapability = {
75501
75630
  sdpOffer: string()
75502
75631
  }), {
75503
75632
  kind: "mutation",
75504
- auth: "admin"
75633
+ auth: "protected"
75505
75634
  }),
75506
75635
  handleAnswer: method(object({
75507
75636
  deviceId: number(),
@@ -75509,7 +75638,7 @@ var intercomCapability = {
75509
75638
  sdpAnswer: string()
75510
75639
  }), _void(), {
75511
75640
  kind: "mutation",
75512
- auth: "admin"
75641
+ auth: "protected"
75513
75642
  }),
75514
75643
  /** Close explicitly. Server also auto-closes on 30s idle. */
75515
75644
  stopSession: method(object({
@@ -75517,7 +75646,7 @@ var intercomCapability = {
75517
75646
  sessionId: string()
75518
75647
  }), _void(), {
75519
75648
  kind: "mutation",
75520
- auth: "admin"
75649
+ auth: "protected"
75521
75650
  }),
75522
75651
  /**
75523
75652
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -75530,7 +75659,7 @@ var intercomCapability = {
75530
75659
  */
75531
75660
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
75532
75661
  kind: "mutation",
75533
- auth: "admin"
75662
+ auth: "protected"
75534
75663
  }),
75535
75664
  /**
75536
75665
  * Push one chunk of talk-back audio onto the active talk session.
@@ -75565,12 +75694,12 @@ var intercomCapability = {
75565
75694
  sequenceNumber: number().int()
75566
75695
  }), object({ accepted: boolean() }), {
75567
75696
  kind: "mutation",
75568
- auth: "admin"
75697
+ auth: "protected"
75569
75698
  }),
75570
75699
  /** Close the raw-PCM talk session. Idempotent. */
75571
75700
  endTalkSession: method(object({ deviceId: number() }), _void(), {
75572
75701
  kind: "mutation",
75573
- auth: "admin"
75702
+ auth: "protected"
75574
75703
  })
75575
75704
  },
75576
75705
  events: { onStatusChanged: { data: object({
@@ -85251,6 +85380,12 @@ Object.freeze({
85251
85380
  addonId: null,
85252
85381
  access: "create"
85253
85382
  },
85383
+ "pipelineAnalytics.countUnstampedEventMedia": {
85384
+ capName: "pipeline-analytics",
85385
+ capScope: "device",
85386
+ addonId: null,
85387
+ access: "view"
85388
+ },
85254
85389
  "pipelineAnalytics.deleteDeviceEvents": {
85255
85390
  capName: "pipeline-analytics",
85256
85391
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -58544,18 +58544,61 @@ var RelocateFootageInputSchema = object({
58544
58544
  * `RecordingConfig.enabled` or camera wrapper bindings. */
58545
58545
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
58546
58546
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
58547
+ /**
58548
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
58549
+ * mover (the engine already walks both collections with a timestamp cursor and
58550
+ * already has a stamp-without-copy path).
58551
+ *
58552
+ * - `move` — the default and the historical behaviour: event-media and
58553
+ * retrain blobs move to `toLocationId` and their rows are
58554
+ * stamped. The enrolled gallery is skipped (D197).
58555
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
58556
+ * stamped with `toLocationId`. `toLocationId` here is the id the
58557
+ * bytes ALREADY sit on — today's `eventMedia` default — because
58558
+ * a NULL row means "wherever `eventMedia` points *now*", and the
58559
+ * instant a repoint moves that pointer the row reads from the
58560
+ * new disk while its bytes are on the old one.
58561
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
58562
+ * (enrolled-gallery) rows, which `move` deliberately skips.
58563
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
58564
+ * never run beside a live second location: it is stop-the-world
58565
+ * by construction, which is acceptable only because the gallery
58566
+ * is a few KB per enrolled sample.
58567
+ */
58568
+ var MediaRelocateModeSchema = _enum([
58569
+ "move",
58570
+ "seal",
58571
+ "gallery"
58572
+ ]);
58547
58573
  var RelocateMediaInputSchema = object({
58548
58574
  toLocationId: string(),
58549
- throttleMbps: number().min(1).max(1e3).optional()
58575
+ throttleMbps: number().min(1).max(1e3).optional(),
58576
+ /** Omitted = `move`, the pre-existing behaviour. */
58577
+ mode: MediaRelocateModeSchema.optional()
58578
+ });
58579
+ /** How many rows still carry NO `locationId` — the population a repoint would
58580
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
58581
+ * value that permits a non-blocking `eventMedia` cutover. */
58582
+ var UnstampedEventMediaCountSchema = object({
58583
+ media: number().int().nonnegative(),
58584
+ retrainFrames: number().int().nonnegative(),
58585
+ total: number().int().nonnegative()
58550
58586
  });
58551
58587
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
58552
- /** The independently selectable logical storage classes. `recordings`
58553
- * encompasses the high and mid segment profiles; `recordingsLow` is low
58554
- * segments; `eventMedia` is post-analysis blobs. */
58588
+ /** The independently selectable logical storage classes — every class
58589
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
58590
+ * Zod enum error where they should meet an explanation.
58591
+ *
58592
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
58593
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
58594
+ * enrolled gallery; `backups` is the system backup archive. The last two have
58595
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
58555
58596
  var StorageMigrationClassSchema = _enum([
58556
58597
  "recordings",
58557
58598
  "recordingsLow",
58558
- "eventMedia"
58599
+ "eventMedia",
58600
+ "backups",
58601
+ "galleryMedia"
58559
58602
  ]);
58560
58603
  /** A destination is always an existing, fully-qualified location id. The
58561
58604
  * migration API intentionally never changes a source location's `basePath`:
@@ -58563,20 +58606,56 @@ var StorageMigrationClassSchema = _enum([
58563
58606
  var StorageMigrationDestinationsSchema = object({
58564
58607
  recordings: string().min(1).optional(),
58565
58608
  recordingsLow: string().min(1).optional(),
58566
- eventMedia: string().min(1).optional()
58609
+ eventMedia: string().min(1).optional(),
58610
+ backups: string().min(1).optional(),
58611
+ galleryMedia: string().min(1).optional()
58567
58612
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
58613
+ /**
58614
+ * How a migration sequences the cutover against the byte move.
58615
+ *
58616
+ * - `blocking` — the historical order: pause, move every byte, repoint,
58617
+ * resume. Recording is stopped for the whole move. Right
58618
+ * for a small or a cold class, and the only legal mode for
58619
+ * a `cardinality: 'single'` class.
58620
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
58621
+ * refresh, resume, then move the past with everything
58622
+ * running. The pause is three bounded instants (a detach +
58623
+ * attach round, a write-gate drain, a lease) instead of one
58624
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
58625
+ * stopped recording under `blocking`; the same move is
58626
+ * seconds of stopped recording under `nonBlocking`.
58627
+ *
58628
+ * The mode is on the JOB, not only on the input, because `status` is where an
58629
+ * operator finds out which one is running.
58630
+ */
58631
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
58568
58632
  /** Shared input for planning and starting an orchestrated storage migration. */
58569
58633
  var StorageMigrationInputSchema = object({
58570
58634
  destinations: StorageMigrationDestinationsSchema,
58571
- throttleMbps: number().min(1).max(1e3).optional()
58635
+ throttleMbps: number().min(1).max(1e3).optional(),
58636
+ /** Omitted = `blocking`, which stays the default. */
58637
+ mode: StorageMigrationModeSchema.optional()
58572
58638
  });
58573
- /** The durable coordinator state machine. The only phase that changes default
58574
- * locations is `repointing`, after every selected mover has completed and been
58575
- * verified. */
58639
+ /**
58640
+ * The durable coordinator state machine.
58641
+ *
58642
+ * `blocking`:
58643
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
58644
+ *
58645
+ * `nonBlocking`:
58646
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
58647
+ *
58648
+ * Same phases, different order plus two new ones — not a second mover.
58649
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
58650
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
58651
+ * `repointing` is still the only phase that changes a default location.
58652
+ */
58576
58653
  var StorageMigrationPhaseSchema = _enum([
58577
58654
  "planning",
58655
+ "sealing",
58578
58656
  "pausing",
58579
58657
  "moving",
58658
+ "draining",
58580
58659
  "verifying",
58581
58660
  "repointing",
58582
58661
  "refreshing",
@@ -58601,6 +58680,9 @@ var StorageMigrationMoveSchema = object({
58601
58680
  var StorageMigrationJobSchema = object({
58602
58681
  jobId: string(),
58603
58682
  phase: StorageMigrationPhaseSchema,
58683
+ /** Which order this job is running. `status` is the only place an operator
58684
+ * can tell a seconds-long cutover from a thirty-hour one. */
58685
+ mode: StorageMigrationModeSchema,
58604
58686
  destinations: StorageMigrationDestinationsSchema,
58605
58687
  throttleMbps: number(),
58606
58688
  moves: array(StorageMigrationMoveSchema),
@@ -58613,13 +58695,30 @@ var StorageMigrationJobSchema = object({
58613
58695
  finishedAt: number().nullable(),
58614
58696
  error: string().nullable()
58615
58697
  });
58698
+ var StorageMigrationFindingSchema = object({
58699
+ code: _enum([
58700
+ "sharesDeviceWithSource",
58701
+ "deviceIdentityUnknown",
58702
+ "unstampedEventMediaRows",
58703
+ "blockingOnly",
58704
+ "noMover"
58705
+ ]),
58706
+ storageClass: StorageMigrationClassSchema,
58707
+ /** Human-readable, already carrying the ids and counts. */
58708
+ message: string()
58709
+ });
58616
58710
  var StorageMigrationPlanSchema = object({
58617
58711
  destinations: StorageMigrationDestinationsSchema,
58712
+ /** The mode this plan was built for. A plan is only valid for its mode: the
58713
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
58714
+ * it. */
58715
+ mode: StorageMigrationModeSchema,
58618
58716
  moves: array(object({
58619
58717
  storageClass: StorageMigrationClassSchema,
58620
58718
  fromLocationId: string(),
58621
58719
  toLocationId: string()
58622
- }))
58720
+ })),
58721
+ findings: array(StorageMigrationFindingSchema)
58623
58722
  });
58624
58723
  /**
58625
58724
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -69489,7 +69588,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
69489
69588
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
69490
69589
  kind: "mutation",
69491
69590
  auth: "admin"
69492
- }), method(object({}), array(RelocateJobSchema).readonly(), {
69591
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
69493
69592
  kind: "query",
69494
69593
  auth: "admin"
69495
69594
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -71396,7 +71495,10 @@ method(object({
71396
71495
  }), StorageLocationSchema, {
71397
71496
  kind: "mutation",
71398
71497
  auth: "admin"
71399
- }), method(object({ id: string() }), _void(), {
71498
+ }), method(object({
71499
+ id: string(),
71500
+ force: boolean().optional()
71501
+ }), _void(), {
71400
71502
  kind: "mutation",
71401
71503
  auth: "admin"
71402
71504
  }), method(object({ id: string() }), object({
@@ -75489,6 +75591,33 @@ var intercomCapability = {
75489
75591
  deviceNative: true,
75490
75592
  mode: "singleton",
75491
75593
  deviceTypes: [DeviceType.Camera],
75594
+ /**
75595
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
75596
+ *
75597
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
75598
+ * cap has no configuration surface at all: all six methods open, feed and
75599
+ * close one live audio session against one `deviceId`. That is the same
75600
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
75601
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
75602
+ * `admin` because they change what the device IS.
75603
+ *
75604
+ * `protected` does not mean ungated: `protectedProcedure` runs the
75605
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
75606
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
75607
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
75608
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
75609
+ * camera 7.
75610
+ *
75611
+ * Every method was `auth: 'admin'` from the initial commit, which made the
75612
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
75613
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
75614
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
75615
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
75616
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
75617
+ * snapshots" since that same commit; the promise could not be kept. Recorded
75618
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
75619
+ * preset promises a cap no row of that preset can reach.
75620
+ */
75492
75621
  methods: {
75493
75622
  /**
75494
75623
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -75501,7 +75630,7 @@ var intercomCapability = {
75501
75630
  sdpOffer: string()
75502
75631
  }), {
75503
75632
  kind: "mutation",
75504
- auth: "admin"
75633
+ auth: "protected"
75505
75634
  }),
75506
75635
  handleAnswer: method(object({
75507
75636
  deviceId: number(),
@@ -75509,7 +75638,7 @@ var intercomCapability = {
75509
75638
  sdpAnswer: string()
75510
75639
  }), _void(), {
75511
75640
  kind: "mutation",
75512
- auth: "admin"
75641
+ auth: "protected"
75513
75642
  }),
75514
75643
  /** Close explicitly. Server also auto-closes on 30s idle. */
75515
75644
  stopSession: method(object({
@@ -75517,7 +75646,7 @@ var intercomCapability = {
75517
75646
  sessionId: string()
75518
75647
  }), _void(), {
75519
75648
  kind: "mutation",
75520
- auth: "admin"
75649
+ auth: "protected"
75521
75650
  }),
75522
75651
  /**
75523
75652
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -75530,7 +75659,7 @@ var intercomCapability = {
75530
75659
  */
75531
75660
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
75532
75661
  kind: "mutation",
75533
- auth: "admin"
75662
+ auth: "protected"
75534
75663
  }),
75535
75664
  /**
75536
75665
  * Push one chunk of talk-back audio onto the active talk session.
@@ -75565,12 +75694,12 @@ var intercomCapability = {
75565
75694
  sequenceNumber: number().int()
75566
75695
  }), object({ accepted: boolean() }), {
75567
75696
  kind: "mutation",
75568
- auth: "admin"
75697
+ auth: "protected"
75569
75698
  }),
75570
75699
  /** Close the raw-PCM talk session. Idempotent. */
75571
75700
  endTalkSession: method(object({ deviceId: number() }), _void(), {
75572
75701
  kind: "mutation",
75573
- auth: "admin"
75702
+ auth: "protected"
75574
75703
  })
75575
75704
  },
75576
75705
  events: { onStatusChanged: { data: object({
@@ -85251,6 +85380,12 @@ Object.freeze({
85251
85380
  addonId: null,
85252
85381
  access: "create"
85253
85382
  },
85383
+ "pipelineAnalytics.countUnstampedEventMedia": {
85384
+ capName: "pipeline-analytics",
85385
+ capScope: "device",
85386
+ addonId: null,
85387
+ access: "view"
85388
+ },
85254
85389
  "pipelineAnalytics.deleteDeviceEvents": {
85255
85390
  capName: "pipeline-analytics",
85256
85391
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.41",
3
+ "version": "0.2.43",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",