Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
85 ashish 1
namespace java in.shop2020.model.v1.catalog
95 ashish 2
namespace py shop2020.thriftpy.model.v1.catalog
85 ashish 3
 
3374 rajveer 4
include "GenericService.thrift"
5
 
85 ashish 6
/**
7
	Objects
8
*/
9
 
123 ashish 10
/**
1330 chandransh 11
Caution :- Never ever change the numbers in it. Please confirm from @Chandranshu or @Rajveer before any changes in enum and other entries in file.
123 ashish 12
**/
5110 mandeep.dh 13
enum status {
123 ashish 14
	PHASED_OUT = 0,		//Item is no longer selling
15
	DELETED = 1,		//Item has been deliberately deleted 
3009 chandransh 16
	PAUSED = 2,			//Item's sale has been paused manually.
123 ashish 17
	ACTIVE = 3,			//Item is available for sale as of now
2984 rajveer 18
	IN_PROCESS = 4,		//Item has been added, but content is not available for the same
19
	CONTENT_COMPLETE = 5,  //The content for this item has been completed. We can start selling the item now.
5217 amit.gupta 20
	PAUSED_BY_RISK = 6,    //Item's sale has been automatically paused since it was marked as risky
10403 rajveer 21
	COMING_SOON= 7,		//Item is now in Coming Soon Page and will move to ACTIVE gradually as it achieves the Start date.
22
	PARTIALLY_ACTIVE=8
103 ashish 23
}
24
 
5110 mandeep.dh 25
enum ItemType {
26
    SERIALIZED = 1,
27
    NON_SERIALIZED = 2
28
}
29
 
6805 anupam.sin 30
enum PremiumType {
31
    PERCENT = 1,
32
    ABSOLUTE = 2
33
}
34
 
9155 kshitij.so 35
enum BannerType{
36
	WEBSITE  = 1,
37
	SIDE_BANNER = 2,
38
	MOBILE_SITE = 3
39
}
40
 
9299 kshitij.so 41
enum InsurerType {
42
	DEVICE = 1,
43
	DATA = 2
44
}
45
 
9884 kshitij.so 46
enum CompetitionCategory {
47
	CANT_COMPETE = 1,
48
	BUY_BOX = 2,
49
	COMPETITIVE = 3,
50
	COMPETITIVE_NO_INVENTORY = 4,
51
	EXCEPTION = 5,
11015 kshitij.so 52
	NEGATIVE_MARGIN = 6,
53
	CHEAP_BUT_NOT_PREF = 7,
54
	PREF_BUT_NOT_CHEAP = 8
9884 kshitij.so 55
}
56
 
57
enum CompetitionBasis {
58
	SP = 1, 
59
	TP = 2
60
}
61
 
62
enum SalesPotential {
63
	HIGH = 1,
64
	MEDIUM = 2,
65
	LOW = 3 
66
}
67
 
9909 kshitij.so 68
enum Decision {
69
	AUTO_DECREMENT_SUCCESS = 1,
70
	AUTO_INCREMENT_SUCCESS = 2,
71
	AUTO_DECREMENT_FAILED = 3,
72
	AUTO_INCREMENT_FAILED = 4
73
}
74
 
9949 kshitij.so 75
enum RunType {
76
	FULL = 1,
77
	FAVOURITE = 2
78
}
79
 
85 ashish 80
struct Item{
81
	1:i64 id,
956 chandransh 82
	2:string productGroup
83
	3:string brand,
84
	4:string modelNumber,
2128 ankur.sing 85
	5:string modelName,
86
	6:string color,
87
	7:i64 category,
88
	8:string comments,
89
	9:i64 catalogItemId,
90
	10:i64 featureId,
91
	11:string featureDescription,
2127 ankur.sing 92
	13:optional double mrp, //maxmimum retail price
4762 phani.kuma 93
	14:optional double sellingPrice, //Selling price
94
	15:optional double weight,
95
	16:i64 addedOn,
96
	17:optional i64 startDate,
97
	18:optional i64 retireDate,
98
	19:status itemStatus,
99
	20:string status_description,
5324 rajveer 100
	21:map<string,string> otherInfo,
4762 phani.kuma 101
	22:string bestDealText,
102
	23:optional double bestDealValue,
103
	24:bool defaultForEntity,
104
	25:i64 updatedOn,
105
	26:optional i64 bestSellingRank,
106
	27:bool risky,
107
	28:optional i32 expectedDelay,
5440 phani.kuma 108
	29:optional bool isWarehousePreferenceSticky,
109
	30:i32 warrantyPeriod,
110
	31:optional i64 preferredVendor,
111
	32:ItemType type,
112
	33:optional i64 comingSoonStartDate,
113
	34:optional i64 expectedArrivalDate,
5460 phani.kuma 114
	35:bool hasItemNo,
7256 rajveer 115
	36:bool activeOnStore,
6805 anupam.sin 116
	38:bool showSellingPrice,
6777 vikram.rag 117
	39:string bestDealsDetailsText,
118
	40:string bestDealsDetailsLink,
7291 vikram.rag 119
	41:i64 preferredInsurer,
120
	42:string asin,
121
	43:i64 defaultInventory,
9841 rajveer 122
	44:i64 holdInventory,
123
	45:bool holdOverride
85 ashish 124
}
125
 
6805 anupam.sin 126
struct Insurer{
127
	1:i64 id,
128
	2:string name,
6903 anupam.sin 129
	3:string address,
130
	4:i64 declaredAmount,
9299 kshitij.so 131
	5:i64 creditedAmount,
132
	6:InsurerType insurerType
6805 anupam.sin 133
}
134
 
135
struct ItemInsurerMapping{
136
	1:i64 itemId,
137
	2:i64 insurer,
138
	3:PremiumType premiumType,
9299 kshitij.so 139
	4:double premiumValue,
140
	5:InsurerType insurerType
6805 anupam.sin 141
}
142
 
