microsoft-graph 2.12.0 → 2.13.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.
- package/biome.jsonc +1 -1
- package/dist/cjs/operations/driveItem/moveDriveItem.d.ts +14 -0
- package/dist/cjs/operations/driveItem/moveDriveItem.d.ts.map +1 -0
- package/dist/cjs/operations/driveItem/moveDriveItem.js +33 -0
- package/dist/esm/operations/driveItem/moveDriveItem.d.ts +14 -0
- package/dist/esm/operations/driveItem/moveDriveItem.d.ts.map +1 -0
- package/dist/esm/operations/driveItem/moveDriveItem.js +30 -0
- package/package.json +2897 -717
- package/update-exports.ts +71 -88
- package/vitest.config.ts +17 -17
package/biome.jsonc
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DriveItemRef } from "../../models/DriveItemRef.ts";
|
|
2
|
+
import type { DriveRef } from "../../models/DriveRef.ts";
|
|
3
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Moves a file to a new location in the same drive.
|
|
6
|
+
*
|
|
7
|
+
* @param srcFileRef - A reference to the source file to be copied.
|
|
8
|
+
* @param dstFolderRef - A reference to the destination folder or site (if targeting root).
|
|
9
|
+
* @param dstFileName - The name of the copied file.
|
|
10
|
+
* @returns new DriveItemRef.
|
|
11
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-move
|
|
12
|
+
*/
|
|
13
|
+
export default function moveDriveItem(srcFileRef: DriveItemRef, dstFolderRef: DriveRef | DriveItemRef, dstFileName: string): GraphOperation<void>;
|
|
14
|
+
//# sourceMappingURL=moveDriveItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moveDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/moveDriveItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGrE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,GAAG,YAAY,EAAE,WAAW,EAAE,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAkBhJ"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = moveDriveItem;
|
|
4
|
+
const graphApi_ts_1 = require("../../graphApi.js");
|
|
5
|
+
const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
|
|
6
|
+
/**
|
|
7
|
+
* Moves a file to a new location in the same drive.
|
|
8
|
+
*
|
|
9
|
+
* @param srcFileRef - A reference to the source file to be copied.
|
|
10
|
+
* @param dstFolderRef - A reference to the destination folder or site (if targeting root).
|
|
11
|
+
* @param dstFileName - The name of the copied file.
|
|
12
|
+
* @returns new DriveItemRef.
|
|
13
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-move
|
|
14
|
+
*/
|
|
15
|
+
function moveDriveItem(srcFileRef, dstFolderRef, dstFileName) {
|
|
16
|
+
return (0, graphApi_ts_1.operation)({
|
|
17
|
+
contextId: srcFileRef.contextId,
|
|
18
|
+
method: "PATCH",
|
|
19
|
+
path: (0, templatedPaths_ts_1.generatePath)("/sites/{site-id}/drives/{drive-id}/items/{item-id}", srcFileRef),
|
|
20
|
+
headers: {
|
|
21
|
+
"content-type": "application/json",
|
|
22
|
+
},
|
|
23
|
+
body: {
|
|
24
|
+
name: dstFileName,
|
|
25
|
+
parentReference: {
|
|
26
|
+
siteId: dstFolderRef.siteId,
|
|
27
|
+
driveId: dstFolderRef.driveId,
|
|
28
|
+
id: "itemId" in dstFolderRef ? dstFolderRef.itemId : "root",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
responseTransform: () => undefined,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DriveItemRef } from "../../models/DriveItemRef.ts";
|
|
2
|
+
import type { DriveRef } from "../../models/DriveRef.ts";
|
|
3
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Moves a file to a new location in the same drive.
|
|
6
|
+
*
|
|
7
|
+
* @param srcFileRef - A reference to the source file to be copied.
|
|
8
|
+
* @param dstFolderRef - A reference to the destination folder or site (if targeting root).
|
|
9
|
+
* @param dstFileName - The name of the copied file.
|
|
10
|
+
* @returns new DriveItemRef.
|
|
11
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-move
|
|
12
|
+
*/
|
|
13
|
+
export default function moveDriveItem(srcFileRef: DriveItemRef, dstFolderRef: DriveRef | DriveItemRef, dstFileName: string): GraphOperation<void>;
|
|
14
|
+
//# sourceMappingURL=moveDriveItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moveDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/moveDriveItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGrE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,GAAG,YAAY,EAAE,WAAW,EAAE,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAkBhJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { operation } from "../../graphApi.js";
|
|
2
|
+
import { generatePath } from "../../services/templatedPaths.js";
|
|
3
|
+
/**
|
|
4
|
+
* Moves a file to a new location in the same drive.
|
|
5
|
+
*
|
|
6
|
+
* @param srcFileRef - A reference to the source file to be copied.
|
|
7
|
+
* @param dstFolderRef - A reference to the destination folder or site (if targeting root).
|
|
8
|
+
* @param dstFileName - The name of the copied file.
|
|
9
|
+
* @returns new DriveItemRef.
|
|
10
|
+
* @see https://learn.microsoft.com/en-us/graph/api/driveitem-move
|
|
11
|
+
*/
|
|
12
|
+
export default function moveDriveItem(srcFileRef, dstFolderRef, dstFileName) {
|
|
13
|
+
return operation({
|
|
14
|
+
contextId: srcFileRef.contextId,
|
|
15
|
+
method: "PATCH",
|
|
16
|
+
path: generatePath("/sites/{site-id}/drives/{drive-id}/items/{item-id}", srcFileRef),
|
|
17
|
+
headers: {
|
|
18
|
+
"content-type": "application/json",
|
|
19
|
+
},
|
|
20
|
+
body: {
|
|
21
|
+
name: dstFileName,
|
|
22
|
+
parentReference: {
|
|
23
|
+
siteId: dstFolderRef.siteId,
|
|
24
|
+
driveId: dstFolderRef.driveId,
|
|
25
|
+
id: "itemId" in dstFolderRef ? dstFolderRef.itemId : "root",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
responseTransform: () => undefined,
|
|
29
|
+
});
|
|
30
|
+
}
|