Subversion Repositories SmartDukaan

Rev

Rev 4985 | Rev 5185 | 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.
3009 chandransh 20
	PAUSED_BY_RISK = 6    //Item's sale has been automatically paused since it was marked as risky
103 ashish 21
}
22
 
5110 mandeep.dh 23
enum WarehouseLocation {
1330 chandransh 24
	Mumbai = 0,
25
	Delhi = 1,
646 chandransh 26
	Bangalore = 2,
27
	Kolkata = 3
28
}
29
 
5110 mandeep.dh 30
struct Vendor {
1330 chandransh 31
	1:i64 id,
32
	2:string name
33
}
34
 
2841 chandransh 35
enum BillingType {
36
	OURS = 0,
37
	EXTERNAL = 1
38
}
39
 
5110 mandeep.dh 40
enum WarehouseType {
41
    OURS = 0,
42
    THIRD_PARTY = 1
43
}
44
 
45
enum InventoryType {
46
    GOOD = 0,
47
    BAD = 1,
48
    VIRTUAL = 2
49
}
50
 
4979 rajveer 51
enum HolidayType {
52
	WEEKLY = 0,
53
	MONTHLY = 1,
54
	SPECIFIC = 2
55
}
56
 
483 rajveer 57
/* 
58
Warehouse fields details
59
location: it is full address
60
vendorString: some key for the warehouse
61
*/
5110 mandeep.dh 62
struct Warehouse {
85 ashish 63
	1:i64 id,
752 chandransh 64
	2:string displayName,
65
	3:string location,
66
	5:i64 addedOn,
67
	6:i64 lastCheckedOn,
68
	7:string tinNumber,
69
	8:string pincode,
70
	9:string vendorString,
2824 chandransh 71
	10:WarehouseLocation logisticsLocation,
5110 mandeep.dh 72
	12:BillingType billingType,
73
	13:WarehouseType warehouseType,
74
	14:InventoryType inventoryType,
75
	15:Vendor vendor,
76
	16:i64 shippingWarehouseId,
77
	17:i64 billingWarehouseId,
78
	18:bool isAvailabilityMonitored,
79
	19:i64 transferDelayInHours
85 ashish 80
}
4024 chandransh 81
 
115 ashish 82
/* */
85 ashish 83
struct ItemInventory{
84
	1:i64 id,
4431 phani.kuma 85
	2:map<i64,i64> availability,
86
	3:map<i64,i64> reserved
85 ashish 87
}
88
 
483 rajveer 89
 
85 ashish 90
struct ItemInventoryHistory{
91
	1:i64 item_id,
92
	2:i64 warehouse_id,
93
	3:i64 timestamp,
94
	4:i64 availability
95
}
96
 
5110 mandeep.dh 97
enum ItemType {
98
    SERIALIZED = 1,
99
    NON_SERIALIZED = 2
100
}
101
 
85 ashish 102
struct Item{
103
	1:i64 id,
956 chandransh 104
	2:string productGroup
105
	3:string brand,
106
	4:string modelNumber,
2128 ankur.sing 107
	5:string modelName,
108
	6:string color,
109
	7:i64 category,
110
	8:string comments,
111
	9:i64 catalogItemId,
112
	10:i64 featureId,
113
	11:string featureDescription,
114
	12:ItemInventory itemInventory,
2127 ankur.sing 115
	13:optional double mrp, //maxmimum retail price
4762 phani.kuma 116
	14:optional double sellingPrice, //Selling price
117
	15:optional double weight,
118
	16:i64 addedOn,
119
	17:optional i64 startDate,
120
	18:optional i64 retireDate,
121
	19:status itemStatus,
122
	20:string status_description,
123
	21:map<string,string> otherInfo,
124
	22:string bestDealText,
125
	23:optional double bestDealValue,
126
	24:bool defaultForEntity,
127
	25:i64 updatedOn,
128
	26:optional i64 bestSellingRank,
129
	27:bool risky,
130
	28:optional i32 expectedDelay,
131
	29:optional i64 preferredWarehouse,
132
	30:optional i64 defaultWarehouse,
133
	31:optional bool isWarehousePreferenceSticky,
134
	32:i32 warrantyPeriod,
5110 mandeep.dh 135
	33:optional i64 preferredVendor,
136
	34:ItemType type
85 ashish 137
}
138
 
