Subversion Repositories SmartDukaan

Rev

Rev 17782 | Rev 18735 | 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
 
17782 amit.gupta 178
struct ItemQuantity {
179
	1:i64 itemId,
180
	2:i64 qty,
181
}
182
 
183
 
552 chandransh 184
//Various statuses for line items
185
enum LineStatus{
186
	LINE_ACTIVE,			//line is active
187
	LINE_DELETED,			//line is deleted
188
	LINE_EXPIRED,			//line is expired, on laspse of fixed amount of time
189
	LINE_COMMITED,			//line is committed, sent for processing.
190
	LINE_COMMIT_FAILED,		//line was committed, but commit failed due to some reason, possibly during cart validation.
191
	LINE_AUTO_DELETED,		//line was auto deleted internally due to some reason(item delisted, price changed etc).
192
}
193
 
194
//Various statuses for Cart
195
enum CartStatus{
196
	ACTIVE,					
197
	INACTIVE,
198
	EXPIRED,
199
	COMMITTED,
200
	COMMIT_FAILED
201
}
202
 
3554 varun.gupt 203
struct Discount{
204
	1:i64 cart_id,
205
    2:i64 item_id,
206
    3:double discount,
207
    4:double quantity
208
}
209
 
552 chandransh 210
struct Line{
646 chandransh 211
	1:i64 cartId,				//identifier
552 chandransh 212
	2:i64 itemId,			//item id added
213
	3:double quantity,		//quantity added 
214
	4:i64 createdOn,		//addition timestamp
215
	5:i64 updatedOn, 		//any updation in quantity or status
216
	6:LineStatus lineStatus,	//current status
1984 varun.gupt 217
	7:i32 estimate,			//delivery estimate in hours
218
	8:double actualPrice,
3554 varun.gupt 219
	9:double discountedPrice,
6903 anupam.sin 220
	10:list<Discount> discounts,
221
	11:i64 insurer,
9299 kshitij.so 222
	12:double insuranceAmount,
223
	13:i64 dataProtectionInsurer,
11653 amit.gupta 224
	14:double dataProtectionAmount,
225
	15:string dealText,
11738 amit.gupta 226
	16:i64 freebieId
552 chandransh 227
}
228
 
229
struct Cart{
230
	1:i64 id,				//identifier
231
	2:list<Line> lines,		//list of lines
232
	3:CartStatus status,	//current status
233
	4:i64 createdOn,		//creation timestamp
234
	5:i64 updatedOn,		//time of last update in cart (like addition/deletion/updation of cart items )
687 chandransh 235
	6:i64 checkedOutOn,		//commited timestamp
5326 rajveer 236
	7:i64 addressId,	    //address on which this will be shipped
237
	8:double totalPrice,
238
	9:double discountedPrice,
5553 rajveer 239
	10:string couponCode,
6736 amit.gupta 240
	11:i64 pickupStoreId,
241
	12:string message		//This is introduced to display custom message as and when required to the Website for user display.
552 chandransh 242
}
243
 
11592 amit.gupta 244
struct CartPlus {
245
	1:Cart cart,
246
	2:string 	pinCode,
247
	3:bool needInsuranceInfo,
248
	4:list<string> validateCartMessages
249
}
250
 
552 chandransh 251
enum WidgetType{
770 rajveer 252
	MY_RESEARCH,
253
	BROWSE_HISTORY
254
}
255
 
2981 rajveer 256
struct UserWidgetItem{
257
	1:i64 userId,
258
	2:i64 widgetId,
259
	3:i64 itemId,
260
	4:i64 addedOn
552 chandransh 261
}
262
 
263
exception WidgetException{
264
	1:i64 id,
265
	2:string message
266
}
267
 
48 ashish 268
/**
1984 varun.gupt 269
Exceptions for Promotion Service
270
*/
12696 amit.gupta 271
 
1984 varun.gupt 272
exception PromotionException{
273
	1:i64 id,
274
	2:string message
275
}
276
 
277
/**
278
Types for Promotion Service
279
*/
280
 
281
struct Promotion{
282
	1:i64 id,
283
	2:string name,
284
	3:string ruleExecutionSrc,
285
	4:i64 startOn,
286
	5:i64 endOn,
287
	6:i64 createdOn
288
}
289
 
