Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
116 ashish 1
namespace java in.shop2020.utils
2
namespace py shop2020.thriftpy.utils
3
 
4
/**
5
Helper service
6
created by @ashish
7
**/
8
 
9
struct ItemLogistics{
10
	1:i64 warehouseId,
11
	2:i64 availability,
12
	3:i64 deliveryBy
13
}
14
 
121 ashish 15
struct Mail{
16
	1:list<string> to,
17
	2:string subject,
18
	3:string data,
351 ashish 19
	4:string sender,
20
	5:list<string> attachments,
21
	6:string password
121 ashish 22
}
23
 
24
struct TextMessage{
25
	1:string number,
26
	2:string message,
27
	3:i64 dispatchTime,
28
	4:i64 deliveryTime
29
}
30
 
116 ashish 31
exception HelperServiceException{
32
	1:i64 id,
33
	2:string message
34
}
35
 
121 ashish 36
struct Message{
37
	1:i64 id,
38
	2:string message
39
}
40
 
302 ashish 41
service HelperService{
116 ashish 42
 
43
	//This call would return a map having the following 
121 ashish 44
	list<ItemLogistics> getLogisticsEstimation(1:i64 itemId,2:map<string,string> location) throws (1:HelperServiceException se),
45
	void sendMail(1:Mail mail) throws (1:HelperServiceException se),
46
	void sendText(1:TextMessage message) throws (1:HelperServiceException se),
47
 
351 ashish 48
	void addMessage(1:Message message) throws (1:HelperServiceException se),
121 ashish 49
	void updateMessage(1:i64 id, 2:string message) throws (1:HelperServiceException se),
351 ashish 50
	Message getMessage(1:i64 id) throws (1:HelperServiceException se),
51
	Message getSubstitutedMessage(1:i64 id, 2:map<string,string> params) throws (1:HelperServiceException se)
116 ashish 52
}