microsoft-graph 3.9.5 → 3.9.7

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.
@@ -3,6 +3,7 @@
3
3
  * @module streamDriveItemContent
4
4
  * @category Operations
5
5
  */
6
+ import type { Readable } from "node:stream";
6
7
  import type { DriveItemRef } from "../../models/DriveItem.ts";
7
8
  /**
8
9
  * Stream the content of a drive item.
@@ -12,5 +13,5 @@ import type { DriveItemRef } from "../../models/DriveItem.ts";
12
13
  * @throws Error if the download fails or the response is not a stream.
13
14
  * @see https://learn.microsoft.com/en-us/graph/api/driveitem-get-content
14
15
  */
15
- export default function streamDriveItemContent(itemRef: DriveItemRef): Promise<NodeJS.ReadableStream>;
16
+ export default function streamDriveItemContent(itemRef: DriveItemRef): Promise<Readable>;
16
17
  //# sourceMappingURL=streamDriveItemContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streamDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/streamDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D;;;;;;;GAOG;AACH,wBAA8B,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAe1G"}
1
+ {"version":3,"file":"streamDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/streamDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D;;;;;;;GAOG;AACH,wBAA8B,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,CAe7F"}
@@ -7,12 +7,12 @@ import type { DriveItem } from "@microsoft/microsoft-graph-types";
7
7
  import type { DriveRef } from "../models/Drive.ts";
8
8
  import type { DriveItemPath, DriveItemRef } from "../models/DriveItem.ts";
9
9
  /**
10
- * Attempts to retrieve the metadata for an item in a drive by file path.
10
+ * Attempts to retrieve the metadata for an item in a drive or folder by file path.
11
11
  * Returns null if the item does not exist (NotFoundError).
12
- * @param driveRef Reference to the drive containing the item.
12
+ * @param parentRef Reference to the drive or folder containing the item.
13
13
  * @param itemPath Path of the item within the drive.
14
14
  * @returns The metadata of the specified drive item, or null if not found.
15
15
  * @see https://learn.microsoft.com/en-us/graph/api/driveitem-get
16
16
  */
17
- export default function tryGetDriveItemByPath(driveRef: DriveRef, itemPath: DriveItemPath): Promise<(DriveItem & DriveItemRef) | null>;
17
+ export default function tryGetDriveItemByPath(parentRef: DriveRef | DriveItemRef, itemPath: DriveItemPath): Promise<(DriveItem & DriveItemRef) | null>;
18
18
  //# sourceMappingURL=tryGetDriveItemByPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tryGetDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../src/tasks/tryGetDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI1E;;;;;;;GAOG;AACH,wBAA8B,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,GAAG,IAAI,CAAC,CAS3I"}
1
+ {"version":3,"file":"tryGetDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../src/tasks/tryGetDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI1E;;;;;;;GAOG;AACH,wBAA8B,qBAAqB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,GAAG,IAAI,CAAC,CAS3J"}
@@ -7,16 +7,16 @@ exports.default = tryGetDriveItemByPath;
7
7
  const getDriveItemByPath_ts_1 = __importDefault(require("../operations/driveItem/getDriveItemByPath.js"));
8
8
  const error_ts_1 = require("../services/error.js");
9
9
  /**
10
- * Attempts to retrieve the metadata for an item in a drive by file path.
10
+ * Attempts to retrieve the metadata for an item in a drive or folder by file path.
11
11
  * Returns null if the item does not exist (NotFoundError).
12
- * @param driveRef Reference to the drive containing the item.
12
+ * @param parentRef Reference to the drive or folder containing the item.
13
13
  * @param itemPath Path of the item within the drive.
14
14
  * @returns The metadata of the specified drive item, or null if not found.
15
15
  * @see https://learn.microsoft.com/en-us/graph/api/driveitem-get
16
16
  */