18634 manish.sha 290
enum CounterVerificationType{
291
	NOT_VERIFIED,
292
	OFFLINE,
293
	ONLINE
294
}
12696 amit.gupta 295
 
296
struct Counter {
297
	1:i64 id,
298
	2:string code,
299
	3:string name,
300
	4:string ownerName,
301
	5:string email,
302
	6:string mobile,
303
	7:string alternateMobile,
304
	8:bool striker,
305
	9:string tin,
306
	10:i64 spCounterSize,
307
	11:i64 fpCounterSize,
12722 amit.gupta 308
	12:string dob,
12696 amit.gupta 309
	13:i64 addedOn,
18634 manish.sha 310
	14:i64 address,
311
	15:bool documentVerified,
312
	16:CounterVerificationType verificationType,
313
	17:i64 verifiedOn
12696 amit.gupta 314
}
315
 
18634 manish.sha 316
struct CounterOnlineInfo {
317
	1:i64 counterId,
318
	2:string tinNumber,
319
	3:string cstNumber,
320
	4:string dealerName,
321
	5:string dealerAddress,
322
	6:string state,
323
	7:string pan,
324
	8:i64 registrationDate,
325
	9:bool registrationStatus,
326
	10:i64 validatedTill,
327
	11:i64 created
328
}
329
 
1984 varun.gupt 330
struct Coupon{
12696 amit.gupta 331
	1:string couponCode, 
3554 varun.gupt 332
	2:Promotion promotion,
8707 manish.sha 333
	3:string arguments,
334
	4:CouponCategory coupon_category
1984 varun.gupt 335
}
336
 
337
struct PromotionTracking{
338
	1:string couponCode,
339
	2:i64 transactionId,
340
	3:i64 userId,
341
	4:bool appliedOn
342
}
343
 
4189 varun.gupt 344
struct ItemCouponDiscount{
345
	1:i64 itemId,
346
	2:string couponCode,
347
	3:double discount
348
}
349
 
5469 rajveer 350
enum VoucherType{
5492 rajveer 351
	SPICEDECK_MOBILE=1
5469 rajveer 352
}
353
 
354
struct Voucher{
355
	1:i64 id,
356
	2:string voucherCode,
357
	3:VoucherType voucherType,
358
	4:i64 issuedOn,
359
	5:double amount,
360
	6:i64 expiredOn,
361
	7:string userEmail
362
}
363
 
11890 kshitij.so 364
struct PrivateDealUser{
365
	1:i64 userId,
366
	2:i64 addedOn,
12696 amit.gupta 367
	3:bool isActive,
368
	4:i64 counterId,
13146 manish.sha 369
	5:string tin,
18634 manish.sha 370
	6:double bulkShipmentAmountLimit,
371
	7:bool creditorAssigned
11890 kshitij.so 372
}
5469 rajveer 373
 
15251 manish.sha 374
struct AccessTokenizer{
375
	1:i64 id,
376
	2:i64 userId,
377
	3:string source,
378
	4:string tokenString,
379
	5:i64 expiredTime,
380
	6:bool expired
381
}
11890 kshitij.so 382
 
15251 manish.sha 383
 
