messagecenter.api 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. }
  19. type MessageEntity {
  20. OwnType int64 `json:"ownType"`
  21. Title string `json:"title"`
  22. Content string `json:"content"`
  23. Item int64 `json:"item"`
  24. Type int64 `json:"type"`
  25. Link string `json:"link"`
  26. Appid string `header:"appId"`
  27. ItemType int64 `json:"itemType"`
  28. SendId string `json:"sendId,optional"`
  29. EntUserId int64 `header:"entUserId,optional"`
  30. NewUserId int64 `header:"newUserId"`
  31. ReceiveId string `json:"receiveId,optional"`
  32. }
  33. type MessageReq {
  34. MsgType int64 `json:"msgType"`
  35. UserType int64 `json:"userType"`
  36. SendId string `json:"sendId,optional"`
  37. LastId string `json:"lastId,optional"`
  38. PageSize int64 `json:"pageSize"`
  39. NewUserId int64 `header:"newUserId"`
  40. EntUserId int64 `header:"entUserId,optional"`
  41. EntId int64 `header:"entId,optional"`
  42. Sort string `json:"sort,optional"`
  43. }
  44. type CommonRes {
  45. Error_code int `json:"error_code"`
  46. Error_msg string `json:"error_msg"`
  47. Data interface{} `json:"data"`
  48. Count int64 `json:"count"`
  49. }
  50. type ChatSessionReq {
  51. MsgType int64 `json:"msgType"`
  52. UserType int64 `json:"userType"`
  53. EntId int64 `header:"entId,optional"`
  54. AppId string `header:"appId"`
  55. ReceiveEntId string `json:"receiveEntId,optional"`
  56. EntUserId int64 `header:"entUserId,optional"`
  57. NewUserId int64 `header:"newUserId"`
  58. ReceiveAppId string `json:"receiveAppId,optional"`
  59. ReceiveId string `json:"receiveId,optional"`
  60. CustomerserviceName string `json:"customerserviceName,optional"`
  61. }
  62. type CloseSessionReq {
  63. SessionId string `json:"sessionId"`
  64. }
  65. type ShuntReq {
  66. Type string `json:"type"`
  67. }
  68. type ReadStateReq {
  69. MessageId string `json:"messageId"`
  70. }
  71. service messagecenter-api {
  72. @handler messageCount
  73. post /message/messageCount (CountReq) returns (CommonRes);
  74. @handler messageAdd
  75. post /message/messageAdd (MessageEntity) returns (CommonRes);
  76. @handler findMessage
  77. post /message/findMessage (MessageReq) returns (CommonRes);
  78. @handler userList
  79. post /message/userList (UserReq) returns (CommonRes);
  80. @handler createChatSession
  81. post /message/createChatSession (ChatSessionReq) returns (CommonRes);
  82. @handler closeChatSession
  83. post /message/closeChatSession (CloseSessionReq) returns (CommonRes);
  84. @handler obtainShunt
  85. post /message/obtainShunt (ShuntReq) returns (CommonRes);
  86. @handler updateReadById
  87. post /message/updateReadById (ReadStateReq) returns (CommonRes);
  88. }