microsoft-graph 3.0.0 → 3.1.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.
Files changed (41) hide show
  1. package/dist/cjs/operations/site/listSites.js +1 -1
  2. package/dist/cjs/operations/site/searchSites.d.ts +10 -2
  3. package/dist/cjs/operations/site/searchSites.d.ts.map +1 -1
  4. package/dist/cjs/operations/site/searchSites.js +14 -12
  5. package/dist/cjs/operations/workbookRange/{getWorkbookRangeFormat.d.ts → getWorkbookRangeAlignment.d.ts} +3 -3
  6. package/dist/cjs/operations/workbookRange/getWorkbookRangeAlignment.d.ts.map +1 -0
  7. package/dist/cjs/operations/workbookRange/{getWorkbookRangeFormat.js → getWorkbookRangeAlignment.js} +3 -4
  8. package/dist/cjs/tasks/getWorkbookWorksheetByName.d.ts +3 -0
  9. package/dist/cjs/tasks/getWorkbookWorksheetByName.d.ts.map +1 -1
  10. package/dist/cjs/tasks/getWorkbookWorksheetByName.js +3 -1
  11. package/dist/cjs/tasks/iterateSiteSearch.d.ts +16 -0
  12. package/dist/cjs/tasks/iterateSiteSearch.d.ts.map +1 -0
  13. package/dist/cjs/tasks/iterateSiteSearch.js +38 -0
  14. package/dist/cjs/tasks/iterateWorkbookRangeRows.js +2 -2
  15. package/dist/esm/operations/site/listSites.js +1 -1
  16. package/dist/esm/operations/site/searchSites.d.ts +10 -2
  17. package/dist/esm/operations/site/searchSites.d.ts.map +1 -1
  18. package/dist/esm/operations/site/searchSites.js +14 -12
  19. package/dist/esm/operations/workbookRange/{getWorkbookRangeFormat.d.ts → getWorkbookRangeAlignment.d.ts} +3 -3
  20. package/dist/esm/operations/workbookRange/getWorkbookRangeAlignment.d.ts.map +1 -0
  21. package/dist/esm/operations/workbookRange/{getWorkbookRangeFormat.js → getWorkbookRangeAlignment.js} +2 -3
  22. package/dist/esm/tasks/getWorkbookWorksheetByName.d.ts +3 -0
  23. package/dist/esm/tasks/getWorkbookWorksheetByName.d.ts.map +1 -1
  24. package/dist/esm/tasks/getWorkbookWorksheetByName.js +3 -1
  25. package/dist/esm/tasks/iterateSiteSearch.d.ts +16 -0
  26. package/dist/esm/tasks/iterateSiteSearch.d.ts.map +1 -0
  27. package/dist/esm/tasks/iterateSiteSearch.js +32 -0
  28. package/dist/esm/tasks/iterateWorkbookRangeRows.js +2 -2
  29. package/docs/api/README.md +2 -2
  30. package/docs/api/{getWorkbookRangeFormat.md → getWorkbookRangeAlignment.md} +5 -5
  31. package/docs/api/iterateDriveItems.md +1 -1
  32. package/docs/api/iterateDrives.md +1 -1
  33. package/docs/api/iterateSiteSearch.md +28 -0
  34. package/docs/api/iterateSites.md +1 -1
  35. package/docs/api/listDriveItems.md +7 -7
  36. package/docs/api/searchSites.md +34 -4
  37. package/package.json +23 -2758
  38. package/update-exports.ts +0 -3
  39. package/dist/cjs/operations/workbookRange/getWorkbookRangeFormat.d.ts.map +0 -1
  40. package/dist/esm/operations/workbookRange/getWorkbookRangeFormat.d.ts.map +0 -1
  41. package/docs/api/getWorkbookWorksheetByName-1.md +0 -32
