/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { bankAccountsCompleteVerification } from "../../funcs/bankAccountsCompleteVerification.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.CompleteBankAccountVerificationRequest$inboundSchema, }; export const tool$bankAccountsCompleteVerification: ToolDefinition< typeof args > = { name: "bank-accounts-complete-verification", description: `Finalize the instant micro-deposit verification by submitting the verification code displayed in the user's bank account. Upon successful verification, the bank account status will be updated to \`verified\` and eligible for ACH debit transactions. The following formats are accepted: - \`MV0000\` - \`mv0000\` - \`0000\` To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the \`/accounts/{accountID}/bank-accounts.write\` scope.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await bankAccountsCompleteVerification( 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); }, };