interface ISite {
    _inheritingObservers: boolean;
    _url: string;
    InternalPromise: symbol;
    InternalReject: symbol;
    InternalResolve: symbol;
    moments: {
        auth: ((observers: QueryableAuthObserver[], url: URL, init: RequestInit) => Promise<[url: URL, init: RequestInit]>);
        construct: ((observers: QueryableConstructObserver[], init: QueryableInit, path?: string) => Timeline<any>);
        data: ((observers: QueryableDataObserver<any>[], ...args: any[]) => void);
        parse: ((observers: QueryableParseObserver[], url: URL, response: Response, result: any) => Promise<[url: URL, response: Response, result: any]>);
        post: ((observers: QueryablePostObserver[], url: URL, result: any) => Promise<[url: URL, result: any]>);
        pre: ((observers: QueryablePreObserver[], url: string, init: RequestInit, result: any) => Promise<[url: string, init: RequestInit, result: any]>);
        send: ((observers: QueryableSendObserver[], url: URL, init: RequestInit) => Promise<Promise<Response>>);
    };
    observers: ObserverCollection;
    parentUrl: string;
    get emit(): EmitProxyType<T>;
    get on(): OnProxyType<T>;
    get query(): URLSearchParams;
    get rootWeb(): IWeb;
    cloneObserversOnChange(): void;
    concat(pathPart: string): this;
    createCommunicationSite(title: string, lcid: number, shareByEmailEnabled: boolean, url: string, description?: string, classification?: string, siteDesignId?: string, hubSiteId?: string, owner?: string): Promise<ISiteCreationResponse>;
    createCommunicationSiteFromProps(props: ICreateCommSiteProps): Promise<ISiteCreationResponse>;
    createModernTeamSite(displayName: string, alias: string, isPublic?: boolean, lcid?: number, description?: string, classification?: string, owners?: string[], hubSiteId?: string, siteDesignId?: string): Promise<ISiteCreationResponse>;
    createModernTeamSiteFromProps(props: ICreateTeamSiteProps): Promise<ISiteCreationResponse>;
    delete(): Promise<void>;
    error(e?: any): void;
    execute(userInit: RequestInit): Promise<void>;
    exists(url: string): Promise<boolean>;
    expand(...expands: string[]): this;
    getChanges(query: IChangeQuery): Promise<any>;
    getContextInfo(path?: string): Promise<IContextInfo>;
    getDocumentLibraries(absoluteWebUrl: string): Promise<IDocumentLibraryInformation[]>;
    getParent<T>(factory: ISPInvokableFactory<any>, path?: string, base?: string): T;
    getRootWeb(): Promise<IWeb>;
    getWebUrlFromPageUrl(absolutePageUrl: string): Promise<string>;
    log(message: string, level?: number): void;
    openWebById(webId: string): Promise<IOpenWebByIdResult>;
    select(...selects: string[]): this;
    setSiteLogo(logoProperties: ISiteLogoProperties): Promise<void>;
    start(init?: any): Promise<any>;
    toRequestUrl(): string;
    toUrl(): string;
    update(props: ISiteInfo): Promise<any>;
    using(...behaviors: TimelinePipe<any>[]): this;
    <T>(init?: RequestInit): Promise<T>;
}

Hierarchy

  • _Site
    • ISite
  • Type Parameters

    Parameters

    • Optionalinit: RequestInit

    Returns Promise<T>

Properties

_inheritingObservers: boolean
_url: string
InternalPromise: symbol
InternalReject: symbol
InternalResolve: symbol
moments: {
    auth: ((observers: QueryableAuthObserver[], url: URL, init: RequestInit) => Promise<[url: URL, init: RequestInit]>);
    construct: ((observers: QueryableConstructObserver[], init: QueryableInit, path?: string) => Timeline<any>);
    data: ((observers: QueryableDataObserver<any>[], ...args: any[]) => void);
    parse: ((observers: QueryableParseObserver[], url: URL, response: Response, result: any) => Promise<[url: URL, response: Response, result: any]>);
    post: ((observers: QueryablePostObserver[], url: URL, result: any) => Promise<[url: URL, result: any]>);
    pre: ((observers: QueryablePreObserver[], url: string, init: RequestInit, result: any) => Promise<[url: string, init: RequestInit, result: any]>);
    send: ((observers: QueryableSendObserver[], url: URL, init: RequestInit) => Promise<Promise<Response>>);
}
observers: ObserverCollection
parentUrl: string

Accessors

  • get emit(): EmitProxyType<T>
  • Property allowing access to invoke a moment from within this timeline

    Returns EmitProxyType<T>

  • get on(): OnProxyType<T>
  • Property allowing access to manage observers on moments within this timeline

    Returns OnProxyType<T>

  • get query(): URLSearchParams
  • Querystring key, value pairs which will be included in the request

    Returns URLSearchParams

  • get rootWeb(): IWeb
  • Gets the root web of the site collection

    Returns IWeb

