feat(sagent): generate agent api client
ZhenYi committed
This change is very large, so some diffs are not shown. Clone the repository to see the full change.
Modified lib/sagent/src/services/tasks.rs lib/sagent/src/services/tasks.rs +1 −0 View lib/sagent/src/services/tasks.rs
@@ -70,6 +70,7 @@
7070#[derive(Debug, Clone, Deserialize, IntoParams, ToSchema)]
7171pub struct ListAgentQuery {
7272 pub q: Option<String>,
73 #[param(value_type = String, required = false)]
7374 pub state: Option<AgentState>,
7475 pub priority: Option<AgentPriority>,
7576 pub author_id: Option<Uuid>,
Modified web/src/shared/api/apiDefinitions.ts web/src/shared/api/apiDefinitions.ts +18 −0 View web/src/shared/api/apiDefinitions.ts
@@ -100,6 +100,24 @@
100100 * **Do not edit the file manually.**
101101 */
102102export default {
103 'sagent.list_collections': ['GET', '/agents/{space_name}/collections'],
104 'sagent.create_collection': ['POST', '/agents/{space_name}/collections'],
105 'sagent.get_collection': ['GET', '/agents/{space_name}/collections/{collection_id}'],
106 'sagent.delete_collection': ['DELETE', '/agents/{space_name}/collections/{collection_id}'],
107 'sagent.update_collection': ['PATCH', '/agents/{space_name}/collections/{collection_id}'],
108 'sagent.list_tasks': ['GET', '/agents/{space_name}/collections/{collection_id}/tasks'],
109 'sagent.create_task': ['POST', '/agents/{space_name}/collections/{collection_id}/tasks'],
110 'sagent.get_task': ['GET', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}'],
111 'sagent.delete_task': ['DELETE', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}'],
112 'sagent.update_task': ['PATCH', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}'],
113 'sagent.cancel_task': ['POST', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/cancel'],
114 'sagent.close_task': ['POST', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/close'],
115 'sagent.list_events': ['GET', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/events'],
116 'sagent.list_messages': ['GET', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/messages'],
117 'sagent.reopen_task': ['POST', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/reopen'],
118 'sagent.start_task': ['POST', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/start'],
119 'sagent.get_task_token': ['GET', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/token'],
120 'sagent.upsert_watch': ['PUT', '/agents/{space_name}/collections/{collection_id}/tasks/{task_id}/watch'],
103121 'ai.list_ai_languages': ['GET', '/ai/languages'],
104122 'auth.totp_disable': ['POST', '/auth/2fa/disable'],
105123 'auth.totp_enable': ['POST', '/auth/2fa/enable'],
Modified web/src/shared/api/globals.d.ts web/src/shared/api/globals.d.ts View web/src/shared/api/globals.d.ts
Diff too large to display.
Modified web/openapi.json web/openapi.json View web/openapi.json
Diff too large to display.
Modified openapi.json openapi.json View openapi.json
Diff too large to display.