javascript/proto/notify/sms.proto

40 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
package notify;
option go_package="./notify";
// sms method
service Sms {
rpc Send(SmsSendRequest) returns (SmsSendResponse);
rpc Verify(SmsVerifyRequest) returns (PassResponse);
}
// sms module
message SmsSendRequest {
string sign_name = 1; // 必传项
string template_code = 2; // 必传项
string phone = 3; // 必传项
map<string,string> paramters=5;
// 验证码相关
bool generate_code =6; //是否生成验证码
int64 expire_interval = 7;//验证码缓存时间,单位:分钟,仅generate_code为true时会缓存,默认5分钟
int64 code_width = 8; //验证码长度,默认 4
string code_key = 9; //template_code 模板中验证码的标识,默认code
bool has_black_list_filter = 10; // 是否黑单过滤,默认不过滤
bool wihout_limit = 11;//忽略每天短信条数上线限制,默认不忽略
}
message SmsSendResponse {
// string request_id = 1;
string biz_id = 2;
}
message SmsVerifyRequest {
// string request_id = 1;
string phone = 2;
string code = 3;
}
message PassResponse{
bool pass =1;
}