@shipengine/react-api 2.12.0 → 2.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/react-api",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -5,11 +5,18 @@ import { CodedError } from "@shipengine/js-api";
5
5
  * @category Entities
6
6
  * Generic object type to be used in any useQuery hook
7
7
  * @param TResponseData - The response data type from the query
8
- * @param TQueryFnParams - The data type for the queryFnParams
8
+ * @param TQueryFnParams - Optional - The data type for the queryFnParams
9
9
  */
10
10
  export type QueryProps<TResponseData, TQueryFnParams = unknown> = {
11
11
  queryFnParams?: TQueryFnParams;
12
12
  } & Pick<UseQueryOptions<AxiosResponse<TResponseData, any>, CodedError[], TResponseData>, "cacheTime" | "enabled" | "staleTime">;
13
+ /**
14
+ * @category Entities
15
+ * Generic object type to be used in any useQuery hook
16
+ * @param TResponseData - The response data type from the query
17
+ * @param TQueryFnParams - The data type for the queryFnParams
18
+ */
19
+ export type QueryPropsRequiredParams<TResponseData, TQueryFnParams = unknown> = QueryProps<TResponseData, TQueryFnParams> & Required<Pick<QueryProps<TResponseData, TQueryFnParams>, "queryFnParams">>;
13
20
  /**
14
21
  * @category Entities
15
22
  * Generic object type to be used in any useMutation hook