Downloads raml specs from exchange
npm install @commerce-apps/exchange-connectorexchange-connectorThe exchange-connector package allows downloading RAML files from anypoint exchange.
Execute the following commands to install dependencies and build exchange-connector.
# To setup
npm install
# To build
npm run build
# To link (Optional)
npm link
``
import {getBearer, getRamlByTag} form "@commerce-apps/exchange-connector"
// Gets an Access token for talking with Mulesoft
getBearer(username, password): Promise
// Searches and returns the list of available RestApis
searchExchange(accessToken: string, searchString: string): Promise
// Gets raml from exchange, downloads to specified folder (defaults to ./download )
downloadRestApi(restApi: RestApi, destinationFolder: string): Promise
`
To run tests, execute
`bash`
npm run test`
To print the detailed test results and errors on the console, executebash``
npm run test:debug