Files
paperclip/ui/src/api/goals.ts
Dotta f60c1001ec refactor: rename packages to @paperclipai and CLI binary to paperclipai
Rename all workspace packages from @paperclip/* to @paperclipai/* and
the CLI binary from `paperclip` to `paperclipai` in preparation for
npm publishing. Bump CLI version to 0.1.0 and add package metadata
(description, keywords, license, repository, files). Update all
imports, documentation, user-facing messages, and tests accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 08:45:26 -06:00

12 lines
525 B
TypeScript

import type { Goal } from "@paperclipai/shared";
import { api } from "./client";
export const goalsApi = {
list: (companyId: string) => api.get<Goal[]>(`/companies/${companyId}/goals`),
get: (id: string) => api.get<Goal>(`/goals/${id}`),
create: (companyId: string, data: Record<string, unknown>) =>
api.post<Goal>(`/companies/${companyId}/goals`, data),
update: (id: string, data: Record<string, unknown>) => api.patch<Goal>(`/goals/${id}`, data),
remove: (id: string) => api.delete<Goal>(`/goals/${id}`),
};