gd-sprest
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -1,2 +0,2 @@ | ||
var $REST;!function(e){e.DefaultRequestToHostWebFl=!1,e.Library={};var t=function(){function t(e){this.targetInfo=e||{},this.requestType=0}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.execute=function(t){var s=this;return this.targetInfo.asyncFl?(this.promise=new e.Utils.Promise(t||this.targetInfo.callback),this.request=new e.Utils.Request(new e.Utils.TargetInfo(this.targetInfo),function(){s.updateDataObject()})):(this.request=new e.Utils.Request(new e.Utils.TargetInfo(this.targetInfo)),this.updateDataObject()),this},t.getAsyncInputParmeters=function(e){return e=e?e:{},e.asyncFl=!0,e},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.results.length>1?"s":"",(/^field/.test(n)||/field$/.test(n))&&"fieldlinks"!=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){var u=i[o]?i[o]:{};if("properties"!=o)"function"==typeof u.metadataType&&(u=JSON.parse(JSON.stringify(u)),u.metadataType=i[o].metadataType(t)),t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(u)+", arguments);");else for(var p=0,l=u;p<l.length;p++){var y=l[p],d=y.split("|"),T=d[0],g=d.length>1?d[1]:null,c=d.length>2?d[2]:null,h=d.length>3?d[3]:null;4==d.length?(c=c.replace(/'/g,"\\'"),t[T]=new Function("name","name = name ? '"+T+c+"'.replace(/\\[Name\\]/g, name) : null;return this.getProperty(name ? name : '"+T+"', name ? '"+h+"' : '"+g+"');")):t[T]=new Function("return this.getProperty('"+T+"', '"+g+"');")}}},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]=e["get_"+s]?e["get_"+s]:new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.done=function(e){this.promise?this.promise.done(e):this.targetInfo.callback=e},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},r.inheritMetadataType&&(r.metadataType=i.type),this.updateMetadataUri(i,n)):n=Object.create(this.targetInfo),n.asyncFl=this.targetInfo?this.targetInfo.asyncFl:this.asyncFl;var o=new e.Utils.MethodInfo(s,r,a);n.bufferFl=r.requestType==e.Types.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(n);return u.parent=this,u.requestType=r.requestType,u},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var n=new t(r);return n.parent=this,n},t.prototype.getProperty=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e;var n=new t(r);return n.parent=this,s?this.addMethods(n,{__metadata:{type:s}}):null,n},t.prototype.resolveParentRequest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.targetInfo.callback&&this.targetInfo.callback.apply(this,e)},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.updateMetadata(e[0]),this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),e[0].asyncFl=this.asyncFl,e[0].executeMethod=this.executeMethod,e[0].parent=this,this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var e=t.results,s=0,r=e;s<r.length;s++){var a=r[s];a.asyncFl=t.asyncFl,a.executeMethod=t.executeMethod,a.parent=t,t.updateMetadata(a),t.addMethods(a,a)}},10))},t.prototype.updateDataObject=function(){if(this.request.request.status<400)if(this.requestType==e.Types.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.updateMetadata(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.prototype.updateMetadata=function(e){if(window._spPageContextInfo.isAppWeb){var t=window._spPageContextInfo.webAbsoluteUrl.toLowerCase(),s=e&&e.__metadata&&e.__metadata.uri?e.__metadata.uri.toLowerCase():null,r=this.targetInfo&&this.targetInfo.url?this.targetInfo.url.toLowerCase():null;null!=t&&null!=s&&null!=r&&(e.__metadata.uri=s.replace(t,r))}},t.prototype.updateMetadataUri=function(e,t){/^SP.Field/.test(e.type)||/^SP\..*Field$/.test(e.type)?t.url=t.url.replace(/AvailableFields/,"fields"):/SP.EventReceiverDefinition/.test(e.type)&&(t.url=t.url.replace(/\/EventReceiver\//,"/EventReceivers/"))},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.OData=3]="OData",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={}));e.RequestType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Invalid=0]="Invalid",e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(e.ControlMode||(e.ControlMode={}));e.ControlMode;!function(e){e[e.Approver=2]="Approver",e[e.Author=1]="Author",e[e.Reader=0]="Reader"}(e.DraftVisibilityType||(e.DraftVisibilityType={}));e.DraftVisibilityType;!function(e){e[e.ItemAdding=1]="ItemAdding",e[e.ItemUpdating=2]="ItemUpdating",e[e.ItemDeleting=3]="ItemDeleting",e[e.ItemCheckingIn=4]="ItemCheckingIn",e[e.ItemCheckingOut=5]="ItemCheckingOut",e[e.ItemUncheckingOut=6]="ItemUncheckingOut",e[e.ItemAttachmentAdding=7]="ItemAttachmentAdding",e[e.ItemAttachmentDeleting=8]="ItemAttachmentDeleting",e[e.ItemFileMoving=9]="ItemFileMoving",e[e.ItemVersionDeleting=11]="ItemVersionDeleting",e[e.FieldAdding=101]="FieldAdding",e[e.FieldUpdating=102]="FieldUpdating",e[e.FieldDeleting=103]="FieldDeleting",e[e.ListAdding=104]="ListAdding",e[e.ListDeleting=105]="ListDeleting",e[e.SiteDeleting=201]="SiteDeleting",e[e.WebDeleting=202]="WebDeleting",e[e.WebMoving=203]="WebMoving",e[e.WebAdding=204]="WebAdding",e[e.GroupAdding=301]="GroupAdding",e[e.GroupUpdating=302]="GroupUpdating",e[e.GroupDeleting=303]="GroupDeleting",e[e.GroupUserAdding=304]="GroupUserAdding",e[e.GroupUserDeleting=305]="GroupUserDeleting",e[e.RoleDefinitionAdding=306]="RoleDefinitionAdding",e[e.RoleDefinitionUpdating=307]="RoleDefinitionUpdating",e[e.RoleDefinitionDeleting=308]="RoleDefinitionDeleting",e[e.RoleAssignmentAdding=309]="RoleAssignmentAdding",e[e.RoleAssignmentDeleting=310]="RoleAssignmentDeleting",e[e.InheritanceBreaking=311]="InheritanceBreaking",e[e.InheritanceResetting=312]="InheritanceResetting",e[e.WorkflowStarting=501]="WorkflowStarting",e[e.ItemAdded=10001]="ItemAdded",e[e.ItemUpdated=10002]="ItemUpdated",e[e.ItemDeleted=10003]="ItemDeleted",e[e.ItemCheckedIn=10004]="ItemCheckedIn",e[e.ItemCheckedOut=10005]="ItemCheckedOut",e[e.ItemUncheckedOut=10006]="ItemUncheckedOut",e[e.ItemAttachmentAdded=10007]="ItemAttachmentAdded",e[e.ItemAttachmentDeleted=10008]="ItemAttachmentDeleted",e[e.ItemFileMoved=10009]="ItemFileMoved",e[e.ItemFileConverted=10010]="ItemFileConverted",e[e.ItemVersionDeleted=10011]="ItemVersionDeleted",e[e.FieldAdded=10101]="FieldAdded",e[e.FieldUpdated=10102]="FieldUpdated",e[e.FieldDeleted=10103]="FieldDeleted",e[e.ListAdded=10104]="ListAdded",e[e.ListDeleted=10105]="ListDeleted",e[e.SiteDeleted=10201]="SiteDeleted",e[e.WebDeleted=10202]="WebDeleted",e[e.WebMoved=10203]="WebMoved",e[e.WebProvisioned=10204]="WebProvisioned",e[e.GroupAdded=10301]="GroupAdded",e[e.GroupUpdated=10302]="GroupUpdated",e[e.GroupDeleted=10303]="GroupDeleted",e[e.GroupUserAdded=10304]="GroupUserAdded",e[e.GroupUserDeleted=10305]="GroupUserDeleted",e[e.RoleDefinitionAdded=10306]="RoleDefinitionAdded",e[e.RoleDefinitionUpdated=10307]="RoleDefinitionUpdated",e[e.RoleDefinitionDeleted=10308]="RoleDefinitionDeleted",e[e.RoleAssignmentAdded=10309]="RoleAssignmentAdded",e[e.RoleAssignmentDeleted=10310]="RoleAssignmentDeleted",e[e.InheritanceBroken=10311]="InheritanceBroken",e[e.InheritanceReset=10312]="InheritanceReset",e[e.WorkflowStarted=10501]="WorkflowStarted",e[e.WorkflowPostponed=10502]="WorkflowPostponed",e[e.WorkflowCompleted=10503]="WorkflowCompleted",e[e.EntityInstanceAdded=10601]="EntityInstanceAdded",e[e.EntityInstanceUpdated=10602]="EntityInstanceUpdated",e[e.EntityInstanceDeleted=10603]="EntityInstanceDeleted",e[e.AppInstalled=10701]="AppInstalled",e[e.AppUpgraded=10702]="AppUpgraded",e[e.AppUninstalling=10703]="AppUninstalling",e[e.EmailReceived=2e4]="EmailReceived",e[e.ContextEvent=32766]="ContextEvent"}(e.EventReceiverType||(e.EventReceiverType={}));e.EventReceiverType;!function(e){e[e.Asynchronous=2]="Asynchronous",e[e.Synchronization=1]="Synchronization"}(e.EventReceiverSynchronizationType||(e.EventReceiverSynchronizationType={}));e.EventReceiverSynchronizationType;!function(e){e[e.AllDayEvent=29]="AllDayEvent",e[e.Attachments=19]="Attachments",e[e.Boolean=8]="Boolean",e[e.Calculated=17]="Calculated",e[e.Choice=6]="Choice",e[e.Computed=12]="Computed",e[e.ContentTypeId=25]="ContentTypeId",e[e.Counter=5]="Counter",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.Currency=10]="Currency",e[e.DateTime=4]="DateTime",e[e.Error=24]="Error",e[e.File=18]="File",e[e.Geolocation=31]="Geolocation",e[e.GridChoice=16]="GridChoice",e[e.Guid=14]="Guid",e[e.Integer=1]="Integer",e[e.Invalid=0]="Invalid",e[e.Lookup=7]="Lookup",e[e.MaxItems=31]="MaxItems",e[e.ModStat=23]="ModStat",e[e.MultiChoice=15]="MultiChoice",e[e.Note=3]="Note",e[e.Number=9]="Number",e[e.PageSeparator=26]="PageSeparator",e[e.Recurrence=21]="Recurrence",e[e.Text=2]="Text",e[e.ThreadIndex=27]="ThreadIndex",e[e.Threading=13]="Threading",e[e.URL=11]="URL",e[e.User=20]="User",e[e.WorkflowEventType=30]="WorkflowEventType",e[e.WorkflowStatus=28]="WorkflowStatus"}(e.FieldType||(e.FieldType={}));e.FieldType;!function(e){e[e.FormPage=2]="FormPage",e[e.StandardPage=0]="StandardPage",e[e.WikiPage=1]="WikiPage"}(e.FileTemplateType||(e.FileTemplateType={}));e.FileTemplateType;!function(e){e[e.AccessRequest=160]="AccessRequest",e[e.AdminTasks=1200]="AdminTasks",e[e.Agenda=201]="Agenda",e[e.AppDataCatalog=125]="AppDataCatalog",e[e.Announcements=104]="Announcements",e[e.CallTrack=404]="CallTrack",e[e.Categories=303]="Categories",e[e.Circulation=405]="Circulation",e[e.Comments=302]="Comments",e[e.Contacts=105]="Contacts",e[e.CustomGrid=120]="CustomGrid",e[e.DataConnectionLibrary=130]="DataConnectionLibrary",e[e.DataSources=110]="DataSources",e[e.Decision=204]="Decision",e[e.DesignCatalog=124]="DesignCatalog",e[e.DeveloperSiteDraftApps=1230]="DeveloperSiteDraftApps",e[e.DiscussionBoard=108]="DiscussionBoard",e[e.DocumentLibrary=101]="DocumentLibrary",e[e.Events=106]="Events",e[e.ExternalList=600]="ExternalList",e[e.Facility=402]="Facility",e[e.GanttTasks=150]="GanttTasks",e[e.GenericList=100]="GenericList",e[e.HealthReports=1221]="HealthReports",e[e.HealthRules=1220]="HealthRules",e[e.HelpLibrary=151]="HelpLibrary",e[e.Holidays=421]="Holidays",e[e.HomePageLibrary=212]="HomePageLibrary",e[e.IMEDic=499]="IMEDic",e[e.IssueTracking=1100]="IssueTracking",e[e.Links=103]="Links",e[e.ListTemplateCatalog=114]="ListTemplateCatalog",e[e.MasterPageCatalog=116]="MasterPageCatalog",e[e.MaintenanceLogs=175]="MaintenanceLogs",e[e.MeetingObjective=207]="MeetingObjective",e[e.Meetings=200]="Meetings",e[e.MeetingUser=202]="MeetingUser",e[e.MySiteDocumentLibrary=700]="MySiteDocumentLibrary",e[e.Posts=301]="Posts",e[e.NoCodePublic=122]="NoCodePublic",e[e.NoCodeWorkflows=117]="NoCodeWorkflows",e[e.PictureLibrary=109]="PictureLibrary",e[e.SolutionCatalog=121]="SolutionCatalog",e[e.Survey=102]="Survey",e[e.Tasks=107]="Tasks",e[e.TasksWithTimelineAndHierarchy=171]="TasksWithTimelineAndHierarchy",e[e.TextBox=210]="TextBox",e[e.ThemeCatalog=123]="ThemeCatalog",e[e.ThingsToBring=211]="ThingsToBring",e[e.Timecard=420]="Timecard",e[e.UserInformation=112]="UserInformation",e[e.WebPageLibrary=119]="WebPageLibrary",e[e.WebPartCatalog=113]="WebPartCatalog",e[e.WebTemplateCatalog=111]="WebTemplateCatalog",e[e.Whereabouts=403]="Whereabouts",e[e.WorkflowHistory=140]="WorkflowHistory",e[e.WorkflowProcess=118]="WorkflowProcess",e[e.XMLForm=115]="XMLForm"}(e.ListTemplateType||(e.ListTemplateType={}));e.ListTemplateType;!function(e){e[e.DefaultView=0]="DefaultView",e[e.DialogView=2]="DialogView",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.Invalid=-1]="Invalid",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.NormalView=1]="NormalView",e[e.Page_MAXITEMS=11]="Page_MAXITEMS",e[e.SolutionForm=10]="SolutionForm",e[e.View=3]="View"}(e.PageType||(e.PageType={}));e.PageType;!function(e){e[e.Administrator=5]="Administrator",e[e.Contributor=3]="Contributor",e[e.Editor=6]="Editor",e[e.Guest=1]="Guest",e[e.None=0]="None",e[e.Reader=2]="Reader",e[e.WebDesigner=4]="WebDesigner"}(e.RoleType||(e.RoleType={}));e.RoleType;!function(e){e[e.None=0]="None",e[e.List=1]="List",e[e.ContentType=2]="ContentType",e[e.ProgId=3]="ProgId",e[e.FileType=4]="FileType"}(e.UserCustomActionRegistrationType||(e.UserCustomActionRegistrationType={}));e.UserCustomActionRegistrationType;!function(e){e[e.Calendar=524288]="Calendar",e[e.Chart=131072]="Chart",e[e.Gantt=67108864]="Gantt",e[e.Grid=2048]="Grid",e[e.Html=1]="Html",e[e.Recurrence=8193]="Recurrence"}(e.ViewType||(e.ViewType={}));e.ViewType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Utils.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(t){var s=function(){function s(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(s.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.Types.RequestType.Delete:case e.Types.RequestType.Post:case e.Types.RequestType.PostWithArgs:case e.Types.RequestType.PostWithArgsInBody:case e.Types.RequestType.PostWithArgsInQS:case e.Types.RequestType.PostWithArgsValueOnly:case e.Types.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetReplace||this.methodInfo.requestType==e.Types.RequestType.PostReplace},enumerable:!0,configurable:!0}),s.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,'\\"').replace(/\n/g,""));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&this.methodInfo.argValues.length>0&&(null==this.methodInfo.argNames?this.methodData=this.methodInfo.argValues[0]:this.methodInfo.argValues.length>this.methodInfo.argNames.length&&(this.methodData=this.methodInfo.argValues[this.methodInfo.argNames.length])),this.methodInfo.metadataType&&(this.methodInfo.argNames?(this.methodData||this.methodParams)[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:(this.methodData||this.methodParams).__metadata={type:this.methodInfo.metadataType})}},s.prototype.generateUrl=function(){var s=this.methodInfo.name;if(this.methodInfo.requestType==e.Types.RequestType.Delete&&(s="deleteObject"),this.passDataInBody){var r=this.methodData||this.methodParams;this.methodData=JSON.stringify(r)}if(this.passDataInQS){var r=this.methodParams||this.methodData;s+="(@v)?@v="+("string"==typeof r?"'"+encodeURIComponent(r)+"'":JSON.stringify(r))}if(this.replace)for(var a in this.methodParams)s=s.replace("[["+a+"]]",encodeURIComponent(this.methodParams[a]));else if(this.methodInfo.requestType==e.Types.RequestType.OData){var n=new t.OData(this.methodParams.oData);s="?"+n.QueryString}else if(!this.passDataInBody&&!this.passDataInQS){var i="",r=this.methodParams||this.methodData;if(r){r=r&&"object"==typeof r?r:{value:r};for(var o in r){var u=r[o];switch(u="string"==typeof u?"'"+u+"'":u,this.methodInfo.requestType){case e.Types.RequestType.GetWithArgsValueOnly:case e.Types.RequestType.PostWithArgsValueOnly:i+=u+", ";break;default:i+=o+"="+u+", "}}}s+=i.length>0?"("+i.replace(/, $/,"")+")":""}return s},s}();t.MethodInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=function(){function e(e){this._expand=e&&e.Expand?e.Expand:[],this._filter=e&&e.Filter?e.Filter:null,this._orderBy=e&&e.OrderBy?e.OrderBy:[],this._select=e&&e.Select?e.Select:[],this._skip=e&&e.Skip?e.Skip:null,this._top=e&&e.Top?e.Top:null}return Object.defineProperty(e.prototype,"Expand",{get:function(){return this._expand},set:function(e){this._expand=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Filter",{get:function(){return this._filter},set:function(e){this._filter=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OrderBy",{get:function(){return this._orderBy},set:function(e){this._orderBy=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"QueryString",{get:function(){var e="",t=[];t.push(this.getQSValue("$select",this._select)),t.push(this.getQSValue("$orderby",this._orderBy)),this._top?t.push("$top="+this._top):null,this._skip?t.push("$skip="+this._skip):null,this._filter?t.push("$filter=",this._filter):null,t.push(this.getQSValue("$expand",this._expand));for(var s=0,r=t;s<r.length;s++){var a=r[s];a&&""!=a&&(e+=(""==e?"":"&")+a)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Select",{get:function(){return this._select},set:function(e){this._select=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Skip",{get:function(){return this._skip},set:function(e){this._skip=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Top",{get:function(){return this._top},set:function(e){this._top=e},enumerable:!0,configurable:!0}),e.prototype.getQSValue=function(e,t){return t.length>0?e+"="+t.join(","):""},e}();e.OData=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!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}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=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||null==this.targetInfo.requestData?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}();e.Request=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(t){var s=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=this.getQueryStringValue("SPHostUrl"),s="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(e.DefaultRequestToHostWebFl&&this.isAppWeb&&null==this.targetInfo.url&&(this.targetInfo.url=t),null==this.targetInfo.url)this.targetInfo.url=this.context[0==this.targetInfo.defaultToWebFl?"siteAbsoluteUrl":"webAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){var r=this.targetInfo.url.split("/_api/");return void(this.isAppWeb&&r[0]!=this.context.webAbsoluteUrl?this.requestUrl=this.context.webAbsoluteUrl+"/_api/SP.AppContextSite(@target)/"+r[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+r[0]+"'":this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:""))}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb&&this.targetInfo.url!=this.context.webAbsoluteUrl){var a=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=s.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+a).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=s.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},t}();t.TargetInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],name:"",requestType:e.Types.RequestType.PostWithArgs},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttype={properties:["FieldLinks|fieldlinks|('[Name]')|fieldlink","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","WorkflowAssociations"],delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttypes={add:{metadataType:"SP.ContentType",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){t.call(this,e),this.defaultToWebFl=!0,this.targetInfo.endpoint="SP.Utilities.Utility.SendEmail"}return __extends(s,t),s.prototype.send=function(t){t.To&&("string"==typeof t.To?t.To={results:[t.To]}:t.To={results:t.To}),this.executeMethod("send",{argNames:["properties"],name:"",metadataType:"SP.Utilities.EmailProperties",requestType:e.Types.RequestType.PostWithArgsInBody},[t])},s}(e.Base);e.Email=t;var s=function(t){function s(s){t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Email_Async=s}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinition={delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.EventReceiverDefinition",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinitions={add:{metadataType:"SP.EventReceiverDefinition",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.field={delete:{requestType:e.Types.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fields={add:{metadataType:"SP.Field",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"addField",requestType:e.Types.RequestType.PostWithArgsInBody},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.Types.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation" | ||
},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.PostWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.file={properties:["Author|user","CheckedOutByUser|user","EffectiveInformationRightsManagementSettings","InformationRightsManagementSettings","ListItemAllFields","LockedByUser|user","ModifiedBy|user","Properties","VersionEvents","Versions|fileversions"],approve:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},checkin:{argNames:["comment","checkInType"],requestType:e.Types.RequestType.PostWithArgs},checkout:{requestType:e.Types.RequestType.Post},content:{name:"$value",requestType:e.Types.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"continueUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},deny:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"finishUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.Types.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.Types.RequestType.PostReplace},openBinaryStream:{requestType:e.Types.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},recycle:{requestType:e.Types.RequestType.Get},saveBinaryStream:{requestType:e.Types.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},undoCheckOut:{requestType:e.Types.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.files={add:{argNames:["overwrite","url"],requestType:e.Types.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.Types.RequestType.PostWithArgs},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={properties:[],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversions={delete:{requestType:e.Types.RequestType.Delete},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.folder={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder|folder","Properties","StorageMetrics"],addFile:{argNames:["url","overwrite"],name:"files/add",requestType:e.Types.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],name:"files/addtemplatefile",requestType:e.Types.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.folders={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder","Properties","StorageMetrics"],add:{argNames:["url"],requestType:e.Types.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={properties:["Users|users|/getById([Name])|user"]}}($REST||($REST={}));var $REST;!function(e){e.Library.items={add:{metadataType:function(e){return e.Parent&&e.Parent.ListItemEntityTypeFullName?e.Parent.ListItemEntityTypeFullName:"SP.ListItem"},name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.Types.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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="lists/getByTitle('"+t+"')",this.addMethods(this,{__metadata:{type:"list"}})}return __extends(t,e),t}(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={properties:["BrowserFileHandling","ContentTypes|contenttypes|([Name])|contenttype","CreatablesInfo","DefaultView|view","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Forms|forms|('[Name]')|form","InformationRightsManagementSettings","Items|items|([Name])|item","ParentWeb","RoleAssignments|roleassignments|([Name])|roleassignment","RootFolder|folder|/getByUrl('[Name]')|file","Subscriptions","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","Views|views||('[Name]')|view","WorkflowAssociations"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getItemById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getItems:{argNames:["viewXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.Types.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getViewById:{argNames:["viewId"],name:"getView",requestType:e.Types.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.Types.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.Types.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.Types.RequestType.PostWithArgs},reserveListItemId:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.listitem={properties:["AttachmentFiles|attachmentfiles","ContentType|contenttype","FieldValuesAsHtml","FieldValuesAsText","FieldValuesForEdit","File|file","FirstUniqueAncestorSecurableObject","Folder|folder","GetDlpPolicyTip","ParentList|list","RoleAssignments|roleassignments|roleassignments|([Name])|roleassignment"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},recycle:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.lists={add:{metadataType:"SP.List",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},ensureSiteAssetsLibrary:{requestType:e.Types.RequestType.Post},ensureSitePagesLibrary:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.Types.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.Types.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.Types.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.Types.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={properties:["Member","RoleDefinitionBindings|roledefinitions"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignments={addRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs},getByPrincipalId:{argNames:["principalId"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinitions={getById:{argNames:["roleDefId"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByType:{argNames:["roleType"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e,s){t.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",e&&(this.targetInfo.url=e),this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(null,this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=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.Site_Async=s,e.Library.site={properties:["EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Owner|user","RootWeb|web","UserCustomActions|usercustomactions|('[Name]')|usercustomaction"],addCustomAction:{metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.Types.RequestType.PostWithArgsInBody},createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.Types.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.Types.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getCustomListTemplates:{argNames:["web"],requestType:e.Types.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.Types.RequestType.PostWithArgs},invalidate:{requestType:e.Types.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.Types.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.Types.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.Types.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.Types.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.siteGroups={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["name"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.Types.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.Types.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.Types.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.user={properties:["Groups|sitegroups|([Name])|group"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomactions={add:{metadataType:"SP.UserCustomAction",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},clear:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.Types.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.Types.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var $REST;!function(e){e.Library.users={getByEmail:{argNames:["email"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},deleteAll:{requestType:e.Types.RequestType.Post},deleteById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.view={properties:["ViewFields|viewfieldcollection"],delete:{requestType:e.Types.RequestType.Delete},renderAsHtml:{requestType:e.Types.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeAllViewFields:{requestType:e.Types.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.views={add:{metadataType:"SP.View",name:"",requestType:e.Types.RequestType.PostWithArgs},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",t&&(this.targetInfo.url=t),this.addMethods(this,{__metadata:{type:"web"}})}return __extends(t,e),t.prototype.hasAccess=function(e){return!0},t}(e.Base);e.Web=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.Web_Async=s,e.Library.web={properties:["AllProperties","AppTiles","AssociatedMemberGroup|group","AssociatedOwnerGroup|group","AssociatedVisitorGroup|group","Author|user","AvailableContentTypes|contenttypes","AvailableFields|fields","ClientWebParts","ContentTypes|contenttypes|('[Name]')|contenttype","CurrentUser|user","DataLeakagePreventionStatusInfo","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Folders|folders|/getByUrl('[Name]')|folder","Lists|lists|/getByTitle('[Name]')|list","ListTemplates|listtemplates|('[Name]')|listtemplate","Navigation","ParentWeb","PushNotificationSubscribers","RecycleBin","RegionalSettings","RoleAssignments|roleassignments|([Name])|roleassignment","RoleDefinitions|roledefinitions|([Name])|roledefinition","RootFolder|folder|/getByUrl('[Name]')|file","SiteGroups|sitegroups|([Name])|group","SiteUserInfoList","SiteUsers|users|/getById([Name])|user","ThemeInfo","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","WebInfos","Webs|webs","WorkflowAssociations","WorkflowTemplates"],applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.Types.RequestType.PostWithArgs},applyWebTemplate:{argName:["name"],requestType:e.Types.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},doesPushNotificationSubscriberExist:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.Types.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.Types.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.Types.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.Types.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.Types.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.Types.RequestType.Post},getCustomListTemplates:{requestType:e.Types.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.Types.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.Types.RequestType.PostWithArgs},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getList:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscriber:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.Types.RequestType.GetWithArgs},getUserById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.Types.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.Types.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.Types.RequestType.GetWithArgs},processExternalNotification:{requestType:e.Types.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.Types.RequestType.PostWithArgs},resetRoleInheritance:{requestType:e.Types.RequestType.Post},unregisterPushNotificationSubscriber:{requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={})); | ||
var $REST;!function(e){e.DefaultRequestToHostWebFl=!1,e.Library={};var t=function(){function t(e){this.targetInfo=e||{},this.requestType=0}return Object.defineProperty(t.prototype,"response",{get:function(){return this.request?this.request.response:null},enumerable:!0,configurable:!0}),t.prototype.execute=function(e){var t="boolean"==typeof e?null:e,s="boolean"==typeof e&&e;return this.executeRequiredFl=!0,s?this.executeRequest(!s,t):this.executeRequest(!s,t)},t.prototype.addMethods=function(t,s){var r=s.results&&s.results.length>0,a=r?s.results[0].__metadata:s.__metadata,i=a&&a.type?a.type:this.targetInfo.endpoint;i=i.split("/"),i=i[i.length-1],i=i.split("."),i=i[i.length-1].toLowerCase(),i+=r&&s.results.length>1?"s":"",(/^field/.test(i)||/field$/.test(i))&&"fieldlinks"!=i&&"fields"!=i?i="field"+(r?"s":""):/item$/.test(i)?i="listitem":/items$/.test(i)&&(i="items");var n=e.Library[i];if(n)for(var o in n){var u=n[o]?n[o]:{};if("properties"!=o)"function"==typeof u.metadataType&&(u=JSON.parse(JSON.stringify(u)),u.metadataType=n[o].metadataType(t)),t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(u)+", arguments);");else for(var p=0,l=u;p<l.length;p++){var y=l[p],d=y.split("|"),T=d[0],g=d.length>1?d[1]:null,c=d.length>2?d[2]:null,h=d.length>3?d[3]:null;4==d.length?(c=c.replace(/'/g,"\\'"),t[T]=new Function("name","name = name ? '"+T+c+"'.replace(/\\[Name\\]/g, name) : null;return this.getProperty(name ? name : '"+T+"', name ? '"+h+"' : '"+g+"');")):t[T]=new Function("return this.getProperty('"+T+"', '"+g+"');")}}},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]=e["get_"+s]?e["get_"+s]:new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.executeMethod=function(s,r,a){var i=null,n=this.d?this.d.__metadata:this.__metadata;n&&n.uri?(i={url:n.uri},r.inheritMetadataType&&(r.metadataType=n.type),this.updateMetadataUri(n,i)):i=Object.create(this.targetInfo);var o=new e.Utils.MethodInfo(s,r,a);i.bufferFl=r.requestType==e.Types.RequestType.GetBuffer,i.data=o.body,i.method=o.requestMethod,o.replaceEndpointFl?i.endpoint=o.url:o.url&&o.url.length>0&&(i.endpoint=(i.endpoint?i.endpoint+"/":"")+o.url);var u=new t(i);return u.parent=this,u.requestType=r.requestType,r.returnType?u.addMethods(u,{__metadata:{type:r.returnType}}):null,u},t.prototype.executeRequest=function(t,s){var r=this;if(this.executeRequiredFl){if(!t)return this.request=new e.Utils.Request(t,new e.Utils.TargetInfo(this.targetInfo)),this.updateDataObject()||this;this.promise=new e.Utils.Promise(s||this.targetInfo.callback),this.request=new e.Utils.Request(t,new e.Utils.TargetInfo(this.targetInfo),function(){r.updateDataObject()})}},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var i=new t(r);return i.parent=this,i},t.prototype.getProperty=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e;var i=new t(r);return i.parent=this,s?this.addMethods(i,{__metadata:{type:s}}):null,i},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.updateMetadata(e[0]),this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),e[0].executeMethod=this.executeMethod,e[0].parent=this,this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var e=t.results,s=0,r=e;s<r.length;s++){var a=r[s];a.executeMethod=t.executeMethod,a.parent=t,t.updateMetadata(a),t.addMethods(a,a)}},10))},t.prototype.updateDataObject=function(){if(this.request.request.status<400)if(this.requestType==e.Types.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.updateMetadata(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.prototype.updateMetadata=function(e){if(window._spPageContextInfo.isAppWeb){var t=window._spPageContextInfo.webAbsoluteUrl.toLowerCase(),s=e&&e.__metadata&&e.__metadata.uri?e.__metadata.uri.toLowerCase():null,r=this.targetInfo&&this.targetInfo.url?this.targetInfo.url.toLowerCase():null;null!=t&&null!=s&&null!=r&&(e.__metadata.uri=s.replace(t,r))}},t.prototype.updateMetadataUri=function(e,t){/^SP.Field/.test(e.type)||/^SP\..*Field$/.test(e.type)?t.url=t.url.replace(/AvailableFields/,"fields"):/SP.EventReceiverDefinition/.test(e.type)&&(t.url=t.url.replace(/\/EventReceiver\//,"/EventReceivers/"))},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.OData=3]="OData",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={}));e.RequestType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Invalid=0]="Invalid",e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(e.ControlMode||(e.ControlMode={}));e.ControlMode;!function(e){e[e.Approver=2]="Approver",e[e.Author=1]="Author",e[e.Reader=0]="Reader"}(e.DraftVisibilityType||(e.DraftVisibilityType={}));e.DraftVisibilityType;!function(e){e[e.ItemAdding=1]="ItemAdding",e[e.ItemUpdating=2]="ItemUpdating",e[e.ItemDeleting=3]="ItemDeleting",e[e.ItemCheckingIn=4]="ItemCheckingIn",e[e.ItemCheckingOut=5]="ItemCheckingOut",e[e.ItemUncheckingOut=6]="ItemUncheckingOut",e[e.ItemAttachmentAdding=7]="ItemAttachmentAdding",e[e.ItemAttachmentDeleting=8]="ItemAttachmentDeleting",e[e.ItemFileMoving=9]="ItemFileMoving",e[e.ItemVersionDeleting=11]="ItemVersionDeleting",e[e.FieldAdding=101]="FieldAdding",e[e.FieldUpdating=102]="FieldUpdating",e[e.FieldDeleting=103]="FieldDeleting",e[e.ListAdding=104]="ListAdding",e[e.ListDeleting=105]="ListDeleting",e[e.SiteDeleting=201]="SiteDeleting",e[e.WebDeleting=202]="WebDeleting",e[e.WebMoving=203]="WebMoving",e[e.WebAdding=204]="WebAdding",e[e.GroupAdding=301]="GroupAdding",e[e.GroupUpdating=302]="GroupUpdating",e[e.GroupDeleting=303]="GroupDeleting",e[e.GroupUserAdding=304]="GroupUserAdding",e[e.GroupUserDeleting=305]="GroupUserDeleting",e[e.RoleDefinitionAdding=306]="RoleDefinitionAdding",e[e.RoleDefinitionUpdating=307]="RoleDefinitionUpdating",e[e.RoleDefinitionDeleting=308]="RoleDefinitionDeleting",e[e.RoleAssignmentAdding=309]="RoleAssignmentAdding",e[e.RoleAssignmentDeleting=310]="RoleAssignmentDeleting",e[e.InheritanceBreaking=311]="InheritanceBreaking",e[e.InheritanceResetting=312]="InheritanceResetting",e[e.WorkflowStarting=501]="WorkflowStarting",e[e.ItemAdded=10001]="ItemAdded",e[e.ItemUpdated=10002]="ItemUpdated",e[e.ItemDeleted=10003]="ItemDeleted",e[e.ItemCheckedIn=10004]="ItemCheckedIn",e[e.ItemCheckedOut=10005]="ItemCheckedOut",e[e.ItemUncheckedOut=10006]="ItemUncheckedOut",e[e.ItemAttachmentAdded=10007]="ItemAttachmentAdded",e[e.ItemAttachmentDeleted=10008]="ItemAttachmentDeleted",e[e.ItemFileMoved=10009]="ItemFileMoved",e[e.ItemFileConverted=10010]="ItemFileConverted",e[e.ItemVersionDeleted=10011]="ItemVersionDeleted",e[e.FieldAdded=10101]="FieldAdded",e[e.FieldUpdated=10102]="FieldUpdated",e[e.FieldDeleted=10103]="FieldDeleted",e[e.ListAdded=10104]="ListAdded",e[e.ListDeleted=10105]="ListDeleted",e[e.SiteDeleted=10201]="SiteDeleted",e[e.WebDeleted=10202]="WebDeleted",e[e.WebMoved=10203]="WebMoved",e[e.WebProvisioned=10204]="WebProvisioned",e[e.GroupAdded=10301]="GroupAdded",e[e.GroupUpdated=10302]="GroupUpdated",e[e.GroupDeleted=10303]="GroupDeleted",e[e.GroupUserAdded=10304]="GroupUserAdded",e[e.GroupUserDeleted=10305]="GroupUserDeleted",e[e.RoleDefinitionAdded=10306]="RoleDefinitionAdded",e[e.RoleDefinitionUpdated=10307]="RoleDefinitionUpdated",e[e.RoleDefinitionDeleted=10308]="RoleDefinitionDeleted",e[e.RoleAssignmentAdded=10309]="RoleAssignmentAdded",e[e.RoleAssignmentDeleted=10310]="RoleAssignmentDeleted",e[e.InheritanceBroken=10311]="InheritanceBroken",e[e.InheritanceReset=10312]="InheritanceReset",e[e.WorkflowStarted=10501]="WorkflowStarted",e[e.WorkflowPostponed=10502]="WorkflowPostponed",e[e.WorkflowCompleted=10503]="WorkflowCompleted",e[e.EntityInstanceAdded=10601]="EntityInstanceAdded",e[e.EntityInstanceUpdated=10602]="EntityInstanceUpdated",e[e.EntityInstanceDeleted=10603]="EntityInstanceDeleted",e[e.AppInstalled=10701]="AppInstalled",e[e.AppUpgraded=10702]="AppUpgraded",e[e.AppUninstalling=10703]="AppUninstalling",e[e.EmailReceived=2e4]="EmailReceived",e[e.ContextEvent=32766]="ContextEvent"}(e.EventReceiverType||(e.EventReceiverType={}));e.EventReceiverType;!function(e){e[e.Asynchronous=2]="Asynchronous",e[e.Synchronization=1]="Synchronization"}(e.EventReceiverSynchronizationType||(e.EventReceiverSynchronizationType={}));e.EventReceiverSynchronizationType;!function(e){e[e.AllDayEvent=29]="AllDayEvent",e[e.Attachments=19]="Attachments",e[e.Boolean=8]="Boolean",e[e.Calculated=17]="Calculated",e[e.Choice=6]="Choice",e[e.Computed=12]="Computed",e[e.ContentTypeId=25]="ContentTypeId",e[e.Counter=5]="Counter",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.Currency=10]="Currency",e[e.DateTime=4]="DateTime",e[e.Error=24]="Error",e[e.File=18]="File",e[e.Geolocation=31]="Geolocation",e[e.GridChoice=16]="GridChoice",e[e.Guid=14]="Guid",e[e.Integer=1]="Integer",e[e.Invalid=0]="Invalid",e[e.Lookup=7]="Lookup",e[e.MaxItems=31]="MaxItems",e[e.ModStat=23]="ModStat",e[e.MultiChoice=15]="MultiChoice",e[e.Note=3]="Note",e[e.Number=9]="Number",e[e.PageSeparator=26]="PageSeparator",e[e.Recurrence=21]="Recurrence",e[e.Text=2]="Text",e[e.ThreadIndex=27]="ThreadIndex",e[e.Threading=13]="Threading",e[e.URL=11]="URL",e[e.User=20]="User",e[e.WorkflowEventType=30]="WorkflowEventType",e[e.WorkflowStatus=28]="WorkflowStatus"}(e.FieldType||(e.FieldType={}));e.FieldType;!function(e){e[e.FormPage=2]="FormPage",e[e.StandardPage=0]="StandardPage",e[e.WikiPage=1]="WikiPage"}(e.FileTemplateType||(e.FileTemplateType={}));e.FileTemplateType;!function(e){e[e.AccessRequest=160]="AccessRequest",e[e.AdminTasks=1200]="AdminTasks",e[e.Agenda=201]="Agenda",e[e.AppDataCatalog=125]="AppDataCatalog",e[e.Announcements=104]="Announcements",e[e.CallTrack=404]="CallTrack",e[e.Categories=303]="Categories",e[e.Circulation=405]="Circulation",e[e.Comments=302]="Comments",e[e.Contacts=105]="Contacts",e[e.CustomGrid=120]="CustomGrid",e[e.DataConnectionLibrary=130]="DataConnectionLibrary",e[e.DataSources=110]="DataSources",e[e.Decision=204]="Decision",e[e.DesignCatalog=124]="DesignCatalog",e[e.DeveloperSiteDraftApps=1230]="DeveloperSiteDraftApps",e[e.DiscussionBoard=108]="DiscussionBoard",e[e.DocumentLibrary=101]="DocumentLibrary",e[e.Events=106]="Events",e[e.ExternalList=600]="ExternalList",e[e.Facility=402]="Facility",e[e.GanttTasks=150]="GanttTasks",e[e.GenericList=100]="GenericList",e[e.HealthReports=1221]="HealthReports",e[e.HealthRules=1220]="HealthRules",e[e.HelpLibrary=151]="HelpLibrary",e[e.Holidays=421]="Holidays",e[e.HomePageLibrary=212]="HomePageLibrary",e[e.IMEDic=499]="IMEDic",e[e.IssueTracking=1100]="IssueTracking",e[e.Links=103]="Links",e[e.ListTemplateCatalog=114]="ListTemplateCatalog",e[e.MasterPageCatalog=116]="MasterPageCatalog",e[e.MaintenanceLogs=175]="MaintenanceLogs",e[e.MeetingObjective=207]="MeetingObjective",e[e.Meetings=200]="Meetings",e[e.MeetingUser=202]="MeetingUser",e[e.MySiteDocumentLibrary=700]="MySiteDocumentLibrary",e[e.Posts=301]="Posts",e[e.NoCodePublic=122]="NoCodePublic",e[e.NoCodeWorkflows=117]="NoCodeWorkflows",e[e.PictureLibrary=109]="PictureLibrary",e[e.SolutionCatalog=121]="SolutionCatalog",e[e.Survey=102]="Survey",e[e.Tasks=107]="Tasks",e[e.TasksWithTimelineAndHierarchy=171]="TasksWithTimelineAndHierarchy",e[e.TextBox=210]="TextBox",e[e.ThemeCatalog=123]="ThemeCatalog",e[e.ThingsToBring=211]="ThingsToBring",e[e.Timecard=420]="Timecard",e[e.UserInformation=112]="UserInformation",e[e.WebPageLibrary=119]="WebPageLibrary",e[e.WebPartCatalog=113]="WebPartCatalog",e[e.WebTemplateCatalog=111]="WebTemplateCatalog",e[e.Whereabouts=403]="Whereabouts",e[e.WorkflowHistory=140]="WorkflowHistory",e[e.WorkflowProcess=118]="WorkflowProcess",e[e.XMLForm=115]="XMLForm"}(e.ListTemplateType||(e.ListTemplateType={}));e.ListTemplateType;!function(e){e[e.DefaultView=0]="DefaultView",e[e.DialogView=2]="DialogView",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.Invalid=-1]="Invalid",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.NormalView=1]="NormalView",e[e.Page_MAXITEMS=11]="Page_MAXITEMS",e[e.SolutionForm=10]="SolutionForm",e[e.View=3]="View"}(e.PageType||(e.PageType={}));e.PageType;!function(e){e[e.Administrator=5]="Administrator",e[e.Contributor=3]="Contributor",e[e.Editor=6]="Editor",e[e.Guest=1]="Guest",e[e.None=0]="None",e[e.Reader=2]="Reader",e[e.WebDesigner=4]="WebDesigner"}(e.RoleType||(e.RoleType={}));e.RoleType;!function(e){e[e.None=0]="None",e[e.List=1]="List",e[e.ContentType=2]="ContentType",e[e.ProgId=3]="ProgId",e[e.FileType=4]="FileType"}(e.UserCustomActionRegistrationType||(e.UserCustomActionRegistrationType={}));e.UserCustomActionRegistrationType;!function(e){e[e.Calendar=524288]="Calendar",e[e.Chart=131072]="Chart",e[e.Gantt=67108864]="Gantt",e[e.Grid=2048]="Grid",e[e.Html=1]="Html",e[e.Recurrence=8193]="Recurrence"}(e.ViewType||(e.ViewType={}));e.ViewType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Utils.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(t){var s=function(){function s(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(s.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.Types.RequestType.Delete:case e.Types.RequestType.Post:case e.Types.RequestType.PostWithArgs:case e.Types.RequestType.PostWithArgsInBody:case e.Types.RequestType.PostWithArgsInQS:case e.Types.RequestType.PostWithArgsValueOnly:case e.Types.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetReplace||this.methodInfo.requestType==e.Types.RequestType.PostReplace},enumerable:!0,configurable:!0}),s.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 i 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 n in this.methodParams)this.methodInfo.data=this.methodInfo.data.replace("[["+n+"]]",this.methodParams[n].replace(/"/g,'\\"').replace(/\n/g,""));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&this.methodInfo.argValues.length>0&&(null==this.methodInfo.argNames?this.methodData=this.methodInfo.argValues[0]:this.methodInfo.argValues.length>this.methodInfo.argNames.length&&(this.methodData=this.methodInfo.argValues[this.methodInfo.argNames.length])),this.methodInfo.metadataType&&(this.methodInfo.argNames?(this.methodData||this.methodParams)[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:(this.methodData||this.methodParams).__metadata={type:this.methodInfo.metadataType})}},s.prototype.generateUrl=function(){var s=this.methodInfo.name;if(this.methodInfo.requestType==e.Types.RequestType.Delete&&(s="deleteObject"),this.passDataInBody){var r=this.methodData||this.methodParams;this.methodData=JSON.stringify(r)}if(this.passDataInQS){var r=this.methodParams||this.methodData;s+="(@v)?@v="+("string"==typeof r?"'"+encodeURIComponent(r)+"'":JSON.stringify(r))}if(this.replace)for(var a in this.methodParams)s=s.replace("[["+a+"]]",encodeURIComponent(this.methodParams[a]));else if(this.methodInfo.requestType==e.Types.RequestType.OData){var i=new t.OData(this.methodParams.oData);s="?"+i.QueryString}else if(!this.passDataInBody&&!this.passDataInQS){var n="",r=this.methodParams||this.methodData;if(r){r=r&&"object"==typeof r?r:{value:r};for(var o in r){var u=r[o];switch(u="string"==typeof u?"'"+u+"'":u,this.methodInfo.requestType){case e.Types.RequestType.GetWithArgsValueOnly:case e.Types.RequestType.PostWithArgsValueOnly:n+=u+", ";break;default:n+=o+"="+u+", "}}}s+=n.length>0?"("+n.replace(/, $/,"")+")":""}return s},s}();t.MethodInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=function(){function e(e){this._expand=e&&e.Expand?e.Expand:[],this._filter=e&&e.Filter?e.Filter:null,this._orderBy=e&&e.OrderBy?e.OrderBy:[],this._select=e&&e.Select?e.Select:[],this._skip=e&&e.Skip?e.Skip:null,this._top=e&&e.Top?e.Top:null}return Object.defineProperty(e.prototype,"Expand",{get:function(){return this._expand},set:function(e){this._expand=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Filter",{get:function(){return this._filter},set:function(e){this._filter=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OrderBy",{get:function(){return this._orderBy},set:function(e){this._orderBy=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"QueryString",{get:function(){var e="",t=[];t.push(this.getQSValue("$select",this._select)),t.push(this.getQSValue("$orderby",this._orderBy)),this._top?t.push("$top="+this._top):null,this._skip?t.push("$skip="+this._skip):null,this._filter?t.push("$filter=",this._filter):null,t.push(this.getQSValue("$expand",this._expand));for(var s=0,r=t;s<r.length;s++){var a=r[s];a&&""!=a&&(e+=(""==e?"":"&")+a)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Select",{get:function(){return this._select},set:function(e){this._select=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Skip",{get:function(){return this._skip},set:function(e){this._skip=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Top",{get:function(){return this._top},set:function(e){this._top=e},enumerable:!0,configurable:!0}),e.prototype.getQSValue=function(e,t){return t.length>0?e+"="+t.join(","):""},e}();e.OData=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!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}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=function(){function t(t,s,r){this.asyncFl=t,this.promise=new e.Promise(r||s.callback),this.targetInfo=s,this.xhr=this.createXHR(),this.execute()}return 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.execute=function(){var e=this;return null==this.xhr?null:(this.xhr.open("GET"==this.targetInfo.requestMethod?"GET":"POST",this.targetInfo.requestUrl,this.asyncFl),this.asyncFl&&(this.xhr.onreadystatechange=function(){4==e.xhr.readyState&&e.promise.resolve(e)}),this.targetInfo.bufferFl&&this.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||null==this.targetInfo.requestData?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}();e.Request=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(t){var s=function(){function t(e){this.targetInfo=e||{},this.requestData=this.targetInfo.data,this.requestMethod=this.targetInfo.method?this.targetInfo.method:"GET",this.setRequestUrl()}return 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=this.getQueryStringValue("SPHostUrl"),s="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(e.DefaultRequestToHostWebFl&&this.isAppWeb&&null==this.targetInfo.url&&(this.targetInfo.url=t),null==this.targetInfo.url)this.targetInfo.url=this.context[0==this.targetInfo.defaultToWebFl?"siteAbsoluteUrl":"webAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){var r=this.targetInfo.url.split("/_api/");return void(this.isAppWeb&&r[0]!=this.context.webAbsoluteUrl?this.requestUrl=this.context.webAbsoluteUrl+"/_api/SP.AppContextSite(@target)/"+r[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+r[0]+"'":this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:""))}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb&&this.targetInfo.url!=this.context.webAbsoluteUrl){var a=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=s.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+a).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=s.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},t}();t.TargetInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],name:"",requestType:e.Types.RequestType.PostWithArgs},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttype={properties:["FieldLinks|fieldlinks|('[Name]')|fieldlink","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","WorkflowAssociations"],delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttypes={add:{metadataType:"SP.ContentType",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"contenttype"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){t.call(this,e),this.defaultToWebFl=!0,this.targetInfo.endpoint="SP.Utilities.Utility.SendEmail"}return __extends(s,t),s.prototype.send=function(t){t.To&&("string"==typeof t.To?t.To={results:[t.To]}:t.To={results:t.To}),this.executeMethod("send",{argNames:["properties"],name:"",metadataType:"SP.Utilities.EmailProperties",requestType:e.Types.RequestType.PostWithArgsInBody},[t])},s}(e.Base);e.Email=t}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinition={delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.EventReceiverDefinition",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinitions={add:{metadataType:"SP.EventReceiverDefinition",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"eventreceiver"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.field={delete:{requestType:e.Types.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"fieldlink"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fields={add:{metadataType:"SP.Field",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"addField",requestType:e.Types.RequestType.PostWithArgsInBody},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.Types.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly,returnType:"field"},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.Types.RequestType.PostWithArgsValueOnly,returnType:"field"},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.PostWithArgsValueOnly,returnType:"field"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.file={properties:["Author|user","CheckedOutByUser|user","EffectiveInformationRightsManagementSettings","InformationRightsManagementSettings","ListItemAllFields","LockedByUser|user","ModifiedBy|user","Properties","VersionEvents","Versions|fileversions"], | ||
approve:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},checkin:{argNames:["comment","checkInType"],requestType:e.Types.RequestType.PostWithArgs},checkout:{requestType:e.Types.RequestType.Post},content:{name:"$value",requestType:e.Types.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"continueUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},deny:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"finishUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.Types.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.Types.RequestType.PostReplace},openBinaryStream:{requestType:e.Types.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},recycle:{requestType:e.Types.RequestType.Get},saveBinaryStream:{requestType:e.Types.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},undoCheckOut:{requestType:e.Types.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.files={add:{argNames:["overwrite","url"],requestType:e.Types.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.Types.RequestType.PostWithArgs},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"file"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={properties:[],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversions={delete:{requestType:e.Types.RequestType.Delete},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.folder={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder|folder","Properties","StorageMetrics"],delete:{requestType:e.Types.RequestType.Delete},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"folder"},recycle:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.folders={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder","Properties","StorageMetrics"],add:{argNames:["url"],requestType:e.Types.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"folder"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={properties:["Users|users|/getById([Name])|user"]}}($REST||($REST={}));var $REST;!function(e){e.Library.items={add:{metadataType:function(e){return e.Parent&&e.Parent.ListItemEntityTypeFullName?e.Parent.ListItemEntityTypeFullName:"SP.ListItem"},name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"listitem"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.Types.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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="lists/getByTitle('"+t+"')",this.addMethods(this,{__metadata:{type:"list"}})}return __extends(t,e),t}(e.Base);e.List=t,e.Library.list={properties:["BrowserFileHandling","ContentTypes|contenttypes|([Name])|contenttype","CreatablesInfo","DefaultView|view","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Forms|forms|('[Name]')|form","InformationRightsManagementSettings","Items|items|([Name])|item","ParentWeb","RoleAssignments|roleassignments|([Name])|roleassignment","RootFolder|folder|/getByUrl('[Name]')|file","Subscriptions","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","Views|views||('[Name]')|view","WorkflowAssociations"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getItemById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"item"},getItems:{argNames:["viewXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.Types.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getViewById:{argNames:["viewId"],name:"getView",requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"view"},recycle:{requestType:e.Types.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.Types.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.Types.RequestType.PostWithArgs},reserveListItemId:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.listitem={properties:["AttachmentFiles|attachmentfiles","ContentType|contenttype","FieldValuesAsHtml","FieldValuesAsText","FieldValuesForEdit","File|file","FirstUniqueAncestorSecurableObject","Folder|folder","GetDlpPolicyTip","ParentList|list","RoleAssignments|roleassignments|roleassignments|([Name])|roleassignment"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},recycle:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.lists={add:{metadataType:"SP.List",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},ensureSiteAssetsLibrary:{requestType:e.Types.RequestType.Post},ensureSitePagesLibrary:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"list"},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"list"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.Types.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.Types.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.Types.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.Types.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={properties:["Member","RoleDefinitionBindings|roledefinitions"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignments={addRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs},getByPrincipalId:{argNames:["principalId"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roleassignment"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinitions={getById:{argNames:["roleDefId"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roledefinition"},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roledefinition"},getByType:{argNames:["roleType"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roledefinitions"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e,s){t.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",e&&(this.targetInfo.url=e),this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(null,this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=t,e.Library.site={properties:["EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Owner|user","RootWeb|web","UserCustomActions|usercustomactions|('[Name]')|usercustomaction"],createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.Types.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.Types.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getCustomListTemplates:{argNames:["web"],requestType:e.Types.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.Types.RequestType.PostWithArgs},invalidate:{requestType:e.Types.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.Types.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.Types.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.Types.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.Types.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.siteGroups={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"group"},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"group"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["name"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.Types.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.Types.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.Types.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.user={properties:["Groups|sitegroups|([Name])|group"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomactions={add:{metadataType:"SP.UserCustomAction",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},clear:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"usercustomaction"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.Types.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.Types.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var $REST;!function(e){e.Library.users={getByEmail:{argNames:["email"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"user"},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"user"},getByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS,returnType:"user"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"version"},deleteAll:{requestType:e.Types.RequestType.Post},deleteById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.view={properties:["ViewFields|viewfieldcollection"],delete:{requestType:e.Types.RequestType.Delete},renderAsHtml:{requestType:e.Types.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeAllViewFields:{requestType:e.Types.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.views={add:{metadataType:"SP.View",name:"",requestType:e.Types.RequestType.PostWithArgs},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"view"},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"view"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",t&&(this.targetInfo.url=t),this.addMethods(this,{__metadata:{type:"web"}})}return __extends(t,e),t.prototype.hasAccess=function(e){return!0},t}(e.Base);e.Web=t,e.Library.web={properties:["AllProperties","AppTiles","AssociatedMemberGroup|group","AssociatedOwnerGroup|group","AssociatedVisitorGroup|group","Author|user","AvailableContentTypes|contenttypes","AvailableFields|fields","ClientWebParts","ContentTypes|contenttypes|('[Name]')|contenttype","CurrentUser|user","DataLeakagePreventionStatusInfo","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Folders|folders|/getByUrl('[Name]')|folder","Lists|lists|/getByTitle('[Name]')|list","ListTemplates|listtemplates|('[Name]')|listtemplate","Navigation","ParentWeb","PushNotificationSubscribers","RecycleBin","RegionalSettings","RoleAssignments|roleassignments|([Name])|roleassignment","RoleDefinitions|roledefinitions|([Name])|roledefinition","RootFolder|folder|/getByUrl('[Name]')|file","SiteGroups|sitegroups|([Name])|group","SiteUserInfoList","SiteUsers|users|/getById([Name])|user","ThemeInfo","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","WebInfos","Webs|webs","WorkflowAssociations","WorkflowTemplates"],applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.Types.RequestType.PostWithArgs},applyWebTemplate:{argName:["name"],requestType:e.Types.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},doesPushNotificationSubscriberExist:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.Types.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.Types.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.Types.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.Types.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.Types.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.Types.RequestType.Post},getCustomListTemplates:{requestType:e.Types.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.Types.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.Types.RequestType.PostWithArgs},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"file"},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"folder"},getList:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"list"},getPushNotificationSubscriber:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.Types.RequestType.GetWithArgs},getUserById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"user"},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.Types.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.Types.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.Types.RequestType.GetWithArgs},processExternalNotification:{requestType:e.Types.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.Types.RequestType.PostWithArgs},resetRoleInheritance:{requestType:e.Types.RequestType.Post},unregisterPushNotificationSubscriber:{requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={})); |
{ | ||
"name": "gd-sprest", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"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)", |
108
README.md
@@ -8,6 +8,5 @@ # SharePoint 2013/Online REST Library | ||
* 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. | ||
* Chain property and methods for fewer requests to the server. | ||
* Global flag for defaulting the execution against the host web, for easier development in an app web. | ||
* PowerShell-Like experience in the browser console. (Synchronous Requests) | ||
* Switch between asynchronous and synchronous requests by the object's property. | ||
* Written in TypeScript with definition file for intellisense. | ||
@@ -38,3 +37,3 @@ | ||
### Asynchronous/Synchronous requests | ||
All availabe objects having an api entry point, will have the following constructors [Object] and [Object]_Async. | ||
The 'execute' method determines if the request should be executed asynchronously or synchronously. By default, all requests will be executed asynchronously, unless overridden by the developer. | ||
@@ -45,3 +44,3 @@ #### Examples | ||
// Get the current web | ||
(new Web_Async()) | ||
(new Web()) | ||
// Execute the request | ||
@@ -55,3 +54,5 @@ .execute(function(web) { | ||
``` | ||
var web = (new $REST.Web()).execute(); | ||
var web = (new $REST.Web()) | ||
// Set the flag to execute the request synchronously | ||
.execute(true); | ||
``` | ||
@@ -76,3 +77,3 @@ | ||
// Execute the request | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -83,3 +84,3 @@ | ||
// This will create the web object | ||
(new $REST.Web_Async()) | ||
(new $REST.Web()) | ||
// Get the list collection | ||
@@ -108,3 +109,3 @@ .Lists() | ||
// Execute the request | ||
.execute(); | ||
.execute(true); | ||
@@ -116,3 +117,3 @@ // Example of getting items by a CAML Query | ||
// Execute the request | ||
.execute(); | ||
.execute(true); | ||
@@ -124,3 +125,3 @@ // Example of getting items by a CAML View Query | ||
// Execute the request | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -137,3 +138,2 @@ | ||
The target information consists of the following properties: | ||
* asyncFl - Flag to determine if the request should executes asynchronously or synchronously. | ||
* bufferFl - Flag to determine if the output of the request is a file stream. | ||
@@ -170,3 +170,5 @@ * callback - Required for asynchronous request. Executed after execution. | ||
Filter: ["Title eq 'Dev'"] | ||
}); | ||
}) | ||
// Execute the request | ||
.execute(true); | ||
``` | ||
@@ -177,3 +179,3 @@ | ||
// Get the 'Dev' list | ||
(new $REST.List_Async("Dev")) | ||
(new $REST.List("Dev")) | ||
// Get the item collection | ||
@@ -217,3 +219,3 @@ .Items() | ||
.getByName("Documents") | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -227,3 +229,3 @@ | ||
.getByName("Item") | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -237,3 +239,3 @@ | ||
.ContentTypes() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -244,3 +246,3 @@ | ||
// Get the content types in the current web | ||
(new $REST.Web_Async()) | ||
(new $REST.Web()) | ||
.ContentTypes() | ||
@@ -257,3 +259,3 @@ .execute(function(cts) { | ||
.Fields("Title") | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -263,3 +265,3 @@ | ||
``` | ||
(new $REST.Web_Async()) | ||
(new $REST.Web()) | ||
.Fields("Title") | ||
@@ -276,3 +278,3 @@ .execute(function(field) { | ||
.Fields() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -282,3 +284,3 @@ | ||
``` | ||
(new $REST.Web_Async()) | ||
(new $REST.Web()) | ||
.Fields() | ||
@@ -294,3 +296,3 @@ .execute(function(fields) { | ||
``` | ||
(new $REST.List_Async("Documents")) | ||
(new $REST.List("Documents")) | ||
.RootFolder() | ||
@@ -310,3 +312,3 @@ .Folders("forms") | ||
.Files("editform.aspx") | ||
execute(); | ||
execute(true); | ||
``` | ||
@@ -318,3 +320,3 @@ | ||
.getFileByServerRelativeUrl("/sites/dev/shared documents/forms/editform.aspx") | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -328,3 +330,9 @@ | ||
.Files() | ||
.execute(); | ||
.execute(true); | ||
// Get a specific folder's files | ||
var folders = (new $REST.Web()) | ||
.getFolderByServerRelativeUrl("/sites/dev/shared documents/forms") | ||
.Files() | ||
.execute(true); | ||
``` | ||
@@ -336,3 +344,3 @@ | ||
.Files() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -345,3 +353,3 @@ | ||
.RootFolder("Forms") | ||
.execute() | ||
.execute(true) | ||
``` | ||
@@ -353,3 +361,3 @@ | ||
.getFolderByServerRelativeUrl("/sites/dev/shared documents/forms") | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -360,5 +368,12 @@ | ||
``` | ||
// Get the root folders of the library | ||
var folders = (new $REST.List("documents")) | ||
.Folders() | ||
.execute(); | ||
.execute(true); | ||
// Get a specific folder's sub-folder | ||
var folders = (new $REST.Web()) | ||
.getFolderByServerRelativeUrl("/sites/dev/shared documents/forms") | ||
.Folders() | ||
.execute(true); | ||
``` | ||
@@ -370,3 +385,3 @@ | ||
.Folders() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -376,4 +391,3 @@ | ||
``` | ||
var list = (new $REST.List("documents")) | ||
.execute(); | ||
var list = (new $REST.List("documents")).execute(true); | ||
``` | ||
@@ -385,3 +399,3 @@ | ||
.Lists() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -393,3 +407,3 @@ | ||
.Items(1) | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -402,3 +416,3 @@ | ||
.Items() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -408,3 +422,3 @@ | ||
``` | ||
(new $REST.List_Async("documents")) | ||
(new $REST.List("documents")) | ||
// Get the items | ||
@@ -423,3 +437,3 @@ .getItemsByQuery("<Query><Where><Gt><FieldRef Name='ID' /><Value Type='Integer'>0</Value></Gt></Where></Query>") | ||
.RoleAssignments() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -431,3 +445,3 @@ | ||
.RoleAssignments() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -439,3 +453,3 @@ | ||
.RoleDefinitions() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -452,3 +466,3 @@ | ||
.SiteGroups() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -461,3 +475,3 @@ | ||
.UserCustomActions() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -469,3 +483,3 @@ | ||
.UserCustomActions() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -477,3 +491,3 @@ | ||
.Users() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -488,3 +502,3 @@ | ||
}) | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -496,3 +510,3 @@ | ||
.Lists() | ||
.execute(); | ||
.execute(true); | ||
``` | ||
@@ -502,3 +516,3 @@ | ||
``` | ||
var web = (new $REST.Web()).execute(); | ||
var web = (new $REST.Web()).execute(true); | ||
``` |
109
src/base.ts
@@ -27,6 +27,2 @@ module $REST { | ||
// Flag to determine if the request should be asynchronous | ||
public get asyncFl():boolean { return this.request ? this.request.asyncFl : false; } | ||
public set asyncFl(value) { this.targetInfo.asyncFl = value; } | ||
// Flag to determine if the requested object exists | ||
@@ -36,3 +32,3 @@ public existsFl:boolean; | ||
// The parent | ||
public parent:any; | ||
public parent:Base; | ||
@@ -50,38 +46,19 @@ // The request type | ||
// Method to execute a child request | ||
public execute(callback?:(...args) => void) { | ||
// See if this is an asynchronous request | ||
if(this.targetInfo.asyncFl) { | ||
// Create a promise | ||
this.promise = new Utils.Promise(callback || this.targetInfo.callback); | ||
public execute(arg?: boolean | any) { | ||
let callback = typeof(arg) === "boolean" ? null : arg; | ||
let syncFl = typeof(arg) === "boolean" ? arg : false; | ||
// Create the request | ||
this.request = new Utils.Request(new Utils.TargetInfo(this.targetInfo), () => { | ||
// Update the data object | ||
this.updateDataObject(); | ||
}); | ||
} | ||
else { | ||
// Create the request | ||
this.request = new Utils.Request(new Utils.TargetInfo(this.targetInfo)); | ||
// Set the execute request flag | ||
this.executeRequiredFl = true; | ||
// Update the data object | ||
this.updateDataObject(); | ||
// See if this is a synchronous request | ||
if(syncFl) { | ||
// Execute this request | ||
return this.executeRequest(!syncFl, callback); | ||
} | ||
// Return this object | ||
return this; | ||
// Execute this request | ||
return this.executeRequest(!syncFl, callback); | ||
} | ||
// Method to get the input parameters for an asynchronous request | ||
public static getAsyncInputParmeters(targetInfo?:Settings.TargetInfoSettings):Settings.TargetInfoSettings { | ||
// Ensure the target information exists | ||
targetInfo = targetInfo ? targetInfo : {}; | ||
// Set the asynchronous flag | ||
targetInfo.asyncFl = true; | ||
// Return the target information | ||
return targetInfo; | ||
} | ||
/*********************************************************************************************************************************/ | ||
@@ -94,2 +71,5 @@ // Private Variables | ||
// Flag to require this request to be executed, for chaining the methods | ||
private executeRequiredFl:boolean; | ||
// The promise | ||
@@ -214,15 +194,2 @@ private promise:Utils.Promise; | ||
// Method to execute after the asynchronous request completes | ||
protected done(callback:() => void) { | ||
// See if the promise exists | ||
if(this.promise) { | ||
// Execute the callback | ||
this.promise.done(callback); | ||
} | ||
else { | ||
// Set the callback in the target information | ||
this.targetInfo.callback = callback; | ||
} | ||
} | ||
// Method to execute a method | ||
@@ -254,5 +221,2 @@ protected executeMethod(methodName:string, methodConfig:Settings.MethodInfoSettings, args?:any) { | ||
// Inherit the asynchronous flag | ||
targetInfo.asyncFl = this.targetInfo ? this.targetInfo.asyncFl : this.asyncFl; | ||
// Get the method information | ||
@@ -284,2 +248,5 @@ var methodInfo = new Utils.MethodInfo(methodName, methodConfig, args); | ||
// Add the methods | ||
methodConfig.returnType ? obj.addMethods(obj, { __metadata: { type: methodConfig.returnType } }) : null; | ||
// Return the object | ||
@@ -289,2 +256,27 @@ return obj; | ||
// Method to execute the request | ||
protected executeRequest(asyncFl: boolean, callback:any) { | ||
// See if an execution is required | ||
if(this.executeRequiredFl) { | ||
// See if this is an asynchronous request | ||
if(asyncFl) { | ||
// Create a promise | ||
this.promise = new Utils.Promise(callback || this.targetInfo.callback); | ||
// Create the request | ||
this.request = new Utils.Request(asyncFl, new Utils.TargetInfo(this.targetInfo), () => { | ||
// Update this data object | ||
this.updateDataObject(); | ||
}); | ||
} | ||
else { | ||
// Create the request | ||
this.request = new Utils.Request(asyncFl, new Utils.TargetInfo(this.targetInfo)); | ||
// Update this data object and return it | ||
return this.updateDataObject() || this; | ||
} | ||
} | ||
} | ||
// Method to return a collection | ||
@@ -360,11 +352,2 @@ private getCollection(method:string, args?:any) { | ||
// Method to resolve the parent request | ||
protected resolveParentRequest(...args) { | ||
// See if the call back exists | ||
if(this.targetInfo.callback) { | ||
// Execute the callback | ||
this.targetInfo.callback.apply(this, args); | ||
} | ||
} | ||
// Method to update a collection object | ||
@@ -391,4 +374,3 @@ private updateDataCollection(results:any) { | ||
// Add the asyncFl, execute method, and parent reference | ||
results[0]["asyncFl"] = this.asyncFl; | ||
// Add the execute method and parent reference | ||
results[0]["executeMethod"] = this.executeMethod; | ||
@@ -406,4 +388,3 @@ results[0]["parent"] = this; | ||
for(let result of results) { | ||
// Add the asyncFl, execute method, and parent reference | ||
result["asyncFl"] = this.asyncFl; | ||
// Add the execute method and parent reference | ||
result["executeMethod"] = this.executeMethod; | ||
@@ -410,0 +391,0 @@ result["parent"] = this; |
@@ -26,3 +26,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -32,2 +32,8 @@ execute(callback?:(IAttachmentFiles) => void): IAttachmentFiles; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IAttachmentFiles; | ||
/** | ||
* Queries the collection. | ||
@@ -34,0 +40,0 @@ * @param oData - The OData information. |
@@ -111,3 +111,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -117,2 +117,8 @@ execute(callback?:(IContentType) => void): IContentType; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IContentType; | ||
/** | ||
* Updates it's properties. | ||
@@ -119,0 +125,0 @@ * @param data - The content type properties to update. |
@@ -29,5 +29,6 @@ declare module $REST.Types { | ||
/** | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -37,2 +38,8 @@ execute(callback?:(IContentTypes) => void): IContentTypes; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IContentTypes; | ||
/** | ||
* Gets a content type by id. | ||
@@ -39,0 +46,0 @@ * @param id - The content type id. |
@@ -22,3 +22,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "contenttype" | ||
}, | ||
@@ -25,0 +26,0 @@ |
@@ -47,12 +47,2 @@ module $REST { | ||
} | ||
export class Email_Async extends Email { | ||
/*********************************************************************************************************************************/ | ||
// Constructor | ||
/*********************************************************************************************************************************/ | ||
constructor(targetInfo?:Settings.TargetInfoSettings) { | ||
// Call the base constructor | ||
super(Base.getAsyncInputParmeters.apply(null, targetInfo)); | ||
} | ||
} | ||
} |
@@ -45,3 +45,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -51,2 +51,8 @@ execute(callback?:(IEventReceiver) => void): IEventReceiver; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IEventReceiver; | ||
/** | ||
* Updates it's properties. | ||
@@ -53,0 +59,0 @@ * @param data - The field properties to update. |
@@ -25,3 +25,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -31,2 +31,8 @@ execute(callback?:(IEventReceivers) => void): IEventReceivers; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IEventReceivers; | ||
/** | ||
* Gets an event receiver in the collection. | ||
@@ -33,0 +39,0 @@ * @param id - The id of the event receiver. |
@@ -16,3 +16,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "eventreceiver" | ||
}, | ||
@@ -19,0 +20,0 @@ |
@@ -105,3 +105,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -111,2 +111,8 @@ execute(callback?:(IField) => void): IField; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IField; | ||
/** | ||
* Sets the value of the ShowInDisplayForm property for this field. | ||
@@ -113,0 +119,0 @@ * @param showInForm - Flag to show the field in the display form. |
@@ -25,3 +25,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -31,2 +31,8 @@ execute(callback?:(IFieldLinks) => void): IFieldLinks; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFieldLinks; | ||
/** | ||
* Gets the field link by its id. | ||
@@ -33,0 +39,0 @@ * @param id - The id of the field. |
@@ -17,3 +17,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "fieldlink" | ||
}, | ||
@@ -20,0 +21,0 @@ |
@@ -46,3 +46,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -52,2 +52,8 @@ execute(callback?:(IFields) => void): IFields; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFields; | ||
/** | ||
* Gets the field with the specified ID. | ||
@@ -54,0 +60,0 @@ * @param id - The field id. |
@@ -44,3 +44,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.PostWithArgsValueOnly | ||
requestType: Types.RequestType.PostWithArgsValueOnly, | ||
returnType: "field" | ||
}, | ||
@@ -51,3 +52,4 @@ | ||
argNames: ["internalNameOrTitle"], | ||
requestType: Types.RequestType.PostWithArgsValueOnly | ||
requestType: Types.RequestType.PostWithArgsValueOnly, | ||
returnType: "field" | ||
}, | ||
@@ -58,3 +60,4 @@ | ||
argNames: ["title"], | ||
requestType: Types.RequestType.PostWithArgsValueOnly | ||
requestType: Types.RequestType.PostWithArgsValueOnly, | ||
returnType: "field" | ||
}, | ||
@@ -61,0 +64,0 @@ |
@@ -156,3 +156,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -162,2 +162,8 @@ execute(callback?:(IFile) => void): IFile; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFile; | ||
/** | ||
* Uploads the last file fragment and commits the file. The current file content is changed when this method completes. | ||
@@ -164,0 +170,0 @@ * Use the uploadId value that was passed to the StartUpload method that started the upload session. |
@@ -34,3 +34,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -40,2 +40,8 @@ execute(callback?:(IFiles) => void): IFiles; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFiles; | ||
/** | ||
* Get the file at the specified URL. | ||
@@ -42,0 +48,0 @@ * @param serverRelativeUrl - The name or server relative url of the file. |
@@ -22,3 +22,4 @@ module $REST { | ||
argNames: ["serverRelativeUrl"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "file" | ||
}, | ||
@@ -25,0 +26,0 @@ |
@@ -47,6 +47,12 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(IFileVersion) => void): IFileVersion; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFileVersion; | ||
} | ||
} |
@@ -19,3 +19,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -25,2 +25,8 @@ execute(callback?:(IFileVersions) => void): IFileVersions; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFileVersions; | ||
/** | ||
* Queries the collection. | ||
@@ -27,0 +33,0 @@ * @param oData - The OData information. |
@@ -70,23 +70,2 @@ declare module $REST.Types { | ||
/** | ||
* Adds a file to this folder. | ||
* @param overwrite - true to overwrite the file if it already exists; otherwise false. | ||
* @param url - The folder-relative URL of the file. | ||
* @param content - The contents of the file. The maximum size of a binary file that you can add by using the REST API is 2 GB. | ||
*/ | ||
addFile(url, overwrite, content): IFile; | ||
/** | ||
* Adds a ghosted file to this list or document library. | ||
* @param urlOfFile - The server-relative URL where you want to save the file. | ||
* @param templateFileType - The SP.TemplateFileType to use to create the file. | ||
*/ | ||
addTemplateFile(urlOfFile, templateFileType:Types.FileTemplateType): any; | ||
/** | ||
* Adds the sub-folder that is located at the specified URL to the collection. | ||
* @param url - The path where you want to add the folder (including the name of the new folder) as a fully-qualified URL, server-relative URL, or site-relative URL. | ||
*/ | ||
addSubFolder(url): IFolder; | ||
/** | ||
* Deletes the folder. | ||
@@ -98,3 +77,3 @@ */ | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -104,2 +83,8 @@ execute(callback?:(IFolder) => void): IFolder; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFolder; | ||
/** | ||
* Get the file at the specified URL. | ||
@@ -106,0 +91,0 @@ * @param serverRelativeUrl - The server-relative URL of the folder. |
@@ -16,24 +16,2 @@ module $REST { | ||
// Adds a file to this folder. | ||
addFile: { | ||
argNames: ["url", "overwrite"], | ||
name: "files/add", | ||
requestType: Types.RequestType.PostWithArgs | ||
}, | ||
// Adds a ghosted file to this list or document library. | ||
// Template File Types: StandardPage = 0; WikiPage = 1; FormPage = 2 | ||
addTemplateFile: { | ||
argNames: ["urlOfFile", "templateFileType"], | ||
name: "files/addtemplatefile", | ||
requestType: Types.RequestType.PostWithArgs | ||
}, | ||
// Adds the sub-folder that is located at the specified URL to the collection. | ||
addSubFolder: { | ||
argNames: ["url"], | ||
name: "folders/add", | ||
requestType: Types.RequestType.PostWithArgs | ||
}, | ||
// Deletes the object | ||
@@ -47,3 +25,4 @@ delete: { | ||
argNames: ["serverRelativeUrl"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "folder" | ||
}, | ||
@@ -50,0 +29,0 @@ |
@@ -25,3 +25,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -31,2 +31,8 @@ execute(callback?:(IFolders) => void): IFolders; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IFolders; | ||
/** | ||
* Get the file at the specified URL. | ||
@@ -33,0 +39,0 @@ * @param serverRelativeUrl - The server-relative URL of the folder. |
@@ -27,3 +27,4 @@ module $REST { | ||
argNames: ["serverRelativeUrl"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "folder" | ||
}, | ||
@@ -30,0 +31,0 @@ |
@@ -85,6 +85,12 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(IGroup) => void): IGroup; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IGroup; | ||
} | ||
} |
@@ -25,3 +25,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -31,2 +31,8 @@ execute(callback?:(IListItems) => void): IListItems; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IListItems; | ||
/** | ||
* Gets an item by the specified id. | ||
@@ -33,0 +39,0 @@ * @param id - The item id. |
@@ -16,3 +16,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "listitem" | ||
}, | ||
@@ -19,0 +20,0 @@ |
@@ -8,3 +8,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -14,2 +14,8 @@ execute(callback?:(ILimitedWebPartManager) => void): ILimitedWebPartManager; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): ILimitedWebPartManager; | ||
/** | ||
* Gets a webpart by its id. | ||
@@ -16,0 +22,0 @@ * @param id - The web part id. |
@@ -340,3 +340,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -346,2 +346,8 @@ execute(callback?:(IList) => void): IList; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IList; | ||
/** | ||
* Returns the collection of changes from the change log that have occurred within the list, based on the specified query. | ||
@@ -348,0 +354,0 @@ * @param query - The change query. |
@@ -23,12 +23,2 @@ module $REST { | ||
export class List_Async extends List { | ||
/*********************************************************************************************************************************/ | ||
// Constructor | ||
/*********************************************************************************************************************************/ | ||
constructor(listName:string, ...args) { | ||
// Call the base constructor | ||
super(listName, Base.getAsyncInputParmeters.apply(null, args)); | ||
} | ||
} | ||
/*********************************************************************************************************************************/ | ||
@@ -77,3 +67,4 @@ // Library | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "item" | ||
}, | ||
@@ -129,3 +120,4 @@ | ||
name: "getView", | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "view" | ||
}, | ||
@@ -132,0 +124,0 @@ |
@@ -101,3 +101,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -107,2 +107,8 @@ execute(callback?:(IListItem) => void): IListItem; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IListItem; | ||
/** | ||
* Gets the effective permissions that a specified user has on the list item. | ||
@@ -109,0 +115,0 @@ * @param loginName - The login name. |
@@ -35,3 +35,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -41,2 +41,8 @@ execute(callback?:(ILists) => void): ILists; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): ILists; | ||
/** | ||
* Returns the list with the specified list identifier. | ||
@@ -43,0 +49,0 @@ * @param id - The list id. |
@@ -26,3 +26,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "list" | ||
}, | ||
@@ -33,3 +34,4 @@ | ||
argNames: ["title"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "list" | ||
}, | ||
@@ -36,0 +38,0 @@ |
@@ -34,6 +34,12 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(IRoleAssignment) => void): IRoleAssignment; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IRoleAssignment; | ||
} | ||
} |
@@ -26,3 +26,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -32,2 +32,8 @@ execute(callback?:(IRoleAssignments) => void): IRoleAssignments; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IRoleAssignments; | ||
/** | ||
* Gets the role assignment associated with the specified principal ID from the collection. | ||
@@ -34,0 +40,0 @@ * @param principalId - The ID of the user or group to assign permissions to. |
@@ -15,3 +15,4 @@ module $REST { | ||
argNames: ["principalId"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "roleassignment" | ||
}, | ||
@@ -18,0 +19,0 @@ |
@@ -42,6 +42,12 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(IRoleDefinition) => void): IRoleDefinition; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IRoleDefinition; | ||
} | ||
} |
@@ -19,3 +19,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -25,2 +25,8 @@ execute(callback?:(IRoleDefinitions) => void): IRoleDefinitions; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IRoleDefinitions; | ||
/** | ||
* Gets the role definition with the specified ID from the collection. | ||
@@ -27,0 +33,0 @@ * @param roleDefId - The ID of the role definition that defines the permissions to assign. |
@@ -9,3 +9,4 @@ module $REST { | ||
argNames: ["roleDefId"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "roledefinition" | ||
}, | ||
@@ -16,9 +17,11 @@ | ||
argNames: ["name"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "roledefinition" | ||
}, | ||
// Gets the role definition with the specified role type. | ||
// Gets the role definitions with the specified role type. | ||
getByType: { | ||
argNames: ["roleType"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "roledefinitions" | ||
}, | ||
@@ -25,0 +28,0 @@ |
@@ -125,8 +125,2 @@ declare module $REST.Types { | ||
/** | ||
* Adds a custom action to the user custom action collection. | ||
* parameters - The user custom action information. | ||
*/ | ||
addCustomAction(parameters:Settings.UserCustomActionCreationInformation): IUserCustomAction; | ||
/** | ||
* Creates a temporary evaluation SPSite for this SPSite, for the purposes of determining whether an upgrade is likely to be successful. | ||
@@ -145,5 +139,11 @@ * @param upgrade - If true, the evaluation site collection MUST be upgraded when it is created. If false, the evaluation site collection MUST NOT be upgraded when it is created. | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(ISite) => void): ISite; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): ISite; | ||
@@ -150,0 +150,0 @@ /** |
@@ -37,12 +37,2 @@ module $REST { | ||
} | ||
export class Site_Async extends Site { | ||
/*********************************************************************************************************************************/ | ||
// Constructor | ||
/*********************************************************************************************************************************/ | ||
constructor(url?:string, ...args) { | ||
// Call the base constructor | ||
super(url, Base.getAsyncInputParmeters.apply(null, args)); | ||
} | ||
} | ||
@@ -65,9 +55,2 @@ /*********************************************************************************************************************************/ | ||
// Adds a custom action to the user custom action collection. | ||
addCustomAction: { | ||
metadataType: "SP.UserCustomAction", | ||
name: "usercustomactions", | ||
requestType: Types.RequestType.PostWithArgsInBody | ||
}, | ||
// Creates a temporary evaluation SPSite for this SPSite, for the purposes of determining whether an upgrade is likely to be successful. | ||
@@ -74,0 +57,0 @@ createPreviewSPSite: { |
@@ -19,3 +19,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -25,2 +25,8 @@ execute(callback?:(ISiteGroups) => void): ISiteGroups; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): ISiteGroups; | ||
/** | ||
* Returns a group from the collection based on the member ID of the group. | ||
@@ -27,0 +33,0 @@ * @param id - The site group id. |
@@ -9,3 +9,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "group" | ||
}, | ||
@@ -16,3 +17,4 @@ | ||
argNames: ["name"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "group" | ||
}, | ||
@@ -19,0 +21,0 @@ |
@@ -56,6 +56,12 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(IUser) => void): IUser; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IUser; | ||
} | ||
} |
@@ -72,6 +72,12 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(IUserCustomAction) => void): IUserCustomAction; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IUserCustomAction; | ||
} | ||
} |
@@ -30,3 +30,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -36,2 +36,8 @@ execute(callback?:(IUserCustomActions) => void): IUserCustomActions; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IUserCustomActions; | ||
/** | ||
* Returns the custom action with the specified identifier. | ||
@@ -38,0 +44,0 @@ * @param id - The ID of the user custom action to get. |
@@ -21,3 +21,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "usercustomaction" | ||
}, | ||
@@ -24,0 +25,0 @@ |
@@ -19,3 +19,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -25,2 +25,8 @@ execute(callback?:(IUsers) => void): IUsers; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IUsers; | ||
/** | ||
* Gets the user with the specified email address. | ||
@@ -27,0 +33,0 @@ * @param email - The email of the user to get. |
@@ -9,3 +9,4 @@ module $REST { | ||
argNames: ["email"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "user" | ||
}, | ||
@@ -16,3 +17,4 @@ | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "user" | ||
}, | ||
@@ -23,3 +25,4 @@ | ||
argNames: ["loginName"], | ||
requestType: Types.RequestType.GetWithArgsInQS | ||
requestType: Types.RequestType.GetWithArgsInQS, | ||
returnType: "user" | ||
}, | ||
@@ -26,0 +29,0 @@ |
@@ -33,3 +33,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -39,2 +39,8 @@ execute(callback?:(IVersions) => void): IVersions; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IVersions; | ||
/** | ||
* Gets the version with the specified ID. | ||
@@ -41,0 +47,0 @@ * @param id - The version id to get. |
@@ -9,3 +9,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "version" | ||
}, | ||
@@ -12,0 +13,0 @@ |
@@ -137,3 +137,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -143,2 +143,8 @@ execute(callback?:(IView) => void): IView; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IView; | ||
/** | ||
* Returns the list view as HTML. | ||
@@ -145,0 +151,0 @@ */ |
@@ -17,3 +17,3 @@ declare module $REST.Types { | ||
/** The view field collection. */ | ||
results: Array<IViewFields>; | ||
results: Array<any>; | ||
@@ -32,3 +32,3 @@ /** | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -38,2 +38,8 @@ execute(callback?:(IViewFields) => void): IViewFields; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IViewFields; | ||
/** | ||
* Moves the field with the specified field internal name to the specified position in the collection. | ||
@@ -40,0 +46,0 @@ * @param field - The case-sensitive internal name of the field to move. Send this parameter and the index parameter in the request body, as shown in the example. |
@@ -24,3 +24,3 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -30,2 +30,8 @@ execute(callback?:(IViews) => void): IViews; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IViews; | ||
/** | ||
* Gets the list view with the specified ID. | ||
@@ -32,0 +38,0 @@ * @param id - The ID of the view. |
@@ -16,3 +16,4 @@ module $REST { | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "view" | ||
}, | ||
@@ -23,3 +24,4 @@ | ||
argNames: ["title"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "view" | ||
}, | ||
@@ -26,0 +28,0 @@ |
@@ -406,5 +406,11 @@ declare module $REST.Types { | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(IWeb) => void): IWeb; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IWeb; | ||
@@ -411,0 +417,0 @@ /** |
@@ -35,12 +35,2 @@ module $REST { | ||
export class Web_Async extends Web { | ||
/*********************************************************************************************************************************/ | ||
// Constructor | ||
/*********************************************************************************************************************************/ | ||
constructor(url?:string, ...args) { | ||
// Call the base constructor | ||
super(url, Base.getAsyncInputParmeters.apply(null, args)); | ||
} | ||
} | ||
/*********************************************************************************************************************************/ | ||
@@ -188,3 +178,4 @@ // Library | ||
argNames: ["url"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "file" | ||
}, | ||
@@ -195,3 +186,4 @@ | ||
argNames: ["url"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "folder" | ||
}, | ||
@@ -202,3 +194,4 @@ | ||
argNames: ["url"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "list" | ||
}, | ||
@@ -233,3 +226,4 @@ | ||
argNames: ["id"], | ||
requestType: Types.RequestType.GetWithArgsValueOnly | ||
requestType: Types.RequestType.GetWithArgsValueOnly, | ||
returnType: "user" | ||
}, | ||
@@ -236,0 +230,0 @@ |
@@ -21,7 +21,7 @@ declare module $REST.Types { | ||
*/ | ||
add(parameters:Settings.WebCreationInformation); | ||
add(parameters:Settings.WebCreationInformation): IWeb; | ||
/** | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
@@ -31,2 +31,8 @@ execute(callback?:(IWebs) => void): IWebs; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): IWebs; | ||
/** | ||
* Queries the collection. | ||
@@ -33,0 +39,0 @@ * @param oData - The OData information. |
@@ -10,5 +10,2 @@ declare module $REST.Types { | ||
/** True to execute the request asynchronously, synchronously otherwise. */ | ||
asyncFl: boolean; | ||
/** True, if the object exists, false otherwise. */ | ||
@@ -20,8 +17,17 @@ existsFl: boolean; | ||
/** The request type */ | ||
requestType: RequestType; | ||
/** | ||
* Method to execute the request. | ||
* @param callback - (Optional) For asynchronous requests, the method to be executed after the request completes. | ||
* @param callback - (Optional) The method to be executed after the request completes. | ||
*/ | ||
execute(callback?:(...args) => void): any; | ||
/** | ||
* Method to execute the request. | ||
* @param syncFl - Flag to execute the request synchronously | ||
*/ | ||
execute(syncFl:boolean): any; | ||
} | ||
} |
@@ -15,3 +15,4 @@ declare module $REST.Settings { | ||
requestType:Types.RequestType; | ||
returnType?:string; | ||
} | ||
} |
@@ -7,5 +7,2 @@ declare module $REST.Settings { | ||
interface TargetInfoSettings { | ||
/** True to execute the request asynchronously, synchronously otherwise. */ | ||
asyncFl?:boolean; | ||
/** True if the expected request returns an array buffer. */ | ||
@@ -12,0 +9,0 @@ bufferFl?:boolean; |
@@ -10,4 +10,5 @@ module $REST.Utils { | ||
/*********************************************************************************************************************************/ | ||
constructor(targetInfo:TargetInfo, callback?:(...args) => void) { | ||
constructor(asyncFl:boolean, targetInfo:TargetInfo, callback?:(...args) => void) { | ||
// Default the properties | ||
this.asyncFl = asyncFl; | ||
this.promise = new Promise(callback || targetInfo.callback); | ||
@@ -18,3 +19,3 @@ this.targetInfo = targetInfo; | ||
// Execute the request | ||
this.executeRequest(); | ||
this.execute(); | ||
} | ||
@@ -26,5 +27,2 @@ | ||
// Flag to determine if the request is asynchronous | ||
public get asyncFl():boolean { return this.targetInfo.asyncFl; } | ||
// The response | ||
@@ -46,2 +44,5 @@ public get response():any { return this.xhr ? this.xhr.response : null; } | ||
// The flag to determine if the request is executed asynchronously or synchronously | ||
private asyncFl:boolean; | ||
// The target information | ||
@@ -113,3 +114,3 @@ private targetInfo:TargetInfo; | ||
// Method to execute the xml http request | ||
private executeRequest():void { | ||
private execute():void { | ||
// Ensure the xml http request exists | ||
@@ -119,6 +120,6 @@ if(this.xhr == null) { return null; } | ||
// Open the request | ||
this.xhr.open(this.targetInfo.requestMethod == "GET" ? "GET" : "POST", this.targetInfo.requestUrl, this.targetInfo.asyncFl); | ||
this.xhr.open(this.targetInfo.requestMethod == "GET" ? "GET" : "POST", this.targetInfo.requestUrl, this.asyncFl); | ||
// See if we are making an asynchronous request | ||
if(this.targetInfo.asyncFl) { | ||
if(this.asyncFl) { | ||
// Set the state change event | ||
@@ -136,3 +137,3 @@ this.xhr.onreadystatechange = () => { | ||
// Note - Updating the response type is only allow for asynchronous requests. Any error will be thrown otherwise. | ||
if(this.targetInfo.bufferFl && this.targetInfo.asyncFl) { | ||
if(this.targetInfo.bufferFl && this.asyncFl) { | ||
// Set the response type | ||
@@ -139,0 +140,0 @@ this.xhr.responseType = "arraybuffer"; |
@@ -15,3 +15,2 @@ module $REST.Utils { | ||
this.requestMethod = this.targetInfo.method ? this.targetInfo.method : "GET"; | ||
this.targetInfo.asyncFl = this.targetInfo.asyncFl ? true : false; | ||
@@ -26,5 +25,2 @@ // Set the request url | ||
// Flag to determine if the request should be asynchronous or synchronous | ||
public get asyncFl():boolean { return this.targetInfo.asyncFl; } | ||
// Flag to determine if the request returns an array buffer | ||
@@ -31,0 +27,0 @@ public get bufferFl():boolean { return this.targetInfo.bufferFl; } |
@@ -1,2 +0,2 @@ | ||
var $REST;!function(e){e.DefaultRequestToHostWebFl=!1,e.Library={};var t=function(){function t(e){this.targetInfo=e||{},this.requestType=0}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.execute=function(t){var s=this;return this.targetInfo.asyncFl?(this.promise=new e.Utils.Promise(t||this.targetInfo.callback),this.request=new e.Utils.Request(new e.Utils.TargetInfo(this.targetInfo),function(){s.updateDataObject()})):(this.request=new e.Utils.Request(new e.Utils.TargetInfo(this.targetInfo)),this.updateDataObject()),this},t.getAsyncInputParmeters=function(e){return e=e?e:{},e.asyncFl=!0,e},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.results.length>1?"s":"",(/^field/.test(n)||/field$/.test(n))&&"fieldlinks"!=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){var u=i[o]?i[o]:{};if("properties"!=o)"function"==typeof u.metadataType&&(u=JSON.parse(JSON.stringify(u)),u.metadataType=i[o].metadataType(t)),t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(u)+", arguments);");else for(var p=0,l=u;p<l.length;p++){var y=l[p],d=y.split("|"),T=d[0],g=d.length>1?d[1]:null,c=d.length>2?d[2]:null,h=d.length>3?d[3]:null;4==d.length?(c=c.replace(/'/g,"\\'"),t[T]=new Function("name","name = name ? '"+T+c+"'.replace(/\\[Name\\]/g, name) : null;return this.getProperty(name ? name : '"+T+"', name ? '"+h+"' : '"+g+"');")):t[T]=new Function("return this.getProperty('"+T+"', '"+g+"');")}}},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]=e["get_"+s]?e["get_"+s]:new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.done=function(e){this.promise?this.promise.done(e):this.targetInfo.callback=e},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},r.inheritMetadataType&&(r.metadataType=i.type),this.updateMetadataUri(i,n)):n=Object.create(this.targetInfo),n.asyncFl=this.targetInfo?this.targetInfo.asyncFl:this.asyncFl;var o=new e.Utils.MethodInfo(s,r,a);n.bufferFl=r.requestType==e.Types.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(n);return u.parent=this,u.requestType=r.requestType,u},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var n=new t(r);return n.parent=this,n},t.prototype.getProperty=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e;var n=new t(r);return n.parent=this,s?this.addMethods(n,{__metadata:{type:s}}):null,n},t.prototype.resolveParentRequest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.targetInfo.callback&&this.targetInfo.callback.apply(this,e)},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.updateMetadata(e[0]),this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),e[0].asyncFl=this.asyncFl,e[0].executeMethod=this.executeMethod,e[0].parent=this,this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var e=t.results,s=0,r=e;s<r.length;s++){var a=r[s];a.asyncFl=t.asyncFl,a.executeMethod=t.executeMethod,a.parent=t,t.updateMetadata(a),t.addMethods(a,a)}},10))},t.prototype.updateDataObject=function(){if(this.request.request.status<400)if(this.requestType==e.Types.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.updateMetadata(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.prototype.updateMetadata=function(e){if(window._spPageContextInfo.isAppWeb){var t=window._spPageContextInfo.webAbsoluteUrl.toLowerCase(),s=e&&e.__metadata&&e.__metadata.uri?e.__metadata.uri.toLowerCase():null,r=this.targetInfo&&this.targetInfo.url?this.targetInfo.url.toLowerCase():null;null!=t&&null!=s&&null!=r&&(e.__metadata.uri=s.replace(t,r))}},t.prototype.updateMetadataUri=function(e,t){/^SP.Field/.test(e.type)||/^SP\..*Field$/.test(e.type)?t.url=t.url.replace(/AvailableFields/,"fields"):/SP.EventReceiverDefinition/.test(e.type)&&(t.url=t.url.replace(/\/EventReceiver\//,"/EventReceivers/"))},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.OData=3]="OData",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={}));e.RequestType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Invalid=0]="Invalid",e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(e.ControlMode||(e.ControlMode={}));e.ControlMode;!function(e){e[e.Approver=2]="Approver",e[e.Author=1]="Author",e[e.Reader=0]="Reader"}(e.DraftVisibilityType||(e.DraftVisibilityType={}));e.DraftVisibilityType;!function(e){e[e.ItemAdding=1]="ItemAdding",e[e.ItemUpdating=2]="ItemUpdating",e[e.ItemDeleting=3]="ItemDeleting",e[e.ItemCheckingIn=4]="ItemCheckingIn",e[e.ItemCheckingOut=5]="ItemCheckingOut",e[e.ItemUncheckingOut=6]="ItemUncheckingOut",e[e.ItemAttachmentAdding=7]="ItemAttachmentAdding",e[e.ItemAttachmentDeleting=8]="ItemAttachmentDeleting",e[e.ItemFileMoving=9]="ItemFileMoving",e[e.ItemVersionDeleting=11]="ItemVersionDeleting",e[e.FieldAdding=101]="FieldAdding",e[e.FieldUpdating=102]="FieldUpdating",e[e.FieldDeleting=103]="FieldDeleting",e[e.ListAdding=104]="ListAdding",e[e.ListDeleting=105]="ListDeleting",e[e.SiteDeleting=201]="SiteDeleting",e[e.WebDeleting=202]="WebDeleting",e[e.WebMoving=203]="WebMoving",e[e.WebAdding=204]="WebAdding",e[e.GroupAdding=301]="GroupAdding",e[e.GroupUpdating=302]="GroupUpdating",e[e.GroupDeleting=303]="GroupDeleting",e[e.GroupUserAdding=304]="GroupUserAdding",e[e.GroupUserDeleting=305]="GroupUserDeleting",e[e.RoleDefinitionAdding=306]="RoleDefinitionAdding",e[e.RoleDefinitionUpdating=307]="RoleDefinitionUpdating",e[e.RoleDefinitionDeleting=308]="RoleDefinitionDeleting",e[e.RoleAssignmentAdding=309]="RoleAssignmentAdding",e[e.RoleAssignmentDeleting=310]="RoleAssignmentDeleting",e[e.InheritanceBreaking=311]="InheritanceBreaking",e[e.InheritanceResetting=312]="InheritanceResetting",e[e.WorkflowStarting=501]="WorkflowStarting",e[e.ItemAdded=10001]="ItemAdded",e[e.ItemUpdated=10002]="ItemUpdated",e[e.ItemDeleted=10003]="ItemDeleted",e[e.ItemCheckedIn=10004]="ItemCheckedIn",e[e.ItemCheckedOut=10005]="ItemCheckedOut",e[e.ItemUncheckedOut=10006]="ItemUncheckedOut",e[e.ItemAttachmentAdded=10007]="ItemAttachmentAdded",e[e.ItemAttachmentDeleted=10008]="ItemAttachmentDeleted",e[e.ItemFileMoved=10009]="ItemFileMoved",e[e.ItemFileConverted=10010]="ItemFileConverted",e[e.ItemVersionDeleted=10011]="ItemVersionDeleted",e[e.FieldAdded=10101]="FieldAdded",e[e.FieldUpdated=10102]="FieldUpdated",e[e.FieldDeleted=10103]="FieldDeleted",e[e.ListAdded=10104]="ListAdded",e[e.ListDeleted=10105]="ListDeleted",e[e.SiteDeleted=10201]="SiteDeleted",e[e.WebDeleted=10202]="WebDeleted",e[e.WebMoved=10203]="WebMoved",e[e.WebProvisioned=10204]="WebProvisioned",e[e.GroupAdded=10301]="GroupAdded",e[e.GroupUpdated=10302]="GroupUpdated",e[e.GroupDeleted=10303]="GroupDeleted",e[e.GroupUserAdded=10304]="GroupUserAdded",e[e.GroupUserDeleted=10305]="GroupUserDeleted",e[e.RoleDefinitionAdded=10306]="RoleDefinitionAdded",e[e.RoleDefinitionUpdated=10307]="RoleDefinitionUpdated",e[e.RoleDefinitionDeleted=10308]="RoleDefinitionDeleted",e[e.RoleAssignmentAdded=10309]="RoleAssignmentAdded",e[e.RoleAssignmentDeleted=10310]="RoleAssignmentDeleted",e[e.InheritanceBroken=10311]="InheritanceBroken",e[e.InheritanceReset=10312]="InheritanceReset",e[e.WorkflowStarted=10501]="WorkflowStarted",e[e.WorkflowPostponed=10502]="WorkflowPostponed",e[e.WorkflowCompleted=10503]="WorkflowCompleted",e[e.EntityInstanceAdded=10601]="EntityInstanceAdded",e[e.EntityInstanceUpdated=10602]="EntityInstanceUpdated",e[e.EntityInstanceDeleted=10603]="EntityInstanceDeleted",e[e.AppInstalled=10701]="AppInstalled",e[e.AppUpgraded=10702]="AppUpgraded",e[e.AppUninstalling=10703]="AppUninstalling",e[e.EmailReceived=2e4]="EmailReceived",e[e.ContextEvent=32766]="ContextEvent"}(e.EventReceiverType||(e.EventReceiverType={}));e.EventReceiverType;!function(e){e[e.Asynchronous=2]="Asynchronous",e[e.Synchronization=1]="Synchronization"}(e.EventReceiverSynchronizationType||(e.EventReceiverSynchronizationType={}));e.EventReceiverSynchronizationType;!function(e){e[e.AllDayEvent=29]="AllDayEvent",e[e.Attachments=19]="Attachments",e[e.Boolean=8]="Boolean",e[e.Calculated=17]="Calculated",e[e.Choice=6]="Choice",e[e.Computed=12]="Computed",e[e.ContentTypeId=25]="ContentTypeId",e[e.Counter=5]="Counter",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.Currency=10]="Currency",e[e.DateTime=4]="DateTime",e[e.Error=24]="Error",e[e.File=18]="File",e[e.Geolocation=31]="Geolocation",e[e.GridChoice=16]="GridChoice",e[e.Guid=14]="Guid",e[e.Integer=1]="Integer",e[e.Invalid=0]="Invalid",e[e.Lookup=7]="Lookup",e[e.MaxItems=31]="MaxItems",e[e.ModStat=23]="ModStat",e[e.MultiChoice=15]="MultiChoice",e[e.Note=3]="Note",e[e.Number=9]="Number",e[e.PageSeparator=26]="PageSeparator",e[e.Recurrence=21]="Recurrence",e[e.Text=2]="Text",e[e.ThreadIndex=27]="ThreadIndex",e[e.Threading=13]="Threading",e[e.URL=11]="URL",e[e.User=20]="User",e[e.WorkflowEventType=30]="WorkflowEventType",e[e.WorkflowStatus=28]="WorkflowStatus"}(e.FieldType||(e.FieldType={}));e.FieldType;!function(e){e[e.FormPage=2]="FormPage",e[e.StandardPage=0]="StandardPage",e[e.WikiPage=1]="WikiPage"}(e.FileTemplateType||(e.FileTemplateType={}));e.FileTemplateType;!function(e){e[e.AccessRequest=160]="AccessRequest",e[e.AdminTasks=1200]="AdminTasks",e[e.Agenda=201]="Agenda",e[e.AppDataCatalog=125]="AppDataCatalog",e[e.Announcements=104]="Announcements",e[e.CallTrack=404]="CallTrack",e[e.Categories=303]="Categories",e[e.Circulation=405]="Circulation",e[e.Comments=302]="Comments",e[e.Contacts=105]="Contacts",e[e.CustomGrid=120]="CustomGrid",e[e.DataConnectionLibrary=130]="DataConnectionLibrary",e[e.DataSources=110]="DataSources",e[e.Decision=204]="Decision",e[e.DesignCatalog=124]="DesignCatalog",e[e.DeveloperSiteDraftApps=1230]="DeveloperSiteDraftApps",e[e.DiscussionBoard=108]="DiscussionBoard",e[e.DocumentLibrary=101]="DocumentLibrary",e[e.Events=106]="Events",e[e.ExternalList=600]="ExternalList",e[e.Facility=402]="Facility",e[e.GanttTasks=150]="GanttTasks",e[e.GenericList=100]="GenericList",e[e.HealthReports=1221]="HealthReports",e[e.HealthRules=1220]="HealthRules",e[e.HelpLibrary=151]="HelpLibrary",e[e.Holidays=421]="Holidays",e[e.HomePageLibrary=212]="HomePageLibrary",e[e.IMEDic=499]="IMEDic",e[e.IssueTracking=1100]="IssueTracking",e[e.Links=103]="Links",e[e.ListTemplateCatalog=114]="ListTemplateCatalog",e[e.MasterPageCatalog=116]="MasterPageCatalog",e[e.MaintenanceLogs=175]="MaintenanceLogs",e[e.MeetingObjective=207]="MeetingObjective",e[e.Meetings=200]="Meetings",e[e.MeetingUser=202]="MeetingUser",e[e.MySiteDocumentLibrary=700]="MySiteDocumentLibrary",e[e.Posts=301]="Posts",e[e.NoCodePublic=122]="NoCodePublic",e[e.NoCodeWorkflows=117]="NoCodeWorkflows",e[e.PictureLibrary=109]="PictureLibrary",e[e.SolutionCatalog=121]="SolutionCatalog",e[e.Survey=102]="Survey",e[e.Tasks=107]="Tasks",e[e.TasksWithTimelineAndHierarchy=171]="TasksWithTimelineAndHierarchy",e[e.TextBox=210]="TextBox",e[e.ThemeCatalog=123]="ThemeCatalog",e[e.ThingsToBring=211]="ThingsToBring",e[e.Timecard=420]="Timecard",e[e.UserInformation=112]="UserInformation",e[e.WebPageLibrary=119]="WebPageLibrary",e[e.WebPartCatalog=113]="WebPartCatalog",e[e.WebTemplateCatalog=111]="WebTemplateCatalog",e[e.Whereabouts=403]="Whereabouts",e[e.WorkflowHistory=140]="WorkflowHistory",e[e.WorkflowProcess=118]="WorkflowProcess",e[e.XMLForm=115]="XMLForm"}(e.ListTemplateType||(e.ListTemplateType={}));e.ListTemplateType;!function(e){e[e.DefaultView=0]="DefaultView",e[e.DialogView=2]="DialogView",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.Invalid=-1]="Invalid",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.NormalView=1]="NormalView",e[e.Page_MAXITEMS=11]="Page_MAXITEMS",e[e.SolutionForm=10]="SolutionForm",e[e.View=3]="View"}(e.PageType||(e.PageType={}));e.PageType;!function(e){e[e.Administrator=5]="Administrator",e[e.Contributor=3]="Contributor",e[e.Editor=6]="Editor",e[e.Guest=1]="Guest",e[e.None=0]="None",e[e.Reader=2]="Reader",e[e.WebDesigner=4]="WebDesigner"}(e.RoleType||(e.RoleType={}));e.RoleType;!function(e){e[e.None=0]="None",e[e.List=1]="List",e[e.ContentType=2]="ContentType",e[e.ProgId=3]="ProgId",e[e.FileType=4]="FileType"}(e.UserCustomActionRegistrationType||(e.UserCustomActionRegistrationType={}));e.UserCustomActionRegistrationType;!function(e){e[e.Calendar=524288]="Calendar",e[e.Chart=131072]="Chart",e[e.Gantt=67108864]="Gantt",e[e.Grid=2048]="Grid",e[e.Html=1]="Html",e[e.Recurrence=8193]="Recurrence"}(e.ViewType||(e.ViewType={}));e.ViewType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Utils.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(t){var s=function(){function s(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(s.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.Types.RequestType.Delete:case e.Types.RequestType.Post:case e.Types.RequestType.PostWithArgs:case e.Types.RequestType.PostWithArgsInBody:case e.Types.RequestType.PostWithArgsInQS:case e.Types.RequestType.PostWithArgsValueOnly:case e.Types.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetReplace||this.methodInfo.requestType==e.Types.RequestType.PostReplace},enumerable:!0,configurable:!0}),s.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,'\\"').replace(/\n/g,""));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&this.methodInfo.argValues.length>0&&(null==this.methodInfo.argNames?this.methodData=this.methodInfo.argValues[0]:this.methodInfo.argValues.length>this.methodInfo.argNames.length&&(this.methodData=this.methodInfo.argValues[this.methodInfo.argNames.length])),this.methodInfo.metadataType&&(this.methodInfo.argNames?(this.methodData||this.methodParams)[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:(this.methodData||this.methodParams).__metadata={type:this.methodInfo.metadataType})}},s.prototype.generateUrl=function(){var s=this.methodInfo.name;if(this.methodInfo.requestType==e.Types.RequestType.Delete&&(s="deleteObject"),this.passDataInBody){var r=this.methodData||this.methodParams;this.methodData=JSON.stringify(r)}if(this.passDataInQS){var r=this.methodParams||this.methodData;s+="(@v)?@v="+("string"==typeof r?"'"+encodeURIComponent(r)+"'":JSON.stringify(r))}if(this.replace)for(var a in this.methodParams)s=s.replace("[["+a+"]]",encodeURIComponent(this.methodParams[a]));else if(this.methodInfo.requestType==e.Types.RequestType.OData){var n=new t.OData(this.methodParams.oData);s="?"+n.QueryString}else if(!this.passDataInBody&&!this.passDataInQS){var i="",r=this.methodParams||this.methodData;if(r){r=r&&"object"==typeof r?r:{value:r};for(var o in r){var u=r[o];switch(u="string"==typeof u?"'"+u+"'":u,this.methodInfo.requestType){case e.Types.RequestType.GetWithArgsValueOnly:case e.Types.RequestType.PostWithArgsValueOnly:i+=u+", ";break;default:i+=o+"="+u+", "}}}s+=i.length>0?"("+i.replace(/, $/,"")+")":""}return s},s}();t.MethodInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=function(){function e(e){this._expand=e&&e.Expand?e.Expand:[],this._filter=e&&e.Filter?e.Filter:null,this._orderBy=e&&e.OrderBy?e.OrderBy:[],this._select=e&&e.Select?e.Select:[],this._skip=e&&e.Skip?e.Skip:null,this._top=e&&e.Top?e.Top:null}return Object.defineProperty(e.prototype,"Expand",{get:function(){return this._expand},set:function(e){this._expand=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Filter",{get:function(){return this._filter},set:function(e){this._filter=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OrderBy",{get:function(){return this._orderBy},set:function(e){this._orderBy=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"QueryString",{get:function(){var e="",t=[];t.push(this.getQSValue("$select",this._select)),t.push(this.getQSValue("$orderby",this._orderBy)),this._top?t.push("$top="+this._top):null,this._skip?t.push("$skip="+this._skip):null,this._filter?t.push("$filter=",this._filter):null,t.push(this.getQSValue("$expand",this._expand));for(var s=0,r=t;s<r.length;s++){var a=r[s];a&&""!=a&&(e+=(""==e?"":"&")+a)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Select",{get:function(){return this._select},set:function(e){this._select=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Skip",{get:function(){return this._skip},set:function(e){this._skip=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Top",{get:function(){return this._top},set:function(e){this._top=e},enumerable:!0,configurable:!0}),e.prototype.getQSValue=function(e,t){return t.length>0?e+"="+t.join(","):""},e}();e.OData=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!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}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=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||null==this.targetInfo.requestData?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}();e.Request=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(t){var s=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=this.getQueryStringValue("SPHostUrl"),s="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(e.DefaultRequestToHostWebFl&&this.isAppWeb&&null==this.targetInfo.url&&(this.targetInfo.url=t),null==this.targetInfo.url)this.targetInfo.url=this.context[0==this.targetInfo.defaultToWebFl?"siteAbsoluteUrl":"webAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){var r=this.targetInfo.url.split("/_api/");return void(this.isAppWeb&&r[0]!=this.context.webAbsoluteUrl?this.requestUrl=this.context.webAbsoluteUrl+"/_api/SP.AppContextSite(@target)/"+r[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+r[0]+"'":this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:""))}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb&&this.targetInfo.url!=this.context.webAbsoluteUrl){var a=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=s.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+a).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=s.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},t}();t.TargetInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],name:"",requestType:e.Types.RequestType.PostWithArgs},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttype={properties:["FieldLinks|fieldlinks|('[Name]')|fieldlink","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","WorkflowAssociations"],delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttypes={add:{metadataType:"SP.ContentType",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){t.call(this,e),this.defaultToWebFl=!0,this.targetInfo.endpoint="SP.Utilities.Utility.SendEmail"}return __extends(s,t),s.prototype.send=function(t){t.To&&("string"==typeof t.To?t.To={results:[t.To]}:t.To={results:t.To}),this.executeMethod("send",{argNames:["properties"],name:"",metadataType:"SP.Utilities.EmailProperties",requestType:e.Types.RequestType.PostWithArgsInBody},[t])},s}(e.Base);e.Email=t;var s=function(t){function s(s){t.call(this,e.Base.getAsyncInputParmeters.apply(null,s))}return __extends(s,t),s}(t);e.Email_Async=s}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinition={delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.EventReceiverDefinition",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinitions={add:{metadataType:"SP.EventReceiverDefinition",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.field={delete:{requestType:e.Types.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fields={add:{metadataType:"SP.Field",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"addField",requestType:e.Types.RequestType.PostWithArgsInBody},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.Types.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation" | ||
},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.PostWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.file={properties:["Author|user","CheckedOutByUser|user","EffectiveInformationRightsManagementSettings","InformationRightsManagementSettings","ListItemAllFields","LockedByUser|user","ModifiedBy|user","Properties","VersionEvents","Versions|fileversions"],approve:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},checkin:{argNames:["comment","checkInType"],requestType:e.Types.RequestType.PostWithArgs},checkout:{requestType:e.Types.RequestType.Post},content:{name:"$value",requestType:e.Types.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"continueUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},deny:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"finishUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.Types.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.Types.RequestType.PostReplace},openBinaryStream:{requestType:e.Types.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},recycle:{requestType:e.Types.RequestType.Get},saveBinaryStream:{requestType:e.Types.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},undoCheckOut:{requestType:e.Types.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.files={add:{argNames:["overwrite","url"],requestType:e.Types.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.Types.RequestType.PostWithArgs},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={properties:[],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversions={delete:{requestType:e.Types.RequestType.Delete},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.folder={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder|folder","Properties","StorageMetrics"],addFile:{argNames:["url","overwrite"],name:"files/add",requestType:e.Types.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],name:"files/addtemplatefile",requestType:e.Types.RequestType.PostWithArgs},addSubFolder:{argNames:["url"],name:"folders/add",requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.folders={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder","Properties","StorageMetrics"],add:{argNames:["url"],requestType:e.Types.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={properties:["Users|users|/getById([Name])|user"]}}($REST||($REST={}));var $REST;!function(e){e.Library.items={add:{metadataType:function(e){return e.Parent&&e.Parent.ListItemEntityTypeFullName?e.Parent.ListItemEntityTypeFullName:"SP.ListItem"},name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.Types.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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="lists/getByTitle('"+t+"')",this.addMethods(this,{__metadata:{type:"list"}})}return __extends(t,e),t}(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={properties:["BrowserFileHandling","ContentTypes|contenttypes|([Name])|contenttype","CreatablesInfo","DefaultView|view","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Forms|forms|('[Name]')|form","InformationRightsManagementSettings","Items|items|([Name])|item","ParentWeb","RoleAssignments|roleassignments|([Name])|roleassignment","RootFolder|folder|/getByUrl('[Name]')|file","Subscriptions","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","Views|views||('[Name]')|view","WorkflowAssociations"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getItemById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getItems:{argNames:["viewXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.Types.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getViewById:{argNames:["viewId"],name:"getView",requestType:e.Types.RequestType.GetWithArgsValueOnly},recycle:{requestType:e.Types.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.Types.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.Types.RequestType.PostWithArgs},reserveListItemId:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.listitem={properties:["AttachmentFiles|attachmentfiles","ContentType|contenttype","FieldValuesAsHtml","FieldValuesAsText","FieldValuesForEdit","File|file","FirstUniqueAncestorSecurableObject","Folder|folder","GetDlpPolicyTip","ParentList|list","RoleAssignments|roleassignments|roleassignments|([Name])|roleassignment"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},recycle:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.lists={add:{metadataType:"SP.List",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},ensureSiteAssetsLibrary:{requestType:e.Types.RequestType.Post},ensureSitePagesLibrary:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.Types.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.Types.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.Types.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.Types.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={properties:["Member","RoleDefinitionBindings|roledefinitions"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignments={addRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs},getByPrincipalId:{argNames:["principalId"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinitions={getById:{argNames:["roleDefId"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByType:{argNames:["roleType"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e,s){t.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",e&&(this.targetInfo.url=e),this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(null,this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=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.Site_Async=s,e.Library.site={properties:["EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Owner|user","RootWeb|web","UserCustomActions|usercustomactions|('[Name]')|usercustomaction"],addCustomAction:{metadataType:"SP.UserCustomAction",name:"usercustomactions",requestType:e.Types.RequestType.PostWithArgsInBody},createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.Types.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.Types.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getCustomListTemplates:{argNames:["web"],requestType:e.Types.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.Types.RequestType.PostWithArgs},invalidate:{requestType:e.Types.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.Types.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.Types.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.Types.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.Types.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.siteGroups={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["name"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.Types.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.Types.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.Types.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.user={properties:["Groups|sitegroups|([Name])|group"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomactions={add:{metadataType:"SP.UserCustomAction",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},clear:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.Types.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.Types.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var $REST;!function(e){e.Library.users={getByEmail:{argNames:["email"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},deleteAll:{requestType:e.Types.RequestType.Post},deleteById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.view={properties:["ViewFields|viewfieldcollection"],delete:{requestType:e.Types.RequestType.Delete},renderAsHtml:{requestType:e.Types.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeAllViewFields:{requestType:e.Types.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.views={add:{metadataType:"SP.View",name:"",requestType:e.Types.RequestType.PostWithArgs},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",t&&(this.targetInfo.url=t),this.addMethods(this,{__metadata:{type:"web"}})}return __extends(t,e),t.prototype.hasAccess=function(e){return!0},t}(e.Base);e.Web=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.Web_Async=s,e.Library.web={properties:["AllProperties","AppTiles","AssociatedMemberGroup|group","AssociatedOwnerGroup|group","AssociatedVisitorGroup|group","Author|user","AvailableContentTypes|contenttypes","AvailableFields|fields","ClientWebParts","ContentTypes|contenttypes|('[Name]')|contenttype","CurrentUser|user","DataLeakagePreventionStatusInfo","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Folders|folders|/getByUrl('[Name]')|folder","Lists|lists|/getByTitle('[Name]')|list","ListTemplates|listtemplates|('[Name]')|listtemplate","Navigation","ParentWeb","PushNotificationSubscribers","RecycleBin","RegionalSettings","RoleAssignments|roleassignments|([Name])|roleassignment","RoleDefinitions|roledefinitions|([Name])|roledefinition","RootFolder|folder|/getByUrl('[Name]')|file","SiteGroups|sitegroups|([Name])|group","SiteUserInfoList","SiteUsers|users|/getById([Name])|user","ThemeInfo","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","WebInfos","Webs|webs","WorkflowAssociations","WorkflowTemplates"],applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.Types.RequestType.PostWithArgs},applyWebTemplate:{argName:["name"],requestType:e.Types.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},doesPushNotificationSubscriberExist:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.Types.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.Types.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.Types.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.Types.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.Types.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.Types.RequestType.Post},getCustomListTemplates:{requestType:e.Types.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.Types.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.Types.RequestType.PostWithArgs},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getList:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscriber:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.Types.RequestType.GetWithArgs},getUserById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.Types.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.Types.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.Types.RequestType.GetWithArgs},processExternalNotification:{requestType:e.Types.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.Types.RequestType.PostWithArgs},resetRoleInheritance:{requestType:e.Types.RequestType.Post},unregisterPushNotificationSubscriber:{requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={})); | ||
var $REST;!function(e){e.DefaultRequestToHostWebFl=!1,e.Library={};var t=function(){function t(e){this.targetInfo=e||{},this.requestType=0}return Object.defineProperty(t.prototype,"response",{get:function(){return this.request?this.request.response:null},enumerable:!0,configurable:!0}),t.prototype.execute=function(e){var t="boolean"==typeof e?null:e,s="boolean"==typeof e&&e;return this.executeRequiredFl=!0,s?this.executeRequest(!s,t):this.executeRequest(!s,t)},t.prototype.addMethods=function(t,s){var r=s.results&&s.results.length>0,a=r?s.results[0].__metadata:s.__metadata,i=a&&a.type?a.type:this.targetInfo.endpoint;i=i.split("/"),i=i[i.length-1],i=i.split("."),i=i[i.length-1].toLowerCase(),i+=r&&s.results.length>1?"s":"",(/^field/.test(i)||/field$/.test(i))&&"fieldlinks"!=i&&"fields"!=i?i="field"+(r?"s":""):/item$/.test(i)?i="listitem":/items$/.test(i)&&(i="items");var n=e.Library[i];if(n)for(var o in n){var u=n[o]?n[o]:{};if("properties"!=o)"function"==typeof u.metadataType&&(u=JSON.parse(JSON.stringify(u)),u.metadataType=n[o].metadataType(t)),t[o]=new Function("return this.executeMethod('"+o+"', "+JSON.stringify(u)+", arguments);");else for(var p=0,l=u;p<l.length;p++){var y=l[p],d=y.split("|"),T=d[0],g=d.length>1?d[1]:null,c=d.length>2?d[2]:null,h=d.length>3?d[3]:null;4==d.length?(c=c.replace(/'/g,"\\'"),t[T]=new Function("name","name = name ? '"+T+c+"'.replace(/\\[Name\\]/g, name) : null;return this.getProperty(name ? name : '"+T+"', name ? '"+h+"' : '"+g+"');")):t[T]=new Function("return this.getProperty('"+T+"', '"+g+"');")}}},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]=e["get_"+s]?e["get_"+s]:new Function("return this.getCollection('"+s+"', arguments);"):e[s]=r)}},t.prototype.executeMethod=function(s,r,a){var i=null,n=this.d?this.d.__metadata:this.__metadata;n&&n.uri?(i={url:n.uri},r.inheritMetadataType&&(r.metadataType=n.type),this.updateMetadataUri(n,i)):i=Object.create(this.targetInfo);var o=new e.Utils.MethodInfo(s,r,a);i.bufferFl=r.requestType==e.Types.RequestType.GetBuffer,i.data=o.body,i.method=o.requestMethod,o.replaceEndpointFl?i.endpoint=o.url:o.url&&o.url.length>0&&(i.endpoint=(i.endpoint?i.endpoint+"/":"")+o.url);var u=new t(i);return u.parent=this,u.requestType=r.requestType,r.returnType?u.addMethods(u,{__metadata:{type:r.returnType}}):null,u},t.prototype.executeRequest=function(t,s){var r=this;if(this.executeRequiredFl){if(!t)return this.request=new e.Utils.Request(t,new e.Utils.TargetInfo(this.targetInfo)),this.updateDataObject()||this;this.promise=new e.Utils.Promise(s||this.targetInfo.callback),this.request=new e.Utils.Request(t,new e.Utils.TargetInfo(this.targetInfo),function(){r.updateDataObject()})}},t.prototype.getCollection=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e,r.callback=s&&"function"==typeof s[0]?s[0]:null;var i=new t(r);return i.parent=this,i},t.prototype.getProperty=function(e,s){var r=Object.create(this.targetInfo),a=this.d?this.d.__metadata:this.__metadata;a&&a.uri?(r.url=a.uri,this.updateMetadataUri(a,r),r.endpoint=e):r.endpoint+="/"+e;var i=new t(r);return i.parent=this,s?this.addMethods(i,{__metadata:{type:s}}):null,i},t.prototype.updateDataCollection=function(e){var t=this;e&&(this.results=e,this.existsFl=e.length>0,1==e.length?(this.updateMetadata(e[0]),this.addProperties(this,e[0]),this.addMethods(e[0],e[0]),e[0].executeMethod=this.executeMethod,e[0].parent=this,this.d.__metadata=e[0].__metadata):setTimeout(function(){for(var e=t.results,s=0,r=e;s<r.length;s++){var a=r[s];a.executeMethod=t.executeMethod,a.parent=t,t.updateMetadata(a),t.addMethods(a,a)}},10))},t.prototype.updateDataObject=function(){if(this.request.request.status<400)if(this.requestType==e.Types.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.updateMetadata(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.prototype.updateMetadata=function(e){if(window._spPageContextInfo.isAppWeb){var t=window._spPageContextInfo.webAbsoluteUrl.toLowerCase(),s=e&&e.__metadata&&e.__metadata.uri?e.__metadata.uri.toLowerCase():null,r=this.targetInfo&&this.targetInfo.url?this.targetInfo.url.toLowerCase():null;null!=t&&null!=s&&null!=r&&(e.__metadata.uri=s.replace(t,r))}},t.prototype.updateMetadataUri=function(e,t){/^SP.Field/.test(e.type)||/^SP\..*Field$/.test(e.type)?t.url=t.url.replace(/AvailableFields/,"fields"):/SP.EventReceiverDefinition/.test(e.type)&&(t.url=t.url.replace(/\/EventReceiver\//,"/EventReceivers/"))},t}();e.Base=t}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Custom=0]="Custom",e[e.Delete=1]="Delete",e[e.Merge=2]="Merge",e[e.OData=3]="OData",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={}));e.RequestType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){!function(e){e[e.Invalid=0]="Invalid",e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(e.ControlMode||(e.ControlMode={}));e.ControlMode;!function(e){e[e.Approver=2]="Approver",e[e.Author=1]="Author",e[e.Reader=0]="Reader"}(e.DraftVisibilityType||(e.DraftVisibilityType={}));e.DraftVisibilityType;!function(e){e[e.ItemAdding=1]="ItemAdding",e[e.ItemUpdating=2]="ItemUpdating",e[e.ItemDeleting=3]="ItemDeleting",e[e.ItemCheckingIn=4]="ItemCheckingIn",e[e.ItemCheckingOut=5]="ItemCheckingOut",e[e.ItemUncheckingOut=6]="ItemUncheckingOut",e[e.ItemAttachmentAdding=7]="ItemAttachmentAdding",e[e.ItemAttachmentDeleting=8]="ItemAttachmentDeleting",e[e.ItemFileMoving=9]="ItemFileMoving",e[e.ItemVersionDeleting=11]="ItemVersionDeleting",e[e.FieldAdding=101]="FieldAdding",e[e.FieldUpdating=102]="FieldUpdating",e[e.FieldDeleting=103]="FieldDeleting",e[e.ListAdding=104]="ListAdding",e[e.ListDeleting=105]="ListDeleting",e[e.SiteDeleting=201]="SiteDeleting",e[e.WebDeleting=202]="WebDeleting",e[e.WebMoving=203]="WebMoving",e[e.WebAdding=204]="WebAdding",e[e.GroupAdding=301]="GroupAdding",e[e.GroupUpdating=302]="GroupUpdating",e[e.GroupDeleting=303]="GroupDeleting",e[e.GroupUserAdding=304]="GroupUserAdding",e[e.GroupUserDeleting=305]="GroupUserDeleting",e[e.RoleDefinitionAdding=306]="RoleDefinitionAdding",e[e.RoleDefinitionUpdating=307]="RoleDefinitionUpdating",e[e.RoleDefinitionDeleting=308]="RoleDefinitionDeleting",e[e.RoleAssignmentAdding=309]="RoleAssignmentAdding",e[e.RoleAssignmentDeleting=310]="RoleAssignmentDeleting",e[e.InheritanceBreaking=311]="InheritanceBreaking",e[e.InheritanceResetting=312]="InheritanceResetting",e[e.WorkflowStarting=501]="WorkflowStarting",e[e.ItemAdded=10001]="ItemAdded",e[e.ItemUpdated=10002]="ItemUpdated",e[e.ItemDeleted=10003]="ItemDeleted",e[e.ItemCheckedIn=10004]="ItemCheckedIn",e[e.ItemCheckedOut=10005]="ItemCheckedOut",e[e.ItemUncheckedOut=10006]="ItemUncheckedOut",e[e.ItemAttachmentAdded=10007]="ItemAttachmentAdded",e[e.ItemAttachmentDeleted=10008]="ItemAttachmentDeleted",e[e.ItemFileMoved=10009]="ItemFileMoved",e[e.ItemFileConverted=10010]="ItemFileConverted",e[e.ItemVersionDeleted=10011]="ItemVersionDeleted",e[e.FieldAdded=10101]="FieldAdded",e[e.FieldUpdated=10102]="FieldUpdated",e[e.FieldDeleted=10103]="FieldDeleted",e[e.ListAdded=10104]="ListAdded",e[e.ListDeleted=10105]="ListDeleted",e[e.SiteDeleted=10201]="SiteDeleted",e[e.WebDeleted=10202]="WebDeleted",e[e.WebMoved=10203]="WebMoved",e[e.WebProvisioned=10204]="WebProvisioned",e[e.GroupAdded=10301]="GroupAdded",e[e.GroupUpdated=10302]="GroupUpdated",e[e.GroupDeleted=10303]="GroupDeleted",e[e.GroupUserAdded=10304]="GroupUserAdded",e[e.GroupUserDeleted=10305]="GroupUserDeleted",e[e.RoleDefinitionAdded=10306]="RoleDefinitionAdded",e[e.RoleDefinitionUpdated=10307]="RoleDefinitionUpdated",e[e.RoleDefinitionDeleted=10308]="RoleDefinitionDeleted",e[e.RoleAssignmentAdded=10309]="RoleAssignmentAdded",e[e.RoleAssignmentDeleted=10310]="RoleAssignmentDeleted",e[e.InheritanceBroken=10311]="InheritanceBroken",e[e.InheritanceReset=10312]="InheritanceReset",e[e.WorkflowStarted=10501]="WorkflowStarted",e[e.WorkflowPostponed=10502]="WorkflowPostponed",e[e.WorkflowCompleted=10503]="WorkflowCompleted",e[e.EntityInstanceAdded=10601]="EntityInstanceAdded",e[e.EntityInstanceUpdated=10602]="EntityInstanceUpdated",e[e.EntityInstanceDeleted=10603]="EntityInstanceDeleted",e[e.AppInstalled=10701]="AppInstalled",e[e.AppUpgraded=10702]="AppUpgraded",e[e.AppUninstalling=10703]="AppUninstalling",e[e.EmailReceived=2e4]="EmailReceived",e[e.ContextEvent=32766]="ContextEvent"}(e.EventReceiverType||(e.EventReceiverType={}));e.EventReceiverType;!function(e){e[e.Asynchronous=2]="Asynchronous",e[e.Synchronization=1]="Synchronization"}(e.EventReceiverSynchronizationType||(e.EventReceiverSynchronizationType={}));e.EventReceiverSynchronizationType;!function(e){e[e.AllDayEvent=29]="AllDayEvent",e[e.Attachments=19]="Attachments",e[e.Boolean=8]="Boolean",e[e.Calculated=17]="Calculated",e[e.Choice=6]="Choice",e[e.Computed=12]="Computed",e[e.ContentTypeId=25]="ContentTypeId",e[e.Counter=5]="Counter",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.Currency=10]="Currency",e[e.DateTime=4]="DateTime",e[e.Error=24]="Error",e[e.File=18]="File",e[e.Geolocation=31]="Geolocation",e[e.GridChoice=16]="GridChoice",e[e.Guid=14]="Guid",e[e.Integer=1]="Integer",e[e.Invalid=0]="Invalid",e[e.Lookup=7]="Lookup",e[e.MaxItems=31]="MaxItems",e[e.ModStat=23]="ModStat",e[e.MultiChoice=15]="MultiChoice",e[e.Note=3]="Note",e[e.Number=9]="Number",e[e.PageSeparator=26]="PageSeparator",e[e.Recurrence=21]="Recurrence",e[e.Text=2]="Text",e[e.ThreadIndex=27]="ThreadIndex",e[e.Threading=13]="Threading",e[e.URL=11]="URL",e[e.User=20]="User",e[e.WorkflowEventType=30]="WorkflowEventType",e[e.WorkflowStatus=28]="WorkflowStatus"}(e.FieldType||(e.FieldType={}));e.FieldType;!function(e){e[e.FormPage=2]="FormPage",e[e.StandardPage=0]="StandardPage",e[e.WikiPage=1]="WikiPage"}(e.FileTemplateType||(e.FileTemplateType={}));e.FileTemplateType;!function(e){e[e.AccessRequest=160]="AccessRequest",e[e.AdminTasks=1200]="AdminTasks",e[e.Agenda=201]="Agenda",e[e.AppDataCatalog=125]="AppDataCatalog",e[e.Announcements=104]="Announcements",e[e.CallTrack=404]="CallTrack",e[e.Categories=303]="Categories",e[e.Circulation=405]="Circulation",e[e.Comments=302]="Comments",e[e.Contacts=105]="Contacts",e[e.CustomGrid=120]="CustomGrid",e[e.DataConnectionLibrary=130]="DataConnectionLibrary",e[e.DataSources=110]="DataSources",e[e.Decision=204]="Decision",e[e.DesignCatalog=124]="DesignCatalog",e[e.DeveloperSiteDraftApps=1230]="DeveloperSiteDraftApps",e[e.DiscussionBoard=108]="DiscussionBoard",e[e.DocumentLibrary=101]="DocumentLibrary",e[e.Events=106]="Events",e[e.ExternalList=600]="ExternalList",e[e.Facility=402]="Facility",e[e.GanttTasks=150]="GanttTasks",e[e.GenericList=100]="GenericList",e[e.HealthReports=1221]="HealthReports",e[e.HealthRules=1220]="HealthRules",e[e.HelpLibrary=151]="HelpLibrary",e[e.Holidays=421]="Holidays",e[e.HomePageLibrary=212]="HomePageLibrary",e[e.IMEDic=499]="IMEDic",e[e.IssueTracking=1100]="IssueTracking",e[e.Links=103]="Links",e[e.ListTemplateCatalog=114]="ListTemplateCatalog",e[e.MasterPageCatalog=116]="MasterPageCatalog",e[e.MaintenanceLogs=175]="MaintenanceLogs",e[e.MeetingObjective=207]="MeetingObjective",e[e.Meetings=200]="Meetings",e[e.MeetingUser=202]="MeetingUser",e[e.MySiteDocumentLibrary=700]="MySiteDocumentLibrary",e[e.Posts=301]="Posts",e[e.NoCodePublic=122]="NoCodePublic",e[e.NoCodeWorkflows=117]="NoCodeWorkflows",e[e.PictureLibrary=109]="PictureLibrary",e[e.SolutionCatalog=121]="SolutionCatalog",e[e.Survey=102]="Survey",e[e.Tasks=107]="Tasks",e[e.TasksWithTimelineAndHierarchy=171]="TasksWithTimelineAndHierarchy",e[e.TextBox=210]="TextBox",e[e.ThemeCatalog=123]="ThemeCatalog",e[e.ThingsToBring=211]="ThingsToBring",e[e.Timecard=420]="Timecard",e[e.UserInformation=112]="UserInformation",e[e.WebPageLibrary=119]="WebPageLibrary",e[e.WebPartCatalog=113]="WebPartCatalog",e[e.WebTemplateCatalog=111]="WebTemplateCatalog",e[e.Whereabouts=403]="Whereabouts",e[e.WorkflowHistory=140]="WorkflowHistory",e[e.WorkflowProcess=118]="WorkflowProcess",e[e.XMLForm=115]="XMLForm"}(e.ListTemplateType||(e.ListTemplateType={}));e.ListTemplateType;!function(e){e[e.DefaultView=0]="DefaultView",e[e.DialogView=2]="DialogView",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.Invalid=-1]="Invalid",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.NormalView=1]="NormalView",e[e.Page_MAXITEMS=11]="Page_MAXITEMS",e[e.SolutionForm=10]="SolutionForm",e[e.View=3]="View"}(e.PageType||(e.PageType={}));e.PageType;!function(e){e[e.Administrator=5]="Administrator",e[e.Contributor=3]="Contributor",e[e.Editor=6]="Editor",e[e.Guest=1]="Guest",e[e.None=0]="None",e[e.Reader=2]="Reader",e[e.WebDesigner=4]="WebDesigner"}(e.RoleType||(e.RoleType={}));e.RoleType;!function(e){e[e.None=0]="None",e[e.List=1]="List",e[e.ContentType=2]="ContentType",e[e.ProgId=3]="ProgId",e[e.FileType=4]="FileType"}(e.UserCustomActionRegistrationType||(e.UserCustomActionRegistrationType={}));e.UserCustomActionRegistrationType;!function(e){e[e.Calendar=524288]="Calendar",e[e.Chart=131072]="Chart",e[e.Gantt=67108864]="Gantt",e[e.Grid=2048]="Grid",e[e.Html=1]="Html",e[e.Recurrence=8193]="Recurrence"}(e.ViewType||(e.ViewType={}));e.ViewType}(t=e.Types||(e.Types={}))}($REST||($REST={}));var $REST;!function(e){var t=function(){function t(t){this.promise=new e.Utils.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(t){var s=function(){function s(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(s.prototype,"body",{get:function(){return this.methodData},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replaceEndpointFl",{get:function(){return!!this.methodInfo.replaceEndpointFl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"requestMethod",{get:function(){if("string"==typeof this.methodInfo.requestMethod)return this.methodInfo.requestMethod;switch(this.methodInfo.requestType){case e.Types.RequestType.Delete:case e.Types.RequestType.Post:case e.Types.RequestType.PostWithArgs:case e.Types.RequestType.PostWithArgsInBody:case e.Types.RequestType.PostWithArgsInQS:case e.Types.RequestType.PostWithArgsValueOnly:case e.Types.RequestType.PostReplace:return"POST";default:return"GET"}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"url",{get:function(){return this.methodUrl},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInBody",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInBody||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInBody},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"passDataInQS",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetWithArgsInQS||this.methodInfo.requestType==e.Types.RequestType.PostWithArgsInQS},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isTemplate",{get:function(){return!!this.methodInfo.data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"replace",{get:function(){return this.methodInfo.requestType==e.Types.RequestType.GetReplace||this.methodInfo.requestType==e.Types.RequestType.PostReplace},enumerable:!0,configurable:!0}),s.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 i 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 n in this.methodParams)this.methodInfo.data=this.methodInfo.data.replace("[["+n+"]]",this.methodParams[n].replace(/"/g,'\\"').replace(/\n/g,""));this.methodData=JSON.parse(this.methodInfo.data)}this.methodInfo.argValues&&this.methodInfo.argValues.length>0&&(null==this.methodInfo.argNames?this.methodData=this.methodInfo.argValues[0]:this.methodInfo.argValues.length>this.methodInfo.argNames.length&&(this.methodData=this.methodInfo.argValues[this.methodInfo.argNames.length])),this.methodInfo.metadataType&&(this.methodInfo.argNames?(this.methodData||this.methodParams)[this.methodInfo.argNames[0]].__metadata={type:this.methodInfo.metadataType}:(this.methodData||this.methodParams).__metadata={type:this.methodInfo.metadataType})}},s.prototype.generateUrl=function(){var s=this.methodInfo.name;if(this.methodInfo.requestType==e.Types.RequestType.Delete&&(s="deleteObject"),this.passDataInBody){var r=this.methodData||this.methodParams;this.methodData=JSON.stringify(r)}if(this.passDataInQS){var r=this.methodParams||this.methodData;s+="(@v)?@v="+("string"==typeof r?"'"+encodeURIComponent(r)+"'":JSON.stringify(r))}if(this.replace)for(var a in this.methodParams)s=s.replace("[["+a+"]]",encodeURIComponent(this.methodParams[a]));else if(this.methodInfo.requestType==e.Types.RequestType.OData){var i=new t.OData(this.methodParams.oData);s="?"+i.QueryString}else if(!this.passDataInBody&&!this.passDataInQS){var n="",r=this.methodParams||this.methodData;if(r){r=r&&"object"==typeof r?r:{value:r};for(var o in r){var u=r[o];switch(u="string"==typeof u?"'"+u+"'":u,this.methodInfo.requestType){case e.Types.RequestType.GetWithArgsValueOnly:case e.Types.RequestType.PostWithArgsValueOnly:n+=u+", ";break;default:n+=o+"="+u+", "}}}s+=n.length>0?"("+n.replace(/, $/,"")+")":""}return s},s}();t.MethodInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=function(){function e(e){this._expand=e&&e.Expand?e.Expand:[],this._filter=e&&e.Filter?e.Filter:null,this._orderBy=e&&e.OrderBy?e.OrderBy:[],this._select=e&&e.Select?e.Select:[],this._skip=e&&e.Skip?e.Skip:null,this._top=e&&e.Top?e.Top:null}return Object.defineProperty(e.prototype,"Expand",{get:function(){return this._expand},set:function(e){this._expand=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Filter",{get:function(){return this._filter},set:function(e){this._filter=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OrderBy",{get:function(){return this._orderBy},set:function(e){this._orderBy=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"QueryString",{get:function(){var e="",t=[];t.push(this.getQSValue("$select",this._select)),t.push(this.getQSValue("$orderby",this._orderBy)),this._top?t.push("$top="+this._top):null,this._skip?t.push("$skip="+this._skip):null,this._filter?t.push("$filter=",this._filter):null,t.push(this.getQSValue("$expand",this._expand));for(var s=0,r=t;s<r.length;s++){var a=r[s];a&&""!=a&&(e+=(""==e?"":"&")+a)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Select",{get:function(){return this._select},set:function(e){this._select=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Skip",{get:function(){return this._skip},set:function(e){this._skip=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Top",{get:function(){return this._top},set:function(e){this._top=e},enumerable:!0,configurable:!0}),e.prototype.getQSValue=function(e,t){return t.length>0?e+"="+t.join(","):""},e}();e.OData=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!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}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(e){var t=function(){function t(t,s,r){this.asyncFl=t,this.promise=new e.Promise(r||s.callback),this.targetInfo=s,this.xhr=this.createXHR(),this.execute()}return 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.execute=function(){var e=this;return null==this.xhr?null:(this.xhr.open("GET"==this.targetInfo.requestMethod?"GET":"POST",this.targetInfo.requestUrl,this.asyncFl),this.asyncFl&&(this.xhr.onreadystatechange=function(){4==e.xhr.readyState&&e.promise.resolve(e)}),this.targetInfo.bufferFl&&this.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||null==this.targetInfo.requestData?this.xhr.send():this.xhr.send(this.targetInfo.requestData)))},t}();e.Request=t}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){var t;!function(t){var s=function(){function t(e){this.targetInfo=e||{},this.requestData=this.targetInfo.data,this.requestMethod=this.targetInfo.method?this.targetInfo.method:"GET",this.setRequestUrl()}return 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=this.getQueryStringValue("SPHostUrl"),s="{{Url}}/_api/{{EndPoint}}{{TargetUrl}}";if(e.DefaultRequestToHostWebFl&&this.isAppWeb&&null==this.targetInfo.url&&(this.targetInfo.url=t),null==this.targetInfo.url)this.targetInfo.url=this.context[0==this.targetInfo.defaultToWebFl?"siteAbsoluteUrl":"webAbsoluteUrl"];else if(/\/_api\//.test(this.targetInfo.url)){var r=this.targetInfo.url.split("/_api/");return void(this.isAppWeb&&r[0]!=this.context.webAbsoluteUrl?this.requestUrl=this.context.webAbsoluteUrl+"/_api/SP.AppContextSite(@target)/"+r[1]+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:"")+"?@target='"+r[0]+"'":this.requestUrl=this.targetInfo.url+(this.targetInfo.endpoint?"/"+this.targetInfo.endpoint:""))}if(0!=this.targetInfo.url.indexOf("http")&&(this.targetInfo.url=this.getDomainUrl()+this.targetInfo.url),this.isAppWeb&&this.targetInfo.url!=this.context.webAbsoluteUrl){var a=this.targetInfo.endpoint+(this.targetInfo.endpoint.indexOf("?")>0?"&":"?");this.requestUrl=s.replace(/{{Url}}/g,this.context.webAbsoluteUrl).replace(/{{EndPoint}}/g,"SP.AppContextSite(@target)/"+a).replace(/{{TargetUrl}}/g,"@target='"+this.targetInfo.url+"'")}else this.requestUrl=s.replace(/{{Url}}/g,this.targetInfo.url).replace(/{{EndPoint}}/g,this.targetInfo.endpoint).replace(/{{TargetUrl}}/g,"")},t}();t.TargetInfo=s}(t=e.Utils||(e.Utils={}))}($REST||($REST={}));var $REST;!function(e){e.Library.attachmentfiles={add:{argNames:["name"],name:"",requestType:e.Types.RequestType.PostWithArgs},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttype={properties:["FieldLinks|fieldlinks|('[Name]')|fieldlink","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","WorkflowAssociations"],delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.ContentType",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.contenttypes={add:{metadataType:"SP.ContentType",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addAvailableContentType:{argNames:["contentTypeId"],requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"contenttype"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){t.call(this,e),this.defaultToWebFl=!0,this.targetInfo.endpoint="SP.Utilities.Utility.SendEmail"}return __extends(s,t),s.prototype.send=function(t){t.To&&("string"==typeof t.To?t.To={results:[t.To]}:t.To={results:t.To}),this.executeMethod("send",{argNames:["properties"],name:"",metadataType:"SP.Utilities.EmailProperties",requestType:e.Types.RequestType.PostWithArgsInBody},[t])},s}(e.Base);e.Email=t}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinition={delete:{requestType:e.Types.RequestType.Delete},update:{metadataType:"SP.EventReceiverDefinition",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.eventreceiverdefinitions={add:{metadataType:"SP.EventReceiverDefinition",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"eventreceiver"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.field={delete:{requestType:e.Types.RequestType.Delete},setShowInDisplayForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInEditForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},setShowInNewForm:{argNames:["showInForm"],requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.fieldlinks={add:{argNames:["data"],metadataType:"SP.FieldLink",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"fieldlink"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fields={add:{metadataType:"SP.Field",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},addField:{argNames:["parameters"],metadataType:"SP.FieldCreationInformation",name:"addField",requestType:e.Types.RequestType.PostWithArgsInBody},addDependentLookupField:{argNames:["displayname","primarylookupfieldid","showfield"],requestType:e.Types.RequestType.PostWithArgs},createFieldAsXml:{argNames:["schemaXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{parameters:{__metadata:{type:"SP.XmlSchemaFieldCreationInformation"},Options:8,SchemaXml:"[[schemaXml]]"}}},getById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly,returnType:"field"},getByInternalNameOrTitle:{argNames:["internalNameOrTitle"],requestType:e.Types.RequestType.PostWithArgsValueOnly,returnType:"field"},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.PostWithArgsValueOnly,returnType:"field"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.file={properties:["Author|user","CheckedOutByUser|user","EffectiveInformationRightsManagementSettings","InformationRightsManagementSettings","ListItemAllFields","LockedByUser|user","ModifiedBy|user","Properties","VersionEvents","Versions|fileversions"], | ||
approve:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},cancelupload:{argNames:["uploadId"],name:"cancelupload(guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},checkin:{argNames:["comment","checkInType"],requestType:e.Types.RequestType.PostWithArgs},checkout:{requestType:e.Types.RequestType.Post},content:{name:"$value",requestType:e.Types.RequestType.GetBuffer},continueUpload:{argNames:["uploadId","fileOffset"],name:"continueUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},copyTo:{argNames:["strNewUrl","bOverWrite"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},deny:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},finishUpload:{argNames:["uploadId","fileOffset"],name:"finishUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])",requestType:e.Types.RequestType.PostReplace},getlimitedwebpartmanager:{argNames:["scope"],name:"getLimitedWebPartManager(scope=[[scope]])",requestType:e.Types.RequestType.GetReplace},moveTo:{argNames:["newUrl","flags"],name:"moveTo(newUrl='[[newUrl]]', flags=[[flags]])",requestType:e.Types.RequestType.PostReplace},openBinaryStream:{requestType:e.Types.RequestType.GetBuffer},publish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},recycle:{requestType:e.Types.RequestType.Get},saveBinaryStream:{requestType:e.Types.RequestType.PostWithArgsInBody},startUpload:{argNames:["uploadId"],name:"startupload(uploadId=guid'[[uploadId]]')",requestType:e.Types.RequestType.PostReplace},undoCheckOut:{requestType:e.Types.RequestType.Post},unpublish:{argNames:["comment"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.File",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.files={add:{argNames:["overwrite","url"],requestType:e.Types.RequestType.PostWithArgs},addTemplateFile:{argNames:["urlOfFile","templateFileType"],requestType:e.Types.RequestType.PostWithArgs},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"file"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversion={properties:[],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.fileversions={delete:{requestType:e.Types.RequestType.Delete},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.folder={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder|folder","Properties","StorageMetrics"],delete:{requestType:e.Types.RequestType.Delete},getByUrl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"folder"},recycle:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.Folder",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.folders={properties:["Files|files|/getByUrl('[Name]')|file","Folders|folders|/getByUrl('[Name]')|folder","ListItemAllFields","ParentFolder","Properties","StorageMetrics"],add:{argNames:["url"],requestType:e.Types.RequestType.PostWithArgs},getbyurl:{argNames:["serverRelativeUrl"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"folder"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.group={properties:["Users|users|/getById([Name])|user"]}}($REST||($REST={}));var $REST;!function(e){e.Library.items={add:{metadataType:function(e){return e.Parent&&e.Parent.ListItemEntityTypeFullName?e.Parent.ListItemEntityTypeFullName:"SP.ListItem"},name:"",requestType:e.Types.RequestType.PostWithArgsInBody},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"listitem"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.limitedwebpartmanager={get_WebParts:{argNames:["id"],name:"webparts?expand=WebPart",requestType:e.Types.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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="lists/getByTitle('"+t+"')",this.addMethods(this,{__metadata:{type:"list"}})}return __extends(t,e),t}(e.Base);e.List=t,e.Library.list={properties:["BrowserFileHandling","ContentTypes|contenttypes|([Name])|contenttype","CreatablesInfo","DefaultView|view","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Forms|forms|('[Name]')|form","InformationRightsManagementSettings","Items|items|([Name])|item","ParentWeb","RoleAssignments|roleassignments|([Name])|roleassignment","RootFolder|folder|/getByUrl('[Name]')|file","Subscriptions","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","Views|views||('[Name]')|view","WorkflowAssociations"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getItemById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"item"},getItems:{argNames:["viewXml"],requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"[[viewXml]]"}}},getItemsByQuery:{argNames:["camlQuery"],name:"getItems",requestType:e.Types.RequestType.PostWithArgsInBody,data:{query:{__metadata:{type:"SP.CamlQuery"},ViewXml:"<View>[[camlQuery]]</View>"}}},getListItemChangesSinceToken:{argNames:["query"],metadataType:"SP.ChangeLogItemQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getRelatedFields:{requestType:e.Types.RequestType.Get},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getViewById:{argNames:["viewId"],name:"getView",requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"view"},recycle:{requestType:e.Types.RequestType.Post},renderListData:{argNames:["viewXml"],name:"renderListData(@v)?@v='<View>[[viewXml]]</View>'",requestType:e.Types.RequestType.PostReplace},renderListFormData:{argNames:["itemid","formid","mode"],requestType:e.Types.RequestType.PostWithArgs},reserveListItemId:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{metadataType:"SP.List",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.listitem={properties:["AttachmentFiles|attachmentfiles","ContentType|contenttype","FieldValuesAsHtml","FieldValuesAsText","FieldValuesForEdit","File|file","FirstUniqueAncestorSecurableObject","Folder|folder","GetDlpPolicyTip","ParentList|list","RoleAssignments|roleassignments|roleassignments|([Name])|roleassignment"],breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},recycle:{requestType:e.Types.RequestType.Post},resetRoleInheritance:{requestType:e.Types.RequestType.Post},update:{inheritMetadataType:!0,name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},validateUpdateListItem:{argNames:["formValues","bNewDocumentUpdate"],requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.lists={add:{metadataType:"SP.List",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},ensureSiteAssetsLibrary:{requestType:e.Types.RequestType.Post},ensureSitePagesLibrary:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"list"},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"list"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.peoplemanager={},e.Library.peoplemanager[e.Types.RequestType.Get]=["amlFollowedBy","amlFollowing","getFollowedTags","getFollowersFor","getMyFollowers","getMyProperties","getMySuggestions","getPeopleFollowedBy","getPeopleFollowedByMe","getPropertiesFor","getUserProfilePropertyFor"],e.Library.peoplemanager[e.Types.RequestType.GetAppendMethodToEndPoint]=["getTrendingTags","isFollowing"],e.Library.peoplemanager[e.Types.RequestType.Post]=["follow","followTag","hideSuggestion","stopFollowing","stopFollowingTag"],e.Library.peoplemanager[e.Types.RequestType.PostDataInBody]=["setMyProfilePicture"]}($REST||($REST={}));var $REST;!function(e){e.Library.profileloader={}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignment={properties:["Member","RoleDefinitionBindings|roledefinitions"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roleAssignments={addRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs},getByPrincipalId:{argNames:["principalId"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roleassignment"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeRoleAssignment:{argNames:["principalId","roleDefId"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinition={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.roledefinitions={getById:{argNames:["roleDefId"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roledefinition"},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roledefinition"},getByType:{argNames:["roleType"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"roledefinitions"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e,s){t.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="site",e&&(this.targetInfo.url=e),this.addMethods(this,{__metadata:{type:"site"}})}return __extends(s,t),s.prototype.getRootWeb=function(){return new e.Web(null,this.targetInfo)},s.prototype.hasAccess=function(e){return!0},s}(e.Base);e.Site=t,e.Library.site={properties:["EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Owner|user","RootWeb|web","UserCustomActions|usercustomactions|('[Name]')|usercustomaction"],createPreviewSPSite:{argNames:["upgrade","sendemail"],requestType:e.Types.RequestType.PostWithArgs},extendUpgradeReminderDate:{requestType:e.Types.RequestType.Post},getCatalog:{argNames:["typeCatalog"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getCustomListTemplates:{argNames:["web"],requestType:e.Types.RequestType.PostWithArgs},getWebTemplates:{argNames:["LCID","overrideCompatLevel"],requestType:e.Types.RequestType.PostWithArgs},invalidate:{requestType:e.Types.RequestType.Post},needsUpgradeByType:{argNames:["versionUpgrade","recursive"],requestType:e.Types.RequestType.PostWithArgs},openWeb:{argNames:["strUrl"],requestType:e.Types.RequestType.PostWithArgsValueOnly},openWebById:{argNames:["gWebId"],requestType:e.Types.RequestType.PostWithArgsValueOnly},runHealthCheck:{argNames:["ruleId","bRepair","bRunAlways"],requestType:e.Types.RequestType.PostWithArgs},runUpgradeSiteSession:{argNames:["versionUpgrade","queueOnly","sendEmail"],requestType:e.Types.RequestType.PostWithArgs},update:{metadataType:"SP.Site",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody},updateClientObjectModelUseRemoteAPIsPermissionSetting:{argNames:["requireUseRemoteAPIs"],requestType:e.Types.RequestType.PostWithArgs}}}($REST||($REST={}));var $REST;!function(e){e.Library.siteGroups={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"group"},getByName:{argNames:["name"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"group"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["name"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.socialrestactor={},e.Library.socialrestactor[e.Types.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.Types.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.Types.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.user={properties:["Groups|sitegroups|([Name])|group"],delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomaction={delete:{requestType:e.Types.RequestType.Delete}}}($REST||($REST={}));var $REST;!function(e){e.Library.usercustomactions={add:{metadataType:"SP.UserCustomAction",name:"",requestType:e.Types.RequestType.PostWithArgsInBody},clear:{requestType:e.Types.RequestType.Post},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"usercustomaction"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={}));var $REST;!function(e){e.Library.userprofile={},e.Library.userprofile[e.Types.RequestType.Post]=["createPersonalSiteEnque","shareAllSocialData"],e.Library.userprofile[e.Types.RequestType.Custom]=[{name:"getOneDriveUrl",function:function(){return this.FollowPersonalSiteUrl+"_layouts/15/onedrive.aspx"}}]}($REST||($REST={}));var $REST;!function(e){e.Library.users={getByEmail:{argNames:["email"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"user"},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"user"},getByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS,returnType:"user"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},removeByLoginName:{argNames:["loginName"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.versions={getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"version"},deleteAll:{requestType:e.Types.RequestType.Post},deleteById:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},deleteByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly},restoreByLabel:{argNames:["label"],requestType:e.Types.RequestType.PostWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.view={properties:["ViewFields|viewfieldcollection"],delete:{requestType:e.Types.RequestType.Delete},renderAsHtml:{requestType:e.Types.RequestType.Get},update:{metadataType:"SP.View",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.viewfieldcollection={addViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.PostWithArgsValueOnly},moveViewFieldTo:{argNames:["field","index"],requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData},removeAllViewFields:{requestType:e.Types.RequestType.Post},removeViewField:{argNames:["fieldName"],requestType:e.Types.RequestType.GetWithArgsValueOnly}}}($REST||($REST={}));var $REST;!function(e){e.Library.views={add:{metadataType:"SP.View",name:"",requestType:e.Types.RequestType.PostWithArgs},getById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"view"},getByTitle:{argNames:["title"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"view"},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($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(e){function t(t,s){e.call(this,s),this.defaultToWebFl=!0,this.targetInfo.endpoint="web",t&&(this.targetInfo.url=t),this.addMethods(this,{__metadata:{type:"web"}})}return __extends(t,e),t.prototype.hasAccess=function(e){return!0},t}(e.Base);e.Web=t,e.Library.web={properties:["AllProperties","AppTiles","AssociatedMemberGroup|group","AssociatedOwnerGroup|group","AssociatedVisitorGroup|group","Author|user","AvailableContentTypes|contenttypes","AvailableFields|fields","ClientWebParts","ContentTypes|contenttypes|('[Name]')|contenttype","CurrentUser|user","DataLeakagePreventionStatusInfo","DescriptionResource","EventReceivers|eventreceivers|('[Name]')|eventreceiver","Features","Fields|fields|/getByInternalNameOrTitle('[Name]')|field","FirstUniqueAncestorSecurableObject","Folders|folders|/getByUrl('[Name]')|folder","Lists|lists|/getByTitle('[Name]')|list","ListTemplates|listtemplates|('[Name]')|listtemplate","Navigation","ParentWeb","PushNotificationSubscribers","RecycleBin","RegionalSettings","RoleAssignments|roleassignments|([Name])|roleassignment","RoleDefinitions|roledefinitions|([Name])|roledefinition","RootFolder|folder|/getByUrl('[Name]')|file","SiteGroups|sitegroups|([Name])|group","SiteUserInfoList","SiteUsers|users|/getById([Name])|user","ThemeInfo","TitleResource","UserCustomActions|usercustomactions|('[Name]')|usercustomaction","WebInfos","Webs|webs","WorkflowAssociations","WorkflowTemplates"],applyTheme:{argNames:["colorpaletteurl","fontschemeurl","backgroundimageurl","sharegenerated"],requestType:e.Types.RequestType.PostWithArgs},applyWebTemplate:{argName:["name"],requestType:e.Types.RequestType.PostWithArgsInQS},breakRoleInheritance:{argNames:["copyroleassignments","clearsubscopes"],requestType:e.Types.RequestType.PostWithArgs},delete:{requestType:e.Types.RequestType.Delete},doesPushNotificationSubscriberExist:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},doesUserHavePermissions:{argNames:["High","Low"],requestType:e.Types.RequestType.GetWithArgsInQS},ensureUser:{argNames:["logonName"],requestType:e.Types.RequestType.PostWithArgsInBody},executeRemoteLOB:{requestType:e.Types.RequestType.PostWithArgsInBody},getAppBdcCatalog:{requestType:e.Types.RequestType.Post},getAppBdcCatalogForAppInstance:{argNames:["id"],requestType:e.Types.RequestType.PostWithArgsValueOnly},getAppInstanceById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAppInstancesByProductId:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getAvailableWebTemplates:{argNames:["lcid","doincludecrosslanguage"],requestType:e.Types.RequestType.GetWithArgs},getCatalog:{argNames:["galleryType"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getChanges:{argNames:["query"],metadataType:"SP.ChangeQuery",requestType:e.Types.RequestType.PostWithArgsInBody},getContextWebInformation:{name:"contextInfo",replaceEndpointFl:!0,requestType:e.Types.RequestType.Post},getCustomListTemplates:{requestType:e.Types.RequestType.Get},getDocumentLibraries:{argNames:["url"],name:"sp.web.getDocumentLibraries",requestType:e.Types.RequestType.GetWithArgsInQS},getEntity:{argNames:["namespace","name"],requestType:e.Types.RequestType.PostWithArgs},getFileByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"file"},getFolderByServerRelativeUrl:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"folder"},getList:{argNames:["url"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"list"},getPushNotificationSubscriber:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByArgs:{argNames:["args"],requestType:e.Types.RequestType.GetWithArgsValueOnly},getPushNotificationSubscribersByUser:{argNames:["loginName"],requestType:e.Types.RequestType.GetWithArgsInQS},getSubwebsFilteredForCurrentUser:{argNames:["nwebtemplatefilter","nconfigurationfilter"],requestType:e.Types.RequestType.GetWithArgs},getUserById:{argNames:["id"],requestType:e.Types.RequestType.GetWithArgsValueOnly,returnType:"user"},getUserEffectivePermissions:{argNames:["loginName"],name:"getUserEffectivePermissions(@user)?@user='[[loginName]]'",requestType:e.Types.RequestType.GetReplace},getWebUrlFromPageUrl:{name:"sp.web.getWebUrlFromPageUrl",requestType:e.Types.RequestType.GetWithArgsInQS},loadAndInstallApp:{requestType:e.Types.RequestType.PostWithArgsInBody},loadAndInstallAppInSpecifiedLocale:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},loadApp:{argNames:["appPackageStream","installationLocaleLCID"],requestType:e.Types.RequestType.PostWithArgsInBody},mapToIcon:{argNames:["filename","progid","size"],requestType:e.Types.RequestType.GetWithArgs},processExternalNotification:{requestType:e.Types.RequestType.PostWithArgsInBody},registerPushNotificationSubscriber:{argNames:["deviceappinstanceid","servicetoken"],requestType:e.Types.RequestType.PostWithArgs},resetRoleInheritance:{requestType:e.Types.RequestType.Post},unregisterPushNotificationSubscriber:{requestType:e.Types.RequestType.PostWithArgsValueOnly},update:{metadataType:"SP.Web",name:"",requestMethod:"MERGE",requestType:e.Types.RequestType.PostWithArgsInBody}}}($REST||($REST={}));var $REST;!function(e){e.Library.webs={add:{argNames:["parameters"],metadataType:"SP.WebCreationInformation",requestType:e.Types.RequestType.PostWithArgsInBody},query:{argNames:["oData"],requestType:e.Types.RequestType.OData}}}($REST||($REST={})); |
@@ -77,3 +77,3 @@ /// <reference path="../dist/sprest.d.ts" /> | ||
}) | ||
.execute(); | ||
.execute(true); | ||
@@ -91,6 +91,6 @@ // Test | ||
Group: "Dev" | ||
}).execute(); | ||
}).execute(true); | ||
// Read the content types | ||
ct = (new $REST.Web()).ContentTypes(ct.Id.StringValue).execute(); | ||
ct = (new $REST.Web()).ContentTypes(ct.Id.StringValue).execute(true); | ||
@@ -104,6 +104,6 @@ // Test | ||
// Get the test field | ||
var field = (new $REST.Web()).Fields("SPRestText").execute(); | ||
var field = (new $REST.Web()).Fields("SPRestText").execute(true); | ||
if(!field.existsFl) { | ||
// Create the test field | ||
field = web.Fields().createFieldAsXml('<Field ID="{AA3AF8EA-2D8D-4345-8BD9-6017205F2212}" Name="SPRestText" StaticName="SPRestText" DisplayName="SPREST Test Text" Type="Text" />').execute(); | ||
field = web.Fields().createFieldAsXml('<Field ID="{AA3AF8EA-2D8D-4345-8BD9-6017205F2212}" Name="SPRestText" StaticName="SPRestText" DisplayName="SPREST Test Text" Type="Text" />').execute(true); | ||
} | ||
@@ -118,3 +118,3 @@ | ||
// Add the field to the list | ||
var listField = list.Fields().createFieldAsXml('<Field ID="{AA3AF8EA-2D8D-4345-8BD9-6017205F2212}" Name="SPRestText" StaticName="SPRestText" DisplayName="SPREST Test Text" Type="Text" />').execute(); | ||
var listField = list.Fields().createFieldAsXml('<Field ID="{AA3AF8EA-2D8D-4345-8BD9-6017205F2212}" Name="SPRestText" StaticName="SPRestText" DisplayName="SPREST Test Text" Type="Text" />').execute(true); | ||
@@ -131,3 +131,3 @@ // Test | ||
// Add the field to the content type | ||
var fieldLink = ct.FieldLinks().add({ FieldInternalName: field.InternalName }).execute(); | ||
var fieldLink = ct.FieldLinks().add({ FieldInternalName: field.InternalName }).execute(true); | ||
@@ -141,3 +141,3 @@ // Test | ||
// Add the content type to the list | ||
var ctList = list.ContentTypes().addAvailableContentType(ct.Id.StringValue).execute(); | ||
var ctList = list.ContentTypes().addAvailableContentType(ct.Id.StringValue).execute(true); | ||
@@ -151,3 +151,3 @@ // Test | ||
// Delete the content type from the list | ||
ctList.delete().execute(); | ||
ctList.delete().execute(true); | ||
@@ -161,3 +161,3 @@ // Test | ||
// Delete the content type | ||
ct = ct.delete().execute(); | ||
ct = ct.delete().execute(true); | ||
@@ -171,3 +171,3 @@ // Test | ||
// Delete the content type | ||
field = field.delete().execute(); | ||
field = field.delete().execute(true); | ||
@@ -196,3 +196,3 @@ // Test | ||
// Get this file | ||
var file = (new $REST.Web()).getFileByServerRelativeUrl(_spPageContextInfo.serverRequestPath).execute(); | ||
var file = (new $REST.Web()).getFileByServerRelativeUrl(_spPageContextInfo.serverRequestPath).execute(true); | ||
@@ -206,3 +206,3 @@ // Test | ||
// Get the parent folder | ||
var folder = (new $REST.Web()).getFolderByServerRelativeUrl(file.ServerRelativeUrl.substr(0, file.ServerRelativeUrl.length - file.Name.length - 1)).execute(); | ||
var folder = (new $REST.Web()).getFolderByServerRelativeUrl(file.ServerRelativeUrl.substr(0, file.ServerRelativeUrl.length - file.Name.length - 1)).execute(true); | ||
@@ -216,3 +216,3 @@ // Test | ||
// Create a sub-folder | ||
var subFolder = folder.addSubFolder("Test").execute(); | ||
var subFolder = folder.addSubFolder("Test").execute(true); | ||
@@ -226,3 +226,3 @@ // Test | ||
// Read the content types of this file | ||
var fileContent = file.content().execute(); | ||
var fileContent = file.content().execute(true); | ||
@@ -241,3 +241,3 @@ // Test | ||
// Copy the file | ||
file = subFolder.addFile("test.aspx", true, buffer).execute(); | ||
file = subFolder.addFile("test.aspx", true, buffer).execute(true); | ||
@@ -251,3 +251,3 @@ // Test | ||
// Delete the file | ||
file = file.delete().execute(); | ||
file = file.delete().execute(true); | ||
@@ -261,3 +261,3 @@ // Test | ||
// Delete the sub-folder | ||
subFolder = subFolder.delete().execute(); | ||
subFolder = subFolder.delete().execute(true); | ||
@@ -283,3 +283,3 @@ // Test | ||
}) | ||
.execute(); | ||
.execute(true); | ||
@@ -297,6 +297,6 @@ // Test | ||
Description: "Updated description" | ||
}).execute(); | ||
}).execute(true); | ||
// Read the updated list | ||
list = new $REST.List(list.Title).execute(); | ||
list = new $REST.List(list.Title).execute(true); | ||
@@ -319,3 +319,3 @@ // Test | ||
// Delete the list | ||
list = list.delete().execute(); | ||
list = list.delete().execute(true); | ||
@@ -342,3 +342,3 @@ // Test | ||
Title: "New Item" | ||
}).execute(); | ||
}).execute(true); | ||
assert(item, "create", "existsFl", true); | ||
@@ -352,6 +352,6 @@ | ||
Title: "Updated Item" | ||
}).execute(); | ||
}).execute(true); | ||
// Read the updated item | ||
item = (new $REST.List(list.Title)).Items(item.ID).execute(); | ||
item = (new $REST.List(list.Title)).Items(item.ID).execute(true); | ||
@@ -365,3 +365,3 @@ // Test | ||
// Delete the item | ||
item = item.delete().execute(); | ||
item = item.delete().execute(true); | ||
@@ -389,3 +389,3 @@ // Test | ||
Title: title | ||
}).execute(); | ||
}).execute(true); | ||
@@ -409,3 +409,3 @@ // Test | ||
// Get the items | ||
items = (new $REST.List(list.Title, false)).getItemsByQuery(caml).execute(); | ||
items = (new $REST.List(list.Title, false)).getItemsByQuery(caml).execute(true); | ||
@@ -412,0 +412,0 @@ // Test |
@@ -53,11 +53,8 @@ // Type definitions for gd-sprest | ||
var List:Types.IList; | ||
var List_Async:Types.IList; | ||
/** Site */ | ||
var Site:Types.ISite; | ||
var Site_Async:Types.ISite; | ||
/** Web */ | ||
var Web:Types.IWeb; | ||
var Web_Async:Types.IWeb; | ||
} |
Sorry, the diff of this file is too big to display
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
17860
475
1154816