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