fix(definitions): declare how UniFi requests authenticate, as v2 requires

v2 makes httpAuth mandatory on every integration definition: it is the
server-owned authentication the Stats widget and arbitrary requests reuse.
Both APIs take the key in an X-API-KEY header; Site Manager reads it from
its own secret kind.

Also split the inline type imports v2's stricter oxlint rejects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
zacharyandClaude Opus 5.5 committed 2026-10-08 00:46:25 +02:00
1 parent 9c3e33510d
commit dd5a3c83a8
3 files changed
+6 -2

No files matched your search

+2
View File
@@ -707,6 +707,7 @@ export const integrationDefs = {
features: { docker: { aliases: ["unifi", "unifi-controller"] } },
},
unifiOs: {
httpAuth: { type: "apiKeyHeader", name: "X-API-KEY" },
name: "UniFi OS",
secretKinds: [["apiKey"], ["apiKey", "siteManagerApiKey"]],
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png",
@@ -715,6 +716,7 @@ export const integrationDefs = {
defaultPort: 443,
},
unifiSiteManager: {
httpAuth: { type: "apiKeyHeader", name: "X-API-KEY", secretKind: "siteManagerApiKey" },
name: "UniFi Site Manager",
secretKinds: [["siteManagerApiKey"]],
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png",
@@ -1,5 +1,6 @@
// @vitest-environment node
import { Response, type RequestInit } from "undici";
import type { RequestInit } from "undici";
import { Response } from "undici";
import { describe, expect, test, vi } from "vitest";
vi.hoisted(() => {
@@ -1,5 +1,6 @@
// @vitest-environment node
import { Response, type RequestInit } from "undici";
import type { RequestInit } from "undici";
import { Response } from "undici";
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
vi.hoisted(() => {