@omniumretail/shared-resources 0.1.34 → 0.1.36
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/dist/bundle.js +1 -1
- package/dist/types/hooks/Others/getNotificationTitleQuery.hook.d.ts +8 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/interfaces/EvaluationCycle.d.ts +1 -0
- package/dist/types/interfaces/NotificationTitle.d.ts +7 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/hooks/Others/getNotificationTitleQuery.hook.ts +19 -0
- package/src/hooks/index.ts +1 -0
- package/src/interfaces/EvaluationCycle.ts +1 -0
- package/src/interfaces/NotificationTitle.ts +8 -0
- package/src/interfaces/index.ts +1 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { NotificationTitle, ResponseList } from "../../interfaces";
|
|
3
|
+
interface NotificationTitleQueryHookQueryProps extends Omit<UseQueryOptions<ResponseList<"NotificationTypes", NotificationTitle>>, "queryKey"> {
|
|
4
|
+
page?: number;
|
|
5
|
+
records?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const getNotificationTitleQueryHook: ({ page, records, ...options }: NotificationTitleQueryHookQueryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"NotificationTypes", NotificationTitle>, unknown>;
|
|
8
|
+
export {};
|
|
@@ -54,3 +54,4 @@ export * from './Others/postCheckoutsMutateQuery.hook';
|
|
|
54
54
|
export * from './Others/postVerifyUserQuery.hook';
|
|
55
55
|
export * from './Others/postVerifyImageQuery.hook';
|
|
56
56
|
export * from './Others/getWeeklyWorkloadQuery.hook';
|
|
57
|
+
export * from './Others/getNotificationTitleQuery.hook';
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { NotificationTitle, ResponseList } from "../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
interface NotificationTitleQueryHookQueryProps extends Omit<UseQueryOptions<ResponseList<"NotificationTypes", NotificationTitle>>, "queryKey"> {
|
|
6
|
+
page?: number;
|
|
7
|
+
records?: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getNotificationTitleQueryHook = ({ page, records, ...options }: NotificationTitleQueryHookQueryProps) => {
|
|
11
|
+
return useQuery(
|
|
12
|
+
['NOTIFICATION_TITLE_QUERY', page, records],
|
|
13
|
+
() => getAuth0<ResponseList<"NotificationTypes", NotificationTitle>>('/APE/NotificationType', {
|
|
14
|
+
pPage: page || 1,
|
|
15
|
+
pRecords: records || 999999
|
|
16
|
+
}),
|
|
17
|
+
options
|
|
18
|
+
);
|
|
19
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -73,3 +73,4 @@ export * from './Others/postCheckoutsMutateQuery.hook';
|
|
|
73
73
|
export * from './Others/postVerifyUserQuery.hook';
|
|
74
74
|
export * from './Others/postVerifyImageQuery.hook';
|
|
75
75
|
export * from './Others/getWeeklyWorkloadQuery.hook';
|
|
76
|
+
export * from './Others/getNotificationTitleQuery.hook';
|
package/src/interfaces/index.ts
CHANGED