commerce-sdk-isomorphic 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +6 -3
- package/lib/index.cjs.d.ts +2 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +2 -0
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[![CircleCI][circleci-image]][circleci-url]
|
|
4
4
|
|
|
5
|
-
The Salesforce Commerce SDK Isomorphic allows easy interaction with the
|
|
5
|
+
The Salesforce Commerce SDK (Isomorphic) allows easy interaction with the B2C Commerce platform’s Shopper APIs on the Node.js runtime and works both in browsers and Node applications. For a Node-based SDK that can access the Admin APIs in addition to the Shopper APIs, see the main [Commerce SDK](https://github.com/SalesforceCommerceCloud/commerce-sdk).
|
|
6
6
|
|
|
7
7
|
## Getting Started
|
|
8
8
|
|
|
@@ -27,6 +27,9 @@ npm install commerce-sdk-isomorphic
|
|
|
27
27
|
| shortCode | Region-specific merchant ID. |
|
|
28
28
|
| siteId | Name of the site to access data from, for example, RefArch or SiteGenesis. |
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
### Configure the Isomorphic SDK
|
|
32
|
+
|
|
30
33
|
```javascript
|
|
31
34
|
/**
|
|
32
35
|
* Configure required parameters
|
|
@@ -67,9 +70,9 @@ const searchResult = await shopperSearch.productSearch({
|
|
|
67
70
|
|
|
68
71
|
#### CORS
|
|
69
72
|
|
|
70
|
-
The Salesforce Commerce API (SCAPI) does not support CORS, so a proxy must be used to be able to use the SDK.
|
|
73
|
+
The Salesforce Commerce API (SCAPI) does not support CORS, so a proxy must be used to be able to use the SDK.
|
|
71
74
|
|
|
72
|
-
### Advanced
|
|
75
|
+
### Advanced Options
|
|
73
76
|
|
|
74
77
|
Commerce SDK Isomorphic supports Fetch API options for [node-fetch](https://github.com/node-fetch/node-fetch/1#api) on server and [whatwg-fetch](https://github.github.io/fetch/) on browser with a simple configuration.
|
|
75
78
|
This sample code shows how to configure HTTP timeout and agent options.
|
package/lib/index.cjs.d.ts
CHANGED
|
@@ -23809,6 +23809,7 @@ declare namespace helpers {
|
|
|
23809
23809
|
* Logout a shopper. The shoppers access token and refresh token will be revoked and if the shopper authenticated with ECOM the OCAPI JWT will also be revoked.
|
|
23810
23810
|
* @param slasClient a configured instance of the ShopperLogin SDK client.
|
|
23811
23811
|
* @param parameters - parameters to pass in the API calls.
|
|
23812
|
+
* @param parameters.accessToken - a valid access token to exchange for a new access token (and refresh token).
|
|
23812
23813
|
* @param parameters.refreshToken - a valid refresh token to exchange for a new access token (and refresh token).
|
|
23813
23814
|
* @returns TokenResponse
|
|
23814
23815
|
*/
|
|
@@ -23818,6 +23819,7 @@ declare namespace helpers {
|
|
|
23818
23819
|
clientId: string;
|
|
23819
23820
|
siteId: string;
|
|
23820
23821
|
}>, parameters: {
|
|
23822
|
+
accessToken: string;
|
|
23821
23823
|
refreshToken: string;
|
|
23822
23824
|
}): Promise<TokenResponse>;
|
|
23823
23825
|
}
|