UNPKG

spws

Version:

SharePoint Web Services Wrapper

23 lines (22 loc) 930 B
import { UserInformation, SpwsResponse } from "../../types"; interface Operation extends SpwsResponse { data: UserInformation; } export declare const cache: { currentUser?: UserInformation; }; /** * Gets the current authenticated user. * @remark Authentication can be changed using a proxy server and supplying a username and password. This is not recommended and should be used for testing purposes only. */ declare const getCurrentUser: ({ webURL, getFromWindow, ID, }?: { /** The SharePoint web URL */ webURL?: string | undefined; /** If false, the user ID will be scraped from a SharePoint page */ getFromWindow?: boolean | undefined; /** The user ID. If defined, the page scrape is skipped and user info is returned\ * This is useful for testing as scraping pages is flaky */ ID?: string | undefined; }) => Promise<Operation>; export default getCurrentUser;