gd-sprest
Advanced tools
Comparing version 0.2.9 to 0.3.0
@@ -1,2 +0,2 @@ | ||
var $REST;!function(e){e.Library={},e.ExecuteOnCreationFl=!0;var t=function(){function t(t){this.targetInfo=t.settings,this.requestType=0,this.executeRequestFl="boolean"==typeof t.executeRequestFl?t.executeRequestFl:e.ExecuteOnCreationFl}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return!!this.request&&this.request.asyncFl},set:function(e){this.targetInfo.asyncFl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.request?this.request.response:null},enumerable:!0,configurable:!0}),t.prototype.done=function(e){this.promise?this.promise.done(e):null},t.prototype.execute=function(){var t=this;this.targetInfo.asyncFl?(this.promise=new e.Promise(this.targetInfo.callback),this.request=new e.Request(new e.TargetInfo(this.targetInfo),function(){t.updateDataObject()})):(this.request=new e.Request(new e.TargetInfo(this.targetInfo)),this.updateDataObject())},t.getAsyncInputParmeters=function(){for(var e=[],s=0;s<arguments.length;s++)e[s-0]=arguments[s];var r=t.getInputParmeters.apply(null,e);return r.settings.asyncFl=!0,r},t.getInputParmeters=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var s=null,r={executeRequestFl:null,settings:null};if(e&&e.length>0){if(1==e.length&&e[0].hasOwnProperty("executeRequestFl")&&e[0].hasOwnProperty("settings"))return e[0];"boolean"==typeof e[0]?(r.executeRequestFl=e[0],s=e[1]):(r.executeRequestFl=e[1],s=e[0])}return s?(r.settings={},"function"==typeof s?r.settings.callback=s:r.settings=s):r.settings={},r},t.prototype.addMethods=function(t,s){var r=s.results&&s.results.length>0,a=r?s.results[0].__metadata:s.__metadata,n=a&&a.type?a.type:this.targetInfo.endpoint;n=n.split("/"),n=n[n.length-1],n=n.split("."),n=n[n.length-1].toLowerCase(),n+=r?"s":"",/^field/.test(n)&&"fields"!=n?n="field"+(r?"s":""):/item$/.test(n)?n="listitem":/items$/.test(n)&&(n="items");var i=e.Library[n];if(i)for(var o in i)t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(i[o]?i[o]:{})+", arguments);")},t.prototype.addProperties=function(e,t){for(var s in t){var r=t[s];"__metadata"!=s&&"results"!=s&&(r&&r.__deferred&&r.__deferred.uri?e["get_"+s]=new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.executeMethod=function(s,r,a){var n=null,i=this.d?this.d.__metadata:this.__metadata;i&&i.uri?(n={url:i.uri},/^SP.Field/.test(i.type)&&(n.url=n.url.replace(/AvailableFields/,"fields")),r.inheritMetadataType&&(r.metadataType=i.type)):n=Object.create(this.targetInfo),n.asyncFl=this.targetInfo?this.targetInfo.asyncFl:this.asyncFl;var o=new e.MethodInfo(s,r,a);n.bufferFl=r.requestType==e.RequestType.GetBuffer,n.data=o.body,n.method=o.requestMethod,o.replaceEndpointFl?n.endpoint=o.url:o.url&&o.url.length>0&&(n.endpoint=(n.endpoint?n.endpoint+"/":"")+o.url);var u=new t({settings:n,executeRequestFl:!0});return u.parent=this,u.requestType=r.requestType,u.execute(),u},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo);r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var a=new t({settings:r,executeRequestFl:!0});return a.parent=this,a.execute(),a},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var s=0;s<e.length;s++)e[s].asyncFl=t.asyncFl,e[s].executeMethod=t.executeMethod,e[s].parent=t,t.addMethods(e[s],e[s])},10))},t.prototype.updateDataObject=function(){if(this.requestType==e.RequestType.GetBuffer)this.existsFl=null!=this.request.response;else{var t=this.request.response;t=""===t?"{}":t;var s=JSON.parse(t);this.existsFl="boolean"==typeof this.Exists?this.Exists:null==s.error,s.d&&(this.d=s.d,this.addProperties(this,s.d),this.addMethods(this,s.d),this.updateDataCollection(s.d.results))}this.promise?this.promise.resolve(this):null},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Promise(t),this.loadDependencies()}return Object.defineProperty(t.prototype,"MAX_WAIT",{get:function(){return 5},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SCRIPTS",{get:function(){return["MicrosoftAjax.js","init.js","sp.runtime.js","sp.js","sp.core.js","core.js"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageContextExistsFl",{get:function(){return window.hasOwnProperty("_spPageContextInfo")},enumerable:!0,configurable:!0}),t.prototype.loadDependencies=function(){if(this.pageContextExistsFl)this.promise.resolve();else{for(var e in this.SCRIPTS){var t=document.createElement("script");t.setAttribute("src","/_layouts/15/"+e),t.setAttribute("type","text/javascript"),document.head.appendChild(t)}this.waitForPageContext()}},t.prototype.waitForPageContext=function(){var e=0,t=window.setInterval(function(){(this.pageContextExists()||++e>=this.MAX_WAIT)&&(window.clearInterval(t),this.promise.resolve())},10)},t}();e.Dependencies=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(e,t,s){this.methodInfo=t,this.methodInfo.argValues=s,this.methodInfo.name="string"==typeof this.methodInfo.name?this.methodInfo.name:e,this.generateParams(),this.methodUrl=this.generateUrl()}return Object.defineProperty(t.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.RequestType.Delete:case e.RequestType.Post:case e.RequestType.PostWithArgs:case e.RequestType.PostWithArgsInBody:case e.RequestType.PostWithArgsInQS:case e.RequestType.PostWithArgsValueOnly:case e.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.RequestType.GetReplace||this.methodInfo.requestType==e.RequestType.PostReplace},enumerable:!0,configurable:!0}),t.prototype.generateParams=function(){var e={};if(null!=this.methodInfo.argValues){if(this.methodInfo.argNames)for(var t=0;t<this.methodInfo.argNames.length&&t<this.methodInfo.argValues.length;t++){var s=this.methodInfo.argNames[t],r=this.methodInfo.argValues[t];switch(typeof this.methodInfo.argValues[t]){case"boolean":e[s]=this.methodInfo.argValues[t]?"true":"false";break;case"number":e[s]=this.methodInfo.argValues[t];break;default:e[s]=r}}var a=!0;for(var n in e){a=!1;break}if(this.methodParams=a?null:e,this.methodParams&&this.isTemplate){"string"!=typeof this.methodInfo.data&&(this.methodInfo.data=JSON.stringify(this.methodInfo.data));for(var i in this.methodParams)this.methodInfo.data=this.methodInfo.data.replace("[["+i+"]]",this.methodParams[i].replace(/"/g,'\\"'));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&(null==this.methodInfo.argNames||this.methodInfo.argValues.length>this.methodInfo.argNames.length)&&(this.methodData=this.methodInfo.argValues[(this.methodInfo.argNames?this.methodInfo.argNames.length:-1)+1]),this.methodInfo.metadataType&&(this.methodInfo.argNames?this.methodData[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:this.methodData.__metadata={type:this.methodInfo.metadataType})}},t.prototype.generateUrl=function(){var t=this.methodInfo.name;if(this.methodInfo.requestType==e.RequestType.Delete&&(t="deleteObject"),this.passDataInBody){var s=this.methodData||this.methodParams;this.methodData=JSON.stringify(s)}if(this.passDataInQS){var s=this.methodParams||this.methodData;t+="(@v)?@v="+("string"==typeof s?"'"+encodeURIComponent(s)+"'":JSON.stringify(s))}if(this.replace)for(var r in this.methodParams)t=t.replace("[["+r+"]]",encodeURIComponent(this.methodParams[r]));else if(!this.passDataInBody&&!this.passDataInQS){var a="",s=this.methodParams||this.methodData;if(s){s=s&&"object"==typeof s?s:{value:s};for(var n in s){var i=s[n];switch(i="string"==typeof i?"'"+i+"'":i,this.methodInfo.requestType){case e.RequestType.GetWithArgsValueOnly:case e.RequestType.PostWithArgsValueOnly:a+=i+", ";break;default:a+=n+"="+i+", "}}}t+=a.length>0?"("+a.replace(/, $/,"")+")":""}return t},t}();e.MethodInfo=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function e(e){this.callback=e,this.resolvedFl=!1}return e.prototype.done=function(e){this.callback=e||this.callback,this.resolvedFl&&this.executeMethod()},e.prototype.resolve=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.args=e,this.resolvedFl=!0,this.executeMethod()},e.prototype.executeMethod=function(){this.callback&&"function"==typeof this.callback&&this.callback.apply(this,this.args)},e}();e.Promise=t}($REST||($REST={}));var $REST;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.Get=10]="Get",e[e.GetWithArgs=11]="GetWithArgs",e[e.GetWithArgsInBody=12]="GetWithArgsInBody",e[e.GetWithArgsInQS=13]="GetWithArgsInQS",e[e.GetWithArgsValueOnly=14]="GetWithArgsValueOnly",e[e.GetReplace=15]="GetReplace",e[e.Post=20]="Post",e[e.PostWithArgs=21]="PostWithArgs",e[e.PostWithArgsInBody=22]="PostWithArgsInBody",e[e.PostWithArgsInQS=23]="PostWithArgsInQS",e[e.PostWithArgsValueOnly=24]="PostWithArgsValueOnly",e[e.PostReplace=25]="PostReplace",e[e.GetAppendMethodToEndPoint=30]="GetAppendMethodToEndPoint",e[e.GetBuffer=31]="GetBuffer",e[e.GetDataAsParameter=32]="GetDataAsParameter",e[e.GetDataInBody=33]="GetDataInBody",e[e.GetDataInBodyNoArgs=34]="GetDataInBodyNoArgs",e[e.PostAppendMethodToEndPoint=35]="PostAppendMethodToEndPoint",e[e.PostDataAsParameter=36]="PostDataAsParameter",e[e.PostDataInBody=37]="PostDataInBody",e[e.PostDataInBodyNoArgs=38]="PostDataInBodyNoArgs"}(e.RequestType||(e.RequestType={}));var t=(e.RequestType,function(){function t(t,s){this.promise=new e.Promise(s||t.callback),this.targetInfo=t,this.xhr=this.createXHR(),this.executeRequest()}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.xhr?this.xhr.response:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"request",{get:function(){return this.xhr?this.xhr:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestData",{get:function(){return this.targetInfo.requestData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestUrl",{get:function(){return this.xhr?this.xhr.responseURL:null},enumerable:!0,configurable:!0}),t.prototype.createXHR=function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}throw new Error("This browser does not support xml http requests.")},t.prototype.defaultHeaders=function(){var e=document.querySelector("#__REQUESTDIGEST");if(e=e?e.value:"",this.xhr.setRequestHeader("Accept","application/json;odata=verbose"),this.xhr.setRequestHeader("Content-Type","application/json;odata=verbose"),this.xhr.setRequestHeader("X-HTTP-Method",this.targetInfo.requestMethod),this.xhr.setRequestHeader("X-RequestDigest",e),"DELETE"!=this.targetInfo.requestMethod&&"MERGE"!=this.targetInfo.requestMethod||this.xhr.setRequestHeader("IF-MATCH","*"),this.targetInfo.requestHeaders)for(var t in this.targetInfo.requestHeaders)this.xhr.setRequestHeader(t,this.targetInfo.requestHeaders[t])},t.prototype.executeRequest=function(){var e=this;return null==this.xhr?null:(this.xhr.open("GET"==this.targetInfo.requestMethod?"GET":"POST",this.targetInfo.requestUrl,this.targetInfo.asyncFl),this.targetInfo.asyncFl&&(this.xhr.onreadystatechange=function(){4==e.xhr.readyState&&e.promise.resolve(e)}),this.targetInfo.bufferFl&&this.targetInfo.asyncFl?this.xhr.responseType="arraybuffer":(this.defaultHeaders(),this.targetInfo.requestData&&"string"!=typeof this.targetInfo.requestData&&(this.targetInfo.requestData=this.targetInfo.requestData.byteLength?this.targetInfo.requestData:JSON.stringify(this.targetInfo.requestData))),void(this.targetInfo.bufferFl?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}());e.Request=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function e(e){this.targetInfo=e||{},this.requestData=this.targetInfo.data,this.requestMethod=this.targetInfo.method?this.targetInfo.method:"GET",this.targetInfo.asyncFl=!!this.targetInfo.asyncFl,this.setRequestUrl()}return Object.defineProperty(e.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferFl",{get:function(){return this.targetInfo.bufferFl},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callback",{get:function(){return this.targetInfo.callback},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return window._spPageContextInfo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAppWeb",{get:function(){return this.context.isAppWeb},enumerable:!0,configurable:!0}),e.prototype.getDomainUrl=function(){var e=document.location.href;return this.isAppWeb&&(e=this.getQueryStringValue("SPHostUrl")+""),e=e.split("/"),e&&e.length>=2&&(e=e[0]+"//"+e[2]),e},e.prototype.getQueryStringValue=function(e){var t=document.location.href.split("?");t=t.length>1?t[1]:t[0];for(var s=t.split("&"),r=0;r<s.length;r++){var a=s[r].split("=");if(1!=a.length&&decodeURIComponent(a[0])==e)return decodeURIComponent(a[1])}return null},e.prototype.setRequestUrl=function(){var e="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(null==this.targetInfo.url)this.targetInfo.url=this.context[this.targetInfo.defaultToWebFl?"webAbsoluteUrl":"siteAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){if(this.isAppWeb){var t=this.targetInfo.url.split("/_api/");this.requestUrl=t[0]+"/_api/SP.AppContextSite(@target)/"+t[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+this.getQueryStringValue("SPHostUrl")+"'"}else this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"");return}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb){var s=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=e.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+s).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=e.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},e}();e.TargetInfo=t}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];return t.call(this,e.Base.getInputParmeters.apply(null,a)),new e.ContentTypes(r,this.targetInfo,(!1)).getByName(s)}return __extends(s,t),s}(e.Base);e.ContentType=t,e.Library.contenttype={addFieldLink:{name:"fieldlinks",metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},delete:{requestType:e.RequestType.Delete},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"contenttypes",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"contenttypes"}})}return __extends(s,t),s}(e.Base);e.ContentTypes=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.ContentTypes_Async=s,e.Library.contenttypes={add:{argNames:["data"],metadataType:"SP.ContentType",requestType:e.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a));var i=new e.Fields(r,this.targetInfo,(!1));return i.getByInternalNameOrTitle(s)}return __extends(s,t),s}(e.Base);e.Field=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Field_Async=s,e.Library.field={delete:{requestType:e.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Field",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"fields",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"fields"}})}return __extends(s,t),s}(e.Base);e.Fields=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Fields_Async=s,e.Library.fields={add:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",requestType:e.RequestType.PostWithArgsInBody},addDependentLookup:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.RequestType.PostWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/files/getByUrl('":"getFileByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"file"}})}return __extends(s,t),s}(e.Base);e.File=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.File_Async=s,e.Library.file={approve:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},checkin:{argNames:["checkin","checkInType"],requestType:e.RequestType.PostWithArgs},checkout:{requestType:e.RequestType.Post},content:{name:"$value",requestType:e.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},deny:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.RequestType.PostReplace},openBinaryStream:{requestType:e.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},saveBinaryStream:{requestType:e.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},recycle:{requestType:e.RequestType.Get},undoCheckOut:{requestType:e.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"rootfolder/files",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"files"}})}return __extends(s,t),s}(e.Base);e.Files=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Files_Async=s,e.Library.files={add:{argNames:["overwrite","url"],requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.RequestType.PostWithArgs},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/folders/getByUrl('":"getFolderByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folder"}})}return __extends(s,t),s}(e.Base);e.Folder=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Folder_Async=s,e.Library.folder={addFile:{argNames:["url","overwrite"],name:"files/add",requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],name:"files/addtemplatefile",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getFile:{argNames:["name"],name:"files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSubFolder:{argNames:["name"],name:"folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/rootfolder/":"")+"folders",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folders"}})}return __extends(s,t),s}(e.Base);e.Folders=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Folders_Async=s,e.Library.folders={add:{argNames:["url"],requestType:e.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={containsUser:{argNames:["userId"],name:"users?$filter=Id eq [[userId]]",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];if(t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/items",r){var i=new e.List(s,this.targetInfo,(!1));return i[/^<View/.test(r)?"getItems":"getItemsByQuery"](r)}this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"items"}})}return __extends(s,t),s}(e.Base);e.ListItems=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItems_Async=s,e.Library.items={add:{metadataType:"SP.ListItem",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"list"}})}return __extends(s,t),s}(e.Base);e.List=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.List_Async=s,e.Library.list={addAvailableContentType:{argNames:["contentTypeId"],name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addContentType:{argNames:["data"],metadataType:"SP.ContentType",name:"contenttypes/add",requestType:e.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],name:"fields/addDependentLookupField",requestType:e.RequestType.PostWithArgs},addItem:{metadataType:"SP.ListItem",name:"items",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["principalid","roledefid"],name:"roleassignments/addroleassignment",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},addView:{metadataType:"SP.View",name:"views",requestType:e.RequestType.PostWithArgsInBody},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContentType:{argNames:["name"],name:"contenttypes?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getContentTypeById:{argNames:["id"],name:"contenttypes/getById([[id]])", | ||
requestType:e.RequestType.GetReplace},getDefaultDisplayForm:{name:"forms?$filter=FormType eq 4",requestType:e.RequestType.GetReplace},getDefaultEditForm:{name:"forms?$filter=FormType eq 6",requestType:e.RequestType.GetReplace},getDefaultNewForm:{name:"forms?$filter=FormType eq 8",requestType:e.RequestType.GetReplace},getForm:{argNames:["formType"],name:"forms?$filter=FormType eq [[formType]]",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByInternalNameOrTitle:{argNames:["internalNameOrTitle"],name:"fields/getByInternalNameOrTitle",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByTitle:{argNames:["title"],name:"fields/getByTitle",requestType:e.RequestType.PostWithArgsValueOnly},getSubFolder:{argNames:["serverRelativeUrl"],name:"folders/getbyurl",requestType:e.RequestType.GetWithArgsValueOnly},getItemById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getItemByTitle:{argNames:["title"],name:"items?$filter Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getItems:{argNames:["viewXml"],requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByFilter:{argNames:["filter"],name:"items?$filter=[[filter]]",requestType:e.RequestType.GetWithArgsValueOnly},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsInQS},getViewById:{argNames:["viewId"],name:"getView",requestType:e.RequestType.GetWithArgsValueOnly},getViewByTitle:{argNames:["title"],name:"views?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},recycle:{requestType:e.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.RequestType.PostWithArgs},reserveListItemId:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/items("+s+")",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"listItem"}})}return __extends(s,t),s}(e.Base);e.ListItem=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItem_Async=s,e.Library.listitem={addAttachment:{argNames:["name"],name:"attachmentfiles/add",requestType:e.RequestType.PostWithArgs},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},recycle:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"lists"}})}return __extends(s,t),s}(e.Base);e.Lists=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Lists_Async=s,e.Library.lists={add:{metadataType:"SP.List",requestType:e.RequestType.PostWithArgs},ensureSiteAssetsLibrary:{requestType:e.RequestType.Post},ensureSitePagesLibrary:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"roleassignments",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roleassignments"}})}return __extends(s,t),s}(e.Base);e.RoleAssignments=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.RoleAssignments_Async=s,e.Library.roleAssignments={addRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs},getByPrincipalId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},removeRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/roledefinitions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roledefinitions"}})}return __extends(s,t),s}(e.Base);e.RoleDefinitions=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.RoleDefinitions_Async=s,e.Library.roledefinitions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},getByType:{argNames:["type"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.searchservice={}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters(s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Site_Async=s,e.Library.site={addCustomAction:{argNames:["data"],metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{argNames:["web"],requestType:e.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.RequestType.PostWithArgs},invalidate:{requestType:e.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.RequestType.PostWithArgs},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/sitegroups",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"sitegroups"}})}return __extends(s,t),s}(e.Base);e.SiteGroups=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.SiteGroups_Async=s,e.Library.siteGroups={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("feed/post",null,e,!0)}},{name:"getFeed",function:function(){return this.executeGet("feed")}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestfeedmanager={},e.Library.socialrestfeedmanager[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("my/feed/post",null,e,!0)}},{name:"deletePost",function:function(e){return this.executePost("post/delete",null,{ID:e},!0)}},{name:"getMyFeed",function:function(){return this.executeGet("my/feed")}},{name:"getMyInfo",function:function(){return this.executeGet("my")}},{name:"getMyLikes",function:function(){return this.executeGet("my/likes")}},{name:"getMyMentionFeed",function:function(){return this.executeGet("my/mentionfeed")}},{name:"getMyNews",function:function(){return this.executeGet("my/news")}},{name:"getMyTimeLineFeed",function:function(){return this.executeGet("my/timelinefeed")}},{name:"getMyUnreadMentionCount",function:function(){return this.executeGet("my/unreadmentioncount")}},{name:"getPost",function:function(e){return this.executePost("post",null,{ID:e},!0)}},{name:"getPostLikers",function:function(e){return this.executePost("post/likers",null,{ID:e},!0)}},{name:"getUser",function:function(e){return 0==e.indexOf("i:0#.f|")?this.executeGet("actor",null,e):this.executeGet("actor",e)}},{name:"likePost",function:function(e){return this.executePost("post/like",null,{ID:e},!0)}},{name:"lockPost",function:function(e){return this.executePost("post/lock",null,{ID:e},!0)}},{name:"replyToPost",function:function(e,t){return t={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:e,creationData:t}},t.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("post/reply",null,t,!0)}},{name:"unlikePost",function:function(e){return this.executePost("post/unlike",null,{ID:e},!0)}},{name:"unlockPost",function:function(e){return this.executePost("post/unlock",null,{ID:e},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestthread={},e.Library.socialrestthread[e.RequestType.Custom]=[{name:"delete",function:function(e){return this.executePost("delete",null,{ID:e||this.ID},!0)}},{name:"like",function:function(e){return this.executePost("like",null,{ID:e||this.ID},!0)}},{name:"lock",function:function(e){return this.executePost("lock",null,{ID:e||this.ID},!0)}},{name:"reply",function:function(e,t){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:t||this.ID,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("reply",null,e,!0)}},{name:"unlike",function:function(e){return this.executePost("unlike",null,{ID:e||this.ID},!0)}},{name:"unlock",function:function(e){return this.executePost("unlock",null,{ID:e||this.ID},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl="boolean"==typeof s&&s,this.targetInfo.endpoint=(this.defaultToWebFl?"web":"site")+"/usercustomactions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"usercustomactions"}})}return __extends(s,t),s}(e.Base);e.UserCustomActions=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.UserCustomActions_Async=s,e.Library.usercustomactions={clear:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?filter=Name eq '[[name]]'",requestType:e.RequestType.PostReplace},getByTitle:{argNames:["title"],name:"?filter=Title eq '[[title]]'",requestType:e.RequestType.PostReplace}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/users",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"users"}})}return __extends(s,t),s}(e.Base);e.Users=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Users_Async=s,e.Library.users={getByEmail:{argNames:["email"],requestType:e.RequestType.GetWithArgsValueOnly},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByLoginName:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},deleteAll:{requestType:e.RequestType.Post},deleteById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/views/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"view"}})}return __extends(s,t),s}(e.Base);e.View=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.View_Async=s,e.Library.view={delete:{requestType:e.RequestType.Delete},renderAsHtml:{requestType:e.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.RequestType.PostWithArgsInBody},removeAllViewFields:{requestType:e.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/views",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"views"}})}return __extends(s,t),s}(e.Base);e.Views=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Views_Async=s,e.Library.views={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"web"}})}return __extends(s,t),s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Web=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Web_Async=s,e.Library.web={addContentType:{metadataType:"SP.ContentType",name:"contenttypes",requestType:e.RequestType.PostWithArgsInBody},addCustomAction:{metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},addExistingContentType:{name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addField:{metadataType:"SP.Field",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addFile:{argNames:["url","overwrite"],name:"rootfolder/files/add",requestType:e.RequestType.PostWithArgs},addList:{metadataType:"SP.List",name:"lists",requestType:e.RequestType.PostWithArgsInBody},addPermission:{metadataType:"SP.RoleDefinition",name:"roledefinitions",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["Title"],metadataType:"SP.Group",name:"sitegroups",requestType:e.RequestType.PostWithArgsInBody},addSubFolder:{name:"rootfolder/folders/add",requestType:e.RequestType.PostWithArgsValueOnly},applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.RequestType.PostWithArgs},applyWebTemplate:{requestType:e.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},doesPushNotificationSubscriberExist:{requestType:e.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.RequestType.Post},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{requestType:e.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.RequestType.PostWithArgs},getField:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]' or InternalName eq '[[title]]' or StaticName eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.GetWithArgsValueOnly},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFile:{argNames:["name"],name:"rootfolder/files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getList:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getListById:{argNames:["id"],name:"lists/getById",requestType:e.RequestType.GetWithArgsValueOnly},getListByTitle:{argNames:["title"],name:"lists/getByTitle",requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscriber:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},getSubFolder:{argNames:["name"],name:"rootfolder/folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSiteGroupById:{argNames:["id"],name:"sitegroups/getById",requestType:e.RequestType.GetWithArgsValueOnly},getSiteGroupByName:{argNames:["name"],name:"sitegroups/getByName",requestType:e.RequestType.GetWithArgsValueOnly},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.RequestType.GetWithArgs},getUserByEmail:{argNames:["email"],name:"siteusers/getByEmail",requestType:e.RequestType.GetWithArgsValueOnly},getUserById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getUserByLogin:{argNames:["loginName"],name:"siteusers/getByLoginName",requestType:e.RequestType.GetWithArgsValueOnly},getUserEffectivePermissions:{requestType:e.RequestType.GetWithArgsInQS},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.RequestType.GetWithArgs},processExternalNotification:{requestType:e.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.RequestType.PostWithArgs},resetRoleInheritance:{argNames:[],requestType:e.RequestType.Post},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},unregisterPushNotificationSubscriber:{requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={})); | ||
var $REST;!function(e){e.DefaultRequestToHostWebFl=!1,e.ExecuteOnCreationFl=!0,e.Library={};var t=function(){function t(t){this.targetInfo=t.settings,this.requestType=0,this.executeRequestFl="boolean"==typeof t.executeRequestFl?t.executeRequestFl:e.ExecuteOnCreationFl}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return!!this.request&&this.request.asyncFl},set:function(e){this.targetInfo.asyncFl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.request?this.request.response:null},enumerable:!0,configurable:!0}),t.prototype.done=function(e){this.promise?this.promise.done(e):null},t.prototype.execute=function(){var t=this;this.targetInfo.asyncFl?(this.promise=new e.Promise(this.targetInfo.callback),this.request=new e.Request(new e.TargetInfo(this.targetInfo),function(){t.updateDataObject()})):(this.request=new e.Request(new e.TargetInfo(this.targetInfo)),this.updateDataObject())},t.getAsyncInputParmeters=function(){for(var e=[],s=0;s<arguments.length;s++)e[s-0]=arguments[s];var r=t.getInputParmeters.apply(null,e);return r.settings.asyncFl=!0,r},t.getInputParmeters=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var s=null,r={executeRequestFl:null,settings:null};if(e&&e.length>0){if(1==e.length&&e[0].hasOwnProperty("executeRequestFl")&&e[0].hasOwnProperty("settings"))return e[0];"boolean"==typeof e[0]?(r.executeRequestFl=e[0],s=e[1]):(r.executeRequestFl=e[1],s=e[0])}return s?(r.settings={},"function"==typeof s?r.settings.callback=s:r.settings=s):r.settings={},r},t.prototype.addMethods=function(t,s){var r=s.results&&s.results.length>0,a=r?s.results[0].__metadata:s.__metadata,n=a&&a.type?a.type:this.targetInfo.endpoint;n=n.split("/"),n=n[n.length-1],n=n.split("."),n=n[n.length-1].toLowerCase(),n+=r?"s":"",/^field/.test(n)&&"fields"!=n?n="field"+(r?"s":""):/item$/.test(n)?n="listitem":/items$/.test(n)&&(n="items");var i=e.Library[n];if(i)for(var o in i)t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(i[o]?i[o]:{})+", arguments);")},t.prototype.addProperties=function(e,t){for(var s in t){var r=t[s];"__metadata"!=s&&"results"!=s&&(r&&r.__deferred&&r.__deferred.uri?e["get_"+s]=new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.executeMethod=function(s,r,a){var n=null,i=this.d?this.d.__metadata:this.__metadata;i&&i.uri?(n={url:i.uri},/^SP.Field/.test(i.type)&&(n.url=n.url.replace(/AvailableFields/,"fields")),r.inheritMetadataType&&(r.metadataType=i.type)):n=Object.create(this.targetInfo),n.asyncFl=this.targetInfo?this.targetInfo.asyncFl:this.asyncFl;var o=new e.MethodInfo(s,r,a);n.bufferFl=r.requestType==e.RequestType.GetBuffer,n.data=o.body,n.method=o.requestMethod,o.replaceEndpointFl?n.endpoint=o.url:o.url&&o.url.length>0&&(n.endpoint=(n.endpoint?n.endpoint+"/":"")+o.url);var u=new t({settings:n,executeRequestFl:!0});return u.parent=this,u.requestType=r.requestType,u.execute(),u},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo);r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var a=new t({settings:r,executeRequestFl:!0});return a.parent=this,a.execute(),a},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var s=0;s<e.length;s++)e[s].asyncFl=t.asyncFl,e[s].executeMethod=t.executeMethod,e[s].parent=t,t.addMethods(e[s],e[s])},10))},t.prototype.updateDataObject=function(){if(this.requestType==e.RequestType.GetBuffer)this.existsFl=null!=this.request.response;else{var t=this.request.response;t=""===t?"{}":t;var s=JSON.parse(t);this.existsFl="boolean"==typeof this.Exists?this.Exists:null==s.error,s.d&&(this.d=s.d,this.addProperties(this,s.d),this.addMethods(this,s.d),this.updateDataCollection(s.d.results))}this.promise?this.promise.resolve(this):null},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Promise(t),this.loadDependencies()}return Object.defineProperty(t.prototype,"MAX_WAIT",{get:function(){return 5},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SCRIPTS",{get:function(){return["MicrosoftAjax.js","init.js","sp.runtime.js","sp.js","sp.core.js","core.js"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageContextExistsFl",{get:function(){return window.hasOwnProperty("_spPageContextInfo")},enumerable:!0,configurable:!0}),t.prototype.loadDependencies=function(){if(this.pageContextExistsFl)this.promise.resolve();else{for(var e in this.SCRIPTS){var t=document.createElement("script");t.setAttribute("src","/_layouts/15/"+e),t.setAttribute("type","text/javascript"),document.head.appendChild(t)}this.waitForPageContext()}},t.prototype.waitForPageContext=function(){var e=0,t=window.setInterval(function(){(this.pageContextExists()||++e>=this.MAX_WAIT)&&(window.clearInterval(t),this.promise.resolve())},10)},t}();e.Dependencies=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(e,t,s){this.methodInfo=t,this.methodInfo.argValues=s,this.methodInfo.name="string"==typeof this.methodInfo.name?this.methodInfo.name:e,this.generateParams(),this.methodUrl=this.generateUrl()}return Object.defineProperty(t.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.RequestType.Delete:case e.RequestType.Post:case e.RequestType.PostWithArgs:case e.RequestType.PostWithArgsInBody:case e.RequestType.PostWithArgsInQS:case e.RequestType.PostWithArgsValueOnly:case e.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.RequestType.GetReplace||this.methodInfo.requestType==e.RequestType.PostReplace},enumerable:!0,configurable:!0}),t.prototype.generateParams=function(){var e={};if(null!=this.methodInfo.argValues){if(this.methodInfo.argNames)for(var t=0;t<this.methodInfo.argNames.length&&t<this.methodInfo.argValues.length;t++){var s=this.methodInfo.argNames[t],r=this.methodInfo.argValues[t];switch(typeof this.methodInfo.argValues[t]){case"boolean":e[s]=this.methodInfo.argValues[t]?"true":"false";break;case"number":e[s]=this.methodInfo.argValues[t];break;default:e[s]=r}}var a=!0;for(var n in e){a=!1;break}if(this.methodParams=a?null:e,this.methodParams&&this.isTemplate){"string"!=typeof this.methodInfo.data&&(this.methodInfo.data=JSON.stringify(this.methodInfo.data));for(var i in this.methodParams)this.methodInfo.data=this.methodInfo.data.replace("[["+i+"]]",this.methodParams[i].replace(/"/g,'\\"'));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&(null==this.methodInfo.argNames||this.methodInfo.argValues.length>this.methodInfo.argNames.length)&&(this.methodData=this.methodInfo.argValues[(this.methodInfo.argNames?this.methodInfo.argNames.length:-1)+1]),this.methodInfo.metadataType&&(this.methodInfo.argNames?this.methodData[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:this.methodData.__metadata={type:this.methodInfo.metadataType})}},t.prototype.generateUrl=function(){var t=this.methodInfo.name;if(this.methodInfo.requestType==e.RequestType.Delete&&(t="deleteObject"),this.passDataInBody){var s=this.methodData||this.methodParams;this.methodData=JSON.stringify(s)}if(this.passDataInQS){var s=this.methodParams||this.methodData;t+="(@v)?@v="+("string"==typeof s?"'"+encodeURIComponent(s)+"'":JSON.stringify(s))}if(this.replace)for(var r in this.methodParams)t=t.replace("[["+r+"]]",encodeURIComponent(this.methodParams[r]));else if(!this.passDataInBody&&!this.passDataInQS){var a="",s=this.methodParams||this.methodData;if(s){s=s&&"object"==typeof s?s:{value:s};for(var n in s){var i=s[n];switch(i="string"==typeof i?"'"+i+"'":i,this.methodInfo.requestType){case e.RequestType.GetWithArgsValueOnly:case e.RequestType.PostWithArgsValueOnly:a+=i+", ";break;default:a+=n+"="+i+", "}}}t+=a.length>0?"("+a.replace(/, $/,"")+")":""}return t},t}();e.MethodInfo=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function e(e){this.callback=e,this.resolvedFl=!1}return e.prototype.done=function(e){this.callback=e||this.callback,this.resolvedFl&&this.executeMethod()},e.prototype.resolve=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.args=e,this.resolvedFl=!0,this.executeMethod()},e.prototype.executeMethod=function(){this.callback&&"function"==typeof this.callback&&this.callback.apply(this,this.args)},e}();e.Promise=t}($REST||($REST={}));var $REST;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.Get=10]="Get",e[e.GetWithArgs=11]="GetWithArgs",e[e.GetWithArgsInBody=12]="GetWithArgsInBody",e[e.GetWithArgsInQS=13]="GetWithArgsInQS",e[e.GetWithArgsValueOnly=14]="GetWithArgsValueOnly",e[e.GetReplace=15]="GetReplace",e[e.Post=20]="Post",e[e.PostWithArgs=21]="PostWithArgs",e[e.PostWithArgsInBody=22]="PostWithArgsInBody",e[e.PostWithArgsInQS=23]="PostWithArgsInQS",e[e.PostWithArgsValueOnly=24]="PostWithArgsValueOnly",e[e.PostReplace=25]="PostReplace",e[e.GetAppendMethodToEndPoint=30]="GetAppendMethodToEndPoint",e[e.GetBuffer=31]="GetBuffer",e[e.GetDataAsParameter=32]="GetDataAsParameter",e[e.GetDataInBody=33]="GetDataInBody",e[e.GetDataInBodyNoArgs=34]="GetDataInBodyNoArgs",e[e.PostAppendMethodToEndPoint=35]="PostAppendMethodToEndPoint",e[e.PostDataAsParameter=36]="PostDataAsParameter",e[e.PostDataInBody=37]="PostDataInBody",e[e.PostDataInBodyNoArgs=38]="PostDataInBodyNoArgs"}(e.RequestType||(e.RequestType={}));var t=(e.RequestType,function(){function t(t,s){this.promise=new e.Promise(s||t.callback),this.targetInfo=t,this.xhr=this.createXHR(),this.executeRequest()}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.xhr?this.xhr.response:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"request",{get:function(){return this.xhr?this.xhr:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestData",{get:function(){return this.targetInfo.requestData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestUrl",{get:function(){return this.xhr?this.xhr.responseURL:null},enumerable:!0,configurable:!0}),t.prototype.createXHR=function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}throw new Error("This browser does not support xml http requests.")},t.prototype.defaultHeaders=function(){var e=document.querySelector("#__REQUESTDIGEST");if(e=e?e.value:"",this.xhr.setRequestHeader("Accept","application/json;odata=verbose"),this.xhr.setRequestHeader("Content-Type","application/json;odata=verbose"),this.xhr.setRequestHeader("X-HTTP-Method",this.targetInfo.requestMethod),this.xhr.setRequestHeader("X-RequestDigest",e),"DELETE"!=this.targetInfo.requestMethod&&"MERGE"!=this.targetInfo.requestMethod||this.xhr.setRequestHeader("IF-MATCH","*"),this.targetInfo.requestHeaders)for(var t in this.targetInfo.requestHeaders)this.xhr.setRequestHeader(t,this.targetInfo.requestHeaders[t])},t.prototype.executeRequest=function(){var e=this;return null==this.xhr?null:(this.xhr.open("GET"==this.targetInfo.requestMethod?"GET":"POST",this.targetInfo.requestUrl,this.targetInfo.asyncFl),this.targetInfo.asyncFl&&(this.xhr.onreadystatechange=function(){4==e.xhr.readyState&&e.promise.resolve(e)}),this.targetInfo.bufferFl&&this.targetInfo.asyncFl?this.xhr.responseType="arraybuffer":(this.defaultHeaders(),this.targetInfo.requestData&&"string"!=typeof this.targetInfo.requestData&&(this.targetInfo.requestData=this.targetInfo.requestData.byteLength?this.targetInfo.requestData:JSON.stringify(this.targetInfo.requestData))),void(this.targetInfo.bufferFl?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}());e.Request=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(e){this.targetInfo=e||{},this.requestData=this.targetInfo.data,this.requestMethod=this.targetInfo.method?this.targetInfo.method:"GET",this.targetInfo.asyncFl=!!this.targetInfo.asyncFl,this.setRequestUrl()}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bufferFl",{get:function(){return this.targetInfo.bufferFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"callback",{get:function(){return this.targetInfo.callback},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return window._spPageContextInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAppWeb",{get:function(){return this.context.isAppWeb},enumerable:!0,configurable:!0}),t.prototype.getDomainUrl=function(){var e=document.location.href;return this.isAppWeb&&(e=this.getQueryStringValue("SPHostUrl")+""),e=e.split("/"),e&&e.length>=2&&(e=e[0]+"//"+e[2]),e},t.prototype.getQueryStringValue=function(e){var t=document.location.href.split("?");t=t.length>1?t[1]:t[0];for(var s=t.split("&"),r=0;r<s.length;r++){var a=s[r].split("=");if(1!=a.length&&decodeURIComponent(a[0])==e)return decodeURIComponent(a[1])}return null},t.prototype.setRequestUrl=function(){var t="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(e.DefaultRequestToHostWebFl&&this.isAppWeb&&null==this.targetInfo.url&&(this.targetInfo.url=this.getQueryStringValue("SPHostUrl")),null==this.targetInfo.url)this.targetInfo.url=this.context[this.targetInfo.defaultToWebFl?"webAbsoluteUrl":"siteAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){if(this.isAppWeb){var s=this.targetInfo.url.split("/_api/");this.requestUrl=s[0]+"/_api/SP.AppContextSite(@target)/"+s[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+this.getQueryStringValue("SPHostUrl")+"'"}else this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"");return}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb){var r=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=t.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+r).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=t.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},t}();e.TargetInfo=t}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];return t.call(this,e.Base.getInputParmeters.apply(null,a)),new e.ContentTypes(r,this.targetInfo,(!1)).getByName(s)}return __extends(s,t),s}(e.Base);e.ContentType=t,e.Library.contenttype={addFieldLink:{name:"fieldlinks",metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},delete:{requestType:e.RequestType.Delete},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"contenttypes",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"contenttypes"}})}return __extends(s,t),s}(e.Base);e.ContentTypes=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.ContentTypes_Async=s,e.Library.contenttypes={add:{argNames:["data"],metadataType:"SP.ContentType",requestType:e.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a));var i=new e.Fields(r,this.targetInfo,(!1));return i.getByInternalNameOrTitle(s)}return __extends(s,t),s}(e.Base);e.Field=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Field_Async=s,e.Library.field={delete:{requestType:e.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Field",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"fields",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"fields"}})}return __extends(s,t),s}(e.Base);e.Fields=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Fields_Async=s,e.Library.fields={add:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",requestType:e.RequestType.PostWithArgsInBody},addDependentLookup:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.RequestType.PostWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/files/getByUrl('":"getFileByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"file"}})}return __extends(s,t),s}(e.Base);e.File=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.File_Async=s,e.Library.file={approve:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},checkin:{argNames:["checkin","checkInType"],requestType:e.RequestType.PostWithArgs},checkout:{requestType:e.RequestType.Post},content:{name:"$value",requestType:e.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},deny:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.RequestType.PostReplace},openBinaryStream:{requestType:e.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},saveBinaryStream:{requestType:e.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},recycle:{requestType:e.RequestType.Get},undoCheckOut:{requestType:e.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"rootfolder/files",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"files"}})}return __extends(s,t),s}(e.Base);e.Files=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Files_Async=s,e.Library.files={add:{argNames:["overwrite","url"],requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.RequestType.PostWithArgs},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/folders/getByUrl('":"getFolderByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folder"}})}return __extends(s,t),s}(e.Base);e.Folder=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Folder_Async=s,e.Library.folder={addFile:{argNames:["url","overwrite"],name:"files/add",requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],name:"files/addtemplatefile",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getFile:{argNames:["name"],name:"files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSubFolder:{argNames:["name"],name:"folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/rootfolder/":"")+"folders",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folders"}})}return __extends(s,t),s}(e.Base);e.Folders=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Folders_Async=s,e.Library.folders={add:{argNames:["url"],requestType:e.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={containsUser:{argNames:["userId"],name:"users?$filter=Id eq [[userId]]",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];if(t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/items",r){var i=new e.List(s,this.targetInfo,(!1));return i[/^<View/.test(r)?"getItems":"getItemsByQuery"](r)}this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"items"}})}return __extends(s,t),s}(e.Base);e.ListItems=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItems_Async=s,e.Library.items={add:{metadataType:"SP.ListItem",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"list"}})}return __extends(s,t),s}(e.Base);e.List=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.List_Async=s,e.Library.list={addAvailableContentType:{argNames:["contentTypeId"],name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addContentType:{argNames:["data"],metadataType:"SP.ContentType",name:"contenttypes/add",requestType:e.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],name:"fields/addDependentLookupField",requestType:e.RequestType.PostWithArgs},addItem:{metadataType:"SP.ListItem",name:"items",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["principalid","roledefid"],name:"roleassignments/addroleassignment",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},addView:{metadataType:"SP.View",name:"views",requestType:e.RequestType.PostWithArgsInBody},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContentType:{ | ||
argNames:["name"],name:"contenttypes?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getContentTypeById:{argNames:["id"],name:"contenttypes/getById([[id]])",requestType:e.RequestType.GetReplace},getDefaultDisplayForm:{name:"forms?$filter=FormType eq 4",requestType:e.RequestType.GetReplace},getDefaultEditForm:{name:"forms?$filter=FormType eq 6",requestType:e.RequestType.GetReplace},getDefaultNewForm:{name:"forms?$filter=FormType eq 8",requestType:e.RequestType.GetReplace},getForm:{argNames:["formType"],name:"forms?$filter=FormType eq [[formType]]",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByInternalNameOrTitle:{argNames:["internalNameOrTitle"],name:"fields/getByInternalNameOrTitle",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByTitle:{argNames:["title"],name:"fields/getByTitle",requestType:e.RequestType.PostWithArgsValueOnly},getSubFolder:{argNames:["serverRelativeUrl"],name:"folders/getbyurl",requestType:e.RequestType.GetWithArgsValueOnly},getItemById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getItemByTitle:{argNames:["title"],name:"items?$filter Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getItems:{argNames:["viewXml"],requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByFilter:{argNames:["filter"],name:"items?$filter=[[filter]]",requestType:e.RequestType.GetWithArgsValueOnly},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsInQS},getViewById:{argNames:["viewId"],name:"getView",requestType:e.RequestType.GetWithArgsValueOnly},getViewByTitle:{argNames:["title"],name:"views?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},recycle:{requestType:e.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.RequestType.PostWithArgs},reserveListItemId:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/items("+s+")",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"listItem"}})}return __extends(s,t),s}(e.Base);e.ListItem=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItem_Async=s,e.Library.listitem={addAttachment:{argNames:["name"],name:"attachmentfiles/add",requestType:e.RequestType.PostWithArgs},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},recycle:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"lists"}})}return __extends(s,t),s}(e.Base);e.Lists=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Lists_Async=s,e.Library.lists={add:{metadataType:"SP.List",requestType:e.RequestType.PostWithArgs},ensureSiteAssetsLibrary:{requestType:e.RequestType.Post},ensureSitePagesLibrary:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"roleassignments",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roleassignments"}})}return __extends(s,t),s}(e.Base);e.RoleAssignments=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.RoleAssignments_Async=s,e.Library.roleAssignments={addRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs},getByPrincipalId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},removeRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/roledefinitions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roledefinitions"}})}return __extends(s,t),s}(e.Base);e.RoleDefinitions=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.RoleDefinitions_Async=s,e.Library.roledefinitions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},getByType:{argNames:["type"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.searchservice={}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters(s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Site_Async=s,e.Library.site={addCustomAction:{argNames:["data"],metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{argNames:["web"],requestType:e.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.RequestType.PostWithArgs},invalidate:{requestType:e.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.RequestType.PostWithArgs},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/sitegroups",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"sitegroups"}})}return __extends(s,t),s}(e.Base);e.SiteGroups=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.SiteGroups_Async=s,e.Library.siteGroups={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("feed/post",null,e,!0)}},{name:"getFeed",function:function(){return this.executeGet("feed")}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestfeedmanager={},e.Library.socialrestfeedmanager[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("my/feed/post",null,e,!0)}},{name:"deletePost",function:function(e){return this.executePost("post/delete",null,{ID:e},!0)}},{name:"getMyFeed",function:function(){return this.executeGet("my/feed")}},{name:"getMyInfo",function:function(){return this.executeGet("my")}},{name:"getMyLikes",function:function(){return this.executeGet("my/likes")}},{name:"getMyMentionFeed",function:function(){return this.executeGet("my/mentionfeed")}},{name:"getMyNews",function:function(){return this.executeGet("my/news")}},{name:"getMyTimeLineFeed",function:function(){return this.executeGet("my/timelinefeed")}},{name:"getMyUnreadMentionCount",function:function(){return this.executeGet("my/unreadmentioncount")}},{name:"getPost",function:function(e){return this.executePost("post",null,{ID:e},!0)}},{name:"getPostLikers",function:function(e){return this.executePost("post/likers",null,{ID:e},!0)}},{name:"getUser",function:function(e){return 0==e.indexOf("i:0#.f|")?this.executeGet("actor",null,e):this.executeGet("actor",e)}},{name:"likePost",function:function(e){return this.executePost("post/like",null,{ID:e},!0)}},{name:"lockPost",function:function(e){return this.executePost("post/lock",null,{ID:e},!0)}},{name:"replyToPost",function:function(e,t){return t={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:e,creationData:t}},t.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("post/reply",null,t,!0)}},{name:"unlikePost",function:function(e){return this.executePost("post/unlike",null,{ID:e},!0)}},{name:"unlockPost",function:function(e){return this.executePost("post/unlock",null,{ID:e},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestthread={},e.Library.socialrestthread[e.RequestType.Custom]=[{name:"delete",function:function(e){return this.executePost("delete",null,{ID:e||this.ID},!0)}},{name:"like",function:function(e){return this.executePost("like",null,{ID:e||this.ID},!0)}},{name:"lock",function:function(e){return this.executePost("lock",null,{ID:e||this.ID},!0)}},{name:"reply",function:function(e,t){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:t||this.ID,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("reply",null,e,!0)}},{name:"unlike",function:function(e){return this.executePost("unlike",null,{ID:e||this.ID},!0)}},{name:"unlock",function:function(e){return this.executePost("unlock",null,{ID:e||this.ID},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl="boolean"==typeof s&&s,this.targetInfo.endpoint=(this.defaultToWebFl?"web":"site")+"/usercustomactions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"usercustomactions"}})}return __extends(s,t),s}(e.Base);e.UserCustomActions=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.UserCustomActions_Async=s,e.Library.usercustomactions={clear:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?filter=Name eq '[[name]]'",requestType:e.RequestType.PostReplace},getByTitle:{argNames:["title"],name:"?filter=Title eq '[[title]]'",requestType:e.RequestType.PostReplace}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/users",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"users"}})}return __extends(s,t),s}(e.Base);e.Users=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Users_Async=s,e.Library.users={getByEmail:{argNames:["email"],requestType:e.RequestType.GetWithArgsValueOnly},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByLoginName:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},deleteAll:{requestType:e.RequestType.Post},deleteById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/views/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"view"}})}return __extends(s,t),s}(e.Base);e.View=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.View_Async=s,e.Library.view={delete:{requestType:e.RequestType.Delete},renderAsHtml:{requestType:e.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.RequestType.PostWithArgsInBody},removeAllViewFields:{requestType:e.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/views",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"views"}})}return __extends(s,t),s}(e.Base);e.Views=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Views_Async=s,e.Library.views={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"web"}})}return __extends(s,t),s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Web=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Web_Async=s,e.Library.web={addContentType:{metadataType:"SP.ContentType",name:"contenttypes",requestType:e.RequestType.PostWithArgsInBody},addCustomAction:{metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},addExistingContentType:{name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addField:{metadataType:"SP.Field",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addFile:{argNames:["url","overwrite"],name:"rootfolder/files/add",requestType:e.RequestType.PostWithArgs},addList:{metadataType:"SP.List",name:"lists",requestType:e.RequestType.PostWithArgsInBody},addPermission:{metadataType:"SP.RoleDefinition",name:"roledefinitions",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["Title"],metadataType:"SP.Group",name:"sitegroups",requestType:e.RequestType.PostWithArgsInBody},addSubFolder:{name:"rootfolder/folders/add",requestType:e.RequestType.PostWithArgsValueOnly},applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.RequestType.PostWithArgs},applyWebTemplate:{requestType:e.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},doesPushNotificationSubscriberExist:{requestType:e.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.RequestType.Post},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{requestType:e.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.RequestType.PostWithArgs},getField:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]' or InternalName eq '[[title]]' or StaticName eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.GetWithArgsValueOnly},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFile:{argNames:["name"],name:"rootfolder/files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getList:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getListById:{argNames:["id"],name:"lists/getById",requestType:e.RequestType.GetWithArgsValueOnly},getListByTitle:{argNames:["title"],name:"lists/getByTitle",requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscriber:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},getSubFolder:{argNames:["name"],name:"rootfolder/folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSiteGroupById:{argNames:["id"],name:"sitegroups/getById",requestType:e.RequestType.GetWithArgsValueOnly},getSiteGroupByName:{argNames:["name"],name:"sitegroups/getByName",requestType:e.RequestType.GetWithArgsValueOnly},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.RequestType.GetWithArgs},getUserByEmail:{argNames:["email"],name:"siteusers/getByEmail",requestType:e.RequestType.GetWithArgsValueOnly},getUserById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getUserByLogin:{argNames:["loginName"],name:"siteusers/getByLoginName",requestType:e.RequestType.GetWithArgsValueOnly},getUserEffectivePermissions:{requestType:e.RequestType.GetWithArgsInQS},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.RequestType.GetWithArgs},processExternalNotification:{requestType:e.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.RequestType.PostWithArgs},resetRoleInheritance:{argNames:[],requestType:e.RequestType.Post},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},unregisterPushNotificationSubscriber:{requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={})); |
{ | ||
"name": "gd-sprest", | ||
"version": "0.2.9", | ||
"version": "0.3.0", | ||
"description": "An easy way to develop against the SharePoint REST API.", | ||
@@ -5,0 +5,0 @@ "author": "Gunjan Datta <me@dattabase.com> (https://github.com/gunjandatta/sprest)", |
@@ -7,7 +7,6 @@ # SharePoint 2013/Online REST Library | ||
## Benefits: | ||
* Constructors similar to the SSOM object model. | ||
* Generates the REST api url and formats it for app webs automatically. | ||
* Global flag to execute requests on creation, to reduce the number of calls to the server. | ||
* Parent property for easier development. | ||
* PowerShell-Like experience in the browser console. | ||
* PowerShell-Like experience in the browser console. (Synchronous Requests) | ||
* Switch between asynchronous and synchronous requests by the object's property. | ||
@@ -20,2 +19,9 @@ * Written in TypeScript. | ||
## Documentation: | ||
### Executing Requests from the App Web | ||
A global flag is used to determine if an app web request should execute requests against the host web. The host web will default to the SPHostUrl query string value. | ||
*Note - This value is false by default* | ||
``` | ||
$REST.DefaultRequestToHostWebFl = true; | ||
``` | ||
### Asynchronous/Synchronous requests | ||
@@ -49,3 +55,3 @@ All objects have the following constructors [Object] and [Object]_Async. | ||
// This will create the web object, but not execute the request. | ||
var web = new $REST.Web(null, false); | ||
var web = new $REST.Web(false); | ||
@@ -90,2 +96,4 @@ // This will execute the request to create a list | ||
// The target information and execute request flags are optional | ||
new Object([Object Specific Input Parameters], executeRequestFl); | ||
new Object([Object Specific Input Parameters], targetInfo); | ||
new Object([Object Specific Input Parameters], targetInfo, executeRequestFl); | ||
@@ -92,0 +100,0 @@ |
@@ -6,4 +6,5 @@ /// <reference path="base.d.ts" /> | ||
/*********************************************************************************************************************************/ | ||
export var DefaultRequestToHostWebFl:boolean = false; | ||
export var ExecuteOnCreationFl:boolean = true; | ||
export var Library:any = {}; | ||
export var ExecuteOnCreationFl:boolean = true; | ||
var SP:any; | ||
@@ -24,3 +25,3 @@ | ||
// Default the flag, if it's not defined | ||
// Default the properties | ||
this.executeRequestFl = typeof(params.executeRequestFl) === "boolean" ? params.executeRequestFl : ExecuteOnCreationFl; | ||
@@ -52,3 +53,3 @@ } | ||
public done(callback:() => void) { | ||
// Execute the promise | ||
// Execute the promise callback, if it exists | ||
this.promise ? this.promise.done(callback) : null; | ||
@@ -55,0 +56,0 @@ } |
@@ -113,2 +113,8 @@ /// <reference path="targetInfo.d.ts" /> | ||
// See if we are defaulting the url for the app web | ||
if($REST.DefaultRequestToHostWebFl && this.isAppWeb && this.targetInfo.url == null) { | ||
// Default the url to the host web | ||
this.targetInfo.url = this.getQueryStringValue("SPHostUrl"); | ||
} | ||
// Ensure the url exists | ||
@@ -115,0 +121,0 @@ if(this.targetInfo.url == null) { |
@@ -1,2 +0,2 @@ | ||
var $REST;!function(e){e.Library={},e.ExecuteOnCreationFl=!0;var t=function(){function t(t){this.targetInfo=t.settings,this.requestType=0,this.executeRequestFl="boolean"==typeof t.executeRequestFl?t.executeRequestFl:e.ExecuteOnCreationFl}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return!!this.request&&this.request.asyncFl},set:function(e){this.targetInfo.asyncFl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.request?this.request.response:null},enumerable:!0,configurable:!0}),t.prototype.done=function(e){this.promise?this.promise.done(e):null},t.prototype.execute=function(){var t=this;this.targetInfo.asyncFl?(this.promise=new e.Promise(this.targetInfo.callback),this.request=new e.Request(new e.TargetInfo(this.targetInfo),function(){t.updateDataObject()})):(this.request=new e.Request(new e.TargetInfo(this.targetInfo)),this.updateDataObject())},t.getAsyncInputParmeters=function(){for(var e=[],s=0;s<arguments.length;s++)e[s-0]=arguments[s];var r=t.getInputParmeters.apply(null,e);return r.settings.asyncFl=!0,r},t.getInputParmeters=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var s=null,r={executeRequestFl:null,settings:null};if(e&&e.length>0){if(1==e.length&&e[0].hasOwnProperty("executeRequestFl")&&e[0].hasOwnProperty("settings"))return e[0];"boolean"==typeof e[0]?(r.executeRequestFl=e[0],s=e[1]):(r.executeRequestFl=e[1],s=e[0])}return s?(r.settings={},"function"==typeof s?r.settings.callback=s:r.settings=s):r.settings={},r},t.prototype.addMethods=function(t,s){var r=s.results&&s.results.length>0,a=r?s.results[0].__metadata:s.__metadata,n=a&&a.type?a.type:this.targetInfo.endpoint;n=n.split("/"),n=n[n.length-1],n=n.split("."),n=n[n.length-1].toLowerCase(),n+=r?"s":"",/^field/.test(n)&&"fields"!=n?n="field"+(r?"s":""):/item$/.test(n)?n="listitem":/items$/.test(n)&&(n="items");var i=e.Library[n];if(i)for(var o in i)t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(i[o]?i[o]:{})+", arguments);")},t.prototype.addProperties=function(e,t){for(var s in t){var r=t[s];"__metadata"!=s&&"results"!=s&&(r&&r.__deferred&&r.__deferred.uri?e["get_"+s]=new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.executeMethod=function(s,r,a){var n=null,i=this.d?this.d.__metadata:this.__metadata;i&&i.uri?(n={url:i.uri},/^SP.Field/.test(i.type)&&(n.url=n.url.replace(/AvailableFields/,"fields")),r.inheritMetadataType&&(r.metadataType=i.type)):n=Object.create(this.targetInfo),n.asyncFl=this.targetInfo?this.targetInfo.asyncFl:this.asyncFl;var o=new e.MethodInfo(s,r,a);n.bufferFl=r.requestType==e.RequestType.GetBuffer,n.data=o.body,n.method=o.requestMethod,o.replaceEndpointFl?n.endpoint=o.url:o.url&&o.url.length>0&&(n.endpoint=(n.endpoint?n.endpoint+"/":"")+o.url);var u=new t({settings:n,executeRequestFl:!0});return u.parent=this,u.requestType=r.requestType,u.execute(),u},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo);r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var a=new t({settings:r,executeRequestFl:!0});return a.parent=this,a.execute(),a},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var s=0;s<e.length;s++)e[s].asyncFl=t.asyncFl,e[s].executeMethod=t.executeMethod,e[s].parent=t,t.addMethods(e[s],e[s])},10))},t.prototype.updateDataObject=function(){if(this.requestType==e.RequestType.GetBuffer)this.existsFl=null!=this.request.response;else{var t=this.request.response;t=""===t?"{}":t;var s=JSON.parse(t);this.existsFl="boolean"==typeof this.Exists?this.Exists:null==s.error,s.d&&(this.d=s.d,this.addProperties(this,s.d),this.addMethods(this,s.d),this.updateDataCollection(s.d.results))}this.promise?this.promise.resolve(this):null},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Promise(t),this.loadDependencies()}return Object.defineProperty(t.prototype,"MAX_WAIT",{get:function(){return 5},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SCRIPTS",{get:function(){return["MicrosoftAjax.js","init.js","sp.runtime.js","sp.js","sp.core.js","core.js"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageContextExistsFl",{get:function(){return window.hasOwnProperty("_spPageContextInfo")},enumerable:!0,configurable:!0}),t.prototype.loadDependencies=function(){if(this.pageContextExistsFl)this.promise.resolve();else{for(var e in this.SCRIPTS){var t=document.createElement("script");t.setAttribute("src","/_layouts/15/"+e),t.setAttribute("type","text/javascript"),document.head.appendChild(t)}this.waitForPageContext()}},t.prototype.waitForPageContext=function(){var e=0,t=window.setInterval(function(){(this.pageContextExists()||++e>=this.MAX_WAIT)&&(window.clearInterval(t),this.promise.resolve())},10)},t}();e.Dependencies=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(e,t,s){this.methodInfo=t,this.methodInfo.argValues=s,this.methodInfo.name="string"==typeof this.methodInfo.name?this.methodInfo.name:e,this.generateParams(),this.methodUrl=this.generateUrl()}return Object.defineProperty(t.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.RequestType.Delete:case e.RequestType.Post:case e.RequestType.PostWithArgs:case e.RequestType.PostWithArgsInBody:case e.RequestType.PostWithArgsInQS:case e.RequestType.PostWithArgsValueOnly:case e.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.RequestType.GetReplace||this.methodInfo.requestType==e.RequestType.PostReplace},enumerable:!0,configurable:!0}),t.prototype.generateParams=function(){var e={};if(null!=this.methodInfo.argValues){if(this.methodInfo.argNames)for(var t=0;t<this.methodInfo.argNames.length&&t<this.methodInfo.argValues.length;t++){var s=this.methodInfo.argNames[t],r=this.methodInfo.argValues[t];switch(typeof this.methodInfo.argValues[t]){case"boolean":e[s]=this.methodInfo.argValues[t]?"true":"false";break;case"number":e[s]=this.methodInfo.argValues[t];break;default:e[s]=r}}var a=!0;for(var n in e){a=!1;break}if(this.methodParams=a?null:e,this.methodParams&&this.isTemplate){"string"!=typeof this.methodInfo.data&&(this.methodInfo.data=JSON.stringify(this.methodInfo.data));for(var i in this.methodParams)this.methodInfo.data=this.methodInfo.data.replace("[["+i+"]]",this.methodParams[i].replace(/"/g,'\\"'));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&(null==this.methodInfo.argNames||this.methodInfo.argValues.length>this.methodInfo.argNames.length)&&(this.methodData=this.methodInfo.argValues[(this.methodInfo.argNames?this.methodInfo.argNames.length:-1)+1]),this.methodInfo.metadataType&&(this.methodInfo.argNames?this.methodData[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:this.methodData.__metadata={type:this.methodInfo.metadataType})}},t.prototype.generateUrl=function(){var t=this.methodInfo.name;if(this.methodInfo.requestType==e.RequestType.Delete&&(t="deleteObject"),this.passDataInBody){var s=this.methodData||this.methodParams;this.methodData=JSON.stringify(s)}if(this.passDataInQS){var s=this.methodParams||this.methodData;t+="(@v)?@v="+("string"==typeof s?"'"+encodeURIComponent(s)+"'":JSON.stringify(s))}if(this.replace)for(var r in this.methodParams)t=t.replace("[["+r+"]]",encodeURIComponent(this.methodParams[r]));else if(!this.passDataInBody&&!this.passDataInQS){var a="",s=this.methodParams||this.methodData;if(s){s=s&&"object"==typeof s?s:{value:s};for(var n in s){var i=s[n];switch(i="string"==typeof i?"'"+i+"'":i,this.methodInfo.requestType){case e.RequestType.GetWithArgsValueOnly:case e.RequestType.PostWithArgsValueOnly:a+=i+", ";break;default:a+=n+"="+i+", "}}}t+=a.length>0?"("+a.replace(/, $/,"")+")":""}return t},t}();e.MethodInfo=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function e(e){this.callback=e,this.resolvedFl=!1}return e.prototype.done=function(e){this.callback=e||this.callback,this.resolvedFl&&this.executeMethod()},e.prototype.resolve=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.args=e,this.resolvedFl=!0,this.executeMethod()},e.prototype.executeMethod=function(){this.callback&&"function"==typeof this.callback&&this.callback.apply(this,this.args)},e}();e.Promise=t}($REST||($REST={}));var $REST;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.Get=10]="Get",e[e.GetWithArgs=11]="GetWithArgs",e[e.GetWithArgsInBody=12]="GetWithArgsInBody",e[e.GetWithArgsInQS=13]="GetWithArgsInQS",e[e.GetWithArgsValueOnly=14]="GetWithArgsValueOnly",e[e.GetReplace=15]="GetReplace",e[e.Post=20]="Post",e[e.PostWithArgs=21]="PostWithArgs",e[e.PostWithArgsInBody=22]="PostWithArgsInBody",e[e.PostWithArgsInQS=23]="PostWithArgsInQS",e[e.PostWithArgsValueOnly=24]="PostWithArgsValueOnly",e[e.PostReplace=25]="PostReplace",e[e.GetAppendMethodToEndPoint=30]="GetAppendMethodToEndPoint",e[e.GetBuffer=31]="GetBuffer",e[e.GetDataAsParameter=32]="GetDataAsParameter",e[e.GetDataInBody=33]="GetDataInBody",e[e.GetDataInBodyNoArgs=34]="GetDataInBodyNoArgs",e[e.PostAppendMethodToEndPoint=35]="PostAppendMethodToEndPoint",e[e.PostDataAsParameter=36]="PostDataAsParameter",e[e.PostDataInBody=37]="PostDataInBody",e[e.PostDataInBodyNoArgs=38]="PostDataInBodyNoArgs"}(e.RequestType||(e.RequestType={}));var t=(e.RequestType,function(){function t(t,s){this.promise=new e.Promise(s||t.callback),this.targetInfo=t,this.xhr=this.createXHR(),this.executeRequest()}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.xhr?this.xhr.response:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"request",{get:function(){return this.xhr?this.xhr:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestData",{get:function(){return this.targetInfo.requestData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestUrl",{get:function(){return this.xhr?this.xhr.responseURL:null},enumerable:!0,configurable:!0}),t.prototype.createXHR=function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}throw new Error("This browser does not support xml http requests.")},t.prototype.defaultHeaders=function(){var e=document.querySelector("#__REQUESTDIGEST");if(e=e?e.value:"",this.xhr.setRequestHeader("Accept","application/json;odata=verbose"),this.xhr.setRequestHeader("Content-Type","application/json;odata=verbose"),this.xhr.setRequestHeader("X-HTTP-Method",this.targetInfo.requestMethod),this.xhr.setRequestHeader("X-RequestDigest",e),"DELETE"!=this.targetInfo.requestMethod&&"MERGE"!=this.targetInfo.requestMethod||this.xhr.setRequestHeader("IF-MATCH","*"),this.targetInfo.requestHeaders)for(var t in this.targetInfo.requestHeaders)this.xhr.setRequestHeader(t,this.targetInfo.requestHeaders[t])},t.prototype.executeRequest=function(){var e=this;return null==this.xhr?null:(this.xhr.open("GET"==this.targetInfo.requestMethod?"GET":"POST",this.targetInfo.requestUrl,this.targetInfo.asyncFl),this.targetInfo.asyncFl&&(this.xhr.onreadystatechange=function(){4==e.xhr.readyState&&e.promise.resolve(e)}),this.targetInfo.bufferFl&&this.targetInfo.asyncFl?this.xhr.responseType="arraybuffer":(this.defaultHeaders(),this.targetInfo.requestData&&"string"!=typeof this.targetInfo.requestData&&(this.targetInfo.requestData=this.targetInfo.requestData.byteLength?this.targetInfo.requestData:JSON.stringify(this.targetInfo.requestData))),void(this.targetInfo.bufferFl?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}());e.Request=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function e(e){this.targetInfo=e||{},this.requestData=this.targetInfo.data,this.requestMethod=this.targetInfo.method?this.targetInfo.method:"GET",this.targetInfo.asyncFl=!!this.targetInfo.asyncFl,this.setRequestUrl()}return Object.defineProperty(e.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferFl",{get:function(){return this.targetInfo.bufferFl},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callback",{get:function(){return this.targetInfo.callback},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return window._spPageContextInfo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAppWeb",{get:function(){return this.context.isAppWeb},enumerable:!0,configurable:!0}),e.prototype.getDomainUrl=function(){var e=document.location.href;return this.isAppWeb&&(e=this.getQueryStringValue("SPHostUrl")+""),e=e.split("/"),e&&e.length>=2&&(e=e[0]+"//"+e[2]),e},e.prototype.getQueryStringValue=function(e){var t=document.location.href.split("?");t=t.length>1?t[1]:t[0];for(var s=t.split("&"),r=0;r<s.length;r++){var a=s[r].split("=");if(1!=a.length&&decodeURIComponent(a[0])==e)return decodeURIComponent(a[1])}return null},e.prototype.setRequestUrl=function(){var e="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(null==this.targetInfo.url)this.targetInfo.url=this.context[this.targetInfo.defaultToWebFl?"webAbsoluteUrl":"siteAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){if(this.isAppWeb){var t=this.targetInfo.url.split("/_api/");this.requestUrl=t[0]+"/_api/SP.AppContextSite(@target)/"+t[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+this.getQueryStringValue("SPHostUrl")+"'"}else this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"");return}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb){var s=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=e.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+s).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=e.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},e}();e.TargetInfo=t}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];return t.call(this,e.Base.getInputParmeters.apply(null,a)),new e.ContentTypes(r,this.targetInfo,(!1)).getByName(s)}return __extends(s,t),s}(e.Base);e.ContentType=t,e.Library.contenttype={addFieldLink:{name:"fieldlinks",metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},delete:{requestType:e.RequestType.Delete},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"contenttypes",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"contenttypes"}})}return __extends(s,t),s}(e.Base);e.ContentTypes=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.ContentTypes_Async=s,e.Library.contenttypes={add:{argNames:["data"],metadataType:"SP.ContentType",requestType:e.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a));var i=new e.Fields(r,this.targetInfo,(!1));return i.getByInternalNameOrTitle(s)}return __extends(s,t),s}(e.Base);e.Field=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Field_Async=s,e.Library.field={delete:{requestType:e.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Field",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"fields",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"fields"}})}return __extends(s,t),s}(e.Base);e.Fields=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Fields_Async=s,e.Library.fields={add:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",requestType:e.RequestType.PostWithArgsInBody},addDependentLookup:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.RequestType.PostWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/files/getByUrl('":"getFileByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"file"}})}return __extends(s,t),s}(e.Base);e.File=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.File_Async=s,e.Library.file={approve:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},checkin:{argNames:["checkin","checkInType"],requestType:e.RequestType.PostWithArgs},checkout:{requestType:e.RequestType.Post},content:{name:"$value",requestType:e.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},deny:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.RequestType.PostReplace},openBinaryStream:{requestType:e.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},saveBinaryStream:{requestType:e.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},recycle:{requestType:e.RequestType.Get},undoCheckOut:{requestType:e.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"rootfolder/files",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"files"}})}return __extends(s,t),s}(e.Base);e.Files=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Files_Async=s,e.Library.files={add:{argNames:["overwrite","url"],requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.RequestType.PostWithArgs},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/folders/getByUrl('":"getFolderByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folder"}})}return __extends(s,t),s}(e.Base);e.Folder=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Folder_Async=s,e.Library.folder={addFile:{argNames:["url","overwrite"],name:"files/add",requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],name:"files/addtemplatefile",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getFile:{argNames:["name"],name:"files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSubFolder:{argNames:["name"],name:"folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/rootfolder/":"")+"folders",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folders"}})}return __extends(s,t),s}(e.Base);e.Folders=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Folders_Async=s,e.Library.folders={add:{argNames:["url"],requestType:e.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={containsUser:{argNames:["userId"],name:"users?$filter=Id eq [[userId]]",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];if(t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/items",r){var i=new e.List(s,this.targetInfo,(!1));return i[/^<View/.test(r)?"getItems":"getItemsByQuery"](r)}this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"items"}})}return __extends(s,t),s}(e.Base);e.ListItems=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItems_Async=s,e.Library.items={add:{metadataType:"SP.ListItem",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"list"}})}return __extends(s,t),s}(e.Base);e.List=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.List_Async=s,e.Library.list={addAvailableContentType:{argNames:["contentTypeId"],name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addContentType:{argNames:["data"],metadataType:"SP.ContentType",name:"contenttypes/add",requestType:e.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],name:"fields/addDependentLookupField",requestType:e.RequestType.PostWithArgs},addItem:{metadataType:"SP.ListItem",name:"items",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["principalid","roledefid"],name:"roleassignments/addroleassignment",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},addView:{metadataType:"SP.View",name:"views",requestType:e.RequestType.PostWithArgsInBody},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContentType:{argNames:["name"],name:"contenttypes?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getContentTypeById:{argNames:["id"],name:"contenttypes/getById([[id]])", | ||
requestType:e.RequestType.GetReplace},getDefaultDisplayForm:{name:"forms?$filter=FormType eq 4",requestType:e.RequestType.GetReplace},getDefaultEditForm:{name:"forms?$filter=FormType eq 6",requestType:e.RequestType.GetReplace},getDefaultNewForm:{name:"forms?$filter=FormType eq 8",requestType:e.RequestType.GetReplace},getForm:{argNames:["formType"],name:"forms?$filter=FormType eq [[formType]]",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByInternalNameOrTitle:{argNames:["internalNameOrTitle"],name:"fields/getByInternalNameOrTitle",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByTitle:{argNames:["title"],name:"fields/getByTitle",requestType:e.RequestType.PostWithArgsValueOnly},getSubFolder:{argNames:["serverRelativeUrl"],name:"folders/getbyurl",requestType:e.RequestType.GetWithArgsValueOnly},getItemById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getItemByTitle:{argNames:["title"],name:"items?$filter Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getItems:{argNames:["viewXml"],requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByFilter:{argNames:["filter"],name:"items?$filter=[[filter]]",requestType:e.RequestType.GetWithArgsValueOnly},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsInQS},getViewById:{argNames:["viewId"],name:"getView",requestType:e.RequestType.GetWithArgsValueOnly},getViewByTitle:{argNames:["title"],name:"views?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},recycle:{requestType:e.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.RequestType.PostWithArgs},reserveListItemId:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/items("+s+")",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"listItem"}})}return __extends(s,t),s}(e.Base);e.ListItem=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItem_Async=s,e.Library.listitem={addAttachment:{argNames:["name"],name:"attachmentfiles/add",requestType:e.RequestType.PostWithArgs},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},recycle:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"lists"}})}return __extends(s,t),s}(e.Base);e.Lists=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Lists_Async=s,e.Library.lists={add:{metadataType:"SP.List",requestType:e.RequestType.PostWithArgs},ensureSiteAssetsLibrary:{requestType:e.RequestType.Post},ensureSitePagesLibrary:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"roleassignments",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roleassignments"}})}return __extends(s,t),s}(e.Base);e.RoleAssignments=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.RoleAssignments_Async=s,e.Library.roleAssignments={addRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs},getByPrincipalId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},removeRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/roledefinitions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roledefinitions"}})}return __extends(s,t),s}(e.Base);e.RoleDefinitions=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.RoleDefinitions_Async=s,e.Library.roledefinitions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},getByType:{argNames:["type"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.searchservice={}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters(s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Site_Async=s,e.Library.site={addCustomAction:{argNames:["data"],metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{argNames:["web"],requestType:e.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.RequestType.PostWithArgs},invalidate:{requestType:e.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.RequestType.PostWithArgs},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/sitegroups",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"sitegroups"}})}return __extends(s,t),s}(e.Base);e.SiteGroups=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.SiteGroups_Async=s,e.Library.siteGroups={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("feed/post",null,e,!0)}},{name:"getFeed",function:function(){return this.executeGet("feed")}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestfeedmanager={},e.Library.socialrestfeedmanager[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("my/feed/post",null,e,!0)}},{name:"deletePost",function:function(e){return this.executePost("post/delete",null,{ID:e},!0)}},{name:"getMyFeed",function:function(){return this.executeGet("my/feed")}},{name:"getMyInfo",function:function(){return this.executeGet("my")}},{name:"getMyLikes",function:function(){return this.executeGet("my/likes")}},{name:"getMyMentionFeed",function:function(){return this.executeGet("my/mentionfeed")}},{name:"getMyNews",function:function(){return this.executeGet("my/news")}},{name:"getMyTimeLineFeed",function:function(){return this.executeGet("my/timelinefeed")}},{name:"getMyUnreadMentionCount",function:function(){return this.executeGet("my/unreadmentioncount")}},{name:"getPost",function:function(e){return this.executePost("post",null,{ID:e},!0)}},{name:"getPostLikers",function:function(e){return this.executePost("post/likers",null,{ID:e},!0)}},{name:"getUser",function:function(e){return 0==e.indexOf("i:0#.f|")?this.executeGet("actor",null,e):this.executeGet("actor",e)}},{name:"likePost",function:function(e){return this.executePost("post/like",null,{ID:e},!0)}},{name:"lockPost",function:function(e){return this.executePost("post/lock",null,{ID:e},!0)}},{name:"replyToPost",function:function(e,t){return t={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:e,creationData:t}},t.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("post/reply",null,t,!0)}},{name:"unlikePost",function:function(e){return this.executePost("post/unlike",null,{ID:e},!0)}},{name:"unlockPost",function:function(e){return this.executePost("post/unlock",null,{ID:e},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestthread={},e.Library.socialrestthread[e.RequestType.Custom]=[{name:"delete",function:function(e){return this.executePost("delete",null,{ID:e||this.ID},!0)}},{name:"like",function:function(e){return this.executePost("like",null,{ID:e||this.ID},!0)}},{name:"lock",function:function(e){return this.executePost("lock",null,{ID:e||this.ID},!0)}},{name:"reply",function:function(e,t){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:t||this.ID,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("reply",null,e,!0)}},{name:"unlike",function:function(e){return this.executePost("unlike",null,{ID:e||this.ID},!0)}},{name:"unlock",function:function(e){return this.executePost("unlock",null,{ID:e||this.ID},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl="boolean"==typeof s&&s,this.targetInfo.endpoint=(this.defaultToWebFl?"web":"site")+"/usercustomactions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"usercustomactions"}})}return __extends(s,t),s}(e.Base);e.UserCustomActions=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.UserCustomActions_Async=s,e.Library.usercustomactions={clear:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?filter=Name eq '[[name]]'",requestType:e.RequestType.PostReplace},getByTitle:{argNames:["title"],name:"?filter=Title eq '[[title]]'",requestType:e.RequestType.PostReplace}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/users",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"users"}})}return __extends(s,t),s}(e.Base);e.Users=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Users_Async=s,e.Library.users={getByEmail:{argNames:["email"],requestType:e.RequestType.GetWithArgsValueOnly},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByLoginName:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},deleteAll:{requestType:e.RequestType.Post},deleteById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/views/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"view"}})}return __extends(s,t),s}(e.Base);e.View=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.View_Async=s,e.Library.view={delete:{requestType:e.RequestType.Delete},renderAsHtml:{requestType:e.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.RequestType.PostWithArgsInBody},removeAllViewFields:{requestType:e.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/views",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"views"}})}return __extends(s,t),s}(e.Base);e.Views=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Views_Async=s,e.Library.views={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"web"}})}return __extends(s,t),s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Web=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Web_Async=s,e.Library.web={addContentType:{metadataType:"SP.ContentType",name:"contenttypes",requestType:e.RequestType.PostWithArgsInBody},addCustomAction:{metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},addExistingContentType:{name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addField:{metadataType:"SP.Field",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addFile:{argNames:["url","overwrite"],name:"rootfolder/files/add",requestType:e.RequestType.PostWithArgs},addList:{metadataType:"SP.List",name:"lists",requestType:e.RequestType.PostWithArgsInBody},addPermission:{metadataType:"SP.RoleDefinition",name:"roledefinitions",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["Title"],metadataType:"SP.Group",name:"sitegroups",requestType:e.RequestType.PostWithArgsInBody},addSubFolder:{name:"rootfolder/folders/add",requestType:e.RequestType.PostWithArgsValueOnly},applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.RequestType.PostWithArgs},applyWebTemplate:{requestType:e.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},doesPushNotificationSubscriberExist:{requestType:e.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.RequestType.Post},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{requestType:e.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.RequestType.PostWithArgs},getField:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]' or InternalName eq '[[title]]' or StaticName eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.GetWithArgsValueOnly},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFile:{argNames:["name"],name:"rootfolder/files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getList:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getListById:{argNames:["id"],name:"lists/getById",requestType:e.RequestType.GetWithArgsValueOnly},getListByTitle:{argNames:["title"],name:"lists/getByTitle",requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscriber:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},getSubFolder:{argNames:["name"],name:"rootfolder/folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSiteGroupById:{argNames:["id"],name:"sitegroups/getById",requestType:e.RequestType.GetWithArgsValueOnly},getSiteGroupByName:{argNames:["name"],name:"sitegroups/getByName",requestType:e.RequestType.GetWithArgsValueOnly},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.RequestType.GetWithArgs},getUserByEmail:{argNames:["email"],name:"siteusers/getByEmail",requestType:e.RequestType.GetWithArgsValueOnly},getUserById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getUserByLogin:{argNames:["loginName"],name:"siteusers/getByLoginName",requestType:e.RequestType.GetWithArgsValueOnly},getUserEffectivePermissions:{requestType:e.RequestType.GetWithArgsInQS},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.RequestType.GetWithArgs},processExternalNotification:{requestType:e.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.RequestType.PostWithArgs},resetRoleInheritance:{argNames:[],requestType:e.RequestType.Post},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},unregisterPushNotificationSubscriber:{requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={})); | ||
var $REST;!function(e){e.DefaultRequestToHostWebFl=!1,e.ExecuteOnCreationFl=!0,e.Library={};var t=function(){function t(t){this.targetInfo=t.settings,this.requestType=0,this.executeRequestFl="boolean"==typeof t.executeRequestFl?t.executeRequestFl:e.ExecuteOnCreationFl}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return!!this.request&&this.request.asyncFl},set:function(e){this.targetInfo.asyncFl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.request?this.request.response:null},enumerable:!0,configurable:!0}),t.prototype.done=function(e){this.promise?this.promise.done(e):null},t.prototype.execute=function(){var t=this;this.targetInfo.asyncFl?(this.promise=new e.Promise(this.targetInfo.callback),this.request=new e.Request(new e.TargetInfo(this.targetInfo),function(){t.updateDataObject()})):(this.request=new e.Request(new e.TargetInfo(this.targetInfo)),this.updateDataObject())},t.getAsyncInputParmeters=function(){for(var e=[],s=0;s<arguments.length;s++)e[s-0]=arguments[s];var r=t.getInputParmeters.apply(null,e);return r.settings.asyncFl=!0,r},t.getInputParmeters=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var s=null,r={executeRequestFl:null,settings:null};if(e&&e.length>0){if(1==e.length&&e[0].hasOwnProperty("executeRequestFl")&&e[0].hasOwnProperty("settings"))return e[0];"boolean"==typeof e[0]?(r.executeRequestFl=e[0],s=e[1]):(r.executeRequestFl=e[1],s=e[0])}return s?(r.settings={},"function"==typeof s?r.settings.callback=s:r.settings=s):r.settings={},r},t.prototype.addMethods=function(t,s){var r=s.results&&s.results.length>0,a=r?s.results[0].__metadata:s.__metadata,n=a&&a.type?a.type:this.targetInfo.endpoint;n=n.split("/"),n=n[n.length-1],n=n.split("."),n=n[n.length-1].toLowerCase(),n+=r?"s":"",/^field/.test(n)&&"fields"!=n?n="field"+(r?"s":""):/item$/.test(n)?n="listitem":/items$/.test(n)&&(n="items");var i=e.Library[n];if(i)for(var o in i)t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(i[o]?i[o]:{})+", arguments);")},t.prototype.addProperties=function(e,t){for(var s in t){var r=t[s];"__metadata"!=s&&"results"!=s&&(r&&r.__deferred&&r.__deferred.uri?e["get_"+s]=new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.executeMethod=function(s,r,a){var n=null,i=this.d?this.d.__metadata:this.__metadata;i&&i.uri?(n={url:i.uri},/^SP.Field/.test(i.type)&&(n.url=n.url.replace(/AvailableFields/,"fields")),r.inheritMetadataType&&(r.metadataType=i.type)):n=Object.create(this.targetInfo),n.asyncFl=this.targetInfo?this.targetInfo.asyncFl:this.asyncFl;var o=new e.MethodInfo(s,r,a);n.bufferFl=r.requestType==e.RequestType.GetBuffer,n.data=o.body,n.method=o.requestMethod,o.replaceEndpointFl?n.endpoint=o.url:o.url&&o.url.length>0&&(n.endpoint=(n.endpoint?n.endpoint+"/":"")+o.url);var u=new t({settings:n,executeRequestFl:!0});return u.parent=this,u.requestType=r.requestType,u.execute(),u},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo);r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var a=new t({settings:r,executeRequestFl:!0});return a.parent=this,a.execute(),a},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var s=0;s<e.length;s++)e[s].asyncFl=t.asyncFl,e[s].executeMethod=t.executeMethod,e[s].parent=t,t.addMethods(e[s],e[s])},10))},t.prototype.updateDataObject=function(){if(this.requestType==e.RequestType.GetBuffer)this.existsFl=null!=this.request.response;else{var t=this.request.response;t=""===t?"{}":t;var s=JSON.parse(t);this.existsFl="boolean"==typeof this.Exists?this.Exists:null==s.error,s.d&&(this.d=s.d,this.addProperties(this,s.d),this.addMethods(this,s.d),this.updateDataCollection(s.d.results))}this.promise?this.promise.resolve(this):null},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Promise(t),this.loadDependencies()}return Object.defineProperty(t.prototype,"MAX_WAIT",{get:function(){return 5},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SCRIPTS",{get:function(){return["MicrosoftAjax.js","init.js","sp.runtime.js","sp.js","sp.core.js","core.js"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageContextExistsFl",{get:function(){return window.hasOwnProperty("_spPageContextInfo")},enumerable:!0,configurable:!0}),t.prototype.loadDependencies=function(){if(this.pageContextExistsFl)this.promise.resolve();else{for(var e in this.SCRIPTS){var t=document.createElement("script");t.setAttribute("src","/_layouts/15/"+e),t.setAttribute("type","text/javascript"),document.head.appendChild(t)}this.waitForPageContext()}},t.prototype.waitForPageContext=function(){var e=0,t=window.setInterval(function(){(this.pageContextExists()||++e>=this.MAX_WAIT)&&(window.clearInterval(t),this.promise.resolve())},10)},t}();e.Dependencies=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(e,t,s){this.methodInfo=t,this.methodInfo.argValues=s,this.methodInfo.name="string"==typeof this.methodInfo.name?this.methodInfo.name:e,this.generateParams(),this.methodUrl=this.generateUrl()}return Object.defineProperty(t.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.RequestType.Delete:case e.RequestType.Post:case e.RequestType.PostWithArgs:case e.RequestType.PostWithArgsInBody:case e.RequestType.PostWithArgsInQS:case e.RequestType.PostWithArgsValueOnly:case e.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.RequestType.GetReplace||this.methodInfo.requestType==e.RequestType.PostReplace},enumerable:!0,configurable:!0}),t.prototype.generateParams=function(){var e={};if(null!=this.methodInfo.argValues){if(this.methodInfo.argNames)for(var t=0;t<this.methodInfo.argNames.length&&t<this.methodInfo.argValues.length;t++){var s=this.methodInfo.argNames[t],r=this.methodInfo.argValues[t];switch(typeof this.methodInfo.argValues[t]){case"boolean":e[s]=this.methodInfo.argValues[t]?"true":"false";break;case"number":e[s]=this.methodInfo.argValues[t];break;default:e[s]=r}}var a=!0;for(var n in e){a=!1;break}if(this.methodParams=a?null:e,this.methodParams&&this.isTemplate){"string"!=typeof this.methodInfo.data&&(this.methodInfo.data=JSON.stringify(this.methodInfo.data));for(var i in this.methodParams)this.methodInfo.data=this.methodInfo.data.replace("[["+i+"]]",this.methodParams[i].replace(/"/g,'\\"'));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&(null==this.methodInfo.argNames||this.methodInfo.argValues.length>this.methodInfo.argNames.length)&&(this.methodData=this.methodInfo.argValues[(this.methodInfo.argNames?this.methodInfo.argNames.length:-1)+1]),this.methodInfo.metadataType&&(this.methodInfo.argNames?this.methodData[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:this.methodData.__metadata={type:this.methodInfo.metadataType})}},t.prototype.generateUrl=function(){var t=this.methodInfo.name;if(this.methodInfo.requestType==e.RequestType.Delete&&(t="deleteObject"),this.passDataInBody){var s=this.methodData||this.methodParams;this.methodData=JSON.stringify(s)}if(this.passDataInQS){var s=this.methodParams||this.methodData;t+="(@v)?@v="+("string"==typeof s?"'"+encodeURIComponent(s)+"'":JSON.stringify(s))}if(this.replace)for(var r in this.methodParams)t=t.replace("[["+r+"]]",encodeURIComponent(this.methodParams[r]));else if(!this.passDataInBody&&!this.passDataInQS){var a="",s=this.methodParams||this.methodData;if(s){s=s&&"object"==typeof s?s:{value:s};for(var n in s){var i=s[n];switch(i="string"==typeof i?"'"+i+"'":i,this.methodInfo.requestType){case e.RequestType.GetWithArgsValueOnly:case e.RequestType.PostWithArgsValueOnly:a+=i+", ";break;default:a+=n+"="+i+", "}}}t+=a.length>0?"("+a.replace(/, $/,"")+")":""}return t},t}();e.MethodInfo=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function e(e){this.callback=e,this.resolvedFl=!1}return e.prototype.done=function(e){this.callback=e||this.callback,this.resolvedFl&&this.executeMethod()},e.prototype.resolve=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.args=e,this.resolvedFl=!0,this.executeMethod()},e.prototype.executeMethod=function(){this.callback&&"function"==typeof this.callback&&this.callback.apply(this,this.args)},e}();e.Promise=t}($REST||($REST={}));var $REST;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.Get=10]="Get",e[e.GetWithArgs=11]="GetWithArgs",e[e.GetWithArgsInBody=12]="GetWithArgsInBody",e[e.GetWithArgsInQS=13]="GetWithArgsInQS",e[e.GetWithArgsValueOnly=14]="GetWithArgsValueOnly",e[e.GetReplace=15]="GetReplace",e[e.Post=20]="Post",e[e.PostWithArgs=21]="PostWithArgs",e[e.PostWithArgsInBody=22]="PostWithArgsInBody",e[e.PostWithArgsInQS=23]="PostWithArgsInQS",e[e.PostWithArgsValueOnly=24]="PostWithArgsValueOnly",e[e.PostReplace=25]="PostReplace",e[e.GetAppendMethodToEndPoint=30]="GetAppendMethodToEndPoint",e[e.GetBuffer=31]="GetBuffer",e[e.GetDataAsParameter=32]="GetDataAsParameter",e[e.GetDataInBody=33]="GetDataInBody",e[e.GetDataInBodyNoArgs=34]="GetDataInBodyNoArgs",e[e.PostAppendMethodToEndPoint=35]="PostAppendMethodToEndPoint",e[e.PostDataAsParameter=36]="PostDataAsParameter",e[e.PostDataInBody=37]="PostDataInBody",e[e.PostDataInBodyNoArgs=38]="PostDataInBodyNoArgs"}(e.RequestType||(e.RequestType={}));var t=(e.RequestType,function(){function t(t,s){this.promise=new e.Promise(s||t.callback),this.targetInfo=t,this.xhr=this.createXHR(),this.executeRequest()}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"response",{get:function(){return this.xhr?this.xhr.response:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"request",{get:function(){return this.xhr?this.xhr:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestData",{get:function(){return this.targetInfo.requestData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestUrl",{get:function(){return this.xhr?this.xhr.responseURL:null},enumerable:!0,configurable:!0}),t.prototype.createXHR=function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}throw new Error("This browser does not support xml http requests.")},t.prototype.defaultHeaders=function(){var e=document.querySelector("#__REQUESTDIGEST");if(e=e?e.value:"",this.xhr.setRequestHeader("Accept","application/json;odata=verbose"),this.xhr.setRequestHeader("Content-Type","application/json;odata=verbose"),this.xhr.setRequestHeader("X-HTTP-Method",this.targetInfo.requestMethod),this.xhr.setRequestHeader("X-RequestDigest",e),"DELETE"!=this.targetInfo.requestMethod&&"MERGE"!=this.targetInfo.requestMethod||this.xhr.setRequestHeader("IF-MATCH","*"),this.targetInfo.requestHeaders)for(var t in this.targetInfo.requestHeaders)this.xhr.setRequestHeader(t,this.targetInfo.requestHeaders[t])},t.prototype.executeRequest=function(){var e=this;return null==this.xhr?null:(this.xhr.open("GET"==this.targetInfo.requestMethod?"GET":"POST",this.targetInfo.requestUrl,this.targetInfo.asyncFl),this.targetInfo.asyncFl&&(this.xhr.onreadystatechange=function(){4==e.xhr.readyState&&e.promise.resolve(e)}),this.targetInfo.bufferFl&&this.targetInfo.asyncFl?this.xhr.responseType="arraybuffer":(this.defaultHeaders(),this.targetInfo.requestData&&"string"!=typeof this.targetInfo.requestData&&(this.targetInfo.requestData=this.targetInfo.requestData.byteLength?this.targetInfo.requestData:JSON.stringify(this.targetInfo.requestData))),void(this.targetInfo.bufferFl?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}());e.Request=t}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(e){this.targetInfo=e||{},this.requestData=this.targetInfo.data,this.requestMethod=this.targetInfo.method?this.targetInfo.method:"GET",this.targetInfo.asyncFl=!!this.targetInfo.asyncFl,this.setRequestUrl()}return Object.defineProperty(t.prototype,"asyncFl",{get:function(){return this.targetInfo.asyncFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bufferFl",{get:function(){return this.targetInfo.bufferFl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"callback",{get:function(){return this.targetInfo.callback},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return window._spPageContextInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAppWeb",{get:function(){return this.context.isAppWeb},enumerable:!0,configurable:!0}),t.prototype.getDomainUrl=function(){var e=document.location.href;return this.isAppWeb&&(e=this.getQueryStringValue("SPHostUrl")+""),e=e.split("/"),e&&e.length>=2&&(e=e[0]+"//"+e[2]),e},t.prototype.getQueryStringValue=function(e){var t=document.location.href.split("?");t=t.length>1?t[1]:t[0];for(var s=t.split("&"),r=0;r<s.length;r++){var a=s[r].split("=");if(1!=a.length&&decodeURIComponent(a[0])==e)return decodeURIComponent(a[1])}return null},t.prototype.setRequestUrl=function(){var t="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(e.DefaultRequestToHostWebFl&&this.isAppWeb&&null==this.targetInfo.url&&(this.targetInfo.url=this.getQueryStringValue("SPHostUrl")),null==this.targetInfo.url)this.targetInfo.url=this.context[this.targetInfo.defaultToWebFl?"webAbsoluteUrl":"siteAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){if(this.isAppWeb){var s=this.targetInfo.url.split("/_api/");this.requestUrl=s[0]+"/_api/SP.AppContextSite(@target)/"+s[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+this.getQueryStringValue("SPHostUrl")+"'"}else this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"");return}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb){var r=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=t.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+r).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=t.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},t}();e.TargetInfo=t}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];return t.call(this,e.Base.getInputParmeters.apply(null,a)),new e.ContentTypes(r,this.targetInfo,(!1)).getByName(s)}return __extends(s,t),s}(e.Base);e.ContentType=t,e.Library.contenttype={addFieldLink:{name:"fieldlinks",metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},delete:{requestType:e.RequestType.Delete},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"contenttypes",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"contenttypes"}})}return __extends(s,t),s}(e.Base);e.ContentTypes=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.ContentTypes_Async=s,e.Library.contenttypes={add:{argNames:["data"],metadataType:"SP.ContentType",requestType:e.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a));var i=new e.Fields(r,this.targetInfo,(!1));return i.getByInternalNameOrTitle(s)}return __extends(s,t),s}(e.Base);e.Field=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Field_Async=s,e.Library.field={delete:{requestType:e.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Field",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getFieldLinkByName:{argNames:["name"],name:"fields?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"fields",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"fields"}})}return __extends(s,t),s}(e.Base);e.Fields=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Fields_Async=s,e.Library.fields={add:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",requestType:e.RequestType.PostWithArgsInBody},addDependentLookup:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.RequestType.PostWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/files/getByUrl('":"getFileByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"file"}})}return __extends(s,t),s}(e.Base);e.File=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.File_Async=s,e.Library.file={approve:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},checkin:{argNames:["checkin","checkInType"],requestType:e.RequestType.PostWithArgs},checkout:{requestType:e.RequestType.Post},content:{name:"$value",requestType:e.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},deny:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"cancelupload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.RequestType.PostReplace},openBinaryStream:{requestType:e.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},saveBinaryStream:{requestType:e.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.RequestType.PostReplace},recycle:{requestType:e.RequestType.Get},undoCheckOut:{requestType:e.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"rootfolder/files",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"files"}})}return __extends(s,t),s}(e.Base);e.Files=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Files_Async=s,e.Library.files={add:{argNames:["overwrite","url"],requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.RequestType.PostWithArgs},getByName:{argNames:["name"],name:"?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(r?"lists/getByTitle('"+r+"')/rootfolder/folders/getByUrl('":"getFolderByServerRelativeUrl('")+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folder"}})}return __extends(s,t),s}(e.Base);e.Folder=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.Folder_Async=s,e.Library.folder={addFile:{argNames:["url","overwrite"],name:"files/add",requestType:e.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],name:"files/addtemplatefile",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getFile:{argNames:["name"],name:"files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSubFolder:{argNames:["name"],name:"folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/rootfolder/":"")+"folders",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"folders"}})}return __extends(s,t),s}(e.Base);e.Folders=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Folders_Async=s,e.Library.folders={add:{argNames:["url"],requestType:e.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={containsUser:{argNames:["userId"],name:"users?$filter=Id eq [[userId]]",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];if(t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/items",r){var i=new e.List(s,this.targetInfo,(!1));return i[/^<View/.test(r)?"getItems":"getItemsByQuery"](r)}this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"items"}})}return __extends(s,t),s}(e.Base);e.ListItems=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItems_Async=s,e.Library.items={add:{metadataType:"SP.ListItem",requestType:e.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.RequestType.GetReplace}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"list"}})}return __extends(s,t),s}(e.Base);e.List=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.List_Async=s,e.Library.list={addAvailableContentType:{argNames:["contentTypeId"],name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addContentType:{argNames:["data"],metadataType:"SP.ContentType",name:"contenttypes/add",requestType:e.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],name:"fields/addDependentLookupField",requestType:e.RequestType.PostWithArgs},addItem:{metadataType:"SP.ListItem",name:"items",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["principalid","roledefid"],name:"roleassignments/addroleassignment",requestType:e.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.RequestType.PostWithArgs},addView:{metadataType:"SP.View",name:"views",requestType:e.RequestType.PostWithArgsInBody},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContentType:{ | ||
argNames:["name"],name:"contenttypes?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getContentTypeById:{argNames:["id"],name:"contenttypes/getById([[id]])",requestType:e.RequestType.GetReplace},getDefaultDisplayForm:{name:"forms?$filter=FormType eq 4",requestType:e.RequestType.GetReplace},getDefaultEditForm:{name:"forms?$filter=FormType eq 6",requestType:e.RequestType.GetReplace},getDefaultNewForm:{name:"forms?$filter=FormType eq 8",requestType:e.RequestType.GetReplace},getForm:{argNames:["formType"],name:"forms?$filter=FormType eq [[formType]]",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByInternalNameOrTitle:{argNames:["internalNameOrTitle"],name:"fields/getByInternalNameOrTitle",requestType:e.RequestType.PostWithArgsValueOnly},getFieldByTitle:{argNames:["title"],name:"fields/getByTitle",requestType:e.RequestType.PostWithArgsValueOnly},getSubFolder:{argNames:["serverRelativeUrl"],name:"folders/getbyurl",requestType:e.RequestType.GetWithArgsValueOnly},getItemById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getItemByTitle:{argNames:["title"],name:"items?$filter Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getItems:{argNames:["viewXml"],requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByFilter:{argNames:["filter"],name:"items?$filter=[[filter]]",requestType:e.RequestType.GetWithArgsValueOnly},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsInQS},getViewById:{argNames:["viewId"],name:"getView",requestType:e.RequestType.GetWithArgsValueOnly},getViewByTitle:{argNames:["title"],name:"views?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},recycle:{requestType:e.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.RequestType.PostWithArgs},reserveListItemId:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/items("+s+")",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"listItem"}})}return __extends(s,t),s}(e.Base);e.ListItem=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.ListItem_Async=s,e.Library.listitem={addAttachment:{argNames:["name"],name:"attachmentfiles/add",requestType:e.RequestType.PostWithArgs},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},recycle:{requestType:e.RequestType.Post},resetRoleInheritance:{requestType:e.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"lists"}})}return __extends(s,t),s}(e.Base);e.Lists=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Lists_Async=s,e.Library.lists={add:{metadataType:"SP.List",requestType:e.RequestType.PostWithArgs},ensureSiteAssetsLibrary:{requestType:e.RequestType.Post},ensureSitePagesLibrary:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/"+(s?"lists/getByTitle('"+s+"')/":"")+"roleassignments",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roleassignments"}})}return __extends(s,t),s}(e.Base);e.RoleAssignments=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.RoleAssignments_Async=s,e.Library.roleAssignments={addRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs},getByPrincipalId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},removeRoleAssignment:{argNames:["principalid","roledefid"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/roledefinitions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"roledefinitions"}})}return __extends(s,t),s}(e.Base);e.RoleDefinitions=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.RoleDefinitions_Async=s,e.Library.roledefinitions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},getByType:{argNames:["type"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.searchservice={}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters(s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Site_Async=s,e.Library.site={addCustomAction:{argNames:["data"],metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{argNames:["web"],requestType:e.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.RequestType.PostWithArgs},invalidate:{requestType:e.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.RequestType.PostWithArgs},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.RequestType.PostWithArgs}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/sitegroups",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"sitegroups"}})}return __extends(s,t),s}(e.Base);e.SiteGroups=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.SiteGroups_Async=s,e.Library.siteGroups={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.RequestType.GetWithArgsValueOnly},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("feed/post",null,e,!0)}},{name:"getFeed",function:function(){return this.executeGet("feed")}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestfeedmanager={},e.Library.socialrestfeedmanager[e.RequestType.Custom]=[{name:"createPost",function:function(e){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:null,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("my/feed/post",null,e,!0)}},{name:"deletePost",function:function(e){return this.executePost("post/delete",null,{ID:e},!0)}},{name:"getMyFeed",function:function(){return this.executeGet("my/feed")}},{name:"getMyInfo",function:function(){return this.executeGet("my")}},{name:"getMyLikes",function:function(){return this.executeGet("my/likes")}},{name:"getMyMentionFeed",function:function(){return this.executeGet("my/mentionfeed")}},{name:"getMyNews",function:function(){return this.executeGet("my/news")}},{name:"getMyTimeLineFeed",function:function(){return this.executeGet("my/timelinefeed")}},{name:"getMyUnreadMentionCount",function:function(){return this.executeGet("my/unreadmentioncount")}},{name:"getPost",function:function(e){return this.executePost("post",null,{ID:e},!0)}},{name:"getPostLikers",function:function(e){return this.executePost("post/likers",null,{ID:e},!0)}},{name:"getUser",function:function(e){return 0==e.indexOf("i:0#.f|")?this.executeGet("actor",null,e):this.executeGet("actor",e)}},{name:"likePost",function:function(e){return this.executePost("post/like",null,{ID:e},!0)}},{name:"lockPost",function:function(e){return this.executePost("post/lock",null,{ID:e},!0)}},{name:"replyToPost",function:function(e,t){return t={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:e,creationData:t}},t.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("post/reply",null,t,!0)}},{name:"unlikePost",function:function(e){return this.executePost("post/unlike",null,{ID:e},!0)}},{name:"unlockPost",function:function(e){return this.executePost("post/unlock",null,{ID:e},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestthread={},e.Library.socialrestthread[e.RequestType.Custom]=[{name:"delete",function:function(e){return this.executePost("delete",null,{ID:e||this.ID},!0)}},{name:"like",function:function(e){return this.executePost("like",null,{ID:e||this.ID},!0)}},{name:"lock",function:function(e){return this.executePost("lock",null,{ID:e||this.ID},!0)}},{name:"reply",function:function(e,t){return e={restCreationData:{__metadata:{type:"SP.Social.SocialRestPostCreationData"},ID:t||this.ID,creationData:e}},e.restCreationData.creationData.__metadata={type:"SP.Social.SocialPostCreationData"},this.executePost("reply",null,e,!0)}},{name:"unlike",function:function(e){return this.executePost("unlike",null,{ID:e||this.ID},!0)}},{name:"unlock",function:function(e){return this.executePost("unlock",null,{ID:e||this.ID},!0)}}]}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.RequestType.Delete}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl="boolean"==typeof s&&s,this.targetInfo.endpoint=(this.defaultToWebFl?"web":"site")+"/usercustomactions",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"usercustomactions"}})}return __extends(s,t),s}(e.Base);e.UserCustomActions=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.UserCustomActions_Async=s,e.Library.usercustomactions={clear:{requestType:e.RequestType.Post},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],name:"?filter=Name eq '[[name]]'",requestType:e.RequestType.PostReplace},getByTitle:{argNames:["title"],name:"?filter=Title eq '[[title]]'",requestType:e.RequestType.PostReplace}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/users",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"users"}})}return __extends(s,t),s}(e.Base);e.Users=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Users_Async=s,e.Library.users={getByEmail:{argNames:["email"],requestType:e.RequestType.GetWithArgsValueOnly},getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByLoginName:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},removeById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},deleteAll:{requestType:e.RequestType.Post},deleteById:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,e.Base.getInputParmeters.apply(null,a)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+r+"')/views/getByTitle('"+s+"')",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"view"}})}return __extends(s,t),s}(e.Base);e.View=t;var s=function(t){function s(s,r){for(var a=[],n=2;n<arguments.length;n++)a[n-2]=arguments[n];t.call(this,s,r,e.Base.getAsyncInputParmeters.apply(null,a))}return __extends(s,t),s}(t);e.View_Async=s,e.Library.view={delete:{requestType:e.RequestType.Delete},renderAsHtml:{requestType:e.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.RequestType.PostWithArgsInBody},removeAllViewFields:{requestType:e.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,e.Base.getInputParmeters.apply(null,r)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web/lists/getByTitle('"+s+"')/views",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"views"}})}return __extends(s,t),s}(e.Base);e.Views=t;var s=function(t){function s(s){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];t.call(this,s,e.Base.getAsyncInputParmeters.apply(null,r))}return __extends(s,t),s}(t);e.Views_Async=s,e.Library.views={getById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var __extends=this&&this.__extends||function(e,t){function s(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},$REST;!function(e){var t=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getInputParmeters.apply(null,s)),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",this.executeRequestFl?this.execute():this.addMethods(this,{__metadata:{type:"web"}})}return __extends(s,t),s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Web=t;var s=function(t){function s(){for(var s=[],r=0;r<arguments.length;r++)s[r-0]=arguments[r];t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Web_Async=s,e.Library.web={addContentType:{metadataType:"SP.ContentType",name:"contenttypes",requestType:e.RequestType.PostWithArgsInBody},addCustomAction:{metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.RequestType.PostWithArgsInBody},addExistingContentType:{name:"contenttypes/addAvailableContentType",requestType:e.RequestType.PostWithArgsInBody},addField:{metadataType:"SP.Field",name:"fields/add",requestType:e.RequestType.PostWithArgsInBody},addFieldAsXml:{argNames:["schemaXml"],name:"fields/createFieldAsXml",requestType:e.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},addFile:{argNames:["url","overwrite"],name:"rootfolder/files/add",requestType:e.RequestType.PostWithArgs},addList:{metadataType:"SP.List",name:"lists",requestType:e.RequestType.PostWithArgsInBody},addPermission:{metadataType:"SP.RoleDefinition",name:"roledefinitions",requestType:e.RequestType.PostWithArgsInBody},addSiteGroup:{argNames:["Title"],metadataType:"SP.Group",name:"sitegroups",requestType:e.RequestType.PostWithArgsInBody},addSubFolder:{name:"rootfolder/folders/add",requestType:e.RequestType.PostWithArgsValueOnly},applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.RequestType.PostWithArgs},applyWebTemplate:{requestType:e.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.RequestType.PostWithArgs},delete:{requestType:e.RequestType.Delete},doesPushNotificationSubscriberExist:{requestType:e.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.RequestType.Post},getCustomAction:{argNames:["title"],name:"usercustomactions?$filter=Name eq '[[title]]' or Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getCustomListTemplates:{requestType:e.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.RequestType.PostWithArgs},getField:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]' or InternalName eq '[[title]]' or StaticName eq '[[title]]'",requestType:e.RequestType.GetReplace},getFieldById:{argNames:["id"],name:"fields/getById",requestType:e.RequestType.GetWithArgsValueOnly},getFieldByInternalName:{argNames:["name"],name:"fields?$filter=InternalName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByStaticName:{argNames:["name"],name:"fields?$filter=StaticName eq '[[name]]'",requestType:e.RequestType.GetReplace},getFieldByTitle:{argNames:["title"],name:"fields?$filter=Title eq '[[title]]'",requestType:e.RequestType.GetReplace},getFile:{argNames:["name"],name:"rootfolder/files?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getList:{argNames:["url"],requestType:e.RequestType.GetWithArgsValueOnly},getListById:{argNames:["id"],name:"lists/getById",requestType:e.RequestType.GetWithArgsValueOnly},getListByTitle:{argNames:["title"],name:"lists/getByTitle",requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscriber:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.RequestType.GetWithArgsInQS},getSubFolder:{argNames:["name"],name:"rootfolder/folders?$filter=Name eq '[[name]]'",requestType:e.RequestType.GetReplace},getSiteGroupById:{argNames:["id"],name:"sitegroups/getById",requestType:e.RequestType.GetWithArgsValueOnly},getSiteGroupByName:{argNames:["name"],name:"sitegroups/getByName",requestType:e.RequestType.GetWithArgsValueOnly},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.RequestType.GetWithArgs},getUserByEmail:{argNames:["email"],name:"siteusers/getByEmail",requestType:e.RequestType.GetWithArgsValueOnly},getUserById:{argNames:["id"],requestType:e.RequestType.GetWithArgsValueOnly},getUserByLogin:{argNames:["loginName"],name:"siteusers/getByLoginName",requestType:e.RequestType.GetWithArgsValueOnly},getUserEffectivePermissions:{requestType:e.RequestType.GetWithArgsInQS},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.RequestType.GetWithArgs},processExternalNotification:{requestType:e.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.RequestType.PostWithArgs},resetRoleInheritance:{argNames:[],requestType:e.RequestType.Post},sendEmail:{argNames:["properties"],name:"SP.Utilities.Utility.SendEmail",metadataType:"SP.Utilities.EmailProperties",requestType:e.RequestType.PostWithArgsInBody},unregisterPushNotificationSubscriber:{requestType:e.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.RequestType.PostWithArgsInBody}}}($REST||($REST={})); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
799159
12049
309