mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
11 lines
431 B
TypeScript
11 lines
431 B
TypeScript
|
|
import type { Agent } from "@paperclip/shared";
|
||
|
|
import { api } from "./client";
|
||
|
|
|
||
|
|
export const agentsApi = {
|
||
|
|
list: () => api.get<Agent[]>("/agents"),
|
||
|
|
get: (id: string) => api.get<Agent>(`/agents/${id}`),
|
||
|
|
create: (data: Partial<Agent>) => api.post<Agent>("/agents", data),
|
||
|
|
update: (id: string, data: Partial<Agent>) => api.patch<Agent>(`/agents/${id}`, data),
|
||
|
|
remove: (id: string) => api.delete<Agent>(`/agents/${id}`),
|
||
|
|
};
|