Subversion Repositories SmartDukaan

Rev

Rev 302 | Rev 472 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

namespace java in.shop2020.utils
namespace py shop2020.thriftpy.utils

/**
Helper service
created by @ashish
**/

struct ItemLogistics{
        1:i64 warehouseId,
        2:i64 availability,
        3:i64 deliveryBy
}

struct Mail{
        1:list<string> to,
        2:string subject,
        3:string data,
        4:string sender,
        5:list<string> attachments,
        6:string password
}

struct TextMessage{
        1:string number,
        2:string message,
        3:i64 dispatchTime,
        4:i64 deliveryTime
}

exception HelperServiceException{
        1:i64 id,
        2:string message
}

struct Message{
        1:i64 id,
        2:string message
}

service HelperService{

        //This call would return a map having the following 
        list<ItemLogistics> getLogisticsEstimation(1:i64 itemId,2:map<string,string> location) throws (1:HelperServiceException se),
        void sendMail(1:Mail mail) throws (1:HelperServiceException se),
        void sendText(1:TextMessage message) throws (1:HelperServiceException se),
        
        void addMessage(1:Message message) throws (1:HelperServiceException se),
        void updateMessage(1:i64 id, 2:string message) throws (1:HelperServiceException se),
        Message getMessage(1:i64 id) throws (1:HelperServiceException se),
        Message getSubstitutedMessage(1:i64 id, 2:map<string,string> params) throws (1:HelperServiceException se)
}