spws
Version:
SharePoint Web Services Wrapper
21 lines (20 loc) • 1.1 kB
TypeScript
import { SpwsResponse, WebPartProperties } from "../../types";
type GetWebPartProps = {
pageURL: string;
webURL?: string;
};
export interface Operation extends SpwsResponse {
data: WebPartProperties[];
}
/**
* @description Fetches the Web Part properties for a specified page within a SharePoint site.
* This function retrieves all the Web Parts on a given Web Part page, including their metadata,
* such as IDs, titles, visibility status, and layout details, as well as the full XML representation of each Web Part.
*
* @param {string} pageURL - The relative URL of the Web Part page (e.g., "/sites/mysite/pages/sample.aspx")
* where the Web Part resides.
* @param {string} [webURL] - The optional base URL of the SharePoint site. If not provided, it defaults to the value in `defaults.webURL`.
* @returns {Promise<Operation>} - A promise that resolves to an Operation object containing an array of Web Part properties.
*/
declare const getWebPartProperties: ({ pageURL, webURL, }: GetWebPartProps) => Promise<Operation>;
export default getWebPartProperties;