@camstack/addon-auth 1.2.9 → 1.2.11

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.
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-Bz24uP1U.mjs
1
+ //#region ../types/dist/event-category-41fKf-q9.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -58,6 +58,26 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
58
58
  */
59
59
  EventCategory["AddonRetryScheduled"] = "addon.retry-scheduled";
60
60
  /**
61
+ * A liveness invariant of this node is false — it has no devices, every
62
+ * camera is offline, or a camera that was recording has stopped producing
63
+ * segments. Emitted by the `liveness-monitor` builtin, once per fault (the
64
+ * `findingId` is stable across ticks), only after its boot grace period.
65
+ * AlertCenter raises a persistent operator-visible alert.
66
+ *
67
+ * It exists because on 2026-08-03 the hub ran four hours with zero devices
68
+ * and zero recordings while every surface stayed quiet.
69
+ *
70
+ * Payload: `{ findingId, severity, title, message, deviceId? }`.
71
+ */
72
+ EventCategory["SystemLivenessFailed"] = "system.liveness-failed";
73
+ /**
74
+ * A previously reported liveness fault is true again. AlertCenter dismisses
75
+ * the matching `SystemLivenessFailed` alert.
76
+ *
77
+ * Payload: `{ findingId }`.
78
+ */
79
+ EventCategory["SystemLivenessRecovered"] = "system.liveness-recovered";
80
+ /**
61
81
  * Monitor is attempting to reload a failed addon NOW. UI uses this
62
82
  * to show a spinner during the retry attempt. Same transient nature
63
83
  * as AddonRetryScheduled.
@@ -7437,14 +7457,7 @@ var RecordingConfigSchema = object({
7437
7457
  * windows only — existing sheets are immutable, and each window's index
7438
7458
  * carries its own tile dims so mixed-preset history renders correctly.
7439
7459
  */
7440
- scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7441
- /**
7442
- * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7443
- * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7444
- * cache that eviction reclaims with the footage. Absent/false = no strips
7445
- * are written and scrub reads exact keyframes at every velocity.
7446
- */
7447
- stripsEnabled: boolean().optional()
7460
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7448
7461
  }).strict();
7449
7462
  /**
7450
7463
  * Ops-log — the durable, append-only operations audit shared by the
@@ -7506,7 +7519,7 @@ var OpsLogQueryInputSchema = object({
7506
7519
  /**
7507
7520
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
7508
7521
  *
7509
- * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7522
+ * One shape shared by the recorder's `relocateFootage` (segments) and
7510
7523
  * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7511
7524
  * page renders both movers with one component. Jobs are in-RAM (a restart
7512
7525
  * forgets them — re-running is safe by construction: copy-if-absent, delete
@@ -7528,7 +7541,7 @@ var RelocateJobSchema = object({
7528
7541
  toLocationId: string(),
7529
7542
  /** Scoped device, or null = every device. */
7530
7543
  deviceId: number().nullable(),
7531
- /** What the job moves (owner-addon specific: segments/strips or media). */
7544
+ /** What the job moves (owner-addon specific: segments or media). */
7532
7545
  entities: array(string()),
7533
7546
  filesMoved: number().int(),
7534
7547
  bytesMoved: number().int(),
@@ -7542,7 +7555,7 @@ var RelocateFootageInputSchema = object({
7542
7555
  deviceId: number().optional(),
7543
7556
  fromLocationId: string(),
7544
7557
  toLocationId: string(),
7545
- entities: array(_enum(["segments", "strips"])).optional(),
7558
+ entities: array(_enum(["segments"])).optional(),
7546
7559
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7547
7560
  * never allowed to starve live writers. */
7548
7561
  throttleMbps: number().min(1).max(1e3).optional()
@@ -15231,6 +15244,210 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
15231
15244
  kind: "mutation",
15232
15245
  auth: "admin"
15233
15246
  });
