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.
Files changed (74) hide show
  1. package/dist/cjs/operations/drive/listDrives.d.ts +11 -2
  2. package/dist/cjs/operations/drive/listDrives.d.ts.map +1 -1
  3. package/dist/cjs/operations/drive/listDrives.js +14 -10
  4. package/dist/cjs/operations/driveItem/{listDriveItemChildren.d.ts → listDriveItems.d.ts} +7 -3
  5. package/dist/cjs/operations/driveItem/listDriveItems.d.ts.map +1 -0
  6. package/dist/cjs/operations/driveItem/{listDriveItemChildren.js → listDriveItems.js} +5 -5
  7. package/dist/cjs/operations/site/listSites.d.ts +10 -1
  8. package/dist/cjs/operations/site/listSites.d.ts.map +1 -1
  9. package/dist/cjs/operations/site/listSites.js +14 -12
  10. package/dist/cjs/operations/workbookPivotTable/refreshWorkbookPivotTable.d.ts +1 -1
  11. package/dist/cjs/operations/workbookPivotTable/refreshWorkbookPivotTable.js +1 -1
  12. package/dist/{esm/operations/workbookRange/getWorkbookRangeFormat.d.ts → cjs/operations/workbookRange/getWorkbookRangeAlignment.d.ts} +3 -3
  13. package/dist/cjs/operations/workbookRange/getWorkbookRangeAlignment.d.ts.map +1 -0
  14. package/dist/cjs/operations/workbookRange/{getWorkbookRangeFormat.js → getWorkbookRangeAlignment.js} +3 -4
  15. package/dist/cjs/tasks/getWorkbookWorksheetByName.d.ts +3 -0
  16. package/dist/cjs/tasks/getWorkbookWorksheetByName.d.ts.map +1 -1
  17. package/dist/cjs/tasks/getWorkbookWorksheetByName.js +3 -1
  18. package/dist/cjs/tasks/{listDriveItems.d.ts → iterateDriveItems.d.ts} +3 -3
  19. package/dist/cjs/tasks/iterateDriveItems.d.ts.map +1 -0
  20. package/dist/cjs/tasks/{listDriveItems.js → iterateDriveItems.js} +14 -20
  21. package/dist/cjs/tasks/iterateDrives.d.ts +17 -0
  22. package/dist/cjs/tasks/iterateDrives.d.ts.map +1 -0
  23. package/dist/cjs/tasks/iterateDrives.js +39 -0
  24. package/dist/cjs/tasks/iterateSites.d.ts +17 -0
  25. package/dist/cjs/tasks/iterateSites.d.ts.map +1 -0
  26. package/dist/cjs/tasks/iterateSites.js +39 -0
  27. package/dist/cjs/tasks/iterateWorkbookRangeRows.js +2 -2
  28. package/dist/esm/operations/drive/listDrives.d.ts +11 -2
  29. package/dist/esm/operations/drive/listDrives.d.ts.map +1 -1
  30. package/dist/esm/operations/drive/listDrives.js +14 -10
  31. package/dist/esm/operations/driveItem/{listDriveItemChildren.d.ts → listDriveItems.d.ts} +7 -3
  32. package/dist/esm/operations/driveItem/listDriveItems.d.ts.map +1 -0
  33. package/dist/esm/operations/driveItem/{listDriveItemChildren.js → listDriveItems.js} +4 -4
  34. package/dist/esm/operations/site/listSites.d.ts +10 -1
  35. package/dist/esm/operations/site/listSites.d.ts.map +1 -1
  36. package/dist/esm/operations/site/listSites.js +14 -12
  37. package/dist/esm/operations/workbookPivotTable/refreshWorkbookPivotTable.d.ts +1 -1
  38. package/dist/esm/operations/workbookPivotTable/refreshWorkbookPivotTable.js +1 -1
  39. package/dist/{cjs/operations/workbookRange/getWorkbookRangeFormat.d.ts → esm/operations/workbookRange/getWorkbookRangeAlignment.d.ts} +3 -3
  40. package/dist/esm/operations/workbookRange/getWorkbookRangeAlignment.d.ts.map +1 -0
  41. package/dist/esm/operations/workbookRange/{getWorkbookRangeFormat.js → getWorkbookRangeAlignment.js} +2 -3
  42. package/dist/esm/tasks/getWorkbookWorksheetByName.d.ts +3 -0
  43. package/dist/esm/tasks/getWorkbookWorksheetByName.d.ts.map +1 -1
  44. package/dist/esm/tasks/getWorkbookWorksheetByName.js +3 -1
  45. package/dist/esm/tasks/{listDriveItems.d.ts → iterateDriveItems.d.ts} +3 -3
  46. package/dist/esm/tasks/iterateDriveItems.d.ts.map +1 -0
  47. package/dist/esm/tasks/{listDriveItems.js → iterateDriveItems.js} +13 -19
  48. package/dist/esm/tasks/iterateDrives.d.ts +17 -0
  49. package/dist/esm/tasks/iterateDrives.d.ts.map +1 -0
  50. package/dist/esm/tasks/iterateDrives.js +33 -0
  51. package/dist/esm/tasks/iterateSites.d.ts +17 -0
  52. package/dist/esm/tasks/iterateSites.d.ts.map +1 -0
  53. package/dist/esm/tasks/iterateSites.js +33 -0
  54. package/dist/esm/tasks/iterateWorkbookRangeRows.js +2 -2
  55. package/docs/api/README.md +6 -5
  56. package/docs/api/{getWorkbookRangeFormat.md → getWorkbookRangeAlignment.md} +5 -5
  57. package/docs/api/iterateDriveItems.md +32 -0
  58. package/docs/api/iterateDrives.md +32 -0
  59. package/docs/api/iterateSites.md +32 -0
  60. package/docs/api/listDriveItems.md +40 -10
  61. package/docs/api/listDrives.md +37 -6
  62. package/docs/api/listSites.md +37 -6
  63. package/docs/api/{refreshWorkbookWorksheetPivotTable.md → refreshWorkbookPivotTable.md} +2 -2
  64. package/docs/api/workbookPivotTable.md +1 -1
  65. package/package.json +48 -2743
  66. package/update-exports.ts +0 -3
  67. package/dist/cjs/operations/driveItem/listDriveItemChildren.d.ts.map +0 -1
  68. package/dist/cjs/operations/workbookRange/getWorkbookRangeFormat.d.ts.map +0 -1
  69. package/dist/cjs/tasks/listDriveItems.d.ts.map +0 -1
  70. package/dist/esm/operations/driveItem/listDriveItemChildren.d.ts.map +0 -1
  71. package/dist/esm/operations/workbookRange/getWorkbookRangeFormat.d.ts.map +0 -1
  72. package/dist/esm/tasks/listDriveItems.d.ts.map +0 -1
  73. package/docs/api/getWorkbookWorksheetByName-1.md +0 -32
  74. package/docs/api/listDriveItemChildren.md +0 -47
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Retrieve the metadata for items in a drive or folder.
3
- * @module listDriveItemChildren
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 listDriveItemChildren(parentRef: DriveRef | DriveItemRef, take?: number): GraphOperation<ListDriveItemResponse>;
22
- //# sourceMappingURL=listDriveItemChildren.d.ts.map
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,6 +1,6 @@
1
1
  /**
2
2
  * Retrieve the metadata for items in a drive or folder.
3
- * @module listDriveItemChildren
3
+ * @module listDriveItems
4
4
  * @category Operations
5
5
  */
