Subversion Repositories SmartDukaan

Rev

Rev 763 | Rev 783 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 763 Rev 770
Line 176... Line 176...
176
	7:i64 userId,			//user id to which it belongs
176
	7:i64 userId,			//user id to which it belongs
177
	8:i64 addressId,	    //address on which this will be shipped			
177
	8:i64 addressId,	    //address on which this will be shipped			
178
}
178
}
179
 
179
 
180
enum WidgetType{
180
enum WidgetType{
181
	SIMILAR_ITEMS,
-
 
182
	RECOMMENDED_ITEMS,
-
 
183
	MY_RESEARCH,
181
	MY_RESEARCH,
-
 
182
	BROWSE_HISTORY
-
 
183
}
-
 
184
 
-
 
185
/** Not used right now, will decide later
-
 
186
enum WidgetType{
184
	ACCESSORIES,
187
	ACCESSORIES,
185
	RATINGS,
188
	RATINGS,
186
	BROWSE_HISTORY,
189
	SIMILAR_ITEMS,
-
 
190
	RECOMMENDED_ITEMS,
187
	DEAL_PROMOTIONS
191
	DEAL_PROMOTIONS,
-
 
192
	
-
 
193
	MY_RESEARCH,
-
 
194
	BROWSE_HISTORY
188
}
195
}
189
 
196
 
190
enum RatingType{
197
enum RatingType{
191
	SHOP2020,
198
	SHOP2020,
192
	AMAZON,
199
	AMAZON,
Line 197... Line 204...
197
struct RatingsWidget{
204
struct RatingsWidget{
198
	1:i64 catalog_item_id,
205
	1:i64 catalog_item_id,
199
	2:map<RatingType,double> ratings,
206
	2:map<RatingType,double> ratings,
200
	3:i64 user_id
207
	3:i64 user_id
201
}
208
}
202
 
209
*/
203
struct WidgetItem{
210
struct WidgetItem{
204
	1:i64 id,
211
	1:i64 id,
205
	2:i64 item_id,
212
	2:i64 item_id,
206
	3:string snippet,
-
 
207
	4:bool enabled,
213
	3:bool enabled,
208
	5:i64 timestamp
214
	4:i64 timestamp
209
}
215
}
210
 
216
 
211
struct Widget{
217
struct Widget{
212
	1:i64 id,
218
	1:i64 id,
213
	2:WidgetType type,
219
	2:WidgetType type,
214
	3:i64 customer_id, //will be valid for MY_RESEARCH
220
	3:i64 user_id,
215
	4:list<WidgetItem> items,
221
	4:list<WidgetItem> items,
216
	5:bool enabled,
222
	5:bool enabled,
217
	6:string name,	
223
	6:string name
218
	7:bool session_id  //will be valid for BROWSE_HISTORY
-
 
219
}
224
}
220
 
225
 
221
exception WidgetException{
226
exception WidgetException{
222
	1:i64 id,
227
	1:i64 id,
223
	2:string message
228
	2:string message
Line 288... Line 293...
288
	bool checkOut(1:i64 cartId) throws (1:ShoppingCartException scex),
293
	bool checkOut(1:i64 cartId) throws (1:ShoppingCartException scex),
289
	
294
	
290
	/**
295
	/**
291
	 The second parameter is a map of item ids and their quantities which have been successfully processed.
296
	 The second parameter is a map of item ids and their quantities which have been successfully processed.
292
	 This methods removes the specified quantiry of the specified item from the cart.
297
	 This methods removes the specified quantiry of the specified item from the cart.
293
	*/
298
	 */
294
	bool resetCart(1:i64 cartId, 2:map<i64, double> items) throws (1:ShoppingCartException scex),
299
	bool resetCart(1:i64 cartId, 2:map<i64, double> items) throws (1:ShoppingCartException scex),
-
 
300
 
-
 
301
	/**
-
 
302
	* Widgets 
-
 
303
	*/
-
 
304
	Widget getMyResearch(1:i64 userId) throws (1:WidgetException scx),
-
 
305
	bool updateMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
-
 
306
	void deleteItemFromMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
-
 
307
		
-
 
308
	void updateBrowseHistory(1:i64 userId, 2:i64 itemId),
-
 
309
	Widget getBrowseHistory(1:i64 userId) throws (1:WidgetException scx),
-
 
310
	void mergeBrowseHistory(1:i64 fromUserId, 2:i64 toUserId)
295
	
311
	
-
 
312
	/** Masking right now. May be used later.	
296
	void addWidget(1:Widget widget) throws (1:WidgetException scx),
313
	void addWidget(1:Widget widget) throws (1:WidgetException scx),
297
	void addItemToWidget(1:i64 widget_id, 2:list<i64> items) throws (1:WidgetException scx),
314
	void addItemToWidget(1:i64 widget_id, 2:list<i64> items) throws (1:WidgetException scx),
298
	void deleteItemFromWidget(1:i64 widget_id, 2:i64 item_id) throws (1:WidgetException scx),
315
	void deleteItemFromWidget(1:i64 widget_id, 2:i64 item_id) throws (1:WidgetException scx),
299
	void updateWidget(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
316
	void updateWidget(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
300
	void updateWidgetItem(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
317
	void updateWidgetItem(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
301
	Widget getWidget(1:WidgetType type, 2:i64 userId, 3:bool onlyEnabled) throws (1:WidgetException scx),
318
	Widget getWidget(1:WidgetType type, 2:i64 userId, 3:bool onlyEnabled) throws (1:WidgetException scx),
302
	
-
 
303
	Widget getMyResearch(1:i64 user_id) throws (1:WidgetException scx),
-
 
304
	bool updateMyResearch(1:i64 user_id, 2:i64 item_id) throws (1:WidgetException scx),
-
 
305
	void deleteItemFromMyResearch(1:i64 user_id, 2:i64 item_id) throws (1:WidgetException scx),
-
 
306
		
319
	*/
307
	void updateRatings(1:i64 item_id, 2:RatingType type, 3:double rating, 4:i64 user_id),
-
 
308
	RatingsWidget getRatings(1:i64 item_id, 2:i64 user_id)  throws (1:WidgetException scx),
-
 
309
	
-
 
310
	void updateBrowseHistory(1:i64 user_id, 2:i64 item_id, 3:bool isSessionId),
-
 
311
	Widget getBrowseHistory(1:i64 userId, 2:bool isSessionId) throws (1:WidgetException scx)
-
 
312
}
320
}
313
 
321