microsoft-graph 2.37.2 → 3.0.1
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/dist/cjs/operations/drive/listDrives.d.ts +11 -2
- package/dist/cjs/operations/drive/listDrives.d.ts.map +1 -1
- package/dist/cjs/operations/drive/listDrives.js +14 -10
- package/dist/cjs/operations/driveItem/{listDriveItemChildren.d.ts → listDriveItems.d.ts} +7 -3
- package/dist/cjs/operations/driveItem/listDriveItems.d.ts.map +1 -0
- package/dist/cjs/operations/driveItem/{listDriveItemChildren.js → listDriveItems.js} +5 -5
- package/dist/cjs/operations/site/listSites.d.ts +10 -1
- package/dist/cjs/operations/site/listSites.d.ts.map +1 -1
- package/dist/cjs/operations/site/listSites.js +14 -12
- package/dist/cjs/operations/workbookPivotTable/refreshWorkbookPivotTable.d.ts +1 -1
- package/dist/cjs/operations/workbookPivotTable/refreshWorkbookPivotTable.js +1 -1
- package/dist/{esm/operations/workbookRange/getWorkbookRangeFormat.d.ts → cjs/operations/workbookRange/getWorkbookRangeAlignment.d.ts} +3 -3
- package/dist/cjs/operations/workbookRange/getWorkbookRangeAlignment.d.ts.map +1 -0
- package/dist/cjs/operations/workbookRange/{getWorkbookRangeFormat.js → getWorkbookRangeAlignment.js} +3 -4
- package/dist/cjs/tasks/getWorkbookWorksheetByName.d.ts +3 -0
- package/dist/cjs/tasks/getWorkbookWorksheetByName.d.ts.map +1 -1
- package/dist/cjs/tasks/getWorkbookWorksheetByName.js +3 -1
- package/dist/cjs/tasks/{listDriveItems.d.ts → iterateDriveItems.d.ts} +3 -3
- package/dist/cjs/tasks/iterateDriveItems.d.ts.map +1 -0
- package/dist/cjs/tasks/{listDriveItems.js → iterateDriveItems.js} +14 -20
- package/dist/cjs/tasks/iterateDrives.d.ts +17 -0
- package/dist/cjs/tasks/iterateDrives.d.ts.map +1 -0
- package/dist/cjs/tasks/iterateDrives.js +39 -0
- package/dist/cjs/tasks/iterateSites.d.ts +17 -0
- package/dist/cjs/tasks/iterateSites.d.ts.map +1 -0
- package/dist/cjs/tasks/iterateSites.js +39 -0
- package/dist/cjs/tasks/iterateWorkbookRangeRows.js +2 -2
- package/dist/esm/operations/drive/listDrives.d.ts +11 -2
- package/dist/esm/operations/drive/listDrives.d.ts.map +1 -1
- package/dist/esm/operations/drive/listDrives.js +14 -10
- package/dist/esm/operations/driveItem/{listDriveItemChildren.d.ts → listDriveItems.d.ts} +7 -3
- package/dist/esm/operations/driveItem/listDriveItems.d.ts.map +1 -0
- package/dist/esm/operations/driveItem/{listDriveItemChildren.js → listDriveItems.js} +4 -4
- package/dist/esm/operations/site/listSites.d.ts +10 -1
- package/dist/esm/operations/site/listSites.d.ts.map +1 -1
- package/dist/esm/operations/site/listSites.js +14 -12
- package/dist/esm/operations/workbookPivotTable/refreshWorkbookPivotTable.d.ts +1 -1
- package/dist/esm/operations/workbookPivotTable/refreshWorkbookPivotTable.js +1 -1
- package/dist/{cjs/operations/workbookRange/getWorkbookRangeFormat.d.ts → esm/operations/workbookRange/getWorkbookRangeAlignment.d.ts} +3 -3
- package/dist/esm/operations/workbookRange/getWorkbookRangeAlignment.d.ts.map +1 -0
- package/dist/esm/operations/workbookRange/{getWorkbookRangeFormat.js → getWorkbookRangeAlignment.js} +2 -3
- package/dist/esm/tasks/getWorkbookWorksheetByName.d.ts +3 -0
- package/dist/esm/tasks/getWorkbookWorksheetByName.d.ts.map +1 -1
- package/dist/esm/tasks/getWorkbookWorksheetByName.js +3 -1
- package/dist/esm/tasks/{listDriveItems.d.ts → iterateDriveItems.d.ts} +3 -3
- package/dist/esm/tasks/iterateDriveItems.d.ts.map +1 -0
- package/dist/esm/tasks/{listDriveItems.js → iterateDriveItems.js} +13 -19
- package/dist/esm/tasks/iterateDrives.d.ts +17 -0
- package/dist/esm/tasks/iterateDrives.d.ts.map +1 -0
- package/dist/esm/tasks/iterateDrives.js +33 -0
- package/dist/esm/tasks/iterateSites.d.ts +17 -0
- package/dist/esm/tasks/iterateSites.d.ts.map +1 -0
- package/dist/esm/tasks/iterateSites.js +33 -0
- package/dist/esm/tasks/iterateWorkbookRangeRows.js +2 -2
- package/docs/api/README.md +6 -5
- package/docs/api/{getWorkbookRangeFormat.md → getWorkbookRangeAlignment.md} +5 -5
- package/docs/api/iterateDriveItems.md +32 -0
- package/docs/api/iterateDrives.md +32 -0
- package/docs/api/iterateSites.md +32 -0
- package/docs/api/listDriveItems.md +40 -10
- package/docs/api/listDrives.md +37 -6
- package/docs/api/listSites.md +37 -6
- package/docs/api/{refreshWorkbookWorksheetPivotTable.md → refreshWorkbookPivotTable.md} +2 -2
- package/docs/api/workbookPivotTable.md +1 -1
- package/package.json +48 -2743
- package/update-exports.ts +0 -3
- package/dist/cjs/operations/driveItem/listDriveItemChildren.d.ts.map +0 -1
- package/dist/cjs/operations/workbookRange/getWorkbookRangeFormat.d.ts.map +0 -1
- package/dist/cjs/tasks/listDriveItems.d.ts.map +0 -1
- package/dist/esm/operations/driveItem/listDriveItemChildren.d.ts.map +0 -1
- package/dist/esm/operations/workbookRange/getWorkbookRangeFormat.d.ts.map +0 -1
- package/dist/esm/tasks/listDriveItems.d.ts.map +0 -1
- package/docs/api/getWorkbookWorksheetByName-1.md +0 -32
- package/docs/api/listDriveItemChildren.md +0 -47
|
@@ -3,15 +3,24 @@
|
|
|
3
3
|
* @module listDrives
|
|
4
4
|
* @category Operations
|
|
5
5
|
*/
|
|
6
|
-
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
6
|
+
import type { Drive, DriveItem } from "@microsoft/microsoft-graph-types";
|
|
7
7
|
import type { DriveRef } from "../../models/Drive.ts";
|
|
8
8
|
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
9
9
|
import type { SiteRef } from "../../models/Site.ts";
|
|
10
|
+
export type ListDrivesResponse = {
|
|
11
|
+
value: (DriveItem & DriveRef)[];
|
|
12
|
+
"@odata.nextLink": string | null;
|
|
13
|
+
};
|
|
14
|
+
export type DriveList = {
|
|
15
|
+
drives: (Drive & DriveRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
10
18
|
/**
|
|
11
19
|
* Retrieve the list of accessible Drives in a Site.
|
|
12
20
|
* @param siteRef Reference to the site.
|
|
21
|
+
* @param take Maximum number of items to retrieve. Defaults to 1000.
|
|
13
22
|
* @returns Array of drives available for the specified site, each including its metadata and reference information.
|
|
14
23
|
* @see https://learn.microsoft.com/en-us/graph/api/drive-list
|
|
15
24
|
*/
|
|
16
|
-
export default function listDrives(siteRef: SiteRef): GraphOperation<
|
|
25
|
+
export default function listDrives(siteRef: SiteRef, take?: number): GraphOperation<DriveList>;
|
|
17
26
|
//# sourceMappingURL=listDrives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listDrives.d.ts","sourceRoot":"","sources":["../../../../src/operations/drive/listDrives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"listDrives.d.ts","sourceRoot":"","sources":["../../../../src/operations/drive/listDrives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAW,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKpD,MAAM,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,CAAC,SAAS,GAAG,QAAQ,CAAC,EAAE,CAAC;IAChC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,CAAC,KAAK,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC7B,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,SAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAwB3F"}
|
|
@@ -12,25 +12,29 @@ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
|
12
12
|
/**
|
|
13
13
|
* Retrieve the list of accessible Drives in a Site.
|
|
14
14
|
* @param siteRef Reference to the site.
|
|
15
|
+
* @param take Maximum number of items to retrieve. Defaults to 1000.
|
|
15
16
|
* @returns Array of drives available for the specified site, each including its metadata and reference information.
|
|
16
17
|
* @see https://learn.microsoft.com/en-us/graph/api/drive-list
|
|
17
18
|
*/
|
|
18
|
-
function listDrives(siteRef) {
|
|
19
|
+
function listDrives(siteRef, take = 1000) {
|
|
19
20
|
return (0, operationInvoker_ts_1.operation)({
|
|
20
21
|
context: siteRef.context,
|
|
21
22
|
method: "GET",
|
|
22
|
-
path: (0, templatedPaths_ts_1.generatePath)(
|
|
23
|
+
path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives?$top=${take}`, siteRef),
|
|
23
24
|
headers: {},
|
|
24
25
|
body: null,
|
|
25
26
|
responseTransform: (response) => {
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
const result = response;
|
|
28
|
+
return {
|
|
29
|
+
drives: result.value.map((drive) => {
|
|
30
|
+
const driveRef = (0, drive_ts_1.createDriveRef)(siteRef, drive.id);
|
|
31
|
+
return {
|
|
32
|
+
...drive,
|
|
33
|
+
...driveRef,
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
36
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
37
|
+
};
|
|
34
38
|
},
|
|
35
39
|
});
|
|
36
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Retrieve the metadata for items in a drive or folder.
|
|
3
|
-
* @module
|
|
3
|
+
* @module listDriveItems
|
|
4
4
|
* @category Operations
|
|
5
5
|
*/
|
|
6
6
|
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
@@ -11,6 +11,10 @@ export type ListDriveItemResponse = {
|
|
|
11
11
|
value: (DriveItem & DriveItemRef)[];
|
|
12
12
|
"@odata.nextLink": string | null;
|
|
13
13
|
};
|
|
14
|
+
export type DriveItemList = {
|
|
15
|
+
items: (DriveItem & DriveItemRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
14
18
|
/**
|
|
15
19
|
* Retrieve the metadata for items in a drive or folder.
|
|
16
20
|
* @param parentRef Reference to the parent drive or folder. Defaults to the root drive.
|
|
@@ -18,5 +22,5 @@ export type ListDriveItemResponse = {
|
|
|
18
22
|
* @returns Array of drive items, each including its metadata and reference information.
|
|
19
23
|
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-list-children
|
|
20
24
|
*/
|
|
21
|
-
export default function
|
|
22
|
-
//# sourceMappingURL=
|
|
25
|
+
export default function listDriveItems(parentRef: DriveRef | DriveItemRef, take?: number): GraphOperation<DriveItemList>;
|
|
26
|
+
//# sourceMappingURL=listDriveItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listDriveItems.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/listDriveItems.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC;IACpC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,IAAI,SAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAyBrH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Retrieve the metadata for items in a drive or folder.
|
|
4
|
-
* @module
|
|
4
|
+
* @module listDriveItems
|
|
5
5
|
* @category Operations
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = listDriveItems;
|
|
9
9
|
const driveItem_ts_1 = require("../../services/driveItem.js");
|
|
10
10
|
const operationInvoker_ts_1 = require("../../services/operationInvoker.js");
|
|
11
11
|
const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
@@ -16,7 +16,7 @@ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
|
16
16
|
* @returns Array of drive items, each including its metadata and reference information.
|
|
17
17
|
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-list-children
|
|
18
18
|
*/
|
|
19
|
-
function
|
|
19
|
+
function listDriveItems(parentRef, take = 1000) {
|
|
20
20
|
const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
|
|
21
21
|
return (0, operationInvoker_ts_1.operation)({
|
|
22
22
|
context: parentRef.context,
|
|
@@ -27,14 +27,14 @@ function listDriveItemChildren(parentRef, take = 1000) {
|
|
|
27
27
|
responseTransform: (response) => {
|
|
28
28
|
const result = response;
|
|
29
29
|
return {
|
|
30
|
-
|
|
30
|
+
items: result.value.map((item) => {
|
|
31
31
|
const itemRef = (0, driveItem_ts_1.createDriveItemRef)(parentRef, item.id);
|
|
32
32
|
return {
|
|
33
33
|
...item,
|
|
34
34
|
...itemRef,
|
|
35
35
|
};
|
|
36
36
|
}),
|
|
37
|
-
"@odata.nextLink"
|
|
37
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
38
38
|
};
|
|
39
39
|
},
|
|
40
40
|
});
|
|
@@ -7,11 +7,20 @@ import type { Site } from "@microsoft/microsoft-graph-types";
|
|
|
7
7
|
import type { ContextRef } from "../../models/Context.ts";
|
|
8
8
|
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
9
9
|
import type { SiteRef } from "../../models/Site.ts";
|
|
10
|
+
export type ListSitesResponse = {
|
|
11
|
+
value: (Site & SiteRef)[];
|
|
12
|
+
"@odata.nextLink": string | null;
|
|
13
|
+
};
|
|
14
|
+
export type SiteList = {
|
|
15
|
+
sites: (Site & SiteRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
10
18
|
/**
|
|
11
19
|
* List sites in your company geography.
|
|
12
20
|
* @param contextRef Reference to the context.
|
|
21
|
+
* @param take Maximum number of items to retrieve. Defaults to 1000.
|
|
13
22
|
* @returns Array of sites, each including its metadata and reference information.
|
|
14
23
|
* @see https://learn.microsoft.com/en-us/graph/api/site-list
|
|
15
24
|
*/
|
|
16
|
-
export default function listSites(contextRef: ContextRef): GraphOperation<
|
|
25
|
+
export default function listSites(contextRef: ContextRef, take?: number): GraphOperation<SiteList>;
|
|
17
26
|
//# sourceMappingURL=listSites.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listSites.d.ts","sourceRoot":"","sources":["../../../../src/operations/site/listSites.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAU,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAK5D
|
|
1
|
+
{"version":3,"file":"listSites.d.ts","sourceRoot":"","sources":["../../../../src/operations/site/listSites.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAU,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAK5D,MAAM,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,CAAC,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC;IAC1B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE,CAAC,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC;IAC1B,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,SAAO,GAAG,cAAc,CAAC,QAAQ,CAAC,CAuB/F"}
|
|
@@ -12,27 +12,29 @@ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
|
12
12
|
/**
|
|
13
13
|
* List sites in your company geography.
|
|
14
14
|
* @param contextRef Reference to the context.
|
|
15
|
+
* @param take Maximum number of items to retrieve. Defaults to 1000.
|
|
15
16
|
* @returns Array of sites, each including its metadata and reference information.
|
|
16
17
|
* @see https://learn.microsoft.com/en-us/graph/api/site-list
|
|
17
18
|
*/
|
|
18
|
-
function listSites(contextRef) {
|
|
19
|
+
function listSites(contextRef, take = 1000) {
|
|
19
20
|
return (0, operationInvoker_ts_1.operation)({
|
|
20
21
|
context: contextRef.context,
|
|
21
22
|
method: "GET",
|
|
22
|
-
path: (0, templatedPaths_ts_1.generatePath)(
|
|
23
|
+
path: (0, templatedPaths_ts_1.generatePath)(`/sites?search=*&$top=${take}`, {}), // TODO: Implement search parameter properly. Without this not all are shown.
|
|
23
24
|
headers: {},
|
|
24
25
|
body: null,
|
|
25
26
|
responseTransform: (response) => {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
const result = response;
|
|
28
|
+
return {
|
|
29
|
+
sites: result.value.map((site) => {
|
|
30
|
+
const siteRef = (0, site_ts_1.createSiteRef)(contextRef, site.id);
|
|
31
|
+
return {
|
|
32
|
+
...site,
|
|
33
|
+
...siteRef,
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
36
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
37
|
+
};
|
|
36
38
|
},
|
|
37
39
|
});
|
|
38
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Retrieve the format of a workbook range.
|
|
3
|
-
* @module
|
|
3
|
+
* @module getWorkbookRangeAlignment
|
|
4
4
|
* @category Operations
|
|
5
5
|
*/
|
|
6
6
|
import type { WorkbookRangeFormat } from "@microsoft/microsoft-graph-types";
|
|
@@ -12,5 +12,5 @@ import type { WorkbookRangeRef } from "../../models/WorkbookRange.ts";
|
|
|
12
12
|
* @returns Format of the specified range.
|
|
13
13
|
* @see https://learn.microsoft.com/en-us/graph/api/rangeformat-get
|
|
14
14
|
*/
|
|
15
|
-
export default function
|
|
16
|
-
//# sourceMappingURL=
|
|
15
|
+
export default function getWorkbookRangeAlignment(rangeRef: WorkbookRangeRef): GraphOperation<WorkbookRangeFormat & WorkbookRangeRef>;
|
|
16
|
+
//# sourceMappingURL=getWorkbookRangeAlignment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWorkbookRangeAlignment.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbookRange/getWorkbookRangeAlignment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKtE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,cAAc,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAmBpI"}
|
package/dist/cjs/operations/workbookRange/{getWorkbookRangeFormat.js → getWorkbookRangeAlignment.js}
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// TODO: Rename to getWorkbookRangeAlignment
|
|
3
2
|
/**
|
|
4
3
|
* Retrieve the format of a workbook range.
|
|
5
|
-
* @module
|
|
4
|
+
* @module getWorkbookRangeAlignment
|
|
6
5
|
* @category Operations
|
|
7
6
|
*/
|
|
8
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.default =
|
|
8
|
+
exports.default = getWorkbookRangeAlignment;
|
|
10
9
|
const addressManipulation_ts_1 = require("../../services/addressManipulation.js");
|
|
11
10
|
const operationInvoker_ts_1 = require("../../services/operationInvoker.js");
|
|
12
11
|
const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
@@ -16,7 +15,7 @@ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
|
16
15
|
* @returns Format of the specified range.
|
|
17
16
|
* @see https://learn.microsoft.com/en-us/graph/api/rangeformat-get
|
|
18
17
|
*/
|
|
19
|
-
function
|
|
18
|
+
function getWorkbookRangeAlignment(rangeRef) {
|
|
20
19
|
const address = (0, addressManipulation_ts_1.normalizeAddress)(rangeRef.address, true);
|
|
21
20
|
return (0, operationInvoker_ts_1.operation)({
|
|
22
21
|
context: rangeRef.context,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Get a worksheet by its name.
|
|
3
3
|
* @module getWorkbookWorksheetByName
|
|
4
4
|
* @category Tasks
|
|
5
|
+
* @hidden
|
|
5
6
|
*/
|
|
6
7
|
import type { WorkbookWorksheet } from "@microsoft/microsoft-graph-types";
|
|
7
8
|
import type { WorkbookRef } from "../models/Workbook.ts";
|
|
@@ -13,6 +14,8 @@ import type { WorkbookWorksheetRef } from "../models/WorkbookWorksheet.ts";
|
|
|
13
14
|
* @param name The name of the worksheet to retrieve.
|
|
14
15
|
* @throws {@link NotFoundError} If the worksheet with the specified name is not found.
|
|
15
16
|
* @returns Worksheet
|
|
17
|
+
* @deprecated Use `getWorkbookWorksheetByName` operation instead
|
|
18
|
+
* @hidden
|
|
16
19
|
*/
|
|
17
20
|
export default function getWorkbookWorksheetByName(workbookRef: WorkbookRef, name: string): Promise<WorkbookWorksheet & WorkbookWorksheetRef>;
|
|
18
21
|
//# sourceMappingURL=getWorkbookWorksheetByName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWorkbookWorksheetByName.d.ts","sourceRoot":"","sources":["../../../src/tasks/getWorkbookWorksheetByName.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"getWorkbookWorksheetByName.d.ts","sourceRoot":"","sources":["../../../src/tasks/getWorkbookWorksheetByName.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAG3E;;;;;;;;;GASG;AACH,wBAA8B,0BAA0B,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,oBAAoB,CAAC,CASlJ"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Get a worksheet by its name.
|
|
4
4
|
* @module getWorkbookWorksheetByName
|
|
5
5
|
* @category Tasks
|
|
6
|
+
* @hidden
|
|
6
7
|
*/
|
|
7
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -18,9 +19,10 @@ const listWorkbookWorksheets_ts_1 = __importDefault(require("../operations/workb
|
|
|
18
19
|
* @param name The name of the worksheet to retrieve.
|
|
19
20
|
* @throws {@link NotFoundError} If the worksheet with the specified name is not found.
|
|
20
21
|
* @returns Worksheet
|
|
22
|
+
* @deprecated Use `getWorkbookWorksheetByName` operation instead
|
|
23
|
+
* @hidden
|
|
21
24
|
*/
|
|
22
25
|
async function getWorkbookWorksheetByName(workbookRef, name) {
|
|
23
|
-
// TODO: More performant to get it by a direct call without listing all workbooks?
|
|
24
26
|
const worksheets = await (0, listWorkbookWorksheets_ts_1.default)(workbookRef);
|
|
25
27
|
const worksheet = worksheets.find((worksheetRef) => worksheetRef.name === name);
|
|
26
28
|
if (!worksheet) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* List drive items in a drive or a drive item.
|
|
3
|
-
* @module
|
|
3
|
+
* @module iterateDriveItems
|
|
4
4
|
* @category Tasks
|
|
5
5
|
*/
|
|
6
6
|
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
@@ -13,5 +13,5 @@ import type { DriveItemRef } from "../models/DriveItem.ts";
|
|
|
13
13
|
* @returns Async iterable of drive items.
|
|
14
14
|
* @remarks `pageSize` should only be set for advanced performance tuning.
|
|
15
15
|
*/
|
|
16
|
-
export default function
|
|
17
|
-
//# sourceMappingURL=
|
|
16
|
+
export default function iterateDriveItems(parentRef: DriveRef | DriveItemRef, maxPerChunk?: number): AsyncGenerator<DriveItem & DriveItemRef>;
|
|
17
|
+
//# sourceMappingURL=iterateDriveItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterateDriveItems.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateDriveItems.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKxE;;;;;;GAMG;AACH,wBAA+B,iBAAiB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,WAAW,SAAO,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CA0BjJ"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* List drive items in a drive or a drive item.
|
|
4
|
-
* @module
|
|
4
|
+
* @module iterateDriveItems
|
|
5
5
|
* @category Tasks
|
|
6
6
|
*/
|
|
7
7
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.default =
|
|
12
|
-
const
|
|
11
|
+
exports.default = iterateDriveItems;
|
|
12
|
+
const listDriveItems_ts_1 = __importDefault(require("../operations/driveItem/listDriveItems.js"));
|
|
13
13
|
const driveItem_ts_1 = require("../services/driveItem.js");
|
|
14
14
|
const http_ts_1 = require("../services/http.js");
|
|
15
15
|
/**
|
|
@@ -19,31 +19,25 @@ const http_ts_1 = require("../services/http.js");
|
|
|
19
19
|
* @returns Async iterable of drive items.
|
|
20
20
|
* @remarks `pageSize` should only be set for advanced performance tuning.
|
|
21
21
|
*/
|
|
22
|
-
async function*
|
|
23
|
-
let
|
|
24
|
-
for (const item of
|
|
25
|
-
|
|
26
|
-
yield {
|
|
27
|
-
...item,
|
|
28
|
-
...itemRef,
|
|
29
|
-
};
|
|
22
|
+
async function* iterateDriveItems(parentRef, maxPerChunk = 1000) {
|
|
23
|
+
let { items, nextLink } = await (0, listDriveItems_ts_1.default)(parentRef, maxPerChunk);
|
|
24
|
+
for (const item of items) {
|
|
25
|
+
yield item;
|
|
30
26
|
}
|
|
31
|
-
while (
|
|
27
|
+
while (nextLink) {
|
|
32
28
|
const accessToken = await parentRef.context.generateAccessToken();
|
|
33
29
|
const response = await (0, http_ts_1.executeHttpRequest)({
|
|
34
|
-
url:
|
|
30
|
+
url: nextLink.toString(),
|
|
35
31
|
method: "GET",
|
|
36
32
|
headers: {
|
|
37
33
|
authorization: `Bearer ${accessToken}`,
|
|
38
34
|
},
|
|
39
35
|
});
|
|
40
|
-
result = response.data;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
...itemRef,
|
|
46
|
-
};
|
|
36
|
+
const result = response.data;
|
|
37
|
+
const newItems = result.value.map((item) => ((0, driveItem_ts_1.createDriveItemRef)(parentRef, item.id) ? { ...item, ...(0, driveItem_ts_1.createDriveItemRef)(parentRef, item.id) } : item));
|
|
38
|
+
nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
|
|
39
|
+
for (const item of newItems) {
|
|
40
|
+
yield item;
|
|
47
41
|
}
|
|
48
42
|
}
|
|
49
43
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List drives in a site as an async iterable.
|
|
3
|
+
* @module iterateDrives
|
|
4
|
+
* @category Tasks
|
|
5
|
+
*/
|
|
6
|
+
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { DriveRef } from "../models/Drive.ts";
|
|
8
|
+
import type { SiteRef } from "../models/Site.ts";
|
|
9
|
+
/**
|
|
10
|
+
* List drives in a site as an async iterable.
|
|
11
|
+
* @param siteRef Reference to the site.
|
|
12
|
+
* @param maxPerChunk Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING.
|
|
13
|
+
* @returns Async iterable of drives.
|
|
14
|
+
* @remarks `pageSize` should only be set for advanced performance tuning.
|
|
15
|
+
*/
|
|
16
|
+
export default function iterateDrives(siteRef: SiteRef, maxPerChunk?: number): AsyncGenerator<DriveItem & DriveRef>;
|
|
17
|
+
//# sourceMappingURL=iterateDrives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterateDrives.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateDrives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;GAMG;AACH,wBAA+B,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,SAAO,GAAG,cAAc,CAAC,SAAS,GAAG,QAAQ,CAAC,CAuBvH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* List drives in a site as an async iterable.
|
|
4
|
+
* @module iterateDrives
|
|
5
|
+
* @category Tasks
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.default = iterateDrives;
|
|
12
|
+
const listDrives_ts_1 = __importDefault(require("../operations/drive/listDrives.js"));
|
|
13
|
+
/**
|
|
14
|
+
* List drives in a site as an async iterable.
|
|
15
|
+
* @param siteRef Reference to the site.
|
|
16
|
+
* @param maxPerChunk Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING.
|
|
17
|
+
* @returns Async iterable of drives.
|
|
18
|
+
* @remarks `pageSize` should only be set for advanced performance tuning.
|
|
19
|
+
*/
|
|
20
|
+
async function* iterateDrives(siteRef, maxPerChunk = 1000) {
|
|
21
|
+
let { drives, nextLink } = await (0, listDrives_ts_1.default)(siteRef, maxPerChunk);
|
|
22
|
+
for (const drive of drives) {
|
|
23
|
+
yield drive;
|
|
24
|
+
}
|
|
25
|
+
while (nextLink) {
|
|
26
|
+
const accessToken = await siteRef.context.generateAccessToken();
|
|
27
|
+
const response = await fetch(nextLink, {
|
|
28
|
+
headers: {
|
|
29
|
+
authorization: `Bearer ${accessToken}`,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const result = (await response.json());
|
|
33
|
+
drives = result.value;
|
|
34
|
+
nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
|
|
35
|
+
for (const drive of drives) {
|
|
36
|
+
yield drive;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List sites in your company geography as an async iterable.
|
|
3
|
+
* @module iterateSites
|
|
4
|
+
* @category Tasks
|
|
5
|
+
*/
|
|
6
|
+
import type { Site } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { ContextRef } from "../models/Context.ts";
|
|
8
|
+
import type { SiteRef } from "../models/Site.ts";
|
|
9
|
+
/**
|
|
10
|
+
* List sites in your company geography as an async iterable.
|
|
11
|
+
* @param contextRef Reference to the context.
|
|
12
|
+
* @param maxPerChunk Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING.
|
|
13
|
+
* @returns Async iterable of sites.
|
|
14
|
+
* @remarks `pageSize` should only be set for advanced performance tuning.
|
|
15
|
+
*/
|
|
16
|
+
export default function iterateSites(contextRef: ContextRef, maxPerChunk?: number): AsyncGenerator<Site & SiteRef>;
|
|
17
|
+
//# sourceMappingURL=iterateSites.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterateSites.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateSites.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;GAMG;AACH,wBAA+B,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,SAAO,GAAG,cAAc,CAAC,IAAI,GAAG,OAAO,CAAC,CAuBtH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* List sites in your company geography as an async iterable.
|
|
4
|
+
* @module iterateSites
|
|
5
|
+
* @category Tasks
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.default = iterateSites;
|
|
12
|
+
const listSites_ts_1 = __importDefault(require("../operations/site/listSites.js"));
|
|
13
|
+
/**
|
|
14
|
+
* List sites in your company geography as an async iterable.
|
|
15
|
+
* @param contextRef Reference to the context.
|
|
16
|
+
* @param maxPerChunk Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING.
|
|
17
|
+
* @returns Async iterable of sites.
|
|
18
|
+
* @remarks `pageSize` should only be set for advanced performance tuning.
|
|
19
|
+
*/
|
|
20
|
+
async function* iterateSites(contextRef, maxPerChunk = 1000) {
|
|
21
|
+
let { sites, nextLink } = await (0, listSites_ts_1.default)(contextRef, maxPerChunk);
|
|
22
|
+
for (const site of sites) {
|
|
23
|
+
yield site;
|
|
24
|
+
}
|
|
25
|
+
while (nextLink) {
|
|
26
|
+
const accessToken = await contextRef.context.generateAccessToken();
|
|
27
|
+
const response = await fetch(nextLink, {
|
|
28
|
+
headers: {
|
|
29
|
+
authorization: `Bearer ${accessToken}`,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const result = (await response.json());
|
|
33
|
+
sites = result.value;
|
|
34
|
+
nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
|
|
35
|
+
for (const site of sites) {
|
|
36
|
+
yield site;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -11,9 +11,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.iterateWorkbookRangeRows = iterateWorkbookRangeRows;
|
|
13
13
|
const InvalidArgumentError_ts_1 = __importDefault(require("../errors/InvalidArgumentError.js"));
|
|
14
|
+
const getWorkbookRangeAlignment_ts_1 = __importDefault(require("../operations/workbookRange/getWorkbookRangeAlignment.js"));
|
|
14
15
|
const getWorkbookRangeFill_ts_1 = __importDefault(require("../operations/workbookRange/getWorkbookRangeFill.js"));
|
|
15
16
|
const getWorkbookRangeFont_ts_1 = __importDefault(require("../operations/workbookRange/getWorkbookRangeFont.js"));
|
|
16
|
-
const getWorkbookRangeFormat_ts_1 = __importDefault(require("../operations/workbookRange/getWorkbookRangeFormat.js"));
|
|
17
17
|
const getWorkbookWorksheetRange_ts_1 = __importDefault(require("../operations/workbookRange/getWorkbookWorksheetRange.js"));
|
|
18
18
|
const listWorkbookRangeBorders_ts_1 = __importDefault(require("../operations/workbookRange/listWorkbookRangeBorders.js"));
|
|
19
19
|
const addressManipulation_ts_1 = require("../services/addressManipulation.js");
|
|
@@ -130,7 +130,7 @@ async function getAlignment(rangeRef, scope) {
|
|
|
130
130
|
if (!scope.alignment) {
|
|
131
131
|
return {};
|
|
132
132
|
}
|
|
133
|
-
const response = await (0,
|
|
133
|
+
const response = await (0, getWorkbookRangeAlignment_ts_1.default)(rangeRef);
|
|
134
134
|
return {
|
|
135
135
|
vertical: response?.verticalAlignment,
|
|
136
136
|
horizontal: response?.horizontalAlignment,
|
|
@@ -3,15 +3,24 @@
|
|
|
3
3
|
* @module listDrives
|
|
4
4
|
* @category Operations
|
|
5
5
|
*/
|
|
6
|
-
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
6
|
+
import type { Drive, DriveItem } from "@microsoft/microsoft-graph-types";
|
|
7
7
|
import type { DriveRef } from "../../models/Drive.ts";
|
|
8
8
|
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
9
9
|
import type { SiteRef } from "../../models/Site.ts";
|
|
10
|
+
export type ListDrivesResponse = {
|
|
11
|
+
value: (DriveItem & DriveRef)[];
|
|
12
|
+
"@odata.nextLink": string | null;
|
|
13
|
+
};
|
|
14
|
+
export type DriveList = {
|
|
15
|
+
drives: (Drive & DriveRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
10
18
|
/**
|
|
11
19
|
* Retrieve the list of accessible Drives in a Site.
|
|
12
20
|
* @param siteRef Reference to the site.
|
|
21
|
+
* @param take Maximum number of items to retrieve. Defaults to 1000.
|
|
13
22
|
* @returns Array of drives available for the specified site, each including its metadata and reference information.
|
|
14
23
|
* @see https://learn.microsoft.com/en-us/graph/api/drive-list
|
|
15
24
|
*/
|
|
16
|
-
export default function listDrives(siteRef: SiteRef): GraphOperation<
|
|
25
|
+
export default function listDrives(siteRef: SiteRef, take?: number): GraphOperation<DriveList>;
|
|
17
26
|
//# sourceMappingURL=listDrives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listDrives.d.ts","sourceRoot":"","sources":["../../../../src/operations/drive/listDrives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"listDrives.d.ts","sourceRoot":"","sources":["../../../../src/operations/drive/listDrives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAW,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKpD,MAAM,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,CAAC,SAAS,GAAG,QAAQ,CAAC,EAAE,CAAC;IAChC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,CAAC,KAAK,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC7B,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,SAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAwB3F"}
|
|
@@ -9,25 +9,29 @@ import { generatePath } from "../../services/templatedPaths.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* Retrieve the list of accessible Drives in a Site.
|
|
11
11
|
* @param siteRef Reference to the site.
|
|
12
|
+
* @param take Maximum number of items to retrieve. Defaults to 1000.
|
|
12
13
|
* @returns Array of drives available for the specified site, each including its metadata and reference information.
|
|
13
14
|
* @see https://learn.microsoft.com/en-us/graph/api/drive-list
|
|
14
15
|
*/
|
|
15
|
-
export default function listDrives(siteRef) {
|
|
16
|
+
export default function listDrives(siteRef, take = 1000) {
|
|
16
17
|
return operation({
|
|
17
18
|
context: siteRef.context,
|
|
18
19
|
method: "GET",
|
|
19
|
-
path: generatePath(
|
|
20
|
+
path: generatePath(`/sites/{site-id}/drives?$top=${take}`, siteRef),
|
|
20
21
|
headers: {},
|
|
21
22
|
body: null,
|
|
22
23
|
responseTransform: (response) => {
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
const result = response;
|
|
25
|
+
return {
|
|
26
|
+
drives: result.value.map((drive) => {
|
|
27
|
+
const driveRef = createDriveRef(siteRef, drive.id);
|
|
28
|
+
return {
|
|
29
|
+
...drive,
|
|
30
|
+
...driveRef,
|
|
31
|
+
};
|
|
32
|
+
}),
|
|
33
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
34
|
+
};
|
|
31
35
|
},
|
|
32
36
|
});
|
|
33
37
|
}
|