UNPKG

841 BJavaScriptView Raw
1import { addProp } from "@pnp/queryable";
2import { _Web, Web } from "../webs/types.js";
3import { Lists, List } from "./types.js";
4import { odataUrlFrom } from "../utils/odata-url-from.js";
5import { SPCollection } from "../spqueryable.js";
6import { escapeQueryStrValue } from "../utils/escape-query-str.js";
7addProp(_Web, "lists", Lists);
8addProp(_Web, "siteUserInfoList", List);
9addProp(_Web, "defaultDocumentLibrary", List);
10addProp(_Web, "customListTemplates", SPCollection, "getcustomlisttemplates");
11_Web.prototype.getList = function (listRelativeUrl) {
12 return List(this, `getList('${escapeQueryStrValue(listRelativeUrl)}')`);
13};
14_Web.prototype.getCatalog = async function (type) {
15 const data = await Web(this, `getcatalog(${type})`).select("Id")();
16 return List([this, odataUrlFrom(data)]);
17};
18//# sourceMappingURL=web.js.map
\No newline at end of file