Comparing version 1.0.4 to 1.0.5-0
@@ -10,5 +10,5 @@ # @pnp/sp/webs | ||
```TypeScript | ||
import pnp, { WebAddResult } from "@pnp/sp"; | ||
import { sp, WebAddResult } from "@pnp/sp"; | ||
pnp.sp.web.webs.add("title", "subweb1").then((w: WebAddResult) => { | ||
sp.web.webs.add("title", "subweb1").then((w: WebAddResult) => { | ||
@@ -28,6 +28,6 @@ // show the response from the server when adding the web | ||
```TypeScript | ||
import pnp, { WebAddResult } from "@pnp/sp"; | ||
import { sp, WebAddResult } from "@pnp/sp"; | ||
// create a German language wiki site with title, url, description, which inherits permissions | ||
pnp.sp.web.webs.add("wiki", "subweb2", "a wiki web", "WIKI#0", 1031, true).then((w: WebAddResult) => { | ||
sp.web.webs.add("wiki", "subweb2", "a wiki web", "WIKI#0", 1031, true).then((w: WebAddResult) => { | ||
@@ -48,6 +48,6 @@ // show the response from the server when adding the web | ||
```TypeScript | ||
import pnp from "@pnp/sp"; | ||
import { sp } from "@pnp/sp"; | ||
// basic get of the webs properties | ||
pnp.sp.web.get().then(w => { | ||
sp.web.get().then(w => { | ||
@@ -58,3 +58,3 @@ console.log(w.Title); | ||
// use odata operators to get specific fields | ||
pnp.sp.web.select("Title").get().then(w => { | ||
sp.web.select("Title").get().then(w => { | ||
@@ -64,4 +64,4 @@ console.log(w.Title); | ||
// use with a simple getAs to give the result a type | ||
pnp.sp.web.select("Title").getAs<{ Title: string }>().then(w => { | ||
// use with get to give the result a type | ||
sp.web.select("Title").get<{ Title: string }>().then(w => { | ||
@@ -77,5 +77,5 @@ console.log(w.Title); | ||
```TypeScript | ||
import pnp from "@pnp/sp"; | ||
import { sp } from "@pnp/sp"; | ||
pnp.sp.web.select("AllProperties").expand("AllProperties").get().then(w => { | ||
sp.web.select("AllProperties").expand("AllProperties").get().then(w => { | ||
@@ -106,3 +106,3 @@ console.log(w.AllProperties); | ||
```TypeScript | ||
pnp.sp.site.openWebById("111ca453-90f5-482e-a381-cee1ff383c9e").then(w => { | ||
sp.site.openWebById("111ca453-90f5-482e-a381-cee1ff383c9e").then(w => { | ||
@@ -109,0 +109,0 @@ //we got all the data from the web as well |
{ | ||
"name": "@pnp/sp", | ||
"version": "1.0.4", | ||
"version": "1.0.5-0", | ||
"description": "pnp - provides a fluent api for working with SharePoint REST", | ||
@@ -11,5 +11,5 @@ "main": "./dist/sp.es5.umd.js", | ||
"peerDependencies": { | ||
"@pnp/common": "1.0.4", | ||
"@pnp/logging": "1.0.4", | ||
"@pnp/odata": "1.0.4" | ||
"@pnp/common": "1.0.5-0", | ||
"@pnp/logging": "1.0.5-0", | ||
"@pnp/odata": "1.0.5-0" | ||
}, | ||
@@ -16,0 +16,0 @@ "author": { |
@@ -81,2 +81,10 @@ import { TypedHash } from "@pnp/common"; | ||
/** | ||
* Gets this web's parent web and data | ||
* | ||
*/ | ||
getParentWeb(): Promise<{ | ||
data: any; | ||
web: Web; | ||
}>; | ||
/** | ||
* Returns a collection of objects that contain metadata about subsites of the current site in which the current user is a member. | ||
@@ -83,0 +91,0 @@ * |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
6426578
45217
2