/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { vaultValidateConnectionState } from "../funcs/vaultValidateConnectionState.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ValidateConnection extends ClientSDK { /** * Validate Connection State * * @remarks * This endpoint validates the current state of a given connection. This will perform different checks based on the connection auth type. For basic and apiKey auth types, the presence of required fields is checked. * For connectors that implement OAuth2, this operation forces the refresh flow for an access token regardless of its expiry. * * Note: * - Do not include any credentials in the request body. This operation does not persist changes, but only triggers the validation of connection state. * - If a refresh token flow was performed and successful, the new access token will then be used for subsequent API requests. */ async state( request: operations.VaultValidateConnectionStateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(vaultValidateConnectionState( this, request, options, )); } }