messagecenter.api 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. syntax = "v1"
  2. type CountReq {
  3. UserType int64 `json:"userType"`
  4. NewUserId int64 `header:"newUserId,optional"`
  5. EntUserId int64 `header:"entUserId,optional"`
  6. }
  7. type CountResp {
  8. Count int64 `json:"count"`
  9. ErrorCode int64 `json:"error_code"`
  10. ErrorMsg string `json:"error_msg"`
  11. }
  12. type UserReq {
  13. Phone string `json:"phone,optional"`
  14. UserType int64 `json:"userType"`
  15. StartTime string `json:"startTime,optional"`
  16. EndTime string `json:"endTime,optional"`
  17. NewUserId int64 `header:"newUserId"`
  18. EntId int64 `header:"entId,optional"`
  19. EntUserId int64 `header:"entUserId,optional"`
  20. Page int64 `json:"page,optional"`
  21. Size int64 `json:"size,optional"`
  22. IsArtificial int64 `json:"isArtificial,optional"`
  23. FiltrationId string `json:"filtrationId,optional"`
  24. }
  25. type MessageEntity {
  26. OwnType int64 `json:"ownType"`
  27. Title string `json:"title"`
  28. Content string `json:"content"`
  29. Item int64 `json:"item"`
  30. Type int64 `json:"type"`
  31. Link string `json:"link"`
  32. Appid string `header:"appId"`
  33. ItemType int64 `json:"itemType"`
  34. SendId string `json:"sendId,optional"`
  35. EntUserId int64 `header:"entUserId,optional"`
  36. NewUserId int64 `header:"newUserId"`
  37. ReceiveId string `json:"receiveId,optional"`
  38. }
  39. type MessageReq {
  40. MsgType int64 `json:"msgType"`
  41. UserType int64 `json:"userType"`
  42. SendId string `json:"sendId,optional"`
  43. LastId string `json:"lastId,optional"`
  44. PageSize int64 `json:"pageSize"`
  45. NewUserId int64 `header:"newUserId"`
  46. EntUserId int64 `header:"entUserId,optional"`
  47. EntId int64 `header:"entId,optional"`
  48. Sort string `json:"sort,optional"`
  49. ChatGroupId int64 `json:"chatGroupId,optional"`
  50. }
  51. type CommonRes {
  52. Error_code int `json:"error_code"`
  53. Error_msg string `json:"error_msg"`
  54. Data interface{} `json:"data"`
  55. Count int64 `json:"count"`
  56. }
  57. type ChatSessionReq {
  58. MsgType int64 `json:"msgType"`
  59. UserType int64 `json:"userType"`
  60. EntId int64 `header:"entId,optional"`
  61. AppId string `header:"appId"`
  62. ReceiveEntId string `json:"receiveEntId,optional"`
  63. EntUserId int64 `header:"entUserId,optional"`
  64. NewUserId int64 `header:"newUserId"`
  65. ReceiveAppId string `json:"receiveAppId,optional"`
  66. ReceiveId string `json:"receiveId,optional"`
  67. CustomerserviceName string `json:"customerserviceName,optional"`
  68. }
  69. type CloseSessionReq {
  70. SessionId string `json:"sessionId"`
  71. }
  72. type ShuntReq {
  73. Type string `json:"type"`
  74. }
  75. type ReadStateReq {
  76. MessageId string `json:"messageId"`
  77. EntUserId int64 `header:"entUserId,optional"`
  78. NewUserId int64 `header:"newUserId"`
  79. }
  80. type ChatGroupListReq {
  81. EntId int64 `header:"entId,optional"`
  82. UserName string `json:"userName"`
  83. GroupName string `json:"groupName"`
  84. PositionId int64 `header:"positionId,optional"`
  85. Appid string `header:"appId"`
  86. }
  87. type ChatGroupAddReq {
  88. EntId int64 `header:"entId,optional"`
  89. PositionId int64 `header:"positionId,optional"`
  90. UserIdArr []string `json:"userIdArr"`
  91. Appid string `header:"appId"`
  92. }
  93. type ChatGroupPersonReq {
  94. ChatGroupId string `json:"chatGroupId"`
  95. EntId int64 `header:"entId,optional"`
  96. Appid string `header:"appId"`
  97. }
  98. type ChatGroupJoinReq {
  99. ChatGroupId string `json:"chatGroupId"`
  100. PositionId int64 `json:"positionId"`
  101. Appid string `header:"appId"`
  102. UserIdArr []string `json:"userIdArr"`
  103. }
  104. type GroupNameUpdateReq {
  105. ChatGroupId string `json:"chatGroupId"`
  106. PositionId int64 `header:"positionId,optional"`
  107. GroupName string `json:"groupName"`
  108. Appid string `header:"appId"`
  109. }
  110. type GroupNoticeAddReq {
  111. ChatGroupId string `json:"chatGroupId"`
  112. Content string `json:"content"`
  113. Appid string `header:"appId"`
  114. }
  115. type GroupNoticeUpdateReq {
  116. Content string `json:"content"`
  117. GroupNoticeId string `json:"groupNoticeId"`
  118. Appid string `header:"appId"`
  119. }
  120. type ReadWithdrawReq {
  121. MessageId string `json:"messageId"`
  122. Appid string `header:"appid"`
  123. NewUserId int64 `header:"newUserId,optional"`
  124. EntUserId int64 `header:"entUserId,optional"`
  125. UserType int64 `json:"userType"`
  126. }
  127. type AppraiseMessageReq {
  128. EntId int64 `header:"entId,optional"`
  129. AppId string `header:"appId"`
  130. NewUserId int64 `header:"newUserId"`
  131. MessageId string `json:"messageId"`
  132. Appraise int64 `json:"appraise,options=-1|1"`
  133. }
  134. service messagecenter-api {
  135. @handler messageCount
  136. post /message/messageCount (CountReq) returns (CommonRes);
  137. @handler messageAdd
  138. post /message/messageAdd (MessageEntity) returns (CommonRes);
  139. @handler findMessage
  140. post /message/findMessage (MessageReq) returns (CommonRes);
  141. @handler userList
  142. post /message/userList (UserReq) returns (CommonRes);
  143. @handler createChatSession
  144. post /message/createChatSession (ChatSessionReq) returns (CommonRes);
  145. @handler closeChatSession
  146. post /message/closeChatSession (CloseSessionReq) returns (CommonRes);
  147. @handler obtainShunt
  148. post /message/obtainShunt (ShuntReq) returns (CommonRes);
  149. @handler updateReadById
  150. post /message/updateReadById (ReadStateReq) returns (CommonRes);
  151. @handler chatGroupList
  152. post /message/chatGroupList (ChatGroupListReq) returns (CommonRes);
  153. @handler chatGroupAdd
  154. post /message/chatGroupAdd (ChatGroupAddReq) returns (CommonRes);
  155. @handler chatGroupPerson
  156. post /message/chatGroupPerson (ChatGroupPersonReq) returns (CommonRes);
  157. @handler chatGroupJoin
  158. post /message/chatGroupJoin (ChatGroupJoinReq) returns (CommonRes);
  159. @handler groupNameUpdate
  160. post /message/groupNameUpdate (GroupNameUpdateReq) returns (CommonRes);
  161. @handler groupNoticeAdd
  162. post /message/groupNoticeAdd (GroupNoticeAddReq) returns (CommonRes);
  163. @handler groupNoticeUpdate
  164. post /message/groupNoticeUpdate (GroupNoticeUpdateReq) returns (CommonRes);
  165. @handler groupNoticeGet
  166. post /message/groupNoticeGet (ChatGroupPersonReq) returns (CommonRes);
  167. @handler withdrawMessage //撤回消息
  168. post /message/withdrawMessage (ReadWithdrawReq) returns (CommonRes);
  169. @handler AppraiseMessage // 消息评价
  170. post /message/appraiseMessage (AppraiseMessageReq) returns (CommonRes);
  171. @handler ConversationList // 会话列表
  172. post /message/conversationList (UserReq) returns (CommonRes);
  173. }