/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { agentsCreateAgent } from "../funcs/agents-create-agent.js"; import { agentsDeleteAgent } from "../funcs/agents-delete-agent.js"; import { agentsGetAgentBySlug } from "../funcs/agents-get-agent-by-slug.js"; import { agentsGetAgent } from "../funcs/agents-get-agent.js"; import { agentsListAgents } from "../funcs/agents-list-agents.js"; import { agentsUpdateAgent } from "../funcs/agents-update-agent.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Agents extends ClientSDK { /** * List agents * * @remarks * Get paginated list of agents with optional filtering. Requires x-workspace-id header. */ async listAgents( request?: operations.ListAgentsRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapResultIterator(agentsListAgents( this, request, options, )); } /** * Create agent * * @remarks * Create a new AI agent with configuration. Requires x-workspace-id header. */ async createAgent( request: models.NameSlugDescription, options?: RequestOptions, ): Promise { return unwrapAsync(agentsCreateAgent( this, request, options, )); } /** * Get agent * * @remarks * Get an agent by its ID. Requires x-workspace-id header. */ async getAgent( request: operations.GetAgentRequest, options?: RequestOptions, ): Promise { return unwrapAsync(agentsGetAgent( this, request, options, )); } /** * Update agent * * @remarks * Update an existing agent configuration. Requires x-workspace-id header. */ async updateAgent( request: operations.UpdateAgentRequest, options?: RequestOptions, ): Promise { return unwrapAsync(agentsUpdateAgent( this, request, options, )); } /** * Delete agent * * @remarks * Delete an agent and all associated data. Requires x-workspace-id header. */ async deleteAgent( request: operations.DeleteAgentRequest, options?: RequestOptions, ): Promise { return unwrapAsync(agentsDeleteAgent( this, request, options, )); } /** * Get agent by slug * * @remarks * Get an agent by its URL-friendly slug. Requires x-workspace-id header. */ async getAgentBySlug( request: operations.GetAgentBySlugRequest, options?: RequestOptions, ): Promise { return unwrapAsync(agentsGetAgentBySlug( this, request, options, )); } }