Subversion Repositories SmartDukaan

Rev

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

Rev 2814 Rev 2981
Line 265... Line 265...
265
enum WidgetType{
265
enum WidgetType{
266
	MY_RESEARCH,
266
	MY_RESEARCH,
267
	BROWSE_HISTORY
267
	BROWSE_HISTORY
268
}
268
}
269
 
269
 
270
/** Not used right now, will decide later
-
 
271
enum WidgetType{
-
 
272
	ACCESSORIES,
-
 
273
	RATINGS,
-
 
274
	SIMILAR_ITEMS,
-
 
275
	RECOMMENDED_ITEMS,
-
 
276
	DEAL_PROMOTIONS,
-
 
277
	
-
 
278
	MY_RESEARCH,
-
 
279
	BROWSE_HISTORY
-
 
280
}
-
 
281
 
-
 
282
enum RatingType{
-
 
283
	SHOP2020,
-
 
284
	AMAZON,
-
 
285
	USER_ALL,
-
 
286
	USER_CURRENT
-
 
287
}
-
 
288
 
-
 
289
struct RatingsWidget{
-
 
290
	1:i64 catalog_item_id,
-
 
291
	2:map<RatingType,double> ratings,
-
 
292
	3:i64 user_id
-
 
293
}
-
 
294
*/
-
 
295
struct WidgetItem{
270
struct UserWidgetItem{
296
	1:i64 id,
271
	1:i64 userId,
297
	2:i64 item_id,
272
	2:i64 widgetId,
298
	3:bool enabled,
-
 
299
	4:i64 timestamp
-
 
300
}
-
 
301
 
-
 
302
struct Widget{
-
 
303
	1:i64 id,
273
	3:i64 itemId,
304
	2:WidgetType type,
-
 
305
	3:i64 user_id,
274
	4:i64 addedOn
306
	4:list<WidgetItem> items,
-
 
307
	5:bool enabled,
-
 
308
	6:string name
-
 
309
}
275
}
310
 
276
 
311
exception WidgetException{
277
exception WidgetException{
312
	1:i64 id,
278
	1:i64 id,
313
	2:string message
279
	2:string message
Line 458... Line 424...
458
	 The second parameter is a map of item ids and their quantities which have been successfully processed.
424
	 The second parameter is a map of item ids and their quantities which have been successfully processed.
459
	 This methods removes the specified quantiry of the specified item from the cart.
425
	 This methods removes the specified quantiry of the specified item from the cart.
460
	 */
426
	 */
461
	bool resetCart(1:i64 cartId, 2:map<i64, double> items) throws (1:ShoppingCartException scex),
427
	bool resetCart(1:i64 cartId, 2:map<i64, double> items) throws (1:ShoppingCartException scex),
462
 
428
 
463
	/**
-
 
464
	* Widgets 
-
 
465
	*/
-
 
466
	Widget getMyResearch(1:i64 userId) throws (1:WidgetException scx),
-
 
467
	bool updateMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
-
 
468
	void deleteItemFromMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
-
 
469
		
-
 
470
	void updateBrowseHistory(1:i64 userId, 2:i64 itemId),
-
 
471
	Widget getBrowseHistory(1:i64 userId) throws (1:WidgetException scx),
-
 
472
	void mergeBrowseHistory(1:i64 fromUserId, 2:i64 toUserId),
-
 
473
	
429
	
474
	/**
430
	/**
475
	Returns number of registered users.
431
	Returns number of registered users.
476
	If userType = null, then it returns count of all users, including anonymous
432
	If userType = null, then it returns count of all users, including anonymous
477
	If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
433
	If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
Line 485... Line 441...
485
	If userType is null, then returns all the users, irrespective of anonymous flag
441
	If userType is null, then returns all the users, irrespective of anonymous flag
486
	
442
	
487
	*/
443
	*/
488
	list<User> getAllUsers(1:UserType userType, 2:i64 startDate, 3:i64 endDate),
444
	list<User> getAllUsers(1:UserType userType, 2:i64 startDate, 3:i64 endDate),
489
	
445
	
490
	/** Masking right now. May be used later.	
-
 
491
	void addWidget(1:Widget widget) throws (1:WidgetException scx),
-
 
492
	void addItemToWidget(1:i64 widget_id, 2:list<i64> items) throws (1:WidgetException scx),
-
 
493
	void deleteItemFromWidget(1:i64 widget_id, 2:i64 item_id) throws (1:WidgetException scx),
-
 
494
	void updateWidget(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
-
 
495
	void updateWidgetItem(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
-
 
496
	Widget getWidget(1:WidgetType type, 2:i64 userId, 3:bool onlyEnabled) throws (1:WidgetException scx),
-
 
497
	*/
-
 
498
	
446
	
499
	void putUserNote(1:i64 user_id, 2:i64 entity_id, 3:string slide, 4:string note),
447
	void putUserNote(1:i64 user_id, 2:i64 entity_id, 3:string slide, 4:string note),
500
	list<UserNote> getUserNotes(1:i64 user_id, 2:i64 entity_id)
448
	list<UserNote> getUserNotes(1:i64 user_id, 2:i64 entity_id),
-
 
449
	
-
 
450
 
-
 
451
	/**
-
 
452
	Returns list of item ids in myresearch for the user
-
 
453
	*/
-
 
454
	list<i64> getMyResearchItems(1:i64 userId) throws (1:WidgetException scx),
-
 
455
	/**
-
 
456
	add item to my research for a user
-
 
457
	*/
-
 
458
	bool updateMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
-
 
459
	/**
-
 
460
	delete item from my research for a user
-
 
461
	*/
-
 
462
	void deleteItemFromMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
-
 
463
	/**
-
 
464
	Returns list of item ids in browse history for the user. It will return maximum 10 items.
-
 
465
	*/
-
 
466
	list<i64> getBrowseHistoryItems(1:i64 userId) throws (1:WidgetException scx),
-
 
467
	/**
-
 
468
	add item to browse history for a user
-
 
469
	*/
-
 
470
	void updateBrowseHistory(1:i64 userId, 2:i64 itemId)
-
 
471
		
501
}
472
}
502
473