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>
30 lines
910 B
TypeScript
30 lines
910 B
TypeScript
import type { ActivityEvent } from "@paperclipai/shared";
|
|
import { api } from "./client";
|
|
|
|
export interface RunForIssue {
|
|
runId: string;
|
|
status: string;
|
|
agentId: string;
|
|
startedAt: string | null;
|
|
finishedAt: string | null;
|
|
createdAt: string;
|
|
invocationSource: string;
|
|
usageJson: Record<string, unknown> | null;
|
|
resultJson: Record<string, unknown> | null;
|
|
}
|
|
|
|
export interface IssueForRun {
|
|
issueId: string;
|
|
identifier: string | null;
|
|
title: string;
|
|
status: string;
|
|
priority: string;
|
|
}
|
|
|
|
export const activityApi = {
|
|
list: (companyId: string) => api.get<ActivityEvent[]>(`/companies/${companyId}/activity`),
|
|
forIssue: (issueId: string) => api.get<ActivityEvent[]>(`/issues/${issueId}/activity`),
|
|
runsForIssue: (issueId: string) => api.get<RunForIssue[]>(`/issues/${issueId}/runs`),
|
|
issuesForRun: (runId: string) => api.get<IssueForRun[]>(`/heartbeat-runs/${runId}/issues`),
|
|
};
|