microsoft-graph 3.10.7 → 3.11.9
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/deleteDriveItem.d.ts +18 -2
- package/dist/cjs/operations/driveItem/deleteDriveItem.d.ts.map +1 -1
- package/dist/cjs/operations/driveItem/deleteDriveItem.js +6 -3
- package/dist/esm/operations/driveItem/deleteDriveItem.d.ts +18 -2
- package/dist/esm/operations/driveItem/deleteDriveItem.d.ts.map +1 -1
- package/dist/esm/operations/driveItem/deleteDriveItem.js +6 -3
- package/docs/api/deleteDriveItem.md +21 -3
- package/package.json +1 -1
|
@@ -5,10 +5,26 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { DriveItemRef } from "../../models/DriveItem.ts";
|
|
7
7
|
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
8
|
+
/**
|
|
9
|
+
* Options for deleting a drive item.
|
|
10
|
+
* @property bypassSharedLock If true, bypasses any shared locks on the driveItem (e.g., from a coauthoring session).
|
|
11
|
+
* @property bypassCheckedOut If true, bypasses the checkout condition on the driveItem.
|
|
12
|
+
*/
|
|
13
|
+
export type DeleteDriveItemOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* If true, bypasses any shared locks on the driveItem (e.g., from a coauthoring session).
|
|
16
|
+
*/
|
|
17
|
+
bypassSharedLock?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true, bypasses the checkout condition on the driveItem.
|
|
20
|
+
*/
|
|
21
|
+
bypassCheckedOut?: boolean;
|
|
22
|
+
};
|
|
8
23
|
/**
|
|
9
24
|
* Delete an item from a drive.
|
|
10
25
|
* @param itemRef Reference to the drive item to be deleted.
|
|
11
|
-
*
|
|
26
|
+
* @param options Optional settings for the delete operation.
|
|
27
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-delete
|
|
12
28
|
*/
|
|
13
|
-
export default function deleteDriveItem(itemRef: DriveItemRef): GraphOperation<void>;
|
|
29
|
+
export default function deleteDriveItem(itemRef: DriveItemRef, options?: DeleteDriveItemOptions): GraphOperation<void>;
|
|
14
30
|
//# sourceMappingURL=deleteDriveItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/deleteDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"deleteDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/deleteDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,GAAE,sBAA2B,GAAG,cAAc,CAAC,IAAI,CAAC,CAWzH"}
|
|
@@ -11,14 +11,17 @@ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
|
11
11
|
/**
|
|
12
12
|
* Delete an item from a drive.
|
|
13
13
|
* @param itemRef Reference to the drive item to be deleted.
|
|
14
|
-
*
|
|
14
|
+
* @param options Optional settings for the delete operation.
|
|
15
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-delete
|
|
15
16
|
*/
|
|
16
|
-
function deleteDriveItem(itemRef) {
|
|
17
|
+
function deleteDriveItem(itemRef, options = {}) {
|
|
18
|
+
const prefer = [options.bypassSharedLock && "bypass-shared-lock", options.bypassCheckedOut && "bypass-checked-out"].filter(Boolean).join(", ");
|
|
19
|
+
const headers = prefer ? { prefer } : {};
|
|
17
20
|
return (0, operationInvoker_ts_1.operation)({
|
|
18
21
|
context: itemRef.context,
|
|
19
22
|
method: "DELETE",
|
|
20
23
|
path: (0, templatedPaths_ts_1.generatePath)("/sites/{site-id}/drives/{drive-id}/items/{item-id}", itemRef),
|
|
21
|
-
headers
|
|
24
|
+
headers,
|
|
22
25
|
body: null,
|
|
23
26
|
responseTransform: () => undefined,
|
|
24
27
|
});
|
|
@@ -5,10 +5,26 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { DriveItemRef } from "../../models/DriveItem.ts";
|
|
7
7
|
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
8
|
+
/**
|
|
9
|
+
* Options for deleting a drive item.
|
|
10
|
+
* @property bypassSharedLock If true, bypasses any shared locks on the driveItem (e.g., from a coauthoring session).
|
|
11
|
+
* @property bypassCheckedOut If true, bypasses the checkout condition on the driveItem.
|
|
12
|
+
*/
|
|
13
|
+
export type DeleteDriveItemOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* If true, bypasses any shared locks on the driveItem (e.g., from a coauthoring session).
|
|
16
|
+
*/
|
|
17
|
+
bypassSharedLock?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true, bypasses the checkout condition on the driveItem.
|
|
20
|
+
*/
|
|
21
|
+
bypassCheckedOut?: boolean;
|
|
22
|
+
};
|
|
8
23
|
/**
|
|
9
24
|
* Delete an item from a drive.
|
|
10
25
|
* @param itemRef Reference to the drive item to be deleted.
|
|
11
|
-
*
|
|
26
|
+
* @param options Optional settings for the delete operation.
|
|
27
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-delete
|
|
12
28
|
*/
|
|
13
|
-
export default function deleteDriveItem(itemRef: DriveItemRef): GraphOperation<void>;
|
|
29
|
+
export default function deleteDriveItem(itemRef: DriveItemRef, options?: DeleteDriveItemOptions): GraphOperation<void>;
|
|
14
30
|
//# sourceMappingURL=deleteDriveItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/deleteDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"deleteDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/deleteDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,GAAE,sBAA2B,GAAG,cAAc,CAAC,IAAI,CAAC,CAWzH"}
|
|
@@ -8,14 +8,17 @@ import { generatePath } from "../../services/templatedPaths.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* Delete an item from a drive.
|
|
10
10
|
* @param itemRef Reference to the drive item to be deleted.
|
|
11
|
-
*
|
|
11
|
+
* @param options Optional settings for the delete operation.
|
|
12
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-delete
|
|
12
13
|
*/
|
|
13
|
-
export default function deleteDriveItem(itemRef) {
|
|
14
|
+
export default function deleteDriveItem(itemRef, options = {}) {
|
|
15
|
+
const prefer = [options.bypassSharedLock && "bypass-shared-lock", options.bypassCheckedOut && "bypass-checked-out"].filter(Boolean).join(", ");
|
|
16
|
+
const headers = prefer ? { prefer } : {};
|
|
14
17
|
return operation({
|
|
15
18
|
context: itemRef.context,
|
|
16
19
|
method: "DELETE",
|
|
17
20
|
path: generatePath("/sites/{site-id}/drives/{drive-id}/items/{item-id}", itemRef),
|
|
18
|
-
headers
|
|
21
|
+
headers,
|
|
19
22
|
body: null,
|
|
20
23
|
responseTransform: () => undefined,
|
|
21
24
|
});
|
|
@@ -4,13 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
Delete an item from a drive.
|
|
6
6
|
|
|
7
|
+
## Type Aliases
|
|
8
|
+
|
|
9
|
+
### DeleteDriveItemOptions
|
|
10
|
+
|
|
11
|
+
> **DeleteDriveItemOptions** = `object`
|
|
12
|
+
|
|
13
|
+
Defined in: [src/operations/driveItem/deleteDriveItem.ts:17](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/deleteDriveItem.ts#L17)
|
|
14
|
+
|
|
15
|
+
Options for deleting a drive item.
|
|
16
|
+
|
|
17
|
+
#### Properties
|
|
18
|
+
|
|
19
|
+
| Property | Type | Description | Defined in |
|
|
20
|
+
| ------ | ------ | ------ | ------ |
|
|
21
|
+
| <a id="bypasscheckedout"></a> `bypassCheckedOut?` | `boolean` | If true, bypasses the checkout condition on the driveItem. | [src/operations/driveItem/deleteDriveItem.ts:25](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/deleteDriveItem.ts#L25) |
|
|
22
|
+
| <a id="bypasssharedlock"></a> `bypassSharedLock?` | `boolean` | If true, bypasses any shared locks on the driveItem (e.g., from a coauthoring session). | [src/operations/driveItem/deleteDriveItem.ts:21](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/deleteDriveItem.ts#L21) |
|
|
23
|
+
|
|
7
24
|
## Functions
|
|
8
25
|
|
|
9
26
|
### deleteDriveItem()
|
|
10
27
|
|
|
11
|
-
> **deleteDriveItem**(`itemRef`): [`GraphOperation`](GraphOperation.md#graphoperation)\<`void`\>
|
|
28
|
+
> **deleteDriveItem**(`itemRef`, `options`): [`GraphOperation`](GraphOperation.md#graphoperation)\<`void`\>
|
|
12
29
|
|
|
13
|
-
Defined in: [src/operations/driveItem/deleteDriveItem.ts:
|
|
30
|
+
Defined in: [src/operations/driveItem/deleteDriveItem.ts:34](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/operations/driveItem/deleteDriveItem.ts#L34)
|
|
14
31
|
|
|
15
32
|
Delete an item from a drive.
|
|
16
33
|
|
|
@@ -18,7 +35,8 @@ Delete an item from a drive.
|
|
|
18
35
|
|
|
19
36
|
| Parameter | Type | Description |
|
|
20
37
|
| ------ | ------ | ------ |
|
|
21
|
-
| `itemRef` | [`DriveItemRef`](DriveItem-1.md#driveitemref) | Reference to the drive item to be deleted.
|
|
38
|
+
| `itemRef` | [`DriveItemRef`](DriveItem-1.md#driveitemref) | Reference to the drive item to be deleted. |
|
|
39
|
+
| `options` | [`DeleteDriveItemOptions`](#deletedriveitemoptions) | Optional settings for the delete operation. |
|
|
22
40
|
|
|
23
41
|
#### Returns
|
|
24
42
|
|