/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { bankAccountsGetVerification } from "../../funcs/bankAccountsGetVerification.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetBankAccountVerificationRequest$inboundSchema, }; export const tool$bankAccountsGetVerification: ToolDefinition = { name: "bank-accounts-get-verification", description: `Retrieve the current status and details of an instant verification, including whether the verification method was instant (RTP or FedNow) or same-day ACH. This helps track the verification process in real-time and provides details in case of exceptions. The status will indicate the following: - \`new\`: Verification initiated, credit pending to the payment network - \`sent-credit\`: Credit sent, available for verification - \`failed\`: Verification failed, description provided, user needs to add a new bank account - \`expired\`: Verification expired after 14 days, initiate another verification - \`max-attempts-exceeded\`: Five incorrect code attempts exhausted, initiate another verification 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.read\` scope.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await bankAccountsGetVerification( 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); }, };