Skip to content

The open-source app everyone uses to manage agents at work

641 B
Raw Blame
import type { InboxAgentPolicy, UpdateInboxAgentPolicy } from "@paperclipai/shared";
import { api } from "./client";

/**
 * "Let agents tidy my inbox" policy. Backed by per-user endpoints: `open`
 * lets any of my agents archive from my inbox,
 * `allowlist` restricts to the named agents, `disabled` turns it off.
 */
export const inboxAgentPolicyApi = {
  getMine: (companyId: string) =>
    api.get<InboxAgentPolicy>(`/companies/${companyId}/users/me/inbox-agent-policy`),
  updateMine: (companyId: string, input: UpdateInboxAgentPolicy) =>
    api.put<InboxAgentPolicy>(`/companies/${companyId}/users/me/inbox-agent-policy`, input),
};