1967 rajveer 143
struct Category{
144
	1:i64 id,
145
	2:string label,
146
	3:string description,
147
	4:i64 parent_category_id,
148
	/**
149
	* This field should not be used.
150
	*/
151
	5:list<i64> children_category_ids
4762 phani.kuma 152
	6:string display_name
1967 rajveer 153
}
2113 ankur.sing 154
 
2983 chandransh 155
struct ItemShippingInfo{
156
	1:bool isActive,
157
	2:optional bool isRisky,
158
	3:optional i64 quantity
159
}
160
 
3556 rajveer 161
struct Source{
162
	1:i64 id,
163
	2:string name,
164
	3:string identifier
165
}
166
 
167
struct SourceItemPricing{
168
	1:i64 sourceId,
169
	2:i64 itemId,
170
	3:double mrp,
171
	4:double sellingPrice
172
}
173
 
4295 varun.gupt 174
struct ProductNotificationRequest	{
175
	1:Item item,
176
	2:string email,
177
	3:i64 addedOn
178
}
179
 
180
struct ProductNotificationRequestCount	{
181
	1:Item item,
182
	2:i64 count
183
}
184
 
5504 phani.kuma 185
struct VoucherItemMapping{
5512 rajveer 186
	1:i64 voucherType,
5504 phani.kuma 187
	2:i64 itemId,
188
	3:i64 amount
189
}
190
 
5945 mandeep.dh 191
exception CatalogServiceException{
85 ashish 192
	1:i64 id,
193
	2:string message
194
}
195
 
6511 kshitij.so 196
struct EntityTag {
197
    1:i64 entityId,
198
    2:string tag
199
}
200
 
6848 kshitij.so 201
struct Banner {
202
    1:string bannerName,
203
    2:string imageName,
204
    3:string link,
8915 kshitij.so 205
    4:bool hasMap,
206
    5:i64 priority,
10097 kshitij.so 207
    6:BannerType bannerType,
208
    7:bool target
6848 kshitij.so 209
}
210
 
8579 kshitij.so 211
struct BannerUriMapping{
212
	1:string bannerName,
213
	2:string uri,
10097 kshitij.so 214
	3:bool isActive,
215
	4:bool target
8579 kshitij.so 216
}
217
 
6848 kshitij.so 218
struct BannerMap {
219
    1:string bannerName,
220
    2:string mapLink,
221
    3:string coordinates
222
}
223
 
8590 kshitij.so 224
struct BannerCongregate{
225
	1:Banner banner,
226
	2:list<BannerMap> bannerMaps,
9155 kshitij.so 227
	3:list<BannerUriMapping> bannerUriMappings,
228
	4:Banner antecedent 
8590 kshitij.so 229
}
230
 
8579 kshitij.so 231
struct Campaign {
232
	1:i64 id,
233
	2:string campaignName,
234
	3:string imageName
235
}
236
 
7190 amar.kumar 237
struct FreebieItem {
238
	1:i64 itemId,
239
	2:i64 freebieItemId
240
}
241
 
7272 amit.gupta 242
struct BrandInfo {
243
	1:string name,
244
	2:string serviceCenterLocatorUrl
245
}
246
 
7256 rajveer 247
struct StorePricing {
248
    1:i64 itemId,
249
	2:double recommendedPrice,
250
	3:double minPrice,
251
	4:double maxPrice,
7308 rajveer 252
	5:double minAdvancePrice,
7351 rajveer 253
	6:double absoluteMinPrice,
254
	7:i64 freebieItemId,
255
	8:string bestDealText
7256 rajveer 256
}
257
 
7281 kshitij.so 258
struct Amazonlisted{
259
	1:i64 itemid,
260
    2:string asin,
261
    3:string name,
262
    4:string brand,
263
    5:string model,
264
    6:string manufacturer_name,
265
    7:string part_number,
266
    8:string ean,
267
    9:string upc 
268
    10:double fbaPrice,
269
    11:double sellingPrice,
270
    12:bool isFba,
271
    13:bool isNonFba,
272
    14:bool isInventoryOverride,
273
    15:string color,
7367 kshitij.so 274
    16:string category,
275
    17:i64 handlingTime,
7518 vikram.rag 276
    18:bool isCustomTime,
7770 kshitij.so 277
    19:i64 category_code,
278
    20:i64 mfnPriceLastUpdatedOn,
279
    21:i64 fbaPriceLastUpdatedOn,
280
    22:i64 mfnPriceLastUpdatedOnSc,
281
    23:i64 fbaPriceLastUpdatedOnSc
8139 kshitij.so 282
    24:bool suppressMfnPriceUpdate,
8619 kshitij.so 283
    25:bool suppressFbaPriceUpdate,
10909 vikram.rag 284
    26:string taxCode,
285
    27:string fbbtaxCode,
286
    28:double fbbPrice, 
287
    29:i64 fbbPriceLastUpdatedOnSc,
288
    30:i64 fbbPriceLastUpdatedOn,
289
    31:bool isFbb,
11015 kshitij.so 290
    32:bool suppressFbbPriceUpdate
7977 kshitij.so 291
}
292
 
293
struct PageViewEvents{
294
    1:i64 catalogId,
295
    2:string url,
296
    3:double sellingPrice,
297
    4:bool comingSoon,
298
    5:string ip,
299
    6:string sessionId,
300
    7:i64 eventDate
301
}
7281 kshitij.so 302
 
7977 kshitij.so 303
struct CartEvents{
304
    1:i64 catalogId,
305
    2:i64 itemId,
306
    3:double sellingPrice,
307
    4:string ip,
308
    5:string sessionId,
309
    6:bool inStock,
310
    7:bool comingSoon,
311
    8:i64 eventDate
312
}
313
 
8182 amar.kumar 314
struct EbayItem{
315
	1:string ebayListingId,
316
	2:i64 itemId,
317
	3:string listingName,
318
	4:i64 listingPrice,
319
	5:i64 listingExpiryDate,
320
	6:double subsidy,
321
	7:i64 defaultWarehouseId
8739 vikram.rag 322
}
323
 
