Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
48 ashish 1
namespace java in.shop2020.model.v1.user
95 ashish 2
namespace py shop2020.thriftpy.model.v1.user
48 ashish 3
 
3374 rajveer 4
include "GenericService.thrift"
5
 
48 ashish 6
/**
7
Exceptions
8
*/
9
exception AuthenticationException{
10
	1:string message,
11
	2:i32 errorCode
12
}
13
 
14
exception UserContextException{
15
	1:i32 errorCode,
16
	2:string message
17
}
18
 
552 chandransh 19
exception ShoppingCartException{
20
	1:i64 id,
21
	2:string message
22
}
23
 
1116 varun.gupt 24
exception UserCommunicationException{
25
	1:i64 id,
26
	2:string message
27
}
28
 
1995 vikas 29
exception UserAffiliateException{
1848 vikas 30
    1:i64 id,
31
    2:string message
32
}
33
 
1599 ankur.sing 34
enum UserType{
35
	USER = 0,
36
	ANONYMOUS = 1 
37
}
38
 
6367 amit.gupta 39
enum PromotionType{
40
	DISCOUNT_COUPON = 0,
41
	GIFT_VOUCHER = 1 
42
}
43
 
121 ashish 44
enum AddressType{
130 ashish 45
	WORK = 0,
46
	HOME = 1
48 ashish 47
}
48
 
8707 manish.sha 49
/** Added by Manish Sharma
50
*/
51
enum CouponCategory{
52
	CUSTOMER_SATISFACTION = 0,
53
	MARKETING = 1,
11653 amit.gupta 54
	REFUND = 2,
55
	CATEGORY = 3
8707 manish.sha 56
}
130 ashish 57
 
48 ashish 58
/**
1116 varun.gupt 59
Form types for Contact Us form
60
*/
61
enum UserCommunicationType{
62
	RETURN_FORM = 1,
63
	ORDER_CANCELLATION = 2,
64
	DELIVERY_PROBLEM = 3,
65
	PAYMENT_STATUS = 4,
66
	ORDER_STATUS = 5,
67
	PRODUCT_REQUEST = 6,
6176 amit.gupta 68
	RECHARGE_RELATED = 7,
11890 kshitij.so 69
	OTHER = 8,
70
	Bulk_Order_ENQUIRY = 21
6176 amit.gupta 71
 
1116 varun.gupt 72
}
73
 
74
/**
3379 vikas 75
Affiliate track log types for affiliate tracking
76
*/
77
enum TrackLogType{
78
    NEW_REGISTRATION = 1,
79
    PAYMENT_SUCCESS = 2
80
}
81
 
82
/**
121 ashish 83
Address
84
*/
85
struct Address{
552 chandransh 86
	1:i64 id,
87
	2:string line1,
88
	3:string line2,
89
	4:string landmark,
90
	5:string city,
91
	6:string state,
92
	7:string pin,
93
	8:string country,
48 ashish 94
	9:bool enabled,
123 ashish 95
	10:AddressType type,
414 ashish 96
	11:i64 addedOn,
97
	12:string name,
98
	13:string phone
48 ashish 99
}
100
 
552 chandransh 101
enum Sex{
102
	MALE,
103
	FEMALE,
104
	WONT_SAY
105
}
106
 
121 ashish 107
/**
552 chandransh 108
The user structure holding the basic information that identifies the user.
121 ashish 109
**/
552 chandransh 110
struct User{
111
	1:i64 userId,
112
	2:string email,
113
	3:string password,
114
	4:string name,
566 rajveer 115
	5:string dateOfBirth,
1116 varun.gupt 116
	6:Sex sex,
3853 mandeep.dh 117
	7:optional string mobileNumber,
5326 rajveer 118
	8:i64 lastLogin,
119
	9:i64 lastLogout,
120
	10:i64 activeSince,
121
	11:list<Address> addresses,
122
	12:i64 defaultAddressId,
123
	13:string communicationEmail,
124
	14:i64 activeCartId,
125
	15:string jsessionId,
126
	16:bool isAnonymous,
127
	17:string source,
128
	18:i64 sourceStartTime,
7825 amar.kumar 129
	19:double trustLevel,
130
	20:bool isFacebookUser,
131
	21:string facebookAccessToken,
8201 rajveer 132
	22:string facebookId,
133
	23:i64 sourceId
48 ashish 134
}
135
 
