feat(types): add DeleteAgentResponse type and update AgentService
Update AgentService to use DeleteAgentResponse type instead of boolean for better type safety
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
AgentEntity,
|
||||
CreateAgentRequest,
|
||||
CreateAgentResponse,
|
||||
DeleteAgentResponse,
|
||||
GetAgentResponse,
|
||||
ListAgentsResponse,
|
||||
ListOptions,
|
||||
@@ -143,7 +144,7 @@ export class AgentService extends BaseService {
|
||||
return await this.getAgent(id)
|
||||
}
|
||||
|
||||
async deleteAgent(id: string): Promise<boolean> {
|
||||
async deleteAgent(id: string): Promise<DeleteAgentResponse> {
|
||||
this.ensureInitialized()
|
||||
|
||||
const result = await this.database.delete(agentsTable).where(eq(agentsTable.id, id))
|
||||
|
||||
@@ -142,6 +142,8 @@ export const UpdateAgentResponseSchema = GetAgentResponseSchema
|
||||
|
||||
export type UpdateAgentResponse = GetAgentResponse
|
||||
|
||||
export type DeleteAgentResponse = boolean
|
||||
|
||||
export type CreateSessionRequest = AgentBase
|
||||
|
||||
export interface UpdateSessionRequest extends Partial<AgentBase> {}
|
||||
|
||||
Reference in New Issue
Block a user