@omniumretail/shared-resources 0.3.19 → 0.3.21
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/Aexp/mutate/inactivateFlowConfigurationQuery.hook.d.ts +2 -0
- package/dist/types/hooks/Others/editAllBellNotificationsStatusQuery.hook.d.ts +6 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/hooks/Aexp/mutate/deleteFlowConfigurationQuery.hook.ts +1 -2
- package/src/hooks/Aexp/mutate/inactivateFlowConfigurationQuery.hook.ts +18 -0
- package/src/hooks/Others/editAllBellNotificationsStatusQuery.hook.ts +19 -0
- package/src/hooks/index.ts +2 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { BellNotification } from '../../interfaces';
|
|
3
|
+
export interface editAllBellNotificationStatusProps extends UseQueryOptions<BellNotification> {
|
|
4
|
+
userId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const editAllBellNotificationStatusQueryHook: ({ userId }: editAllBellNotificationStatusProps) => import("@tanstack/react-query").UseMutationResult<BellNotification, unknown, BellNotification, unknown>;
|
|
@@ -365,6 +365,7 @@ export * from "./Aexp/mutate/runFlowExecutionQuery.hook";
|
|
|
365
365
|
export * from "./Aexp/mutate/useFlowConfigurationQuery.hook";
|
|
366
366
|
export * from "./Aexp/mutate/useFlowExecutionQuery.hook";
|
|
367
367
|
export * from "./Aexp/mutate/validateExecutionFileQuery.hook";
|
|
368
|
+
export * from "./Aexp/mutate/inactivateFlowConfigurationQuery.hook";
|
|
368
369
|
export * from "./Others/useJobTitlesQuery.hook";
|
|
369
370
|
export * from "./Others/useContractStatesQuery.hook";
|
|
370
371
|
export * from "./Others/useApplicationDataQuery.hook";
|
|
@@ -383,6 +384,7 @@ export * from "./Others/postUserAuthenticationQuery.hook";
|
|
|
383
384
|
export * from "./Others//editFieldsByBulkQuery.hook";
|
|
384
385
|
export * from "./Others/getBellNotificationsQuery.hook";
|
|
385
386
|
export * from "./Others/editBellNotificationsStatusQuery.hook";
|
|
387
|
+
export * from "./Others/editAllBellNotificationsStatusQuery.hook";
|
|
386
388
|
export * from "./Others/Vacation/get/getVacationPlanQuery.hook";
|
|
387
389
|
export * from "./Others/Vacation/others/aproveVacationPlanQuery.hook";
|
|
388
390
|
export * from "./Others/Vacation/others/postVacationPlanQuery.hook";
|
package/package.json
CHANGED
|
@@ -6,8 +6,7 @@ export const deleteFlowConfigurationQuery = () => {
|
|
|
6
6
|
const queryClient = useQueryClient();
|
|
7
7
|
return useMutation<FlowList, unknown, FlowList>((data: FlowList) => {
|
|
8
8
|
return putAuth0(`/AEXP/FlowConfiguration/Deleted?`, {
|
|
9
|
-
pId: data.Id
|
|
10
|
-
pIsActive: data.IsActive
|
|
9
|
+
pId: data.Id
|
|
11
10
|
}, data)
|
|
12
11
|
}, {
|
|
13
12
|
onSuccess: (data: FlowList) => {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { FlowList } from '../../../interfaces';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export const inactivateFlowConfigurationQuery = () => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation<FlowList, unknown, FlowList>((data: FlowList) => {
|
|
8
|
+
return putAuth0(`/AEXP/FlowConfiguration/Inactivate?`, {
|
|
9
|
+
pId: data.Id,
|
|
10
|
+
pIsActive: data.IsActive
|
|
11
|
+
}, data)
|
|
12
|
+
}, {
|
|
13
|
+
onSuccess: (data: FlowList) => {
|
|
14
|
+
queryClient.setQueryData(
|
|
15
|
+
['FLOW_INACTIVATE_QUERY'], data);
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseQueryOptions, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { BellNotification } from '../../interfaces';
|
|
3
|
+
import { putAuth0 } from '../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export interface editAllBellNotificationStatusProps extends UseQueryOptions<BellNotification> {
|
|
6
|
+
userId: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const editAllBellNotificationStatusQueryHook = ({ userId }: editAllBellNotificationStatusProps) => {
|
|
10
|
+
const queryClient = useQueryClient();
|
|
11
|
+
return useMutation<BellNotification, unknown, BellNotification>((data: BellNotification) => {
|
|
12
|
+
return putAuth0(`/ANOT/Notifications/${userId}/ReadAll`, undefined, data);
|
|
13
|
+
}, {
|
|
14
|
+
onSuccess: (data: BellNotification) => {
|
|
15
|
+
queryClient.setQueryData(
|
|
16
|
+
['BELL_NOTIFICATION_QUERY'], data);
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -430,6 +430,7 @@ export * from "./Aexp/mutate/runFlowExecutionQuery.hook";
|
|
|
430
430
|
export * from "./Aexp/mutate/useFlowConfigurationQuery.hook";
|
|
431
431
|
export * from "./Aexp/mutate/useFlowExecutionQuery.hook";
|
|
432
432
|
export * from "./Aexp/mutate/validateExecutionFileQuery.hook";
|
|
433
|
+
export * from "./Aexp/mutate/inactivateFlowConfigurationQuery.hook";
|
|
433
434
|
|
|
434
435
|
//Others
|
|
435
436
|
export * from "./Others/useJobTitlesQuery.hook";
|
|
@@ -450,6 +451,7 @@ export * from "./Others/postUserAuthenticationQuery.hook";
|
|
|
450
451
|
export * from "./Others//editFieldsByBulkQuery.hook";
|
|
451
452
|
export * from "./Others/getBellNotificationsQuery.hook";
|
|
452
453
|
export * from "./Others/editBellNotificationsStatusQuery.hook";
|
|
454
|
+
export * from "./Others/editAllBellNotificationsStatusQuery.hook";
|
|
453
455
|
export * from "./Others/Vacation/get/getVacationPlanQuery.hook";
|
|
454
456
|
export * from "./Others/Vacation/others/aproveVacationPlanQuery.hook";
|
|
455
457
|
export * from "./Others/Vacation/others/postVacationPlanQuery.hook";
|