15247
+ /**
15248
+ * Query filter for settings-store collections.
15249
+ */
15250
+ var QueryFilterSchema = object({
15251
+ where: record(string(), unknown()).optional(),
15252
+ whereIn: record(string(), array(unknown())).optional(),
15253
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
15254
+ orderBy: object({
15255
+ field: string(),
15256
+ direction: _enum(["asc", "desc"])
15257
+ }).optional(),
15258
+ limit: number().optional(),
15259
+ offset: number().optional()
15260
+ });
15261
+ /**
15262
+ * The predicate half of a filter, for BULK MUTATIONS.
15263
+ *
15264
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
15265
+ * meaning for a statement that rewrites a set, and accepting them would invite
15266
+ * a caller to believe `limit` bounds the damage. Every field is optional here
15267
+ * only so the shape stays composable — the implementation REJECTS a filter
15268
+ * that compiles to no predicate, because that is the whole collection.
15269
+ */
15270
+ var MutationFilterSchema = object({
15271
+ where: record(string(), unknown()).optional(),
15272
+ whereIn: record(string(), array(unknown())).optional(),
15273
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
15274
+ });
15275
+ /** A single stored record: `{ id, data }`. */
15276
+ var SettingsRecordSchema = object({
15277
+ id: string(),
15278
+ data: record(string(), unknown())
15279
+ });
15280
+ /**
15281
+ * Column declaration for a structured (SQL-backed) collection.
15282
+ *
15283
+ * Logical types — the backend translates each to the matching SQLite
15284
+ * storage class and handles per-type marshaling:
15285
+ * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
15286
+ * - `JSON` — TEXT under the hood; serialised on write, parsed on read
15287
+ * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
15288
+ */
15289
+ var CollectionColumnSchema = object({
15290
+ name: string(),
15291
+ type: _enum([
15292
+ "TEXT",
15293
+ "INTEGER",
15294
+ "REAL",
15295
+ "JSON",
15296
+ "BOOLEAN"
15297
+ ]),
15298
+ primaryKey: boolean().optional(),
15299
+ notNull: boolean().optional(),
15300
+ unique: boolean().optional(),
15301
+ /**
15302
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
15303
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
15304
+ * collection surface simply cannot express their existing tables — which is
15305
+ * why they were still on the uncapped `table*` API.
15306
+ */
15307
+ defaultValue: union([
15308
+ string(),
15309
+ number(),
15310
+ boolean()
15311
+ ]).optional()
15312
+ });
15313
+ var CollectionIndexSchema = object({
15314
+ name: string(),
15315
+ columns: array(string()).readonly(),
15316
+ unique: boolean().optional()
15317
+ });
15318
+ method(object({
15319
+ namespace: string().optional(),
15320
+ collection: string(),
15321
+ key: string()
15322
+ }), unknown()), method(object({
15323
+ namespace: string().optional(),
15324
+ collection: string(),
15325
+ key: string(),
15326
+ value: unknown()
15327
+ }), _void(), { kind: "mutation" }), method(object({
15328
+ namespace: string().optional(),
15329
+ collection: string(),
15330
+ filter: QueryFilterSchema.optional()
15331
+ }), array(SettingsRecordSchema).readonly()), method(object({
15332
+ namespace: string().optional(),
15333
+ collection: string(),
15334
+ record: SettingsRecordSchema
15335
+ }), _void(), { kind: "mutation" }), method(object({
15336
+ namespace: string().optional(),
15337
+ collection: string(),
15338
+ id: string(),
15339
+ data: record(string(), unknown())
15340
+ }), _void(), { kind: "mutation" }), method(object({
15341
+ namespace: string().optional(),
15342
+ collection: string(),
15343
+ key: string()
15344
+ }), _void(), { kind: "mutation" }), method(object({
15345
+ namespace: string().optional(),
15346
+ collection: string(),
15347
+ filter: MutationFilterSchema
15348
+ }), object({ deleted: number().int() }), { kind: "mutation" }), method(object({
15349
+ namespace: string().optional(),
15350
+ collection: string(),
15351
+ filter: MutationFilterSchema,
15352
+ data: record(string(), unknown())
15353
+ }), object({ updated: number().int() }), { kind: "mutation" }), method(object({
15354
+ namespace: string().optional(),
15355
+ collection: string(),
15356
+ filter: QueryFilterSchema.optional()
15357
+ }), number()), method(object({
15358
+ namespace: string().optional(),
15359
+ collection: string(),
15360
+ field: string(),
15361
+ bucketSize: number().int().positive(),
15362
+ origin: number().int(),
15363
+ filter: QueryFilterSchema.optional()
15364
+ }), array(object({
15365
+ bucket: number().int(),
15366
+ count: number().int()
15367
+ })).readonly()), method(object({
15368
+ namespace: string().optional(),
15369
+ collection: string()
15370
+ }), boolean()), method(object({
15371
+ namespace: string().optional(),
15372
+ collection: string(),
15373
+ columns: array(CollectionColumnSchema).readonly(),
15374
+ indexes: array(CollectionIndexSchema).readonly().optional()
15375
+ }), _void(), { kind: "mutation" });
15376
+ /**
15377
+ * What one engine says about itself. The orchestrator uses `kind` to pick
15378
+ * a registrant for a collection; `engineId` is what a log line names when
15379
+ * a call is routed or refused.
15380
+ */
15381
+ var EngineInfoSchema = object({
15382
+ engineId: string(),
15383
+ /**
15384
+ * `relational` — rows, columns, indexes, the surface `settings-store`
15385
+ * has always described. `vector` — an embedding store answering
15386
+ * similarity queries. A registrant declares exactly one; an engine that
15387
+ * does both registers twice, because "both" would make the routing
15388
+ * decision ambiguous at exactly the point it must not be.
15389
+ */
15390
+ kind: _enum(["relational", "vector"]),
15391
+ displayName: string()
15392
+ });
15393
+ method(_void(), EngineInfoSchema), method(object({
15394
+ namespace: string().optional(),
15395
+ collection: string(),
15396
+ key: string()
15397
+ }), unknown()), method(object({
15398
+ namespace: string().optional(),
15399
+ collection: string(),
15400
+ key: string(),
15401
+ value: unknown()
15402
+ }), _void(), { kind: "mutation" }), method(object({
15403
+ namespace: string().optional(),
15404
+ collection: string(),
15405
+ filter: QueryFilterSchema.optional()
15406
+ }), array(SettingsRecordSchema).readonly()), method(object({
15407
+ namespace: string().optional(),
15408
+ collection: string(),
15409
+ record: SettingsRecordSchema
15410
+ }), _void(), { kind: "mutation" }), method(object({
15411
+ namespace: string().optional(),
15412
+ collection: string(),
15413
+ id: string(),
15414
+ data: record(string(), unknown())
15415
+ }), _void(), { kind: "mutation" }), method(object({
15416
+ namespace: string().optional(),
15417
+ collection: string(),
15418
+ key: string()
15419
+ }), _void(), { kind: "mutation" }), method(object({
15420
+ namespace: string().optional(),
15421
+ collection: string(),
15422
+ filter: MutationFilterSchema
15423
+ }), object({ deleted: number().int() }), { kind: "mutation" }), method(object({
15424
+ namespace: string().optional(),
15425
+ collection: string(),
15426
+ filter: MutationFilterSchema,
15427
+ data: record(string(), unknown())
15428
+ }), object({ updated: number().int() }), { kind: "mutation" }), method(object({
15429
+ namespace: string().optional(),
15430
+ collection: string(),
15431
+ filter: QueryFilterSchema.optional()
15432
+ }), number()), method(object({
15433
+ namespace: string().optional(),
15434
+ collection: string(),
15435
+ field: string(),
15436
+ bucketSize: number().int().positive(),
15437
+ origin: number().int(),
15438
+ filter: QueryFilterSchema.optional()
15439
+ }), array(object({
15440
+ bucket: number().int(),
15441
+ count: number().int()
15442
+ })).readonly()), method(object({
15443
+ namespace: string().optional(),
15444
+ collection: string()
15445
+ }), boolean()), method(object({
15446
+ namespace: string().optional(),
15447
+ collection: string(),
15448
+ columns: array(CollectionColumnSchema).readonly(),
15449
+ indexes: array(CollectionIndexSchema).readonly().optional()
15450
+ }), _void(), { kind: "mutation" });
15234
15451
  DeviceType.Camera;
