UNPKG

@pnp/sp

Version:

pnp - provides a fluent api for working with SharePoint REST

13 lines 520 B
import { addProp, body } from "@pnp/queryable"; import { _Web, Web } from "../webs/types.js"; import { SiteUsers, SiteUser } from "./types.js"; import { spPost } from "../spqueryable.js"; addProp(_Web, "siteUsers", SiteUsers); addProp(_Web, "currentUser", SiteUser); _Web.prototype.ensureUser = async function (logonName) { return spPost(Web(this, "ensureuser"), body({ logonName })); }; _Web.prototype.getUserById = function (id) { return SiteUser(this, `getUserById(${id})`); }; //# sourceMappingURL=web.js.map