Files
PaperClipAI/ui/src/api/agentChats.ts
T

14 lines
429 B
TypeScript

import type { Issue } from "@paperclipai/shared";
import { api } from "./client";
export const agentChatsApi = {
get: (companyId: string, agentRef: string) =>
api.get<Issue | null>(
`/companies/${companyId}/chats/${encodeURIComponent(agentRef)}`,
),
ensure: (companyId: string, agentRef: string) =>
api.post<Issue>(
`/companies/${companyId}/chats/${encodeURIComponent(agentRef)}`,
{},
),
};