From 1a75cdbc917c160f11ce0771dde8c3f997dcc241 Mon Sep 17 00:00:00 2001 From: Inal Arsanukaev Date: Wed, 16 Nov 2016 18:20:37 +0300 Subject: [PATCH] DUD-5: API for dudoser (#86) * DUD-5: API for dudoser * hotfix * hotfixes-2 * hotfixes-3 * hotfixes-4 * hotfixes-5 * hotfixes-6 * hotfixes-6 * hotfixes-7 * Fixed after discussion * hotfix-8 * hotfix-9 * hotfix-9 * Fixed after comments * Fixed after comments. v2 * Fixed spaces * Fixed after comments-14 * Fixed after comments-15 --- proto/message_sender.thrift | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 proto/message_sender.thrift diff --git a/proto/message_sender.thrift b/proto/message_sender.thrift new file mode 100644 index 0000000..419b33c --- /dev/null +++ b/proto/message_sender.thrift @@ -0,0 +1,44 @@ +include "base.thrift" +include "domain.thrift" + +namespace java com.rbkmoney.damsel.message_sender +namespace erlang message_sender + +struct MessageAttachment{ + 1: required string name + 2: optional string mime_type + 3: required binary data +} + +typedef list MessageAttachments + +/** +* Здесь могут быть и другие виды сообщений, например, MessageSMS, MessagePush +**/ +union Message{ + 1: MessageMail message_mail +} + +/** +* +**/ +struct MailBody { + // Content-Type письма (вместе с кодировкой). Например, "text/plain; charset=iso-8859-1" + 1: optional string content_type + 2: required string text +} + +struct MessageMail { + 1: required MailBody mail_body + 2: optional string subject + 3: required string from_email + 4: required list to_emails + 5: optional MessageAttachments attachments +} + +service MessageSender { + /** + * Отправка сообщения. + **/ + void send(1: Message message) throws (1: base.InvalidRequest ex1) +} \ No newline at end of file