commerce-sdk-isomorphic 1.5.2 → 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 +57 -1
- package/README.md +9 -2
- package/lib/index.cjs.d.ts +19585 -5930
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +19585 -5930
- package/lib/index.esm.js +1 -1
- package/package.json +28 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
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
|
+
|
|
10
|
+
## v1.7.0
|
|
11
|
+
|
|
12
|
+
* Export API type definitions. They are available as top-level exports, following the pattern `<API Name>Types`.
|
|
13
|
+
|
|
14
|
+
Example usage:
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {ShopperBaskets, ShopperBasketsTypes} from "commerce-sdk-isomorphic"
|
|
18
|
+
|
|
19
|
+
const basketsClient = new ShopperBaskets(config)
|
|
20
|
+
const basket: ShopperBasketsTypes.Basket = await basketsClient.getBasket({ basketId: "some-basket" })
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## v1.6.0
|
|
24
|
+
|
|
25
|
+
#### API Changes
|
|
26
|
+
|
|
27
|
+
*Shopper Login*
|
|
28
|
+
|
|
29
|
+
* New Endpoints
|
|
30
|
+
|
|
31
|
+
| **Endpoint Name** | **Description** |
|
|
32
|
+
| ------------- |-------------|
|
|
33
|
+
| getPasswordResetToken | Request a reset password token |
|
|
34
|
+
| resetPassword | Creates a new password |
|
|
35
|
+
|
|
36
|
+
#### Enchancements
|
|
37
|
+
|
|
38
|
+
* More error handling has been added in the SLAS helpers
|
|
39
|
+
|
|
40
|
+
#### Bug fixes
|
|
41
|
+
|
|
42
|
+
* SLAS helper `loginRegisteredUserB2C` no longer calls `redirectURI` when running server side
|
|
43
|
+
|
|
44
|
+
#### Documentation
|
|
45
|
+
|
|
46
|
+
* `README` updated to explicitly note lack of CORS support for SCAPI
|
|
47
|
+
|
|
48
|
+
## v1.5.2
|
|
49
|
+
|
|
50
|
+
### New Features
|
|
51
|
+
|
|
52
|
+
* If the `throwOnBadResponse` flag is set, the error thrown now includes the full HTTP response object.
|
|
53
|
+
|
|
54
|
+
### Bug Fixes
|
|
55
|
+
|
|
56
|
+
* An error about invalid user-agent is no longer printed to console when making requests in a browser.
|
|
57
|
+
|
|
3
58
|
## v1.5.1
|
|
4
59
|
|
|
5
60
|
#### Documentation
|
|
@@ -35,7 +90,8 @@
|
|
|
35
90
|
#### Bug Fixes
|
|
36
91
|
|
|
37
92
|
* Added support for `application/x-www-form-urlencoded` request bodies.
|
|
38
|
-
|
|
93
|
+
* SLAS endpoints now work out of the box
|
|
94
|
+
|
|
39
95
|
## v1.4.0
|
|
40
96
|
|
|
41
97
|
#### New Features
|
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
|
|
@@ -65,7 +68,11 @@ const searchResult = await shopperSearch.productSearch({
|
|
|
65
68
|
});
|
|
66
69
|
```
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
#### CORS
|
|
72
|
+
|
|
73
|
+
The Salesforce Commerce API (SCAPI) does not support CORS, so a proxy must be used to be able to use the SDK.
|
|
74
|
+
|
|
75
|
+
### Advanced Options
|
|
69
76
|
|
|
70
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.
|
|
71
78
|
This sample code shows how to configure HTTP timeout and agent options.
|