Site | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Interface Site

    interface Site {
        get id(): number;
        get name(): string;
        get outputFolder(): string;
        get outputWeb(): null | number;
        get webRoot(): null | string;
        getWebDesign(): Promise<string>;
        getWebFeatures(): Promise<null | string[]>;
        openFile(
            path: string,
            options: OpenWHFSObjectOptions & { allowMissing: true },
        ): Promise<null | WHFSFile>;
        openFile(path: string, options?: OpenWHFSObjectOptions): Promise<WHFSFile>;
        openFolder(
            path: string,
            options: OpenWHFSObjectOptions & { allowMissing: true },
        ): Promise<null | WHFSFolder>;
        openFolder(
            path: string,
            options?: OpenWHFSObjectOptions,
        ): Promise<WHFSFolder>;
        update(
            updates: UpdateableSiteSettings,
        ): Promise<{ applied: () => Promise<void> }>;
    }
    Index

    Accessors

    • get id(): number

      Site primary key (matches root folder id)

      Returns number

    • get name(): string

      Site name

      Returns string

    • get outputFolder(): string

      Folder inside the webserver where the site is published

      Returns string

    • get outputWeb(): null | number

      ID of the webserver to which the site is published, null if unpublished

      Returns null | number

    • get webRoot(): null | string

      Absolute URL where the site is published, or null if the site is not published

      Returns null | string

    Methods

    • Get the webdesign for this site

      Returns Promise<string>

    • Get enabled webfeatures for this site

      Returns Promise<null | string[]>

    • Parameters

      • path: string
      • options: OpenWHFSObjectOptions & { allowMissing: true }

      Returns Promise<null | WHFSFile>

    • Parameters

      • path: string
      • Optionaloptions: OpenWHFSObjectOptions

      Returns Promise<WHFSFile>

    • Parameters

      • path: string
      • options: OpenWHFSObjectOptions & { allowMissing: true }

      Returns Promise<null | WHFSFolder>

    • Parameters

      • path: string
      • Optionaloptions: OpenWHFSObjectOptions

      Returns Promise<WHFSFolder>

    • Update site settings

      Parameters

      • updates: UpdateableSiteSettings

      Returns Promise<{ applied: () => Promise<void> }>