@omniumretail/shared-resources 0.1.49 → 0.1.51

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 { TransferDocuments } from '../../..';
2
+ export declare const getReportsBuilderQueryHook: (transferId: string) => import("@tanstack/react-query").UseQueryResult<TransferDocuments[], unknown>;
@@ -7,5 +7,5 @@ interface RolesQueryProps extends UseQueryOptions<ResponseList<"Roles", Roles>>
7
7
  sortDirection: string;
8
8
  tags?: string;
9
9
  }
10
- export declare const useAllRolesQuery: ({ records, sortBy, sortDirection, tags, page, ...options }: RolesQueryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Roles", Roles>, unknown>;
10
+ export declare const useAllRolesQuery: ({ records, sortBy, sortDirection, tags, page }: RolesQueryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Roles", Roles>, unknown>;
11
11
  export {};
@@ -52,6 +52,7 @@ export * from './Astt/get/getTransferReportDiff.hook';
52
52
  export * from './Astt/get/getTransferAllProductsQuery.hook';
53
53
  export * from './Astt/mutate/postTransferDocumentsMutateQuery.hook';
54
54
  export * from './Astt/mutate/putTransferDocumentsStateMutateQuery.hook';
55
+ export * from './Astt/get/getReportsBuilderQuery.hook';
55
56
  export * from './Others/useJobTitlesQuery.hook';
56
57
  export * from './Others/useContractStatesQuery.hook';
57
58
  export * from './Others/useApplicationDataQuery.hook';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -17,7 +17,7 @@ export interface AnalyticsUserQuery extends UseQueryOptions<ResponseList<"Users"
17
17
  export const useAnalyticsUserQueryHook = ({ tags, page, records, filter, sortByUsers, sortBy, sortDirection, queryUsers, query }: AnalyticsUserQuery) => {
18
18
  return useQuery(
19
19
  ['ANALYTICS_USER_QUERY', tags, page, records, filter, sortByUsers, sortBy, sortDirection, queryUsers, query],
20
- () => getAuth0<ResponseList<"Users", User>>('/APE/Analytics/EvaluationCycle/Users', {
20
+ () => getAuth0<ResponseList<"Users", User>>('/APE/Analytics/EvaluationCycles/Users/Informations', {
21
21
  pPage: page || 1,
22
22
  pRecords: records || 50,
23
23
  pSortByUsers: sortByUsers || 'DisplayName',
@@ -0,0 +1,9 @@
1
+ import { get, TransferDocuments } from '../../..';
2
+ import { useQuery } from '@tanstack/react-query';
3
+
4
+ export const getReportsBuilderQueryHook = (transferId: string) => {
5
+ return useQuery(
6
+ ['ASTT_REPORTS_BUILDER', transferId],
7
+ () => get<TransferDocuments[]>(`/ASTT/ReportsBuilder/${transferId}/DifferencesReport`),
8
+ );
9
+ };
@@ -17,8 +17,5 @@ export const getTransferDocumentsPackagesQueryHook = ({ sortBy, sortDirection, t
17
17
  pSortDirection: sortDirection || "asc",
18
18
  pTerms: terms
19
19
  }),
20
- {
21
- keepPreviousData: true,
22
- }
23
20
  );
24
21
  }
@@ -10,16 +10,19 @@ interface RolesQueryProps extends UseQueryOptions<ResponseList<"Roles", Roles>>
10
10
  tags?: string;
11
11
  }
12
12
 
13
- export const useAllRolesQuery = ({ records, sortBy, sortDirection, tags, page, ...options }: RolesQueryProps) => {
14
- const queryKey = ['ROLES_QUERY', records, sortBy, sortDirection, tags, page];
15
-
16
- const queryFn = () => getAuth0<ResponseList<"Roles", Roles>>(`/AACP/Roles`, {
17
- pPage: page || 1,
18
- pRecords: records || 50,
19
- pSortBy: sortBy,
20
- pSortDirection: sortDirection,
21
- pTerms: tags,
22
- })
23
-
24
- return useQuery(queryKey, queryFn, options);
13
+ export const useAllRolesQuery = ({ records, sortBy, sortDirection, tags, page }: RolesQueryProps) => {
14
+ return useQuery(
15
+ ['ROLES_QUERY', records, sortBy, sortDirection, tags, page],
16
+ () => getAuth0<ResponseList<"Roles", Roles>>('/AACP/Roles', {
17
+ pPage: page || 1,
18
+ pRecords: records || 50,
19
+ pSortBy: sortBy,
20
+ pSortDirection: sortDirection,
21
+ pTerms: tags,
22
+ }),
23
+ {
24
+ keepPreviousData: true,
25
+ }
26
+ );
25
27
  }
28
+
@@ -12,7 +12,7 @@ export interface ExpUsersAnswersProps extends UseQueryOptions<ResponseList<"User
12
12
  export const useExpUsersAnswersQueryHook = ({ tags, page, records, queryUser }: ExpUsersAnswersProps) => {
13
13
  return useQuery(
14
14
  ['EXP_USERS_ANSWERS_QUERY', tags, page, records, queryUser],
15
- () => getAuth0<ResponseList<"Users", ExpUsersAnswers>>('/APE/Analytics/EvaluationCycle/UsersExperimental', {
15
+ () => getAuth0<ResponseList<"Users", ExpUsersAnswers>>('/APE/Analytics/EvaluationCycles/UsersExperimental', {
16
16
  pPage: page || 1,
17
17
  pRecords: records || 50,
18
18
  pTerms: tags,
@@ -71,6 +71,7 @@ export * from './Astt/get/getTransferReportDiff.hook';
71
71
  export * from './Astt/get/getTransferAllProductsQuery.hook';
72
72
  export * from './Astt/mutate/postTransferDocumentsMutateQuery.hook';
73
73
  export * from './Astt/mutate/putTransferDocumentsStateMutateQuery.hook';
74
+ export * from './Astt/get/getReportsBuilderQuery.hook';
74
75
 
75
76
  //Others
76
77
  export * from './Others/useJobTitlesQuery.hook';