1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-03-01 06:06:45 +00:00
Files
frontend/src/data/webhook.ts
Wendelin 830d8d2410 Add type import check to eslint (#22488)
* Add type import check to eslint

* Add type imports with eslint --fix
2024-10-30 11:12:30 +00:00

18 lines
348 B
TypeScript

import type { HomeAssistant } from "../types";
export interface Webhook {
webhook_id: string;
domain: string;
name: string;
local_only: boolean;
}
export interface WebhookError {
code: number;
message: string;
}
export const fetchWebhooks = (hass: HomeAssistant): Promise<Webhook[]> =>
hass.callWS({
type: "webhook/list",
});