UNPKG

@unkey/api

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.

31 lines (24 loc) 761 B
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { livenessLiveness } from "../../funcs/livenessLiveness.js"; import { formatResult, ToolDefinition } from "../tools.js"; export const tool$livenessLiveness: ToolDefinition = { name: "liveness-liveness", description: `Liveness check This endpoint checks if the service is alive.`, tool: async (client, ctx) => { const [result, apiCall] = await livenessLiveness( client, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };