@omniumretail/shared-resources 0.3.20 → 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.
@@ -0,0 +1,2 @@
1
+ import { FlowList } from '../../../interfaces';
2
+ export declare const inactivateFlowConfigurationQuery: () => import("@tanstack/react-query").UseMutationResult<FlowList, unknown, FlowList, 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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -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
+ }
@@ -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";