1343 chandransh 139
struct VendorItemPricing{
1349 chandransh 140
	1:i64 vendorId,
141
	2:i64 itemId,
1343 chandransh 142
	3:double transferPrice,
143
	4:double mop,
144
	5:double dealerPrice
145
}
146
 
1967 rajveer 147
struct Category{
148
	1:i64 id,
149
	2:string label,
150
	3:string description,
151
	4:i64 parent_category_id,
152
	/**
153
	* This field should not be used.
154
	*/
155
	5:list<i64> children_category_ids
4762 phani.kuma 156
	6:string display_name
1967 rajveer 157
}
2113 ankur.sing 158
 
159
struct VendorItemMapping{
160
	1:i64 vendorId,
161
	2:string itemKey,
4762 phani.kuma 162
	3:i64 itemId
2113 ankur.sing 163
}
2983 chandransh 164
 
165
struct ItemShippingInfo{
166
	1:bool isActive,
167
	2:optional bool isRisky,
168
	3:optional i64 quantity
169
}
170
 
3556 rajveer 171
struct Source{
172
	1:i64 id,
173
	2:string name,
174
	3:string identifier
175
}
176
 
177
struct SourceItemPricing{
178
	1:i64 sourceId,
179
	2:i64 itemId,
180
	3:double mrp,
181
	4:double sellingPrice
182
}
183
 
4024 chandransh 184
struct AvailableAndReservedStock {
185
	1:i64 itemId,
186
	2:i64 available,
187
	3:i64 reserved,
188
	4:i64 minimumStock
189
}
190
 
4295 varun.gupt 191
struct ProductNotificationRequest	{
192
	1:Item item,
193
	2:string email,
194
	3:i64 addedOn
195
}
196
 
197
struct ProductNotificationRequestCount	{
198
	1:Item item,
199
	2:i64 count
200
}
201
 
121 ashish 202
exception InventoryServiceException{
85 ashish 203
	1:i64 id,
204
	2:string message
205
}
206
 
3374 rajveer 207
service InventoryService extends GenericService.GenericService{
763 rajveer 208
 
85 ashish 209
/**
210
	Availability and inventory attributes	
211
*/
212
	//all add and update methods - added by Ashish
123 ashish 213
	i64 addItem(1:Item item) throws (1:InventoryServiceException cex),
214
	i64 updateItem(1:Item item) throws (1:InventoryServiceException cex),
121 ashish 215
	i64 addWarehouse(1:Warehouse warehouse) throws (1:InventoryServiceException cex),
2983 chandransh 216
 
217
	/**
4332 anupam.sin 218
	add a new vendor
219
	*/
220
	i64 addVendor(1:Vendor vendor) throws (1:InventoryServiceException cex),
221
 
222
	/**
2983 chandransh 223
	Checks if the item given to the corresponding itemId is active. If it's active,
224
	whether it's risky and if it's risky, its inventory position.
225
	*/
226
	ItemShippingInfo isActive(1:i64 itemId) throws (1:InventoryServiceException isex),
227
 
2033 rajveer 228
	string getItemStatusDescription(1:i64 itemId) throws (1:InventoryServiceException isex),
3323 chandransh 229
 
230
	/**
231
	Stores the incremental warehouse updates of items.
232
	*/
233
	void updateInventoryHistory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),
234
 
235
	/**
236
	Stores the final inventory stocks of items.
237
	*/
483 rajveer 238
	void updateInventory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),
2983 chandransh 239
 
4320 rajveer 240
	/**
241
	Add the inventory to existing stock.
242
	*/
