@camstack/addon-export-google 0.1.6 → 0.1.7

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.
@@ -8232,18 +8232,61 @@ var RelocateFootageInputSchema = object({
8232
8232
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8233
8233
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8234
8234
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8235
+ /**
8236
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8237
+ * mover (the engine already walks both collections with a timestamp cursor and
8238
+ * already has a stamp-without-copy path).
8239
+ *
8240
+ * - `move` — the default and the historical behaviour: event-media and
8241
+ * retrain blobs move to `toLocationId` and their rows are
8242
+ * stamped. The enrolled gallery is skipped (D197).
8243
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8244
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8245
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8246
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8247
+ * instant a repoint moves that pointer the row reads from the
8248
+ * new disk while its bytes are on the old one.
8249
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8250
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8251
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8252
+ * never run beside a live second location: it is stop-the-world
8253
+ * by construction, which is acceptable only because the gallery
8254
+ * is a few KB per enrolled sample.
8255
+ */
8256
+ var MediaRelocateModeSchema = _enum([
8257
+ "move",
8258
+ "seal",
8259
+ "gallery"
8260
+ ]);
8235
8261
  var RelocateMediaInputSchema = object({
8236
8262
  toLocationId: string(),
8237
- throttleMbps: number().min(1).max(1e3).optional()
8263
+ throttleMbps: number().min(1).max(1e3).optional(),
8264
+ /** Omitted = `move`, the pre-existing behaviour. */
8265
+ mode: MediaRelocateModeSchema.optional()
8266
+ });
8267
+ /** How many rows still carry NO `locationId` — the population a repoint would
8268
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8269
+ * value that permits a non-blocking `eventMedia` cutover. */
8270
+ var UnstampedEventMediaCountSchema = object({
8271
+ media: number().int().nonnegative(),
8272
+ retrainFrames: number().int().nonnegative(),
8273
+ total: number().int().nonnegative()
8238
8274
  });
8239
8275
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8240
- /** The independently selectable logical storage classes. `recordings`
8241
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8242
- * segments; `eventMedia` is post-analysis blobs. */
8276
+ /** The independently selectable logical storage classes — every class
8277
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8278
+ * Zod enum error where they should meet an explanation.
8279
+ *
8280
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8281
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8282
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8283
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8243
8284
  var StorageMigrationClassSchema = _enum([
8244
8285
  "recordings",
8245
8286
  "recordingsLow",
8246
- "eventMedia"
8287
+ "eventMedia",
8288
+ "backups",
8289
+ "galleryMedia"
8247
8290
  ]);
8248
8291
  /** A destination is always an existing, fully-qualified location id. The
8249
8292
  * migration API intentionally never changes a source location's `basePath`:
@@ -8251,20 +8294,56 @@ var StorageMigrationClassSchema = _enum([
8251
8294
  var StorageMigrationDestinationsSchema = object({
8252
8295
  recordings: string().min(1).optional(),
8253
8296
  recordingsLow: string().min(1).optional(),
8254
- eventMedia: string().min(1).optional()
8297
+ eventMedia: string().min(1).optional(),
8298
+ backups: string().min(1).optional(),
8299
+ galleryMedia: string().min(1).optional()
8255
8300
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8301
+ /**
8302
+ * How a migration sequences the cutover against the byte move.
8303
+ *
8304
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8305
+ * resume. Recording is stopped for the whole move. Right
8306
+ * for a small or a cold class, and the only legal mode for
8307
+ * a `cardinality: 'single'` class.
8308
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8309
+ * refresh, resume, then move the past with everything
8310
+ * running. The pause is three bounded instants (a detach +
8311
+ * attach round, a write-gate drain, a lease) instead of one
8312
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8313
+ * stopped recording under `blocking`; the same move is
8314
+ * seconds of stopped recording under `nonBlocking`.
8315
+ *
8316
+ * The mode is on the JOB, not only on the input, because `status` is where an
8317
+ * operator finds out which one is running.
8318
+ */
8319
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8256
8320
  /** Shared input for planning and starting an orchestrated storage migration. */
8257
8321
  var StorageMigrationInputSchema = object({
8258
8322
  destinations: StorageMigrationDestinationsSchema,
8259
- throttleMbps: number().min(1).max(1e3).optional()
8323
+ throttleMbps: number().min(1).max(1e3).optional(),
8324
+ /** Omitted = `blocking`, which stays the default. */
8325
+ mode: StorageMigrationModeSchema.optional()
8260
8326
  });
8261
- /** The durable coordinator state machine. The only phase that changes default
8262
- * locations is `repointing`, after every selected mover has completed and been
8263
- * verified. */
8327
+ /**
8328
+ * The durable coordinator state machine.
8329
+ *
8330
+ * `blocking`:
8331
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8332
+ *
8333
+ * `nonBlocking`:
8334
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8335
+ *
8336
+ * Same phases, different order plus two new ones — not a second mover.
8337
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8338
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8339
+ * `repointing` is still the only phase that changes a default location.
8340
+ */
8264
8341
  var StorageMigrationPhaseSchema = _enum([
8265
8342
  "planning",
8343
+ "sealing",
8266
8344
  "pausing",
8267
8345
  "moving",
8346
+ "draining",
8268
8347
  "verifying",
8269
8348
  "repointing",
8270
8349
  "refreshing",
@@ -8289,6 +8368,9 @@ var StorageMigrationMoveSchema = object({
8289
8368
  var StorageMigrationJobSchema = object({
8290
8369
  jobId: string(),
8291
8370
  phase: StorageMigrationPhaseSchema,
8371
+ /** Which order this job is running. `status` is the only place an operator
8372
+ * can tell a seconds-long cutover from a thirty-hour one. */
8373
+ mode: StorageMigrationModeSchema,
8292
8374
  destinations: StorageMigrationDestinationsSchema,
8293
8375
  throttleMbps: number(),
8294
8376
  moves: array(StorageMigrationMoveSchema),
@@ -8301,13 +8383,30 @@ var StorageMigrationJobSchema = object({
8301
8383
  finishedAt: number().nullable(),
8302
8384
  error: string().nullable()
8303
8385
  });
8386
+ var StorageMigrationFindingSchema = object({
8387
+ code: _enum([
8388
+ "sharesDeviceWithSource",
8389
+ "deviceIdentityUnknown",
8390
+ "unstampedEventMediaRows",
8391
+ "blockingOnly",
8392
+ "noMover"
8393
+ ]),
8394
+ storageClass: StorageMigrationClassSchema,
8395
+ /** Human-readable, already carrying the ids and counts. */
8396
+ message: string()
8397
+ });
8304
8398
  var StorageMigrationPlanSchema = object({
8305
8399
  destinations: StorageMigrationDestinationsSchema,
8400
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8401
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8402
+ * it. */
8403
+ mode: StorageMigrationModeSchema,
8306
8404
  moves: array(object({
8307
8405
  storageClass: StorageMigrationClassSchema,
8308
8406
  fromLocationId: string(),
8309
8407
  toLocationId: string()
8310
- }))
8408
+ })),
8409
+ findings: array(StorageMigrationFindingSchema)
8311
8410
  });
8312
8411
  /**
8313
8412
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -18907,7 +19006,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18907
19006
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18908
19007
  kind: "mutation",
18909
19008
  auth: "admin"
18910
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19009
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18911
19010
  kind: "query",
18912
19011
  auth: "admin"
18913
19012
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20814,7 +20913,10 @@ method(object({
20814
20913
  }), StorageLocationSchema, {
20815
20914
  kind: "mutation",
20816
20915
  auth: "admin"
20817
- }), method(object({ id: string() }), _void(), {
20916
+ }), method(object({
20917
+ id: string(),
20918
+ force: boolean().optional()
20919
+ }), _void(), {
20818
20920
  kind: "mutation",
20819
20921
  auth: "admin"
20820
20922
  }), method(object({ id: string() }), object({
@@ -31306,6 +31408,12 @@ Object.freeze({
31306
31408
  addonId: null,
31307
31409
  access: "create"
31308
31410
  },
31411
+ "pipelineAnalytics.countUnstampedEventMedia": {
31412
+ capName: "pipeline-analytics",
31413
+ capScope: "device",
31414
+ addonId: null,
31415
+ access: "view"
31416
+ },
31309
31417
  "pipelineAnalytics.deleteDeviceEvents": {
31310
31418
  capName: "pipeline-analytics",
31311
31419
  capScope: "device",
@@ -8228,18 +8228,61 @@ var RelocateFootageInputSchema = object({
8228
8228
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8229
8229
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8230
8230
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8231
+ /**
8232
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8233
+ * mover (the engine already walks both collections with a timestamp cursor and
8234
+ * already has a stamp-without-copy path).
8235
+ *
8236
+ * - `move` — the default and the historical behaviour: event-media and
8237
+ * retrain blobs move to `toLocationId` and their rows are
8238
+ * stamped. The enrolled gallery is skipped (D197).
8239
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8240
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8241
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8242
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8243
+ * instant a repoint moves that pointer the row reads from the
8244
+ * new disk while its bytes are on the old one.
8245
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8246
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8247
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8248
+ * never run beside a live second location: it is stop-the-world
8249
+ * by construction, which is acceptable only because the gallery
8250
+ * is a few KB per enrolled sample.
8251
+ */
8252
+ var MediaRelocateModeSchema = _enum([
8253
+ "move",
8254
+ "seal",
8255
+ "gallery"
8256
+ ]);
8231
8257
  var RelocateMediaInputSchema = object({
8232
8258
  toLocationId: string(),
8233
- throttleMbps: number().min(1).max(1e3).optional()
8259
+ throttleMbps: number().min(1).max(1e3).optional(),
8260
+ /** Omitted = `move`, the pre-existing behaviour. */
8261
+ mode: MediaRelocateModeSchema.optional()
8262
+ });
8263
+ /** How many rows still carry NO `locationId` — the population a repoint would
8264
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8265
+ * value that permits a non-blocking `eventMedia` cutover. */
8266
+ var UnstampedEventMediaCountSchema = object({
8267
+ media: number().int().nonnegative(),
8268
+ retrainFrames: number().int().nonnegative(),
8269
+ total: number().int().nonnegative()
8234
8270
  });
8235
8271
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8236
- /** The independently selectable logical storage classes. `recordings`
8237
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8238
- * segments; `eventMedia` is post-analysis blobs. */
8272
+ /** The independently selectable logical storage classes — every class
8273
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8274
+ * Zod enum error where they should meet an explanation.
8275
+ *
8276
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8277
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8278
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8279
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8239
8280
  var StorageMigrationClassSchema = _enum([
8240
8281
  "recordings",
8241
8282
  "recordingsLow",
8242
- "eventMedia"
8283
+ "eventMedia",
8284
+ "backups",
8285
+ "galleryMedia"
8243
8286
  ]);
8244
8287
  /** A destination is always an existing, fully-qualified location id. The
8245
8288
  * migration API intentionally never changes a source location's `basePath`:
@@ -8247,20 +8290,56 @@ var StorageMigrationClassSchema = _enum([
8247
8290
  var StorageMigrationDestinationsSchema = object({
8248
8291
  recordings: string().min(1).optional(),
8249
8292
  recordingsLow: string().min(1).optional(),
8250
- eventMedia: string().min(1).optional()
8293
+ eventMedia: string().min(1).optional(),
8294
+ backups: string().min(1).optional(),
8295
+ galleryMedia: string().min(1).optional()
8251
8296
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8297
+ /**
8298
+ * How a migration sequences the cutover against the byte move.
8299
+ *
8300
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8301
+ * resume. Recording is stopped for the whole move. Right
8302
+ * for a small or a cold class, and the only legal mode for
8303
+ * a `cardinality: 'single'` class.
8304
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8305
+ * refresh, resume, then move the past with everything
8306
+ * running. The pause is three bounded instants (a detach +
8307
+ * attach round, a write-gate drain, a lease) instead of one
8308
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8309
+ * stopped recording under `blocking`; the same move is
8310
+ * seconds of stopped recording under `nonBlocking`.
8311
+ *
8312
+ * The mode is on the JOB, not only on the input, because `status` is where an
8313
+ * operator finds out which one is running.
8314
+ */
8315
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8252
8316
  /** Shared input for planning and starting an orchestrated storage migration. */
8253
8317
  var StorageMigrationInputSchema = object({
8254
8318
  destinations: StorageMigrationDestinationsSchema,
8255
- throttleMbps: number().min(1).max(1e3).optional()
8319
+ throttleMbps: number().min(1).max(1e3).optional(),
8320
+ /** Omitted = `blocking`, which stays the default. */
8321
+ mode: StorageMigrationModeSchema.optional()
8256
8322
  });
8257
- /** The durable coordinator state machine. The only phase that changes default
8258
- * locations is `repointing`, after every selected mover has completed and been
8259
- * verified. */
8323
+ /**
8324
+ * The durable coordinator state machine.
8325
+ *
8326
+ * `blocking`:
8327
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8328
+ *
8329
+ * `nonBlocking`:
8330
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8331
+ *
8332
+ * Same phases, different order plus two new ones — not a second mover.
8333
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8334
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8335
+ * `repointing` is still the only phase that changes a default location.
8336
+ */
8260
8337
  var StorageMigrationPhaseSchema = _enum([
8261
8338
  "planning",
8339
+ "sealing",
8262
8340
  "pausing",
8263
8341
  "moving",
8342
+ "draining",
8264
8343
  "verifying",
8265
8344
  "repointing",
8266
8345
  "refreshing",
@@ -8285,6 +8364,9 @@ var StorageMigrationMoveSchema = object({
8285
8364
  var StorageMigrationJobSchema = object({
8286
8365
  jobId: string(),
8287
8366
  phase: StorageMigrationPhaseSchema,
8367
+ /** Which order this job is running. `status` is the only place an operator
8368
+ * can tell a seconds-long cutover from a thirty-hour one. */
8369
+ mode: StorageMigrationModeSchema,
8288
8370
  destinations: StorageMigrationDestinationsSchema,
8289
8371
  throttleMbps: number(),
8290
8372
  moves: array(StorageMigrationMoveSchema),
@@ -8297,13 +8379,30 @@ var StorageMigrationJobSchema = object({
8297
8379
  finishedAt: number().nullable(),
8298
8380
  error: string().nullable()
8299
8381
  });
8382
+ var StorageMigrationFindingSchema = object({
8383
+ code: _enum([
8384
+ "sharesDeviceWithSource",
8385
+ "deviceIdentityUnknown",
8386
+ "unstampedEventMediaRows",
8387
+ "blockingOnly",
8388
+ "noMover"
8389
+ ]),
8390
+ storageClass: StorageMigrationClassSchema,
8391
+ /** Human-readable, already carrying the ids and counts. */
8392
+ message: string()
8393
+ });
8300
8394
  var StorageMigrationPlanSchema = object({
8301
8395
  destinations: StorageMigrationDestinationsSchema,
8396
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8397
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8398
+ * it. */
8399
+ mode: StorageMigrationModeSchema,
8302
8400
  moves: array(object({
8303
8401
  storageClass: StorageMigrationClassSchema,
8304
8402
  fromLocationId: string(),
8305
8403
  toLocationId: string()
8306
- }))
8404
+ })),
8405
+ findings: array(StorageMigrationFindingSchema)
8307
8406
  });
8308
8407
  /**
8309
8408
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -18903,7 +19002,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18903
19002
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18904
19003
  kind: "mutation",
18905
19004
  auth: "admin"
18906
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19005
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18907
19006
  kind: "query",
18908
19007
  auth: "admin"
18909
19008
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20810,7 +20909,10 @@ method(object({
20810
20909
  }), StorageLocationSchema, {
20811
20910
  kind: "mutation",
20812
20911
  auth: "admin"
20813
- }), method(object({ id: string() }), _void(), {
20912
+ }), method(object({
20913
+ id: string(),
20914
+ force: boolean().optional()
20915
+ }), _void(), {
20814
20916
  kind: "mutation",
20815
20917
  auth: "admin"
20816
20918
  }), method(object({ id: string() }), object({
@@ -31302,6 +31404,12 @@ Object.freeze({
31302
31404
  addonId: null,
31303
31405
  access: "create"
31304
31406
  },
31407
+ "pipelineAnalytics.countUnstampedEventMedia": {
31408
+ capName: "pipeline-analytics",
31409
+ capScope: "device",
31410
+ addonId: null,
31411
+ access: "view"
31412
+ },
31305
31413
  "pipelineAnalytics.deleteDeviceEvents": {
31306
31414
  capName: "pipeline-analytics",
31307
31415
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-google",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
5
5
  "keywords": [
6
6
  "camstack",