import * as i0 from '@angular/core'; import { Observable } from 'rxjs'; /** * Represents a permission retrieved from SSO. */ interface TbxSsoPermModel { /** Gets or sets the application name (received as type from the back-end). */ type: string; /** Gets or sets the permission number (received as value from the back-end). */ value: string; } /** * Represents a user record from the SSO database. */ interface TbxSsoUserModel { /** Gets or sets the unique identifier for the User. */ userId?: number | null; /** Gets or sets the employee ID. */ employeeId?: number | null; /** Gets or sets the user's account name (usually the network ID). */ userName?: string | null; /** Gets or sets the user's Windows Identity name. */ identity?: string | null; /** Gets or sets the user's full name. */ fullName?: string | null; /** Gets or sets the user's display name. */ displayName?: string | null; /** Gets or sets the user's first name. */ firstName?: string | null; /** Gets or sets the user's initials. */ initials?: string | null; /** Gets or sets the user's last name. */ lastName?: string | null; /** Gets or sets the user's email address. */ email?: string | null; /** Gets or sets the user's phone extension. */ extension?: string | null; /** Gets or sets the ID of the division for the user. */ divisionId?: number | null; /** Gets or sets the division name for the user. */ divisionName?: string | null; /** Gets or sets the division long name for the user. */ divisionNameLong?: string | null; /** Gets or sets the division suite number. */ suiteNumber?: string | null; /** Gets or sets the ID of the user's supervisor. */ supervisorId?: number | null; /** Gets or sets the full name of the user's supervisor. */ supervisor?: string | null; /** Gets or sets the user's small photo from the Phone List. */ smallPictureUrl?: string | null; /** Gets or sets the user's big photo from the Phone List. */ bigPictureUrl?: string | null; /** Gets or sets the user was added to the database. */ addedDate?: Date | null; /** Gets or sets a value indicating whether the user is a system account. */ isSystemUser?: boolean | null; /** Gets or sets a value indicating whether the user is a super user. */ isSuperUser?: boolean | null; /** Gets or sets a value indicating whether the user is an administrator. */ isSsoAdmin: boolean; /** Gets or sets a value indicating whether the user is an administrator. */ isAdministrator?: boolean | null; /** Gets or sets a value indicating whether the user is active. */ isActive?: boolean | null; /** Gets or sets the permissions the user has been granted for this application. */ permissions: TbxSsoPermModel[]; } /** * Gets information from the ToolBox SSO API service regarding the current user * using Windows authentication. */ declare class TbxSsoAuthService { /** The current user observable. */ private currentUserSubject; /** The observable that indicates if the user is authenticated. */ private isAuthenticatedSubject; /** * Gets a value indicating whether the current user is authenticated which is * determined by the values of ID or name of the current user. */ get isAuthenticated(): boolean; get isValid(): boolean; /** Gets the permissions for the current user. */ get permissions(): TbxSsoPermModel[]; /** Gets the current user details. */ get user(): TbxSsoUserModel | undefined; /** Sets the currently signed-in user. Usually called from the startup module */ set user(user: TbxSsoUserModel | undefined); /** * Gets a value indicating whether the current user has the permission. * * @param permissionId - The permission number to check. * @returns true if the user has the permission, false otherwise. */ hasPermission(permissionId: number | string): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Provides functions to get SSO user information from the server. */ declare class TbxSsoService { private readonly apiService; private readonly urlService; private internalSsoUrl; get ssoUrl(): string; set ssoUrl(value: string); /** * Gets a list of all SSO users. * @param activeOnly Indicates wether to retrieve active only or all. * @param filter Optional filter text. * @returns An observable of type {@link TbxSsoUserModel}. */ getUsers(activeOnly?: boolean, filter?: string): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { TbxSsoAuthService, TbxSsoService }; export type { TbxSsoPermModel, TbxSsoUserModel };