commerce-sdk-isomorphic 1.5.0 → 1.6.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 +51 -0
- package/README.md +6 -2
- package/lib/index.cjs.d.ts +519 -222
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +519 -222
- package/lib/index.esm.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,57 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v1.6.0
|
|
4
|
+
|
|
5
|
+
#### API Changes
|
|
6
|
+
|
|
7
|
+
*Shopper Login*
|
|
8
|
+
|
|
9
|
+
* New Endpoints
|
|
10
|
+
|
|
11
|
+
| **Endpoint Name** | **Description** |
|
|
12
|
+
| ------------- |-------------|
|
|
13
|
+
| getPasswordResetToken | Request a reset password token |
|
|
14
|
+
| resetPassword | Creates a new password |
|
|
15
|
+
|
|
16
|
+
#### Enchancements
|
|
17
|
+
|
|
18
|
+
* More error handling has been added in the SLAS helpers
|
|
19
|
+
|
|
20
|
+
#### Bug fixes
|
|
21
|
+
|
|
22
|
+
* SLAS helper `loginRegisteredUserB2C` no longer calls `redirectURI` when running server side
|
|
23
|
+
#### Documentation
|
|
24
|
+
|
|
25
|
+
* `README` updated to explicitly note lack of CORS support for SCAPI
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## v1.5.2
|
|
29
|
+
|
|
30
|
+
### New Features
|
|
31
|
+
|
|
32
|
+
* If the `throwOnBadResponse` flag is set, the error thrown now includes the full HTTP response object.
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* An error about invalid user-agent is no longer printed to console when making requests in a browser.
|
|
37
|
+
|
|
38
|
+
## v1.5.1
|
|
39
|
+
|
|
40
|
+
#### Documentation
|
|
41
|
+
|
|
42
|
+
* Replaced links to the [Commerce Cloud Developer Center](https://developer.commercecloud.com/s/salesforce-developer-center) with links to the new [Salesforce Developer Portal](https://developer.salesforce.com/docs/commerce/commerce-api).
|
|
43
|
+
|
|
44
|
+
#### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* SLAS Login Helper no longer requests `redirect_uri` when running server-side
|
|
47
|
+
|
|
3
48
|
## v1.5.0
|
|
4
49
|
|
|
5
50
|
#### New Features
|
|
6
51
|
|
|
7
52
|
* SLAS helper functions have been added.
|
|
53
|
+
* New client configuration setting `throwOnBadResponse`. When set to true, responses other than `2xx` and `304` will throw an error.
|
|
54
|
+
|
|
8
55
|
#### New APIs
|
|
9
56
|
|
|
10
57
|
* *Shopper Context* has been added to the SDK.
|
|
@@ -20,6 +67,10 @@
|
|
|
20
67
|
| authorizePasswordlessCustomer | Logs a customer in using Core with their customer profiles loaded in ECOM. Allows the user to authenticate when their identity provider (Core) is down. |
|
|
21
68
|
| getPasswordLessAccessToken | Evaluate the `pwdless_token` and issue the shopper token (JWT). |
|
|
22
69
|
|
|
70
|
+
#### Bug Fixes
|
|
71
|
+
|
|
72
|
+
* Added support for `application/x-www-form-urlencoded` request bodies.
|
|
73
|
+
- SLAS endpoints now work out of the box
|
|
23
74
|
## v1.4.0
|
|
24
75
|
|
|
25
76
|
#### New Features
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ npm install commerce-sdk-isomorphic
|
|
|
31
31
|
/**
|
|
32
32
|
* Configure required parameters
|
|
33
33
|
*
|
|
34
|
-
* To learn more about the parameters please refer to https://developer.
|
|
34
|
+
* To learn more about the parameters please refer to https://developer.salesforce.com/docs/commerce/commerce-api/guide/get-started.html
|
|
35
35
|
*/
|
|
36
36
|
import {helpers, ShopperLogin, ShopperSearch} from 'commerce-sdk-isomorphic';
|
|
37
37
|
|
|
@@ -65,6 +65,10 @@ const searchResult = await shopperSearch.productSearch({
|
|
|
65
65
|
});
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
#### CORS
|
|
69
|
+
|
|
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.
|
|
71
|
+
|
|
68
72
|
### Advanced options
|
|
69
73
|
|
|
70
74
|
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.
|
|
@@ -108,7 +112,7 @@ _throwOnBadResponse:_ Default value is false. When set to true, the SDK throws a
|
|
|
108
112
|
|
|
109
113
|
A collection of helper functions are available in this SDK to simplify [Public
|
|
110
114
|
Client Shopper Login OAuth
|
|
111
|
-
flows](https://developer.
|
|
115
|
+
flows](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary). See sample code above for guest login.
|
|
112
116
|
|
|
113
117
|
## License Information
|
|
114
118
|
|