UNPKG

@zextras/carbonio-shell-ui

Version:

The Zextras Carbonio web client

19 lines (18 loc) 1.19 kB
import type { Account, AccountRightName, AccountRights, AccountRightTarget, AccountSettings } from '../../types/account'; export declare const useAuthenticated: () => boolean; /** * Return the authenticated user account. Throws if the user is not authenticated. * Note: this hook should be used only where the user is for sure logically authenticated */ export declare const useUserAccount: () => Account; export declare const useUserAccounts: () => Array<Account>; export declare const useUserRights: () => AccountRights; export declare const useUserRight: (right: AccountRightName) => Array<AccountRightTarget>; export declare const useUserSettings: () => AccountSettings; export declare const useUserSetting: <T = void>(...path: Array<string>) => string | T; export declare const getUserAccount: () => Account | undefined; export declare const getUserAccounts: () => Array<Account>; export declare const getUserSettings: () => AccountSettings; export declare const getUserSetting: <T = void>(...path: Array<string>) => string | T; export declare const getUserRights: () => AccountRights; export declare const getUserRight: (right: AccountRightName) => Array<AccountRightTarget>;