Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
commercecloud-ocapi-client
Advanced tools
_______________________________________________________________________________________________________________________________________________________
/ / , / ,
----__----__---_--_---_--_----__---)__----__----__----__---/----__-----------__-/--------__----__----__------__------------__---/--------__----__--_/_-
/ ' / ) / / ) / / ) /___) / ) / ' /___) / ' / / ) / / / / / ) / ' / ) / ) / / ' / / /___) / ) /
_(___ _(___/_/_/__/_/_/__/_(___ _/_____(___ _(___ _(___ _/___(___/_(___(__(___/_______(___/_(___ _(___(___/___/_/_______(___ _/___/___(___ _/___/_(_ __
/
/
ShopApi - ES6 JavaScript client for Salesforce Commerce Cloud OCAPI Shop API.
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install commercecloud-ocapi-client --save
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Please follow the installation instruction and execute the following JS code:
import ShopApi from 'commercecloud-ocapi-client'
ShopApi.ApiClient.instance = new ShopApi.ApiClient({
clientUsername: 'YOUR USERNAME', // Configure HTTP basic authorization: customers_auth
clientPassword: 'YOUR PASSWORD', // Configure HTTP basic authorization: customers_auth
oAuthAccessToken: '' // Configure OAuth2 access token for authorization: oauth2_application
})
const api = new ShopApi.BasketsApi()
const basketId = "basketId_example" // {String} the id of the basket to be retrieved
api.deleteBasketsByID(basketId)
.then(() {
console.log('API called successfully.')
})
.catch((fault) => {
console.error(fault)
})
v0.1.1 (November 7, 2017)
FAQs
An ES6 JavaScript Client for Salesforce Open Commerce API
The npm package commercecloud-ocapi-client receives a total of 58 weekly downloads. As such, commercecloud-ocapi-client popularity was classified as not popular.
We found that commercecloud-ocapi-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.