2.2.0 • Published 7 years ago

pd-spserverajax v2.2.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

pdspserverajax

Author: "Jered McGlohon"

pdspserverajax.getContext(props) ⇒ promise.<object>

Gets a context object for server requests. the key from response is FormDigestValue

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url

pdspserverajax.getData(url) ⇒ promise.<object>

Get data from server using the REST endpoint

Kind: static method of pdspserverajax

ParamTypeDescription
urlstringfull odata url

pdspserverajax.getAllListResults(props) ⇒ promise.<Array.<object>>

Gets all results for server requests. once the promise resolves you get an array of objects that are the servers response

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.selectstring
props.filterstring
props.expandstring
props.topstring
props.orderBystring

pdspserverajax.getBatchMetered(props) ⇒ promise.<Array.<object>>

Gets all items requested in the getUrls property (batch request)

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringrelative url of the site that contains the data
props.getUrlsArray.<string>full odata urls

pdspserverajax.getBatchProfiles(props) ⇒ promise.<Array.<object>>

Get user profiles from the server (batch request)

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.profileEmailsArray.<string>email addresses of the users you want profile data for

pdspserverajax.getListInfo(props) ⇒ promise.<object>

Get list or library properties from server

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringa site relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring

pdspserverajax.peopleSearch(props) ⇒ promise.<Array.<object>>

Get user profile info from the SharePoint search service

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.querystringquery that is passed to search service, ex "'" + 'Bureau="'+ divisionName + '"\''
props.sourceIdstringsource id for the search service to use, defaults to the out of the box people source id
props.propertiesArray.<string>specify which properties you want back from the request

pdspserverajax.ensureUser(props) ⇒ promise.<object>

Checks if user is in the site collection user table

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.emailstringemail address of the user to check

pdspserverajax.getSiteUserInfoByEmail(props) ⇒ promise.<object>

Gets user info from the site collection user table

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.emailstringemail address of the user to retrieve

pdspserverajax.getItemsByCaml(props) ⇒ promise.<object>

Get request that uses CAML to filter results

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.querystringCAML query
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring

pdspserverajax.getUserSitePermissions(props) ⇒ promise.<Array.<string>>

Get a users permissions to a site

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.emailstringemail of the user to get permissions for

pdspserverajax.getUserListPermissions(props) ⇒ promise.<Array.<sting>>

Get a users permissions to a list or library

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.emailstringemail of the user to check permission of

pdspserverajax.getCurrentUserGroups(props) ⇒ promise.<Array.<sting>>

Gets the SharePoint groups that a user has been added to, identify the user by passing the id number of the user for the site.

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.userIdnumberusers site id number

pdspserverajax.createItem(props) ⇒ promise.<object>

Creates a single item in a list

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.listNamestringserver name for the list
props.infoToServerobjectobject whos key is the column name and the value is what you want stored in that column

pdspserverajax.updateItem(props) ⇒ promise.<object>

Updates a single item in a list

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.listNamestringserver name for the list
props.etagstringetag of the item to update
props.itemIdnumberid of the item to update
props.infoToServerobjectobject whos key is the column name and the value is what you want stored in that column

pdspserverajax.deleteItem(props) ⇒ promise.<object>

Deletes a single item from a list or library be warned if you use this function, the item you delete will be gone and unrecoverable!!!!

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.etagstringetag of the item to update
props.itemIdnumberid of the item to delete

pdspserverajax.recycleItem(props) ⇒ promise.<object>

Sends a single item to the recycle bin of the site collection

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.itemIdnumberid of the item to recycle

pdspserverajax.getUserProfileData(props) ⇒ promise.<Array.<object>>

Gets the profile information from the profile service if email is passed then that will be the profile data you get back if email is not passed you get current user profile data back

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.emailstringemail of the user you want profile data for

pdspserverajax.getListColumns(props) ⇒ promise.<object>

Get the columns of a list or library

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring

pdspserverajax.meteredCreateItems(props) ⇒ promise.<Array.<object>>

Creates multiple items via REST, items array should contain object with a key of column name and property of value you want stored in that column ex. { Title: "something" }

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.itemsArray.<object>items to create
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.listNamestringserver name for the list
props.itemCreatedCBitemPreProcessingthis call back is called when an item is added to be processed
props.itemCompletedCBitemCompletedProcessingthis call back is called when item is completed

pdspserverajax.meteredUpdateItems(props) ⇒ promise.<Array.<object>>

Updates multiple items via REST, items array should contain object with 2 properties itemId and updateInfo and 1 optional property etag ex. { itemId: 3, etag: ""3"" updateInfo: { Title: "example string" } }

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.itemsArray.<object>items to update
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.listNamestringserver name for the list
props.itemCreatedCBitemPreProcessingthis call back is called when an item is added to be processed
props.itemCompletedCBitemCompletedProcessingthis call back is called when item is completed

pdspserverajax.meteredRecycleItems(props) ⇒ promise.<Array.<object>>

Recycles multiple items via REST

Kind: static method of pdspserverajax

ParamTypeDescription
propsobject
props.itemsArray.<number>ids of items to recycle
props.originstring
props.urlstringsite relative url
props.listGUIDstringuse either listGUID or listTitle not both
props.listTitlestring
props.itemCreatedCBitemPreProcessingthis call back is called when an item is added to be processed
props.itemCompletedCBitemCompletedProcessingthis call back is called when item is completed

pdspserverajax~itemCompletedProcessing : function

The processingCompletedCallback will be passed the order number and the process status (success or fail) to trigger any completed side effects The order number is your id to locate elements (dom or whatever) based on the specific item processing

Kind: inner typedef of pdspserverajax

ParamType
statusstring
indexnumber

pdspserverajax~itemPreProcessing : function

The index and itemData to process will be passed to this function it MUST return a native promise. the order number is your id to locate elements (dom or whatever) based on the specific item processing

Kind: inner typedef of pdspserverajax

ParamType
itemDataany
indexnumber
2.2.0

7 years ago

2.1.8

7 years ago

2.1.6

7 years ago

2.1.5

7 years ago

2.1.4

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.2.6

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

0.0.1

8 years ago