Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@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 23 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.