Skip to main content
Glama
RhombusSystems

Rhombus MCP Server

Official
policy-alerts-tool-api.ts1.71 kB
import { postApi } from "../network.js"; import { formatTimestamp, RequestModifiers } from "../util.js"; import { ApiPayload } from "../types/policy-alerts-tool-types.js"; import { components } from "../types/schema-components.js"; import schema from "../types/schema.js"; type PolicyAlert = components["schemas"]["PolicyAlertV2Type"]; export async function getPolicyAlerts( args: ApiPayload, requestModifiers?: RequestModifiers, sessionId?: string ) { return await postApi<schema["Event_GetPolicyAlertsWSResponse"]>({ route: "/event/getPolicyAlerts", body: args, modifiers: requestModifiers, sessionId, }).then(response => { return { ...response, policyAlerts: (response.policyAlerts || []).map((alert: PolicyAlert) => ({ ...alert, labels: [ ...(alert.alertingEventFaces || []), ...(alert.alertingEventVehicles || []), ].flatMap(alert => alert.labels), createdOnString: alert.timestampMs ? formatTimestamp(alert.timestampMs, args.timeZone) : undefined, })), }; }); } export async function getExpiringPolicyAlerts( args: ApiPayload, requestModifiers?: RequestModifiers, sessionId?: string ) { return await postApi<schema["Event_GetExpiringPolicyAlertsWSResponse"]>({ route: "/event/getExpiringPolicyAlerts", body: args, modifiers: requestModifiers, sessionId, }).then(response => { return { ...response, policyAlerts: (response.policyAlerts || []).map((alert: PolicyAlert) => ({ ...alert, createdOnString: alert.timestampMs ? formatTimestamp(alert.timestampMs) : undefined, })), }; }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RhombusSystems/rhombus-node-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server