{"version":3,"file":"sp-clientsvc.es5.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../../packages/sp-clientsvc/src/opactionbuilders.ts","../../../../packages/sp-clientsvc/src/opbuilders.ts","../../../../packages/sp-clientsvc/src/utils.ts","../../../../packages/sp-clientsvc/src/objectpath.ts","../../../../packages/sp-clientsvc/src/parsers.ts","../../../../packages/sp-clientsvc/src/clintsvcqueryable.ts","../../../../packages/sp-clientsvc/src/batch.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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 __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 { PropertyType } from \"./types\";\nimport { IMethodParamsBuilder } from \"./opbuilders\";\n\nexport function objectPath(): string {\n return ``;\n}\n\nexport function identityQuery(): string {\n return ``;\n}\n\nexport function opQuery(selectProperties: string[] = null, childSelectProperties: string[] | null = null): string {\n\n // this is fairly opaque behavior, but is the simplest way to convey the required information.\n // if selectProperties.length === 0 or null then select all\n // else select indicated properties\n\n // if childSelectProperties === null do not include that block\n // if childSelectProperties.length === 0 then select all\n // else select indicated properties\n\n const builder = [];\n builder.push(``);\n if (selectProperties === null || selectProperties.length < 1) {\n builder.push(``);\n builder.push(``);\n builder.push(``);\n } else {\n builder.push(``);\n builder.push(``);\n [].push.apply(builder, selectProperties.map(p => ``));\n builder.push(``);\n builder.push(``);\n }\n\n if (childSelectProperties !== null) {\n if (childSelectProperties.length < 1) {\n builder.push(``);\n builder.push(``);\n builder.push(``);\n } else {\n builder.push(``);\n builder.push(``);\n [].push.apply(builder, childSelectProperties.map(p => ``));\n builder.push(``);\n builder.push(``);\n }\n }\n\n builder.push(``);\n\n return builder.join(\"\");\n}\n\nexport function setProperty(name: string, type: PropertyType, value: string): string {\n const builder = [];\n builder.push(``);\n builder.push(`${value}`);\n builder.push(``);\n return builder.join(\"\");\n}\n\nexport function methodAction(name: string, params: IMethodParamsBuilder | null): string {\n\n const builder = [];\n builder.push(``);\n\n if (params !== null) {\n const arrParams = params.toArray();\n if (arrParams.length < 1) {\n builder.push(``);\n } else {\n builder.push(``);\n [].push.apply(builder, arrParams.map(p => `${p.value}`));\n builder.push(``);\n }\n }\n\n builder.push(\"\");\n\n return builder.join(\"\");\n}\n\nexport function objectProperties(o: any): string[] {\n\n return Object.getOwnPropertyNames(o).map((name) => {\n\n const value = o[name];\n if (typeof value === \"boolean\") {\n return setProperty(name, \"Boolean\", `${value}`);\n } else if (typeof value === \"number\") {\n return setProperty(name, \"Number\", `${value}`);\n } else if (typeof value === \"string\") {\n return setProperty(name, \"String\", `${value}`);\n }\n\n return \"\";\n }, []);\n}\n","import { ObjectPath, IObjectPath } from \"./objectpath\";\nimport { PropertyType } from \"./types\";\n\nexport function property(name: string, ...actions: string[]): IObjectPath {\n return new ObjectPath(``, actions);\n}\n\nexport function staticMethod(name: string, typeId: string, ...actions: string[]): IObjectPath {\n return new ObjectPath(``, actions);\n}\n\nexport function staticProperty(name: string, typeId: string, ...actions: string[]): IObjectPath {\n return new ObjectPath(``, actions);\n}\n\nexport function objConstructor(typeId: string, ...actions: string[]): IObjectPath {\n return new ObjectPath(``, actions);\n}\n\nexport interface IMethodParamsBuilder {\n string(value: string): this;\n number(value: number): this;\n boolean(value: boolean): this;\n objectPath(inputIndex: number): this;\n toArray(): { type: PropertyType, value: string }[];\n}\n\n/**\n * Used to build parameters when calling methods\n */\nexport class MethodParams implements IMethodParamsBuilder {\n\n constructor(private _p: { type: PropertyType, value: string }[] = []) { }\n\n public static build(initValues: { type: PropertyType, value: string }[] = []): IMethodParamsBuilder {\n const params = new MethodParams();\n [].push.apply(params._p, initValues);\n return params;\n }\n\n public string(value: string): this {\n return this.a(\"String\", value);\n }\n\n public number(value: number): this {\n return this.a(\"Number\", value.toString());\n }\n\n public boolean(value: boolean): this {\n return this.a(\"Boolean\", value.toString());\n }\n\n public objectPath(inputIndex: number): this {\n return this.a(\"ObjectPath\", inputIndex.toString());\n }\n\n public toArray(): { type: PropertyType, value: string }[] {\n return this._p;\n }\n\n private a(type: PropertyType, value: string): this {\n this._p.push({ type, value });\n return this;\n }\n}\n\nexport function method(name: string, params: IMethodParamsBuilder, ...actions: string[]): IObjectPath {\n const builder = [];\n builder.push(``);\n\n if (params !== null) {\n const arrParams = params.toArray();\n if (arrParams.length < 1) {\n builder.push(``);\n } else {\n builder.push(``);\n [].push.apply(builder, arrParams.map(p => {\n\n if (p.type === \"ObjectPath\") {\n return ``;\n }\n\n return `${p.value}`;\n }));\n builder.push(``);\n }\n }\n\n builder.push(\"\");\n\n return new ObjectPath(builder.join(\"\"), actions);\n}\n","import { IObjectPath } from \"./objectpath\";\n\n/**\n * Transforms an array of object paths into a request xml body. Does not do placeholder substitutions.\n * \n * @param objectPaths The object paths for which we want to generate a body\n */\nexport function writeObjectPathBody(objectPaths: IObjectPath[]): string {\n\n const actions: string[] = [];\n const paths: string[] = [];\n\n objectPaths.forEach(op => {\n paths.push(op.path);\n actions.push(...op.actions);\n });\n\n // create our xml payload\n return [\n ``,\n \"\",\n actions.join(\"\"),\n \"\",\n \"\",\n paths.join(\"\"),\n \"\",\n \"\",\n ].join(\"\");\n}\n","import { TypedHash, extend, objectDefinedNotNull } from \"@pnp/common\";\nimport { objectPath } from \"./opactionbuilders\";\nimport { property, staticProperty } from \"./opbuilders\";\nimport { writeObjectPathBody } from \"./utils\";\n\n/**\n * Defines the properties and method of an ObjectPath\n */\nexport interface IObjectPath {\n /**\n * The ObjectPath xml node\n */\n path: string;\n /**\n * Collection of xml action nodes\n */\n actions: string[];\n /**\n * The id of this object path, used for processing, not set directly\n */\n id: number | undefined;\n}\n\n/**\n * Represents an ObjectPath used when querying ProcessQuery\n */\nexport class ObjectPath implements IObjectPath {\n constructor(public path: string, public actions: string[] = [], public id = -1, public replaceAfter: IObjectPath[] = []) { }\n}\n\n/**\n * Replaces all found instance of the $$ID$$ placeholder in the supplied xml string\n * \n * @param id New value to be insterted\n * @param xml The existing xml fragment in which the replace should occur\n */\nexport function opSetId(id: string, xml: string): string {\n return xml.replace(/\\$\\$ID\\$\\$/g, id);\n}\n\n/**\n * Replaces all found instance of the $$PATH_ID$$ placeholder in the supplied xml string\n * \n * @param id New value to be insterted\n * @param xml The existing xml fragment in which the replace should occur\n */\nexport function opSetPathId(id: string, xml: string): string {\n return xml.replace(/\\$\\$PATH_ID\\$\\$/g, id);\n}\n\n/**\n * Replaces all found instance of the $$PARENT_ID$$ placeholder in the supplied xml string\n * \n * @param id New value to be insterted\n * @param xml The existing xml fragment in which the replace should occur\n */\nexport function opSetParentId(id: string, xml: string): string {\n return xml.replace(/\\$\\$PARENT_ID\\$\\$/g, id);\n}\n\n/**\n * Replaces all found instance of the $$OP_PARAM_ID$$ placeholder in the supplied xml string\n * \n * @param map A mapping where [index] = replaced_object_path_id\n * @param xml The existing xml fragment in which the replace should occur\n * @param indexMapper Used when creating batches, not meant for direct use external to this library\n */\nexport function opSetPathParamId(map: number[], xml: string, indexMapper: (n: number) => number = (n) => n): string {\n\n // this approach works because input params must come before the things that need them\n // meaning the right id will always be in the map\n const matches = /\\$\\$OP_PARAM_ID_(\\d+)\\$\\$/ig.exec(xml);\n if (matches !== null) {\n for (let i = 1; i < matches.length; i++) {\n const index = parseInt(matches[i], 10);\n const regex = new RegExp(`\\\\$\\\\$OP_PARAM_ID_${index}\\\\$\\\\$`, \"ig\");\n xml = xml.replace(regex, map[indexMapper(index)].toString());\n }\n }\n\n return xml;\n}\n\n/**\n * Represents a collection of IObjectPaths\n */\nexport class ObjectPathQueue {\n\n private _xml: string | null;\n private _contextIndex = -1;\n private _siteIndex = -1;\n private _webIndex = -1;\n\n constructor(protected _paths: IObjectPath[] = [], protected _relationships: TypedHash = {}) { }\n\n /**\n * Adds an object path to the queue\n * \n * @param op The action to add\n * @returns The index of the added object path\n */\n public add(op: IObjectPath): number {\n\n this.dirty();\n this._paths.push(op);\n return this.lastIndex;\n }\n\n public addChildRelationship(parentIndex: number, childIndex: number) {\n if (objectDefinedNotNull(this._relationships[`_${parentIndex}`])) {\n this._relationships[`_${parentIndex}`].push(childIndex);\n } else {\n this._relationships[`_${parentIndex}`] = [childIndex];\n }\n }\n\n public getChildRelationship(parentIndex: number): number[] {\n if (objectDefinedNotNull(this._relationships[`_${parentIndex}`])) {\n return this._relationships[`_${parentIndex}`];\n } else {\n return [];\n }\n }\n\n public getChildRelationships(): TypedHash {\n return this._relationships;\n }\n\n /**\n * Appends an action to the supplied IObjectPath, replacing placeholders\n * \n * @param op IObjectPath to which the action will be appended\n * @param action The action to append\n */\n public appendAction(op: IObjectPath, action: string): this {\n\n this.dirty();\n op.actions.push(action);\n return this;\n }\n\n /**\n * Appends an action to the last IObjectPath in the collection\n * \n * @param action \n */\n public appendActionToLast(action: string): this {\n\n return this.appendAction(this.last, action);\n }\n\n /**\n * Creates a copy of this ObjectPathQueue\n */\n public clone(): ObjectPathQueue {\n const clone = new ObjectPathQueue(this.toArray(), extend({}, this._relationships));\n clone._contextIndex = this._contextIndex;\n clone._siteIndex = this._siteIndex;\n clone._webIndex = this._webIndex;\n return clone;\n }\n\n /**\n * Gets a copy of this instance's paths\n */\n public toArray(): IObjectPath[] {\n return this._paths.slice(0);\n }\n\n /**\n * The last IObjectPath instance added to this collection\n */\n public get last(): IObjectPath {\n\n if (this._paths.length < 1) {\n return null;\n }\n\n return this._paths[this.lastIndex];\n }\n\n /**\n * Index of the last IObjectPath added to the queue\n */\n public get lastIndex(): number {\n return this._paths.length - 1;\n }\n\n /**\n * Gets the index of the current site in the queue\n */\n public get siteIndex(): number {\n\n if (this._siteIndex < 0) {\n\n // this needs to be here in case we create it\n const contextIndex = this.contextIndex;\n\n this._siteIndex = this.add(property(\"Site\",\n // actions\n objectPath()));\n\n this.addChildRelationship(contextIndex, this._siteIndex);\n }\n\n return this._siteIndex;\n }\n\n /**\n * Gets the index of the current web in the queue\n */\n public get webIndex(): number {\n\n if (this._webIndex < 0) {\n\n // this needs to be here in case we create it\n const contextIndex = this.contextIndex;\n\n this._webIndex = this.add(property(\"Web\",\n // actions\n objectPath()));\n\n this.addChildRelationship(contextIndex, this._webIndex);\n }\n\n return this._webIndex;\n }\n\n /**\n * Gets the index of the Current context in the queue, can be used to establish parent -> child rels\n */\n public get contextIndex(): number {\n if (this._contextIndex < 0) {\n this._contextIndex = this.add(staticProperty(\"Current\", \"{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}\",\n // actions\n objectPath()));\n }\n\n return this._contextIndex;\n }\n\n public toBody(): string {\n\n if (objectDefinedNotNull(this._xml)) {\n return this._xml;\n }\n\n // create our xml payload\n this._xml = writeObjectPathBody(this.toIndexedTree());\n\n return this._xml;\n }\n\n /**\n * Conducts the string replacements for id, parent id, and path id\n * \n * @returns The tree with all string replacements made\n */\n public toIndexedTree(): IObjectPath[] {\n\n let builderIndex = -1;\n let lastOpId = -1;\n const idIndexMap: number[] = [];\n\n return this.toArray().map((op, index, arr) => {\n\n const opId = ++builderIndex;\n\n // track the array index => opId relationship\n idIndexMap.push(opId);\n\n // do path replacements\n op.path = opSetPathParamId(idIndexMap, opSetId(opId.toString(), op.path));\n\n if (lastOpId >= 0) {\n // if we have a parent do the replace\n op.path = opSetParentId(lastOpId.toString(), op.path);\n }\n\n // rewrite actions with placeholders replaced\n op.actions = op.actions.map(a => {\n const actionId = ++builderIndex;\n return opSetId(actionId.toString(), opSetPathId(opId.toString(), a));\n });\n\n // handle any specific child relationships\n this.getChildRelationship(index).forEach(childIndex => {\n // set the parent id for our non-immediate children, thus removing the token so it isn't overwritten\n arr[childIndex].path = opSetParentId(opId.toString(), arr[childIndex].path);\n });\n\n // and remember our last object path id for the parent replace above\n lastOpId = opId;\n\n return op;\n });\n }\n\n /**\n * Dirties this queue clearing any cached data\n */\n protected dirty(): void {\n this._xml = null;\n }\n}\n","import { getAttrValueFromString, jsS, hOP } from \"@pnp/common\";\nimport { IObjectPath } from \"./objectpath\";\n\n/**\n * Used within the request pipeline to parse ProcessQuery results\n */\nexport class ProcessQueryParser {\n\n constructor(protected op: IObjectPath) { }\n\n /**\n * Parses the response checking for errors\n * \n * @param r Response object\n */\n public parse(r: Response): Promise {\n\n return r.text().then(t => {\n\n if (!r.ok) {\n throw Error(t);\n }\n\n try {\n return JSON.parse(t);\n } catch (e) {\n // special case in ProcessQuery where we got an error back, but it is not in json format\n throw Error(t);\n }\n\n }).then((parsed: any[]) => {\n\n // here we need to check for an error body\n if (parsed.length > 0 && hOP(parsed[0], \"ErrorInfo\") && parsed[0].ErrorInfo !== null) {\n throw Error(jsS(parsed[0].ErrorInfo));\n }\n\n return this.findResult(parsed);\n });\n }\n\n public findResult(json: any): Promise {\n\n for (let i = 0; i < this.op.actions.length; i++) {\n\n\n const a = this.op.actions[i];\n\n // let's see if the result is null based on the ObjectPath action, if it exists\n // \n if (/^(json, parseInt(getAttrValueFromString(a, \"Id\"), 10));\n if (!result || (result && result.IsNull)) {\n return Promise.resolve(null);\n }\n }\n\n // let's see if we have a query result\n // \n if (/^(parsed: any[], id: number): R {\n\n for (let i = 0; i < parsed.length; i++) {\n\n if (parsed[i] === id) {\n return parsed[i + 1];\n }\n }\n\n return null;\n }\n}\n","import { FetchOptions, combine, extend, getGUID, mergeHeaders, mergeOptions, objectDefinedNotNull, hOP, getHashCode } from \"@pnp/common\";\nimport { CachingOptions, ICachingOptions, ODataParser, Queryable, RequestContext } from \"@pnp/odata\";\nimport { SPHttpClient, toAbsoluteUrl } from \"@pnp/sp\";\nimport { IObjectPathBatch } from \"./batch\";\nimport { ObjectPathQueue } from \"./objectpath\";\nimport { methodAction, objectPath, objectProperties, opQuery } from \"./opactionbuilders\";\nimport { IMethodParamsBuilder, method, property } from \"./opbuilders\";\nimport { ProcessQueryParser } from \"./parsers\";\n\n\nexport interface IClientSvcQueryable {\n select(...selects: string[]): this;\n usingCaching(options?: ICachingOptions): this;\n inBatch(batch: IObjectPathBatch): this;\n}\n\nexport interface ClientSvcQueryableConstructor {\n new(baseUrl: string | ClientSvcQueryable, objectPaths?: ObjectPathQueue): T;\n}\n\nconst ProcessQueryPath = \"_vti_bin/client.svc/ProcessQuery\";\n\nexport class ClientSvcQueryable extends Queryable implements IClientSvcQueryable {\n\n /**\n * Collection of select fields\n */\n protected _selects: string[];\n\n /**\n * Tracks the batch of which this query may be part\n */\n protected _batch: IObjectPathBatch;\n\n constructor(parent: ClientSvcQueryable | string = \"\", protected _objectPaths: ObjectPathQueue | null = null) {\n super();\n\n this._selects = [];\n\n if (typeof parent === \"string\") {\n\n // we assume the parent here is an absolute url to a web\n this._parentUrl = parent;\n this._url = combine(parent.replace(ProcessQueryPath, \"\"), ProcessQueryPath);\n if (!objectDefinedNotNull(this._objectPaths)) {\n this._objectPaths = new ObjectPathQueue();\n }\n\n } else {\n this._parentUrl = parent._parentUrl;\n this._url = combine(parent._parentUrl, ProcessQueryPath);\n if (!objectDefinedNotNull(_objectPaths)) {\n this._objectPaths = parent._objectPaths.clone();\n }\n this.configureFrom(parent);\n }\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 [].push.apply(this._selects, selects);\n return this;\n }\n\n /**\n * Adds this query to the supplied batch\n *\n * @example\n * ```\n *\n * let b = pnp.sp.createBatch();\n * pnp.sp.web.inBatch(b).get().then(...);\n * b.execute().then(...)\n * ```\n */\n public inBatch(batch: IObjectPathBatch): this {\n\n if (this.batch !== null) {\n throw Error(\"This query is already part of a batch.\");\n }\n\n this._batch = batch;\n\n return this;\n }\n\n /**\n * Gets the full url with query information\n *\n */\n public toUrlAndQuery(): string {\n return `${super.toUrl()}?${Array.from(this.query).map((v: [string, string]) => v[0] + \"=\" + v[1]).join(\"&\")}`;\n }\n\n protected getSelects(): string[] {\n return objectDefinedNotNull(this._selects) ? this._selects : [];\n }\n\n /**\n * Gets a child object based on this instance's paths and the supplied paramters\n * \n * @param factory Instance factory of the child type\n * @param methodName Name of the method used to load the child\n * @param params Parameters required by the method to load the child\n */\n protected getChild(factory: ClientSvcQueryableConstructor, methodName: string, params: IMethodParamsBuilder | null): T {\n\n const objectPaths = this._objectPaths.clone();\n\n objectPaths.add(method(methodName, params,\n // actions\n objectPath()));\n\n return new factory(this, objectPaths);\n }\n\n /**\n * Gets a property of the current instance\n * \n * @param factory Instance factory of the child type\n * @param propertyName Name of the property to load\n */\n protected getChildProperty(factory: ClientSvcQueryableConstructor, propertyName: string): T {\n\n const objectPaths = this._objectPaths.clone();\n\n objectPaths.add(property(propertyName));\n\n return new factory(this, objectPaths);\n }\n\n /**\n * Sends a request\n * \n * @param op \n * @param options \n * @param parser \n */\n protected send(objectPaths: ObjectPathQueue, options: FetchOptions = {}, parser: ODataParser = null): Promise {\n\n if (!objectDefinedNotNull(parser)) {\n // we assume here that we want to return for this index path\n parser = new ProcessQueryParser(objectPaths.last);\n }\n\n if (this.hasBatch) {\n\n // this is using the options variable to pass some extra information downstream to the batch\n options = extend(options, {\n clientsvc_ObjectPaths: objectPaths.clone(),\n });\n\n } else {\n\n if (!hOP(options, \"body\")) {\n options = extend(options, {\n body: objectPaths.toBody(),\n });\n }\n }\n\n return super.postCore(options, parser);\n }\n\n /**\n * Sends the request, merging the result data with a new instance of factory\n */\n protected sendGet(factory: ClientSvcQueryableConstructor): Promise<(DataType & FactoryType)> {\n\n const ops = this._objectPaths.clone().appendActionToLast(opQuery(this.getSelects()));\n\n return this.send(ops).then(r => extend(new factory(this), r));\n }\n\n /**\n * Sends the request, merging the result data array with a new instances of factory\n */\n protected sendGetCollection(factory: (d: DataType) => FactoryType): Promise<(DataType & FactoryType)[]> {\n\n const ops = this._objectPaths.clone().appendActionToLast(opQuery([], this.getSelects()));\n\n return this.send(ops).then(r => r.map(d => extend(factory(d), d)));\n }\n\n /**\n * Invokes the specified method on the server and returns the result\n * \n * @param methodName Name of the method to invoke\n * @param params Method parameters\n * @param actions Any additional actions to execute in addition to the method invocation (set property for example)\n */\n protected invokeMethod(methodName: string, params: IMethodParamsBuilder | null = null, ...actions: string[]): Promise {\n return this.invokeMethodImpl(methodName, params, actions, opQuery([], null));\n }\n\n /**\n * Invokes a method action that returns a single result and does not have an associated query (ex: GetDescription on Term)\n * \n * @param methodName Name of the method to invoke\n * @param params Method parameters\n * @param actions Any additional actions to execute in addition to the method invocation (set property for example)\n */\n protected invokeMethodAction(methodName: string, params: IMethodParamsBuilder | null = null, ...actions: string[]): Promise {\n return this.invokeMethodImpl(methodName, params, actions, null, true);\n }\n\n /**\n * Invokes the specified non-query method on the server\n * \n * @param methodName Name of the method to invoke\n * @param params Method parameters\n * @param actions Any additional actions to execute in addition to the method invocation (set property for example)\n */\n protected invokeNonQuery(methodName: string, params: IMethodParamsBuilder | null = null, ...actions: string[]): Promise {\n // by definition we are not returning anything from these calls so we should not be caching the results\n this._useCaching = false;\n return this.invokeMethodImpl(methodName, params, actions, null, true);\n }\n\n /**\n * Invokes the specified method on the server and returns the resulting collection\n * \n * @param methodName Name of the method to invoke\n * @param params Method parameters\n * @param actions Any additional actions to execute in addition to the method invocation (set property for example)\n */\n protected invokeMethodCollection(methodName: string, params: IMethodParamsBuilder | null = null, ...actions: string[]): Promise {\n return this.invokeMethodImpl(methodName, params, actions, opQuery([], []));\n }\n\n /**\n * Updates this instance, returning a copy merged with the updated data after the update\n * \n * @param properties Plain object of the properties and values to update\n * @param factory Factory method use to create a new instance of FactoryType\n */\n protected invokeUpdate(properties: any, factory: ClientSvcQueryableConstructor): Promise {\n\n const ops = this._objectPaths.clone();\n // append setting all the properties to this instance\n objectProperties(properties).map(a => ops.appendActionToLast(a));\n ops.appendActionToLast(opQuery([], null));\n return this.send(ops).then(r => extend(new factory(this), r));\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 return toAbsoluteUrl(this.toUrlAndQuery()).then(url => {\n\n mergeOptions(options, this._options);\n\n const headers = new Headers();\n\n mergeHeaders(headers, options.headers);\n\n mergeHeaders(headers, {\n \"accept\": \"*/*\",\n \"content-type\": \"text/xml\",\n });\n\n options = extend(options, { headers });\n\n // we need to do some special cache handling to ensure we have a good key\n if (this._useCaching) {\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.ProcessQueryClient(${getHashCode(this._objectPaths.toBody())})`;\n\n if (objectDefinedNotNull(this._cachingOptions)) {\n // if our key ends in the ProcessQuery url we overwrite it\n if (/\\/client\\.svc\\/ProcessQuery\\?$/i.test(this._cachingOptions.key)) {\n this._cachingOptions.key = cacheKey;\n }\n } else {\n this._cachingOptions = new CachingOptions(cacheKey);\n }\n }\n\n const dependencyDispose = this.hasBatch ? this.addBatchDependency() : () => { return; };\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._useCaching,\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 * Blocks a batch call from occuring, MUST be cleared by calling the returned function\n */\n protected addBatchDependency(): () => void {\n if (this._batch !== null) {\n return this._batch.addDependency();\n }\n\n return () => null;\n }\n\n /**\n * Indicates if the current query has a batch associated\n *\n */\n protected get hasBatch(): boolean {\n return objectDefinedNotNull(this._batch);\n }\n\n /**\n * The batch currently associated with this query or null\n *\n */\n protected get batch(): IObjectPathBatch {\n return this.hasBatch ? this._batch : null;\n }\n\n /**\n * Executes the actual invoke method call\n * \n * @param methodName Name of the method to invoke\n * @param params Method parameters\n * @param queryAction Specifies the query action to take\n */\n private invokeMethodImpl(methodName: string, params: IMethodParamsBuilder | null, actions: string[], queryAction: string, isAction = false): Promise {\n\n const ops = this._objectPaths.clone();\n\n if (isAction) {\n ops.appendActionToLast(methodAction(methodName, params));\n } else {\n ops.add(method(methodName, params, ...[objectPath(), ...actions, queryAction]));\n }\n\n return this.send(ops);\n }\n}\n","import { LogLevel, Logger } from \"@pnp/logging\";\nimport { CachingParserWrapper, ODataBatch, ODataBatchRequestInfo } from \"@pnp/odata\";\nimport { ClientSvcQueryable } from \"./clintsvcqueryable\";\nimport { ObjectPath, ObjectPathQueue, opSetId, opSetParentId, opSetPathId, opSetPathParamId } from \"./objectpath\";\nimport { objectPath } from \"./opactionbuilders\";\nimport { staticMethod } from \"./opbuilders\";\nimport { ProcessQueryParser } from \"./parsers\";\nimport { writeObjectPathBody } from \"./utils\";\n\nexport interface IObjectPathBatch extends ODataBatch {\n\n}\n\n/**\n * Implements ODataBatch for use with the ObjectPath framework\n */\nexport class ObjectPathBatch extends ODataBatch implements IObjectPathBatch {\n\n constructor(protected parentUrl: string, _batchId?: string) {\n super(_batchId);\n }\n\n protected executeImpl(): Promise {\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 const executor = new BatchExecutor(this.parentUrl, this.batchId);\n executor.appendRequests(this.requests);\n return executor.execute();\n }\n}\n\nclass BatchExecutor extends ClientSvcQueryable {\n\n private _builderIndex: number;\n private _requests: ODataBatchRequestInfo[];\n\n constructor(parentUrl: string, public batchId: string) {\n super(parentUrl);\n\n this._requests = [];\n this._builderIndex = 1;\n\n // we add our session object path and hard code in the IDs so we can reference it\n const method = staticMethod(\"GetTaxonomySession\", \"{981cbc68-9edc-4f8d-872f-71146fcbb84f}\");\n method.path = opSetId(\"0\", method.path);\n method.actions.push(opSetId(\"1\", opSetPathId(\"0\", objectPath())));\n\n this._objectPaths.add(method);\n }\n\n public appendRequests(requests: ODataBatchRequestInfo[]): void {\n\n requests.forEach(request => {\n\n // grab the special property we added to options when we created the batch info\n const pathQueue: ObjectPathQueue = (request.options).clientsvc_ObjectPaths;\n\n let paths = pathQueue.toArray();\n\n // getChildRelationships\n if (paths.length < 0) {\n return;\n }\n\n let indexMappingFunction = (n: number) => n;\n\n if (/GetTaxonomySession/i.test(paths[0].path)) {\n\n // drop the first thing as it is a get session object path, which we add once for the entire batch\n paths = paths.slice(1);\n\n // replace the next item's parent id with 0, which will be the id of the session call at the root of this request\n paths[0].path = opSetParentId(\"0\", paths[0].path);\n\n indexMappingFunction = (n: number) => n - 1;\n }\n\n let lastOpId = -1;\n const idIndexMap: number[] = [];\n\n paths.map((op, index, arr) => {\n\n // rewrite the path string\n const opId = ++this._builderIndex;\n\n // track the array index => opId relationship\n idIndexMap.push(opId);\n\n let path = opSetPathParamId(idIndexMap, opSetId(opId.toString(), op.path), indexMappingFunction);\n if (lastOpId >= 0) {\n path = opSetParentId(lastOpId.toString(), path);\n }\n\n // rewrite actions with placeholders replaced\n const opActions = op.actions.map(a => {\n const actionId = ++this._builderIndex;\n return opSetId(actionId.toString(), opSetPathId(opId.toString(), a));\n });\n\n // handle any specific child relationships\n // the childIndex is reduced by 1 because we are removing the Session Path\n pathQueue.getChildRelationship(index + 1).map(i => i - 1).forEach(childIndex => {\n // set the parent id for our non-immediate children\n arr[childIndex].path = opSetParentId(opId.toString(), arr[childIndex].path);\n });\n\n // and remember our last object path id for the parent replace above\n lastOpId = opId;\n\n // return our now substituted path and actions as a new object path instance\n return new ObjectPath(path, opActions);\n\n }).forEach(op => this._objectPaths.add(op));\n\n // get this once\n const obPaths = this._objectPaths.toArray();\n\n // create a new parser to handle finding the result based on the path\n const parser = new ProcessQueryParser(obPaths[obPaths.length - 1]);\n\n if (request.parser instanceof CachingParserWrapper) {\n // handle special case of caching\n request.parser = new ProcessQueryCachingParserWrapper(parser, request.parser);\n } else {\n request.parser = parser;\n }\n\n // add the request to our batch requests\n this._requests.push(request);\n\n // remove the temp property\n delete (request.options).clientsvc_ObjectPaths;\n });\n }\n\n public execute(): Promise {\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Executing batch with ${this._requests.length} requests.`, LogLevel.Info);\n\n // create our request body from all the merged object paths\n const options = {\n body: writeObjectPathBody(this._objectPaths.toArray()),\n };\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Sending batch request.`, LogLevel.Info);\n\n // send the batch\n return super.postCore(options, new BatchParser()).then((rawResponse: any) => {\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Resolving batched requests.`, LogLevel.Info);\n\n return this._requests.reduce((chain, request) => {\n\n Logger.write(`[${request.id}] (${(new Date()).getTime()}) Resolving request in batch ${this.batchId}.`, LogLevel.Info);\n\n return chain.then(_ => (request.parser).findResult(rawResponse).then(request.resolve).catch(request.reject));\n\n }, Promise.resolve());\n });\n }\n}\n\n/**\n * Used to return the raw results from parsing the batch\n */\nclass BatchParser extends ProcessQueryParser {\n\n constructor() {\n super(null);\n }\n\n public findResult(json: any): Promise {\n // we leave it to the individual request parsers to find their results in the raw json body\n return json;\n }\n}\n\n/**\n * Handles processing batched results that are also cached\n */\nclass ProcessQueryCachingParserWrapper extends CachingParserWrapper {\n\n constructor(parser: ProcessQueryParser, wrapper: CachingParserWrapper) {\n super(parser, wrapper.cacheOptions);\n }\n\n public findResult(json: any): Promise {\n return (this.parser).findResult(json).then((d: any) => this.cacheData(d));\n }\n}\n"],"names":["tslib_1.__extends","method"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IAC/B,aAAa,GAAG,MAAM,CAAC,cAAc;SAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC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