@@ -20,7 +20,7 @@ function listSites(contextRef, take = 1000) {
20
20
  return (0, operationInvoker_ts_1.operation)({
21
21
  context: contextRef.context,
22
22
  method: "GET",
23
- path: (0, templatedPaths_ts_1.generatePath)(`/sites?search=*&$top=${take}`, {}), // TODO: Implement search parameter properly. Without this not all are shown.
23
+ path: (0, templatedPaths_ts_1.generatePath)(`/sites?$top=${take}`, {}), // TODO: Implement search parameter properly. Without this not all are shown.
24
24
  headers: {},
25
25
  body: null,
26
26
  responseTransform: (response) => {
@@ -7,12 +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 SearchSitesResponse = {
11
+ value: Site[];
12
+ "@odata.nextLink"?: string;
13
+ };
14
+ export type SiteList = {
15
+ sites: (Site & SiteRef)[];
16
+ nextLink: URL | null;
17
+ };
10
18
  /**
11
19
  * Find accessible sites that match the provided keywords.
12
20
  * @param contextRef Reference to the context.
13
21
  * @param search Search keywords to find matching sites.
14
- * @returns Array of sites that match the search criteria, each including its metadata and reference information.
22
+ * @returns Object containing array of sites and nextLink, each including its metadata and reference information.
15
23
  * @see https://learn.microsoft.com/en-us/graph/api/site-search
16
24
  */
17
- export default function searchSites(contextRef: ContextRef, search: string): GraphOperation<(Site & SiteRef)[]>;
25
+ export default function searchSites(contextRef: ContextRef, search: string): GraphOperation<SiteList>;
18
26
  //# sourceMappingURL=searchSites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchSites.d.ts","sourceRoot":"","sources":["../../../../src/operations/site/searchSites.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;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAuB9G"}
1
+ {"version":3,"file":"searchSites.d.ts","sourceRoot":"","sources":["../../../../src/operations/site/searchSites.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,mBAAmB,GAAG;IACjC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B,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,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAsBpG"}
@@ -13,27 +13,29 @@ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
13
13
  * Find accessible sites that match the provided keywords.
14
14
  * @param contextRef Reference to the context.
15
15
  * @param search Search keywords to find matching sites.
16
- * @returns Array of sites that match the search criteria, each including its metadata and reference information.
16
+ * @returns Object containing array of sites and nextLink, each including its metadata and reference information.
17
17
  * @see https://learn.microsoft.com/en-us/graph/api/site-search
18
18
  */
19
19
  function searchSites(contextRef, search) {
20
20
  return (0, operationInvoker_ts_1.operation)({
21
21
  context: contextRef.context,
22
22
  method: "GET",
23
- path: (0, templatedPaths_ts_1.generatePath)("/sites?search={search}", { search }),
23
+ path: (0, templatedPaths_ts_1.generatePath)("/sites?search={search}&$top=1000", { search }),
24
24
  headers: {},
25
25
  body: null,
26
26
  responseTransform: (response) => {
27
- const list = response;
28
- const sites = list.value.map((site) => {
29
- const siteId = site.id;
30
- const siteRef = (0, site_ts_1.createSiteRef)(contextRef, siteId);
31
- return {
32
- ...site,
33
- ...siteRef,
34
- };
35
- });
36
- return sites;
27
+ const result = response;
28
+ return {
29
+ sites: result.value.map((site) => {
30
+ const siteId = site.id;
31
+ const siteRef = (0, site_ts_1.createSiteRef)(contextRef, siteId);
32
+ return {
33
+ ...site,
34
+ ...siteRef,
35
+ };
36
+ }),
37
+ nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
38
+ };
37
39
  },
38
40
  });
39
41
  }
@@ -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,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 getWorkbookRangeFormat
4
+ * @module getWorkbookRangeAlignment
6
5
  * @category Operations
7
6
  */
8
7
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.default = getWorkbookRangeFormat;
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 getWorkbookRangeFormat(rangeRef) {
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;;;;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"}
@@ -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) {
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
3
+ * @module iterateSiteSearch
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
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
11
+ * @param contextRef Reference to the context.
12
+ * @param search Search keywords to find matching sites.
13
+ * @returns Async iterable of sites.
14
+ */
15
+ export default function iterateSiteSearch(contextRef: ContextRef, search: string): AsyncGenerator<Site & SiteRef>;
16
+ //# sourceMappingURL=iterateSiteSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iterateSiteSearch.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateSiteSearch.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;;;;;GAKG;AACH,wBAA+B,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,IAAI,GAAG,OAAO,CAAC,CAsBvH"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
4
+ * @module iterateSiteSearch
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 = iterateSiteSearch;
12
+ const searchSites_ts_1 = __importDefault(require("../operations/site/searchSites.js"));
13
+ /**
14
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
15
+ * @param contextRef Reference to the context.
16
+ * @param search Search keywords to find matching sites.
17
+ * @returns Async iterable of sites.
18
+ */
19
+ async function* iterateSiteSearch(contextRef, search) {
20
+ let { sites, nextLink } = await (0, searchSites_ts_1.default)(contextRef, search);
21
+ for (const site of sites) {
22
+ yield site;
23
+ }
24
+ while (nextLink) {
25
+ const accessToken = await contextRef.context.generateAccessToken();
26
+ const response = await fetch(nextLink, {
27
+ headers: {
28
+ authorization: `Bearer ${accessToken}`,
29
+ },
30
+ });
31
+ const result = (await response.json());
32
+ sites = result.value;
33
+ nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
34
+ for (const site of sites) {
35
+ yield site;
36
+ }
37
+ }
38
+ }
@@ -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, getWorkbookRangeFormat_ts_1.default)(rangeRef);
133
+ const response = await (0, getWorkbookRangeAlignment_ts_1.default)(rangeRef);
134
134
  return {
135
135
  vertical: response?.verticalAlignment,
136
136
  horizontal: response?.horizontalAlignment,
@@ -17,7 +17,7 @@ export default function listSites(contextRef, take = 1000) {
17
17
  return operation({
18
18
  context: contextRef.context,
19
19
  method: "GET",
20
- path: generatePath(`/sites?search=*&$top=${take}`, {}), // TODO: Implement search parameter properly. Without this not all are shown.
20
+ path: generatePath(`/sites?$top=${take}`, {}), // TODO: Implement search parameter properly. Without this not all are shown.
21
21
  headers: {},
22
22
  body: null,
23
23
  responseTransform: (response) => {
@@ -7,12 +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 SearchSitesResponse = {
11
+ value: Site[];
12
+ "@odata.nextLink"?: string;
13
+ };
14
+ export type SiteList = {
15
+ sites: (Site & SiteRef)[];
16
+ nextLink: URL | null;
17
+ };
10
18
  /**
11
19
  * Find accessible sites that match the provided keywords.
12
20
  * @param contextRef Reference to the context.
13
21
  * @param search Search keywords to find matching sites.
14
- * @returns Array of sites that match the search criteria, each including its metadata and reference information.
22
+ * @returns Object containing array of sites and nextLink, each including its metadata and reference information.
15
23
  * @see https://learn.microsoft.com/en-us/graph/api/site-search
16
24
  */
17
- export default function searchSites(contextRef: ContextRef, search: string): GraphOperation<(Site & SiteRef)[]>;
25
+ export default function searchSites(contextRef: ContextRef, search: string): GraphOperation<SiteList>;
18
26
  //# sourceMappingURL=searchSites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchSites.d.ts","sourceRoot":"","sources":["../../../../src/operations/site/searchSites.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;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAuB9G"}
1
+ {"version":3,"file":"searchSites.d.ts","sourceRoot":"","sources":["../../../../src/operations/site/searchSites.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,mBAAmB,GAAG;IACjC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B,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,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAsBpG"}
@@ -10,27 +10,29 @@ import { generatePath } from "../../services/templatedPaths.js";
10
10
  * Find accessible sites that match the provided keywords.
11
11
  * @param contextRef Reference to the context.
12
12
  * @param search Search keywords to find matching sites.
13
- * @returns Array of sites that match the search criteria, each including its metadata and reference information.
13
+ * @returns Object containing array of sites and nextLink, each including its metadata and reference information.
14
14
  * @see https://learn.microsoft.com/en-us/graph/api/site-search
15
15
  */
16
16
  export default function searchSites(contextRef, search) {
17
17
  return operation({
18
18
  context: contextRef.context,
19
19
  method: "GET",
20
- path: generatePath("/sites?search={search}", { search }),
20
+ path: generatePath("/sites?search={search}&$top=1000", { search }),
21
21
  headers: {},
22
22
  body: null,
23
23
  responseTransform: (response) => {
24
- const list = response;
25
- const sites = list.value.map((site) => {
26
- const siteId = site.id;
27
- const siteRef = createSiteRef(contextRef, siteId);
28
- return {
29
- ...site,
30
- ...siteRef,
31
- };
32
- });
33
- return sites;
24
+ const result = response;
25
+ return {
26
+ sites: result.value.map((site) => {
27
+ const siteId = site.id;
28
+ const siteRef = createSiteRef(contextRef, siteId);
29
+ return {
30
+ ...site,
31
+ ...siteRef,
32
+ };
33
+ }),
34
+ nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
35
+ };
34
36
  },
35
37
  });
36
38
  }
@@ -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) {
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
3
+ * @module iterateSiteSearch
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
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
11
+ * @param contextRef Reference to the context.
12
+ * @param search Search keywords to find matching sites.
13
+ * @returns Async iterable of sites.
14
+ */
15
+ export default function iterateSiteSearch(contextRef: ContextRef, search: string): AsyncGenerator<Site & SiteRef>;
16
+ //# sourceMappingURL=iterateSiteSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iterateSiteSearch.d.ts","sourceRoot":"","sources":["../../../src/tasks/iterateSiteSearch.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;;;;;GAKG;AACH,wBAA+B,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,IAAI,GAAG,OAAO,CAAC,CAsBvH"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
3
+ * @module iterateSiteSearch
4
+ * @category Tasks
5
+ */
6
+ import searchSites from "../operations/site/searchSites.js";
7
+ /**
8
+ * Iterate accessible sites matching the provided search keywords as an async iterable.
9
+ * @param contextRef Reference to the context.
10
+ * @param search Search keywords to find matching sites.
11
+ * @returns Async iterable of sites.
12
+ */
13
+ export default async function* iterateSiteSearch(contextRef, search) {
14
+ let { sites, nextLink } = await searchSites(contextRef, search);
15
+ for (const site of sites) {
16
+ yield site;
17
+ }
18
+ while (nextLink) {
19
+ const accessToken = await contextRef.context.generateAccessToken();
20
+ const response = await fetch(nextLink, {
21
+ headers: {
22
+ authorization: `Bearer ${accessToken}`,
23
+ },
24
+ });
25
+ const result = (await response.json());
26
+ sites = result.value;
27
+ nextLink = result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null;
28
+ for (const site of sites) {
29
+ yield site;
30
+ }
31
+ }
32
+ }
@@ -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. |
@@ -180,12 +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. |
186
185
  | [iterateDriveItems](iterateDriveItems.md) | List drive items in a drive or a drive item. |
187
186
  | [iterateDrives](iterateDrives.md) | List drives in a site as an async iterable. |
188
187
  | [iterateSites](iterateSites.md) | List sites in your company geography as an async iterable. |
188
+ | [iterateSiteSearch](iterateSiteSearch.md) | Iterate accessible sites matching the provided search keywords as an async iterable. |
189
189
  | [iterateWorkbookRangeRows](iterateWorkbookRangeRows.md) | Iterate over the rows in a given worksheet range. |
190
190
  | [readWorkbookRangeFirstRow](readWorkbookRangeFirstRow.md) | Read the first row from a given workbook range. |
191
191
  | [readWorkbookRangeRows](readWorkbookRangeRows.md) | Read all rows from a given workbook 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](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/workbookRange/getWorkbookRangeAlignment.ts#L20)
14
14
 
15
15
  Retrieve the format of a workbook range.
16
16
 
@@ -10,7 +10,7 @@ List drive items in a drive or a drive item.
10
10
 
11
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
12
 
13
- Defined in: src/tasks/iterateDriveItems.ts:21
13
+ Defined in: [src/tasks/iterateDriveItems.ts:21](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateDriveItems.ts#L21)
14
14
 
15
15
  List drive items in a drive or a drive item as an async iterable.
16
16
 
@@ -10,7 +10,7 @@ List drives in a site as an async iterable.
10
10
 
11
11
  > **iterateDrives**(`siteRef`, `maxPerChunk`): [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`DriveItem` & [`SiteRef`](Site-1.md#siteref) & `object`\>
12
12
 
13
- Defined in: src/tasks/iterateDrives.ts:19
13
+ Defined in: [src/tasks/iterateDrives.ts:19](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateDrives.ts#L19)
14
14
 
15
15
  List drives in a site as an async iterable.
16
16
 
@@ -0,0 +1,28 @@
1
+ [Microsoft Graph SDK](README.md) / iterateSiteSearch
2
+
3
+ # iterateSiteSearch
4
+
5
+ Iterate accessible sites matching the provided search keywords as an async iterable.
6
+
7
+ ## Functions
8
+
9
+ ### iterateSiteSearch()
10
+
11
+ > **iterateSiteSearch**(`contextRef`, `search`): [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`Site` & [`SiteRef`](Site-1.md#siteref)\>
12
+
13
+ Defined in: src/tasks/iterateSiteSearch.ts:18
14
+
15
+ Iterate accessible sites matching the provided search keywords as an async iterable.
16
+
17
+ #### Parameters
18
+
19
+ | Parameter | Type | Description |
20
+ | ------ | ------ | ------ |
21
+ | `contextRef` | [`ContextRef`](Context-1.md#contextref) | Reference to the context. |
22
+ | `search` | `string` | Search keywords to find matching sites. |
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.
@@ -10,7 +10,7 @@ List sites in your company geography as an async iterable.
10
10
 
11
11
  > **iterateSites**(`contextRef`, `maxPerChunk`): [`AsyncGenerator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator)\<`Site` & [`SiteRef`](Site-1.md#siteref)\>
12
12
 
13
- Defined in: src/tasks/iterateSites.ts:19
13
+ Defined in: [src/tasks/iterateSites.ts:19](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/iterateSites.ts#L19)
14
14
 
15
15
  List sites in your company geography as an async iterable.
16
16