@camstack/addon-import-alexa 0.2.41 → 0.2.42

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
@@ -8197,18 +8197,61 @@ var RelocateFootageInputSchema = object({
8197
8197
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8198
8198
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8199
8199
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8200
+ /**
8201
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8202
+ * mover (the engine already walks both collections with a timestamp cursor and
8203
+ * already has a stamp-without-copy path).
8204
+ *
8205
+ * - `move` — the default and the historical behaviour: event-media and
8206
+ * retrain blobs move to `toLocationId` and their rows are
8207
+ * stamped. The enrolled gallery is skipped (D197).
8208
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8209
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8210
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8211
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8212
+ * instant a repoint moves that pointer the row reads from the
8213
+ * new disk while its bytes are on the old one.
8214
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8215
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8216
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8217
+ * never run beside a live second location: it is stop-the-world
8218
+ * by construction, which is acceptable only because the gallery
8219
+ * is a few KB per enrolled sample.
8220
+ */
8221
+ var MediaRelocateModeSchema = _enum([
8222
+ "move",
8223
+ "seal",
8224
+ "gallery"
8225
+ ]);
8200
8226
  var RelocateMediaInputSchema = object({
8201
8227
  toLocationId: string(),
8202
- throttleMbps: number().min(1).max(1e3).optional()
8228
+ throttleMbps: number().min(1).max(1e3).optional(),
8229
+ /** Omitted = `move`, the pre-existing behaviour. */
8230
+ mode: MediaRelocateModeSchema.optional()
8231
+ });
8232
+ /** How many rows still carry NO `locationId` — the population a repoint would
8233
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8234
+ * value that permits a non-blocking `eventMedia` cutover. */
8235
+ var UnstampedEventMediaCountSchema = object({
8236
+ media: number().int().nonnegative(),
8237
+ retrainFrames: number().int().nonnegative(),
8238
+ total: number().int().nonnegative()
8203
8239
  });
8204
8240
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8205
- /** The independently selectable logical storage classes. `recordings`
8206
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8207
- * segments; `eventMedia` is post-analysis blobs. */
8241
+ /** The independently selectable logical storage classes — every class
8242
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8243
+ * Zod enum error where they should meet an explanation.
8244
+ *
8245
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8246
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8247
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8248
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8208
8249
  var StorageMigrationClassSchema = _enum([
8209
8250
  "recordings",
8210
8251
  "recordingsLow",
8211
- "eventMedia"
8252
+ "eventMedia",
8253
+ "backups",
8254
+ "galleryMedia"
8212
8255
  ]);
8213
8256
  /** A destination is always an existing, fully-qualified location id. The
8214
8257
  * migration API intentionally never changes a source location's `basePath`:
@@ -8216,20 +8259,56 @@ var StorageMigrationClassSchema = _enum([
8216
8259
  var StorageMigrationDestinationsSchema = object({
8217
8260
  recordings: string().min(1).optional(),
8218
8261
  recordingsLow: string().min(1).optional(),
8219
- eventMedia: string().min(1).optional()
8262
+ eventMedia: string().min(1).optional(),
8263
+ backups: string().min(1).optional(),
8264
+ galleryMedia: string().min(1).optional()
8220
8265
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8266
+ /**
8267
+ * How a migration sequences the cutover against the byte move.
8268
+ *
8269
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8270
+ * resume. Recording is stopped for the whole move. Right
8271
+ * for a small or a cold class, and the only legal mode for
8272
+ * a `cardinality: 'single'` class.
8273
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8274
+ * refresh, resume, then move the past with everything
8275
+ * running. The pause is three bounded instants (a detach +
8276
+ * attach round, a write-gate drain, a lease) instead of one
8277
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8278
+ * stopped recording under `blocking`; the same move is
8279
+ * seconds of stopped recording under `nonBlocking`.
8280
+ *
8281
+ * The mode is on the JOB, not only on the input, because `status` is where an
8282
+ * operator finds out which one is running.
8283
+ */
8284
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8221
8285
  /** Shared input for planning and starting an orchestrated storage migration. */
8222
8286
  var StorageMigrationInputSchema = object({
8223
8287
  destinations: StorageMigrationDestinationsSchema,
8224
- throttleMbps: number().min(1).max(1e3).optional()
8288
+ throttleMbps: number().min(1).max(1e3).optional(),
8289
+ /** Omitted = `blocking`, which stays the default. */
8290
+ mode: StorageMigrationModeSchema.optional()
8225
8291
  });
8226
- /** The durable coordinator state machine. The only phase that changes default
8227
- * locations is `repointing`, after every selected mover has completed and been
8228
- * verified. */
8292
+ /**
8293
+ * The durable coordinator state machine.
8294
+ *
8295
+ * `blocking`:
8296
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8297
+ *
8298
+ * `nonBlocking`:
8299
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8300
+ *
8301
+ * Same phases, different order plus two new ones — not a second mover.
8302
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8303
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8304
+ * `repointing` is still the only phase that changes a default location.
8305
+ */
8229
8306
  var StorageMigrationPhaseSchema = _enum([
8230
8307
  "planning",
8308
+ "sealing",
8231
8309
  "pausing",
8232
8310
  "moving",
8311
+ "draining",
8233
8312
  "verifying",
8234
8313
  "repointing",
8235
8314
  "refreshing",
@@ -8254,6 +8333,9 @@ var StorageMigrationMoveSchema = object({
8254
8333
  var StorageMigrationJobSchema = object({
8255
8334
  jobId: string(),
8256
8335
  phase: StorageMigrationPhaseSchema,
8336
+ /** Which order this job is running. `status` is the only place an operator
8337
+ * can tell a seconds-long cutover from a thirty-hour one. */
8338
+ mode: StorageMigrationModeSchema,
8257
8339
  destinations: StorageMigrationDestinationsSchema,
8258
8340
  throttleMbps: number(),
8259
8341
  moves: array(StorageMigrationMoveSchema),
@@ -8266,13 +8348,30 @@ var StorageMigrationJobSchema = object({
8266
8348
  finishedAt: number().nullable(),
8267
8349
  error: string().nullable()
8268
8350
  });
8351
+ var StorageMigrationFindingSchema = object({
8352
+ code: _enum([
8353
+ "sharesDeviceWithSource",
8354
+ "deviceIdentityUnknown",
8355
+ "unstampedEventMediaRows",
8356
+ "blockingOnly",
8357
+ "noMover"
8358
+ ]),
8359
+ storageClass: StorageMigrationClassSchema,
8360
+ /** Human-readable, already carrying the ids and counts. */
8361
+ message: string()
8362
+ });
8269
8363
  var StorageMigrationPlanSchema = object({
8270
8364
  destinations: StorageMigrationDestinationsSchema,
8365
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8366
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8367
+ * it. */
8368
+ mode: StorageMigrationModeSchema,
8271
8369
  moves: array(object({
8272
8370
  storageClass: StorageMigrationClassSchema,
8273
8371
  fromLocationId: string(),
8274
8372
  toLocationId: string()
8275
- }))
8373
+ })),
8374
+ findings: array(StorageMigrationFindingSchema)
8276
8375
  });
8277
8376
  /**
8278
8377
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -19210,7 +19309,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19210
19309
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19211
19310
  kind: "mutation",
19212
19311
  auth: "admin"
19213
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19312
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
19214
19313
  kind: "query",
19215
19314
  auth: "admin"
19216
19315
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -21117,7 +21216,10 @@ method(object({
21117
21216
  }), StorageLocationSchema, {
21118
21217
  kind: "mutation",
21119
21218
  auth: "admin"
21120
- }), method(object({ id: string() }), _void(), {
21219
+ }), method(object({
21220
+ id: string(),
21221
+ force: boolean().optional()
21222
+ }), _void(), {
21121
21223
  kind: "mutation",
21122
21224
  auth: "admin"
21123
21225
  }), method(object({ id: string() }), object({
@@ -34991,6 +35093,12 @@ Object.freeze({
34991
35093
  addonId: null,
34992
35094
  access: "create"
34993
35095
  },
35096
+ "pipelineAnalytics.countUnstampedEventMedia": {
35097
+ capName: "pipeline-analytics",
35098
+ capScope: "device",
35099
+ addonId: null,
35100
+ access: "view"
35101
+ },
34994
35102
  "pipelineAnalytics.deleteDeviceEvents": {
34995
35103
  capName: "pipeline-analytics",
34996
35104
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -8197,18 +8197,61 @@ var RelocateFootageInputSchema = object({
8197
8197
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8198
8198
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8199
8199
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8200
+ /**
8201
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8202
+ * mover (the engine already walks both collections with a timestamp cursor and
8203
+ * already has a stamp-without-copy path).
8204
+ *
8205
+ * - `move` — the default and the historical behaviour: event-media and
8206
+ * retrain blobs move to `toLocationId` and their rows are
8207
+ * stamped. The enrolled gallery is skipped (D197).
8208
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8209
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8210
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8211
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8212
+ * instant a repoint moves that pointer the row reads from the
8213
+ * new disk while its bytes are on the old one.
8214
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8215
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8216
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8217
+ * never run beside a live second location: it is stop-the-world
8218
+ * by construction, which is acceptable only because the gallery
8219
+ * is a few KB per enrolled sample.
8220
+ */
8221
+ var MediaRelocateModeSchema = _enum([
8222
+ "move",
8223
+ "seal",
8224
+ "gallery"
8225
+ ]);
8200
8226
  var RelocateMediaInputSchema = object({
8201
8227
  toLocationId: string(),
8202
- throttleMbps: number().min(1).max(1e3).optional()
8228
+ throttleMbps: number().min(1).max(1e3).optional(),
8229
+ /** Omitted = `move`, the pre-existing behaviour. */
8230
+ mode: MediaRelocateModeSchema.optional()
8231
+ });
8232
+ /** How many rows still carry NO `locationId` — the population a repoint would
8233
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8234
+ * value that permits a non-blocking `eventMedia` cutover. */
8235
+ var UnstampedEventMediaCountSchema = object({
8236
+ media: number().int().nonnegative(),
8237
+ retrainFrames: number().int().nonnegative(),
8238
+ total: number().int().nonnegative()
8203
8239
  });
8204
8240
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8205
- /** The independently selectable logical storage classes. `recordings`
8206
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8207
- * segments; `eventMedia` is post-analysis blobs. */
8241
+ /** The independently selectable logical storage classes — every class
8242
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8243
+ * Zod enum error where they should meet an explanation.
8244
+ *
8245
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8246
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8247
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8248
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8208
8249
  var StorageMigrationClassSchema = _enum([
8209
8250
  "recordings",
8210
8251
  "recordingsLow",
8211
- "eventMedia"
8252
+ "eventMedia",
8253
+ "backups",
8254
+ "galleryMedia"
8212
8255
  ]);
8213
8256
  /** A destination is always an existing, fully-qualified location id. The
8214
8257
  * migration API intentionally never changes a source location's `basePath`:
@@ -8216,20 +8259,56 @@ var StorageMigrationClassSchema = _enum([
8216
8259
  var StorageMigrationDestinationsSchema = object({
8217
8260
  recordings: string().min(1).optional(),
8218
8261
  recordingsLow: string().min(1).optional(),
8219
- eventMedia: string().min(1).optional()
8262
+ eventMedia: string().min(1).optional(),
8263
+ backups: string().min(1).optional(),
8264
+ galleryMedia: string().min(1).optional()
8220
8265
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8266
+ /**
8267
+ * How a migration sequences the cutover against the byte move.
8268
+ *
8269
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8270
+ * resume. Recording is stopped for the whole move. Right
8271
+ * for a small or a cold class, and the only legal mode for
8272
+ * a `cardinality: 'single'` class.
8273
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8274
+ * refresh, resume, then move the past with everything
8275
+ * running. The pause is three bounded instants (a detach +
8276
+ * attach round, a write-gate drain, a lease) instead of one
8277
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8278
+ * stopped recording under `blocking`; the same move is
8279
+ * seconds of stopped recording under `nonBlocking`.
8280
+ *
8281
+ * The mode is on the JOB, not only on the input, because `status` is where an
8282
+ * operator finds out which one is running.
8283
+ */
8284
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8221
8285
  /** Shared input for planning and starting an orchestrated storage migration. */
8222
8286
  var StorageMigrationInputSchema = object({
8223
8287
  destinations: StorageMigrationDestinationsSchema,
8224
- throttleMbps: number().min(1).max(1e3).optional()
8288
+ throttleMbps: number().min(1).max(1e3).optional(),
8289
+ /** Omitted = `blocking`, which stays the default. */
8290
+ mode: StorageMigrationModeSchema.optional()
8225
8291
  });
8226
- /** The durable coordinator state machine. The only phase that changes default
8227
- * locations is `repointing`, after every selected mover has completed and been
8228
- * verified. */
8292
+ /**
8293
+ * The durable coordinator state machine.
8294
+ *
8295
+ * `blocking`:
8296
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8297
+ *
8298
+ * `nonBlocking`:
8299
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8300
+ *
8301
+ * Same phases, different order plus two new ones — not a second mover.
8302
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8303
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8304
+ * `repointing` is still the only phase that changes a default location.
8305
+ */
8229
8306
  var StorageMigrationPhaseSchema = _enum([
8230
8307
  "planning",
8308
+ "sealing",
8231
8309
  "pausing",
8232
8310
  "moving",
8311
+ "draining",
8233
8312
  "verifying",
8234
8313
  "repointing",
8235
8314
  "refreshing",
@@ -8254,6 +8333,9 @@ var StorageMigrationMoveSchema = object({
8254
8333
  var StorageMigrationJobSchema = object({
8255
8334
  jobId: string(),
8256
8335
  phase: StorageMigrationPhaseSchema,
8336
+ /** Which order this job is running. `status` is the only place an operator
8337
+ * can tell a seconds-long cutover from a thirty-hour one. */
8338
+ mode: StorageMigrationModeSchema,
8257
8339
  destinations: StorageMigrationDestinationsSchema,
8258
8340
  throttleMbps: number(),
8259
8341
  moves: array(StorageMigrationMoveSchema),
@@ -8266,13 +8348,30 @@ var StorageMigrationJobSchema = object({
8266
8348
  finishedAt: number().nullable(),
8267
8349
  error: string().nullable()
8268
8350
  });
8351
+ var StorageMigrationFindingSchema = object({
8352
+ code: _enum([
8353
+ "sharesDeviceWithSource",
8354
+ "deviceIdentityUnknown",
8355
+ "unstampedEventMediaRows",
8356
+ "blockingOnly",
8357
+ "noMover"
8358
+ ]),
8359
+ storageClass: StorageMigrationClassSchema,
8360
+ /** Human-readable, already carrying the ids and counts. */
8361
+ message: string()
8362
+ });
8269
8363
  var StorageMigrationPlanSchema = object({
8270
8364
  destinations: StorageMigrationDestinationsSchema,
8365
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8366
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8367
+ * it. */
8368
+ mode: StorageMigrationModeSchema,
8271
8369
  moves: array(object({
8272
8370
  storageClass: StorageMigrationClassSchema,
8273
8371
  fromLocationId: string(),
8274
8372
  toLocationId: string()
8275
- }))
8373
+ })),
8374
+ findings: array(StorageMigrationFindingSchema)
8276
8375
  });
8277
8376
  /**
8278
8377
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -19210,7 +19309,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19210
19309
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19211
19310
  kind: "mutation",
19212
19311
  auth: "admin"
19213
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19312
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
19214
19313
  kind: "query",
19215
19314
  auth: "admin"
19216
19315
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -21117,7 +21216,10 @@ method(object({
21117
21216
  }), StorageLocationSchema, {
21118
21217
  kind: "mutation",
21119
21218
  auth: "admin"
21120
- }), method(object({ id: string() }), _void(), {
21219
+ }), method(object({
21220
+ id: string(),
21221
+ force: boolean().optional()
21222
+ }), _void(), {
21121
21223
  kind: "mutation",
21122
21224
  auth: "admin"
21123
21225
  }), method(object({ id: string() }), object({
@@ -34991,6 +35093,12 @@ Object.freeze({
34991
35093
  addonId: null,
34992
35094
  access: "create"
34993
35095
  },
35096
+ "pipelineAnalytics.countUnstampedEventMedia": {
35097
+ capName: "pipeline-analytics",
35098
+ capScope: "device",
35099
+ addonId: null,
35100
+ access: "view"
35101
+ },
34994
35102
  "pipelineAnalytics.deleteDeviceEvents": {
34995
35103
  capName: "pipeline-analytics",
34996
35104
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",