9779 kshitij.so 324
/*
325
	Return Provision, vat, commission, service tax are in percentage
326
*/
327
 
328
struct MarketplaceItems{
329
	1:i64 itemId,
330
	2:i64 source,
331
	3:double emiFee,
332
	4:double courierCost,
333
	5:double closingFee,
334
	6:double returnProvision,
335
	7:double commission,
336
	8:double vat,
337
	9:double packagingCost,
338
	10:double otherCost,
339
	11:double serviceTax,
340
	12:bool autoIncrement,
341
	13:bool autoDecrement,
342
	14:bool manualFavourite,
343
	15:bool autoFavourite,
344
	16:double currentSp,
345
	17:double currentTp,
346
	18:double minimumPossibleSp,
347
	19:double minimumPossibleTp,
9909 kshitij.so 348
	20:i64 lastCheckedTimestamp,
10287 kshitij.so 349
	21:double maximumSellingPrice,
11095 kshitij.so 350
	22:double pgFee,
351
	23:double courierCostMarketplace
9779 kshitij.so 352
}
353
 
8739 vikram.rag 354
struct SnapdealItem{
355
	1:i64 item_id,
356
	2:i64 warehouseId,
357
	3:double exceptionPrice,
9242 kshitij.so 358
	4:bool isListedOnSnapdeal,
359
	5:double transferPrice,
360
    6:double sellingPrice,
361
    7:double courierCost,
362
    8:double commission,
363
    9:double serviceTax,
364
    10:bool suppressPriceFeed,
9404 vikram.rag 365
    11:bool suppressInventoryFeed,
9478 kshitij.so 366
    12:double maxNlc,
9568 kshitij.so 367
    13:string skuAtSnapdeal,
9724 kshitij.so 368
    14:string supc,
9779 kshitij.so 369
    15:string shippingTime,
370
    16:string updatedBy,
11095 kshitij.so 371
    17:MarketplaceItems marketplaceItems,
12133 kshitij.so 372
    18:double courierCostMarketplace,
373
    19:Item item
8182 amar.kumar 374
}    
7977 kshitij.so 375
 
9242 kshitij.so 376
struct SnapdealItemDetails{
377
	1:i64 item_id,
378
	2:i64 warehouseId,
379
	3:double exceptionPrice,
380
	4:bool isListedOnSnapdeal,
381
	5:double transferPrice,
382
    6:double sellingPrice,
383
    7:double courierCost,
384
    8:double commission,
385
    9:double serviceTax,
386
    10:string brand,
387
    11:string model_name,
388
    12:string model_number,
389
    13:string color,
390
    14:bool risky,
391
    15:status itemStatus,
392
    16:bool suppressPriceFeed,
393
    17:bool suppressInventoryFeed,
394
    18:double weight,
395
    19:double mrp,
9478 kshitij.so 396
    20:double websiteSellingPrice,
397
    21:double maxNlc,
9568 kshitij.so 398
    22:string skuAtSnapdeal,
9724 kshitij.so 399
    23:string supc,
400
    24:i64 lastUpdatedInventory,
401
    25:i64 lastUpdatedInventoryTimestamp,
11095 kshitij.so 402
    26:i64 shippingTime,
403
    27:double courierCostMarketplace
9621 manish.sha 404
}
405
 
406
struct ProductFeedSubmit{
407
	1:i64 catalogItemId,
408
	2:bool stockLinkedFeed
9242 kshitij.so 409
}    
410
 
9724 kshitij.so 411
struct MarketplaceSearchFilter{
412
	1:bool isListedOnMarketplace,
413
	2:bool isInventoryOverride,
414
	3:bool isPriceOverride,
415
	4:bool isManualFavourite,
416
	5:bool isAutoFavourite,
417
	6:bool isAutoDecrement,
418
	7:bool isAutoIncrement,
419
	8:i64 source
420
}
421
 
9779 kshitij.so 422
/*
423
	Return Provision, emiFee, commission, service tax are in percentage
424
*/
425
 
426
struct MarketplacePercentage{
427
	1:i64 source,
428
	2:double emiFee,
429
	3:double closingFee,
430
	4:double returnProvision,
431
	5:double commission,
10287 kshitij.so 432
	6:double serviceTax,
433
	7:double pgFee
9779 kshitij.so 434
}
435
 
9776 vikram.rag 436
struct MarketPlaceItemPrice{
10097 kshitij.so 437
    1:i64 item_id,
438
	2:i64 source,
439
	3:double sellingPrice,
440
	4:i64 lastUpdatedOn,
441
	5:i64 lastUpdatedOnMarketplace,
442
	6:bool isPriceOverride,
9776 vikram.rag 443
	7:bool isListedOnSource
444
 
445
}
446
 
9945 vikram.rag 447
struct FlipkartItem{
10097 kshitij.so 448
    1:i64 item_id,
449
    2:double exceptionPrice,
450
    3:i64 warehouseId,
451
    4:double commissionValue,
452
    5:double serviceTaxValue,
453
    6:double maxNlc,
454
    7:string skuAtFlipkart,
455
    8:bool isListedOnFlipkart,
456
    9:bool suppressPriceFeed,
457
    10:bool suppressInventoryFeed,
458
    11:string updatedBy,
459
    12:string flipkartSerialNumber,
460
    13:MarketplaceItems marketplaceItems,
12133 kshitij.so 461
    14:Item item
9945 vikram.rag 462
}
463
 
10097 kshitij.so 464
struct FlipkartItemDetails{
465
	1:i64 item_id,
466
	2:i64 warehouseId,
467
	3:double exceptionPrice,
468
	4:bool isListedOnFlipkart,
469
    5:double commission,
470
    6:double serviceTax,
471
    7:string brand,
472
    8:string model_name,
473
    9:string model_number,
474
    10:string color,
475
    11:bool risky,
476
    12:status itemStatus,
477
    13:bool suppressPriceFeed,
478
    14:bool suppressInventoryFeed,
479
    15:double weight,
480
    16:double mrp,
481
    17:double websiteSellingPrice,
482
    18:double maxNlc,
483
    19:string skuAtFlipkart,
484
    20:i64 lastUpdatedInventory,
485
    21:i64 lastUpdatedInventoryTimestamp,
10156 amar.kumar 486
    22:string flipkartSerialNumber,
487
    23:i64 category
10097 kshitij.so 488
}
9945 vikram.rag 489
 
