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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.7.1
4
+
5
+ #### Bug fixes
6
+
7
+ * Fix SLAS callback error handling
8
+ * Fix SLAS logout function
9
+
3
10
  ## v1.7.0
4
11
 
5
12
  * Export API type definitions. They are available as top-level exports, following the pattern `<API Name>Types`.
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 Salesforce B2C Commerce platform Shopper APIs through a lightweight SDK that works both on browsers and NodeJS applications. For a more robust SDK, which includes our B2C Data APIS and Shopper APIs, see [our Node.js Commerce SDK](https://github.com/SalesforceCommerceCloud/commerce-sdk).
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. Code example on SDK usage with a proxy can be seen above.
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 options
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.
@@ -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
  }