messagecenter.api 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 int64 `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. }
  43. type CommonRes {
  44. Error_code int `json:"error_code"`
  45. Error_msg string `json:"error_msg"`
  46. Data interface{} `json:"data"`
  47. Count int64 `json:"count"`
  48. }
  49. type ChatSessionReq {
  50. MsgType int64 `json:"msgType"`
  51. UserType int64 `json:"userType"`
  52. EntId int64 `header:"entId,optional"`
  53. AppId string `header:"appId"`
  54. ReceiveEntId string `json:"receiveEntId,optional"`
  55. EntUserId int64 `header:"entUserId,optional"`
  56. NewUserId int64 `header:"newUserId"`
  57. ReceiveAppId string `json:"receiveAppId,optional"`
  58. ReceiveId string `json:"receiveId,optional"`
  59. CustomerserviceName string `json:"customerserviceName,optional"`
  60. }
  61. type CloseSessionReq {
  62. SessionId string `json:"sessionId"`
  63. }
  64. type ShuntReq {
  65. Type string `json:"type"`
  66. }
  67. type ReadStateReq {
  68. MessageId int64 `json:"messageId"`
  69. }
  70. service messagecenter-api {
  71. @handler messageCount
  72. post /message/messageCount (CountReq) returns (CommonRes);
  73. @handler messageAdd
  74. post /message/messageAdd (MessageEntity) returns (CommonRes);
  75. @handler findMessage
  76. post /message/findMessage (MessageReq) returns (CommonRes);
  77. @handler userList
  78. post /message/userList (UserReq) returns (CommonRes);
  79. @handler createChatSession
  80. post /message/createChatSession (ChatSessionReq) returns (CommonRes);
  81. @handler closeChatSession
  82. post /message/closeChatSession (CloseSessionReq) returns (CommonRes);
  83. @handler obtainShunt
  84. post /message/obtainShunt (ShuntReq) returns (CommonRes);
  85. @handler updateReadById
  86. post /message/updateReadById (ReadStateReq) returns (CommonRes);
  87. }