@camstack/addon-provider-unifi 0.2.141 → 0.2.142

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.
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region ../types/dist/event-category-7pZEBmVg.mjs
2
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -316,6 +316,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
316
316
  */
317
317
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
318
318
  /**
319
+ * A camera's motion source has fired constantly with no subject for an hour
320
+ * (motion duty or session count over the bar, zero detections) — it is not
321
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
322
+ * {@link PipelineMotionCalm}.
323
+ */
324
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
325
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
326
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
327
+ /**
319
328
  * Per-camera pipeline config was mutated by the orchestrator
320
329
  * (3-level settings change via `setAgentAddonDefaults` /
321
330
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -5422,7 +5431,7 @@ var ZodIssueCode = {
5422
5431
  var ZodFirstPartyTypeKind;
5423
5432
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5424
5433
  //#endregion
5425
- //#region ../types/dist/sleep-CueztlR1.mjs
5434
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5426
5435
  /**
5427
5436
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5428
5437
  * window to float samples (D455).
@@ -7951,7 +7960,7 @@ var EntryDescriptorSchema = object({
7951
7960
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
7952
7961
  fields: record(string(), unknown())
7953
7962
  }).strict();
7954
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
7963
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
7955
7964
  var RecordKindDeclarationSchema = object({
7956
7965
  database: _enum(RECORD_DATABASES).default("settings"),
7957
7966
  class: _enum(RECORD_CLASSES),
@@ -7970,14 +7979,6 @@ var RecordKindDeclarationSchema = object({
7970
7979
  secretPaths: array(string().min(1)).default([]),
7971
7980
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
7972
7981
  secretArrayKeys: record(string(), string()).default({}),
7973
- /**
7974
- * RETIRED (D900): the legacy table a kind adopted from during the records
7975
- * migration. Nothing declares it any more and nothing reads it; the schema
7976
- * still ACCEPTS it because the catalog rows the migration wrote carry it
7977
- * (an orphaned kind is never redeclared) and an addon built before the
7978
- * removal still sends it. Never set it.
7979
- */
7980
- adoptsFrom: string().min(1).optional(),
7981
7982
  /** Kinds that must agree through `transact` sit in one file under one family name. */
7982
7983
  transactFamily: string().min(1).optional(),
7983
7984
  entry: EntryDescriptorSchema.optional()
@@ -12669,17 +12670,6 @@ object({
12669
12670
  createdAt: number(),
12670
12671
  updatedAt: number()
12671
12672
  });
