@pnp/cli-microsoft365 10.0.0-beta.e925c1c → 10.0.0-beta.fd332f4
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 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +6 -4
- package/dist/AuthServer.js +7 -7
- package/dist/Command.js +4 -1
- package/dist/api.js +1 -1
- package/dist/appInsights.js +6 -4
- package/dist/config.js +1 -0
- package/dist/m365/base/PowerAutomateCommand.js +1 -1
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- 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/commands/setupPresets.js +2 -4
- 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 +84 -62
- 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/file/commands/file-move.js +135 -0
- package/dist/m365/file/commands.js +2 -1
- package/dist/m365/flow/commands/environment/environment-get.js +1 -1
- package/dist/m365/flow/commands/environment/environment-list.js +2 -2
- package/dist/m365/flow/commands/flow-disable.js +1 -1
- package/dist/m365/flow/commands/flow-enable.js +1 -1
- package/dist/m365/flow/commands/flow-export.js +17 -16
- package/dist/m365/flow/commands/flow-get.js +1 -1
- package/dist/m365/flow/commands/flow-list.js +1 -1
- package/dist/m365/flow/commands/flow-remove.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +1 -1
- package/dist/m365/flow/commands/owner/owner-list.js +1 -1
- package/dist/m365/flow/commands/owner/owner-remove.js +1 -1
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-list.js +47 -0
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-restore.js +48 -0
- package/dist/m365/flow/commands/run/run-cancel.js +1 -1
- package/dist/m365/flow/commands/run/run-get.js +1 -1
- package/dist/m365/flow/commands/run/run-list.js +1 -1
- package/dist/m365/flow/commands/run/run-resubmit.js +2 -2
- package/dist/m365/flow/commands.js +2 -0
- 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.js +27 -0
- 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 +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.20.0.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- 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/contenttype/contenttype-field-remove.js +8 -8
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
- package/dist/m365/spo/commands/feature/feature-list.js +1 -8
- package/dist/m365/spo/commands/file/file-copy.js +11 -7
- package/dist/m365/spo/commands/file/file-move.js +55 -33
- package/dist/m365/spo/commands/file/file-remove.js +7 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +17 -54
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +13 -40
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +5 -13
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +5 -13
- package/dist/m365/spo/commands/folder/folder-copy.js +43 -35
- package/dist/m365/spo/commands/folder/folder-move.js +43 -35
- package/dist/m365/spo/commands/folder/folder-sharinglink-add.js +143 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-clear.js +111 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-remove.js +95 -0
- 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-get.js +17 -4
- package/dist/m365/spo/commands/list/list-remove.js +14 -4
- 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-section-add.js +185 -34
- package/dist/m365/spo/commands/page/page-template-list.js +1 -3
- package/dist/m365/spo/commands/site/SiteAdmin.js +2 -0
- package/dist/m365/spo/commands/site/site-admin-add.js +252 -0
- package/dist/m365/spo/commands/site/site-admin-list.js +10 -36
- package/dist/m365/spo/commands/site/site-admin-remove.js +194 -0
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
- package/dist/m365/spo/commands/tenant/tenant-site-membership-list.js +118 -0
- 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/user/user-get.js +67 -9
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +1 -1
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
- package/dist/m365/spo/commands.js +8 -1
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +56 -0
- package/dist/m365/spp/commands/model/model-list.js +57 -0
- package/dist/m365/spp/commands.js +6 -0
- package/dist/m365/teams/MeetingTranscript.js +2 -0
- package/dist/m365/teams/commands/channel/channel-get.js +15 -50
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +152 -0
- package/dist/m365/teams/commands/tab/tab-list.js +5 -3
- package/dist/m365/teams/commands/team/team-get.js +16 -21
- package/dist/m365/teams/commands.js +1 -0
- 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/request.js +46 -61
- package/dist/settingsNames.js +0 -1
- package/dist/telemetryRunner.js +2 -2
- package/dist/utils/spo.js +166 -29
- package/dist/utils/spp.js +22 -0
- package/dist/utils/teams.js +47 -5
- package/dist/utils/timersUtil.js +13 -0
- package/dist/utils/urlUtil.js +8 -0
- package/dist/utils/zod.js +12 -3
- package/docs/docs/_clisettings.mdx +0 -1
- 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 +3 -9
- 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 +26 -21
- 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/file/file-move.mdx +79 -0
- package/docs/docs/cmd/flow/recyclebinitem/recyclebinitem-list.mdx +132 -0
- package/docs/docs/cmd/flow/recyclebinitem/recyclebinitem-restore.mdx +55 -0
- package/docs/docs/cmd/login.mdx +9 -0
- package/docs/docs/cmd/setup.mdx +1 -3
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-get.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-add.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-remove.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx +7 -7
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +2 -2
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-move.mdx +116 -11
- package/docs/docs/cmd/spo/file/file-remove.mdx +13 -4
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +84 -13
- package/docs/docs/cmd/spo/folder/folder-move.mdx +84 -13
- package/docs/docs/cmd/spo/folder/folder-sharinglink-add.mdx +125 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-clear.mdx +50 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-remove.mdx +50 -0
- 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/hidedefaultthemes/hidedefaultthemes-get.mdx +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +1 -1
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-get.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-remove.mdx +10 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/page/page-section-add.mdx +57 -2
- package/docs/docs/cmd/spo/site/site-admin-add.mdx +67 -0
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
- package/docs/docs/cmd/spo/site/site-admin-remove.mdx +67 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-commsite-enable.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +6 -4
- package/docs/docs/cmd/spo/site/site-set.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalogurl-get.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-settings-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-site-membership-list.mdx +122 -0
- package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/theme/theme-apply.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-get.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-list.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-remove.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-set.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-ensure.mdx +2 -5
- package/docs/docs/cmd/spo/user/user-get.mdx +35 -9
- package/docs/docs/cmd/spp/contentcenter/contentcenter-list.mdx +287 -0
- package/docs/docs/cmd/spp/model/model-list.mdx +140 -0
- package/docs/docs/cmd/teams/meeting/meeting-transcript-get.mdx +132 -0
- package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
- package/npm-shrinkwrap.json +2215 -717
- package/package.json +20 -21
- 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
|
@@ -31,14 +31,6 @@ class SpoGroupMemberAddCommand extends SpoCommand {
|
|
|
31
31
|
}
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
33
|
try {
|
|
34
|
-
if (args.options.aadGroupIds) {
|
|
35
|
-
args.options.entraGroupIds = args.options.aadGroupIds;
|
|
36
|
-
await this.warn(logger, `Option 'aadGroupIds' is deprecated. Please use 'entraGroupIds' instead.`);
|
|
37
|
-
}
|
|
38
|
-
if (args.options.aadGroupNames) {
|
|
39
|
-
args.options.entraGroupNames = args.options.aadGroupNames;
|
|
40
|
-
await this.warn(logger, `Option 'aadGroupNames' is deprecated. Please use 'entraGroupNames' instead.`);
|
|
41
|
-
}
|
|
42
34
|
const loginNames = await this.getLoginNames(logger, args.options);
|
|
43
35
|
let apiUrl = `${args.options.webUrl}/_api/web/SiteGroups`;
|
|
44
36
|
if (args.options.groupId) {
|
|
@@ -132,9 +124,7 @@ _SpoGroupMemberAddCommand_instances = new WeakSet(), _SpoGroupMemberAddCommand_i
|
|
|
132
124
|
emails: typeof args.options.emails !== 'undefined',
|
|
133
125
|
userIds: typeof args.options.userIds !== 'undefined',
|
|
134
126
|
entraGroupIds: typeof args.options.entraGroupIds !== 'undefined',
|
|
135
|
-
|
|
136
|
-
entraGroupNames: typeof args.options.entraGroupNames !== 'undefined',
|
|
137
|
-
aadGroupNames: typeof args.options.aadGroupNames !== 'undefined'
|
|
127
|
+
entraGroupNames: typeof args.options.entraGroupNames !== 'undefined'
|
|
138
128
|
});
|
|
139
129
|
});
|
|
140
130
|
}, _SpoGroupMemberAddCommand_initOptions = function _SpoGroupMemberAddCommand_initOptions() {
|
|
@@ -152,12 +142,8 @@ _SpoGroupMemberAddCommand_instances = new WeakSet(), _SpoGroupMemberAddCommand_i
|
|
|
152
142
|
option: '--userIds [userIds]'
|
|
153
143
|
}, {
|
|
154
144
|
option: '--entraGroupIds [entraGroupIds]'
|
|
155
|
-
}, {
|
|
156
|
-
option: '--aadGroupIds [aadGroupIds]'
|
|
157
145
|
}, {
|
|
158
146
|
option: '--entraGroupNames [entraGroupNames]'
|
|
159
|
-
}, {
|
|
160
|
-
option: '--aadGroupNames [aadGroupNames]'
|
|
161
147
|
});
|
|
162
148
|
}, _SpoGroupMemberAddCommand_initValidators = function _SpoGroupMemberAddCommand_initValidators() {
|
|
163
149
|
this.validators.push(async (args) => {
|
|
@@ -192,18 +178,12 @@ _SpoGroupMemberAddCommand_instances = new WeakSet(), _SpoGroupMemberAddCommand_i
|
|
|
192
178
|
return `Option 'entraGroupIds' contains one or more invalid GUIDs: ${isValidArray}.`;
|
|
193
179
|
}
|
|
194
180
|
}
|
|
195
|
-
if (args.options.aadGroupIds) {
|
|
196
|
-
const isValidArray = validation.isValidGuidArray(args.options.aadGroupIds);
|
|
197
|
-
if (isValidArray !== true) {
|
|
198
|
-
return `Option 'aadGroupIds' contains one or more invalid GUIDs: ${isValidArray}.`;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
181
|
return true;
|
|
202
182
|
});
|
|
203
183
|
}, _SpoGroupMemberAddCommand_initOptionSets = function _SpoGroupMemberAddCommand_initOptionSets() {
|
|
204
|
-
this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userNames', 'emails', 'userIds', 'entraGroupIds', '
|
|
184
|
+
this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userNames', 'emails', 'userIds', 'entraGroupIds', 'entraGroupNames'] });
|
|
205
185
|
}, _SpoGroupMemberAddCommand_initTypes = function _SpoGroupMemberAddCommand_initTypes() {
|
|
206
|
-
this.types.string.push('webUrl', 'groupName', 'userNames', 'emails', 'userIds', 'entraGroupIds', '
|
|
186
|
+
this.types.string.push('webUrl', 'groupName', 'userNames', 'emails', 'userIds', 'entraGroupIds', 'entraGroupNames');
|
|
207
187
|
};
|
|
208
188
|
export default new SpoGroupMemberAddCommand();
|
|
209
189
|
//# sourceMappingURL=group-member-add.js.map
|
|
@@ -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
|
|
@@ -22,6 +22,7 @@ class SpoListGetCommand extends SpoCommand {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super();
|
|
24
24
|
_SpoListGetCommand_instances.add(this);
|
|
25
|
+
this.supportedBaseTemplates = [101, 109, 110, 111, 113, 114, 115, 116, 117, 119, 121, 122, 123, 126, 130, 175];
|
|
25
26
|
__classPrivateFieldGet(this, _SpoListGetCommand_instances, "m", _SpoListGetCommand_initTelemetry).call(this);
|
|
26
27
|
__classPrivateFieldGet(this, _SpoListGetCommand_instances, "m", _SpoListGetCommand_initOptions).call(this);
|
|
27
28
|
__classPrivateFieldGet(this, _SpoListGetCommand_instances, "m", _SpoListGetCommand_initValidators).call(this);
|
|
@@ -50,11 +51,8 @@ class SpoListGetCommand extends SpoCommand {
|
|
|
50
51
|
if (fieldsProperties.expandProperties.length > 0) {
|
|
51
52
|
queryParams.push(`$expand=${fieldsProperties.expandProperties.join(',')}`);
|
|
52
53
|
}
|
|
53
|
-
if (queryParams.length === 0) {
|
|
54
|
-
queryParams.push(`$expand=VersionPolicies`);
|
|
55
|
-
}
|
|
56
54
|
const requestOptions = {
|
|
57
|
-
url: `${requestUrl}
|
|
55
|
+
url: `${requestUrl}${queryParams.length > 0 ? `?${queryParams.join('&')}` : ''}`,
|
|
58
56
|
headers: {
|
|
59
57
|
'accept': 'application/json;odata=nometadata'
|
|
60
58
|
},
|
|
@@ -67,6 +65,9 @@ class SpoListGetCommand extends SpoCommand {
|
|
|
67
65
|
r.Member.PrincipalTypeString = ListPrincipalType[r.Member.PrincipalType];
|
|
68
66
|
});
|
|
69
67
|
}
|
|
68
|
+
if (this.supportedBaseTemplates.some(template => template === listInstance.BaseTemplate)) {
|
|
69
|
+
await this.retrieveVersionPolicies(requestUrl, listInstance);
|
|
70
|
+
}
|
|
70
71
|
if (listInstance.VersionPolicies) {
|
|
71
72
|
listInstance.VersionPolicies.DefaultTrimModeValue = DefaultTrimModeType[listInstance.VersionPolicies.DefaultTrimMode];
|
|
72
73
|
}
|
|
@@ -96,6 +97,18 @@ class SpoListGetCommand extends SpoCommand {
|
|
|
96
97
|
expandProperties: [...new Set(expandProperties)]
|
|
97
98
|
};
|
|
98
99
|
}
|
|
100
|
+
async retrieveVersionPolicies(requestUrl, listInstance) {
|
|
101
|
+
const requestOptions = {
|
|
102
|
+
url: `${requestUrl}?$select=VersionPolicies&$expand=VersionPolicies`,
|
|
103
|
+
headers: {
|
|
104
|
+
'accept': 'application/json;odata=nometadata'
|
|
105
|
+
},
|
|
106
|
+
responseType: 'json'
|
|
107
|
+
};
|
|
108
|
+
const { VersionPolicies } = await request.get(requestOptions);
|
|
109
|
+
listInstance.VersionPolicies = VersionPolicies;
|
|
110
|
+
listInstance.VersionPolicies.DefaultTrimModeValue = DefaultTrimModeType[listInstance.VersionPolicies.DefaultTrimMode];
|
|
111
|
+
}
|
|
99
112
|
}
|
|
100
113
|
_SpoListGetCommand_instances = new WeakSet(), _SpoListGetCommand_initTelemetry = function _SpoListGetCommand_initTelemetry() {
|
|
101
114
|
this.telemetry.push((args) => {
|
|
@@ -3,7 +3,7 @@ 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 _SpoListRemoveCommand_instances, _SpoListRemoveCommand_initTelemetry, _SpoListRemoveCommand_initOptions, _SpoListRemoveCommand_initValidators, _SpoListRemoveCommand_initOptionSets;
|
|
6
|
+
var _SpoListRemoveCommand_instances, _SpoListRemoveCommand_initTelemetry, _SpoListRemoveCommand_initOptions, _SpoListRemoveCommand_initValidators, _SpoListRemoveCommand_initOptionSets, _SpoListRemoveCommand_initTypes;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -22,6 +22,7 @@ class SpoListRemoveCommand extends SpoCommand {
|
|
|
22
22
|
_SpoListRemoveCommand_instances.add(this);
|
|
23
23
|
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initTelemetry).call(this);
|
|
24
24
|
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initOptions).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initTypes).call(this);
|
|
25
26
|
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initValidators).call(this);
|
|
26
27
|
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initOptionSets).call(this);
|
|
27
28
|
}
|
|
@@ -37,6 +38,9 @@ class SpoListRemoveCommand extends SpoCommand {
|
|
|
37
38
|
else {
|
|
38
39
|
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${formatting.encodeQueryParameter(args.options.title)}')`;
|
|
39
40
|
}
|
|
41
|
+
if (args.options.recycle) {
|
|
42
|
+
requestUrl += `/recycle`;
|
|
43
|
+
}
|
|
40
44
|
const requestOptions = {
|
|
41
45
|
url: requestUrl,
|
|
42
46
|
method: 'POST',
|
|
@@ -68,9 +72,10 @@ class SpoListRemoveCommand extends SpoCommand {
|
|
|
68
72
|
_SpoListRemoveCommand_instances = new WeakSet(), _SpoListRemoveCommand_initTelemetry = function _SpoListRemoveCommand_initTelemetry() {
|
|
69
73
|
this.telemetry.push((args) => {
|
|
70
74
|
Object.assign(this.telemetryProperties, {
|
|
71
|
-
id:
|
|
72
|
-
title:
|
|
73
|
-
force:
|
|
75
|
+
id: typeof args.options.id !== 'undefined',
|
|
76
|
+
title: typeof args.options.title !== 'undefined',
|
|
77
|
+
force: !!args.options.force,
|
|
78
|
+
recycle: !!args.options.recycle
|
|
74
79
|
});
|
|
75
80
|
});
|
|
76
81
|
}, _SpoListRemoveCommand_initOptions = function _SpoListRemoveCommand_initOptions() {
|
|
@@ -80,6 +85,8 @@ _SpoListRemoveCommand_instances = new WeakSet(), _SpoListRemoveCommand_initTelem
|
|
|
80
85
|
option: '-i, --id [id]'
|
|
81
86
|
}, {
|
|
82
87
|
option: '-t, --title [title]'
|
|
88
|
+
}, {
|
|
89
|
+
option: '--recycle'
|
|
83
90
|
}, {
|
|
84
91
|
option: '-f, --force'
|
|
85
92
|
});
|
|
@@ -97,6 +104,9 @@ _SpoListRemoveCommand_instances = new WeakSet(), _SpoListRemoveCommand_initTelem
|
|
|
97
104
|
});
|
|
98
105
|
}, _SpoListRemoveCommand_initOptionSets = function _SpoListRemoveCommand_initOptionSets() {
|
|
99
106
|
this.optionSets.push({ options: ['id', 'title'] });
|
|
107
|
+
}, _SpoListRemoveCommand_initTypes = function _SpoListRemoveCommand_initTypes() {
|
|
108
|
+
this.types.string.push('id', 'title', 'webUrl');
|
|
109
|
+
this.types.boolean.push('force', 'recycle');
|
|
100
110
|
};
|
|
101
111
|
export default new SpoListRemoveCommand();
|
|
102
112
|
//# sourceMappingURL=list-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
|