{"version":3,"file":"sp.es5.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../../packages/sp/src/utils/extractweburl.ts","../../../../packages/sp/src/odata.ts","../../../../packages/sp/src/config/splibconfig.ts","../../../../packages/sp/src/net/digestcache.ts","../../../../packages/sp/src/net/sphttpclient.ts","../../../../node_modules/rollup-plugin-node-globals/src/global.js","../../../../packages/sp/src/utils/toabsoluteurl.ts","../../../../packages/sp/src/utils/metadata.ts","../../../../packages/sp/src/sharepointqueryable.ts","../../../../packages/sp/src/siteusers.ts","../../../../packages/sp/src/sitegroups.ts","../../../../packages/sp/src/roles.ts","../../../../packages/sp/src/types.ts","../../../../packages/sp/src/sharepointqueryablesecurable.ts","../../../../packages/sp/src/sharepointqueryableshareable.ts","../../../../packages/sp/src/webparts.ts","../../../../packages/sp/src/folders.ts","../../../../packages/sp/src/contenttypes.ts","../../../../packages/sp/src/attachmentfiles.ts","../../../../packages/sp/src/views.ts","../../../../packages/sp/src/fields.ts","../../../../packages/sp/src/forms.ts","../../../../packages/sp/src/subscriptions.ts","../../../../packages/sp/src/usercustomactions.ts","../../../../packages/sp/src/lists.ts","../../../../packages/sp/src/comments.ts","../../../../packages/sp/src/items.ts","../../../../packages/sp/src/files.ts","../../../../packages/sp/src/appcatalog.ts","../../../../packages/sp/src/batch.ts","../../../../packages/sp/src/features.ts","../../../../packages/sp/src/site.ts","../../../../packages/sp/src/navigation.ts","../../../../packages/sp/src/relateditems.ts","../../../../packages/sp/src/regionalsettings.ts","../../../../packages/sp/src/sitedesigns.ts","../../../../packages/sp/src/sitescripts.ts","../../../../packages/sp/src/webs.ts","../../../../packages/sp/src/clientsidepages.ts","../../../../packages/sp/src/search.ts","../../../../packages/sp/src/searchsuggest.ts","../../../../packages/sp/src/userprofiles.ts","../../../../packages/sp/src/social.ts","../../../../packages/sp/src/utilities.ts","../../../../packages/sp/src/hubsites.ts","../../../../packages/sp/src/rest.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { stringIsNullOrEmpty } from \"@pnp/common\";\n\nexport function extractWebUrl(candidateUrl: string) {\n\n if (stringIsNullOrEmpty(candidateUrl)) {\n return \"\";\n }\n\n let index = candidateUrl.indexOf(\"_api/\");\n\n if (index < 0) {\n index = candidateUrl.indexOf(\"_vti_bin/\");\n }\n\n if (index > -1) {\n return candidateUrl.substr(0, index);\n }\n\n // if all else fails just give them what they gave us back\n return candidateUrl;\n}\n","import { SharePointQueryableConstructor } from \"./sharepointqueryable\";\nimport { extend, combine, hOP } from \"@pnp/common\";\nimport { Logger, LogLevel } from \"@pnp/logging\";\nimport { ODataParser, ODataParserBase } from \"@pnp/odata\";\nimport { extractWebUrl } from \"./utils/extractweburl\";\n\nexport function odataUrlFrom(candidate: any): string {\n\n const parts: string[] = [];\n const s = [\"odata.type\", \"odata.editLink\", \"__metadata\", \"odata.metadata\"];\n if (hOP(candidate, s[0]) && candidate[s[0]] === \"SP.Web\") {\n // webs return an absolute url in the editLink\n if (hOP(candidate, s[1])) {\n parts.push(candidate[s[1]]);\n } else if (hOP(candidate, s[2])) {\n // we are dealing with verbose, which has an absolute uri\n parts.push(candidate.__metadata.uri);\n }\n\n } else {\n\n if (hOP(candidate, s[3]) && hOP(candidate, s[1])) {\n // we are dealign with minimal metadata (default)\n parts.push(extractWebUrl(candidate[s[3]]), \"_api\", candidate[s[1]]);\n } else if (hOP(candidate, s[1])) {\n parts.push(\"_api\", candidate[s[1]]);\n } else if (hOP(candidate, s[2])) {\n // we are dealing with verbose, which has an absolute uri\n parts.push(candidate.__metadata.uri);\n }\n }\n\n if (parts.length < 1) {\n Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", LogLevel.Warning);\n return \"\";\n }\n\n return combine(...parts);\n}\n\nclass SPODataEntityParserImpl extends ODataParserBase {\n\n constructor(protected factory: SharePointQueryableConstructor) {\n super();\n }\n\n public hydrate = (d: D) => {\n const o = new this.factory(odataUrlFrom(d), null);\n return extend(o, d);\n }\n\n public parse(r: Response): Promise {\n return super.parse(r).then((d: any) => {\n const o = new this.factory(odataUrlFrom(d), null);\n return extend(o, d);\n });\n }\n}\n\nclass SPODataEntityArrayParserImpl extends ODataParserBase<(T & D)[]> {\n\n constructor(protected factory: SharePointQueryableConstructor) {\n super();\n }\n\n public hydrate = (d: D[]) => {\n return d.map(v => {\n const o = new this.factory(odataUrlFrom(v), null);\n return extend(o, v);\n });\n }\n\n public parse(r: Response): Promise<(T & D)[]> {\n return super.parse(r).then((d: D[]) => {\n return d.map(v => {\n const o = new this.factory(odataUrlFrom(v), null);\n return extend(o, v);\n });\n });\n }\n}\n\nexport function spODataEntity(factory: SharePointQueryableConstructor): ODataParser {\n return new SPODataEntityParserImpl(factory);\n}\n\nexport function spODataEntityArray(factory: SharePointQueryableConstructor): ODataParser<(T & DataType)[]> {\n return new SPODataEntityArrayParserImpl(factory);\n}\n","import {\n LibraryConfiguration,\n TypedHash,\n RuntimeConfig,\n HttpClientImpl,\n FetchClient,\n} from \"@pnp/common\";\n\nexport interface SPConfigurationPart {\n sp?: {\n /**\n * Any headers to apply to all requests\n */\n headers?: TypedHash;\n\n /**\n * The base url used for all requests\n */\n baseUrl?: string;\n\n /**\n * Defines a factory method used to create fetch clients\n */\n fetchClientFactory?: () => HttpClientImpl;\n };\n}\n\nexport interface SPConfiguration extends LibraryConfiguration, SPConfigurationPart { }\n\nexport function setup(config: SPConfiguration): void {\n RuntimeConfig.extend(config);\n}\n\nexport class SPRuntimeConfigImpl {\n\n public get headers(): TypedHash {\n\n const spPart = RuntimeConfig.get(\"sp\");\n if (spPart !== undefined && spPart.headers !== undefined) {\n return spPart.headers;\n }\n\n return {};\n }\n\n public get baseUrl(): string | null {\n\n const spPart = RuntimeConfig.get(\"sp\");\n if (spPart !== undefined && spPart.baseUrl !== undefined) {\n return spPart.baseUrl;\n }\n\n if (RuntimeConfig.spfxContext !== undefined && RuntimeConfig.spfxContext !== null) {\n return RuntimeConfig.spfxContext.pageContext.web.absoluteUrl;\n }\n\n return null;\n }\n\n public get fetchClientFactory(): () => HttpClientImpl {\n\n const spPart = RuntimeConfig.get(\"sp\");\n if (spPart !== undefined && spPart.fetchClientFactory !== undefined) {\n return spPart.fetchClientFactory;\n } else {\n return () => new FetchClient();\n }\n }\n}\n\nexport let SPRuntimeConfig = new SPRuntimeConfigImpl();\n","import { SPHttpClient } from \"./sphttpclient\";\nimport { combine, extend } from \"@pnp/common\";\nimport { ODataDefaultParser } from \"@pnp/odata\";\nimport { SPRuntimeConfig } from \"../config/splibconfig\";\n\nexport class CachedDigest {\n public expiration: Date;\n public value: string;\n}\n\n// allows for the caching of digests across all HttpClient's which each have their own DigestCache wrapper.\nconst digests = new Map();\n\nexport class DigestCache {\n\n constructor(private _httpClient: SPHttpClient, private _digests: Map = digests) { }\n\n public getDigest(webUrl: string): Promise {\n\n const cachedDigest: CachedDigest = this._digests.get(webUrl);\n if (cachedDigest !== undefined) {\n const now = new Date();\n if (now < cachedDigest.expiration) {\n return Promise.resolve(cachedDigest.value);\n }\n }\n\n const url = combine(webUrl, \"/_api/contextinfo\");\n\n const headers = {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\n };\n\n return this._httpClient.fetchRaw(url, {\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: extend(headers, SPRuntimeConfig.headers, true),\n method: \"POST\",\n }).then((response) => {\n const parser = new ODataDefaultParser();\n return parser.parse(response).then((d: any) => d.GetContextWebInformation);\n }).then((data: any) => {\n const newCachedDigest = new CachedDigest();\n newCachedDigest.value = data.FormDigestValue;\n const seconds = data.FormDigestTimeoutSeconds;\n const expiration = new Date();\n expiration.setTime(expiration.getTime() + 1000 * seconds);\n newCachedDigest.expiration = expiration;\n this._digests.set(webUrl, newCachedDigest);\n return newCachedDigest.value;\n });\n }\n\n public clear() {\n this._digests.clear();\n }\n}\n","import { DigestCache } from \"./digestcache\";\nimport {\n extend,\n mergeHeaders,\n FetchOptions,\n RequestClient,\n getCtxCallback,\n HttpClientImpl,\n} from \"@pnp/common\";\nimport { SPRuntimeConfig } from \"../config/splibconfig\";\nimport { extractWebUrl } from \"../utils/extractweburl\";\n\nexport class SPHttpClient implements RequestClient {\n\n private _digestCache: DigestCache;\n\n constructor(private _impl: HttpClientImpl = SPRuntimeConfig.fetchClientFactory()) {\n this._digestCache = new DigestCache(this);\n }\n\n public fetch(url: string, options: FetchOptions = {}): Promise {\n\n let opts = extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\n\n const headers = new Headers();\n\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n mergeHeaders(headers, SPRuntimeConfig.headers);\n\n // second we add the local options so we can overwrite the globals\n mergeHeaders(headers, options.headers);\n\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:@pnp-$$Version$$\");\n }\n\n if (!headers.has(\"User-Agent\")) {\n // this marks the requests for understanding by the service\n headers.append(\"User-Agent\", \"NONISV|SharePointPnP|PnPCoreJS/$$Version$$\");\n }\n\n opts = extend(opts, { headers: headers });\n\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\n\n // if we have either a request digest or an authorization header we don't need a digest\n if (!headers.has(\"X-RequestDigest\") && !headers.has(\"Authorization\")) {\n return this._digestCache.getDigest(extractWebUrl(url))\n .then((digest) => {\n headers.append(\"X-RequestDigest\", digest);\n return this.fetchRaw(url, opts);\n });\n }\n }\n\n return this.fetchRaw(url, opts);\n }\n\n public fetchRaw(url: string, options: FetchOptions = {}): Promise {\n\n // here we need to normalize the headers\n const rawHeaders = new Headers();\n mergeHeaders(rawHeaders, options.headers);\n options = extend(options, { headers: rawHeaders });\n\n const retry = (ctx: RetryContext): void => {\n\n // handles setting the proper timeout for a retry\n const setRetry = (response: Response) => {\n let delay;\n\n if (response.headers.has(\"Retry-After\")) {\n // if we have gotten a header, use that value as the delay value\n delay = parseInt(response.headers.get(\"Retry-After\"), 10);\n } else {\n // grab our current delay\n delay = ctx.delay;\n\n // Increment our counters.\n ctx.delay *= 2;\n }\n\n ctx.attempts++;\n\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(Error(`Retry count exceeded (${ctx.retryCount}) for request. Response status: [${response.status}] ${response.statusText}`));\n } else {\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(getCtxCallback(this, retry, ctx), delay);\n }\n };\n\n // send the actual request\n this._impl.fetch(url, options).then((response) => {\n\n if (response.status === 429) {\n // we have been throttled\n setRetry(response);\n } else {\n ctx.resolve(response);\n }\n\n }).catch((response: Response) => {\n\n if (response.status === 503) {\n // http status code 503, we can retry this\n setRetry(response);\n } else {\n ctx.reject(response);\n }\n });\n };\n\n return new Promise((resolve, reject) => {\n\n const retryContext: RetryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n\n retry.call(this, retryContext);\n });\n }\n\n public get(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n }\n\n public post(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n }\n\n public patch(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n }\n\n public delete(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n }\n}\n\ninterface RetryContext {\n attempts: number;\n delay: number;\n reject: (reason?: any) => void;\n resolve: (value?: Response | PromiseLike) => void;\n retryCount: number;\n}\n","export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n","declare var global: { location: string, _spPageContextInfo?: { webAbsoluteUrl?: string, webServerRelativeUrl?: string } };\nimport { combine, isUrlAbsolute, hOP } from \"@pnp/common\";\nimport { SPRuntimeConfig } from \"../config/splibconfig\";\n\n/**\n * Ensures that a given url is absolute for the current web based on context\n *\n * @param candidateUrl The url to make absolute\n *\n */\nexport function toAbsoluteUrl(candidateUrl: string): Promise {\n\n return new Promise((resolve) => {\n\n if (isUrlAbsolute(candidateUrl)) {\n // if we are already absolute, then just return the url\n return resolve(candidateUrl);\n }\n\n if (SPRuntimeConfig.baseUrl !== null) {\n // base url specified either with baseUrl of spfxContext config property\n return resolve(combine(SPRuntimeConfig.baseUrl, candidateUrl));\n }\n\n if (global._spPageContextInfo !== undefined) {\n\n // operating in classic pages\n if (hOP(global._spPageContextInfo, \"webAbsoluteUrl\")) {\n return resolve(combine(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\n } else if (hOP(global._spPageContextInfo, \"webServerRelativeUrl\")) {\n return resolve(combine(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\n }\n }\n\n // does window.location exist and have a certain path part in it?\n if (global.location !== undefined) {\n const baseUrl = global.location.toString().toLowerCase();\n [\"/_layouts/\", \"/siteassets/\"].forEach((s: string) => {\n const index = baseUrl.indexOf(s);\n if (index > 0) {\n return resolve(combine(baseUrl.substr(0, index), candidateUrl));\n }\n });\n }\n\n return resolve(candidateUrl);\n });\n}\n","export function metadata(type: string) {\r\n return {\r\n \"__metadata\": { \"type\": type },\r\n };\r\n}\r\n","import {\n combine,\n isUrlAbsolute,\n FetchOptions,\n mergeOptions,\n extend,\n getGUID,\n jsS,\n} from \"@pnp/common\";\nimport {\n ODataParser,\n ODataQueryable,\n RequestContext,\n} from \"@pnp/odata\";\nimport { Logger, LogLevel } from \"@pnp/logging\";\nimport { SPBatch } from \"./batch\";\nimport { SPHttpClient } from \"./net/sphttpclient\";\nimport { toAbsoluteUrl } from \"./utils/toabsoluteurl\";\nimport { metadata } from \"./utils/metadata\";\n\nexport interface SharePointQueryableConstructor {\n new(baseUrl: string | SharePointQueryable, path?: string): T;\n}\n\n/**\n * SharePointQueryable Base Class\n *\n */\nexport class SharePointQueryable extends ODataQueryable {\n\n protected _forceCaching: boolean;\n\n /**\n * Creates a new instance of the SharePointQueryable class\n *\n * @constructor\n * @param baseUrl A string or SharePointQueryable that should form the base part of the url\n *\n */\n constructor(baseUrl: string | SharePointQueryable, path?: string) {\n super();\n\n this._forceCaching = false;\n\n if (typeof baseUrl === \"string\") {\n // we need to do some extra parsing to get the parent url correct if we are\n // being created from just a string.\n\n if (isUrlAbsolute(baseUrl) || baseUrl.lastIndexOf(\"/\") < 0) {\n this._parentUrl = baseUrl;\n this._url = combine(baseUrl, path);\n } else if (baseUrl.lastIndexOf(\"/\") > baseUrl.lastIndexOf(\"(\")) {\n // .../items(19)/fields\n const index = baseUrl.lastIndexOf(\"/\");\n this._parentUrl = baseUrl.slice(0, index);\n path = combine(baseUrl.slice(index), path);\n this._url = combine(this._parentUrl, path);\n } else {\n // .../items(19)\n const index = baseUrl.lastIndexOf(\"(\");\n this._parentUrl = baseUrl.slice(0, index);\n this._url = combine(baseUrl, path);\n }\n } else {\n this.extend(baseUrl, path);\n const target = baseUrl.query.get(\"@target\");\n if (target !== undefined) {\n this.query.set(\"@target\", target);\n }\n }\n }\n\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new SharePointQueryable\n */\n public as(factory: SharePointQueryableConstructor): T {\n const o = new factory(this._url, null);\n return extend(o, this, true);\n }\n\n /**\n * Gets the full url with query information\n *\n */\n public toUrlAndQuery(): string {\n\n const aliasedParams = new Map(this.query);\n\n let url = this.toUrl().replace(/'!(@.*?)::(.*?)'/ig, (match, labelName, value) => {\n Logger.write(`Rewriting aliased parameter from match ${match} to label: ${labelName} value: ${value}`, LogLevel.Verbose);\n aliasedParams.set(labelName, `'${value}'`);\n return labelName;\n });\n\n if (aliasedParams.size > 0) {\n const char = url.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n url += `${char}${Array.from(aliasedParams).map((v: [string, string]) => v[0] + \"=\" + v[1]).join(\"&\")}`;\n }\n\n return url;\n }\n\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n public select(...selects: string[]): this {\n if (selects.length > 0) {\n this.query.set(\"$select\", selects.join(\",\"));\n }\n return this;\n }\n\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n public expand(...expands: string[]): this {\n if (expands.length > 0) {\n this.query.set(\"$expand\", expands.join(\",\"));\n }\n return this;\n }\n\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n protected getParent(\n factory: SharePointQueryableConstructor,\n baseUrl: string | SharePointQueryable = this.parentUrl,\n path?: string,\n batch?: SPBatch): T {\n\n let parent = new factory(baseUrl, path).configureFrom(this);\n\n const t = \"@target\";\n if (this.query.has(t)) {\n parent.query.set(t, this.query.get(t));\n }\n if (batch !== undefined) {\n parent = parent.inBatch(batch);\n }\n return parent;\n }\n\n /**\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n protected clone(factory: SharePointQueryableConstructor, additionalPath?: string, includeBatch = true): T {\n\n const clone: T = super._clone(new factory(this, additionalPath), { includeBatch });\n\n // handle sp specific clone actions\n const t = \"@target\";\n if (this.query.has(t)) {\n clone.query.set(t, this.query.get(t));\n }\n\n return clone;\n }\n\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n protected toRequestContext(\n verb: string,\n options: FetchOptions = {},\n parser: ODataParser,\n pipeline: Array<(c: RequestContext) => Promise>>): Promise> {\n\n const dependencyDispose = this.hasBatch ? this._batchDependency : () => { return; };\n\n return toAbsoluteUrl(this.toUrlAndQuery()).then(url => {\n\n mergeOptions(options, this._options);\n\n // build our request context\n const context: RequestContext = {\n batch: this.batch,\n batchDependency: dependencyDispose,\n cachingOptions: this._cachingOptions,\n clientFactory: () => new SPHttpClient(),\n isBatched: this.hasBatch,\n isCached: this._forceCaching || (this._useCaching && /^get$/i.test(verb)),\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: url,\n requestId: getGUID(),\n verb: verb,\n };\n\n return context;\n });\n }\n}\n\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nexport class SharePointQueryableCollection extends SharePointQueryable {\n\n /**\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\n *\n * @param filter The string representing the filter query\n */\n public filter(filter: string): this {\n this.query.set(\"$filter\", filter);\n return this;\n }\n\n /**\n * Orders based on the supplied fields\n *\n * @param orderby The name of the field on which to sort\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n public orderBy(orderBy: string, ascending = true): this {\n const o = \"$orderby\";\n const query = this.query.has(o) ? this.query.get(o).split(\",\") : [];\n query.push(`${orderBy} ${ascending ? \"asc\" : \"desc\"}`);\n this.query.set(o, query.join(\",\"));\n return this;\n }\n\n /**\n * Skips the specified number of items\n *\n * @param skip The number of items to skip\n */\n public skip(skip: number): this {\n this.query.set(\"$skip\", skip.toString());\n return this;\n }\n\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n public top(top: number): this {\n this.query.set(\"$top\", top.toString());\n return this;\n }\n}\n\n/**\n * Represents an instance that can be selected\n *\n */\nexport class SharePointQueryableInstance extends SharePointQueryable {\n\n /**\n * Curries the update function into the common pieces\n * \n * @param type \n * @param mapper \n */\n protected _update(type: string, mapper: (data: Data, props: Props) => Return): (props: Props) => Promise {\n return (props: any) => this.postCore({\n body: jsS(extend(metadata(type), props)),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((d: Data) => mapper(d, props));\n }\n\n /**\n * Deletes this instance\n *\n */\n protected _delete(): Promise {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n\n /**\n * Deletes this instance with an etag value in the headers\n * \n * @param eTag eTag to delete\n */\n protected _deleteWithETag(eTag = \"*\"): Promise {\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\n\n/**\n * Decorator used to specify the default path for SharePointQueryable objects\n * \n * @param path \n */\nexport function defaultPath(path: string) {\n\n return function (target: T) {\n\n return class extends target {\n constructor(...args: any[]) {\n super(args[0], args.length > 1 && args[1] !== undefined ? args[1] : path);\n }\n };\n };\n}\n","import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { SiteGroups } from \"./sitegroups\";\nimport { TypedHash, jsS, extend } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Properties that provide both a getter, and a setter.\n *\n */\nexport interface UserUpdateResult {\n user: SiteUser;\n data: any;\n}\n\n/**\n * Describes a collection of all site collection users\n *\n */\n@defaultPath(\"siteusers\")\nexport class SiteUsers extends SharePointQueryableCollection {\n\n /**\n * Gets a user from the collection by id\n *\n * @param id The id of the user to retrieve\n */\n public getById(id: number): SiteUser {\n return new SiteUser(this, `getById(${id})`);\n }\n\n /**\n * Gets a user from the collection by email\n *\n * @param email The email address of the user to retrieve\n */\n public getByEmail(email: string): SiteUser {\n return new SiteUser(this, `getByEmail('${email}')`);\n }\n\n /**\n * Gets a user from the collection by login name\n *\n * @param loginName The login name of the user to retrieve\n */\n public getByLoginName(loginName: string): SiteUser {\n const su = new SiteUser(this);\n su.concat(`('!@v::${encodeURIComponent(loginName)}')`);\n return su;\n }\n\n /**\n * Removes a user from the collection by id\n *\n * @param id The id of the user to remove\n */\n public removeById(id: number | SharePointQueryable): Promise {\n return this.clone(SiteUsers, `removeById(${id})`).postCore();\n }\n\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user to remove\n */\n public removeByLoginName(loginName: string): Promise {\n const o = this.clone(SiteUsers, `removeByLoginName(@v)`);\n o.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return o.postCore();\n }\n\n /**\n * Adds a user to a group\n *\n * @param loginName The login name of the user to add to the group\n *\n */\n public add(loginName: string): Promise {\n return this.clone(SiteUsers, null).postCore({\n body: jsS(extend(metadata(\"SP.User\"), { LoginName: loginName })),\n }).then(() => this.getByLoginName(loginName));\n }\n}\n\n/**\n * Base class for a user\n * \n */\nexport class UserBase extends SharePointQueryableInstance {\n\n /**\n * Gets the groups for this user\n *\n */\n public get groups() {\n return new SiteGroups(this, \"groups\");\n }\n}\n\n/**\n * Describes a single user\n *\n */\nexport class SiteUser extends UserBase {\n\n /**\n * Updates this user instance with the supplied properties\n *\n * @param properties A plain object of property names and values to update for the user\n */\n public update = this._update, any>(\"SP.User\", data => ({ data, user: this }));\n\n /**\n * Delete this user\n *\n */\n public delete = this._delete;\n}\n\n/**\n * Represents the current user\n */\n@defaultPath(\"currentuser\")\nexport class CurrentUser extends UserBase { }\n\nexport interface SiteUserProps {\n Email: string;\n Id: number;\n IsHiddenInUI: boolean;\n IsShareByEmailGuestUser: boolean;\n IsSiteAdmin: boolean;\n LoginName: string;\n PrincipalType: number;\n Title: string;\n}\n","import { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { SiteUsers } from \"./siteusers\";\nimport { extend, TypedHash, jsS, hOP } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Principal Type enum\n *\n */\nexport enum PrincipalType {\n None = 0,\n User = 1,\n DistributionList = 2,\n SecurityGroup = 4,\n SharePointGroup = 8,\n All = 15,\n}\n\n/**\n * Results from updating a group\n *\n */\nexport interface GroupUpdateResult {\n group: SiteGroup;\n data: any;\n}\n\n/**\n * Results from adding a group\n *\n */\nexport interface GroupAddResult {\n group: SiteGroup;\n data: any;\n}\n\n/**\n * Describes a collection of site groups\n *\n */\n@defaultPath(\"sitegroups\")\nexport class SiteGroups extends SharePointQueryableCollection {\n\n /**\t\n * Gets a group from the collection by id\t\n *\t\n * @param id The id of the group to retrieve\t\n */\n public getById(id: number) {\n const sg = new SiteGroup(this);\n sg.concat(`(${id})`);\n return sg;\n }\n\n /**\n * Adds a new group to the site collection\n *\n * @param props The group properties object of property names and values to be set for the group\n */\n public add(properties: TypedHash): Promise {\n const postBody = jsS(extend(metadata(\"SP.Group\"), properties));\n\n return this.postCore({ body: postBody }).then((data) => {\n return {\n data: data,\n group: this.getById(data.Id),\n };\n });\n }\n\n /**\n * Gets a group from the collection by name\n *\n * @param groupName The name of the group to retrieve\n */\n public getByName(groupName: string): SiteGroup {\n return new SiteGroup(this, `getByName('${groupName}')`);\n }\n\n /**\n * Removes the group with the specified member id from the collection\n *\n * @param id The id of the group to remove\n */\n public removeById(id: number): Promise {\n return this.clone(SiteGroups, `removeById('${id}')`).postCore();\n }\n\n /**\n * Removes the cross-site group with the specified name from the collection\n *\n * @param loginName The name of the group to remove\n */\n public removeByLoginName(loginName: string): Promise {\n return this.clone(SiteGroups, `removeByLoginName('${loginName}')`).postCore();\n }\n}\n\n/**\n * Describes a single group\n *\n */\nexport class SiteGroup extends SharePointQueryableInstance {\n\n /**\n * Gets the users for this group\n *\n */\n public get users(): SiteUsers {\n return new SiteUsers(this, \"users\");\n }\n\n public update = this._update, any>(\"SP.Group\", (d, p) => {\n let retGroup: SiteGroup = this;\n\n if (hOP(p, \"Title\")) {\n /* tslint:disable-next-line no-string-literal */\n retGroup = this.getParent(SiteGroup, this.parentUrl, `getByName('${p[\"Title\"]}')`);\n }\n\n return {\n data: d,\n group: retGroup,\n };\n });\n}\n\nexport interface SiteGroupAddResult {\n group: SiteGroup;\n data: any;\n}\n","import { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { SiteGroups } from \"./sitegroups\";\nimport { BasePermissions } from \"./types\";\nimport { extend, TypedHash, jsS, hOP } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Describes a set of role assignments for the current scope\n *\n */\n@defaultPath(\"roleassignments\")\nexport class RoleAssignments extends SharePointQueryableCollection {\n\n /**\t\n * Gets the role assignment associated with the specified principal id from the collection.\t\n *\t\n * @param id The id of the role assignment\t\n */\n public getById(id: number) {\n const ra = new RoleAssignment(this);\n ra.concat(`(${id})`);\n return ra;\n }\n\n /**\n * Adds a new role assignment with the specified principal and role definitions to the collection\n *\n * @param principalId The id of the user or group to assign permissions to\n * @param roleDefId The id of the role definition that defines the permissions to assign\n *\n */\n public add(principalId: number, roleDefId: number): Promise {\n return this.clone(RoleAssignments, `addroleassignment(principalid=${principalId}, roledefid=${roleDefId})`).postCore();\n }\n\n /**\n * Removes the role assignment with the specified principal and role definition from the collection\n *\n * @param principalId The id of the user or group in the role assignment\n * @param roleDefId The id of the role definition in the role assignment\n *\n */\n public remove(principalId: number, roleDefId: number): Promise {\n return this.clone(RoleAssignments, `removeroleassignment(principalid=${principalId}, roledefid=${roleDefId})`).postCore();\n }\n}\n\n/**\n * Describes a role assignment\n *\n */\nexport class RoleAssignment extends SharePointQueryableInstance {\n\n /**\n * Gets the groups that directly belong to the access control list (ACL) for this securable object\n *\n */\n public get groups(): SiteGroups {\n return new SiteGroups(this, \"groups\");\n }\n\n /**\n * Gets the role definition bindings for this role assignment\n *\n */\n public get bindings(): RoleDefinitionBindings {\n return new RoleDefinitionBindings(this);\n }\n\n /**\n * Deletes this role assignment\n *\n */\n public delete = this._delete;\n}\n\n/**\n * Describes a collection of role definitions\n *\n */\n@defaultPath(\"roledefinitions\")\nexport class RoleDefinitions extends SharePointQueryableCollection {\n\n /**\t \n * Gets the role definition with the specified id from the collection\t \n *\t \n * @param id The id of the role definition\t \n *\t \n */\n public getById(id: number): RoleDefinition {\n return new RoleDefinition(this, `getById(${id})`);\n }\n\n /**\n * Gets the role definition with the specified name\n *\n * @param name The name of the role definition\n *\n */\n public getByName(name: string): RoleDefinition {\n return new RoleDefinition(this, `getbyname('${name}')`);\n }\n\n /**\n * Gets the role definition with the specified role type\n *\n * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7)\n *\n */\n public getByType(roleTypeKind: number): RoleDefinition {\n return new RoleDefinition(this, `getbytype(${roleTypeKind})`);\n }\n\n /**\n * Creates a role definition\n *\n * @param name The new role definition's name\n * @param description The new role definition's description\n * @param order The order in which the role definition appears\n * @param basePermissions The permissions mask for this role definition\n *\n */\n public add(name: string, description: string, order: number, basePermissions: BasePermissions): Promise {\n\n const postBody = jsS({\n BasePermissions: {\n High: basePermissions.High.toString(),\n Low: basePermissions.Low.toString(),\n },\n Description: description,\n Name: name,\n Order: order,\n __metadata: { \"type\": \"SP.RoleDefinition\" },\n });\n\n return this.postCore({ body: postBody }).then((data) => {\n return {\n data: data,\n definition: this.getById(data.Id),\n };\n });\n }\n}\n\n/**\n * Describes a role definition\n *\n */\nexport class RoleDefinition extends SharePointQueryableInstance {\n\n /**\n * Deletes this role definition\n *\n */\n public delete = this._delete;\n\n /**\n * Updates this role definition with the supplied properties\n *\n * @param properties A plain object hash of values to update for the role definition\n */\n /* tslint:disable no-string-literal */\n public update(properties: TypedHash): Promise {\n\n if (hOP(properties, \"BasePermissions\") !== undefined) {\n properties[\"BasePermissions\"] = extend({ __metadata: { type: \"SP.BasePermissions\" } }, {\n High: properties[\"BasePermissions\"].High.toString(),\n Low: properties[\"BasePermissions\"].Low.toString(),\n });\n }\n\n const postBody = jsS(extend(metadata(\"SP.RoleDefinition\"), properties));\n\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n\n let retDef: RoleDefinition = this;\n\n if (hOP(properties, \"Name\")) {\n const parent = this.getParent(RoleDefinitions, this.parentUrl, \"\");\n retDef = parent.getByName(properties[\"Name\"]);\n }\n\n return {\n data: data,\n definition: retDef,\n };\n });\n }\n /* tslint:enable */\n}\n\n/**\n * Result from updating a role definition\n *\n */\nexport interface RoleDefinitionUpdateResult {\n definition: RoleDefinition;\n data: any;\n}\n\n/**\n * Result from adding a role definition\n *\n */\nexport interface RoleDefinitionAddResult {\n definition: RoleDefinition;\n data: any;\n}\n\n/**\n * Describes the role definitons bound to a role assignment object\n *\n */\n@defaultPath(\"roledefinitionbindings\")\nexport class RoleDefinitionBindings extends SharePointQueryableCollection { }\n","// reference: https://msdn.microsoft.com/en-us/library/office/dn600183.aspx\nimport { TypedHash } from \"@pnp/common\";\n\nimport { NavigationNode } from \"./navigation\";\n\n/**\n * Represents the unique sequential location of a change within the change log.\n */\nexport interface ChangeToken {\n /**\n * Gets or sets a string value that contains the serialized representation of the change token generated by the protocol server.\n */\n StringValue: string;\n}\n\n/**\n * Defines a query that is performed against the change log.\n */\nexport interface ChangeQuery {\n /**\n * Gets or sets a value that specifies whether add changes are included in the query.\n */\n Add?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to alerts are included in the query.\n */\n Alert?: boolean;\n\n /**\n * Gets or sets a value that specifies the end date and end time for changes that are returned through the query.\n */\n ChangeTokenEnd?: ChangeToken;\n\n /**\n * Gets or sets a value that specifies the start date and start time for changes that are returned through the query.\n */\n ChangeTokenStart?: ChangeToken;\n\n /**\n * Gets or sets a value that specifies whether changes to content types are included in the query.\n */\n ContentType?: boolean;\n\n /**\n * Gets or sets a value that specifies whether deleted objects are included in the query.\n */\n DeleteObject?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to fields are included in the query.\n */\n Field?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to files are included in the query.\n */\n File?: boolean;\n\n /**\n * Gets or sets value that specifies whether changes to folders are included in the query.\n */\n Folder?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to groups are included in the query.\n */\n Group?: boolean;\n\n /**\n * Gets or sets a value that specifies whether adding users to groups is included in the query.\n */\n GroupMembershipAdd?: boolean;\n\n /**\n * Gets or sets a value that specifies whether deleting users from the groups is included in the query.\n */\n GroupMembershipDelete?: boolean;\n\n /**\n * Gets or sets a value that specifies whether general changes to list items are included in the query.\n */\n Item?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to lists are included in the query.\n */\n List?: boolean;\n\n /**\n * Gets or sets a value that specifies whether move changes are included in the query.\n */\n Move?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to the navigation structure of a site collection are included in the query.\n */\n Navigation?: boolean;\n\n /**\n * Gets or sets a value that specifies whether renaming changes are included in the query.\n */\n Rename?: boolean;\n\n /**\n * Gets or sets a value that specifies whether restoring items from the recycle bin or from backups is included in the query.\n */\n Restore?: boolean;\n\n /**\n * Gets or sets a value that specifies whether adding role assignments is included in the query.\n */\n RoleAssignmentAdd?: boolean;\n\n /**\n * Gets or sets a value that specifies whether adding role assignments is included in the query.\n */\n RoleAssignmentDelete?: boolean;\n\n /**\n * Gets or sets a value that specifies whether adding role assignments is included in the query.\n */\n RoleDefinitionAdd?: boolean;\n\n /**\n * Gets or sets a value that specifies whether adding role assignments is included in the query.\n */\n RoleDefinitionDelete?: boolean;\n\n /**\n * Gets or sets a value that specifies whether adding role assignments is included in the query.\n */\n RoleDefinitionUpdate?: boolean;\n\n /**\n * Gets or sets a value that specifies whether modifications to security policies are included in the query.\n */\n SecurityPolicy?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to site collections are included in the query.\n */\n Site?: boolean;\n\n /**\n * Gets or sets a value that specifies whether updates made using the item SystemUpdate method are included in the query.\n */\n SystemUpdate?: boolean;\n\n /**\n * Gets or sets a value that specifies whether update changes are included in the query.\n */\n Update?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to users are included in the query.\n */\n User?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to views are included in the query.\n */\n View?: boolean;\n\n /**\n * Gets or sets a value that specifies whether changes to Web sites are included in the query.\n */\n Web?: boolean;\n}\n\n/**\n * Specifies a Collaborative Application Markup Language (CAML) query on a list or joined lists.\n */\nexport interface CamlQuery {\n\n /**\n * Gets or sets a value that indicates whether the query returns dates in Coordinated Universal Time (UTC) format.\n */\n DatesInUtc?: boolean;\n\n /**\n * Gets or sets a value that specifies the server relative URL of a list folder from which results will be returned.\n */\n FolderServerRelativeUrl?: string;\n\n /**\n * Gets or sets a value that specifies the information required to get the next page of data for the list view.\n */\n ListItemCollectionPosition?: ListItemCollectionPosition;\n\n /**\n * Gets or sets value that specifies the XML schema that defines the list view.\n */\n ViewXml?: string;\n}\n\n/**\n * Specifies the information required to get the next page of data for a list view.\n */\nexport interface ListItemCollectionPosition {\n /**\n * Gets or sets a value that specifies information, as name-value pairs, required to get the next page of data for a list view.\n */\n PagingInfo: string;\n}\n\n/**\n * Represents the input parameter of the GetListItemChangesSinceToken method.\n */\nexport interface ChangeLogitemQuery {\n /**\n * The change token for the request.\n */\n ChangeToken?: string;\n\n /**\n * The XML element that defines custom filtering for the query.\n */\n Contains?: string;\n\n /**\n * The records from the list to return and their return order.\n */\n Query?: string;\n\n /**\n * The options for modifying the query.\n */\n QueryOptions?: string;\n\n /**\n * RowLimit\n */\n RowLimit?: string;\n\n /**\n * The names of the fields to include in the query result.\n */\n ViewFields?: string;\n\n /**\n * The GUID of the view.\n */\n ViewName?: string;\n}\n\n/**\n * Determines the display mode of the given control or view\n */\nexport enum ControlMode {\n Display = 1,\n Edit = 2,\n New = 3,\n}\n\n/**\n * Represents properties of a list item field and its value.\n */\nexport interface ListItemFormUpdateValue {\n\n /**\n * The error message result after validating the value for the field.\n */\n ErrorMessage?: string;\n\n /**\n * The internal name of the field.\n */\n FieldName?: string;\n\n /**\n * The value of the field, in string format.\n */\n FieldValue?: string;\n\n /**\n * Indicates whether there was an error result after validating the value for the field.\n */\n HasException?: boolean;\n}\n\n/**\n * Specifies the type of the field.\n */\nexport enum FieldTypes {\n Invalid = 0,\n Integer = 1,\n Text = 2,\n Note = 3,\n DateTime = 4,\n Counter = 5,\n Choice = 6,\n Lookup = 7,\n Boolean = 8,\n Number = 9,\n Currency = 10,\n URL = 11,\n Computed = 12,\n Threading = 13,\n Guid = 14,\n MultiChoice = 15,\n GridChoice = 16,\n Calculated = 17,\n File = 18,\n Attachments = 19,\n User = 20,\n Recurrence = 21,\n CrossProjectLink = 22,\n ModStat = 23,\n Error = 24,\n ContentTypeId = 25,\n PageSeparator = 26,\n ThreadIndex = 27,\n WorkflowStatus = 28,\n AllDayEvent = 29,\n WorkflowEventType = 30,\n}\n\nexport enum DateTimeFieldFormatType {\n DateOnly = 0,\n DateTime = 1,\n}\n\nexport enum DateTimeFieldFriendlyFormatType {\n Unspecified = 0,\n Disabled = 1,\n Relative = 2,\n}\n\n/**\n * Specifies the control settings while adding a field.\n */\nexport enum AddFieldOptions {\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection\n */\n DefaultValue = 0,\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\n */\n AddToDefaultContentType = 1,\n /**\n * Specify that a new field must not be added to any other content type\n */\n AddToNoContentType = 2,\n /**\n * Specify that a new field that is added to the specified list must also be added to all content types in the site collection\n */\n AddToAllContentTypes = 4,\n /**\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\n */\n AddFieldInternalNameHint = 8,\n /**\n * Specify that a new field that is added to the specified list must also be added to the default list view\n */\n AddFieldToDefaultView = 16,\n /**\n * Specify to confirm that no other field has the same display name\n */\n AddFieldCheckDisplayName = 32,\n}\n\nexport interface XmlSchemaFieldCreationInformation {\n Options?: AddFieldOptions;\n SchemaXml: string;\n}\n\nexport enum CalendarType {\n Gregorian = 1,\n Japan = 3,\n Taiwan = 4,\n Korea = 5,\n Hijri = 6,\n Thai = 7,\n Hebrew = 8,\n GregorianMEFrench = 9,\n GregorianArabic = 10,\n GregorianXLITEnglish = 11,\n GregorianXLITFrench = 12,\n KoreaJapanLunar = 14,\n ChineseLunar = 15,\n SakaEra = 16,\n UmAlQura = 23,\n}\n\nexport enum UrlFieldFormatType {\n Hyperlink = 0,\n Image = 1,\n}\n\nexport interface BasePermissions {\n Low: number;\n High: number;\n}\n\nexport enum PermissionKind {\n\n /**\n * Has no permissions on the Site. Not available through the user interface.\n */\n EmptyMask = 0,\n\n /**\n * View items in lists, documents in document libraries, and Web discussion comments.\n */\n ViewListItems = 1,\n\n /**\n * Add items to lists, documents to document libraries, and Web discussion comments.\n */\n AddListItems = 2,\n\n /**\n * Edit items in lists, edit documents in document libraries, edit Web discussion comments\n * in documents, and customize Web Part Pages in document libraries.\n */\n EditListItems = 3,\n\n /**\n * Delete items from a list, documents from a document library, and Web discussion\n * comments in documents.\n */\n DeleteListItems = 4,\n\n /**\n * Approve a minor version of a list item or document.\n */\n ApproveItems = 5,\n\n /**\n * View the source of documents with server-side file handlers.\n */\n OpenItems = 6,\n\n /**\n * View past versions of a list item or document.\n */\n ViewVersions = 7,\n\n /**\n * Delete past versions of a list item or document.\n */\n DeleteVersions = 8,\n\n /**\n * Discard or check in a document which is checked out to another user.\n */\n CancelCheckout = 9,\n\n /**\n * Create, change, and delete personal views of lists.\n */\n ManagePersonalViews = 10,\n\n /**\n * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.\n */\n ManageLists = 12,\n\n /**\n * View forms, views, and application pages, and enumerate lists.\n */\n ViewFormPages = 13,\n\n /**\n * Make content of a list or document library retrieveable for anonymous users through SharePoint search.\n * The list permissions in the site do not change.\n */\n AnonymousSearchAccessList = 14,\n\n /**\n * Allow users to open a Site, list, or folder to access items inside that container.\n */\n Open = 17,\n\n /**\n * View pages in a Site.\n */\n ViewPages = 18,\n\n /**\n * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using\n * a Windows SharePoint Services compatible editor.\n */\n AddAndCustomizePages = 19,\n\n /**\n * Apply a theme or borders to the entire Site.\n */\n ApplyThemeAndBorder = 20,\n\n /**\n * Apply a style sheet (.css file) to the Site.\n */\n ApplyStyleSheets = 21,\n\n /**\n * View reports on Site usage.\n */\n ViewUsageData = 22,\n\n /**\n * Create a Site using Self-Service Site Creation.\n */\n CreateSSCSite = 23,\n\n /**\n * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.\n */\n ManageSubwebs = 24,\n\n /**\n * Create a group of users that can be used anywhere within the site collection.\n */\n CreateGroups = 25,\n\n /**\n * Create and change permission levels on the Site and assign permissions to users\n * and groups.\n */\n ManagePermissions = 26,\n\n /**\n * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer\n * and WebDAV interfaces.\n */\n BrowseDirectories = 27,\n\n /**\n * View information about users of the Site.\n */\n BrowseUserInfo = 28,\n\n /**\n * Add or remove personal Web Parts on a Web Part Page.\n */\n AddDelPrivateWebParts = 29,\n\n /**\n * Update Web Parts to display personalized information.\n */\n UpdatePersonalWebParts = 30,\n\n /**\n * Grant the ability to perform all administration tasks for the Site as well as\n * manage content, activate, deactivate, or edit properties of Site scoped Features\n * through the object model or through the user interface (UI). When granted on the\n * root Site of a Site Collection, activate, deactivate, or edit properties of\n * site collection scoped Features through the object model. To browse to the Site\n * Collection Features page and activate or deactivate Site Collection scoped Features\n * through the UI, you must be a Site Collection administrator.\n */\n ManageWeb = 31,\n\n /**\n * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through\n * SharePoint search if the list or document library has AnonymousSearchAccessList set.\n */\n AnonymousSearchAccessWebLists = 32,\n\n /**\n * Use features that launch client applications. Otherwise, users must work on documents\n * locally and upload changes.\n */\n UseClientIntegration = 37,\n\n /**\n * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.\n */\n UseRemoteAPIs = 38,\n\n /**\n * Manage alerts for all users of the Site.\n */\n ManageAlerts = 39,\n\n /**\n * Create e-mail alerts.\n */\n CreateAlerts = 40,\n\n /**\n * Allows a user to change his or her user information, such as adding a picture.\n */\n EditMyUserInfo = 41,\n\n /**\n * Enumerate permissions on Site, list, folder, document, or list item.\n */\n EnumeratePermissions = 63,\n\n /**\n * Has all permissions on the Site. Not available through the user interface.\n */\n FullMask = 65,\n}\n\nexport interface FollowedContent {\n FollowedDocumentsUrl: string;\n FollowedSitesUrl: string;\n}\n\nexport interface UserProfile {\n /**\n * An object containing the user's FollowedDocumentsUrl and FollowedSitesUrl.\n */\n FollowedContent?: FollowedContent;\n /**\n * The account name of the user. (SharePoint Online only)\n */\n AccountName?: string;\n /**\n * The display name of the user. (SharePoint Online only)\n */\n DisplayName?: string;\n /**\n * The FirstRun flag of the user. (SharePoint Online only)\n */\n O15FirstRunExperience?: number;\n /**\n * The personal site of the user.\n */\n PersonalSite?: string;\n /**\n * The capabilities of the user's personal site. Represents a bitwise PersonalSiteCapabilities value:\n * None = 0; Profile Value = 1; Social Value = 2; Storage Value = 4; MyTasksDashboard Value = 8; Education Value = 16; Guest Value = 32.\n */\n PersonalSiteCapabilities?: number;\n /**\n * The error thrown when the user's personal site was first created, if any. (SharePoint Online only)\n */\n PersonalSiteFirstCreationError?: string;\n /**\n * The date and time when the user's personal site was first created. (SharePoint Online only)\n */\n PersonalSiteFirstCreationTime?: Date;\n /**\n * The status for the state of the personal site instantiation\n */\n PersonalSiteInstantiationState?: number;\n /**\n * The date and time when the user's personal site was last created. (SharePoint Online only)\n */\n PersonalSiteLastCreationTime?: Date;\n /**\n * The number of attempts made to create the user's personal site. (SharePoint Online only)\n */\n PersonalSiteNumberOfRetries?: number;\n /**\n * Indicates whether the user's picture is imported from Exchange.\n */\n PictureImportEnabled?: boolean;\n /**\n * The public URL of the personal site of the current user. (SharePoint Online only)\n */\n PublicUrl?: string;\n /**\n * The URL used to create the user's personal site.\n */\n UrlToCreatePersonalSite?: string;\n}\n\nexport interface HashTag {\n /**\n * The hash tag's internal name.\n */\n Name?: string;\n /**\n * The number of times that the hash tag is used.\n */\n UseCount?: number;\n}\n\nexport interface HashTagCollection {\n Items: HashTag[];\n}\n\nexport interface UserIdInfo {\n NameId?: string;\n NameIdIssuer?: string;\n}\n\n/**\n * Specifies the type of a principal.\n */\n/* tslint:disable:no-bitwise */\nexport const enum PrincipalType {\n /**\n * Enumeration whose value specifies no principal type.\n */\n None = 0,\n /**\n * Enumeration whose value specifies a user as the principal type.\n */\n User = 1,\n /**\n * Enumeration whose value specifies a distribution list as the principal type.\n */\n DistributionList = 2,\n /**\n * Enumeration whose value specifies a security group as the principal type.\n */\n SecurityGroup = 4,\n /**\n * Enumeration whose value specifies a group as the principal type.\n */\n SharePointGroup = 8,\n /**\n * Enumeration whose value specifies all principal types.\n */\n All = SharePointGroup | SecurityGroup | DistributionList | User,\n}\n/* tslint:enable:no-bitwise */\n\n/**\n * Specifies the source of a principal.\n */\n/* tslint:disable:no-bitwise */\nexport const enum PrincipalSource {\n /**\n * Enumeration whose value specifies no principal source.\n */\n None = 0,\n /**\n * Enumeration whose value specifies user information list as the principal source.\n */\n UserInfoList = 1,\n /**\n * Enumeration whose value specifies Active Directory as the principal source.\n */\n Windows = 2,\n /**\n * Enumeration whose value specifies the current membership provider as the principal source.\n */\n MembershipProvider = 4,\n /**\n * Enumeration whose value specifies the current role provider as the principal source.\n */\n RoleProvider = 8,\n /**\n * Enumeration whose value specifies all principal sources.\n */\n All = RoleProvider | MembershipProvider | Windows | UserInfoList,\n}\n/* tslint:enable:no-bitwise */\n\nexport enum RoleType {\n None = 0,\n Guest = 1,\n Reader = 2,\n Contributor = 3,\n WebDesigner = 4,\n Administrator = 5,\n}\n\nexport interface PrincipalInfo {\n Department: string;\n DisplayName: string;\n Email: string;\n JobTitle: string;\n LoginName: string;\n Mobile: string;\n PrincipalId: number;\n PrincipalType: PrincipalType;\n SIPAddress: string;\n}\n\nexport interface DocumentLibraryInformation {\n AbsoluteUrl?: string;\n Modified?: Date;\n ModifiedFriendlyDisplay?: string;\n ServerRelativeUrl?: string;\n Title?: string;\n}\n\nexport interface ContextInfo {\n FormDigestTimeoutSeconds?: number;\n FormDigestValue?: number;\n LibraryVersion?: string;\n SiteFullUrl?: string;\n SupportedSchemaVersions?: string[];\n WebFullUrl?: string;\n}\n\nexport interface RenderListData {\n Row: any[];\n FirstRow: number;\n FolderPermissions: string;\n LastRow: number;\n FilterLink: string;\n ForceNoHierarchy: string;\n HierarchyHasIndention: string;\n}\n\nexport enum PageType {\n Invalid = -1,\n DefaultView,\n NormalView,\n DialogView,\n View,\n DisplayForm,\n DisplayFormDialog,\n EditForm,\n EditFormDialog,\n NewForm,\n NewFormDialog,\n SolutionForm,\n PAGE_MAXITEMS,\n}\n\nexport interface ListFormData {\n ContentType?: string;\n Title?: string;\n Author?: string;\n Editor?: string;\n Created?: Date;\n Modified: Date;\n Attachments?: any;\n ListSchema?: any;\n FormControlMode?: number;\n FieldControlModes?: {\n Title?: number,\n Author?: number,\n Editor?: number,\n Created?: number,\n Modified?: number,\n Attachments?: number,\n };\n WebAttributes?: {\n WebUrl?: string,\n EffectivePresenceEnabled?: boolean,\n AllowScriptableWebParts?: boolean,\n PermissionCustomizePages?: boolean,\n LCID?: number,\n CurrentUserId?: number,\n };\n ItemAttributes?: {\n Id?: number,\n FsObjType?: number,\n ExternalListItem?: boolean,\n Url?: string,\n EffectiveBasePermissionsLow?: number,\n EffectiveBasePermissionsHigh?: number,\n };\n ListAttributes?: {\n Id?: string,\n BaseType?: number,\n Direction?: string,\n ListTemplateType?: number,\n DefaultItemOpen?: number,\n EnableVersioning?: boolean,\n };\n CSRCustomLayout?: boolean;\n PostBackRequired?: boolean;\n PreviousPostBackHandled?: boolean;\n UploadMode?: boolean;\n SubmitButtonID?: string;\n ItemContentTypeName?: string;\n ItemContentTypeId?: string;\n JSLinks?: string;\n}\n\nexport enum SharingLinkKind {\n /**\n * Uninitialized link\n */\n Uninitialized = 0,\n /**\n * Direct link to the object being shared\n */\n Direct = 1,\n /**\n * Organization-shareable link to the object being shared with view permissions\n */\n OrganizationView = 2,\n /**\n * Organization-shareable link to the object being shared with edit permissions\n */\n OrganizationEdit = 3,\n /**\n * View only anonymous link\n */\n AnonymousView = 4,\n /**\n * Read/Write anonymous link\n */\n AnonymousEdit = 5,\n /**\n * Flexible sharing Link where properties can change without affecting link URL\n */\n Flexible = 6,\n}\n\nexport interface ShareObjectOptions {\n url?: string;\n loginNames?: string | string[];\n role: SharingRole;\n emailData?: SharingEmailData;\n group?: RoleType;\n propagateAcl?: boolean;\n includeAnonymousLinkInEmail?: boolean;\n useSimplifiedRoles?: boolean;\n}\n\n/**\n * Indicates the role of the sharing link\n */\nexport enum SharingRole {\n None = 0,\n View = 1,\n Edit = 2,\n Owner = 3,\n}\n\n/**\n * Represents email data.\n */\nexport interface SharingEmailData {\n\n /**\n * The e-mail subject.\n */\n subject?: string;\n\n /**\n * The e-mail body.\n */\n body: string;\n}\n\nexport interface ShareLinkSettings {\n /**\n * The optional unique identifier of an existing sharing link to be retrieved and updated if necessary.\n */\n shareId?: string;\n\n /**\n * The kind of the sharing link to be created.\n */\n linkKind: SharingLinkKind;\n\n /**\n * A date/time string for which the format conforms to the ISO 8601:2004(E) complete representation for calendar date and time of day and\n * which represents the time and date of expiry for the anonymous link. Both the minutes and hour value must be specified for the\n * difference between the local and UTC time. Midnight is represented as 00:00:00.\n */\n expiration?: string;\n\n /**\n * The role to be used for the sharing link. This is required for Flexible links, and ignored for legacy link kinds.\n */\n role?: SharingRole;\n\n /**\n * Indicates if the sharing link, should support anonymous access. This is required for Flexible links, and ignored for legacy link kinds.\n */\n allowAnonymousAccess?: boolean;\n}\n\nexport interface ShareLinkRequest {\n\n /**\n * A string of JSON representing users in people picker format. Only needed if an e-mail notification should be sent.\n */\n peoplePickerInput?: string;\n\n /**\n * Whether to create the link or not if it doesn't exist yet.\n */\n createLink: boolean;\n\n /**\n * The e-mail data. Only needed if an e-mail notification should be sent.\n */\n emailData?: SharingEmailData;\n\n /**\n * The settings for the sharing link to be created/updated\n */\n settings: ShareLinkSettings;\n}\n\n/**\n * Represents a response for sharing a link\n */\nexport interface ShareLinkResponse {\n /**\n * A SharingLinkInfo that represents the sharing link. Will be populated if sharing operation is returning a sharing link.\n */\n sharingLinkInfo: SharingLinkInfo;\n}\n\nexport interface SharingLinkInfo {\n\n AllowsAnonymousAccess: boolean;\n Created: string;\n CreatedBy: PrincipalInfo;\n Expiration: string;\n IsActive: boolean;\n IsEditLink: boolean;\n IsFormsLink: boolean;\n IsUnhealthy: boolean;\n LastModified: string;\n LastModifiedBy: PrincipalInfo;\n LinkKind: SharingLinkKind;\n ShareId: string;\n Url: string;\n}\n\nexport enum SharingOperationStatusCode {\n /**\n * The share operation completed without errors.\n */\n CompletedSuccessfully = 0,\n /**\n * The share operation completed and generated requests for access.\n */\n AccessRequestsQueued = 1,\n /**\n * The share operation failed as there were no resolved users.\n */\n NoResolvedUsers = -1,\n /**\n * The share operation failed due to insufficient permissions.\n */\n AccessDenied = -2,\n /**\n * The share operation failed when attempting a cross site share, which is not supported.\n */\n CrossSiteRequestNotSupported = -3,\n /**\n * The sharing operation failed due to an unknown error.\n */\n UnknowError = -4,\n /**\n * The text you typed is too long. Please shorten it.\n */\n EmailBodyTooLong = -5,\n /**\n * The maximum number of unique scopes in the list has been exceeded.\n */\n ListUniqueScopesExceeded = -6,\n /**\n * The share operation failed because a sharing capability is disabled in the site.\n */\n CapabilityDisabled = -7,\n /**\n * The specified object for the share operation is not supported.\n */\n ObjectNotSupported = -8,\n /**\n * A SharePoint group cannot contain another SharePoint group.\n */\n NestedGroupsNotSupported = -9,\n}\n\nexport interface SharingResult {\n\n /**\n * The relative URL of a page which can be navigated to, to show permissions.\n */\n PermissionsPageRelativeUrl?: string;\n\n /**\n * A collection of users which have new pending access requests as a result of sharing.\n */\n UsersWithAccessRequests?: any[]; // SPSharingUserCollection\n\n /**\n * An enumeration which summarizes the result of the sharing operation.\n */\n StatusCode?: SharingOperationStatusCode;\n\n /**\n * An error message about the failure if sharing was unsuccessful.\n */\n ErrorMessage?: string;\n\n /**\n * A list of UserSharingResults from attempting to share a securable with unique permissions.\n */\n UniquelyPermissionedUsers?: UserSharingResult[];\n /**\n * Groups which were granted permissions.\n */\n GroupsSharedWith?: any[]; // SPGroupCollection\n\n /**\n * The SharePoint group users were added to, if any were added to a group.\n */\n GroupUsersAddedTo?: any; // SPGroup\n\n /**\n * A list of users being added to a SharePoint permissions goup\n */\n UsersAddedToGroup?: UserSharingResult[];\n\n /**\n * A list of SPInvitationCreationResult for external users being invited to have access.\n */\n InvitedUsers?: SPInvitationCreationResult[];\n\n /**\n * The name of the securable being shared.\n */\n Name?: string;\n\n /**\n * The url of the securable being shared.\n */\n Url?: string;\n\n /**\n * IconUrl\n */\n IconUrl?: string;\n}\n\nexport interface UserSharingResult {\n IsUserKnown?: boolean;\n Status?: boolean;\n Message?: string;\n User?: string;\n DisplayName?: string;\n Email?: string;\n CurrentRole?: SharingRole;\n AllowedRoles?: SharingRole[];\n InvitationLink?: string;\n}\n\nexport interface SPInvitationCreationResult {\n Succeeded?: boolean;\n Email?: string;\n InvitationLink?: string;\n}\n\nexport interface SharingRecipient {\n email?: string;\n alias?: string;\n}\n\nexport interface SharingEntityPermission {\n /**\n * The Input Entity provided to the Call.\n */\n inputEntity: string;\n /**\n * The Resolved Entity after resolving using PeoplePicker API.\n */\n resolvedEntity: string;\n /**\n * Does the Entity have Access to the Securable Object\n */\n hasAccess: boolean;\n /**\n * Role of the Entity on ListItem\n */\n role: SharingRole;\n}\n\nexport interface SharingInformationRequest {\n /**\n * Max Principal's to return.\n */\n maxPrincipalsToReturn: number;\n /**\n * Supported Features (For future use by Office Client).\n */\n clientSupportedFeatures: string;\n}\n\nexport interface ObjectSharingSettings {\n /**\n * The URL pointing to the containing SPWeb object\n */\n WebUrl: string;\n /**\n * The unique ID of the parent list (if applicable)\n */\n ListId?: string;\n /**\n * The list item ID (if applicable)\n */\n ItemId?: string;\n /**\n * The object title\n */\n ItemName: string;\n /**\n * The server relative object URL\n */\n ItemUrl: string;\n /**\n * Contains information about the sharing state of a shareable object\n */\n ObjectSharingInformation: any; // SPObjectSharingInformation\n /**\n * Boolean indicating whether the sharing context operates under the access request mode\n */\n AccessRequestMode: boolean;\n /**\n * Boolean indicating whether the sharing context operates under the permissions only mode\n * (i.e. adding to a group or hiding the groups dropdown in the SharePoint UI)\n */\n PermissionsOnlyMode: boolean;\n /**\n * URL of the site from which the shared object inherits permissions\n */\n InheritingWebLink: string;\n /**\n * Boolean flag denoting if guest users are enabled for the site collection\n */\n ShareByEmailEnabled: boolean;\n /**\n * Boolean indicating whether the current user is a guest user\n */\n IsGuestUser: boolean;\n /**\n * Boolean indicating whether the site has the standard \"Editor\" role\n */\n HasEditRole: boolean;\n /**\n * Boolean indicating whether the site has the standard \"Reader\" role\n */\n HasReadRole: boolean;\n /**\n * Boolean indicating whether the object to share is a picture library\n */\n IsPictureLibrary: boolean;\n /**\n * Boolean indicating whether the folder object can be shared\n */\n CanShareFolder: boolean;\n /**\n * Boolean indicating whether email invitations can be sent\n */\n CanSendEmail: boolean;\n /**\n * Default share link type\n */\n DefaultShareLinkType: SharingLinkKind;\n /**\n * Boolean indicating whether the object to share supports ACL propagation\n */\n SupportsAclPropagation: boolean;\n /**\n * Boolean indicating whether the current user can only share within the tenancy\n */\n CanCurrentUserShareInternally: boolean;\n /**\n * Boolean indicating whether the current user can share outside the tenancy, by inviting external users\n */\n CanCurrentUserShareExternally: boolean;\n /**\n * Boolean indicating whether the current user can retrieve an anonymous View link, if one has already been created\n * If one has not been created, the user cannot create one\n */\n CanCurrentUserRetrieveReadonlyLink: boolean;\n /**\n * Boolean indicating whether the current user can create or disable an anonymous Edit link\n */\n CanCurrentUserManageReadonlyLink: boolean;\n /**\n * Boolean indicating whether the current user can retrieve an anonymous Edit link, if one has already been created\n * If one has not been created, the user cannot create one\n */\n CanCurrentUserRetrieveReadWriteLink: boolean;\n /**\n * Boolean indicating whether the current user can create or disable an anonymous Edit link\n */\n CanCurrentUserManageReadWriteLink: boolean;\n /**\n * Boolean indicating whether the current user can retrieve an organization View link, if one has already been created\n * If one has not been created, the user cannot create one\n */\n CanCurrentUserRetrieveOrganizationReadonlyLink: boolean;\n /**\n * Boolean indicating whether the current user can create or disable an organization Edit link\n */\n CanCurrentUserManageOrganizationReadonlyLink: boolean;\n /**\n * Boolean indicating whether the current user can retrieve an organization Edit link, if one has already been created\n * If one has not been created, the user cannot create one\n */\n CanCurrentUserRetrieveOrganizationReadWriteLink: boolean;\n /**\n * Boolean indicating whether the current user can create or disable an organization Edit link\n */\n CanCurrentUserManageOrganizationReadWriteLink: boolean;\n /**\n * Boolean indicating whether the current user can make use of Share-By-Link\n */\n CanSendLink: boolean;\n /**\n * Boolean indicating whether the client logic should warn the user\n * that they are about to share with external email addresses.\n */\n ShowExternalSharingWarning: boolean;\n /**\n * A list of SharingPermissionInformation objects that can be used to share\n */\n SharingPermissions: any[]; // SPSharingPermissionInformationCollection\n /**\n * A dictionary object that lists the display name and the id of\n * the SharePoint simplified roles (edit, view)\n */\n SimplifiedRoles: { [key: string]: string };\n /**\n * A dictionary object that lists the display name and the id of the SharePoint groups\n */\n GroupsList: { [key: string]: string };\n /**\n * A dictionary object that lists the display name and the id of the SharePoint regular roles\n */\n Roles: { [key: string]: string };\n /**\n * An object containing the SharePoint UI specific sharing settings.\n */\n SharePointSettings: any; // SharePointSharingSettings\n /**\n * Boolean indicating whether the current user is a site collection administrator\n */\n IsUserSiteAdmin: boolean;\n /**\n * A value that indicates number of days an anonymous link can be valid before it expires\n */\n RequiredAnonymousLinkExpirationInDays: number;\n}\n\nexport interface SharingInformation {\n /**\n * External Sharing.\n */\n canAddExternalPrincipal?: boolean;\n /**\n * Internal Sharing.\n */\n canAddInternalPrincipal?: boolean;\n /**\n * Can Send Email.\n */\n canSendEmail?: boolean;\n /**\n * Can Use Simplified Roles present in Roles Enum.\n */\n canUseSimplifiedRoles?: boolean;\n /**\n * Has Unique Permissions.\n */\n hasUniquePermissions?: boolean;\n /**\n * Current Users Role on the Item.\n */\n currentRole?: SharingRole;\n /**\n * Does the User+Item require Approval from Admin for Sharing.\n */\n requiresAccessApproval?: boolean;\n /**\n * (Owners only)Whether there are pending access requests for the securable object.\n */\n hasPendingAccessRequests?: boolean;\n /**\n * (Owners only)The link to the access requests page for the securable object, or an empty string if the link is not available.\n */\n pendingAccessRequestsLink?: string;\n /**\n * sharedObjectType\n */\n sharedObjectType?: SPSharedObjectType;\n /**\n * Url for the Securable Object (Encoded).\n */\n directUrl?: string;\n /**\n * Parent Web Url for the Securable Object (Encoded).\n */\n webUrl?: string;\n /**\n * Default SharingLinkKind.\n */\n defaultLinkKind?: SharingLinkKind;\n /**\n * Tenant's SharingDomainRestrictionMode.\n */\n domainRestrictionMode?: SharingDomainRestrictionMode;\n /**\n * Tenant's RestrictedDomains.\n */\n RestrictedDomains?: string;\n /**\n * Tenant's Anonymous Link Expiration Restriction in Days.\n */\n anonymousLinkExpirationRestrictionDays?: number;\n /**\n * The PermissionCollection that are on the Securable Object (Princpals & Links)\n */\n permissionsInformation?: any; // PermissionCollection\n /**\n * PickerSettings used by the PeoplePicker Control.\n */\n pickerSettings?: any; // PickerSettings\n}\n\nexport enum SPSharedObjectType {\n Unknown = 0,\n File = 1,\n Folder = 2,\n Item = 3,\n List = 4,\n Web = 5,\n Max = 6,\n}\n\nexport enum SharingDomainRestrictionMode {\n None = 0,\n AllowList = 1,\n BlockList = 2,\n}\n\nexport interface EmailProperties {\n\n To: string[];\n CC?: string[];\n BCC?: string[];\n Subject: string;\n Body: string;\n AdditionalHeaders?: TypedHash;\n From?: string;\n}\n\nexport interface WikiPageCreationInformation {\n /**\n * The server-relative-url of the wiki page to be created.\n */\n ServerRelativeUrl: string;\n\n /**\n * The wiki content to be set in the wiki page.\n */\n WikiHtmlContent: string;\n}\n\nexport enum RenderListDataOptions {\n None = 0,\n ContextInfo = 1,\n ListData = 2,\n ListSchema = 4,\n MenuView = 8,\n ListContentType = 16,\n FileSystemItemId = 32,\n ClientFormSchema = 64,\n QuickLaunch = 128,\n Spotlight = 256,\n Visualization = 512,\n ViewMetadata = 1024,\n DisableAutoHyperlink = 2048,\n EnableMediaTAUrls = 4096,\n ParentInfo = 8192,\n PageContextInfo = 16384,\n ClientSideComponentManifest = 32768,\n}\n\nexport interface RenderListDataParameters {\n AllowMultipleValueFilterForTaxonomyFields?: boolean;\n DatesInUtc?: boolean;\n ExpandGroups?: boolean;\n FirstGroupOnly?: boolean;\n FolderServerRelativeUrl?: string;\n ImageFieldsToTryRewriteToCdnUrls?: string;\n OverrideViewXml?: string;\n Paging?: string;\n RenderOptions?: RenderListDataOptions;\n ReplaceGroup?: boolean;\n ViewXml?: string;\n}\n\nexport interface MenuNode {\n CustomProperties: any[];\n FriendlyUrlSegment: string;\n IsDeleted: boolean;\n IsHidden: boolean;\n Key: string;\n Nodes: MenuNode[];\n NodeType: number;\n SimpleUrl: string;\n Title: string;\n}\n\nexport interface MenuNodeCollection {\n FriendlyUrlPrefix: string;\n Nodes: MenuNode[];\n SimpleUrl: string;\n SPSitePrefix: string;\n SPWebPrefix: string;\n StartingNodeKey: string;\n StartingNodeTitle: string;\n Version: Date;\n}\n\nexport enum FieldUserSelectionMode {\n PeopleAndGroups = 1,\n PeopleOnly = 0,\n}\n\nexport interface FieldCreationProperties extends TypedHash {\n DefaultFormula?: string;\n Description?: string;\n EnforceUniqueValues?: boolean;\n FieldTypeKind?: number;\n Group?: string;\n Hidden?: boolean;\n Indexed?: boolean;\n Required?: boolean;\n Title?: string;\n ValidationFormula?: string;\n ValidationMessage?: string;\n}\n\nexport enum ChoiceFieldFormatType {\n Dropdown,\n RadioButtons,\n}\n\n/**\n * Client people picker query parameters\n */\nexport interface ClientPeoplePickerQueryParameters {\n /**\n * Gets or sets a value that specifies whether e-mail addresses can be used to perform search.\n */\n AllowEmailAddresses?: boolean;\n /**\n * Gets or sets a value that specifies whether multiple entities are allowed.\n */\n AllowMultipleEntities?: boolean;\n /**\n * Gets or sets a value that specifies whether only e-mail addresses can be used to perform search.\n */\n AllowOnlyEmailAddresses?: boolean;\n /**\n * Gets or sets a value that specifies whether all URL zones are used to perform search.\n */\n AllUrlZones?: boolean;\n /**\n * Gets or sets a value that specifies claim providers that are used to perform search.\n */\n EnabledClaimProviders?: string;\n /**\n * Gets or sets a value that specifies whether claims are forced (if yes, multiple results for single entity can be returned).\n */\n ForceClaims?: boolean;\n /**\n * Gets or sets a value that specifies limit of results returned.\n */\n MaximumEntitySuggestions: number;\n /**\n * Gets or sets a value that specifies principal sources to perform search.\n */\n PrincipalSource?: PrincipalSource;\n /**\n * Gets or sets a value that specifies principal types to search for.\n */\n PrincipalType?: PrincipalType;\n /**\n * Gets or sets a value that specifies additional query settings.\n */\n QuerySettings?: PeoplePickerQuerySettings;\n /**\n * Gets or sets a value that specifies the term to search for.\n */\n QueryString: string;\n /**\n * Gets or sets a value that specifies ID of the SharePoint Group that will be used to perform search.\n */\n SharePointGroupID?: number;\n /**\n * Gets or sets a value that specifies URL zones that are used to perform search.\n */\n UrlZone?: UrlZone;\n /**\n * Gets or sets a value that specifies whether search is limited to specific URL zone.\n */\n UrlZoneSpecified?: boolean;\n /**\n * Gets or sets a value that specifies GUID of the Web Application that is used to perform search.\n */\n WebApplicationID?: string;\n}\n\n/**\n * People picker query settings\n */\nexport interface PeoplePickerQuerySettings {\n ExcludeAllUsersOnTenantClaim?: boolean;\n}\n\n/**\n * People picker entity\n */\nexport interface PeoplePickerEntity {\n Description: string;\n DisplayText: string;\n EntityData: PeoplePickerEntityData;\n EntityType: string;\n IsResolved: boolean;\n Key: string;\n MultipleMatches: PeoplePickerEntityData[];\n ProviderDisplayName: string;\n ProviderName: string;\n}\n\n/**\n * People picker entity data\n */\nexport interface PeoplePickerEntityData {\n AccountName?: string;\n Department?: string;\n Email?: string;\n IsAltSecIdPresent?: string;\n MobilePhone?: string;\n ObjectId?: string;\n OtherMails?: string;\n PrincipalType?: string;\n SPGroupID?: string;\n SPUserID?: string;\n Title?: string;\n}\n\n/**\n * Specifies the originating zone of a request received.\n */\nexport const enum UrlZone {\n /**\n * Specifies the default zone used for requests unless another zone is specified.\n */\n DefaultZone,\n /**\n * Specifies an intranet zone.\n */\n Intranet,\n /**\n * Specifies an Internet zone.\n */\n Internet,\n /**\n * Specifies a custom zone.\n */\n Custom,\n /**\n * Specifies an extranet zone.\n */\n Extranet,\n}\n\nexport interface StorageEntity {\n Value: string | null;\n Comment: string | null;\n Description: string | null;\n}\n\nexport interface LikeData {\n name: string;\n loginName: string;\n id: number;\n email: string;\n creationDate: string;\n}\n\nexport interface HubSite {\n Id: string;\n Title: string;\n SiteId: string;\n TenantInstanceId: string;\n SiteUrl: string;\n LogoUrl: string;\n Description: string;\n Targets: string;\n}\n\nexport interface HubSiteData {\n headerEmphasis: string | null;\n logoUrl: string | null;\n megaMenuEnabled: boolean;\n name: string;\n navigation: NavigationNode[];\n requiresJoinApproval: boolean;\n siteDesignId: string;\n themeKey: string | null;\n url: string;\n usesMetadataNavigation: boolean;\n}\n","import { RoleAssignments } from \"./roles\";\nimport { BasePermissions, PermissionKind } from \"./types\";\nimport { SharePointQueryable, SharePointQueryableInstance } from \"./sharepointqueryable\";\nimport { hOP } from \"@pnp/common\";\n\nexport class SharePointQueryableSecurable extends SharePointQueryableInstance {\n\n /**\n * Gets the set of role assignments for this item\n *\n */\n public get roleAssignments(): RoleAssignments {\n return new RoleAssignments(this);\n }\n\n /**\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\n *\n */\n public get firstUniqueAncestorSecurableObject(): SharePointQueryableInstance {\n return new SharePointQueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\n }\n\n /**\n * Gets the effective permissions for the user supplied\n *\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\n */\n public getUserEffectivePermissions(loginName: string): Promise {\n const q = this.clone(SharePointQueryable, \"getUserEffectivePermissions(@user)\");\n q.query.set(\"@user\", `'${encodeURIComponent(loginName)}'`);\n return q.get().then(r => {\n // handle verbose mode\n return hOP(r, \"GetUserEffectivePermissions\") ? r.GetUserEffectivePermissions : r;\n });\n }\n\n /**\n * Gets the effective permissions for the current user\n */\n public getCurrentUserEffectivePermissions(): Promise {\n\n // remove need to reference Web here, which created a circular build issue\n const w = new SharePointQueryableInstance(\"_api/web\", \"currentuser\");\n return w.configureFrom(this).select(\"LoginName\").get<{ LoginName: string }>().then(user => {\n\n return this.getUserEffectivePermissions(user.LoginName);\n });\n }\n\n /**\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\n *\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\n */\n public breakRoleInheritance(copyRoleAssignments = false, clearSubscopes = false): Promise {\n\n return this.clone(SharePointQueryableSecurable, `breakroleinheritance(copyroleassignments=${copyRoleAssignments}, clearsubscopes=${clearSubscopes})`).postCore();\n }\n\n /**\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\n *\n */\n public resetRoleInheritance(): Promise {\n\n return this.clone(SharePointQueryableSecurable, \"resetroleinheritance\").postCore();\n }\n\n /**\n * Determines if a given user has the appropriate permissions\n *\n * @param loginName The user to check\n * @param permission The permission being checked\n */\n public userHasPermissions(loginName: string, permission: PermissionKind): Promise {\n\n return this.getUserEffectivePermissions(loginName).then(perms => {\n\n return this.hasPermissions(perms, permission);\n });\n }\n\n /**\n * Determines if the current user has the requested permissions\n *\n * @param permission The permission we wish to check\n */\n public currentUserHasPermissions(permission: PermissionKind): Promise {\n\n return this.getCurrentUserEffectivePermissions().then(perms => {\n\n return this.hasPermissions(perms, permission);\n });\n }\n\n /**\n * Taken from sp.js, checks the supplied permissions against the mask\n *\n * @param value The security principal's permissions on the given object\n * @param perm The permission checked against the value\n */\n /* tslint:disable:no-bitwise */\n public hasPermissions(value: BasePermissions, perm: PermissionKind): boolean {\n\n if (!perm) {\n return true;\n }\n if (perm === PermissionKind.FullMask) {\n return (value.High & 32767) === 32767 && value.Low === 65535;\n }\n\n perm = perm - 1;\n let num = 1;\n\n if (perm >= 0 && perm < 32) {\n num = num << perm;\n return 0 !== (value.Low & num);\n } else if (perm >= 32 && perm < 64) {\n num = num << perm - 32;\n return 0 !== (value.High & num);\n }\n return false;\n }\n /* tslint:enable */\n}\n","import { extend, combine, jsS } from \"@pnp/common\";\nimport { odataUrlFrom } from \"./odata\";\nimport {\n SharePointQueryable,\n SharePointQueryableInstance,\n SharePointQueryableCollection,\n} from \"./sharepointqueryable\";\nimport { SharePointQueryableSecurable } from \"./sharepointqueryablesecurable\";\nimport {\n RoleType,\n SharingLinkKind,\n ShareLinkResponse,\n SharingRole,\n SharingEmailData,\n SharingResult,\n SharingRecipient,\n SharingEntityPermission,\n SharingInformationRequest,\n ObjectSharingSettings,\n SharingInformation,\n ShareObjectOptions,\n} from \"./types\";\nimport { extractWebUrl } from \"./utils/extractweburl\";\n\n/**\n * Internal helper class used to augment classes to include sharing functionality\n */\nexport class SharePointQueryableShareable extends SharePointQueryable {\n\n /**\n * Gets a sharing link for the supplied\n *\n * @param kind The kind of link to share\n * @param expiration The optional expiration for this link\n */\n public getShareLink(kind: SharingLinkKind, expiration: Date = null): Promise {\n\n // date needs to be an ISO string or null\n const expString = expiration !== null ? expiration.toISOString() : null;\n\n // clone using the factory and send the request\n return this.clone(SharePointQueryableShareable, \"shareLink\").postCore({\n body: jsS({\n request: {\n createLink: true,\n emailData: null,\n settings: {\n expiration: expString,\n linkKind: kind,\n },\n },\n }),\n });\n }\n\n /**\n * Shares this instance with the supplied users\n *\n * @param loginNames Resolved login names to share\n * @param role The role\n * @param requireSignin True to require the user is authenticated, otherwise false\n * @param propagateAcl True to apply this share to all children\n * @param emailData If supplied an email will be sent with the indicated properties\n */\n public shareWith(loginNames: string | string[], role: SharingRole, requireSignin = false, propagateAcl = false, emailData?: SharingEmailData): Promise {\n\n // handle the multiple input types\n if (!Array.isArray(loginNames)) {\n loginNames = [loginNames];\n }\n\n const userStr = jsS(loginNames.map(login => { return { Key: login }; }));\n const roleFilter = role === SharingRole.Edit ? RoleType.Contributor : RoleType.Reader;\n\n // start by looking up the role definition id we need to set the roleValue\n // remove need to reference Web here, which created a circular build issue\n const w = new SharePointQueryableCollection(\"_api/web\", \"roledefinitions\");\n return w.select(\"Id\").filter(`RoleTypeKind eq ${roleFilter}`).get().then((def: { Id: number }[]) => {\n\n if (!Array.isArray(def) || def.length < 1) {\n throw Error(`Could not locate a role defintion with RoleTypeKind ${roleFilter}`);\n }\n\n let postBody = {\n includeAnonymousLinkInEmail: requireSignin,\n peoplePickerInput: userStr,\n propagateAcl: propagateAcl,\n roleValue: `role:${def[0].Id}`,\n useSimplifiedRoles: true,\n };\n\n if (emailData !== undefined) {\n\n postBody = extend(postBody, {\n emailBody: emailData.body,\n emailSubject: emailData.subject !== undefined ? emailData.subject : \"\",\n sendEmail: true,\n });\n }\n\n return this.clone(SharePointQueryableShareable, \"shareObject\").postCore({\n body: jsS(postBody),\n });\n });\n }\n\n /**\n * Shares an object based on the supplied options\n *\n * @param options The set of options to send to the ShareObject method\n * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method\n */\n public shareObject(options: ShareObjectOptions, bypass = false): Promise {\n\n if (bypass) {\n\n // if the bypass flag is set send the supplied parameters directly to the service\n return this.sendShareObjectRequest(options);\n }\n\n // extend our options with some defaults\n options = extend(options, {\n group: null,\n includeAnonymousLinkInEmail: false,\n propagateAcl: false,\n useSimplifiedRoles: true,\n }, true);\n\n return this.getRoleValue(options.role, options.group).then(roleValue => {\n\n // handle the multiple input types\n if (!Array.isArray(options.loginNames)) {\n options.loginNames = [options.loginNames];\n }\n\n const userStr = jsS(options.loginNames.map(login => { return { Key: login }; }));\n\n let postBody = {\n peoplePickerInput: userStr,\n roleValue: roleValue,\n url: options.url,\n };\n\n if (options.emailData !== undefined && options.emailData !== null) {\n\n postBody = extend(postBody, {\n emailBody: options.emailData.body,\n emailSubject: options.emailData.subject !== undefined ? options.emailData.subject : \"Shared with you.\",\n sendEmail: true,\n });\n }\n\n return this.sendShareObjectRequest(postBody);\n });\n }\n\n /**\n * Calls the web's UnshareObject method\n *\n * @param url The url of the object to unshare\n */\n public unshareObjectWeb(url: string): Promise {\n\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postCore({\n body: jsS({\n url: url,\n }),\n });\n }\n\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n public checkPermissions(recipients: SharingRecipient[]): Promise {\n\n return this.clone(SharePointQueryableShareable, \"checkPermissions\").postCore({\n body: jsS({\n recipients: recipients,\n }),\n });\n }\n\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n * @param expands Expand more fields.\n * \n */\n public getSharingInformation(request: SharingInformationRequest = null, expands?: string[]): Promise {\n\n const q = this.clone(SharePointQueryableShareable, \"getSharingInformation\");\n return q.expand.apply(q, expands).postCore({\n body: jsS({\n request: request,\n }),\n });\n }\n\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n public getObjectSharingSettings(useSimplifiedRoles = true): Promise {\n\n return this.clone(SharePointQueryableShareable, \"getObjectSharingSettings\").postCore({\n body: jsS({\n useSimplifiedRoles: useSimplifiedRoles,\n }),\n });\n }\n\n /**\n * Unshares this object\n */\n public unshareObject(): Promise {\n\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postCore();\n }\n\n /**\n * Deletes a link by type\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n public deleteLinkByKind(kind: SharingLinkKind): Promise {\n\n return this.clone(SharePointQueryableShareable, \"deleteLinkByKind\").postCore({\n body: jsS({ linkKind: kind }),\n });\n }\n\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n public unshareLink(kind: SharingLinkKind, shareId = \"00000000-0000-0000-0000-000000000000\"): Promise {\n\n return this.clone(SharePointQueryableShareable, \"unshareLink\").postCore({\n body: jsS({ linkKind: kind, shareId: shareId }),\n });\n }\n\n /**\n * Calculates the roleValue string used in the sharing query\n *\n * @param role The Sharing Role\n * @param group The Group type\n */\n protected getRoleValue(role: SharingRole, group: RoleType): Promise {\n\n // we will give group precedence, because we had to make a choice\n if (group !== undefined && group !== null) {\n\n switch (group) {\n case RoleType.Contributor:\n // remove need to reference Web here, which created a circular build issue\n const memberGroup = new SharePointQueryableInstance(\"_api/web\", \"associatedmembergroup\");\n return memberGroup.select(\"Id\").get<{ Id: number }>().then(g => `group: ${g.Id}`);\n case RoleType.Reader:\n case RoleType.Guest:\n // remove need to reference Web here, which created a circular build issue\n const visitorGroup = new SharePointQueryableInstance(\"_api/web\", \"associatedvisitorgroup\");\n return visitorGroup.select(\"Id\").get<{ Id: number }>().then(g => `group: ${g.Id}`);\n default:\n throw Error(\"Could not determine role value for supplied value. Contributor, Reader, and Guest are supported\");\n }\n } else {\n\n const roleFilter = role === SharingRole.Edit ? RoleType.Contributor : RoleType.Reader;\n // remove need to reference Web here, which created a circular build issue\n const roleDefs = new SharePointQueryableCollection(\"_api/web\", \"roledefinitions\");\n return roleDefs.select(\"Id\").top(1).filter(`RoleTypeKind eq ${roleFilter}`).get<{ Id: number }[]>().then(def => {\n if (def.length < 1) {\n throw Error(\"Could not locate associated role definition for supplied role. Edit and View are supported\");\n }\n return `role: ${def[0].Id}`;\n });\n }\n }\n\n private getShareObjectWeb(candidate: string): Promise {\n return Promise.resolve(new SharePointQueryableInstance(extractWebUrl(candidate), \"/_api/SP.Web.ShareObject\"));\n }\n\n private sendShareObjectRequest(options: any): Promise {\n\n return this.getShareObjectWeb(this.toUrl()).then(web => {\n\n return web.expand(\"UsersWithAccessRequests\", \"GroupsSharedWith\").as(SharePointQueryableShareable).postCore({\n body: jsS(options),\n });\n });\n }\n}\n\nexport class SharePointQueryableShareableWeb extends SharePointQueryableSecurable {\n\n /**\n * Shares this web with the supplied users\n * @param loginNames The resolved login names to share\n * @param role The role to share this web\n * @param emailData Optional email data\n */\n public shareWith(loginNames: string | string[], role: SharingRole = SharingRole.View, emailData?: SharingEmailData): Promise {\n\n const dependency = this.addBatchDependency();\n // remove need to reference Web here, which created a circular build issue\n const web = new SharePointQueryableInstance(extractWebUrl(this.toUrl()), \"/_api/web/url\");\n return web.get().then((url: string) => {\n\n dependency();\n\n return this.shareObject(combine(url, \"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1\"), loginNames, role, emailData);\n });\n }\n\n /**\n * Provides direct access to the static web.ShareObject method\n *\n * @param url The url to share\n * @param loginNames Resolved loginnames string[] of a single login name string\n * @param roleValue Role value\n * @param emailData Optional email data\n * @param groupId Optional group id\n * @param propagateAcl\n * @param includeAnonymousLinkInEmail\n * @param useSimplifiedRoles\n */\n public shareObject(url: string,\n loginNames: string | string[],\n role: SharingRole,\n emailData?: SharingEmailData,\n group?: RoleType,\n propagateAcl = false,\n includeAnonymousLinkInEmail = false,\n useSimplifiedRoles = true): Promise {\n\n return this.clone(SharePointQueryableShareable, null).shareObject({\n emailData: emailData,\n group: group,\n includeAnonymousLinkInEmail: includeAnonymousLinkInEmail,\n loginNames: loginNames,\n propagateAcl: propagateAcl,\n role: role,\n url: url,\n useSimplifiedRoles: useSimplifiedRoles,\n });\n }\n\n /**\n * Supplies a method to pass any set of arguments to ShareObject\n *\n * @param options The set of options to send to ShareObject\n */\n public shareObjectRaw(options: any): Promise {\n return this.clone(SharePointQueryableShareable, null).shareObject(options, true);\n }\n\n /**\n * Unshares the object\n *\n * @param url The url of the object to stop sharing\n */\n public unshareObject(url: string): Promise {\n\n return this.clone(SharePointQueryableShareable, null).unshareObjectWeb(url);\n }\n}\n\nexport class SharePointQueryableShareableItem extends SharePointQueryableSecurable {\n\n /**\n * Gets a link suitable for sharing for this item\n *\n * @param kind The type of link to share\n * @param expiration The optional expiration date\n */\n public getShareLink(kind: SharingLinkKind = SharingLinkKind.OrganizationView, expiration: Date = null): Promise {\n return this.clone(SharePointQueryableShareable, null).getShareLink(kind, expiration);\n }\n\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n public shareWith(loginNames: string | string[], role: SharingRole = SharingRole.View, requireSignin = false, emailData?: SharingEmailData): Promise {\n\n return this.clone(SharePointQueryableShareable, null).shareWith(loginNames, role, requireSignin, false, emailData);\n }\n\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n public checkSharingPermissions(recipients: SharingRecipient[]): Promise {\n\n return this.clone(SharePointQueryableShareable, null).checkPermissions(recipients);\n }\n\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n * @param expands Expand more fields.\n * \n */\n public getSharingInformation(request: SharingInformationRequest = null, expands?: string[]): Promise {\n\n return this.clone(SharePointQueryableShareable, null).getSharingInformation(request, expands);\n }\n\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n public getObjectSharingSettings(useSimplifiedRoles = true): Promise {\n\n return this.clone(SharePointQueryableShareable, null).getObjectSharingSettings(useSimplifiedRoles);\n }\n\n /**\n * Unshare this item\n */\n public unshare(): Promise {\n return this.clone(SharePointQueryableShareable, null).unshareObject();\n }\n\n /**\n * Deletes a sharing link by kind\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n public deleteSharingLinkByKind(kind: SharingLinkKind): Promise {\n\n return this.clone(SharePointQueryableShareable, null).deleteLinkByKind(kind);\n }\n\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n public unshareLink(kind: SharingLinkKind, shareId?: string): Promise {\n\n return this.clone(SharePointQueryableShareable, null).unshareLink(kind, shareId);\n }\n}\n\nexport class FileFolderShared extends SharePointQueryableInstance {\n /**\n * Gets a link suitable for sharing\n *\n * @param kind The kind of link to get\n * @param expiration Optional, an expiration for this link\n */\n public getShareLink(kind: SharingLinkKind = SharingLinkKind.OrganizationView, expiration: Date = null): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.getShareLink(kind, expiration);\n });\n }\n\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n public checkSharingPermissions(recipients: SharingRecipient[]): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.checkPermissions(recipients);\n });\n }\n\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n * @param expands Expand more fields.\n * \n */\n public getSharingInformation(request: SharingInformationRequest = null, expands?: string[]): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.getSharingInformation(request, expands);\n });\n }\n\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n public getObjectSharingSettings(useSimplifiedRoles = true): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.getObjectSharingSettings(useSimplifiedRoles);\n });\n }\n\n /**\n * Unshare this item\n */\n public unshare(): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.unshareObject();\n });\n }\n\n /**\n * Deletes a sharing link by the kind of link\n *\n * @param kind The kind of link to be deleted.\n */\n public deleteSharingLinkByKind(kind: SharingLinkKind): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.deleteLinkByKind(kind);\n });\n }\n\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId The share id to delete\n */\n public unshareLink(kind: SharingLinkKind, shareId?: string): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.unshareLink(kind, shareId);\n });\n }\n\n /**\n * For files and folders we need to use the associated item end point\n */\n protected getShareable(): Promise {\n\n // sharing only works on the item end point, not the file one - so we create a folder instance with the item url internally\n return this.clone(SharePointQueryableShareableFile, \"listItemAllFields\", false).select(\"odata.id\").get().then(d => {\n\n let shareable = new SharePointQueryableShareable(odataUrlFrom(d));\n\n // we need to handle batching\n if (this.hasBatch) {\n shareable = shareable.inBatch(this.batch);\n }\n\n return shareable;\n });\n }\n}\n\nexport class SharePointQueryableShareableFile extends FileFolderShared {\n\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n public shareWith(loginNames: string | string[],\n role: SharingRole = SharingRole.View,\n requireSignin = false,\n emailData?: SharingEmailData): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, false, emailData);\n });\n }\n}\n\nexport class SharePointQueryableShareableFolder extends FileFolderShared {\n\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n public shareWith(loginNames: string | string[],\n role: SharingRole = SharingRole.View,\n requireSignin = false,\n shareEverything = false,\n emailData?: SharingEmailData): Promise {\n\n const dependency = this.addBatchDependency();\n\n return this.getShareable().then(shareable => {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, shareEverything, emailData);\n });\n }\n}\n","import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { jsS } from \"@pnp/common\";\n\nexport class LimitedWebPartManager extends SharePointQueryable {\n\n /**\n * Gets the set of web part definitions contained by this web part manager\n *\n */\n public get webparts(): WebPartDefinitions {\n\n return new WebPartDefinitions(this, \"webparts\");\n }\n\n /**\n * Exports a webpart definition\n *\n * @param id the GUID id of the definition to export\n */\n public export(id: string): Promise {\n\n return this.clone(LimitedWebPartManager, \"ExportWebPart\").postCore({\n body: jsS({ webPartId: id }),\n });\n }\n\n /**\n * Imports a webpart\n *\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\n */\n public import(xml: string): Promise {\n\n return this.clone(LimitedWebPartManager, \"ImportWebPart\").postCore({\n body: jsS({ webPartXml: xml }),\n });\n }\n}\n\nexport class WebPartDefinitions extends SharePointQueryableCollection {\n\n /**\n * Gets a web part definition from the collection by id\n *\n * @param id The storage ID of the SPWebPartDefinition to retrieve\n */\n public getById(id: string): WebPartDefinition {\n return new WebPartDefinition(this, `getbyid('${id}')`);\n }\n\n /**\n * Gets a web part definition from the collection by storage id\n *\n * @param id The WebPart.ID of the SPWebPartDefinition to retrieve\n */\n public getByControlId(id: string): WebPartDefinition {\n\n return new WebPartDefinition(this, `getByControlId('${id}')`);\n }\n}\n\nexport class WebPartDefinition extends SharePointQueryableInstance {\n\n /**\n * Gets the webpart information associated with this definition\n */\n public get webpart(): WebPart {\n\n return new WebPart(this);\n }\n\n /**\n * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object\n */\n public saveChanges(): Promise {\n\n return this.clone(WebPartDefinition, \"SaveWebPartChanges\").postCore();\n }\n\n /**\n * Moves the Web Part to a different location on a Web Part Page\n *\n * @param zoneId The ID of the Web Part Zone to which to move the Web Part\n * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone\n */\n public moveTo(zoneId: string, zoneIndex: number): Promise {\n\n return this.clone(WebPartDefinition, `MoveWebPartTo(zoneID='${zoneId}', zoneIndex=${zoneIndex})`).postCore();\n }\n\n /**\n * Closes the Web Part. If the Web Part is already closed, this method does nothing\n */\n public close(): Promise {\n\n return this.clone(WebPartDefinition, \"CloseWebPart\").postCore();\n }\n\n /**\n * Opens the Web Part. If the Web Part is already closed, this method does nothing\n */\n public open(): Promise {\n\n return this.clone(WebPartDefinition, \"OpenWebPart\").postCore();\n\n }\n\n /**\n * Removes a webpart from a page, all settings will be lost\n */\n public delete(): Promise {\n\n return this.clone(WebPartDefinition, \"DeleteWebPart\").postCore();\n }\n}\n\n@defaultPath(\"webpart\")\nexport class WebPart extends SharePointQueryableInstance { }\n","import { extend, TypedHash, jsS } from \"@pnp/common\";\nimport { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { SharePointQueryableShareableFolder } from \"./sharepointqueryableshareable\";\nimport { Files } from \"./files\";\nimport { odataUrlFrom } from \"./odata\";\nimport { Item } from \"./items\";\nimport { SPHttpClient } from \"./net/sphttpclient\";\n\n/**\n * Describes a collection of Folder objects\n *\n */\n@defaultPath(\"folders\")\nexport class Folders extends SharePointQueryableCollection {\n\n /**\n * Gets a folder by folder name\n *\n */\n public getByName(name: string): Folder {\n const f = new Folder(this);\n f.concat(`('${name}')`);\n return f;\n }\n\n /**\n * Adds a new folder to the current folder (relative) or any folder (absolute)\n *\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\n * @returns The new Folder and the raw response.\n */\n public add(url: string): Promise {\n\n return this.clone(Folders, `add('${url}')`).postCore().then((response) => {\n return {\n data: response,\n folder: this.getByName(url),\n };\n });\n }\n}\n\n/**\n * Describes a single Folder instance\n *\n */\nexport class Folder extends SharePointQueryableShareableFolder {\n\n /**\n * Specifies the sequence in which content types are displayed.\n *\n */\n public get contentTypeOrder(): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, \"contentTypeOrder\");\n }\n\n /**\n * Gets this folder's files\n *\n */\n public get files(): Files {\n return new Files(this);\n }\n\n /**\n * Gets this folder's sub folders\n *\n */\n public get folders(): Folders {\n return new Folders(this);\n }\n\n /**\n * Gets this folder's list item field values\n *\n */\n public get listItemAllFields(): SharePointQueryableInstance {\n return new SharePointQueryableInstance(this, \"listItemAllFields\");\n }\n\n /**\n * Gets the parent folder, if available\n *\n */\n public get parentFolder(): Folder {\n return new Folder(this, \"parentFolder\");\n }\n\n /**\n * Gets this folder's properties\n *\n */\n public get properties(): SharePointQueryableInstance {\n return new SharePointQueryableInstance(this, \"properties\");\n }\n\n /**\n * Gets this folder's server relative url\n *\n */\n public get serverRelativeUrl(): SharePointQueryable {\n return new SharePointQueryable(this, \"serverRelativeUrl\");\n }\n\n /**\n * Gets a value that specifies the content type order.\n *\n */\n public get uniqueContentTypeOrder(): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, \"uniqueContentTypeOrder\");\n }\n\n public update = this._update>(\"SP.Folder\", data => ({ data, folder: this }));\n\n /**\n * Delete this folder\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n public delete(eTag = \"*\"): Promise {\n return this.clone(Folder, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n\n /**\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n public recycle(): Promise {\n return this.clone(Folder, \"recycle\").postCore();\n }\n\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n public getItem(...selects: string[]): Promise {\n\n const q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then((d: any) => {\n\n return extend(new Item(odataUrlFrom(d)), d);\n });\n }\n\n /**\n * Moves a folder to destination path\n *\n * @param destUrl Absolute or relative URL of the destination path\n */\n public moveTo(destUrl: string): Promise {\n return this.select(\"ServerRelativeUrl\").get().then(({ ServerRelativeUrl: srcUrl }) => {\n const client = new SPHttpClient();\n const webBaseUrl = this.toUrl().split(\"/_api\")[0];\n const hostUrl = webBaseUrl.replace(\"://\", \"___\").split(\"/\")[0].replace(\"___\", \"://\");\n const methodUrl = `${webBaseUrl}/_api/SP.MoveCopyUtil.MoveFolder()`;\n return client.post(methodUrl, {\n body: jsS({\n destUrl: destUrl.indexOf(\"http\") === 0 ? destUrl : `${hostUrl}${destUrl}`,\n srcUrl: `${hostUrl}${srcUrl}`,\n }),\n }).then(r => r.json());\n });\n }\n\n}\n\nexport interface FolderAddResult {\n folder: Folder;\n data: any;\n}\n\nexport interface FolderUpdateResult {\n folder: Folder;\n data: any;\n}\n","import { TypedHash, jsS } from \"@pnp/common\";\nimport { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Describes a collection of content types\n *\n */\n@defaultPath(\"contenttypes\")\nexport class ContentTypes extends SharePointQueryableCollection {\n\n /**\n * Adds an existing contenttype to a content type collection\n *\n * @param contentTypeId in the following format, for example: 0x010102\n */\n public addAvailableContentType(contentTypeId: string): Promise {\n\n const postBody: string = jsS({\n \"contentTypeId\": contentTypeId,\n });\n\n return this.clone(ContentTypes, \"addAvailableContentType\").postCore<{ id: string }>({ body: postBody }).then((data) => {\n return {\n contentType: this.getById(data.id),\n data: data,\n };\n });\n }\n\n /**\t\n * Gets a ContentType by content type id\t\n */\n public getById(id: string): ContentType {\n const ct: ContentType = new ContentType(this);\n ct.concat(`('${id}')`);\n return ct;\n }\n\n /**\n * Adds a new content type to the collection\n *\n * @param id The desired content type id for the new content type (also determines the parent content type)\n * @param name The name of the content type\n * @param description The description of the content type\n * @param group The group in which to add the content type\n * @param additionalSettings Any additional settings to provide when creating the content type\n *\n */\n public add(\n id: string,\n name: string,\n description = \"\",\n group = \"Custom Content Types\",\n additionalSettings: TypedHash = {}): Promise {\n\n const postBody = jsS(Object.assign(metadata(\"SP.ContentType\"), {\n \"Description\": description,\n \"Group\": group,\n \"Id\": { \"StringValue\": id },\n \"Name\": name,\n }, additionalSettings));\n\n return this.postCore({ body: postBody }).then((data) => {\n return { contentType: this.getById(data.id), data: data };\n });\n }\n}\n\n/**\n * Describes a single ContentType instance\n *\n */\nexport class ContentType extends SharePointQueryableInstance {\n\n /**\n * Gets the column (also known as field) references in the content type.\n */\n public get fieldLinks(): FieldLinks {\n return new FieldLinks(this);\n }\n\n /**\n * Gets a value that specifies the collection of fields for the content type.\n */\n public get fields(): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, \"fields\");\n }\n\n /**\n * Gets the parent content type of the content type.\n */\n public get parent(): ContentType {\n return new ContentType(this, \"parent\");\n }\n\n /**\n * Gets a value that specifies the collection of workflow associations for the content type.\n */\n public get workflowAssociations(): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, \"workflowAssociations\");\n }\n\n /**\n * Delete this content type\n */\n public delete = this._delete;\n}\n\nexport interface ContentTypeAddResult {\n contentType: ContentType;\n data: any;\n}\n\n/**\n * Represents a collection of field link instances\n */\n@defaultPath(\"fieldlinks\")\nexport class FieldLinks extends SharePointQueryableCollection {\n /**\t\n * Gets a FieldLink by GUID id\t\n *\t\n * @param id The GUID id of the field link\t\n */\n public getById(id: string) {\n const fl = new FieldLink(this);\n fl.concat(`(guid'${id}')`);\n return fl;\n }\n}\n\n/**\n * Represents a field link instance\n */\nexport class FieldLink extends SharePointQueryableInstance { }\n","import { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { TextParser, BlobParser, JSONParser, BufferParser, ODataParser } from \"@pnp/odata\";\n\nexport interface AttachmentFileInfo {\n name: string;\n content: string | Blob | ArrayBuffer;\n}\n\n/**\n * Describes a collection of Item objects\n *\n */\n@defaultPath(\"AttachmentFiles\")\nexport class AttachmentFiles extends SharePointQueryableCollection {\n\n /**\n * Gets a Attachment File by filename\n *\n * @param name The name of the file, including extension.\n */\n public getByName(name: string): AttachmentFile {\n const f = new AttachmentFile(this);\n f.concat(`('${name}')`);\n return f;\n }\n\n /**\n * Adds a new attachment to the collection. Not supported for batching.\n *\n * @param name The name of the file, including extension.\n * @param content The Base64 file content.\n */\n public add(name: string, content: string | Blob | ArrayBuffer): Promise {\n return this.clone(AttachmentFiles, `add(FileName='${name}')`, false).postCore({\n body: content,\n }).then((response) => {\n return {\n data: response,\n file: this.getByName(name),\n };\n });\n }\n\n /**\n * Adds multiple new attachment to the collection. Not supported for batching.\n *\n * @param files The collection of files to add\n */\n public addMultiple(files: AttachmentFileInfo[]): Promise {\n\n // add the files in series so we don't get update conflicts\n return files.reduce((chain, file) => chain.then(() => this.clone(AttachmentFiles, `add(FileName='${file.name}')`, false).postCore({\n body: file.content,\n })), Promise.resolve());\n }\n\n /**\n * Delete multiple attachments from the collection. Not supported for batching.\n *\n * @param files The collection of files to delete\n */\n public deleteMultiple(...files: string[]): Promise {\n return files.reduce((chain, file) => chain.then(() => this.getByName(file).delete()), Promise.resolve());\n }\n\n /**\n * Delete multiple attachments from the collection and send to recycle bin. Not supported for batching.\n *\n * @param files The collection of files to be deleted and sent to recycle bin\n */\n public recycleMultiple(...files: string[]): Promise {\n return files.reduce((chain, file) => chain.then(() => this.getByName(file).recycle()), Promise.resolve());\n }\n}\n\n/**\n * Describes a single attachment file instance\n *\n */\nexport class AttachmentFile extends SharePointQueryableInstance {\n\n public delete = this._deleteWithETag;\n\n /**\n * Gets the contents of the file as text\n *\n */\n public getText(): Promise {\n return this.getParsed(new TextParser());\n }\n\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n public getBlob(): Promise {\n return this.getParsed(new BlobParser());\n }\n\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n public getBuffer(): Promise {\n return this.getParsed(new BufferParser());\n }\n\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n public getJSON(): Promise {\n return this.getParsed(new JSONParser());\n }\n\n /**\n * Sets the content of a file. Not supported for batching\n *\n * @param content The value to set for the file contents\n */\n public setContent(content: string | ArrayBuffer | Blob): Promise {\n\n return this.clone(AttachmentFile, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(_ => new AttachmentFile(this));\n }\n\n /**\n * Delete this attachment file and send it to recycle bin\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n public recycle(eTag = \"*\"): Promise {\n return this.clone(AttachmentFile, \"recycleObject\").postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n\n // /**\n // * Delete this attachment file\n // *\n // * @param eTag Value used in the IF-Match header, by default \"*\"\n // */\n // public delete(eTag = \"*\"): Promise {\n // return this.postCore({\n // headers: {\n // \"IF-Match\": eTag,\n // \"X-HTTP-Method\": \"DELETE\",\n // },\n // });\n // }\n\n private getParsed(parser: ODataParser): Promise {\n return this.clone(AttachmentFile, \"$value\", false).get(parser);\n }\n}\n\nexport interface AttachmentFileAddResult {\n file: AttachmentFile;\n data: any;\n}\n","import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { TypedHash, jsS } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Describes the views available in the current context\n *\n */\n@defaultPath(\"views\")\nexport class Views extends SharePointQueryableCollection {\n\n /**\t \n * Gets a view by guid id\t \n *\t \n * @param id The GUID id of the view\t \n */\n public getById(id: string): View {\n const v = new View(this);\n v.concat(`('${id}')`);\n return v;\n }\n\n /**\n * Gets a view by title (case-sensitive)\n *\n * @param title The case-sensitive title of the view\n */\n public getByTitle(title: string): View {\n return new View(this, `getByTitle('${title}')`);\n }\n\n /**\n * Adds a new view to the collection\n *\n * @param title The new views's title\n * @param personalView True if this is a personal view, otherwise false, default = false\n * @param additionalSettings Will be passed as part of the view creation body\n */\n public add(title: string, personalView = false, additionalSettings: TypedHash = {}): Promise {\n\n const postBody = jsS(Object.assign(metadata(\"SP.View\"), {\n \"PersonalView\": personalView,\n \"Title\": title,\n }, additionalSettings));\n\n return this.clone(Views, null).postCore<{ Id: string }>({ body: postBody }).then((data) => {\n return {\n data: data,\n view: this.getById(data.Id),\n };\n });\n }\n}\n\n/**\n * Describes a single View instance\n *\n */\nexport class View extends SharePointQueryableInstance {\n\n public get fields(): ViewFields {\n return new ViewFields(this);\n }\n\n /**\n * Updates this view intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the view\n */\n public update = this._update>(\"SP.View\", data => ({ data, view: this }));\n\n /**\n * Delete this view\n *\n */\n public delete = this._delete;\n\n /**\n * Returns the list view as HTML.\n *\n */\n public renderAsHtml(): Promise {\n return this.clone(SharePointQueryable, \"renderashtml\").get();\n }\n\n /**\n * Sets the view schema\n * \n * @param viewXml The view XML to set\n */\n public setViewXml(viewXml: string): Promise {\n\n return this.clone(View, \"SetViewXml\").postCore({\n body: jsS({\n viewXml,\n }),\n });\n }\n}\n\n@defaultPath(\"viewfields\")\nexport class ViewFields extends SharePointQueryableCollection {\n /**\n * Gets a value that specifies the XML schema that represents the collection.\n */\n public getSchemaXml(): Promise {\n return this.clone(SharePointQueryable, \"schemaxml\").get();\n }\n\n /**\n * Adds the field with the specified field internal name or display name to the collection.\n *\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\n */\n public add(fieldTitleOrInternalName: string): Promise {\n return this.clone(ViewFields, `addviewfield('${fieldTitleOrInternalName}')`).postCore();\n }\n\n /**\n * Moves the field with the specified field internal name to the specified position in the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to move.\n * @param index The zero-based index of the new position for the field.\n */\n public move(fieldInternalName: string, index: number): Promise {\n return this.clone(ViewFields, \"moveviewfieldto\").postCore({\n body: jsS({ \"field\": fieldInternalName, \"index\": index }),\n });\n }\n\n /**\n * Removes all the fields from the collection.\n */\n public removeAll(): Promise {\n return this.clone(ViewFields, \"removeallviewfields\").postCore();\n }\n\n /**\n * Removes the field with the specified field internal name from the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\n */\n public remove(fieldInternalName: string): Promise {\n return this.clone(ViewFields, `removeviewfield('${fieldInternalName}')`).postCore();\n }\n}\n\nexport interface ViewAddResult {\n view: View;\n data: any;\n}\n\nexport interface ViewUpdateResult {\n view: View;\n data: any;\n}\n","import { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { extend, TypedHash, jsS } from \"@pnp/common\";\nimport {\n XmlSchemaFieldCreationInformation,\n DateTimeFieldFormatType,\n DateTimeFieldFriendlyFormatType,\n FieldTypes,\n CalendarType,\n UrlFieldFormatType,\n FieldUserSelectionMode,\n FieldCreationProperties,\n ChoiceFieldFormatType,\n} from \"./types\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Describes a collection of Field objects\n *\n */\n@defaultPath(\"fields\")\nexport class Fields extends SharePointQueryableCollection {\n\n /**\t\n * Gets a field from the collection by id\t\n *\t\n * @param id The Id of the list\t\n */\n public getById(id: string): Field {\n const f: Field = new Field(this);\n f.concat(`('${id}')`);\n return f;\n }\n\n /**\n * Gets a field from the collection by title\n *\n * @param title The case-sensitive title of the field\n */\n public getByTitle(title: string): Field {\n return new Field(this, `getByTitle('${title}')`);\n }\n\n /**\n * Gets a field from the collection by using internal name or title\n *\n * @param name The case-sensitive internal name or title of the field\n */\n public getByInternalNameOrTitle(name: string): Field {\n return new Field(this, `getByInternalNameOrTitle('${name}')`);\n }\n\n /**\n * Creates a field based on the specified schema\n */\n public createFieldAsXml(xml: string | XmlSchemaFieldCreationInformation): Promise {\n\n let info: XmlSchemaFieldCreationInformation;\n if (typeof xml === \"string\") {\n info = { SchemaXml: xml };\n } else {\n info = xml as XmlSchemaFieldCreationInformation;\n }\n\n const postBody: string = jsS({\n \"parameters\":\n extend(metadata(\"SP.XmlSchemaFieldCreationInformation\"), info),\n });\n\n return this.clone(Fields, \"createfieldasxml\").postCore<{ Id: string }>({ body: postBody }).then((data) => {\n return {\n data: data,\n field: this.getById(data.Id),\n };\n });\n }\n\n /**\n * Adds a new field to the collection\n *\n * @param title The new field's title\n * @param fieldType The new field's type (ex: SP.FieldText)\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public add(title: string, fieldType: string, properties: FieldCreationProperties & { FieldTypeKind: number }): Promise {\n\n const postBody: string = jsS(Object.assign(metadata(fieldType), {\n \"Title\": title,\n }, properties));\n\n return this.clone(Fields, null).postCore<{ Id: string }>({ body: postBody }).then((data) => {\n return {\n data: data,\n field: this.getById(data.Id),\n };\n });\n }\n\n /**\n * Adds a new SP.FieldText to the collection\n *\n * @param title The field title\n * @param maxLength The maximum number of characters allowed in the value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addText(title: string, maxLength = 255, properties?: FieldCreationProperties): Promise {\n\n const props: { FieldTypeKind: number, MaxLength: number } = {\n FieldTypeKind: 2,\n MaxLength: maxLength,\n };\n\n return this.add(title, \"SP.FieldText\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldCalculated to the collection\n *\n * @param title The field title.\n * @param formula The formula for the field.\n * @param dateFormat The date and time format that is displayed in the field.\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addCalculated(\n title: string,\n formula: string,\n dateFormat: DateTimeFieldFormatType,\n outputType: FieldTypes = FieldTypes.Text,\n properties?: FieldCreationProperties): Promise {\n\n const props: {\n DateFormat: DateTimeFieldFormatType;\n FieldTypeKind: number;\n Formula: string;\n OutputType: FieldTypes;\n } = {\n DateFormat: dateFormat,\n FieldTypeKind: 17,\n Formula: formula,\n OutputType: outputType,\n };\n\n return this.add(title, \"SP.FieldCalculated\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldDateTime to the collection\n *\n * @param title The field title\n * @param displayFormat The format of the date and time that is displayed in the field.\n * @param calendarType Specifies the calendar type of the field.\n * @param friendlyDisplayFormat The type of friendly display format that is used in the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addDateTime(\n title: string,\n displayFormat: DateTimeFieldFormatType = DateTimeFieldFormatType.DateOnly,\n calendarType: CalendarType = CalendarType.Gregorian,\n friendlyDisplayFormat: DateTimeFieldFriendlyFormatType = DateTimeFieldFriendlyFormatType.Unspecified,\n properties?: FieldCreationProperties): Promise {\n\n const props = {\n DateTimeCalendarType: calendarType,\n DisplayFormat: displayFormat,\n FieldTypeKind: 4,\n FriendlyDisplayFormat: friendlyDisplayFormat,\n };\n\n return this.add(title, \"SP.FieldDateTime\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldNumber to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addNumber(\n title: string,\n minValue?: number,\n maxValue?: number,\n properties?: FieldCreationProperties): Promise {\n\n let props: { FieldTypeKind: number } = { FieldTypeKind: 9 };\n\n if (minValue !== undefined) {\n props = extend({ MinimumValue: minValue }, props);\n }\n\n if (maxValue !== undefined) {\n props = extend({ MaximumValue: maxValue }, props);\n }\n\n return this.add(title, \"SP.FieldNumber\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldCurrency to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addCurrency(\n title: string,\n minValue?: number,\n maxValue?: number,\n currencyLocalId = 1033,\n properties?: FieldCreationProperties): Promise {\n\n let props: { CurrencyLocaleId: number; FieldTypeKind: number; } = {\n CurrencyLocaleId: currencyLocalId,\n FieldTypeKind: 10,\n };\n\n if (minValue !== undefined) {\n props = extend({ MinimumValue: minValue }, props);\n }\n\n if (maxValue !== undefined) {\n props = extend({ MaximumValue: maxValue }, props);\n }\n\n return this.add(title, \"SP.FieldCurrency\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldMultiLineText to the collection\n *\n * @param title The field title\n * @param numberOfLines Specifies the number of lines of text to display for the field.\n * @param richText Specifies whether the field supports rich formatting.\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n *\n */\n public addMultilineText(\n title: string,\n numberOfLines = 6,\n richText = true,\n restrictedMode = false,\n appendOnly = false,\n allowHyperlink = true,\n properties?: FieldCreationProperties): Promise {\n\n const props = {\n AllowHyperlink: allowHyperlink,\n AppendOnly: appendOnly,\n FieldTypeKind: 3,\n NumberOfLines: numberOfLines,\n RestrictedMode: restrictedMode,\n RichText: richText,\n };\n\n return this.add(title, \"SP.FieldMultiLineText\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldUrl to the collection\n *\n * @param title The field title\n */\n public addUrl(\n title: string,\n displayFormat: UrlFieldFormatType = UrlFieldFormatType.Hyperlink,\n properties?: FieldCreationProperties): Promise {\n\n const props = {\n DisplayFormat: displayFormat,\n FieldTypeKind: 11,\n };\n\n return this.add(title, \"SP.FieldUrl\", extend(props, properties));\n }\n\n /** Adds a user field to the colleciton\n * \n * @param title The new field's title\n * @param selectionMode The selection mode of the field\n * @param selectionGroup Value that specifies the identifier of the SharePoint group whose members can be selected as values of the field\n * @param properties\n */\n public addUser(title: string,\n selectionMode: FieldUserSelectionMode,\n properties?: FieldCreationProperties): Promise {\n\n const props = {\n FieldTypeKind: 20,\n SelectionMode: selectionMode,\n };\n\n return this.add(title, \"SP.FieldUser\", extend(props, properties));\n }\n\n /**\n * Adds a SP.FieldLookup to the collection\n *\n * @param title The new field's title\n * @param lookupListId The guid id of the list where the source of the lookup is found\n * @param lookupFieldName The internal name of the field in the source list\n * @param properties Set of additional properties to set on the new field\n */\n public addLookup(\n title: string,\n lookupListId: string,\n lookupFieldName: string,\n properties?: FieldCreationProperties): Promise {\n\n const props = extend({\n FieldTypeKind: 7,\n LookupFieldName: lookupFieldName,\n LookupListId: lookupListId,\n Title: title,\n }, properties);\n\n const postBody: string = jsS({\n \"parameters\":\n extend(metadata(\"SP.FieldCreationInformation\"), props),\n });\n\n return this.clone(Fields, \"addfield\").postCore<{ Id: string }>({ body: postBody }).then((data) => {\n return {\n data: data,\n field: this.getById(data.Id),\n };\n });\n }\n\n /**\n * Adds a new SP.FieldChoice to the collection\n *\n * @param title The field title.\n * @param choices The choices for the field.\n * @param format The display format of the available options for the field.\n * @param fillIn Specifies whether the field allows fill-in values.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addChoice(\n title: string,\n choices: string[],\n format: ChoiceFieldFormatType = ChoiceFieldFormatType.Dropdown,\n fillIn?: boolean,\n properties?: FieldCreationProperties): Promise {\n\n const props = {\n Choices: {\n results: choices,\n },\n EditFormat: format,\n FieldTypeKind: 6,\n FillInChoice: fillIn,\n };\n\n return this.add(title, \"SP.FieldChoice\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldMultiChoice to the collection\n *\n * @param title The field title.\n * @param choices The choices for the field.\n * @param fillIn Specifies whether the field allows fill-in values.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addMultiChoice(\n title: string,\n choices: string[],\n fillIn?: boolean,\n properties?: FieldCreationProperties): Promise {\n\n const props = {\n Choices: {\n results: choices,\n },\n FieldTypeKind: 15,\n FillInChoice: fillIn,\n };\n\n return this.add(title, \"SP.FieldMultiChoice\", extend(props, properties));\n }\n\n /**\n * Adds a new SP.FieldBoolean to the collection\n *\n * @param title The field title.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addBoolean(\n title: string,\n properties?: FieldCreationProperties): Promise {\n\n const props = {\n FieldTypeKind: 8,\n };\n\n return this.add(title, \"SP.Field\", extend(props, properties));\n }\n\n /**\n * Creates a secondary (dependent) lookup field, based on the Id of the primary lookup field.\n * \n * @param displayName The display name of the new field.\n * @param primaryLookupFieldId The guid of the primary Lookup Field.\n * @param showField Which field to show from the lookup list.\n */\n public addDependentLookupField(\n displayName: string,\n primaryLookupFieldId: string,\n showField: string,\n ): Promise {\n return this.clone(\n Fields,\n `adddependentlookupfield(displayName='${displayName}', primarylookupfieldid='${primaryLookupFieldId}', showfield='${showField}')`,\n )\n .postCore<{ Id: string }>()\n .then(data => {\n return {\n data,\n field: this.getById(data.Id),\n };\n });\n }\n\n /**\n * Adds a new SP.FieldLocation to the collection\n *\n * @param title The field title.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n public addLocation(\n title: string,\n properties?: FieldCreationProperties): Promise {\n\n const props: { FieldTypeKind: number } = { FieldTypeKind: 33 };\n\n return this.add(title, \"SP.FieldLocation\", extend(props, properties));\n }\n}\n\n/**\n * Describes a single of Field instance\n *\n */\nexport class Field extends SharePointQueryableInstance {\n\n /**\n * Delete this fields\n *\n */\n public delete = this._delete;\n\n /**\n * Updates this field intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param fieldType The type value, required to update child field type properties\n */\n public update(properties: TypedHash, fieldType = \"SP.Field\"): Promise {\n\n const postBody: string = jsS(extend(metadata(fieldType), properties));\n\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data,\n field: this,\n };\n });\n }\n\n /**\n * Sets the value of the ShowInDisplayForm property for this field.\n */\n public setShowInDisplayForm(show: boolean): Promise {\n return this.clone(Field, `setshowindisplayform(${show})`).postCore();\n }\n\n /**\n * Sets the value of the ShowInEditForm property for this field.\n */\n public setShowInEditForm(show: boolean): Promise {\n return this.clone(Field, `setshowineditform(${show})`).postCore();\n }\n\n /**\n * Sets the value of the ShowInNewForm property for this field.\n */\n public setShowInNewForm(show: boolean): Promise {\n return this.clone(Field, `setshowinnewform(${show})`).postCore();\n }\n}\n\n/**\n * This interface defines the result of adding a field\n */\nexport interface FieldAddResult {\n data: any;\n field: Field;\n}\n\nexport interface FieldUpdateResult {\n data: any;\n field: Field;\n}\n","import { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\n\n/**\n * Describes a collection of Field objects\n *\n */\n@defaultPath(\"forms\")\nexport class Forms extends SharePointQueryableCollection {\n /**\t\n * Gets a form by id\t\n *\t\n * @param id The guid id of the item to retrieve\t\n */\n public getById(id: string): Form {\n const i = new Form(this);\n i.concat(`('${id}')`);\n return i;\n }\n}\n\n/**\n * Describes a single of Form instance\n *\n */\nexport class Form extends SharePointQueryableInstance { }\n","import { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { jsS } from \"@pnp/common\";\n\n/**\n * Describes a collection of webhook subscriptions\n *\n */\n@defaultPath(\"subscriptions\")\nexport class Subscriptions extends SharePointQueryableCollection {\n\n /**\n * Returns all the webhook subscriptions or the specified webhook subscription\n *\n * @param subscriptionId The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions\n */\n public getById(subscriptionId: string): Subscription {\n const s = new Subscription(this);\n s.concat(`('${subscriptionId}')`);\n return s;\n }\n\n /**\n * Creates a new webhook subscription\n *\n * @param notificationUrl The url to receive the notifications\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\n * @param clientState A client specific string (optional)\n */\n public add(notificationUrl: string, expirationDate: string, clientState?: string): Promise {\n\n const postBody: any = {\n \"expirationDateTime\": expirationDate,\n \"notificationUrl\": notificationUrl,\n \"resource\": this.toUrl(),\n };\n\n if (clientState) {\n postBody.clientState = clientState;\n }\n\n return this.postCore({ body: jsS(postBody), headers: { \"Content-Type\": \"application/json\" } }).then(result => {\n\n return { data: result, subscription: this.getById(result.id) };\n });\n }\n}\n\n/**\n * Describes a single webhook subscription instance\n *\n */\nexport class Subscription extends SharePointQueryableInstance {\n\n /**\n * Renews this webhook subscription\n *\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months, optional)\n * @param notificationUrl The url to receive the notifications (optional)\n * @param clientState A client specific string (optional)\n */\n public update(expirationDate?: string, notificationUrl?: string, clientState?: string): Promise {\n\n const postBody: any = {\n };\n\n if (expirationDate) {\n postBody.expirationDateTime = expirationDate;\n }\n\n if (notificationUrl) {\n postBody.notificationUrl = notificationUrl;\n }\n\n if (clientState) {\n postBody.clientState = clientState;\n }\n\n return this.patchCore({ body: jsS(postBody), headers: { \"Content-Type\": \"application/json\" } }).then(data => {\n return { data: data, subscription: this };\n });\n }\n\n /**\n * Removes this webhook subscription\n *\n */\n public delete(): Promise {\n return super.deleteCore();\n }\n}\n\nexport interface SubscriptionAddResult {\n subscription: Subscription;\n data: any;\n}\n\nexport interface SubscriptionUpdateResult {\n subscription: Subscription;\n data: any;\n}\n","import { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { extend, TypedHash, jsS } from \"@pnp/common\";\n\n/**\n * Describes a collection of user custom actions\n *\n */\n@defaultPath(\"usercustomactions\")\nexport class UserCustomActions extends SharePointQueryableCollection {\n\n /**\t \n * Returns the user custom action with the specified id\t \n *\t \n * @param id The GUID id of the user custom action to retrieve\t \n */\n public getById(id: string): UserCustomAction {\n const uca = new UserCustomAction(this);\n uca.concat(`('${id}')`);\n return uca;\n }\n\n /**\n * Creates a user custom action\n *\n * @param properties The information object of property names and values which define the new user custom action\n *\n */\n public add(properties: TypedHash): Promise {\n\n const postBody = jsS(extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\n\n return this.postCore({ body: postBody }).then((data) => {\n return {\n action: this.getById(data.Id),\n data: data,\n };\n });\n }\n\n /**\n * Deletes all user custom actions in the collection\n *\n */\n public clear(): Promise {\n return this.clone(UserCustomActions, \"clear\").postCore();\n }\n}\n\n/**\n * Describes a single user custom action\n *\n */\nexport class UserCustomAction extends SharePointQueryableInstance {\n\n /**\n * Updates this user custom action with the supplied properties\n *\n * @param properties An information object of property names and values to update for this user custom action\n */\n public update = this._update>(\"SP.UserCustomAction\", (data) => ({ data, action: this }));\n\n /**\n * Removes this user custom action\n *\n */\n public delete(): Promise {\n return super.deleteCore();\n }\n}\n\n/**\n * Result from adding a user custom action\n *\n */\nexport interface UserCustomActionAddResult {\n data: any;\n action: UserCustomAction;\n}\n\n/**\n * Result from udating a user custom action\n *\n */\nexport interface UserCustomActionUpdateResult {\n data: any;\n action: UserCustomAction;\n}\n","import { Items } from \"./items\";\nimport { Views, View } from \"./views\";\nimport { ContentTypes } from \"./contenttypes\";\nimport { Fields } from \"./fields\";\nimport { Forms } from \"./forms\";\nimport { Subscriptions } from \"./subscriptions\";\nimport { SharePointQueryable, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { SharePointQueryableSecurable } from \"./sharepointqueryablesecurable\";\nimport { extend, TypedHash, hOP, jsS } from \"@pnp/common\";\nimport { ControlMode, RenderListData, ChangeQuery, CamlQuery, ChangeLogitemQuery, ListFormData, RenderListDataParameters, ListItemFormUpdateValue } from \"./types\";\nimport { UserCustomActions } from \"./usercustomactions\";\nimport { odataUrlFrom } from \"./odata\";\nimport { Folder } from \"./folders\";\nimport { metadata } from \"./utils/metadata\";\nimport { SiteScripts } from \"..\";\nimport { toAbsoluteUrl } from \"./utils/toabsoluteurl\";\n\n/**\n * Describes a collection of List objects\n *\n */\n@defaultPath(\"lists\")\nexport class Lists extends SharePointQueryableCollection {\n\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the list (GUID)\n */\n public getById(id: string): List {\n const list = new List(this);\n list.concat(`('${id}')`);\n return list;\n }\n\n /**\n * Gets a list from the collection by title\n *\n * @param title The title of the list\n */\n public getByTitle(title: string): List {\n return new List(this, `getByTitle('${title}')`);\n }\n\n /**\n * Adds a new list to the collection\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body\n */\n public add(title: string, description = \"\", template = 100, enableContentTypes = false, additionalSettings: TypedHash = {}): Promise {\n\n const addSettings = extend({\n \"AllowContentTypes\": enableContentTypes,\n \"BaseTemplate\": template,\n \"ContentTypesEnabled\": enableContentTypes,\n \"Description\": description,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.List\" },\n }, additionalSettings);\n\n return this.postCore({ body: jsS(addSettings) }).then((data) => {\n return { data: data, list: this.getByTitle(addSettings.Title) };\n });\n }\n\n /**\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\n */\n public ensure(\n title: string,\n description = \"\",\n template = 100,\n enableContentTypes = false,\n additionalSettings: TypedHash = {}): Promise {\n\n if (this.hasBatch) {\n throw Error(\"The ensure list method is not supported for use in a batch.\");\n }\n\n return new Promise((resolve, reject) => {\n\n const addOrUpdateSettings = extend(additionalSettings, { Title: title, Description: description, ContentTypesEnabled: enableContentTypes }, true);\n\n const list: List = this.getByTitle(addOrUpdateSettings.Title);\n\n list.get().then(_ => {\n\n list.update(addOrUpdateSettings).then(d => {\n resolve({ created: false, data: d, list: this.getByTitle(addOrUpdateSettings.Title) });\n }).catch(e => reject(e));\n\n }).catch(_ => {\n\n this.add(title, description, template, enableContentTypes, addOrUpdateSettings).then((r) => {\n resolve({ created: true, data: r.data, list: this.getByTitle(addOrUpdateSettings.Title) });\n }).catch((e) => reject(e));\n });\n });\n }\n\n /**\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n */\n public ensureSiteAssetsLibrary(): Promise {\n return this.clone(Lists, \"ensuresiteassetslibrary\").postCore().then((json) => {\n return new List(odataUrlFrom(json));\n });\n }\n\n /**\n * Gets a list that is the default location for wiki pages.\n */\n public ensureSitePagesLibrary(): Promise {\n return this.clone(Lists, \"ensuresitepageslibrary\").postCore().then((json) => {\n return new List(odataUrlFrom(json));\n });\n }\n}\n\n/**\n * Describes a single List instance\n *\n */\nexport class List extends SharePointQueryableSecurable {\n\n /**\n * Gets the content types in this list\n *\n */\n public get contentTypes(): ContentTypes {\n return new ContentTypes(this);\n }\n\n /**\n * Gets the items in this list\n *\n */\n public get items(): Items {\n return new Items(this);\n }\n\n /**\n * Gets the views in this list\n *\n */\n public get views(): Views {\n return new Views(this);\n }\n\n /**\n * Gets the fields in this list\n *\n */\n public get fields(): Fields {\n return new Fields(this);\n }\n\n /**\n * Gets the forms in this list\n *\n */\n public get forms(): Forms {\n return new Forms(this);\n }\n\n /**\n * Gets the default view of this list\n *\n */\n public get defaultView(): View {\n return new View(this, \"DefaultView\");\n }\n\n /**\n * Get all custom actions on a site collection\n *\n */\n public get userCustomActions(): UserCustomActions {\n return new UserCustomActions(this);\n }\n\n /**\n * Gets the effective base permissions of this list\n *\n */\n public get effectiveBasePermissions(): SharePointQueryable {\n return new SharePointQueryable(this, \"EffectiveBasePermissions\");\n }\n\n /**\n * Gets the event receivers attached to this list\n *\n */\n public get eventReceivers(): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, \"EventReceivers\");\n }\n\n /**\n * Gets the related fields of this list\n *\n */\n public get relatedFields(): SharePointQueryable {\n return new SharePointQueryable(this, \"getRelatedFields\");\n }\n\n /**\n * Gets the IRM settings for this list\n *\n */\n public get informationRightsManagementSettings(): SharePointQueryable {\n return new SharePointQueryable(this, \"InformationRightsManagementSettings\");\n }\n\n /**\n * Gets the webhook subscriptions of this list\n *\n */\n public get subscriptions(): Subscriptions {\n return new Subscriptions(this);\n }\n\n /**\n * The root folder of the list\n */\n public get rootFolder(): Folder {\n return new Folder(this, \"rootFolder\");\n }\n\n /**\n * Gets a view by view guid id\n *\n */\n public getView(viewId: string): View {\n return new View(this, `getView('${viewId}')`);\n }\n\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n /* tslint:disable no-string-literal */\n public update(properties: TypedHash, eTag = \"*\"): Promise {\n\n const postBody = jsS(extend({\n \"__metadata\": { \"type\": \"SP.List\" },\n }, properties));\n\n return this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n\n let retList: List = this;\n\n if (hOP(properties, \"Title\")) {\n retList = this.getParent(List, this.parentUrl, `getByTitle('${properties[\"Title\"]}')`);\n }\n\n return {\n data: data,\n list: retList,\n };\n });\n }\n /* tslint:enable */\n\n /**\n * Delete this list\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n public delete(eTag = \"*\"): Promise {\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n public getChanges(query: ChangeQuery): Promise {\n\n return this.clone(List, \"getchanges\").postCore({\n body: jsS({ \"query\": extend(metadata(\"SP.ChangeQuery\"), query) }),\n });\n }\n\n /**\n * Returns a collection of items from the list based on the specified query.\n *\n * @param CamlQuery The Query schema of Collaborative Application Markup\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\n * to define queries against list data.\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\n *\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\n * the Entry or Collection of Entries identified by the Resource Path\n * section of the URI must be represented inline (i.e. eagerly loaded).\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\n *\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\n */\n public getItemsByCAMLQuery(query: CamlQuery, ...expands: string[]): Promise {\n\n const q = this.clone(List, \"getitems\");\n return q.expand.apply(q, expands).postCore({\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) }),\n });\n }\n\n /**\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\n */\n public getListItemChangesSinceToken(query: ChangeLogitemQuery): Promise {\n\n return this.clone(List, \"getlistitemchangessincetoken\").postCore({\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) }),\n }, { parse(r) { return r.text(); } });\n }\n\n /**\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n public recycle(): Promise {\n return this.clone(List, \"recycle\").postCore().then(data => {\n if (hOP(data, \"Recycle\")) {\n return data.Recycle;\n } else {\n return data;\n }\n });\n }\n\n /**\n * Renders list data based on the view xml provided\n */\n public renderListData(viewXml: string): Promise {\n\n const q = this.clone(List, \"renderlistdata(@viewXml)\");\n q.query.set(\"@viewXml\", `'${viewXml}'`);\n return q.postCore().then(data => {\n // data will be a string, so we parse it again\n return JSON.parse(hOP(data, \"RenderListData\") ? data.RenderListData : data);\n });\n }\n\n /**\n * Returns the data for the specified query view\n *\n * @param parameters The parameters to be used to render list data as JSON string.\n * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters.\n */\n public renderListDataAsStream(parameters: RenderListDataParameters, overrideParameters: any = null): Promise {\n\n const postBody = {\n overrideParameters: extend(metadata(\"SP.RenderListDataOverrideParameters\"), overrideParameters),\n parameters: extend(metadata(\"SP.RenderListDataParameters\"), parameters),\n };\n\n return this.clone(List, \"RenderListDataAsStream\", true).postCore({\n body: jsS(postBody),\n });\n }\n\n /**\n * Gets the field values and field schema attributes for a list item.\n */\n public renderListFormData(itemId: number, formId: string, mode: ControlMode): Promise {\n return this.clone(List, `renderlistformdata(itemid=${itemId}, formid='${formId}', mode='${mode}')`).postCore().then(data => {\n // data will be a string, so we parse it again\n return JSON.parse(hOP(data, \"RenderListFormData\") ? data.RenderListFormData : data);\n });\n }\n\n /**\n * Reserves a list item ID for idempotent list item creation.\n */\n public reserveListItemId(): Promise {\n return this.clone(List, \"reservelistitemid\").postCore().then(data => {\n if (hOP(data, \"ReserveListItemId\")) {\n return data.ReserveListItemId;\n } else {\n return data;\n }\n });\n }\n\n /**\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching.\n *\n */\n public getListItemEntityTypeFullName(): Promise {\n return this.clone(List, null, false).select(\"ListItemEntityTypeFullName\").get<{ ListItemEntityTypeFullName: string }>().then(o => o.ListItemEntityTypeFullName);\n }\n\n /**\n * Creates an item using path (in a folder), validates and sets its field values.\n *\n * @param formValues The fields to change and their new values.\n * @param decodedUrl Path decoded url; folder's server relative path.\n * @param bNewDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n * @param checkInComment Optional check in comment.\n */\n public addValidateUpdateItemUsingPath(\n formValues: ListItemFormUpdateValue[],\n decodedUrl: string,\n bNewDocumentUpdate = false,\n checkInComment?: string,\n ): Promise {\n return this.clone(List, \"AddValidateUpdateItemUsingPath()\").postCore({\n body: jsS({\n bNewDocumentUpdate,\n checkInComment,\n formValues,\n listItemCreateInfo: {\n FolderPath: {\n DecodedUrl: decodedUrl,\n __metadata: { type: \"SP.ResourcePath\" },\n },\n __metadata: { type: \"SP.ListItemCreationInformationUsingPath\" },\n },\n }),\n }).then(res => {\n if (typeof res.AddValidateUpdateItemUsingPath !== \"undefined\") {\n return res.AddValidateUpdateItemUsingPath.results;\n }\n return res;\n });\n }\n\n /**\n * Gets the site script syntax (JSON) for the current list\n */\n public async getSiteScript(): Promise {\n const rootFolder = await this.clone(List).rootFolder.select(\"ServerRelativeUrl\").get();\n const absoluteListUrl = await toAbsoluteUrl(rootFolder.ServerRelativeUrl);\n return new SiteScripts(this, \"\").getSiteScriptFromList(absoluteListUrl);\n }\n}\n\nexport interface ListAddResult {\n list: List;\n data: any;\n}\n\nexport interface ListUpdateResult {\n list: List;\n data: any;\n}\n\nexport interface ListEnsureResult {\n list: List;\n created: boolean;\n data: any;\n}\n","import { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { extend, jsS } from \"@pnp/common\";\nimport { odataUrlFrom } from \"./odata\";\nimport { metadata } from \"./utils/metadata\";\n\nexport interface CommentAuthorData {\n email: string;\n id: number;\n isActive: boolean;\n isExternal: boolean;\n jobTitle: string | null;\n loginName: string;\n name: string;\n principalType: number;\n userId: any | null;\n}\n\nexport interface CommentData {\n author: CommentAuthorData;\n createdDate: string;\n id: string;\n isLikedByUser: boolean;\n isReply: boolean;\n itemId: number;\n likeCount: number;\n listId: string;\n mentions: any | null;\n parentId: string;\n replyCount: number;\n text: string;\n}\n\nexport interface Identity {\n loginName: string;\n email: string;\n name: string;\n}\n\nexport interface CommentInfo {\n text: string;\n mentions?: Identity[];\n}\n\n/**\n * Represents a Collection of comments\n */\n@defaultPath(\"comments\")\nexport class Comments extends SharePointQueryableCollection {\n\n /**\n * Adds a new comment to this collection\n * \n * @param info Comment information to add\n */\n public add(info: string | CommentInfo): Promise {\n\n if (typeof info === \"string\") {\n info = { text: info };\n }\n\n const postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\n\n return this.clone(Comments, null).postCore({ body: postBody }).then(d => {\n return extend(this.getById(d.id), d);\n });\n }\n\n /**\n * Gets a comment by id\n * \n * @param id Id of the comment to load\n */\n public getById(id: string | number): Comment {\n const c = new Comment(this);\n c.concat(`(${id})`);\n return c;\n }\n\n /**\n * Deletes all the comments in this collection\n */\n public clear(): Promise {\n return this.clone(Comments, \"DeleteAll\").postCore();\n }\n}\n\n/**\n * Represents a comment\n */\nexport class Comment extends SharePointQueryableInstance {\n\n public get replies(): Replies {\n return new Replies(this);\n }\n\n /**\n * Likes the comment as the current user\n */\n public like(): Promise {\n return this.clone(Comment, \"Like\").postCore();\n }\n\n /**\n * Unlikes the comment as the current user\n */\n public unlike(): Promise {\n return this.clone(Comment, \"Unlike\").postCore();\n }\n\n /**\n * Deletes this comment\n */\n public delete(): Promise {\n return this.deleteCore();\n }\n}\n\n/**\n * Represents a Collection of comments\n */\n@defaultPath(\"replies\")\nexport class Replies extends SharePointQueryableCollection {\n\n /**\n * Adds a new reply to this collection\n * \n * @param info Comment information to add\n */\n public add(info: string | CommentInfo): Promise {\n\n if (typeof info === \"string\") {\n info = { text: info };\n }\n\n const postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\n\n return this.clone(Replies, null).postCore({ body: postBody }).then(d => {\n return extend(new Comment(odataUrlFrom(d)), d);\n });\n }\n}\n","import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { SharePointQueryableShareableItem } from \"./sharepointqueryableshareable\";\nimport { Folder } from \"./folders\";\nimport { File } from \"./files\";\nimport { ContentType } from \"./contenttypes\";\nimport { extend, TypedHash, jsS, hOP } from \"@pnp/common\";\nimport { ListItemFormUpdateValue, LikeData } from \"./types\";\nimport { ODataParserBase, ODataDefaultParser, ODataParser } from \"@pnp/odata\";\nimport { AttachmentFiles } from \"./attachmentfiles\";\nimport { List } from \"./lists\";\nimport { Logger, LogLevel } from \"@pnp/logging\";\nimport { Comments } from \"./comments\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Describes a collection of Item objects\n *\n */\n@defaultPath(\"items\")\nexport class Items extends SharePointQueryableCollection {\n\n /**\t\n * Gets an Item by id\t\n *\t\n * @param id The integer id of the item to retrieve\t\n */\n public getById(id: number): Item {\n const i = new Item(this);\n i.concat(`(${id})`);\n return i;\n }\n\n /**\n * Gets BCS Item by string id\n *\n * @param stringId The string id of the BCS item to retrieve\n */\n public getItemByStringId(stringId: string): Item {\n // creates an item with the parent list path and append out method call\n return new Item(this.parentUrl, `getItemByStringId('${stringId}')`);\n }\n\n /**\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\n *\n * @param skip The starting id where the page should start, use with top to specify pages\n * @param reverse It true the PagedPrev=true parameter is added allowing backwards navigation in the collection\n */\n public skip(skip: number, reverse = false): this {\n if (reverse) {\n this.query.set(\"$skiptoken\", encodeURIComponent(`Paged=TRUE&PagedPrev=TRUE&p_ID=${skip}`));\n } else {\n this.query.set(\"$skiptoken\", encodeURIComponent(`Paged=TRUE&p_ID=${skip}`));\n }\n return this;\n }\n\n /**\n * Gets a collection designed to aid in paging through data\n *\n */\n public getPaged(parser: ODataParser = new ODataDefaultParser()): Promise> {\n\n return this.get(new PagedItemCollectionParser(this, parser));\n }\n\n /**\n * Gets all the items in a list, regardless of count. Does not support batching or caching\n *\n * @param requestSize Number of items to return in each request (Default: 2000)\n * @param acceptHeader Allows for setting the value of the Accept header for SP 2013 support\n */\n public getAll(requestSize = 2000, acceptHeader = \"application/json;odata=nometadata\"): Promise {\n\n Logger.write(\"Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.\", LogLevel.Warning);\n\n // this will be used for the actual query\n // and we set no metadata here to try and reduce traffic\n const items = new Items(this, \"\").top(requestSize).configure({\n headers: {\n \"Accept\": acceptHeader,\n },\n });\n\n // let's copy over the odata query params that can be applied\n // $top - allow setting the page size this way (override what we did above)\n // $select - allow picking the return fields (good behavior)\n // $filter - allow setting a filter, though this may fail due for large lists\n this.query.forEach((v: string, k: string) => {\n if (/^\\$select|filter|top|expand$/i.test(k)) {\n items.query.set(k, v);\n }\n });\n\n // give back the promise\n return new Promise((resolve, reject) => {\n\n // this will eventually hold the items we return\n const itemsCollector: any[] = [];\n\n // action that will gather up our results recursively\n const gatherer = (last: PagedItemCollection) => {\n\n // collect that set of results\n [].push.apply(itemsCollector, last.results);\n\n // if we have more, repeat - otherwise resolve with the collected items\n if (last.hasNext) {\n last.getNext().then(gatherer).catch(reject);\n } else {\n resolve(itemsCollector);\n }\n };\n\n // start the cycle\n items.getPaged().then(gatherer).catch(reject);\n });\n }\n\n /**\n * Adds a new item to the collection\n *\n * @param properties The new items's properties\n * @param listItemEntityTypeFullName The type name of the list's entities\n */\n public add(properties: TypedHash = {}, listItemEntityTypeFullName: string = null): Promise {\n\n const removeDependency = this.addBatchDependency();\n\n return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(listItemEntityType => {\n\n const postBody = jsS(extend(metadata(listItemEntityType), properties));\n\n const promise = this.clone(Items, \"\").postCore<{ Id: number }>({ body: postBody }).then((data) => {\n return {\n data: data,\n item: this.getById(data.Id),\n };\n });\n\n removeDependency();\n\n return promise;\n });\n }\n\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n private ensureListItemEntityTypeName(candidatelistItemEntityTypeFullName: string): Promise {\n\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.getParent(List).getListItemEntityTypeFullName();\n }\n}\n\n/**\n * Descrines a single Item instance\n *\n */\nexport class Item extends SharePointQueryableShareableItem {\n\n /**\n * Delete this item\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n public delete = this._deleteWithETag;\n\n /**\n * Gets the set of attachments for this item\n *\n */\n public get attachmentFiles(): AttachmentFiles {\n return new AttachmentFiles(this);\n }\n\n /**\n * Gets the content type for this item\n *\n */\n public get contentType(): ContentType {\n return new ContentType(this, \"ContentType\");\n }\n\n /**\n * Gets the collection of comments associated with this list item\n */\n public get comments(): Comments {\n return new Comments(this);\n }\n\n /**\n * Gets the effective base permissions for the item\n *\n */\n public get effectiveBasePermissions(): SharePointQueryable {\n return new SharePointQueryable(this, \"EffectiveBasePermissions\");\n }\n\n /**\n * Gets the effective base permissions for the item in a UI context\n *\n */\n public get effectiveBasePermissionsForUI(): SharePointQueryable {\n return new SharePointQueryable(this, \"EffectiveBasePermissionsForUI\");\n }\n\n /**\n * Gets the field values for this list item in their HTML representation\n *\n */\n public get fieldValuesAsHTML(): SharePointQueryableInstance {\n return new SharePointQueryableInstance(this, \"FieldValuesAsHTML\");\n }\n\n /**\n * Gets the field values for this list item in their text representation\n *\n */\n public get fieldValuesAsText(): SharePointQueryableInstance {\n return new SharePointQueryableInstance(this, \"FieldValuesAsText\");\n }\n\n /**\n * Gets the field values for this list item for use in editing controls\n *\n */\n public get fieldValuesForEdit(): SharePointQueryableInstance {\n return new SharePointQueryableInstance(this, \"FieldValuesForEdit\");\n }\n\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n public get folder(): Folder {\n return new Folder(this, \"folder\");\n }\n\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n public get file(): File {\n return new File(this, \"file\");\n }\n\n /**\n * Gets the collection of versions associated with this item\n */\n public get versions(): ItemVersions {\n return new ItemVersions(this);\n }\n\n public get list(): List {\n return this.getParent(List, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\")));\n }\n\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n * @param listItemEntityTypeFullName The type name of the list's entities\n */\n public update(properties: TypedHash, eTag = \"*\", listItemEntityTypeFullName: string = null): Promise {\n\n return new Promise((resolve, reject) => {\n\n const removeDependency = this.addBatchDependency();\n\n return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(listItemEntityType => {\n\n const postBody = jsS(extend(metadata(listItemEntityType), properties));\n\n removeDependency();\n\n return this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }, new ItemUpdatedParser()).then((data) => {\n resolve({\n data: data,\n item: this,\n });\n });\n }).catch(e => reject(e));\n });\n }\n\n /**\n * Gets the collection of people who have liked this item\n */\n public getLikedBy(): Promise {\n return this.clone(Item, \"likedBy\").postCore();\n }\n\n /**\n * Likes this item as the current user\n */\n public like(): Promise {\n return this.clone(Item, \"like\").postCore();\n }\n\n /**\n * Unlikes this item as the current user\n */\n public unlike(): Promise {\n return this.clone(Item, \"unlike\").postCore();\n }\n\n /**\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n public recycle(): Promise {\n return this.clone(Item, \"recycle\").postCore();\n }\n\n /**\n * Gets a string representation of the full URL to the WOPI frame.\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\n *\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\n */\n public getWopiFrameUrl(action = 0): Promise {\n const i = this.clone(Item, \"getWOPIFrameUrl(@action)\");\n i.query.set(\"@action\", action);\n return i.postCore().then((data: any) => {\n\n // handle verbose mode\n if (hOP(data, \"GetWOPIFrameUrl\")) {\n return data.GetWOPIFrameUrl;\n }\n\n return data;\n });\n }\n\n /**\n * Validates and sets the values of the specified collection of fields for the list item.\n *\n * @param formValues The fields to change and their new values.\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n */\n public validateUpdateListItem(formValues: ListItemFormUpdateValue[], newDocumentUpdate = false): Promise {\n return this.clone(Item, \"validateupdatelistitem\").postCore({\n body: jsS({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate }),\n });\n }\n\n /**\n * Get the like by information for a modern site page \n */\n public getLikedByInformation(): Promise {\n return this.clone(Item, \"likedByInformation\").expand(\"likedby\").getCore();\n }\n\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n private ensureListItemEntityTypeName(candidatelistItemEntityTypeFullName: string): Promise {\n\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.list.getListItemEntityTypeFullName();\n }\n}\n\nexport interface ItemAddResult {\n item: Item;\n data: any;\n}\n\nexport interface ItemUpdateResult {\n item: Item;\n data: ItemUpdateResultData;\n}\n\nexport interface ItemUpdateResultData {\n \"odata.etag\": string;\n}\n\n/**\n * Describes a collection of Version objects\n *\n */\n@defaultPath(\"versions\")\nexport class ItemVersions extends SharePointQueryableCollection {\n /**\t\n * Gets a version by id\t\n *\t\n * @param versionId The id of the version to retrieve\t\n */\n public getById(versionId: number): ItemVersion {\n const v = new ItemVersion(this);\n v.concat(`(${versionId})`);\n return v;\n }\n}\n\n/**\n * Describes a single Version instance\n *\n */\nexport class ItemVersion extends SharePointQueryableInstance {\n\n /**\n * Delete a specific version of a file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n public delete = this._deleteWithETag;\n}\n\n/**\n * Provides paging functionality for list items\n */\nexport class PagedItemCollection {\n\n constructor(private parent: Items, private nextUrl: string, public results: T, private innerParser: ODataParser) { }\n\n /**\n * If true there are more results available in the set, otherwise there are not\n */\n public get hasNext(): boolean {\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\n }\n\n /**\n * Gets the next set of results, or resolves to null if no results are available\n */\n public getNext(): Promise> {\n\n if (this.hasNext) {\n const items = new Items(this.nextUrl, null).configureFrom(this.parent);\n return items.getPaged(this.innerParser);\n }\n\n return new Promise(r => r(null));\n }\n}\n\nclass PagedItemCollectionParser extends ODataParserBase> {\n\n constructor(private _parent: Items, private innerParser: ODataParser) {\n super();\n }\n\n public parse(r: Response): Promise> {\n\n return this.innerParser.parse(r).then(async items => {\n\n const json = (this.innerParser).rawJson;\n\n const nextUrl = hOP(json, \"d\") && hOP(json.d, \"__next\") ? json.d.__next : json[\"odata.nextLink\"];\n\n return new PagedItemCollection(this._parent, nextUrl, items, this.innerParser);\n });\n }\n}\n\nclass ItemUpdatedParser extends ODataParserBase {\n public async parse(r: Response): Promise {\n return new Promise((resolve, reject) => {\n\n if (this.handleError(r, reject)) {\n resolve({\n \"odata.etag\": r.headers.get(\"etag\"),\n });\n }\n });\n }\n}\n","import { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { TextParser, BlobParser, JSONParser, BufferParser } from \"@pnp/odata\";\nimport { extend, getGUID } from \"@pnp/common\";\nimport { LimitedWebPartManager } from \"./webparts\";\nimport { Item } from \"./items\";\nimport { SharePointQueryableShareableFile } from \"./sharepointqueryableshareable\";\nimport { odataUrlFrom } from \"./odata\";\n\nexport interface ChunkedFileUploadProgressData {\n uploadId: string;\n stage: \"starting\" | \"continue\" | \"finishing\";\n blockNumber: number;\n totalBlocks: number;\n chunkSize: number;\n currentPointer: number;\n fileSize: number;\n}\n\n/**\n * Describes a collection of File objects\n *\n */\n@defaultPath(\"files\")\nexport class Files extends SharePointQueryableCollection {\n\n /**\n * Gets a File by filename\n *\n * @param name The name of the file, including extension.\n */\n public getByName(name: string): File {\n const f = new File(this);\n f.concat(`('${name}')`);\n return f;\n }\n\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The file contents blob.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @returns The new File and the raw response.\n */\n public add(url: string, content: string | ArrayBuffer | Blob, shouldOverWrite = true): Promise {\n return new Files(this, `add(overwrite=${shouldOverWrite},url='${url}')`)\n .postCore({\n body: content,\n }).then((response) => {\n return {\n data: response,\n file: this.getByName(url),\n };\n });\n }\n\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The Blob file content to add\n * @param progress A callback function which can be used to track the progress of the upload\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n * @returns The new File and the raw response.\n */\n public addChunked(\n url: string,\n content: Blob,\n progress?: (data: ChunkedFileUploadProgressData) => void,\n shouldOverWrite = true,\n chunkSize = 10485760,\n ): Promise {\n const adder = this.clone(Files, `add(overwrite=${shouldOverWrite},url='${url}')`, false);\n return adder.postCore()\n .then(() => this.getByName(url))\n .then(file => file.setContentChunked(content, progress, chunkSize));\n }\n\n /**\n * Adds a ghosted file to an existing list or document library. Not supported for batching.\n *\n * @param fileUrl The server-relative url where you want to save the file.\n * @param templateFileType The type of use to create the file.\n * @returns The template file that was added and the raw response.\n */\n public addTemplateFile(fileUrl: string, templateFileType: TemplateFileType): Promise {\n return this.clone(Files, `addTemplateFile(urloffile='${fileUrl}',templatefiletype=${templateFileType})`, false)\n .postCore().then((response) => {\n return {\n data: response,\n file: this.getByName(fileUrl),\n };\n });\n }\n}\n\n/**\n * Describes a single File instance\n *\n */\nexport class File extends SharePointQueryableShareableFile {\n\n /**\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\n *\n */\n public get listItemAllFields(): SharePointQueryableInstance {\n return new SharePointQueryableInstance(this, \"listItemAllFields\");\n }\n\n /**\n * Gets a collection of versions\n *\n */\n public get versions(): Versions {\n return new Versions(this);\n }\n\n /**\n * Approves the file submitted for content approval with the specified comment.\n * Only documents in lists that are enabled for content approval can be approved.\n *\n * @param comment The comment for the approval.\n */\n public approve(comment = \"\"): Promise {\n return this.clone(File, `approve(comment='${comment}')`).postCore();\n }\n\n /**\n * Stops the chunk upload session without saving the uploaded data. Does not support batching.\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n */\n public cancelUpload(uploadId: string): Promise {\n return this.clone(File, `cancelUpload(uploadId=guid'${uploadId}')`, false).postCore();\n }\n\n /**\n * Checks the file in to a document library based on the check-in type.\n *\n * @param comment A comment for the check-in. Its length must be <= 1023.\n * @param checkinType The check-in type for the file.\n */\n public checkin(comment = \"\", checkinType = CheckinType.Major): Promise {\n\n if (comment.length > 1023) {\n throw Error(\"The maximum comment length is 1023 characters.\");\n }\n\n return this.clone(File, `checkin(comment='${comment}',checkintype=${checkinType})`).postCore();\n }\n\n /**\n * Checks out the file from a document library.\n */\n public checkout(): Promise {\n return this.clone(File, \"checkout\").postCore();\n }\n\n /**\n * Copies the file to the destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to copy to.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\n */\n public copyTo(url: string, shouldOverWrite = true): Promise {\n return this.clone(File, `copyTo(strnewurl='${url}',boverwrite=${shouldOverWrite})`).postCore();\n }\n\n /**\n * Delete this file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n public delete(eTag = \"*\"): Promise {\n return this.clone(File, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n\n /**\n * Denies approval for a file that was submitted for content approval.\n * Only documents in lists that are enabled for content approval can be denied.\n *\n * @param comment The comment for the denial.\n */\n public deny(comment = \"\"): Promise {\n if (comment.length > 1023) {\n throw Error(\"The maximum comment length is 1023 characters.\");\n }\n return this.clone(File, `deny(comment='${comment}')`).postCore();\n }\n\n /**\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n * An exception is thrown if the file is not an ASPX page.\n *\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\n */\n public getLimitedWebPartManager(scope = WebPartsPersonalizationScope.Shared): LimitedWebPartManager {\n return new LimitedWebPartManager(this, `getLimitedWebPartManager(scope=${scope})`);\n }\n\n /**\n * Moves the file to the specified destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to move to.\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\n */\n public moveTo(url: string, moveOperations = MoveOperations.Overwrite): Promise {\n return this.clone(File, `moveTo(newurl='${url}',flags=${moveOperations})`).postCore();\n }\n\n /**\n * Submits the file for content approval with the specified comment.\n *\n * @param comment The comment for the published file. Its length must be <= 1023.\n */\n public publish(comment = \"\"): Promise {\n if (comment.length > 1023) {\n throw Error(\"The maximum comment length is 1023 characters.\");\n }\n return this.clone(File, `publish(comment='${comment}')`).postCore();\n }\n\n /**\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n *\n * @returns The GUID of the recycled file.\n */\n public recycle(): Promise {\n return this.clone(File, \"recycle\").postCore();\n }\n\n /**\n * Reverts an existing checkout for the file.\n *\n */\n public undoCheckout(): Promise {\n return this.clone(File, \"undoCheckout\").postCore();\n }\n\n /**\n * Removes the file from content approval or unpublish a major version.\n *\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\n */\n public unpublish(comment = \"\"): Promise {\n if (comment.length > 1023) {\n throw Error(\"The maximum comment length is 1023 characters.\");\n }\n return this.clone(File, `unpublish(comment='${comment}')`).postCore();\n }\n\n /**\n * Gets the contents of the file as text. Not supported in batching.\n *\n */\n public getText(): Promise {\n\n return this.clone(File, \"$value\", false).get(new TextParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n\n /**\n * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching.\n *\n */\n public getBlob(): Promise {\n\n return this.clone(File, \"$value\", false).get(new BlobParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n public getBuffer(): Promise {\n\n return this.clone(File, \"$value\", false).get(new BufferParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n public getJSON(): Promise {\n\n return this.clone(File, \"$value\", false).get(new JSONParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n\n /**\n * Sets the content of a file, for large files use setContentChunked. Not supported in batching.\n *\n * @param content The file content\n *\n */\n public setContent(content: string | ArrayBuffer | Blob): Promise {\n\n return this.clone(File, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(_ => new File(this));\n }\n\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n public getItem(...selects: string[]): Promise {\n\n const q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then((d: any) => {\n\n return extend((new Item(odataUrlFrom(d))).configureFrom(this), d);\n });\n }\n\n /**\n * Sets the contents of a file using a chunked upload approach. Not supported in batching.\n *\n * @param file The file to upload\n * @param progress A callback function which can be used to track the progress of the upload\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n */\n public setContentChunked(file: Blob, progress?: (data: ChunkedFileUploadProgressData) => void, chunkSize = 10485760): Promise {\n\n if (progress === undefined) {\n progress = () => null;\n }\n\n const fileSize = file.size;\n const blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\n const uploadId = getGUID();\n\n // start the chain with the first fragment\n progress({ uploadId, blockNumber: 1, chunkSize, currentPointer: 0, fileSize, stage: \"starting\", totalBlocks: blockCount });\n\n let chain = this.startUpload(uploadId, file.slice(0, chunkSize));\n\n // skip the first and last blocks\n for (let i = 2; i < blockCount; i++) {\n chain = chain.then(pointer => {\n progress({ uploadId, blockNumber: i, chunkSize, currentPointer: pointer, fileSize, stage: \"continue\", totalBlocks: blockCount });\n return this.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\n });\n }\n\n return chain.then(pointer => {\n progress({ uploadId, blockNumber: blockCount, chunkSize, currentPointer: pointer, fileSize, stage: \"finishing\", totalBlocks: blockCount });\n return this.finishUpload(uploadId, pointer, file.slice(pointer));\n });\n }\n\n /**\n * Starts a new chunk upload session and uploads the first fragment.\n * The current file content is not changed when this method completes.\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n * The upload session ends either when you use the CancelUpload method or when you successfully\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n protected startUpload(uploadId: string, fragment: ArrayBuffer | Blob): Promise {\n return this.clone(File, `startUpload(uploadId=guid'${uploadId}')`, false)\n .postCore({ body: fragment })\n .then(n => {\n // When OData=verbose the payload has the following shape:\n // { StartUpload: \"10485760\" }\n if (typeof n === \"object\") {\n n = (n as any).StartUpload;\n }\n return parseFloat(n);\n });\n }\n\n /**\n * Continues the chunk upload session with an additional fragment.\n * The current file content is not changed.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n protected continueUpload(uploadId: string, fileOffset: number, fragment: ArrayBuffer | Blob): Promise {\n return this.clone(File, `continueUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`, false)\n .postCore({ body: fragment })\n .then(n => {\n // When OData=verbose the payload has the following shape:\n // { ContinueUpload: \"20971520\" }\n if (typeof n === \"object\") {\n n = (n as any).ContinueUpload;\n }\n return parseFloat(n);\n });\n }\n\n /**\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The newly uploaded file.\n */\n protected finishUpload(uploadId: string, fileOffset: number, fragment: ArrayBuffer | Blob): Promise {\n return this.clone(File, `finishUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`, false)\n .postCore<{ ServerRelativeUrl: string }>({ body: fragment })\n .then(response => {\n return {\n data: response,\n file: new File(odataUrlFrom(response)),\n };\n });\n }\n}\n\n/**\n * Describes a collection of Version objects\n *\n */\n@defaultPath(\"versions\")\nexport class Versions extends SharePointQueryableCollection {\n\n /**\t\n * Gets a version by id\t\n *\t\n * @param versionId The id of the version to retrieve\t\n */\n public getById(versionId: number): Version {\n const v = new Version(this);\n v.concat(`(${versionId})`);\n return v;\n }\n\n /**\n * Deletes all the file version objects in the collection.\n *\n */\n public deleteAll(): Promise {\n return new Versions(this, \"deleteAll\").postCore();\n }\n\n /**\n * Deletes the specified version of the file.\n *\n * @param versionId The ID of the file version to delete.\n */\n public deleteById(versionId: number): Promise {\n return this.clone(Versions, `deleteById(vid=${versionId})`).postCore();\n }\n\n /**\n * Recycles the specified version of the file.\n *\n * @param versionId The ID of the file version to delete.\n */\n public recycleByID(versionId: number): Promise {\n return this.clone(Versions, `recycleByID(vid=${versionId})`).postCore();\n }\n\n /**\n * Deletes the file version object with the specified version label.\n *\n * @param label The version label of the file version to delete, for example: 1.2\n */\n public deleteByLabel(label: string): Promise {\n return this.clone(Versions, `deleteByLabel(versionlabel='${label}')`).postCore();\n }\n\n /**\n * Recycles the file version object with the specified version label.\n *\n * @param label The version label of the file version to delete, for example: 1.2\n */\n public recycleByLabel(label: string): Promise {\n return this.clone(Versions, `recycleByLabel(versionlabel='${label}')`).postCore();\n }\n\n /**\n * Creates a new file version from the file specified by the version label.\n *\n * @param label The version label of the file version to restore, for example: 1.2\n */\n public restoreByLabel(label: string): Promise {\n return this.clone(Versions, `restoreByLabel(versionlabel='${label}')`).postCore();\n }\n}\n\n/**\n * Describes a single Version instance\n *\n */\nexport class Version extends SharePointQueryableInstance {\n\n /**\n * Delete a specific version of a file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n public delete = this._deleteWithETag;\n\n // /**\n // * Delete a specific version of a file.\n // *\n // * @param eTag Value used in the IF-Match header, by default \"*\"\n // */\n // public delete(eTag = \"*\"): Promise {\n // return this.postCore({\n // headers: {\n // \"IF-Match\": eTag,\n // \"X-HTTP-Method\": \"DELETE\",\n // },\n // });\n // }\n}\n\nexport enum CheckinType {\n Minor = 0,\n Major = 1,\n Overwrite = 2,\n}\n\nexport interface FileAddResult {\n file: File;\n data: any;\n}\n\nexport enum WebPartsPersonalizationScope {\n User = 0,\n Shared = 1,\n}\n\nexport enum MoveOperations {\n Overwrite = 1,\n AllowBrokenThickets = 8,\n}\n\nexport enum TemplateFileType {\n StandardPage = 0,\n WikiPage = 1,\n FormPage = 2,\n ClientSidePage = 3,\n}\n","import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from \"./sharepointqueryable\";\nimport { File } from \"./files\";\nimport { odataUrlFrom } from \"./odata\";\nimport { extractWebUrl } from \"./utils/extractweburl\";\n\n/**\n * Represents an app catalog\n */\nexport class AppCatalog extends SharePointQueryableCollection {\n\n constructor(baseUrl: string | SharePointQueryable, path = \"_api/web/tenantappcatalog/AvailableApps\") {\n super(extractWebUrl(typeof baseUrl === \"string\" ? baseUrl : baseUrl.toUrl()), path);\n }\n\n /**\n * Get details of specific app from the app catalog\n * @param id - Specify the guid of the app\n */\n public getAppById(id: string): App {\n return new App(this, `getById('${id}')`);\n }\n\n /**\n * Uploads an app package. Not supported for batching\n *\n * @param filename Filename to create.\n * @param content app package data (eg: the .app or .sppkg file).\n * @param shouldOverWrite Should an app with the same name in the same location be overwritten? (default: true)\n * @returns Promise\n */\n public add(filename: string, content: string | ArrayBuffer | Blob, shouldOverWrite = true): Promise {\n\n const catalog = this.toUrl().indexOf(\"tenantappcatalog\") > 0 ? \"tenantappcatalog\" : \"sitecollectionappcatalog\";\n\n // you don't add to the availableapps collection\n const adder = new AppCatalog(extractWebUrl(this.toUrl()), `_api/web/${catalog}/add(overwrite=${shouldOverWrite},url='${filename}')`);\n\n return adder.postCore({\n body: content,\n }).then(r => {\n return {\n data: r,\n file: new File(odataUrlFrom(r)),\n };\n });\n }\n}\n\n/**\n * Represents the actions you can preform on a given app within the catalog\n */\nexport class App extends SharePointQueryableInstance {\n\n /**\n * This method deploys an app on the app catalog. It must be called in the context\n * of the tenant app catalog web or it will fail.\n * \n * @param skipFeatureDeployment Deploy the app to the entire tenant\n */\n public deploy(skipFeatureDeployment = false): Promise {\n return this.clone(App, `Deploy(${skipFeatureDeployment})`).postCore();\n }\n\n /**\n * This method retracts a deployed app on the app catalog. It must be called in the context\n * of the tenant app catalog web or it will fail.\n */\n public retract(): Promise {\n return this.clone(App, \"Retract\").postCore();\n }\n\n /**\n * This method allows an app which is already deployed to be installed on a web\n */\n public install(): Promise {\n return this.clone(App, \"Install\").postCore();\n }\n\n /**\n * This method allows an app which is already insatlled to be uninstalled on a web\n */\n public uninstall(): Promise {\n return this.clone(App, \"Uninstall\").postCore();\n }\n\n /**\n * This method allows an app which is already insatlled to be upgraded on a web\n */\n public upgrade(): Promise {\n return this.clone(App, \"Upgrade\").postCore();\n }\n\n /**\n * This method removes an app from the app catalog. It must be called in the context\n * of the tenant app catalog web or it will fail.\n */\n public remove(): Promise {\n return this.clone(App, \"Remove\").postCore();\n }\n}\n\nexport interface AppAddResult {\n data: any;\n file: File;\n}\n","import { ODataBatch } from \"@pnp/odata\";\nimport { getGUID, isUrlAbsolute, combine, mergeHeaders, hOP } from \"@pnp/common\";\nimport { Logger, LogLevel } from \"@pnp/logging\";\nimport { SPHttpClient } from \"./net/sphttpclient\";\nimport { SPRuntimeConfig } from \"./config/splibconfig\";\nimport { toAbsoluteUrl } from \"./utils/toabsoluteurl\";\n\n/**\n * Manages a batch of OData operations\n */\nexport class SPBatch extends ODataBatch {\n\n constructor(private baseUrl: string) {\n super();\n }\n\n /**\n * Parses the response from a batch request into an array of Response instances\n *\n * @param body Text body of the response from the batch request\n */\n public static ParseResponse(body: string): Promise {\n return new Promise((resolve, reject) => {\n const responses: Response[] = [];\n const header = \"--batchresponse_\";\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\n const statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\n const lines = body.split(\"\\n\");\n let state = \"batch\";\n let status: number;\n let statusText: string;\n for (let i = 0; i < lines.length; ++i) {\n const line = lines[i];\n switch (state) {\n case \"batch\":\n if (line.substr(0, header.length) === header) {\n state = \"batchHeaders\";\n } else {\n if (line.trim() !== \"\") {\n throw Error(`Invalid response, line ${i}`);\n }\n }\n break;\n case \"batchHeaders\":\n if (line.trim() === \"\") {\n state = \"status\";\n }\n break;\n case \"status\":\n const parts = statusRegExp.exec(line);\n if (parts.length !== 3) {\n throw Error(`Invalid status, line ${i}`);\n }\n status = parseInt(parts[1], 10);\n statusText = parts[2];\n state = \"statusHeaders\";\n break;\n case \"statusHeaders\":\n if (line.trim() === \"\") {\n state = \"body\";\n }\n break;\n case \"body\":\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\n state = \"batch\";\n break;\n }\n }\n if (state !== \"status\") {\n reject(Error(\"Unexpected end of input\"));\n }\n resolve(responses);\n });\n }\n\n protected executeImpl(): Promise {\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Executing batch with ${this.requests.length} requests.`, LogLevel.Info);\n\n // if we don't have any requests, don't bother sending anything\n // this could be due to caching further upstream, or just an empty batch\n if (this.requests.length < 1) {\n Logger.write(`Resolving empty batch.`, LogLevel.Info);\n return Promise.resolve();\n }\n\n // creating the client here allows the url to be populated for nodejs client as well as potentially\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\n // below to be correct\n const client = new SPHttpClient();\n\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\n // and for sending the entire batch\n return toAbsoluteUrl(this.baseUrl).then(absoluteRequestUrl => {\n\n // build all the requests, send them, pipe results in order to parsers\n const batchBody: string[] = [];\n\n let currentChangeSetId = \"\";\n\n for (let i = 0; i < this.requests.length; i++) {\n const reqInfo = this.requests[i];\n\n if (reqInfo.method === \"GET\") {\n\n if (currentChangeSetId.length > 0) {\n // end an existing change set\n batchBody.push(`--changeset_${currentChangeSetId}--\\n\\n`);\n currentChangeSetId = \"\";\n }\n\n batchBody.push(`--batch_${this.batchId}\\n`);\n\n } else {\n\n if (currentChangeSetId.length < 1) {\n // start new change set\n currentChangeSetId = getGUID();\n batchBody.push(`--batch_${this.batchId}\\n`);\n batchBody.push(`Content-Type: multipart/mixed; boundary=\"changeset_${currentChangeSetId}\"\\n\\n`);\n }\n\n batchBody.push(`--changeset_${currentChangeSetId}\\n`);\n }\n\n // common batch part prefix\n batchBody.push(`Content-Type: application/http\\n`);\n batchBody.push(`Content-Transfer-Encoding: binary\\n\\n`);\n\n const headers = new Headers();\n\n // this is the url of the individual request within the batch\n const url = isUrlAbsolute(reqInfo.url) ? reqInfo.url : combine(absoluteRequestUrl, reqInfo.url);\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Adding request ${reqInfo.method} ${url} to batch.`, LogLevel.Verbose);\n\n if (reqInfo.method !== \"GET\") {\n\n let method = reqInfo.method;\n\n const castHeaders: any = reqInfo.options.headers;\n if (hOP(reqInfo, \"options\") && hOP(reqInfo.options, \"headers\") && castHeaders[\"X-HTTP-Method\"] !== undefined) {\n\n method = castHeaders[\"X-HTTP-Method\"];\n delete castHeaders[\"X-HTTP-Method\"];\n }\n\n batchBody.push(`${method} ${url} HTTP/1.1\\n`);\n\n headers.set(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n\n } else {\n batchBody.push(`${reqInfo.method} ${url} HTTP/1.1\\n`);\n }\n\n // merge global config headers\n mergeHeaders(headers, SPRuntimeConfig.headers);\n\n // merge per-request headers\n if (reqInfo.options) {\n mergeHeaders(headers, reqInfo.options.headers);\n }\n\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:@pnp-$$Version$$\");\n }\n\n // write headers into batch body\n headers.forEach((value: string, name: string) => {\n batchBody.push(`${name}: ${value}\\n`);\n });\n\n batchBody.push(\"\\n\");\n\n if (reqInfo.options.body) {\n batchBody.push(`${reqInfo.options.body}\\n\\n`);\n }\n }\n\n if (currentChangeSetId.length > 0) {\n // Close the changeset\n batchBody.push(`--changeset_${currentChangeSetId}--\\n\\n`);\n currentChangeSetId = \"\";\n }\n\n batchBody.push(`--batch_${this.batchId}--\\n`);\n\n const batchOptions = {\n \"body\": batchBody.join(\"\"),\n \"headers\": {\n \"Content-Type\": `multipart/mixed; boundary=batch_${this.batchId}`,\n },\n \"method\": \"POST\",\n };\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Sending batch request.`, LogLevel.Info);\n\n return client.fetch(combine(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\n .then(r => r.text())\n .then(SPBatch.ParseResponse)\n .then((responses: Response[]) => {\n\n if (responses.length !== this.requests.length) {\n throw Error(\"Could not properly parse responses to match requests in batch.\");\n }\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Resolving batched requests.`, LogLevel.Info);\n\n return responses.reduce((chain, response, index) => {\n\n const request = this.requests[index];\n\n Logger.write(`[${request.id}] (${(new Date()).getTime()}) Resolving request in batch ${this.batchId}.`, LogLevel.Info);\n\n return chain.then(_ => request.parser.parse(response).then(request.resolve).catch(request.reject));\n\n }, Promise.resolve());\n });\n });\n }\n}\n","import { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { jsS } from \"@pnp/common\";\n\n/**\n * Describes a collection of List objects\n *\n */\n@defaultPath(\"features\")\nexport class Features extends SharePointQueryableCollection {\n\n /**\n * Adds a new list to the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature activation will be forced\n */\n public add(id: string, force = false): Promise {\n\n return this.clone(Features, \"add\").postCore({\n body: jsS({\n featdefScope: 0,\n featureId: id,\n force: force,\n }),\n }).then(data => {\n return {\n data: data,\n feature: this.getById(id),\n };\n });\n }\n\n /**\t \n * Gets a list from the collection by guid id\t \n *\t \n * @param id The Id of the feature (GUID)\t \n */\n public getById(id: string): Feature {\n const feature = new Feature(this);\n feature.concat(`('${id}')`);\n return feature;\n }\n\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature deactivation will be forced\n */\n public remove(id: string, force = false): Promise {\n\n return this.clone(Features, \"remove\").postCore({\n body: jsS({\n featureId: id,\n force: force,\n }),\n });\n }\n}\n\nexport class Feature extends SharePointQueryableInstance {\n\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param force If true the feature deactivation will be forced\n */\n public deactivate(force = false): Promise {\n\n const removeDependency = this.addBatchDependency();\n\n const idGet = new Feature(this).select(\"DefinitionId\");\n\n return idGet.get<{ DefinitionId: string }>().then(feature => {\n\n const promise = this.getParent(Features, this.parentUrl, \"\", this.batch).remove(feature.DefinitionId, force);\n\n removeDependency();\n\n return promise;\n });\n }\n}\n\nexport interface FeatureAddResult {\n data: any;\n feature: Feature;\n}\n","import { SharePointQueryable, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { Web } from \"./webs\";\nimport { UserCustomActions } from \"./usercustomactions\";\nimport { ContextInfo, DocumentLibraryInformation } from \"./types\";\nimport { SPBatch } from \"./batch\";\nimport { Features } from \"./features\";\nimport { hOP, jsS, extend } from \"@pnp/common\";\nimport { SPHttpClient } from \"./net/sphttpclient\";\n\n/**\n * Describes a site collection\n *\n */\n@defaultPath(\"_api/site\")\nexport class Site extends SharePointQueryableInstance {\n\n /**\n * Gets the root web of the site collection\n *\n */\n public get rootWeb(): Web {\n return new Web(this, \"rootweb\");\n }\n\n /**\n * Gets the active features for this site collection\n *\n */\n public get features(): Features {\n return new Features(this);\n }\n\n /**\n * Gets all custom actions for this site collection\n *\n */\n public get userCustomActions(): UserCustomActions {\n return new UserCustomActions(this);\n }\n\n /**\n * Gets a Web instance representing the root web of the site collection\n * correctly setup for chaining within the library\n */\n public getRootWeb(): Promise {\n return this.rootWeb.select(\"Url\").get().then(web => new Web(web.Url));\n }\n\n /**\n * Gets the context information for this site collection\n */\n public getContextInfo(): Promise {\n const q = new Site(this.parentUrl, \"_api/contextinfo\");\n return q.postCore().then(data => {\n if (hOP(data, \"GetContextWebInformation\")) {\n const info = data.GetContextWebInformation;\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\n return info;\n } else {\n return data;\n }\n });\n }\n\n /**\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\n *\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\n */\n public getDocumentLibraries(absoluteWebUrl: string): Promise {\n const q = new SharePointQueryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\n q.query.set(\"@v\", \"'\" + absoluteWebUrl + \"'\");\n return q.get().then(data => {\n if (hOP(data, \"GetDocumentLibraries\")) {\n return data.GetDocumentLibraries;\n } else {\n return data;\n }\n });\n }\n\n /**\n * Gets the site url from a page url\n *\n * @param absolutePageUrl The absolute url of the page\n */\n public getWebUrlFromPageUrl(absolutePageUrl: string): Promise {\n const q = new SharePointQueryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\n q.query.set(\"@v\", `'${absolutePageUrl}'`);\n return q.get().then(data => {\n if (hOP(data, \"GetWebUrlFromPageUrl\")) {\n return data.GetWebUrlFromPageUrl;\n } else {\n return data;\n }\n });\n }\n\n /**\n * Deletes the current site\n *\n */\n public async delete(): Promise {\n const site = await this.clone(Site, \"\").select(\"Id\").get<{ Id: string }>();\n\n const q = new Site(this.parentUrl, \"_api/SPSiteManager/Delete\");\n await q.postCore({\n body: jsS({\n siteId: site.Id,\n }),\n });\n }\n\n /**\n * Creates a new batch for requests within the context of this site collection\n *\n */\n public createBatch(): SPBatch {\n return new SPBatch(this.parentUrl);\n }\n\n /**\n * Opens a web by id (using POST)\n *\n * @param webId The GUID id of the web to open\n */\n public openWebById(webId: string): Promise {\n\n return this.clone(Site, `openWebById('${webId}')`).postCore().then(d => ({\n data: d,\n web: Web.fromUrl(d[\"odata.id\"] || d.__metadata.uri),\n }));\n }\n\n /**\n * Associates a site collection to a hub site.\n * \n * @param siteId Id of the hub site collection you want to join.\n * If you want to disassociate the site collection from hub site, then\n * pass the siteId as 00000000-0000-0000-0000-000000000000\n */\n public joinHubSite(siteId: string): Promise {\n return this.clone(Site, `joinHubSite('${siteId}')`).postCore();\n }\n\n /**\n * Registers the current site collection as hub site collection\n */\n public registerHubSite(): Promise {\n return this.clone(Site, `registerHubSite`).postCore();\n }\n\n /**\n * Unregisters the current site collection as hub site collection.\n */\n public unRegisterHubSite(): Promise {\n return this.clone(Site, `unRegisterHubSite`).postCore();\n }\n\n /**\n * Creates a Modern communication site.\n * \n * @param title The title of the site to create\n * @param lcid The language to use for the site. If not specified will default to 1033 (English).\n * @param shareByEmailEnabled If set to true, it will enable sharing files via Email. By default it is set to false\n * @param url The fully qualified URL (e.g. https://yourtenant.sharepoint.com/sites/mysitecollection) of the site.\n * @param description The description of the communication site.\n * @param classification The Site classification to use. For instance 'Contoso Classified'. See https://www.youtube.com/watch?v=E-8Z2ggHcS0 for more information\n * @param siteDesignId The Guid of the site design to be used.\n * You can use the below default OOTB GUIDs:\n * Topic: 00000000-0000-0000-0000-000000000000\n * Showcase: 6142d2a0-63a5-4ba0-aede-d9fefca2c767\n * Blank: f6cc5403-0d63-442e-96c0-285923709ffc\n * @param owner Required when creating the site using app-only context\n */\n\n public createCommunicationSite(\n title: string,\n lcid = 1033,\n shareByEmailEnabled = false,\n url: string,\n description = \"\",\n classification = \"\",\n siteDesignId = \"00000000-0000-0000-0000-000000000000\",\n hubSiteId = \"00000000-0000-0000-0000-000000000000\",\n owner?: string,\n ): Promise {\n\n const props = {\n Classification: classification,\n Description: description,\n HubSiteId: hubSiteId,\n Lcid: lcid,\n Owner: owner,\n ShareByEmailEnabled: shareByEmailEnabled,\n SiteDesignId: siteDesignId,\n Title: title,\n Url: url,\n WebTemplate: \"SITEPAGEPUBLISHING#0\",\n WebTemplateExtensionId: \"00000000-0000-0000-0000-000000000000\",\n };\n\n const postBody = jsS({\n \"request\":\n extend({\n \"__metadata\": { \"type\": \"Microsoft.SharePoint.Portal.SPSiteCreationRequest\" },\n }, props),\n });\n\n return this.getRootWeb().then(async (d: any) => {\n\n const client = new SPHttpClient();\n const methodUrl = `${d.parentUrl}/_api/SPSiteManager/Create`;\n return client.post(methodUrl, {\n body: postBody,\n headers: {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\n },\n }).then(r => r.json());\n });\n }\n\n /**\n * Creates a Modern team site backed by Office 365 group. For use in SP Online only. This will not work with App-only tokens\n * \n * @param displayName The title or display name of the Modern team site to be created\n * @param alias Alias of the underlying Office 365 Group\n * @param isPublic Defines whether the Office 365 Group will be public (default), or private.\n * @param lcid The language to use for the site. If not specified will default to English (1033).\n * @param description The description of the site to be created.\n * @param classification The Site classification to use. For instance 'Contoso Classified'. See https://www.youtube.com/watch?v=E-8Z2ggHcS0 for more information\n * @param owners The Owners of the site to be created \n * @param siteDesignId The ID of the site design to apply to the new site \n */\n\n public createModernTeamSite(\n displayName: string,\n alias: string,\n isPublic = true,\n lcid = 1033,\n description = \"\",\n classification = \"\",\n owners?: string[],\n hubSiteId = \"00000000-0000-0000-0000-000000000000\",\n siteDesignId?: string,\n ): Promise {\n\n const postBody = {\n alias: alias,\n displayName: displayName,\n isPublic: isPublic,\n optionalParams: {\n Classification: classification,\n CreationOptions: {\n \"results\": [`SPSiteLanguage:${lcid}`, `HubSiteId:${hubSiteId}`],\n },\n Description: description,\n Owners: {\n \"results\": owners ? owners : [],\n },\n },\n };\n\n if (siteDesignId) {\n postBody.optionalParams.CreationOptions.results.push(`implicit_formula_292aa8a00786498a87a5ca52d9f4214a_${siteDesignId}`);\n }\n\n return this.getRootWeb().then(async (d: any) => {\n\n const client = new SPHttpClient();\n const methodUrl = `${d.parentUrl}/_api/GroupSiteManager/CreateGroupEx`;\n return client.post(methodUrl, {\n body: jsS(postBody),\n headers: {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\n },\n }).then(r => r.json());\n });\n }\n}\n\n/**\n * The result of opening a web by id: contains the data returned as well as a chainable web instance\n */\nexport interface OpenWebByIdResult {\n data: any;\n web: Web;\n}\n\n/**\n * The result of creating a site collection\n */\nexport interface ISPSiteCreationResponse {\n SiteId: string;\n SiteStatus: number;\n SiteUrl: string;\n}\n","import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { MenuNodeCollection } from \"./types\";\nimport { jsS, extend, TypedHash } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Result from adding a navigation node\n *\n */\nexport interface NavigationNodeAddResult {\n data: any;\n node: NavigationNode;\n}\n\n/**\n * Represents a collection of navigation nodes\n *\n */\nexport class NavigationNodes extends SharePointQueryableCollection {\n\n /**\t \n * Gets a navigation node by id\t\n *\t\n * @param id The id of the node\t\n */\n public getById(id: number): NavigationNode {\n const node = new NavigationNode(this);\n node.concat(`(${id})`);\n return node;\n }\n\n /**\n * Adds a new node to the collection\n *\n * @param title Display name of the node\n * @param url The url of the node\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\n */\n public add(title: string, url: string, visible = true): Promise {\n\n const postBody = jsS(extend(metadata(\"SP.NavigationNode\"), {\n IsVisible: visible,\n Title: title,\n Url: url,\n }));\n\n return this.clone(NavigationNodes, null).postCore({ body: postBody }).then((data) => {\n return {\n data: data,\n node: this.getById(data.Id),\n };\n });\n }\n\n /**\n * Moves a node to be after another node in the navigation\n *\n * @param nodeId Id of the node to move\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\n */\n public moveAfter(nodeId: number, previousNodeId: number): Promise {\n\n const postBody = jsS({\n nodeId: nodeId,\n previousNodeId: previousNodeId,\n });\n\n return this.clone(NavigationNodes, \"MoveAfter\").postCore({ body: postBody });\n }\n}\n\n/**\n * Represents an instance of a navigation node\n *\n */\nexport class NavigationNode extends SharePointQueryableInstance {\n\n /**\n * Represents the child nodes of this node\n */\n public get children(): NavigationNodes {\n return new NavigationNodes(this, \"Children\");\n }\n\n /**\n * Deletes this node and any child nodes\n */\n public delete(): Promise {\n return super.deleteCore();\n }\n\n /**\n * Updates this node\n * \n * @param properties Properties used to update this node\n */\n public update(properties: TypedHash): Promise {\n\n const postBody = jsS(extend({\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n }, properties));\n\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n node: this,\n };\n });\n }\n}\n\nexport interface NavNodeUpdateResult {\n data: any;\n node: NavigationNode;\n}\n\n/**\n * Exposes the navigation components\n *\n */\n@defaultPath(\"navigation\")\nexport class Navigation extends SharePointQueryable {\n\n /**\n * Gets the quicklaunch navigation nodes for the current context\n *\n */\n public get quicklaunch(): NavigationNodes {\n return new NavigationNodes(this, \"quicklaunch\");\n }\n\n /**\n * Gets the top bar navigation nodes for the current context\n *\n */\n public get topNavigationBar(): NavigationNodes {\n return new NavigationNodes(this, \"topnavigationbar\");\n }\n}\n\nexport interface INavigationService {\n getMenuState(menuNodeKey?: string, depth?: number, mapProviderName?: string, customProperties?: string): Promise;\n getMenuNodeKey(currentUrl: string, mapProviderName?: string): Promise;\n}\n\n/**\n * Represents the top level navigation service\n */\nexport class NavigationService extends SharePointQueryable implements INavigationService {\n\n constructor(baseUrl: string | SharePointQueryable, path: string = null) {\n super(baseUrl, path);\n }\n\n /**\n * The MenuState service operation returns a Menu-State (dump) of a SiteMapProvider on a site.\n * \n * @param menuNodeKey MenuNode.Key of the start node within the SiteMapProvider If no key is provided the SiteMapProvider.RootNode will be the root of the menu state.\n * @param depth Depth of the dump. If no value is provided a dump with the depth of 10 is returned\n * @param mapProviderName The name identifying the SiteMapProvider to be used\n * @param customProperties comma seperated list of custom properties to be returned.\n */\n public getMenuState(menuNodeKey: string = null, depth = 10, mapProviderName: string = null, customProperties: string = null): Promise {\n\n return (new NavigationService(this, \"_api/navigation/MenuState\")).postCore({\n body: jsS({\n customProperties: customProperties,\n depth: depth,\n mapProviderName: mapProviderName,\n menuNodeKey: menuNodeKey,\n }),\n });\n }\n\n /**\n * Tries to get a SiteMapNode.Key for a given URL within a site collection.\n * \n * @param currentUrl A url representing the SiteMapNode\n * @param mapProviderName The name identifying the SiteMapProvider to be used\n */\n public getMenuNodeKey(currentUrl: string, mapProviderName: string = null): Promise {\n\n return (new NavigationService(this, \"_api/navigation/MenuNodeKey\")).postCore({\n body: jsS({\n currentUrl: currentUrl,\n mapProviderName: mapProviderName,\n }),\n });\n }\n}\n","import { SharePointQueryable, defaultPath } from \"./sharepointqueryable\";\nimport { jsS } from \"@pnp/common\";\n\nexport interface RelatedItem {\n ListId: string;\n ItemId: number;\n Url: string;\n Title: string;\n WebId: string;\n IconUrl: string;\n}\n\nexport interface RelatedItemManger {\n\n getRelatedItems(sourceListName: string, sourceItemId: number): Promise;\n\n getPageOneRelatedItems(sourceListName: string, sourceItemId: number): Promise;\n\n addSingleLink(sourceListName: string,\n sourceItemId: number,\n sourceWebUrl: string,\n targetListName: string,\n targetItemID: number,\n targetWebUrl: string,\n tryAddReverseLink?: boolean): Promise;\n\n /**\n * Adds a related item link from an item specified by list name and item id, to an item specified by url\n *\n * @param sourceListName The source list name or list id\n * @param sourceItemId The source item id\n * @param targetItemUrl The target item url\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n addSingleLinkToUrl(sourceListName: string, sourceItemId: number, targetItemUrl: string, tryAddReverseLink?: boolean): Promise;\n\n /**\n * Adds a related item link from an item specified by url, to an item specified by list name and item id\n *\n * @param sourceItemUrl The source item url\n * @param targetListName The target list name or list id\n * @param targetItemId The target item id\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n addSingleLinkFromUrl(sourceItemUrl: string, targetListName: string, targetItemId: number, tryAddReverseLink?: boolean): Promise;\n\n deleteSingleLink(sourceListName: string,\n sourceItemId: number,\n sourceWebUrl: string,\n targetListName: string,\n targetItemId: number,\n targetWebUrl: string,\n tryDeleteReverseLink?: boolean): Promise;\n}\n\n@defaultPath(\"_api/SP.RelatedItemManager\")\nexport class RelatedItemManagerImpl extends SharePointQueryable implements RelatedItemManger {\n\n public static FromUrl(url: string): RelatedItemManagerImpl {\n\n if (url === null) {\n return new RelatedItemManagerImpl(\"\");\n }\n\n const index = url.indexOf(\"_api/\");\n\n if (index > -1) {\n return new RelatedItemManagerImpl(url.substr(0, index));\n }\n\n return new RelatedItemManagerImpl(url);\n }\n\n public getRelatedItems(sourceListName: string, sourceItemId: number): Promise {\n\n const query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetRelatedItems\");\n\n return query.postCore({\n body: jsS({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n }\n\n public getPageOneRelatedItems(sourceListName: string, sourceItemId: number): Promise {\n\n const query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetPageOneRelatedItems\");\n\n return query.postCore({\n body: jsS({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n }\n\n public addSingleLink(sourceListName: string,\n sourceItemId: number,\n sourceWebUrl: string,\n targetListName: string,\n targetItemID: number,\n targetWebUrl: string,\n tryAddReverseLink = false): Promise {\n\n const query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLink\");\n\n return query.postCore({\n body: jsS({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemID,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n }\n\n /**\n * Adds a related item link from an item specified by list name and item id, to an item specified by url\n *\n * @param sourceListName The source list name or list id\n * @param sourceItemId The source item id\n * @param targetItemUrl The target item url\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n public addSingleLinkToUrl(sourceListName: string, sourceItemId: number, targetItemUrl: string, tryAddReverseLink = false): Promise {\n\n const query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkToUrl\");\n\n return query.postCore({\n body: jsS({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n TargetItemUrl: targetItemUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n }\n\n /**\n * Adds a related item link from an item specified by url, to an item specified by list name and item id\n *\n * @param sourceItemUrl The source item url\n * @param targetListName The target list name or list id\n * @param targetItemId The target item id\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n public addSingleLinkFromUrl(sourceItemUrl: string, targetListName: string, targetItemId: number, tryAddReverseLink = false): Promise {\n\n const query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkFromUrl\");\n\n return query.postCore({\n body: jsS({\n SourceItemUrl: sourceItemUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n }\n\n public deleteSingleLink(sourceListName: string,\n sourceItemId: number,\n sourceWebUrl: string,\n targetListName: string,\n targetItemId: number,\n targetWebUrl: string,\n tryDeleteReverseLink = false): Promise {\n\n const query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".DeleteSingleLink\");\n\n return query.postCore({\n body: jsS({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryDeleteReverseLink: tryDeleteReverseLink,\n }),\n });\n }\n}\n","import {\n SharePointQueryableInstance,\n SharePointQueryableCollection,\n defaultPath,\n} from \"./sharepointqueryable\";\n\nimport {\n spODataEntity,\n} from \"./odata\";\n\nimport {\n dateAdd, hOP,\n} from \"@pnp/common\";\n\n/**\n * Describes regional settings ODada object\n */\n@defaultPath(\"regionalsettings\")\nexport class RegionalSettings extends SharePointQueryableInstance {\n /**\n * Gets the collection of languages used in a server farm.\n */\n public get installedLanguages(): InstalledLanguages {\n return new InstalledLanguages(this);\n }\n\n /**\n * Gets the collection of language packs that are installed on the server.\n */\n public get globalInstalledLanguages(): InstalledLanguages {\n return new InstalledLanguages(this, \"globalinstalledlanguages\");\n }\n\n /**\n * Gets time zone\n */\n public get timeZone(): TimeZone {\n return new TimeZone(this);\n }\n\n /**\n * Gets time zones\n */\n public get timeZones(): TimeZones {\n return new TimeZones(this);\n }\n}\n\n/**\n * Describes installed languages ODada queriable collection\n */\n@defaultPath(\"installedlanguages\")\nexport class InstalledLanguages extends SharePointQueryableCollection {}\n\n/**\n * Describes TimeZone ODada object\n */\n@defaultPath(\"timezone\")\nexport class TimeZone extends SharePointQueryableInstance {\n /**\n * Gets an Local Time by UTC Time\n *\n * @param utcTime UTC Time as Date or ISO String\n */\n public utcToLocalTime(utcTime: string | Date): Promise {\n let dateIsoString: string;\n if (typeof utcTime === \"string\") {\n dateIsoString = utcTime;\n } else {\n dateIsoString = utcTime.toISOString();\n }\n\n return this.clone(TimeZone, `utctolocaltime('${dateIsoString}')`)\n .postCore()\n .then(res => hOP(res, \"UTCToLocalTime\") ? res.UTCToLocalTime : res);\n }\n\n /**\n * Gets an UTC Time by Local Time\n *\n * @param localTime Local Time as Date or ISO String\n */\n public localTimeToUTC(localTime: string | Date): Promise {\n let dateIsoString: string;\n\n if (typeof localTime === \"string\") {\n dateIsoString = localTime;\n } else {\n dateIsoString = dateAdd(localTime, \"minute\", localTime.getTimezoneOffset() * -1).toISOString();\n }\n\n return this.clone(TimeZone, `localtimetoutc('${dateIsoString}')`)\n .postCore()\n .then(res => hOP(res, \"LocalTimeToUTC\") ? res.LocalTimeToUTC : res);\n }\n}\n\n/**\n * Describes time zones queriable collection\n */\n@defaultPath(\"timezones\")\nexport class TimeZones extends SharePointQueryableCollection {\n // https://msdn.microsoft.com/en-us/library/office/jj247008.aspx - timezones ids\n /**\n * Gets an TimeZone by id\n *\n * @param id The integer id of the timezone to retrieve\n */\n public getById(id: number): Promise {\n // do the post and merge the result into a TimeZone instance so the data and methods are available\n return this.clone(TimeZones, `GetById(${id})`).postCore({}, spODataEntity(TimeZone));\n }\n}\n","import { SharePointQueryable } from \"./sharepointqueryable\";\nimport { hOP } from \"@pnp/common\";\n\nexport interface SiteDesignInfo {\n /**\n * The ID of the site design to apply.\n */\n Id: string;\n /**\n * The display name of the site design.\n */\n Title: string;\n /**\n * Identifies which base template to add the design to. Use the value 64 for the Team site template, and the value 68 for the Communication site template.\n */\n WebTemplate: string;\n /**\n * An array of one or more site scripts. Each is identified by an ID. The scripts will run in the order listed.\n */\n SiteScriptIds: string[];\n /**\n * The display description of site design.\n */\n Description: string;\n /**\n * The URL of a preview image. If none is specified, SharePoint uses a generic image.\n */\n PreviewImageUrl: string;\n /**\n * The alt text description of the image for accessibility.\n */\n PreviewImageAltText: string;\n /**\n * True if the site design is applied as the default site design; otherwise, false. \n * For more information see Customize a default site design https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/customize-default-site-design.\n */\n IsDefault: boolean;\n Version: string;\n}\n\nexport interface SiteDesignCreationInfo {\n /**\n * The display name of the site design.\n */\n Title: string;\n /**\n * Identifies which base template to add the design to. Use the value 64 for the Team site template, and the value 68 for the Communication site template.\n */\n WebTemplate: string;\n /**\n * An array of one or more site scripts. Each is identified by an ID. The scripts will run in the order listed.\n */\n SiteScriptIds?: string[];\n /**\n * (Optional) The display description of site design.\n */\n Description?: string;\n /**\n * (Optional) The URL of a preview image. If none is specified, SharePoint uses a generic image.\n */\n PreviewImageUrl?: string;\n /**\n * (Optional) The alt text description of the image for accessibility.\n */\n PreviewImageAltText?: string;\n /**\n * (Optional) True if the site design is applied as the default site design; otherwise, false. \n * For more information see Customize a default site design https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/customize-default-site-design.\n */\n IsDefault?: boolean;\n}\n\nexport interface SiteDesignUpdateInfo {\n /**\n * The ID of the site design to apply.\n */\n Id: string;\n /**\n * (Optional) The new display name of the updated site design.\n */\n Title?: string;\n /**\n * (Optional) The new template to add the site design to. Use the value 64 for the Team site template, and the value 68 for the Communication site template.\n */\n WebTemplate?: string;\n /**\n * (Optional) A new array of one or more site scripts. Each is identified by an ID. The scripts run in the order listed.\n */\n SiteScriptIds?: string[];\n /**\n * (Optional) The new display description of the updated site design.\n */\n Description?: string;\n /**\n * (Optional) The new URL of a preview image.\n */\n PreviewImageUrl?: string;\n /**\n * (Optional) The new alt text description of the image for accessibility.\n */\n PreviewImageAltText?: string;\n /**\n * (Optional) True if the site design is applied as the default site design; otherwise, false. \n * For more information see Customize a default site design https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/customize-default-site-design. \n * If you had previously set the IsDefault parameter to TRUE and wish it to remain true, you must pass in this parameter again (otherwise it will be reset to FALSE).\n */\n IsDefault?: boolean;\n}\n\nexport interface ISiteDesignTask {\n /**\n * The ID of the site design task\n */\n ID: string;\n /**\n * Logonname of the user who created the task\n */\n LogonName: string;\n /**\n * The ID of the site design the task is running on\n */\n SiteDesignID: string;\n /**\n * The ID of the site collection\n */\n SiteID: string;\n /**\n * The ID of the web\n */\n WebID: string;\n}\n\nexport interface ISiteScriptActionStatus {\n ActionIndex: number;\n ActionKey: string;\n ActionTitle: string;\n LastModified: number;\n OrdinalIndex: string;\n OutcomeCode: number;\n OutcomeText: string;\n SiteScriptID: string;\n SiteScriptIndex: number;\n SiteScriptTitle: string;\n}\n\nexport interface ISiteDesignRun {\n /**\n * The ID of the site design run\n */\n ID: string;\n /**\n * The ID of the site design that was applied\n */\n SiteDesignID: string;\n /**\n * The title of the site design that was applied\n */\n SiteDesignTitle: string;\n /**\n * The version of the site design that was applied\n */\n SiteDesignVersion: number;\n /**\n * The site id where the site design was applied\n */\n SiteID: string;\n /**\n * The start time when the site design was applied\n */\n StartTime: number;\n /**\n * The web id where the site design was applied\n */\n WebID: string;\n}\n\nexport interface SiteDesignPrincipals {\n DisplayName: string;\n PrincipalName: string;\n Rights: number;\n}\n\nexport interface SiteDesignsUtilityMethods {\n getSiteDesigns(): Promise;\n createSiteDesign(creationInfo: SiteDesignCreationInfo): Promise;\n applySiteDesign(siteDesignId: string, webUrl: string): Promise;\n getSiteDesignMetadata(id: string): Promise;\n updateSiteDesign(updateInfo: SiteDesignUpdateInfo): Promise;\n deleteSiteDesign(id: string): Promise;\n getSiteDesignRights(id: string): Promise;\n grantSiteDesignRights(id: string, principalNames: string[], grantedRights?: number): Promise;\n revokeSiteDesignRights(id: string, principalNames: string[]): Promise;\n addSiteDesignTask(webUrl: string, siteDesignId: string): Promise;\n addSiteDesignTaskToCurrentWeb(siteDesignId: string): Promise;\n getSiteDesignTask(id: string): Promise;\n getSiteDesignRun(webUrl: string, siteDesignId?: string): Promise;\n getSiteDesignRunStatus(webUrl: string, runId: string): Promise;\n}\n\n/**\n * Implements the site designs API REST methods\n *\n */\nexport class SiteDesigns extends SharePointQueryable implements SiteDesignsUtilityMethods {\n /**\n * Creates a new instance of the SiteDesigns method class\n *\n * @param baseUrl The parent url provider\n * @param methodName The static method name to call on the utility class\n */\n constructor(baseUrl: string | SharePointQueryable, methodName: string) {\n super(SiteDesigns.getBaseUrl(baseUrl), `_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.${methodName}`);\n }\n\n private static getBaseUrl(candidate: string | SharePointQueryable) {\n if (typeof candidate === \"string\") {\n return candidate;\n }\n\n const c = candidate as SharePointQueryable;\n const url = c.toUrl();\n const index = url.indexOf(\"_api/\");\n if (index < 0) {\n return url;\n }\n\n return url.substr(0, index);\n }\n\n public execute(props: any): Promise {\n return this.postCore({\n body: JSON.stringify(props),\n headers: {\n \"Content-Type\": \"application/json;charset=utf-8\",\n },\n });\n }\n\n /**\n * Creates a new site design available to users when they create a new site from the SharePoint home page.\n * \n * @param creationInfo A sitedesign creation information object\n */\n public async createSiteDesign(creationInfo: SiteDesignCreationInfo): Promise {\n return await this.clone(SiteDesigns, `CreateSiteDesign`).execute({ info: creationInfo });\n }\n\n /**\n * Applies a site design to an existing site collection.\n *\n * @param siteDesignId The ID of the site design to apply.\n * @param webUrl The URL of the site collection where you want to apply the site design.\n */\n public async applySiteDesign(siteDesignId: string, webUrl: string): Promise {\n return await this.clone(SiteDesigns, `ApplySiteDesign`).execute({ siteDesignId: siteDesignId, \"webUrl\": webUrl });\n }\n\n /**\n * Gets a list of information about existing site designs.\n */\n public async getSiteDesigns(): Promise {\n return await this.clone(SiteDesigns, `GetSiteDesigns`).execute({});\n }\n\n /**\n * Gets information about a specific site design.\n * @param id The ID of the site design to get information about.\n */\n public async getSiteDesignMetadata(id: string): Promise {\n return await this.clone(SiteDesigns, `GetSiteDesignMetadata`).execute({ id: id });\n }\n\n /**\n * Updates a site design with new values. In the REST call, all parameters are optional except the site script Id.\n * If you had previously set the IsDefault parameter to TRUE and wish it to remain true, you must pass in this parameter again (otherwise it will be reset to FALSE). \n * @param updateInfo A sitedesign update information object\n */\n public async updateSiteDesign(updateInfo: SiteDesignUpdateInfo): Promise {\n return await this.clone(SiteDesigns, `UpdateSiteDesign`).execute({ updateInfo: updateInfo });\n }\n\n /**\n * Deletes a site design.\n * @param id The ID of the site design to delete.\n */\n public async deleteSiteDesign(id: string): Promise {\n return await this.clone(SiteDesigns, `DeleteSiteDesign`).execute({ id: id });\n }\n\n /**\n * Gets a list of principals that have access to a site design.\n * @param id The ID of the site design to get rights information from.\n */\n public async getSiteDesignRights(id: string): Promise {\n return await this.clone(SiteDesigns, `GetSiteDesignRights`).execute({ id: id });\n }\n\n /**\n * Grants access to a site design for one or more principals.\n * @param id The ID of the site design to grant rights on.\n * @param principalNames An array of one or more principals to grant view rights. \n * Principals can be users or mail-enabled security groups in the form of \"alias\" or \"alias@.com\"\n * @param grantedRights Always set to 1. This represents the View right.\n */\n public async grantSiteDesignRights(id: string, principalNames: string[], grantedRights = 1): Promise {\n return await this.clone(SiteDesigns, `GrantSiteDesignRights`)\n .execute({\n \"grantedRights\": grantedRights.toString(),\n \"id\": id,\n \"principalNames\": principalNames,\n });\n }\n\n /**\n * Revokes access from a site design for one or more principals.\n * @param id The ID of the site design to revoke rights from.\n * @param principalNames An array of one or more principals to revoke view rights from. \n * If all principals have rights revoked on the site design, the site design becomes viewable to everyone.\n */\n public async revokeSiteDesignRights(id: string, principalNames: string[]): Promise {\n return await this.clone(SiteDesigns, `RevokeSiteDesignRights`)\n .execute({\n \"id\": id,\n \"principalNames\": principalNames,\n });\n }\n\n /**\n * Adds a site design task on the specified web url to be invoked asynchronously.\n * @param webUrl The absolute url of the web on where to create the task\n * @param siteDesignId The ID of the site design to create a task for\n */\n public async addSiteDesignTask(webUrl: string, siteDesignId: string): Promise {\n return await this.clone(SiteDesigns, `AddSiteDesignTask`)\n .execute({ \"webUrl\": webUrl, \"siteDesignId\": siteDesignId });\n }\n\n /**\n * Adds a site design task on the current web to be invoked asynchronously.\n * @param siteDesignId The ID of the site design to create a task for\n */\n public async addSiteDesignTaskToCurrentWeb(siteDesignId: string): Promise {\n return await this.clone(SiteDesigns, `AddSiteDesignTaskToCurrentWeb`)\n .execute({ \"siteDesignId\": siteDesignId });\n }\n\n /**\n * Retrieves the site design task, if the task has finished running null will be returned\n * @param id The ID of the site design task\n */\n public async getSiteDesignTask(id: string): Promise {\n const task = await this.clone(SiteDesigns, `GetSiteDesignTask`)\n .execute({ \"taskId\": id });\n\n return hOP(task, \"ID\") ? task : null;\n }\n\n /**\n * Retrieves a list of site design that have run on a specific web\n * @param webUrl The url of the web where the site design was applied\n * @param siteDesignId (Optional) the site design ID, if not provided will return all site design runs\n */\n public async getSiteDesignRun(webUrl: string, siteDesignId?: string): Promise {\n return await this.clone(SiteDesigns, `GetSiteDesignRun`)\n .execute({ \"webUrl\": webUrl, siteDesignId: siteDesignId });\n }\n\n /**\n * Retrieves the status of a site design that has been run or is still running\n * @param webUrl The url of the web where the site design was applied\n * @param runId the run ID\n */\n public async getSiteDesignRunStatus(webUrl: string, runId: string): Promise {\n return await this.clone(SiteDesigns, `GetSiteDesignRunStatus`)\n .execute({ \"webUrl\": webUrl, runId: runId });\n }\n\n}\n","import { SharePointQueryable } from \"./sharepointqueryable\";\n\nexport interface SiteScriptInfo {\n Id: string;\n Title: string;\n Description: string;\n Content: string;\n Version: string;\n}\n\nexport interface SiteScriptUpdateInfo {\n Id: string;\n Title?: string;\n Description?: string;\n Content?: string;\n Version?: string;\n}\n\nexport interface SiteScriptUtilityMethods {\n getSiteScripts(): Promise;\n createSiteScript(title: string, description: string, content: any): Promise;\n getSiteScriptMetadata(id: string): Promise;\n deleteSiteScript(id: string): Promise;\n updateSiteScript(siteScriptUpdateInfo: SiteScriptUpdateInfo, content?: any): Promise;\n getSiteScriptFromList(listUrl: string): Promise;\n getSiteScriptFromWeb(webUrl: string, info: ISiteScriptSerializationInfo): Promise;\n}\n\nexport interface ISiteScriptSerializationInfo {\n IncludeBranding?: boolean;\n IncludedLists?: string[];\n IncludeLinksToExportedItems?: boolean;\n IncludeRegionalSettings?: boolean;\n IncludeSiteExternalSharingCapability?: boolean;\n IncludeTheme?: boolean;\n}\n\nexport interface ISiteScriptSerializationResult {\n JSON: string;\n Warnings: string[];\n}\n\n/**\n * Implements the site script API REST methods\n *\n */\nexport class SiteScripts extends SharePointQueryable implements SiteScriptUtilityMethods {\n /**\n * Creates a new instance of the SiteScripts method class\n *\n * @param baseUrl The parent url provider\n * @param methodName The static method name to call on the utility class\n */\n constructor(baseUrl: string | SharePointQueryable, methodName: string) {\n super(SiteScripts.getBaseUrl(baseUrl), `_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.${methodName}`);\n }\n\n private static getBaseUrl(candidate: string | SharePointQueryable) {\n if (typeof candidate === \"string\") {\n return candidate;\n }\n\n const c = candidate as SharePointQueryable;\n const url = c.toUrl();\n const index = url.indexOf(\"_api/\");\n if (index < 0) {\n return url;\n }\n\n return url.substr(0, index);\n }\n\n public execute(props: any): Promise {\n return this.postCore({\n body: JSON.stringify(props),\n });\n }\n\n /**\n * Gets a list of information on all existing site scripts.\n */\n public getSiteScripts(): Promise {\n return this.clone(SiteScripts, \"GetSiteScripts\", true).execute({});\n }\n\n /**\n * Creates a new site script.\n * \n * @param title The display name of the site design.\n * @param content JSON value that describes the script. For more information, see JSON reference.\n */\n public async createSiteScript(title: string, description: string, content: any): Promise {\n return await this.clone(SiteScripts,\n `CreateSiteScript(Title=@title,Description=@desc)?@title='${encodeURIComponent(title)}'&@desc='${encodeURIComponent(description)}'`)\n .execute(content);\n }\n\n /**\n * Gets information about a specific site script. It also returns the JSON of the script.\n * \n * @param id The ID of the site script to get information about.\n */\n public async getSiteScriptMetadata(id: string): Promise {\n return await this.clone(SiteScripts, \"GetSiteScriptMetadata\").execute({ id: id });\n }\n\n /**\n * Deletes a site script.\n * \n * @param id The ID of the site script to delete.\n */\n public async deleteSiteScript(id: string): Promise {\n await this.clone(SiteScripts, \"DeleteSiteScript\").execute({ id: id });\n }\n\n /**\n * Updates a site script with new values. In the REST call, all parameters are optional except the site script Id.\n * \n * @param siteScriptUpdateInfo Object that contains the information to update a site script. \n * Make sure you stringify the content object or pass it in the second 'content' parameter\n * @param content (Optional) A new JSON script defining the script actions. For more information, see Site design JSON schema.\n */\n public async updateSiteScript(siteScriptUpdateInfo: SiteScriptUpdateInfo, content?: any): Promise {\n if (content) {\n siteScriptUpdateInfo.Content = JSON.stringify(content);\n }\n\n return await this.clone(SiteScripts, \"UpdateSiteScript\").execute({ updateInfo: siteScriptUpdateInfo });\n }\n\n /**\n * Gets the site script syntax (JSON) for a specific list\n * @param listUrl The absolute url of the list to retrieve site script\n */\n public async getSiteScriptFromList(listUrl: string): Promise {\n return await this.clone(SiteScripts, `GetSiteScriptFromList`)\n .execute({ \"listUrl\": listUrl });\n }\n\n /**\n * Gets the site script syntax (JSON) for a specific web\n * @param webUrl The absolute url of the web to retrieve site script\n * @param extractInfo configuration object to specify what to extract\n */\n public async getSiteScriptFromWeb(webUrl: string, extractInfo: ISiteScriptSerializationInfo): Promise {\n return await this.clone(SiteScripts, `getSiteScriptFromWeb`)\n .execute({ \"webUrl\": webUrl, info: extractInfo });\n }\n\n}\n","import { extend, TypedHash, jsS } from \"@pnp/common\";\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { SharePointQueryableShareableWeb } from \"./sharepointqueryableshareable\";\nimport { Folders, Folder } from \"./folders\";\nimport { Lists, List } from \"./lists\";\nimport { Fields } from \"./fields\";\nimport { Site } from \"./site\";\nimport { Navigation } from \"./navigation\";\nimport { SiteGroups, SiteGroup } from \"./sitegroups\";\nimport { ContentTypes } from \"./contenttypes\";\nimport { RoleDefinitions } from \"./roles\";\nimport { File } from \"./files\";\nimport { extractWebUrl } from \"./utils/extractweburl\";\nimport { ChangeQuery, StorageEntity, HubSiteData as IHubSiteData } from \"./types\";\nimport { SiteUsers, SiteUser, CurrentUser, SiteUserProps } from \"./siteusers\";\nimport { UserCustomActions } from \"./usercustomactions\";\nimport { odataUrlFrom } from \"./odata\";\nimport { SPBatch } from \"./batch\";\nimport { Features } from \"./features\";\nimport { RelatedItemManger, RelatedItemManagerImpl } from \"./relateditems\";\nimport { AppCatalog } from \"./appcatalog\";\nimport { RegionalSettings } from \"./regionalsettings\";\nimport { ClientSidePage, ClientSidePageComponent } from \"./clientsidepages\";\nimport { SiteDesigns, ISiteDesignRun, ISiteDesignTask, ISiteScriptActionStatus } from \"./sitedesigns\";\nimport { SiteScripts, ISiteScriptSerializationInfo, ISiteScriptSerializationResult } from \"./sitescripts\";\n\n/**\n * Describes a collection of webs\n *\n */\n@defaultPath(\"webs\")\nexport class Webs extends SharePointQueryableCollection {\n\n /**\n * Adds a new web to the collection\n *\n * @param title The new web's title\n * @param url The new web's relative url\n * @param description The new web's description\n * @param template The new web's template internal name (default = STS)\n * @param language The locale id that specifies the new web's language (default = 1033 [English, US])\n * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true)\n */\n public add(\n title: string,\n url: string,\n description = \"\",\n template = \"STS\",\n language = 1033,\n inheritPermissions = true): Promise {\n\n const props = {\n Description: description,\n Language: language,\n Title: title,\n Url: url,\n UseSamePermissionsAsParentSite: inheritPermissions,\n WebTemplate: template,\n };\n\n const postBody = jsS({\n \"parameters\":\n extend({\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\n }, props),\n });\n\n return this.clone(Webs, \"add\").postCore({ body: postBody }).then((data) => {\n return {\n data: data,\n web: new Web(odataUrlFrom(data).replace(/_api\\/web\\/?/i, \"\")),\n };\n });\n }\n}\n\n/**\n * Describes a collection of web infos\n *\n */\n@defaultPath(\"webinfos\")\nexport class WebInfos extends SharePointQueryableCollection { }\n\n/**\n * Describes a web\n *\n */\n@defaultPath(\"_api/web\")\nexport class Web extends SharePointQueryableShareableWeb {\n\n /**\n * Creates a new web instance from the given url by indexing the location of the /_api/\n * segment. If this is not found the method creates a new web with the entire string as\n * supplied.\n *\n * @param url\n */\n public static fromUrl(url: string, path?: string) {\n return new Web(extractWebUrl(url), path);\n }\n\n /**\n * Gets this web's subwebs\n *\n */\n public get webs(): Webs {\n return new Webs(this);\n }\n\n /**\n * Gets this web's parent web and data\n *\n */\n public getParentWeb(): Promise<{ data: any; web: Web }> {\n return this.select(\"ParentWeb/Id\").expand(\"ParentWeb\").get()\n .then(({ ParentWeb }) => ParentWeb ? new Site(this.parentUrl).openWebById(ParentWeb.Id) : null);\n }\n\n /**\n * Returns a collection of objects that contain metadata about subsites of the current site in which the current user is a member.\n *\n * @param nWebTemplateFilter Specifies the site definition (default = -1)\n * @param nConfigurationFilter A 16-bit integer that specifies the identifier of a configuration (default = -1)\n */\n public getSubwebsFilteredForCurrentUser(nWebTemplateFilter = -1, nConfigurationFilter = -1): Webs {\n return this.clone(Webs, `getSubwebsFilteredForCurrentUser(nWebTemplateFilter=${nWebTemplateFilter},nConfigurationFilter=${nConfigurationFilter})`);\n }\n\n /**\n * Allows access to the web's all properties collection\n */\n public get allProperties(): SharePointQueryableInstance {\n return this.clone(SharePointQueryableInstance, \"allproperties\");\n }\n\n /**\n * Gets a collection of WebInfos for this web's subwebs\n *\n */\n public get webinfos(): WebInfos {\n return new WebInfos(this);\n }\n\n /**\n * Gets the content types available in this web\n *\n */\n public get contentTypes(): ContentTypes {\n return new ContentTypes(this);\n }\n\n /**\n * Gets the lists in this web\n *\n */\n public get lists(): Lists {\n return new Lists(this);\n }\n\n /**\n * Gets the fields in this web\n *\n */\n public get fields(): Fields {\n return new Fields(this);\n }\n\n /**\n * Gets the active features for this web\n *\n */\n public get features(): Features {\n return new Features(this);\n }\n\n /**\n * Gets the available fields in this web\n *\n */\n public get availablefields(): Fields {\n return new Fields(this, \"availablefields\");\n }\n\n /**\n * Gets the navigation options in this web\n *\n */\n public get navigation(): Navigation {\n return new Navigation(this);\n }\n\n /**\n * Gets the site users\n *\n */\n public get siteUsers(): SiteUsers {\n return new SiteUsers(this);\n }\n\n /**\n * Gets the site groups\n *\n */\n public get siteGroups(): SiteGroups {\n return new SiteGroups(this);\n }\n\n /**\n * Gets site user info list\n *\n */\n public get siteUserInfoList(): List {\n return new List(this, \"siteuserinfolist\");\n }\n\n /**\n * Gets regional settings\n *\n */\n public get regionalSettings(): RegionalSettings {\n return new RegionalSettings(this);\n }\n\n /**\n * Gets the current user\n */\n public get currentUser(): CurrentUser {\n return new CurrentUser(this);\n }\n\n /**\n * Gets the top-level folders in this web\n *\n */\n public get folders(): Folders {\n return new Folders(this);\n }\n\n /**\n * Gets all user custom actions for this web\n *\n */\n public get userCustomActions(): UserCustomActions {\n return new UserCustomActions(this);\n }\n\n /**\n * Gets the collection of RoleDefinition resources\n *\n */\n public get roleDefinitions(): RoleDefinitions {\n return new RoleDefinitions(this);\n }\n\n /**\n * Provides an interface to manage related items\n *\n */\n public get relatedItems(): RelatedItemManger {\n return RelatedItemManagerImpl.FromUrl(this.toUrl());\n }\n\n /**\n * Creates a new batch for requests within the context of this web\n *\n */\n public createBatch(): SPBatch {\n return new SPBatch(this.parentUrl);\n }\n\n /**\n * Gets the root folder of this web\n *\n */\n public get rootFolder(): Folder {\n return new Folder(this, \"rootFolder\");\n }\n\n /**\n * Gets the associated owner group for this web\n *\n */\n public get associatedOwnerGroup(): SiteGroup {\n return new SiteGroup(this, \"associatedownergroup\");\n }\n\n /**\n * Gets the associated member group for this web\n *\n */\n public get associatedMemberGroup(): SiteGroup {\n return new SiteGroup(this, \"associatedmembergroup\");\n }\n\n /**\n * Gets the associated visitor group for this web\n *\n */\n public get associatedVisitorGroup(): SiteGroup {\n return new SiteGroup(this, \"associatedvisitorgroup\");\n }\n\n /**\n * Gets the default document library for this web\n *\n */\n public get defaultDocumentLibrary(): List {\n return new List(this, \"DefaultDocumentLibrary\");\n }\n\n /**\n * Gets a folder by id\n *\n * @param uniqueId The uniqueId of the folder\n */\n public getFolderById(uniqueId: string): Folder {\n return new Folder(this, `getFolderById('${uniqueId}')`);\n }\n\n /**\n * Gets a folder by server relative url\n *\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\n */\n public getFolderByServerRelativeUrl(folderRelativeUrl: string): Folder {\n return new Folder(this, `getFolderByServerRelativeUrl('${folderRelativeUrl}')`);\n }\n\n /**\n * Gets a folder by server relative relative path if your folder name contains # and % characters\n * you need to first encode the file name using encodeURIComponent() and then pass the url\n * let url = \"/sites/test/Shared Documents/\" + encodeURIComponent(\"%123\");\n * This works only in SharePoint online.\n *\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\n */\n public getFolderByServerRelativePath(folderRelativeUrl: string): Folder {\n return new Folder(this, `getFolderByServerRelativePath(decodedUrl='${folderRelativeUrl}')`);\n }\n\n /**\n * Gets a file by id\n *\n * @param uniqueId The uniqueId of the file\n */\n public getFileById(uniqueId: string): File {\n return new File(this, `getFileById('${uniqueId}')`);\n }\n\n /**\n * Gets a file by server relative url\n *\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\n */\n public getFileByServerRelativeUrl(fileRelativeUrl: string): File {\n return new File(this, `getFileByServerRelativeUrl('${fileRelativeUrl}')`);\n }\n\n /**\n * Gets a file by server relative url if your file name contains # and % characters\n * you need to first encode the file name using encodeURIComponent() and then pass the url\n * let url = \"/sites/test/Shared Documents/\" + encodeURIComponent(\"%123.docx\");\n *\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\n */\n public getFileByServerRelativePath(fileRelativeUrl: string): File {\n return new File(this, `getFileByServerRelativePath(decodedUrl='${fileRelativeUrl}')`);\n }\n\n /**\n * Gets a list by server relative url (list's root folder)\n *\n * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable)\n */\n public getList(listRelativeUrl: string): List {\n return new List(this, `getList('${listRelativeUrl}')`);\n }\n\n /**\n * Updates this web instance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n public update(properties: TypedHash): Promise {\n\n const postBody = jsS(extend({\n \"__metadata\": { \"type\": \"SP.Web\" },\n }, properties));\n\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n web: this,\n };\n });\n }\n\n /**\n * Deletes this web\n *\n */\n public delete(): Promise {\n return super.deleteCore();\n }\n\n /**\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site\n *\n * @param colorPaletteUrl The server-relative URL of the color palette file\n * @param fontSchemeUrl The server-relative URL of the font scheme\n * @param backgroundImageUrl The server-relative URL of the background image\n * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web\n */\n public applyTheme(colorPaletteUrl: string, fontSchemeUrl: string, backgroundImageUrl: string, shareGenerated: boolean): Promise {\n\n const postBody = jsS({\n backgroundImageUrl: backgroundImageUrl,\n colorPaletteUrl: colorPaletteUrl,\n fontSchemeUrl: fontSchemeUrl,\n shareGenerated: shareGenerated,\n });\n\n return this.clone(Web, \"applytheme\").postCore({ body: postBody });\n }\n\n /**\n * Applies the specified site definition or site template to the Web site that has no template applied to it\n *\n * @param template Name of the site definition or the name of the site template\n */\n public applyWebTemplate(template: string): Promise {\n\n const q = this.clone(Web, \"applywebtemplate\");\n q.concat(`(@t)`);\n q.query.set(\"@t\", template);\n return q.postCore();\n }\n\n /**\n * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web.\n *\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\n */\n public ensureUser(loginName: string): Promise {\n const postBody = jsS({\n logonName: loginName,\n });\n\n return this.clone(Web, \"ensureuser\").postCore({ body: postBody }).then((data: any) => {\n return {\n data: data,\n user: new SiteUser(odataUrlFrom(data)),\n };\n });\n }\n\n /**\n * Returns a collection of site templates available for the site\n *\n * @param language The locale id of the site templates to retrieve (default = 1033 [English, US])\n * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true)\n */\n public availableWebTemplates(language = 1033, includeCrossLanugage = true): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, `getavailablewebtemplates(lcid=${language}, doincludecrosslanguage=${includeCrossLanugage})`);\n }\n\n /**\n * Returns the list gallery on the site\n *\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\n */\n public getCatalog(type: number): Promise {\n return this.clone(Web, `getcatalog(${type})`).select(\"Id\").get().then((data) => {\n return new List(odataUrlFrom(data));\n });\n }\n\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query\n *\n * @param query The change query\n */\n public getChanges(query: ChangeQuery): Promise {\n\n const postBody = jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n return this.clone(Web, \"getchanges\").postCore({ body: postBody });\n }\n\n /**\n * Gets the custom list templates for the site\n *\n */\n public get customListTemplate(): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, \"getcustomlisttemplates\");\n }\n\n /**\n * Returns the user corresponding to the specified member identifier for the current site\n *\n * @param id The id of the user\n */\n public getUserById(id: number): SiteUser {\n return new SiteUser(this, `getUserById(${id})`);\n }\n\n /**\n * Returns the name of the image file for the icon that is used to represent the specified file\n *\n * @param filename The file name. If this parameter is empty, the server returns an empty string\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0)\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\n */\n public mapToIcon(filename: string, size = 0, progId = \"\"): Promise {\n return this.clone(Web, `maptoicon(filename='${filename}', progid='${progId}', size=${size})`).get();\n }\n\n /**\n * Returns the tenant property corresponding to the specified key in the app catalog site\n *\n * @param key Id of storage entity to be set\n */\n public getStorageEntity(key: string): Promise {\n return this.clone(Web, `getStorageEntity('${key}')`).get();\n }\n\n /**\n * This will set the storage entity identified by the given key (MUST be called in the context of the app catalog)\n *\n * @param key Id of storage entity to be set\n * @param value Value of storage entity to be set\n * @param description Description of storage entity to be set\n * @param comments Comments of storage entity to be set\n */\n public setStorageEntity(key: string, value: string, description = \"\", comments = \"\"): Promise {\n return this.clone(Web, `setStorageEntity`).postCore({\n body: jsS({\n comments,\n description,\n key,\n value,\n }),\n });\n }\n\n /**\n * This will remove the storage entity identified by the given key\n *\n * @param key Id of storage entity to be removed\n */\n public removeStorageEntity(key: string): Promise {\n return this.clone(Web, `removeStorageEntity('${key}')`).postCore();\n }\n\n /**\n * Gets the tenant app catalog for this web\n *\n * @param url Optional url or web containing the app catalog (default: current web)\n */\n public getAppCatalog(url?: string | Web) {\n return new AppCatalog(url || this);\n }\n\n /**\n * Gets the site collection app catalog for this web\n *\n * @param url Optional url or web containing the app catalog (default: current web)\n */\n public getSiteCollectionAppCatalog(url?: string | Web) {\n return new AppCatalog(url || this, \"_api/web/sitecollectionappcatalog/AvailableApps\");\n }\n\n /**\n * Gets the collection of available client side web parts for this web instance\n */\n public getClientSideWebParts(): Promise {\n return this.clone(SharePointQueryableCollection, \"GetClientSideWebParts\").get();\n }\n\n /**\n * Creates a new client side page\n *\n * @param pageName Name of the new page\n * @param title Display title of the new page\n * @param libraryTitle Title of the library in which to create the new page. Default: \"Site Pages\"\n */\n public addClientSidePage(pageName: string, title = pageName.replace(/\\.[^/.]+$/, \"\")): Promise {\n return ClientSidePage.create(this, pageName, title);\n }\n\n /**\n * Creates a new client side page using the library path\n *\n * @param pageName Name of the new page\n * @param listRelativePath The server relative path to the list's root folder (including /sites/ if applicable)\n * @param title Display title of the new page\n */\n public addClientSidePageByPath(pageName: string, title = pageName.replace(/\\.[^/.]+$/, \"\")): Promise {\n return ClientSidePage.create(this, pageName, title);\n }\n\n /**\n * Creates the default associated groups (Members, Owners, Visitors) and gives them the default permissions on the site.\n * The target site must have unique permissions and no associated members / owners / visitors groups\n *\n * @param siteOwner The user login name to be added to the site Owners group. Default is the current user\n * @param siteOwner2 The second user login name to be added to the site Owners group. Default is empty\n * @param groupNameSeed The base group name. E.g. 'TestSite' would produce 'TestSite Members' etc.\n */\n public createDefaultAssociatedGroups(siteOwner?: string, siteOwner2?: string, groupNameSeed?: string): Promise {\n const q = this.clone(Web, `createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)`);\n q.query.set(\"@u\", `'${encodeURIComponent(siteOwner || \"\")}'`);\n q.query.set(\"@v\", `'${encodeURIComponent(siteOwner2 || \"\")}'`);\n q.query.set(\"@s\", `'${encodeURIComponent(groupNameSeed || \"\")}'`);\n return q.postCore();\n }\n\n /**\n * Gets hub site data for the current web.\n *\n * @param forceRefresh Default value is false. When false, the data is returned from the server's cache.\n * When true, the cache is refreshed with the latest updates and then returned.\n * Use this if you just made changes and need to see those changes right away.\n */\n public async hubSiteData(forceRefresh = false): Promise {\n return this.clone(Web, `hubSiteData(${forceRefresh})`).get().then(r => JSON.parse(r));\n }\n\n /**\n * Applies theme updates from the parent hub site collection.\n */\n public syncHubSiteTheme(): Promise {\n return this.clone(Web, `syncHubSiteTheme`).postCore();\n }\n\n /**\n * Retrieves a list of site design that have run on the current web\n * @param siteDesignId (Optional) the site design ID, if not provided will return all site design runs\n */\n public getSiteDesignRuns(siteDesignId?: string): Promise {\n return new SiteDesigns(this, \"\").getSiteDesignRun(undefined, siteDesignId);\n }\n\n /**\n * Gets the site script syntax (JSON) for a specific web\n * @param extractInfo configuration object to specify what to extract\n */\n public getSiteScript(extractInfo?: ISiteScriptSerializationInfo): Promise {\n return new SiteScripts(this, \"\").getSiteScriptFromWeb(undefined, extractInfo);\n }\n\n /**\n * Adds a site design task on the current web to be invoked asynchronously.\n * @param siteDesignId The ID of the site design to create a task for\n */\n public addSiteDesignTask(siteDesignId: string): Promise {\n return new SiteDesigns(this, \"\").addSiteDesignTaskToCurrentWeb(siteDesignId);\n }\n\n /**\n * Retrieves the status of a site design that has been run or is still running\n * @param runId the run ID\n */\n public getSiteDesignRunStatus(runId: string): Promise {\n return new SiteDesigns(this, \"\").getSiteDesignRunStatus(undefined, runId);\n }\n\n}\n\n/**\n * Result from adding a web\n *\n */\nexport interface WebAddResult {\n data: any;\n web: Web;\n}\n\n/**\n * Result from updating a web\n *\n */\nexport interface WebUpdateResult {\n data: any;\n web: Web;\n}\n\n/**\n * Result from retrieving a catalog\n *\n */\nexport interface GetCatalogResult {\n data: any;\n list: List;\n}\n\n/**\n * Result from ensuring a user\n *\n */\nexport interface WebEnsureUserResult {\n data: SiteUserProps;\n user: SiteUser;\n}\n","import { File } from \"./files\";\nimport { Item, ItemUpdateResult } from \"./items\";\nimport { TypedHash, extend, getGUID, jsS, hOP, stringIsNullOrEmpty, objectDefinedNotNull, combine, isUrlAbsolute } from \"@pnp/common\";\nimport { SharePointQueryable } from \"./sharepointqueryable\";\nimport { metadata } from \"./utils/metadata\";\nimport { List } from \"./lists\";\nimport { odataUrlFrom } from \"./odata\";\nimport { Web } from \"./webs\";\nimport { extractWebUrl } from \"./utils/extractweburl\";\nimport { Site } from \"./site\";\n\n/**\n * Page promotion state\n */\nexport const enum PromotedState {\n /**\n * Regular client side page\n */\n NotPromoted = 0,\n /**\n * Page that will be promoted as news article after publishing\n */\n PromoteOnPublish = 1,\n /**\n * Page that is promoted as news article\n */\n Promoted = 2,\n}\n\n/**\n * Type describing the available page layout types for client side \"modern\" pages\n */\nexport type ClientSidePageLayoutType = \"Article\" | \"Home\" | \"SingleWebPartAppPage\" | \"RepostPage\";\n\n/**\n * Column size factor. Max value is 12 (= one column), other options are 8,6,4 or 0\n */\nexport type CanvasColumnFactor = 0 | 2 | 4 | 6 | 8 | 12;\n\n/**\n * Gets the next order value 1 based for the provided collection\n * \n * @param collection Collection of orderable things\n */\nfunction getNextOrder(collection: { order: number }[]): number {\n\n if (collection.length < 1) {\n return 1;\n }\n\n return Math.max.apply(null, collection.map(i => i.order)) + 1;\n}\n\n/**\n * Normalizes the order value for all the sections, columns, and controls to be 1 based and stepped (1, 2, 3...)\n * \n * @param collection The collection to normalize\n */\nfunction reindex(collection: { order: number, columns?: { order: number }[], controls?: { order: number }[] }[]): void {\n\n for (let i = 0; i < collection.length; i++) {\n collection[i].order = i + 1;\n if (hOP(collection[i], \"columns\")) {\n reindex(collection[i].columns);\n } else if (hOP(collection[i], \"controls\")) {\n reindex(collection[i].controls);\n }\n }\n}\n\n/**\n * Represents the data and methods associated with client side \"modern\" pages\n */\nexport class ClientSidePage extends SharePointQueryable {\n\n private _pageSettings: IClientSidePageSettingsSlice;\n private _layoutPart: ILayoutPartsContent;\n private _bannerImageDirty: boolean;\n\n /**\n * PLEASE DON'T USE THIS CONSTRUCTOR DIRECTLY\n * \n */\n constructor(\n baseUrl: string | SharePointQueryable,\n path?: string,\n private json?: Partial,\n noInit = false,\n public sections: CanvasSection[] = [],\n public commentsDisabled = false) {\n\n super(baseUrl, path);\n\n this._bannerImageDirty = false;\n\n // ensure we have a good url to build on for the pages api\n if (typeof baseUrl === \"string\") {\n this._parentUrl = \"\";\n this._url = combine(extractWebUrl(baseUrl), path);\n } else {\n this.extend(ClientSidePage.initFrom(baseUrl, null), path);\n }\n\n // set a default page settings slice\n this._pageSettings = { controlType: 0, pageSettingsSlice: { isDefaultDescription: true, isDefaultThumbnail: true } };\n\n // set a default layout part\n this._layoutPart = ClientSidePage.getDefaultLayoutPart();\n\n if (typeof json !== \"undefined\" && !noInit) {\n this.fromJSON(json);\n }\n }\n\n /**\n * Creates a new blank page within the supplied library [does not work with batching]\n * \n * @param web Parent web in which we will create the page (we allow list here too matching the old api)\n * @param pageName Filename of the page, such as \"page\"\n * @param title The display title of the page\n * @param pageLayoutType Layout type of the page to use\n */\n public static async create(web: Web | List, pageName: string, title: string, pageLayoutType: ClientSidePageLayoutType = \"Article\"): Promise {\n\n // patched because previously we used the full page name with the .aspx at the end\n // this allows folk's existing code to work after the re-write to the new API\n pageName = pageName.replace(/\\.aspx$/i, \"\");\n\n // this is the user data we will use to init the author field\n // const currentUserLogin = await ClientSidePage.getPoster(\"/_api/web/currentuser\").select(\"UserPrincipalName\").get<{ UserPrincipalName: string }>();\n\n // initialize the page, at this point a checked-out page with a junk filename will be created.\n const pageInitData = await ClientSidePage.initFrom(web, \"_api/sitepages/pages\").postCore({\n body: jsS(Object.assign(metadata(\"SP.Publishing.SitePage\"), {\n PageLayoutType: pageLayoutType,\n })),\n });\n\n // now we can init our page with the save data\n const newPage = new ClientSidePage(web, \"\", pageInitData);\n // newPage.authors = [currentUserLogin.UserPrincipalName];\n newPage.title = pageName;\n await newPage.save(false);\n newPage.title = title;\n return newPage;\n }\n\n /**\n * Creates a new ClientSidePage instance from the provided html content string\n * \n * @param html HTML markup representing the page\n */\n public static fromFile(file: File): Promise {\n\n return file.getItem<{ Id: number }>().then(i => {\n const page = new ClientSidePage(extractWebUrl(file.toUrl()), \"\", { Id: i.Id }, true);\n return page.configureFrom(file).load();\n });\n }\n\n private static getDefaultLayoutPart(): ILayoutPartsContent {\n return {\n dataVersion: \"1.4\",\n description: \"Title Region Description\",\n id: \"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\n instanceId: \"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\n properties: {\n authors: [],\n layoutType: \"FullWidthImage\",\n showPublishDate: false,\n showTopicHeader: false,\n textAlignment: \"Left\",\n title: \"\",\n topicHeader: \"\",\n },\n serverProcessedContent: { htmlStrings: {}, searchablePlainTexts: {}, imageSources: {}, links: {} },\n title: \"Title area\",\n };\n }\n\n private static initFrom(o: SharePointQueryable, url: string): ClientSidePage {\n return (new ClientSidePage(extractWebUrl(o.toUrl()), url)).configureFrom(o);\n }\n\n public get pageLayout(): ClientSidePageLayoutType {\n return this.json.PageLayoutType;\n }\n\n public set pageLayout(value: ClientSidePageLayoutType) {\n this.json.PageLayoutType = value;\n }\n\n public get bannerImageUrl(): string {\n return this.json.BannerImageUrl;\n }\n\n public set bannerImageUrl(value: string) {\n this.json.BannerImageUrl = value;\n this._bannerImageDirty = true;\n }\n\n public get bannerImageSourceType(): number {\n return this._layoutPart.properties.imageSourceType;\n }\n\n public set bannerImageSourceType(value: number) {\n this._layoutPart.properties.imageSourceType = value;\n }\n\n public get topicHeader(): string {\n return objectDefinedNotNull(this.json.TopicHeader) ? this.json.TopicHeader : \"\";\n }\n\n public set topicHeader(value: string) {\n this.json.TopicHeader = value;\n this._layoutPart.properties.topicHeader = value;\n if (stringIsNullOrEmpty(value)) {\n this.showTopicHeader = false;\n }\n }\n\n // public get authors(): string[] {\n // return this._layoutPart.properties.authorByline;\n // }\n\n // public set authors(value: string[]) {\n // this.json.AuthorByline = value;\n // this._layoutPart.properties.authorByline = value;\n // this._layoutPart.properties.authors = null;\n // }\n\n public get title(): string {\n return this._layoutPart.properties.title;\n }\n\n public set title(value: string) {\n this.json.Title = value;\n this._layoutPart.properties.title = value;\n }\n\n public get layoutType(): LayoutType {\n return this._layoutPart.properties.layoutType;\n }\n\n public set layoutType(value: LayoutType) {\n this._layoutPart.properties.layoutType = value;\n }\n\n public get headerTextAlignment(): TextAlignment {\n return this._layoutPart.properties.textAlignment;\n }\n\n public set headerTextAlignment(value: TextAlignment) {\n this._layoutPart.properties.textAlignment = value;\n }\n\n public get showTopicHeader(): boolean {\n return this._layoutPart.properties.showTopicHeader;\n }\n\n public set showTopicHeader(value: boolean) {\n this._layoutPart.properties.showTopicHeader = value;\n }\n\n public get showPublishDate(): boolean {\n return this._layoutPart.properties.showPublishDate;\n }\n\n public set showPublishDate(value: boolean) {\n this._layoutPart.properties.showPublishDate = value;\n }\n\n /**\n * Add a section to this page\n */\n public addSection(): CanvasSection {\n const section = new CanvasSection(this, getNextOrder(this.sections));\n this.sections.push(section);\n return section;\n }\n\n public fromJSON(pageData: Partial): this {\n\n this.json = pageData;\n\n const canvasControls: IClientSideControlBaseData[] = JSON.parse(pageData.CanvasContent1);\n\n const layouts = JSON.parse(pageData.LayoutWebpartsContent);\n if (layouts && layouts.length > 0) {\n this._layoutPart = layouts[0];\n }\n\n this.setControls(canvasControls);\n\n return this;\n }\n\n /**\n * Loads this page's content from the server\n */\n public load(): Promise {\n\n // load item id, then load page data from new pages api\n return this.getItem<{ Id: number, CommentsDisabled: boolean }>(\"Id\", \"CommentsDisabled\").then(item => {\n return (new SharePointQueryable(this, `_api/sitepages/pages(${item.Id})`)).get().then(pageData => {\n this.commentsDisabled = item.CommentsDisabled;\n return this.fromJSON(pageData);\n });\n });\n }\n\n /**\n * Persists the content changes (sections, columns, and controls) [does not work with batching]\n * \n * @param publish If true the page is published, if false the changes are persisted to SharePoint but not published\n */\n public save(publish = true): Promise {\n\n if (this.json.Id === null) {\n throw Error(\"The id for this page is null. If you want to create a new page, please use ClientSidePage.Create\");\n }\n\n // we will chain our work on this promise\n let promise = Promise.resolve({});\n\n if (this._bannerImageDirty) {\n\n // we have to do these gymnastics to set the banner image url\n promise = promise.then(_ => new Promise((resolve, reject) => {\n\n let origImgUrl = this.json.BannerImageUrl;\n\n if (isUrlAbsolute(origImgUrl)) {\n // do our best to make this a server relative url by removing the x.sharepoint.com part\n origImgUrl = origImgUrl.replace(/^https?:\\/\\/[a-z0-9\\.]*?\\.[a-z]{2,3}\\//i, \"/\");\n }\n\n const site = new Site(extractWebUrl(this.toUrl()));\n const web = new Web(extractWebUrl(this.toUrl()));\n const imgFile = web.getFileByServerRelativePath(origImgUrl);\n\n let siteId = \"\";\n let webId = \"\";\n let imgId = \"\";\n let listId = \"\";\n let webUrl = \"\";\n\n Promise.all([\n site.select(\"Id\", \"Url\").get().then(r => siteId = r.Id),\n web.select(\"Id\", \"Url\").get().then(r => { webId = r.Id; webUrl = r.Url; }),\n imgFile.listItemAllFields.select(\"UniqueId\", \"ParentList/Id\").expand(\"ParentList\").get().then(r => { imgId = r.UniqueId; listId = r.ParentList.Id; }),\n ]).then(() => {\n\n const f = new SharePointQueryable(webUrl, \"_layouts/15/getpreview.ashx\");\n f.query.set(\"guidSite\", `${siteId}`);\n f.query.set(\"guidWeb\", `${webId}`);\n f.query.set(\"guidFile\", `${imgId}`);\n this.bannerImageUrl = f.toUrlAndQuery();\n\n if (!objectDefinedNotNull(this._layoutPart.serverProcessedContent)) {\n this._layoutPart.serverProcessedContent = {};\n }\n\n this._layoutPart.serverProcessedContent.imageSources = { imageSource: origImgUrl };\n\n if (!objectDefinedNotNull(this._layoutPart.serverProcessedContent.customMetadata)) {\n this._layoutPart.serverProcessedContent.customMetadata = {};\n }\n\n this._layoutPart.serverProcessedContent.customMetadata.imageSource = {\n listId,\n siteId,\n uniqueId: imgId,\n webId,\n };\n this._layoutPart.properties.webId = webId;\n this._layoutPart.properties.siteId = siteId;\n this._layoutPart.properties.listId = listId;\n this._layoutPart.properties.uniqueId = imgId;\n resolve();\n }).catch(reject);\n }));\n }\n\n // we need to update our authors if they have changed\n // if (this._layoutPart.properties.authors === null && this._layoutPart.properties.authorByline.length > 0) {\n\n // promise = promise.then(_ => new Promise(resolve => {\n\n // const collector: any[] = [];\n // const userResolver = ClientSidePage.getPoster(\"/_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.ClientPeoplePickerResolveUser\");\n\n // this._layoutPart.properties.authorByline.forEach(async author => {\n // const userData = await userResolver.postCore({\n // body: jsS({\n // queryParams: {\n // AllowEmailAddresses: false,\n // MaximumEntitySuggestions: 1,\n // PrincipalSource: 15,\n // PrincipalType: 1,\n // QueryString: author,\n // SharePointGroupID: 0,\n // },\n // }),\n // });\n\n // collector.push({\n // email: userData.EntityData.Email,\n // id: userData.Key,\n // name: userData.DisplayName,\n // role: \"\",\n // upn: userData.EntityData.Email,\n // });\n // });\n\n // this._layoutPart.properties.authors = collector;\n\n // resolve();\n // }));\n // }\n\n // we try and check out the page for the user\n if (!this.json.IsPageCheckedOutToCurrentUser) {\n promise = promise.then(_ => (ClientSidePage.initFrom(this, `_api/sitepages/pages(${this.json.Id})/checkoutpage`)).postCore());\n }\n\n promise = promise.then(_ => {\n\n const saveBody = Object.assign(metadata(\"SP.Publishing.SitePage\"), {\n AuthorByline: this.json.AuthorByline || [],\n BannerImageUrl: this.bannerImageUrl,\n CanvasContent1: this.getCanvasContent1(),\n LayoutWebpartsContent: this.getLayoutWebpartsContent(),\n Title: this.title,\n TopicHeader: this.topicHeader,\n });\n\n const updater = ClientSidePage.initFrom(this, `_api/sitepages/pages(${this.json.Id})/savepage`);\n updater.configure({\n headers: {\n \"if-match\": \"*\",\n },\n });\n return updater.postCore({ body: jsS(saveBody) });\n });\n\n if (publish) {\n promise = promise.then(_ => (ClientSidePage.initFrom(this, `_api/sitepages/pages(${this.json.Id})/publish`)).postCore()).then(r => {\n if (r) {\n this.json.IsPageCheckedOutToCurrentUser = false;\n }\n });\n }\n\n promise = promise.then(_ => {\n // these are post-save actions\n this._bannerImageDirty = false;\n });\n\n return promise;\n }\n\n public async discardPageCheckout(): Promise {\n\n if (this.json.Id === null) {\n throw Error(\"The id for this page is null. If you want to create a new page, please use ClientSidePage.Create\");\n }\n\n const d = await ClientSidePage.initFrom(this, `_api/sitepages/pages(${this.json.Id})/discardPage`).postCore({\n body: jsS(metadata(\"SP.Publishing.SitePage\")),\n });\n\n this.fromJSON(d);\n }\n\n public async promoteToNews(): Promise {\n return this.promoteNewsImpl(\"promoteToNews\");\n }\n\n // API is currently broken on server side\n // public async demoteFromNews(): Promise {\n // return this.promoteNewsImpl(\"demoteFromNews\");\n // }\n\n /**\n * Enables comments on this page\n */\n public enableComments(): Promise {\n return this.setCommentsOn(true).then(r => {\n this.commentsDisabled = false;\n return r;\n });\n }\n\n /**\n * Disables comments on this page\n */\n public disableComments(): Promise {\n return this.setCommentsOn(false).then(r => {\n this.commentsDisabled = true;\n return r;\n });\n }\n\n /**\n * Finds a control by the specified instance id\n *\n * @param id Instance id of the control to find\n */\n public findControlById = ColumnControl>(id: string): T {\n return this.findControl((c) => c.id === id);\n }\n\n /**\n * Finds a control within this page's control tree using the supplied predicate\n *\n * @param predicate Takes a control and returns true or false, if true that control is returned by findControl\n */\n public findControl = ColumnControl>(predicate: (c: ColumnControl) => boolean): T {\n // check all sections\n for (let i = 0; i < this.sections.length; i++) {\n // check all columns\n for (let j = 0; j < this.sections[i].columns.length; j++) {\n // check all controls\n for (let k = 0; k < this.sections[i].columns[j].controls.length; k++) {\n // check to see if the predicate likes this control\n if (predicate(this.sections[i].columns[j].controls[k])) {\n return this.sections[i].columns[j].controls[k];\n }\n }\n }\n }\n\n // we found nothing so give nothing back\n return null;\n }\n\n /**\n * Like the modern site page\n */\n public like(): Promise {\n return this.getItem().then(i => {\n return i.like();\n });\n }\n\n /**\n * Unlike the modern site page\n */\n public unlike(): Promise {\n return this.getItem().then(i => {\n return i.unlike();\n });\n }\n\n /**\n * Get the liked by information for a modern site page \n */\n public getLikedByInformation(): Promise {\n return this.getItem().then(i => {\n return i.getLikedByInformation();\n });\n }\n\n /**\n * Creates a copy of this page\n * \n * @param web The web where we will create the copy\n * @param pageName The file name of the new page\n * @param title The title of the new page\n * @param publish If true the page will be published\n */\n public async copyPage(web: Web | List, pageName: string, title: string, publish = true): Promise {\n\n const page = await ClientSidePage.create(web, pageName, title, this.pageLayout);\n\n page.setControls(this.getControls());\n\n await page.save(publish);\n\n return page;\n }\n\n /**\n * Sets the modern page banner image\n * \n * @param url Url of the image to display\n * @param altText Alt text to describe the image\n * @param bannerProps Additional properties to control display of the banner\n */\n public setBannerImage(url: string, props?: {\n altText?: string;\n imageSourceType?: number;\n translateX?: number;\n translateY?: number;\n }): void {\n\n this.bannerImageUrl = url;\n this.bannerImageSourceType = 2; // this seems to always be true, so default?\n\n if (objectDefinedNotNull(props)) {\n if (hOP(props, \"translateX\")) {\n this._layoutPart.properties.translateX = props.translateX;\n }\n if (hOP(props, \"translateY\")) {\n this._layoutPart.properties.translateY = props.translateY;\n }\n if (hOP(props, \"imageSourceType\")) {\n this.bannerImageSourceType = props.imageSourceType;\n }\n if (hOP(props, \"altText\")) {\n this._layoutPart.properties.altText = props.altText;\n }\n }\n }\n\n protected getCanvasContent1(): string {\n return JSON.stringify(this.getControls());\n }\n\n protected getLayoutWebpartsContent(): string {\n if (this._layoutPart) {\n return JSON.stringify([this._layoutPart]);\n } else {\n return JSON.stringify(null);\n }\n }\n\n protected setControls(controls: IClientSideControlBaseData[]): void {\n\n if (controls && controls.length) {\n\n for (let i = 0; i < controls.length; i++) {\n\n // if no control type is present this is a column which we give type 0 to let us process it\n const controlType = hOP(controls[i], \"controlType\") ? controls[i].controlType : 0;\n\n switch (controlType) {\n\n case 0:\n // empty canvas column or page settings\n if (hOP(controls[i], \"pageSettingsSlice\")) {\n this._pageSettings = controls[i];\n } else {\n // we have an empty column\n this.mergeColumnToTree(new CanvasColumn(controls[i]));\n }\n break;\n case 3:\n const part = new ClientSideWebpart(controls[i]);\n this.mergePartToTree(part, part.data.position);\n break;\n case 4:\n const textData = controls[i];\n const text = new ClientSideText(textData.innerHTML, textData);\n this.mergePartToTree(text, text.data.position);\n break;\n }\n }\n\n reindex(this.sections);\n }\n }\n\n protected getControls(): IClientSideControlBaseData[] {\n\n // reindex things\n reindex(this.sections);\n\n // rollup the control changes\n const canvasData: any[] = [];\n\n this.sections.forEach(section => {\n section.columns.forEach(column => {\n if (column.controls.length < 1) {\n // empty column\n canvasData.push({\n displayMode: column.data.displayMode,\n emphasis: this.getEmphasisObj(section.emphasis),\n position: column.data.position,\n });\n } else {\n column.controls.forEach(control => {\n control.data.emphasis = this.getEmphasisObj(section.emphasis);\n canvasData.push(control.data);\n });\n }\n });\n });\n\n canvasData.push(this._pageSettings);\n\n return canvasData;\n }\n\n private getEmphasisObj(value: 0 | 1 | 2 | 3): IClientControlEmphasis {\n if (value < 1 || value > 3) {\n return {};\n }\n\n return { zoneEmphasis: value };\n }\n\n /**\n * Sets the comments flag for a page\n * \n * @param on If true comments are enabled, false they are disabled\n */\n private setCommentsOn(on: boolean): Promise {\n return this.getItem().then(i => {\n const updater = new Item(i, `SetCommentsDisabled(${!on})`);\n return updater.update({});\n });\n }\n\n private async promoteNewsImpl(method: string): Promise {\n\n if (this.json.Id === null) {\n throw Error(\"The id for this page is null. If you want to create a new page, please use ClientSidePage.Create\");\n }\n\n const d = await ClientSidePage.initFrom(this, `_api/sitepages/pages(${this.json.Id})/${method}`).postCore({\n body: jsS(metadata(\"SP.Publishing.SitePage\")),\n });\n\n return d;\n }\n\n /**\n * Merges the control into the tree of sections and columns for this page\n * \n * @param control The control to merge\n */\n private mergePartToTree(control: any, positionData: IClientSideControlPositionData): void {\n\n let section: CanvasSection = null;\n let column: CanvasColumn = null;\n let sectionFactor: CanvasColumnFactor = 12;\n let sectionIndex = 0;\n let zoneIndex = 0;\n\n // handle case where we don't have position data (shouldn't happen?)\n if (positionData) {\n if (hOP(positionData, \"zoneIndex\")) {\n zoneIndex = positionData.zoneIndex;\n }\n if (hOP(positionData, \"sectionIndex\")) {\n sectionIndex = positionData.sectionIndex;\n }\n if (hOP(positionData, \"sectionFactor\")) {\n sectionFactor = positionData.sectionFactor;\n }\n }\n\n const sections = this.sections.filter(s => s.order === zoneIndex);\n if (sections.length < 1) {\n section = new CanvasSection(this, zoneIndex);\n this.sections.push(section);\n } else {\n section = sections[0];\n }\n\n section.emphasis = control.data.emphasis && control.data.emphasis.zoneEmphasis ? control.data.emphasis.zoneEmphasis : 0;\n\n const columns = section.columns.filter(c => c.order === sectionIndex);\n if (columns.length < 1) {\n column = section.addColumn(sectionFactor);\n } else {\n column = columns[0];\n }\n\n control.column = column;\n column.addControl(control);\n }\n\n /**\n * Merges the supplied column into the tree\n * \n * @param column Column to merge\n * @param position The position data for the column\n */\n private mergeColumnToTree(column: CanvasColumn): void {\n\n const order = hOP(column.data, \"position\") && hOP(column.data.position, \"zoneIndex\") ? column.data.position.zoneIndex : 0;\n let section: CanvasSection = null;\n const sections = this.sections.filter(s => s.order === order);\n\n if (sections.length < 1) {\n section = new CanvasSection(this, order);\n section.emphasis = column.data.emphasis.zoneEmphasis || 0;\n this.sections.push(section);\n } else {\n section = sections[0];\n }\n\n column.section = section;\n section.columns.push(column);\n }\n\n private getItem(...selects: string[]): Promise {\n\n const initer = ClientSidePage.initFrom(this, \"/_api/lists/EnsureClientRenderedSitePagesLibrary\").select(\"EnableModeration\", \"EnableMinorVersions\", \"Id\");\n return initer.postCore<{ Id: string, \"odata.id\": string }>().then(listData => {\n const item = (new List(listData[\"odata.id\"])).configureFrom(this).items.getById(this.json.Id);\n\n return item.select.apply(item, selects).get().then((d: T) => {\n return extend((new Item(odataUrlFrom(d))).configureFrom(this), d);\n });\n });\n }\n}\n\nexport class CanvasSection {\n\n /**\n * Used to track this object inside the collection at runtime\n */\n private _memId: string;\n\n private _order: number;\n\n constructor(protected page: ClientSidePage, order: number, public columns: CanvasColumn[] = [], private _emphasis: 0 | 1 | 2 | 3 = 0) {\n this._memId = getGUID();\n this._order = order;\n }\n\n public get order(): number {\n return this._order;\n }\n\n public set order(value: number) {\n this._order = value;\n for (let i = 0; i < this.columns.length; i++) {\n this.columns[i].data.position.zoneIndex = value;\n }\n }\n\n /**\n * Default column (this.columns[0]) for this section\n */\n public get defaultColumn(): CanvasColumn {\n\n if (this.columns.length < 1) {\n this.addColumn(12);\n }\n\n return this.columns[0];\n }\n\n /**\n * Adds a new column to this section\n */\n public addColumn(factor: CanvasColumnFactor): CanvasColumn {\n const column = new CanvasColumn();\n column.section = this;\n column.data.position.zoneIndex = this.order;\n column.data.position.sectionFactor = factor;\n column.order = getNextOrder(this.columns);\n this.columns.push(column);\n return column;\n }\n\n /**\n * Adds a control to the default column for this section\n *\n * @param control Control to add to the default column\n */\n public addControl(control: ColumnControl): this {\n this.defaultColumn.addControl(control);\n return this;\n }\n\n public get emphasis(): 0 | 1 | 2 | 3 {\n return this._emphasis;\n }\n\n public set emphasis(value: 0 | 1 | 2 | 3) {\n this._emphasis = value;\n }\n\n /**\n * Removes this section and all contained columns and controls from the collection\n */\n public remove(): void {\n this.page.sections = this.page.sections.filter(section => section._memId !== this._memId);\n reindex(this.page.sections);\n }\n}\n\nexport class CanvasColumn {\n\n public static Default: IClientSidePageColumnData = {\n controlType: 0,\n displayMode: 2,\n emphasis: {},\n position: {\n layoutIndex: 1,\n sectionFactor: 12,\n sectionIndex: 1,\n zoneIndex: 1,\n },\n };\n\n private _section: CanvasSection | null;\n private _memId: string;\n\n constructor(protected json: IClientSidePageColumnData = JSON.parse(JSON.stringify(CanvasColumn.Default)), public controls: ColumnControl[] = []) {\n this._section = null;\n this._memId = getGUID();\n }\n\n public get data(): IClientSidePageColumnData {\n return this.json;\n }\n\n public get section(): CanvasSection {\n return this._section;\n }\n\n public set section(section: CanvasSection) {\n this._section = section;\n }\n\n public get order(): number {\n return this.data.position.sectionIndex;\n }\n\n public set order(value: number) {\n this.data.position.sectionIndex = value;\n for (let i = 0; i < this.controls.length; i++) {\n this.controls[i].data.position.zoneIndex = this.data.position.zoneIndex;\n this.controls[i].data.position.sectionIndex = value;\n }\n }\n\n public get factor(): CanvasColumnFactor {\n return this.data.position.sectionFactor;\n }\n\n public set factor(value: CanvasColumnFactor) {\n this.data.position.sectionFactor = value;\n }\n\n public addControl(control: ColumnControl): this {\n control.column = this;\n this.controls.push(control);\n return this;\n }\n\n public getControl>(index: number): T {\n return this.controls[index];\n }\n\n public remove(): void {\n this.section.columns = this.section.columns.filter(column => column._memId !== this._memId);\n reindex(this.section.columns);\n }\n}\n\nexport abstract class ColumnControl {\n\n private _column: CanvasColumn | null;\n\n constructor(protected json: T) { }\n\n public abstract get order(): number;\n public abstract set order(value: number);\n\n public get id(): string {\n return this.json.id;\n }\n\n public get data(): T {\n return this.json;\n }\n\n public get column(): CanvasColumn | null {\n return this._column;\n }\n\n public set column(value: CanvasColumn) {\n this._column = value;\n this.onColumnChange(this._column);\n }\n\n public remove(): void {\n this.column.controls = this.column.controls.filter(control => control.id !== this.id);\n reindex(this.column.controls);\n }\n\n protected setData(data: T) {\n this.json = data;\n }\n\n protected abstract onColumnChange(col: CanvasColumn): void;\n}\n\nexport class ClientSideText extends ColumnControl {\n\n public static Default: IClientSideTextData = {\n addedFromPersistedData: false,\n anchorComponentId: \"\",\n controlType: 4,\n displayMode: 2,\n editorType: \"CKEditor\",\n emphasis: {},\n id: \"\",\n innerHTML: \"\",\n position: {\n controlIndex: 1,\n layoutIndex: 1,\n sectionFactor: 12,\n sectionIndex: 1,\n zoneIndex: 1,\n },\n };\n\n constructor(text: string, json: IClientSideTextData = JSON.parse(JSON.stringify(ClientSideText.Default))) {\n if (stringIsNullOrEmpty(json.id)) {\n json.id = getGUID();\n json.anchorComponentId = json.id;\n }\n super(json);\n\n this.text = text;\n }\n\n public get text(): string {\n return this.data.innerHTML;\n }\n\n public set text(value: string) {\n if (!value.startsWith(\"

\")) {\n value = `

${value}

`;\n }\n this.data.innerHTML = value;\n }\n\n public get order(): number {\n return this.data.position.controlIndex;\n }\n\n public set order(value: number) {\n this.data.position.controlIndex = value;\n }\n\n protected onColumnChange(col: CanvasColumn): void {\n this.data.position.sectionFactor = col.factor;\n this.data.position.controlIndex = getNextOrder(col.controls);\n this.data.position.zoneIndex = col.data.position.zoneIndex;\n this.data.position.sectionIndex = col.order;\n }\n}\n\nexport class ClientSideWebpart extends ColumnControl {\n\n public static Default: IClientSideWebPartData = {\n addedFromPersistedData: false,\n controlType: 3,\n displayMode: 2,\n emphasis: {},\n id: null,\n position: {\n controlIndex: 1,\n sectionFactor: 12,\n sectionIndex: 1,\n zoneIndex: 1,\n },\n reservedHeight: 500,\n reservedWidth: 500,\n webPartData: null,\n webPartId: null,\n };\n\n constructor(json: IClientSideWebPartData = JSON.parse(JSON.stringify(ClientSideWebpart.Default))) {\n super(json);\n }\n\n public static fromComponentDef(definition: ClientSidePageComponent): ClientSideWebpart {\n const part = new ClientSideWebpart();\n part.import(definition);\n return part;\n }\n\n public get title(): string {\n return this.data.webPartData.title;\n }\n\n public set title(value: string) {\n this.data.webPartData.title = value;\n }\n\n public get description(): string {\n return this.data.webPartData.description;\n }\n\n public set description(value: string) {\n this.data.webPartData.description = value;\n }\n\n public get order(): number {\n return this.data.position.controlIndex;\n }\n\n public set order(value: number) {\n this.data.position.controlIndex = value;\n }\n\n public get height(): number {\n return this.data.reservedHeight;\n }\n\n public set height(value: number) {\n this.data.reservedHeight = value;\n }\n\n public get width(): number {\n return this.data.reservedWidth;\n }\n\n public set width(value: number) {\n this.data.reservedWidth = value;\n }\n\n public get dataVersion(): string {\n return this.data.webPartData.dataVersion;\n }\n\n public set dataVersion(value: string) {\n this.data.webPartData.dataVersion = value;\n }\n\n public setProperties(properties: T): this {\n this.data.webPartData.properties = extend(this.data.webPartData.properties, properties);\n return this;\n }\n\n public getProperties(): T {\n return this.data.webPartData.properties;\n }\n\n protected onColumnChange(col: CanvasColumn): void {\n this.data.position = {\n controlIndex: getNextOrder(col.controls),\n sectionFactor: col.factor,\n sectionIndex: col.data.position.sectionIndex,\n zoneIndex: col.data.position.zoneIndex,\n };\n }\n\n protected import(component: ClientSidePageComponent): void {\n\n const id = getGUID();\n const componendId = component.Id.replace(/^\\{|\\}$/g, \"\").toLowerCase();\n const manifest: IClientSidePageComponentManifest = JSON.parse(component.Manifest);\n const preconfiguredEntries = manifest.preconfiguredEntries[0];\n\n this.setData(Object.assign({}, this.data, {\n id,\n webPartData: {\n dataVersion: \"1.0\",\n description: preconfiguredEntries.description.default,\n id: componendId,\n instanceId: id,\n properties: preconfiguredEntries.properties,\n title: preconfiguredEntries.title.default,\n },\n webPartId: componendId,\n }));\n }\n}\n\nexport interface IPageData {\n readonly \"odata.metadata\": string;\n readonly \"odata.type\": \"SP.Publishing.SitePage\";\n readonly \"odata.id\": string;\n readonly \"odata.editLink\": string;\n AbsoluteUrl: string;\n AuthorByline: string[] | null;\n BannerImageUrl: string;\n ContentTypeId: null | string;\n Description: string;\n DoesUserHaveEditPermission: boolean;\n FileName: string;\n readonly FirstPublished: string;\n readonly Id: number;\n IsPageCheckedOutToCurrentUser: boolean;\n IsWebWelcomePage: boolean;\n readonly Modified: string;\n PageLayoutType: ClientSidePageLayoutType;\n Path: {\n DecodedUrl: string;\n };\n PromotedState: number;\n Title: string;\n TopicHeader: null | string;\n readonly UniqueId: string;\n Url: string;\n readonly Version: string;\n readonly VersionInfo: {\n readonly LastVersionCreated: string;\n readonly LastVersionCreatedBy: string;\n };\n AlternativeUrlMap: string;\n CanvasContent1: string;\n LayoutWebpartsContent: string;\n}\n\n/**\n * Client side webpart object (retrieved via the _api/web/GetClientSideWebParts REST call)\n */\nexport interface ClientSidePageComponent {\n /**\n * Component type for client side webpart object\n */\n ComponentType: number;\n /**\n * Id for client side webpart object\n */\n Id: string;\n /**\n * Manifest for client side webpart object\n */\n Manifest: string;\n /**\n * Manifest type for client side webpart object\n */\n ManifestType: number;\n /**\n * Name for client side webpart object\n */\n Name: string;\n /**\n * Status for client side webpart object\n */\n Status: number;\n}\n\ninterface IClientSidePageComponentManifest {\n alias: string;\n componentType: \"WebPart\" | \"\" | null;\n disabledOnClassicSharepoint: boolean;\n hiddenFromToolbox: boolean;\n id: string;\n imageLinkPropertyNames: any;\n isInternal: boolean;\n linkPropertyNames: boolean;\n loaderConfig: any;\n manifestVersion: number;\n preconfiguredEntries: {\n description: { default: string };\n group: { default: string };\n groupId: string;\n iconImageUrl: string;\n officeFabricIconFontName: string;\n properties: TypedHash;\n title: { default: string };\n\n }[];\n preloadComponents: any | null;\n requiredCapabilities: any | null;\n searchablePropertyNames: any | null;\n supportsFullBleed: boolean;\n version: string;\n}\n\nexport interface IClientSideControlBaseData {\n controlType: number;\n}\n\nexport interface ICanvasControlBaseData extends IClientSideControlBaseData {\n id: string;\n emphasis: IClientControlEmphasis;\n displayMode: number;\n}\n\nexport interface IClientSidePageSettingsSlice extends IClientSideControlBaseData {\n pageSettingsSlice: {\n \"isDefaultDescription\": boolean;\n \"isDefaultThumbnail\": boolean;\n };\n}\n\nexport interface IClientSidePageColumnData extends IClientSideControlBaseData {\n controlType: 0;\n displayMode: number;\n emphasis: IClientControlEmphasis;\n position: {\n zoneIndex: number;\n sectionIndex: number;\n sectionFactor: CanvasColumnFactor;\n layoutIndex: number;\n };\n}\n\ninterface IClientSideControlPositionData {\n zoneIndex: number;\n sectionIndex: number;\n controlIndex: number;\n sectionFactor?: CanvasColumnFactor;\n}\n\nexport interface IClientSideTextData extends ICanvasControlBaseData {\n controlType: 4;\n position: {\n zoneIndex: number;\n sectionIndex: number;\n controlIndex: number;\n sectionFactor?: CanvasColumnFactor;\n layoutIndex: number;\n };\n anchorComponentId: string;\n editorType: \"CKEditor\";\n addedFromPersistedData: boolean;\n innerHTML: string;\n}\n\nexport interface IClientSideWebPartData extends ICanvasControlBaseData {\n controlType: 3;\n position: {\n zoneIndex: number;\n sectionIndex: number;\n controlIndex: number;\n sectionFactor?: CanvasColumnFactor;\n };\n webPartId: string;\n reservedHeight: number;\n reservedWidth: number;\n addedFromPersistedData: boolean;\n webPartData: {\n id: string;\n instanceId: string;\n title: string;\n description: string;\n serverProcessedContent?: {\n \"htmlStrings\": TypedHash;\n \"searchablePlainTexts\": TypedHash;\n \"imageSources\": TypedHash;\n \"links\": TypedHash;\n };\n dataVersion: string;\n properties: PropertiesType;\n };\n}\n\nexport interface IClientControlEmphasis {\n zoneEmphasis?: 0 | 1 | 2 | 3;\n}\n\nexport module ClientSideWebpartPropertyTypes {\n\n /**\n * Propereties for Embed (component id: 490d7c76-1824-45b2-9de3-676421c997fa)\n */\n export interface Embed {\n embedCode: string;\n cachedEmbedCode?: string;\n shouldScaleWidth?: boolean;\n tempState?: any;\n }\n\n /**\n * Properties for Bing Map (component id: e377ea37-9047-43b9-8cdb-a761be2f8e09)\n */\n export interface BingMap {\n center: {\n altitude?: number;\n altitudeReference?: number;\n latitude: number;\n longitude: number;\n };\n mapType: \"aerial\" | \"birdseye\" | \"road\" | \"streetside\";\n maxNumberOfPushPins?: number;\n pushPins?: {\n location: {\n latitude: number;\n longitude: number;\n altitude?: number;\n altitudeReference?: number;\n };\n address?: string;\n defaultAddress?: string;\n defaultTitle?: string;\n title?: string;\n }[];\n shouldShowPushPinTitle?: boolean;\n zoomLevel?: number;\n }\n}\n\nexport type LayoutType = \"FullWidthImage\" | \"NoImage\" | \"ColorBlock\" | \"CutInShape\";\nexport type TextAlignment = \"Left\" | \"Center\";\n\ninterface ILayoutPartsContent {\n id: string;\n instanceId: string;\n title: string;\n description: string;\n serverProcessedContent: {\n htmlStrings: TypedHash;\n searchablePlainTexts: TypedHash;\n imageSources: TypedHash;\n links: TypedHash;\n customMetadata?: {\n imageSource?: {\n siteId: string;\n webId: string;\n listId: string;\n uniqueId: string;\n },\n }\n };\n dataVersion: string;\n properties: {\n title: string;\n imageSourceType?: number;\n layoutType: LayoutType;\n textAlignment: TextAlignment;\n showTopicHeader: boolean;\n showPublishDate: boolean;\n topicHeader: string;\n authors: {\n id: string,\n email: string;\n upn: string;\n name: string;\n role: string;\n }[];\n webId?: string;\n siteId?: string;\n listId?: string;\n uniqueId?: string;\n translateX?: number;\n translateY?: number;\n altText?: string;\n };\n}\n","import { SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { extend, jsS, hOP, getHashCode, objectDefinedNotNull, isArray } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\nimport { CachingOptions } from \"@pnp/odata\";\n\nexport interface ISearchQueryBuilder {\n query: any;\n readonly bypassResultTypes: this;\n readonly enableStemming: this;\n readonly enableInterleaving: this;\n readonly enableFql: this;\n readonly enableNicknames: this;\n readonly enablePhonetic: this;\n readonly trimDuplicates: this;\n readonly processBestBets: this;\n readonly enableQueryRules: this;\n readonly enableSorting: this;\n readonly generateBlockRankLog: this;\n readonly processPersonalFavorites: this;\n readonly enableOrderingHitHighlightedProperty: this;\n\n culture(culture: number): this;\n rowLimit(n: number): this;\n startRow(n: number): this;\n sourceId(id: string): this;\n text(queryText: string): this;\n template(template: string): this;\n trimDuplicatesIncludeId(n: number): this;\n rankingModelId(id: string): this;\n rowsPerPage(n: number): this;\n selectProperties(...properties: string[]): this;\n timeZoneId(id: number): this;\n refinementFilters(...filters: string[]): this;\n refiners(refiners: string): this;\n hiddenConstraints(constraints: string): this;\n sortList(...sorts: Sort[]): this;\n timeout(milliseconds: number): this;\n hithighlightedProperties(...properties: string[]): this;\n clientType(clientType: string): this;\n personalizationData(data: string): this;\n resultsURL(url: string): this;\n queryTag(tags: string): this;\n properties(...properties: SearchProperty[]): this;\n queryTemplatePropertiesUrl(url: string): this;\n reorderingRules(...rules: ReorderingRule[]): this;\n hitHighlightedMultivaluePropertyLimit(limit: number): this;\n collapseSpecification(spec: string): this;\n uiLanguage(lang: number): this;\n desiredSnippetLength(len: number): this;\n maxSnippetLength(len: number): this;\n summaryLength(len: number): this;\n\n /* included method */\n toSearchQuery(): SearchQuery;\n}\n\nconst funcs = new Map([\n [\"text\", \"Querytext\"],\n [\"template\", \"QueryTemplate\"],\n [\"sourceId\", \"SourceId\"],\n [\"trimDuplicatesIncludeId\", \"\"],\n [\"startRow\", \"\"],\n [\"rowLimit\", \"\"],\n [\"rankingModelId\", \"\"],\n [\"rowsPerPage\", \"\"],\n [\"selectProperties\", \"\"],\n [\"culture\", \"\"],\n [\"timeZoneId\", \"\"],\n [\"refinementFilters\", \"\"],\n [\"refiners\", \"\"],\n [\"hiddenConstraints\", \"\"],\n [\"sortList\", \"\"],\n [\"timeout\", \"\"],\n [\"hithighlightedProperties\", \"\"],\n [\"clientType\", \"\"],\n [\"personalizationData\", \"\"],\n [\"resultsURL\", \"\"],\n [\"queryTag\", \"\"],\n [\"properties\", \"\"],\n [\"queryTemplatePropertiesUrl\", \"\"],\n [\"reorderingRules\", \"\"],\n [\"hitHighlightedMultivaluePropertyLimit\", \"\"],\n [\"collapseSpecification\", \"\"],\n [\"uiLanguage\", \"\"],\n [\"desiredSnippetLength\", \"\"],\n [\"maxSnippetLength\", \"\"],\n [\"summaryLength\", \"\"],\n]);\n\nconst props = new Map([]);\n\nfunction toPropCase(str: string) {\n return str.replace(/^(.)/, ($1) => $1.toUpperCase());\n}\n\n/**\n * Creates a new instance of the SearchQueryBuilder\n * \n * @param queryText Initial query text\n * @param _query Any initial query configuration\n */\nexport function SearchQueryBuilder(queryText = \"\", _query = {}): ISearchQueryBuilder {\n\n return new Proxy({\n query: Object.assign({\n Querytext: queryText,\n }, _query),\n },\n {\n get(self, propertyKey, proxy) {\n\n const pk = propertyKey.toString();\n\n if (pk === \"toSearchQuery\") {\n return () => self.query;\n }\n\n if (funcs.has(pk)) {\n return (...value: any[]) => {\n const mappedPk = funcs.get(pk);\n self.query[mappedPk.length > 0 ? mappedPk : toPropCase(pk)] = value.length > 1 ? value : value[0];\n return proxy;\n };\n }\n const propKey = props.has(pk) ? props.get(pk) : toPropCase(pk);\n self.query[propKey] = true;\n return proxy;\n },\n });\n}\n\nexport type SearchQueryInit = string | SearchQuery | ISearchQueryBuilder;\n\n/**\n * Describes the search API\n *\n */\n@defaultPath(\"_api/search/postquery\")\nexport class Search extends SharePointQueryableInstance {\n\n /**\n * @returns Promise\n */\n public execute(queryInit: SearchQueryInit): Promise {\n\n const query = this.parseQuery(queryInit);\n\n const postBody = jsS({\n request: extend(\n metadata(\"Microsoft.Office.Server.Search.REST.SearchRequest\"),\n Object.assign(\n {},\n query,\n {\n HitHighlightedProperties: this.fixArrProp(query.HitHighlightedProperties),\n Properties: this.fixArrProp(query.Properties),\n RefinementFilters: this.fixArrProp(query.RefinementFilters),\n ReorderingRules: this.fixArrProp(query.ReorderingRules),\n SelectProperties: this.fixArrProp(query.SelectProperties),\n SortList: this.fixArrProp(query.SortList),\n })),\n });\n\n // if we are using caching with this search request, then we need to handle some work upfront to enable that\n if (this._useCaching) {\n\n // force use of the cache for this request if .usingCaching was called\n this._forceCaching = true;\n\n // because all the requests use the same url they would collide in the cache we use a special key\n const cacheKey = `PnPjs.SearchWithCaching(${getHashCode(postBody)})`;\n\n if (objectDefinedNotNull(this._cachingOptions)) {\n // if our key ends in the postquery url we overwrite it\n if (/\\/_api\\/search\\/postquery$/i.test(this._cachingOptions.key)) {\n this._cachingOptions.key = cacheKey;\n }\n } else {\n this._cachingOptions = new CachingOptions(cacheKey);\n }\n }\n\n return this.postCore({ body: postBody }).then((data) => new SearchResults(data, this.toUrl(), query));\n }\n\n /**\n * Fix array property\n *\n * @param prop property to fix for container struct\n */\n private fixArrProp(prop: any): { results: any[] } {\n if (typeof prop === \"undefined\") {\n return ({ results: [] });\n }\n prop = isArray(prop) ? prop : [prop];\n return hOP(prop, \"results\") ? prop : { results: prop };\n }\n\n /**\n * Translates one of the query initializers into a SearchQuery instance\n * \n * @param query \n */\n private parseQuery(query: SearchQueryInit): SearchQuery {\n\n let finalQuery: SearchQuery;\n\n if (typeof query === \"string\") {\n finalQuery = { Querytext: query };\n } else if ((query as ISearchQueryBuilder).toSearchQuery) {\n finalQuery = (query as ISearchQueryBuilder).toSearchQuery();\n } else {\n finalQuery = query;\n }\n\n return finalQuery;\n }\n}\n\n/**\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\n */\nexport class SearchResults {\n\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n constructor(rawResponse: any,\n private _url: string,\n private _query: SearchQuery,\n private _raw: SearchResponse = null,\n private _primary: SearchResult[] = null) {\n\n this._raw = rawResponse.postquery ? rawResponse.postquery : rawResponse;\n }\n\n public get ElapsedTime(): number {\n return this.RawSearchResults.ElapsedTime;\n }\n\n public get RowCount(): number {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount;\n }\n\n public get TotalRows(): number {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows;\n }\n\n public get TotalRowsIncludingDuplicates(): number {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\n }\n\n public get RawSearchResults(): SearchResponse {\n return this._raw;\n }\n\n public get PrimarySearchResults(): SearchResult[] {\n if (this._primary === null) {\n this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows);\n }\n return this._primary;\n }\n\n /**\n * Gets a page of results\n *\n * @param pageNumber Index of the page to return. Used to determine StartRow\n * @param pageSize Optional, items per page (default = 10)\n */\n public getPage(pageNumber: number, pageSize?: number): Promise {\n\n // if we got all the available rows we don't have another page\n if (this.TotalRows < this.RowCount) {\n return Promise.resolve(null);\n }\n\n // if pageSize is supplied, then we use that regardless of any previous values\n // otherwise get the previous RowLimit or default to 10\n const rows = pageSize !== undefined ? pageSize : hOP(this._query, \"RowLimit\") ? this._query.RowLimit : 10;\n\n const query: SearchQuery = extend(this._query, {\n RowLimit: rows,\n StartRow: rows * (pageNumber - 1),\n });\n\n // we have reached the end\n if (query.StartRow > this.TotalRows) {\n return Promise.resolve(null);\n }\n\n const search = new Search(this._url, null);\n return search.execute(query);\n }\n\n /**\n * Formats a search results array\n *\n * @param rawResults The array to process\n */\n protected formatSearchResults(rawResults: any): SearchResult[] {\n\n const results = new Array();\n const tempResults = rawResults.results ? rawResults.results : rawResults;\n\n for (const tempResult of tempResults) {\n\n const cells: { Key: string, Value: any }[] = tempResult.Cells.results ? tempResult.Cells.results : tempResult.Cells;\n\n results.push(cells.reduce((res, cell) => {\n\n Object.defineProperty(res, cell.Key,\n {\n configurable: false,\n enumerable: true,\n value: cell.Value,\n writable: false,\n });\n\n return res;\n\n }, {}));\n }\n\n return results;\n }\n}\n\n/**\n * Describes the SearchQuery interface\n */\nexport interface SearchQuery {\n\n /**\n * A string that contains the text for the search query.\n */\n Querytext?: string;\n\n /**\n * A string that contains the text that replaces the query text, as part of a query transform.\n */\n QueryTemplate?: string;\n\n /**\n * A Boolean value that specifies whether the result tables that are returned for\n * the result block are mixed with the result tables that are returned for the original query.\n */\n EnableInterleaving?: boolean;\n\n /**\n * A Boolean value that specifies whether stemming is enabled.\n */\n EnableStemming?: boolean;\n\n /**\n * A Boolean value that specifies whether duplicate items are removed from the results.\n */\n TrimDuplicates?: boolean;\n\n /**\n * A Boolean value that specifies whether the exact terms in the search query are used to find matches, or if nicknames are used also.\n */\n EnableNicknames?: boolean;\n\n /**\n * A Boolean value that specifies whether the query uses the FAST Query Language (FQL).\n */\n EnableFQL?: boolean;\n\n /**\n * A Boolean value that specifies whether the phonetic forms of the query terms are used to find matches.\n */\n EnablePhonetic?: boolean;\n\n /**\n * A Boolean value that specifies whether to perform result type processing for the query.\n */\n BypassResultTypes?: boolean;\n\n /**\n * A Boolean value that specifies whether to return best bet results for the query.\n * This parameter is used only when EnableQueryRules is set to true, otherwise it is ignored.\n */\n ProcessBestBets?: boolean;\n\n /**\n * A Boolean value that specifies whether to enable query rules for the query.\n */\n EnableQueryRules?: boolean;\n\n /**\n * A Boolean value that specifies whether to sort search results.\n */\n EnableSorting?: boolean;\n\n /**\n * Specifies whether to return block rank log information in the BlockRankLog property of the interleaved result table.\n * A block rank log contains the textual information on the block score and the documents that were de-duplicated.\n */\n GenerateBlockRankLog?: boolean;\n\n /**\n * The result source ID to use for executing the search query.\n */\n SourceId?: string;\n\n /**\n * The ID of the ranking model to use for the query.\n */\n RankingModelId?: string;\n\n /**\n * The first row that is included in the search results that are returned.\n * You use this parameter when you want to implement paging for search results.\n */\n StartRow?: number;\n\n /**\n * The maximum number of rows overall that are returned in the search results.\n * Compared to RowsPerPage, RowLimit is the maximum number of rows returned overall.\n */\n RowLimit?: number;\n\n /**\n * The maximum number of rows to return per page.\n * Compared to RowLimit, RowsPerPage refers to the maximum number of rows to return per page,\n * and is used primarily when you want to implement paging for search results.\n */\n RowsPerPage?: number;\n\n /**\n * The managed properties to return in the search results.\n */\n SelectProperties?: string[];\n\n /**\n * The locale ID (LCID) for the query.\n */\n Culture?: number;\n\n /**\n * The set of refinement filters used when issuing a refinement query (FQL)\n */\n RefinementFilters?: string[];\n\n /**\n * The set of refiners to return in a search result.\n */\n Refiners?: string;\n\n /**\n * The additional query terms to append to the query.\n */\n HiddenConstraints?: string;\n\n /**\n * The list of properties by which the search results are ordered.\n */\n SortList?: Sort[];\n\n /**\n * The amount of time in milliseconds before the query request times out.\n */\n Timeout?: number;\n\n /**\n * The properties to highlight in the search result summary when the property value matches the search terms entered by the user.\n */\n HitHighlightedProperties?: string[];\n\n /**\n * The type of the client that issued the query.\n */\n ClientType?: string;\n\n /**\n * The GUID for the user who submitted the search query.\n */\n PersonalizationData?: string;\n\n /**\n * The URL for the search results page.\n */\n ResultsUrl?: string;\n\n /**\n * Custom tags that identify the query. You can specify multiple query tags\n */\n QueryTag?: string;\n\n /**\n * Properties to be used to configure the search query\n */\n Properties?: SearchProperty[];\n\n /**\n * A Boolean value that specifies whether to return personal favorites with the search results.\n */\n ProcessPersonalFavorites?: boolean;\n\n /**\n * The location of the queryparametertemplate.xml file. This file is used to enable anonymous users to make Search REST queries.\n */\n QueryTemplatePropertiesUrl?: string;\n\n /**\n * Special rules for reordering search results.\n * These rules can specify that documents matching certain conditions are ranked higher or lower in the results.\n * This property applies only when search results are sorted based on rank.\n */\n ReorderingRules?: ReorderingRule[];\n\n /**\n * The number of properties to show hit highlighting for in the search results.\n */\n HitHighlightedMultivaluePropertyLimit?: number;\n\n /**\n * A Boolean value that specifies whether the hit highlighted properties can be ordered.\n */\n EnableOrderingHitHighlightedProperty?: boolean;\n\n /**\n * The managed properties that are used to determine how to collapse individual search results.\n * Results are collapsed into one or a specified number of results if they match any of the individual collapse specifications.\n * In a collapse specification, results are collapsed if their properties match all individual properties in the collapse specification.\n */\n CollapseSpecification?: string;\n\n /**\n * The locale identifier (LCID) of the user interface\n */\n UIlanguage?: number;\n\n /**\n * The preferred number of characters to display in the hit-highlighted summary generated for a search result.\n */\n DesiredSnippetLength?: number;\n\n /**\n * The maximum number of characters to display in the hit-highlighted summary generated for a search result.\n */\n MaxSnippetLength?: number;\n\n /**\n * The number of characters to display in the result summary for a search result.\n */\n SummaryLength?: number;\n\n}\n\n/**\n * Provides hints at the properties which may be available on the result object\n */\nexport interface SearchResult {\n\n Rank?: number;\n DocId?: number;\n WorkId?: number;\n Title?: string;\n Author?: string;\n Size?: number;\n Path?: string;\n Description?: string;\n Write?: Date;\n LastModifiedTime?: Date;\n CollapsingStatus?: number;\n HitHighlightedSummary?: string;\n HitHighlightedProperties?: string;\n contentclass?: string;\n PictureThumbnailURL?: string;\n ServerRedirectedURL?: string;\n ServerRedirectedEmbedURL?: string;\n ServerRedirectedPreviewURL?: string;\n FileExtension?: string;\n ContentTypeId?: string;\n ParentLink?: string;\n ViewsLifetime?: number;\n ViewsRecent?: number;\n SectionNames?: string;\n SectionIndexes?: string;\n SiteLogo?: string;\n SiteDescription?: string;\n importance?: number;\n SiteName?: string;\n IsDocument?: boolean;\n FileType?: string;\n IsContainer?: boolean;\n WebTemplate?: string;\n SPWebUrl?: string;\n UniqueId?: string;\n ProgId?: string;\n OriginalPath?: string;\n RenderTemplateId?: string;\n PartitionId?: string;\n UrlZone?: number;\n Culture?: string;\n}\n\nexport interface SearchResponse {\n ElapsedTime: number;\n Properties?: { Key: string, Value: any, ValueType: string }[];\n PrimaryQueryResult?: ResultTableCollection;\n SecondaryQueryResults?: ResultTableCollection[];\n SpellingSuggestion?: string;\n TriggeredRules?: any[];\n}\n\nexport interface ResultTableCollection {\n\n QueryErrors?: Map;\n QueryId?: string;\n QueryRuleId?: string;\n CustomResults?: ResultTable;\n RefinementResults?: ResultTable;\n RelevantResults?: ResultTable;\n SpecialTermResults?: ResultTable;\n}\n\nexport interface IRefiner {\n Name: string;\n Entries: { RefinementCount: string; RefinementName: string; RefinementToken: string; RefinementValue: string; }[];\n}\nexport interface ResultTable {\n GroupTemplateId?: string;\n ItemTemplateId?: string;\n Properties?: { Key: string, Value: any, ValueType: string }[];\n Table?: { Rows: { Cells: { Key: string, Value: any, ValueType: string }[] }[] };\n Refiners?: IRefiner[];\n ResultTitle?: string;\n ResultTitleUrl?: string;\n RowCount?: number;\n TableType?: string;\n TotalRows?: number;\n TotalRowsIncludingDuplicates?: number;\n}\n\n/**\n * Defines how search results are sorted.\n */\nexport interface Sort {\n\n /**\n * The name for a property by which the search results are ordered.\n */\n Property: string;\n\n /**\n * The direction in which search results are ordered.\n */\n Direction: SortDirection;\n}\n\n/**\n * Defines one search property\n */\nexport interface SearchProperty {\n Name: string;\n Value: SearchPropertyValue;\n}\n\n/**\n * Defines one search property value. Set only one of StrlVal/BoolVal/IntVal/StrArray.\n */\nexport interface SearchPropertyValue {\n StrVal?: string;\n BoolVal?: boolean;\n IntVal?: number;\n StrArray?: string[];\n QueryPropertyValueTypeIndex: QueryPropertyValueType;\n}\n\n/**\n * defines the SortDirection enum\n */\nexport enum SortDirection {\n Ascending = 0,\n Descending = 1,\n FQLFormula = 2,\n}\n\n/**\n * Defines how ReorderingRule interface, used for reordering results\n */\nexport interface ReorderingRule {\n\n /**\n * The value to match on\n */\n MatchValue: string;\n\n /**\n * The rank boosting\n */\n Boost: number;\n\n /**\n * The rank boosting\n */\n MatchType: ReorderingRuleMatchType;\n}\n\n/**\n * defines the ReorderingRuleMatchType enum\n */\nexport enum ReorderingRuleMatchType {\n ResultContainsKeyword = 0,\n TitleContainsKeyword = 1,\n TitleMatchesKeyword = 2,\n UrlStartsWith = 3,\n UrlExactlyMatches = 4,\n ContentTypeIs = 5,\n FileExtensionMatches = 6,\n ResultHasTag = 7,\n ManualCondition = 8,\n}\n\n/**\n * Specifies the type value for the property\n */\nexport enum QueryPropertyValueType {\n None = 0,\n StringType = 1,\n Int32Type = 2,\n BooleanType = 3,\n StringArrayType = 4,\n UnSupportedType = 5,\n}\n\nexport class SearchBuiltInSourceId {\n public static readonly Documents = \"e7ec8cee-ded8-43c9-beb5-436b54b31e84\";\n public static readonly ItemsMatchingContentType = \"5dc9f503-801e-4ced-8a2c-5d1237132419\";\n public static readonly ItemsMatchingTag = \"e1327b9c-2b8c-4b23-99c9-3730cb29c3f7\";\n public static readonly ItemsRelatedToCurrentUser = \"48fec42e-4a92-48ce-8363-c2703a40e67d\";\n public static readonly ItemsWithSameKeywordAsThisItem = \"5c069288-1d17-454a-8ac6-9c642a065f48\";\n public static readonly LocalPeopleResults = \"b09a7990-05ea-4af9-81ef-edfab16c4e31\";\n public static readonly LocalReportsAndDataResults = \"203fba36-2763-4060-9931-911ac8c0583b\";\n public static readonly LocalSharePointResults = \"8413cd39-2156-4e00-b54d-11efd9abdb89\";\n public static readonly LocalVideoResults = \"78b793ce-7956-4669-aa3b-451fc5defebf\";\n public static readonly Pages = \"5e34578e-4d08-4edc-8bf3-002acf3cdbcc\";\n public static readonly Pictures = \"38403c8c-3975-41a8-826e-717f2d41568a\";\n public static readonly Popular = \"97c71db1-58ce-4891-8b64-585bc2326c12\";\n public static readonly RecentlyChangedItems = \"ba63bbae-fa9c-42c0-b027-9a878f16557c\";\n public static readonly RecommendedItems = \"ec675252-14fa-4fbe-84dd-8d098ed74181\";\n public static readonly Wiki = \"9479bf85-e257-4318-b5a8-81a180f5faa1\";\n}\n","import { SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\nimport { hOP } from \"@pnp/common\";\n\n/**\n * Defines a query execute against the search/suggest endpoint (see https://msdn.microsoft.com/en-us/library/office/dn194079.aspx)\n */\nexport interface SearchSuggestQuery {\n\n [key: string]: string | number | boolean;\n\n /**\n * A string that contains the text for the search query.\n */\n querytext: string;\n\n /**\n * The number of query suggestions to retrieve. Must be greater than zero (0). The default value is 5.\n */\n count?: number;\n\n /**\n * The number of personal results to retrieve. Must be greater than zero (0). The default value is 5.\n */\n personalCount?: number;\n\n /**\n * A Boolean value that specifies whether to retrieve pre-query or post-query suggestions. true to return pre-query suggestions; otherwise, false. The default value is false.\n */\n preQuery?: boolean;\n\n /**\n * A Boolean value that specifies whether to hit-highlight or format in bold the query suggestions. true to format in bold the terms in the returned query suggestions\n * that match terms in the specified query; otherwise, false. The default value is true.\n */\n hitHighlighting?: boolean;\n\n /**\n * A Boolean value that specifies whether to capitalize the first letter in each term in the returned query suggestions. true to capitalize the first letter in each term;\n * otherwise, false. The default value is false.\n */\n capitalize?: boolean;\n\n /**\n * The locale ID (LCID) for the query (see https://msdn.microsoft.com/en-us/library/cc233982.aspx).\n */\n culture?: string;\n\n /**\n * A Boolean value that specifies whether stemming is enabled. true to enable stemming; otherwise, false. The default value is true.\n */\n stemming?: boolean;\n\n /**\n * A Boolean value that specifies whether to include people names in the returned query suggestions. true to include people names in the returned query suggestions;\n * otherwise, false. The default value is true.\n */\n includePeople?: boolean;\n\n /**\n * A Boolean value that specifies whether to turn on query rules for this query. true to turn on query rules; otherwise, false. The default value is true.\n */\n queryRules?: boolean;\n\n /**\n * A Boolean value that specifies whether to return query suggestions for prefix matches. true to return query suggestions based on prefix matches, otherwise, false when\n * query suggestions should match the full query word.\n */\n prefixMatch?: boolean;\n}\n\n@defaultPath(\"_api/search/suggest\")\nexport class SearchSuggest extends SharePointQueryableInstance {\n\n public execute(query: SearchSuggestQuery): Promise {\n this.mapQueryToQueryString(query);\n return this.get().then(response => {\n const mapper = hOP(response, \"suggest\") ? (s: string) => response.suggest[s].results : (s: string) => response[s];\n return {\n PeopleNames: mapper(\"PeopleNames\"),\n PersonalResults: mapper(\"PersonalResults\"),\n Queries: mapper(\"Queries\"),\n };\n });\n }\n\n private mapQueryToQueryString(query: SearchSuggestQuery): void {\n\n const setProp = (q: SearchSuggestQuery) => (checkProp: string) => (sp: string) => {\n if (hOP(q, checkProp)) {\n this.query.set(sp, q[checkProp].toString());\n }\n };\n\n this.query.set(\"querytext\", `'${query.querytext}'`);\n\n const querySetter = setProp(query);\n\n querySetter(\"count\")(\"inumberofquerysuggestions\");\n querySetter(\"personalCount\")(\"inumberofresultsuggestions\");\n querySetter(\"preQuery\")(\"fprequerysuggestions\");\n querySetter(\"hitHighlighting\")(\"fhithighlighting\");\n querySetter(\"capitalize\")(\"fcapitalizefirstletters\");\n querySetter(\"culture\")(\"culture\");\n querySetter(\"stemming\")(\"enablestemming\");\n querySetter(\"includePeople\")(\"showpeoplenamesuggestions\");\n querySetter(\"queryRules\")(\"enablequeryrules\");\n querySetter(\"prefixMatch\")(\"fprefixmatchallterms\");\n }\n}\n\nexport interface SearchSuggestResult {\n readonly PeopleNames: string[];\n readonly PersonalResults: PersonalResultSuggestion[];\n readonly Queries: any[];\n}\n\nexport interface ESearchSuggestResult {\n readonly PeopleNames: string[];\n readonly PersonalResults: PersonalResultSuggestion[];\n readonly Queries: any[];\n}\n\nexport interface PersonalResultSuggestion {\n readonly HighlightedTitle?: string;\n readonly IsBestBet?: boolean;\n readonly Title?: string;\n readonly TypeId?: string;\n readonly Url?: string;\n}\n","import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { ClientPeoplePickerQueryParameters, HashTagCollection, PeoplePickerEntity, UserProfile } from \"./types\";\nimport { extend, jsS } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\n\nexport class UserProfileQuery extends SharePointQueryableInstance {\n\n private clientPeoplePickerQuery: ClientPeoplePickerQuery;\n private profileLoader: ProfileLoader;\n\n /**\n * Creates a new instance of the UserProfileQuery class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query\n */\n constructor(baseUrl: string | SharePointQueryable, path = \"_api/sp.userprofiles.peoplemanager\") {\n super(baseUrl, path);\n\n this.clientPeoplePickerQuery = (new ClientPeoplePickerQuery(baseUrl)).configureFrom(this);\n this.profileLoader = (new ProfileLoader(baseUrl)).configureFrom(this);\n }\n\n /**\n * The url of the edit profile page for the current user\n */\n public get editProfileLink(): Promise {\n return this.clone(UserProfileQuery, \"EditProfileLink\").get();\n }\n\n /**\n * A boolean value that indicates whether the current user's \"People I'm Following\" list is public\n */\n public get isMyPeopleListPublic(): Promise {\n return this.clone(UserProfileQuery, \"IsMyPeopleListPublic\").get();\n }\n\n /**\n * A boolean value that indicates whether the current user is being followed by the specified user\n *\n * @param loginName The account name of the user\n */\n public amIFollowedBy(loginName: string): Promise {\n const q = this.clone(UserProfileQuery, \"amifollowedby(@v)\");\n q.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return q.get();\n }\n\n /**\n * A boolean value that indicates whether the current user is following the specified user\n *\n * @param loginName The account name of the user\n */\n public amIFollowing(loginName: string): Promise {\n const q = this.clone(UserProfileQuery, \"amifollowing(@v)\");\n q.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return q.get();\n }\n\n /**\n * Gets tags that the current user is following\n *\n * @param maxCount The maximum number of tags to retrieve (default is 20)\n */\n public getFollowedTags(maxCount = 20): Promise {\n return this.clone(UserProfileQuery, `getfollowedtags(${maxCount})`).get();\n }\n\n /**\n * Gets the people who are following the specified user\n *\n * @param loginName The account name of the user\n */\n public getFollowersFor(loginName: string): Promise {\n const q = this.clone(UserProfileQuery, \"getfollowersfor(@v)\");\n q.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return q.get();\n }\n\n /**\n * Gets the people who are following the current user\n *\n */\n public get myFollowers(): SharePointQueryableCollection {\n return new SharePointQueryableCollection(this, \"getmyfollowers\");\n }\n\n /**\n * Gets user properties for the current user\n *\n */\n public get myProperties(): SharePointQueryableInstance {\n return new UserProfileQuery(this, \"getmyproperties\");\n }\n\n /**\n * Gets the people who the specified user is following\n *\n * @param loginName The account name of the user.\n */\n public getPeopleFollowedBy(loginName: string): Promise {\n const q = this.clone(UserProfileQuery, \"getpeoplefollowedby(@v)\");\n q.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return q.get();\n }\n\n /**\n * Gets user properties for the specified user.\n *\n * @param loginName The account name of the user.\n */\n public getPropertiesFor(loginName: string): Promise {\n const q = this.clone(UserProfileQuery, \"getpropertiesfor(@v)\");\n q.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return q.get();\n }\n\n /**\n * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first\n *\n */\n public get trendingTags(): Promise {\n const q = this.clone(UserProfileQuery, null);\n q.concat(\".gettrendingtags\");\n return q.get();\n }\n\n /**\n * Gets the specified user profile property for the specified user\n *\n * @param loginName The account name of the user\n * @param propertyName The case-sensitive name of the property to get\n */\n public getUserProfilePropertyFor(loginName: string, propertyName: string): Promise {\n const q = this.clone(UserProfileQuery, `getuserprofilepropertyfor(accountname=@v, propertyname='${propertyName}')`);\n q.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return q.get();\n }\n\n /**\n * Removes the specified user from the user's list of suggested people to follow\n *\n * @param loginName The account name of the user\n */\n public hideSuggestion(loginName: string): Promise {\n const q = this.clone(UserProfileQuery, \"hidesuggestion(@v)\");\n q.query.set(\"@v\", `'${encodeURIComponent(loginName)}'`);\n return q.postCore();\n }\n\n /**\n * A boolean values that indicates whether the first user is following the second user\n *\n * @param follower The account name of the user who might be following the followee\n * @param followee The account name of the user who might be followed by the follower\n */\n public isFollowing(follower: string, followee: string): Promise {\n const q = this.clone(UserProfileQuery, null);\n q.concat(`.isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)`);\n q.query.set(\"@v\", `'${encodeURIComponent(follower)}'`);\n q.query.set(\"@y\", `'${encodeURIComponent(followee)}'`);\n return q.get();\n }\n\n /**\n * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching.\n *\n * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB\n */\n public setMyProfilePic(profilePicSource: Blob): Promise {\n\n return new Promise((resolve, reject) => {\n\n let buffer: any = null;\n const reader = new FileReader();\n reader.onload = (e: any) => buffer = e.target.result;\n reader.readAsArrayBuffer(profilePicSource);\n const request = new UserProfileQuery(this, \"setmyprofilepicture\");\n request.postCore({\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\n }).then(_ => resolve()).catch(e => reject(e));\n\n });\n }\n\n /**\n * Sets single value User Profile property\n *\n * @param accountName The account name of the user\n * @param propertyName Property name\n * @param propertyValue Property value\n */\n public setSingleValueProfileProperty(accountName: string, propertyName: string, propertyValue: string): Promise {\n const postBody: string = jsS({\n accountName: accountName,\n propertyName: propertyName,\n propertyValue: propertyValue,\n });\n\n return this.clone(UserProfileQuery, \"SetSingleValueProfileProperty\")\n .postCore({ body: postBody });\n }\n\n /**\n * Sets multi valued User Profile property\n *\n * @param accountName The account name of the user\n * @param propertyName Property name\n * @param propertyValues Property values\n */\n public setMultiValuedProfileProperty(accountName: string, propertyName: string, propertyValues: string[]): Promise {\n const postBody: string = jsS({\n accountName: accountName,\n propertyName: propertyName,\n propertyValues: propertyValues,\n });\n\n return this.clone(UserProfileQuery, \"SetMultiValuedProfileProperty\")\n .postCore({ body: postBody });\n }\n\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n public createPersonalSiteEnqueueBulk(...emails: string[]): Promise {\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\n }\n\n /**\n * Gets the user profile of the site owner\n *\n */\n public get ownerUserProfile(): Promise {\n return this.profileLoader.ownerUserProfile;\n }\n\n /**\n * Gets the user profile for the current user\n */\n public get userProfile(): Promise {\n return this.profileLoader.userProfile;\n }\n\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n public createPersonalSite(interactiveRequest = false): Promise {\n return this.profileLoader.createPersonalSite(interactiveRequest);\n }\n\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private\n */\n public shareAllSocialData(share: boolean): Promise {\n return this.profileLoader.shareAllSocialData(share);\n }\n\n /**\n * Resolves user or group using specified query parameters\n *\n * @param queryParams The query parameters used to perform resolve\n */\n public clientPeoplePickerResolveUser(queryParams: ClientPeoplePickerQueryParameters): Promise {\n return this.clientPeoplePickerQuery.clientPeoplePickerResolveUser(queryParams);\n }\n\n /**\n * Searches for users or groups using specified query parameters\n *\n * @param queryParams The query parameters used to perform search\n */\n public clientPeoplePickerSearchUser(queryParams: ClientPeoplePickerQueryParameters): Promise {\n return this.clientPeoplePickerQuery.clientPeoplePickerSearchUser(queryParams);\n }\n}\n\n@defaultPath(\"_api/sp.userprofiles.profileloader.getprofileloader\")\nclass ProfileLoader extends SharePointQueryable {\n\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching\n *\n * @param emails The email addresses of the users to provision sites for\n */\n public createPersonalSiteEnqueueBulk(emails: string[]): Promise {\n\n return this.clone(ProfileLoader, \"createpersonalsiteenqueuebulk\", false).postCore({\n body: jsS({ \"emailIDs\": emails }),\n });\n }\n\n /**\n * Gets the user profile of the site owner.\n *\n */\n public get ownerUserProfile(): Promise {\n let q = this.getParent(ProfileLoader, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\n\n if (this.hasBatch) {\n q = q.inBatch(this.batch);\n }\n\n return q.postCore();\n }\n\n /**\n * Gets the user profile of the current user.\n *\n */\n public get userProfile(): Promise {\n return this.clone(ProfileLoader, \"getuserprofile\").postCore();\n }\n\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n public createPersonalSite(interactiveRequest = false): Promise {\n return this.clone(ProfileLoader, `getuserprofile/createpersonalsiteenque(${interactiveRequest})`).postCore();\n }\n\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n public shareAllSocialData(share: boolean): Promise {\n return this.clone(ProfileLoader, `getuserprofile/shareallsocialdata(${share})`).postCore();\n }\n}\n\n@defaultPath(\"_api/sp.ui.applicationpages.clientpeoplepickerwebserviceinterface\")\nclass ClientPeoplePickerQuery extends SharePointQueryable {\n\n /**\n * Resolves user or group using specified query parameters\n *\n * @param queryParams The query parameters used to perform resolve\n */\n public clientPeoplePickerResolveUser(queryParams: ClientPeoplePickerQueryParameters): Promise {\n const q = this.clone(ClientPeoplePickerQuery, null);\n q.concat(\".clientpeoplepickerresolveuser\");\n return q.postCore({\n body: this.createClientPeoplePickerQueryParametersRequestBody(queryParams),\n })\n .then(res => {\n if (typeof res === \"object\") {\n return res.ClientPeoplePickerResolveUser;\n }\n return res;\n })\n .then(JSON.parse);\n }\n\n /**\n * Searches for users or groups using specified query parameters\n *\n * @param queryParams The query parameters used to perform search\n */\n public clientPeoplePickerSearchUser(queryParams: ClientPeoplePickerQueryParameters): Promise {\n const q = this.clone(ClientPeoplePickerQuery, null);\n q.concat(\".clientpeoplepickersearchuser\");\n return q.postCore({\n body: this.createClientPeoplePickerQueryParametersRequestBody(queryParams),\n })\n .then(res => {\n if (typeof res === \"object\") {\n return res.ClientPeoplePickerSearchUser;\n }\n return res;\n })\n .then(JSON.parse);\n }\n\n /**\n * Creates ClientPeoplePickerQueryParameters request body\n *\n * @param queryParams The query parameters to create request body\n */\n private createClientPeoplePickerQueryParametersRequestBody(queryParams: ClientPeoplePickerQueryParameters): string {\n return jsS({\n \"queryParams\":\n extend(metadata(\"SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters\"), queryParams),\n });\n }\n}\n","import {\n SharePointQueryableInstance,\n defaultPath,\n} from \"./sharepointqueryable\";\n\nimport { jsS, hOP } from \"@pnp/common\";\nimport { metadata } from \"./utils/metadata\";\n\nexport interface SocialMethods {\n my: MySocialQueryMethods;\n getFollowedSitesUri(): Promise;\n getFollowedDocumentsUri(): Promise;\n follow(actorInfo: SocialActorInfo): Promise;\n isFollowed(actorInfo: SocialActorInfo): Promise;\n stopFollowing(actorInfo: SocialActorInfo): Promise;\n}\n\n/**\n * Exposes social following methods\n */\n@defaultPath(\"_api/social.following\")\nexport class SocialQuery extends SharePointQueryableInstance implements SocialMethods {\n\n public get my(): MySocialQueryMethods {\n return new MySocialQuery(this);\n }\n\n /**\n * Gets a URI to a site that lists the current user's followed sites.\n */\n public getFollowedSitesUri(): Promise {\n return this.clone(SocialQuery, \"FollowedSitesUri\").get().then(r => {\n return r.FollowedSitesUri || r;\n });\n }\n\n /**\n * Gets a URI to a site that lists the current user's followed documents.\n */\n public getFollowedDocumentsUri(): Promise {\n return this.clone(SocialQuery, \"FollowedDocumentsUri\").get().then(r => {\n return r.FollowedDocumentsUri || r;\n });\n }\n\n /**\n * Makes the current user start following a user, document, site, or tag\n *\n * @param actorInfo The actor to start following\n */\n public follow(actorInfo: SocialActorInfo): Promise {\n return this.clone(SocialQuery, \"follow\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\n }\n\n /**\n * Indicates whether the current user is following a specified user, document, site, or tag\n *\n * @param actorInfo The actor to find the following status for\n */\n public isFollowed(actorInfo: SocialActorInfo): Promise {\n return this.clone(SocialQuery, \"isfollowed\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\n }\n\n /**\n * Makes the current user stop following a user, document, site, or tag\n *\n * @param actorInfo The actor to stop following\n */\n public stopFollowing(actorInfo: SocialActorInfo): Promise {\n return this.clone(SocialQuery, \"stopfollowing\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\n }\n\n /**\n * Creates SocialActorInfo request body\n *\n * @param actorInfo The actor to create request body\n */\n private createSocialActorInfoRequestBody(actorInfo: SocialActorInfo): string {\n return jsS({\n \"actor\":\n Object.assign(metadata(\"SP.Social.SocialActorInfo\"), {\n Id: null,\n }, actorInfo),\n });\n }\n}\n\n/**\n * Defines the public methods exposed by the my endpoint\n */\nexport interface MySocialQueryMethods {\n /**\n * Gets this user's data\n */\n get(): Promise;\n /**\n * Gets users, documents, sites, and tags that the current user is following.\n * \n * @param types Bitwise set of SocialActorTypes to retrieve\n */\n followed(types: SocialActorTypes): Promise;\n /**\n * Gets the count of users, documents, sites, and tags that the current user is following.\n * \n * @param types Bitwise set of SocialActorTypes to retrieve\n */\n followedCount(types: SocialActorTypes): Promise;\n /**\n * Gets the users who are following the current user.\n */\n followers(): Promise;\n /**\n * Gets users who the current user might want to follow.\n */\n suggestions(): Promise;\n}\n\n@defaultPath(\"my\")\nexport class MySocialQuery extends SharePointQueryableInstance implements MySocialQueryMethods {\n\n /**\n * Gets users, documents, sites, and tags that the current user is following.\n * \n * @param types Bitwise set of SocialActorTypes to retrieve\n */\n public followed(types: SocialActorTypes): Promise {\n return this.clone(MySocialQuery, `followed(types=${types})`).get().then(r => {\n return hOP(r, \"Followed\") ? r.Followed.results : r;\n });\n }\n\n /**\n * Gets the count of users, documents, sites, and tags that the current user is following.\n * \n * @param types Bitwise set of SocialActorTypes to retrieve\n */\n public followedCount(types: SocialActorTypes): Promise {\n return this.clone(MySocialQuery, `followedcount(types=${types})`).get().then(r => {\n return r.FollowedCount || r;\n });\n }\n\n /**\n * Gets the users who are following the current user.\n */\n public followers(): Promise {\n return this.clone(MySocialQuery, \"followers\").get().then(r => {\n return hOP(r, \"Followers\") ? r.Followers.results : r;\n });\n }\n\n /**\n * Gets users who the current user might want to follow.\n */\n public suggestions(): Promise {\n return this.clone(MySocialQuery, \"suggestions\").get().then(r => {\n return hOP(r, \"Suggestions\") ? r.Suggestions.results : r;\n });\n }\n}\n\n/**\n * Social actor info\n *\n */\nexport interface SocialActorInfo {\n AccountName?: string;\n ActorType: SocialActorType;\n ContentUri?: string;\n Id?: string;\n TagGuid?: string;\n}\n\n/**\n * Social actor type\n *\n */\nexport const enum SocialActorType {\n User,\n Document,\n Site,\n Tag,\n}\n\n/**\n * Social actor type\n *\n */\n/* tslint:disable:no-bitwise */\nexport const enum SocialActorTypes {\n None = 0,\n User = 1 << SocialActorType.User,\n Document = 1 << SocialActorType.Document,\n Site = 1 << SocialActorType.Site,\n Tag = 1 << SocialActorType.Tag,\n /**\n * The set excludes documents and sites that do not have feeds.\n */\n ExcludeContentWithoutFeeds = 268435456,\n /**\n * The set includes group sites\n */\n IncludeGroupsSites = 536870912,\n /**\n * The set includes only items created within the last 24 hours\n */\n WithinLast24Hours = 1073741824,\n}\n/* tslint:enable */\n\n/**\n * Result from following\n *\n */\nexport const enum SocialFollowResult {\n Ok = 0,\n AlreadyFollowing = 1,\n LimitReached = 2,\n InternalError = 3,\n}\n\n/**\n * Specifies an exception or status code.\n */\nexport const enum SocialStatusCode {\n /**\n * The operation completed successfully\n */\n OK,\n /**\n * The request is invalid.\n */\n InvalidRequest,\n /**\n * The current user is not authorized to perform the operation.\n */\n AccessDenied,\n /**\n * The target of the operation was not found.\n */\n ItemNotFound,\n /**\n * The operation is invalid for the target's current state. \n */\n InvalidOperation,\n /**\n * The operation completed without modifying the target.\n */\n ItemNotModified,\n /**\n * The operation failed because an internal error occurred.\n */\n InternalError,\n /**\n * The operation failed because the server could not access the distributed cache.\n */\n CacheReadError,\n /**\n * The operation succeeded but the server could not update the distributed cache.\n */\n CacheUpdateError,\n /**\n * No personal site exists for the current user, and no further information is available.\n */\n PersonalSiteNotFound,\n /**\n * No personal site exists for the current user, and a previous attempt to create one failed.\n */\n FailedToCreatePersonalSite,\n /**\n * No personal site exists for the current user, and a previous attempt to create one was not authorized.\n */\n NotAuthorizedToCreatePersonalSite,\n /**\n * No personal site exists for the current user, and no attempt should be made to create one.\n */\n CannotCreatePersonalSite,\n /**\n * The operation was rejected because an internal limit had been reached.\n */\n LimitReached,\n /**\n * The operation failed because an error occurred during the processing of the specified attachment.\n */\n AttachmentError,\n /**\n * The operation succeeded with recoverable errors; the returned data is incomplete.\n */\n PartialData,\n /**\n * A required SharePoint feature is not enabled.\n */\n FeatureDisabled,\n /**\n * The site's storage quota has been exceeded.\n */\n StorageQuotaExceeded,\n /**\n * The operation failed because the server could not access the database.\n */\n DatabaseError,\n}\n\nexport interface SocialActor {\n /**\n * Gets the actor type.\n */\n ActorType: SocialActorType;\n /**\n * Gets the actor's unique identifier.\n */\n Id: string;\n /**\n * Gets the actor's canonical URI.\n */\n Uri: string;\n /**\n * Gets the actor's display name.\n */\n Name: string;\n /**\n * Returns true if the current user is following the actor, false otherwise.\n */\n IsFollowed: boolean;\n /**\n * Gets a code that indicates recoverable errors that occurred during actor retrieval\n */\n Status: SocialStatusCode;\n /**\n * Returns true if the Actor can potentially be followed, false otherwise.\n */\n CanFollow: boolean;\n /**\n * Gets the actor's image URI. Only valid when ActorType is User, Document, or Site\n */\n ImageUri: string;\n /**\n * Gets the actor's account name. Only valid when ActorType is User\n */\n AccountName: string;\n /**\n * Gets the actor's email address. Only valid when ActorType is User\n */\n EmailAddress: string;\n /**\n * Gets the actor's title. Only valid when ActorType is User\n */\n Title: string;\n /**\n * Gets the text of the actor's most recent post. Only valid when ActorType is User\n */\n StatusText: string;\n /**\n * Gets the URI of the actor's personal site. Only valid when ActorType is User\n */\n PersonalSiteUri: string;\n /**\n * Gets the URI of the actor's followed content folder. Only valid when this represents the current user\n */\n FollowedContentUri: string;\n /**\n * Gets the actor's content URI. Only valid when ActorType is Document, or Site\n */\n ContentUri: string;\n /**\n * Gets the actor's library URI. Only valid when ActorType is Document\n */\n LibraryUri: string;\n /**\n * Gets the actor's tag GUID. Only valid when ActorType is Tag\n */\n TagGuid: string;\n}\n\n/**\n * Defines the properties retrurned from the my endpoint\n */\nexport interface MySocialData {\n SocialActor: SocialActor;\n MyFollowedDocumentsUri: string;\n MyFollowedSitesUri: string;\n}\n","import { SharePointQueryable } from \"./sharepointqueryable\";\nimport { extend, jsS, hOP } from \"@pnp/common\";\nimport { EmailProperties } from \"./types\";\nimport { SPBatch } from \"./batch\";\nimport { ICachingOptions } from \"@pnp/odata\";\nimport { File } from \"./files\";\nimport { odataUrlFrom } from \"./odata\";\nimport { PrincipalInfo, PrincipalType, PrincipalSource, WikiPageCreationInformation } from \"./types\";\nimport { metadata } from \"./utils/metadata\";\n\n/**\n * Public interface for the utility methods to limit SharePointQueryable method exposure\n */\nexport interface UtilityMethods {\n usingCaching(options?: ICachingOptions): this;\n inBatch(batch: SPBatch): this;\n sendEmail(props: EmailProperties): Promise;\n getCurrentUserEmailAddresses(): Promise;\n resolvePrincipal(email: string,\n scopes: PrincipalType,\n sources: PrincipalSource,\n inputIsEmailOnly: boolean,\n addToUserInfoList: boolean,\n matchUserInfoList?: boolean): Promise;\n searchPrincipals(input: string,\n scopes: PrincipalType,\n sources: PrincipalSource,\n groupName: string,\n maxCount: number): Promise;\n createEmailBodyForInvitation(pageAddress: string): Promise;\n expandGroupsToPrincipals(inputs: string[], maxCount?: number): Promise;\n createWikiPage(info: WikiPageCreationInformation): Promise;\n containsInvalidFileFolderChars(input: string, onPremise?: boolean): boolean;\n stripInvalidFileFolderChars(input: string, replacer?: string, onPremise?: boolean): string;\n}\n\n/**\n * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name\n */\nexport class UtilityMethod extends SharePointQueryable implements UtilityMethods {\n private static readonly InvalidFileFolderNameCharsOnlineRegex = /[\"*:<>?/\\\\|\\x00-\\x1f\\x7f-\\x9f]/g;\n private static readonly InvalidFileFolderNameCharsOnPremiseRegex = /[\"#%*:<>?/\\\\|\\x00-\\x1f\\x7f-\\x9f]/g;\n\n /**\n * Creates a new instance of the Utility method class\n *\n * @param baseUrl The parent url provider\n * @param methodName The static method name to call on the utility class\n */\n constructor(baseUrl: string | SharePointQueryable, methodName: string) {\n\n super(UtilityMethod.getBaseUrl(baseUrl), `_api/SP.Utilities.Utility.${methodName}`);\n }\n\n private static getBaseUrl(candidate: string | SharePointQueryable) {\n\n if (typeof candidate === \"string\") {\n return candidate;\n }\n\n const c = candidate as SharePointQueryable;\n const url = c.toUrl();\n const index = url.indexOf(\"_api/\");\n if (index < 0) {\n return url;\n }\n\n return url.substr(0, index);\n }\n\n public excute(props: any): Promise {\n\n return this.postCore({\n body: jsS(props),\n });\n }\n\n /**\n * Sends an email based on the supplied properties\n *\n * @param props The properties of the email to send\n */\n public sendEmail(props: EmailProperties): Promise {\n\n const params = {\n properties: extend(metadata(\"SP.Utilities.EmailProperties\"), {\n Body: props.Body,\n From: props.From,\n Subject: props.Subject,\n }),\n };\n\n if (props.To && props.To.length > 0) {\n\n params.properties = extend(params.properties, {\n To: { results: props.To },\n });\n }\n\n if (props.CC && props.CC.length > 0) {\n\n params.properties = extend(params.properties, {\n CC: { results: props.CC },\n });\n }\n\n if (props.BCC && props.BCC.length > 0) {\n\n params.properties = extend(params.properties, {\n BCC: { results: props.BCC },\n });\n }\n\n if (props.AdditionalHeaders) {\n params.properties = extend(params.properties, {\n AdditionalHeaders: props.AdditionalHeaders,\n });\n }\n\n return this.clone(UtilityMethod, \"SendEmail\", true).excute(params);\n }\n\n public getCurrentUserEmailAddresses(): Promise {\n\n return this.clone(UtilityMethod, \"GetCurrentUserEmailAddresses\", true).excute({}).then(r => {\n return hOP(r, \"GetCurrentUserEmailAddresses\") ? (r).GetCurrentUserEmailAddresses : r;\n });\n }\n\n public resolvePrincipal(input: string,\n scopes: PrincipalType,\n sources: PrincipalSource,\n inputIsEmailOnly: boolean,\n addToUserInfoList: boolean,\n matchUserInfoList = false): Promise {\n\n const params = {\n addToUserInfoList: addToUserInfoList,\n input: input,\n inputIsEmailOnly: inputIsEmailOnly,\n matchUserInfoList: matchUserInfoList,\n scopes: scopes,\n sources: sources,\n };\n\n return this.clone(UtilityMethod, \"ResolvePrincipalInCurrentContext\", true).excute(params).then(r => {\n return hOP(r, \"ResolvePrincipalInCurrentContext\") ? (r).ResolvePrincipalInCurrentContext : r;\n });\n }\n\n public searchPrincipals(input: string,\n scopes: PrincipalType,\n sources: PrincipalSource,\n groupName: string,\n maxCount: number): Promise {\n\n const params = {\n groupName: groupName,\n input: input,\n maxCount: maxCount,\n scopes: scopes,\n sources: sources,\n };\n\n return this.clone(UtilityMethod, \"SearchPrincipalsUsingContextWeb\", true).excute(params).then(r => {\n return hOP(r, \"SearchPrincipalsUsingContextWeb\") ? (r).SearchPrincipalsUsingContextWeb : r;\n });\n }\n\n public createEmailBodyForInvitation(pageAddress: string): Promise {\n\n const params = {\n pageAddress: pageAddress,\n };\n\n return this.clone(UtilityMethod, \"CreateEmailBodyForInvitation\", true).excute(params).then(r => {\n return hOP(r, \"CreateEmailBodyForInvitation\") ? (r).CreateEmailBodyForInvitation : r;\n });\n }\n\n public expandGroupsToPrincipals(inputs: string[], maxCount = 30): Promise {\n\n const params = {\n inputs: inputs,\n maxCount: maxCount,\n };\n\n return this.clone(UtilityMethod, \"ExpandGroupsToPrincipals\", true).excute(params).then(r => {\n return hOP(r, \"ExpandGroupsToPrincipals\") ? (r).ExpandGroupsToPrincipals : r;\n });\n }\n\n public createWikiPage(info: WikiPageCreationInformation): Promise {\n\n return this.clone(UtilityMethod, \"CreateWikiPageInContextWeb\", true).excute({\n parameters: info,\n }).then(r => {\n return {\n data: hOP(r, \"CreateWikiPageInContextWeb\") ? (r).CreateWikiPageInContextWeb : r,\n file: new File(odataUrlFrom(r)),\n };\n });\n }\n\n /**\n * Checks if file or folder name contains invalid characters\n *\n * @param input File or folder name to check\n * @param onPremise Set to true for SharePoint On-Premise\n * @returns True if contains invalid chars, false otherwise\n */\n public containsInvalidFileFolderChars(input: string, onPremise = false): boolean {\n if (onPremise) {\n return UtilityMethod.InvalidFileFolderNameCharsOnPremiseRegex.test(input);\n } else {\n return UtilityMethod.InvalidFileFolderNameCharsOnlineRegex.test(input);\n }\n }\n\n /**\n * Removes invalid characters from file or folder name\n *\n * @param input File or folder name\n * @param replacer Value that will replace invalid characters\n * @param onPremise Set to true for SharePoint On-Premise\n * @returns File or folder name with replaced invalid characters\n */\n public stripInvalidFileFolderChars(input: string, replacer = \"\", onPremise = false): string {\n if (onPremise) {\n return input.replace(UtilityMethod.InvalidFileFolderNameCharsOnPremiseRegex, replacer);\n } else {\n return input.replace(UtilityMethod.InvalidFileFolderNameCharsOnlineRegex, replacer);\n }\n }\n}\n\nexport interface CreateWikiPageResult {\n data: any;\n file: File;\n}\n","import { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\nimport { HubSite as IHubSite } from \"./types\";\n\n/**\n * Describes a collection of Hub Sites\n *\n */\n@defaultPath(\"_api/hubsites\")\nexport class HubSites extends SharePointQueryableCollection {\n\n /**\t \n * Gets a Hub Site from the collection by id\t \n *\t \n * @param id The Id of the Hub Site\t \n */\n public getById(id: string): HubSite {\n return new HubSite(this, `GetById?hubSiteId='${id}'`);\n\n }\n\n}\n\nexport class HubSite extends SharePointQueryableInstance { }\n","import { Search, SearchResults, SearchQueryInit } from \"./search\";\nimport { SearchSuggest, SearchSuggestQuery, SearchSuggestResult } from \"./searchsuggest\";\nimport { Site } from \"./site\";\nimport { Web } from \"./webs\";\nimport { ConfigOptions } from \"@pnp/common\";\nimport { UserProfileQuery } from \"./userprofiles\";\nimport { INavigationService, NavigationService } from \"./navigation\";\nimport { SPBatch } from \"./batch\";\nimport { SocialQuery, SocialMethods } from \"./social\";\nimport { SiteScripts, SiteScriptUtilityMethods } from \"./sitescripts\";\nimport { SiteDesigns, SiteDesignsUtilityMethods } from \"./sitedesigns\";\nimport { UtilityMethod, UtilityMethods } from \"./utilities\";\nimport { SharePointQueryableConstructor, SharePointQueryable } from \"./sharepointqueryable\";\nimport {\n setup as _setup,\n SPConfiguration,\n} from \"./config/splibconfig\";\nimport { ICachingOptions } from \"@pnp/odata\";\nimport { HubSites } from \"./hubsites\";\n\n/**\n * Root of the SharePoint REST module\n */\nexport class SPRest {\n\n /** \n * Creates a new instance of the SPRest class\n * \n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n constructor(protected _options: ConfigOptions = {}, protected _baseUrl = \"\") { }\n\n /**\n * Configures instance with additional options and baseUrl.\n * Provided configuration used by other objects in a chain\n * \n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n public configure(options: ConfigOptions, baseUrl = \"\"): SPRest {\n return new SPRest(options, baseUrl);\n }\n\n /**\n * Global SharePoint configuration options\n * \n * @param config The SharePoint configuration to apply\n */\n public setup(config: SPConfiguration) {\n _setup(config);\n }\n\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n public searchSuggest(query: string | SearchSuggestQuery): Promise {\n\n let finalQuery: SearchSuggestQuery;\n\n if (typeof query === \"string\") {\n finalQuery = { querytext: query };\n } else {\n finalQuery = query;\n }\n\n return this.create(SearchSuggest).execute(finalQuery);\n }\n\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n public search(query: SearchQueryInit): Promise {\n return this.create(Search).execute(query);\n }\n\n /**\n * Executes the provided search query, caching the results\n * \n * @param query The SearchQuery definition\n * @param options The set of caching options used to store the results\n */\n public searchWithCaching(query: SearchQueryInit, options?: ICachingOptions): Promise {\n return this.create(Search).usingCaching(options).execute(query);\n }\n\n /**\n * Begins a site collection scoped REST request\n *\n */\n public get site(): Site {\n return this.create(Site);\n }\n\n /**\n * Begins a web scoped REST request\n *\n */\n public get web(): Web {\n return this.create(Web);\n }\n\n /**\n * Access to user profile methods\n *\n */\n public get profiles(): UserProfileQuery {\n return this.create(UserProfileQuery);\n }\n\n /**\n * Access to social methods\n */\n public get social(): SocialMethods {\n return this.create(SocialQuery);\n }\n\n /**\n * Access to the site collection level navigation service\n */\n public get navigation(): INavigationService {\n return this.create(NavigationService);\n }\n\n /**\n * Creates a new batch object for use with the SharePointQueryable.addToBatch method\n *\n */\n public createBatch(): SPBatch {\n return this.web.createBatch();\n }\n\n /**\n * Static utilities methods from SP.Utilities.Utility\n */\n public get utility(): UtilityMethods {\n return this.create(UtilityMethod, \"\");\n }\n\n /**\n * Access to sitescripts methods\n */\n public get siteScripts(): SiteScriptUtilityMethods {\n return this.create(SiteScripts, \"\");\n }\n\n /**\n * Access to sitedesigns methods\n */\n public get siteDesigns(): SiteDesignsUtilityMethods {\n return this.create(SiteDesigns, \"\");\n }\n\n /**\n * Access to Hub Site methods\n */\n public get hubSites(): HubSites {\n return this.create(HubSites);\n }\n\n /**\n * Gets the Web instance representing the tenant app catalog web\n */\n public getTenantAppCatalogWeb(): Promise {\n return this.create(Web, \"_api/SP_TenantSettings_Current\").get<{ CorporateCatalogUrl: string }>().then(r => {\n return (new Web(r.CorporateCatalogUrl)).configure(this._options);\n });\n }\n\n /**\n * Handles creating and configuring the objects returned from this class\n * \n * @param fm The factory method used to create the instance\n * @param path Optional additional path information to pass to the factory method\n */\n private create(fm: SharePointQueryableConstructor, path?: string): T {\n return new fm(this._baseUrl, path).configure(this._options);\n }\n}\n\nexport const sp = new SPRest();\n"],"names":["tslib_1.__extends","global","Princ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