275 lines
7.0 KiB
Protocol Buffer
275 lines
7.0 KiB
Protocol Buffer
syntax = "proto3";
|
||
|
||
package msg;
|
||
option go_package = "/msg;msg";
|
||
|
||
|
||
message Empty{}
|
||
|
||
message BaseRes{
|
||
bool isSuccess = 1;
|
||
string Msg = 2;
|
||
}
|
||
|
||
|
||
message MsgCenterResp{
|
||
oneof Resp{
|
||
SmsSendRes smsSendRes = 1;
|
||
HsSmsSendRes HsSmsSendRes = 2;
|
||
BaseRes baseRes = 3;
|
||
}
|
||
}
|
||
|
||
|
||
message OauthReq {
|
||
string clientKey = 1;
|
||
string clientSecret = 2;
|
||
}
|
||
|
||
message OauthResp {
|
||
string accessToken = 2;
|
||
int64 AccessExpire = 3;
|
||
}
|
||
|
||
|
||
message CenterSendReq{
|
||
string severType = 1;
|
||
string msgType = 2;
|
||
BaseReq base = 3;
|
||
string config = 4;
|
||
}
|
||
|
||
message BaseReq{
|
||
string serverIndex = 1;
|
||
string tempIndex = 2;
|
||
}
|
||
|
||
message SmsSendReq{
|
||
BaseReq base = 1;
|
||
string param = 2;
|
||
string tels = 3;
|
||
}
|
||
|
||
|
||
message SmsSendRes{
|
||
repeated SmsSendResItem sendList = 1;
|
||
message SmsSendResItem{
|
||
string tel = 1;
|
||
uint32 isSuccess = 2;
|
||
}
|
||
}
|
||
|
||
message DingdingOASendReq {
|
||
BaseReq base = 1;
|
||
string originatorUserId = 2; //审批实例发起人的userId
|
||
FormComponentValuesView formComponentValues = 3;
|
||
message FormComponentValuesView {
|
||
string id = 1;
|
||
string bizAlias = 2;
|
||
string name = 3;
|
||
string value = 4;
|
||
}
|
||
|
||
}
|
||
|
||
|
||
|
||
message DingTalkBlackBoardSendReq {
|
||
BaseReq base = 1;
|
||
BlackboardReceiverView blackboardReceiver = 3;
|
||
message BlackboardReceiverView {
|
||
repeated int32 deptidList = 1;
|
||
repeated string useridList = 2;
|
||
}
|
||
string title = 4;
|
||
string content = 5;
|
||
}
|
||
|
||
|
||
message wxBizSendReq {
|
||
BaseReq base = 1;
|
||
string page = 2;//跳转页面
|
||
string touser = 3; //用户open_id
|
||
string data = 4; //模板内容,格式形如 { "key1": { "value": any }, "key2": { "value": any } }的object
|
||
string miniprogram = 5; //跳转小程序时填写,格式如{ "appid": ,"pagepath": { "value": any } }
|
||
}
|
||
|
||
message callInfoReq {
|
||
BaseReq base = 1;
|
||
string calledNumber = 3; //接收语音通知的被叫号码
|
||
int32 playTimes = 4; //播放次数1->3
|
||
int32 volume = 5; //音量1->100
|
||
int32 speed = 6; //语速,-500->500
|
||
string outId = 8; //预留给调用方的 ID,最终会通过回执消息将此 ID 带回给调用方。
|
||
}
|
||
|
||
message callCaptchaReq {
|
||
BaseReq base = 1;
|
||
string calledNumber = 3; //接收语音通知的被叫号码
|
||
string ttsParam = 4; //{"AckNum":"123456"}
|
||
int32 playTimes = 5; //播放次数1->3
|
||
int32 volume = 6; //音量1->100
|
||
int32 speed = 7; //语速,-500->500
|
||
string outId = 8; //预留给调用方的 ID,最终会通过回执消息将此 ID 带回给调用方。
|
||
}
|
||
|
||
// DingTalk OA 审批创建
|
||
message DingOACreateReq {
|
||
BaseReq base = 1;
|
||
string outTradeNo = 2; //下游流水号
|
||
string originatorUserId = 3; //审批实例发起人的userId
|
||
|
||
repeated FormComponentValuesView formComponentValues = 5; //审批表单的参数
|
||
message FormComponentValuesView {
|
||
string name = 1; //表单参数的名称
|
||
string value = 2; //表单参数的值
|
||
string ComponentType = 3; //表单参数的类型
|
||
string extValue = 5; //表单扩展值
|
||
string Id = 4; //控件的id
|
||
}
|
||
Finance finance = 6; //财务组件
|
||
message Finance {
|
||
string checkUserId = 1; //审核人
|
||
int64 sync =2;//是否是异步,如果为异步,付款申请和业务申请是同时进行
|
||
string amount = 3; //金额
|
||
string systemName = 13; //业务系统名称
|
||
string goodsInfo = 4; //商品信息
|
||
string paymentAccount=5; //付款方账户
|
||
string taxAmount=6 ;//税率
|
||
string callbackUrl=7; //回调地址
|
||
string orderNo=8; //订单号
|
||
string remark=9; //备注
|
||
string purpose=12;//用途
|
||
string subjectName=11; //户名
|
||
BankInfo bankInfo=10;
|
||
message BankInfo {
|
||
string resellerName = 1; //供应商名称
|
||
string bankName = 2; //银行名称
|
||
string accountBankName = 3; //开户行名称
|
||
string subjectName = 4; //户名
|
||
string bankAccount = 5; //银行卡号
|
||
}
|
||
}
|
||
}
|
||
|
||
message DingOACreateResp {
|
||
bool isSuccess = 1;
|
||
string Msg = 2;
|
||
string instanceId = 3; // 审批实例的id
|
||
}
|
||
|
||
// DingTalk OA 审批实例修改
|
||
message DingOAUpdateReq {
|
||
BaseReq base = 1;
|
||
string outTradeNo = 2; //下游流水号
|
||
repeated FormComponentValuesView formComponentValues = 5; //审批表单的参数
|
||
message FormComponentValuesView {
|
||
string name = 1; //表单参数的名称
|
||
string value = 2; //表单参数的值
|
||
string ComponentType = 3; //表单参数的类型
|
||
string extValue = 5; //表单扩展值
|
||
string Id = 4; //控件的id
|
||
}
|
||
}
|
||
|
||
message DingOAUpdateResp {
|
||
bool isSuccess = 1;
|
||
string Msg = 2;
|
||
string instanceId = 3; // 审批实例的id
|
||
}
|
||
|
||
// DingTalk OA 审批实例修改
|
||
message DingOACommentReq {
|
||
BaseReq base = 1;
|
||
string outTradeNo = 2; //下游流水号
|
||
string text = 3; //评论的内容
|
||
string commentUserId = 4; //评论的内容
|
||
File file = 5; //文件
|
||
message File{ //文件名
|
||
repeated string photos = 1; //图片URL地址
|
||
repeated Attachments attachments = 2; //图片URL地址
|
||
message Attachments{ //文件名
|
||
string spaceId =1; //钉盘空间ID。
|
||
string fileSize =2; //文件大小。
|
||
string fileId =3; //文件ID。
|
||
string fileName =4; //文件名称。
|
||
string fileType =5; //文件类型。
|
||
}
|
||
|
||
}
|
||
|
||
}
|
||
|
||
message DingOACommentResp {
|
||
bool isSuccess = 1;
|
||
string Msg = 2;
|
||
string instanceId = 3; // 审批实例的id
|
||
}
|
||
|
||
|
||
|
||
|
||
message DingOAGetReq {
|
||
BaseReq base = 1;
|
||
string processInstanceId = 2; //审批实例的id
|
||
string outTradeNo = 3; //下游流水号
|
||
}
|
||
|
||
message DingOAGetResp {
|
||
string OutTradeNo = 1; //下游流水号
|
||
string processInstanceId = 2; //审批实例的id
|
||
string Title = 3; //审批实例的标题
|
||
int64 Result = 4; //审批结果 0 进行中 1:同意 2:拒绝
|
||
string Type = 5; //审批任务状态变更类型
|
||
string Remarks = 6; //审批备注
|
||
string CreateTime = 7; //审批任务创建时间
|
||
string UpdateTime = 8; //审批任务更新时间
|
||
}
|
||
|
||
message PaymentCallbackData {
|
||
string sign=1;
|
||
string instanceId=2;
|
||
string corpId=3;
|
||
string failReason =4;
|
||
string paymentTime=5; //付款时间
|
||
string userId=6;
|
||
string paymentStatus=7;
|
||
|
||
}
|
||
|
||
message PaymentCallbackRes {
|
||
bool isSuccess=1;
|
||
}
|
||
|
||
|
||
message HsSmsSendReq{
|
||
BaseReq base = 1;
|
||
string param = 2;
|
||
string tels = 3;
|
||
}
|
||
|
||
|
||
message HsSmsSendRes{
|
||
repeated SmsSendResItem sendList = 1;
|
||
message SmsSendResItem{
|
||
string tel = 1;
|
||
uint32 isSuccess = 2;
|
||
}
|
||
}
|
||
|
||
service Msg {
|
||
rpc oauth(OauthReq) returns(OauthResp);
|
||
rpc centerSend(CenterSendReq) returns(MsgCenterResp);
|
||
rpc smsSend(SmsSendReq) returns(SmsSendRes);
|
||
rpc dingTalkBlackBoardSend(DingTalkBlackBoardSendReq) returns(BaseRes);
|
||
rpc wxBizSend(wxBizSendReq) returns(BaseRes);
|
||
rpc callInfo(callInfoReq) returns(BaseRes);
|
||
rpc callCaptcha(callCaptchaReq) returns(BaseRes);
|
||
rpc dingOACreate(DingOACreateReq) returns(DingOACreateResp);
|
||
rpc dingOAUpdate(DingOAUpdateReq) returns(DingOAUpdateResp);
|
||
rpc dingOAComment(DingOACommentReq) returns(DingOACommentResp);
|
||
rpc dingOAGet(DingOAGetReq) returns(DingOAGetResp);
|
||
rpc FinanceNotify(PaymentCallbackData) returns(PaymentCallbackRes);
|
||
rpc hsSmsSend(HsSmsSendReq) returns(HsSmsSendRes);
|
||
}
|