243
	void addInventory(1:i64 itemId, 2:i64 warehouseId, 3:i64 quantity) throws (1:InventoryServiceException cex),
244
 
103 ashish 245
	//all delete methods
121 ashish 246
	void retireWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
103 ashish 247
 
248
	//Item management apis
121 ashish 249
	void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),
250
	void retireItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),
251
	void changeItemStatus(1:i64 item_id, 2:i64 timestamp, 3:status newstatus) throws (1:InventoryServiceException cex),
85 ashish 252
	//Other accessor methods - added by Ashish
121 ashish 253
	Item getItem(1:i64 item_id) throws (1:InventoryServiceException cex),
632 rajveer 254
	list<Item> getItemsByCatalogId(1:i64 catalog_item_id) throws  (1:InventoryServiceException cex),
4934 amit.gupta 255
	list<Item> getValidItemsByCatalogId(1:i64 catalog_item_id) throws  (1:InventoryServiceException cex),
121 ashish 256
	list<Item> getAllItems(1:bool isActive) throws (1:InventoryServiceException cex),
257
	list<Item> getAllItemsByStatus(1:status itemStatus) throws (1:InventoryServiceException cex),
4431 phani.kuma 258
	//ItemInventory getItemInventory(1:i64 item_id) throws (1:InventoryServiceException cex),
632 rajveer 259
	ItemInventory getItemInventoryByItemId(1:i64 item_id) throws (1:InventoryServiceException cex),
260
	//ItemInventory getItemInventoryByCatalogId(1:i64 item_id) throws (1:InventoryServiceException cex),
121 ashish 261
	i64 getItemAvailibilityAtWarehouse(1:i64 warehouse_id, 2:i64 item_id) throws (1:InventoryServiceException cex),
2076 rajveer 262
	bool markItemAsContentComplete(1:i64 entityId, 2:i64 category, 3:string brand, 4:string modelName, 5:string modelNumber) throws (1:InventoryServiceException cex),
646 chandransh 263
 
3355 chandransh 264
	/**
3848 chandransh 265
	Gets at most 'limit' items starting at the given offset. Returns an empty list if there are no more items at the given offset.
266
	*/
267
	list<Item> getAllItemsInRange(1:i64 offset, 2:i64 limit) throws (1:InventoryServiceException cex),
268
 
269
	/**
270
	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.
271
	*/
272
	list<Item> getAllItemsByStatusInRange(1:status itemStatus, 2:i64 offset, 3:i64 limit) throws (1:InventoryServiceException cex),
273
 
274
	/**
275
	Gets a count of all items by status
276
	*/
277
	i32 getItemCountByStatus(1:bool useStatus, 2:status itemStatus),
278
	/**
3355 chandransh 279
	Determines the warehouse that should be used to fulfil an order for the given item.
280
	It first checks all the warehouses which are in the logistics location given by the
281
	warehouse_loc parameter. If none of the warehouses there have any inventory, then the
282
	preferred warehouse for the item is used. 
1157 rajveer 283
 
3355 chandransh 284
	Returns an ordered list of size 4 with following elements in the given order:
285
	1. Logistics location of the warehouse which was finally picked up to ship the order.  
286
	2. Id of the warehouse which was finally picked up.
287
	3. Inventory size in the selected warehouse.
288
	4. Expected delay added by the category manager.
646 chandransh 289
	 */
290
	list<i64> getItemAvailabilityAtLocation(1:i64 warehouse_loc, 2:i64 item_id) throws (1:InventoryServiceException isex),
3355 chandransh 291
 
121 ashish 292
	list<Warehouse> getAllWarehouses(1:bool isActive) throws (1:InventoryServiceException cex),
1343 chandransh 293
 
294
	/**
295
	 Returns the warehouse with the given id.
296
	*/
121 ashish 297
	Warehouse getWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
298
	list<Warehouse> getAllWarehousesForItem(1:i64 item_id) throws (1:InventoryServiceException cex),
502 rajveer 299
	list<Item> getAllItemsForWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
300
 