12672
- object({
12673
- id: string(),
12674
- label: string(),
12675
- isAdmin: boolean().default(false),
12676
- allowedProviders: AllowedProviderSchema,
12677
- allowedDevices: AllowedDevicesSchema,
12678
- tokenHash: string(),
12679
- tokenPrefix: string(),
12680
- createdAt: number(),
12681
- lastUsedAt: number().optional()
12682
- });
12683
12673
  object({
12684
12674
  id: string(),
12685
12675
  userId: string(),
@@ -16661,16 +16651,36 @@ var RecordKindStateSchema = _enum([
16661
16651
  var DeclareKindResultSchema = object({
16662
16652
  kindId: number().int(),
16663
16653
  state: RecordKindStateSchema,
16664
- createdIndexes: array(string()),
16665
- /**
16666
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
16667
- * it stays on the wire, null, because an addon built before the removal reads
16668
- * an ABSENT field as "adoption pending" and refuses to start.
16669
- */
16670
- adoptionPending: _null()
16654
+ createdIndexes: array(string())
16671
16655
  });
16672
16656
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16673
16657
  var SecretRefsList = array(string());
16658
+ /**
16659
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
16660
+ * All ops of one call share ONE database file and ONE `transactFamily`.
16661
+ */
16662
+ var RecordTransactOpSchema = discriminatedUnion("op", [
16663
+ object({
16664
+ op: literal("put"),
16665
+ kind: RecordKindNameSchema,
16666
+ record: RecordInputSchema,
16667
+ ifRev: number().int().min(0).optional()
16668
+ }),
16669
+ object({
16670
+ op: literal("patch"),
16671
+ kind: RecordKindNameSchema,
16672
+ id: RecordIdSchema,
16673
+ data: RecordBodySchema,
16674
+ at: number().int().nullable().optional(),
16675
+ expiresAt: number().int().nullable().optional(),
16676
+ ifRev: number().int().min(1).optional()
16677
+ }),
16678
+ object({
16679
+ op: literal("delete"),
16680
+ kind: RecordKindNameSchema,
16681
+ id: RecordIdSchema
16682
+ })
16683
+ ]);
16674
16684
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
16675
16685
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16676
16686
  kind: "mutation",
@@ -16777,6 +16787,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
16777
16787
  }), {
16778
16788
  kind: "mutation",
16779
16789
  auth: "admin"
16790
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
16791
+ results: array(object({
16792
+ rev: number().int().nullable(),
16793
+ deleted: boolean()
16794
+ })),
16795
+ releasedRefs: SecretRefsList,
16796
+ secretRefs: SecretRefsList
16797
+ }), {
16798
+ kind: "mutation",
16799
+ auth: "admin"
16780
16800
  }), method(object({
16781
16801
  deviceId: number().int(),
16782
16802
  kinds: array(RecordKindNameSchema).optional()
@@ -42484,9 +42504,13 @@ var NcSystemEventKindSchema = _enum([
42484
42504
  "node-updating",
42485
42505
  "node-inference-unavailable",
42486
42506
  "detection-blind",
42507
+ "motion-noisy",
42508
+ "motion-calm",
42487
42509
  "recording-stalled",
42488
42510
  "recording-healthy",
42489
42511
  "recording-degraded",
42512
+ "device-attention-required",
42513
+ "device-attention-resolved",
42490
42514
  "storage-location-low",
42491
42515
  "storage-location-critical",
42492
42516
  "storage-location-ok",
@@ -55827,6 +55851,16 @@ var DishwasherStatusSchema = object({
55827
55851
  powerState: string().nullable(),
55828
55852
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
55829
55853
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55854
+ /**
55855
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55856
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
55857
+ * when none is reported. A cleared reminder is not an unknown one.
55858
+ */
55859
+ filterCleaningDue: boolean().nullable(),
55860
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
55861
+ machineCareDue: boolean().nullable(),
55862
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
55863
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
55830
55864
  /** Option states: null when the appliance does not expose the option or has not said. */
55831
55865
  halfLoad: boolean().nullable(),
55832
55866
  hygienePlus: boolean().nullable(),
@@ -64477,16 +64511,6 @@ var UpdateUserInputSchema = object({
64477
64511
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
64478
64512
  scopes: array(TokenScopeSchema).optional()
64479
64513
  });
64480
- var ApiKeySummarySchema = object({
64481
- id: string(),
64482
- label: string(),
64483
- isAdmin: boolean().default(false),
64484
- allowedProviders: union([array(string()), literal("*")]).optional(),
64485
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
64486
- tokenPrefix: string(),
64487
- createdAt: number(),
64488
- lastUsedAt: number().optional()
64489
- });
64490
64514
  var OauthSessionSummarySchema = object({
64491
64515
  id: string(),
64492
64516
  userId: string(),
@@ -64508,8 +64532,7 @@ var TotpStatusSchema = object({
64508
64532
  confirmedAt: number().nullable()
64509
64533
  });
64510
64534
  /**
64511
- * user-management — singleton capability for user accounts and the
64512
- * legacy API-key rows.
64535
+ * user-management — singleton capability for user accounts.
64513
64536
  *
64514
64537
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
64515
64538
  * — the subset check on `setUserScopes` is moot
@@ -64565,10 +64588,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64565
64588
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
64566
64589
  kind: "mutation",
64567
64590
  access: "view"
64568
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
64569
- kind: "mutation",
64570
- auth: "admin",
64571
- access: "delete"
64572
64591
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
64573
64592
  kind: "mutation",
64574
64593
  auth: "admin",
@@ -74024,6 +74043,12 @@ Object.freeze({
74024
74043
  addonId: null,
74025
74044
  access: "view"
74026
74045
  },
74046
+ "records.transact": {
74047
+ capName: "records",
74048
+ capScope: "system",
74049
+ addonId: null,
74050
+ access: "create"
74051
+ },
74027
74052
  "sceneMonitor.captureReference": {
74028
74053
  capName: "scene-monitor",
74029
74054
  capScope: "device",
@@ -75356,12 +75381,6 @@ Object.freeze({
75356
75381
  addonId: null,
75357
75382
  access: "view"
75358
75383
  },
75359
- "userManagement.listApiKeys": {
75360
- capName: "user-management",
75361
- capScope: "system",
75362
- addonId: null,
75363
- access: "view"
75364
- },
75365
75384
  "userManagement.listExternalIdentities": {
75366
75385
  capName: "user-management",
75367
75386
  capScope: "system",
@@ -75416,12 +75435,6 @@ Object.freeze({
75416
75435
  addonId: null,
75417
75436
  access: "create"
75418
75437
  },
75419
- "userManagement.revokeApiKey": {
75420
- capName: "user-management",
75421
- capScope: "system",
75422
- addonId: null,
75423
- access: "delete"
75424
- },
75425
75438
  "userManagement.revokeOauthSession": {
75426
75439
  capName: "user-management",
75427
75440
  capScope: "system",
@@ -78786,9 +78799,13 @@ new Map(Object.entries({
78786
78799
  "stream-online": "device-events",
78787
78800
  "stream-offline": "device-events",
78788
78801
  "detection-blind": "device-events",
78802
+ "motion-noisy": "device-events",
78803
+ "motion-calm": "device-events",
78789
78804
  "recording-stalled": "device-events",
78790
78805
  "recording-healthy": "device-events",
78791
78806
  "recording-degraded": "device-events",
78807
+ "device-attention-required": "device-events",
78808
+ "device-attention-resolved": "device-events",
78792
78809
  "node-online": "system",
78793
78810
  "node-offline": "system",
78794
78811
  "node-restarting": "system",
@@ -78871,6 +78888,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
78871
78888
  label: "Detecting nothing",
78872
78889
  kinds: ["detection-blind"]
78873
78890
  },
78891
+ {
78892
+ id: "motion-noise",
78893
+ family: "device-events",
78894
+ label: "Motion without a subject",
78895
+ kinds: ["motion-noisy", "motion-calm"]
78896
+ },
78874
78897
  {
78875
78898
  id: "recording",
78876
78899
  family: "device-events",
@@ -78881,6 +78904,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
78881
78904
  "recording-degraded"
78882
78905
  ]
78883
78906
  },
78907
+ {
78908
+ id: "device-attention",
78909
+ family: "device-events",
78910
+ label: "Needs attention",
78911
+ kinds: ["device-attention-required", "device-attention-resolved"]
78912
+ },
78884
78913
  {
78885
78914
  id: "nodes",
78886
78915
  family: "system",
@@ -79020,6 +79049,7 @@ var ALERT_EPISODE = [
79020
79049
  "alert-error",
79021
79050
  "alert-critical-resolved"
79022
79051
  ];
79052
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
79023
79053
  var UPDATES = [
79024
79054
  "addon-update-available",
79025
79055
  "server-update-available",
@@ -79049,9 +79079,12 @@ var DEVICE_EVENTS = [
79049
79079
  "stream-online",
79050
79080
  "stream-offline",
79051
79081
  "detection-blind",
79082
+ "motion-noisy",
79083
+ "motion-calm",
79052
79084
  "recording-stalled",
79053
79085
  "recording-healthy",
79054
79086
  "recording-degraded",
79087
+ ...DEVICE_ATTENTION,
79055
79088
  ...ALARM
79056
79089
  ];
79057
79090
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -79219,7 +79252,9 @@ var STATE_SUMMARY_VARS = [
79219
79252
  [...RULE_TEXT],
79220
79253
  [...RULE_TEXT],
79221
79254
  [...RULE_TEXT],
79222
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79255
+ [...RULE_TEXT],
79256
+ [...RULE_TEXT],
79257
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79223
79258
  [...RULE_TEXT],
79224
79259
  [...RULE_TEXT],
79225
79260
  [...RULE_TEXT],
@@ -79241,11 +79276,11 @@ var STATE_SUMMARY_VARS = [
79241
79276
  [...RULE_TEXT],
79242
79277
  [...RULE_TEXT],
79243
79278
  [...RULE_TEXT],
79279
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79244
79280
  ([...RULE_TEXT], [...ALERT_EPISODE]),
79281
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79245
79282
  ([...RULE_TEXT], [...ALERT_EPISODE]),
79246
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79247
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79248
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79283
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79249
79284
  [...RULE_TEXT],
79250
79285
  [...RULE_TEXT],
79251
79286
  [...RULE_TEXT],
@@ -79321,6 +79356,15 @@ new Map([
79321
79356
  snapshotLabel: "Tanks low or full now",
79322
79357
  snapshotSection: "tanks"
79323
79358
  },
79359
+ {
79360
+ id: "motion-noise",
79361
+ family: "device-events",
79362
+ label: "Motion without a subject (constant / calm again)",
79363
+ bad: ["motion-noisy"],
79364
+ recovery: ["motion-calm"],
79365
+ snapshotLabel: "Cameras with constant motion now",
79366
+ snapshotSection: null
79367
+ },
79324
79368
  {
79325
79369
  id: "recording-health",
79326
79370
  family: "device-events",
@@ -79330,6 +79374,15 @@ new Map([
79330
79374
  snapshotLabel: "Recordings stalled now",
79331
79375
  snapshotSection: null
79332
79376
  },
79377
+ {
79378
+ id: "device-attention",
79379
+ family: "device-events",
79380
+ label: "Device needs attention (raised / resolved)",
79381
+ bad: ["device-attention-required"],
79382
+ recovery: ["device-attention-resolved"],
79383
+ snapshotLabel: "Devices needing attention now",
79384
+ snapshotSection: null
79385
+ },
79333
79386
  {
79334
79387
  id: "node-connectivity",
79335
79388
  family: "system",
@@ -80044,7 +80097,7 @@ function buildControllerFormSchema() {
80044
80097
  id: "connection",
80045
80098
  title: "Connection",
80046
80099
  titleKey: "provider-unifi:controller.s_connection.title",
80047
- description: "CamStack connects to the UniFi Network controller over the local network and polls its infra devices + network clients. Authenticate with a UniFi OS API key (preferred) or a local admin username + password. Cameras / Protect are not accessed.",
80100
+ description: "Authenticate with a UniFi OS API key (preferred) or a local admin username and password.",
80048
80101
  descriptionKey: "provider-unifi:controller.s_connection.description",
80049
80102
  columns: 2,
80050
80103
  fields: [
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-7pZEBmVg.mjs
1
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -315,6 +315,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
315
315
  */
316
316
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
317
317
  /**
318
+ * A camera's motion source has fired constantly with no subject for an hour
319
+ * (motion duty or session count over the bar, zero detections) — it is not
320
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
321
+ * {@link PipelineMotionCalm}.
322
+ */
323
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
324
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
325
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
326
+ /**
318
327
  * Per-camera pipeline config was mutated by the orchestrator
319
328
  * (3-level settings change via `setAgentAddonDefaults` /
320
329
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -5421,7 +5430,7 @@ var ZodIssueCode = {
5421
5430
  var ZodFirstPartyTypeKind;
5422
5431
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5423
5432
  //#endregion
5424
- //#region ../types/dist/sleep-CueztlR1.mjs
5433
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5425
5434
  /**
5426
5435
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5427
5436
  * window to float samples (D455).
@@ -7950,7 +7959,7 @@ var EntryDescriptorSchema = object({
7950
7959
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
7951
7960
  fields: record(string(), unknown())
7952
7961
  }).strict();
7953
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
7962
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
7954
7963
  var RecordKindDeclarationSchema = object({
7955
7964
  database: _enum(RECORD_DATABASES).default("settings"),
7956
7965
  class: _enum(RECORD_CLASSES),
@@ -7969,14 +7978,6 @@ var RecordKindDeclarationSchema = object({
7969
7978
  secretPaths: array(string().min(1)).default([]),
7970
7979
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
7971
7980
  secretArrayKeys: record(string(), string()).default({}),
7972
- /**
7973
- * RETIRED (D900): the legacy table a kind adopted from during the records
7974
- * migration. Nothing declares it any more and nothing reads it; the schema
7975
- * still ACCEPTS it because the catalog rows the migration wrote carry it
7976
- * (an orphaned kind is never redeclared) and an addon built before the
7977
- * removal still sends it. Never set it.
7978
- */
7979
- adoptsFrom: string().min(1).optional(),
7980
7981
  /** Kinds that must agree through `transact` sit in one file under one family name. */
7981
7982
  transactFamily: string().min(1).optional(),
7982
7983
  entry: EntryDescriptorSchema.optional()
@@ -12668,17 +12669,6 @@ object({
12668
12669
  createdAt: number(),
12669
12670
  updatedAt: number()
12670
12671
  });
12671
- object({
12672
- id: string(),
12673
- label: string(),
12674
- isAdmin: boolean().default(false),
12675
- allowedProviders: AllowedProviderSchema,
12676
- allowedDevices: AllowedDevicesSchema,
12677
- tokenHash: string(),
12678
- tokenPrefix: string(),
12679
- createdAt: number(),
12680
- lastUsedAt: number().optional()
12681
- });
12682
12672
  object({
12683
12673
  id: string(),
12684
12674
  userId: string(),
@@ -16660,16 +16650,36 @@ var RecordKindStateSchema = _enum([
16660
16650
  var DeclareKindResultSchema = object({
16661
16651
  kindId: number().int(),
16662
16652
  state: RecordKindStateSchema,
16663
- createdIndexes: array(string()),
16664
- /**
16665
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
16666
- * it stays on the wire, null, because an addon built before the removal reads
16667
- * an ABSENT field as "adoption pending" and refuses to start.
16668
- */
16669
- adoptionPending: _null()
16653
+ createdIndexes: array(string())
16670
16654
  });
16671
16655
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16672
16656
  var SecretRefsList = array(string());
16657
+ /**
16658
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
16659
+ * All ops of one call share ONE database file and ONE `transactFamily`.
16660
+ */
16661
+ var RecordTransactOpSchema = discriminatedUnion("op", [
16662
+ object({
16663
+ op: literal("put"),
16664
+ kind: RecordKindNameSchema,
16665
+ record: RecordInputSchema,
16666
+ ifRev: number().int().min(0).optional()
16667
+ }),
16668
+ object({
16669
+ op: literal("patch"),
16670
+ kind: RecordKindNameSchema,
16671
+ id: RecordIdSchema,
16672
+ data: RecordBodySchema,
16673
+ at: number().int().nullable().optional(),
16674
+ expiresAt: number().int().nullable().optional(),
16675
+ ifRev: number().int().min(1).optional()
16676
+ }),
16677
+ object({
16678
+ op: literal("delete"),
16679
+ kind: RecordKindNameSchema,
16680
+ id: RecordIdSchema
16681
+ })
16682
+ ]);
16673
16683
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
16674
16684
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16675
16685
  kind: "mutation",
@@ -16776,6 +16786,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
16776
16786
  }), {
16777
16787
  kind: "mutation",
16778
16788
  auth: "admin"
16789
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
16790
+ results: array(object({
16791
+ rev: number().int().nullable(),
16792
+ deleted: boolean()
16793
+ })),
16794
+ releasedRefs: SecretRefsList,
16795
+ secretRefs: SecretRefsList
16796
+ }), {
16797
+ kind: "mutation",
16798
+ auth: "admin"
16779
16799
  }), method(object({
16780
16800
  deviceId: number().int(),
16781
16801
  kinds: array(RecordKindNameSchema).optional()
@@ -42483,9 +42503,13 @@ var NcSystemEventKindSchema = _enum([
42483
42503
  "node-updating",
42484
42504
  "node-inference-unavailable",
42485
42505
  "detection-blind",
42506
+ "motion-noisy",
42507
+ "motion-calm",
42486
42508
  "recording-stalled",
42487
42509
  "recording-healthy",
42488
42510
  "recording-degraded",
42511
+ "device-attention-required",
42512
+ "device-attention-resolved",
42489
42513
  "storage-location-low",
42490
42514
  "storage-location-critical",
42491
42515
  "storage-location-ok",
@@ -55826,6 +55850,16 @@ var DishwasherStatusSchema = object({
55826
55850
  powerState: string().nullable(),
55827
55851
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
55828
55852
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55853
+ /**
55854
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55855
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
55856
+ * when none is reported. A cleared reminder is not an unknown one.
55857
+ */
55858
+ filterCleaningDue: boolean().nullable(),
55859
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
55860
+ machineCareDue: boolean().nullable(),
55861
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
55862
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
55829
55863
  /** Option states: null when the appliance does not expose the option or has not said. */
55830
55864
  halfLoad: boolean().nullable(),
55831
55865
  hygienePlus: boolean().nullable(),
@@ -64476,16 +64510,6 @@ var UpdateUserInputSchema = object({
64476
64510
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
64477
64511
  scopes: array(TokenScopeSchema).optional()
64478
64512
  });
64479
- var ApiKeySummarySchema = object({
64480
- id: string(),
64481
- label: string(),
64482
- isAdmin: boolean().default(false),
64483
- allowedProviders: union([array(string()), literal("*")]).optional(),
64484
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
64485
- tokenPrefix: string(),
64486
- createdAt: number(),
64487
- lastUsedAt: number().optional()
64488
- });
64489
64513
  var OauthSessionSummarySchema = object({
64490
64514
  id: string(),
64491
64515
  userId: string(),
@@ -64507,8 +64531,7 @@ var TotpStatusSchema = object({
64507
64531
  confirmedAt: number().nullable()
64508
64532
  });
64509
64533
  /**
64510
- * user-management — singleton capability for user accounts and the
64511
- * legacy API-key rows.
64534
+ * user-management — singleton capability for user accounts.
64512
64535
  *
64513
64536
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
64514
64537
  * — the subset check on `setUserScopes` is moot
@@ -64564,10 +64587,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64564
64587
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
64565
64588
  kind: "mutation",
64566
64589
  access: "view"
64567
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
64568
- kind: "mutation",
64569
- auth: "admin",
64570
- access: "delete"
64571
64590
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
64572
64591
  kind: "mutation",
64573
64592
  auth: "admin",
@@ -74023,6 +74042,12 @@ Object.freeze({
74023
74042
  addonId: null,
74024
74043
  access: "view"
74025
74044
  },
74045
+ "records.transact": {
74046
+ capName: "records",
74047
+ capScope: "system",
74048
+ addonId: null,
74049
+ access: "create"
74050
+ },
74026
74051
  "sceneMonitor.captureReference": {
74027
74052
  capName: "scene-monitor",
74028
74053
  capScope: "device",
@@ -75355,12 +75380,6 @@ Object.freeze({
75355
75380
  addonId: null,
75356
75381
  access: "view"
75357
75382
  },
75358
- "userManagement.listApiKeys": {
75359
- capName: "user-management",
75360
- capScope: "system",
75361
- addonId: null,
75362
- access: "view"
75363
- },
75364
75383
  "userManagement.listExternalIdentities": {
75365
75384
  capName: "user-management",
75366
75385
  capScope: "system",
@@ -75415,12 +75434,6 @@ Object.freeze({
75415
75434
  addonId: null,
75416
75435
  access: "create"
75417
75436
  },
75418
- "userManagement.revokeApiKey": {
75419
- capName: "user-management",
75420
- capScope: "system",
75421
- addonId: null,
75422
- access: "delete"
75423
- },
75424
75437
  "userManagement.revokeOauthSession": {
75425
75438
  capName: "user-management",
75426
75439
  capScope: "system",
@@ -78785,9 +78798,13 @@ new Map(Object.entries({
78785
78798
  "stream-online": "device-events",
78786
78799
  "stream-offline": "device-events",
78787
78800
  "detection-blind": "device-events",
78801
+ "motion-noisy": "device-events",
78802
+ "motion-calm": "device-events",
78788
78803
  "recording-stalled": "device-events",
78789
78804
  "recording-healthy": "device-events",
78790
78805
  "recording-degraded": "device-events",
78806
+ "device-attention-required": "device-events",
78807
+ "device-attention-resolved": "device-events",
78791
78808
  "node-online": "system",
78792
78809
  "node-offline": "system",
78793
78810
  "node-restarting": "system",
@@ -78870,6 +78887,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
78870
78887
  label: "Detecting nothing",
78871
78888
  kinds: ["detection-blind"]
78872
78889
  },
78890
+ {
78891
+ id: "motion-noise",
78892
+ family: "device-events",
78893
+ label: "Motion without a subject",
78894
+ kinds: ["motion-noisy", "motion-calm"]
78895
+ },
78873
78896
  {
78874
78897
  id: "recording",
78875
78898
  family: "device-events",
@@ -78880,6 +78903,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
78880
78903
  "recording-degraded"
78881
78904
  ]
78882
78905
  },
78906
+ {
78907
+ id: "device-attention",
78908
+ family: "device-events",
78909
+ label: "Needs attention",
78910
+ kinds: ["device-attention-required", "device-attention-resolved"]
78911
+ },
78883
78912
  {
78884
78913
  id: "nodes",
78885
78914
  family: "system",
@@ -79019,6 +79048,7 @@ var ALERT_EPISODE = [
79019
79048
  "alert-error",
79020
79049
  "alert-critical-resolved"
79021
79050
  ];
79051
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
79022
79052
  var UPDATES = [
79023
79053
  "addon-update-available",
79024
79054
  "server-update-available",
@@ -79048,9 +79078,12 @@ var DEVICE_EVENTS = [
79048
79078
  "stream-online",
79049
79079
  "stream-offline",
79050
79080
  "detection-blind",
79081
+ "motion-noisy",
79082
+ "motion-calm",
79051
79083
  "recording-stalled",
79052
79084
  "recording-healthy",
79053
79085
  "recording-degraded",
79086
+ ...DEVICE_ATTENTION,
79054
79087
  ...ALARM
79055
79088
  ];
79056
79089
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -79218,7 +79251,9 @@ var STATE_SUMMARY_VARS = [
79218
79251
  [...RULE_TEXT],
79219
79252
  [...RULE_TEXT],
79220
79253
  [...RULE_TEXT],
79221
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79254
+ [...RULE_TEXT],
79255
+ [...RULE_TEXT],
79256
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79222
79257
  [...RULE_TEXT],
79223
79258
  [...RULE_TEXT],
79224
79259
  [...RULE_TEXT],
@@ -79240,11 +79275,11 @@ var STATE_SUMMARY_VARS = [
79240
79275
  [...RULE_TEXT],
79241
79276
  [...RULE_TEXT],
79242
79277
  [...RULE_TEXT],
79278
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79243
79279
  ([...RULE_TEXT], [...ALERT_EPISODE]),
79280
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79244
79281
  ([...RULE_TEXT], [...ALERT_EPISODE]),
79245
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79246
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79247
- ([...RULE_TEXT], [...ALERT_EPISODE]),
79282
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
79248
79283
  [...RULE_TEXT],
79249
79284
  [...RULE_TEXT],
79250
79285
  [...RULE_TEXT],
@@ -79320,6 +79355,15 @@ new Map([
79320
79355
  snapshotLabel: "Tanks low or full now",
79321
79356
  snapshotSection: "tanks"
79322
79357
  },
79358
+ {
79359
+ id: "motion-noise",
79360
+ family: "device-events",
79361
+ label: "Motion without a subject (constant / calm again)",
79362
+ bad: ["motion-noisy"],
79363
+ recovery: ["motion-calm"],
79364
+ snapshotLabel: "Cameras with constant motion now",
79365
+ snapshotSection: null
79366
+ },
79323
79367
  {
79324
79368
  id: "recording-health",
79325
79369
  family: "device-events",
@@ -79329,6 +79373,15 @@ new Map([
79329
79373
  snapshotLabel: "Recordings stalled now",
79330
79374
  snapshotSection: null
79331
79375
  },
79376
+ {
79377
+ id: "device-attention",
79378
+ family: "device-events",
79379
+ label: "Device needs attention (raised / resolved)",
79380
+ bad: ["device-attention-required"],
79381
+ recovery: ["device-attention-resolved"],
79382
+ snapshotLabel: "Devices needing attention now",
79383
+ snapshotSection: null
79384
+ },
79332
79385
  {
79333
79386
  id: "node-connectivity",
79334
79387
  family: "system",
@@ -80043,7 +80096,7 @@ function buildControllerFormSchema() {
80043
80096
  id: "connection",
80044
80097
  title: "Connection",
80045
80098
  titleKey: "provider-unifi:controller.s_connection.title",
80046
- description: "CamStack connects to the UniFi Network controller over the local network and polls its infra devices + network clients. Authenticate with a UniFi OS API key (preferred) or a local admin username + password. Cameras / Protect are not accessed.",
80099
+ description: "Authenticate with a UniFi OS API key (preferred) or a local admin username and password.",
80047
80100
  descriptionKey: "provider-unifi:controller.s_connection.description",
80048
80101
  columns: 2,
80049
80102
  fields: [
package/i18n/en.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "controller.s_identity.title": "Controller",
3
3
  "controller.s_identity.name.label": "Name",
4
4
  "controller.s_connection.title": "Connection",
5
- "controller.s_connection.description": "CamStack connects to the UniFi Network controller over the local network and polls its infra devices + network clients. Authenticate with a UniFi OS API key (preferred) or a local admin username + password. Cameras / Protect are not accessed.",
5
+ "controller.s_connection.description": "Authenticate with a UniFi OS API key (preferred) or a local admin username and password.",
6
6
  "controller.s_connection.host.label": "Controller host / IP",
7
7
  "controller.s_connection.port.label": "HTTPS port",
8
8
  "controller.s_connection.apiKey.label": "API key",
package/i18n/it.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "controller.s_identity.title": "Controller",
3
3
  "controller.s_identity.name.label": "Nome",
4
4
  "controller.s_connection.title": "Connessione",
5
- "controller.s_connection.description": "CamStack si collega al controller UniFi Network in rete locale e legge i dispositivi di rete e i client. Autenticati con una API key UniFi OS (preferita) oppure con nome utente e password di un amministratore locale. Telecamere e Protect non vengono usati.",
5
+ "controller.s_connection.description": "Autenticati con una API key UniFi OS (consigliata) o con utente e password di un admin locale.",
6
6
  "controller.s_connection.host.label": "Host / IP del controller",
7
7
  "controller.s_connection.port.label": "Porta HTTPS",
8
8
  "controller.s_connection.apiKey.label": "API key",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.141",
3
+ "version": "0.2.142",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",