@pnp/cli-microsoft365 6.9.0-beta.f6054b4 → 6.10.0-beta.6bf4ff9
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/.devcontainer/Dockerfile +12 -19
- package/.devcontainer/devcontainer.json +24 -17
- package/Dockerfile +3 -1
- package/README.md +7 -5
- package/dist/Auth.js +2 -8
- package/dist/AuthServer.js +2 -4
- package/dist/cli/Cli.js +2 -2
- package/dist/m365/aad/commands/app/app-add.js +258 -249
- package/dist/m365/aad/commands/app/app-get.js +65 -62
- package/dist/m365/aad/commands/app/app-remove.js +22 -23
- package/dist/m365/aad/commands/app/app-role-add.js +35 -34
- package/dist/m365/aad/commands/app/app-role-list.js +22 -23
- package/dist/m365/aad/commands/app/app-role-remove.js +76 -73
- package/dist/m365/aad/commands/app/app-set.js +103 -103
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +16 -14
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +43 -52
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +20 -16
- package/dist/m365/aad/commands/o365group/o365group-add.js +40 -37
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +7 -6
- package/dist/m365/aad/commands/o365group/o365group-list.js +6 -11
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-clear.js +7 -8
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +23 -24
- package/dist/m365/aad/commands/o365group/o365group-set.js +15 -20
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +15 -16
- package/dist/m365/aad/commands/o365group/o365group-user-list.js +17 -10
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +17 -10
- package/dist/m365/aad/commands/policy/policy-list.js +12 -13
- package/dist/m365/aad/commands/siteclassification/siteclassification-enable.js +1 -3
- package/dist/m365/aad/commands/siteclassification/siteclassification-set.js +19 -20
- package/dist/m365/aad/commands/sp/sp-add.js +22 -23
- package/dist/m365/aad/commands/sp/sp-get.js +22 -23
- package/dist/m365/aad/commands/sp/sp-list.js +78 -0
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/app/commands/app-open.js +4 -14
- package/dist/m365/base/AzmgmtItemsListCommand.js +31 -33
- package/dist/m365/cli/commands/cli-issue.js +4 -10
- package/dist/m365/cli/commands/cli-reconsent.js +2 -8
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- package/dist/m365/commands/docs.js +2 -8
- package/dist/m365/commands/login.js +20 -0
- package/dist/m365/file/commands/convert/convert-pdf.js +147 -143
- package/dist/m365/file/commands/file-add.js +87 -93
- package/dist/m365/file/commands/file-list.js +49 -55
- package/dist/m365/flow/commands/flow-list.js +30 -12
- package/dist/m365/flow/commands/flow-remove.js +2 -3
- package/dist/m365/flow/commands/run/run-resubmit.js +11 -10
- package/dist/m365/onedrive/commands/onedrive-list.js +21 -32
- package/dist/m365/outlook/commands/message/message-list.js +18 -23
- package/dist/m365/outlook/commands/message/message-move.js +15 -20
- package/dist/m365/pa/commands/app/app-export.js +3 -4
- package/dist/m365/pa/commands/app/app-get.js +11 -9
- package/dist/m365/pa/commands/app/app-remove.js +1 -1
- package/dist/m365/pa/commands/pcf/pcf-init.js +1 -2
- package/dist/m365/pa/commands/solution/solution-init.js +1 -2
- package/dist/m365/pa/commands/solution/solution-reference-add.js +1 -2
- package/dist/m365/planner/commands/bucket/bucket-add.js +15 -13
- package/dist/m365/planner/commands/bucket/bucket-get.js +27 -28
- package/dist/m365/planner/commands/bucket/bucket-list.js +15 -13
- package/dist/m365/planner/commands/bucket/bucket-remove.js +33 -34
- package/dist/m365/planner/commands/bucket/bucket-set.js +33 -34
- package/dist/m365/planner/commands/plan/plan-add.js +49 -52
- package/dist/m365/planner/commands/plan/plan-set.js +19 -20
- package/dist/m365/planner/commands/task/task-add.js +75 -78
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +11 -10
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +10 -8
- package/dist/m365/planner/commands/task/task-get.js +53 -56
- package/dist/m365/planner/commands/task/task-list.js +23 -24
- package/dist/m365/planner/commands/task/task-reference-add.js +11 -10
- package/dist/m365/planner/commands/task/task-reference-remove.js +13 -14
- package/dist/m365/planner/commands/task/task-remove.js +44 -48
- package/dist/m365/planner/commands/task/task-set.js +83 -87
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +19 -20
- package/dist/m365/purview/commands/retentionevent/retentionevent-add.js +3 -8
- package/dist/m365/purview/commands/retentionevent/retentionevent-get.js +1 -6
- package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +1 -6
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +1 -6
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-add.js +1 -6
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-get.js +1 -6
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +1 -6
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +1 -6
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-set.js +1 -6
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +0 -5
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-get.js +0 -5
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-list.js +0 -5
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +19 -22
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +0 -5
- package/dist/m365/spfx/commands/project/JsonRule.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.3.js +25 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.4.js +25 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.0-beta.1.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +4 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001022_DEP_office_ui_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002027_DEVDEP_fluentui_react.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021003_PKG_engines_node.js +1 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.3.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.4.js +55 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.18.0-beta.1.js +61 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +18 -13
- package/dist/m365/spfx/commands/spfx-doctor.js +45 -0
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +17 -24
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +154 -0
- package/dist/m365/spo/commands/apppage/apppage-set.js +1 -1
- package/dist/m365/spo/commands/commandset/commandset-set.js +11 -2
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +65 -94
- package/dist/m365/spo/commands/customaction/customaction-clear.js +4 -12
- package/dist/m365/spo/commands/customaction/customaction-remove.js +12 -23
- package/dist/m365/spo/commands/customaction/customaction-set.js +21 -29
- package/dist/m365/spo/commands/file/file-add.js +133 -133
- package/dist/m365/spo/commands/file/file-checkout-undo.js +119 -0
- package/dist/m365/spo/commands/file/file-rename.js +11 -9
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +2 -2
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +41 -61
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +3 -0
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +3 -0
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +3 -0
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +23 -21
- package/dist/m365/spo/commands/file/file-version-clear.js +1 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +3 -3
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/group/group-member-add.js +17 -16
- package/dist/m365/spo/commands/group/group-set.js +20 -20
- package/dist/m365/spo/commands/homesite/homesite-remove.js +1 -1
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +33 -31
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +18 -29
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +3 -0
- package/dist/m365/spo/commands/list/list-add.js +1 -1
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +1 -1
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +45 -52
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +33 -38
- package/dist/m365/spo/commands/list/list-sensitivitylabel-ensure.js +137 -0
- package/dist/m365/spo/commands/list/list-view-field-add.js +12 -10
- package/dist/m365/spo/commands/list/list-view-field-remove.js +12 -10
- package/dist/m365/spo/commands/list/list-view-field-set.js +12 -10
- package/dist/m365/spo/commands/list/list-view-remove.js +3 -0
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +41 -61
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +71 -74
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +36 -34
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +32 -30
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +24 -22
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +29 -27
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +26 -24
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +34 -40
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +23 -21
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +24 -22
- package/dist/m365/spo/commands/spo-search.js +7 -15
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +29 -27
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +156 -0
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +50 -0
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +1 -1
- package/dist/m365/spo/commands.js +5 -0
- package/dist/m365/teams/commands/app/app-install.js +23 -21
- package/dist/m365/teams/commands/app/app-remove.js +3 -0
- package/dist/m365/teams/commands/app/app-uninstall.js +3 -0
- package/dist/m365/teams/commands/app/app-update.js +15 -16
- package/dist/m365/teams/commands/channel/channel-add.js +40 -39
- package/dist/m365/teams/commands/channel/channel-get.js +23 -25
- package/dist/m365/teams/commands/channel/channel-list.js +6 -7
- package/dist/m365/teams/commands/channel/channel-member-add.js +61 -60
- package/dist/m365/teams/commands/channel/channel-member-list.js +20 -22
- package/dist/m365/teams/commands/channel/channel-member-remove.js +43 -48
- package/dist/m365/teams/commands/channel/channel-member-set.js +36 -39
- package/dist/m365/teams/commands/channel/channel-remove.js +4 -1
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +3 -0
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +3 -0
- package/dist/m365/teams/commands/tab/tab-get.js +34 -37
- package/dist/m365/teams/commands/team/team-archive.js +6 -7
- package/dist/m365/teams/commands/team/team-get.js +6 -7
- package/dist/m365/teams/commands/team/team-list.js +9 -11
- package/dist/m365/teams/commands/team/team-remove.js +6 -7
- package/dist/m365/teams/commands/team/team-unarchive.js +6 -7
- package/dist/m365/teams/commands/user/user-app-list.js +13 -11
- package/dist/m365/teams/commands/user/user-list.js +7 -4
- package/dist/m365/tenant/commands/security/security-alerts-list.js +25 -26
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +13 -14
- package/dist/m365/todo/commands/list/list-remove.js +39 -36
- package/dist/m365/todo/commands/list/list-set.js +16 -14
- package/dist/m365/todo/commands/task/task-add.js +14 -14
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +10 -7
- package/dist/settingsNames.js +0 -1
- package/dist/utils/browserUtil.js +23 -0
- package/dist/utils/md.js +1 -3
- package/docs/docs/_clisettings.mdx +17 -0
- package/docs/docs/cmd/aad/app/app-add.mdx +113 -0
- package/docs/docs/cmd/aad/app/app-get.mdx +217 -0
- package/docs/docs/cmd/aad/app/app-list.mdx +21 -0
- package/docs/docs/cmd/aad/app/app-role-add.mdx +4 -0
- package/docs/docs/cmd/aad/app/app-role-list.mdx +63 -0
- package/docs/docs/cmd/aad/app/app-role-remove.mdx +4 -0
- package/docs/docs/cmd/aad/app/app-set.mdx +4 -0
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.mdx +61 -0
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.mdx +59 -0
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.mdx +4 -0
- package/docs/docs/cmd/aad/group/group-get.mdx +24 -0
- package/docs/docs/cmd/aad/group/group-list.mdx +98 -0
- package/docs/docs/cmd/aad/groupsetting/groupsetting-add.mdx +114 -0
- package/docs/docs/cmd/aad/groupsetting/groupsetting-get.mdx +115 -0
- package/docs/docs/cmd/aad/groupsetting/groupsetting-list.mdx +115 -0
- package/docs/docs/cmd/aad/groupsetting/groupsetting-remove.mdx +4 -0
- package/docs/docs/cmd/aad/groupsetting/groupsetting-set.mdx +4 -0
- package/docs/docs/cmd/aad/groupsettingtemplate/groupsettingtemplate-get.mdx +63 -0
- package/docs/docs/cmd/aad/groupsettingtemplate/groupsettingtemplate-list.mdx +63 -0
- package/docs/docs/cmd/aad/o365group/o365group-add.mdx +122 -0
- package/docs/docs/cmd/aad/o365group/o365group-conversation-list.mdx +68 -0
- package/docs/docs/cmd/aad/o365group/o365group-conversation-post-list.mdx +77 -0
- package/docs/docs/cmd/aad/o365group/o365group-get.mdx +122 -0
- package/docs/docs/cmd/aad/o365group/o365group-list.mdx +99 -0
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-clear.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-list.mdx +96 -0
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-remove.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-restore.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-remove.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-renew.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-report-activitycounts.mdx +48 -0
- package/docs/docs/cmd/aad/o365group/o365group-report-activitydetail.mdx +60 -0
- package/docs/docs/cmd/aad/o365group/o365group-report-activityfilecounts.mdx +46 -0
- package/docs/docs/cmd/aad/o365group/o365group-report-activitygroupcounts.mdx +46 -0
- package/docs/docs/cmd/aad/o365group/o365group-report-activitystorage.mdx +46 -0
- package/docs/docs/cmd/aad/o365group/o365group-set.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-teamify.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-user-add.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-user-list.mdx +56 -0
- package/docs/docs/cmd/aad/o365group/o365group-user-remove.mdx +4 -0
- package/docs/docs/cmd/aad/o365group/o365group-user-set.mdx +8 -4
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-add.mdx +4 -0
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-list.mdx +59 -0
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.mdx +4 -0
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-set.mdx +4 -0
- package/docs/docs/cmd/aad/policy/policy-list.mdx +77 -0
- package/docs/docs/cmd/aad/siteclassification/siteclassification-disable.mdx +4 -0
- package/docs/docs/cmd/aad/siteclassification/siteclassification-enable.mdx +4 -0
- package/docs/docs/cmd/aad/siteclassification/siteclassification-get.mdx +57 -0
- package/docs/docs/cmd/aad/siteclassification/siteclassification-set.mdx +4 -0
- package/docs/docs/cmd/aad/sp/sp-add.mdx +136 -0
- package/docs/docs/cmd/aad/sp/sp-get.mdx +166 -0
- package/docs/docs/cmd/aad/sp/sp-list.mdx +162 -0
- package/docs/docs/cmd/aad/user/user-get.mdx +75 -0
- package/docs/docs/cmd/aad/user/user-guest-add.mdx +23 -0
- package/docs/docs/cmd/aad/user/user-hibp.mdx +82 -0
- package/docs/docs/cmd/aad/user/user-license-add.mdx +2 -2
- package/docs/docs/cmd/aad/user/user-license-remove.mdx +2 -2
- package/docs/docs/cmd/aad/user/user-list.mdx +52 -0
- package/docs/docs/cmd/aad/user/user-password-validate.mdx +67 -0
- package/docs/docs/cmd/aad/user/user-signin-list.mdx +131 -0
- package/docs/docs/cmd/flow/flow-list.mdx +15 -0
- package/docs/docs/cmd/login.mdx +39 -0
- package/docs/docs/cmd/pa/app/app-get.mdx +1 -1
- package/docs/docs/cmd/pa/app/app-list.mdx +1 -1
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-get.mdx +1 -1
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-list.mdx +1 -1
- package/docs/docs/cmd/pp/card/card-clone.mdx +1 -1
- package/docs/docs/cmd/pp/card/card-get.mdx +1 -1
- package/docs/docs/cmd/pp/card/card-list.mdx +1 -1
- package/docs/docs/cmd/pp/chatbot/chatbot-get.mdx +1 -1
- package/docs/docs/cmd/pp/chatbot/chatbot-list.mdx +1 -1
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +1 -1
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +1 -1
- package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +1 -1
- package/docs/docs/cmd/pp/dataverse/dataverse-table-row-list.mdx +1 -1
- package/docs/docs/cmd/pp/dataverse/dataverse-table-row-remove.mdx +1 -1
- package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +0 -6
- package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +0 -6
- package/docs/docs/cmd/purview/retentionevent/retentionevent-list.mdx +0 -7
- package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.mdx +0 -6
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +0 -6
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +0 -6
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.mdx +0 -6
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.mdx +0 -6
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.mdx +0 -6
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.mdx +0 -6
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.mdx +0 -6
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.mdx +0 -6
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.mdx +0 -6
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.mdx +0 -6
- package/docs/docs/cmd/setup.mdx +2 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +72 -0
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +12 -3
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +55 -0
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +73 -0
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +81 -0
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-get.mdx +2 -2
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +114 -0
- package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +2 -2
- package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +6 -0
- package/docs/docs/cmd/spo/userprofile/userprofile-get.mdx +1 -1
- package/docs/docs/cmd/status.mdx +6 -3
- package/docs/docs/cmd/util/accesstoken/accesstoken-get.mdx +12 -2
- package/npm-shrinkwrap.json +301 -274
- package/package.json +18 -17
- package/dist/m365/aad/commands/approleassignment/AppRoleAssignment.js +0 -3
- package/dist/m365/aad/commands/approleassignment/ServicePrincipal.js +0 -3
- package/dist/m365/aad/commands/groupsetting/GroupSetting.js +0 -3
- package/dist/m365/aad/commands/groupsettingtemplate/GroupSettingTemplate.js +0 -3
- package/dist/m365/aad/commands/siteclassification/DirectorySetting.js +0 -10
- package/dist/m365/aad/commands/siteclassification/DirectorySettingTemplatesRsp.js +0 -3
- package/dist/m365/aad/commands/siteclassification/DirectorySettingValue.js +0 -3
- package/dist/m365/outlook/Message.js +0 -3
- package/dist/m365/spo/commands/site/SitePermission.js +0 -3
- package/dist/m365/teams/Channel.js +0 -3
- package/dist/m365/teams/ConversationMember.js +0 -3
- package/dist/m365/teams/Message.js +0 -3
- package/dist/m365/teams/Reply.js +0 -3
- package/dist/m365/teams/Tab.js +0 -3
- package/dist/m365/teams/Team.js +0 -3
- package/dist/m365/teams/TeamsApp.js +0 -3
- package/dist/m365/teams/TeamsAppInstallation.js +0 -3
- package/dist/m365/teams/TeamsTabConfiguration.js +0 -3
- package/dist/m365/teams/commands/Meeting.js +0 -3
|
@@ -41,41 +41,8 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
41
41
|
}
|
|
42
42
|
commandAction(logger, args) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const removeRoleAssignment = () => __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
if (this.verbose) {
|
|
46
|
-
logger.logToStderr(`Removing role assignment from listitem in site at ${args.options.webUrl}...`);
|
|
47
|
-
}
|
|
48
|
-
try {
|
|
49
|
-
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
50
|
-
if (args.options.listId) {
|
|
51
|
-
requestUrl += `lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
52
|
-
}
|
|
53
|
-
else if (args.options.listTitle) {
|
|
54
|
-
requestUrl += `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
55
|
-
}
|
|
56
|
-
else if (args.options.listUrl) {
|
|
57
|
-
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
58
|
-
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
59
|
-
}
|
|
60
|
-
requestUrl += `items(${args.options.listItemId})/`;
|
|
61
|
-
if (args.options.upn) {
|
|
62
|
-
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
63
|
-
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
64
|
-
}
|
|
65
|
-
else if (args.options.groupName) {
|
|
66
|
-
args.options.principalId = yield this.getGroupPrincipalId(args.options);
|
|
67
|
-
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch (err) {
|
|
74
|
-
this.handleRejectedODataJsonPromise(err);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
44
|
if (args.options.confirm) {
|
|
78
|
-
yield removeRoleAssignment();
|
|
45
|
+
yield this.removeRoleAssignment(logger, args.options);
|
|
79
46
|
}
|
|
80
47
|
else {
|
|
81
48
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -85,57 +52,87 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
85
52
|
message: `Are you sure you want to remove role assignment from listitem ${args.options.listItemId} from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?`
|
|
86
53
|
});
|
|
87
54
|
if (result.continue) {
|
|
88
|
-
yield removeRoleAssignment();
|
|
55
|
+
yield this.removeRoleAssignment(logger, args.options);
|
|
89
56
|
}
|
|
90
57
|
}
|
|
91
58
|
});
|
|
92
59
|
}
|
|
93
|
-
removeRoleAssignment(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
60
|
+
removeRoleAssignment(logger, options) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
if (this.verbose) {
|
|
63
|
+
logger.logToStderr(`Removing role assignment from listitem in site at ${options.webUrl}...`);
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
let requestUrl = `${options.webUrl}/_api/web/`;
|
|
67
|
+
if (options.listId) {
|
|
68
|
+
requestUrl += `lists(guid'${formatting_1.formatting.encodeQueryParameter(options.listId)}')/`;
|
|
69
|
+
}
|
|
70
|
+
else if (options.listTitle) {
|
|
71
|
+
requestUrl += `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(options.listTitle)}')/`;
|
|
72
|
+
}
|
|
73
|
+
else if (options.listUrl) {
|
|
74
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
75
|
+
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
76
|
+
}
|
|
77
|
+
requestUrl += `items(${options.listItemId})/`;
|
|
78
|
+
if (options.upn) {
|
|
79
|
+
options.principalId = yield this.getUserPrincipalId(options);
|
|
80
|
+
yield this.removeRoleAssignmentWithRequestUrl(requestUrl, logger, options);
|
|
81
|
+
}
|
|
82
|
+
else if (options.groupName) {
|
|
83
|
+
options.principalId = yield this.getGroupPrincipalId(options);
|
|
84
|
+
yield this.removeRoleAssignmentWithRequestUrl(requestUrl, logger, options);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
yield this.removeRoleAssignmentWithRequestUrl(requestUrl, logger, options);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
this.handleRejectedODataJsonPromise(err);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
removeRoleAssignmentWithRequestUrl(requestUrl, logger, options) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const requestOptions = {
|
|
98
|
+
url: `${requestUrl}roleassignments/removeroleassignment(principalid='${options.principalId}')`,
|
|
99
|
+
method: 'POST',
|
|
100
|
+
headers: {
|
|
101
|
+
'accept': 'application/json;odata=nometadata',
|
|
102
|
+
'content-type': 'application/json'
|
|
103
|
+
},
|
|
104
|
+
responseType: 'json'
|
|
105
|
+
};
|
|
106
|
+
yield request_1.default.post(requestOptions);
|
|
107
|
+
});
|
|
107
108
|
}
|
|
108
109
|
getGroupPrincipalId(options) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
.
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
const groupGetCommandOptions = {
|
|
112
|
+
webUrl: options.webUrl,
|
|
113
|
+
name: options.groupName,
|
|
114
|
+
output: 'json',
|
|
115
|
+
debug: this.debug,
|
|
116
|
+
verbose: this.verbose
|
|
117
|
+
};
|
|
118
|
+
const output = yield Cli_1.Cli.executeCommandWithOutput(SpoGroupGetCommand, { options: Object.assign(Object.assign({}, groupGetCommandOptions), { _: [] }) });
|
|
118
119
|
const getGroupOutput = JSON.parse(output.stdout);
|
|
119
|
-
return
|
|
120
|
-
}, (err) => {
|
|
121
|
-
return Promise.reject(err);
|
|
120
|
+
return getGroupOutput.Id;
|
|
122
121
|
});
|
|
123
122
|
}
|
|
124
123
|
getUserPrincipalId(options) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
.
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const userGetCommandOptions = {
|
|
126
|
+
webUrl: options.webUrl,
|
|
127
|
+
email: options.upn,
|
|
128
|
+
id: undefined,
|
|
129
|
+
output: 'json',
|
|
130
|
+
debug: this.debug,
|
|
131
|
+
verbose: this.verbose
|
|
132
|
+
};
|
|
133
|
+
const output = yield Cli_1.Cli.executeCommandWithOutput(SpoUserGetCommand, { options: Object.assign(Object.assign({}, userGetCommandOptions), { _: [] }) });
|
|
135
134
|
const getUserOutput = JSON.parse(output.stdout);
|
|
136
|
-
return
|
|
137
|
-
}, (err) => {
|
|
138
|
-
return Promise.reject(err);
|
|
135
|
+
return getUserOutput.Id;
|
|
139
136
|
});
|
|
140
137
|
}
|
|
141
138
|
}
|
|
@@ -43,40 +43,8 @@ class SpoListItemRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
|
43
43
|
if (this.verbose) {
|
|
44
44
|
logger.logToStderr(`Breaking role inheritance of list item in site at ${args.options.webUrl}...`);
|
|
45
45
|
}
|
|
46
|
-
const breakListItemRoleInheritance = () => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
try {
|
|
48
|
-
let requestUrl = `${args.options.webUrl}/_api/web`;
|
|
49
|
-
if (args.options.listId) {
|
|
50
|
-
requestUrl += `/lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
51
|
-
}
|
|
52
|
-
else if (args.options.listTitle) {
|
|
53
|
-
requestUrl += `/lists/getbytitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
54
|
-
}
|
|
55
|
-
else if (args.options.listUrl) {
|
|
56
|
-
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
57
|
-
requestUrl += `/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
58
|
-
}
|
|
59
|
-
let keepExistingPermissions = true;
|
|
60
|
-
if (args.options.clearExistingPermissions) {
|
|
61
|
-
keepExistingPermissions = !args.options.clearExistingPermissions;
|
|
62
|
-
}
|
|
63
|
-
const requestOptions = {
|
|
64
|
-
url: `${requestUrl}/items(${args.options.listItemId})/breakroleinheritance(${keepExistingPermissions})`,
|
|
65
|
-
method: 'POST',
|
|
66
|
-
headers: {
|
|
67
|
-
'accept': 'application/json;odata=nometadata',
|
|
68
|
-
'content-type': 'application/json'
|
|
69
|
-
},
|
|
70
|
-
responseType: 'json'
|
|
71
|
-
};
|
|
72
|
-
yield request_1.default.post(requestOptions);
|
|
73
|
-
}
|
|
74
|
-
catch (err) {
|
|
75
|
-
this.handleRejectedODataJsonPromise(err);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
46
|
if (args.options.confirm) {
|
|
79
|
-
yield breakListItemRoleInheritance();
|
|
47
|
+
yield this.breakListItemRoleInheritance(args.options);
|
|
80
48
|
}
|
|
81
49
|
else {
|
|
82
50
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -86,11 +54,45 @@ class SpoListItemRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
|
86
54
|
message: `Are you sure you want to break the role inheritance of ${args.options.listItemId} in list ${(_a = args.options.listId) !== null && _a !== void 0 ? _a : args.options.listTitle}?`
|
|
87
55
|
});
|
|
88
56
|
if (result.continue) {
|
|
89
|
-
yield breakListItemRoleInheritance();
|
|
57
|
+
yield this.breakListItemRoleInheritance(args.options);
|
|
90
58
|
}
|
|
91
59
|
}
|
|
92
60
|
});
|
|
93
61
|
}
|
|
62
|
+
breakListItemRoleInheritance(options) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
try {
|
|
65
|
+
let requestUrl = `${options.webUrl}/_api/web`;
|
|
66
|
+
if (options.listId) {
|
|
67
|
+
requestUrl += `/lists(guid'${formatting_1.formatting.encodeQueryParameter(options.listId)}')`;
|
|
68
|
+
}
|
|
69
|
+
else if (options.listTitle) {
|
|
70
|
+
requestUrl += `/lists/getbytitle('${formatting_1.formatting.encodeQueryParameter(options.listTitle)}')`;
|
|
71
|
+
}
|
|
72
|
+
else if (options.listUrl) {
|
|
73
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
74
|
+
requestUrl += `/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
75
|
+
}
|
|
76
|
+
let keepExistingPermissions = true;
|
|
77
|
+
if (options.clearExistingPermissions) {
|
|
78
|
+
keepExistingPermissions = !options.clearExistingPermissions;
|
|
79
|
+
}
|
|
80
|
+
const requestOptions = {
|
|
81
|
+
url: `${requestUrl}/items(${options.listItemId})/breakroleinheritance(${keepExistingPermissions})`,
|
|
82
|
+
method: 'POST',
|
|
83
|
+
headers: {
|
|
84
|
+
'accept': 'application/json;odata=nometadata',
|
|
85
|
+
'content-type': 'application/json'
|
|
86
|
+
},
|
|
87
|
+
responseType: 'json'
|
|
88
|
+
};
|
|
89
|
+
yield request_1.default.post(requestOptions);
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
this.handleRejectedODataJsonPromise(err);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
94
96
|
}
|
|
95
97
|
_SpoListItemRoleInheritanceBreakCommand_instances = new WeakSet(), _SpoListItemRoleInheritanceBreakCommand_initTelemetry = function _SpoListItemRoleInheritanceBreakCommand_initTelemetry() {
|
|
96
98
|
this.telemetry.push((args) => {
|
|
@@ -43,36 +43,8 @@ class SpoListItemRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
43
43
|
if (this.verbose) {
|
|
44
44
|
logger.logToStderr(`Restore role inheritance of list item in site at ${args.options.webUrl}...`);
|
|
45
45
|
}
|
|
46
|
-
const resetListItemRoleInheritance = () => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
try {
|
|
48
|
-
let requestUrl = `${args.options.webUrl}/_api/web`;
|
|
49
|
-
if (args.options.listId) {
|
|
50
|
-
requestUrl += `/lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
51
|
-
}
|
|
52
|
-
else if (args.options.listTitle) {
|
|
53
|
-
requestUrl += `/lists/getbytitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
54
|
-
}
|
|
55
|
-
else if (args.options.listUrl) {
|
|
56
|
-
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
57
|
-
requestUrl += `/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
58
|
-
}
|
|
59
|
-
const requestOptions = {
|
|
60
|
-
url: `${requestUrl}/items(${args.options.listItemId})/resetroleinheritance`,
|
|
61
|
-
method: 'POST',
|
|
62
|
-
headers: {
|
|
63
|
-
'accept': 'application/json;odata=nometadata',
|
|
64
|
-
'content-type': 'application/json'
|
|
65
|
-
},
|
|
66
|
-
responseType: 'json'
|
|
67
|
-
};
|
|
68
|
-
yield request_1.default.post(requestOptions);
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
71
|
-
this.handleRejectedODataJsonPromise(err);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
46
|
if (args.options.confirm) {
|
|
75
|
-
yield resetListItemRoleInheritance();
|
|
47
|
+
yield this.resetListItemRoleInheritance(args.options);
|
|
76
48
|
}
|
|
77
49
|
else {
|
|
78
50
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -82,8 +54,38 @@ class SpoListItemRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
82
54
|
message: `Are you sure you want to reset the role inheritance of ${args.options.listItemId} in list ${(_a = args.options.listId) !== null && _a !== void 0 ? _a : args.options.listTitle}?`
|
|
83
55
|
});
|
|
84
56
|
if (result.continue) {
|
|
85
|
-
yield resetListItemRoleInheritance();
|
|
57
|
+
yield this.resetListItemRoleInheritance(args.options);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
resetListItemRoleInheritance(options) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
try {
|
|
65
|
+
let requestUrl = `${options.webUrl}/_api/web`;
|
|
66
|
+
if (options.listId) {
|
|
67
|
+
requestUrl += `/lists(guid'${formatting_1.formatting.encodeQueryParameter(options.listId)}')`;
|
|
68
|
+
}
|
|
69
|
+
else if (options.listTitle) {
|
|
70
|
+
requestUrl += `/lists/getbytitle('${formatting_1.formatting.encodeQueryParameter(options.listTitle)}')`;
|
|
86
71
|
}
|
|
72
|
+
else if (options.listUrl) {
|
|
73
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
74
|
+
requestUrl += `/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
75
|
+
}
|
|
76
|
+
const requestOptions = {
|
|
77
|
+
url: `${requestUrl}/items(${options.listItemId})/resetroleinheritance`,
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: {
|
|
80
|
+
'accept': 'application/json;odata=nometadata',
|
|
81
|
+
'content-type': 'application/json'
|
|
82
|
+
},
|
|
83
|
+
responseType: 'json'
|
|
84
|
+
};
|
|
85
|
+
yield request_1.default.post(requestOptions);
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
this.handleRejectedODataJsonPromise(err);
|
|
87
89
|
}
|
|
88
90
|
});
|
|
89
91
|
}
|
|
@@ -37,28 +37,8 @@ class SpoNavigationNodeRemoveCommand extends SpoCommand_1.default {
|
|
|
37
37
|
}
|
|
38
38
|
commandAction(logger, args) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const removeNode = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
try {
|
|
42
|
-
const res = yield spo_1.spo.getRequestDigest(args.options.webUrl);
|
|
43
|
-
if (this.verbose) {
|
|
44
|
-
logger.logToStderr(`Removing navigation node...`);
|
|
45
|
-
}
|
|
46
|
-
const requestOptions = {
|
|
47
|
-
url: `${args.options.webUrl}/_api/web/navigation/${args.options.location.toLowerCase()}/getbyid(${args.options.id})`,
|
|
48
|
-
headers: {
|
|
49
|
-
accept: 'application/json;odata=nometadata',
|
|
50
|
-
'X-RequestDigest': res.FormDigestValue
|
|
51
|
-
},
|
|
52
|
-
responseType: 'json'
|
|
53
|
-
};
|
|
54
|
-
yield request_1.default.delete(requestOptions);
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
this.handleRejectedODataJsonPromise(err);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
40
|
if (args.options.confirm) {
|
|
61
|
-
yield removeNode();
|
|
41
|
+
yield this.removeNode(logger, args.options);
|
|
62
42
|
}
|
|
63
43
|
else {
|
|
64
44
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -68,8 +48,30 @@ class SpoNavigationNodeRemoveCommand extends SpoCommand_1.default {
|
|
|
68
48
|
message: `Are you sure you want to remove the node ${args.options.id} from the navigation?`
|
|
69
49
|
});
|
|
70
50
|
if (result.continue) {
|
|
71
|
-
yield removeNode();
|
|
51
|
+
yield this.removeNode(logger, args.options);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
removeNode(logger, options) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
try {
|
|
59
|
+
const res = yield spo_1.spo.getRequestDigest(options.webUrl);
|
|
60
|
+
if (this.verbose) {
|
|
61
|
+
logger.logToStderr(`Removing navigation node...`);
|
|
72
62
|
}
|
|
63
|
+
const requestOptions = {
|
|
64
|
+
url: `${options.webUrl}/_api/web/navigation/${options.location.toLowerCase()}/getbyid(${options.id})`,
|
|
65
|
+
headers: {
|
|
66
|
+
accept: 'application/json;odata=nometadata',
|
|
67
|
+
'X-RequestDigest': res.FormDigestValue
|
|
68
|
+
},
|
|
69
|
+
responseType: 'json'
|
|
70
|
+
};
|
|
71
|
+
yield request_1.default.delete(requestOptions);
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
this.handleRejectedODataJsonPromise(err);
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
77
|
}
|
|
@@ -35,33 +35,8 @@ class SpoOrgAssetsLibraryRemoveCommand extends SpoCommand_1.default {
|
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const removeLibrary = () => __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
try {
|
|
40
|
-
const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
41
|
-
const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
|
|
42
|
-
const requestOptions = {
|
|
43
|
-
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
44
|
-
headers: {
|
|
45
|
-
'X-RequestDigest': reqDigest.FormDigestValue
|
|
46
|
-
},
|
|
47
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="9" ObjectPathId="8" /><Method Name="RemoveFromOrgAssets" Id="10" ObjectPathId="8"><Parameters><Parameter Type="String">${args.options.libraryUrl}</Parameter><Parameter Type="Guid">{00000000-0000-0000-0000-000000000000}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="8" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
48
|
-
};
|
|
49
|
-
const res = yield request_1.default.post(requestOptions);
|
|
50
|
-
const json = JSON.parse(res);
|
|
51
|
-
const response = json[0];
|
|
52
|
-
if (response.ErrorInfo) {
|
|
53
|
-
throw response.ErrorInfo.ErrorMessage;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
logger.log(json[json.length - 1]);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
catch (err) {
|
|
60
|
-
this.handleRejectedPromise(err);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
38
|
if (args.options.confirm) {
|
|
64
|
-
yield removeLibrary();
|
|
39
|
+
yield this.removeLibrary(logger, args.options.libraryUrl);
|
|
65
40
|
}
|
|
66
41
|
else {
|
|
67
42
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -71,11 +46,38 @@ class SpoOrgAssetsLibraryRemoveCommand extends SpoCommand_1.default {
|
|
|
71
46
|
message: `Are you sure you want to remove the library ${args.options.libraryUrl} as a central location for organization assets?`
|
|
72
47
|
});
|
|
73
48
|
if (result.continue) {
|
|
74
|
-
yield removeLibrary();
|
|
49
|
+
yield this.removeLibrary(logger, args.options.libraryUrl);
|
|
75
50
|
}
|
|
76
51
|
}
|
|
77
52
|
});
|
|
78
53
|
}
|
|
54
|
+
removeLibrary(logger, libraryUrl) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
try {
|
|
57
|
+
const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
58
|
+
const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
|
|
59
|
+
const requestOptions = {
|
|
60
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
61
|
+
headers: {
|
|
62
|
+
'X-RequestDigest': reqDigest.FormDigestValue
|
|
63
|
+
},
|
|
64
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="9" ObjectPathId="8" /><Method Name="RemoveFromOrgAssets" Id="10" ObjectPathId="8"><Parameters><Parameter Type="String">${libraryUrl}</Parameter><Parameter Type="Guid">{00000000-0000-0000-0000-000000000000}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="8" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
65
|
+
};
|
|
66
|
+
const res = yield request_1.default.post(requestOptions);
|
|
67
|
+
const json = JSON.parse(res);
|
|
68
|
+
const response = json[0];
|
|
69
|
+
if (response.ErrorInfo) {
|
|
70
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
logger.log(json[json.length - 1]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
this.handleRejectedPromise(err);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
79
81
|
}
|
|
80
82
|
_SpoOrgAssetsLibraryRemoveCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryRemoveCommand_initOptions = function _SpoOrgAssetsLibraryRemoveCommand_initOptions() {
|
|
81
83
|
this.options.unshift({
|
|
@@ -39,30 +39,8 @@ class SpoOrgNewsSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
39
39
|
}
|
|
40
40
|
commandAction(logger, args) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
const removeOrgNewsSite = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
try {
|
|
44
|
-
const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
45
|
-
const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
|
|
46
|
-
const requestOptions = {
|
|
47
|
-
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
48
|
-
headers: {
|
|
49
|
-
'X-RequestDigest': reqDigest.FormDigestValue
|
|
50
|
-
},
|
|
51
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="64" ObjectPathId="63" /><Method Name="RemoveOrgNewsSite" Id="65" ObjectPathId="63"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.url)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="63" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
52
|
-
};
|
|
53
|
-
const res = yield request_1.default.post(requestOptions);
|
|
54
|
-
const json = JSON.parse(res);
|
|
55
|
-
const response = json[0];
|
|
56
|
-
if (response.ErrorInfo) {
|
|
57
|
-
throw response.ErrorInfo.ErrorMessage;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
catch (err) {
|
|
61
|
-
this.handleRejectedPromise(err);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
42
|
if (args.options.confirm) {
|
|
65
|
-
yield removeOrgNewsSite();
|
|
43
|
+
yield this.removeOrgNewsSite(logger, args.options.url);
|
|
66
44
|
}
|
|
67
45
|
else {
|
|
68
46
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -72,9 +50,33 @@ class SpoOrgNewsSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
72
50
|
message: `Are you sure you want to remove ${args.options.url} from the list of organizational news sites?`
|
|
73
51
|
});
|
|
74
52
|
if (result.continue) {
|
|
75
|
-
yield removeOrgNewsSite();
|
|
53
|
+
yield this.removeOrgNewsSite(logger, args.options.url);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
removeOrgNewsSite(logger, url) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
try {
|
|
61
|
+
const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
62
|
+
const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
|
|
63
|
+
const requestOptions = {
|
|
64
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
65
|
+
headers: {
|
|
66
|
+
'X-RequestDigest': reqDigest.FormDigestValue
|
|
67
|
+
},
|
|
68
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="64" ObjectPathId="63" /><Method Name="RemoveOrgNewsSite" Id="65" ObjectPathId="63"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(url)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="63" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
69
|
+
};
|
|
70
|
+
const res = yield request_1.default.post(requestOptions);
|
|
71
|
+
const json = JSON.parse(res);
|
|
72
|
+
const response = json[0];
|
|
73
|
+
if (response.ErrorInfo) {
|
|
74
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
76
75
|
}
|
|
77
76
|
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
this.handleRejectedPromise(err);
|
|
79
|
+
}
|
|
78
80
|
});
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -120,7 +120,7 @@ class SpoPageClientSideWebPartAddCommand extends SpoCommand_1.default {
|
|
|
120
120
|
// get section number. if not specified, get the last section
|
|
121
121
|
const section = args.options.section || zoneIndices.length;
|
|
122
122
|
if (section > zoneIndices.length) {
|
|
123
|
-
|
|
123
|
+
throw `Invalid section '${section}'`;
|
|
124
124
|
}
|
|
125
125
|
// zoneIndex that represents the section where the web part should be added
|
|
126
126
|
const zoneIndex = zoneIndices[section - 1];
|
|
@@ -132,7 +132,7 @@ class SpoPageClientSideWebPartAddCommand extends SpoCommand_1.default {
|
|
|
132
132
|
c.position.zoneIndex === zoneIndex &&
|
|
133
133
|
c.position.sectionIndex === column);
|
|
134
134
|
if (controlIndex === -1) {
|
|
135
|
-
|
|
135
|
+
throw `Invalid column '${args.options.column}'`;
|
|
136
136
|
}
|
|
137
137
|
// get the first control that matches section and column
|
|
138
138
|
// if it's a empty column, it should be replaced with the web part
|
|
@@ -235,7 +235,7 @@ class SpoPageClientSideWebPartAddCommand extends SpoCommand_1.default {
|
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
getWebPart(logger, args) {
|
|
238
|
-
return
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
239
|
const standardWebPart = args.options.standardWebPart;
|
|
240
240
|
const webPartId = standardWebPart
|
|
241
241
|
? StandardWebPartTypes_1.StandardWebPartUtils.getWebPartId(standardWebPart)
|
|
@@ -251,43 +251,37 @@ class SpoPageClientSideWebPartAddCommand extends SpoCommand_1.default {
|
|
|
251
251
|
},
|
|
252
252
|
responseType: 'json'
|
|
253
253
|
};
|
|
254
|
-
request_1.default
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
webPartId: componentId
|
|
286
|
-
};
|
|
287
|
-
resolve(webPart);
|
|
288
|
-
}, (error) => {
|
|
289
|
-
reject(error);
|
|
290
|
-
});
|
|
254
|
+
const response = yield request_1.default.get(requestOptions);
|
|
255
|
+
const webPartDefinition = response.value.filter((c) => c.Id.toLowerCase() === webPartId.toLowerCase() || c.Id.toLowerCase() === `{${webPartId.toLowerCase()}}`);
|
|
256
|
+
if (webPartDefinition.length === 0) {
|
|
257
|
+
throw new Error(`There is no available WebPart with Id ${webPartId}.`);
|
|
258
|
+
}
|
|
259
|
+
if (this.debug) {
|
|
260
|
+
logger.logToStderr('WebPart definition:');
|
|
261
|
+
logger.logToStderr(webPartDefinition);
|
|
262
|
+
logger.logToStderr('');
|
|
263
|
+
}
|
|
264
|
+
if (this.verbose) {
|
|
265
|
+
logger.logToStderr(`Creating instance from definition of WebPart ${webPartId}...`);
|
|
266
|
+
}
|
|
267
|
+
const component = webPartDefinition[0];
|
|
268
|
+
const id = (0, uuid_1.v4)();
|
|
269
|
+
const componentId = component.Id.replace(/^\{|\}$/g, "").toLowerCase();
|
|
270
|
+
const manifest = JSON.parse(component.Manifest);
|
|
271
|
+
const preconfiguredEntries = manifest.preconfiguredEntries[0];
|
|
272
|
+
const webPart = {
|
|
273
|
+
id,
|
|
274
|
+
webPartData: {
|
|
275
|
+
dataVersion: "1.0",
|
|
276
|
+
description: preconfiguredEntries.description.default,
|
|
277
|
+
id: componentId,
|
|
278
|
+
instanceId: id,
|
|
279
|
+
properties: preconfiguredEntries.properties,
|
|
280
|
+
title: preconfiguredEntries.title.default
|
|
281
|
+
},
|
|
282
|
+
webPartId: componentId
|
|
283
|
+
};
|
|
284
|
+
return webPart;
|
|
291
285
|
});
|
|
292
286
|
}
|
|
293
287
|
setWebPartProperties(webPart, logger, args) {
|