@omniumretail/shared-resources 0.3.27 → 0.3.29
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/get/getFlowListQuery.hook.d.ts +2 -1
- package/dist/types/hooks/Orch/others/updateMacroStatusQuery.hook.d.ts +6 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/hooks/Aexp/get/getFlowListQuery.hook.ts +5 -3
- package/src/hooks/Orch/others/updateMacroStatusQuery.hook.ts +23 -0
- package/src/hooks/index.ts +1 -0
|
@@ -7,6 +7,7 @@ interface FlowListProps extends Omit<UseQueryOptions<ResponseList<"FlowConfigura
|
|
|
7
7
|
sortDirection: string;
|
|
8
8
|
terms?: string;
|
|
9
9
|
query?: string;
|
|
10
|
+
roleList?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare const getFlowListQuery: ({ page, records, sortBy, sortDirection, terms, query, ...options }: FlowListProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"FlowConfigurationResponses", FlowList>, unknown>;
|
|
12
|
+
export declare const getFlowListQuery: ({ page, records, sortBy, sortDirection, terms, query, roleList, ...options }: FlowListProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"FlowConfigurationResponses", FlowList>, unknown>;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TransferPickProducts } from '../../../interfaces/TransferPickProducts';
|
|
2
|
+
export interface UpdateMacroStatusProps {
|
|
3
|
+
macroId: string;
|
|
4
|
+
status: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const updateMacroStatusQueryHook: ({ macroId, status }: UpdateMacroStatusProps) => import("@tanstack/react-query").UseMutationResult<TransferPickProducts, unknown, void, unknown>;
|
|
@@ -336,6 +336,7 @@ export * from './Orch/get/getMacrosQuery.hook';
|
|
|
336
336
|
export * from './Orch/get/getInstanceByIdQuery.hook';
|
|
337
337
|
export * from './Orch/others/runMacrosQuery.hook';
|
|
338
338
|
export * from './Orch/others/reprocessingInstanceQuery.hook';
|
|
339
|
+
export * from './Orch/others/updateMacroStatusQuery.hook';
|
|
339
340
|
export * from './Orch/get/getMacrosUserQuery.hook';
|
|
340
341
|
export * from './Orch/get/getMonitoringComponents.hook';
|
|
341
342
|
export * from "./Watson/get/getCloseSession.hook";
|
package/package.json
CHANGED
|
@@ -9,18 +9,20 @@ interface FlowListProps extends Omit<UseQueryOptions<ResponseList<"FlowConfigura
|
|
|
9
9
|
sortDirection: string;
|
|
10
10
|
terms?: string;
|
|
11
11
|
query?: string;
|
|
12
|
+
roleList?: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const getFlowListQuery = ({ page, records, sortBy, sortDirection, terms, query, ...options }: FlowListProps) => {
|
|
15
|
+
export const getFlowListQuery = ({ page, records, sortBy, sortDirection, terms, query, roleList, ...options }: FlowListProps) => {
|
|
15
16
|
return useQuery(
|
|
16
|
-
['FLOW_LIST_QUERY', page, records, sortBy, sortDirection, terms, query, options],
|
|
17
|
+
['FLOW_LIST_QUERY', page, records, sortBy, sortDirection, terms, query, roleList, options],
|
|
17
18
|
() => getAuth0<ResponseList<"FlowConfigurationResponses", FlowList>>(`/AEXP/FlowConfiguration`, {
|
|
18
19
|
pPage: page || 1,
|
|
19
20
|
pRecords: records || 50,
|
|
20
21
|
pSortBy: sortBy || "Name",
|
|
21
22
|
pSortDirection: sortDirection || "asc",
|
|
22
23
|
pTerms: terms || "",
|
|
23
|
-
pQuery: query || ""
|
|
24
|
+
pQuery: query || "",
|
|
25
|
+
pRoleList: roleList || ""
|
|
24
26
|
}),
|
|
25
27
|
options
|
|
26
28
|
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { TransferPickProducts } from '../../../interfaces/TransferPickProducts';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export interface UpdateMacroStatusProps {
|
|
6
|
+
macroId: string;
|
|
7
|
+
status: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const updateMacroStatusQueryHook = ({ macroId, status }: UpdateMacroStatusProps) => {
|
|
11
|
+
const queryClient = useQueryClient();
|
|
12
|
+
return useMutation<TransferPickProducts, unknown>(() => {
|
|
13
|
+
return postAuth0(`/ORQ/Macros/UpdateStatus?`, {
|
|
14
|
+
pMacroId: macroId,
|
|
15
|
+
pStatus: status
|
|
16
|
+
});
|
|
17
|
+
}, {
|
|
18
|
+
onSuccess: (data) => {
|
|
19
|
+
queryClient.setQueryData(
|
|
20
|
+
['UPDATE_STATUS_QUERY'], data);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -393,6 +393,7 @@ export * from './Orch/get/getMacrosQuery.hook';
|
|
|
393
393
|
export * from './Orch/get/getInstanceByIdQuery.hook';
|
|
394
394
|
export * from './Orch/others/runMacrosQuery.hook';
|
|
395
395
|
export * from './Orch/others/reprocessingInstanceQuery.hook';
|
|
396
|
+
export * from './Orch/others/updateMacroStatusQuery.hook';
|
|
396
397
|
export * from './Orch/get/getMacrosUserQuery.hook';
|
|
397
398
|
export * from './Orch/get/getMonitoringComponents.hook';
|
|
398
399
|
|