1984 varun.gupt 384
/**
385
Promotion Service
386
*/
3374 rajveer 387
service PromotionService extends GenericService.GenericService{
1984 varun.gupt 388
	void createPromotion(1:string name, 2:string ruleExecutionSrc, 3:i64 startOn, 4:i64 endOn) throws (1:PromotionException pex),
7746 amit.gupta 389
	i64 removeAllCouponsByPromotionId(1:i64 promotionId) throws (1:PromotionException pex),
6301 amit.gupta 390
	Coupon getCoupon(1:string couponCode) throws (1:PromotionException pex),
391
	bool isGiftVoucher(1:string couponCode) throws (1:PromotionException pex),
11819 amit.gupta 392
	bool isCodApplicable(1:Cart cart) throws (1:PromotionException pex),
1984 varun.gupt 393
	list<Promotion> getAllPromotions() throws (1:PromotionException pex),
394
	Promotion getPromotionById(1:i64 promotionId) throws (1:PromotionException pex),
395
	void generateCouponsForPromotion(1:i64 promotionId, 2:string couponCode) throws (1:PromotionException pex),
396
	Cart applyCoupon(1:string couponCode, 2:i64 cartId) throws (1:PromotionException pex),
6736 amit.gupta 397
	map<i64,double>  getEmiDiscount(1:i64 cartId) throws (1:PromotionException pex),
6433 anupam.sin 398
	map<i64, string> applyRechargeCoupon(1:string couponCode, 2:i64 totalAmount, 3:i64 userId) throws (1:PromotionException pex),
13521 amit.gupta 399
    void trackCouponUsage(1:string couponCode, 2:i64 transactionId, 3:i64 userId, 4:i64 amount, 5:bool isDigital) throws (1:PromotionException pex),
3385 varun.gupt 400
    i64 getCouponUsageCountByUser(1:string couponCode, 2:i64 userId) throws (1:PromotionException pex),
6497 amit.gupta 401
    list<Coupon> getActiveCodes(1:i64 promotionId) throws (1:PromotionException pex),
402
    void deleteCoupon(1:string couponCode) throws (1:PromotionException pex),
7092 amit.gupta 403
    list<Coupon> getAllCouponsByPromotionId(1:i64 promotionId) throws (1:PromotionException pex),
3385 varun.gupt 404
 
405
    /**
406
     Returns a list of active coupons
407
     */
408
    list<Coupon> getActiveCoupons() throws (1:PromotionException pex),
409
 
410
    /**
6561 amit.gupta 411
     Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
6250 amit.gupta 412
     */
8707 manish.sha 413
    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 414
 
415
    /**
3385 varun.gupt 416
     Returns the count of successful payments done using a given coupon
417
     */
418
    i64 getSuccessfulPaymentCountForCoupon(1:string couponCode) throws (1:PromotionException pex),
419
 
420
    /**
421
     Returns the doc string of the rule module
422
     */
4189 varun.gupt 423
    string getRuleDocString(1:string ruleName),
424
 
4494 varun.gupt 425
    list<ItemCouponDiscount> getItemDiscountMap(1:list<i64> itemIds) throws (1:PromotionException pex),
426
 
5469 rajveer 427
    map<string, double> getDiscountsForEntity(1:i64 entityId),
428
 
429
    void addVoucher(1:Voucher voucher),
430
    Voucher assignVoucher(1:i64 userId, 2:string userEmail, 3:VoucherType voucherType, 4:i64 amount),
431
    bool markVoucherAsRedeemed(1:string voucherCode, 2:i64 redeemedOn)
1984 varun.gupt 432
}
433
 
