@omniumretail/shared-resources 0.3.54 → 0.3.55
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.
|
@@ -6,6 +6,7 @@ interface RolesQueryProps extends UseQueryOptions<ResponseList<"Roles", Roles>>
|
|
|
6
6
|
sortBy: string;
|
|
7
7
|
sortDirection: string;
|
|
8
8
|
tags?: string;
|
|
9
|
+
onlyApplicationRoles?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare const useAllRolesQuery: ({ records, sortBy, sortDirection, tags, page }: RolesQueryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Roles", Roles>, unknown>;
|
|
11
|
+
export declare const useAllRolesQuery: ({ records, sortBy, sortDirection, tags, page, onlyApplicationRoles }: RolesQueryProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Roles", Roles>, unknown>;
|
|
11
12
|
export {};
|
package/package.json
CHANGED
|
@@ -8,21 +8,23 @@ interface RolesQueryProps extends UseQueryOptions<ResponseList<"Roles", Roles>>
|
|
|
8
8
|
sortBy: string;
|
|
9
9
|
sortDirection: string;
|
|
10
10
|
tags?: string;
|
|
11
|
+
onlyApplicationRoles?: boolean;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const useAllRolesQuery = ({ records, sortBy, sortDirection, tags, page }: RolesQueryProps) => {
|
|
14
|
+
export const useAllRolesQuery = ({ records, sortBy, sortDirection, tags, page, onlyApplicationRoles }: RolesQueryProps) => {
|
|
14
15
|
return useQuery(
|
|
15
|
-
['ROLES_QUERY', records, sortBy, sortDirection, tags, page],
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
['ROLES_QUERY', records, sortBy, sortDirection, tags, page, onlyApplicationRoles],
|
|
17
|
+
() => getAuth0<ResponseList<"Roles", Roles>>('/AACP/Roles', {
|
|
18
|
+
pPage: page || 1,
|
|
19
|
+
pRecords: records || 50,
|
|
20
|
+
pSortBy: sortBy,
|
|
21
|
+
pSortDirection: sortDirection,
|
|
22
|
+
pTerms: tags,
|
|
23
|
+
...(onlyApplicationRoles !== undefined ? { pOnlyApplicationRoles: onlyApplicationRoles } : {}),
|
|
24
|
+
}),
|
|
25
|
+
{
|
|
26
|
+
keepPreviousData: true,
|
|
27
|
+
}
|
|
26
28
|
);
|
|
27
29
|
}
|
|
28
30
|
|