mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 19:35:13 +01:00
14 lines
429 B
TypeScript
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)}`,
|
|
{},
|
|
),
|
|
};
|