UNPKG

1.99 kBTypeScriptView Raw
1import { IClientsidePageComponent, IClientsidePage, ClientsidePageLayoutType, PromotedState, IRepostPage } from "./types.js";
2declare module "../webs/types" {
3 interface _Web {
4 getClientsideWebParts(): Promise<IClientsidePageComponent[]>;
5 addClientsidePage(pageName: string, title?: string, libraryTitle?: string, promotedState?: PromotedState): Promise<IClientsidePage>;
6 loadClientsidePage(path: string): Promise<IClientsidePage>;
7 addRepostPage(details: IRepostPage): Promise<string>;
8 addFullPageApp(pageName: string, title: string, componentId: string, promotedState?: PromotedState): Promise<IClientsidePage>;
9 }
10 interface IWeb {
11 /**
12 * Gets the collection of available client side web parts for this web instance
13 */
14 getClientsideWebParts(): Promise<IClientsidePageComponent[]>;
15 /**
16 * Creates a new client side page
17 *
18 * @param pageName Name of the new page
19 * @param title Display title of the new page
20 */
21 addClientsidePage(pageName: string, title?: string, PageLayoutType?: ClientsidePageLayoutType, promotedState?: PromotedState): Promise<IClientsidePage>;
22 /**
23 * Loads a page from the provided server relative path to the file
24 *
25 * @param path Server relative path to the file (ex: "/sites/dev/sitepages/page.aspx")
26 */
27 loadClientsidePage(path: string): Promise<IClientsidePage>;
28 /**
29 * Adds a repost page
30 *
31 * @param details The request details to create the page
32 */
33 addRepostPage(details: IRepostPage): Promise<string>;
34 /**
35 * Creates a new single page app page and installs the indicated component
36 *
37 * @param componentId
38 */
39 addFullPageApp(pageName: string, title: string, componentId: string, promotedState?: PromotedState): Promise<IClientsidePage>;
40 }
41}
42//# sourceMappingURL=web.d.ts.map
\No newline at end of file