mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 02:40:39 +09:00
feat(plugins): add document CRUD methods to Plugin SDK
Wire issue document list/get/upsert/delete operations through the JSON-RPC protocol so plugins can manage issue documents with the same capabilities available via the REST API. Fixes #940
This commit is contained in:
parent
3dc3347a58
commit
0d4dd50b35
7 changed files with 216 additions and 1 deletions
|
|
@ -25,6 +25,8 @@ import type {
|
|||
Project,
|
||||
Issue,
|
||||
IssueComment,
|
||||
IssueDocument,
|
||||
IssueDocumentSummary,
|
||||
Agent,
|
||||
Goal,
|
||||
} from "@paperclipai/shared";
|
||||
|
|
@ -601,6 +603,32 @@ export interface WorkerToHostMethods {
|
|||
result: IssueComment,
|
||||
];
|
||||
|
||||
// Issue Documents
|
||||
"issues.documents.list": [
|
||||
params: { issueId: string; companyId: string },
|
||||
result: IssueDocumentSummary[],
|
||||
];
|
||||
"issues.documents.get": [
|
||||
params: { issueId: string; key: string; companyId: string },
|
||||
result: IssueDocument | null,
|
||||
];
|
||||
"issues.documents.upsert": [
|
||||
params: {
|
||||
issueId: string;
|
||||
key: string;
|
||||
body: string;
|
||||
companyId: string;
|
||||
title?: string;
|
||||
format?: string;
|
||||
changeSummary?: string;
|
||||
},
|
||||
result: IssueDocument,
|
||||
];
|
||||
"issues.documents.delete": [
|
||||
params: { issueId: string; key: string; companyId: string },
|
||||
result: void,
|
||||
];
|
||||
|
||||
// Agents (read)
|
||||
"agents.list": [
|
||||
params: { companyId: string; status?: string; limit?: number; offset?: number },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue