@kwiz/common
Version:
KWIZ common utilities and helpers for M365 platform
22 lines (21 loc) • 1.13 kB
TypeScript
import { INavLinkInfo } from "../../types/sharepoint.types";
/**
* Get all navigation links in the top and side navigation of a SharePoint site
* @param siteUrl The URL of the SharePoint site
* @returns An array containing all navigation links
*/
export declare function GetNavigationLinks(siteUrl?: string): Promise<INavLinkInfo[]>;
/**
* Add a navigation link to the specified location (top navigation or side navigation)
* @param title The title of the navigation link
* @param url The url of the navigation link
* @param location The location where the link will be added ('topnavigationbar' or 'quicklaunch'). Default is 'quicklaunch'.
* @Logs If the location is invalid or if adding the link fails
*/
export declare function AddNavigationLink(title: string, url: string, location?: 'topnavigationbar' | 'quicklaunch'): Promise<INavLinkInfo>;
/**
* Delete navigation links by title and URL
* @param navLinks An array of navigation links to be deleted
* @Logs If the location is invalid or if deleting the links fails
*/
export declare function DeleteNavigationLinks(navLinks: INavLinkInfo[]): Promise<void>;