@availity/hooks 5.1.11 → 5.2.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
@@ -2,6 +2,15 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ # [5.2.0](https://github.com/Availity/availity-react/compare/@availity/hooks@5.1.11...@availity/hooks@5.2.0) (2026-06-09)
6
+
7
+
8
+ ### Features
9
+
10
+ * **hooks:** add useStash hook ([da6aff7](https://github.com/Availity/availity-react/commit/da6aff7039ae00ab995da74aa57d843cff301f66))
11
+
12
+
13
+
5
14
  ## [5.1.11](https://github.com/Availity/availity-react/compare/@availity/hooks@5.1.10...@availity/hooks@5.1.11) (2026-03-13)
6
15
 
7
16
 
package/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export { default as usePermissions } from './types/usePermissions';
9
9
  export { default as useOrganizations } from './types/useOrganizations';
10
10
  export { default as useUpdateNav } from './types/useUpdateNav';
11
11
  export { default as useWindowDimensions } from './types/useWindowDimensions';
12
+ export { default as useStash } from './types/useStash';
package/index.js CHANGED
@@ -9,3 +9,4 @@ export { default as usePermissions } from './src/usePermissions';
9
9
  export { default as useOrganizations } from './src/useOrganizations';
10
10
  export { default as useUpdateNav } from './src/useUpdateNav';
11
11
  export { default as useWindowDimensions } from './src/useWindowDimensions';
12
+ export { default as useStash } from './src/useStash';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/hooks",
3
- "version": "5.1.11",
3
+ "version": "5.2.0",
4
4
  "description": "A group of pre-built hooks that are common in most apps",
5
5
  "keywords": [
6
6
  "react",
@@ -29,7 +29,7 @@
29
29
  "prop-types": "^15.8.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@availity/api-axios": "^12.1.0",
32
+ "@availity/api-axios": "^12.3.1",
33
33
  "@availity/message-core": "^8.0.2",
34
34
  "axios": "^1.13.2",
35
35
  "react": "^18.3.1",
@@ -0,0 +1,14 @@
1
+ import { avStashApi } from '@availity/api-axios';
2
+ import { useQuery } from '@tanstack/react-query';
3
+
4
+ const fetchStash = async (sessionId) => {
5
+ const response = await avStashApi.get(sessionId);
6
+ return response?.data;
7
+ };
8
+
9
+ export default function useStash(sessionId, options) {
10
+ return useQuery(['stash', sessionId], () => fetchStash(sessionId), {
11
+ enabled: !!sessionId,
12
+ ...options,
13
+ });
14
+ }
@@ -0,0 +1,10 @@
1
+ import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
+
3
+ export type StashData = Record<string, unknown>;
4
+
5
+ declare function useStash(
6
+ sessionId: string,
7
+ options?: UseQueryOptions<StashData, unknown>
8
+ ): UseQueryResult<StashData, unknown>;
9
+
10
+ export default useStash;