import type React from "react"; import type { IdentityJWT } from "@ticketmaster/allure-mock"; export type AuthProviderProps = { children: React.ReactNode; }; export type AuthProviderComponent = (props: AuthProviderProps) => JSX.Element; export type UseAuthResponse = { token?: string | undefined; setToken: (token: string | undefined) => void; session?: IdentityJWT; permissions?: GranularPermissions | undefined; logout: () => void; /** * Use this method to request a authentication protection for your component * @property {boolean} is your component public or private? */ requestProtection: (isPublic: boolean) => void; setLogoutUrl: (logoutUrl: string | undefined) => void; }; export type UseAuthHook = () => UseAuthResponse; export type GranularPermissions = { global?: string[]; application: ApplicationPermissions; }; export type ApplicationPermissions = { [key: string]: string[]; };