11531 vikram.rag 490
struct PrivateDeal{
491
	1:i64 item_id,
492
	2:double dealPrice,
493
	3:i64 dealFreebieItemId,
494
    4:i64 startDate,
495
    5:i64 endDate,
11566 vikram.rag 496
    6:i64 dealTextOption,
11531 vikram.rag 497
    7:string dealText,
498
    8:bool isCod,
11566 vikram.rag 499
    9:i64 rank,
11606 vikram.rag 500
    10:i64 dealFreebieOption,
501
    11:bool isActive
11531 vikram.rag 502
}
503
 
11015 kshitij.so 504
struct MarketplaceHistory{
505
	1:i64 item_id,
506
	2:i64 source,
507
	3:i64 timestamp,
11076 kshitij.so 508
	4:i64 lowest_possible_tp,
509
	5:i64 lowest_possible_sp,
11015 kshitij.so 510
	6:i64 ourInventory,
511
	7:i64 otherInventory,
512
	8:i64 secondLowestInventory,
513
	9:i64 ourRank,
11076 kshitij.so 514
	10:i64 ourOfferPrice,
515
	11:i64 ourSellingPrice,
516
	12:i64 ourTp,
517
	13:i64 ourNlc,
11015 kshitij.so 518
	14:CompetitionCategory competitiveCategory,
519
	15:i64 risky,
11076 kshitij.so 520
	16:i64 lowestOfferPrice,
521
	17:i64 lowestSellingPrice,
522
	18:i64 lowestTp,
11015 kshitij.so 523
	19:string lowestSellerName,
11076 kshitij.so 524
	20:i64 proposedSellingPrice,
525
	21:i64 proposedTp,
526
	22:i64 targetNlc,
11015 kshitij.so 527
	23:SalesPotential salesPotential,
528
	24:string secondLowestSellerName,
11076 kshitij.so 529
	25:i64 secondLowestSellingPrice,
530
	26:i64 secondLowestOfferPrice,
531
	27:i64 secondLowestTp,
532
	28:i64 marginIncreasedPotential,
533
	29:i64 margin,
11015 kshitij.so 534
	30:bool ourEnoughStock,
535
	31:i64 totalSeller,
536
	32:double averageSale,
11076 kshitij.so 537
	33:bool toGroup,
538
	34:Decision decision,
539
	35:string reason
11015 kshitij.so 540
}
541
 
11905 kshitij.so 542
struct AmazonOutOfSync{
543
	1:i64 item_id,
544
	2:bool mfn,
545
	3:bool fba,
546
	4:bool fbb
547
}
548
 
549
struct PdPriceComp{
550
	1:i64 item_id,
551
	2:double dealPrice,
552
	3:double saholicPrice,
553
	4:double sdPrice,
554
	5:double fkPrice,
555
	6:double amazonPrice,
12169 kshitij.so 556
	7:string productName,
12243 kshitij.so 557
	8:i64 lastProcessedTimestamp,
558
	9:double diff
11905 kshitij.so 559
}
560
 
12243 kshitij.so 561
struct CompetitorPricing {
562
	1:i64 item_id,
563
	2:bool isSnapdeal,
564
	3:bool isFlipkart,
565
	4:bool isAmazon,
566
	5:double lowestSnapdealPrice,
567
	6:double lowestFlipkartPrice,
12257 kshitij.so 568
	7:bool processed,
569
	8:i64 uploadId,
570
	9:string userEmail,
571
	10:double ourSnapdealPrice,
572
	11:double ourSnapdealOfferPrice,
573
	12:i64 ourSnapdealInventory,
574
	13:double lowestSnapdealOfferPrice,
575
	14:string lowestSnapdealSeller,
576
	15:i64 lowestSnapdealSellerInventory,
577
	16:double ourFlipkartPrice,
578
	17:i64 ourFlipkartInventory,
579
	18:string lowestFlipkartSeller,
580
	19:double ourMfnPrice,
581
	20:double ourFbaPrice,
582
	21:i64 ourMfnInventory,
583
	22:i64 ourFbaInventory,
584
	23:double lowestAmazonPrice,
585
	24:string lowestAmazonSeller,
586
	25:string productName
12243 kshitij.so 587
}
588
 
5945 mandeep.dh 589
service CatalogService extends GenericService.GenericService{
763 rajveer 590
 
85 ashish 591
/**
592
	Availability and inventory attributes	
593
*/
594
	//all add and update methods - added by Ashish
5945 mandeep.dh 595
	i64 addItem(1:Item item) throws (1:CatalogServiceException cex),
596
	i64 updateItem(1:Item item) throws (1:CatalogServiceException cex),
2983 chandransh 597
 
598
	/**
599
	Checks if the item given to the corresponding itemId is active. If it's active,
600
	whether it's risky and if it's risky, its inventory position.
601
	*/
5945 mandeep.dh 602
	ItemShippingInfo isActive(1:i64 itemId) throws (1:CatalogServiceException isex),
7438 amit.gupta 603
 
604
	map<i64, bool> getItemsStatus(1:list<i64> itemIds) throws (1:CatalogServiceException isex),
2983 chandransh 605
 
5945 mandeep.dh 606
	string getItemStatusDescription(1:i64 itemId) throws (1:CatalogServiceException isex),
3323 chandransh 607
 
103 ashish 608
	//Item management apis
5945 mandeep.dh 609
	void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:CatalogServiceException cex),
610
	void retireItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:CatalogServiceException cex),
611
	void changeItemStatus(1:i64 item_id, 2:i64 timestamp, 3:status newstatus) throws (1:CatalogServiceException cex),
