import { Guid } from '@microsoft/sp-core-library'; import O365GroupAssociation, { type IO365GroupAssociationData } from './O365GroupAssociation'; /** * Object that represents the data necessary to build an SPSite object. * * @internal */ export interface ISPSiteData { absoluteUrl: string; cdnPrefix: string; classification: string; correlationId: string; group?: IO365GroupAssociationData; id: string; isNoScriptEnabled: boolean; recycleBinItemCount: number; serverRelativeUrl: string; serverRequestPath: string; sitePagesEnabled: boolean; sitePagesFeatureVersion?: number; } /** * This class is primarily used with the `PageContext` class. It provides contextual * information for the SharePoint site collection ("SPSite") that hosts the page. * * @public */ export default class SPSite { /** * Returns the absolute URL for this SPSite. * * @remarks * Example: "https://example.com/sites/PubSite" */ readonly absoluteUrl: string; /** * Returns the prefix of the application's specified cdn or an empty string if there isn't one. */ readonly cdnPrefix: string; /** * Returns the classification of the site. */ readonly classification: string; /** * Returns the correlation id to the current server request. */ readonly correlationId: Guid; /** * Contextual information about the O365 Group associated with this site. * If there is no O365Group associated with the current site, this property will be undefined. */ readonly group: O365GroupAssociation | undefined; /** * The GUID that identifies the SPSite on the server. */ readonly id: Guid; /** * Returns true if isNoScript has been enabled on the SPSite. */ readonly isNoScriptEnabled: boolean; /** * The amount of items in the recycle bin. */ readonly recycleBinItemCount: number; /** * Returns the server-relative URL for this SPSite. * * @remarks * Example: "/sites/PubSite" */ readonly serverRelativeUrl: string; /** * Returns serverRelativeUrl of the original request. * * @remarks * Example: "/teams/SPClientTest/SitePages/Home.aspx" */ readonly serverRequestPath: string; /** * Returns true if SitePages are enabled on this SPSite. */ readonly sitePagesEnabled: boolean; /** * Returns site pages feature version number if defined on this SPSite. * Example, for version 16.0.4.0 this would return 4. * * @alpha */ readonly sitePagesFeatureVersion: number; /** * @internal */ constructor(data: ISPSiteData); } //# sourceMappingURL=SPSite.d.ts.map