@camstack/types 1.2.122 → 1.2.124

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.
@@ -91,24 +91,77 @@ export declare const StorageMigrationFootageMoveInputSchema: z.ZodObject<{
91
91
  leaseId: z.ZodString;
92
92
  }, z.core.$strip>;
93
93
  export type StorageMigrationFootageMoveInput = z.infer<typeof StorageMigrationFootageMoveInputSchema>;
94
+ /**
95
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
96
+ * mover (the engine already walks both collections with a timestamp cursor and
97
+ * already has a stamp-without-copy path).
98
+ *
99
+ * - `move` — the default and the historical behaviour: event-media and
100
+ * retrain blobs move to `toLocationId` and their rows are
101
+ * stamped. The enrolled gallery is skipped (D197).
102
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
103
+ * stamped with `toLocationId`. `toLocationId` here is the id the
104
+ * bytes ALREADY sit on — today's `eventMedia` default — because
105
+ * a NULL row means "wherever `eventMedia` points *now*", and the
106
+ * instant a repoint moves that pointer the row reads from the
107
+ * new disk while its bytes are on the old one.
108
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
109
+ * (enrolled-gallery) rows, which `move` deliberately skips.
110
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
111
+ * never run beside a live second location: it is stop-the-world
112
+ * by construction, which is acceptable only because the gallery
113
+ * is a few KB per enrolled sample.
114
+ */
115
+ export declare const MediaRelocateModeSchema: z.ZodEnum<{
116
+ move: "move";
117
+ seal: "seal";
118
+ gallery: "gallery";
119
+ }>;
120
+ export type MediaRelocateMode = z.infer<typeof MediaRelocateModeSchema>;
94
121
  export declare const RelocateMediaInputSchema: z.ZodObject<{
95
122
  toLocationId: z.ZodString;
96
123
  throttleMbps: z.ZodOptional<z.ZodNumber>;
124
+ mode: z.ZodOptional<z.ZodEnum<{
125
+ move: "move";
126
+ seal: "seal";
127
+ gallery: "gallery";
128
+ }>>;
97
129
  }, z.core.$strip>;
98
130
  export type RelocateMediaInput = z.infer<typeof RelocateMediaInputSchema>;
131
+ /** How many rows still carry NO `locationId` — the population a repoint would
132
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
133
+ * value that permits a non-blocking `eventMedia` cutover. */
134
+ export declare const UnstampedEventMediaCountSchema: z.ZodObject<{
135
+ media: z.ZodNumber;
136
+ retrainFrames: z.ZodNumber;
137
+ total: z.ZodNumber;
138
+ }, z.core.$strip>;
139
+ export type UnstampedEventMediaCount = z.infer<typeof UnstampedEventMediaCountSchema>;
99
140
  export declare const StorageMigrationMediaMoveInputSchema: z.ZodObject<{
100
141
  toLocationId: z.ZodString;
101
142
  throttleMbps: z.ZodOptional<z.ZodNumber>;
143
+ mode: z.ZodOptional<z.ZodEnum<{
144
+ move: "move";
145
+ seal: "seal";
146
+ gallery: "gallery";
147
+ }>>;
102
148
  leaseId: z.ZodString;
103
149
  }, z.core.$strip>;
104
150
  export type StorageMigrationMediaMoveInput = z.infer<typeof StorageMigrationMediaMoveInputSchema>;
