@pnp/cli-microsoft365 10.0.0-beta.c07d83f → 10.0.0-beta.d03ed9d
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands.js +1 -2
- package/dist/m365/commands/login.js +122 -69
- package/dist/m365/commands/setup.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-add.js +0 -5
- package/dist/m365/entra/commands/app/app-get.js +0 -5
- package/dist/m365/entra/commands/app/app-list.js +0 -5
- package/dist/m365/entra/commands/app/app-permission-add.js +0 -5
- package/dist/m365/entra/commands/app/app-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-role-add.js +0 -5
- package/dist/m365/entra/commands/app/app-role-list.js +0 -5
- package/dist/m365/entra/commands/app/app-role-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-set.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +0 -5
- package/dist/m365/entra/commands/group/group-add.js +0 -4
- package/dist/m365/entra/commands/group/group-get.js +0 -5
- package/dist/m365/entra/commands/group/group-list.js +0 -5
- package/dist/m365/entra/commands/group/{group-user-add.js → group-member-add.js} +18 -18
- package/dist/m365/entra/commands/group/{group-user-list.js → group-member-list.js} +16 -21
- package/dist/m365/entra/commands/group/{group-user-set.js → group-member-set.js} +19 -19
- package/dist/m365/entra/commands/group/group-remove.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +0 -5
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +0 -5
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +0 -5
- package/dist/m365/entra/commands/license/license-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-add.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-get.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-remove.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-renew.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-report-activitycounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitydetail.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activityfilecounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitygroupcounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitystorage.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-set.js +159 -86
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +5 -18
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +0 -6
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +3 -15
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +0 -5
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +3 -17
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +0 -5
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +0 -5
- package/dist/m365/entra/commands/policy/policy-list.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-disable.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-enable.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-get.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-set.js +0 -5
- package/dist/m365/entra/commands/user/user-add.js +0 -5
- package/dist/m365/entra/commands/user/user-get.js +0 -5
- package/dist/m365/entra/commands/user/user-guest-add.js +0 -5
- package/dist/m365/entra/commands/user/user-hibp.js +0 -5
- package/dist/m365/entra/commands/user/user-license-add.js +0 -5
- package/dist/m365/entra/commands/user/user-license-list.js +0 -5
- package/dist/m365/entra/commands/user/user-license-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-list.js +0 -5
- package/dist/m365/entra/commands/user/user-password-validate.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +0 -5
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +0 -4
- package/dist/m365/entra/commands/user/user-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-set.js +0 -5
- package/dist/m365/entra/commands/user/user-signin-list.js +0 -5
- package/dist/m365/entra/commands.js +3 -3
- package/dist/m365/external/commands/item/item-add.js +2 -5
- package/dist/m365/flow/commands/environment/environment-list.js +1 -1
- package/dist/m365/pa/commands/app/app-list.js +1 -6
- package/dist/m365/pa/commands/connector/connector-list.js +1 -6
- package/dist/m365/pa/commands/environment/environment-list.js +1 -1
- package/dist/m365/pp/commands/environment/environment-list.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.20.0-rc.1.js → doctor-1.20.0.js} +4 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002021_DEVDEP_rushstack_eslint_config.js +10 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.20.0-rc.1.js → upgrade-1.20.0.js} +28 -26
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
- package/dist/m365/spo/commands/app/app-instance-list.js +3 -18
- package/dist/m365/spo/commands/app/app-list.js +1 -8
- package/dist/m365/spo/commands/feature/feature-list.js +1 -8
- package/dist/m365/spo/commands/file/file-copy.js +6 -6
- package/dist/m365/spo/commands/file/file-move.js +6 -6
- package/dist/m365/spo/commands/folder/folder-move.js +43 -35
- package/dist/m365/spo/commands/group/group-member-add.js +3 -23
- package/dist/m365/spo/commands/group/group-member-remove.js +1 -18
- package/dist/m365/spo/commands/list/list-webhook-list.js +1 -6
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +1 -8
- package/dist/m365/spo/commands/page/page-list.js +1 -1
- package/dist/m365/spo/commands/page/page-remove.js +37 -16
- package/dist/m365/spo/commands/page/page-template-list.js +1 -3
- package/dist/m365/spo/commands/site/site-admin-list.js +8 -9
- package/dist/m365/spo/commands/site/site-admin-remove.js +5 -4
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
- package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +29 -32
- package/dist/m365/spo/commands/theme/theme-list.js +1 -1
- package/dist/m365/spo/commands/user/user-ensure.js +1 -11
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
- package/dist/m365/spo/commands.js +2 -1
- package/dist/m365/teams/commands/tab/tab-list.js +5 -3
- package/dist/m365/viva/commands/engage/Community.js +2 -0
- package/dist/m365/viva/commands/engage/engage-community-list.js +28 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/utils/spo.js +67 -28
- package/dist/utils/timersUtil.js +2 -1
- package/dist/utils/urlUtil.js +8 -0
- package/dist/utils/zod.js +11 -2
- package/docs/docs/cmd/cli/cli-doctor.mdx +24 -23
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-add.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-get.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-list.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-add.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-get.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-list.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-remove.mdx +0 -6
- package/docs/docs/cmd/entra/app/app-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-get.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-list.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +0 -6
- package/docs/docs/cmd/entra/app/app-remove.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-list.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-set.mdx +0 -1
- package/docs/docs/cmd/entra/approleassignment/approleassignment-add.mdx +0 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-list.mdx +0 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-remove.mdx +0 -6
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +0 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +0 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +0 -1
- package/docs/docs/cmd/entra/group/group-add.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-get.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-list.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-member-add.mdx +62 -0
- package/docs/docs/cmd/entra/group/{group-user-list.mdx → group-member-list.mdx} +14 -20
- package/docs/docs/cmd/entra/group/group-member-set.mdx +62 -0
- package/docs/docs/cmd/entra/group/group-remove.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-add.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-get.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-list.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-remove.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-set.mdx +0 -6
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-get.mdx +0 -6
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-list.mdx +0 -6
- package/docs/docs/cmd/entra/license/license-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-add.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-clear.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-remove.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-restore.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitycounts.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitydetail.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activityfilecounts.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +2 -8
- package/docs/docs/cmd/entra/m365group/m365group-report-activitystorage.mdx +2 -8
- package/docs/docs/cmd/entra/m365group/m365group-set.mdx +38 -23
- package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +5 -11
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +5 -14
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +0 -12
- package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +7 -17
- package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +4 -17
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +3 -9
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -7
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-remove.mdx +4 -10
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-set.mdx +3 -9
- package/docs/docs/cmd/entra/policy/policy-list.mdx +3 -9
- package/docs/docs/cmd/entra/siteclassification/siteclassification-disable.mdx +3 -9
- package/docs/docs/cmd/entra/siteclassification/siteclassification-enable.mdx +7 -13
- package/docs/docs/cmd/entra/siteclassification/siteclassification-get.mdx +1 -7
- package/docs/docs/cmd/entra/siteclassification/siteclassification-set.mdx +8 -14
- package/docs/docs/cmd/entra/user/user-add.mdx +4 -10
- package/docs/docs/cmd/entra/user/user-get.mdx +7 -13
- package/docs/docs/cmd/entra/user/user-guest-add.mdx +3 -9
- package/docs/docs/cmd/entra/user/user-hibp.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-license-add.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-license-list.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-license-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-list.mdx +1 -7
- package/docs/docs/cmd/entra/user/user-password-validate.mdx +1 -7
- package/docs/docs/cmd/entra/user/user-recyclebinitem-clear.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-recyclebinitem-list.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-recyclebinitem-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-recyclebinitem-restore.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-registrationdetails-list.mdx +7 -13
- package/docs/docs/cmd/entra/user/user-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-set.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-signin-list.mdx +9 -15
- package/docs/docs/cmd/external/item/item-add.mdx +3 -3
- package/docs/docs/cmd/login.mdx +9 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-move.mdx +1 -3
- package/docs/docs/cmd/spo/folder/folder-move.mdx +84 -13
- package/docs/docs/cmd/spo/group/group-member-add.mdx +8 -14
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +5 -11
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
- package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
- package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/user/user-ensure.mdx +2 -5
- package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
- package/package.json +1 -1
- package/dist/m365/cli/commands/cli-reconsent.js +0 -29
- package/dist/m365/entra/aadCommands.js +0 -89
- package/docs/docs/cmd/cli/cli-reconsent.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-add.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-set.mdx +0 -62
|
@@ -45,14 +45,6 @@ class SpoGroupMemberRemoveCommand extends SpoCommand {
|
|
|
45
45
|
return userOutput.userPrincipalName;
|
|
46
46
|
}
|
|
47
47
|
async commandAction(logger, args) {
|
|
48
|
-
if (args.options.aadGroupId) {
|
|
49
|
-
args.options.entraGroupId = args.options.aadGroupId;
|
|
50
|
-
await this.warn(logger, `Option 'aadGroupId' is deprecated. Please use 'entraGroupId' instead`);
|
|
51
|
-
}
|
|
52
|
-
if (args.options.aadGroupName) {
|
|
53
|
-
args.options.entraGroupName = args.options.aadGroupName;
|
|
54
|
-
await this.warn(logger, `Option 'aadGroupName' is deprecated. Please use 'entraGroupName' instead`);
|
|
55
|
-
}
|
|
56
48
|
if (args.options.force) {
|
|
57
49
|
if (this.debug) {
|
|
58
50
|
await logger.logToStderr('Confirmation bypassed by entering confirm option. Removing the user from SharePoint Group...');
|
|
@@ -136,9 +128,7 @@ _SpoGroupMemberRemoveCommand_instances = new WeakSet(), _SpoGroupMemberRemoveCom
|
|
|
136
128
|
email: (!(!args.options.email)).toString(),
|
|
137
129
|
userId: (!(!args.options.userId)).toString(),
|
|
138
130
|
entraGroupId: (!(!args.options.entraGroupId)).toString(),
|
|
139
|
-
aadGroupId: (!(!args.options.groupId)).toString(),
|
|
140
131
|
entraGroupName: (!(!args.options.entraGroupName)).toString(),
|
|
141
|
-
aadGroupName: (!(!args.options.aadGroupName)).toString(),
|
|
142
132
|
force: (!(!args.options.force)).toString()
|
|
143
133
|
});
|
|
144
134
|
});
|
|
@@ -157,12 +147,8 @@ _SpoGroupMemberRemoveCommand_instances = new WeakSet(), _SpoGroupMemberRemoveCom
|
|
|
157
147
|
option: '--userId [userId]'
|
|
158
148
|
}, {
|
|
159
149
|
option: '--entraGroupId [entraGroupId]'
|
|
160
|
-
}, {
|
|
161
|
-
option: '--aadGroupId [aadGroupId]'
|
|
162
150
|
}, {
|
|
163
151
|
option: '--entraGroupName [entraGroupName]'
|
|
164
|
-
}, {
|
|
165
|
-
option: '--aadGroupName [aadGroupName]'
|
|
166
152
|
}, {
|
|
167
153
|
option: '-f, --force'
|
|
168
154
|
});
|
|
@@ -183,13 +169,10 @@ _SpoGroupMemberRemoveCommand_instances = new WeakSet(), _SpoGroupMemberRemoveCom
|
|
|
183
169
|
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
184
170
|
return `${args.options.entraGroupId} is not a valid GUID`;
|
|
185
171
|
}
|
|
186
|
-
if (args.options.aadGroupId && !validation.isValidGuid(args.options.aadGroupId)) {
|
|
187
|
-
return `${args.options.aadGroupId} is not a valid GUID`;
|
|
188
|
-
}
|
|
189
172
|
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
190
173
|
});
|
|
191
174
|
}, _SpoGroupMemberRemoveCommand_initOptionSets = function _SpoGroupMemberRemoveCommand_initOptionSets() {
|
|
192
|
-
this.optionSets.push({ options: ['groupName', 'groupId'] }, { options: ['userName', 'email', 'userId', 'entraGroupId', '
|
|
175
|
+
this.optionSets.push({ options: ['groupName', 'groupId'] }, { options: ['userName', 'email', 'userId', 'entraGroupId', 'entraGroupName'] });
|
|
193
176
|
};
|
|
194
177
|
export default new SpoGroupMemberRemoveCommand();
|
|
195
178
|
//# sourceMappingURL=group-member-remove.js.map
|
|
@@ -49,13 +49,8 @@ class SpoListWebhookListCommand extends SpoCommand {
|
|
|
49
49
|
res.forEach(w => {
|
|
50
50
|
w.clientState = w.clientState || '';
|
|
51
51
|
});
|
|
52
|
-
await logger.log(res);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
if (this.verbose) {
|
|
56
|
-
await logger.logToStderr('No webhooks found');
|
|
57
|
-
}
|
|
58
52
|
}
|
|
53
|
+
await logger.log(res);
|
|
59
54
|
}
|
|
60
55
|
catch (err) {
|
|
61
56
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -50,14 +50,7 @@ class SpoListItemAttachmentListCommand extends SpoCommand {
|
|
|
50
50
|
};
|
|
51
51
|
try {
|
|
52
52
|
const attachmentFiles = await request.get(requestOptions);
|
|
53
|
-
|
|
54
|
-
await logger.log(attachmentFiles.AttachmentFiles);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
if (this.verbose) {
|
|
58
|
-
await logger.logToStderr('No attachments found');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
53
|
+
await logger.log(attachmentFiles.AttachmentFiles);
|
|
61
54
|
}
|
|
62
55
|
catch (err) {
|
|
63
56
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -48,8 +48,8 @@ class SpoPageListCommand extends SpoCommand {
|
|
|
48
48
|
return p;
|
|
49
49
|
});
|
|
50
50
|
pages.filter(p => p.ListItemAllFields).forEach(page => delete page.ListItemAllFields.ID);
|
|
51
|
-
await logger.log(pages);
|
|
52
51
|
}
|
|
52
|
+
await logger.log(pages);
|
|
53
53
|
}
|
|
54
54
|
catch (err) {
|
|
55
55
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -3,10 +3,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoPageRemoveCommand_instances, _SpoPageRemoveCommand_initOptions, _SpoPageRemoveCommand_initValidators;
|
|
6
|
+
var _SpoPageRemoveCommand_instances, _SpoPageRemoveCommand_initTelemetry, _SpoPageRemoveCommand_initOptions, _SpoPageRemoveCommand_initValidators, _SpoPageRemoveCommand_initTypes;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -21,15 +21,17 @@ class SpoPageRemoveCommand extends SpoCommand {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super();
|
|
23
23
|
_SpoPageRemoveCommand_instances.add(this);
|
|
24
|
+
__classPrivateFieldGet(this, _SpoPageRemoveCommand_instances, "m", _SpoPageRemoveCommand_initTelemetry).call(this);
|
|
24
25
|
__classPrivateFieldGet(this, _SpoPageRemoveCommand_instances, "m", _SpoPageRemoveCommand_initOptions).call(this);
|
|
25
26
|
__classPrivateFieldGet(this, _SpoPageRemoveCommand_instances, "m", _SpoPageRemoveCommand_initValidators).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoPageRemoveCommand_instances, "m", _SpoPageRemoveCommand_initTypes).call(this);
|
|
26
28
|
}
|
|
27
29
|
async commandAction(logger, args) {
|
|
28
30
|
if (args.options.force) {
|
|
29
31
|
await this.removePage(logger, args);
|
|
30
32
|
}
|
|
31
33
|
else {
|
|
32
|
-
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove
|
|
34
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove page '${args.options.name}'?` });
|
|
33
35
|
if (result) {
|
|
34
36
|
await this.removePage(logger, args);
|
|
35
37
|
}
|
|
@@ -37,44 +39,63 @@ class SpoPageRemoveCommand extends SpoCommand {
|
|
|
37
39
|
}
|
|
38
40
|
async removePage(logger, args) {
|
|
39
41
|
try {
|
|
40
|
-
|
|
41
|
-
let pageName = args.options.name;
|
|
42
|
-
|
|
43
|
-
requestDigest = reqDigest.FormDigestValue;
|
|
44
|
-
if (!pageName.endsWith('.aspx')) {
|
|
42
|
+
// Remove leading slashes from the page name (page can be nested in folders)
|
|
43
|
+
let pageName = urlUtil.removeLeadingSlashes(args.options.name);
|
|
44
|
+
if (!pageName.toLowerCase().endsWith('.aspx')) {
|
|
45
45
|
pageName += '.aspx';
|
|
46
46
|
}
|
|
47
47
|
if (this.verbose) {
|
|
48
48
|
await logger.logToStderr(`Removing page ${pageName}...`);
|
|
49
49
|
}
|
|
50
|
+
const filePath = `${urlUtil.getServerRelativeSiteUrl(args.options.webUrl)}/SitePages/${pageName}`;
|
|
50
51
|
const requestOptions = {
|
|
51
|
-
url: `${args.options
|
|
52
|
-
.webUrl}/_api/web/GetFileByServerRelativePath(DecodedUrl='${urlUtil.getServerRelativeSiteUrl(args.options.webUrl)}/sitepages/${pageName}')`,
|
|
52
|
+
url: `${args.options.webUrl}/_api/web/GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(filePath)}')`,
|
|
53
53
|
headers: {
|
|
54
|
-
'X-RequestDigest': requestDigest,
|
|
55
|
-
'X-HTTP-Method': 'DELETE',
|
|
56
|
-
'content-type': 'application/json;odata=nometadata',
|
|
57
54
|
accept: 'application/json;odata=nometadata'
|
|
58
55
|
},
|
|
59
56
|
responseType: 'json'
|
|
60
57
|
};
|
|
61
|
-
|
|
58
|
+
if (args.options.bypassSharedLock) {
|
|
59
|
+
requestOptions.headers.Prefer = 'bypass-shared-lock';
|
|
60
|
+
}
|
|
61
|
+
if (args.options.recycle) {
|
|
62
|
+
requestOptions.url += '/Recycle';
|
|
63
|
+
await request.post(requestOptions);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
await request.delete(requestOptions);
|
|
67
|
+
}
|
|
62
68
|
}
|
|
63
69
|
catch (err) {
|
|
64
70
|
this.handleRejectedODataJsonPromise(err);
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
|
-
_SpoPageRemoveCommand_instances = new WeakSet(),
|
|
74
|
+
_SpoPageRemoveCommand_instances = new WeakSet(), _SpoPageRemoveCommand_initTelemetry = function _SpoPageRemoveCommand_initTelemetry() {
|
|
75
|
+
this.telemetry.push((args) => {
|
|
76
|
+
Object.assign(this.telemetryProperties, {
|
|
77
|
+
force: !!args.options.force,
|
|
78
|
+
recycle: !!args.options.recycle,
|
|
79
|
+
bypassSharedLock: !!args.options.bypassSharedLock
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}, _SpoPageRemoveCommand_initOptions = function _SpoPageRemoveCommand_initOptions() {
|
|
69
83
|
this.options.unshift({
|
|
84
|
+
option: '-u, --webUrl <webUrl>'
|
|
85
|
+
}, {
|
|
70
86
|
option: '-n, --name <name>'
|
|
71
87
|
}, {
|
|
72
|
-
option: '
|
|
88
|
+
option: '--recycle'
|
|
89
|
+
}, {
|
|
90
|
+
option: '--bypassSharedLock'
|
|
73
91
|
}, {
|
|
74
92
|
option: '-f, --force'
|
|
75
93
|
});
|
|
76
94
|
}, _SpoPageRemoveCommand_initValidators = function _SpoPageRemoveCommand_initValidators() {
|
|
77
95
|
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
96
|
+
}, _SpoPageRemoveCommand_initTypes = function _SpoPageRemoveCommand_initTypes() {
|
|
97
|
+
this.types.string.push('name', 'webUrl');
|
|
98
|
+
this.types.boolean.push('force', 'bypassSharedLock', 'recycle');
|
|
78
99
|
};
|
|
79
100
|
export default new SpoPageRemoveCommand();
|
|
80
101
|
//# sourceMappingURL=page-remove.js.map
|
|
@@ -30,9 +30,7 @@ class SpoPageTemplateListCommand extends SpoCommand {
|
|
|
30
30
|
}
|
|
31
31
|
try {
|
|
32
32
|
const res = await odata.getAllItems(`${args.options.webUrl}/_api/sitepages/pages/templates`);
|
|
33
|
-
|
|
34
|
-
await logger.log(res);
|
|
35
|
-
}
|
|
33
|
+
await logger.log(res);
|
|
36
34
|
}
|
|
37
35
|
catch (err) {
|
|
38
36
|
// The API returns a 404 when no templates are created on the site collection
|
|
@@ -17,6 +17,9 @@ class SpoSiteAdminListCommand extends SpoCommand {
|
|
|
17
17
|
get description() {
|
|
18
18
|
return 'Lists all administrators of a specific SharePoint site';
|
|
19
19
|
}
|
|
20
|
+
defaultProperties() {
|
|
21
|
+
return ['Id', 'LoginName', 'Title', 'PrincipalTypeString'];
|
|
22
|
+
}
|
|
20
23
|
constructor() {
|
|
21
24
|
super();
|
|
22
25
|
_SpoSiteAdminListCommand_instances.add(this);
|
|
@@ -46,20 +49,16 @@ class SpoSiteAdminListCommand extends SpoCommand {
|
|
|
46
49
|
const requestOptions = {
|
|
47
50
|
url: `${adminUrl}/_api/SPO.Tenant/GetSiteAdministrators?siteId='${siteId}'`,
|
|
48
51
|
headers: {
|
|
49
|
-
accept: 'application/json;odata=nometadata'
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
accept: 'application/json;odata=nometadata'
|
|
53
|
+
},
|
|
54
|
+
responseType: 'json'
|
|
52
55
|
};
|
|
53
56
|
const response = await request.post(requestOptions);
|
|
54
|
-
const responseContent = JSON.parse(response);
|
|
55
57
|
const primaryAdminLoginName = await spo.getPrimaryAdminLoginNameAsAdmin(adminUrl, siteId, logger, this.verbose);
|
|
56
|
-
const mappedResult =
|
|
57
|
-
Id: null,
|
|
58
|
+
const mappedResult = response.value.map((u) => ({
|
|
58
59
|
Email: u.email,
|
|
59
60
|
LoginName: u.loginName,
|
|
60
61
|
Title: u.name,
|
|
61
|
-
PrincipalType: null,
|
|
62
|
-
PrincipalTypeString: null,
|
|
63
62
|
IsPrimaryAdmin: u.loginName === primaryAdminLoginName
|
|
64
63
|
}));
|
|
65
64
|
await logger.log(mappedResult);
|
|
@@ -78,7 +77,6 @@ class SpoSiteAdminListCommand extends SpoCommand {
|
|
|
78
77
|
}
|
|
79
78
|
const requestOptions = {
|
|
80
79
|
url: `${args.options.siteUrl}/_api/web/siteusers?$filter=IsSiteAdmin eq true`,
|
|
81
|
-
method: 'GET',
|
|
82
80
|
headers: {
|
|
83
81
|
'accept': 'application/json;odata=nometadata'
|
|
84
82
|
},
|
|
@@ -114,6 +112,7 @@ _SpoSiteAdminListCommand_instances = new WeakSet(), _SpoSiteAdminListCommand_ini
|
|
|
114
112
|
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.siteUrl));
|
|
115
113
|
}, _SpoSiteAdminListCommand_initTypes = function _SpoSiteAdminListCommand_initTypes() {
|
|
116
114
|
this.types.string.push('siteUrl');
|
|
115
|
+
this.types.boolean.push('asAdmin');
|
|
117
116
|
};
|
|
118
117
|
export default new SpoSiteAdminListCommand();
|
|
119
118
|
//# sourceMappingURL=site-admin-list.js.map
|
|
@@ -77,11 +77,11 @@ class SpoSiteAdminRemoveCommand extends SpoCommand {
|
|
|
77
77
|
headers: {
|
|
78
78
|
accept: 'application/json;odata=nometadata',
|
|
79
79
|
'content-type': 'application/json;charset=utf-8'
|
|
80
|
-
}
|
|
80
|
+
},
|
|
81
|
+
responseType: 'json'
|
|
81
82
|
};
|
|
82
83
|
const response = await request.post(requestOptions);
|
|
83
|
-
|
|
84
|
-
return responseContent.value;
|
|
84
|
+
return response.value;
|
|
85
85
|
}
|
|
86
86
|
async getCorrectLoginName(options) {
|
|
87
87
|
if (options.userId || options.userName) {
|
|
@@ -116,7 +116,8 @@ class SpoSiteAdminRemoveCommand extends SpoCommand {
|
|
|
116
116
|
siteId: siteId,
|
|
117
117
|
secondaryAdministratorLoginNames: admins.map(u => u.loginName)
|
|
118
118
|
}
|
|
119
|
-
}
|
|
119
|
+
},
|
|
120
|
+
responseType: 'json'
|
|
120
121
|
};
|
|
121
122
|
await request.post(requestOptions);
|
|
122
123
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { zod } from '../../../../utils/zod.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
import { validation } from '../../../../utils/validation.js';
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
const options = globalOptionsZod
|
|
9
|
+
.extend({
|
|
10
|
+
siteUrl: zod.alias('u', z.string()
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, url => ({
|
|
12
|
+
message: `'${url}' is not a valid SharePoint Online site URL.`
|
|
13
|
+
}))),
|
|
14
|
+
capability: z.enum(['full', 'limited', 'ownersOnly'])
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
class SpoSiteSharingPermissionSetCommand extends SpoCommand {
|
|
18
|
+
get name() {
|
|
19
|
+
return commands.SITE_SHARINGPERMISSION_SET;
|
|
20
|
+
}
|
|
21
|
+
get description() {
|
|
22
|
+
return 'Controls how a site and its components can be shared';
|
|
23
|
+
}
|
|
24
|
+
get schema() {
|
|
25
|
+
return options;
|
|
26
|
+
}
|
|
27
|
+
async commandAction(logger, args) {
|
|
28
|
+
try {
|
|
29
|
+
if (this.verbose) {
|
|
30
|
+
await logger.logToStderr(`Updating sharing permissions for site '${args.options.siteUrl}'...`);
|
|
31
|
+
}
|
|
32
|
+
const { capability } = args.options;
|
|
33
|
+
if (this.verbose) {
|
|
34
|
+
await logger.logToStderr(`Updating site sharing permissions...`);
|
|
35
|
+
}
|
|
36
|
+
const requestOptionsWeb = {
|
|
37
|
+
url: `${args.options.siteUrl}/_api/Web`,
|
|
38
|
+
headers: {
|
|
39
|
+
accept: 'application/json;odata=nometadata'
|
|
40
|
+
},
|
|
41
|
+
responseType: 'json',
|
|
42
|
+
data: {
|
|
43
|
+
MembersCanShare: capability === 'full' || capability === 'limited'
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
await request.patch(requestOptionsWeb);
|
|
47
|
+
if (this.verbose) {
|
|
48
|
+
await logger.logToStderr(`Updating associated member group sharing permissions...`);
|
|
49
|
+
}
|
|
50
|
+
const requestOptionsMemberGroup = {
|
|
51
|
+
url: `${args.options.siteUrl}/_api/Web/AssociatedMemberGroup`,
|
|
52
|
+
headers: {
|
|
53
|
+
accept: 'application/json;odata=nometadata'
|
|
54
|
+
},
|
|
55
|
+
responseType: 'json',
|
|
56
|
+
data: {
|
|
57
|
+
AllowMembersEditMembership: capability === 'full'
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
await request.patch(requestOptionsMemberGroup);
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
this.handleRejectedODataJsonPromise(err);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export default new SpoSiteSharingPermissionSetCommand();
|
|
68
|
+
//# sourceMappingURL=site-sharingpermission-set.js.map
|
|
@@ -22,9 +22,7 @@ class SpoSiteScriptListCommand extends SpoCommand {
|
|
|
22
22
|
responseType: 'json'
|
|
23
23
|
};
|
|
24
24
|
const res = await request.post(requestOptions);
|
|
25
|
-
|
|
26
|
-
await logger.log(res.value);
|
|
27
|
-
}
|
|
25
|
+
await logger.log(res.value);
|
|
28
26
|
}
|
|
29
27
|
catch (err) {
|
|
30
28
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -3,25 +3,26 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _SpoTenantSiteRenameCommand_instances, _SpoTenantSiteRenameCommand_initTelemetry, _SpoTenantSiteRenameCommand_initOptions, _SpoTenantSiteRenameCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
|
+
import { timersUtil } from '../../../../utils/timersUtil.js';
|
|
10
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
12
|
import commands from '../../commands.js';
|
|
12
|
-
class
|
|
13
|
+
class SpoTenantSiteRenameCommand extends SpoCommand {
|
|
13
14
|
get name() {
|
|
14
|
-
return commands.
|
|
15
|
+
return commands.TENANT_SITE_RENAME;
|
|
15
16
|
}
|
|
16
17
|
get description() {
|
|
17
18
|
return 'Renames the URL and title of a site collection';
|
|
18
19
|
}
|
|
19
20
|
constructor() {
|
|
20
21
|
super();
|
|
21
|
-
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
22
|
+
_SpoTenantSiteRenameCommand_instances.add(this);
|
|
23
|
+
__classPrivateFieldGet(this, _SpoTenantSiteRenameCommand_instances, "m", _SpoTenantSiteRenameCommand_initTelemetry).call(this);
|
|
24
|
+
__classPrivateFieldGet(this, _SpoTenantSiteRenameCommand_instances, "m", _SpoTenantSiteRenameCommand_initOptions).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _SpoTenantSiteRenameCommand_instances, "m", _SpoTenantSiteRenameCommand_initValidators).call(this);
|
|
25
26
|
}
|
|
26
27
|
async commandAction(logger, args) {
|
|
27
28
|
try {
|
|
@@ -40,24 +41,23 @@ class SpoSiteRenameCommand extends SpoCommand {
|
|
|
40
41
|
optionsBitmask = optionsBitmask | 16;
|
|
41
42
|
}
|
|
42
43
|
const requestOptions = {
|
|
43
|
-
"SourceSiteUrl": options.url,
|
|
44
|
-
"TargetSiteUrl": options.newUrl,
|
|
45
|
-
"TargetSiteTitle": options.newTitle || null,
|
|
46
|
-
"Option": optionsBitmask,
|
|
47
|
-
"Reserve": null,
|
|
48
|
-
"SkipGestures": null,
|
|
49
|
-
"OperationId": "00000000-0000-0000-0000-000000000000"
|
|
50
|
-
};
|
|
51
|
-
const postData = {
|
|
52
44
|
url: `${spoAdminUrl}/_api/SiteRenameJobs?api-version=1.4.7`,
|
|
53
45
|
headers: {
|
|
54
46
|
'X-RequestDigest': this.context.FormDigestValue,
|
|
55
47
|
'Content-Type': 'application/json'
|
|
56
48
|
},
|
|
57
49
|
responseType: 'json',
|
|
58
|
-
data:
|
|
50
|
+
data: {
|
|
51
|
+
SourceSiteUrl: options.url,
|
|
52
|
+
TargetSiteUrl: options.newUrl,
|
|
53
|
+
TargetSiteTitle: options.newTitle || null,
|
|
54
|
+
Option: optionsBitmask,
|
|
55
|
+
Reserve: null,
|
|
56
|
+
SkipGestures: null,
|
|
57
|
+
OperationId: '00000000-0000-0000-0000-000000000000'
|
|
58
|
+
}
|
|
59
59
|
};
|
|
60
|
-
const res = await request.post(
|
|
60
|
+
const res = await request.post(requestOptions);
|
|
61
61
|
if (options.verbose) {
|
|
62
62
|
await logger.logToStderr(res);
|
|
63
63
|
}
|
|
@@ -92,23 +92,20 @@ class SpoSiteRenameCommand extends SpoCommand {
|
|
|
92
92
|
if (this.operationData.JobState === "Success") {
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
await
|
|
95
|
+
await timersUtil.setTimeout(SpoTenantSiteRenameCommand.checkIntervalInMs);
|
|
96
96
|
await command.waitForRenameCompletion(command, isVerbose, spoAdminUrl, siteUrl, iteration);
|
|
97
97
|
}
|
|
98
|
-
sleep(ms) {
|
|
99
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
100
|
-
}
|
|
101
98
|
}
|
|
102
|
-
|
|
99
|
+
_SpoTenantSiteRenameCommand_instances = new WeakSet(), _SpoTenantSiteRenameCommand_initTelemetry = function _SpoTenantSiteRenameCommand_initTelemetry() {
|
|
103
100
|
this.telemetry.push((args) => {
|
|
104
101
|
Object.assign(this.telemetryProperties, {
|
|
105
|
-
newTitle: args.options.newTitle
|
|
106
|
-
suppressMarketplaceAppCheck: args.options.suppressMarketplaceAppCheck,
|
|
107
|
-
suppressWorkflow2013Check: args.options.suppressWorkflow2013Check,
|
|
108
|
-
wait: args.options.wait
|
|
102
|
+
newTitle: typeof args.options.newTitle !== 'undefined',
|
|
103
|
+
suppressMarketplaceAppCheck: !!args.options.suppressMarketplaceAppCheck,
|
|
104
|
+
suppressWorkflow2013Check: !!args.options.suppressWorkflow2013Check,
|
|
105
|
+
wait: !!args.options.wait
|
|
109
106
|
});
|
|
110
107
|
});
|
|
111
|
-
},
|
|
108
|
+
}, _SpoTenantSiteRenameCommand_initOptions = function _SpoTenantSiteRenameCommand_initOptions() {
|
|
112
109
|
this.options.unshift({
|
|
113
110
|
option: '-u, --url <url>'
|
|
114
111
|
}, {
|
|
@@ -122,7 +119,7 @@ _SpoSiteRenameCommand_instances = new WeakSet(), _SpoSiteRenameCommand_initTelem
|
|
|
122
119
|
}, {
|
|
123
120
|
option: '--wait'
|
|
124
121
|
});
|
|
125
|
-
},
|
|
122
|
+
}, _SpoTenantSiteRenameCommand_initValidators = function _SpoTenantSiteRenameCommand_initValidators() {
|
|
126
123
|
this.validators.push(async (args) => {
|
|
127
124
|
if (args.options.url.toLowerCase() === args.options.newUrl.toLowerCase()) {
|
|
128
125
|
return 'The new URL cannot be the same as the target URL.';
|
|
@@ -130,6 +127,6 @@ _SpoSiteRenameCommand_instances = new WeakSet(), _SpoSiteRenameCommand_initTelem
|
|
|
130
127
|
return true;
|
|
131
128
|
});
|
|
132
129
|
};
|
|
133
|
-
|
|
134
|
-
export default new
|
|
135
|
-
//# sourceMappingURL=site-rename.js.map
|
|
130
|
+
SpoTenantSiteRenameCommand.checkIntervalInMs = 5000;
|
|
131
|
+
export default new SpoTenantSiteRenameCommand();
|
|
132
|
+
//# sourceMappingURL=tenant-site-rename.js.map
|
|
@@ -26,7 +26,7 @@ class SpoThemeListCommand extends SpoCommand {
|
|
|
26
26
|
responseType: 'json'
|
|
27
27
|
};
|
|
28
28
|
const rawRes = await request.post(requestOptions);
|
|
29
|
-
await logger.log(rawRes.themePreviews);
|
|
29
|
+
await logger.log(rawRes.themePreviews || []);
|
|
30
30
|
}
|
|
31
31
|
catch (err) {
|
|
32
32
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -25,10 +25,6 @@ class SpoUserEnsureCommand extends SpoCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initOptionSets).call(this);
|
|
26
26
|
}
|
|
27
27
|
async commandAction(logger, args) {
|
|
28
|
-
if (args.options.aadId) {
|
|
29
|
-
args.options.entraId = args.options.aadId;
|
|
30
|
-
await this.warn(logger, `Option 'aadId' is deprecated. Please use 'entraId' instead`);
|
|
31
|
-
}
|
|
32
28
|
if (this.verbose) {
|
|
33
29
|
await logger.logToStderr(`Ensuring user ${args.options.entraId || args.options.userName} at site ${args.options.webUrl}`);
|
|
34
30
|
}
|
|
@@ -62,7 +58,6 @@ _SpoUserEnsureCommand_instances = new WeakSet(), _SpoUserEnsureCommand_initTelem
|
|
|
62
58
|
this.telemetry.push((args) => {
|
|
63
59
|
Object.assign(this.telemetryProperties, {
|
|
64
60
|
entraId: typeof args.options.entraId !== 'undefined',
|
|
65
|
-
aadId: typeof args.options.aadId !== 'undefined',
|
|
66
61
|
userName: typeof args.options.userName !== 'undefined'
|
|
67
62
|
});
|
|
68
63
|
});
|
|
@@ -71,8 +66,6 @@ _SpoUserEnsureCommand_instances = new WeakSet(), _SpoUserEnsureCommand_initTelem
|
|
|
71
66
|
option: '-u, --webUrl <webUrl>'
|
|
72
67
|
}, {
|
|
73
68
|
option: '--entraId [entraId]'
|
|
74
|
-
}, {
|
|
75
|
-
option: '--aadId [aadId]'
|
|
76
69
|
}, {
|
|
77
70
|
option: '--userName [userName]'
|
|
78
71
|
});
|
|
@@ -85,16 +78,13 @@ _SpoUserEnsureCommand_instances = new WeakSet(), _SpoUserEnsureCommand_initTelem
|
|
|
85
78
|
if (args.options.entraId && !validation.isValidGuid(args.options.entraId)) {
|
|
86
79
|
return `${args.options.entraId} is not a valid GUID.`;
|
|
87
80
|
}
|
|
88
|
-
if (args.options.aadId && !validation.isValidGuid(args.options.aadId)) {
|
|
89
|
-
return `${args.options.aadId} is not a valid GUID.`;
|
|
90
|
-
}
|
|
91
81
|
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
92
82
|
return `${args.options.userName} is not a valid userName.`;
|
|
93
83
|
}
|
|
94
84
|
return true;
|
|
95
85
|
});
|
|
96
86
|
}, _SpoUserEnsureCommand_initOptionSets = function _SpoUserEnsureCommand_initOptionSets() {
|
|
97
|
-
this.optionSets.push({ options: ['entraId', '
|
|
87
|
+
this.optionSets.push({ options: ['entraId', 'userName'] });
|
|
98
88
|
};
|
|
99
89
|
export default new SpoUserEnsureCommand();
|
|
100
90
|
//# sourceMappingURL=user-ensure.js.map
|
|
@@ -41,12 +41,7 @@ class SpoWebClientSideWebPartListCommand extends SpoCommand {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
|
|
45
|
-
await logger.logToStderr("No client-side web parts available for this site");
|
|
46
|
-
}
|
|
47
|
-
if (clientSideWebParts.length > 0) {
|
|
48
|
-
await logger.log(clientSideWebParts);
|
|
49
|
-
}
|
|
44
|
+
await logger.log(clientSideWebParts);
|
|
50
45
|
}
|
|
51
46
|
catch (err) {
|
|
52
47
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -270,8 +270,8 @@ export default {
|
|
|
270
270
|
SITE_RECYCLEBINITEM_REMOVE: `${prefix} site recyclebinitem remove`,
|
|
271
271
|
SITE_RECYCLEBINITEM_RESTORE: `${prefix} site recyclebinitem restore`,
|
|
272
272
|
SITE_REMOVE: `${prefix} site remove`,
|
|
273
|
-
SITE_RENAME: `${prefix} site rename`,
|
|
274
273
|
SITE_SET: `${prefix} site set`,
|
|
274
|
+
SITE_SHARINGPERMISSION_SET: `${prefix} site sharingpermission set`,
|
|
275
275
|
SITE_CHROME_SET: `${prefix} site chrome set`,
|
|
276
276
|
SITEDESIGN_ADD: `${prefix} sitedesign add`,
|
|
277
277
|
SITEDESIGN_APPLY: `${prefix} sitedesign apply`,
|
|
@@ -321,6 +321,7 @@ export default {
|
|
|
321
321
|
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`,
|
|
322
322
|
TENANT_SETTINGS_SET: `${prefix} tenant settings set`,
|
|
323
323
|
TENANT_SITE_ARCHIVE: `${prefix} tenant site archive`,
|
|
324
|
+
TENANT_SITE_RENAME: `${prefix} tenant site rename`,
|
|
324
325
|
TENANT_SITE_UNARCHIVE: `${prefix} tenant site unarchive`,
|
|
325
326
|
TERM_ADD: `${prefix} term add`,
|
|
326
327
|
TERM_GET: `${prefix} term get`,
|
|
@@ -29,9 +29,11 @@ class TeamsTabListCommand extends GraphCommand {
|
|
|
29
29
|
const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${formatting.encodeQueryParameter(args.options.channelId)}/tabs?$expand=teamsApp`;
|
|
30
30
|
try {
|
|
31
31
|
const items = await odata.getAllItems(endpoint);
|
|
32
|
-
|
|
33
|
-
i
|
|
34
|
-
|
|
32
|
+
if (args.options.output !== 'json') {
|
|
33
|
+
items.forEach(i => {
|
|
34
|
+
i.teamsAppTabId = i.teamsApp.id;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
35
37
|
await logger.log(items);
|
|
36
38
|
}
|
|
37
39
|
catch (err) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { odata } from '../../../../utils/odata.js';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
class VivaEngageCommunityListCommand extends GraphCommand {
|
|
5
|
+
get name() {
|
|
6
|
+
return commands.ENGAGE_COMMUNITY_LIST;
|
|
7
|
+
}
|
|
8
|
+
get description() {
|
|
9
|
+
return 'Lists all Viva Engage communities';
|
|
10
|
+
}
|
|
11
|
+
defaultProperties() {
|
|
12
|
+
return ['id', 'displayName', 'privacy'];
|
|
13
|
+
}
|
|
14
|
+
async commandAction(logger) {
|
|
15
|
+
if (this.verbose) {
|
|
16
|
+
await logger.logToStderr('Getting all Viva Engage communities...');
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const results = await odata.getAllItems(`${this.resource}/v1.0/employeeExperience/communities`);
|
|
20
|
+
await logger.log(results);
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
this.handleRejectedODataJsonPromise(err);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export default new VivaEngageCommunityListCommand();
|
|
28
|
+
//# sourceMappingURL=engage-community-list.js.map
|
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
CONNECTIONS_APP_CREATE: `${prefix} connections app create`,
|
|
4
4
|
ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
|
|
5
5
|
ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
|
|
6
|
+
ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
|
|
6
7
|
ENGAGE_GROUP_LIST: `${prefix} engage group list`,
|
|
7
8
|
ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
|
|
8
9
|
ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
|