academe-kit 0.3.5 → 0.3.7
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.d.ts +6 -1
- package/dist/index.esm.js +17 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +19 -19
- package/dist/types/roles/applications.d.ts +5 -0
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -10251,6 +10251,11 @@ declare enum APPLICATIONS_ROLES {
|
|
|
10251
10251
|
ACCESS_MIKE = "Acesso mike",
|
|
10252
10252
|
VIEW_WIDGET = "Visualizar Widget"
|
|
10253
10253
|
}
|
|
10254
|
+
declare enum MIKE_ROLES {
|
|
10255
|
+
ACCESS_ROLEPLAY = "Acesso roleplay",
|
|
10256
|
+
ACCESS_JOURNEYS = "Acesso jornadas",
|
|
10257
|
+
ACCESS_FREEPLAY = "Acesso freeplay"
|
|
10258
|
+
}
|
|
10254
10259
|
|
|
10255
|
-
export { APPLICATIONS_ROLES, AcademeAuthProvider, BACKOFFICE_ROLES, Button, DASHBOARD_ROLES, GLOBAL_ROLES, ProtectedApp, ProtectedComponent, ProtectedRouter, Spinner, academeApi_d as apiTypes, cn, createAcademeApiClient, index_d as types, useAcademeAuth };
|
|
10260
|
+
export { APPLICATIONS_ROLES, AcademeAuthProvider, BACKOFFICE_ROLES, Button, DASHBOARD_ROLES, GLOBAL_ROLES, MIKE_ROLES, ProtectedApp, ProtectedComponent, ProtectedRouter, Spinner, academeApi_d as apiTypes, cn, createAcademeApiClient, index_d as types, useAcademeAuth };
|
|
10256
10261
|
export type { AcademeApiClient, AcademeKeycloakContextProps, AcademeUser, ButtonProps, KeycloakUser, SecurityContextType, SecurityProviderProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -4946,11 +4946,14 @@ const AcademeAuthProvider = ({ realm, hubUrl, children, clientId, keycloakUrl, a
|
|
|
4946
4946
|
const oidcConfig = {
|
|
4947
4947
|
authority: `${keycloakUrl}/realms/${realm}`,
|
|
4948
4948
|
client_id: clientId,
|
|
4949
|
-
redirect_uri: window
|
|
4949
|
+
redirect_uri: typeof window !== "undefined"
|
|
4950
|
+
? window.location.origin
|
|
4951
|
+
: process.env.NEXT_PUBLIC_REDIRECT_URI,
|
|
4950
4952
|
scope: "openid profile email",
|
|
4951
4953
|
onSigninCallback: () => {
|
|
4952
4954
|
window.history.replaceState({}, document.title, window.location.pathname);
|
|
4953
4955
|
},
|
|
4956
|
+
automaticSilentRenew: true,
|
|
4954
4957
|
};
|
|
4955
4958
|
return (jsx(AuthProvider, { ...oidcConfig, children: jsx(SecurityProvider, { hubUrl: hubUrl, apiBaseUrl: apiBaseUrl, skipApiUserFetch: skipApiUserFetch, children: children }) }));
|
|
4956
4959
|
};
|
|
@@ -5023,10 +5026,14 @@ const SecurityProvider = ({ apiBaseUrl = "https://stg-api.academe.com.br", skipA
|
|
|
5023
5026
|
return request;
|
|
5024
5027
|
},
|
|
5025
5028
|
});
|
|
5026
|
-
window
|
|
5029
|
+
if (typeof window !== "undefined") {
|
|
5030
|
+
window.accessToken = accessToken;
|
|
5031
|
+
}
|
|
5027
5032
|
}
|
|
5028
5033
|
else {
|
|
5029
|
-
window
|
|
5034
|
+
if (typeof window !== "undefined") {
|
|
5035
|
+
window.accessToken = undefined;
|
|
5036
|
+
}
|
|
5030
5037
|
}
|
|
5031
5038
|
}, [accessToken, apiClient]);
|
|
5032
5039
|
// --- 3. Helpers de Usuário e Roles ---
|
|
@@ -8346,6 +8353,12 @@ var APPLICATIONS_ROLES;
|
|
|
8346
8353
|
APPLICATIONS_ROLES["ACCESS_MIKE"] = "Acesso mike";
|
|
8347
8354
|
APPLICATIONS_ROLES["VIEW_WIDGET"] = "Visualizar Widget";
|
|
8348
8355
|
})(APPLICATIONS_ROLES || (APPLICATIONS_ROLES = {}));
|
|
8356
|
+
var MIKE_ROLES;
|
|
8357
|
+
(function (MIKE_ROLES) {
|
|
8358
|
+
MIKE_ROLES["ACCESS_ROLEPLAY"] = "Acesso roleplay";
|
|
8359
|
+
MIKE_ROLES["ACCESS_JOURNEYS"] = "Acesso jornadas";
|
|
8360
|
+
MIKE_ROLES["ACCESS_FREEPLAY"] = "Acesso freeplay";
|
|
8361
|
+
})(MIKE_ROLES || (MIKE_ROLES = {}));
|
|
8349
8362
|
|
|
8350
8363
|
var index = /*#__PURE__*/Object.freeze({
|
|
8351
8364
|
__proto__: null
|
|
@@ -8360,5 +8373,5 @@ var academeApi = /*#__PURE__*/Object.freeze({
|
|
|
8360
8373
|
__proto__: null
|
|
8361
8374
|
});
|
|
8362
8375
|
|
|
8363
|
-
export { APPLICATIONS_ROLES, AcademeAuthProvider, BACKOFFICE_ROLES, Button, DASHBOARD_ROLES, GLOBAL_ROLES, ProtectedApp, ProtectedComponent, ProtectedRouter, Spinner, academeApi as apiTypes, cn, createAcademeApiClient, index as types, useAcademeAuth };
|
|
8376
|
+
export { APPLICATIONS_ROLES, AcademeAuthProvider, BACKOFFICE_ROLES, Button, DASHBOARD_ROLES, GLOBAL_ROLES, MIKE_ROLES, ProtectedApp, ProtectedComponent, ProtectedRouter, Spinner, academeApi as apiTypes, cn, createAcademeApiClient, index as types, useAcademeAuth };
|
|
8364
8377
|
//# sourceMappingURL=index.esm.js.map
|