@pnp/cli-microsoft365 6.8.0-beta.62006d7 → 6.8.0-beta.f473be5
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/.mocharc.json +1 -0
- package/dist/m365/spo/commands/file/file-checkin.js +8 -3
- package/dist/m365/spo/commands/file/file-checkout.js +8 -3
- package/dist/m365/spo/commands/file/file-copy.js +4 -4
- package/dist/m365/spo/commands/file/file-get.js +3 -1
- package/dist/m365/spo/commands/file/file-list.js +2 -2
- package/dist/m365/spo/commands/file/file-move.js +6 -7
- package/dist/m365/spo/commands/file/file-remove.js +3 -12
- package/dist/m365/spo/commands/file/file-rename.js +3 -3
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +2 -1
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +3 -3
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -1
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -2
- package/dist/m365/spo/commands/file/file-version-clear.js +3 -1
- package/dist/m365/spo/commands/file/file-version-get.js +3 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +3 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +3 -1
- package/dist/m365/spo/commands/folder/folder-copy.js +4 -4
- package/dist/m365/spo/commands/folder/folder-get.js +5 -2
- package/dist/m365/spo/commands/folder/folder-move.js +3 -2
- package/dist/m365/spo/commands/folder/folder-rename.js +5 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +46 -1
- package/dist/utils/spo.js +1 -1
- package/docs/docs/cmd/spo/file/file-add.md +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.md +1 -1
- package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
- package/docs/docs/cmd/spo/file/file-copy.md +1 -1
- package/docs/docs/cmd/spo/file/file-get.md +1 -1
- package/docs/docs/cmd/spo/file/file-move.md +3 -3
- package/docs/docs/cmd/spo/file/file-rename.md +1 -1
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.md +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.md +2 -2
- package/docs/docs/cmd/spo/file/file-roleassignment-add.md +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-add.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.md +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.md +2 -2
- package/docs/docs/cmd/spo/file/file-version-get.md +1 -1
- package/docs/docs/cmd/spo/file/file-version-list.md +1 -1
- package/docs/docs/cmd/spo/file/file-version-remove.md +1 -1
- package/docs/docs/cmd/spo/file/file-version-restore.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-add.md +9 -3
- package/docs/docs/cmd/spo/folder/folder-copy.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-get.md +7 -7
- package/docs/docs/cmd/spo/folder/folder-list.md +11 -11
- package/docs/docs/cmd/spo/folder/folder-move.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-remove.md +7 -7
- package/docs/docs/cmd/spo/folder/folder-rename.md +11 -5
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.md +3 -3
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +4 -4
- package/package.json +1 -1
package/.mocharc.json
CHANGED
|
@@ -17,6 +17,7 @@ var _SpoFileCheckinCommand_instances, _SpoFileCheckinCommand_initTelemetry, _Spo
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
21
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
22
23
|
const commands_1 = require("../../commands");
|
|
@@ -41,6 +42,9 @@ class SpoFileCheckinCommand extends SpoCommand_1.default {
|
|
|
41
42
|
__classPrivateFieldGet(this, _SpoFileCheckinCommand_instances, "m", _SpoFileCheckinCommand_initValidators).call(this);
|
|
42
43
|
__classPrivateFieldGet(this, _SpoFileCheckinCommand_instances, "m", _SpoFileCheckinCommand_initOptionSets).call(this);
|
|
43
44
|
}
|
|
45
|
+
getExcludedOptionsWithUrls() {
|
|
46
|
+
return ['url'];
|
|
47
|
+
}
|
|
44
48
|
commandAction(logger, args) {
|
|
45
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
50
|
let type = CheckinType.Major;
|
|
@@ -62,7 +66,8 @@ class SpoFileCheckinCommand extends SpoCommand_1.default {
|
|
|
62
66
|
requestUrl = `${args.options.webUrl}/_api/web/GetFileById('${formatting_1.formatting.encodeQueryParameter(args.options.id)}')/checkin(comment='${comment}',checkintype=${type})`;
|
|
63
67
|
}
|
|
64
68
|
if (args.options.url) {
|
|
65
|
-
|
|
69
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
70
|
+
requestUrl = `${args.options.webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')/checkin(comment='${comment}',checkintype=${type})`;
|
|
66
71
|
}
|
|
67
72
|
const requestOptions = {
|
|
68
73
|
url: requestUrl,
|
|
@@ -83,8 +88,8 @@ class SpoFileCheckinCommand extends SpoCommand_1.default {
|
|
|
83
88
|
_SpoFileCheckinCommand_instances = new WeakSet(), _SpoFileCheckinCommand_initTelemetry = function _SpoFileCheckinCommand_initTelemetry() {
|
|
84
89
|
this.telemetry.push((args) => {
|
|
85
90
|
Object.assign(this.telemetryProperties, {
|
|
86
|
-
id:
|
|
87
|
-
url:
|
|
91
|
+
id: typeof args.options.id !== 'undefined',
|
|
92
|
+
url: typeof args.options.url !== 'undefined',
|
|
88
93
|
type: args.options.type || 'Major',
|
|
89
94
|
comment: typeof args.options.comment !== 'undefined'
|
|
90
95
|
});
|
|
@@ -17,6 +17,7 @@ var _SpoFileCheckoutCommand_instances, _SpoFileCheckoutCommand_initTelemetry, _S
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
21
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
22
23
|
const commands_1 = require("../../commands");
|
|
@@ -35,6 +36,9 @@ class SpoFileCheckoutCommand extends SpoCommand_1.default {
|
|
|
35
36
|
__classPrivateFieldGet(this, _SpoFileCheckoutCommand_instances, "m", _SpoFileCheckoutCommand_initValidators).call(this);
|
|
36
37
|
__classPrivateFieldGet(this, _SpoFileCheckoutCommand_instances, "m", _SpoFileCheckoutCommand_initOptionSets).call(this);
|
|
37
38
|
}
|
|
39
|
+
getExcludedOptionsWithUrls() {
|
|
40
|
+
return ['url'];
|
|
41
|
+
}
|
|
38
42
|
commandAction(logger, args) {
|
|
39
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
44
|
let requestUrl = '';
|
|
@@ -42,7 +46,8 @@ class SpoFileCheckoutCommand extends SpoCommand_1.default {
|
|
|
42
46
|
requestUrl = `${args.options.webUrl}/_api/web/GetFileById('${formatting_1.formatting.encodeQueryParameter(args.options.id)}')/checkout`;
|
|
43
47
|
}
|
|
44
48
|
if (args.options.url) {
|
|
45
|
-
|
|
49
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
50
|
+
requestUrl = `${args.options.webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')/checkout`;
|
|
46
51
|
}
|
|
47
52
|
const requestOptions = {
|
|
48
53
|
url: requestUrl,
|
|
@@ -63,8 +68,8 @@ class SpoFileCheckoutCommand extends SpoCommand_1.default {
|
|
|
63
68
|
_SpoFileCheckoutCommand_instances = new WeakSet(), _SpoFileCheckoutCommand_initTelemetry = function _SpoFileCheckoutCommand_initTelemetry() {
|
|
64
69
|
this.telemetry.push((args) => {
|
|
65
70
|
Object.assign(this.telemetryProperties, {
|
|
66
|
-
id:
|
|
67
|
-
url:
|
|
71
|
+
id: typeof args.options.id !== 'undefined',
|
|
72
|
+
url: typeof args.options.url !== 'undefined'
|
|
68
73
|
});
|
|
69
74
|
});
|
|
70
75
|
}, _SpoFileCheckoutCommand_initOptions = function _SpoFileCheckoutCommand_initOptions() {
|
|
@@ -38,10 +38,7 @@ class SpoFileCopyCommand extends SpoCommand_1.default {
|
|
|
38
38
|
commandAction(logger, args) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
try {
|
|
41
|
-
|
|
42
|
-
logger.logToStderr(`Copying file '${args.options.sourceUrl}' to '${args.options.targetUrl}'...`);
|
|
43
|
-
}
|
|
44
|
-
const sourcePath = this.getAbsoluteUrl(args.options.webUrl, args.options.sourceUrl);
|
|
41
|
+
const sourcePath = this.getAbsoluteUrl(args.options.webUrl, urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.sourceUrl));
|
|
45
42
|
let destinationPath = this.getAbsoluteUrl(args.options.webUrl, args.options.targetUrl) + '/';
|
|
46
43
|
if (args.options.newName) {
|
|
47
44
|
destinationPath += args.options.newName;
|
|
@@ -50,6 +47,9 @@ class SpoFileCopyCommand extends SpoCommand_1.default {
|
|
|
50
47
|
// Keep the original file name
|
|
51
48
|
destinationPath += sourcePath.substring(sourcePath.lastIndexOf('/') + 1);
|
|
52
49
|
}
|
|
50
|
+
if (this.verbose) {
|
|
51
|
+
logger.logToStderr(`Copying file '${sourcePath}' to '${destinationPath}'...`);
|
|
52
|
+
}
|
|
53
53
|
const requestOptions = {
|
|
54
54
|
url: `${args.options.webUrl}/_api/SP.MoveCopyUtil.CopyFileByPath`,
|
|
55
55
|
headers: {
|
|
@@ -19,6 +19,7 @@ const fs = require("fs");
|
|
|
19
19
|
const path = require("path");
|
|
20
20
|
const request_1 = require("../../../../request");
|
|
21
21
|
const formatting_1 = require("../../../../utils/formatting");
|
|
22
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
22
23
|
const validation_1 = require("../../../../utils/validation");
|
|
23
24
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
24
25
|
const commands_1 = require("../../commands");
|
|
@@ -66,7 +67,8 @@ class SpoFileGetCommand extends SpoCommand_1.default {
|
|
|
66
67
|
else {
|
|
67
68
|
options += '&';
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
71
|
+
options += `@f='${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}'`;
|
|
70
72
|
}
|
|
71
73
|
const requestOptions = {
|
|
72
74
|
url: requestUrl + options,
|
|
@@ -69,8 +69,8 @@ class SpoFileListCommand extends SpoCommand_1.default {
|
|
|
69
69
|
logger.logToStderr(`Retrieving files in folder '${folderUrl}'${page > 1 ? ', page ' + page : ''}...`);
|
|
70
70
|
}
|
|
71
71
|
const allFiles = [];
|
|
72
|
-
const
|
|
73
|
-
const requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativeUrl(@url)/Files?@url='${formatting_1.formatting.encodeQueryParameter(
|
|
72
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, folderUrl);
|
|
73
|
+
const requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativeUrl(@url)/Files?@url='${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}'`;
|
|
74
74
|
const queryParams = [`$skip=${skip}`, `$top=${SpoFileListCommand.pageSize}`];
|
|
75
75
|
if (fieldProperties.expandProperties.length > 0) {
|
|
76
76
|
queryParams.push(`$expand=${fieldProperties.expandProperties.join(',')}`);
|
|
@@ -40,7 +40,7 @@ class SpoFileMoveCommand extends SpoCommand_1.default {
|
|
|
40
40
|
__classPrivateFieldGet(this, _SpoFileMoveCommand_instances, "m", _SpoFileMoveCommand_initValidators).call(this);
|
|
41
41
|
}
|
|
42
42
|
getExcludedOptionsWithUrls() {
|
|
43
|
-
return ['targetUrl'];
|
|
43
|
+
return ['targetUrl', 'sourceUrl'];
|
|
44
44
|
}
|
|
45
45
|
commandAction(logger, args) {
|
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -48,6 +48,7 @@ class SpoFileMoveCommand extends SpoCommand_1.default {
|
|
|
48
48
|
const parsedUrl = url.parse(webUrl);
|
|
49
49
|
const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
|
|
50
50
|
try {
|
|
51
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(webUrl, args.options.sourceUrl);
|
|
51
52
|
// Check if the source file exists.
|
|
52
53
|
// Called on purpose, we explicitly check if user specified file
|
|
53
54
|
// in the sourceUrl option.
|
|
@@ -55,14 +56,14 @@ class SpoFileMoveCommand extends SpoCommand_1.default {
|
|
|
55
56
|
// A user might enter folder instead of file as source url by mistake
|
|
56
57
|
// then there are edge cases when deleteIfAlreadyExists flag is set
|
|
57
58
|
// the user can receive misleading error message.
|
|
58
|
-
yield this.fileExists(
|
|
59
|
+
yield this.fileExists(webUrl, serverRelativePath);
|
|
59
60
|
if (args.options.deleteIfAlreadyExists) {
|
|
60
61
|
// try delete target file, if deleteIfAlreadyExists flag is set
|
|
61
62
|
const filename = args.options.sourceUrl.replace(/^.*[\\\/]/, '');
|
|
62
63
|
yield this.recycleFile(tenantUrl, args.options.targetUrl, filename, logger);
|
|
63
64
|
}
|
|
64
65
|
// all preconditions met, now create copy job
|
|
65
|
-
const sourceAbsoluteUrl = urlUtil_1.urlUtil.urlCombine(
|
|
66
|
+
const sourceAbsoluteUrl = urlUtil_1.urlUtil.urlCombine(tenantUrl, serverRelativePath);
|
|
66
67
|
const allowSchemaMismatch = args.options.allowSchemaMismatch || false;
|
|
67
68
|
const requestUrl = urlUtil_1.urlUtil.urlCombine(webUrl, '/_api/site/CreateCopyJobs');
|
|
68
69
|
const requestOptions = {
|
|
@@ -107,10 +108,8 @@ class SpoFileMoveCommand extends SpoCommand_1.default {
|
|
|
107
108
|
/**
|
|
108
109
|
* Checks if a file exists on the server relative url
|
|
109
110
|
*/
|
|
110
|
-
fileExists(
|
|
111
|
-
const
|
|
112
|
-
const fileServerRelativeUrl = `${webServerRelativeUrl}${sourceUrl}`;
|
|
113
|
-
const requestUrl = `${webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(fileServerRelativeUrl)}')/`;
|
|
111
|
+
fileExists(webUrl, sourceUrl) {
|
|
112
|
+
const requestUrl = `${webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(sourceUrl)}')/`;
|
|
114
113
|
const requestOptions = {
|
|
115
114
|
url: requestUrl,
|
|
116
115
|
method: 'GET',
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
22
|
const validation_1 = require("../../../../utils/validation");
|
|
22
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
24
|
const commands_1 = require("../../commands");
|
|
@@ -50,18 +51,8 @@ class SpoFileRemoveCommand extends SpoCommand_1.default {
|
|
|
50
51
|
requestUrl = `${args.options.webUrl}/_api/web/GetFileById(guid'${formatting_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
51
52
|
}
|
|
52
53
|
else {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
let serverRelativeSiteUrl = args.options.webUrl;
|
|
56
|
-
if (!serverRelativeSiteUrl.endsWith('/')) {
|
|
57
|
-
serverRelativeSiteUrl = `${serverRelativeSiteUrl}/`;
|
|
58
|
-
}
|
|
59
|
-
serverRelativeSiteUrl = serverRelativeSiteUrl.substr(serverRelativeSiteUrl.indexOf('/', 8));
|
|
60
|
-
let fileUrl = args.options.url;
|
|
61
|
-
if (!fileUrl.startsWith(serverRelativeSiteUrl)) {
|
|
62
|
-
fileUrl = `${serverRelativeSiteUrl}${fileUrl}`;
|
|
63
|
-
}
|
|
64
|
-
requestUrl = `${args.options.webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(fileUrl)}')`;
|
|
54
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
55
|
+
requestUrl = `${args.options.webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
65
56
|
}
|
|
66
57
|
if (args.options.recycle) {
|
|
67
58
|
requestUrl += `/recycle()`;
|
|
@@ -40,9 +40,9 @@ class SpoFileRenameCommand extends SpoCommand_1.default {
|
|
|
40
40
|
commandAction(logger, args) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const webUrl = args.options.webUrl;
|
|
43
|
-
const
|
|
43
|
+
const originalFileServerRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.sourceUrl);
|
|
44
44
|
try {
|
|
45
|
-
yield this.getFile(
|
|
45
|
+
yield this.getFile(originalFileServerRelativePath, webUrl);
|
|
46
46
|
if (args.options.force) {
|
|
47
47
|
yield this.deleteFile(webUrl, args.options.sourceUrl, args.options.targetFileName);
|
|
48
48
|
}
|
|
@@ -53,7 +53,7 @@ class SpoFileRenameCommand extends SpoCommand_1.default {
|
|
|
53
53
|
}]
|
|
54
54
|
};
|
|
55
55
|
const requestOptions = {
|
|
56
|
-
url: `${webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(
|
|
56
|
+
url: `${webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(originalFileServerRelativePath)}')/ListItemAllFields/ValidateUpdateListItem()`,
|
|
57
57
|
headers: {
|
|
58
58
|
'accept': 'application/json;odata=nometadata'
|
|
59
59
|
},
|
|
@@ -25,6 +25,7 @@ const validation_1 = require("../../../../utils/validation");
|
|
|
25
25
|
const formatting_1 = require("../../../../utils/formatting");
|
|
26
26
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
27
27
|
const commands_1 = require("../../commands");
|
|
28
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
28
29
|
class SpoFileRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
29
30
|
get name() {
|
|
30
31
|
return commands_1.default.FILE_ROLEASSIGNMENT_ADD;
|
|
@@ -148,7 +149,7 @@ class SpoFileRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
148
149
|
getFileURL(args) {
|
|
149
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
151
|
if (args.options.fileUrl) {
|
|
151
|
-
return args.options.fileUrl;
|
|
152
|
+
return urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
152
153
|
}
|
|
153
154
|
const options = {
|
|
154
155
|
webUrl: args.options.webUrl,
|
|
@@ -55,9 +55,9 @@ class SpoFileRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
55
55
|
else {
|
|
56
56
|
principalId = args.options.principalId;
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, fileURL);
|
|
59
59
|
const requestOptions = {
|
|
60
|
-
url: `${args.options.webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(
|
|
60
|
+
url: `${args.options.webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')/ListItemAllFields/roleassignments/removeroleassignment(principalid='${principalId}')`,
|
|
61
61
|
headers: {
|
|
62
62
|
accept: 'application/json;odata=nometadata'
|
|
63
63
|
},
|
|
@@ -88,7 +88,7 @@ class SpoFileRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
88
88
|
getFileURL(args) {
|
|
89
89
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
90
|
if (args.options.fileUrl) {
|
|
91
|
-
return args.options.fileUrl;
|
|
91
|
+
return urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
92
92
|
}
|
|
93
93
|
const options = {
|
|
94
94
|
webUrl: args.options.webUrl,
|
|
@@ -22,6 +22,7 @@ const formatting_1 = require("../../../../utils/formatting");
|
|
|
22
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
23
|
const commands_1 = require("../../commands");
|
|
24
24
|
const SpoFileGetCommand = require("./file-get");
|
|
25
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
25
26
|
class SpoFileRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
26
27
|
get name() {
|
|
27
28
|
return commands_1.default.FILE_ROLEINHERITANCE_BREAK;
|
|
@@ -75,7 +76,7 @@ class SpoFileRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
|
75
76
|
getFileURL(args) {
|
|
76
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
78
|
if (args.options.fileUrl) {
|
|
78
|
-
return args.options.fileUrl;
|
|
79
|
+
return urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
79
80
|
}
|
|
80
81
|
const options = {
|
|
81
82
|
webUrl: args.options.webUrl,
|
|
@@ -22,6 +22,7 @@ const formatting_1 = require("../../../../utils/formatting");
|
|
|
22
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
23
|
const commands_1 = require("../../commands");
|
|
24
24
|
const SpoFileGetCommand = require("./file-get");
|
|
25
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
25
26
|
class SpoFileRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
26
27
|
get name() {
|
|
27
28
|
return commands_1.default.FILE_ROLEINHERITANCE_RESET;
|
|
@@ -74,7 +75,7 @@ class SpoFileRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
74
75
|
getFileURL(args) {
|
|
75
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
77
|
if (args.options.fileUrl) {
|
|
77
|
-
return args.options.fileUrl;
|
|
78
|
+
return urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
78
79
|
}
|
|
79
80
|
const options = {
|
|
80
81
|
webUrl: args.options.webUrl,
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
22
|
const validation_1 = require("../../../../utils/validation");
|
|
22
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
24
|
const commands_1 = require("../../commands");
|
|
@@ -95,10 +96,11 @@ class SpoFileSharingInfoGetCommand extends SpoCommand_1.default {
|
|
|
95
96
|
getNeededFileInformation(args) {
|
|
96
97
|
let requestUrl = '';
|
|
97
98
|
if (args.options.fileId) {
|
|
98
|
-
requestUrl = `${args.options.webUrl}/_api/web/GetFileById('${
|
|
99
|
+
requestUrl = `${args.options.webUrl}/_api/web/GetFileById('${args.options.fileId}')/?$select=ListItemAllFields/Id,ListItemAllFields/ParentList/Title&$expand=ListItemAllFields/ParentList`;
|
|
99
100
|
}
|
|
100
101
|
else {
|
|
101
|
-
|
|
102
|
+
const serverRelPath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
103
|
+
requestUrl = `${args.options.webUrl}/_api/web/GetFileByServerRelativePath(decodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelPath)}')?$select=ListItemAllFields/Id,ListItemAllFields/ParentList/Title&$expand=ListItemAllFields/ParentList`;
|
|
102
104
|
}
|
|
103
105
|
const requestOptions = {
|
|
104
106
|
url: requestUrl,
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
22
|
const validation_1 = require("../../../../utils/validation");
|
|
22
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
24
|
const commands_1 = require("../../commands");
|
|
@@ -66,7 +67,8 @@ class SpoFileVersionClearCommand extends SpoCommand_1.default {
|
|
|
66
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
68
|
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
68
69
|
if (args.options.fileUrl) {
|
|
69
|
-
|
|
70
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
71
|
+
requestUrl += `GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')/versions/DeleteAll()`;
|
|
70
72
|
}
|
|
71
73
|
else {
|
|
72
74
|
requestUrl += `GetFileById('${args.options.fileId}')/versions/DeleteAll()`;
|
|
@@ -17,6 +17,7 @@ var _SpoFileVersionGetCommand_instances, _SpoFileVersionGetCommand_initTelemetry
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
21
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
22
23
|
const commands_1 = require("../../commands");
|
|
@@ -54,7 +55,8 @@ class SpoFileVersionGetCommand extends SpoCommand_1.default {
|
|
|
54
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
56
|
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
56
57
|
if (args.options.fileUrl) {
|
|
57
|
-
|
|
58
|
+
const serverRelUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
59
|
+
requestUrl += `GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelUrl)}')/versions/?$filter=VersionLabel eq '${args.options.label}'`;
|
|
58
60
|
}
|
|
59
61
|
else {
|
|
60
62
|
requestUrl += `GetFileById('${args.options.fileId}')/versions/?$filter=VersionLabel eq '${args.options.label}'`;
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
22
|
const validation_1 = require("../../../../utils/validation");
|
|
22
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
24
|
const commands_1 = require("../../commands");
|
|
@@ -67,7 +68,8 @@ class SpoFileVersionRemoveCommand extends SpoCommand_1.default {
|
|
|
67
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
69
|
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
69
70
|
if (args.options.fileUrl) {
|
|
70
|
-
|
|
71
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
72
|
+
requestUrl += `GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')/versions/DeleteByLabel('${args.options.label}')`;
|
|
71
73
|
}
|
|
72
74
|
else {
|
|
73
75
|
requestUrl += `GetFileById('${args.options.fileId}')/versions/DeleteByLabel('${args.options.label}')`;
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
22
|
const validation_1 = require("../../../../utils/validation");
|
|
22
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
24
|
const commands_1 = require("../../commands");
|
|
@@ -67,7 +68,8 @@ class SpoFileVersionRestoreCommand extends SpoCommand_1.default {
|
|
|
67
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
69
|
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
69
70
|
if (args.options.fileUrl) {
|
|
70
|
-
|
|
71
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
72
|
+
requestUrl += `GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')/versions/RestoreByLabel('${args.options.label}')`;
|
|
71
73
|
}
|
|
72
74
|
else {
|
|
73
75
|
requestUrl += `GetFileById('${args.options.fileId}')/versions/RestoreByLabel('${args.options.label}')`;
|
|
@@ -37,18 +37,18 @@ class SpoFolderCopyCommand extends SpoCommand_1.default {
|
|
|
37
37
|
__classPrivateFieldGet(this, _SpoFolderCopyCommand_instances, "m", _SpoFolderCopyCommand_initValidators).call(this);
|
|
38
38
|
}
|
|
39
39
|
getExcludedOptionsWithUrls() {
|
|
40
|
-
return ['targetUrl'];
|
|
40
|
+
return ['targetUrl', 'sourceUrl'];
|
|
41
41
|
}
|
|
42
42
|
commandAction(logger, args) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const webUrl = args.options.webUrl;
|
|
45
45
|
const parsedUrl = url.parse(webUrl);
|
|
46
46
|
const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
|
|
47
|
-
const
|
|
47
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(webUrl, args.options.sourceUrl);
|
|
48
|
+
const sourceAbsoluteUrl = urlUtil_1.urlUtil.urlCombine(tenantUrl, serverRelativePath);
|
|
48
49
|
const allowSchemaMismatch = args.options.allowSchemaMismatch || false;
|
|
49
|
-
const requestUrl = urlUtil_1.urlUtil.urlCombine(webUrl, '/_api/site/CreateCopyJobs');
|
|
50
50
|
const requestOptions = {
|
|
51
|
-
url:
|
|
51
|
+
url: urlUtil_1.urlUtil.urlCombine(webUrl, '/_api/site/CreateCopyJobs'),
|
|
52
52
|
headers: {
|
|
53
53
|
'accept': 'application/json;odata=nometadata'
|
|
54
54
|
},
|
|
@@ -38,6 +38,9 @@ class SpoFolderGetCommand extends SpoCommand_1.default {
|
|
|
38
38
|
__classPrivateFieldGet(this, _SpoFolderGetCommand_instances, "m", _SpoFolderGetCommand_initValidators).call(this);
|
|
39
39
|
__classPrivateFieldGet(this, _SpoFolderGetCommand_instances, "m", _SpoFolderGetCommand_initOptionSets).call(this);
|
|
40
40
|
}
|
|
41
|
+
getExcludedOptionsWithUrls() {
|
|
42
|
+
return ['url'];
|
|
43
|
+
}
|
|
41
44
|
commandAction(logger, args) {
|
|
42
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
46
|
if (this.verbose) {
|
|
@@ -48,8 +51,8 @@ class SpoFolderGetCommand extends SpoCommand_1.default {
|
|
|
48
51
|
requestUrl += `/GetFolderById('${formatting_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
49
52
|
}
|
|
50
53
|
else if (args.options.url) {
|
|
51
|
-
const
|
|
52
|
-
requestUrl += `/GetFolderByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(
|
|
54
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
55
|
+
requestUrl += `/GetFolderByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
53
56
|
}
|
|
54
57
|
if (args.options.withPermissions) {
|
|
55
58
|
requestUrl += `?$expand=ListItemAllFields/HasUniqueRoleAssignments,ListItemAllFields/RoleAssignments/Member,ListItemAllFields/RoleAssignments/RoleDefinitionBindings`;
|
|
@@ -37,14 +37,15 @@ class SpoFolderMoveCommand extends SpoCommand_1.default {
|
|
|
37
37
|
__classPrivateFieldGet(this, _SpoFolderMoveCommand_instances, "m", _SpoFolderMoveCommand_initValidators).call(this);
|
|
38
38
|
}
|
|
39
39
|
getExcludedOptionsWithUrls() {
|
|
40
|
-
return ['targetUrl'];
|
|
40
|
+
return ['targetUrl', 'sourceUrl'];
|
|
41
41
|
}
|
|
42
42
|
commandAction(logger, args) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const webUrl = args.options.webUrl;
|
|
45
45
|
const parsedUrl = url.parse(webUrl);
|
|
46
46
|
const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
|
|
47
|
-
const
|
|
47
|
+
const sourceRelUrl = urlUtil_1.urlUtil.getServerRelativePath(webUrl, args.options.sourceUrl);
|
|
48
|
+
const sourceAbsoluteUrl = urlUtil_1.urlUtil.urlCombine(tenantUrl, sourceRelUrl);
|
|
48
49
|
const allowSchemaMismatch = args.options.allowSchemaMismatch || false;
|
|
49
50
|
const requestUrl = urlUtil_1.urlUtil.urlCombine(webUrl, '/_api/site/CreateCopyJobs');
|
|
50
51
|
const requestOptions = {
|
|
@@ -35,6 +35,9 @@ class SpoFolderRenameCommand extends SpoCommand_1.default {
|
|
|
35
35
|
__classPrivateFieldGet(this, _SpoFolderRenameCommand_instances, "m", _SpoFolderRenameCommand_initOptions).call(this);
|
|
36
36
|
__classPrivateFieldGet(this, _SpoFolderRenameCommand_instances, "m", _SpoFolderRenameCommand_initValidators).call(this);
|
|
37
37
|
}
|
|
38
|
+
getExcludedOptionsWithUrls() {
|
|
39
|
+
return ['url'];
|
|
40
|
+
}
|
|
38
41
|
commandAction(logger, args) {
|
|
39
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
43
|
try {
|
|
@@ -45,8 +48,8 @@ class SpoFolderRenameCommand extends SpoCommand_1.default {
|
|
|
45
48
|
if (this.verbose) {
|
|
46
49
|
logger.logToStderr(`Renaming folder ${args.options.url} to ${args.options.name}`);
|
|
47
50
|
}
|
|
48
|
-
const
|
|
49
|
-
const serverRelativeUrlWithoutOldFolder =
|
|
51
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
52
|
+
const serverRelativeUrlWithoutOldFolder = serverRelativePath.substring(0, serverRelativePath.lastIndexOf('/'));
|
|
50
53
|
const renamedServerRelativeUrl = `${serverRelativeUrlWithoutOldFolder}/${args.options.name}`;
|
|
51
54
|
const requestOptions = {
|
|
52
55
|
url: `${args.options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
@@ -46,8 +46,21 @@ class SpoServicePrincipalPermissionRequestListCommand extends SpoCommand_1.defau
|
|
|
46
46
|
throw response.ErrorInfo.ErrorMessage;
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
|
+
let spoWebAppServicePrincipalPermissionRequestResult = [];
|
|
49
50
|
const result = json[json.length - 1]._Child_Items_;
|
|
50
|
-
|
|
51
|
+
if (result.length > 0) {
|
|
52
|
+
const spoClientExtensibilityWebApplicationPrincipalId = yield this.getSPOClientExtensibilityWebApplicationPrincipalId();
|
|
53
|
+
if (spoClientExtensibilityWebApplicationPrincipalId !== null) {
|
|
54
|
+
const oAuth2PermissionGrants = yield this.getOAuth2PermissionGrants(spoClientExtensibilityWebApplicationPrincipalId);
|
|
55
|
+
if (oAuth2PermissionGrants) {
|
|
56
|
+
spoWebAppServicePrincipalPermissionRequestResult = result.filter(x => oAuth2PermissionGrants.indexOf(x.Scope) === -1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (spoWebAppServicePrincipalPermissionRequestResult.length === 0) {
|
|
61
|
+
spoWebAppServicePrincipalPermissionRequestResult = result;
|
|
62
|
+
}
|
|
63
|
+
logger.log(spoWebAppServicePrincipalPermissionRequestResult.map(r => {
|
|
51
64
|
return {
|
|
52
65
|
Id: r.Id.replace('/Guid(', '').replace(')/', ''),
|
|
53
66
|
Resource: r.Resource,
|
|
@@ -62,6 +75,38 @@ class SpoServicePrincipalPermissionRequestListCommand extends SpoCommand_1.defau
|
|
|
62
75
|
}
|
|
63
76
|
});
|
|
64
77
|
}
|
|
78
|
+
getOAuth2PermissionGrants(spoClientExtensibilityWebApplicationPrincipalId) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const requestOptions = {
|
|
81
|
+
url: `https://graph.microsoft.com/v1.0/oAuth2Permissiongrants/?$filter=clientId eq '${spoClientExtensibilityWebApplicationPrincipalId}' and consentType eq 'AllPrincipals'`,
|
|
82
|
+
headers: {
|
|
83
|
+
accept: 'application/json;odata.metadata=none'
|
|
84
|
+
},
|
|
85
|
+
responseType: 'json'
|
|
86
|
+
};
|
|
87
|
+
const response = yield request_1.default.get(requestOptions);
|
|
88
|
+
if (response.value && response.value.length > 0) {
|
|
89
|
+
return response.value[0].scope.split(' ');
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
getSPOClientExtensibilityWebApplicationPrincipalId() {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const requestOptions = {
|
|
97
|
+
url: `https://graph.microsoft.com/v1.0/servicePrincipals/?$filter=displayName eq 'SharePoint Online Client Extensibility Web Application Principal'`,
|
|
98
|
+
headers: {
|
|
99
|
+
accept: 'application/json;odata.metadata=none'
|
|
100
|
+
},
|
|
101
|
+
responseType: 'json'
|
|
102
|
+
};
|
|
103
|
+
const response = yield request_1.default.get(requestOptions);
|
|
104
|
+
if (response.value && response.value.length > 0) {
|
|
105
|
+
return response.value[0].id;
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
65
110
|
}
|
|
66
111
|
module.exports = new SpoServicePrincipalPermissionRequestListCommand();
|
|
67
112
|
//# sourceMappingURL=serviceprincipal-permissionrequest-list.js.map
|
package/dist/utils/spo.js
CHANGED
|
@@ -453,7 +453,7 @@ exports.spo = {
|
|
|
453
453
|
* Retrieves the SiteId, VroomItemId and VroomDriveId from a specific file.
|
|
454
454
|
* @param webUrl Web url
|
|
455
455
|
* @param fileId GUID ID of the file
|
|
456
|
-
* @param fileUrl Decoded URL of the file
|
|
456
|
+
* @param fileUrl Decoded site-relative or server-relative URL of the file
|
|
457
457
|
*/
|
|
458
458
|
getVroomFileDetails(webUrl, fileId, fileUrl) {
|
|
459
459
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -14,7 +14,7 @@ m365 spo file add [options]
|
|
|
14
14
|
: The URL of the site where the file should be uploaded to
|
|
15
15
|
|
|
16
16
|
`-f, --folder <folder>`
|
|
17
|
-
:
|
|
17
|
+
: The server- or site-relative URL to the folder where the file should be uploaded
|
|
18
18
|
|
|
19
19
|
`-p, --path <path>`
|
|
20
20
|
: Local path to the file to upload
|
|
@@ -14,7 +14,7 @@ m365 spo file checkin [options]
|
|
|
14
14
|
: The URL of the site where the file is located
|
|
15
15
|
|
|
16
16
|
`-f, --url [url]`
|
|
17
|
-
: The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
|
|
17
|
+
: The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
|
|
18
18
|
|
|
19
19
|
`-i, --id [id]`
|
|
20
20
|
: The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
|
|
@@ -14,7 +14,7 @@ m365 spo file checkout [options]
|
|
|
14
14
|
: The URL of the site where the file is located
|
|
15
15
|
|
|
16
16
|
`-f, --url [url]`
|
|
17
|
-
: The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
|
|
17
|
+
: The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
|
|
18
18
|
|
|
19
19
|
`-i, --id [id]`
|
|
20
20
|
: The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
|
|
@@ -14,7 +14,7 @@ m365 spo file copy [options]
|
|
|
14
14
|
: The URL of the site where the file is located.
|
|
15
15
|
|
|
16
16
|
`-s, --sourceUrl <sourceUrl>`
|
|
17
|
-
:
|
|
17
|
+
: Site-relative, server-relative or absolute URL of the file.
|
|
18
18
|
|
|
19
19
|
`-t, --targetUrl <targetUrl>`
|
|
20
20
|
: Server-relative or absolute URL of the location.
|