@camstack/addon-provider-wyze 0.2.46 → 0.2.47

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
@@ -8071,18 +8071,61 @@ var RelocateFootageInputSchema = object({
8071
8071
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8072
8072
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8073
8073
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8074
+ /**
8075
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8076
+ * mover (the engine already walks both collections with a timestamp cursor and
8077
+ * already has a stamp-without-copy path).
8078
+ *
8079
+ * - `move` — the default and the historical behaviour: event-media and
8080
+ * retrain blobs move to `toLocationId` and their rows are
8081
+ * stamped. The enrolled gallery is skipped (D197).
8082
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8083
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8084
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8085
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8086
+ * instant a repoint moves that pointer the row reads from the
8087
+ * new disk while its bytes are on the old one.
8088
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8089
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8090
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8091
+ * never run beside a live second location: it is stop-the-world
8092
+ * by construction, which is acceptable only because the gallery
8093
+ * is a few KB per enrolled sample.
8094
+ */
8095
+ var MediaRelocateModeSchema = _enum([
8096
+ "move",
8097
+ "seal",
8098
+ "gallery"
8099
+ ]);
8074
8100
  var RelocateMediaInputSchema = object({
8075
8101
  toLocationId: string(),
8076
- throttleMbps: number().min(1).max(1e3).optional()
8102
+ throttleMbps: number().min(1).max(1e3).optional(),
8103
+ /** Omitted = `move`, the pre-existing behaviour. */
8104
+ mode: MediaRelocateModeSchema.optional()
8105
+ });
8106
+ /** How many rows still carry NO `locationId` — the population a repoint would
8107
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8108
+ * value that permits a non-blocking `eventMedia` cutover. */
8109
+ var UnstampedEventMediaCountSchema = object({
8110
+ media: number().int().nonnegative(),
8111
+ retrainFrames: number().int().nonnegative(),
8112
+ total: number().int().nonnegative()
8077
8113
  });
8078
8114
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8079
- /** The independently selectable logical storage classes. `recordings`
8080
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8081
- * segments; `eventMedia` is post-analysis blobs. */
8115
+ /** The independently selectable logical storage classes — every class
8116
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8117
+ * Zod enum error where they should meet an explanation.
8118
+ *
8119
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8120
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8121
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8122
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8082
8123
  var StorageMigrationClassSchema = _enum([
8083
8124
  "recordings",
8084
8125
  "recordingsLow",
8085
- "eventMedia"
8126
+ "eventMedia",
8127
+ "backups",
8128
+ "galleryMedia"
8086
8129
  ]);
8087
8130
  /** A destination is always an existing, fully-qualified location id. The
8088
8131
  * migration API intentionally never changes a source location's `basePath`:
@@ -8090,20 +8133,56 @@ var StorageMigrationClassSchema = _enum([
8090
8133
  var StorageMigrationDestinationsSchema = object({
8091
8134
  recordings: string().min(1).optional(),
8092
8135
  recordingsLow: string().min(1).optional(),
8093
- eventMedia: string().min(1).optional()
8136
+ eventMedia: string().min(1).optional(),
8137
+ backups: string().min(1).optional(),
8138
+ galleryMedia: string().min(1).optional()
8094
8139
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8140
+ /**
8141
+ * How a migration sequences the cutover against the byte move.
8142
+ *
8143
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8144
+ * resume. Recording is stopped for the whole move. Right
8145
+ * for a small or a cold class, and the only legal mode for
8146
+ * a `cardinality: 'single'` class.
8147
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8148
+ * refresh, resume, then move the past with everything
8149
+ * running. The pause is three bounded instants (a detach +
8150
+ * attach round, a write-gate drain, a lease) instead of one
8151
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8152
+ * stopped recording under `blocking`; the same move is
8153
+ * seconds of stopped recording under `nonBlocking`.
8154
+ *
8155
+ * The mode is on the JOB, not only on the input, because `status` is where an
8156
+ * operator finds out which one is running.
8157
+ */
8158
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8095
8159
  /** Shared input for planning and starting an orchestrated storage migration. */
8096
8160
  var StorageMigrationInputSchema = object({
8097
8161
  destinations: StorageMigrationDestinationsSchema,
8098
- throttleMbps: number().min(1).max(1e3).optional()
8162
+ throttleMbps: number().min(1).max(1e3).optional(),
8163
+ /** Omitted = `blocking`, which stays the default. */
8164
+ mode: StorageMigrationModeSchema.optional()
8099
8165
  });
8100
- /** The durable coordinator state machine. The only phase that changes default
8101
- * locations is `repointing`, after every selected mover has completed and been
8102
- * verified. */
8166
+ /**
8167
+ * The durable coordinator state machine.
8168
+ *
8169
+ * `blocking`:
8170
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8171
+ *
8172
+ * `nonBlocking`:
8173
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8174
+ *
8175
+ * Same phases, different order plus two new ones — not a second mover.
8176
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8177
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8178
+ * `repointing` is still the only phase that changes a default location.
8179
+ */
8103
8180
  var StorageMigrationPhaseSchema = _enum([
8104
8181
  "planning",
8182
+ "sealing",
8105
8183
  "pausing",
8106
8184
  "moving",
8185
+ "draining",
8107
8186
  "verifying",
8108
8187
  "repointing",
8109
8188
  "refreshing",
@@ -8128,6 +8207,9 @@ var StorageMigrationMoveSchema = object({
8128
8207
  var StorageMigrationJobSchema = object({
8129
8208
  jobId: string(),
8130
8209
  phase: StorageMigrationPhaseSchema,
8210
+ /** Which order this job is running. `status` is the only place an operator
8211
+ * can tell a seconds-long cutover from a thirty-hour one. */
8212
+ mode: StorageMigrationModeSchema,
8131
8213
  destinations: StorageMigrationDestinationsSchema,
8132
8214
  throttleMbps: number(),
8133
8215
  moves: array(StorageMigrationMoveSchema),
@@ -8140,13 +8222,30 @@ var StorageMigrationJobSchema = object({
8140
8222
  finishedAt: number().nullable(),
8141
8223
  error: string().nullable()
8142
8224
  });
8225
+ var StorageMigrationFindingSchema = object({
8226
+ code: _enum([
8227
+ "sharesDeviceWithSource",
8228
+ "deviceIdentityUnknown",
8229
+ "unstampedEventMediaRows",
8230
+ "blockingOnly",
8231
+ "noMover"
8232
+ ]),
8233
+ storageClass: StorageMigrationClassSchema,
8234
+ /** Human-readable, already carrying the ids and counts. */
8235
+ message: string()
8236
+ });
8143
8237
  var StorageMigrationPlanSchema = object({
8144
8238
  destinations: StorageMigrationDestinationsSchema,
8239
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8240
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8241
+ * it. */
8242
+ mode: StorageMigrationModeSchema,
8145
8243
  moves: array(object({
8146
8244
  storageClass: StorageMigrationClassSchema,
8147
8245
  fromLocationId: string(),
8148
8246
  toLocationId: string()
8149
- }))
8247
+ })),
8248
+ findings: array(StorageMigrationFindingSchema)
8150
8249
  });
8151
8250
  /**
8152
8251
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -19016,7 +19115,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19016
19115
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19017
19116
  kind: "mutation",
19018
19117
  auth: "admin"
19019
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19118
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
19020
19119
  kind: "query",
19021
19120
  auth: "admin"
19022
19121
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -21027,7 +21126,10 @@ method(object({
21027
21126
  }), StorageLocationSchema, {
21028
21127
  kind: "mutation",
21029
21128
  auth: "admin"
21030
- }), method(object({ id: string() }), _void(), {
21129
+ }), method(object({
21130
+ id: string(),
21131
+ force: boolean().optional()
21132
+ }), _void(), {
21031
21133
  kind: "mutation",
21032
21134
  auth: "admin"
21033
21135
  }), method(object({ id: string() }), object({
@@ -34892,6 +34994,12 @@ Object.freeze({
34892
34994
  addonId: null,
34893
34995
  access: "create"
34894
34996
  },
34997
+ "pipelineAnalytics.countUnstampedEventMedia": {
34998
+ capName: "pipeline-analytics",
34999
+ capScope: "device",
35000
+ addonId: null,
35001
+ access: "view"
35002
+ },
34895
35003
  "pipelineAnalytics.deleteDeviceEvents": {
34896
35004
  capName: "pipeline-analytics",
34897
35005
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -8050,18 +8050,61 @@ var RelocateFootageInputSchema = object({
8050
8050
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8051
8051
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8052
8052
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8053
+ /**
8054
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8055
+ * mover (the engine already walks both collections with a timestamp cursor and
8056
+ * already has a stamp-without-copy path).
8057
+ *
8058
+ * - `move` — the default and the historical behaviour: event-media and
8059
+ * retrain blobs move to `toLocationId` and their rows are
8060
+ * stamped. The enrolled gallery is skipped (D197).
8061
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8062
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8063
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8064
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8065
+ * instant a repoint moves that pointer the row reads from the
8066
+ * new disk while its bytes are on the old one.
8067
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8068
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8069
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8070
+ * never run beside a live second location: it is stop-the-world
8071
+ * by construction, which is acceptable only because the gallery
8072
+ * is a few KB per enrolled sample.
8073
+ */
8074
+ var MediaRelocateModeSchema = _enum([
8075
+ "move",
8076
+ "seal",
8077
+ "gallery"
8078
+ ]);
8053
8079
  var RelocateMediaInputSchema = object({
8054
8080
  toLocationId: string(),
8055
- throttleMbps: number().min(1).max(1e3).optional()
8081
+ throttleMbps: number().min(1).max(1e3).optional(),
8082
+ /** Omitted = `move`, the pre-existing behaviour. */
8083
+ mode: MediaRelocateModeSchema.optional()
8084
+ });
8085
+ /** How many rows still carry NO `locationId` — the population a repoint would
8086
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8087
+ * value that permits a non-blocking `eventMedia` cutover. */
8088
+ var UnstampedEventMediaCountSchema = object({
8089
+ media: number().int().nonnegative(),
8090
+ retrainFrames: number().int().nonnegative(),
8091
+ total: number().int().nonnegative()
8056
8092
  });
8057
8093
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8058
- /** The independently selectable logical storage classes. `recordings`
8059
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8060
- * segments; `eventMedia` is post-analysis blobs. */
8094
+ /** The independently selectable logical storage classes — every class
8095
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8096
+ * Zod enum error where they should meet an explanation.
8097
+ *
8098
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8099
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8100
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8101
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8061
8102
  var StorageMigrationClassSchema = _enum([
8062
8103
  "recordings",
8063
8104
  "recordingsLow",
8064
- "eventMedia"
8105
+ "eventMedia",
8106
+ "backups",
8107
+ "galleryMedia"
8065
8108
  ]);
8066
8109
  /** A destination is always an existing, fully-qualified location id. The
8067
8110
  * migration API intentionally never changes a source location's `basePath`:
@@ -8069,20 +8112,56 @@ var StorageMigrationClassSchema = _enum([
8069
8112
  var StorageMigrationDestinationsSchema = object({
8070
8113
  recordings: string().min(1).optional(),
8071
8114
  recordingsLow: string().min(1).optional(),
8072
- eventMedia: string().min(1).optional()
8115
+ eventMedia: string().min(1).optional(),
8116
+ backups: string().min(1).optional(),
8117
+ galleryMedia: string().min(1).optional()
8073
8118
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8119
+ /**
8120
+ * How a migration sequences the cutover against the byte move.
8121
+ *
8122
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8123
+ * resume. Recording is stopped for the whole move. Right
8124
+ * for a small or a cold class, and the only legal mode for
8125
+ * a `cardinality: 'single'` class.
8126
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8127
+ * refresh, resume, then move the past with everything
8128
+ * running. The pause is three bounded instants (a detach +
8129
+ * attach round, a write-gate drain, a lease) instead of one
8130
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8131
+ * stopped recording under `blocking`; the same move is
8132
+ * seconds of stopped recording under `nonBlocking`.
8133
+ *
8134
+ * The mode is on the JOB, not only on the input, because `status` is where an
8135
+ * operator finds out which one is running.
8136
+ */
8137
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8074
8138
  /** Shared input for planning and starting an orchestrated storage migration. */
8075
8139
  var StorageMigrationInputSchema = object({
8076
8140
  destinations: StorageMigrationDestinationsSchema,
8077
- throttleMbps: number().min(1).max(1e3).optional()
8141
+ throttleMbps: number().min(1).max(1e3).optional(),
8142
+ /** Omitted = `blocking`, which stays the default. */
8143
+ mode: StorageMigrationModeSchema.optional()
8078
8144
  });
8079
- /** The durable coordinator state machine. The only phase that changes default
8080
- * locations is `repointing`, after every selected mover has completed and been
8081
- * verified. */
8145
+ /**
8146
+ * The durable coordinator state machine.
8147
+ *
8148
+ * `blocking`:
8149
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8150
+ *
8151
+ * `nonBlocking`:
8152
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8153
+ *
8154
+ * Same phases, different order plus two new ones — not a second mover.
8155
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8156
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8157
+ * `repointing` is still the only phase that changes a default location.
8158
+ */
8082
8159
  var StorageMigrationPhaseSchema = _enum([
8083
8160
  "planning",
8161
+ "sealing",
8084
8162
  "pausing",
8085
8163
  "moving",
8164
+ "draining",
8086
8165
  "verifying",
8087
8166
  "repointing",
8088
8167
  "refreshing",
@@ -8107,6 +8186,9 @@ var StorageMigrationMoveSchema = object({
8107
8186
  var StorageMigrationJobSchema = object({
8108
8187
  jobId: string(),
8109
8188
  phase: StorageMigrationPhaseSchema,
8189
+ /** Which order this job is running. `status` is the only place an operator
8190
+ * can tell a seconds-long cutover from a thirty-hour one. */
8191
+ mode: StorageMigrationModeSchema,
8110
8192
  destinations: StorageMigrationDestinationsSchema,
8111
8193
  throttleMbps: number(),
8112
8194
  moves: array(StorageMigrationMoveSchema),
@@ -8119,13 +8201,30 @@ var StorageMigrationJobSchema = object({
8119
8201
  finishedAt: number().nullable(),
8120
8202
  error: string().nullable()
8121
8203
  });
8204
+ var StorageMigrationFindingSchema = object({
8205
+ code: _enum([
8206
+ "sharesDeviceWithSource",
8207
+ "deviceIdentityUnknown",
8208
+ "unstampedEventMediaRows",
8209
+ "blockingOnly",
8210
+ "noMover"
8211
+ ]),
8212
+ storageClass: StorageMigrationClassSchema,
8213
+ /** Human-readable, already carrying the ids and counts. */
8214
+ message: string()
8215
+ });
8122
8216
  var StorageMigrationPlanSchema = object({
8123
8217
  destinations: StorageMigrationDestinationsSchema,
8218
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8219
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8220
+ * it. */
8221
+ mode: StorageMigrationModeSchema,
8124
8222
  moves: array(object({
8125
8223
  storageClass: StorageMigrationClassSchema,
8126
8224
  fromLocationId: string(),
8127
8225
  toLocationId: string()
8128
- }))
8226
+ })),
8227
+ findings: array(StorageMigrationFindingSchema)
8129
8228
  });
8130
8229
  /**
8131
8230
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -18995,7 +19094,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18995
19094
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18996
19095
  kind: "mutation",
18997
19096
  auth: "admin"
18998
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19097
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18999
19098
  kind: "query",
19000
19099
  auth: "admin"
19001
19100
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -21006,7 +21105,10 @@ method(object({
21006
21105
  }), StorageLocationSchema, {
21007
21106
  kind: "mutation",
21008
21107
  auth: "admin"
21009
- }), method(object({ id: string() }), _void(), {
21108
+ }), method(object({
21109
+ id: string(),
21110
+ force: boolean().optional()
21111
+ }), _void(), {
21010
21112
  kind: "mutation",
21011
21113
  auth: "admin"
21012
21114
  }), method(object({ id: string() }), object({
@@ -34871,6 +34973,12 @@ Object.freeze({
34871
34973
  addonId: null,
34872
34974
  access: "create"
34873
34975
  },
34976
+ "pipelineAnalytics.countUnstampedEventMedia": {
34977
+ capName: "pipeline-analytics",
34978
+ capScope: "device",
34979
+ addonId: null,
34980
+ access: "view"
34981
+ },
34874
34982
  "pipelineAnalytics.deleteDeviceEvents": {
34875
34983
  capName: "pipeline-analytics",
34876
34984
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",