/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountsGetTermsOfServiceToken } from "../../funcs/accountsGetTermsOfServiceToken.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetTermsOfServiceTokenRequest$inboundSchema, }; export const tool$accountsGetTermsOfServiceToken: ToolDefinition = { name: "accounts-get-terms-of-service-token", description: `Generates a non-expiring token that can then be used to accept Moov's terms of service. This token can only be generated via API. Any Moov account requesting the collect funds, send funds, wallet, or card issuing capabilities must accept Moov's terms of service, then have the generated terms of service token patched to the account. Read more in our [documentation](https://docs.moov.io/guides/accounts/requirements/platform-agreement/).`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await accountsGetTermsOfServiceToken( 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.result; return formatResult(value, apiCall); }, };