UNPKG

653 BJavaScriptView Raw
1import { hOP } from "@pnp/core";
2import { spPost } from "../operations.js";
3import { SPQueryable, _SPQueryable } from "../spqueryable.js";
4import { extractWebUrl } from "../utils/extract-web-url.js";
5_SPQueryable.prototype.getContextInfo = async function (path = this.parentUrl) {
6 const data = await spPost(SPQueryable([this, extractWebUrl(path)], "_api/contextinfo"));
7 if (hOP(data, "GetContextWebInformation")) {
8 const info = data.GetContextWebInformation;
9 info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;
10 return info;
11 }
12 else {
13 return data;
14 }
15};
16//# sourceMappingURL=index.js.map
\No newline at end of file