1116 varun.gupt 136
struct UserCommunication{
137
	1:i64 id,
138
	2:i64 userId,
139
	3:UserCommunicationType communicationType,
140
	4:i64 orderId,
141
	5:string airwaybillNo,
142
	6:string replyTo,
143
	7:string productName,
144
	8:string subject,
145
	9:string message,
1299 varun.gupt 146
	10:i64 communication_timestamp
1116 varun.gupt 147
}
148
 
1848 vikas 149
struct MasterAffiliate{
150
    1:i64 id,
151
    2:string name,
1861 vikas 152
    3:i64 addedOn
1848 vikas 153
}
154
 
155
struct Affiliate{
156
    1:i64 id,
157
    2:string name,
158
    3:string url,
1861 vikas 159
    4:i64 masterAffiliateId,
160
    5:i64 addedOn
1848 vikas 161
}
162
 
163
struct Tracker{
164
    1:i64 id,
1861 vikas 165
    2:i64 affiliateId,
1848 vikas 166
}
167
 
168
struct TrackLog{
169
    1:i64 id,
1861 vikas 170
    2:i64 addedOn,
1995 vikas 171
    3:i64 affiliateId,
1861 vikas 172
    4:i64 userId,
3379 vikas 173
    5:TrackLogType eventType,
1861 vikas 174
    6:string url,
175
    7:string data
1848 vikas 176
}
177
 
552 chandransh 178
//Various statuses for line items
179
enum LineStatus{
180
	LINE_ACTIVE,			//line is active
181
	LINE_DELETED,			//line is deleted
182
	LINE_EXPIRED,			//line is expired, on laspse of fixed amount of time
183
	LINE_COMMITED,			//line is committed, sent for processing.
184
	LINE_COMMIT_FAILED,		//line was committed, but commit failed due to some reason, possibly during cart validation.
185
	LINE_AUTO_DELETED,		//line was auto deleted internally due to some reason(item delisted, price changed etc).
186
}
187
 
188
//Various statuses for Cart
189
enum CartStatus{
190
	ACTIVE,					
191
	INACTIVE,
192
	EXPIRED,
193
	COMMITTED,
194
	COMMIT_FAILED
195
}
196
 
3554 varun.gupt 197
struct Discount{
198
	1:i64 cart_id,
199
    2:i64 item_id,
200
    3:double discount,
201
    4:double quantity
202
}
203
 
552 chandransh 204
struct Line{
646 chandransh 205
	1:i64 cartId,				//identifier
552 chandransh 206
	2:i64 itemId,			//item id added
207
	3:double quantity,		//quantity added 
208
	4:i64 createdOn,		//addition timestamp
209
	5:i64 updatedOn, 		//any updation in quantity or status
210
	6:LineStatus lineStatus,	//current status
1984 varun.gupt 211
	7:i32 estimate,			//delivery estimate in hours
212
	8:double actualPrice,
3554 varun.gupt 213
	9:double discountedPrice,
6903 anupam.sin 214
	10:list<Discount> discounts,
215
	11:i64 insurer,
9299 kshitij.so 216
	12:double insuranceAmount,
217
	13:i64 dataProtectionInsurer,
11653 amit.gupta 218
	14:double dataProtectionAmount,
219
	15:string dealText,
11738 amit.gupta 220
	16:i64 freebieId
552 chandransh 221
}
222
 
223
struct Cart{
224
	1:i64 id,				//identifier
225
	2:list<Line> lines,		//list of lines
226
	3:CartStatus status,	//current status
227
	4:i64 createdOn,		//creation timestamp
228
	5:i64 updatedOn,		//time of last update in cart (like addition/deletion/updation of cart items )
687 chandransh 229
	6:i64 checkedOutOn,		//commited timestamp
5326 rajveer 230
	7:i64 addressId,	    //address on which this will be shipped
231
	8:double totalPrice,
232
	9:double discountedPrice,
5553 rajveer 233
	10:string couponCode,
6736 amit.gupta 234
	11:i64 pickupStoreId,
235
	12:string message		//This is introduced to display custom message as and when required to the Website for user display.
552 chandransh 236
}
237
 
