messagecenter.api 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. type CountReq {
  2. UserType int64 `json:"userType"`
  3. NewUserId int64 `header:"newUserId,optional"`
  4. EntUserId int64 `header:"entUserId,optional"`
  5. }
  6. type CountResp {
  7. Count int64 `json:"count"`
  8. ErrorCode int64 `json:"error_code"`
  9. ErrorMsg string `json:"error_msg"`
  10. }
  11. type UserReq {
  12. Phone string `json:"phone,optional"`
  13. UserType int64 `json:"userType"`
  14. StartTime string `json:"startTime,optional"`
  15. EndTime string `json:"endTime,optional"`
  16. NewUserId int64 `header:"newUserId"`
  17. EntUserId int64 `header:"entUserId,optional"`
  18. Page int64 `json:"page,optional"`
  19. Size int64 `json:"size,optional"`
  20. IsArtificial int64 `json:"isArtificial,optional"`
  21. }
  22. type MessageEntity {
  23. OwnType int64 `json:"ownType"`
  24. Title string `json:"title"`
  25. Content string `json:"content"`
  26. Item int64 `json:"item"`
  27. Type int64 `json:"type"`
  28. Link string `json:"link"`
  29. Appid string `header:"appId"`
  30. ItemType int64 `json:"itemType"`
  31. SendId string `json:"sendId,optional"`
  32. EntUserId int64 `header:"entUserId,optional"`
  33. NewUserId int64 `header:"newUserId"`
  34. ReceiveId string `json:"receiveId,optional"`
  35. }
  36. type MessageReq {
  37. MsgType int64 `json:"msgType"`
  38. UserType int64 `json:"userType"`
  39. SendId string `json:"sendId,optional"`
  40. LastId string `json:"lastId,optional"`
  41. PageSize int64 `json:"pageSize"`
  42. NewUserId int64 `header:"newUserId"`
  43. EntUserId int64 `header:"entUserId,optional"`
  44. EntId int64 `header:"entId,optional"`
  45. Sort string `json:"sort,optional"`
  46. }
  47. type CommonRes {
  48. Error_code int `json:"error_code"`
  49. Error_msg string `json:"error_msg"`
  50. Data interface{} `json:"data"`
  51. Count int64 `json:"count"`
  52. }
  53. type ChatSessionReq {
  54. MsgType int64 `json:"msgType"`
  55. UserType int64 `json:"userType"`
  56. EntId int64 `header:"entId,optional"`
  57. AppId string `header:"appId"`
  58. ReceiveEntId string `json:"receiveEntId,optional"`
  59. EntUserId int64 `header:"entUserId,optional"`
  60. NewUserId int64 `header:"newUserId"`
  61. ReceiveAppId string `json:"receiveAppId,optional"`
  62. ReceiveId string `json:"receiveId,optional"`
  63. CustomerserviceName string `json:"customerserviceName,optional"`
  64. }
  65. type CloseSessionReq {
  66. SessionId string `json:"sessionId"`
  67. }
  68. type ShuntReq {
  69. Type string `json:"type"`
  70. }
  71. type ReadStateReq {
  72. MessageId string `json:"messageId"`
  73. EntUserId int64 `header:"entUserId,optional"`
  74. NewUserId int64 `header:"newUserId"`
  75. }
  76. type ReadWithdrawReq {
  77. MessageId string `json:"messageId"`
  78. Appid string `header:"appid"`
  79. NewUserId int64 `header:"newUserId,optional"`
  80. EntUserId int64 `header:"entUserId,optional"`
  81. UserType int64 `json:"userType"`
  82. }
  83. type AppraiseMessageReq {
  84. EntId int64 `header:"entId,optional"`
  85. AppId string `header:"appId"`
  86. NewUserId int64 `header:"newUserId"`
  87. MessageId string `json:"messageId"`
  88. Appraise int64 `json:"appraise,options=-1|1"`
  89. }
  90. service messagecenter-api {
  91. @handler messageCount
  92. post /message/messageCount (CountReq) returns (CommonRes);
  93. @handler messageAdd
  94. post /message/messageAdd (MessageEntity) returns (CommonRes);
  95. @handler findMessage
  96. post /message/findMessage (MessageReq) returns (CommonRes);
  97. @handler userList
  98. post /message/userList (UserReq) returns (CommonRes);
  99. @handler createChatSession
  100. post /message/createChatSession (ChatSessionReq) returns (CommonRes);
  101. @handler closeChatSession
  102. post /message/closeChatSession (CloseSessionReq) returns (CommonRes);
  103. @handler obtainShunt
  104. post /message/obtainShunt (ShuntReq) returns (CommonRes);
  105. @handler updateReadById
  106. post /message/updateReadById (ReadStateReq) returns (CommonRes);
  107. @handler withdrawMessage //撤回消息
  108. post /message/withdrawMessage (ReadWithdrawReq) returns (CommonRes);
  109. @handler AppraiseMessage // 消息评价
  110. post /message/appraiseMessage (AppraiseMessageReq) returns (CommonRes);
  111. }