Created
December 23, 2018 07:50
-
-
Save anasAlsalol/c8b6a7ea9fa8dada68db32199439a39b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const login = (email, password) => api.post('login', { email, password }); | |
| const packagePhoto = token => settingAPI.post(`package_photo?token=${token}`); | |
| const emailNews = token => settingAPI.get(`email_news?token=${token}`); | |
| const contentPhoto = token => settingAPI.post('content_photo/', { token }); | |
| const detailedPhoto = token => settingAPI.post('detailed_photo', { token }); | |
| const otherInstruction = token => | |
| settingAPI.post('other_instruction?other_instruction=000', { token }); | |
| const getexpectedPackage = token => api.get(`expected_package?token=${token}`); | |
| const getpackagesWarehouse = (token, status) => | |
| api.get(`packages?token=${token}&status=${status}`); | |
| const getpackagesInProgress = (token, status) => | |
| api.get(`inProgress?token=${token}&action=${status}`); | |
| const getsentPackages = (token, status) => | |
| api.get(`sentPackages?token=${token}&action=${status}`); | |
| const getaddressBook = token => api.get(`user_address?token=${token}`); | |
| const getsupportTickets = token => api.get(`support_ticket?token=${token}`); | |
| const getwallet = token => api.get(`transaction?token=${token}`); | |
| const getassistedPurchase = token => api.get(`assisted_purchase?token=${token}`); | |
| const getshipmentCalculator = ( | |
| warehouses, | |
| city, | |
| post_code, | |
| weight, | |
| mass_unit, | |
| length, | |
| width, | |
| height, | |
| distance_unit, | |
| cost, | |
| country | |
| ) => | |
| baseUrl.post( | |
| `calculate_shipment?warehouses=${warehouses}&city=${city}&post_code=${post_code}&weight=${weight}&mass_unit=${mass_unit}&length=${length}&width=${width}&height=${height}&distance_unit=${distance_unit}&cost=${cost}&country=${country}` | |
| ); | |
| const getwarhouseAddress = () => api.get('address'); | |
| const getaddExpectedPackage = (token, vendor, recipientName, addressId, trackingNumber, note) => | |
| api.post( | |
| `add/expected_package?token=${token}&vendor=${vendor}&recipient_name=${recipientName}&address_id=${addressId}&tracking_number=${trackingNumber}¬e=${note}` | |
| ); | |
| const getdeleteExpectedPackage = (token, id) => | |
| api.post(`delete/expected_package?token=${token}&id=${id}`); | |
| const getupdateExpectedPackage = ( | |
| token, | |
| vendor, | |
| recipientName, | |
| addressId, | |
| trackingNumber, | |
| note, | |
| id | |
| ) => | |
| api.post( | |
| `edit/expected_package?token=${token}&vendor=${vendor}&recipient_name=${recipientName}&address_id=${addressId}&tracking_number=${trackingNumber}¬e=${note}&id=${id}` | |
| ); | |
| const getaddAssistedPurchase = ( | |
| token, | |
| siteName, | |
| siteUrl, | |
| addressId, | |
| otherInstructions, | |
| handlingCharges, | |
| domesticTax, | |
| itemName, | |
| option, | |
| itemUrl, | |
| price, | |
| quantity | |
| ) => | |
| api.post( | |
| `add/assisted_purchase?token=${token}&site_name=${siteName}&site_url=${siteUrl}&address_id=${addressId}&other_instruction=${otherInstructions}&handling_charges=${handlingCharges}&domestic_tax=${domesticTax}&item_name=${itemName}&option=${option}&item_url=${itemUrl}&price=${price}&quantity=${quantity}` | |
| ); | |
| const geteditAssistedPurchase = ( | |
| token, | |
| siteName, | |
| siteUrl, | |
| addressId, | |
| otherInstructions, | |
| handlingCharges, | |
| domesticTax, | |
| itemName, | |
| option, | |
| itemUrl, | |
| price, | |
| quantity, | |
| id | |
| ) => | |
| api.post( | |
| `edit/assisted_purchase?token=${token}&site_name=${siteName}&site_url=${siteUrl}&address_id=${addressId}&other_instruction=${otherInstructions}&handling_charges=${handlingCharges}&domestic_tax=${domesticTax}&item_name=${itemName}&option=${option}&item_url=${itemUrl}&price=${price}&quantity=${quantity}&id=${id}` | |
| ); | |
| const getdeleteAssistedPurchase = (token, id) => | |
| api.post(`delete/assisted_purchase?token=${token}&id=${id}`); | |
| const getaddNewAddressBook = (token, address, suite, city, statName, postCode, countryId) => | |
| api.post( | |
| `add_user_address?token=${token}&address=${address}&suite=${suite}&city=${city}&state=${statName}&post_code=${postCode}&country_id=${countryId}` | |
| ); | |
| const getcountry = () => api.get('country'); | |
| const getmemberShips = () => api.get('memberships'); | |
| const getserviceCombine = (token, readyId, serviceId) => | |
| api.post(`SaveServiceCombine?token=${token}&ready_id=${readyId}&service_id=${serviceId}`); | |
| const getsaveCombinePackage = ( | |
| token, | |
| shippingMethod, | |
| actiontype, | |
| packagingType, | |
| packageNotFit, | |
| dimensionX, | |
| dimensionY, | |
| dimensionZ, | |
| addressTo, | |
| insurance | |
| ) => | |
| api.post( | |
| `SaveCombine?token=${token}&shipping_method=${shippingMethod}&action=${actiontype}&packaging_type=${packagingType}&package_not_fit=${packageNotFit}&dimension_x=${dimensionX}&dimension_y=${dimensionY}&dimension_z=${dimensionZ}&address_to=${addressTo}&insurance=${insurance}` | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment