UNPKG

tradly

Version:

Tradly JS SDK

153 lines (122 loc) β€’ 7.93 kB
<p align="center"> <a href="https://tradly.app"> <h1 align="center"> Tradly Platform JS SDK </h1> </a> </p> <h3 align="center"> Launch Platforms apps superfast. Headless. API First </h3> <p align="center"> The flexible and modular infrastacture to launch marketplace, community and commerce apps. </p> <p align="center"><a href="https://tradly.app/tutorials">See demo videos</a></p> <br /> Tradly helps developers / non technical founders with low-code/no-code solution to launch marketplaces, Ecosystem for SaaS and commerce apps. ### Saving your time Whether you want simple things like catalog creation or configure complex revenue models, we made it simple and easy to configure through our SuperAdmin. Starter kits to develop apps. Not just that, and design system is coming soon. ### Giving you peace of mind You do not worry about the backend performance, security, upgrades. Our engineers take care of this. Plus optionally marketing tools integration coming up. So, you can focus on growing your business whether it’s a thousand or a million users. ### Saving your cost at every stage Whether you are starting a simple B2C website. Or have a dream to expand into omnichannel with multiple stores and multiple sales channels(Kiosk, app, etc). We have got the modular and flexible technology ready. All this charged fair when you grow. ## Getting Started <a href="https://developer.tradly.app" target="_blank">Read the Getting Started tutorial</a> or follow the steps below: ### ⏳ Installation Install Tradly with this **Quickstart** command to create a Tradly project instantly: - (Use npm/npx to install the Tradly project.) ```bash npx i tradly ``` ## Usage example ```tsx // App.ts import TradlySDK from 'tradly'; //Initialization TradlySDK.init.config({token:'',environment:'sandbox'}) // Get Response const [error, responseJson] = await TradlySDK.app.getCategory({bodyParam:{'type':'listings'},authKey:'authkey'}) Enjoy πŸŽ‰ ``` ### πŸ– Requirements Complete installation requirements can be found in the documentation under <a href="https://developer.tradly.app"> Installation Requirements </a>. ### Methods #### USER Module | Name | Function | |:---|:---| | Login | `user.login({data:JSON})` | | Register | `user.register({data:JSON})` | | Verify | `user.verify({data:JSON})` | | Resend OTP | `user.resendOTP({data:JSON})` | | ForgotPassword | `user.forgotPassword({data:JSON})` | #### APP Module | Name | Function | |:---|:---| | Config List | `app.getConfigList({paramBody:'',authKey:''})` | | Device Info | `app.updateDeviceInfo({authKey:'',data:JSON})` | | User Info | `app.updateUserInfo({authKey:'',data:JSON})` | | Get Languages | `app.getLanguages({authKey:''})` | | Add Edit Address | `app.addEditAddress({authKey:'',id:'',data:JSON})` | | Get Address | `app.getAddress({authKey:'',bodyParam:JSON})` | | Delete Address | `app.deleteAddress({authKey:'',id:''})` | | Add Edit Accounts | `app.postAccounts({authKey:'',id:'',data:JSON})` | | Get Accounts | `app.getAccounts({authKey:'',bodyParam:JSON})` | | Get Accounts Detail | `app.getAccountDetail({authKey:'',id:''})` | | Delete Accounts | `app.deleteAddress({authKey:'',id:''})` | | Follow UnFollow Accounts | `app.followUnfollowAccounts({authKey:'',id:'',isFollowing:Bool})` | | Block Accounts | `app.blockAccount({authKey:'',id:'',isBlocked:Bool})` | | Report Accounts | `app.reportAccount({authKey:'',id:'',data:JSON})` | | Get Listings | `app.getListings({authKey:'',bodyParam:JSON})` | | Get Listings Detail | `app.getListingDetail({authKey:'',id:''})` | | Delete Listings | `app.deleteListing({authKey:'',id:''})` | | Add Edit Listings | `app.postListing({authKey:'',id:'',data:JSON})` | | Like Unlike Listings | `app.likeListing({authKey:'',id:'',isLiked:Bool})` | | Get Variants | `app.getVariants({authKey:''})` | | Add Edit Variants | `app.addEditVariants({authKey:'',listingId:'',id:'',data:JSON})` | | Delete Variants | `app.deleteVariant({authKey:'',listingId:'',id:''})` | | Get Variants Types | `app.getVariantTypes({authKey:''})` | | Add Edit Variants Types | `app.addEditVariantsTypes({authKey:'',id:'',data:JSON})` | | Delete Variants Types | `app.deleteVariantType({authKey:'',id:''})` | | Get Variants Types Values | `app.getVariantTypeValues({authKey:'',id:''})` | | Get Variants Types Values Detail | `app.getVariantTypeValuesDetail({authKey:'',id:'',valueID:''})` | | Add Edit Variants Types Values | `app.addEditVariantTypeValues({authKey:'',id:'',valueID:'',data:JSON})` | | Delete Variants Types Values | `app.deleteVariantTypeValues({authKey:'',id:'',valueID:''})` | | Get Category | `app.getCategory({authKey:'',bodyParam:JSON})` | | Add Edit Category | `app.addEditCategory({authKey:'',id:'',data:JSON})` | | Delete Category | `app.deleteCategory({authKey:'',id:''})` | | Get Attribute | `app.getAttribute({authKey:'',bodyParam:JSON})` | | Add Edit Attribute | `app.addEditAttribute({authKey:'',id:'',data:JSON})` | | Delete Attribute | `app.deleteAttribute({authKey:'',id:''})` | | Get Attribute Values | `app.getAttributeValues({authKey:'',id:''})` | | Get Attribute Values Detail | `app.getAttributeValuesDetail({authKey:'',id:'',valueID:''})` | | Add Edit Attribute Values | `app.addEditAttributeValues({authKey:'',id:'',data:JSON,valueID:''})` | | Delete Attribute Values | `app.deleteAttributeValues({authKey:'',id:'',valueID:''})` | | Get Cart | `app.getCarts({authKey:'',bodyParam:JSON})` | | Add Cart | `app.addToCart({authKey:'',data:JSON})` | | Delete Cart | `app.deleteFromCart({authKey:'',data:JSON})` | | Delete All Cart Detail | `app.deleteAllCartDetail({authKey:''})` | | Checkout | `app.checkout({authKey:'',data:JSON,currency:''})` | | Listing Direct Checkout | `app.listingDirectCheckout({authKey:'',id:'',data:JSON,currency:''})` | | Get Ephemeral Key | `app.getEphemeralKey({authKey:'',id:'',data:JSON})` | | Get Payment Intent Key | `app.getPaymentIntentKey({authKey:'',id:'',data:JSON})` | | Get Orders | `app.getOrders({authKey:'',bodyParam:JSON})` | | Get Orders Detail | `app.getOrderDetail({authKey:'',id:''})` | | Update Orders Status | `app.updateOrderStatus({authKey:'',data:JSON})` | | Update Orders Detail | `app.updateOrderDetail({authKey:'',data:JSON})` | | Get Reviews | `app.getReviewList({authKey:'',bodyParam:JSON})` | | Add Reviews | `app.addReview({authKey:'',data:JSON})` | | Like UnLike Reviews | `app.likeReview({authKey:'',data:JSON})` | | Get Payment Methods | `app.getPaymentMethods({authKey:''})` | | Get Shipping Methods | `app.getShippingMethods({authKey:''})` | | Get Currency | `app.getCurrency({authKey:''})` | | Add Edit Currency | `app.addEditCurrency({authKey:'',id:'',data:JSON})` | | Delete Currency | `app.deleteCurrency({authKey:'',id:''})` | | Get Collection | `app.getCollection({authKey:''})` | | Get Collection Detail | `app.getCollectionDetail({authKey:'',id:''})` | | Add Edit Collection | `app.addEditCollection({authKey:'',id:'',data:JSON})` | | Delete Collection | `app.deleteCollections({authKey:'',id:''})` | | Get Promo Banner | `app.getPromoBanner({authKey:'',bodyParam:JSON})` | | Add Edit Promo Banner | `app.addPromoBanner({authKey:'',id:'',data:JSON})` | | Delete Promo Banner | `app.deletePromoBanner({authKey:'',id:''})` | | Get Transactions | `app.getTransactions({authKey:'',bodyParam:JSON})` | | Get Earning | `app.getEarning({authKey:'',bodyParam:JSON})` | **[See more on our website](https://tradly.app)**. ## Community support For general help using Tradly, Join our [the official Tradly Forum](https://community.tradly.app). - [YouTube Channel](https://www.youtube.com/channel/UCRpXlfFBX5nayubY70-IFEA) (Learn from Video Tutorials) ## Documentation SDK Documentation coming soon. For now, refer API reference (https://developer.tradly.app)