85 ashish 612
	//Other accessor methods - added by Ashish
5945 mandeep.dh 613
	Item getItem(1:i64 item_id) throws (1:CatalogServiceException cex),
614
	list<Item> getItemsByCatalogId(1:i64 catalog_item_id) throws  (1:CatalogServiceException cex),
615
	list<Item> getValidItemsByCatalogId(1:i64 catalog_item_id) throws  (1:CatalogServiceException cex),
616
	list<Item> getAllItems(1:bool isActive) throws (1:CatalogServiceException cex),
617
	list<Item> getAllItemsByStatus(1:status itemStatus) throws (1:CatalogServiceException cex),
9253 rajveer 618
	bool markItemAsContentComplete(1:i64 entityId, 2:i64 category, 3:string brand, 4:string modelName, 5:string modelNumber, 6:bool isAndroid) throws (1:CatalogServiceException cex),
646 chandransh 619
 
3355 chandransh 620
	/**
3848 chandransh 621
	Gets at most 'limit' items starting at the given offset. Returns an empty list if there are no more items at the given offset.
622
	*/
5945 mandeep.dh 623
	list<Item> getAllItemsInRange(1:i64 offset, 2:i64 limit) throws (1:CatalogServiceException cex),
3848 chandransh 624
 
625
	/**
626
	Gets at most 'limit' items starting at the given offset in the given status. Returns an empty list if there are no more items at the given offset.
627
	*/
5945 mandeep.dh 628
	list<Item> getAllItemsByStatusInRange(1:status itemStatus, 2:i64 offset, 3:i64 limit) throws (1:CatalogServiceException cex),
3848 chandransh 629
 
630
	/**
631
	Gets a count of all items by status
632
	*/
633
	i32 getItemCountByStatus(1:bool useStatus, 2:status itemStatus),
1157 rajveer 634
 
502 rajveer 635
	// for home page .... best deals, best sellers and latest arrivals
5945 mandeep.dh 636
	list<Item> getBestSellers() throws (1:CatalogServiceException isex),
637
	list<i64> getBestSellersCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:CatalogServiceException cex),
638
	i64 getBestSellersCount() throws (1:CatalogServiceException cex),
588 chandransh 639
 
5945 mandeep.dh 640
	list<Item> getBestDeals() throws (1:CatalogServiceException isex),
641
	list<i64> getBestDealsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:CatalogServiceException cex),
642
	i64 getBestDealsCount() throws (1:CatalogServiceException cex),
5217 amit.gupta 643
 
5945 mandeep.dh 644
	list<Item> getComingSoon() throws (1:CatalogServiceException isex),
645
	list<i64> getComingSoonCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:CatalogServiceException cex),
646
	i64 getComingSoonCount() throws (1:CatalogServiceException cex),
588 chandransh 647
 
2975 chandransh 648
	/**
649
	Returns a list of items sorted in the descending order by start date.
650
	The list is limited to the 'latest_arrivals_count' configuraiton parameter.
651
	*/
5945 mandeep.dh 652
	list<Item> getLatestArrivals() throws (1:CatalogServiceException isex),
2975 chandransh 653
 
654
	/**
655
	Returns the list of catalog ids of latest arrivals in the given categories of the given brand.
656
	To ignore the categories, pass the list as empty. To ignore brand, pass it as null.   
657
	*/
5945 mandeep.dh 658
	list<i64> getLatestArrivalsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:list<i64> categories) throws (1:CatalogServiceException cex),
2975 chandransh 659
 
660
	/**
661
	Get the total number of latest arrivals we are willing to show.
662
	The count's upper bound is the 'latest_arrivals_count' configuraiton parameter.
663
	*/
5945 mandeep.dh 664
	i64 getLatestArrivalsCount() throws (1:CatalogServiceException cex),
632 rajveer 665
 
1157 rajveer 666
 
667
	i64 generateNewEntityID(),
668
 
669
	/**
1967 rajveer 670
	* All category related functions
671
	*/
672
	bool addCategory(1:Category category),
673
	Category getCategory(1:i64 id),
1990 ankur.sing 674
	list<Category> getAllCategories(),
1967 rajveer 675
 
1990 ankur.sing 676
	/**
4423 phani.kuma 677
	Returns the list of similar items.
678
	*/
679
	list<Item> getAllSimilarItems(1:i64 itemId),
680
 
681
	/**
682
	Adds similar item.
683
	*/
5945 mandeep.dh 684
	Item addSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:CatalogServiceException cex),
4423 phani.kuma 685
 
686
	/**
6511 kshitij.so 687
	Tag Related
688
	*/
689
 
690
	bool addTag(1:string displayName, 2:i64 itemId),
691
	bool deleteEntityTag(1:string displayName, 2:i64 itemId),
692
	bool deleteTag(1:string displayName),
693
	list<string> getAllTags(),
694
	list<i64> getAllEntitiesByTagName(1:string displayName)
6842 amit.gupta 695
	map<i64, list<string>> getAllEntityTags()
6511 kshitij.so 696
 
8579 kshitij.so 697
	/**
698
	Banner Related
699
	*/
700
 
10097 kshitij.so 701
	bool addBanner(1:BannerCongregate bannerCongregate),
8579 kshitij.so 702
	bool updateBanner(1:Banner banner),
703
	list <Banner> getAllBanners(),
9155 kshitij.so 704
	bool deleteBanner(1:string bannerName,2:BannerType bannerType),
705
	Banner getBannerDetails(1:string bannerName,2:BannerType bannerType),
8579 kshitij.so 706
	map<string,list<Banner>> getActiveBanners(),
707
	bool addBannerMap(1:list<BannerMap> bannerMaps),
708
	bool updateBannerMap(1:BannerMap bannerMap),
6848 kshitij.so 709
	bool deleteBannerMap(1:string bannerName),
9155 kshitij.so 710
	list <BannerMap> getBannerMapDetails(1:string bannerName,2:BannerType bannerType),
