/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { representativesUpdate } from "../../funcs/representativesUpdate.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.UpdateRepresentativeRequest$inboundSchema, }; export const tool$representativesUpdate: ToolDefinition = { name: "representatives-update", description: `If a representative's information has changed you can patch the information associated with a specific representative ID. Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more. When **can** profile data be updated: - For unverified representatives, all profile data can be edited. - During the verification process, missing or incomplete profile data can be edited. - Verified representatives can only add missing profile data. When **can't** profile data be updated: - Verified representatives 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}/representatives.write\` scope.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await representativesUpdate( 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); }, };