{"version":3,"file":"sp-clientsvc.es5.umd.min.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":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","objectPath","opQuery","selectProperties","childSelectProperties","builder","push","length","apply","map","join","setProperty","name","type","value","methodAction","params","arrParams","toArray","objectProperties","o","getOwnPropertyNames","property","_i","actions","ObjectPath","staticMethod","typeId","staticProperty","_p","MethodParams","initValues","a","toString","inputIndex","method","writeObjectPathBody","objectPaths","paths","forEach","op","path","id","replaceAfter","opSetId","xml","replace","opSetPathId","opSetParentId","opSetPathParamId","indexMapper","n","matches","exec","i","index","parseInt","regex","RegExp","_paths","_relationships","ObjectPathQueue","dirty","lastIndex","parentIndex","childIndex","objectDefinedNotNull","action","appendAction","last","clone","extend","_contextIndex","_siteIndex","_webIndex","slice","contextIndex","add","addChildRelationship","_xml","toIndexedTree","builderIndex","lastOpId","idIndexMap","arr","opId","_this","getChildRelationship","ProcessQueryParser","r","text","then","t","ok","Error","JSON","parse","e","parsed","hOP","ErrorInfo","jsS","findResult","json","result","test","getParsedResultById","getAttrValueFromString","IsNull","Promise","resolve","ProcessQueryPath","parent","_objectPaths","_super","_selects","_parentUrl","_url","combine","configureFrom","tslib_1.__extends","ClientSvcQueryable","selects","batch","_batch","toUrl","from","query","v","factory","methodName","propertyName","options","parser","hasBatch","clientsvc_ObjectPaths","body","toBody","postCore","ops","appendActionToLast","getSelects","send","invokeMethodImpl","_useCaching","properties","verb","pipeline","toAbsoluteUrl","toUrlAndQuery","url","mergeOptions","_options","headers","Headers","mergeHeaders","accept","content-type","cacheKey","getHashCode","_cachingOptions","key","CachingOptions","dependencyDispose","addBatchDependency","batchDependency","cachingOptions","clientFactory","SPHttpClient","isBatched","isCached","requestAbsoluteUrl","requestId","getGUID","addDependency","queryAction","isAction","Queryable","parentUrl","_batchId","ObjectPathBatch","requests","Logger","write","executor","BatchExecutor","batchId","appendRequests","execute","ODataBatch","_requests","_builderIndex","request","pathQueue","indexMappingFunction","opActions","obPaths","CachingParserWrapper","ProcessQueryCachingParserWrapper","Date","getTime","BatchParser","rawResponse","reduce","chain","_","catch","reject","wrapper","cacheOptions","cacheData"],"mappings":";;;;;;;;;4ZAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAK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