/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountsUpdate } from "../../funcs/accountsUpdate.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.UpdateAccountRequest$inboundSchema, }; export const tool$accountsUpdate: ToolDefinition = { name: "accounts-update", description: `When **can** profile data be updated: + For unverified accounts, all profile data can be edited. + During the verification process, missing or incomplete profile data can be edited. + Verified accounts can only add missing profile data. When **can't** profile data be updated: + Verified accounts cannot change any existing profile data. If you need to update information in a locked state, please contact Moov support. To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the \`/accounts/{accountID}/profile.write\` scope.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await accountsUpdate( 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); }, };