17
- async function tryGetDriveItemByPath(driveRef, itemPath) {
17
+ async function tryGetDriveItemByPath(parentRef, itemPath) {
18
18
  try {
19
- return await (0, getDriveItemByPath_ts_1.default)(driveRef, itemPath);
19
+ return await (0, getDriveItemByPath_ts_1.default)(parentRef, itemPath);
20
20
  }
21
21
  catch (error) {
22
22
  if ((0, error_ts_1.isErrorWithName)(error, "NotFoundError")) {
@@ -3,6 +3,7 @@
3
3
  * @module streamDriveItemContent
4
4
  * @category Operations
5
5
  */
6
+ import type { Readable } from "node:stream";
6
7
  import type { DriveItemRef } from "../../models/DriveItem.ts";
7
8
  /**
8
9
  * Stream the content of a drive item.
@@ -12,5 +13,5 @@ import type { DriveItemRef } from "../../models/DriveItem.ts";
12
13
  * @throws Error if the download fails or the response is not a stream.
13
14
  * @see https://learn.microsoft.com/en-us/graph/api/driveitem-get-content
14
15
  */
15
- export default function streamDriveItemContent(itemRef: DriveItemRef): Promise<NodeJS.ReadableStream>;
16
+ export default function streamDriveItemContent(itemRef: DriveItemRef): Promise<Readable>;
16
17
  //# sourceMappingURL=streamDriveItemContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streamDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/streamDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D;;;;;;;GAOG;AACH,wBAA8B,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAe1G"}
1
+ {"version":3,"file":"streamDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/streamDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D;;;;;;;GAOG;AACH,wBAA8B,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,CAe7F"}
@@ -7,12 +7,12 @@ import type { DriveItem } from "@microsoft/microsoft-graph-types";
7
7
  import type { DriveRef } from "../models/Drive.ts";
8
8
  import type { DriveItemPath, DriveItemRef } from "../models/DriveItem.ts";
9
9
  /**
10
- * Attempts to retrieve the metadata for an item in a drive by file path.
10
+ * Attempts to retrieve the metadata for an item in a drive or folder by file path.
11
11
  * Returns null if the item does not exist (NotFoundError).
12
- * @param driveRef Reference to the drive containing the item.
12
+ * @param parentRef Reference to the drive or folder containing the item.
13
13
  * @param itemPath Path of the item within the drive.
14
14
  * @returns The metadata of the specified drive item, or null if not found.
15
15
  * @see https://learn.microsoft.com/en-us/graph/api/driveitem-get
16
16
  */
17
- export default function tryGetDriveItemByPath(driveRef: DriveRef, itemPath: DriveItemPath): Promise<(DriveItem & DriveItemRef) | null>;
17
+ export default function tryGetDriveItemByPath(parentRef: DriveRef | DriveItemRef, itemPath: DriveItemPath): Promise<(DriveItem & DriveItemRef) | null>;
18
18
  //# sourceMappingURL=tryGetDriveItemByPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tryGetDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../src/tasks/tryGetDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI1E;;;;;;;GAOG;AACH,wBAA8B,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,GAAG,IAAI,CAAC,CAS3I"}
1
+ {"version":3,"file":"tryGetDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../src/tasks/tryGetDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI1E;;;;;;;GAOG;AACH,wBAA8B,qBAAqB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,GAAG,IAAI,CAAC,CAS3J"}
@@ -1,16 +1,16 @@
1
1
  import getDriveItemByPath from "../operations/driveItem/getDriveItemByPath.js";
2
2
  import { isErrorWithName } from "../services/error.js";
3
3
  /**
4
- * Attempts to retrieve the metadata for an item in a drive by file path.
4
+ * Attempts to retrieve the metadata for an item in a drive or folder by file path.
5
5
  * Returns null if the item does not exist (NotFoundError).
6
- * @param driveRef Reference to the drive containing the item.
6
+ * @param parentRef Reference to the drive or folder containing the item.
7
7
  * @param itemPath Path of the item within the drive.
8
8
  * @returns The metadata of the specified drive item, or null if not found.
9
9
  * @see https://learn.microsoft.com/en-us/graph/api/driveitem-get
10
10
  */
11
- export default async function tryGetDriveItemByPath(driveRef, itemPath) {
11
+ export default async function tryGetDriveItemByPath(parentRef, itemPath) {
12
12
  try {
13
- return await getDriveItemByPath(driveRef, itemPath);
13
+ return await getDriveItemByPath(parentRef, itemPath);
14
14
  }
15
15
  catch (error) {
16
16
  if (isErrorWithName(error, "NotFoundError")) {
@@ -8,9 +8,9 @@ Stream the content of a drive item as a Node.js readable stream.
8
8
 
9
9
  ### streamDriveItemContent()
10
10
 
11
- > **streamDriveItemContent**(`itemRef`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ReadableStream`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L202)\>
11
+ > **streamDriveItemContent**(`itemRef`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Readable`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/stream.d.ts#L68)\>
12
12
 
13
- Defined in: [src/operations/driveItem/streamDriveItemContent.ts:20](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/streamDriveItemContent.ts#L20)
13
+ Defined in: [src/operations/driveItem/streamDriveItemContent.ts:21](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/streamDriveItemContent.ts#L21)
14
14
 
15
15
  Stream the content of a drive item.
16
16
 
@@ -22,7 +22,7 @@ Stream the content of a drive item.
22
22
 
23
23
  #### Returns
24
24
 
25
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ReadableStream`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L202)\>
25
+ [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Readable`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/stream.d.ts#L68)\>
26
26
 
27
27
  A Node.js readable stream of the drive item content.
28
28
 
@@ -8,18 +8,18 @@ Attempts to retrieve the metadata for an item in a drive by file path, returning
8
8
 
9
9
  ### tryGetDriveItemByPath()
10
10
 
11
- > **tryGetDriveItemByPath**(`driveRef`, `itemPath`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| `DriveItem` & [`SiteRef`](Site-1.md#siteref) & `object` & `object`\>
11
+ > **tryGetDriveItemByPath**(`parentRef`, `itemPath`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| `DriveItem` & [`SiteRef`](Site-1.md#siteref) & `object` & `object`\>
12
12
 
13
13
  Defined in: [src/tasks/tryGetDriveItemByPath.ts:20](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/tryGetDriveItemByPath.ts#L20)
14
14
 
15
- Attempts to retrieve the metadata for an item in a drive by file path.
15
+ Attempts to retrieve the metadata for an item in a drive or folder by file path.
16
16
  Returns null if the item does not exist (NotFoundError).
17
17
 
18
18
  #### Parameters
19
19
 
20
20
  | Parameter | Type | Description |
21
21
  | ------ | ------ | ------ |
22
- | `driveRef` | [`DriveRef`](Drive-1.md#driveref) | Reference to the drive containing the item. |
22
+ | `parentRef` | [`DriveRef`](Drive-1.md#driveref) \| [`DriveItemRef`](DriveItem-1.md#driveitemref) | Reference to the drive or folder containing the item. |
23
23
  | `itemPath` | [`DriveItemPath`](DriveItem-1.md#driveitempath) | Path of the item within the drive. |
24
24
 
25
25
  #### Returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "3.9.5",
3
+ "version": "3.9.7",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",