862 chandransh 301
	/**
302
	 Increases the reservation count for an item in a warehouse. Should always succeed normally.
303
	*/
304
	bool reserveItemInWarehouse(1:i64 itemId, 2:i64 warehouseId, 3:double quantity) throws (1:InventoryServiceException cex),
305
 
306
	/**
307
	 Decreases the reservation count for an item in a warehouse. Should always succeed normally.
308
	*/
309
	bool reduceReservationCount(1:i64 itemId, 2:i64 warehouseId, 3:double quantity) throws (1:InventoryServiceException cex),
310
 
502 rajveer 311
	// for home page .... best deals, best sellers and latest arrivals
588 chandransh 312
	list<Item> getBestSellers() throws (1:InventoryServiceException isex),
1924 rajveer 313
	list<i64> getBestSellersCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:InventoryServiceException cex),
588 chandransh 314
	i64 getBestSellersCount() throws (1:InventoryServiceException cex),
315
 
316
	list<Item> getBestDeals() throws (1:InventoryServiceException isex),
1924 rajveer 317
	list<i64> getBestDealsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:i64 category) throws (1:InventoryServiceException cex),
588 chandransh 318
	i64 getBestDealsCount() throws (1:InventoryServiceException cex),
319
 
2975 chandransh 320
	/**
321
	Returns a list of items sorted in the descending order by start date.
322
	The list is limited to the 'latest_arrivals_count' configuraiton parameter.
323
	*/
588 chandransh 324
	list<Item> getLatestArrivals() throws (1:InventoryServiceException isex),
2975 chandransh 325
 
326
	/**
327
	Returns the list of catalog ids of latest arrivals in the given categories of the given brand.
328
	To ignore the categories, pass the list as empty. To ignore brand, pass it as null.   
329
	*/
330
	list<i64> getLatestArrivalsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:string brand, 4:list<i64> categories) throws (1:InventoryServiceException cex),
331
 
332
	/**
333
	Get the total number of latest arrivals we are willing to show.
334
	The count's upper bound is the 'latest_arrivals_count' configuraiton parameter.
335
	*/
632 rajveer 336
	i64 getLatestArrivalsCount() throws (1:InventoryServiceException cex),
337
 
1157 rajveer 338
 
339
	i64 generateNewEntityID(),
340
 
341
	/**
1343 chandransh 342
	Returns the pricing information of an item associated with the vendor of the given warehouse.
343
	Raises an exception if either the item, vendor or the associated pricing information can't be found.
344
	*/
4283 anupam.sin 345
	VendorItemPricing getItemPricing(1:i64 itemId, 2:i64 vendorId) throws (1:InventoryServiceException cex),
1343 chandransh 346
 
347
	/**
1157 rajveer 348
	* Store category object and retrieve it
349
	*/
1967 rajveer 350
	/**
632 rajveer 351
	bool putCategoryObject(1:binary object),
352
	binary getCategoryObject()
1967 rajveer 353
	*/
354
 
355
	/**
356
	* All category related functions
357
	*/
358
	bool addCategory(1:Category category),
359
	Category getCategory(1:i64 id),
1990 ankur.sing 360
	list<Category> getAllCategories(),
1967 rajveer 361
 
1990 ankur.sing 362
	/**
363
	Returns the list of vendor pricing information of an item.
364
	Raises an exception if item not found corresponding to itemId
365
	*/
366
	list<VendorItemPricing> getAllItemPricing(1:i64 itemId) throws (1:InventoryServiceException cex),
367
 
368
 
369
	/**
2113 ankur.sing 370
	Adds vendor prices corresponding to the item. If pricing already exists then updates the prices. 
1990 ankur.sing 371
	Raises an exception if either the item or vendor can't be found corresponding to their ids.
372
	*/
2113 ankur.sing 373
	void addVendorItemPricing(1:VendorItemPricing vendorItemPricing) throws (1:InventoryServiceException cex),
1990 ankur.sing 374
 
