@viu/emporix-sdk-react 2.5.1 → 2.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 +17 -0
- package/dist/{chunk-QMBRDYLW.js → chunk-RCI7242Y.js} +3 -3
- package/dist/{chunk-QMBRDYLW.js.map → chunk-RCI7242Y.js.map} +1 -1
- package/dist/{chunk-D43CSHK3.js → chunk-SDRV73LG.js} +34 -2
- package/dist/chunk-SDRV73LG.js.map +1 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +2 -2
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{provider-fvcYdqqX.d.ts → provider-CLNEKOuu.d.ts} +13 -1
- package/dist/{provider-BhvQWnnh.d.cts → provider-WHISqTG2.d.cts} +13 -1
- package/dist/provider.cjs +32 -0
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +1 -1
- package/dist/{use-returns-Dspo-4xb.d.ts → use-returns-BED8-FtN.d.ts} +1 -1
- package/dist/{use-returns-C1juSNfc.d.cts → use-returns-BbOXQG4L.d.cts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-D43CSHK3.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @viu/emporix-sdk-react
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#92](https://github.com/viuteam/emporix-sdk/pull/92) [`45a2bd8`](https://github.com/viuteam/emporix-sdk/commit/45a2bd8d83cb46d775301790cb2efc60805efc90) Thanks [@amnael1](https://github.com/amnael1)! - Add opt-in reactive customer-token auto-refresh.
|
|
8
|
+
|
|
9
|
+
Core: `EmporixClient.setCustomerTokenRefresher(refresher)` registers a
|
|
10
|
+
single-flight `CustomerTokenRefresher`; on a `customer`-kind 401 the HTTP layer
|
|
11
|
+
refreshes once and retries. Off by default — the customer token stays
|
|
12
|
+
caller-owned.
|
|
13
|
+
|
|
14
|
+
React: `EmporixProvider` gains `autoRefreshCustomerToken` and
|
|
15
|
+
`onCustomerSessionExpired`. When enabled, a customer 401 is transparently
|
|
16
|
+
refreshed via the stored refresh token (anonymous-authorized
|
|
17
|
+
`GET /refreshauthtoken`) and the request is retried; B2B `legalEntityId` is
|
|
18
|
+
preserved.
|
|
19
|
+
|
|
3
20
|
## 2.5.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEmporix, EmporixSiteContext, useActiveCompany } from './chunk-
|
|
1
|
+
import { useEmporix, EmporixSiteContext, useActiveCompany } from './chunk-SDRV73LG.js';
|
|
2
2
|
import { useContext, useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { useQueryClient, useQuery, useMutation, useInfiniteQuery } from '@tanstack/react-query';
|
|
4
4
|
import { auth, EmporixError } from '@viu/emporix-sdk';
|
|
@@ -1420,5 +1420,5 @@ function useUpdateApproval() {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
|
|
1422
1422
|
export { useActiveCart, useAddToShoppingList, useAddressMutations, useApproval, useApprovals, useAssignContact, useAvailabilities, useAvailability, useCancelOrder, useCart, useCartMutations, useCategories, useCategoriesInfinite, useCategory, useCategoryTree, useChangePassword, useCheckout, useCompany, useCompanyContacts, useCompanyGroups, useCompanyLocations, useCompanySwitcher, useCreateApproval, useCreateCart, useCreateCompany, useCreateLocation, useCreateReturn, useCreateShoppingList, useCustomerAddresses, useCustomerSession, useDefaultSite, useDeleteCompany, useDeleteLocation, useDeleteShoppingList, useMatchPrices, useMatchPricesChunked, useMyCompanies, useMyOrders, useMyOrdersInfinite, useMyReturns, useMyRewardPoints, useMyRewardPointsSummary, useMySegmentCategories, useMySegmentCategoriesInfinite, useMySegmentCategoryTree, useMySegmentItems, useMySegmentProducts, useMySegmentProductsInfinite, useMySegments, useOrder, useOrderTransition, usePasswordReset, usePaymentModes, useProduct, useProductByCode, useProductMedia, useProductSearch, useProducts, useProductsByCodes, useProductsInCategory, useProductsInCategoryInfinite, useProductsInfinite, useRedeemCoupon, useRedeemOptions, useRedeemRewardPoints, useRemoveFromShoppingList, useReorder, useReturn, useSalesOrder, useSetShoppingListItemQuantity, useShoppingLists, useSiteContext, useSites, useUnassignContact, useUpdateApproval, useUpdateCompany, useUpdateContactAssignment, useUpdateCustomer, useUpdateLocation, useUpdateSalesOrder, useValidateCoupon, useVariantChildren };
|
|
1423
|
-
//# sourceMappingURL=chunk-
|
|
1424
|
-
//# sourceMappingURL=chunk-
|
|
1423
|
+
//# sourceMappingURL=chunk-RCI7242Y.js.map
|
|
1424
|
+
//# sourceMappingURL=chunk-RCI7242Y.js.map
|