wx.proto 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. syntax = "proto3";
  2. package api.wx;
  3. import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. import "google/protobuf/empty.proto";
  6. import "api/common/common.proto";
  7. import "api/account/account.proto";
  8. option go_package = "git.ikuban.com/server/pw-protobuf/api/wx;wx";
  9. option java_multiple_files = true;
  10. option java_package = "api.wx";
  11. service Wx {
  12. // 定时发送签到提醒
  13. rpc CronSignInUser (google.protobuf.Empty) returns (google.protobuf.Empty){};
  14. // 定时发送未读消息提醒
  15. rpc CronSendUnreadTemplate (google.protobuf.Empty) returns (google.protobuf.Empty){};
  16. // 未读发送模板消息
  17. rpc SendNewMessageUnreadReminder (SendNewMessageUnreadReminderRequest) returns (google.protobuf.Empty){};
  18. // 好友访问提醒
  19. rpc SendNewVisitorTemplateReminder (common.PersonIDParam) returns (google.protobuf.Empty){};
  20. // 移除用户已读
  21. rpc ReduceUserUnread (ReduceUserUnreadRequest) returns (google.protobuf.Empty){};
  22. // 获取key对应的参数
  23. rpc GetUserMsgByKey (GetUserMsgByKeyRequest) returns (GetUserMsgByKeyReply){};
  24. // 微信SDK初始化
  25. rpc WxConf (common.WxConfReq) returns (common.WxConfResponse){
  26. option (google.api.http) = {
  27. post: "/api/wx/jssdk/config",
  28. body:"*"
  29. };
  30. };
  31. // 通过微信下载语音并上传到七牛
  32. rpc UploadMaterialVoice (account.MediaID) returns (account.MaterialLink){
  33. option (google.api.http) = {
  34. post: "/api/common/material/upload/voice",
  35. body:"*"
  36. };
  37. };
  38. // 定时删除过期选择
  39. rpc CronDeleteOldUserSelect (google.protobuf.Empty) returns (google.protobuf.Empty){};
  40. rpc GetAccessToken (GetAccessTokenRequest) returns (GetAccessTokenReply){
  41. option (google.api.http) = {
  42. get: "/api/get_access_token",
  43. };
  44. };
  45. rpc SendNewVisitorReminder (OpenIDRequest) returns (google.protobuf.Empty){
  46. option (google.api.http) = {
  47. post: "/api/send/subscribe/web",
  48. };
  49. };
  50. rpc SendAIReply (SendAIReplyRequest) returns (google.protobuf.Empty){};
  51. rpc GetWxGzhQrcode (GetWxGzhQrcodeRequest) returns (GetWxGzhQrcodeReply){};
  52. rpc sendMiniProgramShareVideoLinkFail (SendMiniProgramShareVideoLinkFailRequest) returns (google.protobuf.Empty){};
  53. rpc sendMiniProgramSuccessInviteFriend (common.PersonIDParam) returns (google.protobuf.Empty){};
  54. rpc sendMiniProgramUpOfficialVersion (common.PersonIDParam) returns (google.protobuf.Empty){};
  55. }
  56. message SendMiniProgramShareVideoLinkFailRequest{
  57. string userId = 1;
  58. int64 robotId = 2;
  59. }
  60. message GetWxGzhQrcodeRequest{
  61. int64 shareId = 1;// 分享码ID
  62. }
  63. message GetWxGzhQrcodeReply{
  64. string url = 1;
  65. }
  66. message SendAIReplyRequest{
  67. string personId = 1;
  68. string name = 2;
  69. int64 robotId = 3;
  70. }
  71. message OpenIDRequest {
  72. string openId = 1;
  73. }
  74. message GetAccessTokenRequest{
  75. string appid = 1;
  76. }
  77. message GetAccessTokenReply{
  78. string access_token = 1;
  79. int64 errcode = 2;
  80. string errmsg = 3;
  81. int64 expires_in = 4;
  82. }
  83. message GetUserMsgByKeyRequest{
  84. string key = 1;
  85. }
  86. message GetUserMsgByKeyReply{
  87. string partnerId = 1;
  88. string openId = 2;
  89. string appId = 3;
  90. string appName = 4;
  91. }
  92. message ReduceUserUnreadRequest{
  93. int64 accountId = 1;
  94. string personId = 2;
  95. }
  96. message SendNewMessageUnreadReminderRequest{
  97. string personId = 1;
  98. string sendPersonId = 2;
  99. }