npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pd-spserverajax

v2.2.0

Published

<a name="module_pdspserverajax"></a>

Downloads

6

Readme

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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url |

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

Get data from server using the REST endpoint

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | url | string | full 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | [props.select] | string | | | [props.filter] | string | | | [props.expand] | string | | | [props.top] | string | | | [props.orderBy] | string | |

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

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

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | relative url of the site that contains the data | | props.getUrls | Array.<string> | full odata urls |

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

Get user profiles from the server (batch request)

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.profileEmails | Array.<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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | a site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | |

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

Get user profile info from the SharePoint search service

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.query | string | query that is passed to search service, ex "'" + 'Bureau="'+ divisionName + '"'' | | [props.sourceId] | string | source id for the search service to use, defaults to the out of the box people source id | | props.properties | Array.<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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.email | string | email 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.email | string | email address of the user to retrieve |

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

Get request that uses CAML to filter results

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.query | string | CAML query | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | |

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

Get a users permissions to a site

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.email | string | email 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | props.email | string | email 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.userId | number | users site id number |

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

Creates a single item in a list

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | [props.listName] | string | server name for the list | | props.infoToServer | object | object 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | [props.listName] | string | server name for the list | | [props.etag] | string | etag of the item to update | | props.itemId | number | id of the item to update | | props.infoToServer | object | object 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | [props.etag] | string | etag of the item to update | | props.itemId | number | id 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | props.itemId | number | id 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | [props.email] | string | email 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | |

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

| Param | Type | Description | | --- | --- | --- | | props | object | | | props.items | Array.<object> | items to create | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | [props.listName] | string | server name for the list | | [props.itemCreatedCB] | itemPreProcessing | this call back is called when an item is added to be processed | | [props.itemCompletedCB] | itemCompletedProcessing | this 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

| Param | Type | Description | | --- | --- | --- | | props | object | | | props.items | Array.<object> | items to update | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | [props.listName] | string | server name for the list | | [props.itemCreatedCB] | itemPreProcessing | this call back is called when an item is added to be processed | | [props.itemCompletedCB] | itemCompletedProcessing | this call back is called when item is completed |

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

Recycles multiple items via REST

Kind: static method of pdspserverajax

| Param | Type | Description | | --- | --- | --- | | props | object | | | props.items | Array.<number> | ids of items to recycle | | [props.origin] | string | | | props.url | string | site relative url | | props.listGUID | string | use either listGUID or listTitle not both | | [props.listTitle] | string | | | [props.itemCreatedCB] | itemPreProcessing | this call back is called when an item is added to be processed | | [props.itemCompletedCB] | itemCompletedProcessing | this 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

| Param | Type | | --- | --- | | status | string | | index | number |

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

| Param | Type | | --- | --- | | itemData | any | | index | number |