11592 amit.gupta 238
struct CartPlus {
239
	1:Cart cart,
240
	2:string 	pinCode,
241
	3:bool needInsuranceInfo,
242
	4:list<string> validateCartMessages
243
}
244
 
552 chandransh 245
enum WidgetType{
770 rajveer 246
	MY_RESEARCH,
247
	BROWSE_HISTORY
248
}
249
 
2981 rajveer 250
struct UserWidgetItem{
251
	1:i64 userId,
252
	2:i64 widgetId,
253
	3:i64 itemId,
254
	4:i64 addedOn
552 chandransh 255
}
256
 
257
exception WidgetException{
258
	1:i64 id,
259
	2:string message
260
}
261
 
48 ashish 262
/**
1984 varun.gupt 263
Exceptions for Promotion Service
264
*/
12696 amit.gupta 265
 
1984 varun.gupt 266
exception PromotionException{
267
	1:i64 id,
268
	2:string message
269
}
270
 
271
/**
272
Types for Promotion Service
273
*/
274
 
275
struct Promotion{
276
	1:i64 id,
277
	2:string name,
278
	3:string ruleExecutionSrc,
279
	4:i64 startOn,
280
	5:i64 endOn,
281
	6:i64 createdOn
282
}
283
 
12696 amit.gupta 284
 
285
struct Counter {
286
	1:i64 id,
287
	2:string code,
288
	3:string name,
289
	4:string ownerName,
290
	5:string email,
291
	6:string mobile,
292
	7:string alternateMobile,
293
	8:bool striker,
294
	9:string tin,
295
	10:i64 spCounterSize,
296
	11:i64 fpCounterSize,
12722 amit.gupta 297
	12:string dob,
12696 amit.gupta 298
	13:i64 addedOn,
299
	14:i64 address
300
}
301
 
1984 varun.gupt 302
struct Coupon{
12696 amit.gupta 303
	1:string couponCode, 
3554 varun.gupt 304
	2:Promotion promotion,
8707 manish.sha 305
	3:string arguments,
306
	4:CouponCategory coupon_category
1984 varun.gupt 307
}
308
 
309
struct PromotionTracking{
310
	1:string couponCode,
311
	2:i64 transactionId,
312
	3:i64 userId,
313
	4:bool appliedOn
314
}
315
 
4189 varun.gupt 316
struct ItemCouponDiscount{
317
	1:i64 itemId,
318
	2:string couponCode,
319
	3:double discount
320
}
321
 
5469 rajveer 322
enum VoucherType{
5492 rajveer 323
	SPICEDECK_MOBILE=1
5469 rajveer 324
}
325
 
326
struct Voucher{
327
	1:i64 id,
328
	2:string voucherCode,
329
	3:VoucherType voucherType,
330
	4:i64 issuedOn,
331
	5:double amount,
332
	6:i64 expiredOn,
333
	7:string userEmail
334
}
335
 
11890 kshitij.so 336
struct PrivateDealUser{
337
	1:i64 userId,
338
	2:i64 addedOn,
12696 amit.gupta 339
	3:bool isActive,
340
	4:i64 counterId,
13146 manish.sha 341
	5:string tin,
342
	6:double bulkShipmentAmountLimit
11890 kshitij.so 343
}
5469 rajveer 344
 
11890 kshitij.so 345
 