105
- /** The independently selectable logical storage classes. `recordings`
106
- * encompasses the high and mid segment profiles; `recordingsLow` is low
107
- * segments; `eventMedia` is post-analysis blobs. */
151
+ /** The independently selectable logical storage classes — every class
152
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
153
+ * Zod enum error where they should meet an explanation.
154
+ *
155
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
156
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
157
+ * enrolled gallery; `backups` is the system backup archive. The last two have
158
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
108
159
  export declare const StorageMigrationClassSchema: z.ZodEnum<{
109
160
  recordings: "recordings";
110
161
  recordingsLow: "recordingsLow";
111
162
  eventMedia: "eventMedia";
163
+ backups: "backups";
164
+ galleryMedia: "galleryMedia";
112
165
  }>;
113
166
  export type StorageMigrationClass = z.infer<typeof StorageMigrationClassSchema>;
114
167
  /** A destination is always an existing, fully-qualified location id. The
@@ -118,21 +171,63 @@ export declare const StorageMigrationDestinationsSchema: z.ZodObject<{
118
171
  recordings: z.ZodOptional<z.ZodString>;
119
172
  recordingsLow: z.ZodOptional<z.ZodString>;
120
173
  eventMedia: z.ZodOptional<z.ZodString>;
174
+ backups: z.ZodOptional<z.ZodString>;
175
+ galleryMedia: z.ZodOptional<z.ZodString>;
121
176
  }, z.core.$strip>;
122
177
  export type StorageMigrationDestinations = z.infer<typeof StorageMigrationDestinationsSchema>;
178
+ /**
179
+ * How a migration sequences the cutover against the byte move.
180
+ *
181
+ * - `blocking` — the historical order: pause, move every byte, repoint,
182
+ * resume. Recording is stopped for the whole move. Right
183
+ * for a small or a cold class, and the only legal mode for
184
+ * a `cardinality: 'single'` class.
185
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
186
+ * refresh, resume, then move the past with everything
187
+ * running. The pause is three bounded instants (a detach +
188
+ * attach round, a write-gate drain, a lease) instead of one
189
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
190
+ * stopped recording under `blocking`; the same move is
191
+ * seconds of stopped recording under `nonBlocking`.
192
+ *
193
+ * The mode is on the JOB, not only on the input, because `status` is where an
194
+ * operator finds out which one is running.
195
+ */
196
+ export declare const StorageMigrationModeSchema: z.ZodEnum<{
197
+ blocking: "blocking";
198
+ nonBlocking: "nonBlocking";
199
+ }>;
200
+ export type StorageMigrationMode = z.infer<typeof StorageMigrationModeSchema>;
123
201
  /** Shared input for planning and starting an orchestrated storage migration. */
124
202
  export declare const StorageMigrationInputSchema: z.ZodObject<{
125
203
  destinations: z.ZodObject<{
126
204
  recordings: z.ZodOptional<z.ZodString>;
127
205
  recordingsLow: z.ZodOptional<z.ZodString>;
128
206
  eventMedia: z.ZodOptional<z.ZodString>;
207
+ backups: z.ZodOptional<z.ZodString>;
208
+ galleryMedia: z.ZodOptional<z.ZodString>;
129
209
  }, z.core.$strip>;
130
210
  throttleMbps: z.ZodOptional<z.ZodNumber>;
211
+ mode: z.ZodOptional<z.ZodEnum<{
212
+ blocking: "blocking";
213
+ nonBlocking: "nonBlocking";
214
+ }>>;
131
215
  }, z.core.$strip>;
132
216
  export type StorageMigrationInput = z.infer<typeof StorageMigrationInputSchema>;