2063 ankur.sing 375
	/**
376
	Return list of all vendors
377
	*/
2113 ankur.sing 378
	list<Vendor> getAllVendors(), 
2063 ankur.sing 379
 
2113 ankur.sing 380
	/**
4423 phani.kuma 381
	Returns the list of similar items.
382
	*/
383
	list<Item> getAllSimilarItems(1:i64 itemId),
384
 
385
	/**
386
	Adds similar item.
387
	*/
388
	Item addSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:InventoryServiceException cex),
389
 
390
	/**
391
	Delete similar item.
392
	*/
393
	bool deleteSimilarItem(1:i64 itemId, 2:i64 catalogItemId) throws (1:InventoryServiceException cex),
394
 
395
	/**
2356 ankur.sing 396
	Adds VendorItemMapping. Updates VendorItemMapping if exists corresponding to the item key.  
2113 ankur.sing 397
	*/
2356 ankur.sing 398
	void addVendorItemMapping(1:string key, 2:VendorItemMapping vendorItemMapping) throws (1:InventoryServiceException cex),
2113 ankur.sing 399
 
400
	/**
401
	Returns the list of vendor item mapping corresponding to itemId passed as parameter.
402
	Raises an exception if item not found corresponding to itemId
403
	*/
404
	list<VendorItemMapping> getVendorItemMappings(1:i64 itemId) throws (1:InventoryServiceException cex),
405
 
406
	/**
4725 phani.kuma 407
	Checks if similar item exists (with same Brand, ModelNumber, ModelName, Color)
2113 ankur.sing 408
	If yes, returns the itemId else returns 0
409
	*/
4725 phani.kuma 410
	i64 checkSimilarItem(1:string brand, 2:string modelNumber, 3:string modelName, 4:string color),
2284 ankur.sing 411
 
412
	/**
413
	Marks/Unmarks an item as risky. This flag is used for automatic marking of an item as INACTIVE in case of zero inventory.
414
	*/
2356 ankur.sing 415
	void changeItemRiskyFlag(1:i64 itemId, 2:bool risky),
416
 
417
	/**
418
	Returns list of items marked as risky.
419
	*/
420
	list<Item> getItemsByRiskyFlag(),
421
 
422
	/**
4957 phani.kuma 423
	Returns list of items with any status except PHASED_OUT and filtered by category, brand.
2356 ankur.sing 424
	*/
4957 phani.kuma 425
	list<Item> getItemsForMasterSheet(1:string category, 2:string brand),
2807 rajveer 426
 
427
	/**
428
	Returns list of catalog ids of items with same similarity index as of the given itemId 
429
	*/
430
	list<i64> getSimilarItemsCatalogIds(1:i64 beginIndex, 2:i64 totalItems, 3:i64 itemId),
3079 rajveer 431
 
432
	/**
433
	Add user requests for out of stock items. Once user will ask for notify me an entry will 
434
	*/
3086 rajveer 435
	bool addProductNotification(i64 itemId, string email),
3079 rajveer 436
 
3086 rajveer 437
	/**
438
		Send the product notifications to the users for items which has stock.
439
	*/
3348 varun.gupt 440
	bool sendProductNotifications(),
3079 rajveer 441
 
3348 varun.gupt 442
	/**
443
		Returns list of brand names for a given category Id
444
	*/
3556 rajveer 445
	list<string> getAllBrandsByCategory(1:i64 categoryId),
4957 phani.kuma 446
 
447
    /**
448
		Returns list of brand names
449
	*/
450
	list<string> getAllBrands(),
451
 
3556 rajveer 452
	/**
453
	Return list of all sources
454
	*/
455
	list<Source> getAllSources(), 
456
 
457
	/**
458
	Returns the pricing information of an item. If no information is found, exception will be thrown.
459
	*/
460
	SourceItemPricing getItemPricingBySource(1:i64 itemId, 2:i64 sourceId) throws (1:InventoryServiceException cex),
461
 
