import type { SPDayOfWeek } from './SPDayOfWeek'; import SPTimeZone, { type ISPTimeZoneData } from './SPTimeZone'; /** * Object that represents the data necessary to build an `SPUser` object. * * @internal */ export interface ISPUserData { displayName: string; email: string; isAnonymousGuestUser: boolean; isExternalGuestUser: boolean; loginName: string; preferUserTimeZone: boolean; timeZoneInfo?: ISPTimeZoneData; firstDayOfWeek?: SPDayOfWeek; } /** * This class is primarily used with the `PageContext` class. It provides contextual information * for the SharePoint user that is accessing the page. * * @public */ export default class SPUser { /** * The display name for the current user. * * @remarks * Example: `"John Doe"` */ readonly displayName: string; /** * The email address for the current user. * * @remarks * Example: `"example@contoso.com"` */ readonly email: string; /** * Returns if the current user is an anonymous guest. */ readonly isAnonymousGuestUser: boolean; /** * Returns true if the current user is an external guest. */ readonly isExternalGuestUser: boolean; /** * The login name for current user. * * @remarks * Example: on-premise user: `"domain\user"`, online user: `"user@domain.com"` */ readonly loginName: string; /** * This boolean represents if a the user or web's time zone settings should be used * to display the current time. */ readonly preferUserTimeZone: boolean; /** * Returns the user's regional timezone settings or undefined if they haven't been set. * * @beta */ readonly timeZoneInfo: SPTimeZone | undefined; /** * Returns the user's regional first day of week setting or undefined if it hasn't been set. * * @beta */ readonly firstDayOfWeek: SPDayOfWeek | undefined; /** * @internal */ constructor(data: ISPUserData); } //# sourceMappingURL=SPUser.d.ts.map