Init
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type RevokeSessionRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type RevokeUserSessionsRequest struct {
|
||||
UserID int64 `json:"userId"`
|
||||
}
|
||||
|
||||
type CreateUserRequest struct {
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Mobile *string `json:"mobile"`
|
||||
Email *string `json:"email"`
|
||||
Remark string `json:"remark"`
|
||||
RoleIDs []int64 `json:"roleIds"`
|
||||
}
|
||||
|
||||
type UpdateUserRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Mobile *string `json:"mobile"`
|
||||
Email *string `json:"email"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteUserRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateUserStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type ChangePasswordRequest struct {
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type AssignRoleRequest struct {
|
||||
UserID int64 `json:"userId"`
|
||||
RoleIDs []int64 `json:"roleIds"`
|
||||
}
|
||||
|
||||
type CreateRoleRequest struct {
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateRoleRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteRoleRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateRoleStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status enums.Status `json:"status"`
|
||||
}
|
||||
|
||||
type AssignPermissionRequest struct {
|
||||
RoleID int64 `json:"roleId"`
|
||||
PermissionIDs []int64 `json:"permissionIds"`
|
||||
}
|
||||
|
||||
type CreateConversationTagRequest struct {
|
||||
Name string `json:"name"`
|
||||
Color string `json:"color"`
|
||||
Status int `json:"status"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateConversationTagRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Color string `json:"color"`
|
||||
Status int `json:"status"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteConversationTagRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type CreateAgentProfileRequest struct {
|
||||
UserID int64 `json:"userId"`
|
||||
TeamID int64 `json:"teamId"`
|
||||
AgentCode string `json:"agentCode"`
|
||||
DisplayName string `json:"displayName"`
|
||||
Avatar string `json:"avatar"`
|
||||
ServiceStatus enums.ServiceStatus `json:"serviceStatus"`
|
||||
MaxConcurrentCount int `json:"maxConcurrentCount"`
|
||||
PriorityLevel int `json:"priorityLevel"`
|
||||
AutoAssignEnabled bool `json:"autoAssignEnabled"`
|
||||
ReceiveOfflineMessage bool `json:"receiveOfflineMessage"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateAgentProfileRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateAgentProfileRequest
|
||||
}
|
||||
|
||||
type DeleteAgentProfileRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type CreateAgentTeamRequest struct {
|
||||
Name string `json:"name"`
|
||||
LeaderUserID int64 `json:"leaderUserId"`
|
||||
Status int `json:"status"`
|
||||
Description string `json:"description"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateAgentTeamRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
LeaderUserID int64 `json:"leaderUserId"`
|
||||
Status int `json:"status"`
|
||||
Description string `json:"description"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteAgentTeamRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type CreateAgentTeamScheduleRequest struct {
|
||||
TeamID int64 `json:"teamId"`
|
||||
StartAt string `json:"startAt"`
|
||||
EndAt string `json:"endAt"`
|
||||
SourceType string `json:"sourceType"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateAgentTeamScheduleRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateAgentTeamScheduleRequest
|
||||
}
|
||||
|
||||
type DeleteAgentTeamScheduleRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type AIAgentMCPToolRequest struct {
|
||||
ServerCode string `json:"serverCode"`
|
||||
ToolName string `json:"toolName"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Arguments map[string]string `json:"arguments"`
|
||||
}
|
||||
|
||||
type CreateAIConfigRequest struct {
|
||||
Name string `json:"name"`
|
||||
Provider enums.AIProvider `json:"provider"`
|
||||
BaseURL string `json:"baseUrl"`
|
||||
APIKey string `json:"apiKey"`
|
||||
ModelType enums.AIModelType `json:"modelType"`
|
||||
ModelName string `json:"modelName"`
|
||||
Dimension int `json:"dimension"`
|
||||
MaxContextTokens int `json:"maxContextTokens"`
|
||||
MaxOutputTokens int `json:"maxOutputTokens"`
|
||||
TimeoutMS int `json:"timeoutMs"`
|
||||
MaxRetryCount int `json:"maxRetryCount"`
|
||||
RPMLimit int `json:"rpmLimit"`
|
||||
TPMLimit int `json:"tpmLimit"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateAIConfigRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateAIConfigRequest
|
||||
}
|
||||
|
||||
type DeleteAIConfigRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateAIConfigStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status enums.Status `json:"status"`
|
||||
}
|
||||
|
||||
type CreateAIAgentRequest struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
AIConfigID int64 `json:"aiConfigId"`
|
||||
ServiceMode enums.IMConversationServiceMode `json:"serviceMode"`
|
||||
SystemPrompt string `json:"systemPrompt"`
|
||||
WelcomeMessage string `json:"welcomeMessage"`
|
||||
ReplyTimeoutSeconds int `json:"replyTimeoutSeconds"`
|
||||
TeamIDs []int64 `json:"teamIds"`
|
||||
HandoffMode enums.AIAgentHandoffMode `json:"handoffMode"`
|
||||
MaxAIReplyRounds int `json:"maxAiReplyRounds"`
|
||||
FallbackMode enums.AIAgentFallbackMode `json:"fallbackMode"`
|
||||
FallbackMessage string `json:"fallbackMessage"`
|
||||
KnowledgeIDs []int64 `json:"knowledgeIds"`
|
||||
SkillIDs []int64 `json:"skillIds"`
|
||||
DirectTools []AIAgentMCPToolRequest `json:"directTools"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateAIAgentRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateAIAgentRequest
|
||||
}
|
||||
|
||||
type DeleteAIAgentRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateAIAgentStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package request
|
||||
|
||||
type CreateAssetRequest struct {
|
||||
Prefix string `form:"prefix"`
|
||||
}
|
||||
|
||||
type DeleteAssetRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package request
|
||||
|
||||
type LoginRequest struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type RefreshTokenRequest struct {
|
||||
RefreshToken string `json:"refreshToken"`
|
||||
}
|
||||
|
||||
type LogoutRequest struct {
|
||||
RefreshToken string `json:"refreshToken"`
|
||||
}
|
||||
|
||||
type WxWorkExchangeRequest struct {
|
||||
Ticket string `json:"ticket"`
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package request
|
||||
|
||||
type CreateChannelRequest struct {
|
||||
ChannelType string `json:"channelType"`
|
||||
AIAgentID int64 `json:"aiAgentId"`
|
||||
Name string `json:"name"`
|
||||
ConfigJSON string `json:"configJson"`
|
||||
Status int `json:"status"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateChannelRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateChannelRequest
|
||||
}
|
||||
|
||||
type UpdateChannelStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type DeleteChannelRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package request
|
||||
|
||||
type CreateCompanyRequest struct {
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateCompanyRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateCompanyRequest
|
||||
}
|
||||
|
||||
type DeleteCompanyRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateCompanyStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package request
|
||||
|
||||
type AgentConversationFilter string
|
||||
|
||||
const (
|
||||
AgentConversationFilterMine AgentConversationFilter = "mine"
|
||||
AgentConversationFilterActive AgentConversationFilter = "active"
|
||||
AgentConversationFilterPending AgentConversationFilter = "pending"
|
||||
AgentConversationFilterClosed AgentConversationFilter = "closed"
|
||||
)
|
||||
|
||||
type ConversationListRequest struct {
|
||||
Status int `json:"status"`
|
||||
ExternalSource string `json:"externalSource"`
|
||||
ServiceMode int `json:"serviceMode"`
|
||||
CurrentAssigneeID int64 `json:"currentAssigneeId"`
|
||||
Keyword string `json:"keyword"`
|
||||
TagID int64 `json:"tagId"`
|
||||
}
|
||||
|
||||
type AssignConversationRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
AssigneeID int64 `json:"assigneeId"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type DispatchConversationRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
}
|
||||
|
||||
type TransferConversationRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
ToUserID int64 `json:"toUserId"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type CloseConversationRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
CloseReason string `json:"closeReason"`
|
||||
}
|
||||
|
||||
type ReadConversationRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
MessageID int64 `json:"messageId"`
|
||||
}
|
||||
|
||||
type AddConversationTagRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
TagID int64 `json:"tagId"`
|
||||
}
|
||||
|
||||
type RemoveConversationTagRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
TagID int64 `json:"tagId"`
|
||||
}
|
||||
|
||||
// LinkConversationCustomerRequest 将客服会话关联到 CRM 客户(并同步访客身份映射)。
|
||||
type LinkConversationCustomerRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
CustomerID int64 `json:"customerId"`
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package request
|
||||
|
||||
type CreateCustomerContactRequest struct {
|
||||
CustomerID int64 `json:"customerId"`
|
||||
ContactType string `json:"contactType"`
|
||||
ContactValue string `json:"contactValue"`
|
||||
IsPrimary bool `json:"isPrimary"`
|
||||
IsVerified bool `json:"isVerified"`
|
||||
Source string `json:"source"`
|
||||
Status int `json:"status"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateCustomerContactRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
ContactType string `json:"contactType"`
|
||||
ContactValue string `json:"contactValue"`
|
||||
IsPrimary bool `json:"isPrimary"`
|
||||
IsVerified bool `json:"isVerified"`
|
||||
Source string `json:"source"`
|
||||
Status int `json:"status"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type DeleteCustomerContactRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package request
|
||||
|
||||
// CustomerListRequest 客户分页列表查询(POST /customer/list JSON Body)。
|
||||
type CustomerListRequest struct {
|
||||
Page int `json:"page"`
|
||||
Limit int `json:"limit"`
|
||||
Status *int `json:"status,omitempty"`
|
||||
Gender *int `json:"gender,omitempty"`
|
||||
CompanyID *int64 `json:"companyId,omitempty"`
|
||||
// Keyword 模糊匹配:客户姓名、主手机号、主邮箱、任意联系方式(t_customer_contact)、公司名称(t_company)。
|
||||
Keyword string `json:"keyword"`
|
||||
}
|
||||
|
||||
func (r CustomerListRequest) GetPage() int {
|
||||
if r.Page <= 0 {
|
||||
return 1
|
||||
}
|
||||
return r.Page
|
||||
}
|
||||
|
||||
func (r CustomerListRequest) GetLimit() int {
|
||||
if r.Limit <= 0 {
|
||||
return 20
|
||||
}
|
||||
return r.Limit
|
||||
}
|
||||
|
||||
func (r CustomerListRequest) Offset() int {
|
||||
return (r.GetPage() - 1) * r.GetLimit()
|
||||
}
|
||||
|
||||
type CreateCustomerRequest struct {
|
||||
Name string `json:"name"`
|
||||
Gender int `json:"gender"`
|
||||
CompanyID int64 `json:"companyId"`
|
||||
PrimaryMobile string `json:"primaryMobile"`
|
||||
PrimaryEmail string `json:"primaryEmail"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateCustomerRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateCustomerRequest
|
||||
}
|
||||
|
||||
type DeleteCustomerRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateCustomerStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
// CustomerProfileContactItem 保存客户档案时的联系方式行(无 id 表示新建)。
|
||||
type CustomerProfileContactItem struct {
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
ContactType string `json:"contactType"`
|
||||
ContactValue string `json:"contactValue"`
|
||||
IsPrimary bool `json:"isPrimary"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// SaveCustomerProfileRequest 客户主信息与联系方式一并保存(单事务);id 为空或 0 表示新建客户。
|
||||
type SaveCustomerProfileRequest struct {
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Gender int `json:"gender"`
|
||||
CompanyID int64 `json:"companyId"`
|
||||
Remark string `json:"remark"`
|
||||
Contacts []CustomerProfileContactItem `json:"contacts"`
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type CreateKnowledgeBaseRequest struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
KnowledgeType string `json:"knowledgeType"`
|
||||
DefaultTopK int `json:"defaultTopK"`
|
||||
DefaultScoreThreshold float64 `json:"defaultScoreThreshold"`
|
||||
DefaultRerankLimit int `json:"defaultRerankLimit"`
|
||||
ChunkProvider string `json:"chunkProvider"`
|
||||
ChunkTargetTokens int `json:"chunkTargetTokens"`
|
||||
ChunkMaxTokens int `json:"chunkMaxTokens"`
|
||||
ChunkOverlapTokens int `json:"chunkOverlapTokens"`
|
||||
AnswerMode int `json:"answerMode"`
|
||||
FallbackMode int `json:"fallbackMode"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateKnowledgeBaseRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateKnowledgeBaseRequest
|
||||
}
|
||||
|
||||
type CreateKnowledgeDocumentRequest struct {
|
||||
KnowledgeBaseID int64 `json:"knowledgeBaseId"`
|
||||
Title string `json:"title"`
|
||||
ContentType enums.KnowledgeDocumentContentType `json:"contentType"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type UpdateKnowledgeDocumentRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateKnowledgeDocumentRequest
|
||||
}
|
||||
|
||||
type CreateKnowledgeFAQRequest struct {
|
||||
KnowledgeBaseID int64 `json:"knowledgeBaseId"`
|
||||
Question string `json:"question"`
|
||||
Answer string `json:"answer"`
|
||||
SimilarQuestions []string `json:"similarQuestions"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateKnowledgeFAQRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateKnowledgeFAQRequest
|
||||
}
|
||||
|
||||
type KnowledgeSearchRequest struct {
|
||||
KnowledgeBaseIDs []int64 `json:"knowledgeBaseIds"`
|
||||
Question string `json:"question"`
|
||||
TopK int `json:"topK"`
|
||||
ScoreThreshold float64 `json:"scoreThreshold"`
|
||||
RerankLimit int `json:"rerankLimit"`
|
||||
Channel string `json:"channel"`
|
||||
Scene string `json:"scene"`
|
||||
SessionID string `json:"sessionId"`
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
}
|
||||
|
||||
type KnowledgeAnswerRequest struct {
|
||||
KnowledgeBaseIDs []int64 `json:"knowledgeBaseIds"`
|
||||
Question string `json:"question"`
|
||||
TopK int `json:"topK"`
|
||||
ScoreThreshold float64 `json:"scoreThreshold"`
|
||||
RerankLimit int `json:"rerankLimit"`
|
||||
Channel string `json:"channel"`
|
||||
Scene string `json:"scene"`
|
||||
SessionID string `json:"sessionId"`
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
AnswerMode int `json:"answerMode"`
|
||||
FallbackMode int `json:"fallbackMode"`
|
||||
}
|
||||
|
||||
type CreateKnowledgeFeedbackRequest struct {
|
||||
RetrieveLogID int64 `json:"retrieveLogId"`
|
||||
FeedbackType int `json:"feedbackType"`
|
||||
FeedbackReason string `json:"feedbackReason"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package request
|
||||
|
||||
type MCPServerDebugRequest struct {
|
||||
ServerCode string `json:"serverCode"`
|
||||
}
|
||||
|
||||
type MCPCallToolRequest struct {
|
||||
ServerCode string `json:"serverCode"`
|
||||
ToolName string `json:"toolName"`
|
||||
Arguments map[string]any `json:"arguments"`
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type MessageListRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
SenderType string `json:"senderType"`
|
||||
MessageType string `json:"messageType"`
|
||||
}
|
||||
|
||||
type SendConversationMessageRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
MessageType enums.IMMessageType `json:"messageType"`
|
||||
Content string `json:"content"`
|
||||
Payload string `json:"payload"`
|
||||
ClientMsgID string `json:"clientMsgId"`
|
||||
}
|
||||
|
||||
type RecallConversationMessageRequest struct {
|
||||
MessageID int64 `json:"messageId"`
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type QuickReplyListRequest struct {
|
||||
GroupName string `json:"groupName"`
|
||||
Keyword string `json:"keyword"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type CreateQuickReplyRequest struct {
|
||||
GroupName string `json:"groupName"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Status enums.Status `json:"status"`
|
||||
SortNo int `json:"sortNo"`
|
||||
}
|
||||
|
||||
type UpdateQuickReplyRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateQuickReplyRequest
|
||||
}
|
||||
|
||||
type DeleteQuickReplyRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type SkillDefinitionListRequest struct {
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type CreateSkillDefinitionRequest struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Prompt string `json:"prompt"`
|
||||
ExecutionMode enums.SkillExecutionMode `json:"executionMode"`
|
||||
ExecutionConfig string `json:"executionConfig"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateSkillDefinitionRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateSkillDefinitionRequest
|
||||
}
|
||||
|
||||
type DeleteSkillDefinitionRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateSkillDefinitionStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type SkillDebugRunRequest struct {
|
||||
AIAgentID int64 `json:"aiAgentId"`
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
SkillCode string `json:"skillCode"`
|
||||
UserMessage string `json:"userMessage"`
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package request
|
||||
|
||||
type TagListRequest struct {
|
||||
ParentID int64 `json:"parentId"`
|
||||
Name string `json:"name"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type CreateTagRequest struct {
|
||||
ParentID int64 `json:"parentId"`
|
||||
Name string `json:"name"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateTagRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateTagRequest
|
||||
}
|
||||
|
||||
type DeleteTagRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateTagStatusRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package request
|
||||
|
||||
import "cs-agent/internal/pkg/enums"
|
||||
|
||||
type CreateTicketResolutionCodeRequest struct {
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
SortNo int `json:"sortNo"`
|
||||
Status enums.Status `json:"status"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateTicketResolutionCodeRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateTicketResolutionCodeRequest
|
||||
}
|
||||
|
||||
type DeleteTicketResolutionCodeRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type CreateTicketPriorityConfigRequest struct {
|
||||
Name string `json:"name"`
|
||||
FirstResponseMinutes int `json:"firstResponseMinutes"`
|
||||
ResolutionMinutes int `json:"resolutionMinutes"`
|
||||
Status enums.Status `json:"status"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type UpdateTicketPriorityConfigRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
CreateTicketPriorityConfigRequest
|
||||
}
|
||||
|
||||
type DeleteTicketPriorityConfigRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package request
|
||||
|
||||
type CreateTicketRequest struct {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Source string `json:"source"`
|
||||
Channel string `json:"channel"`
|
||||
CustomerID int64 `json:"customerId"`
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
TagIDs []int64 `json:"tagIds"`
|
||||
Type string `json:"type"`
|
||||
Priority int64 `json:"priority"`
|
||||
Severity int `json:"severity"`
|
||||
CurrentTeamID int64 `json:"currentTeamId"`
|
||||
CurrentAssigneeID int64 `json:"currentAssigneeId"`
|
||||
DueAt string `json:"dueAt"`
|
||||
CustomFields map[string]any `json:"customFields"`
|
||||
}
|
||||
|
||||
type CreateTicketFromConversationRequest struct {
|
||||
ConversationID int64 `json:"conversationId"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
TagIDs []int64 `json:"tagIds"`
|
||||
Priority int64 `json:"priority"`
|
||||
Severity int `json:"severity"`
|
||||
CurrentTeamID int64 `json:"currentTeamId"`
|
||||
CurrentAssigneeID int64 `json:"currentAssigneeId"`
|
||||
SyncToConversation bool `json:"syncToConversation"`
|
||||
CustomFields map[string]any `json:"customFields"`
|
||||
}
|
||||
|
||||
type UpdateTicketRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
TagIDs []int64 `json:"tagIds"`
|
||||
Type string `json:"type"`
|
||||
Priority int64 `json:"priority"`
|
||||
Severity int `json:"severity"`
|
||||
CurrentTeamID int64 `json:"currentTeamId"`
|
||||
CurrentAssigneeID int64 `json:"currentAssigneeId"`
|
||||
DueAt string `json:"dueAt"`
|
||||
CustomFields map[string]any `json:"customFields"`
|
||||
}
|
||||
|
||||
type AssignTicketRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
ToUserID int64 `json:"toUserId"`
|
||||
ToTeamID int64 `json:"toTeamId"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type ChangeTicketStatusRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
Status string `json:"status"`
|
||||
PendingReason string `json:"pendingReason"`
|
||||
CloseReason string `json:"closeReason"`
|
||||
ResolutionCode string `json:"resolutionCode"`
|
||||
ResolutionSummary string `json:"resolutionSummary"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type ReplyTicketRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
ContentType string `json:"contentType"`
|
||||
Content string `json:"content"`
|
||||
Payload string `json:"payload"`
|
||||
}
|
||||
|
||||
type InternalNoteRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
ContentType string `json:"contentType"`
|
||||
Content string `json:"content"`
|
||||
Payload string `json:"payload"`
|
||||
}
|
||||
|
||||
type CloseTicketRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
CloseReason string `json:"closeReason"`
|
||||
}
|
||||
|
||||
type ReopenTicketRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type WatchTicketRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
}
|
||||
|
||||
type BatchAssignTicketRequest struct {
|
||||
TicketIDs []int64 `json:"ticketIds"`
|
||||
ToUserID int64 `json:"toUserId"`
|
||||
ToTeamID int64 `json:"toTeamId"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type BatchChangeTicketStatusRequest struct {
|
||||
TicketIDs []int64 `json:"ticketIds"`
|
||||
Status string `json:"status"`
|
||||
PendingReason string `json:"pendingReason"`
|
||||
CloseReason string `json:"closeReason"`
|
||||
ResolutionCode string `json:"resolutionCode"`
|
||||
ResolutionSummary string `json:"resolutionSummary"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type BatchWatchTicketRequest struct {
|
||||
TicketIDs []int64 `json:"ticketIds"`
|
||||
Watched bool `json:"watched"`
|
||||
}
|
||||
|
||||
type AddTicketRelationRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
RelatedTicketID int64 `json:"relatedTicketId"`
|
||||
RelatedTicketNo string `json:"relatedTicketNo"`
|
||||
RelationType string `json:"relationType"`
|
||||
}
|
||||
|
||||
type DeleteTicketRelationRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
RelationID int64 `json:"relationId"`
|
||||
}
|
||||
|
||||
type AddTicketCollaboratorRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
UserID int64 `json:"userId"`
|
||||
}
|
||||
|
||||
type DeleteTicketCollaboratorRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
CollaboratorID int64 `json:"collaboratorId"`
|
||||
}
|
||||
|
||||
type LinkTicketCustomerRequest struct {
|
||||
TicketID int64 `json:"ticketId"`
|
||||
CustomerID int64 `json:"customerId"`
|
||||
}
|
||||
|
||||
type SaveTicketViewRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Filters map[string]any `json:"filters"`
|
||||
}
|
||||
|
||||
type DeleteTicketViewRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
Reference in New Issue
Block a user