Methods

  • By default a timeline references the same observer collection as a parent timeline, if any changes are made to the observers this method first clones them ensuring we maintain a local copy and de-ref the parent

    Returns void

  • Directly concatenates the supplied string to the current url, not normalizing "/" chars

    Parameters

    • pathPart: string

      The string to concatenate to the url

    Returns this

  • Creates a Modern communication site.

    Parameters

    • title: string

      The title of the site to create

    • lcid: number

      The language to use for the site. If not specified will default to 1033 (English).

    • shareByEmailEnabled: boolean

      If set to true, it will enable sharing files via Email. By default it is set to false

    • url: string

      The fully qualified URL (e.g. https://yourtenant.sharepoint.com/sites/mysitecollection) of the site.

    • Optionaldescription: string

      The description of the communication site.

    • Optionalclassification: string

      The Site classification to use. For instance 'Contoso Classified'. See https://www.youtube.com/watch?v=E-8Z2ggHcS0 for more information

    • OptionalsiteDesignId: string

      The Guid of the site design to be used. You can use the below default OOTB GUIDs: Topic: 00000000-0000-0000-0000-000000000000 Showcase: 6142d2a0-63a5-4ba0-aede-d9fefca2c767 Blank: f6cc5403-0d63-442e-96c0-285923709ffc

    • OptionalhubSiteId: string

      The id of the hub site to which the new site should be associated

    • Optionalowner: string

      Optional owner value, required if executing the method in app only mode

    Returns Promise<ISiteCreationResponse>

  • Creates a Modern team site backed by Office 365 group. For use in SP Online only. This will not work with App-only tokens

    Parameters

    • displayName: string

      The title or display name of the Modern team site to be created

    • alias: string

      Alias of the underlying Office 365 Group

    • OptionalisPublic: boolean

      Defines whether the Office 365 Group will be public (default), or private.

    • Optionallcid: number

      The language to use for the site. If not specified will default to English (1033).

    • Optionaldescription: string

      The description of the site to be created.

    • Optionalclassification: string

      The Site classification to use. For instance 'Contoso Classified'. See https://www.youtube.com/watch?v=E-8Z2ggHcS0 for more information

    • Optionalowners: string[]

      The Owners of the site to be created

    • OptionalhubSiteId: string
    • OptionalsiteDesignId: string

    Returns Promise<ISiteCreationResponse>

  • Deletes the current site

    Returns Promise<void>

  • Shorthand method to emit an error event tied to this timeline

    Parameters

    • Optionale: any

      Optional. Any error object to emit. If none is provided no emit occurs

    Returns void

  • Method orchestrating the emit calls for the moments defined in inheriting classes

    Parameters

    • userInit: RequestInit

    Returns Promise<void>

  • Parameters

    • url: string

      Site Url that you want to check if exists

    Returns Promise<boolean>

  • Expands fields such as lookups to get additional data

    Parameters

    • Rest...expands: string[]

      The Fields for which to expand the values

    Returns this

  • Returns the collection of changes from the change log that have occurred within the list, based on the specified query

    Parameters

    • query: IChangeQuery

      The change query

    Returns Promise<any>

  • Gets the context info for the specified path

    Parameters

    • Optionalpath: string

      Optional. Absolute path to a SharePoint resource [Default: this.parentUrl]

    Returns Promise<IContextInfo>

  • Gets the document libraries on a site. Static method. (SharePoint Online only)

    Parameters

    • absoluteWebUrl: string

      The absolute url of the web whose document libraries should be returned

    Returns Promise<IDocumentLibraryInformation[]>

  • Gets a parent for this instance as specified

    Type Parameters

    • T extends ISPQueryable<any>

    Parameters

    • factory: ISPInvokableFactory<any>

      The contructor for the class to create

    • Optionalpath: string
    • Optionalbase: string

    Returns T

  • Gets a Web instance representing the root web of the site collection correctly setup for chaining within the library

    Returns Promise<IWeb>

  • Gets the site url from a page url

    Parameters

    • absolutePageUrl: string

      The absolute url of the page

    Returns Promise<string>

  • Shorthand method to emit a logging event tied to this timeline

    Parameters

    • message: string

      The message to log

    • Optionallevel: number

      The level at which the message applies

    Returns void

  • Opens a web by id (using POST)

    Parameters

    • webId: string

      The GUID id of the web to open

    Returns Promise<IOpenWebByIdResult>

  • Choose which fields to return

    Parameters

    • Rest...selects: string[]

      One or more fields to return

    Returns this

  • Set's the site's Site Logo property, vs the Site Icon property available on the web's properties

    Parameters

    • logoProperties: ISiteLogoProperties

      An instance of ISiteLogoProperties which sets the new site logo.

    Returns Promise<void>

  • Starts a timeline

    Parameters

    • Optionalinit: any

      A value passed into the execute logic from the initiator of the timeline

    Returns Promise<any>

    The result of this.execute

    This method first emits "init" to allow for any needed initial conditions then calls execute with any supplied init

  • Gets the full url with query information

    Returns string

  • Gets the current url

    Returns string

  • Parameters

    Returns Promise<any>

  • Apply the supplied behavior(s) to this timeline

    Parameters

    • Rest...behaviors: TimelinePipe<any>[]

      One or more behaviors

    Returns this

    this Timeline