8579 kshitij.so 711
	void addBannerUri(1:list<BannerUriMapping> bannerUriMappings),
9155 kshitij.so 712
	list<BannerUriMapping> getUriMapping(1:string bannerName,2:BannerType bannerType),
8579 kshitij.so 713
	void addCampaign(1:Campaign campaign),
714
	list<Campaign> getCampaigns(1:string campaignName),
715
	void deleteCampaign(1:i64 campaignId),
716
	list<string> getAllCampaigns(),
9155 kshitij.so 717
	map<string,list<Banner>> getActiveBannersForMobileSite(),
6511 kshitij.so 718
	/**
4423 phani.kuma 719
	Delete similar item.
720
	*/
5945 mandeep.dh 721
	bool deleteSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:CatalogServiceException cex),
4423 phani.kuma 722
 
723
	/**
4725 phani.kuma 724
	Checks if similar item exists (with same Brand, ModelNumber, ModelName, Color)
2113 ankur.sing 725
	If yes, returns the itemId else returns 0
726
	*/
4725 phani.kuma 727
	i64 checkSimilarItem(1:string brand, 2:string modelNumber, 3:string modelName, 4:string color),
2284 ankur.sing 728
 
729
	/**
5945 mandeep.dh 730
	Check wether item is risky and change status if inventory is not available for risky items
2284 ankur.sing 731
	*/
5945 mandeep.dh 732
	void validateRiskyStatus(1:i64 itemId),
2356 ankur.sing 733
 
734
	/**
5945 mandeep.dh 735
    Marks/Unmarks an item as risky. This flag is used for automatic marking of an item as INACTIVE in case of zero inventory.
736
    */
737
    void changeItemRiskyFlag(1:i64 itemId, 2:bool risky),
738
 
739
 
740
	/**
2356 ankur.sing 741
	Returns list of items marked as risky.
742
	*/
743
	list<Item> getItemsByRiskyFlag(),
744
 
745
	/**
4957 phani.kuma 746
	Returns list of items with any status except PHASED_OUT and filtered by category, brand.
2356 ankur.sing 747
	*/
4957 phani.kuma 748
	list<Item> getItemsForMasterSheet(1:string category, 2:string brand),
2807 rajveer 749
 
750
	/**
751
	Returns list of catalog ids of items with same similarity index as of the given itemId 
752
	*/
753
	list<i64> getSimilarItemsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:i64 itemId),
3079 rajveer 754
 
755
	/**
756
	Add user requests for out of stock items. Once user will ask for notify me an entry will 
757
	*/
3086 rajveer 758
	bool addProductNotification(i64 itemId, string email),
3079 rajveer 759
 
3086 rajveer 760
	/**
761
		Send the product notifications to the users for items which has stock.
762
	*/
3348 varun.gupt 763
	bool sendProductNotifications(),
3079 rajveer 764
 
3348 varun.gupt 765
	/**
766
		Returns list of brand names for a given category Id
767
	*/
3556 rajveer 768
	list<string> getAllBrandsByCategory(1:i64 categoryId),
4957 phani.kuma 769
 
770
    /**
771
		Returns list of brand names
772
	*/
773
	list<string> getAllBrands(),
774
 
3556 rajveer 775
	/**
776
	Return list of all sources
777
	*/
778
	list<Source> getAllSources(), 
779
 
780
	/**
781
	Returns the pricing information of an item. If no information is found, exception will be thrown.
782
	*/
5945 mandeep.dh 783
	SourceItemPricing getItemPricingBySource(1:i64 itemId, 2:i64 sourceId) throws (1:CatalogServiceException cex),
3556 rajveer 784
 
785
	/**
786
	Adds prices to be displayed corresponding to the item if user comes from a source.
787
	If item is not found or source is not found, it will throw exception.
788
	*/
5945 mandeep.dh 789
	void addSourceItemPricing(1:SourceItemPricing sourceItemPricing) throws (1:CatalogServiceException cex),
3556 rajveer 790
 
791
	/**
792
	Returns the list of source pricing information of an item.
793
	Raises an exception if item not found corresponding to itemId
794
	*/
5945 mandeep.dh 795
	list<SourceItemPricing> getAllSourcePricing(1:i64 itemId) throws (1:CatalogServiceException cex),
3556 rajveer 796
 
797
	/**
798
	Get the item for a given itemId and sourceId. MRP and sellingPrice will be updated for source if we have different prices for source.
799
	*/
5945 mandeep.dh 800
	Item getItemForSource(1:i64 item_id, 2:optional i64  sourceId) throws (1:CatalogServiceException cex),
3872 chandransh 801
 
802
	/**
803
	Searches items matching the the given terms in the catalog and returns results within the specified range.
804
	*/
805
	list<Item> searchItemsInRange(1:list<string> searchTerms, 2:i64 offset, 3:i64 limit),
806
 
807
	/**
808
	Gets the count of search results for the given search terms so that the user can go through all the pages.
809
	*/
4024 chandransh 810
	i32 getSearchResultCount(1:list<string> searchTerms),
811
 
812
	/**
4295 varun.gupt 813
	Returns a list of product notifications added after a supplied datetime
814
	*/
815
	list<ProductNotificationRequest> getProductNotifications(1:i64 startDateTime),
816
 
817
	/**
818
	Returns a list of count of requests for product notification against each item
819
	*/
7897 amar.kumar 820
	list<ProductNotificationRequestCount> getProductNotificationRequestCount(1:i64 startDateTime, 2:i64 categoryId);
4370 anupam.sin 821
 
822
	/**
4649 phani.kuma 823
	This method adds a log to authorize table with Item Id, username who authorized the change, reason.
824
	*/
5945 mandeep.dh 825
	bool addAuthorizationLog(1:i64 itemId, 2:string username, 3:string reason) throws (1:CatalogServiceException cex),
5504 phani.kuma 826
 
5945 mandeep.dh 827
	bool addupdateVoucherForItem(1:i64 catalog_item_id, 2:i64 voucherType, 3:i64 voucherAmount) throws (1:CatalogServiceException cex),
