merge: resolve conflicts with main (reactions feature)
Main added reaction routes and event types while this branch added task message routes and event types. Both sides kept — no code lost.
This commit is contained in:
commit
e20e1b74dc
40 changed files with 1596 additions and 76 deletions
|
|
@ -17,6 +17,8 @@ import type {
|
|||
InboxItem,
|
||||
IssueSubscriber,
|
||||
Comment,
|
||||
Reaction,
|
||||
IssueReaction,
|
||||
Workspace,
|
||||
WorkspaceRepo,
|
||||
MemberWithUser,
|
||||
|
|
@ -226,6 +228,34 @@ export class ApiClient {
|
|||
await this.fetch(`/api/comments/${commentId}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
async addReaction(commentId: string, emoji: string): Promise<Reaction> {
|
||||
return this.fetch(`/api/comments/${commentId}/reactions`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ emoji }),
|
||||
});
|
||||
}
|
||||
|
||||
async removeReaction(commentId: string, emoji: string): Promise<void> {
|
||||
await this.fetch(`/api/comments/${commentId}/reactions`, {
|
||||
method: "DELETE",
|
||||
body: JSON.stringify({ emoji }),
|
||||
});
|
||||
}
|
||||
|
||||
async addIssueReaction(issueId: string, emoji: string): Promise<IssueReaction> {
|
||||
return this.fetch(`/api/issues/${issueId}/reactions`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ emoji }),
|
||||
});
|
||||
}
|
||||
|
||||
async removeIssueReaction(issueId: string, emoji: string): Promise<void> {
|
||||
await this.fetch(`/api/issues/${issueId}/reactions`, {
|
||||
method: "DELETE",
|
||||
body: JSON.stringify({ emoji }),
|
||||
});
|
||||
}
|
||||
|
||||
// Subscribers
|
||||
async listIssueSubscribers(issueId: string): Promise<IssueSubscriber[]> {
|
||||
return this.fetch(`/api/issues/${issueId}/subscribers`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue