Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mage2ts

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mage2ts

Converts Magento's Swagger schema into a Typescript class. Firebase ready.

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

Mage2TS

Mapping Magento 2 APIs to Typescript. Firebase ready.

Mage2TS takes in the Swagger schema of a Magento 2 installation, cleans it up and generates a Typescript class with all the methods needed to interact with the REST endpoints. Generated class can be uploaded to Firebase in order to use it within Cloud Functions.

Installation

Simply run

npm install fabdan/mage2ts

Into your project's folder.

Usage

After the install, you can run it using the following command:

mage2ts <host> -c <class name> -s <store code>

Arguments

  • host: the base URL or IP address of your Magento instance

Options

  • (-c | --class) name of the class that will be generated, default to 'Magento'
  • (-s | --store) if you want to retrieve Swagger schema from a specific store, default to 'default'
  • (-f | --firebase) if added, it will place the generated file into 'functions/src', default to 'src'
  • (-t | --test) if added, it will parse Swagger schema without generating the Typescript class

Thanks to

Special thanks to wcandillon and his swagger-js-codegen, from which the idea was based.

Keywords

FAQs

Package last updated on 12 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc