diff --git a/web/contract/console/workflow-comment.ts b/web/contract/console/workflow-comment.ts index e23b795c50..06defa31af 100644 --- a/web/contract/console/workflow-comment.ts +++ b/web/contract/console/workflow-comment.ts @@ -75,20 +75,14 @@ export type WorkflowCommentResolveRes = { resolved_at: number } -export type WorkflowCommentReply = { +export type WorkflowCommentReplyCreateRes = { id: string - comment_id: string - content: string - created_by: string created_at: string +} + +export type WorkflowCommentReplyUpdateRes = { + id: string updated_at: string - mentioned_user_ids: string[] - author: { - id: string - name: string - email: string - avatar?: string - } } export type CreateCommentParams = { @@ -200,7 +194,7 @@ const workflowCommentReplyCreateContract = base } body: CreateReplyParams }>()) - .output(type()) + .output(type()) const workflowCommentReplyUpdateContract = base .route({ @@ -215,7 +209,7 @@ const workflowCommentReplyUpdateContract = base } body: CreateReplyParams }>()) - .output(type()) + .output(type()) const workflowCommentReplyDeleteContract = base .route({ diff --git a/web/service/workflow-comment.ts b/web/service/workflow-comment.ts index 8e9c132607..a8debbfd15 100644 --- a/web/service/workflow-comment.ts +++ b/web/service/workflow-comment.ts @@ -7,7 +7,8 @@ import type { WorkflowCommentDetail as ContractWorkflowCommentDetail, WorkflowCommentDetailReply as ContractWorkflowCommentDetailReply, WorkflowCommentList as ContractWorkflowCommentList, - WorkflowCommentReply as ContractWorkflowCommentReply, + WorkflowCommentReplyCreateRes as ContractWorkflowCommentReplyCreateRes, + WorkflowCommentReplyUpdateRes as ContractWorkflowCommentReplyUpdateRes, WorkflowCommentResolveRes as ContractWorkflowCommentResolveRes, WorkflowCommentUpdateRes as ContractWorkflowCommentUpdateRes, } from '@/contract/console/workflow-comment' @@ -22,7 +23,8 @@ type WorkflowCommentCreateRes = ContractWorkflowCommentCreateRes export type WorkflowCommentDetail = ContractWorkflowCommentDetail export type WorkflowCommentDetailReply = ContractWorkflowCommentDetailReply export type WorkflowCommentList = ContractWorkflowCommentList -type WorkflowCommentReply = ContractWorkflowCommentReply +type WorkflowCommentReplyCreateRes = ContractWorkflowCommentReplyCreateRes +type WorkflowCommentReplyUpdateRes = ContractWorkflowCommentReplyUpdateRes type WorkflowCommentResolveRes = ContractWorkflowCommentResolveRes type WorkflowCommentUpdateRes = ContractWorkflowCommentUpdateRes @@ -65,14 +67,14 @@ export const resolveWorkflowComment = async (appId: string, commentId: string): }) } -export const createWorkflowCommentReply = async (appId: string, commentId: string, params: CreateReplyParams): Promise => { +export const createWorkflowCommentReply = async (appId: string, commentId: string, params: CreateReplyParams): Promise => { return consoleClient.workflowComments.replies.create({ params: { appId, commentId }, body: params, }) } -export const updateWorkflowCommentReply = async (appId: string, commentId: string, replyId: string, params: CreateReplyParams): Promise => { +export const updateWorkflowCommentReply = async (appId: string, commentId: string, replyId: string, params: CreateReplyParams): Promise => { return consoleClient.workflowComments.replies.update({ params: { appId,