@camstack/addon-provider-onvif 1.2.41 → 1.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
@@ -8038,18 +8038,61 @@ var RelocateFootageInputSchema = object({
8038
8038
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8039
8039
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8040
8040
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8041
+ /**
8042
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8043
+ * mover (the engine already walks both collections with a timestamp cursor and
8044
+ * already has a stamp-without-copy path).
8045
+ *
8046
+ * - `move` — the default and the historical behaviour: event-media and
8047
+ * retrain blobs move to `toLocationId` and their rows are
8048
+ * stamped. The enrolled gallery is skipped (D197).
8049
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8050
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8051
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8052
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8053
+ * instant a repoint moves that pointer the row reads from the
8054
+ * new disk while its bytes are on the old one.
8055
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8056
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8057
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8058
+ * never run beside a live second location: it is stop-the-world
8059
+ * by construction, which is acceptable only because the gallery
8060
+ * is a few KB per enrolled sample.
8061
+ */
8062
+ var MediaRelocateModeSchema = _enum([
8063
+ "move",
8064
+ "seal",
8065
+ "gallery"
8066
+ ]);
8041
8067
  var RelocateMediaInputSchema = object({
8042
8068
  toLocationId: string(),
8043
- throttleMbps: number().min(1).max(1e3).optional()
8069
+ throttleMbps: number().min(1).max(1e3).optional(),
8070
+ /** Omitted = `move`, the pre-existing behaviour. */
8071
+ mode: MediaRelocateModeSchema.optional()
8072
+ });
8073
+ /** How many rows still carry NO `locationId` — the population a repoint would
8074
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8075
+ * value that permits a non-blocking `eventMedia` cutover. */
8076
+ var UnstampedEventMediaCountSchema = object({
8077
+ media: number().int().nonnegative(),
8078
+ retrainFrames: number().int().nonnegative(),
8079
+ total: number().int().nonnegative()
8044
8080
  });
8045
8081
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8046
- /** The independently selectable logical storage classes. `recordings`
8047
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8048
- * segments; `eventMedia` is post-analysis blobs. */
8082
+ /** The independently selectable logical storage classes — every class
8083
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8084
+ * Zod enum error where they should meet an explanation.
8085
+ *
8086
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8087
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8088
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8089
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8049
8090
  var StorageMigrationClassSchema = _enum([
8050
8091
  "recordings",
8051
8092
  "recordingsLow",
8052
- "eventMedia"
8093
+ "eventMedia",
8094
+ "backups",
8095
+ "galleryMedia"
8053
8096
  ]);
8054
8097
  /** A destination is always an existing, fully-qualified location id. The
8055
8098
  * migration API intentionally never changes a source location's `basePath`:
@@ -8057,20 +8100,56 @@ var StorageMigrationClassSchema = _enum([
8057
8100
  var StorageMigrationDestinationsSchema = object({
8058
8101
  recordings: string().min(1).optional(),
8059
8102
  recordingsLow: string().min(1).optional(),
8060
- eventMedia: string().min(1).optional()
8103
+ eventMedia: string().min(1).optional(),
8104
+ backups: string().min(1).optional(),
8105
+ galleryMedia: string().min(1).optional()
8061
8106
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8107
+ /**
8108
+ * How a migration sequences the cutover against the byte move.
8109
+ *
8110
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8111
+ * resume. Recording is stopped for the whole move. Right
8112
+ * for a small or a cold class, and the only legal mode for
8113
+ * a `cardinality: 'single'` class.
8114
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8115
+ * refresh, resume, then move the past with everything
8116
+ * running. The pause is three bounded instants (a detach +
8117
+ * attach round, a write-gate drain, a lease) instead of one
8118
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8119
+ * stopped recording under `blocking`; the same move is
8120
+ * seconds of stopped recording under `nonBlocking`.
8121
+ *
8122
+ * The mode is on the JOB, not only on the input, because `status` is where an
8123
+ * operator finds out which one is running.
8124
+ */
8125
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8062
8126
  /** Shared input for planning and starting an orchestrated storage migration. */
8063
8127
  var StorageMigrationInputSchema = object({
8064
8128
  destinations: StorageMigrationDestinationsSchema,
8065
- throttleMbps: number().min(1).max(1e3).optional()
8129
+ throttleMbps: number().min(1).max(1e3).optional(),
8130
+ /** Omitted = `blocking`, which stays the default. */
8131
+ mode: StorageMigrationModeSchema.optional()
8066
8132
  });
8067
- /** The durable coordinator state machine. The only phase that changes default
8068
- * locations is `repointing`, after every selected mover has completed and been
8069
- * verified. */
8133
+ /**
8134
+ * The durable coordinator state machine.
8135
+ *
8136
+ * `blocking`:
8137
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8138
+ *
8139
+ * `nonBlocking`:
8140
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8141
+ *
8142
+ * Same phases, different order plus two new ones — not a second mover.
8143
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8144
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8145
+ * `repointing` is still the only phase that changes a default location.
8146
+ */
8070
8147
  var StorageMigrationPhaseSchema = _enum([
8071
8148
  "planning",
8149
+ "sealing",
8072
8150
  "pausing",
8073
8151
  "moving",
8152
+ "draining",
8074
8153
  "verifying",
8075
8154
  "repointing",
8076
8155
  "refreshing",
@@ -8095,6 +8174,9 @@ var StorageMigrationMoveSchema = object({
8095
8174
  var StorageMigrationJobSchema = object({
8096
8175
  jobId: string(),
8097
8176
  phase: StorageMigrationPhaseSchema,
8177
+ /** Which order this job is running. `status` is the only place an operator
8178
+ * can tell a seconds-long cutover from a thirty-hour one. */
8179
+ mode: StorageMigrationModeSchema,
8098
8180
  destinations: StorageMigrationDestinationsSchema,
8099
8181
  throttleMbps: number(),
8100
8182
  moves: array(StorageMigrationMoveSchema),
@@ -8107,13 +8189,30 @@ var StorageMigrationJobSchema = object({
8107
8189
  finishedAt: number().nullable(),
8108
8190
  error: string().nullable()
8109
8191
  });
8192
+ var StorageMigrationFindingSchema = object({
8193
+ code: _enum([
8194
+ "sharesDeviceWithSource",
8195
+ "deviceIdentityUnknown",
8196
+ "unstampedEventMediaRows",
8197
+ "blockingOnly",
8198
+ "noMover"
8199
+ ]),
8200
+ storageClass: StorageMigrationClassSchema,
8201
+ /** Human-readable, already carrying the ids and counts. */
8202
+ message: string()
8203
+ });
8110
8204
  var StorageMigrationPlanSchema = object({
8111
8205
  destinations: StorageMigrationDestinationsSchema,
8206
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8207
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8208
+ * it. */
8209
+ mode: StorageMigrationModeSchema,
8112
8210
  moves: array(object({
8113
8211
  storageClass: StorageMigrationClassSchema,
8114
8212
  fromLocationId: string(),
8115
8213
  toLocationId: string()
8116
- }))
8214
+ })),
8215
+ findings: array(StorageMigrationFindingSchema)
8117
8216
  });
8118
8217
  /**
8119
8218
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -18679,7 +18778,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18679
18778
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18680
18779
  kind: "mutation",
18681
18780
  auth: "admin"
18682
- }), method(object({}), array(RelocateJobSchema).readonly(), {
18781
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18683
18782
  kind: "query",
18684
18783
  auth: "admin"
18685
18784
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20690,7 +20789,10 @@ method(object({
20690
20789
  }), StorageLocationSchema, {
20691
20790
  kind: "mutation",
20692
20791
  auth: "admin"
20693
- }), method(object({ id: string() }), _void(), {
20792
+ }), method(object({
20793
+ id: string(),
20794
+ force: boolean().optional()
20795
+ }), _void(), {
20694
20796
  kind: "mutation",
20695
20797
  auth: "admin"
20696
20798
  }), method(object({ id: string() }), object({
@@ -31615,6 +31717,12 @@ Object.freeze({
31615
31717
  addonId: null,
31616
31718
  access: "create"
31617
31719
  },
31720
+ "pipelineAnalytics.countUnstampedEventMedia": {
31721
+ capName: "pipeline-analytics",
31722
+ capScope: "device",
31723
+ addonId: null,
31724
+ access: "view"
31725
+ },
31618
31726
  "pipelineAnalytics.deleteDeviceEvents": {
31619
31727
  capName: "pipeline-analytics",
31620
31728
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -8039,18 +8039,61 @@ var RelocateFootageInputSchema = object({
8039
8039
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8040
8040
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8041
8041
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8042
+ /**
8043
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8044
+ * mover (the engine already walks both collections with a timestamp cursor and
8045
+ * already has a stamp-without-copy path).
8046
+ *
8047
+ * - `move` — the default and the historical behaviour: event-media and
8048
+ * retrain blobs move to `toLocationId` and their rows are
8049
+ * stamped. The enrolled gallery is skipped (D197).
8050
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8051
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8052
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8053
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8054
+ * instant a repoint moves that pointer the row reads from the
8055
+ * new disk while its bytes are on the old one.
8056
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8057
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8058
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8059
+ * never run beside a live second location: it is stop-the-world
8060
+ * by construction, which is acceptable only because the gallery
8061
+ * is a few KB per enrolled sample.
8062
+ */
8063
+ var MediaRelocateModeSchema = _enum([
8064
+ "move",
8065
+ "seal",
8066
+ "gallery"
8067
+ ]);
8042
8068
  var RelocateMediaInputSchema = object({
8043
8069
  toLocationId: string(),
8044
- throttleMbps: number().min(1).max(1e3).optional()
8070
+ throttleMbps: number().min(1).max(1e3).optional(),
8071
+ /** Omitted = `move`, the pre-existing behaviour. */
8072
+ mode: MediaRelocateModeSchema.optional()
8073
+ });
8074
+ /** How many rows still carry NO `locationId` — the population a repoint would
8075
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8076
+ * value that permits a non-blocking `eventMedia` cutover. */
8077
+ var UnstampedEventMediaCountSchema = object({
8078
+ media: number().int().nonnegative(),
8079
+ retrainFrames: number().int().nonnegative(),
8080
+ total: number().int().nonnegative()
8045
8081
  });
8046
8082
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8047
- /** The independently selectable logical storage classes. `recordings`
8048
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8049
- * segments; `eventMedia` is post-analysis blobs. */
8083
+ /** The independently selectable logical storage classes — every class
8084
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8085
+ * Zod enum error where they should meet an explanation.
8086
+ *
8087
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8088
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8089
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8090
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8050
8091
  var StorageMigrationClassSchema = _enum([
8051
8092
  "recordings",
8052
8093
  "recordingsLow",
8053
- "eventMedia"
8094
+ "eventMedia",
8095
+ "backups",
8096
+ "galleryMedia"
8054
8097
  ]);
8055
8098
  /** A destination is always an existing, fully-qualified location id. The
8056
8099
  * migration API intentionally never changes a source location's `basePath`:
@@ -8058,20 +8101,56 @@ var StorageMigrationClassSchema = _enum([
8058
8101
  var StorageMigrationDestinationsSchema = object({
8059
8102
  recordings: string().min(1).optional(),
8060
8103
  recordingsLow: string().min(1).optional(),
8061
- eventMedia: string().min(1).optional()
8104
+ eventMedia: string().min(1).optional(),
8105
+ backups: string().min(1).optional(),
8106
+ galleryMedia: string().min(1).optional()
8062
8107
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8108
+ /**
8109
+ * How a migration sequences the cutover against the byte move.
8110
+ *
8111
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8112
+ * resume. Recording is stopped for the whole move. Right
8113
+ * for a small or a cold class, and the only legal mode for
8114
+ * a `cardinality: 'single'` class.
8115
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8116
+ * refresh, resume, then move the past with everything
8117
+ * running. The pause is three bounded instants (a detach +
8118
+ * attach round, a write-gate drain, a lease) instead of one
8119
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8120
+ * stopped recording under `blocking`; the same move is
8121
+ * seconds of stopped recording under `nonBlocking`.
8122
+ *
8123
+ * The mode is on the JOB, not only on the input, because `status` is where an
8124
+ * operator finds out which one is running.
8125
+ */
8126
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8063
8127
  /** Shared input for planning and starting an orchestrated storage migration. */
8064
8128
  var StorageMigrationInputSchema = object({
8065
8129
  destinations: StorageMigrationDestinationsSchema,
8066
- throttleMbps: number().min(1).max(1e3).optional()
8130
+ throttleMbps: number().min(1).max(1e3).optional(),
8131
+ /** Omitted = `blocking`, which stays the default. */
8132
+ mode: StorageMigrationModeSchema.optional()
8067
8133
  });
8068
- /** The durable coordinator state machine. The only phase that changes default
8069
- * locations is `repointing`, after every selected mover has completed and been
8070
- * verified. */
8134
+ /**
8135
+ * The durable coordinator state machine.
8136
+ *
8137
+ * `blocking`:
8138
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8139
+ *
8140
+ * `nonBlocking`:
8141
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8142
+ *
8143
+ * Same phases, different order plus two new ones — not a second mover.
8144
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8145
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8146
+ * `repointing` is still the only phase that changes a default location.
8147
+ */
8071
8148
  var StorageMigrationPhaseSchema = _enum([
8072
8149
  "planning",
8150
+ "sealing",
8073
8151
  "pausing",
8074
8152
  "moving",
8153
+ "draining",
8075
8154
  "verifying",
8076
8155
  "repointing",
8077
8156
  "refreshing",
@@ -8096,6 +8175,9 @@ var StorageMigrationMoveSchema = object({
8096
8175
  var StorageMigrationJobSchema = object({
8097
8176
  jobId: string(),
8098
8177
  phase: StorageMigrationPhaseSchema,
8178
+ /** Which order this job is running. `status` is the only place an operator
8179
+ * can tell a seconds-long cutover from a thirty-hour one. */
8180
+ mode: StorageMigrationModeSchema,
8099
8181
  destinations: StorageMigrationDestinationsSchema,
8100
8182
  throttleMbps: number(),
8101
8183
  moves: array(StorageMigrationMoveSchema),
@@ -8108,13 +8190,30 @@ var StorageMigrationJobSchema = object({
8108
8190
  finishedAt: number().nullable(),
8109
8191
  error: string().nullable()
8110
8192
  });
8193
+ var StorageMigrationFindingSchema = object({
8194
+ code: _enum([
8195
+ "sharesDeviceWithSource",
8196
+ "deviceIdentityUnknown",
8197
+ "unstampedEventMediaRows",
8198
+ "blockingOnly",
8199
+ "noMover"
8200
+ ]),
8201
+ storageClass: StorageMigrationClassSchema,
8202
+ /** Human-readable, already carrying the ids and counts. */
8203
+ message: string()
8204
+ });
8111
8205
  var StorageMigrationPlanSchema = object({
8112
8206
  destinations: StorageMigrationDestinationsSchema,
8207
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8208
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8209
+ * it. */
8210
+ mode: StorageMigrationModeSchema,
8113
8211
  moves: array(object({
8114
8212
  storageClass: StorageMigrationClassSchema,
8115
8213
  fromLocationId: string(),
8116
8214
  toLocationId: string()
8117
- }))
8215
+ })),
8216
+ findings: array(StorageMigrationFindingSchema)
8118
8217
  });
8119
8218
  /**
8120
8219
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -18680,7 +18779,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18680
18779
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18681
18780
  kind: "mutation",
18682
18781
  auth: "admin"
18683
- }), method(object({}), array(RelocateJobSchema).readonly(), {
18782
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18684
18783
  kind: "query",
18685
18784
  auth: "admin"
18686
18785
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20691,7 +20790,10 @@ method(object({
20691
20790
  }), StorageLocationSchema, {
20692
20791
  kind: "mutation",
20693
20792
  auth: "admin"
20694
- }), method(object({ id: string() }), _void(), {
20793
+ }), method(object({
20794
+ id: string(),
20795
+ force: boolean().optional()
20796
+ }), _void(), {
20695
20797
  kind: "mutation",
20696
20798
  auth: "admin"
20697
20799
  }), method(object({ id: string() }), object({
@@ -31616,6 +31718,12 @@ Object.freeze({
31616
31718
  addonId: null,
31617
31719
  access: "create"
31618
31720
  },
31721
+ "pipelineAnalytics.countUnstampedEventMedia": {
31722
+ capName: "pipeline-analytics",
31723
+ capScope: "device",
31724
+ addonId: null,
31725
+ access: "view"
31726
+ },
31619
31727
  "pipelineAnalytics.deleteDeviceEvents": {
31620
31728
  capName: "pipeline-analytics",
31621
31729
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.41",
3
+ "version": "1.2.42",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",