import { Guid } from '@microsoft/sp-core-library'; import type { IODataBasePermission } from '@microsoft/sp-odata-types'; import SPPermission from './SPPermission'; import type { SPDayOfWeek } from './SPDayOfWeek'; import SPTimeZone, { type ISPTimeZoneData } from './SPTimeZone'; /** * Object that represents the data necessary to build an `SPWeb` object. * @internal */ export interface ISPWebData { absoluteUrl: string; id: string; isAppWeb: boolean; language: number; languageName: string; logoUrl: string; permissions: IODataBasePermission; timeZoneInfo?: ISPTimeZoneData; firstDayOfWeek?: SPDayOfWeek; serverRelativeUrl: string; templateName: string; title: string; description: string; } /** * This class is primarily used with the `PageContext` class. It provides contextual * information for the SharePoint site ("SPWeb") that hosts the page. * * @public */ export default class SPWeb { /** * Returns the absolute URL for this SPWeb. * Example: `"https://example.com/sites/PubSite/SubWeb"` */ readonly absoluteUrl: string; /** * The GUID that identifies the SPWeb on the server. */ readonly id: Guid; /** * Returns true if this `SPWeb` the container web for an `SPApp`. */ readonly isAppWeb: boolean; /** * Returns the locale identifier (LCID) for the default language of the website. * * @remarks * Example: 1033 represents the locale identifier for en-US. */ readonly language: number; /** * Returns the language name for the default language of the website. * * @remarks * Example: en-US represents the English language in the US locale. */ readonly languageName: string; /** * Returns the absolute URL of the website logo. * * @remarks * Example:` https://example.com/sites/PubSite/SubWeb/logo.jpg` */ readonly logoUrl: string; /** * Return the SPPermission object that represents the set of permissions that the * current user has for interacting with the web. */ readonly permissions: SPPermission; /** * Returns the web's regional timezone settings or undefined if they haven't been set. * * @beta */ readonly timeZoneInfo: SPTimeZone | undefined; /** * Returns the web's regional first day of week setting or undefined if it hasn't been set. * * @beta */ readonly firstDayOfWeek: SPDayOfWeek | undefined; /** * Returns the server-relative URL for this SPWeb. * * @remarks * Example: `"/sites/PubSite/SubWeb"` */ readonly serverRelativeUrl: string; /** * Returns the string representing the numeric identifier for the site definition or * site template that was used to create the site. * * @remarks * Example: `"1"` represents the team site template when creating a new site on SharePoint. */ readonly templateName: string; /** * Returns the title of the current SPWeb. */ readonly title: string; /** * Returns the description of the current SPWeb. */ readonly description: string; /** * @internal */ constructor(data: ISPWebData); } //# sourceMappingURL=SPWeb.d.ts.map