462
	/**
463
	Adds prices to be displayed corresponding to the item if user comes from a source.
464
	If item is not found or source is not found, it will throw exception.
465
	*/
466
	void addSourceItemPricing(1:SourceItemPricing sourceItemPricing) throws (1:InventoryServiceException cex),
467
 
468
	/**
469
	Returns the list of source pricing information of an item.
470
	Raises an exception if item not found corresponding to itemId
471
	*/
472
	list<SourceItemPricing> getAllSourcePricing(1:i64 itemId) throws (1:InventoryServiceException cex),
473
 
474
	/**
475
	Get the item for a given itemId and sourceId. MRP and sellingPrice will be updated for source if we have different prices for source.
476
	*/
3872 chandransh 477
	Item getItemForSource(1:i64 item_id, 2:optional i64  sourceId) throws (1:InventoryServiceException cex),
478
 
479
	/**
480
	Searches items matching the the given terms in the catalog and returns results within the specified range.
481
	*/
482
	list<Item> searchItemsInRange(1:list<string> searchTerms, 2:i64 offset, 3:i64 limit),
483
 
484
	/**
485
	Gets the count of search results for the given search terms so that the user can go through all the pages.
486
	*/
4024 chandransh 487
	i32 getSearchResultCount(1:list<string> searchTerms),
488
 
489
	/**
4063 chandransh 490
	Returns a list of inventory stock for items for which there are pending orders for the given vendor.
4024 chandransh 491
	*/
4295 varun.gupt 492
	list<AvailableAndReservedStock> getPendingOrdersInventory(1:i64 vendorid),
493
 
494
	/**
495
	Returns a list of product notifications added after a supplied datetime
496
	*/
497
	list<ProductNotificationRequest> getProductNotifications(1:i64 startDateTime),
498
 
499
	/**
500
	Returns a list of count of requests for product notification against each item
501
	*/
502
	list<ProductNotificationRequestCount> getProductNotificationRequestCount(1:i64 startDateTime)
4370 anupam.sin 503
 
504
	/**
4649 phani.kuma 505
	This method adds a log to authorize table with Item Id, username who authorized the change, reason.
506
	*/
5110 mandeep.dh 507
	bool addAuthorizationLog(1:i64 itemId, 2:string username, 3:string reason) throws (1:InventoryServiceException cex),
4985 mandeep.dh 508
 
5110 mandeep.dh 509
	/**
510
	 This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
511
	 getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
512
	 getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
513
     getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
514
     getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7
515
	 */
516
	list<Warehouse> getWarehouses(1:WarehouseType warehouseType, 2:InventoryType inventoryType, 3:i64 vendorId, 4:i64 billingWarehouseId, 5:i64 shippingWarehouseId);
517
 
4985 mandeep.dh 518
    /**
519
     * Resets availability of an item to the quantity mentioned in a warehouse.
520
     */
521
    void resetAvailability(1:string itemKey, 2:i64 vendorId, 3:i64 quantity, 4:i64 warehouseId) throws (1:InventoryServiceException cex);
522
 
523
    /**
524
     * Returns the list of item keys which need to be processed for a given warehouse.
525
     * This is currently used by Support application to send item keys whose inventory needs 
526
     * to be updated from PLB
527
     */
528
    list<string> getItemKeysToBeProcessed(1:i64 warehouseId);
529
 
530
    /**
531
     * Marks/Deletes missed inventory updates for a given key and warehouse.
532
     * This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item
533
     */
5110 mandeep.dh 534
    void markMissedInventoryUpdatesAsProcessed(1:string itemKey, 2:i64 warehouseId);
535
 
536
    /**
537
     * Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
538
     * and the timestamp from where alert was raised.
539
     */
540
    map<string, map<i64, i64>> getIgnoredItemKeys();
541
 
542
    /**
543
    Add the BAD type inventory to existing stock.
544
    */
545
    void addBadInventory(1:i64 itemId, 2:i64 warehouseId, 3:i64 quantity) throws (1:InventoryServiceException cex);
546
}