1984 varun.gupt 346
/**
347
Promotion Service
348
*/
3374 rajveer 349
service PromotionService extends GenericService.GenericService{
1984 varun.gupt 350
	void createPromotion(1:string name, 2:string ruleExecutionSrc, 3:i64 startOn, 4:i64 endOn) throws (1:PromotionException pex),
7746 amit.gupta 351
	i64 removeAllCouponsByPromotionId(1:i64 promotionId) throws (1:PromotionException pex),
6301 amit.gupta 352
	Coupon getCoupon(1:string couponCode) throws (1:PromotionException pex),
353
	bool isGiftVoucher(1:string couponCode) throws (1:PromotionException pex),
11819 amit.gupta 354
	bool isCodApplicable(1:Cart cart) throws (1:PromotionException pex),
1984 varun.gupt 355
	list<Promotion> getAllPromotions() throws (1:PromotionException pex),
356
	Promotion getPromotionById(1:i64 promotionId) throws (1:PromotionException pex),
357
	void generateCouponsForPromotion(1:i64 promotionId, 2:string couponCode) throws (1:PromotionException pex),
358
	Cart applyCoupon(1:string couponCode, 2:i64 cartId) throws (1:PromotionException pex),
6736 amit.gupta 359
	map<i64,double>  getEmiDiscount(1:i64 cartId) throws (1:PromotionException pex),
6433 anupam.sin 360
	map<i64, string> applyRechargeCoupon(1:string couponCode, 2:i64 totalAmount, 3:i64 userId) throws (1:PromotionException pex),
13521 amit.gupta 361
    void trackCouponUsage(1:string couponCode, 2:i64 transactionId, 3:i64 userId, 4:i64 amount, 5:bool isDigital) throws (1:PromotionException pex),
3385 varun.gupt 362
    i64 getCouponUsageCountByUser(1:string couponCode, 2:i64 userId) throws (1:PromotionException pex),
6497 amit.gupta 363
    list<Coupon> getActiveCodes(1:i64 promotionId) throws (1:PromotionException pex),
364
    void deleteCoupon(1:string couponCode) throws (1:PromotionException pex),
7092 amit.gupta 365
    list<Coupon> getAllCouponsByPromotionId(1:i64 promotionId) throws (1:PromotionException pex),
3385 varun.gupt 366
 
367
    /**
368
     Returns a list of active coupons
369
     */
370
    list<Coupon> getActiveCoupons() throws (1:PromotionException pex),
371
 
372
    /**
6561 amit.gupta 373
     Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
6250 amit.gupta 374
     */
8707 manish.sha 375
    string createCoupon(1:i64 promotionId,2:i64 couponCategory, 3:string couponCode, 4:string arguments 5:bool isCod, 6:string prefix) throws (1:PromotionException pex),
6250 amit.gupta 376
 
377
    /**
3385 varun.gupt 378
     Returns the count of successful payments done using a given coupon
379
     */
380
    i64 getSuccessfulPaymentCountForCoupon(1:string couponCode) throws (1:PromotionException pex),
381
 
382
    /**
383
     Returns the doc string of the rule module
384
     */
4189 varun.gupt 385
    string getRuleDocString(1:string ruleName),
386
 
4494 varun.gupt 387
    list<ItemCouponDiscount> getItemDiscountMap(1:list<i64> itemIds) throws (1:PromotionException pex),
388
 
5469 rajveer 389
    map<string, double> getDiscountsForEntity(1:i64 entityId),
390
 
391
    void addVoucher(1:Voucher voucher),
392
    Voucher assignVoucher(1:i64 userId, 2:string userEmail, 3:VoucherType voucherType, 4:i64 amount),
393
    bool markVoucherAsRedeemed(1:string voucherCode, 2:i64 redeemedOn)
1984 varun.gupt 394
}
395
 