5504 phani.kuma 828
 
5945 mandeep.dh 829
	bool deleteVoucherForItem(1:i64 catalog_item_id, 2:i64 voucherType) throws (1:CatalogServiceException cex),
5504 phani.kuma 830
 
5512 rajveer 831
	i64 getVoucherAmount(1:i64 itemId, 2:i64 voucherType),
5504 phani.kuma 832
 
833
	list<VoucherItemMapping> getAllItemVouchers(1:i64 itemId),
5586 phani.kuma 834
 
6039 amit.gupta 835
	bool isValidCatalogItemId(1:i64 catalog_item_id),
836
 
7340 amit.gupta 837
	double getVatPercentageForItem(1:i64 itemId, 2:i64 stateId, 3:double price) throws (1:CatalogServiceException cex),
6531 vikram.rag 838
 
839
	double getVatAmountForItem(1:i64 itemId, 2:double price),
840
 
6821 amar.kumar 841
	list<Item> getAllIgnoredInventoryUpdateItemsList(1:i32 offset,2:i32 limit),
842
 
843
	list<Item> getAllAliveItems();	
6805 anupam.sin 844
 
845
	/**
846
	This method returns the insurance amount needed to insure the given item for a given quantity.
847
	*/
6921 anupam.sin 848
	i64 getInsuranceAmount(1:i64 itemId, 2:double price, 3:i64 insurerId, 4:i64 quantity),
6805 anupam.sin 849
 
6921 anupam.sin 850
	Insurer getInsurer(1:i64 insurerId),
6838 vikram.rag 851
 
6962 rajveer 852
	list<Insurer> getAllInsurers(),
853
 
7190 amar.kumar 854
	void updateInsuranceDeclaredAmount(1:i64 insurerId, 2:double amount),
855
 
856
	i64 getFreebieForItem(1:i64 itemId),
857
 
7256 rajveer 858
	void addOrUpdateFreebieForItem(1:FreebieItem freebieItem),
859
 
7272 amit.gupta 860
	void addOrUpdateBrandInfo(1:BrandInfo brandInfo),
861
 
7291 vikram.rag 862
	map<string, BrandInfo> getBrandInfo(),
7272 amit.gupta 863
 
7265 rajveer 864
	StorePricing getStorePricing(1:i64 itemId),
865
 
7306 rajveer 866
	list<StorePricing> getStorePricings(1:list<i64> itemIds),
867
 
7382 rajveer 868
	void updateStorePricing(1:StorePricing sp, 2:bool allColors),
7281 kshitij.so 869
 
870
	list<Amazonlisted> getAllAmazonListedItems(),
871
 
8619 kshitij.so 872
	list<Amazonlisted> searchAmazonItems(1:list<string> searchTerm,2:i64 offset,3:i64 limit),
873
 
874
	i64 getAmazonSearchResultCount(1:list<string> searchTerm),
875
 
876
	i64 getCountForAmazonlistedItems(),
877
 
7281 kshitij.so 878
	Amazonlisted getAmazonItemDetails(1:i64 itemId),
879
 
8168 kshitij.so 880
	void updateAmazonItemDetails(1:Amazonlisted amazonlisted),
7281 kshitij.so 881
 
7291 vikram.rag 882
	void addAmazonItem(1:Amazonlisted amazonlisted),
7281 kshitij.so 883
 
7291 vikram.rag 884
	list<Item> getAsinItems(),
7281 kshitij.so 885
 
7291 vikram.rag 886
	list<Amazonlisted> getAllFbaListedItems(),
887
 
7460 kshitij.so 888
	list<Amazonlisted> getAllNonFbaListedItems(),
7291 vikram.rag 889
 
7770 kshitij.so 890
	bool updateItemInventory(1:i64 itemId, 2:i64 holdInventory, 3:i64 defaultInventory),
7460 kshitij.so 891
 
7770 kshitij.so 892
	bool updateTimestampForAmazonFeeds(1:string type, 2: list<i64> sku, 3:i64 timestamp)
893
 
7897 amar.kumar 894
	list<Category> getAllParentCategories()
895
 
7977 kshitij.so 896
	void addPageViewEvent(1:PageViewEvents pageViewEvents)
897
 
898
	void addCartEvent(1:CartEvents cartEvents)
899
 
8182 amar.kumar 900
	void addEbayItem(1:EbayItem ebayItem)
901
 
902
	EbayItem getEbayItem(1:string listingId)
903
 
904
	void updateEbayItem(1:EbayItem ebayItem)
905
 
8139 kshitij.so 906
	list<Amazonlisted> getAmazonListedItems(1:i64 offset,2:i64 limit)
907
 
8168 kshitij.so 908
	bool updateAmazonAttributesInBulk(1:map<i64, Amazonlisted> amazonlisted)
8379 vikram.rag 909
 
910
	list<Amazonlisted> getAllItemstoListOnFba()
911
 
912
	list<Amazonlisted> getAllItemstoListOnNonFba()
8616 vikram.rag 913
 
8619 kshitij.so 914
	void updateAsin(1:map<i64, Item> item)
8739 vikram.rag 915
 
916
	bool addOrUpdateSnapdealItem(SnapdealItem snapdealitem)
917
 
918
	SnapdealItem getSnapdealItem(1:i64 item_id)
919
 
9242 kshitij.so 920
	SnapdealItemDetails getSnapdealItemDetails(1:i64 item_id)
9155 kshitij.so 921
 
9242 kshitij.so 922
	list<SnapdealItemDetails> getAllSnapdealItems()
9155 kshitij.so 923
 
9242 kshitij.so 924
	list<SnapdealItemDetails> getSnapdealItems(1:i64 offset,2:i64 limit)
925
 
926
	list<SnapdealItemDetails> searchSnapdealItems(1:list<string> searchTerm,2:i64 offset,3:i64 limit)
927
 
928
	i64 getCountForSnapdealItems()
