@camstack/addon-provider-dreame 0.2.42 → 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 +121 -13
  2. package/dist/addon.mjs +121 -13
  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({
@@ -85278,6 +85380,12 @@ Object.freeze({
85278
85380
  addonId: null,
85279
85381
  access: "create"
85280
85382
  },
85383
+ "pipelineAnalytics.countUnstampedEventMedia": {
85384
+ capName: "pipeline-analytics",
85385
+ capScope: "device",
85386
+ addonId: null,
85387
+ access: "view"
85388
+ },
85281
85389
  "pipelineAnalytics.deleteDeviceEvents": {
85282
85390
  capName: "pipeline-analytics",
85283
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({
@@ -85278,6 +85380,12 @@ Object.freeze({
85278
85380
  addonId: null,
85279
85381
  access: "create"
85280
85382
  },
85383
+ "pipelineAnalytics.countUnstampedEventMedia": {
85384
+ capName: "pipeline-analytics",
85385
+ capScope: "device",
85386
+ addonId: null,
85387
+ access: "view"
85388
+ },
85281
85389
  "pipelineAnalytics.deleteDeviceEvents": {
85282
85390
  capName: "pipeline-analytics",
85283
85391
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.42",
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",