396
/**
48 ashish 397
service
398
*/
3374 rajveer 399
service UserContextService extends GenericService.GenericService{
763 rajveer 400
 
552 chandransh 401
	User createAnonymousUser(1:string jsessionId) throws (1:UserContextException ucex),
402
	User getUserById(1:i64 userId) throws (1:UserContextException ucex),
5326 rajveer 403
	User getUserByCartId(1:i64 cartId) throws (1:UserContextException ucex),
1491 vikas 404
	User getUserByEmail(1:string email) throws (1:UserContextException ucex),
3026 mandeep.dh 405
    User getUserByMobileNumber(1:i64 mobileNumber) throws (1:UserContextException ucex),
552 chandransh 406
	User createUser(1:User user) throws (1:UserContextException ucex),
407
	User updateUser(1:User user) throws (1:UserContextException ucex),
408
	User authenticateUser(1:string email, 2:string password) throws (1:AuthenticationException auex),
409
	bool userExists(1:string email) throws (1:UserContextException ucx),
566 rajveer 410
	i64 addAddressForUser(1:i64 userId, 2:Address address, 3:bool setDefault)throws (1:UserContextException ucx),
48 ashish 411
	bool removeAddressForUser(1:i64 userid, 2:i64 addressId)throws (1:UserContextException ucx),
412
	bool setUserAsLoggedIn(1:i64 userId, 2:i64 timestamp)throws (1:UserContextException ucx),
413
	bool setUserAsLoggedOut(1:i64 userid, 2:i64 timestamp)throws (1:UserContextException ucx),
506 rajveer 414
	bool setDefaultAddress(1:i64 userid, 2:i64 addressId)throws (1:UserContextException ucx),
592 rajveer 415
	bool updatePassword(1:i64 userid, 2:string oldPassword, 3:string newPassword)throws (1:UserContextException ucx),
895 rajveer 416
	bool forgotPassword(1:string email, 2:string newPassword)throws (1:UserContextException ucx),
592 rajveer 417
	list<Address> getAllAddressesForUser(1:i64 userId)throws (1:UserContextException ucx),
1892 vikas 418
	Address getAddressById(1:i64 addressId)throws (1:UserContextException ucx),
592 rajveer 419
	i64 getDefaultAddressId(1:i64 userId)throws (1:UserContextException ucx),
783 rajveer 420
	string getDefaultPincode(1:i64 userId)throws (1:UserContextException ucx),
552 chandransh 421
 
1167 varun.gupt 422
	bool saveUserCommunication(1:i64 userId, 2:string replyTo, 3:i64 communicationType, 4:i64 orderId, 5:string airwaybillNo, 6:string productName, 7:string subject, 8:string message)throws (1:UserCommunicationException ucx)
1590 varun.gupt 423
	UserCommunication getUserCommunicationById(1:i64 id) throws (1:UserCommunicationException ucx)
424
	list<UserCommunication> getUserCommunicationByUser(1:i64 userId) throws (1:UserCommunicationException ucx)
425
	list<UserCommunication> getAllUserCommunications() throws (1:UserCommunicationException ucx)
5407 amar.kumar 426
	void removeUserCommunication(1:i64 id) throws (1:UserCommunicationException ucx)
1116 varun.gupt 427
 
1995 vikas 428
	MasterAffiliate createMasterAffiliate(1:string name, 2:i64 addedOn) throws (1:UserAffiliateException utx)
429
	list<MasterAffiliate> getAllMasterAffiliates() throws (1:UserAffiliateException utx)
430
	MasterAffiliate getMasterAffiliateById(1:i64 id) throws (1:UserAffiliateException utx)
431
    MasterAffiliate getMasterAffiliateByName(1:string name) throws (1:UserAffiliateException utx)
432
	Affiliate createAffiliate(1:string name, 2:string url, 3:i64 masterAffiliateId, 4:i64 addedOn) throws (1:UserAffiliateException utx)
433
	Affiliate getAffiliateById(1:i64 id) throws (1:UserAffiliateException utx)
434
	Affiliate getAffiliateByName(1:string name) throws (1:UserAffiliateException utx)
435
	Tracker getTrackerById(1:i64 id) throws (1:UserAffiliateException utx)
436
	list<Affiliate> getAffiliatesByMasterAffiliate(1:i64 id) throws (1:UserAffiliateException utx)
3379 vikas 437
	i64 addTrackLog(1:i64 affiliateId, 2:i64 userId, 3:TrackLogType event, 4:string url, 5:string data, 6:i64 addedOn) throws (1:UserAffiliateException utx)
1995 vikas 438
	TrackLog getTrackLogById(1:i64 id) throws (1:UserAffiliateException utx)
3293 vikas 439
	list<TrackLog> getTrackLogsByAffiliate(1:i64 affiliateId, 2:i64 startDate, 3:i64 endDate) throws (1:UserAffiliateException utx)
1995 vikas 440
	list<TrackLog> getTrackLogsByUser(1:i64 userId) throws (1:UserAffiliateException utx)
441
	list<TrackLog> getTrackLogs(1:i64 userId, 2:string event, 3:string url) throws (1:UserAffiliateException utx)
1848 vikas 442
 
552 chandransh 443
	Cart getCurrentCart(1:i64 userId) throws (1:ShoppingCartException scx),	
444
	Cart getCart(1:i64 cartId) throws (1:ShoppingCartException scx),
445
	list<Cart> getCartsByTime(1:i64 from_time, 2:i64 to_time, 3:CartStatus status) throws (1:ShoppingCartException scx),
3556 rajveer 446
	string addItemToCart(1:i64 cartId, 2:i64 itemId, 3:i64 quantity, 4:i64 sourceId) throws (1:ShoppingCartException scx),
552 chandransh 447
	void deleteItemFromCart(1:i64 cartId, 2:i64 itemId) throws (1:ShoppingCartException scx),
577 chandransh 448
	void addAddressToCart(1:i64 cartId, 2:i64 addressId) throws (1:ShoppingCartException scx),
5553 rajveer 449
	void addStoreToCart(1:i64 cartId, 2:i64 storeId) throws (1:ShoppingCartException scx),
6922 anupam.sin 450
	void applyCouponToCart(1:Cart cart, 2:string couponCode) throws (1:ShoppingCartException scx),
1984 varun.gupt 451
	void removeCoupon(1:i64 cartId) throws (1:ShoppingCartException scx),
687 chandransh 452
 
453
	/**
3554 varun.gupt 454
	Deletes all the discounts associated with the cart
455
	*/
456
	void deleteDiscountsFromCart(1:i64 cartId) throws (1:ShoppingCartException scx),
457
 
458
	/**
459
	Accepts a list of thrift objects of Discount type and saves them
460
	*/
461
	void saveDiscounts(1:list<Discount> discounts) throws (1:ShoppingCartException scx),
462
 
463
	/**
687 chandransh 464
	 Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
465
	*/
11526 amit.gupta 466
	i64 createOrders(1:i64 cartId, 2:string sessionSource, 3:i64 sessionStartTime, 4:string firstSource, 5:i64 firstSourceTime, 6:i64 userId, 7:i64 schemeId, 8:i64 orderSource) throws (1:ShoppingCartException scx),
687 chandransh 467
 
468
	/**
469
	 Validates that:
470
	 1. The checkout timestamp is greater than the updatedOn timestamp.
1466 ankur.sing 471
	 2. All of the lines in the cart are active items.
687 chandransh 472
	 3. The estimate for any of the lines in cart doesn't change.
1466 ankur.sing 473
	 If all three are true, returns empty string; else returns appropriate message.
687 chandransh 474
	*/
6736 amit.gupta 475
	list<string> validateCart(1:i64 cartId, 2:i64 sourceId) throws (1:ShoppingCartException scex),
11980 amit.gupta 476
 
477
	/**
478
	 Validates that:
479
	 1. The checkout timestamp is greater than the updatedOn timestamp.
480
	 2. All of the lines in the cart are active items.
481
	 3. The estimate for any of the lines in cart doesn't change.
482
	 If all three are true, returns empty string; else returns appropriate message.
483
	*/
484
	list<string> validateCartWithDealerCoupon(1:i64 cartId, 2:i64 sourceId, 3:string dealCoupon) throws (1:ShoppingCartException scex),
552 chandransh 485
 
687 chandransh 486
	/**
487
	 Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
488
	*/
489
	void mergeCart(1:i64 fromCartId, 2:i64 toCartId),
490
 
491
	/**
492
	 Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
493
	*/
494
	bool checkOut(1:i64 cartId) throws (1:ShoppingCartException scex),
495
 
496
	/**
497
	 The second parameter is a map of item ids and their quantities which have been successfully processed.
498
	 This methods removes the specified quantiry of the specified item from the cart.
770 rajveer 499
	 */
500
	bool resetCart(1:i64 cartId, 2:map<i64, double> items) throws (1:ShoppingCartException scex),
501
 
687 chandransh 502
 
1599 ankur.sing 503
	/**
504
	Returns number of registered users.
505
	If userType = null, then it returns count of all users, including anonymous
506
	If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
507
	If userType = UserType.USER, then it returns count of non-anonymous users only
508
	*/
1672 ankur.sing 509
	i64 getUserCount(1:UserType userType),
1599 ankur.sing 510
 
1672 ankur.sing 511
	/**
1891 ankur.sing 512
	Returns list of users of type userType who registered between startDate and endDate (both inclusive).
513
	If any of startDate or endDate is -1, then that filter is ignored. 
514
	If userType is null, then returns all the users, irrespective of anonymous flag
515
 
1672 ankur.sing 516
	*/
2642 varun.gupt 517
	list<User> getAllUsers(1:UserType userType, 2:i64 startDate, 3:i64 endDate),
2717 varun.gupt 518
 
1599 ankur.sing 519
 
2981 rajveer 520
 
521
	/**
522
	Returns list of item ids in myresearch for the user
523
	*/
524
	list<i64> getMyResearchItems(1:i64 userId) throws (1:WidgetException scx),
525
	/**
526
	add item to my research for a user
527
	*/
528
	bool updateMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
529
	/**
530
	delete item from my research for a user
531
	*/
532
	void deleteItemFromMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
533
	/**
534
	Returns list of item ids in browse history for the user. It will return maximum 10 items.
535
	*/
536
	list<i64> getBrowseHistoryItems(1:i64 userId) throws (1:WidgetException scx),
537
	/**
538
	add item to browse history for a user
539
	*/
3385 varun.gupt 540
	void updateBrowseHistory(1:i64 userId, 2:i64 itemId),
541
 
542
	/**
543
	Returns count of Carts with given coupon applied
544
	*/
3499 mandeep.dh 545
	i64 getCartsWithCouponCount(1:string couponCode),
546
 
547
	/**
548
	 * Updates COD trust level of a user
549
	 */
4668 varun.gupt 550
	oneway void increaseTrustLevel(1:i64 userId, 2:double trustLevelDelta),
5407 amar.kumar 551
 
552
	/**
553
	 * Get trust level of a user
554
	 */	
555
	double getTrustLevel(1:i64 userId),
4668 varun.gupt 556
 
557
	/**
558
	 * Returns true/false depending on wether COD is allowed for a cart or not
559
	 */
6903 anupam.sin 560
	bool showCODOption(1:i64 cartId, 2:i64 sourceId, 3:string pincode),
5623 anupam.sin 561
 
562
	/**
563
	 * Get email addresses for users activated within a given date range
564
	 */
6903 anupam.sin 565
	list<string> getUserEmails(1:i64 startDate, 2:i64 endDate),
6821 amar.kumar 566
 
567
	/**
6903 anupam.sin 568
	 * Mark a cart lineitem as insured. Returns true/false. 
569
	 */
9299 kshitij.so 570
	 bool insureItem(1:i64 itemId, 2:i64 cartId, 3:bool toInsure, 4:i32 insurerType),
6903 anupam.sin 571
 
572
	 /**
573
	 * Cancel insurance for all items in the cart
574
	 */
575
	 bool cancelInsurance(1:i64 cartId),
576
 
577
	 /**
578
	 * Stores insurance specific details like date of birth and guardianName
579
	 */
580
	 bool storeInsuranceSpecificDetails(1:i64 addressId, 2:string dob, 3:string guardianName),
581
 
582
	 /**
583
	 * Return true or false based on whether the user has stored any insurance info corresponding to the given addressId
584
	 */
585
	 bool isInsuranceDetailPresent(1:i64 addressId)
586
 
587
	/**
9791 rajveer 588
	 * Returns list of item ids which added to cart from startDate to endDate 
6821 amar.kumar 589
	 */
9791 rajveer 590
	list<i64> getProductsAddedToCart(1:i64 startDate, 2:i64 endDate)
11592 amit.gupta 591
 
592
	/**
593
	* This method is speciically used to avoid overloadaed calls to userClient
594
	*/
11980 amit.gupta 595
	CartPlus validateCartPlus(1:i64 cartId, 2:i64 sourceId, 3:string dealerCoupon) throws (1:ShoppingCartException scex)
11592 amit.gupta 596
 
11679 vikram.rag 597
	bool isPrivateDealUser(1:i64 userId)
11592 amit.gupta 598
 
11890 kshitij.so 599
	bool addPrivateDealUser(1:i64 userId)
11592 amit.gupta 600
 
11890 kshitij.so 601
	bool changePrivateDealUserStatus(1:i64 userId,2:bool isActive)
602
 
603
	PrivateDealUser getPrivateDealUser(1:i64 userId)
11679 vikram.rag 604
 
12722 amit.gupta 605
	map<string,string> registerCounter(1:Counter counter, 2:i64 userId)
11890 kshitij.so 606
 
12722 amit.gupta 607
	list<Counter> searchCounter(1:string type1,  2:string searchString)
11890 kshitij.so 608
 
12722 amit.gupta 609
	list<User> getAllUsersByCounter(1:i64 counterId)
11890 kshitij.so 610
 
2642 varun.gupt 611
}