6
6
  import { createDriveItemRef } from "../../services/driveItem.js";
@@ -13,7 +13,7 @@ import { generatePath } from "../../services/templatedPaths.js";
13
13
  * @returns Array of drive items, each including its metadata and reference information.
14
14
  * @see https://learn.microsoft.com/en-us/graph/api/driveitem-list-children
15
15
  */
16
- export default function listDriveItemChildren(parentRef, take = 1000) {
16
+ export default function listDriveItems(parentRef, take = 1000) {
17
17
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
18
18
  return operation({
19
19
  context: parentRef.context,
@@ -24,14 +24,14 @@ export default function listDriveItemChildren(parentRef, take = 1000) {
24
24
  responseTransform: (response) => {
25
25
  const result = response;
26
26
  return {
27
- value: result.value.map((item) => {
27
+ items: result.value.map((item) => {
28
28
  const itemRef = createDriveItemRef(parentRef, item.id);
29
29
  return {
30
30
  ...item,
31
31
  ...itemRef,
32
32
  };
33
33
  }),
34
- "@odata.nextLink": result["@odata.nextLink"] ?? null,
34
+ nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
35
35
  };
36
36
  },
37
37
  });
@@ -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<(Site & SiteRef)[]>;
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;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAuB5F"}
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"}
@@ -9,27 +9,29 @@ import { generatePath } from "../../services/templatedPaths.js";
9
9
  /**
10
10
  * List sites in your company geography.
11
11
  * @param contextRef Reference to the context.
12
+ * @param take Maximum number of items to retrieve. Defaults to 1000.
12
13
  * @returns Array of sites, each including its metadata and reference information.
13
14
  * @see https://learn.microsoft.com/en-us/graph/api/site-list
14
15
  */
15
- export default function listSites(contextRef) {
16
+ export default function listSites(contextRef, take = 1000) {
16
17
  return operation({
17
18
  context: contextRef.context,
18
19
  method: "GET",
19
- path: generatePath("/sites?search=*", {}), // TODO: Implement search parameter properly. Without this not all are shown.
20
+ path: generatePath(`/sites?search=*&$top=${take}`, {}), // TODO: Implement search parameter properly. Without this not all are shown.
20
21
  headers: {},
21
22
  body: null,
22
23
  responseTransform: (response) => {
23
- const list = response;
24
- const sites = list.value.map((site) => {
25
- const siteId = site.id;
26
- const siteRef = createSiteRef(contextRef, siteId);
27
- return {
28
- ...site,
29
- ...siteRef,
30
- };
31
- });
32
- return sites;
24
+ const result = response;
25
+ return {
26
+ sites: result.value.map((site) => {
27
+ const siteRef = createSiteRef(contextRef, site.id);
28
+ return {
29
+ ...site,
30
+ ...siteRef,
31
+ };
32
+ }),
33
+ nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
34
+ };
33
35
  },
34
36
  });
35
37
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Refresh a specific pivot table in a worksheet.
3
- * @module refreshWorkbookWorksheetPivotTable
3
+ * @module refreshWorkbookPivotTable
4
4
  * @category Operations
5
5
  */
6
6
  import type { GraphOperation } from "../../models/GraphOperation.ts";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Refresh a specific pivot table in a worksheet.
3
- * @module refreshWorkbookWorksheetPivotTable
3
+ * @module refreshWorkbookPivotTable
4
4
  * @category Operations
5
5
  */
6
6
  import { operation } from "../../services/operationInvoker.js";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Retrieve the format of a workbook range.
3
- * @module getWorkbookRangeFormat
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 getWorkbookRangeFormat(rangeRef: WorkbookRangeRef): GraphOperation<WorkbookRangeFormat & WorkbookRangeRef>;
16
- //# sourceMappingURL=getWorkbookRangeFormat.d.ts.map
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"}
@@ -1,7 +1,6 @@
1
- // TODO: Rename to getWorkbookRangeAlignment
2
1
  /**
3
2
  * Retrieve the format of a workbook range.
4
- * @module getWorkbookRangeFormat
3
+ * @module getWorkbookRangeAlignment
5
4
  * @category Operations
6
5
  */
7
6
  import { normalizeAddress } from "../../services/addressManipulation.js";
@@ -13,7 +12,7 @@ import { generatePath } from "../../services/templatedPaths.js";
13
12
  * @returns Format of the specified range.
14
13
  * @see https://learn.microsoft.com/en-us/graph/api/rangeformat-get
15
14
  */
16
- export default function getWorkbookRangeFormat(rangeRef) {
15
+ export default function getWorkbookRangeAlignment(rangeRef) {
17
16
  const address = normalizeAddress(rangeRef.address, true);
18
17
  return operation({
19
18
  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;;;;GAIG;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;;;;;;;GAOG;AACH,wBAA8B,0BAA0B,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,oBAAoB,CAAC,CAUlJ"}
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"}
@@ -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 NotFoundError from "../errors/NotFoundError.js";
7
8
  import listWorkbookWorksheets from "../operations/workbookWorksheet/listWorkbookWorksheets.js";
@@ -12,9 +13,10 @@ import listWorkbookWorksheets from "../operations/workbookWorksheet/listWorkbook
12
13
  * @param name The name of the worksheet to retrieve.
13
14
  * @throws {@link NotFoundError} If the worksheet with the specified name is not found.
14
15
  * @returns Worksheet
16
+ * @deprecated Use `getWorkbookWorksheetByName` operation instead
17
+ * @hidden
15
18
  */
16
19
  export default async function getWorkbookWorksheetByName(workbookRef, name) {
17
- // TODO: More performant to get it by a direct call without listing all workbooks?
18
20
  const worksheets = await listWorkbookWorksheets(workbookRef);
19
21
  const worksheet = worksheets.find((worksheetRef) => worksheetRef.name === name);
20
22
  if (!worksheet) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * List drive items in a drive or a drive item.
3
- * @module listDriveItems
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 listDriveItems(parentRef: DriveRef | DriveItemRef, maxPerChunk?: number): AsyncGenerator<DriveItem & DriveItemRef>;
17
- //# sourceMappingURL=listDriveItems.d.ts.map
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,9 +1,9 @@
1
1
  /**
2
2
  * List drive items in a drive or a drive item.
3
- * @module listDriveItems
3
+ * @module iterateDriveItems
4
4
  * @category Tasks
5
5
  */
6
- import listDriveItemChildren from "../operations/driveItem/listDriveItemChildren.js";
6
+ import listDriveItems from "../operations/driveItem/listDriveItems.js";
7
7
  import { createDriveItemRef } from "../services/driveItem.js";
8
8
  import { executeHttpRequest } from "../services/http.js";
9
9
  /**
@@ -13,31 +13,25 @@ import { executeHttpRequest } from "../services/http.js";
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 async function* listDriveItems(parentRef, maxPerChunk = 1000) {
17
- let result = await listDriveItemChildren(parentRef, maxPerChunk);
18
- for (const item of result.value) {
19
- const itemRef = createDriveItemRef(parentRef, item.id);
20
- yield {
21
- ...item,
22
- ...itemRef,
23
- };
16
+ export default async function* iterateDriveItems(parentRef, maxPerChunk = 1000) {
17
+ let { items, nextLink } = await listDriveItems(parentRef, maxPerChunk);
18
+ for (const item of items) {
19
+ yield item;
24
20
  }
25
- while (result["@odata.nextLink"]) {
21
+ while (nextLink) {
26
22
  const accessToken = await parentRef.context.generateAccessToken();
27
23
  const response = await executeHttpRequest({
28
- url: result["@odata.nextLink"],
24
+ url: nextLink.toString(),
29
25
  method: "GET",
30
26
  headers: {
31
27
  authorization: `Bearer ${accessToken}`,
32
28
  },
33
29
  });
34
- result = response.data;
35
- for (const item of result.value) {
36
- const itemRef = createDriveItemRef(parentRef, item.id);
37
- yield {
38
- ...item,
39
- ...itemRef,
40
- };
30
+ const result = response.data;
31
+ const newItems = result.value.map((item) => (createDriveItemRef(parentRef, item.id) ? { ...item, ...createDriveItemRef(parentRef, item.id) } : item));
32
+ nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
33
+ for (const item of newItems) {
34
+ yield item;
41
35
  }
42
36
  }
43
37
  }
@@ -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,33 @@
1
+ /**
2
+ * List drives in a site as an async iterable.
3
+ * @module iterateDrives
4
+ * @category Tasks
5
+ */
6
+ import listDrives from "../operations/drive/listDrives.js";
7
+ /**
8
+ * List drives in a site as an async iterable.
9
+ * @param siteRef Reference to the site.
10
+ * @param maxPerChunk Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING.
11
+ * @returns Async iterable of drives.
12
+ * @remarks `pageSize` should only be set for advanced performance tuning.
13
+ */
14
+ export default async function* iterateDrives(siteRef, maxPerChunk = 1000) {
15
+ let { drives, nextLink } = await listDrives(siteRef, maxPerChunk);
16
+ for (const drive of drives) {
17
+ yield drive;
18
+ }
19
+ while (nextLink) {
20
+ const accessToken = await siteRef.context.generateAccessToken();
21
+ const response = await fetch(nextLink, {
22
+ headers: {
23
+ authorization: `Bearer ${accessToken}`,
24
+ },
25
+ });
26
+ const result = (await response.json());
27
+ drives = result.value;
28
+ nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
29
+ for (const drive of drives) {
30
+ yield drive;
31
+ }
32
+ }
33
+ }
@@ -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,33 @@
1
+ /**
2
+ * List sites in your company geography as an async iterable.
3
+ * @module iterateSites
4
+ * @category Tasks
5
+ */
6
+ import listSites from "../operations/site/listSites.js";
7
+ /**
8
+ * List sites in your company geography as an async iterable.
9
+ * @param contextRef Reference to the context.
10
+ * @param maxPerChunk Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING.
11
+ * @returns Async iterable of sites.
12
+ * @remarks `pageSize` should only be set for advanced performance tuning.
13
+ */
14
+ export default async function* iterateSites(contextRef, maxPerChunk = 1000) {
15
+ let { sites, nextLink } = await listSites(contextRef, maxPerChunk);
16
+ for (const site of sites) {
17
+ yield site;
18
+ }
19
+ while (nextLink) {
20
+ const accessToken = await contextRef.context.generateAccessToken();
21
+ const response = await fetch(nextLink, {
22
+ headers: {
23
+ authorization: `Bearer ${accessToken}`,
24
+ },
25
+ });
26
+ const result = (await response.json());
27
+ sites = result.value;
28
+ nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
29
+ for (const site of sites) {
30
+ yield site;
31
+ }
32
+ }
33
+ }
@@ -5,9 +5,9 @@
5
5
  * @experimental
6
6
  */
7
7
  import InvalidArgumentError from "../errors/InvalidArgumentError.js";
8
+ import getWorkbookRangeAlignment from "../operations/workbookRange/getWorkbookRangeAlignment.js";
8
9
  import getWorkbookRangeFill from "../operations/workbookRange/getWorkbookRangeFill.js";
9
10
  import getWorkbookRangeFont from "../operations/workbookRange/getWorkbookRangeFont.js";
10
- import getWorkbookRangeFormat from "../operations/workbookRange/getWorkbookRangeFormat.js";
11
11
  import getWorkbookWorksheetRange from "../operations/workbookRange/getWorkbookWorksheetRange.js";
12
12
  import listWorkbookRangeBorders from "../operations/workbookRange/listWorkbookRangeBorders.js";
13
13
  import { countAddressColumns, countAddressRows, subRange } from "../services/addressManipulation.js";
@@ -124,7 +124,7 @@ async function getAlignment(rangeRef, scope) {
124
124
  if (!scope.alignment) {
125
125
  return {};
126
126
  }
127
- const response = await getWorkbookRangeFormat(rangeRef);
127
+ const response = await getWorkbookRangeAlignment(rangeRef);
128
128
  return {
129
129
  vertical: response?.verticalAlignment,
130
130
  horizontal: response?.horizontalAlignment,
@@ -98,9 +98,9 @@
98
98
  | [getSiteByName](getSiteByName.md) | Get a site by its name. |
99
99
  | [getWorkbookNamedRange](getWorkbookNamedRange.md) | Retrieve a named range. |
100
100
  | [getWorkbookPivotTable](getWorkbookPivotTable.md) | Retrieve a workbook pivot table. |
101
+ | [getWorkbookRangeAlignment](getWorkbookRangeAlignment.md) | Retrieve the format of a workbook range. |
101
102
  | [getWorkbookRangeFill](getWorkbookRangeFill.md) | Retrieve the fill format of a workbook range. |
102
103
  | [getWorkbookRangeFont](getWorkbookRangeFont.md) | Retrieve the font format of a workbook range. |
103
- | [getWorkbookRangeFormat](getWorkbookRangeFormat.md) | Retrieve the format of a workbook range. |
104
104
  | [getWorkbookTable](getWorkbookTable.md) | Retrieve a workbook table. |
105
105
  | [getWorkbookTableBodyRange](getWorkbookTableBodyRange.md) | Retrieve the data body range of a workbook table. |
106
106
  | [getWorkbookTableBodyVisibleRange](getWorkbookTableBodyVisibleRange.md) | Retrieve the visible data body range of a table. |
@@ -113,7 +113,7 @@
113
113
  | [getWorkbookWorksheetUsedVisibleRange](getWorkbookWorksheetUsedVisibleRange.md) | Retrieve the visible (not hidden) range in a worksheet. |
114
114
  | [initiateCopyDriveItem](initiateCopyDriveItem.md) | Initiate an asynchronous copy of an item. |
115
115
  | [insertWorkbookCells](insertWorkbookCells.md) | Insert a new blank range at a specified address, shifting existing cells. |
116
- | [listDriveItemChildren](listDriveItemChildren.md) | Retrieve the metadata for items in a drive or folder. |
116
+ | [listDriveItems](listDriveItems.md) | Retrieve the metadata for items in a drive or folder. |
117
117
  | [listDrives](listDrives.md) | Retrieve the list of accessible Drives in a Site. |
118
118
  | [listSites](listSites.md) | List sites in your company geography. |
119
119
  | [listSites](listSites-1.md) | List sites in all company geographies. |
@@ -125,8 +125,8 @@
125
125
  | [mergeWorkbookRange](mergeWorkbookRange.md) | Merge a range of cells in a worksheet. |
126
126
  | [moveDriveItem](moveDriveItem.md) | Moves a file to a new location in the same drive. |
127
127
  | [refreshAllWorkbookPivotTables](refreshAllWorkbookPivotTables.md) | Refresh all pivot tables in a worksheet. |
128
+ | [refreshWorkbookPivotTable](refreshWorkbookPivotTable.md) | Refresh a specific pivot table in a worksheet. |
128
129
  | [refreshWorkbookSession](refreshWorkbookSession.md) | Refresh a workbook session. |
129
- | [refreshWorkbookWorksheetPivotTable](refreshWorkbookWorksheetPivotTable.md) | Refresh a specific pivot table in a worksheet. |
130
130
  | [searchSites](searchSites.md) | Find accessible sites that match the provided keywords. |
131
131
  | [setWorkbookRangeBorder](setWorkbookRangeBorder.md) | Update a specific border of a workbook range. |
132
132
  | [setWorkbookRangeFill](setWorkbookRangeFill.md) | Update the fill format of a workbook range. |
@@ -180,11 +180,12 @@
180
180
  | [copyDriveItem](copyDriveItem.md) | Copy a drive item. |
181
181
  | [createWorkbookAndStartSession](createWorkbookAndStartSession.md) | Create a new workbook and open a session for that workbook. |
182
182
  | [downloadDriveItemContent](downloadDriveItemContent.md) | Download a drive item and save it to the local disk. |
183
- | [getWorkbookWorksheetByName](getWorkbookWorksheetByName-1.md) | Get a worksheet by its name. |
184
183
  | [insertWorkbookRangeRow](insertWorkbookRangeRow.md) | Inserts a single row into a workbook range. |
185
184
  | [insertWorkbookRangeRows](insertWorkbookRangeRows.md) | Inserts rows into a workbook range. |
185
+ | [iterateDriveItems](iterateDriveItems.md) | List drive items in a drive or a drive item. |
186
+ | [iterateDrives](iterateDrives.md) | List drives in a site as an async iterable. |
187
+ | [iterateSites](iterateSites.md) | List sites in your company geography as an async iterable. |
186
188
  | [iterateWorkbookRangeRows](iterateWorkbookRangeRows.md) | Iterate over the rows in a given worksheet range. |
187
- | [listDriveItems](listDriveItems.md) | List drive items in a drive or a drive item. |
188
189
  | [readWorkbookRangeFirstRow](readWorkbookRangeFirstRow.md) | Read the first row from a given workbook range. |
189
190
  | [readWorkbookRangeRows](readWorkbookRangeRows.md) | Read all rows from a given workbook range. |
190
191
  | [readWorkbookRows](readWorkbookRows.md) | Iterates over the rows in a given worksheet range. |
@@ -1,16 +1,16 @@
1
- [Microsoft Graph SDK](README.md) / getWorkbookRangeFormat
1
+ [Microsoft Graph SDK](README.md) / getWorkbookRangeAlignment
2
2
 
3
- # getWorkbookRangeFormat
3
+ # getWorkbookRangeAlignment
4
4
 
5
5
  Retrieve the format of a workbook range.
6
6
 
7
7
  ## Functions
8
8
 
9
- ### getWorkbookRangeFormat()
9
+ ### getWorkbookRangeAlignment()
10
10
 
11
- > **getWorkbookRangeFormat**(`rangeRef`): [`GraphOperation`](GraphOperation.md#graphoperation)\<`WorkbookRangeFormat` & [`SiteRef`](Site-1.md#siteref) & `object` & `object` & `object` & `object` & `object`\>
11
+ > **getWorkbookRangeAlignment**(`rangeRef`): [`GraphOperation`](GraphOperation.md#graphoperation)\<`WorkbookRangeFormat` & [`SiteRef`](Site-1.md#siteref) & `object` & `object` & `object` & `object` & `object`\>
12
12
 
13
- Defined in: [src/operations/workbookRange/getWorkbookRangeFormat.ts:21](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/workbookRange/getWorkbookRangeFormat.ts#L21)
13
+ Defined in: src/operations/workbookRange/getWorkbookRangeAlignment.ts:20
14
14
 
15
15
  Retrieve the format of a workbook range.
16
16
 
@@ -0,0 +1,32 @@
1
+ [Microsoft Graph SDK](README.md) / iterateDriveItems
2
+
3
+ # iterateDriveItems
4
+
5
+ List drive items in a drive or a drive item.
6
+
7
+ ## Functions
8
+
9
+ ### iterateDriveItems()
10
+
11
+ > **iterateDriveItems**(`parentRef`, `maxPerChunk`): [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`DriveItem` & [`SiteRef`](Site-1.md#siteref) & `object` & `object`\>
12
+
13
+ Defined in: src/tasks/iterateDriveItems.ts:21
14
+
15
+ List drive items in a drive or a drive item as an async iterable.
16
+
17
+ #### Parameters
18
+
19
+ | Parameter | Type | Default value | Description |
20
+ | ------ | ------ | ------ | ------ |
21
+ | `parentRef` | [`DriveRef`](Drive-1.md#driveref) \| [`DriveItemRef`](DriveItem-1.md#driveitemref) | `undefined` | Parent drive or folder reference. |
22
+ | `maxPerChunk` | `number` | `1000` | Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING. |
23
+
24
+ #### Returns
25
+
26
+ [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`DriveItem` & [`SiteRef`](Site-1.md#siteref) & `object` & `object`\>
27
+
28
+ Async iterable of drive items.
29
+
30
+ #### Remarks
31
+
32
+ `pageSize` should only be set for advanced performance tuning.
@@ -0,0 +1,32 @@
1
+ [Microsoft Graph SDK](README.md) / iterateDrives
2
+
3
+ # iterateDrives
4
+
5
+ List drives in a site as an async iterable.
6
+
7
+ ## Functions
8
+
9
+ ### iterateDrives()
10
+
11
+ > **iterateDrives**(`siteRef`, `maxPerChunk`): [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`DriveItem` & [`SiteRef`](Site-1.md#siteref) & `object`\>
12
+
13
+ Defined in: src/tasks/iterateDrives.ts:19
14
+
15
+ List drives in a site as an async iterable.
16
+
17
+ #### Parameters
18
+
19
+ | Parameter | Type | Default value | Description |
20
+ | ------ | ------ | ------ | ------ |
21
+ | `siteRef` | [`SiteRef`](Site-1.md#siteref) | `undefined` | Reference to the site. |
22
+ | `maxPerChunk` | `number` | `1000` | Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING. |
23
+
24
+ #### Returns
25
+
26
+ [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`DriveItem` & [`SiteRef`](Site-1.md#siteref) & `object`\>
27
+
28
+ Async iterable of drives.
29
+
30
+ #### Remarks
31
+
32
+ `pageSize` should only be set for advanced performance tuning.
@@ -0,0 +1,32 @@
1
+ [Microsoft Graph SDK](README.md) / iterateSites
2
+
3
+ # iterateSites
4
+
5
+ List sites in your company geography as an async iterable.
6
+
7
+ ## Functions
8
+
9
+ ### iterateSites()
10
+
11
+ > **iterateSites**(`contextRef`, `maxPerChunk`): [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`Site` & [`SiteRef`](Site-1.md#siteref)\>
12
+
13
+ Defined in: src/tasks/iterateSites.ts:19
14
+
15
+ List sites in your company geography as an async iterable.
16
+
17
+ #### Parameters
18
+
19
+ | Parameter | Type | Default value | Description |
20
+ | ------ | ------ | ------ | ------ |
21
+ | `contextRef` | [`ContextRef`](Context-1.md#contextref) | `undefined` | Reference to the context. |
22
+ | `maxPerChunk` | `number` | `1000` | Number of items to fetch per request. DO NOT SET EXCEPT FOR ADVANCED TUNING. |
23
+
24
+ #### Returns
25
+
26
+ [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`Site` & [`SiteRef`](Site-1.md#siteref)\>
27
+
28
+ Async iterable of sites.
29
+
30
+ #### Remarks
31
+
32
+ `pageSize` should only be set for advanced performance tuning.