@pnp/graph 3.20.1 → 3.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  export function Telemetry() {
2
2
  return (instance) => {
3
3
  instance.on.pre(async function (url, init, result) {
4
- init.headers = { ...init.headers, SdkVersion: "PnPCoreJS/3.20.1" };
4
+ init.headers = { ...init.headers, SdkVersion: "PnPCoreJS/3.21.0" };
5
5
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/dot-notation
6
6
  this.log(`Request Tag: ${init.headers["SdkVersion"]}`, 0);
7
7
  return [url, init, result];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/graph",
3
- "version": "3.20.1",
3
+ "version": "3.21.0",
4
4
  "description": "pnp - provides a fluent interface to query the Microsoft Graph",
5
5
  "main": "./index.js",
6
6
  "typings": "./index",
@@ -10,8 +10,8 @@
10
10
  "dependencies": {
11
11
  "@microsoft/microsoft-graph-types": "2.35.0",
12
12
  "tslib": "2.6.0",
13
- "@pnp/core": "3.20.1",
14
- "@pnp/queryable": "3.20.1"
13
+ "@pnp/core": "3.21.0",
14
+ "@pnp/queryable": "3.21.0"
15
15
  },
16
16
  "funding": {
17
17
  "type": "individual",
@@ -1,10 +1,12 @@
1
- import { IPhoto } from "./types.js";
1
+ import { IPhoto, IPhotos } from "./types.js";
2
2
  declare module "../groups/types" {
3
3
  interface _Group {
4
4
  readonly photo: IPhoto;
5
+ readonly photos: IPhotos;
5
6
  }
6
7
  interface IGroup {
7
8
  readonly photo: IPhoto;
9
+ readonly photos: IPhotos;
8
10
  }
9
11
  }
10
12
  //# sourceMappingURL=groups.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,QAAQ,iBAAiB,CAAC;IAC7B,UAAU,MAAM;QACZ,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KAC1B;IACD,UAAU,MAAM;QACZ,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KAC1B;CACJ"}
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,MAAM,EAAE,OAAO,EAAU,MAAM,YAAY,CAAC;AAE5D,OAAO,QAAQ,iBAAiB,CAAC;IAC7B,UAAU,MAAM;QACZ,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KAC5B;IACD,UAAU,MAAM;QACZ,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KAC5B;CACJ"}
package/photos/groups.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { addProp } from "@pnp/queryable";
2
2
  import { _Group } from "../groups/types.js";
3
- import { Photo } from "./types.js";
3
+ import { Photo, Photos } from "./types.js";
4
4
  addProp(_Group, "photo", Photo);
5
+ addProp(_Group, "photos", Photos);
5
6
  //# sourceMappingURL=groups.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../packages/graph/photos/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAU,MAAM,YAAY,CAAC;AAW3C,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../packages/graph/photos/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAmB,MAAM,EAAE,MAAM,YAAY,CAAC;AAa5D,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAChC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC"}
package/photos/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import "./groups.js";
2
2
  import "./users.js";
3
+ import "./teams.js";
3
4
  export { IPhoto, Photo, } from "./types.js";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AAEpB,OAAO,EACH,MAAM,EACN,KAAK,GACR,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AAEpB,OAAO,EACH,MAAM,EACN,KAAK,GACR,MAAM,YAAY,CAAC"}
package/photos/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import "./groups.js";
2
2
  import "./users.js";
3
+ import "./teams.js";
3
4
  export { Photo, } from "./types.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/graph/photos/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AAEpB,OAAO,EAEH,KAAK,GACR,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/graph/photos/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AAEpB,OAAO,EAEH,KAAK,GACR,MAAM,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { IPhoto } from "./types.js";
2
+ declare module "../teams/types" {
3
+ interface _Team {
4
+ readonly photo: IPhoto;
5
+ }
6
+ interface ITeam {
7
+ readonly photo: IPhoto;
8
+ }
9
+ }
10
+ //# sourceMappingURL=teams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/teams.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,QAAQ,gBAAgB,CAAC;IAC5B,UAAU,KAAK;QACX,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KAC1B;IACD,UAAU,KAAK;QACX,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KAC1B;CACJ"}
@@ -0,0 +1,5 @@
1
+ import { addProp } from "@pnp/queryable";
2
+ import { _Team } from "../teams/types.js";
3
+ import { Photo } from "./types.js";
4
+ addProp(_Team, "photo", Photo);
5
+ //# sourceMappingURL=teams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teams.js","sourceRoot":"","sources":["../../../../packages/graph/photos/teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAU,MAAM,YAAY,CAAC;AAW3C,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC"}
package/photos/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { _GraphQueryableInstance } from "../graphqueryable.js";
2
- import { Photo as IPhotoType } from "@microsoft/microsoft-graph-types";
3
- export declare class _Photo extends _GraphQueryableInstance<IPhotoType> {
1
+ import { _GraphQueryableCollection, _GraphQueryableInstance } from "../graphqueryable.js";
2
+ import { ProfilePhoto as IProfilePhotoType } from "@microsoft/microsoft-graph-types";
3
+ export declare class _Photo extends _GraphQueryableInstance<IProfilePhotoType> {
4
4
  /**
5
5
  * Gets the image bytes as a blob (browser)
6
6
  */
@@ -19,4 +19,13 @@ export declare class _Photo extends _GraphQueryableInstance<IPhotoType> {
19
19
  export interface IPhoto extends _Photo {
20
20
  }
21
21
  export declare const Photo: import("../graphqueryable.js").IGraphInvokableFactory<IPhoto>;
22
+ export declare class _Photos extends _GraphQueryableCollection<IProfilePhotoType[]> {
23
+ /**
24
+ * Gets the image reference by size. 48x48, 64x64, 96x96, 120x120, 240x240, 360x360, 432x432, 504x504, and 648x648.
25
+ */
26
+ getBySize(size: string): IPhoto;
27
+ }
28
+ export interface IPhotos extends _Photos {
29
+ }
30
+ export declare const Photos: import("../graphqueryable.js").IGraphInvokableFactory<IPhotos>;
22
31
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAyB,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAIvE,qBACa,MAAO,SAAQ,uBAAuB,CAAC,UAAU,CAAC;IAC3D;;OAEG;IACI,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;OAEG;IACI,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC;IAIxC;;;;OAIG;IACI,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAGhE;AACD,MAAM,WAAW,MAAO,SAAQ,MAAM;CAAI;AAC1C,eAAO,MAAM,KAAK,+DAAwC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAyB,MAAM,sBAAsB,CAAC;AAEjH,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAIrF,qBACa,MAAO,SAAQ,uBAAuB,CAAC,iBAAiB,CAAC;IAClE;;OAEG;IACI,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;OAEG;IACI,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC;IAIxC;;;;OAIG;IACI,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAGhE;AACD,MAAM,WAAW,MAAO,SAAQ,MAAM;CAAI;AAC1C,eAAO,MAAM,KAAK,+DAAwC,CAAC;AAE3D,qBACa,OAAQ,SAAQ,yBAAyB,CAAC,iBAAiB,EAAE,CAAC;IACvE;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGzC;AACD,MAAM,WAAW,OAAQ,SAAQ,OAAO;CAAI;AAC5C,eAAO,MAAM,MAAM,gEAA0C,CAAC"}
package/photos/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { _GraphQueryableInstance, graphInvokableFactory } from "../graphqueryable.js";
2
+ import { _GraphQueryableCollection, _GraphQueryableInstance, graphInvokableFactory } from "../graphqueryable.js";
3
3
  import { BlobParse, BufferParse } from "@pnp/queryable";
4
4
  import { defaultPath } from "../decorators.js";
5
5
  import { graphPatch } from "../operations.js";
@@ -30,4 +30,17 @@ _Photo = __decorate([
30
30
  ], _Photo);
31
31
  export { _Photo };
32
32
  export const Photo = graphInvokableFactory(_Photo);
33
+ let _Photos = class _Photos extends _GraphQueryableCollection {
34
+ /**
35
+ * Gets the image reference by size. 48x48, 64x64, 96x96, 120x120, 240x240, 360x360, 432x432, 504x504, and 648x648.
36
+ */
37
+ getBySize(size) {
38
+ return Photo(this, `/${size}`);
39
+ }
40
+ };
41
+ _Photos = __decorate([
42
+ defaultPath("photos")
43
+ ], _Photos);
44
+ export { _Photos };
45
+ export const Photos = graphInvokableFactory(_Photos);
33
46
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/graph/photos/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,IAAa,MAAM,GAAnB,MAAa,MAAO,SAAQ,uBAAmC;IAC3D;;OAEG;IACI,OAAO;QACV,OAAO,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,EAAQ,CAAC;IAC5D,CAAC;IAED;;OAEG;IACI,SAAS;QACZ,OAAO,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAe,CAAC;IACrE,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAC,OAA2B;QACzC,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACJ,CAAA;AAvBY,MAAM;IADlB,WAAW,CAAC,OAAO,CAAC;GACR,MAAM,CAuBlB;SAvBY,MAAM;AAyBnB,MAAM,CAAC,MAAM,KAAK,GAAG,qBAAqB,CAAS,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/graph/photos/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACjH,OA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{
3
3
  interface _User {
4
4
  readonly photo: IPhoto;
5
+ readonly photos: IPhotos;
5
6
  }
6
7
  interface IUser {
7
8
  readonly photo: IPhoto;
9
+ readonly photos: IPhotos;
8
10
  }
9
11
  }
10
12
  //# sourceMappingURL=users.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,QAAQ,gBAAgB,CAAC;IAC5B,UAAU,KAAK;QACX,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KAC1B;IACD,UAAU,KAAK;QACX,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KAC1B;CACJ"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../packages/graph/photos/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,MAAM,EAAE,OAAO,EAAU,MAAM,YAAY,CAAC;AAE5D,OAAO,QAAQ,gBAAgB,CAAC;IAC5B,UAAU,KAAK;QACX,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KAC5B;IACD,UAAU,KAAK;QACX,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KAC5B;CACJ"}
package/photos/users.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { addProp } from "@pnp/queryable";
2
2
  import { _User } from "../users/types.js";
3
- import { Photo } from "./types.js";
3
+ import { Photo, Photos } from "./types.js";
4
4
  addProp(_User, "photo", Photo);
5
+ addProp(_User, "photos", Photos);
5
6
  //# sourceMappingURL=users.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"users.js","sourceRoot":"","sources":["../../../../packages/graph/photos/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAU,MAAM,YAAY,CAAC;AAW3C,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"users.js","sourceRoot":"","sources":["../../../../packages/graph/photos/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAmB,MAAM,EAAE,MAAM,YAAY,CAAC;AAa5D,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC/B,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC"}