| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- syntax = "proto3";
- package api.account;
- import "google/api/annotations.proto";
- import "api/common/common.proto";
- //import "api/base/base.proto";
- //import "google/protobuf/struct.proto";
- import "google/protobuf/empty.proto";
- option go_package = "git.ikuban.com/server/pw-protobuf/api/account;account";
- option java_multiple_files = true;
- option java_package = "api.account";
- service Account {
- rpc DebugLogin (DebugLoginRequest) returns (TokenReply){
- option (google.api.http) = {
- post: "/api/login/debug",
- body:"*"
- };
- };
- rpc Authorization (AuthorizationRequest) returns (TokenReply){
- option (google.api.http) = {
- post: "/api/login/authorization",
- body:"*"
- };
- };
- rpc AuthorizationMiniProgram (AuthorizationMiniProgramRequest) returns (MiniProgramTokenReply){
- option (google.api.http) = {
- post: "/api/login/authorization/miniprogram",
- body:"*"
- };
- };
- rpc AuthorizationHalfScreenMiniProgram (AuthorizationHalfScreenMiniProgramRequest) returns (google.protobuf.Empty){
- option (google.api.http) = {
- post: "/api/login/authorization/miniprogram/halfscreen",
- body:"*"
- };
- };
- // 获取用户登录配置
- rpc GetUserLoginConfig (google.protobuf.Empty) returns (common.GetLoginConfigReply){
- option (google.api.http) = {
- post: "/api/login/config",
- body:"*"
- };
- };
- // 获取公众号配置
- rpc GetGetGzhConfig (google.protobuf.Empty) returns (GetGetGzhConfigReply){
- option (google.api.http) = {
- post: "/api/login/gzh/conf",
- body:"*"
- };
- };
- // 通过openID和appID查询
- rpc GetIdentityByOpenIDAndAppID (OpenIDAndAppIDRequest) returns (IdentityInfo);
- // 通过openID和appID查询 未查到就创建
- rpc GetIdentityByOpenIDAndAppIDAndCreate (OpenIDAndAppIDRequest) returns (IdentityInfo);
- // 通过accountID获取Identify信息
- rpc GetIdentifyByAccountID (GetIdentifyByAccountIDRequest) returns (GetIdentifyByAccountIDReply){};
- // 通过accountID获取Identify信息
- rpc GetIdentifyByAccountIDAndIsSubscribe (GetIdentifyByAccountIDRequest) returns (GetIdentifyByAccountIDReply){};
- // 通过accountID获取Identify信息
- rpc GetIdentifyByAccountIDAndIsSubscribeByMiniProgram (GetIdentifyByAccountIDRequest) returns (GetIdentifyByAccountIDReply){};
- // 通过accountID获取Identify信息
- rpc FindIdentifyByAccountIDAndIsSubscribe (FindIdentifyByAccountIDAndIsSubscribeRequest) returns (FindIdentifyByAccountIDAndIsSubscribeReply){};
- // 用户关注
- rpc UserSubscribe (OpenIDAndAppIDRequest) returns (google.protobuf.Empty){};
- // 用户取关
- rpc UserUnsubscribe (OpenIDAndAppIDRequest) returns (google.protobuf.Empty){};
- // 获取用户手机号哦
- rpc GetUserPhoneByCode (GetUserPhoneByCodeRequest) returns (GetUserPhoneByCodeReply){};
- }
- message GetUserPhoneByCodeRequest{
- string code = 1;
- string type = 2;
- }
- message GetUserPhoneByCodeReply{
- string phone = 2;
- }
- message ReduceSubscribeMessageRequest{
- string subscribeId = 1;
- string userId = 2;
- }
- message StatisticsSubscribeMessageRequest{
- repeated string idList = 1;
- }
- message FindIdentifyByAccountIDAndIsSubscribeRequest{
- repeated int64 accountIds = 1;
- }
- message FindIdentifyByAccountIDAndIsSubscribeReply{
- repeated FindIdentifyByAccountIDInfo list = 1;
- }
- message FindIdentifyByAccountIDInfo{
- string openId = 1;
- string appid = 2;
- int64 accountId = 3;
- string type = 4;// 类型(小程序、公众号用户)
- }
- message GetGetGzhConfigReply{
- string appId = 1;// 公众号Id
- string name = 2;// 公众号名称
- string imageUrl = 3;// 公众号图片
- string privacyPolicyUrl = 4;// 公众号隐私政策链接
- string userAgreementUrl = 5;// 公众号用户协议链接
- repeated string noteSubscribeTemplateIds = 6;
- repeated string chatSubscribeTemplateIds = 7;
- repeated string registerSubscribeTemplateIds = 8;
- string contactUrl = 9;
- bool isOpenActive = 10;
- string activeLink = 11;
- string privacyPolicyHTML = 12;// 隐私政策
- string userAgreementHTML = 13;// 用户协议
- string vipPolicyHTML = 14;// vip充值协议
- repeated string messageSubscribeTemplateIds = 15;
- }
- message GetIdentifyByAccountIDRequest{
- int64 accountId = 1;
- string appid = 2;
- }
- message GetIdentifyByAccountIDReply{
- string openId = 1;
- string appid = 2;
- string type = 4;// 类型(小程序、公众号用户)
- }
- message CheckTextRequest{
- string text = 1;// 待审核的文本
- }
- message CheckTextReply{
- bool isPass = 1;// 是否通过
- }
- message MediaID{
- string mediaId = 1;
- }
- message MaterialLink {
- string link = 1;
- }
- message OpenIDAndAppIDRequest{
- string openId = 1;
- string appId = 2;
- }
- message IdentityInfo{
- string pid = 1;
- int64 accountId = 2;
- }
- message UserInfoDB{
- string id = 1; // id
- string nickname = 2;// 昵称
- string avatarUrl =3;// 头像链接
- string phone = 4;// 手机号
- int64 sex = 5;// 性别
- int64 credit = 6;// 积分
- }
- message PartnerInfoDB{
- string id = 1; // id
- string nickname = 2;// 昵称
- string avatarUrl =3;// 头像链接
- string phone = 4;// 手机号
- int64 sex = 5;// 性别
- int64 credit = 6;// 积分
- }
- message AuthorizationMiniProgramRequest {
- string jsCode = 1;
- }
- message AuthorizationHalfScreenMiniProgramRequest {
- string jsCode = 1;
- string userId = 2;
- }
- message AuthorizationRequest {
- string jsCode = 1;
- string appId = 2;
- string type = 3;
- string fromOpenId = 4;
- int64 sex = 5;
- }
- message TokenReply {
- string token = 1;
- string appId = 2;
- }
- message MiniProgramTokenReply {
- string token = 1;
- string appId = 2;
- bool isNeedMessage = 3;
- }
- message DebugLoginRequest {
- int64 id = 1;
- string code = 2;
- }
- message LoginToken {
- string pid = 1;
- string type = 2;
- }
|