@camstack/addon-provider-hikvision 1.2.50 → 1.2.51

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
@@ -8034,18 +8034,61 @@ var RelocateFootageInputSchema = object({
8034
8034
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8035
8035
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8036
8036
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8037
+ /**
8038
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8039
+ * mover (the engine already walks both collections with a timestamp cursor and
8040
+ * already has a stamp-without-copy path).
8041
+ *
8042
+ * - `move` — the default and the historical behaviour: event-media and
8043
+ * retrain blobs move to `toLocationId` and their rows are
8044
+ * stamped. The enrolled gallery is skipped (D197).
8045
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8046
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8047
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8048
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8049
+ * instant a repoint moves that pointer the row reads from the
8050
+ * new disk while its bytes are on the old one.
8051
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8052
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8053
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8054
+ * never run beside a live second location: it is stop-the-world
8055
+ * by construction, which is acceptable only because the gallery
8056
+ * is a few KB per enrolled sample.
8057
+ */
8058
+ var MediaRelocateModeSchema = _enum([
8059
+ "move",
8060
+ "seal",
8061
+ "gallery"
8062
+ ]);
8037
8063
  var RelocateMediaInputSchema = object({
8038
8064
  toLocationId: string(),
8039
- throttleMbps: number().min(1).max(1e3).optional()
8065
+ throttleMbps: number().min(1).max(1e3).optional(),
8066
+ /** Omitted = `move`, the pre-existing behaviour. */
8067
+ mode: MediaRelocateModeSchema.optional()
8068
+ });
8069
+ /** How many rows still carry NO `locationId` — the population a repoint would
8070
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8071
+ * value that permits a non-blocking `eventMedia` cutover. */
8072
+ var UnstampedEventMediaCountSchema = object({
8073
+ media: number().int().nonnegative(),
8074
+ retrainFrames: number().int().nonnegative(),
8075
+ total: number().int().nonnegative()
8040
8076
  });
8041
8077
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8042
- /** The independently selectable logical storage classes. `recordings`
8043
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8044
- * segments; `eventMedia` is post-analysis blobs. */
8078
+ /** The independently selectable logical storage classes — every class
8079
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8080
+ * Zod enum error where they should meet an explanation.
8081
+ *
8082
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8083
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8084
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8085
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8045
8086
  var StorageMigrationClassSchema = _enum([
8046
8087
  "recordings",
8047
8088
  "recordingsLow",
8048
- "eventMedia"
8089
+ "eventMedia",
8090
+ "backups",
8091
+ "galleryMedia"
8049
8092
  ]);
8050
8093
  /** A destination is always an existing, fully-qualified location id. The
8051
8094
  * migration API intentionally never changes a source location's `basePath`:
@@ -8053,20 +8096,56 @@ var StorageMigrationClassSchema = _enum([
8053
8096
  var StorageMigrationDestinationsSchema = object({
8054
8097
  recordings: string().min(1).optional(),
8055
8098
  recordingsLow: string().min(1).optional(),
8056
- eventMedia: string().min(1).optional()
8099
+ eventMedia: string().min(1).optional(),
8100
+ backups: string().min(1).optional(),
8101
+ galleryMedia: string().min(1).optional()
8057
8102
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8103
+ /**
8104
+ * How a migration sequences the cutover against the byte move.
8105
+ *
8106
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8107
+ * resume. Recording is stopped for the whole move. Right
8108
+ * for a small or a cold class, and the only legal mode for
8109
+ * a `cardinality: 'single'` class.
8110
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8111
+ * refresh, resume, then move the past with everything
8112
+ * running. The pause is three bounded instants (a detach +
8113
+ * attach round, a write-gate drain, a lease) instead of one
8114
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8115
+ * stopped recording under `blocking`; the same move is
8116
+ * seconds of stopped recording under `nonBlocking`.
8117
+ *
8118
+ * The mode is on the JOB, not only on the input, because `status` is where an
8119
+ * operator finds out which one is running.
8120
+ */
8121
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8058
8122
  /** Shared input for planning and starting an orchestrated storage migration. */
8059
8123
  var StorageMigrationInputSchema = object({
8060
8124
  destinations: StorageMigrationDestinationsSchema,
8061
- throttleMbps: number().min(1).max(1e3).optional()
8125
+ throttleMbps: number().min(1).max(1e3).optional(),
8126
+ /** Omitted = `blocking`, which stays the default. */
8127
+ mode: StorageMigrationModeSchema.optional()
8062
8128
  });
8063
- /** The durable coordinator state machine. The only phase that changes default
8064
- * locations is `repointing`, after every selected mover has completed and been
8065
- * verified. */
8129
+ /**
8130
+ * The durable coordinator state machine.
8131
+ *
8132
+ * `blocking`:
8133
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8134
+ *
8135
+ * `nonBlocking`:
8136
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8137
+ *
8138
+ * Same phases, different order plus two new ones — not a second mover.
8139
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8140
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8141
+ * `repointing` is still the only phase that changes a default location.
8142
+ */
8066
8143
  var StorageMigrationPhaseSchema = _enum([
8067
8144
  "planning",
8145
+ "sealing",
8068
8146
  "pausing",
8069
8147
  "moving",
8148
+ "draining",
8070
8149
  "verifying",
8071
8150
  "repointing",
8072
8151
  "refreshing",
@@ -8091,6 +8170,9 @@ var StorageMigrationMoveSchema = object({
8091
8170
  var StorageMigrationJobSchema = object({
8092
8171
  jobId: string(),
8093
8172
  phase: StorageMigrationPhaseSchema,
8173
+ /** Which order this job is running. `status` is the only place an operator
8174
+ * can tell a seconds-long cutover from a thirty-hour one. */
8175
+ mode: StorageMigrationModeSchema,
8094
8176
  destinations: StorageMigrationDestinationsSchema,
8095
8177
  throttleMbps: number(),
8096
8178
  moves: array(StorageMigrationMoveSchema),
@@ -8103,13 +8185,30 @@ var StorageMigrationJobSchema = object({
8103
8185
  finishedAt: number().nullable(),
8104
8186
  error: string().nullable()
8105
8187
  });
8188
+ var StorageMigrationFindingSchema = object({
8189
+ code: _enum([
8190
+ "sharesDeviceWithSource",
8191
+ "deviceIdentityUnknown",
8192
+ "unstampedEventMediaRows",
8193
+ "blockingOnly",
8194
+ "noMover"
8195
+ ]),
8196
+ storageClass: StorageMigrationClassSchema,
8197
+ /** Human-readable, already carrying the ids and counts. */
8198
+ message: string()
8199
+ });
8106
8200
  var StorageMigrationPlanSchema = object({
8107
8201
  destinations: StorageMigrationDestinationsSchema,
8202
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8203
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8204
+ * it. */
8205
+ mode: StorageMigrationModeSchema,
8108
8206
  moves: array(object({
8109
8207
  storageClass: StorageMigrationClassSchema,
8110
8208
  fromLocationId: string(),
8111
8209
  toLocationId: string()
8112
- }))
8210
+ })),
8211
+ findings: array(StorageMigrationFindingSchema)
8113
8212
  });
8114
8213
  /**
8115
8214
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -19274,7 +19373,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19274
19373
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19275
19374
  kind: "mutation",
19276
19375
  auth: "admin"
19277
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19376
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
19278
19377
  kind: "query",
19279
19378
  auth: "admin"
19280
19379
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -21285,7 +21384,10 @@ method(object({
21285
21384
  }), StorageLocationSchema, {
21286
21385
  kind: "mutation",
21287
21386
  auth: "admin"
21288
- }), method(object({ id: string() }), _void(), {
21387
+ }), method(object({
21388
+ id: string(),
21389
+ force: boolean().optional()
21390
+ }), _void(), {
21289
21391
  kind: "mutation",
21290
21392
  auth: "admin"
21291
21393
  }), method(object({ id: string() }), object({
@@ -35706,6 +35808,12 @@ Object.freeze({
35706
35808
  addonId: null,
35707
35809
  access: "create"
35708
35810
  },
35811
+ "pipelineAnalytics.countUnstampedEventMedia": {
35812
+ capName: "pipeline-analytics",
35813
+ capScope: "device",
35814
+ addonId: null,
35815
+ access: "view"
35816
+ },
35709
35817
  "pipelineAnalytics.deleteDeviceEvents": {
35710
35818
  capName: "pipeline-analytics",
35711
35819
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -8035,18 +8035,61 @@ var RelocateFootageInputSchema = object({
8035
8035
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8036
8036
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8037
8037
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8038
+ /**
8039
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8040
+ * mover (the engine already walks both collections with a timestamp cursor and
8041
+ * already has a stamp-without-copy path).
8042
+ *
8043
+ * - `move` — the default and the historical behaviour: event-media and
8044
+ * retrain blobs move to `toLocationId` and their rows are
8045
+ * stamped. The enrolled gallery is skipped (D197).
8046
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8047
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8048
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8049
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8050
+ * instant a repoint moves that pointer the row reads from the
8051
+ * new disk while its bytes are on the old one.
8052
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8053
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8054
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8055
+ * never run beside a live second location: it is stop-the-world
8056
+ * by construction, which is acceptable only because the gallery
8057
+ * is a few KB per enrolled sample.
8058
+ */
8059
+ var MediaRelocateModeSchema = _enum([
8060
+ "move",
8061
+ "seal",
8062
+ "gallery"
8063
+ ]);
8038
8064
  var RelocateMediaInputSchema = object({
8039
8065
  toLocationId: string(),
8040
- throttleMbps: number().min(1).max(1e3).optional()
8066
+ throttleMbps: number().min(1).max(1e3).optional(),
8067
+ /** Omitted = `move`, the pre-existing behaviour. */
8068
+ mode: MediaRelocateModeSchema.optional()
8069
+ });
8070
+ /** How many rows still carry NO `locationId` — the population a repoint would
8071
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8072
+ * value that permits a non-blocking `eventMedia` cutover. */
8073
+ var UnstampedEventMediaCountSchema = object({
8074
+ media: number().int().nonnegative(),
8075
+ retrainFrames: number().int().nonnegative(),
8076
+ total: number().int().nonnegative()
8041
8077
  });
8042
8078
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8043
- /** The independently selectable logical storage classes. `recordings`
8044
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8045
- * segments; `eventMedia` is post-analysis blobs. */
8079
+ /** The independently selectable logical storage classes — every class
8080
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8081
+ * Zod enum error where they should meet an explanation.
8082
+ *
8083
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8084
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8085
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8086
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8046
8087
  var StorageMigrationClassSchema = _enum([
8047
8088
  "recordings",
8048
8089
  "recordingsLow",
8049
- "eventMedia"
8090
+ "eventMedia",
8091
+ "backups",
8092
+ "galleryMedia"
8050
8093
  ]);
8051
8094
  /** A destination is always an existing, fully-qualified location id. The
8052
8095
  * migration API intentionally never changes a source location's `basePath`:
@@ -8054,20 +8097,56 @@ var StorageMigrationClassSchema = _enum([
8054
8097
  var StorageMigrationDestinationsSchema = object({
8055
8098
  recordings: string().min(1).optional(),
8056
8099
  recordingsLow: string().min(1).optional(),
8057
- eventMedia: string().min(1).optional()
8100
+ eventMedia: string().min(1).optional(),
8101
+ backups: string().min(1).optional(),
8102
+ galleryMedia: string().min(1).optional()
8058
8103
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8104
+ /**
8105
+ * How a migration sequences the cutover against the byte move.
8106
+ *
8107
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8108
+ * resume. Recording is stopped for the whole move. Right
8109
+ * for a small or a cold class, and the only legal mode for
8110
+ * a `cardinality: 'single'` class.
8111
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8112
+ * refresh, resume, then move the past with everything
8113
+ * running. The pause is three bounded instants (a detach +
8114
+ * attach round, a write-gate drain, a lease) instead of one
8115
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8116
+ * stopped recording under `blocking`; the same move is
8117
+ * seconds of stopped recording under `nonBlocking`.
8118
+ *
8119
+ * The mode is on the JOB, not only on the input, because `status` is where an
8120
+ * operator finds out which one is running.
8121
+ */
8122
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8059
8123
  /** Shared input for planning and starting an orchestrated storage migration. */
8060
8124
  var StorageMigrationInputSchema = object({
8061
8125
  destinations: StorageMigrationDestinationsSchema,
8062
- throttleMbps: number().min(1).max(1e3).optional()
8126
+ throttleMbps: number().min(1).max(1e3).optional(),
8127
+ /** Omitted = `blocking`, which stays the default. */
8128
+ mode: StorageMigrationModeSchema.optional()
8063
8129
  });
8064
- /** The durable coordinator state machine. The only phase that changes default
8065
- * locations is `repointing`, after every selected mover has completed and been
8066
- * verified. */
8130
+ /**
8131
+ * The durable coordinator state machine.
8132
+ *
8133
+ * `blocking`:
8134
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8135
+ *
8136
+ * `nonBlocking`:
8137
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8138
+ *
8139
+ * Same phases, different order plus two new ones — not a second mover.
8140
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8141
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8142
+ * `repointing` is still the only phase that changes a default location.
8143
+ */
8067
8144
  var StorageMigrationPhaseSchema = _enum([
8068
8145
  "planning",
8146
+ "sealing",
8069
8147
  "pausing",
8070
8148
  "moving",
8149
+ "draining",
8071
8150
  "verifying",
8072
8151
  "repointing",
8073
8152
  "refreshing",
@@ -8092,6 +8171,9 @@ var StorageMigrationMoveSchema = object({
8092
8171
  var StorageMigrationJobSchema = object({
8093
8172
  jobId: string(),
8094
8173
  phase: StorageMigrationPhaseSchema,
8174
+ /** Which order this job is running. `status` is the only place an operator
8175
+ * can tell a seconds-long cutover from a thirty-hour one. */
8176
+ mode: StorageMigrationModeSchema,
8095
8177
  destinations: StorageMigrationDestinationsSchema,
8096
8178
  throttleMbps: number(),
8097
8179
  moves: array(StorageMigrationMoveSchema),
@@ -8104,13 +8186,30 @@ var StorageMigrationJobSchema = object({
8104
8186
  finishedAt: number().nullable(),
8105
8187
  error: string().nullable()
8106
8188
  });
8189
+ var StorageMigrationFindingSchema = object({
8190
+ code: _enum([
8191
+ "sharesDeviceWithSource",
8192
+ "deviceIdentityUnknown",
8193
+ "unstampedEventMediaRows",
8194
+ "blockingOnly",
8195
+ "noMover"
8196
+ ]),
8197
+ storageClass: StorageMigrationClassSchema,
8198
+ /** Human-readable, already carrying the ids and counts. */
8199
+ message: string()
8200
+ });
8107
8201
  var StorageMigrationPlanSchema = object({
8108
8202
  destinations: StorageMigrationDestinationsSchema,
8203
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8204
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8205
+ * it. */
8206
+ mode: StorageMigrationModeSchema,
8109
8207
  moves: array(object({
8110
8208
  storageClass: StorageMigrationClassSchema,
8111
8209
  fromLocationId: string(),
8112
8210
  toLocationId: string()
8113
- }))
8211
+ })),
8212
+ findings: array(StorageMigrationFindingSchema)
8114
8213
  });
8115
8214
  /**
8116
8215
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -19275,7 +19374,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19275
19374
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19276
19375
  kind: "mutation",
19277
19376
  auth: "admin"
19278
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19377
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
19279
19378
  kind: "query",
19280
19379
  auth: "admin"
19281
19380
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -21286,7 +21385,10 @@ method(object({
21286
21385
  }), StorageLocationSchema, {
21287
21386
  kind: "mutation",
21288
21387
  auth: "admin"
21289
- }), method(object({ id: string() }), _void(), {
21388
+ }), method(object({
21389
+ id: string(),
21390
+ force: boolean().optional()
21391
+ }), _void(), {
21290
21392
  kind: "mutation",
21291
21393
  auth: "admin"
21292
21394
  }), method(object({ id: string() }), object({
@@ -35707,6 +35809,12 @@ Object.freeze({
35707
35809
  addonId: null,
35708
35810
  access: "create"
35709
35811
  },
35812
+ "pipelineAnalytics.countUnstampedEventMedia": {
35813
+ capName: "pipeline-analytics",
35814
+ capScope: "device",
35815
+ addonId: null,
35816
+ access: "view"
35817
+ },
35710
35818
  "pipelineAnalytics.deleteDeviceEvents": {
35711
35819
  capName: "pipeline-analytics",
35712
35820
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.50",
3
+ "version": "1.2.51",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",