Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@atoms-studio/commercelayer-sdk
Advanced tools
![npm (scoped)](https://img.shields.io/npm/v/@atoms-studio/commercelayer-sdk) ![npm](https://img.shields.io/npm/dm/@atoms-studio/commercelayer-sdk) [![Build Status](https://github.com//atoms-studio/commercelayer-sdk/workflows/Node.js%20CI/bad
A lightweight, opinionated CommerceLayer SDK built for fast delivery of e-commerce functionalities.
Go to the documentation website
The official CommerceLayer SDK is a great multi-purpose library, however we realized that it was missing a few functionalities that we had to reimplement in every project we worked on.
This library aims to speed development up by creating a thinner and easier interface with the CommerceLayer API and provide utilities to deal with the most common scenerios.
All supported resources are strongly typed and provide code autocompletion for attributes and relationships, decreasing time spent reading the CommerceLayer API documentation.
Combining Authentication and Resource API into a single library allows for automatic refresh of tokens when a request fails due to an expired token.
Tokens are cached by their scope and expiration date, avoiding rate limiting errors when generating static pages or making a lot of concurrent requests.
Switch between multiple markets and automatically create new auth tokens for that market.
npm i @atoms-studio/commercelayer-sdk
yarn add @atoms-studio/commercelayer-sdk
import { init, Auth, Orders, Skus } from '@atoms-studio/commercelayer-sdk'
init({
host: 'https://<your cl domain>.commercelayer.io',
clientId: '<your cl client id>',
})
await Auth.setMarket(1234)
const order = await Orders.create()
const sku = await Skus.findBy({
code: '12345678',
include: ['prices'],
})
await LineItems.create({
attributes: {
sku_code: sku.code,
quantity: 1,
},
relationships: {
order
}
})
FAQs
![npm (scoped)](https://img.shields.io/npm/v/@atoms-studio/commercelayer-sdk) ![npm](https://img.shields.io/npm/dm/@atoms-studio/commercelayer-sdk) [![Build Status](https://github.com//atoms-studio/commercelayer-sdk/workflows/Node.js%20CI/bad
The npm package @atoms-studio/commercelayer-sdk receives a total of 16 weekly downloads. As such, @atoms-studio/commercelayer-sdk popularity was classified as not popular.
We found that @atoms-studio/commercelayer-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.