15235
15452
  /**
15236
15453
  * `device-adoption` — generic discovery + adoption surface,
@@ -18471,6 +18688,28 @@ var ServerUpdateStateSchema = _enum([
18471
18688
  "pending-restart",
18472
18689
  "awaiting-confirmation"
18473
18690
  ]);
18691
+ var ImageContractSchema = object({
18692
+ state: _enum([
18693
+ "in-sync",
18694
+ "behind-patch",
18695
+ "behind-series",
18696
+ "ahead",
18697
+ "unknown"
18698
+ ]),
18699
+ /** The baked seed closure version — the image/app-bundle fingerprint. */
18700
+ seedVersion: string().nullable(),
18701
+ /** Best-known version the deployment contract delivers today. */
18702
+ contractVersion: string().nullable(),
18703
+ /**
18704
+ * Where `contractVersion` came from: a real registry check (`registry`), or
18705
+ * the node's own running version (`running` — a node can never run code
18706
+ * newer than the newest release, so `seed < running` proves image staleness
18707
+ * even before any registry check has run).
18708
+ */
18709
+ contractSource: _enum(["registry", "running"]).nullable(),
18710
+ /** One operator-grade sentence: this node runs image X; the contract says Y. */
18711
+ message: string()
18712
+ });
18474
18713
  var ServerRollbackInfoSchema = object({
18475
18714
  /** The version that failed (or was manually rolled back). */
18476
18715
  fromVersion: string(),
@@ -18507,7 +18746,12 @@ var ServerPackageStatusSchema = object({
18507
18746
  * versions are being IGNORED. Surfaced as a warning in the UI.
18508
18747
  */
18509
18748
  stateFileCorrupt: boolean(),
18510
- lastCheckedAtMs: number().nullable()
18749
+ lastCheckedAtMs: number().nullable(),
18750
+ /**
18751
+ * Seed-vs-contract verdict (see {@link ImageContractSchema}). Optional for
18752
+ * version skew: an older provider's payload simply omits it.
18753
+ */
18754
+ imageContract: ImageContractSchema.optional()
18511
18755
  });
18512
18756
  var ServerUpdateCheckResultSchema = object({
18513
18757
  packageName: string(),
@@ -18542,101 +18786,6 @@ version: string().optional() }), ServerUpdateActionResultSchema, {
18542
18786
  auth: "admin"
18543
18787
  });
18544
18788
  /**
18545
- * Query filter for settings-store collections.
18546
- */
18547
- var QueryFilterSchema = object({
18548
- where: record(string(), unknown()).optional(),
18549
- whereIn: record(string(), array(unknown())).optional(),
18550
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
18551
- orderBy: object({
18552
- field: string(),
18553
- direction: _enum(["asc", "desc"])
18554
- }).optional(),
18555
- limit: number().optional(),
18556
- offset: number().optional()
18557
- });
18558
- /** A single stored record: `{ id, data }`. */
18559
- var SettingsRecordSchema = object({
18560
- id: string(),
18561
- data: record(string(), unknown())
18562
- });
18563
- /**
18564
- * Column declaration for a structured (SQL-backed) collection.
18565
- *
18566
- * Logical types — the backend translates each to the matching SQLite
18567
- * storage class and handles per-type marshaling:
18568
- * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
18569
- * - `JSON` — TEXT under the hood; serialised on write, parsed on read
18570
- * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
18571
- */
18572
- var CollectionColumnSchema = object({
18573
- name: string(),
18574
- type: _enum([
18575
- "TEXT",
18576
- "INTEGER",
18577
- "REAL",
18578
- "JSON",
18579
- "BOOLEAN"
18580
- ]),
18581
- primaryKey: boolean().optional(),
18582
- notNull: boolean().optional(),
18583
- unique: boolean().optional()
18584
- });
18585
- var CollectionIndexSchema = object({
18586
- name: string(),
18587
- columns: array(string()).readonly(),
18588
- unique: boolean().optional()
18589
- });
18590
- method(object({
18591
- namespace: string().optional(),
18592
- collection: string(),
18593
- key: string()
18594
- }), unknown()), method(object({
18595
- namespace: string().optional(),
18596
- collection: string(),
18597
- key: string(),
18598
- value: unknown()
18599
- }), _void(), { kind: "mutation" }), method(object({
18600
- namespace: string().optional(),
18601
- collection: string(),
18602
- filter: QueryFilterSchema.optional()
18603
- }), array(SettingsRecordSchema).readonly()), method(object({
18604
- namespace: string().optional(),
18605
- collection: string(),
18606
- record: SettingsRecordSchema
18607
- }), _void(), { kind: "mutation" }), method(object({
18608
- namespace: string().optional(),
18609
- collection: string(),
18610
- id: string(),
18611
- data: record(string(), unknown())
18612
- }), _void(), { kind: "mutation" }), method(object({
18613
- namespace: string().optional(),
18614
- collection: string(),
18615
- key: string()
18616
- }), _void(), { kind: "mutation" }), method(object({
18617
- namespace: string().optional(),
18618
- collection: string(),
18619
- filter: QueryFilterSchema.optional()
18620
- }), number()), method(object({
18621
- namespace: string().optional(),
18622
- collection: string(),
18623
- field: string(),
18624
- bucketSize: number().int().positive(),
18625
- origin: number().int(),
18626
- filter: QueryFilterSchema.optional()
18627
- }), array(object({
18628
- bucket: number().int(),
18629
- count: number().int()
18630
- })).readonly()), method(object({
18631
- namespace: string().optional(),
18632
- collection: string()
18633
- }), boolean()), method(object({
18634
- namespace: string().optional(),
18635
- collection: string(),
18636
- columns: array(CollectionColumnSchema).readonly(),
18637
- indexes: array(CollectionIndexSchema).readonly().optional()
18638
- }), _void(), { kind: "mutation" });
18639
- /**
18640
18789
  * `smtp-provider` — pluggable email delivery surface.
18641
18790
  *
18642
18791
  * Collection cap: a deployment may install multiple SMTP relays (e.g.
@@ -22552,6 +22701,84 @@ Object.freeze({
22552
22701
  addonId: null,
22553
22702
  access: "view"
22554
22703
  },
22704
+ "dataStoreProvider.count": {
22705
+ capName: "data-store-provider",
22706
+ capScope: "system",
22707
+ addonId: null,
22708
+ access: "view"
22709
+ },
22710
+ "dataStoreProvider.declareCollection": {
22711
+ capName: "data-store-provider",
22712
+ capScope: "system",
22713
+ addonId: null,
22714
+ access: "create"
22715
+ },
22716
+ "dataStoreProvider.delete": {
22717
+ capName: "data-store-provider",
22718
+ capScope: "system",
22719
+ addonId: null,
22720
+ access: "delete"
22721
+ },
22722
+ "dataStoreProvider.deleteWhere": {
22723
+ capName: "data-store-provider",
22724
+ capScope: "system",
22725
+ addonId: null,
22726
+ access: "delete"
22727
+ },
22728
+ "dataStoreProvider.get": {
22729
+ capName: "data-store-provider",
22730
+ capScope: "system",
22731
+ addonId: null,
22732
+ access: "view"
22733
+ },
22734
+ "dataStoreProvider.getEngineInfo": {
22735
+ capName: "data-store-provider",
22736
+ capScope: "system",
22737
+ addonId: null,
22738
+ access: "view"
22739
+ },
22740
+ "dataStoreProvider.histogram": {
22741
+ capName: "data-store-provider",
22742
+ capScope: "system",
22743
+ addonId: null,
22744
+ access: "view"
22745
+ },
22746
+ "dataStoreProvider.insert": {
22747
+ capName: "data-store-provider",
22748
+ capScope: "system",
22749
+ addonId: null,
22750
+ access: "create"
22751
+ },
22752
+ "dataStoreProvider.isEmpty": {
22753
+ capName: "data-store-provider",
22754
+ capScope: "system",
22755
+ addonId: null,
22756
+ access: "view"
22757
+ },
22758
+ "dataStoreProvider.query": {
22759
+ capName: "data-store-provider",
22760
+ capScope: "system",
22761
+ addonId: null,
22762
+ access: "view"
22763
+ },
22764
+ "dataStoreProvider.set": {
22765
+ capName: "data-store-provider",
22766
+ capScope: "system",
22767
+ addonId: null,
22768
+ access: "create"
22769
+ },
22770
+ "dataStoreProvider.update": {
22771
+ capName: "data-store-provider",
22772
+ capScope: "system",
22773
+ addonId: null,
22774
+ access: "create"
22775
+ },
22776
+ "dataStoreProvider.updateWhere": {
22777
+ capName: "data-store-provider",
22778
+ capScope: "system",
22779
+ addonId: null,
22780
+ access: "create"
22781
+ },
22555
22782
  "dayNight.getOptions": {
22556
22783
  capName: "day-night",
22557
22784
  capScope: "device",
@@ -25630,6 +25857,12 @@ Object.freeze({
25630
25857
  addonId: null,
25631
25858
  access: "delete"
25632
25859
  },
25860
+ "settingsStore.deleteWhere": {
25861
+ capName: "settings-store",
25862
+ capScope: "system",
25863
+ addonId: null,
25864
+ access: "delete"
25865
+ },
25633
25866
  "settingsStore.get": {
25634
25867
  capName: "settings-store",
25635
25868
  capScope: "system",
@@ -25672,6 +25905,12 @@ Object.freeze({
25672
25905
  addonId: null,
25673
25906
  access: "create"
25674
25907
  },
25908
+ "settingsStore.updateWhere": {
25909
+ capName: "settings-store",
25910
+ capScope: "system",
25911
+ addonId: null,
25912
+ access: "create"
25913
+ },
25675
25914
  "smtpProvider.getStatus": {
25676
25915
  capName: "smtp-provider",
25677
25916
  capScope: "system",