133
- /** The durable coordinator state machine. The only phase that changes default
134
- * locations is `repointing`, after every selected mover has completed and been
135
- * verified. */
217
+ /**
218
+ * The durable coordinator state machine.
219
+ *
220
+ * `blocking`:
221
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
222
+ *
223
+ * `nonBlocking`:
224
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
225
+ *
226
+ * Same phases, different order plus two new ones — not a second mover.
227
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
228
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
229
+ * `repointing` is still the only phase that changes a default location.
230
+ */
136
231
  export declare const StorageMigrationPhaseSchema: z.ZodEnum<{
137
232
  moving: "moving";
138
233
  verifying: "verifying";
@@ -140,7 +235,9 @@ export declare const StorageMigrationPhaseSchema: z.ZodEnum<{
140
235
  done: "done";
141
236
  cancelled: "cancelled";
142
237
  planning: "planning";
238
+ sealing: "sealing";
143
239
  pausing: "pausing";
240
+ draining: "draining";
144
241
  repointing: "repointing";
145
242
  refreshing: "refreshing";
146
243
  resuming: "resuming";
@@ -157,6 +254,8 @@ export declare const StorageMigrationMoveSchema: z.ZodObject<{
157
254
  recordings: "recordings";
158
255
  recordingsLow: "recordingsLow";
159
256
  eventMedia: "eventMedia";
257
+ backups: "backups";
258
+ galleryMedia: "galleryMedia";
160
259
  }>;
161
260
  fromLocationId: z.ZodString;
162
261
  toLocationId: z.ZodString;
@@ -180,15 +279,23 @@ export declare const StorageMigrationJobSchema: z.ZodObject<{
180
279
  done: "done";
181
280
  cancelled: "cancelled";
182
281
  planning: "planning";
282
+ sealing: "sealing";
183
283
  pausing: "pausing";
284
+ draining: "draining";
184
285
  repointing: "repointing";
185
286
  refreshing: "refreshing";
186
287
  resuming: "resuming";
187
288
  }>;
289
+ mode: z.ZodEnum<{
290
+ blocking: "blocking";
291
+ nonBlocking: "nonBlocking";
292
+ }>;
188
293
  destinations: z.ZodObject<{
189
294
  recordings: z.ZodOptional<z.ZodString>;
190
295
  recordingsLow: z.ZodOptional<z.ZodString>;
191
296
  eventMedia: z.ZodOptional<z.ZodString>;
297
+ backups: z.ZodOptional<z.ZodString>;
298
+ galleryMedia: z.ZodOptional<z.ZodString>;
192
299
  }, z.core.$strip>;
193
300
  throttleMbps: z.ZodNumber;
194
301
  moves: z.ZodArray<z.ZodObject<{
@@ -196,6 +303,8 @@ export declare const StorageMigrationJobSchema: z.ZodObject<{
196
303
  recordings: "recordings";
197
304
  recordingsLow: "recordingsLow";
198
305
  eventMedia: "eventMedia";
306
+ backups: "backups";
307
+ galleryMedia: "galleryMedia";
199
308
  }>;
200
309
  fromLocationId: z.ZodString;
201
310
  toLocationId: z.ZodString;
@@ -223,20 +332,94 @@ export declare const StorageMigrationJobSchema: z.ZodObject<{
223
332
  error: z.ZodNullable<z.ZodString>;
224
333
  }, z.core.$strip>;
225
334
  export type StorageMigrationJob = z.infer<typeof StorageMigrationJobSchema>;
335
+ /**
336
+ * What the planner NOTICED but did not refuse.
337
+ *
338
+ * A refusal throws — the operator cannot miss it. A finding is the other half:
339
+ * something true about this plan that changes what the operator should expect,
340
+ * surfaced where they read it rather than in a document they will not open.
341
+ *
342
+ * - `sharesDeviceWithSource` — the destination realpath's to the same place as
343
+ * the source. The move will be a row re-stamp, not a byte move, and it buys
344
+ * no redundancy. NOTE: this is PATH identity, not `st_dev` — two distinct
345
+ * directories on one filesystem are NOT detected. See
346
+ * `deviceIdentityUnknown`.
347
+ * - `deviceIdentityUnknown` — a location carries a `nodeId` other than this
348
+ * one (or has no `basePath`), so its realpath cannot be taken here and the
349
+ * same-device question was not answered at all. Stated rather than assumed
350
+ * clear: a check that silently never fires is worse than no check.
351
+ * - `unstampedEventMediaRows` — how many `eventMedia`/retrain rows still carry
352
+ * no `locationId`. Non-zero refuses a `nonBlocking` cutover.
353
+ * - `blockingOnly` — this class is `cardinality: 'single'`, so it can never
354
+ * span two locations and can only ever be moved stop-the-world.
355
+ * - `noMover` — the class is selectable and planned, but no addon owns a mover
356
+ * for it. The migration cannot move its bytes.
357
+ */
358
+ export declare const StorageMigrationFindingCodeSchema: z.ZodEnum<{
359
+ sharesDeviceWithSource: "sharesDeviceWithSource";
360
+ deviceIdentityUnknown: "deviceIdentityUnknown";
361
+ unstampedEventMediaRows: "unstampedEventMediaRows";
362
+ blockingOnly: "blockingOnly";
363
+ noMover: "noMover";
364
+ }>;
365
+ export type StorageMigrationFindingCode = z.infer<typeof StorageMigrationFindingCodeSchema>;
366
+ export declare const StorageMigrationFindingSchema: z.ZodObject<{
367
+ code: z.ZodEnum<{
368
+ sharesDeviceWithSource: "sharesDeviceWithSource";
369
+ deviceIdentityUnknown: "deviceIdentityUnknown";
370
+ unstampedEventMediaRows: "unstampedEventMediaRows";
371
+ blockingOnly: "blockingOnly";
372
+ noMover: "noMover";
373
+ }>;
374
+ storageClass: z.ZodEnum<{
375
+ recordings: "recordings";
376
+ recordingsLow: "recordingsLow";
377
+ eventMedia: "eventMedia";
378
+ backups: "backups";
379
+ galleryMedia: "galleryMedia";
380
+ }>;
381
+ message: z.ZodString;
382
+ }, z.core.$strip>;
383
+ export type StorageMigrationFinding = z.infer<typeof StorageMigrationFindingSchema>;
226
384
  export declare const StorageMigrationPlanSchema: z.ZodObject<{
227
385
  destinations: z.ZodObject<{
228
386
  recordings: z.ZodOptional<z.ZodString>;
229
387
  recordingsLow: z.ZodOptional<z.ZodString>;
230
388
  eventMedia: z.ZodOptional<z.ZodString>;
389
+ backups: z.ZodOptional<z.ZodString>;
390
+ galleryMedia: z.ZodOptional<z.ZodString>;
231
391
  }, z.core.$strip>;
392
+ mode: z.ZodEnum<{
393
+ blocking: "blocking";
394
+ nonBlocking: "nonBlocking";
395
+ }>;
232
396
  moves: z.ZodArray<z.ZodObject<{
233
397
  storageClass: z.ZodEnum<{
234
398
  recordings: "recordings";
235
399
  recordingsLow: "recordingsLow";
236
400
  eventMedia: "eventMedia";
401
+ backups: "backups";
402
+ galleryMedia: "galleryMedia";
237
403
  }>;
238
404
  fromLocationId: z.ZodString;
239
405
  toLocationId: z.ZodString;
240
406
  }, z.core.$strip>>;
407
+ findings: z.ZodArray<z.ZodObject<{
408
+ code: z.ZodEnum<{
409
+ sharesDeviceWithSource: "sharesDeviceWithSource";
410
+ deviceIdentityUnknown: "deviceIdentityUnknown";
411
+ unstampedEventMediaRows: "unstampedEventMediaRows";
412
+ blockingOnly: "blockingOnly";
413
+ noMover: "noMover";
414
+ }>;
415
+ storageClass: z.ZodEnum<{
416
+ recordings: "recordings";
417
+ recordingsLow: "recordingsLow";
418
+ eventMedia: "eventMedia";
419
+ backups: "backups";
420
+ galleryMedia: "galleryMedia";
421
+ }>;
422
+ message: z.ZodString;
423
+ }, z.core.$strip>>;
241
424
  }, z.core.$strip>;
242
425
  export type StorageMigrationPlan = z.infer<typeof StorageMigrationPlanSchema>;
@@ -3445,6 +3445,7 @@ function createDeviceProxy(api, binding, opts) {
3445
3445
  getStorageMigrationMoveStatus: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getStorageMigrationMoveStatus", "query", input),
3446
3446
  cancelStorageMigrationMove: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "cancelStorageMigrationMove", "mutation", input),
3447
3447
  relocateMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "relocateMedia", "mutation", input),
3448
+ countUnstampedEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "countUnstampedEventMedia", "query", input),
3448
3449
  listRelocateMediaJobs: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listRelocateMediaJobs", "query", input),
3449
3450
  cancelRelocateMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "cancelRelocateMedia", "mutation", input),
3450
3451
  listOpsLog: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listOpsLog", "query", input),
@@ -3445,6 +3445,7 @@ function createDeviceProxy(api, binding, opts) {
3445
3445
  getStorageMigrationMoveStatus: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getStorageMigrationMoveStatus", "query", input),
3446
3446
  cancelStorageMigrationMove: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "cancelStorageMigrationMove", "mutation", input),
3447
3447
  relocateMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "relocateMedia", "mutation", input),
3448
+ countUnstampedEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "countUnstampedEventMedia", "query", input),
3448
3449
  listRelocateMediaJobs: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listRelocateMediaJobs", "query", input),
3449
3450
  cancelRelocateMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "cancelRelocateMedia", "mutation", input),
3450
3451
  listOpsLog: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listOpsLog", "query", input),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.122",
3
+ "version": "1.2.124",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",