| 412 |
ashish |
1 |
namespace java in.shop2020.logistics
|
|
|
2 |
namespace py shop2020.thriftpy.logistics
|
|
|
3 |
|
| 3374 |
rajveer |
4 |
include "GenericService.thrift"
|
|
|
5 |
|
| 646 |
chandransh |
6 |
enum StationType{
|
|
|
7 |
OWN_STATION = 0, //The service provider's own station.
|
|
|
8 |
ASSOCIATE_STATION = 1 //An associate's station
|
| 472 |
rajveer |
9 |
}
|
| 442 |
rajveer |
10 |
|
| 3044 |
chandransh |
11 |
enum DeliveryType {
|
|
|
12 |
PREPAID = 0,
|
|
|
13 |
COD = 1
|
|
|
14 |
}
|
|
|
15 |
|
| 5527 |
anupam.sin |
16 |
enum PickUpType {
|
|
|
17 |
COURIER = 0,
|
|
|
18 |
RUNNER = 1,
|
|
|
19 |
SELF = 2
|
|
|
20 |
}
|
|
|
21 |
|
| 3044 |
chandransh |
22 |
struct ProviderDetails{
|
|
|
23 |
1:string accountNo,
|
| 13146 |
manish.sha |
24 |
2:string email,
|
| 7792 |
anupam.sin |
25 |
3:i64 logisticLocation
|
|
|
26 |
4:DeliveryType deliveryType
|
| 3044 |
chandransh |
27 |
}
|
|
|
28 |
|
| 9840 |
amit.gupta |
29 |
/* Text to be displayed as product page*/
|
|
|
30 |
struct ItemText{
|
|
|
31 |
1:i64 itemId,
|
|
|
32 |
2:string displayText
|
|
|
33 |
}
|
|
|
34 |
|
| 412 |
ashish |
35 |
struct Provider{
|
|
|
36 |
1:i64 id,
|
| 667 |
chandransh |
37 |
2:string name,
|
| 7792 |
anupam.sin |
38 |
3:list<ProviderDetails> details,
|
| 13146 |
manish.sha |
39 |
4:PickUpType pickup,
|
|
|
40 |
5:double bundleWeightLimit,
|
|
|
41 |
6:bool groupShipmentAllowed,
|
|
|
42 |
7:double maxCodLimit
|
| 412 |
ashish |
43 |
}
|
|
|
44 |
|
| 646 |
chandransh |
45 |
struct AwbUpdate{
|
|
|
46 |
1:string awbNumber,
|
| 6643 |
rajveer |
47 |
2:i64 providerId,
|
|
|
48 |
3:i64 date,
|
|
|
49 |
4:string status,
|
|
|
50 |
5:string description,
|
|
|
51 |
6:string location
|
| 412 |
ashish |
52 |
}
|
|
|
53 |
|
| 5110 |
mandeep.dh |
54 |
struct LogisticsInfo {
|
| 646 |
chandransh |
55 |
1:i64 warehouseId,
|
|
|
56 |
2:i64 providerId,
|
|
|
57 |
3:i64 deliveryTime,
|
| 4009 |
chandransh |
58 |
4:string airway_billno,
|
| 4865 |
rajveer |
59 |
5:i64 shippingTime,
|
| 5110 |
mandeep.dh |
60 |
6:bool codAllowed,
|
| 6524 |
rajveer |
61 |
7:i64 fulfilmentWarehouseId,
|
| 6725 |
rajveer |
62 |
8:bool otgAvailable,
|
|
|
63 |
9:i64 deliveryDelay
|
| 483 |
rajveer |
64 |
}
|
|
|
65 |
|
| 5553 |
rajveer |
66 |
struct PickupStore {
|
| 5719 |
rajveer |
67 |
1:i64 id,
|
|
|
68 |
2:string hotspotId,
|
|
|
69 |
3:string name,
|
|
|
70 |
4:string line1,
|
|
|
71 |
5:string line2,
|
|
|
72 |
6:string city,
|
|
|
73 |
7:string state,
|
|
|
74 |
8:string pin,
|
| 5739 |
rajveer |
75 |
9:string phone,
|
| 5863 |
rajveer |
76 |
10:string email,
|
|
|
77 |
11:string zone,
|
|
|
78 |
12:string bdm,
|
|
|
79 |
13:string bdmEmail
|
| 5553 |
rajveer |
80 |
}
|
| 7785 |
manish.sha |
81 |
|
|
|
82 |
struct LogisticsLocationInfo {
|
|
|
83 |
1:i64 providerId,
|
|
|
84 |
2:string pinCode,
|
|
|
85 |
3:string destinationCode,
|
|
|
86 |
4:bool expAvailable,
|
|
|
87 |
5:bool codAvailable,
|
|
|
88 |
6:bool otgAvailable,
|
|
|
89 |
7:i64 codLimit,
|
|
|
90 |
8:i64 prepaidLimit,
|
|
|
91 |
9:i64 warehouseId,
|
|
|
92 |
10:i64 deliveryTime,
|
| 19421 |
manish.sha |
93 |
11:i64 delivery_delay,
|
|
|
94 |
12:string zoneCode
|
| 7785 |
manish.sha |
95 |
}
|
| 19413 |
amit.gupta |
96 |
|
|
|
97 |
struct ProviderInfo {
|
|
|
98 |
1:i64 providerId,
|
|
|
99 |
2:bool isCodAvailable,
|
|
|
100 |
3:bool isOtgAvailable,
|
|
|
101 |
4:i64 delayDays
|
|
|
102 |
}
|
|
|
103 |
struct LocationInfo {
|
|
|
104 |
1:i64 locationId,
|
|
|
105 |
2:bool sameState,
|
|
|
106 |
3:bool isCod,
|
|
|
107 |
4:bool isOtg,
|
|
|
108 |
5:i64 minDelay,
|
|
|
109 |
6:i64 maxDelay
|
|
|
110 |
}
|
| 19421 |
manish.sha |
111 |
|
|
|
112 |
struct DeliveryEstimateAndCosting{
|
|
|
113 |
1:i64 logistics_provider_id,
|
|
|
114 |
2:string pincode,
|
|
|
115 |
3:i64 deliveryTime,
|
|
|
116 |
4:i64 delivery_delay,
|
|
|
117 |
5:bool codAllowed,
|
|
|
118 |
6:bool otgAvailable,
|
|
|
119 |
7:double logisticsCost,
|
|
|
120 |
8:double codCollectionCharges,
|
|
|
121 |
9:i64 shippingTime
|
| 20744 |
kshitij.so |
122 |
}
|
|
|
123 |
|
|
|
124 |
struct BluedartAttributes{
|
|
|
125 |
1:string logisticsTransactionId,
|
|
|
126 |
2:string name,
|
|
|
127 |
3:string value
|
| 19421 |
manish.sha |
128 |
}
|
| 5553 |
rajveer |
129 |
|
| 472 |
rajveer |
130 |
exception LogisticsServiceException{
|
|
|
131 |
1:i64 id,
|
|
|
132 |
2:string message
|
|
|
133 |
}
|
|
|
134 |
|
| 3374 |
rajveer |
135 |
service LogisticsService extends GenericService.GenericService{
|
| 646 |
chandransh |
136 |
/**
|
| 667 |
chandransh |
137 |
Returns a provider for a given provider ID. Throws an exception if none found.
|
|
|
138 |
*/
|
|
|
139 |
Provider getProvider(1:i64 providerId) throws (1:LogisticsServiceException lse),
|
|
|
140 |
|
|
|
141 |
/**
|
| 673 |
chandransh |
142 |
Returns a list containing all the providers.
|
|
|
143 |
*/
|
|
|
144 |
list<Provider> getAllProviders() throws (1:LogisticsServiceException lse),
|
|
|
145 |
|
|
|
146 |
/**
|
| 646 |
chandransh |
147 |
Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
|
|
|
148 |
Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
|
| 4630 |
mandeep.dh |
149 |
is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
|
| 646 |
chandransh |
150 |
*/
|
| 4630 |
mandeep.dh |
151 |
LogisticsInfo getLogisticsEstimation(1:i64 itemId, 2:string destination_pin, 3:DeliveryType type) throws (1:LogisticsServiceException se),
|
| 483 |
rajveer |
152 |
|
| 7256 |
rajveer |
153 |
LogisticsInfo getLogisticsEstimationForStore(1:i64 itemId, 2:string destination_pin, 3:DeliveryType type) throws (1:LogisticsServiceException se),
|
|
|
154 |
|
| 646 |
chandransh |
155 |
/**
|
|
|
156 |
Same as above excpet that an airway bill number is also allocated and returned.
|
|
|
157 |
*/
|
| 5766 |
rajveer |
158 |
LogisticsInfo getLogisticsInfo(1:string destination_pincode, 2:i64 item_id, 3:DeliveryType type, 4:PickUpType pickUp) throws (1:LogisticsServiceException se),
|
| 477 |
rajveer |
159 |
|
| 646 |
chandransh |
160 |
/**
|
|
|
161 |
Returns an unused AWB number for the given provider.
|
|
|
162 |
*/
|
| 20724 |
kshitij.so |
163 |
string getEmptyAWB(1:i64 providerId, 2:string logisticsTransactionId) throws (1:LogisticsServiceException se),
|
| 472 |
rajveer |
164 |
|
| 646 |
chandransh |
165 |
/**
|
|
|
166 |
Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
|
|
|
167 |
*/
|
| 6643 |
rajveer |
168 |
list<AwbUpdate> getShipmentInfo(1:string awbNumber, 2:i64 providerId) throws (1:LogisticsServiceException se),
|
| 729 |
chandransh |
169 |
|
|
|
170 |
/**
|
| 6643 |
rajveer |
171 |
Store the update for the given AWB number and provider id.
|
|
|
172 |
*/
|
|
|
173 |
void storeShipmentInfo(1:AwbUpdate update) throws (1:LogisticsServiceException se),
|
|
|
174 |
|
|
|
175 |
|
|
|
176 |
/**
|
| 729 |
chandransh |
177 |
Returns the short three letter code of a pincode for the given provider.
|
|
|
178 |
Raises an exception if the pin code is not serviced by the given provider.
|
|
|
179 |
*/
|
| 1138 |
chandransh |
180 |
string getDestinationCode(1:i64 providerId, 2:string pinCode) throws (1:LogisticsServiceException se),
|
|
|
181 |
|
|
|
182 |
/**
|
| 3103 |
chandransh |
183 |
Returns the number of unused AWB numbers for the given provider of the given type
|
| 1138 |
chandransh |
184 |
*/
|
| 3103 |
chandransh |
185 |
i64 getFreeAwbCount(1:i64 providerId, 2:string type),
|
| 1730 |
ankur.sing |
186 |
|
|
|
187 |
/**
|
|
|
188 |
Returns list of Holiday dates between fromDate and toDate (both inclusive)
|
|
|
189 |
fromDate should be passed as milliseconds corresponding to the start of the day.
|
|
|
190 |
If fromDate is passed as -1, fromDate is not considered for filtering
|
|
|
191 |
If toDate is passed as -1, toDate is not considered for filtering
|
|
|
192 |
*/
|
| 4934 |
amit.gupta |
193 |
list<i64> getHolidays(1:i64 fromDate, 2:i64 toDate),
|
|
|
194 |
|
|
|
195 |
/**
|
|
|
196 |
Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
|
|
|
197 |
Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
|
|
|
198 |
is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
|
|
|
199 |
*/
|
| 9840 |
amit.gupta |
200 |
list<ItemText> getEntityLogisticsEstimation(1:i64 catalogItemId, 2:string destination_pin, 3:DeliveryType type) throws (1:LogisticsServiceException se)
|
| 5527 |
anupam.sin |
201 |
|
|
|
202 |
/**
|
|
|
203 |
* Returns the id for a given pickUpType
|
|
|
204 |
*/
|
| 5553 |
rajveer |
205 |
i64 getProviderForPickupType(1:i64 pickUp),
|
|
|
206 |
|
|
|
207 |
|
|
|
208 |
list<PickupStore> getAllPickupStores(),
|
|
|
209 |
|
| 5719 |
rajveer |
210 |
PickupStore getPickupStore(1:i64 storeId),
|
|
|
211 |
|
| 6322 |
amar.kumar |
212 |
PickupStore getPickupStoreByHotspotId(1:string hotspotId),
|
|
|
213 |
|
| 7567 |
rajveer |
214 |
void addPincode(1:i64 providerId, 2:string pincode, 3:string destCode, 4:bool exp, 5:bool cod, 6:i32 stationType, 7:bool otgAvailable),
|
| 6322 |
amar.kumar |
215 |
|
| 7567 |
rajveer |
216 |
void updatePincode(1:i64 providerId, 2:string pincode, 3:bool exp, 4:bool cod, 5:bool otgAvailable),
|
|
|
217 |
|
| 13146 |
manish.sha |
218 |
bool addNewAwbs(1:i64 providerId, 2:bool cod, 3:list<string> awbs, 4:i64 awbUsedFor),
|
| 7734 |
manish.sha |
219 |
|
| 23121 |
amit.gupta |
220 |
void runLogisticsLocationInfoUpdate(1:list<LogisticsLocationInfo> logisticsLocationInfoList, 2:bool runCompleteUpdate, 3:i64 provider),
|
| 7888 |
rajveer |
221 |
|
| 12895 |
manish.sha |
222 |
i64 adjustDeliveryDays(1:i64 startDate, 2:i64 days),
|
| 7888 |
rajveer |
223 |
|
| 13146 |
manish.sha |
224 |
i64 getFirstDeliveryEstimateForWhLocation(1:string pincode, 2:i64 whLocation),
|
| 12895 |
manish.sha |
225 |
|
| 19413 |
amit.gupta |
226 |
string getNewEmptyAwb(1:i64 providerId, 2:DeliveryType type, 3:i64 orderQuantity) throws (1:LogisticsServiceException se),
|
| 13146 |
manish.sha |
227 |
|
| 19413 |
amit.gupta |
228 |
map<string, string> getProviderLimitDetailsForPincode(1:i64 providerId, 2:string pincode) throws (1:LogisticsServiceException se),
|
|
|
229 |
|
|
|
230 |
/**
|
|
|
231 |
* This returns map for locations and providers corresponding their serviceability and delay
|
|
|
232 |
*/
|
|
|
233 |
map<i64, map<i64, LocationInfo>> getLocationInfoMap(1:string destPincode, 2:list<i64> price)
|
| 19421 |
manish.sha |
234 |
|
| 19474 |
manish.sha |
235 |
DeliveryEstimateAndCosting getCostingAndDeliveryEstimateForPincode(1:string pincode, 2:double transactionAmount, 3:bool isCod, 4:double weight, 5:i64 billingWarehouseId, 6:bool isCompleteTxn) throws (1:LogisticsServiceException se)
|
| 20744 |
kshitij.so |
236 |
|
|
|
237 |
BluedartAttributes getBluedartAttributesForLogisticsTxnId(1:string logisticsTxnId,2:string name) throws (1:LogisticsServiceException se);
|
| 23218 |
amit.gupta |
238 |
|
|
|
239 |
bool pushCourierDetailsForEcomExpress(1:list<string> logisticsTransactionIds)
|
| 412 |
ashish |
240 |
}
|
| 19413 |
amit.gupta |
241 |
|