UNPKG

@unkey/api

Version:

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

36 lines (29 loc) 934 B
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ratelimitListOverrides } from "../../funcs/ratelimitListOverrides.js"; import * as components from "../../models/components/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: components.V2RatelimitListOverridesRequestBody$inboundSchema, }; export const tool$ratelimitListOverrides: ToolDefinition<typeof args> = { name: "ratelimit-list-overrides", description: ``, args, tool: async (client, args, ctx) => { const [result, apiCall] = await ratelimitListOverrides( client, args.request, { 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); }, };