@salesforce/commerce-sdk-react 5.6.0-nightly-20261109080318 → 6.0.0-preview.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 CHANGED
@@ -1,8 +1,8 @@
1
- ## v5.6.0-nightly-20261109080318 (Nov 09, 2026)
2
- ## v5.6.0-dev (Nov 09, 2026)
3
- ## v3.22.0-nightly-20261109080318 (Nov 09, 2026)
4
- ## v5.6.0-dev (Oct 09, 2026)
5
- - [Feature] When a SLAS private client secret is set directly via `clientSecret` (not PWA Kit private client mode), `loginRegisteredUserB2C` now sends the `x-slas-client-auth` header so the login works with SLAS strict client auth.
1
+ ## v6.0.0-preview.0 (Nov 09, 2026)
2
+ - [Breaking] Upgrade to `commerce-sdk-isomorphic@5.8.0`. Require `login_id` and `channel_id` on `getPasswordLessAccessToken` / `LoginPasswordlessUser` and forward them to the helper as camelCase `loginId` / `channelId` (mapped to snake_case on the wire by isomorphic). Also remove the stale `@ts-ignore` on `resetPassword` `user_id` (present in SDK types since 5.2.0); `user_id` and `channel_id` continue to be sent on password reset. To migrate, pass the shopper's `login_id` (the same value sent to `authorizePasswordless`) and the site `channel_id` to every `getPasswordLessAccessToken` / `useAuthHelper(AuthHelpers.LoginPasswordlessUser)` call. [#4075](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/4075)
3
+ - [Breaking] `resetPassword` / `ResetPassword` now requires `user_id` and throws before calling SLAS when it is missing. SLAS checks it against the user the reset token was issued for. To migrate, pass the email the reset was requested for as `user_id` when calling `resetPassword`. [#4092](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/4092)
4
+ - [Feature] When a SLAS private client secret is set directly via `clientSecret` (not PWA Kit private client mode), `loginRegisteredUserB2C` now sends the `x-slas-client-auth` header so the login works with SLAS strict client auth. `authorizeIDP` does not send the header, because it navigates the browser to SLAS and a navigation cannot carry custom headers; strict client auth for IDP login requires the PWA Kit proxy. [#4074](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/4074)
5
+
6
6
  ## v5.5.0 (Oct 08, 2026)
7
7
  - [Feature] Add a `useDeliveryEstimates` query hook and `ShopperDeliveryEstimates` client registration for the Shopper Delivery Estimates API. This requires `commerce-sdk-isomorphic` `5.7.0`, which includes the generated client. The TypeDoc entry is grouped with the Shopper Delivery Estimates API and links to the endpoint, SDK, and TanStack Query references. [#4013](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/4013)
8
8
  - [Feature] Add Shopper Experience `useComponent` query hook for fetching a single Page Designer component by component ID, with Page Designer edit/preview mode support (raw response preserved when a `mode` or `pdToken` is present). Page Designer mode uses `rawResponse`, which bypasses the SDK's `throwOnBadResponse` check, so `usePage`, `usePages`, and `useComponent` now explicitly throw a `ResponseError` on a non-ok response in that mode instead of parsing the error body as successful data.
package/auth/index.d.ts CHANGED
@@ -59,6 +59,13 @@ type AuthorizePasswordlessParams = {
59
59
  };
60
60
  type GetPasswordLessAccessTokenParams = {
61
61
  pwdlessLoginToken: string;
62
+ /**
63
+ * Shopper login ID (typically email) used when the passwordless token was requested.
64
+ * Must exactly match the ID used during passwordless login.
65
+ */
66
+ login_id: string;
67
+ /** Channel / site ID for the passwordless token exchange. */
68
+ channel_id: string;
62
69
  /** When true, SLAS will register the customer if not already registered */
63
70
  register_customer?: boolean | string;
64
71
  };
@@ -501,6 +508,8 @@ declare class Auth {
501
508
  authorizePasswordless(parameters: AuthorizePasswordlessParams): Promise<Response>;
502
509
  /**
503
510
  * A wrapper method for commerce-sdk-isomorphic helper: getPasswordLessAccessToken.
511
+ * Requires `login_id` and `channel_id`; forwards them to the helper as camelCase
512
+ * `loginId` / `channelId` (commerce-sdk-isomorphic@5.8.0 maps these to the wire body).
504
513
  */
505
514
  getPasswordLessAccessToken(parameters: GetPasswordLessAccessTokenParams): Promise<helpers.TokenResponse>;
506
515
  /**
@@ -510,7 +519,7 @@ declare class Auth {
510
519
  getPasswordResetToken(parameters: ShopperLoginTypes.getPasswordResetTokenBodyType): Promise<Response>;
511
520
  /**
512
521
  * A wrapper method for the SLAS endpoint: resetPassword.
513
- *
522
+ * Requires `user_id`: SLAS checks it against the user the reset token was issued for.
514
523
  */
515
524
  resetPassword(parameters: ShopperLoginTypes.resetPasswordBodyType): Promise<void>;
516
525
  /**
package/auth/index.js CHANGED
@@ -1501,6 +1501,8 @@ class Auth {
1501
1501
 
1502
1502
  /**
1503
1503
  * A wrapper method for commerce-sdk-isomorphic helper: getPasswordLessAccessToken.
1504
+ * Requires `login_id` and `channel_id`; forwards them to the helper as camelCase
1505
+ * `loginId` / `channelId` (commerce-sdk-isomorphic@5.8.0 maps these to the wire body).
1504
1506
  */
1505
1507
  getPasswordLessAccessToken(parameters) {
1506
1508
  var _this15 = this;
@@ -1517,11 +1519,13 @@ class Auth {
1517
1519
  },
1518
1520
  parameters: _objectSpread(_objectSpread({
1519
1521
  pwdlessLoginToken,
1522
+ loginId: parameters.login_id,
1523
+ channelId: parameters.channel_id,
1520
1524
  dnt: dntPref !== undefined ? String(dntPref) : undefined
1521
1525
  }, usid && {
1522
1526
  usid
1523
1527
  }), parameters.register_customer !== undefined && {
1524
- register_customer: typeof parameters.register_customer === 'boolean' ? String(parameters.register_customer) : parameters.register_customer
1528
+ registerCustomer: typeof parameters.register_customer === 'boolean' ? String(parameters.register_customer) : parameters.register_customer
1525
1529
  }),
1526
1530
  enableHttpOnlySessionCookies: _this15.enableHttpOnlySessionCookies
1527
1531
  });
@@ -1581,19 +1585,21 @@ class Auth {
1581
1585
 
1582
1586
  /**
1583
1587
  * A wrapper method for the SLAS endpoint: resetPassword.
1584
- *
1588
+ * Requires `user_id`: SLAS checks it against the user the reset token was issued for.
1585
1589
  */
1586
1590
  resetPassword(parameters) {
1587
1591
  var _this17 = this;
1588
1592
  return _asyncToGenerator(function* () {
1593
+ if (!parameters.user_id) {
1594
+ throw new Error('Required argument user_id is not provided');
1595
+ }
1589
1596
  const slasClient = _this17.client;
1590
1597
  const options = {
1591
1598
  headers: {
1592
1599
  Authorization: ''
1593
1600
  },
1594
- body: _objectSpread(_objectSpread({}, parameters.user_id && {
1595
- user_id: parameters.user_id
1596
- }), {}, {
1601
+ body: _objectSpread({
1602
+ user_id: parameters.user_id,
1597
1603
  pwd_action_token: parameters.pwd_action_token,
1598
1604
  channel_id: parameters.channel_id || slasClient.clientConfig.parameters.siteId,
1599
1605
  client_id: parameters.client_id || slasClient.clientConfig.parameters.clientId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/commerce-sdk-react",
3
- "version": "5.6.0-nightly-20261109080318",
3
+ "version": "6.0.0-preview.0",
4
4
  "description": "A library that provides react hooks for fetching data from Commerce Cloud",
5
5
  "homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/ecom-react-hooks#readme",
6
6
  "bugs": {
@@ -41,12 +41,12 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@salesforce/storefront-next-runtime": "1.3.1",
44
- "commerce-sdk-isomorphic": "5.7.0",
44
+ "commerce-sdk-isomorphic": "5.8.0",
45
45
  "js-cookie": "^3.0.1",
46
46
  "jwt-decode": "^4.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@salesforce/pwa-kit-dev": "3.22.0-nightly-20261109080318",
49
+ "@salesforce/pwa-kit-dev": "3.22.0-preview.0",
50
50
  "@tanstack/react-query": "^4.28.0",
51
51
  "@testing-library/jest-dom": "^5.16.5",
52
52
  "@testing-library/react": "^14.0.0",
@@ -61,7 +61,7 @@
61
61
  "@types/react-helmet": "~6.1.6",
62
62
  "@types/react-router-dom": "~5.3.3",
63
63
  "cross-env": "^5.2.1",
64
- "internal-lib-build": "3.22.0-nightly-20261109080318",
64
+ "internal-lib-build": "3.22.0-preview.0",
65
65
  "jsonwebtoken": "^9.0.0",
66
66
  "nock": "^13.3.0",
67
67
  "nodemon": "^2.0.22",
@@ -98,5 +98,5 @@
98
98
  "publishConfig": {
99
99
  "directory": "dist"
100
100
  },
101
- "gitHead": "f3780ac1cdb05cff1d6b09e9c5c386a2b1b1dde5"
101
+ "gitHead": "48bba63cf8923a3cebce31ffa0d81dba52673ce2"
102
102
  }