UNPKG

spws

Version:

SharePoint Web Services Wrapper

24 lines (23 loc) 753 B
import { SpwsResponse } from "../../types"; interface CurrentUserID extends SpwsResponse { data: string; } /** * Gets the current user's ID * @param options The SharePoint web URL * @param options.webURL The SharePoint web URL * @param options.getFromWindow If false, the user ID will be scraped from the SharePoint page. * @example * ``` * // Get the current user ID * const res = await getCurrentUserID(); * * // Get the current user ID * const res = await getCurrentUserID({ getFromWindow: false }); * ``` */ declare const getCurrentUserID: ({ webURL, getFromWindow, }?: { webURL?: string | undefined; getFromWindow?: boolean | undefined; }) => Promise<CurrentUserID>; export default getCurrentUserID;