/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { agentVersionsGetAgentVersion } from "../funcs/agentVersionsGetAgentVersion.js"; import { agentVersionsListAgentVersions } from "../funcs/agentVersionsListAgentVersions.js"; import { agentVersionsRollbackAgentVersion } from "../funcs/agentVersionsRollbackAgentVersion.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class AgentVersions extends ClientSDK { /** * List agent versions * * @remarks * Lists the configuration history for an agent. Each committed change (create, update, rollback) appends a version. */ async listAgentVersions( request: operations.ListAgentVersionsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(agentVersionsListAgentVersions( this, request, options, )); } /** * Retrieve an agent version */ async getAgentVersion( request: operations.GetAgentVersionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(agentVersionsGetAgentVersion( this, request, options, )); } /** * Roll back an agent to a version * * @remarks * Restores the target version's configuration as a new current version. History is preserved: the restore is appended as a new version rather than deleting later ones. */ async rollbackAgentVersion( request: operations.RollbackAgentVersionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(agentVersionsRollbackAgentVersion( this, request, options, )); } }