@omniumretail/shared-resources 0.3.8 → 0.3.10
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/Analytics/get/getArchivedAnalyticsQuery.hook.d.ts +3 -1
- package/dist/types/hooks/Analytics/get/useAnalyticsUserIdQuery.hook.d.ts +3 -1
- package/dist/types/hooks/Orch/others/reprocessingInstanceQuery.hook.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/hooks/Analytics/get/getArchivedAnalyticsQuery.hook.ts +7 -3
- package/src/hooks/Analytics/get/useAnalyticsUserIdQuery.hook.ts +7 -3
- package/src/hooks/Orch/others/reprocessingInstanceQuery.hook.ts +14 -0
- package/src/hooks/index.ts +1 -0
|
@@ -7,5 +7,7 @@ export interface ArchivedAnalyticsQuery extends UseQueryOptions<ResponseList<"Us
|
|
|
7
7
|
userId: string;
|
|
8
8
|
sortBy?: string;
|
|
9
9
|
sortDirection?: string;
|
|
10
|
+
terms?: string;
|
|
11
|
+
query?: string;
|
|
10
12
|
}
|
|
11
|
-
export declare const getArchivedAnalyticsQueryHook: ({ page, records, userId,
|
|
13
|
+
export declare const getArchivedAnalyticsQueryHook: ({ page, records, userId, sortBy, sortDirection, terms, query, pYear }: ArchivedAnalyticsQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"UserEvaluationCycleDTOs", AnalyticsUserId>, unknown>;
|
|
@@ -7,5 +7,7 @@ export interface AnalyticsUserIdQuery extends UseQueryOptions<ResponseList<"User
|
|
|
7
7
|
userId: string;
|
|
8
8
|
sortBy?: string;
|
|
9
9
|
sortDirection?: string;
|
|
10
|
+
terms?: string;
|
|
11
|
+
query?: string;
|
|
10
12
|
}
|
|
11
|
-
export declare const useAnalyticsUserIdQueryHook: ({ page, records, userId,
|
|
13
|
+
export declare const useAnalyticsUserIdQueryHook: ({ page, records, userId, sortBy, sortDirection, terms, query, pYear }: AnalyticsUserIdQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"UserEvaluationCycleDTOs", AnalyticsUserId>, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const reprocessingInstanceQueryHook: (instanceId: string[]) => import("@tanstack/react-query").UseMutationResult<any, unknown, string[], unknown>;
|
|
@@ -325,6 +325,7 @@ export * from './Orch/get/getInstancesQuery.hook';
|
|
|
325
325
|
export * from './Orch/get/getMacrosQuery.hook';
|
|
326
326
|
export * from './Orch/get/getInstanceByIdQuery.hook';
|
|
327
327
|
export * from './Orch/others/runMacrosQuery.hook';
|
|
328
|
+
export * from './Orch/others/reprocessingInstanceQuery.hook';
|
|
328
329
|
export * from './Orch/get/getMacrosUserQuery.hook';
|
|
329
330
|
export * from "./ATIM/BackOffice/get/useEmployeeWorklogDetails.hook";
|
|
330
331
|
export * from "./ATIM/BackOffice/get/useEmployeeQueryHook.hook";
|
package/package.json
CHANGED
|
@@ -9,17 +9,21 @@ export interface ArchivedAnalyticsQuery extends UseQueryOptions<ResponseList<"Us
|
|
|
9
9
|
userId: string;
|
|
10
10
|
sortBy?: string;
|
|
11
11
|
sortDirection?: string;
|
|
12
|
+
terms?: string;
|
|
13
|
+
query?: string;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export const getArchivedAnalyticsQueryHook = ({ page, records, userId,
|
|
16
|
+
export const getArchivedAnalyticsQueryHook = ({ page, records, userId, sortBy, sortDirection, terms, query, pYear }: ArchivedAnalyticsQuery) => {
|
|
15
17
|
return useQuery(
|
|
16
|
-
['ARCHIVED_ANALYTICS_QUERY', page, records, userId,
|
|
18
|
+
['ARCHIVED_ANALYTICS_QUERY', page, records, userId, sortBy, sortDirection, terms, query, pYear],
|
|
17
19
|
() => getAuth0<ResponseList<"UserEvaluationCycleDTOs", AnalyticsUserId>>(`/APE/Analytics/GetArchive/${userId}`, {
|
|
18
20
|
pPage: page || 1,
|
|
19
21
|
pSortBy: sortBy || "Type",
|
|
20
22
|
pSortDirection: sortDirection || "asc",
|
|
21
23
|
pRecords: records || 50,
|
|
22
|
-
|
|
24
|
+
pTerms: terms,
|
|
25
|
+
pQuery: query,
|
|
26
|
+
// pYear: pYear
|
|
23
27
|
}),
|
|
24
28
|
{
|
|
25
29
|
keepPreviousData: true,
|
|
@@ -9,17 +9,21 @@ export interface AnalyticsUserIdQuery extends UseQueryOptions<ResponseList<"User
|
|
|
9
9
|
userId: string;
|
|
10
10
|
sortBy?: string;
|
|
11
11
|
sortDirection?: string;
|
|
12
|
+
terms?: string;
|
|
13
|
+
query?: string;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export const useAnalyticsUserIdQueryHook = ({ page, records, userId,
|
|
16
|
+
export const useAnalyticsUserIdQueryHook = ({ page, records, userId, sortBy, sortDirection, terms, query, pYear }: AnalyticsUserIdQuery) => {
|
|
15
17
|
return useQuery(
|
|
16
|
-
['ANALYTICS_USER_ID_QUERY', page, records, userId,
|
|
18
|
+
['ANALYTICS_USER_ID_QUERY', page, records, userId, sortBy, sortDirection, terms, query, pYear],
|
|
17
19
|
() => getAuth0<ResponseList<"UserEvaluationCycleDTOs", AnalyticsUserId>>(`/APE/Analytics/EvaluationCycles/User/${userId}`, {
|
|
18
20
|
pPage: page || 1,
|
|
19
21
|
pSortBy: sortBy || "Type",
|
|
20
22
|
pSortDirection: sortDirection || "asc",
|
|
21
23
|
pRecords: records || 50,
|
|
22
|
-
|
|
24
|
+
pTerms: terms,
|
|
25
|
+
pQuery: query,
|
|
26
|
+
// pYear: pYear
|
|
23
27
|
}),
|
|
24
28
|
{
|
|
25
29
|
keepPreviousData: true,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
3
|
+
|
|
4
|
+
export const reprocessingInstanceQueryHook = (instanceId: string[]) => {
|
|
5
|
+
const queryClient = useQueryClient();
|
|
6
|
+
return useMutation<any, unknown, string[]>(() => {
|
|
7
|
+
return postAuth0(`/ORQ/Instances/Reprocessing?`, undefined, instanceId);
|
|
8
|
+
}, {
|
|
9
|
+
onSuccess: (data) => {
|
|
10
|
+
queryClient.setQueryData(
|
|
11
|
+
['REPROCESSING_INSTANCE_QUERY'], data);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -382,6 +382,7 @@ export * from './Orch/get/getInstancesQuery.hook';
|
|
|
382
382
|
export * from './Orch/get/getMacrosQuery.hook';
|
|
383
383
|
export * from './Orch/get/getInstanceByIdQuery.hook';
|
|
384
384
|
export * from './Orch/others/runMacrosQuery.hook';
|
|
385
|
+
export * from './Orch/others/reprocessingInstanceQuery.hook';
|
|
385
386
|
export * from './Orch/get/getMacrosUserQuery.hook';
|
|
386
387
|
|
|
387
388
|
//BackofficeAtim
|