@pnp/graph 3.10.0 → 3.11.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.
- package/behaviors/telemetry.js +1 -1
- package/lists/drive.d.ts +13 -0
- package/lists/drive.d.ts.map +1 -0
- package/lists/drive.js +8 -0
- package/lists/drive.js.map +1 -0
- package/lists/index.d.ts +1 -0
- package/lists/index.d.ts.map +1 -1
- package/lists/index.js +1 -0
- package/lists/index.js.map +1 -1
- package/onedrive/funcs.d.ts +9 -0
- package/onedrive/funcs.d.ts.map +1 -0
- package/onedrive/funcs.js +30 -0
- package/onedrive/funcs.js.map +1 -0
- package/onedrive/groups.d.ts +23 -0
- package/onedrive/groups.d.ts.map +1 -0
- package/onedrive/groups.js +9 -0
- package/onedrive/groups.js.map +1 -0
- package/onedrive/index.d.ts +10 -1
- package/onedrive/index.d.ts.map +1 -1
- package/onedrive/index.js +11 -0
- package/onedrive/index.js.map +1 -1
- package/onedrive/sites.d.ts +23 -0
- package/onedrive/sites.d.ts.map +1 -0
- package/onedrive/sites.js +9 -0
- package/onedrive/sites.js.map +1 -0
- package/onedrive/types.d.ts +186 -9
- package/onedrive/types.d.ts.map +1 -1
- package/onedrive/types.js +245 -16
- package/onedrive/types.js.map +1 -1
- package/onedrive/users.d.ts +10 -0
- package/onedrive/users.d.ts.map +1 -1
- package/onedrive/users.js +12 -2
- package/onedrive/users.js.map +1 -1
- package/package.json +4 -4
- package/sites/types.d.ts +6 -0
- package/sites/types.d.ts.map +1 -1
- package/sites/types.js +6 -0
- package/sites/types.js.map +1 -1
package/behaviors/telemetry.js
CHANGED
|
@@ -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.
|
|
4
|
+
init.headers = { ...init.headers, SdkVersion: "PnPCoreJS/3.11.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/lists/drive.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IList } from "./types.js";
|
|
2
|
+
declare module "../onedrive/types" {
|
|
3
|
+
interface _Drive {
|
|
4
|
+
getList: () => Promise<IList>;
|
|
5
|
+
}
|
|
6
|
+
interface IDrive {
|
|
7
|
+
/**
|
|
8
|
+
* Read the attachment files data for an item
|
|
9
|
+
*/
|
|
10
|
+
getList: () => Promise<IList>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=drive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../../packages/graph/lists/drive.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,QAAQ,mBAAmB,CAAC;IAC/B,UAAU,MAAM;QACZ,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC;KACjC;IACD,UAAU,MAAM;QACZ;;WAEG;QACH,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC;KACjC;CACJ"}
|
package/lists/drive.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { _Drive } from "../onedrive/types.js";
|
|
2
|
+
import { List } from "./types.js";
|
|
3
|
+
_Drive.prototype.getList = async function () {
|
|
4
|
+
const q = await this.list();
|
|
5
|
+
const url = `/sites/${q.parentReference.siteId}/lists/${q.id}`;
|
|
6
|
+
return List([this, url]);
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=drive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../../../packages/graph/lists/drive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAS,MAAM,YAAY,CAAC;AAczC,MAAM,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK;IAC5B,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IAE5B,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,eAAe,CAAC,MAAM,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC;IAC/D,OAAO,IAAI,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC"}
|
package/lists/index.d.ts
CHANGED
package/lists/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/graph/lists/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,cAAc,GACjB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/graph/lists/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,cAAc,GACjB,MAAM,YAAY,CAAC"}
|
package/lists/index.js
CHANGED
package/lists/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/graph/lists/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,EAEL,IAAI,GAGP,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/graph/lists/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,EAEL,IAAI,GAGP,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IDriveItemAddResult, IFileOptions } from "./types.js";
|
|
2
|
+
export interface ICheckInOptions {
|
|
3
|
+
checkInAs?: string;
|
|
4
|
+
comment?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function checkIn(checkInOptions?: ICheckInOptions): Promise<void>;
|
|
7
|
+
export declare function checkOut(): Promise<void>;
|
|
8
|
+
export declare function driveItemUpload(fileOptions: IFileOptions): Promise<IDriveItemAddResult>;
|
|
9
|
+
//# sourceMappingURL=funcs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"funcs.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/funcs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,cAAc,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvE;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAExC;AAED,wBAAsB,eAAe,CAAC,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAqB7F"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { combine } from "@pnp/core";
|
|
2
|
+
import { body, InjectHeaders } from "@pnp/queryable";
|
|
3
|
+
import { graphPost, graphPut } from "../operations.js";
|
|
4
|
+
import { DriveItem } from "./types.js";
|
|
5
|
+
export function checkIn(checkInOptions) {
|
|
6
|
+
return graphPost(DriveItem(this, "checkin"), body(checkInOptions));
|
|
7
|
+
}
|
|
8
|
+
export function checkOut() {
|
|
9
|
+
return graphPost(DriveItem(this, "checkout"));
|
|
10
|
+
}
|
|
11
|
+
export async function driveItemUpload(fileOptions) {
|
|
12
|
+
let path = "/content";
|
|
13
|
+
if (fileOptions.filePathName) {
|
|
14
|
+
path = `:/${fileOptions.filePathName}:/content`;
|
|
15
|
+
}
|
|
16
|
+
const q = DriveItem(this, null);
|
|
17
|
+
// This assumes that `this` url doesn't have a trailing '/' which is should not, we'll revisit this if people are reporting issues.
|
|
18
|
+
q.concat(path);
|
|
19
|
+
if (fileOptions.contentType) {
|
|
20
|
+
q.using(InjectHeaders({
|
|
21
|
+
"Content-Type": fileOptions.contentType,
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
const data = await graphPut(q, { body: fileOptions.content });
|
|
25
|
+
return {
|
|
26
|
+
data,
|
|
27
|
+
driveItem: DriveItem([this, `${combine("drives", data.parentReference.driveId, "items", data.id)}`]),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=funcs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"funcs.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/funcs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAqC,MAAM,YAAY,CAAC;AAO1E,MAAM,UAAU,OAAO,CAAC,cAAgC;IACpD,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,QAAQ;IACpB,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,WAAyB;IAC3D,IAAI,IAAI,GAAG,UAAU,CAAC;IACtB,IAAI,WAAW,CAAC,YAAY,EAAE;QAC1B,IAAI,GAAG,KAAK,WAAW,CAAC,YAAY,WAAW,CAAC;KACnD;IACD,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAEhC,mIAAmI;IACnI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACf,IAAI,WAAW,CAAC,WAAW,EAAE;QACzB,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;YAClB,cAAc,EAAE,WAAW,CAAC,WAAW;SAC1C,CAAC,CAAC,CAAC;KACP;IAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAE9D,OAAO;QACH,IAAI;QACJ,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KACvG,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ICheckInOptions } from "./funcs.js";
|
|
2
|
+
import { IDrive, IDrives } from "./types.js";
|
|
3
|
+
declare module "../groups/types" {
|
|
4
|
+
interface _Group {
|
|
5
|
+
readonly drive: IDrive;
|
|
6
|
+
readonly drives: IDrives;
|
|
7
|
+
}
|
|
8
|
+
interface IGroup {
|
|
9
|
+
readonly drive: IDrive;
|
|
10
|
+
readonly drives: IDrives;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
declare module "./types" {
|
|
14
|
+
interface _DriveItem {
|
|
15
|
+
checkIn(checkInOptions?: ICheckInOptions): Promise<void>;
|
|
16
|
+
checkOut(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
interface DriveItem {
|
|
19
|
+
checkIn(checkInOptions?: ICheckInOptions): Promise<void>;
|
|
20
|
+
checkOut(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,eAAe,EAAY,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,MAAM,EAAS,OAAO,EAAsB,MAAM,YAAY,CAAC;AAExE,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;AAKD,OAAO,QAAQ,SAAS,CAAC;IACrB,UAAU,UAAU;QAChB,OAAO,CAAC,cAAc,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACzD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7B;IAED,UAAU,SAAS;QACf,OAAO,CAAC,cAAc,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACzD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7B;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { addProp } from "@pnp/queryable";
|
|
2
|
+
import { _Group } from "../groups/types.js";
|
|
3
|
+
import { checkIn, checkOut } from "./funcs.js";
|
|
4
|
+
import { Drive, Drives, _DriveItem } from "./types.js";
|
|
5
|
+
addProp(_Group, "drive", Drive);
|
|
6
|
+
addProp(_Group, "drives", Drives);
|
|
7
|
+
_DriveItem.prototype.checkIn = checkIn;
|
|
8
|
+
_DriveItem.prototype.checkOut = checkOut;
|
|
9
|
+
//# sourceMappingURL=groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAmB,QAAQ,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAU,KAAK,EAAW,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAaxE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAChC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAclC,UAAU,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AACvC,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
package/onedrive/index.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import "./users.js";
|
|
2
|
+
import "./groups.js";
|
|
3
|
+
import "./sites.js";
|
|
4
|
+
import { IDrives } from "./types.js";
|
|
2
5
|
export { SpecialFolder, } from "./users.js";
|
|
3
|
-
export {
|
|
6
|
+
export { ICheckInOptions, } from "./funcs.js";
|
|
7
|
+
export { Drive, DriveItem, DriveItems, Drives, IDrive, IDriveItem, IDriveItemAddResult, IDriveItemVersionInfo, IDriveItems, IDrives, IRoot, Root, ISharingWithMeOptions, IItemOptions as IItemReferenceOptions, IDeltaItems, IPreviewOptions, IFileOptions, IAnalyticsOptions, } from "./types.js";
|
|
8
|
+
declare module "../fi" {
|
|
9
|
+
interface GraphFI {
|
|
10
|
+
readonly drives: IDrives;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
4
13
|
//# sourceMappingURL=index.d.ts.map
|
package/onedrive/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/index.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,CAAC;AACpB,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,EAAU,OAAO,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EACH,aAAa,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,eAAe,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,EACL,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAI,EACJ,qBAAqB,EACrB,YAAY,IAAI,qBAAqB,EACrC,WAAW,EACX,eAAe,EACf,YAAY,EACZ,iBAAiB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,QAAQ,OAAO,CAAC;IACnB,UAAU,OAAO;QACb,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KAC5B;CACJ"}
|
package/onedrive/index.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
import { GraphFI } from "../fi.js";
|
|
1
2
|
import "./users.js";
|
|
3
|
+
import "./groups.js";
|
|
4
|
+
import "./sites.js";
|
|
5
|
+
import { Drives } from "./types.js";
|
|
2
6
|
export { SpecialFolder, } from "./users.js";
|
|
3
7
|
export { Drive, DriveItem, DriveItems, Drives, Root, } from "./types.js";
|
|
8
|
+
Reflect.defineProperty(GraphFI.prototype, "drives", {
|
|
9
|
+
configurable: true,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return this.create(Drives);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
4
15
|
//# sourceMappingURL=index.js.map
|
package/onedrive/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,YAAY,CAAC;AACpB,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAW,MAAM,YAAY,CAAC;AAE7C,OAAO,EACH,aAAa,GAChB,MAAM,YAAY,CAAC;AAMpB,OAAO,EACH,KAAK,EACL,SAAS,EACT,UAAU,EACV,MAAM,EAQN,IAAI,GAOP,MAAM,YAAY,CAAC;AAQpB,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE;IAChD,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,IAAI;IAChB,GAAG,EAAE;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IDrive, IDrives } from "./types.js";
|
|
2
|
+
import { ICheckInOptions } from "./funcs.js";
|
|
3
|
+
declare module "../sites/types" {
|
|
4
|
+
interface _Site {
|
|
5
|
+
readonly drive: IDrive;
|
|
6
|
+
readonly drives: IDrives;
|
|
7
|
+
}
|
|
8
|
+
interface ISite {
|
|
9
|
+
readonly drive: IDrive;
|
|
10
|
+
readonly drives: IDrives;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
declare module "./types" {
|
|
14
|
+
interface _DriveItem {
|
|
15
|
+
checkIn(checkInOptions?: ICheckInOptions): Promise<void>;
|
|
16
|
+
checkOut(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
interface DriveItem {
|
|
19
|
+
checkIn(checkInOptions?: ICheckInOptions): Promise<void>;
|
|
20
|
+
checkOut(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=sites.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/sites.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAS,OAAO,EAAsB,MAAM,YAAY,CAAC;AACxE,OAAO,EAAW,eAAe,EAAY,MAAM,YAAY,CAAC;AAGhE,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;AAMD,OAAO,QAAQ,SAAS,CAAC;IACrB,UAAU,UAAU;QAChB,OAAO,CAAC,cAAc,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACzD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7B;IAED,UAAU,SAAS;QACf,OAAO,CAAC,cAAc,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACzD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7B;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { addProp } from "@pnp/queryable";
|
|
2
|
+
import { _Site } from "../sites/types.js";
|
|
3
|
+
import { Drive, Drives, _DriveItem } from "./types.js";
|
|
4
|
+
import { checkIn, checkOut } from "./funcs.js";
|
|
5
|
+
addProp(_Site, "drive", Drive);
|
|
6
|
+
addProp(_Site, "drives", Drives);
|
|
7
|
+
_DriveItem.prototype.checkIn = checkIn;
|
|
8
|
+
_DriveItem.prototype.checkOut = checkOut;
|
|
9
|
+
//# sourceMappingURL=sites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAU,KAAK,EAAW,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,OAAO,EAAmB,QAAQ,EAAE,MAAM,YAAY,CAAC;AAchE,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC/B,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAejC,UAAU,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AACvC,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
package/onedrive/types.d.ts
CHANGED
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
import { _GraphQueryableInstance, IGraphQueryableInstance, IGraphQueryableCollection, _GraphQueryableCollection } from "../graphqueryable.js";
|
|
2
|
-
import { Drive as IDriveType } from "@microsoft/microsoft-graph-types";
|
|
2
|
+
import { Drive as IDriveType, DriveItem as IDriveItemType, ItemPreviewInfo as IDriveItemPreviewInfo, ItemAnalytics as IItemAnalytics } from "@microsoft/microsoft-graph-types";
|
|
3
3
|
import { IGetById, IDeleteable, IUpdateable } from "../decorators.js";
|
|
4
4
|
/**
|
|
5
5
|
* Describes a Drive instance
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
export declare class _Drive extends _GraphQueryableInstance<IDriveType> {
|
|
9
|
+
/**
|
|
10
|
+
* Method for retrieving the root folder of a drive.
|
|
11
|
+
* @returns IRoot
|
|
12
|
+
*/
|
|
9
13
|
get root(): IRoot;
|
|
14
|
+
/**
|
|
15
|
+
* Method for retrieving the related list resource, for use with SharePoint drives.
|
|
16
|
+
* @returns IGraphQueryableInstance
|
|
17
|
+
*/
|
|
10
18
|
get list(): IGraphQueryableInstance;
|
|
19
|
+
/**
|
|
20
|
+
* Method for retrieving recently accessed drive items by the user.
|
|
21
|
+
* @returns IDriveItems
|
|
22
|
+
*/
|
|
11
23
|
get recent(): IDriveItems;
|
|
24
|
+
/**
|
|
25
|
+
* Method for retrieving drive items shared with the user.
|
|
26
|
+
* @param options - ISharingWithMeOptions (Optional)
|
|
27
|
+
* @returns IDriveItems
|
|
28
|
+
*/
|
|
12
29
|
sharedWithMe(options?: ISharingWithMeOptions): Promise<IDriveItems>;
|
|
30
|
+
/**
|
|
31
|
+
* Method for retrieving a drive item by id.
|
|
32
|
+
* @param id - string - the drive item id to retrieve
|
|
33
|
+
* @returns IDriveItem
|
|
34
|
+
*/
|
|
13
35
|
getItemById(id: string): IDriveItem;
|
|
36
|
+
/**
|
|
37
|
+
* Method for retrieving drive items the user is following.
|
|
38
|
+
* @returns IDriveItems
|
|
39
|
+
*/
|
|
14
40
|
get following(): IDriveItems;
|
|
41
|
+
/**
|
|
42
|
+
* Get DriveItems by Path
|
|
43
|
+
* @param path string, partial path to folder must not contain a leading or trailing "/" e.g. folderA/folderB/folderC
|
|
44
|
+
* @returns IDriveItems
|
|
45
|
+
*/
|
|
46
|
+
getItemsByPath(path: string): IDriveItems;
|
|
47
|
+
/**
|
|
48
|
+
* Get DriveItem by Path
|
|
49
|
+
* @param path string, partial path to folder must not contain a leading or trailing "/" e.g. folderA/folderB/fileName.txt
|
|
50
|
+
* @returns IDriveItems
|
|
51
|
+
*/
|
|
52
|
+
getItemByPath(path: string): IDriveItem;
|
|
15
53
|
}
|
|
16
54
|
export interface IDrive extends _Drive {
|
|
17
55
|
}
|
|
@@ -29,10 +67,47 @@ export declare const Drives: import("../graphqueryable.js").IGraphInvokableFacto
|
|
|
29
67
|
* Describes a Root instance
|
|
30
68
|
*
|
|
31
69
|
*/
|
|
32
|
-
export declare class _Root extends _GraphQueryableInstance<
|
|
70
|
+
export declare class _Root extends _GraphQueryableInstance<IDriveItemType> {
|
|
71
|
+
/**
|
|
72
|
+
* Method for retrieving children of a folder drive item.
|
|
73
|
+
* @returns IDriveItems
|
|
74
|
+
*/
|
|
33
75
|
get children(): IDriveItems;
|
|
76
|
+
/**
|
|
77
|
+
* Search drive for items matching the query
|
|
78
|
+
* @param query string, search parameter
|
|
79
|
+
* @returns IGraphQueryableCollection
|
|
80
|
+
*/
|
|
34
81
|
search(query: string): IGraphQueryableCollection;
|
|
82
|
+
/**
|
|
83
|
+
* Method for retrieving thumbnails of the drive items.
|
|
84
|
+
* @returns IGraphQueryableCollection
|
|
85
|
+
*/
|
|
35
86
|
get thumbnails(): IGraphQueryableCollection;
|
|
87
|
+
/**
|
|
88
|
+
* Get changes since optional change token
|
|
89
|
+
* @param token - string (Optional)
|
|
90
|
+
* change token
|
|
91
|
+
* @returns IDeltaItems
|
|
92
|
+
*/
|
|
93
|
+
delta(token?: string): IGraphQueryableCollection<IDeltaItems>;
|
|
94
|
+
/**
|
|
95
|
+
* Method for uploading a new file, or updating the contents of an existing file.
|
|
96
|
+
* @param fileOptions - IFileOptions
|
|
97
|
+
* @param content - any
|
|
98
|
+
* @param filePathName - string (Optional)
|
|
99
|
+
* e.g. myfile.txt or myfolder/myfile.txt, unneeded for updates
|
|
100
|
+
* @param contentType - string (Optional)
|
|
101
|
+
* e.g. "application/json; charset=utf-8" for JSON files
|
|
102
|
+
* @returns IDriveItem
|
|
103
|
+
*/
|
|
104
|
+
upload(fileOptions: IFileOptions): Promise<IDriveItemAddResult>;
|
|
105
|
+
/**
|
|
106
|
+
* Method for getting item analytics. Defaults to lastSevenDays.
|
|
107
|
+
* @param analyticsOptions - IAnalyticsOptions (Optional)
|
|
108
|
+
* @returns IGraphQueryableCollection<IItemAnalytics>
|
|
109
|
+
*/
|
|
110
|
+
analytics(analyticsOptions?: IAnalyticsOptions): IGraphQueryableCollection<IItemAnalytics>;
|
|
36
111
|
}
|
|
37
112
|
export interface IRoot extends _Root {
|
|
38
113
|
}
|
|
@@ -41,19 +116,88 @@ export declare const Root: import("../graphqueryable.js").IGraphInvokableFactory
|
|
|
41
116
|
* Describes a Drive Item instance
|
|
42
117
|
*
|
|
43
118
|
*/
|
|
44
|
-
export declare class _DriveItem extends _GraphQueryableInstance<
|
|
119
|
+
export declare class _DriveItem extends _GraphQueryableInstance<IDriveItemType> {
|
|
120
|
+
/**
|
|
121
|
+
* Method for retrieving children of a folder drive item.
|
|
122
|
+
* @returns IDriveItems
|
|
123
|
+
*/
|
|
45
124
|
get children(): IDriveItems;
|
|
125
|
+
/**
|
|
126
|
+
* Method for retrieving thumbnails of the drive items.
|
|
127
|
+
* @returns IGraphQueryableCollection
|
|
128
|
+
*/
|
|
46
129
|
get thumbnails(): IGraphQueryableCollection;
|
|
130
|
+
/**
|
|
131
|
+
* Method for retrieving the versions of a drive item.
|
|
132
|
+
* @returns IDriveItemVersionInfo
|
|
133
|
+
*/
|
|
47
134
|
get versions(): IGraphQueryableCollection<IDriveItemVersionInfo>;
|
|
135
|
+
/**
|
|
136
|
+
* Method for moving a drive item
|
|
137
|
+
* @param parentReference - { id: string} - reference to destination folder drive item
|
|
138
|
+
* @param name - string - name of the file in the destination
|
|
139
|
+
* @deprecated (v3.11.0) use `moveItem`
|
|
140
|
+
*/
|
|
48
141
|
move(parentReference: {
|
|
49
142
|
id: "string";
|
|
50
143
|
}, name: string): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Method for moving a file to a new location and/or name.
|
|
146
|
+
* @param moveOptions - IItemOptions object
|
|
147
|
+
* @returns string - the URL where the new file is located
|
|
148
|
+
*/
|
|
149
|
+
moveItem(moveOptions: IItemOptions): Promise<IDriveItem>;
|
|
150
|
+
/**
|
|
151
|
+
* Method for retrieving the contents of a drive item.
|
|
152
|
+
* @returns Blob
|
|
153
|
+
*/
|
|
51
154
|
getContent(): Promise<Blob>;
|
|
155
|
+
/**
|
|
156
|
+
* Method for setting the contents of a IDriveItem
|
|
157
|
+
* @param content - any - content to upload to the drive item
|
|
158
|
+
* @returns - { id: string; name: string; size: number }
|
|
159
|
+
* @deprecated (v3.11.0) use `upload`
|
|
160
|
+
*/
|
|
52
161
|
setContent(content: any): Promise<{
|
|
53
162
|
id: string;
|
|
54
163
|
name: string;
|
|
55
164
|
size: number;
|
|
56
165
|
}>;
|
|
166
|
+
/**
|
|
167
|
+
* Method for copying a file to a new location and/or name.
|
|
168
|
+
* @param copyOptions - IItemOptions
|
|
169
|
+
* @returns string, the URL where the new file is located
|
|
170
|
+
*/
|
|
171
|
+
copyItem(copyOptions: IItemOptions): Promise<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Method for converting the format of a drive item.
|
|
174
|
+
* @param format - string - "pdf" is only option
|
|
175
|
+
* @returns Blob - content of the converted file
|
|
176
|
+
*/
|
|
177
|
+
convertContent(format: "pdf"): Promise<Blob>;
|
|
178
|
+
/**
|
|
179
|
+
* Method for uploading a new file, or updating the contents of an existing file.
|
|
180
|
+
* @param fileOptions - IFileOptions object
|
|
181
|
+
* @param content - any
|
|
182
|
+
* @param filePathName - string (Optional)
|
|
183
|
+
* e.g. myfile.txt or myfolder/myfile.txt, unneeded for updates
|
|
184
|
+
* @param contentType - string (Optional)
|
|
185
|
+
* e.g. "application/json; charset=utf-8" for JSON files
|
|
186
|
+
* @returns IDriveItem
|
|
187
|
+
*/
|
|
188
|
+
upload(fileOptions: IFileOptions): Promise<IDriveItemAddResult>;
|
|
189
|
+
/**
|
|
190
|
+
* Method for getting a temporary preview image of a drive item.
|
|
191
|
+
* @param previewOptions - IPreviewOptions (Optional)
|
|
192
|
+
* @returns IDriveItemPreviewInfo
|
|
193
|
+
*/
|
|
194
|
+
preview(previewOptions?: IPreviewOptions): Promise<IDriveItemPreviewInfo>;
|
|
195
|
+
/**
|
|
196
|
+
* Method for getting item analytics. Defaults to lastSevenDays.
|
|
197
|
+
* @param analyticsOptions - IAnalyticsOptions (Optional)
|
|
198
|
+
* @returns IGraphQueryableCollection<IItemAnalytics>
|
|
199
|
+
*/
|
|
200
|
+
analytics(analyticsOptions?: IAnalyticsOptions): IGraphQueryableCollection<IItemAnalytics>;
|
|
57
201
|
}
|
|
58
202
|
export interface IDriveItem extends _DriveItem, IDeleteable, IUpdateable {
|
|
59
203
|
}
|
|
@@ -62,14 +206,23 @@ export declare const DriveItem: import("../graphqueryable.js").IGraphInvokableFa
|
|
|
62
206
|
* Describes a collection of Drive Item objects
|
|
63
207
|
*
|
|
64
208
|
*/
|
|
65
|
-
export declare class _DriveItems extends _GraphQueryableCollection {
|
|
66
|
-
add(filename: string, content: string): Promise<IDriveItemAddResult>;
|
|
209
|
+
export declare class _DriveItems extends _GraphQueryableCollection<IDriveItemType[]> {
|
|
67
210
|
/**
|
|
68
|
-
* Adds a
|
|
69
|
-
*
|
|
70
|
-
* @
|
|
211
|
+
* Adds a file to this collection of drive items.
|
|
212
|
+
* For more upload options please see the .upload method on DriveItem and Root.
|
|
213
|
+
* @param filename - string - name of new file
|
|
214
|
+
* @param content - string - contents of file
|
|
215
|
+
* @param contentType - string - content type for header - default to "application/json"
|
|
216
|
+
* @returns IDriveItemAddResult - result with file data and chainable drive item object
|
|
71
217
|
*/
|
|
72
|
-
|
|
218
|
+
add(filename: string, content: string, contentType?: string): Promise<IDriveItemAddResult>;
|
|
219
|
+
/**
|
|
220
|
+
* Adds a folder to this collection of drive items.
|
|
221
|
+
* @param name - string, name of new folder
|
|
222
|
+
* @param driveItem - DriveItem (Optional) - override default drive item properties
|
|
223
|
+
* @returns IDriveItemAddResult - result with folder data and chainable drive item object
|
|
224
|
+
*/
|
|
225
|
+
addFolder(name: string, driveItem?: any): Promise<IDriveItemAddResult>;
|
|
73
226
|
}
|
|
74
227
|
export interface IDriveItems extends _DriveItems, IGetById<IDriveItem> {
|
|
75
228
|
}
|
|
@@ -95,4 +248,28 @@ export interface IDriveItemVersionInfo {
|
|
|
95
248
|
export interface ISharingWithMeOptions {
|
|
96
249
|
allowExternal: boolean;
|
|
97
250
|
}
|
|
251
|
+
export interface IItemOptions {
|
|
252
|
+
parentReference?: {
|
|
253
|
+
id?: string;
|
|
254
|
+
driveId?: string;
|
|
255
|
+
};
|
|
256
|
+
name?: string;
|
|
257
|
+
}
|
|
258
|
+
export interface IFileOptions {
|
|
259
|
+
content: any;
|
|
260
|
+
filePathName?: string;
|
|
261
|
+
contentType?: string;
|
|
262
|
+
}
|
|
263
|
+
export interface IPreviewOptions {
|
|
264
|
+
page?: string | number;
|
|
265
|
+
zoom?: number;
|
|
266
|
+
}
|
|
267
|
+
export interface IDeltaItems {
|
|
268
|
+
next: IGraphQueryableCollection<IDeltaItems>;
|
|
269
|
+
delta: IGraphQueryableCollection<IDeltaItems>;
|
|
270
|
+
values: any[];
|
|
271
|
+
}
|
|
272
|
+
export interface IAnalyticsOptions {
|
|
273
|
+
timeRange: "allTime" | "lastSevenDays";
|
|
274
|
+
}
|
|
98
275
|
//# sourceMappingURL=types.d.ts.map
|
package/onedrive/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EAG5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EAG5B,MAAM,sBA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W,qBAAqB;IAClC,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IACzB,eAAe,CAAC,EAAE;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC;IAC7C,KAAK,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,EAAE,GAAG,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAC9B,SAAS,EAAE,SAAS,GAAG,eAAe,CAAC;CAC1C"}
|
package/onedrive/types.js
CHANGED
|
@@ -1,24 +1,42 @@
|
|
|
1
|
-
var _DriveItems_1;
|
|
2
1
|
import { __decorate } from "tslib";
|
|
3
2
|
import { GraphQueryableInstance, GraphQueryableCollection, _GraphQueryableInstance, _GraphQueryableCollection, graphInvokableFactory, GraphQueryable, } from "../graphqueryable.js";
|
|
4
3
|
import { combine } from "@pnp/core";
|
|
5
4
|
import { defaultPath, getById, deleteable, updateable } from "../decorators.js";
|
|
6
|
-
import { body, BlobParse, CacheNever } from "@pnp/queryable";
|
|
5
|
+
import { body, BlobParse, CacheNever, errorCheck, InjectHeaders } from "@pnp/queryable";
|
|
7
6
|
import { graphPatch, graphPost, graphPut } from "../operations.js";
|
|
7
|
+
import { driveItemUpload } from "./funcs.js";
|
|
8
|
+
import { AsPaged } from "../behaviors/paged.js";
|
|
8
9
|
/**
|
|
9
10
|
* Describes a Drive instance
|
|
10
11
|
*
|
|
11
12
|
*/
|
|
12
13
|
let _Drive = class _Drive extends _GraphQueryableInstance {
|
|
14
|
+
/**
|
|
15
|
+
* Method for retrieving the root folder of a drive.
|
|
16
|
+
* @returns IRoot
|
|
17
|
+
*/
|
|
13
18
|
get root() {
|
|
14
19
|
return Root(this);
|
|
15
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Method for retrieving the related list resource, for use with SharePoint drives.
|
|
23
|
+
* @returns IGraphQueryableInstance
|
|
24
|
+
*/
|
|
16
25
|
get list() {
|
|
17
26
|
return GraphQueryableInstance(this, "list");
|
|
18
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Method for retrieving recently accessed drive items by the user.
|
|
30
|
+
* @returns IDriveItems
|
|
31
|
+
*/
|
|
19
32
|
get recent() {
|
|
20
33
|
return DriveItems(this, "recent");
|
|
21
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Method for retrieving drive items shared with the user.
|
|
37
|
+
* @param options - ISharingWithMeOptions (Optional)
|
|
38
|
+
* @returns IDriveItems
|
|
39
|
+
*/
|
|
22
40
|
async sharedWithMe(options = null) {
|
|
23
41
|
const q = DriveItems(this, "sharedWithMe");
|
|
24
42
|
if ((options === null || options === void 0 ? void 0 : options.allowExternal) != null) {
|
|
@@ -26,12 +44,37 @@ let _Drive = class _Drive extends _GraphQueryableInstance {
|
|
|
26
44
|
}
|
|
27
45
|
return q();
|
|
28
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Method for retrieving a drive item by id.
|
|
49
|
+
* @param id - string - the drive item id to retrieve
|
|
50
|
+
* @returns IDriveItem
|
|
51
|
+
*/
|
|
29
52
|
getItemById(id) {
|
|
30
53
|
return DriveItem(this, combine("items", id));
|
|
31
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Method for retrieving drive items the user is following.
|
|
57
|
+
* @returns IDriveItems
|
|
58
|
+
*/
|
|
32
59
|
get following() {
|
|
33
60
|
return DriveItems(this, "following");
|
|
34
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Get DriveItems by Path
|
|
64
|
+
* @param path string, partial path to folder must not contain a leading or trailing "/" e.g. folderA/folderB/folderC
|
|
65
|
+
* @returns IDriveItems
|
|
66
|
+
*/
|
|
67
|
+
getItemsByPath(path) {
|
|
68
|
+
return DriveItems(this, combine("root:/", `${path}:/children`));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get DriveItem by Path
|
|
72
|
+
* @param path string, partial path to folder must not contain a leading or trailing "/" e.g. folderA/folderB/fileName.txt
|
|
73
|
+
* @returns IDriveItems
|
|
74
|
+
*/
|
|
75
|
+
getItemByPath(path) {
|
|
76
|
+
return DriveItem(this, combine("root:/", `${path}:`));
|
|
77
|
+
}
|
|
35
78
|
};
|
|
36
79
|
_Drive = __decorate([
|
|
37
80
|
defaultPath("drive")
|
|
@@ -55,15 +98,73 @@ export const Drives = graphInvokableFactory(_Drives);
|
|
|
55
98
|
*
|
|
56
99
|
*/
|
|
57
100
|
let _Root = class _Root extends _GraphQueryableInstance {
|
|
101
|
+
/**
|
|
102
|
+
* Method for retrieving children of a folder drive item.
|
|
103
|
+
* @returns IDriveItems
|
|
104
|
+
*/
|
|
58
105
|
get children() {
|
|
59
106
|
return DriveItems(this, "children");
|
|
60
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Search drive for items matching the query
|
|
110
|
+
* @param query string, search parameter
|
|
111
|
+
* @returns IGraphQueryableCollection
|
|
112
|
+
*/
|
|
61
113
|
search(query) {
|
|
62
114
|
return GraphQueryableCollection(this, `search(q='${query}')`);
|
|
63
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Method for retrieving thumbnails of the drive items.
|
|
118
|
+
* @returns IGraphQueryableCollection
|
|
119
|
+
*/
|
|
64
120
|
get thumbnails() {
|
|
65
121
|
return GraphQueryableCollection(this, "thumbnails");
|
|
66
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Get changes since optional change token
|
|
125
|
+
* @param token - string (Optional)
|
|
126
|
+
* change token
|
|
127
|
+
* @returns IDeltaItems
|
|
128
|
+
*/
|
|
129
|
+
delta(token) {
|
|
130
|
+
const path = `delta${(token) ? `(token=${token})` : ""}`;
|
|
131
|
+
const query = GraphQueryableCollection(this, path);
|
|
132
|
+
query.on.parse.replace(errorCheck);
|
|
133
|
+
query.on.parse(async (url, response, result) => {
|
|
134
|
+
const json = await response.json();
|
|
135
|
+
const nextLink = json["@odata.nextLink"];
|
|
136
|
+
const deltaLink = json["@odata.deltaLink"];
|
|
137
|
+
result = {
|
|
138
|
+
next: () => (nextLink ? AsPaged(GraphQueryableCollection([this, nextLink]))() : null),
|
|
139
|
+
delta: () => (deltaLink ? GraphQueryableCollection([query, deltaLink])() : null),
|
|
140
|
+
values: json.value,
|
|
141
|
+
};
|
|
142
|
+
return [url, response, result];
|
|
143
|
+
});
|
|
144
|
+
return query;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Method for uploading a new file, or updating the contents of an existing file.
|
|
148
|
+
* @param fileOptions - IFileOptions
|
|
149
|
+
* @param content - any
|
|
150
|
+
* @param filePathName - string (Optional)
|
|
151
|
+
* e.g. myfile.txt or myfolder/myfile.txt, unneeded for updates
|
|
152
|
+
* @param contentType - string (Optional)
|
|
153
|
+
* e.g. "application/json; charset=utf-8" for JSON files
|
|
154
|
+
* @returns IDriveItem
|
|
155
|
+
*/
|
|
156
|
+
async upload(fileOptions) {
|
|
157
|
+
return Reflect.apply(driveItemUpload, this, [fileOptions]);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Method for getting item analytics. Defaults to lastSevenDays.
|
|
161
|
+
* @param analyticsOptions - IAnalyticsOptions (Optional)
|
|
162
|
+
* @returns IGraphQueryableCollection<IItemAnalytics>
|
|
163
|
+
*/
|
|
164
|
+
analytics(analyticsOptions) {
|
|
165
|
+
const query = `analytics/${analyticsOptions ? analyticsOptions.timeRange : "lastSevenDays"}`;
|
|
166
|
+
return GraphQueryableCollection(this, query);
|
|
167
|
+
}
|
|
67
168
|
};
|
|
68
169
|
_Root = __decorate([
|
|
69
170
|
defaultPath("root")
|
|
@@ -75,18 +176,48 @@ export const Root = graphInvokableFactory(_Root);
|
|
|
75
176
|
*
|
|
76
177
|
*/
|
|
77
178
|
let _DriveItem = class _DriveItem extends _GraphQueryableInstance {
|
|
179
|
+
/**
|
|
180
|
+
* Method for retrieving children of a folder drive item.
|
|
181
|
+
* @returns IDriveItems
|
|
182
|
+
*/
|
|
78
183
|
get children() {
|
|
79
184
|
return DriveItems(this, "children");
|
|
80
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Method for retrieving thumbnails of the drive items.
|
|
188
|
+
* @returns IGraphQueryableCollection
|
|
189
|
+
*/
|
|
81
190
|
get thumbnails() {
|
|
82
191
|
return GraphQueryableCollection(this, "thumbnails");
|
|
83
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Method for retrieving the versions of a drive item.
|
|
195
|
+
* @returns IDriveItemVersionInfo
|
|
196
|
+
*/
|
|
84
197
|
get versions() {
|
|
85
198
|
return GraphQueryableCollection(this, "versions");
|
|
86
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Method for moving a drive item
|
|
202
|
+
* @param parentReference - { id: string} - reference to destination folder drive item
|
|
203
|
+
* @param name - string - name of the file in the destination
|
|
204
|
+
* @deprecated (v3.11.0) use `moveItem`
|
|
205
|
+
*/
|
|
87
206
|
move(parentReference, name) {
|
|
88
207
|
return graphPatch(this, body({ name, ...parentReference }));
|
|
89
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Method for moving a file to a new location and/or name.
|
|
211
|
+
* @param moveOptions - IItemOptions object
|
|
212
|
+
* @returns string - the URL where the new file is located
|
|
213
|
+
*/
|
|
214
|
+
async moveItem(moveOptions) {
|
|
215
|
+
return graphPatch(this, body(moveOptions));
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Method for retrieving the contents of a drive item.
|
|
219
|
+
* @returns Blob
|
|
220
|
+
*/
|
|
90
221
|
async getContent() {
|
|
91
222
|
const info = await this();
|
|
92
223
|
const query = GraphQueryable([this, info["@microsoft.graph.downloadUrl"]], null)
|
|
@@ -98,11 +229,85 @@ let _DriveItem = class _DriveItem extends _GraphQueryableInstance {
|
|
|
98
229
|
});
|
|
99
230
|
return query();
|
|
100
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Method for setting the contents of a IDriveItem
|
|
234
|
+
* @param content - any - content to upload to the drive item
|
|
235
|
+
* @returns - { id: string; name: string; size: number }
|
|
236
|
+
* @deprecated (v3.11.0) use `upload`
|
|
237
|
+
*/
|
|
101
238
|
setContent(content) {
|
|
102
239
|
return graphPut(DriveItem(this, "content"), {
|
|
103
240
|
body: content,
|
|
104
241
|
});
|
|
105
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Method for copying a file to a new location and/or name.
|
|
245
|
+
* @param copyOptions - IItemOptions
|
|
246
|
+
* @returns string, the URL where the new file is located
|
|
247
|
+
*/
|
|
248
|
+
async copyItem(copyOptions) {
|
|
249
|
+
const creator = DriveItem(this, "copy").using((instance) => {
|
|
250
|
+
instance.on.parse(async (url, response, result) => {
|
|
251
|
+
result = response.headers.has("location") ? response.headers : response;
|
|
252
|
+
return [url, response, result];
|
|
253
|
+
});
|
|
254
|
+
return instance;
|
|
255
|
+
});
|
|
256
|
+
const data = await graphPost(creator, body(copyOptions));
|
|
257
|
+
let result = null;
|
|
258
|
+
if (data.has("location")) {
|
|
259
|
+
result = data.get("location");
|
|
260
|
+
}
|
|
261
|
+
return result;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Method for converting the format of a drive item.
|
|
265
|
+
* @param format - string - "pdf" is only option
|
|
266
|
+
* @returns Blob - content of the converted file
|
|
267
|
+
*/
|
|
268
|
+
async convertContent(format) {
|
|
269
|
+
const query = GraphQueryable(this, `content?format=${format}`)
|
|
270
|
+
.using(BlobParse())
|
|
271
|
+
.using(CacheNever());
|
|
272
|
+
query.on.pre(async (url, init, result) => {
|
|
273
|
+
init.responseType = "arraybuffer";
|
|
274
|
+
return [url, init, result];
|
|
275
|
+
});
|
|
276
|
+
return query();
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Method for uploading a new file, or updating the contents of an existing file.
|
|
280
|
+
* @param fileOptions - IFileOptions object
|
|
281
|
+
* @param content - any
|
|
282
|
+
* @param filePathName - string (Optional)
|
|
283
|
+
* e.g. myfile.txt or myfolder/myfile.txt, unneeded for updates
|
|
284
|
+
* @param contentType - string (Optional)
|
|
285
|
+
* e.g. "application/json; charset=utf-8" for JSON files
|
|
286
|
+
* @returns IDriveItem
|
|
287
|
+
*/
|
|
288
|
+
async upload(fileOptions) {
|
|
289
|
+
return Reflect.apply(driveItemUpload, this, [fileOptions]);
|
|
290
|
+
}
|
|
291
|
+
// TODO: Upload Session for large files
|
|
292
|
+
// public uploadSession(fileOptions: IFileOptions): Promise<void> {
|
|
293
|
+
// }
|
|
294
|
+
/**
|
|
295
|
+
* Method for getting a temporary preview image of a drive item.
|
|
296
|
+
* @param previewOptions - IPreviewOptions (Optional)
|
|
297
|
+
* @returns IDriveItemPreviewInfo
|
|
298
|
+
*/
|
|
299
|
+
async preview(previewOptions) {
|
|
300
|
+
return graphPost(DriveItem(this, "preview"), body(previewOptions));
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Method for getting item analytics. Defaults to lastSevenDays.
|
|
304
|
+
* @param analyticsOptions - IAnalyticsOptions (Optional)
|
|
305
|
+
* @returns IGraphQueryableCollection<IItemAnalytics>
|
|
306
|
+
*/
|
|
307
|
+
analytics(analyticsOptions) {
|
|
308
|
+
const query = `analytics/${analyticsOptions ? analyticsOptions.timeRange : "lastSevenDays"}`;
|
|
309
|
+
return GraphQueryableCollection(this, query);
|
|
310
|
+
}
|
|
106
311
|
};
|
|
107
312
|
_DriveItem = __decorate([
|
|
108
313
|
deleteable(),
|
|
@@ -114,29 +319,53 @@ export const DriveItem = graphInvokableFactory(_DriveItem);
|
|
|
114
319
|
* Describes a collection of Drive Item objects
|
|
115
320
|
*
|
|
116
321
|
*/
|
|
117
|
-
let _DriveItems =
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
322
|
+
let _DriveItems = class _DriveItems extends _GraphQueryableCollection {
|
|
323
|
+
/**
|
|
324
|
+
* Adds a file to this collection of drive items.
|
|
325
|
+
* For more upload options please see the .upload method on DriveItem and Root.
|
|
326
|
+
* @param filename - string - name of new file
|
|
327
|
+
* @param content - string - contents of file
|
|
328
|
+
* @param contentType - string - content type for header - default to "application/json"
|
|
329
|
+
* @returns IDriveItemAddResult - result with file data and chainable drive item object
|
|
330
|
+
*/
|
|
331
|
+
async add(filename, content, contentType = "application/json") {
|
|
332
|
+
const postBody = {
|
|
333
|
+
name: filename,
|
|
334
|
+
file: {},
|
|
335
|
+
"@microsoft.graph.conflictBehavior": "rename",
|
|
336
|
+
};
|
|
337
|
+
const driveItem = await graphPost(this, body(postBody));
|
|
338
|
+
const q = DriveItem([this, `${combine("drives", driveItem.parentReference.driveId, "items", driveItem.id)}`], "content");
|
|
339
|
+
q.using(InjectHeaders({
|
|
340
|
+
"Content-Type": contentType,
|
|
341
|
+
}));
|
|
342
|
+
const data = await graphPut(q, { body: content });
|
|
124
343
|
return {
|
|
125
344
|
data,
|
|
126
|
-
driveItem: DriveItem([this, `${combine("drives",
|
|
345
|
+
driveItem: DriveItem([this, `${combine("drives", driveItem.parentReference.driveId, "items", driveItem.id)}`]),
|
|
127
346
|
};
|
|
128
347
|
}
|
|
129
348
|
/**
|
|
130
|
-
* Adds a folder to this collection of drive items
|
|
131
|
-
* @param name
|
|
132
|
-
* @
|
|
349
|
+
* Adds a folder to this collection of drive items.
|
|
350
|
+
* @param name - string, name of new folder
|
|
351
|
+
* @param driveItem - DriveItem (Optional) - override default drive item properties
|
|
352
|
+
* @returns IDriveItemAddResult - result with folder data and chainable drive item object
|
|
133
353
|
*/
|
|
134
|
-
async addFolder(name) {
|
|
135
|
-
|
|
354
|
+
async addFolder(name, driveItem) {
|
|
355
|
+
let postBody = {
|
|
136
356
|
name,
|
|
137
357
|
folder: {},
|
|
138
358
|
"@microsoft.graph.conflictBehavior": "rename",
|
|
139
359
|
};
|
|
360
|
+
if (driveItem) {
|
|
361
|
+
if (driveItem.name == null) {
|
|
362
|
+
driveItem.name = name;
|
|
363
|
+
}
|
|
364
|
+
if (driveItem["@microsoft.graph.conflictBehavior"] == null) {
|
|
365
|
+
driveItem["@microsoft.graph.conflictBehavior"] = "rename";
|
|
366
|
+
}
|
|
367
|
+
postBody = driveItem;
|
|
368
|
+
}
|
|
140
369
|
const data = await graphPost(this, body(postBody));
|
|
141
370
|
return {
|
|
142
371
|
data,
|
|
@@ -144,7 +373,7 @@ let _DriveItems = _DriveItems_1 = class _DriveItems extends _GraphQueryableColle
|
|
|
144
373
|
};
|
|
145
374
|
}
|
|
146
375
|
};
|
|
147
|
-
_DriveItems =
|
|
376
|
+
_DriveItems = __decorate([
|
|
148
377
|
getById(DriveItem)
|
|
149
378
|
], _DriveItems);
|
|
150
379
|
export { _DriveItems };
|
package/onedrive/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/types.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EAGvB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,GACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAY,UAAU,EAAe,UAAU,EAAe,MAAM,kBAAkB,CAAC;AACpH,OAAO,EAAE,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AAmC,CAAC,IAAI,IAAI,EAAE;gBACxD,SAAS,CAAC,mCAAmC,CAAC,GAAG,QAAQ,CAAC;aAC7D;YACD,QAAQ,GAAG,SAAS,CAAC;SACxB;QACD,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEnD,OAAO;YACH,IAAI;YACJ,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACvG,CAAC;IACN,CAAC;CACJ,CAAA;AA5DY,WAAW;IADvB,OAAO,CAAC,SAAS,CAAC;GACN,WAAW,CA4DvB;SA5DY,WAAW;AA8DxB,MAAM,CAAC,MAAM,UAAU,GAAG,qBAAqB,CAAc,WAAW,CAAC,CAAC"}
|
package/onedrive/users.d.ts
CHANGED
|
@@ -16,6 +16,16 @@ declare module "./types" {
|
|
|
16
16
|
interface IDrive {
|
|
17
17
|
special(specialFolder: SpecialFolder): IDriveItem;
|
|
18
18
|
}
|
|
19
|
+
interface _DriveItem {
|
|
20
|
+
restore(restoreOptions: IItemOptions): Promise<IDriveItem>;
|
|
21
|
+
follow(): Promise<IDriveItem>;
|
|
22
|
+
unfollow(): void;
|
|
23
|
+
}
|
|
24
|
+
interface IDriveItem {
|
|
25
|
+
restore(restoreOptions: IItemOptions): Promise<IDriveItem>;
|
|
26
|
+
follow(): Promise<IDriveItem>;
|
|
27
|
+
unfollow(): void;
|
|
28
|
+
}
|
|
19
29
|
}
|
|
20
30
|
export declare enum SpecialFolder {
|
|
21
31
|
"Documents" = "documents",
|
package/onedrive/users.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/users.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../packages/graph/onedrive/users.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAS,OAAO,EAAmE,MAAM,YAAY,CAAC;AAErH,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;AAKD,OAAO,QAAQ,SAAS,CAAC;IACrB,UAAU,MAAM;QACZ,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,UAAU,CAAC;KACrD;IACD,UAAU,MAAM;QACZ,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,UAAU,CAAC;KACrD;IACD,UAAU,UAAU;QAChB,OAAO,CAAC,cAAc,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAC3D,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;QAC9B,QAAQ,IAAI,IAAI,CAAC;KACpB;IACD,UAAU,UAAU;QAChB,OAAO,CAAC,cAAc,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAC3D,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;QAC9B,QAAQ,IAAI,IAAI,CAAC;KACpB;CACJ;AASD,oBAAY,aAAa;IACrB,WAAW,cAAc;IACzB,QAAQ,WAAW;IACnB,YAAY,eAAe;IAC3B,SAAS,YAAY;IACrB,OAAO,UAAU;CACpB"}
|
package/onedrive/users.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { addProp } from "@pnp/queryable";
|
|
1
|
+
import { addProp, body } from "@pnp/queryable";
|
|
2
|
+
import { graphPost } from "../operations.js";
|
|
2
3
|
import { _User } from "../users/types.js";
|
|
3
|
-
import { Drive, Drives, _Drive, DriveItem } from "./types.js";
|
|
4
|
+
import { Drive, Drives, _Drive, DriveItem, _DriveItem } from "./types.js";
|
|
4
5
|
addProp(_User, "drive", Drive);
|
|
5
6
|
addProp(_User, "drives", Drives);
|
|
6
7
|
/**
|
|
@@ -17,4 +18,13 @@ export var SpecialFolder;
|
|
|
17
18
|
SpecialFolder["AppRoot"] = "approot";
|
|
18
19
|
SpecialFolder["Music"] = "music";
|
|
19
20
|
})(SpecialFolder || (SpecialFolder = {}));
|
|
21
|
+
_DriveItem.prototype.restore = function restore(restoreOptions) {
|
|
22
|
+
return graphPost(DriveItem(this, "restore"), body(restoreOptions));
|
|
23
|
+
};
|
|
24
|
+
_DriveItem.prototype.follow = function follow() {
|
|
25
|
+
return graphPost(DriveItem(this, "follow"), null);
|
|
26
|
+
};
|
|
27
|
+
_DriveItem.prototype.unfollow = function unfollow() {
|
|
28
|
+
return graphPost(DriveItem(this, "unfollow"), null);
|
|
29
|
+
};
|
|
20
30
|
//# sourceMappingURL=users.js.map
|
package/onedrive/users.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../../../packages/graph/onedrive/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAU,KAAK,EAAW,MAAM,EAAE,MAAM,EAAE,SAAS,EAAc,UAAU,EAAgB,MAAM,YAAY,CAAC;AAarH,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC/B,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAqBjC;;GAEG;AACH,MAAM,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,OAAO,CAAC,aAA4B;IACpE,OAAO,SAAS,CAAC,IAAI,EAAE,WAAW,aAAa,EAAE,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,CAAN,IAAY,aAMX;AAND,WAAY,aAAa;IACrB,wCAAyB,CAAA;IACzB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;IAC3B,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;AACrB,CAAC,EANW,aAAa,KAAb,aAAa,QAMxB;AAED,UAAU,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,OAAO,CAAC,cAA4B;IACxE,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC;AACF,UAAU,CAAC,SAAS,CAAC,MAAM,GAAG,SAAS,MAAM;IACzC,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC,CAAC;AACF,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAG,SAAS,QAAQ;IAC7C,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/graph",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "pnp - provides a fluent interface to query the Microsoft Graph",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./index",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@microsoft/microsoft-graph-types": "2.25.0",
|
|
12
|
-
"tslib": "2.4.
|
|
13
|
-
"@pnp/core": "3.
|
|
14
|
-
"@pnp/queryable": "3.
|
|
12
|
+
"tslib": "2.4.1",
|
|
13
|
+
"@pnp/core": "3.11.0",
|
|
14
|
+
"@pnp/queryable": "3.11.0"
|
|
15
15
|
},
|
|
16
16
|
"funding": {
|
|
17
17
|
"type": "individual",
|
package/sites/types.d.ts
CHANGED
|
@@ -9,6 +9,12 @@ export declare class _Sites extends _GraphQueryableCollection<ISiteType[]> {
|
|
|
9
9
|
*/
|
|
10
10
|
get root(): ISite;
|
|
11
11
|
getById(id: string): ISite;
|
|
12
|
+
/**
|
|
13
|
+
* Get a Site by URL
|
|
14
|
+
* @param hostname: string, the host of the site e.g. "contoso.sharepoint.com"
|
|
15
|
+
* @param siteUrl: string, the server relative url of the site e.g. "/sites/teamsite1"
|
|
16
|
+
* @returns ISite
|
|
17
|
+
*/
|
|
12
18
|
getByUrl(hostname: string, siteUrl: string): ISite;
|
|
13
19
|
}
|
|
14
20
|
export interface ISites extends _Sites {
|
package/sites/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/graph/sites/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACjH,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAErE;;GAEG;AACH,qBACa,MAAO,SAAQ,yBAAyB,CAAC,SAAS,EAAE,CAAC;IAC9D;;OAEG;IACH,IAAW,IAAI,IAAI,KAAK,CAEvB;IAEM,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/graph/sites/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACjH,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAErE;;GAEG;AACH,qBACa,MAAO,SAAQ,yBAAyB,CAAC,SAAS,EAAE,CAAC;IAC9D;;OAEG;IACH,IAAW,IAAI,IAAI,KAAK,CAEvB;IAEM,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK;IAIjC;;;;;MAKE;IACK,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK;CAG5D;AACD,MAAM,WAAW,MAAO,SAAQ,MAAM;CAAI;AAC1C,eAAO,MAAM,KAAK,+DAAwC,CAAC;AAE3D;;GAEG;AACH,qBAAa,KAAM,SAAQ,uBAAuB,CAAC,SAAS,CAAC;IAEzD,IAAW,KAAK,IAAI,MAAM,CAEzB;CACJ;AACD,MAAM,WAAW,KAAM,SAAQ,KAAK;CAAI;AACxC,eAAO,MAAM,IAAI,8DAAsC,CAAC"}
|
package/sites/types.js
CHANGED
|
@@ -14,6 +14,12 @@ let _Sites = class _Sites extends _GraphQueryableCollection {
|
|
|
14
14
|
getById(id) {
|
|
15
15
|
return Site(this, id);
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Get a Site by URL
|
|
19
|
+
* @param hostname: string, the host of the site e.g. "contoso.sharepoint.com"
|
|
20
|
+
* @param siteUrl: string, the server relative url of the site e.g. "/sites/teamsite1"
|
|
21
|
+
* @returns ISite
|
|
22
|
+
*/
|
|
17
23
|
getByUrl(hostname, siteUrl) {
|
|
18
24
|
return Site(this, `${hostname}:${siteUrl}:`);
|
|
19
25
|
}
|
package/sites/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/graph/sites/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,E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