Subversion Repositories SmartDukaan

Rev

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