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:
1 parent
9c3e33510d
commit
dd5a3c83a8
3 files changed
+6
-2
No files matched your search
@@ -707,6 +707,7 @@ export const integrationDefs = {
|
|||||||
features: { docker: { aliases: ["unifi", "unifi-controller"] } },
|
features: { docker: { aliases: ["unifi", "unifi-controller"] } },
|
||||||
},
|
},
|
||||||
unifiOs: {
|
unifiOs: {
|
||||||
|
httpAuth: { type: "apiKeyHeader", name: "X-API-KEY" },
|
||||||
name: "UniFi OS",
|
name: "UniFi OS",
|
||||||
secretKinds: [["apiKey"], ["apiKey", "siteManagerApiKey"]],
|
secretKinds: [["apiKey"], ["apiKey", "siteManagerApiKey"]],
|
||||||
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png",
|
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png",
|
||||||
@@ -715,6 +716,7 @@ export const integrationDefs = {
|
|||||||
defaultPort: 443,
|
defaultPort: 443,
|
||||||
},
|
},
|
||||||
unifiSiteManager: {
|
unifiSiteManager: {
|
||||||
|
httpAuth: { type: "apiKeyHeader", name: "X-API-KEY", secretKind: "siteManagerApiKey" },
|
||||||
name: "UniFi Site Manager",
|
name: "UniFi Site Manager",
|
||||||
secretKinds: [["siteManagerApiKey"]],
|
secretKinds: [["siteManagerApiKey"]],
|
||||||
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png",
|
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// @vitest-environment node
|
// @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";
|
import { describe, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
vi.hoisted(() => {
|
vi.hoisted(() => {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// @vitest-environment node
|
// @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";
|
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
vi.hoisted(() => {
|
vi.hoisted(() => {
|
||||||
|
|||||||
Reference in new issue
Block a user