/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { authClusterAcceptInvite } from "../../funcs/authClusterAcceptInvite.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.AcceptClusterInviteRequest$inboundSchema, }; export const tool$authClusterAcceptInvite: ToolDefinition = { name: "auth-cluster-accept-invite", description: `Accept a cluster invitation (public) Accept an invite and create the org. Existing signed-in user, new email/password owner, or (email-bound) headless machine owner with \`passwordless: true, issueApiKey: true\`. A reserved slug (\`api\`, whether supplied as \`orgSlug\` or derived from \`orgName\`) is refused with 400 \`reserved_org_slug\`; a slug another org already holds is refused with 409. Note \`POST /organization/check-slug\` does not know about reserved slugs and will report \`api\` as available.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await authClusterAcceptInvite( 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); }, };