mobify / commercecloud-ocapi-client Goto Github PK
View Code? Open in Web Editor NEWSalesforce Commerce Cloud Open Commerce API (OCAPI) for Node and browsers ๐
License: MIT License
Salesforce Commerce Cloud Open Commerce API (OCAPI) for Node and browsers ๐
License: MIT License
there are 2 missing basket functions
PATCH
patchBasketsByIDGiftCertificateItems(basketId, body)
to update and existing gift certificate item on a basket
and
DELETE
deleteBasketsByIDGiftCertificateItems(basketId, giftCertificateId)
to delete an existing gift certificate item on a basket
can these be added please ?
I am trying to use the API and the lack of examples makes it really hard to use,
I am trying to use multiple refinements refine_1 and refine_2 etc, the documentation says its supported but it doesn't currently work and there's no examples of how it works.
Heya,
Been testing out this repo with my current sandbox.
I'm trying to get the categories to render a main navigation menu.
Is it possible to get all the online categories for a specified site via the apis documented in
https://mobify.github.io/commercecloud-ocapi-client/?
I've been reading through the documentation but can't seem to find a method.
thanks in advance.
When compiled its around 202 kb of file size. This will come down if the we have Tree Shaking ES module.
babel src --out-dir es
"module": "es/index.js",
Hi, I don't see any documentation of how I add a client_id, I can see stuff about in testing , but I am part testing, I can't to set a client_id for my api calls,
Fault {
message: 'The client ID is missing.',
type: 'MissingClientIdException',
arguments: undefined
}
If it is using the config.json, where do I put it in relation to my files and how do I have a different baseUrl for different environments
โ Low โ Large gzip Denial of Service โ
โ Package โ superagent โ
โ Patched in โ >=3.7.0 โ
โ Dependency of โ commercecloud-ocapi-client โ
โ Path โ commercecloud-ocapi-client > superagent โ
โ More info โ https://npmjs.com/advisories/479 โ
Would be nice to have some functionality to generate an oauth access token as it is pretty difficult to figure out. Looks like most of your code is generated via swagger which I have never used so I won't PR anything.
Looks like you are using superagent so this is how I am getting my oauth token. Took me awhile to get it right:
function getAccessToken(clientId, password) {
const key = new Buffer(clientId + ":" + password).toString("base64");
return new Promise((resolve, reject) => {
request
.post("https://account.demandware.com/dw/oauth2/access_token")
.set("Authorization", "Basic " + key)
.set("Content-Type", "application/x-www-form-urlencoded")
.send("grant_type=client_credentials")
.end((err: any, res: any) => {
if (err) {
reject(err);
}
resolve(res.body);
});
});
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.