@pnp/cli-microsoft365 7.0.0-beta.9229cf8 → 7.0.0-beta.99e75a7
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/.eslintrc.cjs +1 -1
- package/dist/Auth.js +2 -1
- package/dist/Command.js +1 -1
- package/dist/m365/aad/commands/{o365group/o365group-add.js → m365group/m365group-add.js} +17 -17
- package/dist/m365/aad/commands/{o365group/o365group-conversation-list.js → m365group/m365group-conversation-list.js} +10 -10
- package/dist/m365/aad/commands/{o365group/o365group-conversation-post-list.js → m365group/m365group-conversation-post-list.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-get.js → m365group/m365group-get.js} +13 -10
- package/dist/m365/aad/commands/{o365group/o365group-list.js → m365group/m365group-list.js} +13 -28
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-clear.js → m365group/m365group-recyclebinitem-clear.js} +15 -15
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-list.js → m365group/m365group-recyclebinitem-list.js} +10 -10
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-remove.js → m365group/m365group-recyclebinitem-remove.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-restore.js → m365group/m365group-recyclebinitem-restore.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-remove.js → m365group/m365group-remove.js} +12 -12
- package/dist/m365/aad/commands/{o365group/o365group-renew.js → m365group/m365group-renew.js} +10 -10
- package/dist/m365/aad/commands/{o365group/o365group-report-activitycounts.js → m365group/m365group-report-activitycounts.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activitydetail.js → m365group/m365group-report-activitydetail.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activityfilecounts.js → m365group/m365group-report-activityfilecounts.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activitygroupcounts.js → m365group/m365group-report-activitygroupcounts.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activitystorage.js → m365group/m365group-report-activitystorage.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-set.js → m365group/m365group-set.js} +17 -17
- package/dist/m365/aad/commands/{o365group/o365group-teamify.js → m365group/m365group-teamify.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-user-add.js → m365group/m365group-user-add.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-user-list.js → m365group/m365group-user-list.js} +12 -12
- package/dist/m365/aad/commands/{o365group/o365group-user-remove.js → m365group/m365group-user-remove.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-user-set.js → m365group/m365group-user-set.js} +15 -15
- package/dist/m365/aad/commands.js +22 -22
- package/dist/m365/pa/commands/app/app-permission-ensure.js +162 -0
- package/dist/m365/pa/commands/app/app-permission-list.js +2 -2
- package/dist/m365/pa/commands/app/app-permission-remove.js +153 -0
- package/dist/m365/pa/commands.js +2 -0
- package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +2 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +73 -103
- package/dist/m365/spo/commands/file/file-add.js +13 -13
- package/dist/m365/spo/commands/file/file-checkin.js +1 -1
- package/dist/m365/spo/commands/file/file-checkout.js +1 -1
- package/dist/m365/spo/commands/file/file-copy.js +36 -4
- package/dist/m365/spo/commands/file/file-list.js +4 -4
- package/dist/m365/spo/commands/file/file-move.js +2 -2
- package/dist/m365/spo/commands/file/file-remove.js +6 -6
- package/dist/m365/spo/commands/file/file-rename.js +2 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +1 -1
- package/dist/m365/spo/commands/file/file-version-get.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +1 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +1 -1
- package/dist/m365/spo/commands/folder/folder-add.js +2 -4
- package/dist/m365/spo/commands/folder/folder-get.js +1 -1
- package/dist/m365/spo/commands/folder/folder-list.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +7 -4
- package/dist/m365/spo/commands/folder/folder-rename.js +13 -17
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/group/group-list.js +0 -1
- package/dist/m365/spo/commands/site/site-set.js +2 -2
- package/dist/m365/spo/commands/theme/theme-list.js +1 -9
- package/dist/utils/spo.js +1 -1
- package/docs/docs/cmd/aad/{o365group/o365group-add.mdx → m365group/m365group-add.mdx} +13 -13
- package/docs/docs/cmd/aad/{o365group/o365group-conversation-list.mdx → m365group/m365group-conversation-list.mdx} +4 -4
- package/docs/docs/cmd/aad/{o365group/o365group-conversation-post-list.mdx → m365group/m365group-conversation-post-list.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-get.mdx → m365group/m365group-get.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-list.mdx → m365group/m365group-list.mdx} +12 -29
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-clear.mdx → m365group/m365group-recyclebinitem-clear.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-list.mdx → m365group/m365group-recyclebinitem-list.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-remove.mdx → m365group/m365group-recyclebinitem-remove.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-restore.mdx → m365group/m365group-recyclebinitem-restore.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-remove.mdx → m365group/m365group-remove.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-renew.mdx → m365group/m365group-renew.mdx} +4 -4
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitycounts.mdx → m365group/m365group-report-activitycounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitydetail.mdx → m365group/m365group-report-activitydetail.mdx} +7 -7
- package/docs/docs/cmd/aad/{o365group/o365group-report-activityfilecounts.mdx → m365group/m365group-report-activityfilecounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitygroupcounts.mdx → m365group/m365group-report-activitygroupcounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitystorage.mdx → m365group/m365group-report-activitystorage.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-set.mdx → m365group/m365group-set.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-teamify.mdx → m365group/m365group-teamify.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-add.mdx → m365group/m365group-user-add.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-list.mdx → m365group/m365group-user-list.mdx} +7 -7
- package/docs/docs/cmd/aad/{o365group/o365group-user-remove.mdx → m365group/m365group-user-remove.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-set.mdx → m365group/m365group-user-set.mdx} +5 -5
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
- package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
- package/docs/docs/cmd/spo/file/file-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-move.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-remove.mdx +8 -8
- package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
- package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
- package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
- package/npm-shrinkwrap.json +142 -88
- package/package.json +13 -13
- /package/dist/m365/aad/commands/{o365group → m365group}/GroupExtended.js +0 -0
|
@@ -42,7 +42,7 @@ class SpoFileVersionGetCommand extends SpoCommand {
|
|
|
42
42
|
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
43
43
|
if (args.options.fileUrl) {
|
|
44
44
|
const serverRelUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
45
|
-
requestUrl += `
|
|
45
|
+
requestUrl += `GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelUrl)}')/versions/?$filter=VersionLabel eq '${args.options.label}'`;
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
requestUrl += `GetFileById('${args.options.fileId}')/versions/?$filter=VersionLabel eq '${args.options.label}'`;
|
|
@@ -36,7 +36,7 @@ class SpoFileVersionListCommand extends SpoCommand {
|
|
|
36
36
|
let requestUrl = `${args.options.webUrl}/_api/web`;
|
|
37
37
|
if (args.options.fileUrl) {
|
|
38
38
|
const serverRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
39
|
-
requestUrl += `/
|
|
39
|
+
requestUrl += `/GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
42
|
requestUrl += `/GetFileById('${args.options.fileId}')`;
|
|
@@ -55,7 +55,7 @@ class SpoFileVersionRemoveCommand extends SpoCommand {
|
|
|
55
55
|
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
56
56
|
if (args.options.fileUrl) {
|
|
57
57
|
const serverRelativePath = urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
58
|
-
requestUrl += `
|
|
58
|
+
requestUrl += `GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')/versions/DeleteByLabel('${args.options.label}')`;
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
61
|
requestUrl += `GetFileById('${args.options.fileId}')/versions/DeleteByLabel('${args.options.label}')`;
|
|
@@ -55,7 +55,7 @@ class SpoFileVersionRestoreCommand extends SpoCommand {
|
|
|
55
55
|
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
56
56
|
if (args.options.fileUrl) {
|
|
57
57
|
const serverRelativePath = urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
58
|
-
requestUrl += `
|
|
58
|
+
requestUrl += `GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')/versions/RestoreByLabel('${args.options.label}')`;
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
61
|
requestUrl += `GetFileById('${args.options.fileId}')/versions/RestoreByLabel('${args.options.label}')`;
|
|
@@ -5,6 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoFolderAddCommand_instances, _SpoFolderAddCommand_initOptions, _SpoFolderAddCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
8
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
9
10
|
import { validation } from '../../../../utils/validation.js';
|
|
10
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -28,15 +29,12 @@ class SpoFolderAddCommand extends SpoCommand {
|
|
|
28
29
|
}
|
|
29
30
|
const parentFolderServerRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.parentFolderUrl);
|
|
30
31
|
const serverRelativeUrl = `${parentFolderServerRelativeUrl}/${args.options.name}`;
|
|
31
|
-
const requestUrl = `${args.options.webUrl}/_api/web/folders`;
|
|
32
|
+
const requestUrl = `${args.options.webUrl}/_api/web/folders/addUsingPath(decodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
32
33
|
const requestOptions = {
|
|
33
34
|
url: requestUrl,
|
|
34
35
|
headers: {
|
|
35
36
|
'accept': 'application/json;odata=nometadata'
|
|
36
37
|
},
|
|
37
|
-
data: {
|
|
38
|
-
'ServerRelativeUrl': serverRelativeUrl
|
|
39
|
-
},
|
|
40
38
|
responseType: 'json'
|
|
41
39
|
};
|
|
42
40
|
try {
|
|
@@ -40,7 +40,7 @@ class SpoFolderGetCommand extends SpoCommand {
|
|
|
40
40
|
}
|
|
41
41
|
else if (args.options.url) {
|
|
42
42
|
const serverRelativePath = urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
43
|
-
requestUrl += `/
|
|
43
|
+
requestUrl += `/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
44
44
|
}
|
|
45
45
|
if (args.options.withPermissions) {
|
|
46
46
|
requestUrl += `?$expand=ListItemAllFields/HasUniqueRoleAssignments,ListItemAllFields/RoleAssignments/Member,ListItemAllFields/RoleAssignments/RoleDefinitionBindings`;
|
|
@@ -52,7 +52,7 @@ class SpoFolderListCommand extends SpoCommand {
|
|
|
52
52
|
}
|
|
53
53
|
const allFolders = [];
|
|
54
54
|
const serverRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, parentFolderUrl);
|
|
55
|
-
const requestUrl = `${args.options.webUrl}/_api/web/
|
|
55
|
+
const requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')/Folders`;
|
|
56
56
|
const queryParams = [`$skip=${skip}`, `$top=${SpoFolderListCommand.pageSize}`];
|
|
57
57
|
if (fieldProperties.expandProperties.length > 0) {
|
|
58
58
|
queryParams.push(`$expand=${fieldProperties.expandProperties.join(',')}`);
|
|
@@ -64,7 +64,7 @@ class SpoFolderListCommand extends SpoCommand {
|
|
|
64
64
|
queryParams.push(`$filter=${args.options.filter}`);
|
|
65
65
|
}
|
|
66
66
|
const requestOptions = {
|
|
67
|
-
url: `${requestUrl}
|
|
67
|
+
url: `${requestUrl}?${queryParams.join('&')}`,
|
|
68
68
|
method: 'GET',
|
|
69
69
|
headers: {
|
|
70
70
|
'accept': 'application/json;odata=nometadata'
|
|
@@ -25,6 +25,9 @@ class SpoFolderRemoveCommand extends SpoCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _SpoFolderRemoveCommand_instances, "m", _SpoFolderRemoveCommand_initOptions).call(this);
|
|
26
26
|
__classPrivateFieldGet(this, _SpoFolderRemoveCommand_instances, "m", _SpoFolderRemoveCommand_initValidators).call(this);
|
|
27
27
|
}
|
|
28
|
+
getExcludedOptionsWithUrls() {
|
|
29
|
+
return ['url'];
|
|
30
|
+
}
|
|
28
31
|
async commandAction(logger, args) {
|
|
29
32
|
if (args.options.force) {
|
|
30
33
|
await this.removeFolder(logger, args.options);
|
|
@@ -45,8 +48,8 @@ class SpoFolderRemoveCommand extends SpoCommand {
|
|
|
45
48
|
if (this.verbose) {
|
|
46
49
|
await logger.logToStderr(`Removing folder in site at ${options.webUrl}...`);
|
|
47
50
|
}
|
|
48
|
-
const
|
|
49
|
-
let requestUrl = `${options.webUrl}/_api/web/
|
|
51
|
+
const serverRelativePath = urlUtil.getServerRelativePath(options.webUrl, options.url);
|
|
52
|
+
let requestUrl = `${options.webUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
50
53
|
if (options.recycle) {
|
|
51
54
|
requestUrl += `/recycle()`;
|
|
52
55
|
}
|
|
@@ -71,8 +74,8 @@ class SpoFolderRemoveCommand extends SpoCommand {
|
|
|
71
74
|
_SpoFolderRemoveCommand_instances = new WeakSet(), _SpoFolderRemoveCommand_initTelemetry = function _SpoFolderRemoveCommand_initTelemetry() {
|
|
72
75
|
this.telemetry.push((args) => {
|
|
73
76
|
Object.assign(this.telemetryProperties, {
|
|
74
|
-
recycle:
|
|
75
|
-
force:
|
|
77
|
+
recycle: !!args.options.recycle,
|
|
78
|
+
force: !!args.options.force
|
|
76
79
|
});
|
|
77
80
|
});
|
|
78
81
|
}, _SpoFolderRemoveCommand_initOptions = function _SpoFolderRemoveCommand_initOptions() {
|
|
@@ -4,9 +4,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _SpoFolderRenameCommand_instances, _SpoFolderRenameCommand_initOptions, _SpoFolderRenameCommand_initValidators;
|
|
7
|
-
import config from '../../../../config.js';
|
|
8
7
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
8
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
10
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
11
10
|
import { validation } from '../../../../utils/validation.js';
|
|
12
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -29,32 +28,29 @@ class SpoFolderRenameCommand extends SpoCommand {
|
|
|
29
28
|
}
|
|
30
29
|
async commandAction(logger, args) {
|
|
31
30
|
try {
|
|
32
|
-
const contextResponse = await spo.getRequestDigest(args.options.webUrl);
|
|
33
|
-
const formDigestValue = contextResponse.FormDigestValue;
|
|
34
|
-
const webIdentityResp = await spo.getCurrentWebIdentity(args.options.webUrl, formDigestValue);
|
|
35
|
-
const folderObjectIdentity = await spo.getFolderIdentity(webIdentityResp.objectIdentity, args.options.webUrl, args.options.url, formDigestValue);
|
|
36
31
|
if (this.verbose) {
|
|
37
32
|
await logger.logToStderr(`Renaming folder ${args.options.url} to ${args.options.name}`);
|
|
38
33
|
}
|
|
39
34
|
const serverRelativePath = urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
40
|
-
const serverRelativeUrlWithoutOldFolder = serverRelativePath.substring(0, serverRelativePath.lastIndexOf('/'));
|
|
41
|
-
const renamedServerRelativeUrl = `${serverRelativeUrlWithoutOldFolder}/${args.options.name}`;
|
|
42
35
|
const requestOptions = {
|
|
43
|
-
url: `${args.options.webUrl}/
|
|
36
|
+
url: `${args.options.webUrl}/_api/Web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')/ListItemAllFields`,
|
|
44
37
|
headers: {
|
|
45
|
-
'
|
|
38
|
+
accept: 'application/json;odata=nometadata',
|
|
39
|
+
'if-match': '*'
|
|
46
40
|
},
|
|
47
|
-
data:
|
|
41
|
+
data: {
|
|
42
|
+
FileLeafRef: args.options.name,
|
|
43
|
+
Title: args.options.name
|
|
44
|
+
},
|
|
45
|
+
responseType: 'json'
|
|
48
46
|
};
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (contents && contents.ErrorInfo) {
|
|
53
|
-
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
47
|
+
const response = await request.patch(requestOptions);
|
|
48
|
+
if (response && response['odata.null'] === true) {
|
|
49
|
+
throw 'Folder not found.';
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
52
|
catch (err) {
|
|
57
|
-
this.
|
|
53
|
+
this.handleRejectedODataJsonPromise(err);
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
}
|
|
@@ -75,7 +75,7 @@ class SpoFolderRetentionLabelEnsureCommand extends SpoCommand {
|
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
77
|
const serverRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
78
|
-
requestUrl += `
|
|
78
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
79
79
|
}
|
|
80
80
|
const requestOptions = {
|
|
81
81
|
url: `${requestUrl}?$expand=ListItemAllFields,ListItemAllFields/ParentList&$select=ServerRelativeUrl,ListItemAllFields/ParentList/Id,ListItemAllFields/Id`,
|
|
@@ -91,7 +91,7 @@ class SpoFolderRetentionLabelRemoveCommand extends SpoCommand {
|
|
|
91
91
|
}
|
|
92
92
|
else {
|
|
93
93
|
const serverRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
94
|
-
requestUrl += `
|
|
94
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
95
95
|
}
|
|
96
96
|
const requestOptions = {
|
|
97
97
|
url: `${requestUrl}?$expand=ListItemAllFields,ListItemAllFields/ParentList&$select=ServerRelativeUrl,ListItemAllFields/ParentList/Id,ListItemAllFields/Id`,
|
|
@@ -41,7 +41,7 @@ class SpoFolderRoleAssignmentAddCommand extends SpoCommand {
|
|
|
41
41
|
requestUrl += `GetList('${formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
requestUrl += `
|
|
44
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
45
45
|
}
|
|
46
46
|
const roleDefinitionId = await this.getRoleDefinitionId(args.options);
|
|
47
47
|
if (args.options.upn) {
|
|
@@ -33,7 +33,7 @@ class SpoFolderRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
33
33
|
await logger.logToStderr(`Removing role assignment from folder in site at ${args.options.webUrl}...`);
|
|
34
34
|
}
|
|
35
35
|
const serverRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
36
|
-
const requestUrl = `${args.options.webUrl}/_api/web/
|
|
36
|
+
const requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
37
37
|
try {
|
|
38
38
|
if (args.options.upn) {
|
|
39
39
|
args.options.principalId = await this.getUserPrincipalId(args.options);
|
|
@@ -36,7 +36,7 @@ class SpoFolderRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
36
36
|
requestUrl += `GetList('${formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
|
-
requestUrl += `
|
|
39
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
40
40
|
}
|
|
41
41
|
const requestOptions = {
|
|
42
42
|
url: `${requestUrl}/breakroleinheritance(${keepExistingPermissions})`,
|
|
@@ -35,7 +35,7 @@ class SpoFolderRoleInheritanceResetCommand extends SpoCommand {
|
|
|
35
35
|
requestUrl += `GetList('${formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
requestUrl += `
|
|
38
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
39
39
|
}
|
|
40
40
|
const requestOptions = {
|
|
41
41
|
url: `${requestUrl}/resetroleinheritance`,
|
|
@@ -57,7 +57,6 @@ class SpoGroupListCommand extends SpoCommand {
|
|
|
57
57
|
responseType: 'json'
|
|
58
58
|
};
|
|
59
59
|
const groupProperties = await request.get(requestOptions);
|
|
60
|
-
await logger.log(groupProperties);
|
|
61
60
|
if (!options.output || !Cli.shouldTrimOutput(options.output)) {
|
|
62
61
|
await logger.log(groupProperties);
|
|
63
62
|
}
|
|
@@ -12,7 +12,7 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
12
12
|
import { spo } from '../../../../utils/spo.js';
|
|
13
13
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
14
14
|
import { validation } from '../../../../utils/validation.js';
|
|
15
|
-
import
|
|
15
|
+
import aadM365GroupSetCommand from '../../../aad/commands/m365group/m365group-set.js';
|
|
16
16
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
17
17
|
import commands from '../../commands.js';
|
|
18
18
|
import { SharingCapabilities } from '../site/SharingCapabilities.js';
|
|
@@ -238,7 +238,7 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
238
238
|
debug: this.debug,
|
|
239
239
|
verbose: this.verbose
|
|
240
240
|
};
|
|
241
|
-
promises.push(Cli.executeCommand(
|
|
241
|
+
promises.push(Cli.executeCommand(aadM365GroupSetCommand, { options: { ...commandOptions, _: [] } }));
|
|
242
242
|
}
|
|
243
243
|
if (args.options.description) {
|
|
244
244
|
promises.push(this.setGroupifiedSiteDescription(args.options.description));
|
|
@@ -26,15 +26,7 @@ class SpoThemeListCommand extends SpoCommand {
|
|
|
26
26
|
responseType: 'json'
|
|
27
27
|
};
|
|
28
28
|
const rawRes = await request.post(requestOptions);
|
|
29
|
-
|
|
30
|
-
if (themePreviews && themePreviews.length > 0) {
|
|
31
|
-
await logger.log(themePreviews);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
if (this.verbose) {
|
|
35
|
-
await logger.logToStderr('No themes found');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
29
|
+
await logger.log(rawRes.themePreviews);
|
|
38
30
|
}
|
|
39
31
|
catch (err) {
|
|
40
32
|
this.handleRejectedODataJsonPromise(err);
|
package/dist/utils/spo.js
CHANGED
|
@@ -292,7 +292,7 @@ export const spo = {
|
|
|
292
292
|
nextFolder += `/${folders[folderIndex]}`;
|
|
293
293
|
const folderServerRelativeUrl = urlUtil.getServerRelativePath(webFullUrl, nextFolder);
|
|
294
294
|
const requestOptions = {
|
|
295
|
-
url: `${webFullUrl}/_api/web/
|
|
295
|
+
url: `${webFullUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(folderServerRelativeUrl)}')`,
|
|
296
296
|
headers: {
|
|
297
297
|
'accept': 'application/json;odata=nometadata'
|
|
298
298
|
}
|
|
@@ -2,14 +2,14 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
import Tabs from '@theme/Tabs';
|
|
3
3
|
import TabItem from '@theme/TabItem';
|
|
4
4
|
|
|
5
|
-
# aad
|
|
5
|
+
# aad m365group add
|
|
6
6
|
|
|
7
7
|
Creates a Microsoft 365 Group
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
m365 aad
|
|
12
|
+
m365 aad m365group add [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Options
|
|
@@ -61,55 +61,55 @@ If an invalid user is provided in the comma-separated list of Owners or Members,
|
|
|
61
61
|
Create a public Microsoft 365 Group
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
|
-
m365 aad
|
|
64
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Create a private Microsoft 365 Group
|
|
68
68
|
|
|
69
69
|
```sh
|
|
70
|
-
m365 aad
|
|
70
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --isPrivate
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
Create a public Microsoft 365 Group and set specified users as its owners
|
|
74
74
|
|
|
75
75
|
```sh
|
|
76
|
-
m365 aad
|
|
76
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --owners "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
Create a public Microsoft 365 Group and set specified users as its members
|
|
80
80
|
|
|
81
81
|
```sh
|
|
82
|
-
m365 aad
|
|
82
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --members "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
Create a public Microsoft 365 Group and allow only group members to be able to post conversations to the group.
|
|
86
86
|
|
|
87
87
|
```sh
|
|
88
|
-
m365 aad
|
|
88
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --allowMembersToPost
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
Create a public Microsoft 365 Group and hide it from the Outlook experiences (web and client).
|
|
92
92
|
|
|
93
93
|
```sh
|
|
94
|
-
m365 aad
|
|
94
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --hideGroupInOutlook
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
Create a public Microsoft 365 Group and subscribe all new group members to receive group conversation emails when new messages are posted in the group.
|
|
98
98
|
|
|
99
99
|
```sh
|
|
100
|
-
m365 aad
|
|
100
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --subscribeNewGroupMembers
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
Create a public Microsoft 365 Group and set to not send welcome emails to new group members.
|
|
104
104
|
|
|
105
105
|
```sh
|
|
106
|
-
m365 aad
|
|
106
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --welcomeEmailDisabled
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Create a public Microsoft 365 Group and set its logo
|
|
110
110
|
|
|
111
111
|
```sh
|
|
112
|
-
m365 aad
|
|
112
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --logoPath images/logo.png
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
## Response
|
|
@@ -208,7 +208,7 @@ m365 aad o365group add --displayName Finance --description "This is the Contoso
|
|
|
208
208
|
<TabItem value="Markdown">
|
|
209
209
|
|
|
210
210
|
```md
|
|
211
|
-
# aad
|
|
211
|
+
# aad m365group add --displayName "Finance" --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname "finance"
|
|
212
212
|
|
|
213
213
|
Date: 2023-06-01
|
|
214
214
|
|
|
@@ -230,4 +230,4 @@ m365 aad o365group add --displayName Finance --description "This is the Contoso
|
|
|
230
230
|
```
|
|
231
231
|
|
|
232
232
|
</TabItem>
|
|
233
|
-
</Tabs>
|
|
233
|
+
</Tabs>
|
|
@@ -2,14 +2,14 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
import Tabs from '@theme/Tabs';
|
|
3
3
|
import TabItem from '@theme/TabItem';
|
|
4
4
|
|
|
5
|
-
# aad
|
|
5
|
+
# aad m365group conversation list
|
|
6
6
|
|
|
7
7
|
Lists conversations for the specified Microsoft 365 group
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
m365 aad
|
|
12
|
+
m365 aad m365group conversation list [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Options
|
|
@@ -26,7 +26,7 @@ m365 aad o365group conversation list [options]
|
|
|
26
26
|
Lists conversations for the specified Microsoft 365 group
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
m365 aad
|
|
29
|
+
m365 aad m365group conversation list --groupId '00000000-0000-0000-0000-000000000000'
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Response
|
|
@@ -77,7 +77,7 @@ m365 aad o365group conversation list --groupId '00000000-0000-0000-0000-00000000
|
|
|
77
77
|
<TabItem value="Markdown">
|
|
78
78
|
|
|
79
79
|
```md
|
|
80
|
-
# aad
|
|
80
|
+
# aad m365group conversation list --groupId "1cdce329-46a9-4fd3-8826-fe6587d25a8c"
|
|
81
81
|
|
|
82
82
|
Date: 2023-06-01
|
|
83
83
|
|
|
@@ -2,24 +2,24 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
import Tabs from '@theme/Tabs';
|
|
3
3
|
import TabItem from '@theme/TabItem';
|
|
4
4
|
|
|
5
|
-
# aad
|
|
5
|
+
# aad m365group conversation post list
|
|
6
6
|
|
|
7
7
|
Lists conversation posts of a Microsoft 365 group
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
m365 aad
|
|
12
|
+
m365 aad m365group conversation post list [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-i, --groupId [groupId]`
|
|
19
|
-
: The Id of the
|
|
19
|
+
: The Id of the Microsoft 365 Group. You can specify the groupId or groupDisplayName, but not both.
|
|
20
20
|
|
|
21
21
|
`-d, --groupDisplayName [groupDisplayName]`
|
|
22
|
-
: The Displayname of the
|
|
22
|
+
: The Displayname of the Microsoft 365 Group. You can specify the groupId or groupDisplayName, but not both.
|
|
23
23
|
|
|
24
24
|
`-t, --threadId <threadId>`
|
|
25
25
|
: The ID of the thread to retrieve details for
|
|
@@ -32,13 +32,13 @@ m365 aad o365group conversation post list [options]
|
|
|
32
32
|
Lists the posts of the specific conversation of Microsoft 365 group by groupId
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
|
-
m365 aad
|
|
35
|
+
m365 aad m365group conversation post list --groupId '00000000-0000-0000-0000-000000000000' --threadId 'AAQkADkwN2Q2NDg1LWQ3ZGYtNDViZi1iNGRiLTVhYjJmN2Q5NDkxZQAQAOnRAfDf71lIvrdK85FAn5E='
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Lists the posts of the specific conversation of Microsoft 365 group by groupDisplayName
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
|
-
m365 aad
|
|
41
|
+
m365 aad m365group conversation post list --groupDisplayName 'MyGroup' --threadId 'AAQkADkwN2Q2NDg1LWQ3ZGYtNDViZi1iNGRiLTVhYjJmN2Q5NDkxZQAQAOnRAfDf71lIvrdK85FAn5E='
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
## Response
|
|
@@ -97,7 +97,7 @@ m365 aad o365group conversation post list --groupDisplayName 'MyGroup' --threadI
|
|
|
97
97
|
<TabItem value="Markdown">
|
|
98
98
|
|
|
99
99
|
```md
|
|
100
|
-
# aad
|
|
100
|
+
# aad m365group conversation post list --groupId "1cdce329-46a9-4fd3-8826-fe6587d25a8c" --threadId "AAQkADEzYjY5N2FmLTVmZDYtNDgyYi1iZjBlLTgyNDU5ZTYyNGFkZQAQAGhnITi5DTNEgxisPwMQu74="
|
|
101
101
|
|
|
102
102
|
Date: 2023-06-02
|
|
103
103
|
|
|
@@ -114,4 +114,4 @@ m365 aad o365group conversation post list --groupDisplayName 'MyGroup' --threadI
|
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
</TabItem>
|
|
117
|
-
</Tabs>
|
|
117
|
+
</Tabs>
|
|
@@ -2,14 +2,14 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
import Tabs from '@theme/Tabs';
|
|
3
3
|
import TabItem from '@theme/TabItem';
|
|
4
4
|
|
|
5
|
-
# aad
|
|
5
|
+
# aad m365group get
|
|
6
6
|
|
|
7
7
|
Gets information about the specified Microsoft 365 Group or Microsoft Teams team
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
m365 aad
|
|
12
|
+
m365 aad m365group get [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Options
|
|
@@ -29,13 +29,13 @@ m365 aad o365group get [options]
|
|
|
29
29
|
Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
|
-
m365 aad
|
|
32
|
+
m365 aad m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ and also retrieve the URL of the corresponding SharePoint site
|
|
36
36
|
|
|
37
37
|
```sh
|
|
38
|
-
m365 aad
|
|
38
|
+
m365 aad m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSiteUrl
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## Response
|
|
@@ -134,7 +134,7 @@ m365 aad o365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSiteUr
|
|
|
134
134
|
<TabItem value="Markdown">
|
|
135
135
|
|
|
136
136
|
```md
|
|
137
|
-
# aad
|
|
137
|
+
# aad m365group get --id "ff99b38f-0a4b-4fbb-a034-b86988061e6d"
|
|
138
138
|
|
|
139
139
|
Date: 2023-06-01
|
|
140
140
|
|
|
@@ -156,4 +156,4 @@ m365 aad o365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSiteUr
|
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
</TabItem>
|
|
159
|
-
</Tabs>
|
|
159
|
+
</Tabs>
|