929
 
930
	i64 getSnapdealSearchResultCount(1:list<string> searchTerm)
9299 kshitij.so 931
 
932
	i64 getPrefferedInsurerForItem(1:i64 itemId, 2:InsurerType insurerType)
9456 vikram.rag 933
 
934
	SnapdealItem getSnapdealItembySkuAtSnapdeal(string skuAtSnapdeal)
9621 manish.sha 935
 
936
	ProductFeedSubmit getProductFeedSubmit(1:i64 catalogItemId) throws (1:CatalogServiceException cex),
937
 
938
	bool addProductFeedSubmit(1:ProductFeedSubmit productFeedSubmit) throws (1:CatalogServiceException cex),
939
 
940
	bool updateProductFeedSubmit(1:ProductFeedSubmit productFeedSubmit) throws (1:CatalogServiceException cex),
8182 amar.kumar 941
 
9621 manish.sha 942
	bool deleteProductFeedSubmit(1:i64 catalogItemId) throws (1:CatalogServiceException cex),
943
 
9779 kshitij.so 944
	list<ProductFeedSubmit> getAllProductFeedSubmit() throws (1:CatalogServiceException cex)
9724 kshitij.so 945
 
946
	MarketplaceItems getMarketplacedetailsForItem(1:i64 itemId,2:i64 sourceId)
947
 
948
	bool updateMarketplaceAttributesForItem(1:MarketplaceItems marketPlaceItem)
9776 vikram.rag 949
 
9779 kshitij.so 950
	MarketplacePercentage getCostingForMarketplace(1:i64 source,2:i64 item_id)
951
 
9776 vikram.rag 952
	list<MarketPlaceItemPrice> getMarketPlaceItemsForPriceUpdate(1:i64 source),
953
 
9909 kshitij.so 954
	void updateMarketPlacePriceUpdateStatus(1:list<i64> skulist,2:i64 timestamp,3:i64 source),
9776 vikram.rag 955
 
10097 kshitij.so 956
	void updateItemHoldInventory(1:map<i64,i64> itemHoldMap),	
9776 vikram.rag 957
 
10097 kshitij.so 958
	void updateNlcAtMarketplaces(1:i64 item_id,2:i64 vendor_id,double nlc),
9895 vikram.rag 959
 
10097 kshitij.so 960
	list<FlipkartItem> getAllFlipkartItems(),
9945 vikram.rag 961
 
10097 kshitij.so 962
	bool addOrUpdateFlipkartItem(FlipkartItem flipkartitem),
963
 
964
	FlipkartItem getFlipkartItem(1:i64 item_id),
965
 
966
	FlipkartItemDetails getFlipkartItemDetails(1:i64 item_id),
967
 
968
	list<FlipkartItemDetails> getFlipkartItems(1:i64 offset,2:i64 limit),
969
 
970
	list<FlipkartItemDetails> searchFlipkartItems(1:list<string> searchTerm,2:i64 offset,3:i64 limit),
971
 
972
	i64 getCountForFlipkartItems(),
973
 
974
	i64 getFlipkartSearchResultCount(1:list<string> searchTerm),
975
 
11531 vikram.rag 976
	list<FlipkartItemDetails> getAllFkItems()
10097 kshitij.so 977
 
11531 vikram.rag 978
	FlipkartItem getFlipkartItemBySkyAtFlipkart(string sku)
10140 vikram.rag 979
 
11015 kshitij.so 980
	list<MarketplaceHistory> getMarketplaceHistory(1:i64 source,2:i64 offset,3:i64 itemId),
981
 
10924 vikram.rag 982
	list<Amazonlisted> getAllFbbListedItems()
10909 vikram.rag 983
 
10924 vikram.rag 984
	list<Amazonlisted> getAllFbbPricingItems()
985
 
11015 kshitij.so 986
	i64 getCountForMarketplaceHistory(1:i64 source,2:i64 itemId)
987
 
988
	list<MarketplaceHistory> getMarketplaceHistoryByDate(1:i64 source,2:i64 startDate,3:i64 endDate,4:i64 offset,5:i64 limit,6:i64 itemId)
989
 
11531 vikram.rag 990
	PrivateDeal getPrivateDealDetails(1:i64 item_id)
991
 
992
	list<Item> getPrivateDealItems(1:i64 offset,2:i64 limit)
993
 
11653 amit.gupta 994
	map<i64, PrivateDeal> getAllActivePrivateDeals(1:list<i64> itemIds, 2:i64 daysDelta)
11592 amit.gupta 995
 
11531 vikram.rag 996
	bool addOrUpdatePrivateDeal(1:PrivateDeal privateDeal)
997
 
11635 vikram.rag 998
	list<i64> getPrivateDealsCatalogIds(1:i64 beginIndex, 2:i64 totalItems) throws (1:CatalogServiceException cex),
999
 
12133 kshitij.so 1000
	i32 getPrivateDealsCount(),
11635 vikram.rag 1001
 
12133 kshitij.so 1002
	AmazonOutOfSync getAmazonOutSyncItems(1:i64 item_id),
11635 vikram.rag 1003
 
12133 kshitij.so 1004
	list<PdPriceComp> getAllPrivateDealsComparison(),
11645 amit.gupta 1005
 
12133 kshitij.so 1006
	list<SnapdealItem> getAllSnapdealMarketplaceItem(),
11905 kshitij.so 1007
 
12243 kshitij.so 1008
	list<FlipkartItem> getAllFlipkartMarketplaceItem(),
11905 kshitij.so 1009
 
12243 kshitij.so 1010
	void addCompetitorScraping(1:map<i64,CompetitorPricing> competitorPricingMap),
1011
 
12257 kshitij.so 1012
	list<CompetitorPricing> getPreviousCompetitorScraping(1:i64 delta),
12243 kshitij.so 1013
 
12257 kshitij.so 1014
	list<CompetitorPricing> getUploadResultById(1:i64 uploadId)
1015
 
1016
 
5110 mandeep.dh 1017
}