buena-typescript-sdk
Version:
Official TypeScript SDK for Buena.ai API - LinkedIn automation and lead management
31 lines (24 loc) • 720 B
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { healthCheck } from "../../funcs/healthCheck.js";
import { formatResult, ToolDefinition } from "../tools.js";
export const tool$healthCheck: ToolDefinition = {
name: "health-check",
description: `Health Check
Check the API status and health`,
tool: async (client, ctx) => {
const [result, apiCall] = await healthCheck(
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);
},
};