You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

302 lines
11 KiB

syntax = "proto3";
option go_package = ".;pb";
import "user/user_db.proto";
import "db.proto";
import "enum.proto";
//登录请求
message UserSginReq{
SginTyoe stype = 1; //@go_tags(`json:"stype" example:"0" description:"登录方式“`) 登录方式
string mail = 2; //@go_tags(`json:"mail" example:"" description:"邮箱地址"`) 邮箱地址
string phone = 3; //@go_tags(`json:"phone" example:"" description:"手机号码“`) 手机号
string ttoken = 4; //@go_tags(`json:"ttoken" example:"" description:"第三方token"`) 第三方token
string vcode = 5; //@go_tags(`json:"vcode" example:"" description:"验证码"`) 验证码
string phonemodel = 10; //@go_tags(`json:"phonemodel" example:"" description:"设备型号"`) 手机型号
string phonemac = 11; //@go_tags(`json:"phonemac" example:"" description:"手机硬件id"`) 手机硬件id
string name = 20; //@go_tags(`gorm:"name:50" json:"name" example:"" description:"用户名"`) 用户名
string avatar = 21; //@go_tags(`gorm:"avatar" json:"avatar" example:"" description:"头像连接"`) 头像连接
string language = 22; //@go_tags(`json:"language" example:"en" description:"语言"`)
UserChannel channel = 23; //渠道
string version = 24; //版本号
}
message UserSginResp{
// 认证token
// 缓存在本地 可以通过token 登录
// example: 认证token
string token = 1; //@go_tags(`json:"token" example:"认证token" description:"认证token"`)
// 用户信息
// example:
DBUser user = 2; //@go_tags(`json:"user" description:"用户信息"`)
// 用户设备列表
// example:
repeated DBUserDivice devices = 3; //@go_tags(`json:"devices" description:"用户设备列表"`)
}
//验证码请求
message UserVerificationReq {
// 验证码类型“
// 选填,长度 11
// example: 0 邮箱验证 1 手机验证
int32 vtype = 1; //@go_tags(`json:"vtype" example:"0" description:"验证码类型 0 手机验证 1 邮箱验证“`)
// 目标地址
// 选填,长度 11
// example: 手机号/邮箱
string addr = 2; //@go_tags(`json:"addr" example:"" description:"手机号/邮箱"`)
}
//验证码请求
message UserVerificationResp {
}
//通过toke 登录 同意设备下可以持续登录,当更换设备后 登录会返回错误码,token已过期 需要转 sgin 登录请求
message UserGetInfoReq {
string version = 1; //版本号
UserChannel channel = 2; //渠道
}
message UserGetInfoResp {
// 用户信息
// example:
DBUser user = 1; //@go_tags(`json:"user" description:"用户信息"`)
// 用户设备列表
// example:
repeated DBUserDivice devices = 2; //@go_tags(`json:"devices" description:"用户设备列表"`)
}
//设置请求 此接口由于需要上传头像 只能支持字符串类型的参数
message UserSettingReq {
string name = 1; //@go_tags(`json:"name" example:"" description:"用户名"`) 用户名
string language = 2; //@go_tags(`json:"language" example:"en" description:"语言"`)
string image = 3; //@go_tags(`json:"image" example:"" description:"头像"`) 头像连接
string gender = 4; //@go_tags(`json:"gender" example:"1" description:"性别 1-男 2-女"`) 性别 1-男 2-女
}
message UserSettingResp {
string name = 1; //@go_tags(`json:"name" example:"用户名" description:"用户名"`)
string language = 2; //@go_tags(`json:"language" example:"en" description:"语言"`)
string avatar = 3; //@go_tags(`json:"avatar" example:"" description:"地址"`) 头像连接
int32 gender = 4; //@go_tags(`json:"gender" example:"1" description:"性别 1-男 2-女"`) 性别 1-男 2-女
}
//绑定耳机请求
message UserBindDeviceReq {
int32 pid = 1; //产品id
string code = 2; //授权码
string devicename = 3; //耳机名称
string devicemac = 4; //耳机名称地址
string version = 5; //版本号
}
//绑定耳机请求
message UserBindDeviceResp {
DBUserDivice device = 1; //绑定的耳机信息
bool isgiveaway = 2; //@go_tags(`gorm:"isgiveaway" json:"isgiveaway"`) 是否是第一次绑定
int32 viplv = 3; //@go_tags(`gorm:"viplv:50" json:"viplv"`) viplv
int64 vipexptime = 4; //@go_tags(`gorm:"vipexptime" json:"vipexptime"`) 会员过期时间
int64 aichatintegral = 5; //@go_tags(`gorm:"aichatintegral" json:"aichatintegral"`) ai聊天积分
int64 aichattotalintegral = 6; //@go_tags(`gorm:"aichattotalintegral" json:"aichattotalintegral"`) ai聊天总积分
int64 tradeintegral = 7; //@go_tags(`gorm:"tradeintegral" json:"tradeintegral"`) 翻译积分
int64 tradetotalintegral = 8; //@go_tags(`gorm:"tradetotalintegral" json:"tradetotalintegral"`) 翻译总积分
int64 meetintegral = 9; //@go_tags(`gorm:"meetintegral" json:"meetintegral"`) 会议积分
int64 meettotalintegral = 10; //@go_tags(`gorm:"meettotalintegral" json:"meettotalintegral"`) 会议总积分
}
//解绑定耳机请求
message UserUnBindDeviceReq {
uint64 id = 1; //设备id
}
//解绑定耳机请求
message UserUnBindDeviceResp {
}
//扫激活码(厂家公码)领取奖励请求
//新设计下激活码 = 厂家公码:每个用户一生仅可领取 1 次(任意厂家任意码均算)
message UserBindAuthCodeReq {
string code = 1; //激活码/公码(必填)
string devicename = 2; //[已废弃] 旧的逐设备激活码遗留字段,公码场景下忽略
string devicemac = 3; //[已废弃] 旧的逐设备激活码遗留字段,公码场景下忽略
}
//扫激活码(厂家公码)领取奖励响应
message UserBindAuthCodeResp {
DBUserDivice device = 1; //[已废弃] 公码场景下为空
bool isgiveaway = 2; //本次是否发放奖励
int32 viplv = 3; //VIP等级
int64 vipexptime = 4; //VIP过期时间
int64 tradeintegral = 5; //翻译积分
int64 tradetotalintegral = 6; //翻译总积分
int64 meetintegral = 7; //会议积分
int64 meettotalintegral = 8; //会议总积分
int64 addvipday = 9; //本次发放VIP天数
int64 addtradesecond = 10; //本次发放翻译秒数
int64 addmeetsecond = 11; //本次发放会议秒数
uint32 factoryid = 12; //奖励来源厂家id
uint32 productid = 13; //奖励来源产品id(公码上配置的分类标识)
}
//注销账号
message UserDelReq{
}
message UserDelResp{
}
//用户反馈
message UserFeedbackReq {
string message = 1;
}
message UserFeedbackResp {
}
//获取 app 的环境变量
message UserGetAppConfigReq{
}
message McpServer {
string servername = 1;
string url = 2;
MCPServerType type = 3; //@go_tags(`json:"type"`) 服务类型
string tools = 4; //@go_tags(`json:"tools"`) 工具列表
}
//获取 app 的环境变量
message UserGetAppConfigResp{
map<string,string> env = 1; //@go_tags(`json:"env"`) 時間
repeated DBAgent agents = 2; //@go_tags(`json:"agents"`) 時間
map<string,McpServer> mcps = 3; //@go_tags(`json:"mcps"`) 時間
repeated DBProduct products = 4; //@go_tags(`json:"products"`) 時間
}
//获取设备信息 校验升级
message UserGetProductReq {
int32 id = 1;
}
message UserGetProductResp {
DBProduct product = 1;
}
//获取产品对应的固件版本列表
message UserGetProductVersionsReq {
uint32 pid = 1; //@go_tags(`json:"pid"`) 产品id
}
message UserGetProductVersionsResp {
repeated DBProductVersion versions = 1; //@go_tags(`json:"versions"`) 固件版本列表
}
//举报AI内容
message UserReportAIContentReq{
string reporttype = 1;
string describe =2;
repeated string message = 3;
string reportContent = 4;
}
message UserReportAIContentResp{
}
//获取设备信息 校验升级
message UserGetChannelAppsReq {
}
message UserGetChannelAppsResp {
repeated DBChannelApp apps = 1;
}
//获取渠道包信息 + 校验升级
message UserGetChannelAppReq {
int32 channel = 1;
string version = 2; //客户端当前版本号(如 1.4.2);传了才会返回下面的升级判定,留空则判定字段恒为 false
}
message UserGetChannelAppResp {
DBChannelApp app = 1;
bool needupdate = 2; //有更新可用:线上版本高于客户端版本
bool forceupdate = 3; //必须更新:渠道开了强更且客户端版本低于最低支持版本,为 true 时客户端应阻断使用
bool reviewing = 4; //客户端当前版本正处于渠道审核期,可据此隐藏未过审功能
}
//用户上报行为
message UserPushActionReq{
map<string,int32> actions = 1; //行为
}
message UserPushActionResp{
}
//获取设备信息 校验升级
message UserGetDevicesReq {
}
message UserGetDevicesResp {
repeated DBUserDivice devices = 1;
}
//上传资源使用
message UserUsagesReq {
UsageType usagetype = 1; //使用类型
map<string,int64> usages = 2; //用量统计数据
}
message UserUsagesResp {
map<int32,int64> usages = 1; //资源剩余使用量
}
//获取唤醒词列表
message UserGetWakeupVoicesReq{
}
message UserGetWakeupVoicesResp{
repeated DBWakeupVoice voices = 1;
}
//获取统计数据
message UserGetStatisticsReq{
}
message UserGetStatisticsResp{
DBUserStatistics statistics = 1;
}
//获取应用设置
message UserGetAppSettingReq{
}
message UserGetAppSettingResp{
DBUuserAppSetting setting = 1;
}
//更新应用设置
message UserUpdateAppSettingReq{
DBUuserAppSetting setting = 1;
}
message UserUpdateAppSettingResp{
}
//更新设备设置
message UserUpdateDeviceSettingReq{
uint64 id = 1;
string lxsetting = 2;
}
message UserUpdateDeviceSettingResp{
uint64 id = 1;
string lxsetting = 2;
}