microsoft-graph 3.12.24 → 3.12.25
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/driveItem/createDriveItemLink.d.ts.map +1 -1
- package/dist/cjs/operations/driveItem/createDriveItemLink.js +2 -0
- package/dist/cjs/operations/driveItem/findDriveItem.d.ts +28 -0
- package/dist/cjs/operations/driveItem/findDriveItem.d.ts.map +1 -0
- package/dist/cjs/operations/driveItem/findDriveItem.js +56 -0
- package/dist/esm/operations/driveItem/createDriveItemLink.d.ts.map +1 -1
- package/dist/esm/operations/driveItem/createDriveItemLink.js +2 -0
- package/dist/esm/operations/driveItem/findDriveItem.d.ts +28 -0
- package/dist/esm/operations/driveItem/findDriveItem.d.ts.map +1 -0
- package/dist/esm/operations/driveItem/findDriveItem.js +50 -0
- package/docs/api/README.md +1 -0
- package/docs/api/findDriveItem.md +64 -0
- package/package.json +11 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,CAqBlI"}
|
|
@@ -22,8 +22,10 @@ function createDriveItemLink(itemRef, options) {
|
|
|
22
22
|
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
23
23
|
if (scope)
|
|
24
24
|
body["scope"] = scope;
|
|
25
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
25
26
|
if (password)
|
|
26
27
|
body["password"] = password;
|
|
28
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
27
29
|
if (expirationDateTime)
|
|
28
30
|
body["expirationDateTime"] = expirationDateTime;
|
|
29
31
|
return (0, operationInvoker_ts_1.operation)({
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search for drive items under a given parent path.
|
|
3
|
+
* @module findDriveItem
|
|
4
|
+
* @category Operations
|
|
5
|
+
*/
|
|
6
|
+
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { DriveRef } from "../../models/Drive.ts";
|
|
8
|
+
import type { DriveItemPath, DriveItemRef } from "../../models/DriveItem.ts";
|
|
9
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
10
|
+
export type FindDriveItemResponse = {
|
|
11
|
+
value: DriveItem[];
|
|
12
|
+
"@odata.nextLink"?: string | null;
|
|
13
|
+
};
|
|
14
|
+
export type DriveItemSearchList = {
|
|
15
|
+
items: (DriveItem & DriveItemRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
20
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
21
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
22
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
23
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
24
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
25
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
26
|
+
*/
|
|
27
|
+
export default function findDriveItem(parentRef: DriveRef, query: string, parentPath?: DriveItemPath, take?: number): GraphOperation<DriveItemSearchList>;
|
|
28
|
+
//# sourceMappingURL=findDriveItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/findDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,GAAE,aAAoC,EAAE,IAAI,SAAM,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAmC3K"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Search for drive items under a given parent path.
|
|
4
|
+
* @module findDriveItem
|
|
5
|
+
* @category Operations
|
|
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 = findDriveItem;
|
|
12
|
+
const InvalidArgumentError_ts_1 = __importDefault(require("../../errors/InvalidArgumentError.js"));
|
|
13
|
+
const driveItem_ts_1 = require("../../services/driveItem.js");
|
|
14
|
+
const operationInvoker_ts_1 = require("../../services/operationInvoker.js");
|
|
15
|
+
const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
16
|
+
/**
|
|
17
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
18
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
19
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
20
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
21
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
22
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
23
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
24
|
+
*/
|
|
25
|
+
function findDriveItem(parentRef, query, parentPath = "/", take = 100) {
|
|
26
|
+
if (!parentPath.startsWith("/")) {
|
|
27
|
+
throw new InvalidArgumentError_ts_1.default("parentPath must start with a forward slash (/)");
|
|
28
|
+
}
|
|
29
|
+
if (take <= 0) {
|
|
30
|
+
throw new InvalidArgumentError_ts_1.default("take must be greater than 0");
|
|
31
|
+
}
|
|
32
|
+
const encodedParentPath = parentPath
|
|
33
|
+
.split("/")
|
|
34
|
+
.map((seg, i) => (i === 0 ? seg : encodeURIComponent(seg)))
|
|
35
|
+
.join("/");
|
|
36
|
+
const encodedQuery = encodeURIComponent(query);
|
|
37
|
+
const scopeSegment = encodedParentPath === "/" ? "/root" : `/root:${encodedParentPath}:`;
|
|
38
|
+
const searchPath = `/sites/{site-id}/drives/{drive-id}${scopeSegment}/search(q='${encodedQuery}')?$top=${take}`;
|
|
39
|
+
return (0, operationInvoker_ts_1.operation)({
|
|
40
|
+
context: parentRef.context,
|
|
41
|
+
method: "GET",
|
|
42
|
+
path: (0, templatedPaths_ts_1.generatePath)(searchPath, parentRef),
|
|
43
|
+
headers: {},
|
|
44
|
+
body: null,
|
|
45
|
+
responseTransform: (response) => {
|
|
46
|
+
const result = response;
|
|
47
|
+
return {
|
|
48
|
+
items: (result.value ?? []).map((item) => ({
|
|
49
|
+
...item,
|
|
50
|
+
...(0, driveItem_ts_1.createDriveItemRef)(parentRef, item.id),
|
|
51
|
+
})),
|
|
52
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"createDriveItemLink.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErG;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,qDAAqD;IACrD,IAAI,EAAE,iBAAiB,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAAC,UAAU,CAAC,CAqBlI"}
|
|
@@ -19,8 +19,10 @@ export default function createDriveItemLink(itemRef, options) {
|
|
|
19
19
|
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
20
20
|
if (scope)
|
|
21
21
|
body["scope"] = scope;
|
|
22
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
22
23
|
if (password)
|
|
23
24
|
body["password"] = password;
|
|
25
|
+
// biome-ignore lint/complexity/useLiteralKeys: Literal keys are needed
|
|
24
26
|
if (expirationDateTime)
|
|
25
27
|
body["expirationDateTime"] = expirationDateTime;
|
|
26
28
|
return operation({
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search for drive items under a given parent path.
|
|
3
|
+
* @module findDriveItem
|
|
4
|
+
* @category Operations
|
|
5
|
+
*/
|
|
6
|
+
import type { DriveItem } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { DriveRef } from "../../models/Drive.ts";
|
|
8
|
+
import type { DriveItemPath, DriveItemRef } from "../../models/DriveItem.ts";
|
|
9
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
10
|
+
export type FindDriveItemResponse = {
|
|
11
|
+
value: DriveItem[];
|
|
12
|
+
"@odata.nextLink"?: string | null;
|
|
13
|
+
};
|
|
14
|
+
export type DriveItemSearchList = {
|
|
15
|
+
items: (DriveItem & DriveItemRef)[];
|
|
16
|
+
nextLink: URL | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
20
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
21
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
22
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
23
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
24
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
25
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
26
|
+
*/
|
|
27
|
+
export default function findDriveItem(parentRef: DriveRef, query: string, parentPath?: DriveItemPath, take?: number): GraphOperation<DriveItemSearchList>;
|
|
28
|
+
//# sourceMappingURL=findDriveItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/findDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,GAAE,aAAoC,EAAE,IAAI,SAAM,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAmC3K"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search for drive items under a given parent path.
|
|
3
|
+
* @module findDriveItem
|
|
4
|
+
* @category Operations
|
|
5
|
+
*/
|
|
6
|
+
import InvalidArgumentError from "../../errors/InvalidArgumentError.js";
|
|
7
|
+
import { createDriveItemRef } from "../../services/driveItem.js";
|
|
8
|
+
import { operation } from "../../services/operationInvoker.js";
|
|
9
|
+
import { generatePath } from "../../services/templatedPaths.js";
|
|
10
|
+
/**
|
|
11
|
+
* Search for drive items below a parent path using the Graph search endpoint.
|
|
12
|
+
* @param parentRef Reference to the parent drive (root of search scope).
|
|
13
|
+
* @param query Search query string (what to look for). Passed directly to q='...'.
|
|
14
|
+
* @param parentPath Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'.
|
|
15
|
+
* @param take Maximum number of items to retrieve (page size). Defaults to 100.
|
|
16
|
+
* @returns List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
17
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
|
18
|
+
*/
|
|
19
|
+
export default function findDriveItem(parentRef, query, parentPath = "/", take = 100) {
|
|
20
|
+
if (!parentPath.startsWith("/")) {
|
|
21
|
+
throw new InvalidArgumentError("parentPath must start with a forward slash (/)");
|
|
22
|
+
}
|
|
23
|
+
if (take <= 0) {
|
|
24
|
+
throw new InvalidArgumentError("take must be greater than 0");
|
|
25
|
+
}
|
|
26
|
+
const encodedParentPath = parentPath
|
|
27
|
+
.split("/")
|
|
28
|
+
.map((seg, i) => (i === 0 ? seg : encodeURIComponent(seg)))
|
|
29
|
+
.join("/");
|
|
30
|
+
const encodedQuery = encodeURIComponent(query);
|
|
31
|
+
const scopeSegment = encodedParentPath === "/" ? "/root" : `/root:${encodedParentPath}:`;
|
|
32
|
+
const searchPath = `/sites/{site-id}/drives/{drive-id}${scopeSegment}/search(q='${encodedQuery}')?$top=${take}`;
|
|
33
|
+
return operation({
|
|
34
|
+
context: parentRef.context,
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: generatePath(searchPath, parentRef),
|
|
37
|
+
headers: {},
|
|
38
|
+
body: null,
|
|
39
|
+
responseTransform: (response) => {
|
|
40
|
+
const result = response;
|
|
41
|
+
return {
|
|
42
|
+
items: (result.value ?? []).map((item) => ({
|
|
43
|
+
...item,
|
|
44
|
+
...createDriveItemRef(parentRef, item.id),
|
|
45
|
+
})),
|
|
46
|
+
nextLink: result["@odata.nextLink"] ? new URL(result["@odata.nextLink"]) : null,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
package/docs/api/README.md
CHANGED
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
| [deleteWorkbookTablePreservingValues](deleteWorkbookTablePreservingValues.md) | Converts the table into a normal range of cells. All data is preserved. |
|
|
95
95
|
| [deleteWorkbookWorksheet](deleteWorkbookWorksheet.md) | Permanently delete a worksheet. |
|
|
96
96
|
| [existsDriveItem](existsDriveItem.md) | Check if a given drive item exists. |
|
|
97
|
+
| [findDriveItem](findDriveItem.md) | Search for drive items under a given parent path. |
|
|
97
98
|
| [getDriveItem](getDriveItem.md) | Retrieve the metadata for an item in a drive. |
|
|
98
99
|
| [getDriveItemByPath](getDriveItemByPath.md) | Retrieve the metadata for an item in a drive by file path. |
|
|
99
100
|
| [getSite](getSite.md) | Retrieve properties for a site resource. |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[Microsoft Graph SDK](README.md) / findDriveItem
|
|
2
|
+
|
|
3
|
+
# findDriveItem
|
|
4
|
+
|
|
5
|
+
Search for drive items under a given parent path.
|
|
6
|
+
|
|
7
|
+
## Type Aliases
|
|
8
|
+
|
|
9
|
+
### DriveItemSearchList
|
|
10
|
+
|
|
11
|
+
> **DriveItemSearchList** = `object`
|
|
12
|
+
|
|
13
|
+
Defined in: [src/operations/driveItem/findDriveItem.ts:21](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/findDriveItem.ts#L21)
|
|
14
|
+
|
|
15
|
+
#### Properties
|
|
16
|
+
|
|
17
|
+
| Property | Type | Defined in |
|
|
18
|
+
| ------ | ------ | ------ |
|
|
19
|
+
| <a id="items"></a> `items` | `DriveItem` & [`DriveItemRef`](DriveItem-1.md#driveitemref)[] | [src/operations/driveItem/findDriveItem.ts:22](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/findDriveItem.ts#L22) |
|
|
20
|
+
| <a id="nextlink"></a> `nextLink` | [`URL`](https://developer.mozilla.org/docs/Web/API/URL) \| `null` | [src/operations/driveItem/findDriveItem.ts:23](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/findDriveItem.ts#L23) |
|
|
21
|
+
|
|
22
|
+
***
|
|
23
|
+
|
|
24
|
+
### FindDriveItemResponse
|
|
25
|
+
|
|
26
|
+
> **FindDriveItemResponse** = `object`
|
|
27
|
+
|
|
28
|
+
Defined in: [src/operations/driveItem/findDriveItem.ts:16](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/findDriveItem.ts#L16)
|
|
29
|
+
|
|
30
|
+
#### Properties
|
|
31
|
+
|
|
32
|
+
| Property | Type | Defined in |
|
|
33
|
+
| ------ | ------ | ------ |
|
|
34
|
+
| <a id="odatanextlink"></a> `@odata.nextLink?` | `string` \| `null` | [src/operations/driveItem/findDriveItem.ts:18](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/findDriveItem.ts#L18) |
|
|
35
|
+
| <a id="value"></a> `value` | `DriveItem`[] | [src/operations/driveItem/findDriveItem.ts:17](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/findDriveItem.ts#L17) |
|
|
36
|
+
|
|
37
|
+
## Functions
|
|
38
|
+
|
|
39
|
+
### findDriveItem()
|
|
40
|
+
|
|
41
|
+
> **findDriveItem**(`parentRef`, `query`, `parentPath`, `take`): [`GraphOperation`](GraphOperation.md#graphoperation)\<[`DriveItemSearchList`](#driveitemsearchlist)\>
|
|
42
|
+
|
|
43
|
+
Defined in: [src/operations/driveItem/findDriveItem.ts:35](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/findDriveItem.ts#L35)
|
|
44
|
+
|
|
45
|
+
Search for drive items below a parent path using the Graph search endpoint.
|
|
46
|
+
|
|
47
|
+
#### Parameters
|
|
48
|
+
|
|
49
|
+
| Parameter | Type | Default value | Description |
|
|
50
|
+
| ------ | ------ | ------ | ------ |
|
|
51
|
+
| `parentRef` | [`DriveRef`](Drive-1.md#driveref) | `undefined` | Reference to the parent drive (root of search scope). |
|
|
52
|
+
| `query` | `string` | `undefined` | Search query string (what to look for). Passed directly to q='...'. |
|
|
53
|
+
| `parentPath` | [`DriveItemPath`](DriveItem-1.md#driveitempath) | `...` | Path under the drive root to scope the search (must start with '/'). Provide '/' for entire drive root. Example: '/Documents'. |
|
|
54
|
+
| `take` | `number` | `100` | Maximum number of items to retrieve (page size). Defaults to 100. |
|
|
55
|
+
|
|
56
|
+
#### Returns
|
|
57
|
+
|
|
58
|
+
[`GraphOperation`](GraphOperation.md#graphoperation)\<[`DriveItemSearchList`](#driveitemsearchlist)\>
|
|
59
|
+
|
|
60
|
+
List of matching items (first page) including reference info and potential nextLink for pagination.
|
|
61
|
+
|
|
62
|
+
#### See
|
|
63
|
+
|
|
64
|
+
https://learn.microsoft.com/en-us/graph/api/driveitem-search
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microsoft-graph",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.25",
|
|
4
4
|
"description": "Microsoft GraphAPI SDK for NodeJS",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -716,6 +716,16 @@
|
|
|
716
716
|
"require": "./dist/cjs/operations/driveItem/existsDriveItem.js",
|
|
717
717
|
"types": "./dist/esm/operations/driveItem/existsDriveItem.d.ts"
|
|
718
718
|
},
|
|
719
|
+
"./findDriveItem": {
|
|
720
|
+
"import": "./dist/esm/operations/driveItem/findDriveItem.js",
|
|
721
|
+
"require": "./dist/cjs/operations/driveItem/findDriveItem.js",
|
|
722
|
+
"types": "./dist/esm/operations/driveItem/findDriveItem.d.ts"
|
|
723
|
+
},
|
|
724
|
+
"./dist/cjs/operations/driveItem/findDriveItem": {
|
|
725
|
+
"import": "./dist/esm/operations/driveItem/findDriveItem.js",
|
|
726
|
+
"require": "./dist/cjs/operations/driveItem/findDriveItem.js",
|
|
727
|
+
"types": "./dist/esm/operations/driveItem/findDriveItem.d.ts"
|
|
728
|
+
},
|
|
719
729
|
"./getDriveItem": {
|
|
720
730
|
"import": "./dist/esm/operations/driveItem/getDriveItem.js",
|
|
721
731
|
"require": "./dist/cjs/operations/driveItem/getDriveItem.js",
|