commerce-sdk-isomorphic 1.7.0 → 1.8.0
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 +25 -0
- package/README.md +6 -3
- package/lib/index.cjs.d.ts +1514 -263
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +1514 -263
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v1.8.0
|
|
4
|
+
|
|
5
|
+
#### API Changes
|
|
6
|
+
|
|
7
|
+
*Shopper Login*
|
|
8
|
+
|
|
9
|
+
* New Endpoints
|
|
10
|
+
|
|
11
|
+
| **Endpoint Name** | **Description** |
|
|
12
|
+
| ------------- |-------------|
|
|
13
|
+
| getSessionBridgeAccessToken | Get a shopper JWT access token for a registered customer using session bridge |
|
|
14
|
+
| getTrustedAgentAuthorizationToken | Obtains a new agent on behalf authorization token for a registered customer |
|
|
15
|
+
| getTrustedAgentAccessToken | Get a shopper JWT access token for a registered customer using a trusted agent (Merchant) |
|
|
16
|
+
|
|
17
|
+
#### Enhancements
|
|
18
|
+
|
|
19
|
+
* SLAS helpers support the `channel_id` (`siteId`) parameter
|
|
20
|
+
|
|
21
|
+
## v1.7.1
|
|
22
|
+
|
|
23
|
+
#### Bug fixes
|
|
24
|
+
|
|
25
|
+
* Fix SLAS callback error handling
|
|
26
|
+
* Fix SLAS logout function
|
|
27
|
+
|
|
3
28
|
## v1.7.0
|
|
4
29
|
|
|
5
30
|
* 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
|
|
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.
|