import { authApi, handleApiError } from "@/main-axios"; /** * Admin allowlists of private addresses that outbound requests may reach, one * per core feature that makes them. */ export async function getNotificationPrivateEndpoints(): Promise { try { return (await authApi.get("/users/notification-private-endpoints")).data .hosts; } catch (error) { throw handleApiError(error, "get notification endpoint allowlist"); } } export async function setNotificationPrivateEndpoints( hosts: string[], ): Promise { try { return ( await authApi.patch("/users/notification-private-endpoints", { hosts }) ).data.hosts; } catch (error) { throw handleApiError(error, "update notification endpoint allowlist"); } }