academe-kit 0.4.2 → 0.4.4
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/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/ProtectedApp/index.d.ts +5 -1
- package/dist/types/components/ProtectedComponent/index.d.ts +4 -3
- package/dist/types/components/ProtectedRouter/index.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
export type RequiredClientRoles = {
|
|
2
|
+
clientId: string;
|
|
3
|
+
roles: string[];
|
|
4
|
+
};
|
|
1
5
|
type ProtectedAppProps = {
|
|
2
6
|
children: React.ReactElement;
|
|
3
|
-
requiredClientRoles?:
|
|
7
|
+
requiredClientRoles?: RequiredClientRoles;
|
|
4
8
|
requiredRealmRoles?: string[];
|
|
5
9
|
};
|
|
6
10
|
export declare const ProtectedApp: React.FC<ProtectedAppProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { RequiredClientRoles } from "../ProtectedApp";
|
|
2
|
+
type ProtectedComponentProps = {
|
|
2
3
|
children: React.ReactElement;
|
|
3
|
-
requiredClientRoles?:
|
|
4
|
+
requiredClientRoles?: RequiredClientRoles;
|
|
4
5
|
requiredRealmRoles?: string[];
|
|
5
6
|
};
|
|
6
|
-
export declare const ProtectedComponent: React.FC<
|
|
7
|
+
export declare const ProtectedComponent: React.FC<ProtectedComponentProps>;
|
|
7
8
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { RequiredClientRoles } from "../ProtectedApp";
|
|
1
2
|
type ProtectedRouterProps = {
|
|
2
3
|
children: React.ReactElement;
|
|
3
|
-
requiredClientRoles?:
|
|
4
|
+
requiredClientRoles?: RequiredClientRoles;
|
|
4
5
|
unauthorizedMessage?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const ProtectedRouter: React.FC<ProtectedRouterProps>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Button } from "./components/Button";
|
|
2
2
|
export type { ButtonProps } from "./components/Button";
|
|
3
3
|
export { ProtectedApp } from "./components/ProtectedApp";
|
|
4
|
+
export type { RequiredClientRoles } from "./components/ProtectedApp";
|
|
4
5
|
export { ProtectedComponent } from "./components/ProtectedComponent";
|
|
5
6
|
export { ProtectedRouter } from "./components/ProtectedRouter";
|
|
6
7
|
export { Spinner } from "./components/ui/spinner";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "academe-kit",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Official React SDK for Academe ecosystem - Authentication, protected routes, API services, and UI components for educational management applications",
|
|
6
6
|
"main": "dist/index.cjs",
|