@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
|
@@ -78,15 +78,15 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand {
|
|
|
78
78
|
const updateChildContentTypes = args.options.listTitle || args.options.listId || args.options.listUrl ? false : args.options.updateChildContentTypes === true;
|
|
79
79
|
if (this.debug) {
|
|
80
80
|
const additionalLog = args.options.listTitle ? `; ListTitle='${args.options.listTitle}'` : args.options.listId ? `; ListId='${args.options.listId}'` : args.options.listUrl ? `; ListUrl='${args.options.listUrl}'` : ` ; UpdateChildContentTypes='${updateChildContentTypes}`;
|
|
81
|
-
await logger.logToStderr(`Remove FieldLink from ContentType.
|
|
81
|
+
await logger.logToStderr(`Remove FieldLink from ContentType. Id='${args.options.id}' ; ContentTypeId='${args.options.contentTypeId}' ${additionalLog}`);
|
|
82
82
|
await logger.logToStderr(`Execute ProcessQuery.`);
|
|
83
83
|
}
|
|
84
84
|
let requestBody = '';
|
|
85
85
|
if (listId) {
|
|
86
|
-
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="18" ObjectPathId="17" /><ObjectPath Id="20" ObjectPathId="19" /><Method Name="DeleteObject" Id="21" ObjectPathId="19" /><Method Name="Update" Id="22" ObjectPathId="15"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="17" ParentId="15" Name="FieldLinks" /><Method Id="19" ParentId="17" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.
|
|
86
|
+
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="18" ObjectPathId="17" /><ObjectPath Id="20" ObjectPathId="19" /><Method Name="DeleteObject" Id="21" ObjectPathId="19" /><Method Name="Update" Id="22" ObjectPathId="15"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="17" ParentId="15" Name="FieldLinks" /><Method Id="19" ParentId="17" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.id)}}</Parameter></Parameters></Method><Identity Id="15" Name="09eec89e-709b-0000-558c-c222dcaf9162|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}:list:${listId}:contenttype:${formatting.escapeXml(args.options.contentTypeId)}" /></ObjectPaths></Request>`;
|
|
87
87
|
}
|
|
88
88
|
else {
|
|
89
|
-
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="77" ObjectPathId="76" /><ObjectPath Id="79" ObjectPathId="78" /><Method Name="DeleteObject" Id="80" ObjectPathId="78" /><Method Name="Update" Id="81" ObjectPathId="24"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="76" ParentId="24" Name="FieldLinks" /><Method Id="78" ParentId="76" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.
|
|
89
|
+
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="77" ObjectPathId="76" /><ObjectPath Id="79" ObjectPathId="78" /><Method Name="DeleteObject" Id="80" ObjectPathId="78" /><Method Name="Update" Id="81" ObjectPathId="24"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="76" ParentId="24" Name="FieldLinks" /><Method Id="78" ParentId="76" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.id)}}</Parameter></Parameters></Method><Identity Id="24" Name="6b3ec69e-00a7-0000-55a3-61f8d779d2b3|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}:contenttype:${formatting.escapeXml(args.options.contentTypeId)}" /></ObjectPaths></Request>`;
|
|
90
90
|
}
|
|
91
91
|
requestOptions = {
|
|
92
92
|
url: `${args.options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
@@ -110,7 +110,7 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand {
|
|
|
110
110
|
await removeFieldLink();
|
|
111
111
|
}
|
|
112
112
|
else {
|
|
113
|
-
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the column ${args.options.
|
|
113
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the column ${args.options.id} from content type ${args.options.contentTypeId}?` });
|
|
114
114
|
if (result) {
|
|
115
115
|
await removeFieldLink();
|
|
116
116
|
}
|
|
@@ -160,9 +160,9 @@ _SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFiel
|
|
|
160
160
|
}, {
|
|
161
161
|
option: '--listUrl [listUrl]'
|
|
162
162
|
}, {
|
|
163
|
-
option: '
|
|
163
|
+
option: '--contentTypeId <contentTypeId>'
|
|
164
164
|
}, {
|
|
165
|
-
option: '--
|
|
165
|
+
option: '-i, --id <id>'
|
|
166
166
|
}, {
|
|
167
167
|
option: '-c, --updateChildContentTypes'
|
|
168
168
|
}, {
|
|
@@ -170,8 +170,8 @@ _SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFiel
|
|
|
170
170
|
});
|
|
171
171
|
}, _SpoContentTypeFieldRemoveCommand_initValidators = function _SpoContentTypeFieldRemoveCommand_initValidators() {
|
|
172
172
|
this.validators.push(async (args) => {
|
|
173
|
-
if (!validation.isValidGuid(args.options.
|
|
174
|
-
return `${args.options.
|
|
173
|
+
if (!validation.isValidGuid(args.options.id)) {
|
|
174
|
+
return `${args.options.id} is not a valid GUID`;
|
|
175
175
|
}
|
|
176
176
|
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
177
177
|
return `${args.options.listId} is not a valid GUID`;
|
|
@@ -262,9 +262,9 @@ _SpoContentTypeFieldSetCommand_instances = new WeakSet(), _SpoContentTypeFieldSe
|
|
|
262
262
|
this.options.unshift({
|
|
263
263
|
option: '-u, --webUrl <webUrl>'
|
|
264
264
|
}, {
|
|
265
|
-
option: '
|
|
265
|
+
option: '--contentTypeId <contentTypeId>'
|
|
266
266
|
}, {
|
|
267
|
-
option: '--id <id>'
|
|
267
|
+
option: '-i, --id <id>'
|
|
268
268
|
}, {
|
|
269
269
|
option: '-r, --required [required]',
|
|
270
270
|
autocomplete: ['true', 'false']
|
|
@@ -26,14 +26,7 @@ class SpoFeatureListCommand extends SpoCommand {
|
|
|
26
26
|
const scope = (args.options.scope) ? args.options.scope : 'Web';
|
|
27
27
|
try {
|
|
28
28
|
const features = await odata.getAllItems(`${args.options.webUrl}/_api/${scope}/Features?$select=DisplayName,DefinitionId`);
|
|
29
|
-
|
|
30
|
-
await logger.log(features);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
if (this.verbose) {
|
|
34
|
-
await logger.logToStderr('No activated Features found');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
29
|
+
await logger.log(features);
|
|
37
30
|
}
|
|
38
31
|
catch (err) {
|
|
39
32
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoFileCopyCommand_instances, _SpoFileCopyCommand_initTelemetry, _SpoFileCopyCommand_initOptions, _SpoFileCopyCommand_initValidators, _SpoFileCopyCommand_initOptionSets, _SpoFileCopyCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { CreateFileCopyJobsNameConflictBehavior, spo } from '../../../../utils/spo.js';
|
|
9
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -27,6 +27,9 @@ class SpoFileCopyCommand extends SpoCommand {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initOptionSets).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initTypes).call(this);
|
|
29
29
|
}
|
|
30
|
+
getExcludedOptionsWithUrls() {
|
|
31
|
+
return ['targetUrl', 'sourceUrl'];
|
|
32
|
+
}
|
|
30
33
|
async commandAction(logger, args) {
|
|
31
34
|
try {
|
|
32
35
|
const sourceServerRelativePath = await this.getSourcePath(logger, args.options);
|
|
@@ -40,11 +43,12 @@ class SpoFileCopyCommand extends SpoCommand {
|
|
|
40
43
|
if (newName && !newName.includes('.')) {
|
|
41
44
|
newName += sourceServerRelativePath.substring(sourceServerRelativePath.lastIndexOf('.'));
|
|
42
45
|
}
|
|
43
|
-
const copyJobResponse = await spo.
|
|
46
|
+
const copyJobResponse = await spo.createFileCopyJob(args.options.webUrl, sourcePath, destinationPath, {
|
|
44
47
|
nameConflictBehavior: this.getNameConflictBehaviorValue(args.options.nameConflictBehavior),
|
|
45
48
|
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
46
49
|
ignoreVersionHistory: !!args.options.ignoreVersionHistory,
|
|
47
|
-
newName: newName
|
|
50
|
+
newName: newName,
|
|
51
|
+
operation: 'copy'
|
|
48
52
|
});
|
|
49
53
|
if (args.options.skipWait) {
|
|
50
54
|
return;
|
|
@@ -93,13 +97,13 @@ class SpoFileCopyCommand extends SpoCommand {
|
|
|
93
97
|
getNameConflictBehaviorValue(nameConflictBehavior) {
|
|
94
98
|
switch (nameConflictBehavior?.toLowerCase()) {
|
|
95
99
|
case 'fail':
|
|
96
|
-
return
|
|
100
|
+
return CreateFileCopyJobsNameConflictBehavior.Fail;
|
|
97
101
|
case 'replace':
|
|
98
|
-
return
|
|
102
|
+
return CreateFileCopyJobsNameConflictBehavior.Replace;
|
|
99
103
|
case 'rename':
|
|
100
|
-
return
|
|
104
|
+
return CreateFileCopyJobsNameConflictBehavior.Rename;
|
|
101
105
|
default:
|
|
102
|
-
return
|
|
106
|
+
return CreateFileCopyJobsNameConflictBehavior.Fail;
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
getAbsoluteUrl(webUrl, url) {
|
|
@@ -5,6 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoFileMoveCommand_instances, _SpoFileMoveCommand_initTelemetry, _SpoFileMoveCommand_initOptions, _SpoFileMoveCommand_initValidators, _SpoFileMoveCommand_initOptionSets, _SpoFileMoveCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
+
import { CreateFileCopyJobsNameConflictBehavior, spo } from '../../../../utils/spo.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';
|
|
@@ -31,41 +32,46 @@ class SpoFileMoveCommand extends SpoCommand {
|
|
|
31
32
|
}
|
|
32
33
|
async commandAction(logger, args) {
|
|
33
34
|
try {
|
|
34
|
-
const
|
|
35
|
+
const sourceServerRelativePath = await this.getSourcePath(logger, args.options);
|
|
36
|
+
const sourcePath = this.getAbsoluteUrl(args.options.webUrl, sourceServerRelativePath);
|
|
37
|
+
const destinationPath = this.getAbsoluteUrl(args.options.webUrl, args.options.targetUrl);
|
|
35
38
|
if (this.verbose) {
|
|
36
|
-
await logger.logToStderr(`Moving file ${
|
|
39
|
+
await logger.logToStderr(`Moving file '${sourceServerRelativePath}' to '${args.options.targetUrl}'...`);
|
|
37
40
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (
|
|
41
|
-
|
|
41
|
+
let newName = args.options.newName;
|
|
42
|
+
// Add original file extension if not provided
|
|
43
|
+
if (newName && !newName.includes('.')) {
|
|
44
|
+
newName += sourceServerRelativePath.substring(sourceServerRelativePath.lastIndexOf('.'));
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
const copyJobResponse = await spo.createFileCopyJob(args.options.webUrl, sourcePath, destinationPath, {
|
|
47
|
+
nameConflictBehavior: this.getNameConflictBehaviorValue(args.options.nameConflictBehavior),
|
|
48
|
+
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
49
|
+
includeItemPermissions: !!args.options.includeItemPermissions,
|
|
50
|
+
newName: newName,
|
|
51
|
+
operation: 'move'
|
|
52
|
+
});
|
|
53
|
+
if (args.options.skipWait) {
|
|
54
|
+
return;
|
|
46
55
|
}
|
|
56
|
+
if (this.verbose) {
|
|
57
|
+
await logger.logToStderr('Waiting for the move job to complete...');
|
|
58
|
+
}
|
|
59
|
+
const copyJobResult = await spo.getCopyJobResult(args.options.webUrl, copyJobResponse);
|
|
60
|
+
if (this.verbose) {
|
|
61
|
+
await logger.logToStderr('Getting information about the destination file...');
|
|
62
|
+
}
|
|
63
|
+
// Get destination file data
|
|
64
|
+
const siteRelativeDestinationFolder = '/' + copyJobResult.TargetObjectSiteRelativeUrl.substring(0, copyJobResult.TargetObjectSiteRelativeUrl.lastIndexOf('/'));
|
|
65
|
+
const absoluteWebUrl = destinationPath.substring(0, destinationPath.toLowerCase().lastIndexOf(siteRelativeDestinationFolder.toLowerCase()));
|
|
47
66
|
const requestOptions = {
|
|
48
|
-
url: `${
|
|
67
|
+
url: `${absoluteWebUrl}/_api/Web/GetFileById('${copyJobResult.TargetObjectUniqueId}')`,
|
|
49
68
|
headers: {
|
|
50
69
|
accept: 'application/json;odata=nometadata'
|
|
51
70
|
},
|
|
52
|
-
responseType: 'json'
|
|
53
|
-
data: {
|
|
54
|
-
srcPath: {
|
|
55
|
-
DecodedUrl: absoluteSourcePath
|
|
56
|
-
},
|
|
57
|
-
destPath: {
|
|
58
|
-
DecodedUrl: absoluteTargetPath
|
|
59
|
-
},
|
|
60
|
-
overwrite: args.options.nameConflictBehavior === 'replace',
|
|
61
|
-
options: {
|
|
62
|
-
KeepBoth: args.options.nameConflictBehavior === 'rename',
|
|
63
|
-
ShouldBypassSharedLocks: !!args.options.bypassSharedLock,
|
|
64
|
-
RetainEditorAndModifiedOnMove: !!args.options.retainEditorAndModified
|
|
65
|
-
}
|
|
66
|
-
}
|
|
71
|
+
responseType: 'json'
|
|
67
72
|
};
|
|
68
|
-
await request.
|
|
73
|
+
const destinationFile = await request.get(requestOptions);
|
|
74
|
+
await logger.log(destinationFile);
|
|
69
75
|
}
|
|
70
76
|
catch (err) {
|
|
71
77
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -79,17 +85,30 @@ class SpoFileMoveCommand extends SpoCommand {
|
|
|
79
85
|
await logger.logToStderr(`Retrieving server-relative path for file with ID '${options.sourceId}'...`);
|
|
80
86
|
}
|
|
81
87
|
const requestOptions = {
|
|
82
|
-
url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')
|
|
88
|
+
url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')/ServerRelativePath`,
|
|
83
89
|
headers: {
|
|
84
90
|
accept: 'application/json;odata=nometadata'
|
|
85
91
|
},
|
|
86
92
|
responseType: 'json'
|
|
87
93
|
};
|
|
88
94
|
const file = await request.get(requestOptions);
|
|
89
|
-
return file.
|
|
95
|
+
return file.DecodedUrl;
|
|
96
|
+
}
|
|
97
|
+
getNameConflictBehaviorValue(nameConflictBehavior) {
|
|
98
|
+
switch (nameConflictBehavior?.toLowerCase()) {
|
|
99
|
+
case 'fail':
|
|
100
|
+
return CreateFileCopyJobsNameConflictBehavior.Fail;
|
|
101
|
+
case 'replace':
|
|
102
|
+
return CreateFileCopyJobsNameConflictBehavior.Replace;
|
|
103
|
+
case 'rename':
|
|
104
|
+
return CreateFileCopyJobsNameConflictBehavior.Rename;
|
|
105
|
+
default:
|
|
106
|
+
return CreateFileCopyJobsNameConflictBehavior.Fail;
|
|
107
|
+
}
|
|
90
108
|
}
|
|
91
109
|
getAbsoluteUrl(webUrl, url) {
|
|
92
|
-
|
|
110
|
+
const result = url.startsWith('https://') ? url : urlUtil.getAbsoluteUrl(webUrl, url);
|
|
111
|
+
return urlUtil.removeTrailingSlashes(result);
|
|
93
112
|
}
|
|
94
113
|
}
|
|
95
114
|
_SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry = function _SpoFileMoveCommand_initTelemetry() {
|
|
@@ -99,8 +118,9 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
99
118
|
sourceId: typeof args.options.sourceId !== 'undefined',
|
|
100
119
|
newName: typeof args.options.newName !== 'undefined',
|
|
101
120
|
nameConflictBehavior: typeof args.options.nameConflictBehavior !== 'undefined',
|
|
102
|
-
|
|
103
|
-
bypassSharedLock: !!args.options.bypassSharedLock
|
|
121
|
+
includeItemPermissions: !!args.options.includeItemPermissions,
|
|
122
|
+
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
123
|
+
skipWait: !!args.options.skipWait
|
|
104
124
|
});
|
|
105
125
|
});
|
|
106
126
|
}, _SpoFileMoveCommand_initOptions = function _SpoFileMoveCommand_initOptions() {
|
|
@@ -118,9 +138,11 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
118
138
|
option: '--nameConflictBehavior [nameConflictBehavior]',
|
|
119
139
|
autocomplete: this.nameConflictBehaviorOptions
|
|
120
140
|
}, {
|
|
121
|
-
option: '--
|
|
141
|
+
option: '--includeItemPermissions'
|
|
122
142
|
}, {
|
|
123
143
|
option: '--bypassSharedLock'
|
|
144
|
+
}, {
|
|
145
|
+
option: '--skipWait'
|
|
124
146
|
});
|
|
125
147
|
}, _SpoFileMoveCommand_initValidators = function _SpoFileMoveCommand_initValidators() {
|
|
126
148
|
this.validators.push(async (args) => {
|
|
@@ -140,7 +162,7 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
140
162
|
this.optionSets.push({ options: ['sourceUrl', 'sourceId'] });
|
|
141
163
|
}, _SpoFileMoveCommand_initTypes = function _SpoFileMoveCommand_initTypes() {
|
|
142
164
|
this.types.string.push('webUrl', 'sourceUrl', 'sourceId', 'targetUrl', 'newName', 'nameConflictBehavior');
|
|
143
|
-
this.types.boolean.push('
|
|
165
|
+
this.types.boolean.push('includeItemPermissions', 'bypassSharedLock', 'skipWait');
|
|
144
166
|
};
|
|
145
167
|
export default new SpoFileMoveCommand();
|
|
146
168
|
//# sourceMappingURL=file-move.js.map
|
|
@@ -59,6 +59,9 @@ class SpoFileRemoveCommand extends SpoCommand {
|
|
|
59
59
|
},
|
|
60
60
|
responseType: 'json'
|
|
61
61
|
};
|
|
62
|
+
if (args.options.bypassSharedLock) {
|
|
63
|
+
requestOptions.headers.Prefer = 'bypass-shared-lock';
|
|
64
|
+
}
|
|
62
65
|
try {
|
|
63
66
|
await request.post(requestOptions);
|
|
64
67
|
}
|
|
@@ -83,6 +86,7 @@ _SpoFileRemoveCommand_instances = new WeakSet(), _SpoFileRemoveCommand_initTelem
|
|
|
83
86
|
id: typeof args.options.id !== 'undefined',
|
|
84
87
|
url: typeof args.options.url !== 'undefined',
|
|
85
88
|
recycle: !!args.options.recycle,
|
|
89
|
+
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
86
90
|
force: !!args.options.force
|
|
87
91
|
});
|
|
88
92
|
});
|
|
@@ -95,6 +99,8 @@ _SpoFileRemoveCommand_instances = new WeakSet(), _SpoFileRemoveCommand_initTelem
|
|
|
95
99
|
option: '--url [url]'
|
|
96
100
|
}, {
|
|
97
101
|
option: '--recycle'
|
|
102
|
+
}, {
|
|
103
|
+
option: '--bypassSharedLock'
|
|
98
104
|
}, {
|
|
99
105
|
option: '-f, --force'
|
|
100
106
|
});
|
|
@@ -114,7 +120,7 @@ _SpoFileRemoveCommand_instances = new WeakSet(), _SpoFileRemoveCommand_initTelem
|
|
|
114
120
|
this.optionSets.push({ options: ['id', 'url'] });
|
|
115
121
|
}, _SpoFileRemoveCommand_initTypes = function _SpoFileRemoveCommand_initTypes() {
|
|
116
122
|
this.types.string.push('webUrl', 'id', 'url');
|
|
117
|
-
this.types.boolean.push('recycle', 'force');
|
|
123
|
+
this.types.boolean.push('recycle', 'bypassSharedLock', 'force');
|
|
118
124
|
};
|
|
119
125
|
export default new SpoFileRemoveCommand();
|
|
120
126
|
//# sourceMappingURL=file-remove.js.map
|
|
@@ -4,17 +4,13 @@ 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 _SpoFileRoleAssignmentAddCommand_instances, _SpoFileRoleAssignmentAddCommand_initTelemetry, _SpoFileRoleAssignmentAddCommand_initOptions, _SpoFileRoleAssignmentAddCommand_initValidators, _SpoFileRoleAssignmentAddCommand_initOptionSets, _SpoFileRoleAssignmentAddCommand_initTypes;
|
|
7
|
-
import { cli } from '../../../../cli/cli.js';
|
|
8
7
|
import request from '../../../../request.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { spo } from '../../../../utils/spo.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';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
|
-
import spoGroupGetCommand from '../group/group-get.js';
|
|
15
|
-
import spoRoleDefinitionListCommand from '../roledefinition/roledefinition-list.js';
|
|
16
|
-
import spoUserGetCommand from '../user/user-get.js';
|
|
17
|
-
import spoFileGetCommand from './file-get.js';
|
|
18
14
|
class SpoFileRoleAssignmentAddCommand extends SpoCommand {
|
|
19
15
|
get name() {
|
|
20
16
|
return commands.FILE_ROLEASSIGNMENT_ADD;
|
|
@@ -36,14 +32,14 @@ class SpoFileRoleAssignmentAddCommand extends SpoCommand {
|
|
|
36
32
|
await logger.logToStderr(`Adding role assignment to file in site at ${args.options.webUrl}...`);
|
|
37
33
|
}
|
|
38
34
|
try {
|
|
39
|
-
const fileUrl = await this.getFileURL(args);
|
|
40
|
-
const roleDefinitionId = await this.getRoleDefinitionId(args.options);
|
|
35
|
+
const fileUrl = await this.getFileURL(args, logger);
|
|
36
|
+
const roleDefinitionId = await this.getRoleDefinitionId(args.options, logger);
|
|
41
37
|
if (args.options.upn) {
|
|
42
|
-
const upnPrincipalId = await this.getUserPrincipalId(args.options);
|
|
38
|
+
const upnPrincipalId = await this.getUserPrincipalId(args.options, logger);
|
|
43
39
|
await this.addRoleAssignment(fileUrl, args.options.webUrl, upnPrincipalId, roleDefinitionId);
|
|
44
40
|
}
|
|
45
41
|
else if (args.options.groupName) {
|
|
46
|
-
const groupPrincipalId = await this.getGroupPrincipalId(args.options);
|
|
42
|
+
const groupPrincipalId = await this.getGroupPrincipalId(args.options, logger);
|
|
47
43
|
await this.addRoleAssignment(fileUrl, args.options.webUrl, groupPrincipalId, roleDefinitionId);
|
|
48
44
|
}
|
|
49
45
|
else {
|
|
@@ -66,60 +62,27 @@ class SpoFileRoleAssignmentAddCommand extends SpoCommand {
|
|
|
66
62
|
};
|
|
67
63
|
return request.post(requestOptions);
|
|
68
64
|
}
|
|
69
|
-
async getRoleDefinitionId(options) {
|
|
65
|
+
async getRoleDefinitionId(options, logger) {
|
|
70
66
|
if (!options.roleDefinitionName) {
|
|
71
67
|
return options.roleDefinitionId;
|
|
72
68
|
}
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
output: 'json',
|
|
76
|
-
debug: this.debug,
|
|
77
|
-
verbose: this.verbose
|
|
78
|
-
};
|
|
79
|
-
const output = await cli.executeCommandWithOutput(spoRoleDefinitionListCommand, { options: { ...roleDefinitionListCommandOptions, _: [] } });
|
|
80
|
-
const getRoleDefinitionListOutput = JSON.parse(output.stdout);
|
|
81
|
-
const roleDefinitionId = getRoleDefinitionListOutput.find((role) => role.Name === options.roleDefinitionName).Id;
|
|
82
|
-
return roleDefinitionId;
|
|
69
|
+
const roleDefinition = await spo.getRoleDefinitionByName(options.webUrl, options.roleDefinitionName, logger, this.verbose);
|
|
70
|
+
return roleDefinition.Id;
|
|
83
71
|
}
|
|
84
|
-
async getGroupPrincipalId(options) {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
name: options.groupName,
|
|
88
|
-
output: 'json',
|
|
89
|
-
debug: this.debug,
|
|
90
|
-
verbose: this.verbose
|
|
91
|
-
};
|
|
92
|
-
const output = await cli.executeCommandWithOutput(spoGroupGetCommand, { options: { ...groupGetCommandOptions, _: [] } });
|
|
93
|
-
const getGroupOutput = JSON.parse(output.stdout);
|
|
94
|
-
return getGroupOutput.Id;
|
|
72
|
+
async getGroupPrincipalId(options, logger) {
|
|
73
|
+
const group = await spo.getGroupByName(options.webUrl, options.groupName, logger, this.verbose);
|
|
74
|
+
return group.Id;
|
|
95
75
|
}
|
|
96
|
-
async getUserPrincipalId(options) {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
email: options.upn,
|
|
100
|
-
id: undefined,
|
|
101
|
-
output: 'json',
|
|
102
|
-
debug: this.debug,
|
|
103
|
-
verbose: this.verbose
|
|
104
|
-
};
|
|
105
|
-
const output = await cli.executeCommandWithOutput(spoUserGetCommand, { options: { ...userGetCommandOptions, _: [] } });
|
|
106
|
-
const getUserOutput = JSON.parse(output.stdout);
|
|
107
|
-
return getUserOutput.Id;
|
|
76
|
+
async getUserPrincipalId(options, logger) {
|
|
77
|
+
const user = await spo.getUserByEmail(options.webUrl, options.upn, logger, this.verbose);
|
|
78
|
+
return user.Id;
|
|
108
79
|
}
|
|
109
|
-
async getFileURL(args) {
|
|
80
|
+
async getFileURL(args, logger) {
|
|
110
81
|
if (args.options.fileUrl) {
|
|
111
82
|
return urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
112
83
|
}
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
id: args.options.fileId,
|
|
116
|
-
output: 'json',
|
|
117
|
-
debug: this.debug,
|
|
118
|
-
verbose: this.verbose
|
|
119
|
-
};
|
|
120
|
-
const output = await cli.executeCommandWithOutput(spoFileGetCommand, { options: { ...options, _: [] } });
|
|
121
|
-
const getFileOutput = JSON.parse(output.stdout);
|
|
122
|
-
return getFileOutput.ServerRelativeUrl;
|
|
84
|
+
const file = await spo.getFileById(args.options.webUrl, args.options.fileId, logger, this.verbose);
|
|
85
|
+
return file.ServerRelativeUrl;
|
|
123
86
|
}
|
|
124
87
|
}
|
|
125
88
|
_SpoFileRoleAssignmentAddCommand_instances = new WeakSet(), _SpoFileRoleAssignmentAddCommand_initTelemetry = function _SpoFileRoleAssignmentAddCommand_initTelemetry() {
|
|
@@ -7,13 +7,11 @@ var _SpoFileRoleAssignmentRemoveCommand_instances, _SpoFileRoleAssignmentRemoveC
|
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { spo } from '../../../../utils/spo.js';
|
|
10
11
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
11
12
|
import { validation } from '../../../../utils/validation.js';
|
|
12
13
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
14
|
import commands from '../../commands.js';
|
|
14
|
-
import spoGroupGetCommand from '../group/group-get.js';
|
|
15
|
-
import spoUserGetCommand from '../user/user-get.js';
|
|
16
|
-
import spoFileGetCommand from './file-get.js';
|
|
17
15
|
class SpoFileRoleAssignmentRemoveCommand extends SpoCommand {
|
|
18
16
|
get name() {
|
|
19
17
|
return commands.FILE_ROLEASSIGNMENT_REMOVE;
|
|
@@ -36,13 +34,13 @@ class SpoFileRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
36
34
|
await logger.logToStderr(`Removing role assignment for ${args.options.groupName || args.options.upn} from file ${args.options.fileUrl || args.options.fileId}`);
|
|
37
35
|
}
|
|
38
36
|
try {
|
|
39
|
-
const fileURL = await this.getFileURL(args);
|
|
37
|
+
const fileURL = await this.getFileURL(args, logger);
|
|
40
38
|
let principalId;
|
|
41
39
|
if (args.options.groupName) {
|
|
42
|
-
principalId = await this.getGroupPrincipalId(args.options);
|
|
40
|
+
principalId = await this.getGroupPrincipalId(args.options, logger);
|
|
43
41
|
}
|
|
44
42
|
else if (args.options.upn) {
|
|
45
|
-
principalId = await this.getUserPrincipalId(args.options);
|
|
43
|
+
principalId = await this.getUserPrincipalId(args.options, logger);
|
|
46
44
|
}
|
|
47
45
|
else {
|
|
48
46
|
principalId = args.options.principalId;
|
|
@@ -71,45 +69,20 @@ class SpoFileRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
|
-
async getFileURL(args) {
|
|
72
|
+
async getFileURL(args, logger) {
|
|
75
73
|
if (args.options.fileUrl) {
|
|
76
74
|
return urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
77
75
|
}
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
id: args.options.fileId,
|
|
81
|
-
output: 'json',
|
|
82
|
-
debug: this.debug,
|
|
83
|
-
verbose: this.verbose
|
|
84
|
-
};
|
|
85
|
-
const output = await cli.executeCommandWithOutput(spoFileGetCommand, { options: { ...options, _: [] } });
|
|
86
|
-
const getFileOutput = JSON.parse(output.stdout);
|
|
87
|
-
return getFileOutput.ServerRelativeUrl;
|
|
76
|
+
const file = await spo.getFileById(args.options.webUrl, args.options.fileId, logger, this.verbose);
|
|
77
|
+
return file.ServerRelativeUrl;
|
|
88
78
|
}
|
|
89
|
-
async getUserPrincipalId(options) {
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
email: options.upn,
|
|
93
|
-
id: undefined,
|
|
94
|
-
output: 'json',
|
|
95
|
-
debug: this.debug,
|
|
96
|
-
verbose: this.verbose
|
|
97
|
-
};
|
|
98
|
-
const output = await cli.executeCommandWithOutput(spoUserGetCommand, { options: { ...userGetCommandOptions, _: [] } });
|
|
99
|
-
const getUserOutput = JSON.parse(output.stdout);
|
|
100
|
-
return getUserOutput.Id;
|
|
79
|
+
async getUserPrincipalId(options, logger) {
|
|
80
|
+
const user = await spo.getUserByEmail(options.webUrl, options.upn, logger, this.verbose);
|
|
81
|
+
return user.Id;
|
|
101
82
|
}
|
|
102
|
-
async getGroupPrincipalId(options) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
name: options.groupName,
|
|
106
|
-
output: 'json',
|
|
107
|
-
debug: this.debug,
|
|
108
|
-
verbose: this.verbose
|
|
109
|
-
};
|
|
110
|
-
const output = await cli.executeCommandWithOutput(spoGroupGetCommand, { options: { ...groupGetCommandOptions, _: [] } });
|
|
111
|
-
const getGroupOutput = JSON.parse(output.stdout);
|
|
112
|
-
return getGroupOutput.Id;
|
|
83
|
+
async getGroupPrincipalId(options, logger) {
|
|
84
|
+
const group = await spo.getGroupByName(options.webUrl, options.groupName, logger, this.verbose);
|
|
85
|
+
return group.Id;
|
|
113
86
|
}
|
|
114
87
|
}
|
|
115
88
|
_SpoFileRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoFileRoleAssignmentRemoveCommand_initTelemetry = function _SpoFileRoleAssignmentRemoveCommand_initTelemetry() {
|
|
@@ -7,11 +7,11 @@ var _SpoFileRoleInheritanceBreakCommand_instances, _SpoFileRoleInheritanceBreakC
|
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { spo } from '../../../../utils/spo.js';
|
|
10
11
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
11
12
|
import { validation } from '../../../../utils/validation.js';
|
|
12
13
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
14
|
import commands from '../../commands.js';
|
|
14
|
-
import spoFileGetCommand from './file-get.js';
|
|
15
15
|
class SpoFileRoleInheritanceBreakCommand extends SpoCommand {
|
|
16
16
|
get name() {
|
|
17
17
|
return commands.FILE_ROLEINHERITANCE_BREAK;
|
|
@@ -34,7 +34,7 @@ class SpoFileRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
34
34
|
await logger.logToStderr(`Breaking role inheritance for file ${args.options.fileId || args.options.fileUrl}`);
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
|
-
const fileURL = await this.getFileURL(args);
|
|
37
|
+
const fileURL = await this.getFileURL(args, logger);
|
|
38
38
|
const keepExistingPermissions = !args.options.clearExistingPermissions;
|
|
39
39
|
const requestOptions = {
|
|
40
40
|
url: `${args.options.webUrl}/_api/web/GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(fileURL)}')/ListItemAllFields/breakroleinheritance(${keepExistingPermissions})`,
|
|
@@ -59,20 +59,12 @@ class SpoFileRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
async getFileURL(args) {
|
|
62
|
+
async getFileURL(args, logger) {
|
|
63
63
|
if (args.options.fileUrl) {
|
|
64
64
|
return urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
id: args.options.fileId,
|
|
69
|
-
output: 'json',
|
|
70
|
-
debug: this.debug,
|
|
71
|
-
verbose: this.verbose
|
|
72
|
-
};
|
|
73
|
-
const output = await cli.executeCommandWithOutput(spoFileGetCommand, { options: { ...options, _: [] } });
|
|
74
|
-
const getFileOutput = JSON.parse(output.stdout);
|
|
75
|
-
return getFileOutput.ServerRelativeUrl;
|
|
66
|
+
const file = await spo.getFileById(args.options.webUrl, args.options.fileId, logger, this.verbose);
|
|
67
|
+
return file.ServerRelativeUrl;
|
|
76
68
|
}
|
|
77
69
|
}
|
|
78
70
|
_SpoFileRoleInheritanceBreakCommand_instances = new WeakSet(), _SpoFileRoleInheritanceBreakCommand_initTelemetry = function _SpoFileRoleInheritanceBreakCommand_initTelemetry() {
|
|
@@ -7,11 +7,11 @@ var _SpoFileRoleInheritanceResetCommand_instances, _SpoFileRoleInheritanceResetC
|
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { spo } from '../../../../utils/spo.js';
|
|
10
11
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
11
12
|
import { validation } from '../../../../utils/validation.js';
|
|
12
13
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
14
|
import commands from '../../commands.js';
|
|
14
|
-
import spoFileGetCommand from './file-get.js';
|
|
15
15
|
class SpoFileRoleInheritanceResetCommand extends SpoCommand {
|
|
16
16
|
get name() {
|
|
17
17
|
return commands.FILE_ROLEINHERITANCE_RESET;
|
|
@@ -34,7 +34,7 @@ class SpoFileRoleInheritanceResetCommand extends SpoCommand {
|
|
|
34
34
|
await logger.logToStderr(`Resetting role inheritance for file ${args.options.fileId || args.options.fileUrl}`);
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
|
-
const fileURL = await this.getFileURL(args);
|
|
37
|
+
const fileURL = await this.getFileURL(args, logger);
|
|
38
38
|
const requestOptions = {
|
|
39
39
|
url: `${args.options.webUrl}/_api/web/GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(fileURL)}')/ListItemAllFields/resetroleinheritance`,
|
|
40
40
|
headers: {
|
|
@@ -58,20 +58,12 @@ class SpoFileRoleInheritanceResetCommand extends SpoCommand {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
async getFileURL(args) {
|
|
61
|
+
async getFileURL(args, logger) {
|
|
62
62
|
if (args.options.fileUrl) {
|
|
63
63
|
return urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
id: args.options.fileId,
|
|
68
|
-
output: 'json',
|
|
69
|
-
debug: this.debug,
|
|
70
|
-
verbose: this.verbose
|
|
71
|
-
};
|
|
72
|
-
const output = await cli.executeCommandWithOutput(spoFileGetCommand, { options: { ...options, _: [] } });
|
|
73
|
-
const getFileOutput = JSON.parse(output.stdout);
|
|
74
|
-
return getFileOutput.ServerRelativeUrl;
|
|
65
|
+
const file = await spo.getFileById(args.options.webUrl, args.options.fileId, logger, this.verbose);
|
|
66
|
+
return file.ServerRelativeUrl;
|
|
75
67
|
}
|
|
76
68
|
}
|
|
77
69
|
_SpoFileRoleInheritanceResetCommand_instances = new WeakSet(), _SpoFileRoleInheritanceResetCommand_initTelemetry = function _SpoFileRoleInheritanceResetCommand_initTelemetry() {
|