添加新的notify接口

This commit is contained in:
huangsimin@fusen.cn 2024-01-09 18:26:05 +08:00
parent 2ff371bbb9
commit 5093ca325c
2 changed files with 112 additions and 27 deletions

View File

@ -37,3 +37,4 @@ message Meta {
int64 current_page=3; int64 current_page=3;
int64 per_page=4; int64 per_page=4;
} }

View File

@ -8,68 +8,152 @@ import "google/api/annotations.proto";
import "service/basic.proto"; import "service/basic.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/any.proto"; import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/api/httpbody.proto"; import "google/api/httpbody.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
// //
service notify { service notify {
//
//
rpc Ping(basic.Request) returns (basic.Response) {}
//
rpc EmailSend(EmailSendReq) returns (EmailSendRes) {} rpc EmailSend(EmailSendReq) returns (EmailSendRes) {}
// //
rpc EmailRegisterConfirm(stream EmailStreamReq) returns (stream EmailStreamResp) {} rpc EmailRegisterConfirm( EmailRegisterReq) returns ( EmailRegisterResp) {}
}
//
rpc EmailResetPasswordHtml( EmailResetHtmlReq) returns (EmailResetHtmlResp) {}
//
rpc EmailResetConfirm( EmailResetConfirmReq) returns (EmailResetConfirmResp) {}
//
rpc OrderPaymentDetails( OrderPaymentDetailsReq) returns (OrderPaymentDetailsResp) {}
//
rpc OrderStatusTransition( OrderStatusTransitionReq) returns (OrderStatusTransitionResp) {}
}
message Operator { message Operator {
// //
enum Type { enum Type {
IMMEDIATE_RESEND = 0; // immediate_resend = 0; // (,)
NORMAL_SEND = 1; // normal_send = 1; // ()
SCHEDULED_SEND = 2; // cancel_send = 2; // ()
CANCEL_SEND = 3; //
} }
message Retry { message Retry {
int64 retry_count = 1; // int64 retry_count = 1; //
google.protobuf.Timestamp interval_time = 2; // int64 interval_time = 2; // sec
} }
Type type = 1; // Type type = 1; //
optional Retry retry = 2; // optional Retry retry = 2; //
optional google.protobuf.Timestamp start_time = 3; // optional google.protobuf.Timestamp start_time = 3; //
optional google.protobuf.Timestamp last_send_time = 4; //
} }
message EmailNotifyBasic {
optional string notify_id = 1; // , 256
string sender = 2; //
string target_email = 3; // email
}
// type email // type email
message EmailSendReq { message EmailSendReq {
EmailNotifyBasic basic_email = 1;
string notify_id = 1; // , 256 string title = 2; //
string sender = 2; // string content = 3; //
string title = 3; // Operator operator = 4; //
string content = 4; //
string target_email = 5; // email
Operator operator = 6; //
// string company_name = 5; // fs公司名 // string company_name = 5; // fs公司名
// string confirmation_link = 6; // fs确认连接 // string confirmation_link = 6; // fs确认连接
// string sender_name = 7; // // string sender_name = 7; //
optional google.protobuf.Struct metadata = 7; // optional google.protobuf.Struct metadata = 5; //
} }
message EmailStreamReq { //
string file_name = 1; enum NotifyType {
string file_content = 2; email = 0; // email
feishu = 1; //
wechat = 2; //
} }
message EmailStreamResp {
string code = 1; //
string ok = 2; enum EmailStatus {
ok = 0; //
running = 1; //
error = 2; //
cancel = 3; //
finish = 4; //
} }
message EmailSendRes { message EmailSendRes {
string file_name = 1; EmailStatus status = 1;
string msg = 2;
}
message EmailRegisterReq {
EmailNotifyBasic basic_email = 1;
string confirmation_link = 2;
}
message EmailRegisterResp {
int64 code = 1; // 0
string notify_id = 2; // id
}
message EmailResetHtmlReq {
EmailNotifyBasic basic_email = 1;
string confirmation_link = 4;
}
message EmailResetHtmlResp {
int64 code = 1; // 0
string notify_id = 2; // id
}
message EmailResetConfirmReq {
string reset_password_link = 1;
string reset_token = 2;
}
message EmailResetConfirmResp {
int64 code = 1; // 0
bytes content = 2; //
}
message OrderPaymentDetailsReq {
EmailNotifyBasic basic_email = 1;
string payment_details_link = 2;
}
message OrderPaymentDetailsResp {
int64 code = 1; // 0
string notify_id = 2; // id
}
message OrderStatusTransitionReq {
EmailNotifyBasic basic_email = 1;
string last_status = 2; //
string current_status = 3; //
string check_status_link = 4; //
}
message OrderStatusTransitionResp {
int64 code = 1; // 0
string notify_id = 2; // id
} }