434
/**
48 ashish 435
service
436
*/
3374 rajveer 437
service UserContextService extends GenericService.GenericService{
763 rajveer 438
 
552 chandransh 439
	User createAnonymousUser(1:string jsessionId) throws (1:UserContextException ucex),
440
	User getUserById(1:i64 userId) throws (1:UserContextException ucex),
5326 rajveer 441
	User getUserByCartId(1:i64 cartId) throws (1:UserContextException ucex),
1491 vikas 442
	User getUserByEmail(1:string email) throws (1:UserContextException ucex),
3026 mandeep.dh 443
    User getUserByMobileNumber(1:i64 mobileNumber) throws (1:UserContextException ucex),
552 chandransh 444
	User createUser(1:User user) throws (1:UserContextException ucex),
445
	User updateUser(1:User user) throws (1:UserContextException ucex),
446
	User authenticateUser(1:string email, 2:string password) throws (1:AuthenticationException auex),
447
	bool userExists(1:string email) throws (1:UserContextException ucx),
566 rajveer 448
	i64 addAddressForUser(1:i64 userId, 2:Address address, 3:bool setDefault)throws (1:UserContextException ucx),
48 ashish 449
	bool removeAddressForUser(1:i64 userid, 2:i64 addressId)throws (1:UserContextException ucx),
450
	bool setUserAsLoggedIn(1:i64 userId, 2:i64 timestamp)throws (1:UserContextException ucx),
451
	bool setUserAsLoggedOut(1:i64 userid, 2:i64 timestamp)throws (1:UserContextException ucx),
506 rajveer 452
	bool setDefaultAddress(1:i64 userid, 2:i64 addressId)throws (1:UserContextException ucx),
592 rajveer 453
	bool updatePassword(1:i64 userid, 2:string oldPassword, 3:string newPassword)throws (1:UserContextException ucx),
895 rajveer 454
	bool forgotPassword(1:string email, 2:string newPassword)throws (1:UserContextException ucx),
592 rajveer 455
	list<Address> getAllAddressesForUser(1:i64 userId)throws (1:UserContextException ucx),
1892 vikas 456
	Address getAddressById(1:i64 addressId)throws (1:UserContextException ucx),
592 rajveer 457
	i64 getDefaultAddressId(1:i64 userId)throws (1:UserContextException ucx),
783 rajveer 458
	string getDefaultPincode(1:i64 userId)throws (1:UserContextException ucx),
552 chandransh 459
 
1167 varun.gupt 460
	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 461
	UserCommunication getUserCommunicationById(1:i64 id) throws (1:UserCommunicationException ucx)
462
	list<UserCommunication> getUserCommunicationByUser(1:i64 userId) throws (1:UserCommunicationException ucx)
463
	list<UserCommunication> getAllUserCommunications() throws (1:UserCommunicationException ucx)
5407 amar.kumar 464
	void removeUserCommunication(1:i64 id) throws (1:UserCommunicationException ucx)
1116 varun.gupt 465
 
1995 vikas 466
	MasterAffiliate createMasterAffiliate(1:string name, 2:i64 addedOn) throws (1:UserAffiliateException utx)
467
	list<MasterAffiliate> getAllMasterAffiliates() throws (1:UserAffiliateException utx)
468
	MasterAffiliate getMasterAffiliateById(1:i64 id) throws (1:UserAffiliateException utx)
469
    MasterAffiliate getMasterAffiliateByName(1:string name) throws (1:UserAffiliateException utx)
470
	Affiliate createAffiliate(1:string name, 2:string url, 3:i64 masterAffiliateId, 4:i64 addedOn) throws (1:UserAffiliateException utx)
471
	Affiliate getAffiliateById(1:i64 id) throws (1:UserAffiliateException utx)
472
	Affiliate getAffiliateByName(1:string name) throws (1:UserAffiliateException utx)
473
	Tracker getTrackerById(1:i64 id) throws (1:UserAffiliateException utx)
474
	list<Affiliate> getAffiliatesByMasterAffiliate(1:i64 id) throws (1:UserAffiliateException utx)
3379 vikas 475
	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 476
	TrackLog getTrackLogById(1:i64 id) throws (1:UserAffiliateException utx)
3293 vikas 477
	list<TrackLog> getTrackLogsByAffiliate(1:i64 affiliateId, 2:i64 startDate, 3:i64 endDate) throws (1:UserAffiliateException utx)
1995 vikas 478
	list<TrackLog> getTrackLogsByUser(1:i64 userId) throws (1:UserAffiliateException utx)
479
	list<TrackLog> getTrackLogs(1:i64 userId, 2:string event, 3:string url) throws (1:UserAffiliateException utx)
1848 vikas 480
 
552 chandransh 481
	Cart getCurrentCart(1:i64 userId) throws (1:ShoppingCartException scx),	
482
	Cart getCart(1:i64 cartId) throws (1:ShoppingCartException scx),
483
	list<Cart> getCartsByTime(1:i64 from_time, 2:i64 to_time, 3:CartStatus status) throws (1:ShoppingCartException scx),
3556 rajveer 484
	string addItemToCart(1:i64 cartId, 2:i64 itemId, 3:i64 quantity, 4:i64 sourceId) throws (1:ShoppingCartException scx),
552 chandransh 485
	void deleteItemFromCart(1:i64 cartId, 2:i64 itemId) throws (1:ShoppingCartException scx),
577 chandransh 486
	void addAddressToCart(1:i64 cartId, 2:i64 addressId) throws (1:ShoppingCartException scx),
5553 rajveer 487
	void addStoreToCart(1:i64 cartId, 2:i64 storeId) throws (1:ShoppingCartException scx),
6922 anupam.sin 488
	void applyCouponToCart(1:Cart cart, 2:string couponCode) throws (1:ShoppingCartException scx),
1984 varun.gupt 489
	void removeCoupon(1:i64 cartId) throws (1:ShoppingCartException scx),
687 chandransh 490
 
491
	/**
3554 varun.gupt 492
	Deletes all the discounts associated with the cart
493
	*/
494
	void deleteDiscountsFromCart(1:i64 cartId) throws (1:ShoppingCartException scx),
495
 
496
	/**
497
	Accepts a list of thrift objects of Discount type and saves them
498
	*/
499
	void saveDiscounts(1:list<Discount> discounts) throws (1:ShoppingCartException scx),
500
 
501
	/**
687 chandransh 502
	 Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
503
	*/
11526 amit.gupta 504
	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 505
 
506
	/**
507
	 Validates that:
508
	 1. The checkout timestamp is greater than the updatedOn timestamp.
1466 ankur.sing 509
	 2. All of the lines in the cart are active items.
687 chandransh 510
	 3. The estimate for any of the lines in cart doesn't change.
1466 ankur.sing 511
	 If all three are true, returns empty string; else returns appropriate message.
687 chandransh 512
	*/
6736 amit.gupta 513
	list<string> validateCart(1:i64 cartId, 2:i64 sourceId) throws (1:ShoppingCartException scex),
11980 amit.gupta 514
 
515
	/**
516
	 Validates that:
517
	 1. The checkout timestamp is greater than the updatedOn timestamp.
518
	 2. All of the lines in the cart are active items.
519
	 3. The estimate for any of the lines in cart doesn't change.
520
	 If all three are true, returns empty string; else returns appropriate message.
521
	*/
522
	list<string> validateCartWithDealerCoupon(1:i64 cartId, 2:i64 sourceId, 3:string dealCoupon) throws (1:ShoppingCartException scex),
552 chandransh 523
 
687 chandransh 524
	/**
525
	 Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
526
	*/
527
	void mergeCart(1:i64 fromCartId, 2:i64 toCartId),
528
 
529
	/**
530
	 Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
531
	*/
532
	bool checkOut(1:i64 cartId) throws (1:ShoppingCartException scex),
533
 
534
	/**
535
	 The second parameter is a map of item ids and their quantities which have been successfully processed.
536
	 This methods removes the specified quantiry of the specified item from the cart.
770 rajveer 537
	 */
538
	bool resetCart(1:i64 cartId, 2:map<i64, double> items) throws (1:ShoppingCartException scex),
539
 
687 chandransh 540
 
1599 ankur.sing 541
	/**
542
	Returns number of registered users.
543
	If userType = null, then it returns count of all users, including anonymous
544
	If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
545
	If userType = UserType.USER, then it returns count of non-anonymous users only
546
	*/
1672 ankur.sing 547
	i64 getUserCount(1:UserType userType),
1599 ankur.sing 548
 
1672 ankur.sing 549
	/**
1891 ankur.sing 550
	Returns list of users of type userType who registered between startDate and endDate (both inclusive).
551
	If any of startDate or endDate is -1, then that filter is ignored. 
552
	If userType is null, then returns all the users, irrespective of anonymous flag
553
 
1672 ankur.sing 554
	*/
2642 varun.gupt 555
	list<User> getAllUsers(1:UserType userType, 2:i64 startDate, 3:i64 endDate),
2717 varun.gupt 556
 
1599 ankur.sing 557
 
2981 rajveer 558
 
559
	/**
560
	Returns list of item ids in myresearch for the user
561
	*/
562
	list<i64> getMyResearchItems(1:i64 userId) throws (1:WidgetException scx),
563
	/**
564
	add item to my research for a user
565
	*/
566
	bool updateMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
567
	/**
568
	delete item from my research for a user
569
	*/
570
	void deleteItemFromMyResearch(1:i64 userId, 2:i64 itemId) throws (1:WidgetException scx),
571
	/**
572
	Returns list of item ids in browse history for the user. It will return maximum 10 items.
573
	*/
574
	list<i64> getBrowseHistoryItems(1:i64 userId) throws (1:WidgetException scx),
575
	/**
576
	add item to browse history for a user
577
	*/
3385 varun.gupt 578
	void updateBrowseHistory(1:i64 userId, 2:i64 itemId),
579
 
580
	/**
581
	Returns count of Carts with given coupon applied
582
	*/
3499 mandeep.dh 583
	i64 getCartsWithCouponCount(1:string couponCode),
584
 
585
	/**
586
	 * Updates COD trust level of a user
587
	 */
4668 varun.gupt 588
	oneway void increaseTrustLevel(1:i64 userId, 2:double trustLevelDelta),
5407 amar.kumar 589
 
590
	/**
591
	 * Get trust level of a user
592
	 */	
593
	double getTrustLevel(1:i64 userId),
4668 varun.gupt 594
 
595
	/**
596
	 * Returns true/false depending on wether COD is allowed for a cart or not
597
	 */
6903 anupam.sin 598
	bool showCODOption(1:i64 cartId, 2:i64 sourceId, 3:string pincode),
5623 anupam.sin 599
 
600
	/**
601
	 * Get email addresses for users activated within a given date range
602
	 */
6903 anupam.sin 603
	list<string> getUserEmails(1:i64 startDate, 2:i64 endDate),
6821 amar.kumar 604
 
605
	/**
6903 anupam.sin 606
	 * Mark a cart lineitem as insured. Returns true/false. 
607
	 */
9299 kshitij.so 608
	 bool insureItem(1:i64 itemId, 2:i64 cartId, 3:bool toInsure, 4:i32 insurerType),
6903 anupam.sin 609
 
610
	 /**
611
	 * Cancel insurance for all items in the cart
612
	 */
613
	 bool cancelInsurance(1:i64 cartId),
614
 
615
	 /**
616
	 * Stores insurance specific details like date of birth and guardianName
617
	 */
618
	 bool storeInsuranceSpecificDetails(1:i64 addressId, 2:string dob, 3:string guardianName),
619
 
620
	 /**
621
	 * Return true or false based on whether the user has stored any insurance info corresponding to the given addressId
622
	 */
623
	 bool isInsuranceDetailPresent(1:i64 addressId)
624
 
625
	/**
9791 rajveer 626
	 * Returns list of item ids which added to cart from startDate to endDate 
6821 amar.kumar 627
	 */
9791 rajveer 628
	list<i64> getProductsAddedToCart(1:i64 startDate, 2:i64 endDate)
11592 amit.gupta 629
 
630
	/**
631
	* This method is speciically used to avoid overloadaed calls to userClient
632
	*/
11980 amit.gupta 633
	CartPlus validateCartPlus(1:i64 cartId, 2:i64 sourceId, 3:string dealerCoupon) throws (1:ShoppingCartException scex)
11592 amit.gupta 634
 
11679 vikram.rag 635
	bool isPrivateDealUser(1:i64 userId)
11592 amit.gupta 636
 
11890 kshitij.so 637
	bool addPrivateDealUser(1:i64 userId)
11592 amit.gupta 638
 
11890 kshitij.so 639
	bool changePrivateDealUserStatus(1:i64 userId,2:bool isActive)
640
 
641
	PrivateDealUser getPrivateDealUser(1:i64 userId)
11679 vikram.rag 642
 
12722 amit.gupta 643
	map<string,string> registerCounter(1:Counter counter, 2:i64 userId)
11890 kshitij.so 644
 
12722 amit.gupta 645
	list<Counter> searchCounter(1:string type1,  2:string searchString)
11890 kshitij.so 646
 
12722 amit.gupta 647
	list<User> getAllUsersByCounter(1:i64 counterId)
11890 kshitij.so 648
 
15251 manish.sha 649
	string getActiveAccessTokenForUser(1:i64 userId, 2:string source)
650
 
651
	bool validateAccessToken(1:string accessToken)
17782 amit.gupta 652
	bool addItemsToCart(1:i64 cartId, 2:list<ItemQuantity> itemQty, 3:string couponCode)
653
	string validateCartNew(1:i64 cartId, 2:string pinCode, 3:i64 sourceId)
15251 manish.sha 654
 
18634 manish.sha 655
	bool isAddressEditableForCounter(1:i64 userId)
656
 
657
	Address getBillingAddressForUser(1:i64 userId)
658
 
659
	bool isCreditorAssigned(1:i64 userId)
2642 varun.gupt 660
}