@omniumretail/shared-resources 0.1.92 → 0.1.93
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.
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
1
2
|
import { PrinceChange } from "../../../interfaces";
|
|
2
|
-
|
|
3
|
+
type PriceChangePinQueryOptions = Omit<UseQueryOptions<PrinceChange, unknown>, 'queryKey' | 'queryFn'>;
|
|
4
|
+
export declare const getPriceChangePinQueryHook: (storeId: string, options?: PriceChangePinQueryOptions) => UseQueryResult<PrinceChange, unknown>;
|
|
5
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { useQuery } from "@tanstack/react-query";
|
|
1
|
+
import { useQuery, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
2
2
|
import { PrinceChange } from "../../../interfaces";
|
|
3
3
|
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type PriceChangePinQueryOptions = Omit<UseQueryOptions<PrinceChange, unknown>, 'queryKey' | 'queryFn'>;
|
|
6
|
+
|
|
7
|
+
export const getPriceChangePinQueryHook = (storeId: string, options?: PriceChangePinQueryOptions): UseQueryResult<PrinceChange, unknown> => {
|
|
6
8
|
return useQuery(
|
|
7
9
|
['PRICE_CHANGE_PIN_QUERY', storeId],
|
|
8
10
|
() => getAuth0<PrinceChange>(`/GNG/Users/Pin/${storeId}`),
|
|
9
11
|
{
|
|
10
|
-
enabled: !!
|
|
12
|
+
enabled: !!storeId,
|
|
13
|
+
...options,
|
|
11
14
|
},
|
|
12
15
|
);
|
|
13
16
|
}
|
|
14
|
-
|